Fixed failure to redden ships.

This long-standing bug was caused by using blending when trying to
copy an image, though for some reason it was inconsistent. Thanks to
everyone on the SDL mailing list for helping me solve this one!
This commit is contained in:
onpon4 2015-04-29 21:24:01 -04:00
parent 425d3a385b
commit a806de8513
1 changed files with 2 additions and 0 deletions

View File

@ -81,7 +81,9 @@ void loadGameGraphics()
continue;
shipShape[i] = createSurface(shipShape[i - SHIP_HIT_INDEX]->w,
shipShape[i - SHIP_HIT_INDEX]->h);
SDL_SetSurfaceBlendMode(shipShape[i - SHIP_HIT_INDEX], SDL_BLENDMODE_NONE);
blit(shipShape[i - SHIP_HIT_INDEX], 0, 0, shipShape[i]);
SDL_SetSurfaceBlendMode(shipShape[i - SHIP_HIT_INDEX], SDL_BLENDMODE_BLEND);
switch (shipShape[i]->format->BitsPerPixel)
{