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:
parent
425d3a385b
commit
a806de8513
|
@ -81,7 +81,9 @@ void loadGameGraphics()
|
||||||
continue;
|
continue;
|
||||||
shipShape[i] = createSurface(shipShape[i - SHIP_HIT_INDEX]->w,
|
shipShape[i] = createSurface(shipShape[i - SHIP_HIT_INDEX]->w,
|
||||||
shipShape[i - SHIP_HIT_INDEX]->h);
|
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]);
|
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)
|
switch (shipShape[i]->format->BitsPerPixel)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue