Skip to content

Commit 3329d13

Browse files
Trim all whitespace.
1 parent 98274ff commit 3329d13

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1486
-1486
lines changed

src/battle/ai.c

Lines changed: 173 additions & 173 deletions
Large diffs are not rendered by default.

src/battle/battle.c

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void initBattle(void)
5757
app.delegate.logic = &logic;
5858
app.delegate.draw = &draw;
5959
memset(&app.keyboard, 0, sizeof(int) * MAX_KEYBOARD_KEYS);
60-
60+
6161
battle.hasThreats = 1;
6262

6363
initQuadtree(&battle.quadtree);
@@ -96,7 +96,7 @@ void initBattle(void)
9696
getWidget("quit", "battleLost")->action = quitBattle;
9797

9898
selectWidget("ok", "startBattle");
99-
99+
100100
SDL_SetWindowGrab(app.window, 1);
101101
}
102102

@@ -117,9 +117,9 @@ static void logic(void)
117117
doPlayerSelect();
118118
}
119119
}
120-
120+
121121
app.doTrophyAlerts = (battle.status != MS_IN_PROGRESS && battle.missionFinishedTimer <= -FPS * 2);
122-
122+
123123
if (battle.campaignFinished)
124124
{
125125
endCampaign();
@@ -163,9 +163,9 @@ static void doBattle(void)
163163
doDebris();
164164

165165
doPlayer();
166-
166+
167167
checkSuspicionLevel();
168-
168+
169169
doTorelliFireStorm();
170170

171171
if (player->alive == ALIVE_ALIVE)
@@ -175,7 +175,7 @@ static void doBattle(void)
175175
doLocations();
176176

177177
doMessageBox();
178-
178+
179179
if (battle.status == MS_IN_PROGRESS || battle.status == MS_COMPLETE)
180180
{
181181
doScript();
@@ -186,7 +186,7 @@ static void doBattle(void)
186186
if (battle.stats[STAT_TIME]++ % FPS == 0)
187187
{
188188
runScriptFunction("TIME %d", battle.stats[STAT_TIME] / FPS);
189-
189+
190190
if (game.currentMission->challengeData.timeLimit && game.currentMission->challengeData.timeLimit - battle.stats[STAT_TIME] < 11 * FPS)
191191
{
192192
playSound(SND_TIME_WARNING);
@@ -198,11 +198,11 @@ static void doBattle(void)
198198
if (battle.status != MS_IN_PROGRESS)
199199
{
200200
battle.missionFinishedTimer--;
201-
201+
202202
if (battle.unwinnable && battle.missionFinishedTimer <= -FPS * 6)
203203
{
204204
battle.status = MS_COMPLETE;
205-
205+
206206
postBattle();
207207

208208
destroyBattle();
@@ -221,11 +221,11 @@ static void draw(void)
221221
}
222222

223223
drawBackground(battle.background);
224-
224+
225225
setAtlasColor(255, 255, 255, 255);
226226

227227
blitScaled(battle.planetTexture, battle.planet.x, battle.planet.y, battle.planetWidth, battle.planetHeight, 0);
228-
228+
229229
if (battle.destroyTorelli)
230230
{
231231
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_BLEND);
@@ -273,14 +273,14 @@ static void draw(void)
273273
static void drawMenu(void)
274274
{
275275
SDL_Rect r;
276-
276+
277277
if (app.modalDialog.type == MD_NONE)
278278
{
279279
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_BLEND);
280280
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 128);
281281
SDL_RenderFillRect(app.renderer, NULL);
282282
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_NONE);
283-
283+
284284
SDL_SetRenderTarget(app.renderer, app.uiBuffer);
285285

286286
r.w = 400;
@@ -294,7 +294,7 @@ static void drawMenu(void)
294294
SDL_RenderDrawRect(app.renderer, &r);
295295

296296
drawWidgets("inBattle");
297-
297+
298298
SDL_SetRenderTarget(app.renderer, app.backBuffer);
299299
}
300300
}
@@ -331,24 +331,24 @@ static void handleKeyboard(void)
331331
if (battle.status == MS_IN_PROGRESS && app.keyboard[SDL_SCANCODE_TAB])
332332
{
333333
battle.status = MS_PAUSED;
334-
334+
335335
selectWidget("ok", "startBattle");
336-
336+
337337
SDL_SetWindowGrab(app.window, 0);
338338
}
339339
}
340340

341341
static void start(void)
342342
{
343343
battle.status = MS_IN_PROGRESS;
344-
344+
345345
SDL_SetWindowGrab(app.window, 1);
346346
}
347347

348348
static void resume(void)
349349
{
350350
show = SHOW_BATTLE;
351-
351+
352352
SDL_SetWindowGrab(app.window, 1);
353353

354354
clearInput();
@@ -397,7 +397,7 @@ static void restart(void)
397397
static void retry(void)
398398
{
399399
app.modalDialog.type = MD_NONE;
400-
400+
401401
postBattle();
402402

403403
destroyBattle();
@@ -415,7 +415,7 @@ static void optQuitBattle(void)
415415
static void quitBattle(void)
416416
{
417417
app.modalDialog.type = MD_NONE;
418-
418+
419419
postBattle();
420420

421421
destroyBattle();
@@ -441,13 +441,13 @@ static void postBattle(void)
441441
game.stats[i] += battle.stats[i];
442442
}
443443
}
444-
444+
445445
game.stats[STAT_EPIC_KILL_STREAK] = MAX(game.stats[STAT_EPIC_KILL_STREAK], battle.stats[STAT_EPIC_KILL_STREAK]);
446446

447447
updateAccuracyStats(game.stats);
448-
448+
449449
game.currentMission->completed = (game.currentMission->completed || battle.status == MS_COMPLETE || !battle.numObjectivesTotal);
450-
450+
451451
app.saveGame = 1;
452452
}
453453

@@ -456,11 +456,11 @@ static void checkSuspicionLevel(void)
456456
if (battle.hasSuspicionLevel && battle.suspicionLevel >= MAX_SUSPICION_LEVEL)
457457
{
458458
cancelScript();
459-
459+
460460
resetMessageBox();
461-
461+
462462
runScriptFunction("MAX_SUSPICION_LEVEL");
463-
463+
464464
battle.hasSuspicionLevel = 0;
465465
}
466466
}
@@ -476,11 +476,11 @@ static void doTorelliFireStorm(void)
476476
static void endCampaign(void)
477477
{
478478
awardTrophy("CAMPAIGN_COMPLETE");
479-
479+
480480
postBattle();
481481

482482
destroyBattle();
483-
483+
484484
initCredits();
485485
}
486486

@@ -567,7 +567,7 @@ void destroyBattle(void)
567567
destroyBullets();
568568

569569
destroyEffects();
570-
570+
571571
memset(&battle, 0, sizeof(Battle));
572572
battle.bulletTail = &battle.bulletHead;
573573
battle.debrisTail = &battle.debrisHead;

0 commit comments

Comments
 (0)