From 31c9cca0fd8a4dea793e6b3bf3fd27abd6be934d Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 18 Sep 2017 20:53:49 -0400 Subject: TITANIC: DE: Fix ship announcements --- engines/titanic/game/announce.cpp | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) (limited to 'engines') diff --git a/engines/titanic/game/announce.cpp b/engines/titanic/game/announce.cpp index 6e43b9c22f..19a5477dcb 100644 --- a/engines/titanic/game/announce.cpp +++ b/engines/titanic/game/announce.cpp @@ -21,6 +21,7 @@ */ #include "titanic/game/announce.h" +#include "titanic/translation.h" namespace Titanic { @@ -59,13 +60,13 @@ bool CAnnounce::TimerMsg(CTimerMsg *msg) { if (msg->_actionVal == 1) { CString numStr = "0"; - CString waveNames1[18] = { + const char *const WAVE_NAMES1_EN[18] = { "z#181.wav", "z#211.wav", "z#203.wav", "z#202.wav", "z#201.wav", "z#200.wav", "z#199.wav", "z#198.wav", "z#197.wav", "z#196.wav", "z#210.wav", "z#209.wav", "z#208.wav", "z#207.wav", "z#206.wav", "z#205.wav", "z#204.wav", "z#145.wav" }; - CString waveNames2[30] = { + const char *const WAVE_NAMES2_EN[30] = { "z#154.wav", "z#153.wav", "z#152.wav", "z#151.wav", "z#150.wav", "z#149.wav", "z#148.wav", "z#169.wav", "z#171.wav", "z#178.wav", "z#176.wav", "z#177.wav", "z#165.wav", "z#170.wav", "z#180.wav", @@ -73,6 +74,21 @@ bool CAnnounce::TimerMsg(CTimerMsg *msg) { "z#161.wav", "z#179.wav", "z#163.wav", "z#164.wav", "z#162.wav", "z#159.wav", "z#175.wav", "z#166.wav", "z#174.wav", "z#157.wav" }; + const char *const WAVE_NAMES1_DE[18] = { + "z#712.wav", "z#741.wav", "z#733.wav", "z#732.wav", "z#731.wav", + "z#730.wav", "z#729.wav", "z#728.wav", "z#727.wav", "z#726.wav", + "z#740.wav", "z#739.wav", "z#738.wav", "z#737.wav", "z#736.wav", + "z#735.wav", "z#734.wav", "z#701.wav" + }; + const char *const WAVE_NAMES2_DE[31] = { + "z#711.wav", "z#710.wav", "z#709.wav", "z#708.wav", "z#707.wav", + "z#706.wav", "z#705.wav", "z#704.wav", "z#688.wav", "z#690.wav", + "z#697.wav", "z#695.wav", "z#696.wav", "z#684.wav", "z#689.wav", + "z#699.wav", "z#675.wav", "z#691.wav", "z#692.wav", "z#679.wav", + "z#677.wav", "z#680.wav", "z#698.wav", "z#682.wav", "z#683.wav", + "z#681.wav", "z#678.wav", "z#694.wav", "z#685.wav", "z#693.wav", + "z#676.wav" + }; CProximity prox; prox._soundType = Audio::Mixer::kSpeechSoundType; @@ -81,21 +97,21 @@ bool CAnnounce::TimerMsg(CTimerMsg *msg) { switch (randVal) { case 0: case 1: - _soundHandle = playSound("z#189.wav", prox); + _soundHandle = playSound(TRANSLATE("z#189.wav", "z#719.wav"), prox); if (_nameIndex < 18) { - queueSound(waveNames1[_nameIndex], _soundHandle, 100, 0, false, - Audio::Mixer::kSpeechSoundType); + queueSound(TRANSLATE(WAVE_NAMES1_EN[_nameIndex], WAVE_NAMES1_DE[_nameIndex]), + _soundHandle, 100, 0, false, Audio::Mixer::kSpeechSoundType); ++_nameIndex; } else { - queueSound(waveNames1[getRandomNumber(17)], _soundHandle, - 100, 0, false, Audio::Mixer::kSpeechSoundType); + queueSound(TRANSLATE(WAVE_NAMES1_EN[getRandomNumber(17)], WAVE_NAMES1_DE[getRandomNumber(17)]), + _soundHandle, 100, 0, false, Audio::Mixer::kSpeechSoundType); } break; case 2: - _soundHandle = playSound("z#189.wav", prox); - queueSound(waveNames2[getRandomNumber(29)], _soundHandle, - 100, 0, false, Audio::Mixer::kSpeechSoundType); + _soundHandle = playSound(TRANSLATE("z#189.wav", "z#719.wav"), prox); + queueSound(TRANSLATE(WAVE_NAMES2_EN[getRandomNumber(29)], WAVE_NAMES2_DE[getRandomNumber(30)]), + _soundHandle, 100, 0, false, Audio::Mixer::kSpeechSoundType); break; default: -- cgit v1.2.3