diff options
author | Johannes Schickel | 2014-05-27 02:04:08 +0200 |
---|---|---|
committer | Johannes Schickel | 2014-05-27 02:04:08 +0200 |
commit | 8b7672b64cc179660a4e1706db114b3b6b7073f7 (patch) | |
tree | c93e2c5758e545466c5624eb0e2b3099c9984a1e /engines/sci | |
parent | 96a901d1fb809a67a9067cd5bf7938a1148de47b (diff) | |
download | scummvm-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')
-rw-r--r-- | engines/sci/console.cpp | 13 |
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)); |