shithub: rott

Download patch

ref: 21eb6a6831d2f622db3d63c8f4ea0450f1f852b1
parent: a96a1fc344226c0018ad8124b0a8c1c5b89b3010
author: Marc-Alexandre Espiaut <marcalexandre@member.fsf.org>
date: Tue Jun 5 09:28:29 EDT 2018

Removing obsolete development code from rt_debug.c

--- a/rott/rt_debug.c
+++ b/rott/rt_debug.c
@@ -1159,171 +1159,6 @@
 
 int DebugKeys (void)
 {
-#if (DEVELOPMENT == 1)
-    char str[10];
-    boolean esc;
-    int level;
-    int i,f,temp;
-    static int whichpowerup    = 0;
-    static int whichprotection = 0;
-
-    if (Keyboard[sc_G])     // G = god mode
-    {
-        DoGodMode ();
-        while (Keyboard[sc_G])
-            IN_UpdateKeyboard ();
-        return 1;
-    }
-    else if (Keyboard[sc_Q])         // Q = fast quit
-        QuitGame ();
-    else if (Keyboard[sc_W])         // W = warp to level
-    {
-        DoWarp ();
-        return 1;
-    }
-    else if (Keyboard[sc_F])     // F = FPS
-    {
-        f=0;
-        for (i=0; i<VBLCOUNTER*10; i+=tics)
-        {
-            ThreeDRefresh();
-            DoSprites();
-            CalcTics ();
-            f++;
-        }
-
-        CurrentFont = smallfont;
-
-        US_CenterWindow (12,2);
-        temp=f*10;
-        SoftError("fps  = %2ld.%2ld\n",temp/100,temp%100);
-
-        US_Print ("FPS=");
-        US_PrintUnsigned (temp/100);
-        US_Print (".");
-        US_PrintUnsigned (temp%100);
-
-        VW_UpdateScreen();
-        IN_Ack();
-
-        return 1;
-    }
-    else if (Keyboard[sc_H])     // H = hurt self
-    {
-        IN_ClearKeysDown ();
-        HurtPlayer ();
-    }
-    else if (Keyboard[sc_Z])     // Z = end level
-    {
-        EndLevel ();
-    }
-    else if (Keyboard[sc_P])     // P = step through powerups
-    {
-        whichpowerup++;
-        if (whichpowerup == 6)
-            whichpowerup = 0;
-
-        switch (whichpowerup)
-        {
-        case 0:  // nothing
-            if (player->flags & FL_ELASTO)
-                player->flags &= ~FL_NOFRICTION;
-            player->flags &= ~(FL_SHROOMS|FL_ELASTO|FL_FLEET|FL_GODMODE|FL_DOGMODE);
-            locplayerstate->poweruptime = 0;
-            GM_UpdateBonus (0, true);
-            break;
-
-        case 1:  // god mode
-            DoGodModePowerup ();
-            break;
-
-        case 2:  // dog mode
-            DoDogModePowerup ();
-            break;
-
-        case 3:  // fleet feet
-            DoMercuryModePowerup ();
-            break;
-
-        case 4:  // elasto
-            DoElastoModePowerup ();
-            break;
-
-        case 5:  // shrooms
-            DoShroomsModePowerup ();
-            break;
-        }
-
-        while (Keyboard[sc_P])
-            IN_UpdateKeyboard ();
-    }
-    else if (Keyboard[sc_A])     // step through armor
-    {
-        whichprotection++;
-        if (whichprotection == 4)
-            whichprotection = 0;
-
-        switch (whichprotection)
-        {
-        case 0:  // nothing
-            player->flags &= ~(FL_BPV|FL_AV|FL_GASMASK);
-            locplayerstate->protectiontime = 0;
-            GM_UpdateBonus (0, false);
-            break;
-
-        case 1:  // gas mask
-            GiveGasMask ();
-            break;
-
-        case 2:  // armor
-            GiveBulletProofArmor ();
-            break;
-
-        case 3:  // fire vest
-            GiveAsbestoArmor ();
-            break;
-        }
-
-        while (Keyboard[sc_A])
-            IN_UpdateKeyboard ();
-    }
-    else if (Keyboard[sc_O])     // O = outfit player
-    {
-        OutfitPlayer ();
-
-        IN_ClearKeysDown ();
-        IN_Ack ();
-        return 1;
-    }
-    else if (Keyboard[sc_K])     // K = kill self
-    {
-        IN_ClearKeysDown ();
-        locplayerstate->lives = -1;
-        KillPlayer ();
-    }
-    else if (Keyboard[sc_I])        // I = item cheat
-    {
-        DoItemCheat ();
-        return 1;
-    }
-    else if (Keyboard[53])        // \ = back to normal
-    {
-        DoNormalThing ();
-        return 1;
-    }
-    else if (Keyboard[sc_R])
-    {
-        RecordDemoQuery();
-    }
-    else if (Keyboard[sc_E])
-    {
-        EndDemo();
-    }
-    else if (Keyboard[sc_D])
-    {
-        PlaybackDemoQuery();
-    }
-#endif
     return (0);
 }