aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/console.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2014-05-27 02:04:08 +0200
committerJohannes Schickel2014-05-27 02:04:08 +0200
commit8b7672b64cc179660a4e1706db114b3b6b7073f7 (patch)
treec93e2c5758e545466c5624eb0e2b3099c9984a1e /engines/sci/console.cpp
parent96a901d1fb809a67a9067cd5bf7938a1148de47b (diff)
downloadscummvm-rg350-8b7672b64cc179660a4e1706db114b3b6b7073f7.tar.gz
scummvm-rg350-8b7672b64cc179660a4e1706db114b3b6b7073f7.tar.bz2
scummvm-rg350-8b7672b64cc179660a4e1706db114b3b6b7073f7.zip
ALL: Introduce typesafe Debugger::registerVar functions.
This also adds a FIXME to SCI which registered an enum type as int...
Diffstat (limited to 'engines/sci/console.cpp')
-rw-r--r--engines/sci/console.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 1736ac7487..1c4228eb7d 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -79,11 +79,14 @@ Console::Console(SciEngine *engine) : GUI::Debugger(),
assert(_engine->_gamestate);
// Variables
- registerVar("sleeptime_factor", &g_debug_sleeptime_factor, DVAR_INT, 0);
- registerVar("gc_interval", &engine->_gamestate->scriptGCInterval, DVAR_INT, 0);
- registerVar("simulated_key", &g_debug_simulated_key, DVAR_INT, 0);
- registerVar("track_mouse_clicks", &g_debug_track_mouse_clicks, DVAR_BOOL, 0);
- registerVar("script_abort_flag", &_engine->_gamestate->abortScriptProcessing, DVAR_INT, 0);
+ registerVar("sleeptime_factor", &g_debug_sleeptime_factor);
+ registerVar("gc_interval", &engine->_gamestate->scriptGCInterval);
+ registerVar("simulated_key", &g_debug_simulated_key);
+ registerVar("track_mouse_clicks", &g_debug_track_mouse_clicks);
+ // FIXME: This actually passes an enum type instead of an integer but no
+ // precaution is taken to assure that all assigned values are in the range
+ // of the enum type. We should handle this more carefully...
+ registerVar("script_abort_flag", (int *)&_engine->_gamestate->abortScriptProcessing);
// General
registerCmd("help", WRAP_METHOD(Console, cmdHelp));