mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
MOHAWK: implement hardcoded Living Books 1.0 code
svn-id: r54657
This commit is contained in:
parent
92d5277816
commit
2c824e3311
@ -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"
|
||||
},
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user