notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unai: Use 8.8 RGB triplet format for gouraud shading
[pcsx_rearmed.git]
/
plugins
/
gpu_unai
/
gpu_inner.h
diff --git
a/plugins/gpu_unai/gpu_inner.h
b/plugins/gpu_unai/gpu_inner.h
index
9f18735
..
1a93a39
100644
(file)
--- a/
plugins/gpu_unai/gpu_inner.h
+++ b/
plugins/gpu_unai/gpu_inner.h
@@
-59,14
+59,10
@@
#include "gpu_inner_blend_arm.h"
#include "gpu_inner_light_arm.h"
#define gpuBlending gpuBlendingARM
#include "gpu_inner_blend_arm.h"
#include "gpu_inner_light_arm.h"
#define gpuBlending gpuBlendingARM
-#define gpuLightingRGB gpuLightingRGBARM
#define gpuLightingTXT gpuLightingTXTARM
#define gpuLightingTXT gpuLightingTXTARM
-#define gpuLightingTXTGouraud gpuLightingTXTGouraudARM
#else
#define gpuBlending gpuBlendingGeneric
#else
#define gpuBlending gpuBlendingGeneric
-#define gpuLightingRGB gpuLightingRGBGeneric
#define gpuLightingTXT gpuLightingTXTGeneric
#define gpuLightingTXT gpuLightingTXTGeneric
-#define gpuLightingTXTGouraud gpuLightingTXTGouraudGeneric
#endif
// Non-dithering lighting and blending functions preserve uSrc
#endif
// Non-dithering lighting and blending functions preserve uSrc
@@
-537,8
+533,8
@@
endpolynotextnogou:
else
{
// UNTEXTURED, GOURAUD
else
{
// UNTEXTURED, GOURAUD
-
u32
l_gCol = gpu_unai.gCol;
-
u32
l_gInc = gpu_unai.gInc;
+
gcol_t
l_gCol = gpu_unai.gCol;
+
gcol_t
l_gInc = gpu_unai.gInc;
do {
uint_fast16_t uDst, uSrc;
do {
uint_fast16_t uDst, uSrc;
@@
-570,7
+566,7
@@
endpolynotextnogou:
endpolynotextgou:
pDst++;
endpolynotextgou:
pDst++;
- l_gCol
+= l_gInc
;
+ l_gCol
.raw += l_gInc.raw
;
}
while (--count);
}
}
while (--count);
}
@@
-594,7
+590,7
@@
endpolynotextgou:
u8 r5, g5, b5;
u8 r8, g8, b8;
u8 r5, g5, b5;
u8 r8, g8, b8;
-
u32
l_gInc, l_gCol;
+
gcol_t
l_gInc, l_gCol;
if (CF_LIGHT) {
if (CF_GOURAUD) {
if (CF_LIGHT) {
if (CF_GOURAUD) {
@@
-678,7
+674,8
@@
endpolytext:
pDst++;
l_u = (l_u + l_u_inc) & l_u_msk;
l_v = (l_v + l_v_inc) & l_v_msk;
pDst++;
l_u = (l_u + l_u_inc) & l_u_msk;
l_v = (l_v + l_v_inc) & l_v_msk;
- if (CF_LIGHT && CF_GOURAUD) l_gCol += l_gInc;
+ if (CF_LIGHT && CF_GOURAUD)
+ l_gCol.raw += l_gInc.raw;
}
while (--count);
}
}
while (--count);
}