|
|
|
@ -287,16 +287,15 @@ void Image_SetPalette( const byte *pal, uint *d_table )
@@ -287,16 +287,15 @@ void Image_SetPalette( const byte *pal, uint *d_table )
|
|
|
|
|
uint uirgba; // TODO: palette looks byte-swapped on big-endian
|
|
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// setup palette
|
|
|
|
|
switch( image.d_rendermode ) |
|
|
|
|
{ |
|
|
|
|
case LUMP_NORMAL: |
|
|
|
|
for( i = 0; i < 256; i++ ) |
|
|
|
|
{ |
|
|
|
|
rgba[0] = pal[i*3+0]; |
|
|
|
|
rgba[1] = pal[i*3+1]; |
|
|
|
|
rgba[2] = pal[i*3+2]; |
|
|
|
|
rgba[0] = TextureToGamma( pal[i*3+0] ); |
|
|
|
|
rgba[1] = TextureToGamma( pal[i*3+1] ); |
|
|
|
|
rgba[2] = TextureToGamma( pal[i*3+2] ); |
|
|
|
|
rgba[3] = 0xFF; |
|
|
|
|
memcpy( &uirgba, rgba, sizeof( uirgba )); |
|
|
|
|
d_table[i] = uirgba; |
|
|
|
|