diff options
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 26 | ||||
-rw-r--r-- | engines/sci/engine/vm.h | 2 |
2 files changed, 10 insertions, 18 deletions
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp index 753fd6f133..c7dc629d8f 100644 --- a/engines/sci/engine/kernel32.cpp +++ b/engines/sci/engine/kernel32.cpp @@ -698,35 +698,25 @@ reg_t kDeleteScreenItem(EngineState *s, int argc, reg_t *argv) { } reg_t kAddPlane(EngineState *s, int argc, reg_t *argv) { - reg_t picObj = argv[0]; - - // TODO + reg_t planeObj = argv[0]; - // The picture selector usually doesn't hold the actual picture at this point. It's filled in - // when kUpdatePlane is called - - warning("kAddPlane object %04x:%04x", PRINT_REG(picObj)); + s->_gui->addPlane(planeObj); + warning("kAddPlane object %04x:%04x", PRINT_REG(planeObj)); return NULL_REG; } reg_t kDeletePlane(EngineState *s, int argc, reg_t *argv) { - reg_t picObj = argv[0]; + reg_t planeObj = argv[0]; - // TODO - - warning("kDeletePlane object %04x:%04x", PRINT_REG(picObj)); + s->_gui->deletePlane(planeObj); + warning("kDeletePlane object %04x:%04x", PRINT_REG(planeObj)); return NULL_REG; } reg_t kUpdatePlane(EngineState *s, int argc, reg_t *argv) { - reg_t picObj = argv[0]; - int16 picNum = GET_SEL32V(s->_segMan, picObj, picture); - - if (picNum > -1) { - s->_gui->drawPicture(picNum, 100, false, false, false, 0); - s->_gui->animateShowPic(); - } + reg_t planeObj = argv[0]; + s->_gui->updatePlane(planeObj); return s->r_acc; } diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index be53d6a94a..abc1af119a 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -199,6 +199,8 @@ struct SelectorCache { #ifdef ENABLE_SCI32 Selector data; // Used by Array() Selector picture; // Used to hold the picture ID for SCI32 pictures + + Selector plane; #endif }; |