Minor fix

This commit is contained in:
onpon4 2015-04-26 18:49:18 -04:00
parent 6ede2722a0
commit bca1c618f0
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}