aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2002-11-20 08:05:56 +0000
committerTravis Howell2002-11-20 08:05:56 +0000
commit3d2648e55f9a172c1fc95422a6461f28ed8943b0 (patch)
tree9ad0ff37f4d1134fa404f139e0a2f73fc735d8f4
parente5d6c14b66343d0f2e9b2129896b95e6603ac9b9 (diff)
downloadscummvm-rg350-3d2648e55f9a172c1fc95422a6461f28ed8943b0.tar.gz
scummvm-rg350-3d2648e55f9a172c1fc95422a6461f28ed8943b0.tar.bz2
scummvm-rg350-3d2648e55f9a172c1fc95422a6461f28ed8943b0.zip
Revert earlier change for optional text support in simon1talkie/win since the data files don't have complete text.
I have left TEXT_HACK removed for the same reason. svn-id: r5633
-rw-r--r--simon/items.cpp77
-rw-r--r--simon/simon.cpp19
2 files changed, 17 insertions, 79 deletions
diff --git a/simon/items.cpp b/simon/items.cpp
index 654e40033f..4c87835233 100644
--- a/simon/items.cpp
+++ b/simon/items.cpp
@@ -1009,34 +1009,11 @@ int SimonState::runScript()
case 179:{
if (_game == GAME_SIMON1TALKIE || _game == GAME_SIMON1WIN) {
uint b = getVarOrByte();
- uint c = getVarOrByte();
+ /*uint c = */ getVarOrByte();
uint a = getVarOrByte();
uint d = _array_4[a];
- 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 (_vk_t_toggle) {
- talk_with_text(b, c, s, tv->a, tv->b, tv->c);
- } else if (d != 0) {
- talk_with_speech(d, b);
- }
+ if (d != 0)
+ talk_with_speech(d, b);
} else if (_game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
uint b = getVarOrByte();
uint c = getVarOrByte();
@@ -1325,49 +1302,15 @@ void SimonState::o_177()
{
if (_game == GAME_SIMON1TALKIE || _game == GAME_SIMON1WIN) {
uint a = getVarOrByte();
- uint b = getVarOrByte();
+ /*uint b = */ getVarOrByte();
uint offs;
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 (_vk_t_toggle) {
- if (child->avail_props & 0x100) {
- uint x = getOffsetOfChild2Param(child, 0x100);
- sprintf(buf, "%d%s", child->array[x], s);
- s = buf;
- }
-
- talk_with_text(a, b, s, tv->a, tv->b, tv->c);
- } else {
- if (child != NULL && child->avail_props & 0x200) {
- offs = getOffsetOfChild2Param(child, 0x200);
- talk_with_speech(child->array[offs], a);
- } else if (child != NULL && child->avail_props & 0x100) {
- offs = getOffsetOfChild2Param(child, 0x100);
- talk_with_speech(child->array[offs] + 3550, a);
- }
+ if (child != NULL && child->avail_props & 0x200) {
+ offs = getOffsetOfChild2Param(child, 0x200);
+ talk_with_speech(child->array[offs], a);
+ } else if (child != NULL && child->avail_props & 0x100) {
+ offs = getOffsetOfChild2Param(child, 0x100);
+ talk_with_speech(child->array[offs] + 3550, a);
}
} else if ((_game == GAME_SIMON1DEMO) || (_game == GAME_SIMON1DOS)) {
uint a = getVarOrByte();
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 03bcd1762e..f47750c9a2 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -1772,11 +1772,11 @@ void SimonState::o_print_str()
switch (_game) {
case GAME_SIMON1TALKIE:
case GAME_SIMON1WIN:
- if (speech_id != 0 && !_vk_t_toggle) {
- talk_with_speech(speech_id, num_1);
- } else if (string_ptr != NULL) {
- talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c);
- }
+ if (speech_id != 0) {
+ talk_with_speech(speech_id, num_1);
+ } else if (string_ptr != NULL) {
+ talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c);
+ }
break;
case GAME_SIMON1DEMO:
@@ -3422,9 +3422,10 @@ void SimonState::video_toggle_colors(HitArea * ha, byte a, byte b, byte c, byte
bool SimonState::vc_59_helper()
{
- if (_vk_t_toggle)
+ if (_voice_file == NULL)
return true;
return _voice_sound == 0;
+#endif
}
void SimonState::video_copy_if_flag_0x8_c(FillOrCopyStruct *fcs)
@@ -3792,7 +3793,6 @@ void SimonState::talk_with_speech(uint speech_id, uint num_1)
_skip_vga_wait = true;
return;
}
-
if (num_1 < 100) {
o_unk_99_simon1(num_1 + 201);
}
@@ -4555,12 +4555,7 @@ void SimonState::go()
_mainscript_toggle = false;
_vgascript_toggle = false;
-
- if (_voice_type != FORMAT_NONE) {
_vk_t_toggle = false;
- } else {
- _vk_t_toggle = true;
- }
while (1) {
hitarea_stuff();