Remember if a surface fits in 4 bits.

This commit is contained in:
Glenn Maynard
2003-10-08 03:37:33 +00:00
parent a37668e44e
commit 2854c68a18
2 changed files with 8 additions and 0 deletions
+3
View File
@@ -1022,6 +1022,9 @@ SDL_Surface *mySDL_Palettize( SDL_Surface *src_surf, int GrayBits, int AlphaBits
const int Amask = ((1 << AlphaBits) - 1) << Ashift; // alpha mask
const int Aloss = 8-AlphaBits;
if( TotalColors <= 16 )
dst_surf->unused1 |= FOUR_BIT_PALETTE;
for( int index = 0; index < TotalColors; ++index )
{
const int I = (index & Imask) >> Ishift;