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