aboutsummaryrefslogtreecommitdiff
path: root/simon/items.cpp
diff options
context:
space:
mode:
authorTravis Howell2003-09-25 04:23:07 +0000
committerTravis Howell2003-09-25 04:23:07 +0000
commit07c3c2dac65f48ae61e51cb37588b28c0408884b (patch)
treead6bea248a4c27846bcd9aeb2a4171481355746f /simon/items.cpp
parentcbcf5d5f7d9472654d42e071c865001126522ce2 (diff)
downloadscummvm-rg350-07c3c2dac65f48ae61e51cb37588b28c0408884b.tar.gz
scummvm-rg350-07c3c2dac65f48ae61e51cb37588b28c0408884b.tar.bz2
scummvm-rg350-07c3c2dac65f48ae61e51cb37588b28c0408884b.zip
Small cleanup to reduce amount of game id checks.
svn-id: r10401
Diffstat (limited to 'simon/items.cpp')
-rw-r--r--simon/items.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/simon/items.cpp b/simon/items.cpp
index dc9513431e..947bf4cf88 100644
--- a/simon/items.cpp
+++ b/simon/items.cpp
@@ -1248,15 +1248,7 @@ void SimonEngine::o_inventory_descriptions() {
tv = getThreeValues(a);
}
- if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1TALKIE || _game == GAME_SIMON1WIN) {
- if (child != NULL && child->avail_props & 0x200) {
- uint offs = getOffsetOfChild2Param(child, 0x200);
- talk_with_speech(child->array[offs], a);
- } else if (child != NULL && child->avail_props & 0x100) {
- uint offs = getOffsetOfChild2Param(child, 0x100);
- talk_with_speech(child->array[offs] + 3550, a);
- }
- } else if (_game == GAME_SIMON2TALKIE || _game == GAME_SIMON2WIN) {
+ if ((_game & GF_SIMON2) && (_game & GF_TALKIE)) {
if (child != NULL && child->avail_props & 0x200) {
uint var200 = child->array[getOffsetOfChild2Param(child, 0x200)];
@@ -1308,7 +1300,16 @@ void SimonEngine::o_inventory_descriptions() {
talk_with_speech(var200, a);
}
+ } else if (_game & GF_TALKIE) {
+ if (child != NULL && child->avail_props & 0x200) {
+ uint offs = getOffsetOfChild2Param(child, 0x200);
+ talk_with_speech(child->array[offs], a);
+ } else if (child != NULL && child->avail_props & 0x100) {
+ uint offs = getOffsetOfChild2Param(child, 0x100);
+ talk_with_speech(child->array[offs] + 3550, a);
+ }
}
+
if (child != NULL && (child->avail_props & 1) && _subtitles) {
if (child->avail_props & 0x100) {
sprintf(buf, "%d%s", child->array[getOffsetOfChild2Param(child, 0x100)], s);