aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2
diff options
context:
space:
mode:
authorMax Horn2006-09-16 19:31:23 +0000
committerMax Horn2006-09-16 19:31:23 +0000
commit651d22b873754cf4907a67f0f3c7e18eafdd7636 (patch)
tree372b7bc3c8c3f86437467ea95a197799291e1950 /engines/sword2
parentfd12695e59832265cae1ba62f8092fe182f2d7a2 (diff)
downloadscummvm-rg350-651d22b873754cf4907a67f0f3c7e18eafdd7636.tar.gz
scummvm-rg350-651d22b873754cf4907a67f0f3c7e18eafdd7636.tar.bz2
scummvm-rg350-651d22b873754cf4907a67f0f3c7e18eafdd7636.zip
* Added virtual Engine::getDebugger() method
* Removed code from errorString() methods that hooked the debugger(s) into error(), in favor of using getDebugger() from within error() * As a consequence, removed most custom errorString() methods svn-id: r23894
Diffstat (limited to 'engines/sword2')
-rw-r--r--engines/sword2/sword2.cpp22
-rw-r--r--engines/sword2/sword2.h2
2 files changed, 3 insertions, 21 deletions
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);