diff options
author | Alyssa Milburn | 2010-11-29 23:36:49 +0000 |
---|---|---|
committer | Alyssa Milburn | 2010-11-29 23:36:49 +0000 |
commit | 2c824e3311521979b9f3afe38c62fe60885e952d (patch) | |
tree | 1650fbf50081b32985faa738fc285e229c451e1e /engines | |
parent | 92d5277816a5d8b76f28394214434908d81d0808 (diff) | |
download | scummvm-rg350-2c824e3311521979b9f3afe38c62fe60885e952d.tar.gz scummvm-rg350-2c824e3311521979b9f3afe38c62fe60885e952d.tar.bz2 scummvm-rg350-2c824e3311521979b9f3afe38c62fe60885e952d.zip |
MOHAWK: implement hardcoded Living Books 1.0 code
svn-id: r54657
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mohawk/detection_tables.h | 10 | ||||
-rw-r--r-- | engines/mohawk/livingbooks.cpp | 42 | ||||
-rw-r--r-- | engines/mohawk/mohawk.h | 2 |
3 files changed, 39 insertions, 15 deletions
diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h index 4b53c4db4b..ce61380b43 100644 --- a/engines/mohawk/detection_tables.h +++ b/engines/mohawk/detection_tables.h @@ -719,7 +719,7 @@ static const MohawkGameDescription gameDescriptions[] = { Common::GUIO_NONE }, GType_LIVINGBOOKSV1, - GF_NO_READONLY, + GF_LB_10, "ARTHUR.EXE" // FIXME: Check this (ST?) }, @@ -734,7 +734,7 @@ static const MohawkGameDescription gameDescriptions[] = { Common::GUIO_NONE }, GType_LIVINGBOOKSV1, - GF_DEMO | GF_NO_READONLY, + GF_DEMO | GF_LB_10, "ARTHUR.EXE" }, @@ -764,7 +764,7 @@ static const MohawkGameDescription gameDescriptions[] = { Common::GUIO_NONE }, GType_LIVINGBOOKSV1, - GF_DEMO, + GF_DEMO | GF_LB_10, "Arthur's Teacher Trouble" }, @@ -794,7 +794,7 @@ static const MohawkGameDescription gameDescriptions[] = { Common::GUIO_NONE }, GType_LIVINGBOOKSV1, - GF_DEMO | GF_NO_READONLY, + GF_DEMO | GF_LB_10, "GRANDMA.EXE" }, @@ -824,7 +824,7 @@ static const MohawkGameDescription gameDescriptions[] = { Common::GUIO_NONE }, GType_LIVINGBOOKSV1, - GF_DEMO | GF_NO_READONLY, + GF_DEMO | GF_LB_10, "Just Grandma and Me" }, diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index 559a742210..1841f3ee29 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -293,10 +293,9 @@ bool MohawkEngine_LivingBooks::loadPage(LBMode mode, uint page, uint subpage) { return false; } - if (getFeatures() & GF_NO_READONLY) { + if (getFeatures() & GF_LB_10) { if (_readOnly) { - // TODO: make this a warning, after some testing? - error("game detection table is bad (remove GF_NO_READONLY)"); + error("found .r entry in Living Books 1.0 game"); } else { // some very early versions of the LB engine don't have // .r entries in their book info; instead, it is just hardcoded @@ -341,7 +340,16 @@ void MohawkEngine_LivingBooks::updatePage() { if (item) item->togglePlaying(false); - switch (_curPage) { + uint16 page = _curPage; + if (getFeatures() & GF_LB_10) { + // Living Books 1.0 had the meanings of these pages reversed + if (page == 2) + page = 3; + else if (page == 3) + page = 2; + } + + switch (page) { case 1: debug(2, "updatePage() for control page 1 (menu)"); @@ -648,16 +656,29 @@ void MohawkEngine_LivingBooks::handleNotify(NotifyEvent &event) { // The scripting passes us the control ID as param, so we work // out which control was clicked, then run the relevant code. + uint16 page; + page = _curPage; + if (getFeatures() & GF_LB_10) { + // Living Books 1.0 had the meanings of these pages reversed + if (page == 2) + page = 3; + else if (page == 3) + page = 2; + } + LBItem *item; - switch (_curPage) { + switch (page) { case 1: // main menu // TODO: poetry mode switch (event.param) { case 1: - // TODO: page 2 in some versions? - loadPage(kLBControlMode, 3, 0); + if (getFeatures() & GF_LB_10) { + loadPage(kLBControlMode, 2, 0); + } else { + loadPage(kLBControlMode, 3, 0); + } break; case 2: @@ -689,8 +710,11 @@ void MohawkEngine_LivingBooks::handleNotify(NotifyEvent &event) { break; case 4: - // TODO: page 3 in some versions? - loadPage(kLBControlMode, 2, 0); + if (getFeatures() & GF_LB_10) { + loadPage(kLBControlMode, 3, 0); + } else { + loadPage(kLBControlMode, 2, 0); + } break; case 10: diff --git a/engines/mohawk/mohawk.h b/engines/mohawk/mohawk.h index 125296c03d..1e93c63499 100644 --- a/engines/mohawk/mohawk.h +++ b/engines/mohawk/mohawk.h @@ -69,7 +69,7 @@ enum MohawkGameFeatures { GF_DVD = (1 << 1), GF_DEMO = (1 << 2), GF_HASMIDI = (1 << 3), - GF_NO_READONLY = (1 << 4) // very early Living Books games + GF_LB_10 = (1 << 4) // very early Living Books 1.0 games }; struct MohawkGameDescription; |