diff options
author | smatz <smatz@openttd.org> | 2010-02-10 16:10:05 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2010-02-10 16:10:05 +0000 |
commit | ac6ff0de9b2a660a880386c21768e8963b37fec8 (patch) | |
tree | 2ee1c49d261e6220c3d8b10100699019be5ae907 /src/console.cpp | |
parent | 2fcab9d54edb7baa4a478be2a629af780f9ec929 (diff) | |
download | openttd-ac6ff0de9b2a660a880386c21768e8963b37fec8.tar.xz |
(svn r19079) -Codechange: use _debug_console_level instead of _stdlib_con_developer
Diffstat (limited to 'src/console.cpp')
-rw-r--r-- | src/console.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/console.cpp b/src/console.cpp index 6799f7dd4..e2c0bbf33 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -33,7 +33,6 @@ IConsoleAlias *_iconsole_aliases; ///< list of registred aliases /* ** stdlib ** */ byte _stdlib_developer = 1; -bool _stdlib_con_developer = false; FILE *_iconsole_output_file; void IConsoleInit() @@ -416,8 +415,7 @@ static void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char memset(&aliases, 0, sizeof(aliases)); memset(&aliasstream, 0, sizeof(aliasstream)); - if (_stdlib_con_developer) - IConsolePrintF(CC_DEBUG, "condbg: requested command is an alias; parsing..."); + DEBUG(console, 6, "condbg: requested command is an alias; parsing..."); aliases[0] = aliasstream; for (cmdptr = alias->cmdline, a_index = 0, astream_i = 0; *cmdptr != '\0'; cmdptr++) { @@ -696,8 +694,7 @@ static void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token byte t_index = tokencount; uint32 value; - if (_stdlib_con_developer) - IConsolePrintF(CC_DEBUG, "condbg: requested command is a variable"); + DEBUG(console, 6, "Requested command is a variable"); if (tokencount == 0) { // Just print out value IConsoleVarPrintGetValue(var); @@ -779,8 +776,7 @@ void IConsoleCmdExec(const char *cmdstr) } } - if (_stdlib_con_developer) - IConsolePrintF(CC_DEBUG, "condbg: executing cmdline: '%s'", cmdstr); + DEBUG(console, 4, "Executing cmdline: '%s'", cmdstr); memset(&tokens, 0, sizeof(tokens)); memset(&tokenstream, 0, sizeof(tokenstream)); @@ -824,12 +820,8 @@ void IConsoleCmdExec(const char *cmdstr) } } - if (_stdlib_con_developer) { - uint i; - - for (i = 0; tokens[i] != NULL; i++) { - IConsolePrintF(CC_DEBUG, "condbg: token %d is: '%s'", i, tokens[i]); - } + for (uint i = 0; tokens[i] != NULL; i++) { + DEBUG(console, 8, "condbg: token %d is: '%s'", i, tokens[i]); } if (tokens[0] == '\0') return; // don't execute empty commands |