Skip to content

Commit

Permalink
TITANIC: DE: Add translations for loadSound calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Sep 20, 2017
1 parent 661487c commit 7a184f0
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 31 deletions.
5 changes: 3 additions & 2 deletions engines/titanic/game/end_credits.cpp
Expand Up @@ -21,6 +21,7 @@
*/

#include "titanic/game/end_credits.h"
#include "titanic/translation.h"

namespace Titanic {

Expand All @@ -47,8 +48,8 @@ bool CEndCredits::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
stopGlobalSound(true, -1);
_flag = false;
} else {
loadSound("z#41.wav");
playGlobalSound("z#41.wav", VOL_NORMAL, false, false, 0);
loadSound(TRANSLATE("z#41.wav", "z#573.wav"));
playGlobalSound(TRANSLATE("z#41.wav", "z#573.wav"), VOL_NORMAL, false, false, 0);
_flag = true;
}

Expand Down
13 changes: 7 additions & 6 deletions engines/titanic/game/end_explode_ship.cpp
Expand Up @@ -21,6 +21,7 @@
*/

#include "titanic/game/end_explode_ship.h"
#include "titanic/translation.h"

namespace Titanic {

Expand Down Expand Up @@ -53,9 +54,9 @@ bool CEndExplodeShip::ActMsg(CActMsg *msg) {
} else if (msg->_action == "Disarm Bomb") {
_isExploding = false;
} else if (msg->_action == "TakeOff") {
loadSound("a#31.wav");
loadSound("a#14.wav");
playGlobalSound("a#13.wav", VOL_NORMAL, true, true, 0);
loadSound(TRANSLATE("a#31.wav", "a#26.wav"));
loadSound(TRANSLATE("a#14.wav", "a#7.wav"));
playGlobalSound(TRANSLATE("a#13.wav", "a#6.wav"), VOL_NORMAL, true, true, 0);
addTimer(1, 10212, 0);
}

Expand Down Expand Up @@ -86,7 +87,7 @@ bool CEndExplodeShip::TimerMsg(CTimerMsg *msg) {

bool CEndExplodeShip::MovieEndMsg(CMovieEndMsg *msg) {
if (msg->_endFrame == 550) {
playSound("z#399.wav");
playSound(TRANSLATE("z#399.wav", "a#10.wav"));
startAnimTimer("Boom", 4200, 0);
} else {
addTimer(3, 8000, 0);
Expand All @@ -97,9 +98,9 @@ bool CEndExplodeShip::MovieEndMsg(CMovieEndMsg *msg) {

bool CEndExplodeShip::MovieFrameMsg(CMovieFrameMsg *msg) {
if (msg->_frameNumber == 58)
playSound("a#31.wav", 70);
playSound(TRANSLATE("a#31.wav", "a#26.wav"), 70);
else if (msg->_frameNumber == 551)
playSound("a#14.wav");
playSound(TRANSLATE("a#14.wav", "a#7.wav"));

return true;
}
Expand Down
9 changes: 6 additions & 3 deletions engines/titanic/game/sweet_bowl.cpp
Expand Up @@ -21,6 +21,7 @@
*/

#include "titanic/game/sweet_bowl.h"
#include "titanic/translation.h"

namespace Titanic {

Expand All @@ -47,16 +48,18 @@ bool CSweetBowl::MovieEndMsg(CMovieEndMsg *msg) {

bool CSweetBowl::EnterViewMsg(CEnterViewMsg *msg) {
setVisible(false);
loadSound("b#43.wav");
loadSound("b#42.wav");
loadSound(TRANSLATE("b#43.wav", "b#26.wav"));
loadSound(TRANSLATE("b#42.wav", "b#25.wav"));
return true;
}

bool CSweetBowl::ActMsg(CActMsg *msg) {
if (msg->_action == "Jiggle") {
setVisible(true);
playMovie(MOVIE_WAIT_FOR_FINISH | MOVIE_NOTIFY_OBJECT);
playSound(getRandomNumber(1) == 1 ? "b#42.wav" : "b#43.wav");
playSound(getRandomNumber(1) == 1 ?
TRANSLATE("b#42.wav", "b#25.wav") :
TRANSLATE("b#43.wav", "b#26.wav"));
}

petDisplayMessage(isEquals("BowlNutsRustler") ?
Expand Down
25 changes: 13 additions & 12 deletions engines/titanic/game/transport/lift.cpp
Expand Up @@ -24,6 +24,7 @@
#include "titanic/debugger.h"
#include "titanic/moves/multi_move.h"
#include "titanic/pet_control/pet_control.h"
#include "titanic/translation.h"

namespace Titanic {

Expand Down Expand Up @@ -241,27 +242,27 @@ bool CLift::EnterRoomMsg(CEnterRoomMsg *msg) {
CPetControl *pet = getPetControl();
int floorNum = pet->getRoomsFloorNum();
int elevNum = pet->getRoomsElevatorNum();
loadSound("z#520.wav");
loadSound("z#519.wav");
loadSound("z#518.wav");
loadSound(TRANSLATE("z#520.wav", "z#259.wav"));
loadSound(TRANSLATE("z#519.wav", "z#258.wav"));
loadSound(TRANSLATE("z#518.wav", "z#257.wav"));

if (elevNum == 4 && _hasHead && !_hasCorrectHead) {
CVisibleMsg visibleMsg;
visibleMsg.execute("GetLiftEye");
}

if (floorNum < 20) {
playGlobalSound("z#520.wav", VOL_QUIET, true, true, 0);
playGlobalSound("z#519.wav", VOL_MUTE, false, true, 1);
playGlobalSound("z#518.wav", VOL_MUTE, false, true, 2);
playGlobalSound(TRANSLATE("z#520.wav", "z#259.wav"), VOL_QUIET, true, true, 0);
playGlobalSound(TRANSLATE("z#519.wav", "z#258.wav"), VOL_MUTE, false, true, 1);
playGlobalSound(TRANSLATE("z#518.wav", "z#257.wav"), VOL_MUTE, false, true, 2);
} else if (floorNum < 28) {
playGlobalSound("z#520.wav", VOL_MUTE, false, true, 0);
playGlobalSound("z#519.wav", VOL_QUIET, true, true, 1);
playGlobalSound("z#518.wav", VOL_MUTE, false, true, 2);
playGlobalSound(TRANSLATE("z#520.wav", "z#259.wav"), VOL_MUTE, false, true, 0);
playGlobalSound(TRANSLATE("z#519.wav", "z#258.wav"), VOL_QUIET, true, true, 1);
playGlobalSound(TRANSLATE("z#518.wav", "z#257.wav"), VOL_MUTE, false, true, 2);
} else {
playGlobalSound("z#520.wav", VOL_MUTE, false, true, 0);
playGlobalSound("z#519.wav", VOL_MUTE, false, true, 1);
playGlobalSound("z#518.wav", VOL_QUIET, true, true, 2);
playGlobalSound(TRANSLATE("z#520.wav", "z#259.wav"), VOL_MUTE, false, true, 0);
playGlobalSound(TRANSLATE("z#519.wav", "z#258.wav"), VOL_MUTE, false, true, 1);
playGlobalSound(TRANSLATE("z#518.wav", "z#257.wav"), VOL_QUIET, true, true, 2);
}
}

Expand Down
17 changes: 9 additions & 8 deletions engines/titanic/sound/seasonal_music_player.cpp
Expand Up @@ -21,6 +21,7 @@
*/

#include "titanic/sound/seasonal_music_player.h"
#include "titanic/translation.h"

namespace Titanic {

Expand Down Expand Up @@ -119,14 +120,14 @@ bool CSeasonalMusicPlayer::ChangeMusicMsg(CChangeMusicMsg *msg) {

if (!_isRepeated && msg->_flags == 2) {
_isRepeated = true;
loadSound("c#64.wav");
loadSound("c#63.wav");
loadSound("c#65.wav");
loadSound("c#62.wav");
playGlobalSound("c#64.wav", _springMode, _isSpring, true, 0);
playGlobalSound("c#63.wav", _summerMode, _isSummer, true, 1);
playGlobalSound("c#65.wav", _autumnMode, _isAutumn, true, 2);
playGlobalSound("c#62.wav", _winterMode, _isWinter, true, 3);
loadSound(TRANSLATE("c#64.wav", "c#47.wav"));
loadSound(TRANSLATE("c#63.wav", "c#46.wav"));
loadSound(TRANSLATE("c#65.wav", "c#48.wav"));
loadSound(TRANSLATE("c#62.wav", "c#47.wav"));
playGlobalSound(TRANSLATE("c#64.wav", "c#47.wav"), _springMode, _isSpring, true, 0);
playGlobalSound(TRANSLATE("c#63.wav", "c#46.wav"), _summerMode, _isSummer, true, 1);
playGlobalSound(TRANSLATE("c#65.wav", "c#48.wav"), _autumnMode, _isAutumn, true, 2);
playGlobalSound(TRANSLATE("c#62.wav", "c#47.wav"), _winterMode, _isWinter, true, 3);
}

return true;
Expand Down

0 comments on commit 7a184f0

Please sign in to comment.