[Scummvm-cvs-logs] SF.net SVN: scummvm:[49553] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Jun 9 23:41:20 CEST 2010


Revision: 49553
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49553&view=rev
Author:   thebluegr
Date:     2010-06-09 21:41:20 +0000 (Wed, 09 Jun 2010)

Log Message:
-----------
The segment manager is now initialized before the graphics subsystem. Fixes the detection of the fastCast object on startup, and hence fixes LSL1VGA

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/game.cpp
    scummvm/trunk/engines/sci/sci.cpp

Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp	2010-06-09 21:31:48 UTC (rev 49552)
+++ scummvm/trunk/engines/sci/engine/game.cpp	2010-06-09 21:41:20 UTC (rev 49553)
@@ -74,6 +74,9 @@
 
 	s->initGlobals();
 
+	if (s->abortScriptProcessing == kAbortRestartGame && g_sci->_gfxMenu)
+		g_sci->_gfxMenu->reset();
+
 	s->_segMan->initSysStrings();
 
 	s->r_acc = s->r_prev = NULL_REG;
@@ -101,10 +104,6 @@
 		voc->parser_base = make_reg(s->_segMan->getSysStringsSegment(), SYS_STRING_PARSER_BASE);
 	}
 
-	// Initialize menu TODO: Actually this should be another init()
-	if (g_sci->_gfxMenu)
-		g_sci->_gfxMenu->reset();
-
 	s->game_start_time = g_system->getMillis();
 	s->last_wait_time = s->game_start_time;
 

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2010-06-09 21:31:48 UTC (rev 49552)
+++ scummvm/trunk/engines/sci/sci.cpp	2010-06-09 21:41:20 UTC (rev 49553)
@@ -44,6 +44,7 @@
 #include "sci/sound/soundcmd.h"
 #include "sci/graphics/gui.h"
 #include "sci/graphics/maciconbar.h"
+#include "sci/graphics/menu.h"
 #include "sci/graphics/ports.h"
 #include "sci/graphics/palette.h"
 #include "sci/graphics/cursor.h"
@@ -193,6 +194,15 @@
 	_gamestate = new EngineState(segMan);
 	_eventMan = new EventManager(_resMan);
 
+	// 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)
+	if (game_init(_gamestate)) { /* Initialize */
+		warning("Game initialization failed: Aborting...");
+		// TODO: Add an "init failed" error?
+		return Common::kUnknownError;
+	}
+
 #ifdef ENABLE_SCI32
 	if (getSciVersion() >= SCI_VERSION_2) {
 		_gfxAnimate = 0;
@@ -209,15 +219,11 @@
 #ifdef ENABLE_SCI32
 		_gui32 = 0;
 		_gfxFrameout = 0;
+
+		g_sci->_gfxMenu->reset();
 	}
 #endif
-
-	if (game_init(_gamestate)) { /* Initialize */
-		warning("Game initialization failed: Aborting...");
-		// TODO: Add an "init failed" error?
-		return Common::kUnknownError;
-	}
-	
+		
 	_kernel->loadKernelNames(_features);	// Must be called after game_init()
 
 	script_adjust_opcode_formats(_gamestate);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list