aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/sequences_v1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/sequences_v1.cpp')
-rw-r--r--engines/kyra/sequences_v1.cpp78
1 files changed, 14 insertions, 64 deletions
diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp
index 541393889f..5a6d2bf04d 100644
--- a/engines/kyra/sequences_v1.cpp
+++ b/engines/kyra/sequences_v1.cpp
@@ -363,18 +363,8 @@ void KyraEngine::seq_brandonHealing2() {
freeShapes123();
_screen->showMouse();
assert(_poisonGone);
- if (speechEnabled()) {
- snd_voiceWaitForFinish();
- snd_playVoiceFile(2010);
- }
- if (textEnabled())
- characterSays(_poisonGone[0], 0, -2);
- if (speechEnabled()) {
- snd_voiceWaitForFinish();
- snd_playVoiceFile(2011);
- }
- if (textEnabled())
- characterSays(_poisonGone[1], 0, -2);
+ characterSays(2010, _poisonGone[0], 0, -2);
+ characterSays(2011, _poisonGone[1], 0, -2);
}
void KyraEngine::seq_poisonDeathNow(int now) {
@@ -387,34 +377,14 @@ void KyraEngine::seq_poisonDeathNow(int now) {
if (_poisonDeathCounter >= 2) {
snd_playWanderScoreViaMap(1, 1);
assert(_thePoison);
- if (speechEnabled()) {
- snd_voiceWaitForFinish();
- snd_playVoiceFile(7000);
- }
- if (textEnabled())
- characterSays(_thePoison[0], 0, -2);
- if (speechEnabled()) {
- snd_voiceWaitForFinish();
- snd_playVoiceFile(7001);
- }
- if (textEnabled())
- characterSays(_thePoison[1], 0, -2);
+ characterSays(7000, _thePoison[0], 0, -2);
+ characterSays(7001, _thePoison[1], 0, -2);
seq_poisonDeathNowAnim();
_deathHandler = 3;
} else {
assert(_thePoison);
- if (speechEnabled()) {
- snd_voiceWaitForFinish();
- snd_playVoiceFile(7002);
- }
- if (textEnabled())
- characterSays(_thePoison[2], 0, -2);
- if (speechEnabled()) {
- snd_voiceWaitForFinish();
- snd_playVoiceFile(7004);
- }
- if (textEnabled())
- characterSays(_thePoison[3], 0, -2);
+ characterSays(7002, _thePoison[2], 0, -2);
+ characterSays(7004, _thePoison[3], 0, -2);
}
}
@@ -506,20 +476,10 @@ void KyraEngine::seq_playFluteAnimation() {
if (soundType == 1) {
assert(_fluteString);
- if (speechEnabled()) {
- snd_voiceWaitForFinish();
- snd_playVoiceFile(1000);
- }
- if (textEnabled())
- characterSays(_fluteString[0], 0, -2);
+ characterSays(1000, _fluteString[0], 0, -2);
} else if (soundType == 2) {
assert(_fluteString);
- if (speechEnabled()) {
- snd_voiceWaitForFinish();
- snd_playVoiceFile(1001);
- }
- if (textEnabled())
- characterSays(_fluteString[1], 0, -2);
+ characterSays(1001, _fluteString[1], 0, -2);
}
}
@@ -790,12 +750,7 @@ void KyraEngine::seq_fillFlaskWithWater(int item, int type) {
if (item >= 60 && item <= 77) {
assert(_flaskFull);
- if (speechEnabled()) {
- snd_voiceWaitForFinish();
- snd_playVoiceFile(8006);
- }
- if (textEnabled())
- characterSays(_flaskFull[0], 0, -2);
+ characterSays(8006, _flaskFull[0], 0, -2);
} else if (item == 78) {
assert(type >= 0 && type < ARRAYSIZE(flaskTable1));
newItem = flaskTable1[type];
@@ -813,16 +768,11 @@ void KyraEngine::seq_fillFlaskWithWater(int item, int type) {
_itemInHand = newItem;
assert(_fullFlask);
assert(type < _fullFlask_Size && type >= 0);
- if (speechEnabled()) {
- snd_voiceWaitForFinish();
- static const uint16 voiceEntries[] = {
- 0x1F40, 0x1F41, 0x1F42, 0x1F45
- };
- assert(type < ARRAYSIZE(voiceEntries));
- snd_playVoiceFile(voiceEntries[type]);
- }
- if (textEnabled())
- characterSays(_fullFlask[type], 0, -2);
+ static const uint16 voiceEntries[] = {
+ 0x1F40, 0x1F41, 0x1F42, 0x1F45
+ };
+ assert(type < ARRAYSIZE(voiceEntries));
+ characterSays(voiceEntries[type], _fullFlask[type], 0, -2);
}
void KyraEngine::seq_playDrinkPotionAnim(int item, int unk2, int flags) {