Browse Source

Strip out debug features from the release builds

leveldebug and lightmax still remains
pull/1024/head
Anders Jenbo 5 years ago
parent
commit
327042c2e5
  1. 2
      Source/all.h
  2. 2
      Source/debug.cpp
  3. 4
      Source/debug.h
  4. 6
      Source/diablo.cpp
  5. 2
      Source/diablo.h
  6. 13
      Source/gendung.cpp
  7. 2
      Source/lighting.cpp
  8. 2
      Source/monster.cpp

2
Source/all.h

@ -25,7 +25,9 @@
#include "control.h"
#include "cursor.h"
#include "dead.h"
#ifdef _DEBUG
#include "debug.h"
#endif
#include "diablo.h"
#include "doom.h"
#include "drlg_l1.h"

2
Source/debug.cpp

@ -9,7 +9,6 @@ DEVILUTION_BEGIN_NAMESPACE
#ifdef _DEBUG
BOOL update_seed_check = FALSE;
#endif
#define DEBUGSEEDS 4096
int seed_index;
@ -48,7 +47,6 @@ void CheckDungeonClear()
}
}
#ifdef _DEBUG
void GiveGoldCheat()
{
int i, ni;

4
Source/debug.h

@ -14,10 +14,9 @@ extern "C" {
extern BYTE *pSquareCel;
void LoadDebugGFX();
void FreeDebugGFX();
void CheckDungeonClear();
#ifdef _DEBUG
void LoadDebugGFX();
void GiveGoldCheat();
void TakeGoldCheat();
void MaxSpellsCheat();
@ -26,7 +25,6 @@ void PrintDebugPlayer(BOOL bNextPlayer);
void PrintDebugQuest();
void GetDebugMonster();
void NextDebugMonster();
#endif
#ifdef __cplusplus
}

6
Source/diablo.cpp

@ -57,12 +57,12 @@ Options sgOptions;
*/
BOOL fullscreen = TRUE;
bool gbShowIntro = true;
BOOL leveldebug;
#ifdef _DEBUG
BOOL monstdebug;
int DebugMonsters[10];
int debugmonsttypes;
BOOL visiondebug;
BOOL leveldebug;
int questdebug = -1;
int debug_mode_key_s;
int debug_mode_key_w;
@ -241,7 +241,9 @@ static void start_game(unsigned int uMsg)
cineflag = FALSE;
InitCursor();
InitLightTable();
#ifdef _DEBUG
LoadDebugGFX();
#endif
assert(ghMainWnd);
music_stop();
ShowProgress(uMsg);
@ -268,7 +270,9 @@ static void free_game()
FreeItemGFX();
FreeCursor();
FreeLightTable();
#ifdef _DEBUG
FreeDebugGFX();
#endif
FreeGameMem();
}

2
Source/diablo.h

@ -62,12 +62,12 @@ void LoadOptions();
/* rdata */
extern BOOL fullscreen;
extern BOOL leveldebug;
#ifdef _DEBUG
extern BOOL monstdebug;
extern int debugmonsttypes;
extern int DebugMonsters[10];
extern BOOL visiondebug;
extern BOOL leveldebug;
extern int questdebug;
extern int debug_mode_key_w;
extern int debug_mode_key_inverted_v;

13
Source/gendung.cpp

@ -592,11 +592,14 @@ BOOL SkipThemeRoom(int x, int y)
void InitLevels()
{
if (!leveldebug) {
currlevel = 0;
leveltype = DTYPE_TOWN;
setlevel = FALSE;
}
#ifdef _DEBUG
if (leveldebug)
return;
#endif
currlevel = 0;
leveltype = DTYPE_TOWN;
setlevel = FALSE;
}
DEVILUTION_END_NAMESPACE

2
Source/lighting.cpp

@ -14,9 +14,7 @@ int numlights;
BYTE lightradius[16][128];
BOOL dovision;
int numvision;
#ifdef _DEBUG
char lightmax;
#endif
BOOL dolighting;
BYTE lightblock[64][16][16];
int visionid;

2
Source/monster.cpp

@ -1106,8 +1106,10 @@ void InitMonsters()
int scattertypes[NUM_MTYPES];
numscattypes = 0;
#ifdef _DEBUG
if (gbIsMultiplayer)
CheckDungeonClear();
#endif
if (!setlevel) {
AddMonster(1, 0, 0, 0, FALSE);
AddMonster(1, 0, 0, 0, FALSE);

Loading…
Cancel
Save