From 5b1679ad85631d59c9f094b056c089cb08b9fd67 Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 3 Jun 2008 22:16:39 +0000 Subject: [PATCH] Molgrum doesn't like bgr, even though x86 display hardware uses it. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2996 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_alias.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/engine/gl/gl_alias.c b/engine/gl/gl_alias.c index 4db74d560..282c5e1fa 100644 --- a/engine/gl/gl_alias.c +++ b/engine/gl/gl_alias.c @@ -1111,10 +1111,10 @@ static galiastexnum_t *GL_ChooseSkin(galiasinfo_t *inf, char *modelname, int sur if (tc >= 16) { //assumption: row 0 is pure white. - translate32[TOP_RANGE+i] = 0xff000000| - (((((tc&0x0000ff)>> 0)*((d_8to24rgbtable[i]&0x0000ff)>> 0))>>8)) | - (((((tc&0x00ff00)>> 8)*((d_8to24rgbtable[i]&0x00ff00)>> 8))>>8)<<8) | - (((((tc&0xff0000)>>16)*((d_8to24rgbtable[i]&0xff0000)>>16))>>8)<<16); + *((unsigned char*)&translate32[TOP_RANGE+i]+0) = (((tc&0xff0000)>>16)**((unsigned char*)&d_8to24rgbtable[i]+0))>>8; + *((unsigned char*)&translate32[TOP_RANGE+i]+1) = (((tc&0x00ff00)>> 8)**((unsigned char*)&d_8to24rgbtable[i]+1))>>8; + *((unsigned char*)&translate32[TOP_RANGE+i]+2) = (((tc&0x0000ff)>> 0)**((unsigned char*)&d_8to24rgbtable[i]+2))>>8; + *((unsigned char*)&translate32[TOP_RANGE+i]+3) = 0xff; } else { @@ -1125,10 +1125,10 @@ static galiastexnum_t *GL_ChooseSkin(galiasinfo_t *inf, char *modelname, int sur } if (bc >= 16) { - translate32[BOTTOM_RANGE+i] = 0xff000000| - (((((bc&0x0000ff)>> 0)*((d_8to24rgbtable[i]&0x0000ff)>> 0))>>8)) | - (((((bc&0x00ff00)>> 8)*((d_8to24rgbtable[i]&0x00ff00)>> 8))>>8)<<8) | - (((((bc&0xff0000)>>16)*((d_8to24rgbtable[i]&0xff0000)>>16))>>8)<<16); + *((unsigned char*)&translate32[BOTTOM_RANGE+i]+0) = (((bc&0xff0000)>>16)**((unsigned char*)&d_8to24rgbtable[i]+0))>>8; + *((unsigned char*)&translate32[BOTTOM_RANGE+i]+1) = (((bc&0x00ff00)>> 8)**((unsigned char*)&d_8to24rgbtable[i]+1))>>8; + *((unsigned char*)&translate32[BOTTOM_RANGE+i]+2) = (((bc&0x0000ff)>> 0)**((unsigned char*)&d_8to24rgbtable[i]+2))>>8; + *((unsigned char*)&translate32[BOTTOM_RANGE+i]+3) = 0xff; } else {