diff options
author | Matthew Hoops | 2010-05-24 17:21:11 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-05-24 17:21:11 +0000 |
commit | d49fb8f42db7b9776f1dc426ebe2c6d806ad4720 (patch) | |
tree | e0760e8b76b8786f506a59dc62ef824b2304f1cd /engines/sci/engine | |
parent | ad0eb0b06ef6c715280c21a1c036be5c56a3183a (diff) | |
download | scummvm-rg350-d49fb8f42db7b9776f1dc426ebe2c6d806ad4720.tar.gz scummvm-rg350-d49fb8f42db7b9776f1dc426ebe2c6d806ad4720.tar.bz2 scummvm-rg350-d49fb8f42db7b9776f1dc426ebe2c6d806ad4720.zip |
Add support for showing the icon bar in SCI1.1 Mac.
svn-id: r49196
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kmisc.cpp | 8 | ||||
-rw-r--r-- | engines/sci/engine/selector.cpp | 1 | ||||
-rw-r--r-- | engines/sci/engine/vm.h | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index aee1d58357..6fc4b2fc1d 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -32,6 +32,7 @@ #include "sci/engine/kernel.h" #include "sci/engine/gc.h" #include "sci/graphics/gui.h" +#include "sci/graphics/maciconbar.h" namespace Sci { @@ -297,9 +298,12 @@ reg_t kMemory(EngineState *s, int argc, reg_t *argv) { reg_t kIconBar(EngineState *s, int argc, reg_t *argv) { // TODO... - if (argv[0].toUint16() == 4 && argv[1].toUint16() == 0) + if (argv[0].toUint16() == 4 && argv[1].toUint16() == 0) { for (int i = 0; i < argv[2].toUint16(); i++) - warning("kIconBar: Icon Object %d = %04x:%04x", i, PRINT_REG(argv[i + 3])); + g_sci->_macIconBar->addIcon(argv[i + 3]); + + g_sci->_macIconBar->drawIcons(); + } // Other calls seem to handle selecting/deselecting them diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp index e226c4b574..aba134818b 100644 --- a/engines/sci/engine/selector.cpp +++ b/engines/sci/engine/selector.cpp @@ -158,6 +158,7 @@ void Kernel::mapSelectors() { FIND_SELECTOR(scaleSignal); FIND_SELECTOR(scaleX); FIND_SELECTOR(scaleY); + FIND_SELECTOR(iconIndex); #ifdef ENABLE_SCI32 FIND_SELECTOR(data); diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index 97a01051d6..f6151dfc9d 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -197,6 +197,9 @@ struct SelectorCache { Selector overlay; ///< Used to determine if a game is using old gfx functions or not Selector setCursor; ///< For cursor semantics autodetection + // SCI1.1 Mac icon bar selectors + Selector iconIndex; ///< Used to index icon bar objects + #ifdef ENABLE_SCI32 Selector data; // Used by Array()/String() Selector picture; // Used to hold the picture ID for SCI32 pictures |