aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorAlyssa Milburn2011-11-26 20:48:49 +0100
committerAlyssa Milburn2011-11-26 20:49:02 +0100
commit89b1ff3dc350f49ded2514176a70bceae702cf4b (patch)
treec38a886dc0353d8e2c51207adf49410f1e9d61a7 /engines/mohawk
parent285a92ffaafe4e34ef37607e86aa54a3b382475e (diff)
downloadscummvm-rg350-89b1ff3dc350f49ded2514176a70bceae702cf4b.tar.gz
scummvm-rg350-89b1ff3dc350f49ded2514176a70bceae702cf4b.tar.bz2
scummvm-rg350-89b1ff3dc350f49ded2514176a70bceae702cf4b.zip
MOHAWK: Run kLBEventInit at init time.
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/livingbooks.cpp8
-rw-r--r--engines/mohawk/livingbooks.h2
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