Browse Source

fix var name...

pull/4832/head
Bigfoot71 2 weeks ago
parent
commit
e2d10420a7
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/external/rlsw.h

+ 2
- 2
src/external/rlsw.h View File

@ -1312,10 +1312,10 @@ static inline void sw_framebuffer_fill(void* colorPtr, void* depthPtr, int size,
// Calculate and pack 5:6:5 color
// Scale color components to the max value for each bit depth and round
uint16_t r16 = (uint16_t)(color[0] * 31.0f + 0.5f);
uint16_t r16 = (uint16_t)(color[1] * 63.0f + 0.5f);
uint16_t g16 = (uint16_t)(color[1] * 63.0f + 0.5f);
uint16_t b16 = (uint16_t)(color[2] * 31.0f + 0.5f);
// Pack the components into a 16-bit value
uint16_t packedColor = ((r16 & 0x1F) << 11) | ((r16 & 0x3F) << 5) | (b16 & 0x1F);
uint16_t packedColor = ((r16 & 0x1F) << 11) | ((g16 & 0x3F) << 5) | (b16 & 0x1F);
uint16_t* cptr = (uint16_t*)colorPtr;
#elif (SW_COLOR_BUFFER_BITS == 24)
// Calculate 8:8:8 color components

Loading…
Cancel
Save