From f629a328199708de7c35eba32eb17b6f69586df4 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 22 Aug 2016 13:06:20 +0300 Subject: WINTERMUTE: Fix compilation with MSVC Change the way that EXTENDED_DEBUGGER_ENABLED is checked. The way it was used, it triggered a fatal error C1017 --- engines/wintermute/base/base_game.cpp | 4 ++-- engines/wintermute/base/base_game.h | 4 ++-- engines/wintermute/base/base_script_holder.cpp | 2 +- engines/wintermute/base/scriptables/script.cpp | 4 ++-- engines/wintermute/base/scriptables/script_engine.cpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'engines/wintermute/base') diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp index ce4c5fdda5..1af7e2b56d 100644 --- a/engines/wintermute/base/base_game.cpp +++ b/engines/wintermute/base/base_game.cpp @@ -71,7 +71,7 @@ #include "common/system.h" #include "common/file.h" -#if EXTENDED_DEBUGGER_ENABLED == true +#if EXTENDED_DEBUGGER_ENABLED #include "engines/wintermute/base/scriptables/debuggable/debuggable_script_engine.h" #endif @@ -402,7 +402,7 @@ bool BaseGame::initialize1() { break; } -#if EXTENDED_DEBUGGER_ENABLED == true +#if EXTENDED_DEBUGGER_ENABLED _scEngine = new DebuggableScEngine(this); #else _scEngine = new ScEngine(this); diff --git a/engines/wintermute/base/base_game.h b/engines/wintermute/base/base_game.h index 409cc20ba4..6aacc1feab 100644 --- a/engines/wintermute/base/base_game.h +++ b/engines/wintermute/base/base_game.h @@ -36,7 +36,7 @@ #include "engines/wintermute/math/rect32.h" #include "engines/wintermute/debugger.h" #include "common/events.h" -#if EXTENDED_DEBUGGER_ENABLED == true +#if EXTENDED_DEBUGGER_ENABLED #include "engines/wintermute/base/scriptables/debuggable/debuggable_script_engine.h" #endif @@ -152,7 +152,7 @@ public: BaseRenderer *_renderer; BaseSoundMgr *_soundMgr; -#if EXTENDED_DEBUGGER_ENABLED == true +#if EXTENDED_DEBUGGER_ENABLED DebuggableScEngine *_scEngine; #else ScEngine *_scEngine; diff --git a/engines/wintermute/base/base_script_holder.cpp b/engines/wintermute/base/base_script_holder.cpp index 7427a9b082..fd9dd6a2a5 100644 --- a/engines/wintermute/base/base_script_holder.cpp +++ b/engines/wintermute/base/base_script_holder.cpp @@ -466,7 +466,7 @@ void BaseScriptHolder::makeFreezable(bool freezable) { ScScript *BaseScriptHolder::invokeMethodThread(const char *methodName) { for (int i = _scripts.size() - 1; i >= 0; i--) { if (_scripts[i]->canHandleMethod(methodName)) { -#if EXTENDED_DEBUGGER_ENABLED == true +#if EXTENDED_DEBUGGER_ENABLED DebuggableScEngine* debuggableEngine; debuggableEngine = dynamic_cast(_scripts[i]->_engine); // TODO: Not pretty diff --git a/engines/wintermute/base/scriptables/script.cpp b/engines/wintermute/base/scriptables/script.cpp index 938ec031da..c13310255d 100644 --- a/engines/wintermute/base/scriptables/script.cpp +++ b/engines/wintermute/base/scriptables/script.cpp @@ -32,7 +32,7 @@ #include "engines/wintermute/base/scriptables/script_engine.h" #include "engines/wintermute/base/scriptables/script_stack.h" #include "common/memstream.h" -#if EXTENDED_DEBUGGER_ENABLED == true +#if EXTENDED_DEBUGGER_ENABLED #include "engines/wintermute/base/scriptables/debuggable/debuggable_script.h" #endif namespace Wintermute { @@ -1320,7 +1320,7 @@ ScScript *ScScript::invokeEventHandler(const Common::String &eventName, bool unb if (!pos) { return nullptr; } -#if EXTENDED_DEBUGGER_ENABLED == true +#if EXTENDED_DEBUGGER_ENABLED // TODO: Not pretty DebuggableScEngine* debuggableEngine; debuggableEngine = dynamic_cast(_engine); diff --git a/engines/wintermute/base/scriptables/script_engine.cpp b/engines/wintermute/base/scriptables/script_engine.cpp index 26122094f1..8d957c6951 100644 --- a/engines/wintermute/base/scriptables/script_engine.cpp +++ b/engines/wintermute/base/scriptables/script_engine.cpp @@ -144,7 +144,7 @@ ScScript *ScEngine::runScript(const char *filename, BaseScriptHolder *owner) { } // add new script -#if EXTENDED_DEBUGGER_ENABLED == true +#if EXTENDED_DEBUGGER_ENABLED DebuggableScEngine* debuggableEngine; debuggableEngine = dynamic_cast(this); // TODO: Not pretty -- cgit v1.2.3