aboutsummaryrefslogtreecommitdiff
path: root/engines/simon/items.cpp
diff options
context:
space:
mode:
authorTravis Howell2006-04-15 23:23:55 +0000
committerTravis Howell2006-04-15 23:23:55 +0000
commite83841e8c790cf79341ab95fa793613e898b16d1 (patch)
tree0234e06ad268faa30b84acab4fc8989959d0ca47 /engines/simon/items.cpp
parent5b388fc48e8293dd4d6bb30538c00c3051f87164 (diff)
downloadscummvm-rg350-e83841e8c790cf79341ab95fa793613e898b16d1.tar.gz
scummvm-rg350-e83841e8c790cf79341ab95fa793613e898b16d1.tar.bz2
scummvm-rg350-e83841e8c790cf79341ab95fa793613e898b16d1.zip
Fix speech id for o_screenTextMsg() in FF
svn-id: r21927
Diffstat (limited to 'engines/simon/items.cpp')
-rw-r--r--engines/simon/items.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/engines/simon/items.cpp b/engines/simon/items.cpp
index 648d5b2fc2..e4437e8a55 100644
--- a/engines/simon/items.cpp
+++ b/engines/simon/items.cpp
@@ -1285,25 +1285,29 @@ void SimonEngine::o_screenTextMsg() {
uint color = getVarOrByte();
uint stringId = getNextStringID();
const byte *string_ptr = NULL;
- uint speech_id = 0;
+ uint speechId = 0;
TextLocation *tl;
if (stringId != 0xFFFF)
string_ptr = getStringPtrByID(stringId);
- if (getFeatures() & GF_TALKIE)
- speech_id = (uint16)getNextWord();
+ if (getFeatures() & GF_TALKIE) {
+ if (getGameType() == GType_FF)
+ speechId = (uint16)getVarOrWord();
+ else
+ speechId = (uint16)getNextWord();
+ }
if (getGameType() == GType_FF)
vgaSpriteId = 1;
tl = getTextLocation(vgaSpriteId);
- if (_speech && speech_id != 0)
- playSpeech(speech_id, vgaSpriteId);
- if ((getGameType() == GType_SIMON2) && (getFeatures() & GF_TALKIE) && speech_id == 0)
+ if (_speech && speechId != 0)
+ playSpeech(speechId, vgaSpriteId);
+ if ((getGameType() == GType_SIMON2) && (getFeatures() & GF_TALKIE) && speechId == 0)
kill_sprite_simon2(2, vgaSpriteId + 2);
- if (string_ptr != NULL && (speech_id == 0 || _subtitles))
+ if (string_ptr != NULL && (speechId == 0 || _subtitles))
printScreenText(vgaSpriteId, color, (const char *)string_ptr, tl->x, tl->y, tl->width);
}