aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2009-12-24 14:18:16 +0000
committerFilippos Karapetis2009-12-24 14:18:16 +0000
commitc8a3d163d1b06c71e397222becaed87f61bf9597 (patch)
tree0275cdb03cb2ec3bf308ff73b6c0ff8511d5f1eb
parent69fa167902be5cdd28cd6d1620be7f0c9628c944 (diff)
downloadscummvm-rg350-c8a3d163d1b06c71e397222becaed87f61bf9597.tar.gz
scummvm-rg350-c8a3d163d1b06c71e397222becaed87f61bf9597.tar.bz2
scummvm-rg350-c8a3d163d1b06c71e397222becaed87f61bf9597.zip
Added a hack in kAddScreenItem to display the view in question on screen. Some parts of the main menu can be seen now in GK1
svn-id: r46528
-rw-r--r--engines/sci/engine/kernel32.cpp12
-rw-r--r--engines/sci/sci.cpp3
2 files changed, 11 insertions, 4 deletions
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp
index 1a74f1a931..caaec8ad6f 100644
--- a/engines/sci/engine/kernel32.cpp
+++ b/engines/sci/engine/kernel32.cpp
@@ -28,6 +28,7 @@
#include "sci/engine/kernel.h"
#include "sci/engine/segment.h"
#include "sci/engine/state.h"
+#include "sci/gui/gui.h"
namespace Sci {
@@ -594,11 +595,15 @@ reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv) {
int16 viewId = GET_SEL32V(s->_segMan, viewObj, view);
int16 loopNo = GET_SEL32V(s->_segMan, viewObj, loop);
int16 celNo = GET_SEL32V(s->_segMan, viewObj, cel);
- //int16 leftPos = 0;
- //int16 topPos = 0;
+ int16 leftPos = 50; // HACK: lsLeft, perhaps? (but it's 0...)
+ int16 topPos = 50; // HACK: lsTop, perhaps? (but it's 0...)
int16 priority = GET_SEL32V(s->_segMan, viewObj, priority);
//int16 control = 0;
- warning("kAddScreenItem, view %d, loop %d, cel %d, pri %d", viewId, loopNo, celNo, priority);
+
+ // HACK: just draw the view on screen
+ s->_gui->drawCel(viewId, loopNo, celNo, leftPos, topPos, priority, 0);
+
+ warning("kAddScreenItem, object %04x:%04x, view %d, loop %d, cel %d, pri %d", PRINT_REG(viewObj), viewId, loopNo, celNo, priority);
//s->_gui->addToPicView(viewId, loopNo, celNo, leftPos, topPos, priority, control);
return NULL_REG;
}
@@ -612,6 +617,7 @@ reg_t kUpdateScreenItem(EngineState *s, int argc, reg_t *argv) {
//int16 topPos = 0;
int16 priority = GET_SEL32V(s->_segMan, viewObj, priority);
//int16 control = 0;
+
warning("kUpdateScreenItem, view %d, loop %d, cel %d, pri %d", viewId, loopNo, celNo, priority);
return NULL_REG;
}
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 5299ff0d91..6a1299f57c 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -151,7 +151,8 @@ Common::Error SciEngine::run() {
#ifdef ENABLE_SCI32
if (getSciVersion() >= SCI_VERSION_2) {
// Falsify the Views with a Dummy GUI
- _gamestate->_gui = new SciGuiDummy(_gamestate, screen, palette, cursor);
+ //_gamestate->_gui = new SciGuiDummy(_gamestate, screen, palette, cursor);
+ _gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor); // new
} else {
#endif
#ifdef INCLUDE_OLDGFX