32-bpp fix

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@72 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2004-08-30 01:17:57 +00:00
parent f788e5a871
commit 899e672722
2 changed files with 9 additions and 9 deletions

View file

@ -584,9 +584,9 @@ void D_PolysetDrawSpans32Trans (spanpackage_t *pspanpackage)
lpdest[1] = ((qbyte *)acolormap)[lptex[1] + (llight & 0xFF00)];
lpdest[2] = ((qbyte *)acolormap)[lptex[2] + (llight & 0xFF00)];
#else
lpdest[0] = (lpdest[0]*transbackfac + gammatable[(lptex[0]*(llight>>8))/(256)]*transfactor)/255;
lpdest[1] = (lpdest[1]*transbackfac + gammatable[(lptex[1]*(llight>>8))/(256)]*transfactor)/255;
lpdest[2] = (lpdest[2]*transbackfac + gammatable[(lptex[2]*(llight>>8))/(256)]*transfactor)/255;
lpdest[0] = (lpdest[0]*transbackfac + gammatable[(lptex[0]*(llight&0x3FFF))/(0x3FFF)]*transfactor)/255;
lpdest[1] = (lpdest[1]*transbackfac + gammatable[(lptex[1]*(llight&0x3FFF))/(0x3FFF)]*transfactor)/255;
lpdest[2] = (lpdest[2]*transbackfac + gammatable[(lptex[2]*(llight&0x3FFF))/(0x3FFF)]*transfactor)/255;
#endif
*lpz = lzi >> 16;
}
@ -658,9 +658,9 @@ void D_PolysetDrawSpans32 (spanpackage_t *pspanpackage)
lpdest[1] = ((qbyte *)acolormap)[lptex[1] + (llight & 0xFF00)];
lpdest[2] = ((qbyte *)acolormap)[lptex[2] + (llight & 0xFF00)];
#else
lpdest[0] = gammatable[(lptex[0]*(llight>>8))/(256)];
lpdest[1] = gammatable[(lptex[1]*(llight>>8))/(256)];
lpdest[2] = gammatable[(lptex[2]*(llight>>8))/(256)];
lpdest[0] = gammatable[(lptex[0]*(llight&0x3FFF))/(0x3FFF)];
lpdest[1] = gammatable[(lptex[1]*(llight&0x3FFF))/(0x3FFF)];
lpdest[2] = gammatable[(lptex[2]*(llight&0x3FFF))/(0x3FFF)];
#endif
*lpz = lzi >> 16;
}

View file

@ -1486,9 +1486,9 @@ void R_DrawSurfaceBlock32From32Lit (void)
pix = psource[b+0];
prowdest[b+2] = pix;
prowdest[b+0] = gammatable[((int)psource[b+2]*(256-((lightb&0xff00)>>6))) / 256];
prowdest[b+1] = gammatable[((int)psource[b+1]*(256-((lightg&0xff00)>>6))) / 256];
prowdest[b+2] = gammatable[((int)psource[b+0]*(256-((lightr&0xff00)>>6))) / 256];
prowdest[b+0] = gammatable[((int)psource[b+2]*(0x3FFF-(lightb & 0x3FFF))) / 0x3FFF];
prowdest[b+1] = gammatable[((int)psource[b+1]*(0x3FFF-(lightg & 0x3FFF))) / 0x3FFF];
prowdest[b+2] = gammatable[((int)psource[b+0]*(0x3FFF-(lightr & 0x3FFF))) / 0x3FFF];
prowdest[b+3] = psource[b+3];
lightr += lightstepr;