aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2009-12-27 01:49:39 +0000
committerFilippos Karapetis2009-12-27 01:49:39 +0000
commita4990f6f334b3d52c5a593750df9bcd4034d8442 (patch)
tree65300e88f5aa186e18fd32ea86550de6a4a520ff /engines/sci
parent6eb5c2f8096b8c25962a8c0970ab06010f3be9b6 (diff)
downloadscummvm-rg350-a4990f6f334b3d52c5a593750df9bcd4034d8442.tar.gz
scummvm-rg350-a4990f6f334b3d52c5a593750df9bcd4034d8442.tar.bz2
scummvm-rg350-a4990f6f334b3d52c5a593750df9bcd4034d8442.zip
Now using m_kiewitz's picture code to show pictures in SCI32. Also took some bits off a similar patch from clone2727. The Sierra logo screen and the menu screen in GK1 should now be shown fully!
svn-id: r46609
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kernel32.cpp17
-rw-r--r--engines/sci/engine/script.cpp1
-rw-r--r--engines/sci/engine/vm.h1
3 files changed, 11 insertions, 8 deletions
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp
index 04ab939716..af1516f22b 100644
--- a/engines/sci/engine/kernel32.cpp
+++ b/engines/sci/engine/kernel32.cpp
@@ -675,18 +675,18 @@ 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];
- // This kernel call shows pictures on screen
- // The picture ID is likely in the "picture" selector (?)
// TODO
+ // 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));
return NULL_REG;
}
reg_t kDeletePlane(EngineState *s, int argc, reg_t *argv) {
reg_t picObj = argv[0];
- // The picture ID is likely in the "picture" selector (?)
// TODO
@@ -696,17 +696,18 @@ reg_t kDeletePlane(EngineState *s, int argc, reg_t *argv) {
reg_t kUpdatePlane(EngineState *s, int argc, reg_t *argv) {
reg_t picObj = argv[0];
- // The picture ID is likely in the "picture" selector (?)
+ int16 picNum = GET_SEL32V(s->_segMan, picObj, picture);
- // TODO
+ if (picNum > -1) {
+ s->_gui->drawPicture(picNum, 100, false, false, false, 0);
+ s->_gui->animateShowPic();
+ }
- warning("kUpdatePlane object %04x:%04x", PRINT_REG(picObj));
- return NULL_REG;
+ return s->r_acc;
}
reg_t kRepaintPlane(EngineState *s, int argc, reg_t *argv) {
reg_t picObj = argv[0];
- // The picture ID is likely in the "picture" selector (?)
// TODO
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index 0bab7f31ae..36f47e8da8 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -240,6 +240,7 @@ void Kernel::mapSelectors() {
#ifdef ENABLE_SCI32
FIND_SELECTOR(data);
+ FIND_SELECTOR(picture);
#endif
}
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index 25acfc5ae6..93116dc675 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -198,6 +198,7 @@ struct SelectorCache {
#ifdef ENABLE_SCI32
Selector data; // Used by Array()
+ Selector picture; // Used to hold the picture ID for SCI32 pictures
#endif
};