[Scummvm-cvs-logs] scummvm master -> cb990e68a170f354a7e3e2db3be05e0a2ce46a04

lskovlun lskovlun at sprogklog.dk
Fri May 27 17:33:30 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
cb990e68a1 SCI: Fix access to variables (gc_interval etc.) from the console


Commit: cb990e68a170f354a7e3e2db3be05e0a2ce46a04
    https://github.com/scummvm/scummvm/commit/cb990e68a170f354a7e3e2db3be05e0a2ce46a04
Author: Lars Skovlund (lskovlun at sprogklog.dk)
Date: 2011-05-27T08:34:43-07:00

Commit Message:
SCI: Fix access to variables (gc_interval etc.) from the console

Changed paths:
    engines/sci/console.cpp
    engines/sci/sci.cpp



diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index e6b5c3c..ac87b3f 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -74,6 +74,9 @@ static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeV
 Console::Console(SciEngine *engine) : GUI::Debugger(),
 	_engine(engine), _debugState(engine->_debugState) {
 
+	assert(_engine);
+	assert(_engine->_gamestate);
+
 	// Variables
 	DVar_Register("sleeptime_factor",	&g_debug_sleeptime_factor, DVAR_INT, 0);
 	DVar_Register("gc_interval",		&engine->_gamestate->scriptGCInterval, DVAR_INT, 0);
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index cf46d41..cc9042c 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -213,8 +213,6 @@ Common::Error SciEngine::run() {
 	_gfxScreen = new GfxScreen(_resMan);
 	_gfxScreen->enableUndithering(ConfMan.getBool("disable_dithering"));
 
-	// Create debugger console. It requires GFX to be initialized
-	_console = new Console(this);
 	_kernel = new Kernel(_resMan, segMan);
 
 	_features = new GameFeatures(segMan, _kernel);
@@ -227,6 +225,9 @@ Common::Error SciEngine::run() {
 	_gamestate = new EngineState(segMan);
 	_eventMan = new EventManager(_resMan->detectFontExtended());
 
+	// Create debugger console. It requires GFX and _gamestate to be initialized
+	_console = new Console(this);
+
 	// The game needs to be initialized before the graphics system is initialized, as
 	// the graphics code checks parts of the seg manager upon initialization (e.g. for
 	// the presence of the fastCast object)






More information about the Scummvm-git-logs mailing list