BUILD: Rename USE_TEXT_CONSOLE -> USE_TEXT_CONSOLE_FOR_DEBUGGER

This reduces the similarity in name to the otherwise mostly
unrelated DISABLE_TEXT_CONSOLE #define.
This commit is contained in:
Max Horn 2011-05-05 17:32:31 +02:00
parent 717a7accf5
commit 4b7f6dfa3c
4 changed files with 14 additions and 14 deletions

View file

@ -245,7 +245,7 @@ ifdef USE_MAD
DEFINES += -DUSE_MAD DEFINES += -DUSE_MAD
endif endif
DEFINES += -DREDUCE_MEMORY_USAGE -DDISABLE_DEBUGGER -DUSE_TEXT_CONSOLE -DDISABLE_MASS_ADD -DDISABLE_NES_APU DEFINES += -DREDUCE_MEMORY_USAGE -DDISABLE_DEBUGGER -DUSE_TEXT_CONSOLE_FOR_DEBUGGER -DDISABLE_MASS_ADD -DDISABLE_NES_APU
LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,-Map,map.txt -Wl,--gc-sections LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,-Map,map.txt -Wl,--gc-sections

2
configure vendored
View file

@ -2869,7 +2869,7 @@ if test "$_readline" = yes ; then
fi fi
define_in_config_h_if_yes "$_readline" 'USE_READLINE' define_in_config_h_if_yes "$_readline" 'USE_READLINE'
define_in_config_h_if_yes "$_text_console" 'USE_TEXT_CONSOLE' define_in_config_h_if_yes "$_text_console" 'USE_TEXT_CONSOLE_FOR_DEBUGGER'
# #
# Check for OpenGL (ES) # Check for OpenGL (ES)

View file

@ -29,7 +29,7 @@
#include "engines/engine.h" #include "engines/engine.h"
#include "gui/debugger.h" #include "gui/debugger.h"
#ifndef USE_TEXT_CONSOLE #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
#include "gui/console.h" #include "gui/console.h"
#elif defined(USE_READLINE) #elif defined(USE_READLINE)
#include <readline/readline.h> #include <readline/readline.h>
@ -44,7 +44,7 @@ Debugger::Debugger() {
_isActive = false; _isActive = false;
_errStr = NULL; _errStr = NULL;
_firstTime = true; _firstTime = true;
#ifndef USE_TEXT_CONSOLE #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
_debuggerDialog = new GUI::ConsoleDialog(1.0f, 0.67f); _debuggerDialog = new GUI::ConsoleDialog(1.0f, 0.67f);
_debuggerDialog->setInputCallback(debuggerInputCallback, this); _debuggerDialog->setInputCallback(debuggerInputCallback, this);
_debuggerDialog->setCompletionCallback(debuggerCompletionCallback, this); _debuggerDialog->setCompletionCallback(debuggerCompletionCallback, this);
@ -66,7 +66,7 @@ Debugger::Debugger() {
} }
Debugger::~Debugger() { Debugger::~Debugger() {
#ifndef USE_TEXT_CONSOLE #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
delete _debuggerDialog; delete _debuggerDialog;
#endif #endif
} }
@ -78,7 +78,7 @@ int Debugger::DebugPrintf(const char *format, ...) {
va_start(argptr, format); va_start(argptr, format);
int count; int count;
#ifndef USE_TEXT_CONSOLE #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
count = _debuggerDialog->vprintFormat(1, format, argptr); count = _debuggerDialog->vprintFormat(1, format, argptr);
#else #else
count = ::vprintf(format, argptr); count = ::vprintf(format, argptr);
@ -125,7 +125,7 @@ void Debugger::onFrame() {
} }
} }
#if defined(USE_TEXT_CONSOLE) && defined(USE_READLINE) #if defined(USE_TEXT_CONSOLE_FOR_DEBUGGER) && defined(USE_READLINE)
namespace { namespace {
Debugger *g_readline_debugger; Debugger *g_readline_debugger;
@ -140,7 +140,7 @@ void Debugger::enter() {
// TODO: Having three I/O methods #ifdef-ed in this file is not the // TODO: Having three I/O methods #ifdef-ed in this file is not the
// cleanest approach to this... // cleanest approach to this...
#ifndef USE_TEXT_CONSOLE #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
if (_firstTime) { if (_firstTime) {
DebugPrintf("Debugger started, type 'exit' to return to the game.\n"); DebugPrintf("Debugger started, type 'exit' to return to the game.\n");
DebugPrintf("Type 'help' to see a little list of commands and variables.\n"); DebugPrintf("Type 'help' to see a little list of commands and variables.\n");
@ -363,7 +363,7 @@ bool Debugger::tabComplete(const char *input, Common::String &completion) const
return true; return true;
} }
#if defined(USE_TEXT_CONSOLE) && defined(USE_READLINE) #if defined(USE_TEXT_CONSOLE_FOR_DEBUGGER) && defined(USE_READLINE)
char *Debugger::readlineComplete(const char *input, int state) { char *Debugger::readlineComplete(const char *input, int state) {
static CommandsMap::const_iterator iter; static CommandsMap::const_iterator iter;
@ -417,7 +417,7 @@ bool Debugger::Cmd_Exit(int argc, const char **argv) {
// Print a list of all registered commands (and variables, if any), // Print a list of all registered commands (and variables, if any),
// nicely word-wrapped. // nicely word-wrapped.
bool Debugger::Cmd_Help(int argc, const char **argv) { bool Debugger::Cmd_Help(int argc, const char **argv) {
#ifndef USE_TEXT_CONSOLE #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
const int charsPerLine = _debuggerDialog->getCharsPerLine(); const int charsPerLine = _debuggerDialog->getCharsPerLine();
#elif defined(USE_READLINE) #elif defined(USE_READLINE)
int charsPerLine, rows; int charsPerLine, rows;
@ -520,7 +520,7 @@ bool Debugger::Cmd_DebugFlagDisable(int argc, const char **argv) {
} }
// Console handler // Console handler
#ifndef USE_TEXT_CONSOLE #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
bool Debugger::debuggerInputCallback(GUI::ConsoleDialog *console, const char *input, void *refCon) { bool Debugger::debuggerInputCallback(GUI::ConsoleDialog *console, const char *input, void *refCon) {
Debugger *debugger = (Debugger *)refCon; Debugger *debugger = (Debugger *)refCon;

View file

@ -29,7 +29,7 @@
namespace GUI { namespace GUI {
#ifndef USE_TEXT_CONSOLE #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
class ConsoleDialog; class ConsoleDialog;
#endif #endif
@ -144,7 +144,7 @@ private:
*/ */
bool _firstTime; bool _firstTime;
#ifndef USE_TEXT_CONSOLE #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
GUI::ConsoleDialog *_debuggerDialog; GUI::ConsoleDialog *_debuggerDialog;
#endif #endif
@ -194,7 +194,7 @@ protected:
bool Cmd_DebugFlagEnable(int argc, const char **argv); bool Cmd_DebugFlagEnable(int argc, const char **argv);
bool Cmd_DebugFlagDisable(int argc, const char **argv); bool Cmd_DebugFlagDisable(int argc, const char **argv);
#ifndef USE_TEXT_CONSOLE #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
private: private:
static bool debuggerInputCallback(GUI::ConsoleDialog *console, const char *input, void *refCon); static bool debuggerInputCallback(GUI::ConsoleDialog *console, const char *input, void *refCon);
static bool debuggerCompletionCallback(GUI::ConsoleDialog *console, const char *input, Common::String &completion, void *refCon); static bool debuggerCompletionCallback(GUI::ConsoleDialog *console, const char *input, Common::String &completion, void *refCon);