More style corrections
This commit is contained in:
parent
6d939729a3
commit
8c51811b3e
|
@ -153,7 +153,7 @@ void addBuffer(int x, int y, int w, int h)
|
||||||
void blit(SDL_Surface *image, int x, int y, SDL_Surface *dest)
|
void blit(SDL_Surface *image, int x, int y, SDL_Surface *dest)
|
||||||
{
|
{
|
||||||
// Exit early if image is not on dest at all
|
// Exit early if image is not on dest at all
|
||||||
if(x + image->w < 0 || x >= dest->w || y + image->h < 0 || y >= dest->h)
|
if (x + image->w < 0 || x >= dest->w || y + image->h < 0 || y >= dest->h)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Set up a rectangle to draw to
|
// Set up a rectangle to draw to
|
||||||
|
@ -165,14 +165,14 @@ void blit(SDL_Surface *image, int x, int y, SDL_Surface *dest)
|
||||||
blitRect.h = image->h;
|
blitRect.h = image->h;
|
||||||
|
|
||||||
/* Blit onto the destination surface */
|
/* Blit onto the destination surface */
|
||||||
if(SDL_BlitSurface(image, NULL, dest, &blitRect) < 0)
|
if (SDL_BlitSurface(image, NULL, dest, &blitRect) < 0)
|
||||||
{
|
{
|
||||||
printf("BlitSurface error: %s\n", SDL_GetError());
|
printf("BlitSurface error: %s\n", SDL_GetError());
|
||||||
showErrorAndExit(2, "");
|
showErrorAndExit(2, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only ff it is to the screen, mark the region as damaged
|
// Only ff it is to the screen, mark the region as damaged
|
||||||
if(dest == screen)
|
if (dest == screen)
|
||||||
addBuffer(blitRect.x, blitRect.y, blitRect.w, blitRect.h);
|
addBuffer(blitRect.x, blitRect.y, blitRect.w, blitRect.h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue