Remove unused --cheat switch (when removing functionality, please remove ALL associated code, too!)
parent
ab3f4dfbfa
commit
ad2350233c
|
@ -38,9 +38,6 @@
|
|||
#include "warzoneconfig.h"
|
||||
#include "wrappers.h"
|
||||
|
||||
//! Let the end user into debug mode....
|
||||
bool bAllowDebugMode = false;
|
||||
|
||||
//////
|
||||
// Our fine replacement for the popt abomination follows
|
||||
|
||||
|
@ -208,8 +205,7 @@ static poptContext poptGetContext(WZ_DECL_UNUSED void *unused, int argc, const c
|
|||
typedef enum
|
||||
{
|
||||
// We don't want to use zero, so start at one (1)
|
||||
CLI_CHEAT = 1,
|
||||
CLI_CONFIGDIR,
|
||||
CLI_CONFIGDIR = 1,
|
||||
CLI_DATADIR,
|
||||
CLI_DEBUG,
|
||||
CLI_DEBUGFILE,
|
||||
|
@ -239,7 +235,6 @@ static const struct poptOption* getOptionsTable(void)
|
|||
{
|
||||
static const struct poptOption optionsTable[] =
|
||||
{
|
||||
{ "cheat", '\0', POPT_ARG_NONE, NULL, CLI_CHEAT, N_("Run in cheat mode"), NULL },
|
||||
{ "configdir", '\0', POPT_ARG_STRING, NULL, CLI_CONFIGDIR, N_("Set configuration directory"), N_("configuration directory") },
|
||||
{ "datadir", '\0', POPT_ARG_STRING, NULL, CLI_DATADIR, N_("Set default data directory"), N_("data directory") },
|
||||
{ "debug", '\0', POPT_ARG_STRING, NULL, CLI_DEBUG, N_("Show debug for given level"), N_("debug level") },
|
||||
|
@ -423,11 +418,6 @@ bool ParseCommandLine(int argc, const char** argv)
|
|||
SetGameMode(GS_NORMAL);
|
||||
break;
|
||||
|
||||
case CLI_CHEAT:
|
||||
//printf(" ** DEBUG MODE UNLOCKED! **\n");
|
||||
bAllowDebugMode = true;
|
||||
break;
|
||||
|
||||
case CLI_DATADIR:
|
||||
// retrieve the quoted path name
|
||||
token = poptGetOptArg(poptCon);
|
||||
|
|
|
@ -28,6 +28,4 @@
|
|||
bool ParseCommandLine(int argc, const char** argv);
|
||||
bool ParseCommandLineEarly(int argc, const char** argv);
|
||||
|
||||
extern bool bAllowDebugMode;
|
||||
|
||||
#endif // __INCLUDED_SRC_CLPARSE_H__
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
|
||||
#include "advvis.h"
|
||||
#include "ai.h"
|
||||
// HACK bAllowDebugMode shouldn't be in clparse
|
||||
#include "clparse.h"
|
||||
#include "component.h"
|
||||
#include "configuration.h"
|
||||
#include "difficulty.h"
|
||||
|
@ -88,20 +86,6 @@ bool loadConfig(void)
|
|||
sound_SetMusicVolume((float)val / 100.0);
|
||||
}
|
||||
|
||||
if (getWarzoneKeyNumeric("debugmode", &val))
|
||||
{
|
||||
bAllowDebugMode = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG
|
||||
bAllowDebugMode = true;
|
||||
#else
|
||||
bAllowDebugMode = false;
|
||||
#endif
|
||||
setWarzoneKeyNumeric("debugmode", bAllowDebugMode);
|
||||
}
|
||||
|
||||
if (getWarzoneKeyNumeric("music_enabled", &val))
|
||||
{
|
||||
war_SetMusicEnabled(val);
|
||||
|
@ -657,7 +641,6 @@ bool saveConfig(void)
|
|||
{
|
||||
setDifficultyLevel(DL_NORMAL);
|
||||
}
|
||||
setWarzoneKeyNumeric("debugmode", bAllowDebugMode);
|
||||
setWarzoneKeyNumeric("framerate", (SDWORD)getFramerateLimit());
|
||||
setWarzoneKeyNumeric("showFPS", (SDWORD)showFPS);
|
||||
setWarzoneKeyNumeric("scroll",(SDWORD)scroll_speed_accel); // scroll
|
||||
|
|
Loading…
Reference in New Issue