[rlsw] Fix typos, update build scripts, and align style (#5669)

* fix typo that appeared during re-format

* fix build scripts for `GRAPHICS_API_OPENGL_SOFTWARE`

* consistency tweak
This commit is contained in:
Le Juez Victor
2026-03-17 20:01:45 +01:00
committed by GitHub
parent 0de2e8092b
commit d657e86043
3 changed files with 10 additions and 12 deletions

10
src/external/rlsw.h vendored
View File

@ -2353,7 +2353,7 @@ static inline void sw_pixel_set_depth(void *pixels, float depth, uint32_t offset
switch (format)
{
case SW_PIXELFORMAT_DEPTH_D8: sw_pixel_set_depth_D8(pixels, depth, offset); break;
case SW_PIXELFORMAT_DEPTH_D16: w_pixel_set_depth_D16(pixels, depth, offset); break;
case SW_PIXELFORMAT_DEPTH_D16: sw_pixel_set_depth_D16(pixels, depth, offset); break;
case SW_PIXELFORMAT_DEPTH_D32: sw_pixel_set_depth_D32(pixels, depth, offset); break;
case SW_PIXELFORMAT_UNKNOWN:
@ -3565,7 +3565,7 @@ static inline bool sw_line_clip_coord(float q, float p, float *t0, float *t1)
static bool sw_line_clip(sw_vertex_t *v0, sw_vertex_t *v1)
{
float t0 = 0.0f, t1 = 1.0f;
float dH[4] = { 0 }
float dH[4] = { 0 };
float dC[4] = { 0 };
for (int i = 0; i < 4; i++)
@ -5345,10 +5345,8 @@ static void SW_RASTER_TRIANGLE(const sw_vertex_t *v0, const sw_vertex_t *v1, con
{
vLeft.screen[1] = vRight.screen[1] = y;
if (vLeft.screen[0] < vRight.screen[0])
SW_RASTER_TRIANGLE_SPAN(&vLeft, &vRight, dVXdy02.texcoord[0], dVXdy02.texcoord[1]);
else
SW_RASTER_TRIANGLE_SPAN(&vRight, &vLeft, dVXdy02.texcoord[0], dVXdy02.texcoord[1]);
if (vLeft.screen[0] < vRight.screen[0]) SW_RASTER_TRIANGLE_SPAN(&vLeft, &vRight, dVXdy02.texcoord[0], dVXdy02.texcoord[1]);
else SW_RASTER_TRIANGLE_SPAN(&vRight, &vLeft, dVXdy02.texcoord[0], dVXdy02.texcoord[1]);
sw_add_vertex_grad_PTCH(&vLeft, &dVXdy02);
vLeft.screen[0] += dXdy02;