diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/queen/queen.cpp | 22 | ||||
-rw-r--r-- | engines/queen/queen.h | 2 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 20 | ||||
-rw-r--r-- | engines/scumm/scumm.h | 2 | ||||
-rw-r--r-- | engines/simon/simon.cpp | 21 | ||||
-rw-r--r-- | engines/simon/simon.h | 2 | ||||
-rw-r--r-- | engines/sky/sky.cpp | 19 | ||||
-rw-r--r-- | engines/sky/sky.h | 2 | ||||
-rw-r--r-- | engines/sword2/sword2.cpp | 22 | ||||
-rw-r--r-- | engines/sword2/sword2.h | 2 |
10 files changed, 17 insertions, 97 deletions
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp index df854bf5fe..c19945d332 100644 --- a/engines/queen/queen.cpp +++ b/engines/queen/queen.cpp @@ -48,10 +48,6 @@ #include "sound/mididrv.h" -#ifdef _WIN32_WCE -bool isSmartphone(); -#endif - /* Flight of the Amazon Queen */ static const PlainGameDescriptor queen_setting[] = { { "queen", "Flight of the Amazon Queen" }, @@ -352,22 +348,8 @@ void QueenEngine::findGameStateDescriptions(char descriptions[100][32]) { } } -void QueenEngine::errorString(const char *buf1, char *buf2) { - strcpy(buf2, buf1); - -#ifdef _WIN32_WCE - if (isSmartphone()) - return; -#endif - - // Unless an error -originated- within the debugger, spawn the - // debugger. Otherwise exit out normally. - if (_debugger && !_debugger->isAttached()) { - // (Print it again in case debugger segfaults) - printf("%s\n", buf2); - _debugger->attach(buf2); - _debugger->onFrame(); - } +GUI::Debugger *QueenEngine::getDebugger() { + return _debugger; } int QueenEngine::go() { diff --git a/engines/queen/queen.h b/engines/queen/queen.h index a1f8b45aa9..5bd697f40a 100644 --- a/engines/queen/queen.h +++ b/engines/queen/queen.h @@ -130,7 +130,7 @@ public: protected: - void errorString(const char *buf_input, char *buf_output); + GUI::Debugger *getDebugger(); int go(); int init(); diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index d320bc55de..7da88fe5e6 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -63,10 +63,6 @@ #include "sound/mixer.h" -#ifdef _WIN32_WCE -extern bool isSmartphone(void); -#endif - #if (defined(PALMOS_ARM) || defined(PALMOS_DEBUG) || defined(__GP32__)) namespace Graphics { extern void initfonts(); @@ -2117,6 +2113,9 @@ char ScummEngine::displayMessage(const char *altButton, const char *message, ... #pragma mark --- Miscellaneous --- #pragma mark - +GUI::Debugger *ScummEngine::getDebugger() { + return _debugger; +} void ScummEngine::errorString(const char *buf1, char *buf2) { if (_currentScript != 0xFF) { @@ -2126,19 +2125,6 @@ void ScummEngine::errorString(const char *buf1, char *buf2) { } else { strcpy(buf2, buf1); } - -#ifdef _WIN32_WCE - if (isSmartphone()) - return; -#endif - - // Unless an error -originated- within the debugger, spawn the debugger. Otherwise - // exit out normally. - if (_debugger && !_debugger->isAttached()) { - printf("%s\n", buf2); // (Print it again in case debugger segfaults) - _debugger->attach(buf2); - _debugger->onFrame(); - } } diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index d9ae984bda..36aa285a5a 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -417,7 +417,9 @@ class ScummEngine : public Engine { friend class CharsetRenderer; friend class ResourceManager; + GUI::Debugger *getDebugger(); void errorString(const char *buf_input, char *buf_output); + public: /* Put often used variables at the top. * That results in a shorter form of the opcode diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index 2e0c2712f3..74ed56eb03 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -36,9 +36,6 @@ #include "simon/vga.h" #include "sound/mididrv.h" -#ifdef _WIN32_WCE -extern bool isSmartphone(void); -#endif #ifdef PALMOS_68K #include "globals.h" @@ -611,22 +608,8 @@ SimonEngine::~SimonEngine() { delete _sound; } -void SimonEngine::errorString(const char *buf1, char *buf2) { - strcpy(buf2, buf1); - -#ifdef _WIN32_WCE - if (isSmartphone()) - return; -#endif - - // Unless an error -originated- within the debugger, spawn the - // debugger. Otherwise exit out normally. - if (_debugger && !_debugger->isAttached()) { - // (Print it again in case debugger segfaults) - printf("%s\n", buf2); - _debugger->attach(buf2); - _debugger->onFrame(); - } +GUI::Debugger *SimonEngine::getDebugger() { + return _debugger; } void SimonEngine::paletteFadeOut(byte *palPtr, uint num, uint size) { diff --git a/engines/simon/simon.h b/engines/simon/simon.h index ee21e77ac4..49c35ba386 100644 --- a/engines/simon/simon.h +++ b/engines/simon/simon.h @@ -141,7 +141,7 @@ class SimonEngine : public Engine { friend class Debugger; friend class MoviePlayer; - void errorString(const char *buf_input, char *buf_output); + GUI::Debugger *getDebugger(); typedef void (SimonEngine::*OpcodeProc) (); void setupOpcodes(); diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 48b3b1515b..f30a98a9bc 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -55,7 +55,6 @@ extern bool toolbar_drawn; extern bool draw_keyboard; -extern bool isSmartphone(void); #endif /* @@ -148,22 +147,8 @@ SkyEngine::~SkyEngine() { free(_itemList[i]); } -void SkyEngine::errorString(const char *buf1, char *buf2) { - strcpy(buf2, buf1); - -#ifdef _WIN32_WCE - if (isSmartphone()) - return; -#endif - - // Unless an error -originated- within the debugger, spawn the - // debugger. Otherwise exit out normally. - if (_debugger && !_debugger->isAttached()) { - // (Print it again in case debugger segfaults) - printf("%s\n", buf2); - _debugger->attach(buf2); - _debugger->onFrame(); - } +GUI::Debugger *SkyEngine::getDebugger() { + return _debugger; } void SkyEngine::initVirgin() { diff --git a/engines/sky/sky.h b/engines/sky/sky.h index 40b4630597..bb119b06dc 100644 --- a/engines/sky/sky.h +++ b/engines/sky/sky.h @@ -55,7 +55,7 @@ class Debugger; class SkyCompact; class SkyEngine : public Engine { - void errorString(const char *buf_input, char *buf_output); + GUI::Debugger *getDebugger(); protected: byte _keyPressed, _keyFlags; bool _floppyIntro; diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index 2f339545a5..99344106ad 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -42,10 +42,6 @@ #include "sword2/screen.h" #include "sword2/sound.h" -#ifdef _WIN32_WCE -extern bool isSmartphone(); -#endif - namespace Sword2 { struct GameSettings { @@ -196,22 +192,8 @@ Sword2Engine::~Sword2Engine() { delete _memory; } -void Sword2Engine::errorString(const char *buf1, char *buf2) { - strcpy(buf2, buf1); - -#ifdef _WIN32_WCE - if (isSmartphone()) - return; -#endif - - // Unless an error -originated- within the debugger, spawn the - // debugger. Otherwise exit out normally. - if (_debugger && !_debugger->isAttached()) { - // (Print it again in case debugger segfaults) - printf("%s\n", buf2); - _debugger->attach(buf2); - _debugger->onFrame(); - } +GUI::Debugger *Sword2Engine::getDebugger() { + return _debugger; } void Sword2Engine::registerDefaultSettings() { diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h index 79b07c9918..42ead0b864 100644 --- a/engines/sword2/sword2.h +++ b/engines/sword2/sword2.h @@ -210,7 +210,7 @@ public: void sleepUntil(uint32 time); - void errorString(const char *buf_input, char *buf_output); + GUI::Debugger *getDebugger(); void initialiseFontResourceFlags(); void initialiseFontResourceFlags(uint8 language); |