[Scummvm-cvs-logs] CVS: residual/tinygl ztriangle.cpp,1.3,1.4
Pawel Kolodziejski
aquadran at users.sourceforge.net
Wed Aug 10 14:08:39 CEST 2005
Update of /cvsroot/scummvm/residual/tinygl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23142/tinygl
Modified Files:
ztriangle.cpp
Log Message:
partialy lighting with testure mapping mode in tinygl driver
Index: ztriangle.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/ztriangle.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ztriangle.cpp 13 Jan 2005 00:15:15 -0000 1.3
+++ ztriangle.cpp 10 Aug 2005 21:06:54 -0000 1.4
@@ -278,8 +278,16 @@
{ \
zz=z >> ZB_POINT_Z_FRAC_BITS; \
if (ZCMP(zz,pz[_a])) { \
- pp[_a]=*(PIXEL *)((char *)texture+ \
+ PIXEL pixel = *(PIXEL *)((char *)texture+ \
(((t & 0x3FC00000) | (s & 0x003FC000)) >> (17 - PSZSH)));\
+ unsigned int c_r = (pixel & 0xF800) >> 9; \
+ unsigned int c_g = (pixel & 0x07E0) >> 4; \
+ unsigned int c_b = (pixel & 0x001F) << 2; \
+ c_r = (c_r + (p2->r>>9)); \
+ c_g = (c_g + (p2->g>>9)); \
+ c_b = (c_b + (p2->b>>9)); \
+ pixel = ((c_r & 0xF8) << 8) | ((c_g & 0xFC) << 3) | (c_b >> 3); \
+ pp[_a]=pixel; \
pz[_a]=zz; \
} \
z+=dzdx; \
More information about the Scummvm-git-logs
mailing list