#define gpuLightingRGB gpuLightingRGBARM
#define gpuLightingTXT gpuLightingTXTARM
#define gpuLightingTXTGouraud gpuLightingTXTGouraudARM
-// Non-dithering lighting and blending functions preserve uSrc
-// MSB. This saves a few operations and useless load/stores.
-#define MSB_PRESERVED (!CF_DITHER)
#else
#define gpuBlending gpuBlendingGeneric
#define gpuLightingRGB gpuLightingRGBGeneric
#define gpuLightingTXT gpuLightingTXTGeneric
#define gpuLightingTXTGouraud gpuLightingTXTGouraudGeneric
-#define MSB_PRESERVED 0
#endif
+// Non-dithering lighting and blending functions preserve uSrc
+// MSB. This saves a few operations and useless load/stores.
+#define MSB_PRESERVED (!CF_DITHER)
// If defined, Gouraud colors are fixed-point 5.11, otherwise they are 8.16
// This is only for debugging/verification of low-precision colors in C.
{
return (gpu_unai.LightLUT[((uSrc&0x7C00)>>5) | b5] << 10) |
(gpu_unai.LightLUT[ (uSrc&0x03E0) | g5] << 5) |
- (gpu_unai.LightLUT[((uSrc&0x001F)<<5) | r5] );
+ (gpu_unai.LightLUT[((uSrc&0x001F)<<5) | r5] ) |
+ (uSrc & 0x8000);
}
{
return (gpu_unai.LightLUT[((uSrc&0x7C00)>>5) | ((gCol>> 5)&0x1F)]<<10) |
(gpu_unai.LightLUT[ (uSrc&0x03E0) | ((gCol>>16)&0x1F)]<< 5) |
- (gpu_unai.LightLUT[((uSrc&0x001F)<<5) | (gCol>>27) ] );
+ (gpu_unai.LightLUT[((uSrc&0x001F)<<5) | (gCol>>27) ]) |
+ (uSrc & 0x8000);
}