diff options
author | Martin Kiewitz | 2010-01-04 22:14:34 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-04 22:14:34 +0000 |
commit | 05a16d7cba889c3daf947a727917ce2dc9bd1eab (patch) | |
tree | f81b65a5460fd329724220df52f2fd1713cb3bf0 /engines/sci/engine/kernel32.cpp | |
parent | f7855e1c071fb85e968e7b1446ce668b0cd59e86 (diff) | |
download | scummvm-rg350-05a16d7cba889c3daf947a727917ce2dc9bd1eab.tar.gz scummvm-rg350-05a16d7cba889c3daf947a727917ce2dc9bd1eab.tar.bz2 scummvm-rg350-05a16d7cba889c3daf947a727917ce2dc9bd1eab.zip |
SCI: surprise for this DrMcCoy guy
svn-id: r46992
Diffstat (limited to 'engines/sci/engine/kernel32.cpp')
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp index 80f87a5ad2..0acc49311b 100644 --- a/engines/sci/engine/kernel32.cpp +++ b/engines/sci/engine/kernel32.cpp @@ -639,35 +639,8 @@ 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]; - uint16 viewId = GET_SEL32V(s->_segMan, viewObj, view); - uint16 loopNo = GET_SEL32V(s->_segMan, viewObj, loop); - uint16 celNo = GET_SEL32V(s->_segMan, viewObj, cel); - uint16 leftPos = GET_SEL32V(s->_segMan, viewObj, x); - uint16 topPos = GET_SEL32V(s->_segMan, viewObj, y); - int16 priority = GET_SEL32V(s->_segMan, viewObj, priority); - //int16 control = 0; - - // Theoretically, leftPos and topPos should be sane - // Apparently, sometimes they're not, therefore I'm adding some sanity checks here so that - // the hack underneath does not try and draw cels outside the screen coordinates - if (leftPos >= (int16)s->_gui->getScreenWidth()) { - warning("kAddScreenItem: invalid left position (%d), resetting to 0", leftPos); - leftPos = 0; - } - - if (topPos >= s->_gui->getScreenHeight()) { - warning("kAddScreenItem: invalid top position (%d), resetting to 0", topPos); - topPos = 0; - } - - // HACK: just draw the view on screen - if (viewId != 0xffff) - s->_gui->drawCel(viewId, loopNo, celNo, leftPos, topPos, priority, 0); - - // TODO - //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); + s->_gui->addScreenItem(viewObj); return NULL_REG; } @@ -767,6 +740,7 @@ reg_t kFrameOut(EngineState *s, int argc, reg_t *argv) { // as its called right after a view is updated // TODO + s->_gui->frameOut(); return NULL_REG; } |