fix wrong assert
This commit is contained in:
parent
07ea0ce1c7
commit
3e72cff940
1 changed files with 1 additions and 2 deletions
|
@ -1287,8 +1287,7 @@ void GraphicPlayerPixels(int colorIndex, const CGraphic &sprite)
|
|||
|
||||
Assert(SDL_MUSTLOCK(sprite.Surface) == 0);
|
||||
std::vector<SDL_Color> sdlColors = std::vector<SDL_Color>(PlayerColorsRGB[colorIndex].begin(), PlayerColorsRGB[colorIndex].end());
|
||||
Assert(sprite.Surface->format->palette);
|
||||
Assert(sprite.Surface->format->palette->ncolors > PlayerColorIndexStart + PlayerColorIndexCount);
|
||||
Assert(!sprite.Surface->format->palette || sprite.Surface->format->palette->ncolors > PlayerColorIndexStart + PlayerColorIndexCount);
|
||||
SDL_SetPaletteColors(sprite.Surface->format->palette, &sdlColors[0], PlayerColorIndexStart, PlayerColorIndexCount);
|
||||
if (sprite.SurfaceFlip) {
|
||||
SDL_SetPaletteColors(sprite.SurfaceFlip->format->palette, &sdlColors[0], PlayerColorIndexStart, PlayerColorIndexCount);
|
||||
|
|
Loading…
Add table
Reference in a new issue