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