From 2861cab3221ea5fb92854ebbbc14563b9849bcf6 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Sun, 3 Jan 2010 13:13:13 +0000 Subject: 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) svn-id: r46922 --- engines/sci/gui/gui_windowmgr.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/gui/gui_windowmgr.cpp b/engines/sci/gui/gui_windowmgr.cpp index d2defb9d35..9dfa0edf2e 100644 --- a/engines/sci/gui/gui_windowmgr.cpp +++ b/engines/sci/gui/gui_windowmgr.cpp @@ -55,9 +55,13 @@ SciGuiWindowMgr::~SciGuiWindowMgr() { 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 -- cgit v1.2.3