diff options
author | Travis Howell | 2002-11-04 06:46:21 +0000 |
---|---|---|
committer | Travis Howell | 2002-11-04 06:46:21 +0000 |
commit | 1cc25f5bbd334e43615e2f0c6a891ff7e83065b0 (patch) | |
tree | 6093493eb14cddab3b66d98c91485da11fd67c24 | |
parent | 7191031c7220c02596902aec7c7f144b8836ad31 (diff) | |
download | scummvm-rg350-1cc25f5bbd334e43615e2f0c6a891ff7e83065b0.tar.gz scummvm-rg350-1cc25f5bbd334e43615e2f0c6a891ff7e83065b0.tar.bz2 scummvm-rg350-1cc25f5bbd334e43615e2f0c6a891ff7e83065b0.zip |
Add some separate simon2dos sections since it doesn't have speech.
simon2dos text still not working right though.
svn-id: r5401
-rw-r--r-- | simon/items.cpp | 67 |
1 files changed, 65 insertions, 2 deletions
diff --git a/simon/items.cpp b/simon/items.cpp index cf044e2991..4b031613b8 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -1040,7 +1040,7 @@ int SimonState::runScript() } talk_with_text(b, c, s, tv->a, tv->b, tv->c); - } else if (_game == GAME_SIMON2WIN || _game == GAME_SIMON2DOS) { + } else if (_game == GAME_SIMON2WIN) { uint b = getVarOrByte(); uint c = getVarOrByte(); uint a = getVarOrByte(); @@ -1071,6 +1071,32 @@ int SimonState::runScript() if (s != NULL && _vk_t_toggle) talk_with_text(b, c, s, tv->a, tv->b, tv->c); + } else if (_game == GAME_SIMON2DOS) { + uint b = getVarOrByte(); + uint c = getVarOrByte(); + uint a = getVarOrByte(); + const char *s = (const char *)getStringPtrByID(_stringid_array_3[a]); + ThreeValues *tv; + + switch (b) { + case 1: + tv = &_threevalues_1; + break; + case 2: + tv = &_threevalues_2; + break; + case 101: + tv = &_threevalues_3; + break; + case 102: + tv = &_threevalues_4; + break; + default: + error("setup text, invalid value %d", b); + } + + if (s != NULL) + talk_with_text(b, c, s, tv->a, tv->b, tv->c); } } break; @@ -1322,7 +1348,7 @@ void SimonState::o_177() talk_with_text(a, b, s, tv->a, tv->b, tv->c); } - } else if (_game & GAME_SIMON2) { + } else if (_game == GAME_SIMON2WIN) { uint a = getVarOrByte(); uint b = getVarOrByte(); Child2 *child = (Child2 *)findChildOfType(getNextItemPtr(), 2); @@ -1413,6 +1439,43 @@ void SimonState::o_177() } talk_with_text(a, b, s, tv->a, tv->b, tv->c); + } else if (_game == GAME_SIMON2DOS) { + uint a = getVarOrByte(); + uint b = getVarOrByte(); + Child2 *child = (Child2 *)findChildOfType(getNextItemPtr(), 2); + const char *s = NULL; + ThreeValues *tv = NULL; + char buf[256]; + + if (child != NULL && child->avail_props & 1) { + s = (const char *)getStringPtrByID(child->array[0]); + switch (a) { + case 1: + tv = &_threevalues_1; + break; + case 2: + tv = &_threevalues_2; + break; + case 101: + tv = &_threevalues_3; + break; + case 102: + tv = &_threevalues_4; + break; + default: + error("setup text, invalid value %d", a); + } + } + + if (child == NULL || !(child->avail_props & 1)) + return; + + if (child->avail_props & 0x100) { + sprintf(buf, "%d%s", child->array[getOffsetOfChild2Param(child, 0x100)], s); + s = buf; + } + + talk_with_text(a, b, s, tv->a, tv->b, tv->c); } } |