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
This commit is contained in:
Filippos Karapetis 2016-08-22 13:06:20 +03:00
parent f47ab0000f
commit f629a32819
6 changed files with 11 additions and 11 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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<DebuggableScEngine*>(_scripts[i]->_engine);
// TODO: Not pretty

View File

@ -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<DebuggableScEngine*>(_engine);

View File

@ -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<DebuggableScEngine*>(this);
// TODO: Not pretty

View File

@ -23,11 +23,11 @@
#ifndef WINTERMUTE_DEBUGGER_H
#define WINTERMUTE_DEBUGGER_H
#define EXTENDED_DEBUGGER_ENABLED true
#define EXTENDED_DEBUGGER_ENABLED 1
#include "gui/debugger.h"
#if EXTENDED_DEBUGGER_ENABLED == true
#if EXTENDED_DEBUGGER_ENABLED
#include "engines/wintermute/base/scriptables/debuggable/debuggable_script.h"
#else
#include "engines/wintermute/base/scriptables/script.h"
@ -71,7 +71,7 @@ public:
bool Cmd_ShowFps(int argc, const char **argv);
bool Cmd_DumpFile(int argc, const char **argv);
#if EXTENDED_DEBUGGER_ENABLED == true
#if EXTENDED_DEBUGGER_ENABLED
/**
* Step - break again on next line
*/