aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gui
diff options
context:
space:
mode:
authorMartin Kiewitz2010-01-03 13:13:13 +0000
committerMartin Kiewitz2010-01-03 13:13:13 +0000
commit2861cab3221ea5fb92854ebbbc14563b9849bcf6 (patch)
tree4c41585bb85134f0ea0e31bbab36f7eaa37dc429 /engines/sci/gui
parent3fbf1293d81725316c45faf9d0bc93424a2e18bf (diff)
downloadscummvm-rg350-2861cab3221ea5fb92854ebbbc14563b9849bcf6.tar.gz
scummvm-rg350-2861cab3221ea5fb92854ebbbc14563b9849bcf6.tar.bz2
scummvm-rg350-2861cab3221ea5fb92854ebbbc14563b9849bcf6.zip
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
Diffstat (limited to 'engines/sci/gui')
-rw-r--r--engines/sci/gui/gui_windowmgr.cpp10
1 files changed, 7 insertions, 3 deletions
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