diff options
author | Alyssa Milburn | 2010-12-05 22:58:13 +0000 |
---|---|---|
committer | Alyssa Milburn | 2010-12-05 22:58:13 +0000 |
commit | 8dc80912f305db98a26a344fe197dd71da08ede7 (patch) | |
tree | 53cd0d6472da0f4d54ebdbcc05bb7c660a4cd0de /engines/mohawk/livingbooks.cpp | |
parent | 237925e5fddf21dba86155fc9d10aba7355cc9ed (diff) | |
download | scummvm-rg350-8dc80912f305db98a26a344fe197dd71da08ede7.tar.gz scummvm-rg350-8dc80912f305db98a26a344fe197dd71da08ede7.tar.bz2 scummvm-rg350-8dc80912f305db98a26a344fe197dd71da08ede7.zip |
MOHAWK: implement kLBNotifyChangeMode
svn-id: r54794
Diffstat (limited to 'engines/mohawk/livingbooks.cpp')
-rw-r--r-- | engines/mohawk/livingbooks.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index ee340af2db..d534155315 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -1041,8 +1041,10 @@ void MohawkEngine_LivingBooks::handleNotify(NotifyEvent &event) { debug(2, "kLBNotifyChangeMode: %d", event.param); quitGame(); } else { - // FIXME - warning("ignoring V2/V3 kLBNotifyChangeMode"); + // TODO: what is entry.newUnknown? + if (!loadPage((LBMode)event.newMode, event.newPage, event.newSubpage)) + error("kLBNotifyChangeMode failed to move to mode %d, page %d.%d", + event.newMode, event.newPage, event.newSubpage); } break; @@ -2050,7 +2052,14 @@ void LBItem::runScript(uint id, uint16 data, uint16 from) { if (entry->opcode == kLBNotifyGUIAction) _vm->addNotifyEvent(NotifyEvent(entry->opcode, _itemId)); - else + else if (entry->opcode == kLBNotifyChangeMode && _vm->getGameType() != GType_LIVINGBOOKSV1) { + NotifyEvent event(entry->opcode, entry->param); + event.newUnknown = entry->newUnknown; + event.newMode = entry->newMode; + event.newPage = entry->newPage; + event.newSubpage = entry->newSubpage; + _vm->addNotifyEvent(event); + } else _vm->addNotifyEvent(NotifyEvent(entry->opcode, entry->param)); } else { if (entry->param != 0xffff) { |