diff options
author | Alyssa Milburn | 2011-11-26 20:48:49 +0100 |
---|---|---|
committer | Alyssa Milburn | 2011-11-26 20:49:02 +0100 |
commit | 89b1ff3dc350f49ded2514176a70bceae702cf4b (patch) | |
tree | c38a886dc0353d8e2c51207adf49410f1e9d61a7 | |
parent | 285a92ffaafe4e34ef37607e86aa54a3b382475e (diff) | |
download | scummvm-rg350-89b1ff3dc350f49ded2514176a70bceae702cf4b.tar.gz scummvm-rg350-89b1ff3dc350f49ded2514176a70bceae702cf4b.tar.bz2 scummvm-rg350-89b1ff3dc350f49ded2514176a70bceae702cf4b.zip |
MOHAWK: Run kLBEventInit at init time.
-rw-r--r-- | engines/mohawk/livingbooks.cpp | 8 | ||||
-rw-r--r-- | engines/mohawk/livingbooks.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index 08b67deb2a..ca3e37ba85 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -2520,6 +2520,10 @@ void LBItem::done(bool onlyNotify) { notify(0xFFFF, _itemId); } +void LBItem::init() { + runScript(kLBEventInit); +} + void LBItem::setVisible(bool visible) { if (visible == _visible) return; @@ -3506,6 +3510,8 @@ bool LBPictureItem::contains(Common::Point point) { void LBPictureItem::init() { _vm->_gfx->preloadImage(_resourceId); + + LBItem::init(); } void LBPictureItem::draw() { @@ -3583,6 +3589,8 @@ void LBAnimationItem::done(bool onlyNotify) { void LBAnimationItem::init() { _anim = new LBAnimation(_vm, this, _resourceId); + + LBItem::init(); } void LBAnimationItem::stop() { diff --git a/engines/mohawk/livingbooks.h b/engines/mohawk/livingbooks.h index e2acb58fc2..975a5f9795 100644 --- a/engines/mohawk/livingbooks.h +++ b/engines/mohawk/livingbooks.h @@ -391,7 +391,7 @@ public: virtual void handleMouseUp(Common::Point pos); // 0xD virtual bool togglePlaying(bool playing, bool restart = false); // 0xF virtual void done(bool onlyNotify); // 0x10 - virtual void init() { } // 0x11 + virtual void init(); // 0x11 virtual void seek(uint16 pos) { } // 0x13 virtual void setFocused(bool focused) { } // 0x14 virtual void setVisible(bool visible); // 0x17 |