diff options
-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 |