aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-12-26 16:16:02 +0000
committerFilippos Karapetis2009-12-26 16:16:02 +0000
commit4e743e1a467aab8250172d4bb57be5e8484eed0a (patch)
treec1b1c77d6981ed3b3ee682406a2e0d65aeaffa01 /engines
parentb21679e56ee76be47bf5fb10bcd0592b7b19e6f2 (diff)
downloadscummvm-rg350-4e743e1a467aab8250172d4bb57be5e8484eed0a.tar.gz
scummvm-rg350-4e743e1a467aab8250172d4bb57be5e8484eed0a.tar.bz2
scummvm-rg350-4e743e1a467aab8250172d4bb57be5e8484eed0a.zip
SCI2: Figured out the screen coordinates of views. Now, part of the interface can be seen in GK1. Also, silenced the OnMe warnings
svn-id: r46593
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel32.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp
index b6c86e826a..04ab939716 100644
--- a/engines/sci/engine/kernel32.cpp
+++ b/engines/sci/engine/kernel32.cpp
@@ -622,11 +622,11 @@ reg_t kSave(EngineState *s, int argc, reg_t *argv) {
reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv) {
reg_t viewObj = argv[0];
- int16 viewId = GET_SEL32V(s->_segMan, viewObj, view);
+ uint16 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 = 50; // HACK: lsLeft, perhaps? (but it's 0...)
- int16 topPos = 50; // HACK: lsTop, perhaps? (but it's 0...)
+ int16 leftPos = GET_SEL32V(s->_segMan, viewObj, x);
+ int16 topPos = GET_SEL32V(s->_segMan, viewObj, y);
int16 priority = GET_SEL32V(s->_segMan, viewObj, priority);
//int16 control = 0;
@@ -642,23 +642,24 @@ reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv) {
reg_t kUpdateScreenItem(EngineState *s, int argc, reg_t *argv) {
reg_t viewObj = argv[0];
- int16 viewId = GET_SEL32V(s->_segMan, viewObj, view);
+ uint16 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 = GET_SEL32V(s->_segMan, viewObj, x);
+ int16 topPos = GET_SEL32V(s->_segMan, viewObj, y);
int16 priority = GET_SEL32V(s->_segMan, viewObj, priority);
//int16 control = 0;
- // TODO
+ // HACK: just draw the view on screen
+ s->_gui->drawCel(viewId, loopNo, celNo, leftPos, topPos, priority, 0);
- warning("kUpdateScreenItem, view %d, loop %d, cel %d, pri %d", viewId, loopNo, celNo, priority);
+ warning("kUpdateScreenItem, object %04x:%04x, view %d, loop %d, cel %d, pri %d", PRINT_REG(viewObj), viewId, loopNo, celNo, priority);
return NULL_REG;
}
reg_t kDeleteScreenItem(EngineState *s, int argc, reg_t *argv) {
reg_t viewObj = argv[0];
- int16 viewId = GET_SEL32V(s->_segMan, viewObj, view);
+ uint16 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;
@@ -762,7 +763,7 @@ reg_t kOnMe(EngineState *s, int argc, reg_t *argv) {
// TODO
- warning("kOnMe: (%d, %d) on object %04x:%04x", argv[0].toUint16(), argv[1].toUint16(), PRINT_REG(argv[2]));
+ //warning("kOnMe: (%d, %d) on object %04x:%04x", argv[0].toUint16(), argv[1].toUint16(), PRINT_REG(argv[2]));
return s->r_acc;
}