[Scummvm-cvs-logs] SF.net SVN: scummvm:[46922] scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Sun Jan 3 14:13:13 CET 2010


Revision: 46922
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46922&view=rev
Author:   m_kiewitz
Date:     2010-01-03 13:13:13 +0000 (Sun, 03 Jan 2010)

Log Message:
-----------
SCI: windowMgr port fix (using id 1 now on that port instead of 0, still accessible via id 0 as well) fixes qfg1vga, sq4 (-10 pixel walking) and castle of dr. brain (computer room puzzle)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp

Modified: scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp	2010-01-03 10:46:14 UTC (rev 46921)
+++ scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp	2010-01-03 13:13:13 UTC (rev 46922)
@@ -55,9 +55,13 @@
 void SciGuiWindowMgr::init(Common::String gameId) {
 	int16 offTop = 10;
 
-	_wmgrPort = new GuiPort(0);
-	_windowsById.resize(1);
-	_windowsById[0] = _wmgrPort;
+	_wmgrPort = new GuiPort(1);
+	_windowsById.resize(2);
+	_windowsById[0] = _wmgrPort; // wmgrPort is supposed to be accessible via id 0
+	_windowsById[1] = _wmgrPort; //  but wmgrPort may not actually have id 0, so we assign id 1 (as well)
+	// Background: sierra sci replies with the offset of curPort on kGetPort calls. If we reply with 0 there most games
+	//				will work, but some scripts seem to check for 0 and initialize the variable again in that case
+	//				resulting in problems.
 
 	// Jones sierra sci was called with parameter -Nw 0 0 200 320
 	//  this actually meant not skipping the first 10 pixellines in windowMgrPort


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