]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/mission.cpp
Fix all issues found by the Clang Static Analyzer.
[quix0rs-blobwars.git] / src / mission.cpp
index 1a7934f692649420b51bb04e5f5b7fa93390f8bc..4519b24181f96b877c41bce3fef1fb4e43b48a24 100644 (file)
@@ -1,5 +1,6 @@
 /*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
+Copyright (C) 2011-2015 Perpendicular Dimensions
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -162,13 +163,13 @@ void showMissionClear()
        graphics.loadBackground("gfx/main/areaClearBackGround.jpg");
 
        SDL_Surface *panel = graphics.alphaRect(550, 420, 0x00, 0x00, 0x00);
-       SDL_SetAlpha(panel, SDL_SRCALPHA|SDL_RLEACCEL, 180);
+       SDL_SetAlpha(panel, 180);
        graphics.drawRect(1, 1, panel->w - 2, panel->h - 2 , graphics.black, graphics.white, panel);
 
        graphics.blit(panel, (640 - panel->w) / 2, (480 - panel->h) / 2, graphics.background, false);
 
-       audio.loadSound(0, "sound/pop1.wav");
-       audio.loadSound(1, "sound/cheer.wav");
+       audio.loadSound(0, "sound/pop1");
+       audio.loadSound(1, "sound/cheer");
 
        SDL_FillRect(graphics.screen, NULL, graphics.black);
        graphics.updateScreen();
@@ -176,7 +177,6 @@ void showMissionClear()
        int y = 520;
        int miaY = 335;
        int clearY = 520;
-       Objective *objective = (Objective*)map.objectiveList.getHead();
        Entity *mia = (Entity*)map.miaList.getHead();
        Sprite *teleportStar = graphics.getSprite("TeleportStar", true);
        char message[256];
@@ -211,9 +211,6 @@ void showMissionClear()
                place += 25;
        }
 
-       if (count > colCount)
-               count = colCount;
-
        if (place > (colCount * 25))
                place = colCount * 25;
 
@@ -247,7 +244,7 @@ void showMissionClear()
                }
        }
 
-       objective = (Objective*)map.objectiveList.getHead();
+       Objective *objective = (Objective*)map.objectiveList.getHead();
 
        engine.setPlayerPosition(0, 0, -1, -1, -1, -1);