Minor fix
This commit is contained in:
parent
6ede2722a0
commit
bca1c618f0
|
@ -88,34 +88,34 @@ void loadGameGraphics()
|
|||
case 32:
|
||||
SDL_LockSurface(shipShape[i]);
|
||||
p32 = (Uint32 *)shipShape[i]->pixels;
|
||||
SDL_UnlockSurface(shipShape[i]);
|
||||
for (int j = 0; j < shipShape[i]->w * shipShape[i]->h; j++)
|
||||
{
|
||||
if (p32[j])
|
||||
p32[j] |= shipShape[i]->format->Rmask;
|
||||
}
|
||||
SDL_UnlockSurface(shipShape[i]);
|
||||
break;
|
||||
|
||||
case 16:
|
||||
SDL_LockSurface(shipShape[i]);
|
||||
p16 = (Uint16 *)shipShape[i]->pixels;
|
||||
SDL_UnlockSurface(shipShape[i]);
|
||||
for (int j = 0; j < shipShape[i]->w * shipShape[i]->h; j++)
|
||||
{
|
||||
if (p16[j])
|
||||
p16[j] |= shipShape[i]->format->Rmask;
|
||||
}
|
||||
SDL_UnlockSurface(shipShape[i]);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
SDL_LockSurface(shipShape[i]);
|
||||
p8 = (Uint8 *)shipShape[i]->pixels;
|
||||
SDL_UnlockSurface(shipShape[i]);
|
||||
for (int j = 0; j < shipShape[i]->w * shipShape[i]->h; j++)
|
||||
{
|
||||
if (p8[j])
|
||||
p8[j] = SDL_MapRGB(shipShape[i]->format, 255, 0, 0);
|
||||
}
|
||||
SDL_UnlockSurface(shipShape[i]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue