]> git.mxchange.org Git - quix0rs-blobwars.git/commitdiff
Use DEBUG instead of USEPAK to enable debugging code.
authorGuus Sliepen <guus@debian.org>
Mon, 28 Jun 2010 22:03:15 +0000 (00:03 +0200)
committerGuus Sliepen <guus@debian.org>
Mon, 28 Jun 2010 22:03:15 +0000 (00:03 +0200)
eapplication of commit bcd19efa602b9279399b17e7756b8212df0fa234.

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 a84d2575cd5e35fcfda1b2324bc3b69e55408d91..37238ae89a50b5a69ad44d1b142fa41017909c54 100644 (file)
@@ -84,11 +84,6 @@ Engine::Engine()
 
        // Cheats
        memset(lastKeyEvents, ' ', 25);
-       #if USEPAK
-               cheats = false;
-       #else
-               cheats = true;
-       #endif
        cheatHealth = cheatExtras = cheatFuel = cheatLevels = false;
        cheatBlood = cheatInvulnerable = cheatReload = cheatSpeed = cheatSkipLevel = false;
        
index a18a1101baa1ff717efd380f3d5996814f43b52f..d4e588d991a2cd8d0e5a66e597bfe179e085dcae 100755 (executable)
@@ -377,10 +377,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 8257e20164fddcdab2ba29797573ab73a0b2c22d..5deea33b27500c6ee51aff725078bc56d15e884b 100644 (file)
@@ -571,7 +571,7 @@ int doGame()
 
        Uint32 then, frames, frameLimit, millis, frameCounter;
 
-       #if !USEPAK
+       #if DEBUG
        Uint32 now;
        char fps[10];
        strncpy(fps, "fps", sizeof fps);
@@ -587,12 +587,10 @@ int doGame()
        {
                player.health = -99;
 
-               //#if USEPAK
                if ((!map.isBossMission) && (replayData.replayMode == REPLAY_MODE::NONE))
                {
                        showMissionInformation();
                }
-               //#endif
 
                game.levelsStarted++;
        }
@@ -814,7 +812,7 @@ int doGame()
                        engine.setInfoMessage("Skipping Mission...", 2, INFO_OBJECTIVE);
                }
                
-               #if !USEPAK
+               #if DEBUG
                if (engine.keyState[SDLK_F1])
                {
                        autoCompleteAllObjectives(false);
@@ -841,7 +839,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 ce53472d9f3d6ffdbac3023210bd8357a4f62693..3f4ecc91f90f86c866a1b61f002d25b995496d5b 100644 (file)
@@ -494,7 +494,7 @@ int doHub()
        char name[50], level[50], requiredLevel[50];
        int x, y;
 
-       #if !USEPAK
+       #if DEBUG
        char pos[50];
        #endif
 
@@ -613,7 +613,7 @@ int doHub()
                
                graphics.drawRect(10, 430, 620, 40, graphics.black, graphics.white, graphics.screen);
 
-               #if !USEPAK
+               #if DEBUG
                snprintf(pos, sizeof pos, "%.3d:%.3d", engine.getMouseX(), engine.getMouseY());
                graphics.drawString(pos, 320, 15, true, graphics.screen);
                #endif
index 8ddcc66b9e16fc49fbd5f6dfc30757c5ab008570..0ccb0615445a373dcdab029efc245a928a6acb41 100644 (file)
@@ -213,10 +213,10 @@ void doPauseInfo()
        
        graphics.setFontColor(0xff, 0xff, 0xff, 0x00, 0x00, 0x00);
 
-       //#if !USEPAK
+       #if DEBUG
        snprintf(string, sizeof string, _("Position = %d:%d"), (int)player.x, (int)player.y);
        graphics.drawString(string, 5, 25, false, graphics.screen);
-       //#endif
+       #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 33838ac983b5168a9cd58ca0ffce2f20b323c7b8..231f643a6670558641c2d0f6defda9efa6f8af71 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 eb86f17586ee0185dcb35df7ee7a949568001722..0360b61f1d5606143f0ba7b35275af2fa033e477 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 6b7eb29290ae7e0b106f02c6f3ff752846786c4c..77661d8096cfa1787637faab72a20e6cd97f8df5 100644 (file)
@@ -429,7 +429,7 @@ void doPlayer()
                }
        }
        
-       #if !USEPAK
+       #if DEBUG
        if (engine.keyState[SDLK_1])
                player.currentWeapon = &weapon[WP_PISTOL];
        else if (engine.keyState[SDLK_2])