aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-28 13:34:20 +0000
committerMartin Kiewitz2009-10-28 13:34:20 +0000
commite8cff408b4c2798c9a27004c203ae10a16759f18 (patch)
treef17ca644adf9ce1e979b678da7d3cf47dfed9c60 /engines/sci
parent04ab6bc9fc831702a26c229027dada1436509b83 (diff)
downloadscummvm-rg350-e8cff408b4c2798c9a27004c203ae10a16759f18.tar.gz
scummvm-rg350-e8cff408b4c2798c9a27004c203ae10a16759f18.tar.bz2
scummvm-rg350-e8cff408b4c2798c9a27004c203ae10a16759f18.zip
SCI/newgui: Jones windowMgr Port adjustment, added explanatory comment
svn-id: r45460
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/gui/gui.cpp4
-rw-r--r--engines/sci/gui/gui_windowmgr.cpp11
-rw-r--r--engines/sci/gui/gui_windowmgr.h2
3 files changed, 10 insertions, 7 deletions
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp
index 4c3ed22999..7997eeb07c 100644
--- a/engines/sci/gui/gui.cpp
+++ b/engines/sci/gui/gui.cpp
@@ -61,8 +61,6 @@ SciGui::SciGui(EngineState *state, SciGuiScreen *screen, SciGuiPalette *palette,
_text = new SciGuiText(_s->resMan, _gfx, _screen);
_windowMgr = new SciGuiWindowMgr(_screen, _gfx, _animate, _text);
_controls = new SciGuiControls(_s->_segMan, _gfx, _text);
- _gfx->init(_text);
- _windowMgr->init();
// _gui32 = new SciGui32(_s, _screen, _palette, _cursor); // for debug purposes
}
@@ -81,6 +79,8 @@ void SciGui::resetEngineState(EngineState *s) {
void SciGui::init(bool usesOldGfxFunctions) {
_usesOldGfxFunctions = usesOldGfxFunctions;
+ _gfx->init(_text);
+ _windowMgr->init(_s->_gameName);
initPriorityBands();
}
diff --git a/engines/sci/gui/gui_windowmgr.cpp b/engines/sci/gui/gui_windowmgr.cpp
index 6a590f0bcb..de9fe7ac0a 100644
--- a/engines/sci/gui/gui_windowmgr.cpp
+++ b/engines/sci/gui/gui_windowmgr.cpp
@@ -52,14 +52,17 @@ SciGuiWindowMgr::~SciGuiWindowMgr() {
// TODO: Clear _windowList and delete all stuff in it?
}
-void SciGuiWindowMgr::init() {
+void SciGuiWindowMgr::init(Common::String gameName) {
+ int16 offTop = 10;
+
_wmgrPort = new GuiPort(0);
_windowsById.resize(1);
_windowsById[0] = _wmgrPort;
- // Jones in the Fast Lane uses up the whole window
- int16 offTop = !scumm_stricmp(((SciEngine *)g_engine)->getGameID(), "jones") ? 0 : 10;
- // TODO: Check how original interpreter works and fix this code if the jones interpreter doesnt do it this way
+ // Jones sierra sci was called with parameter -Nw 0 0 200 320
+ // this actually meant not skipping the first 10 pixellines in windowMgrPort
+ if (gameName == "jones")
+ offTop = 0;
_gfx->OpenPort(_wmgrPort);
_gfx->SetPort(_wmgrPort);
diff --git a/engines/sci/gui/gui_windowmgr.h b/engines/sci/gui/gui_windowmgr.h
index ae3e4f5bca..e848a68335 100644
--- a/engines/sci/gui/gui_windowmgr.h
+++ b/engines/sci/gui/gui_windowmgr.h
@@ -36,7 +36,7 @@ public:
SciGuiWindowMgr(SciGuiScreen *screen, SciGuiGfx *gfx, SciGuiAnimate *animate, SciGuiText *text);
~SciGuiWindowMgr();
- void init();
+ void init(Common::String gameName);
int16 isFrontWindow(GuiWindow *wnd);
void BeginUpdate(GuiWindow *wnd);