Fix whitespace issues.

This commit is contained in:
Guus Sliepen 2012-03-11 15:21:38 +01:00
parent f5eaa991cf
commit da50d090f5
5 changed files with 29 additions and 31 deletions

View File

@ -112,7 +112,7 @@ void doExplosions()
{ {
prevExplosion->next = explosion->next; prevExplosion->next = explosion->next;
delete explosion; delete explosion;
explosion = prevExplosion; explosion = prevExplosion;
} }
} }
} }

View File

@ -28,12 +28,12 @@ void defineGlobals()
engine.musicVolume = 100; engine.musicVolume = 100;
engine.useAudio = true; engine.useAudio = true;
engine.maxAliens = 9; engine.maxAliens = 9;
engine.ssx = 0; engine.ssx = 0;
engine.ssy = 0; engine.ssy = 0;
engine.bulletHead = new object; engine.bulletHead = new object;
engine.bulletHead->next = NULL; engine.bulletHead->next = NULL;
engine.bulletTail = engine.bulletHead; engine.bulletTail = engine.bulletHead;
@ -51,10 +51,10 @@ void defineGlobals()
engine.commsSection = 0; engine.commsSection = 0;
for (int i = 0 ; i < 350 ; i++) for (int i = 0 ; i < 350 ; i++)
engine.keyState[i] = 0; engine.keyState[i] = 0;
engine.eventTimer = 0; engine.eventTimer = 0;
engine.counter2 = 0; engine.counter2 = 0;
engine.timeTaken = 0; engine.timeTaken = 0;
engine.timeMission = 0; engine.timeMission = 0;
@ -72,7 +72,7 @@ void defineGlobals()
engine.cheatAmmo = false; engine.cheatAmmo = false;
engine.cheatCash = false; engine.cheatCash = false;
// All Development Stuff... // All Development Stuff...
dev.moveAliens = 1; dev.moveAliens = 1;
dev.fireAliens = 1; dev.fireAliens = 1;
} }

View File

@ -666,29 +666,29 @@ void freeGraphics()
SDL_Surface *loadImage(const char *filename) SDL_Surface *loadImage(const char *filename)
{ {
SDL_Surface *image, *newImage; SDL_Surface *image, *newImage;
#if USEPACK #if USEPACK
unpack(filename, PAK_IMG); unpack(filename, PAK_IMG);
image = IMG_Load_RW(engine.sdlrw, 1); image = IMG_Load_RW(engine.sdlrw, 1);
#else #else
image = IMG_Load(filename); image = IMG_Load(filename);
#endif #endif
if (image == NULL) { if (image == NULL) {
printf("Couldn't load %s: %s\n", filename, SDL_GetError()); printf("Couldn't load %s: %s\n", filename, SDL_GetError());
showErrorAndExit(0, filename); showErrorAndExit(0, filename);
} }
newImage = SDL_DisplayFormat(image); newImage = SDL_DisplayFormat(image);
if ( newImage ) { if ( newImage ) {
SDL_FreeSurface(image); SDL_FreeSurface(image);
} else { } else {
// This happens when we are loading the window icon image // This happens when we are loading the window icon image
newImage = image; newImage = image;
} }
return setTransparent(newImage); return setTransparent(newImage);
} }
/* /*
@ -702,9 +702,7 @@ void doStarfield()
if (SDL_MUSTLOCK(screen)) if (SDL_MUSTLOCK(screen))
{ {
if (SDL_LockSurface(screen) < 0 ) if (SDL_LockSurface(screen) < 0 )
{
showErrorAndExit(2, ""); showErrorAndExit(2, "");
}
} }
int color = 0; int color = 0;

View File

@ -1038,7 +1038,7 @@ void initMissions()
int NORMAL = 15 * 60; int NORMAL = 15 * 60;
int FREQUENT = 5 * 60; int FREQUENT = 5 * 60;
int ALWAYS = 1 * 60; int ALWAYS = 1 * 60;
int NEVER = -1; int NEVER = -1;
// Mission 0 // Mission 0
sprintf(missions[0].primaryObjective[0], "Escape from WEAPCO Persuit"); sprintf(missions[0].primaryObjective[0], "Escape from WEAPCO Persuit");

View File

@ -236,7 +236,7 @@ void loadFont()
newImage = SDL_DisplayFormat(image); newImage = SDL_DisplayFormat(image);
fontShape[i] = setTransparent(newImage); fontShape[i] = setTransparent(newImage);
SDL_FreeSurface(image); SDL_FreeSurface(image);
} }