]> git.mxchange.org Git - quix0rs-blobwars.git/commitdiff
Use DEBUG instead of USEPAK to enable debugging code.
authorGuus Sliepen <guus@debian.org>
Wed, 23 Dec 2009 13:22:50 +0000 (14:22 +0100)
committerGuus Sliepen <guus@debian.org>
Wed, 23 Dec 2009 13:22:50 +0000 (14:22 +0100)
src/CEngine.cpp
src/defs.h
src/game.cpp
src/hub.cpp
src/info.cpp
src/lineDefs.cpp
src/main.cpp
src/map.cpp
src/player.cpp

index deb3cb4b0071ceb853a13412af623e37a9ce4caa..57105a26398e681bfeb2943303172c854cc9f10b 100644 (file)
@@ -84,12 +84,6 @@ Engine::Engine()
 
        // Cheats
        memset(lastKeyEvents, ' ', 25);
-       #if USEPAK
-               cheats = false;
-       #else
-               cheats = true;
-               cheats = false;
-       #endif
        cheatHealth = cheatExtras = cheatFuel = cheatLevels = false;
        cheatBlood = cheatInvulnerable = cheatReload = cheatSpeed = cheatSkipLevel = false;
        
index c245ca7535be36caefafe83b3de334a674fd479c..1758ffbc4c39f8609d11934ce92c3d30a362c869 100644 (file)
@@ -371,10 +371,10 @@ enum {
 
 /* ############# debug ################## */
 
-#if USEPAK
-       #define debug(x) {}
-#else
+#if DEBUG
        #define debug(x) {printf("*** DEBUG: "); printf x;}
+#else
+       #define debug(x) {}
 #endif
 
 #ifndef IGNORE_FLAGTOKEN_ERRORS
index 42894ee7c86bc257261bc95fc9f9ddd52bf3ee61..8fa42b2e05e794d6e959d9fa193da0988e1a4a52 100644 (file)
@@ -568,7 +568,7 @@ int doGame()
 
        Uint32 then, frames, frameLimit, millis, frameCounter;
 
-       #if !USEPAK
+       #if DEBUG
        Uint32 now;
        char fps[10];
        strcpy(fps, "fps");
@@ -584,12 +584,10 @@ int doGame()
        {
                player.health = -99;
 
-               //#if USEPAK
                if ((!map.isBossMission) && (replayData.replayMode == REPLAY_MODE::NONE))
                {
                        showMissionInformation();
                }
-               //#endif
 
                game.levelsStarted++;
        }
@@ -810,7 +808,7 @@ int doGame()
                        engine.setInfoMessage("Skipping Mission...", 2, INFO_OBJECTIVE);
                }
                
-               #if !USEPAK
+               #if DEBUG
                if (engine.keyState[SDLK_F1])
                {
                        autoCompleteAllObjectives(false);
@@ -837,7 +835,7 @@ int doGame()
                if (game.missionOverReason == MIS_GAMECOMPLETE)
                        frameLimit = SDL_GetTicks() + 64;
 
-               #if !USEPAK
+               #if DEBUG
                graphics.drawString(fps, 600, 30, true, graphics.screen);
 
                if (SDL_GetTicks() > frameCounter + 500)
index 1cba4a7adcc660a74bdf842d513dd3b7638f98b5..6e34265195f02954a14a8143379d62a4868414d6 100644 (file)
@@ -491,7 +491,7 @@ int doHub()
        char name[50], level[50], requiredLevel[50];
        int x, y;
 
-       #if !USEPAK
+       #if DEBUG
        char pos[50];
        #endif
 
@@ -609,7 +609,7 @@ int doHub()
                
                graphics.drawRect(10, 430, 620, 40, graphics.black, graphics.white, graphics.screen);
 
-               #if !USEPAK
+               #if DEBUG
                sprintf(pos, "%.3d:%.3d", engine.getMouseX(), engine.getMouseY());
                graphics.drawString(pos, 320, 15, true, graphics.screen);
                #endif
index 6945f468e1e2e197eb613d786f214f29151c8702..cdf365ce951fdccb1f8fd828fe8cd63b22bdf06d 100644 (file)
@@ -213,10 +213,8 @@ void doPauseInfo()
        
        graphics.setFontColor(0xff, 0xff, 0xff, 0x00, 0x00, 0x00);
 
-       //#if !USEPAK
        sprintf(string, _("Position = %d:%d"), (int)player.x, (int)player.y);
        graphics.drawString(string, 5, 25, false, graphics.screen);
-       //#endif
 
        graphics.drawString(_("*** PAUSED ***"), 320, y, TXT_CENTERED, graphics.screen);
 
index 81c5f481250705b2de3e98550107fa26022a8740..ee55f843e8102bd3c8a7743cde229896f153f5c6 100644 (file)
@@ -64,7 +64,7 @@ void doLineDefs()
 
                if ((absX < 800) && (absY < 600))
                {
-                       #if !USEPAK
+                       #if DEBUG
                                graphics.drawRect(x, y, lineDef->width, lineDef->height, graphics.red, graphics.screen);
                        #endif
 
index 3cbe77fd21ca05c0d0921ad8a35cb682df5b3f53..00bdcf9457d665cbc277b66bf524d455f00d74e2 100644 (file)
@@ -131,7 +131,7 @@ int main(int argc, char *argv[])
                else if (strcmp(argv[i], "-map") == 0) {game.setMapName(argv[++i]); requiredSection = SECTION_GAME;}
                else if (strcmp(argv[i], "-listmaps") == 0) listMaps();
                
-               #if !USEPAK
+               #if DEBUG
                else if (strcmp(argv[i], "-showsprites") == 0) showSprites = true;
                else if (strcmp(argv[i], "-hub") == 0) hub = true;
                else if (strcmp(argv[i], "-randomscreens") == 0) graphics.takeRandomScreenShots = true;
index e7083c8ca8d45a84793f5b16c322101d00cbcdda..70279d9924dab9d1da5958b16fc6b3d18f1e818a 100644 (file)
@@ -51,7 +51,7 @@ void drawMap()
                        {
                                graphics.blit(graphics.tile[brick], r.x, r.y, graphics.screen, false);
                                
-                               #if !USEPAK
+                               #if DEBUG
                                if ((brick >= MAP_NORESET) && (brick < MAP_DECORATION))
                                {
                                        graphics.drawRect(r.x, r.y, 32, 4, graphics.yellow, graphics.screen);
index bb0c202c0df8ad833bd165fef1b6b851dafb45b2..ac3395703ece174c0ceef15349fb7e18bc246a65 100644 (file)
@@ -352,7 +352,7 @@ void doPlayer()
                }
        }
        
-       #if !USEPAK
+       #if DEBUG
        if (engine.keyState[SDLK_1])
                player.currentWeapon = &weapon[WP_PISTOL];
        else if (engine.keyState[SDLK_2])