aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2017-10-13 18:03:30 -0400
committerPaul Gilbert2017-10-13 18:03:30 -0400
commitc339e3261d84526e721d60d656cefeb0a27a9af9 (patch)
tree58d13333b6093814b5800e56111f2bba601ea058 /engines/titanic
parent1d8ccbe1eae59811c90d5a6a22870e97272e178d (diff)
downloadscummvm-rg350-c339e3261d84526e721d60d656cefeb0a27a9af9.tar.gz
scummvm-rg350-c339e3261d84526e721d60d656cefeb0a27a9af9.tar.bz2
scummvm-rg350-c339e3261d84526e721d60d656cefeb0a27a9af9.zip
TITANIC: Renamed GlobalSound methods to AmbientSound
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/core/game_object.cpp8
-rw-r--r--engines/titanic/core/game_object.h16
-rw-r--r--engines/titanic/game/credits.cpp6
-rw-r--r--engines/titanic/game/end_credit_text.cpp4
-rw-r--r--engines/titanic/game/end_credits.cpp4
-rw-r--r--engines/titanic/game/end_explode_ship.cpp4
-rw-r--r--engines/titanic/game/end_sequence_control.cpp4
-rw-r--r--engines/titanic/game/phonograph.cpp6
-rw-r--r--engines/titanic/game/transport/lift.cpp36
-rw-r--r--engines/titanic/game/transport/pellerator.cpp6
-rw-r--r--engines/titanic/sound/auto_music_player_base.cpp10
-rw-r--r--engines/titanic/sound/seasonal_music_player.cpp26
12 files changed, 65 insertions, 65 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index b6923c27a4..af34526329 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -465,7 +465,7 @@ bool CGameObject::isSoundActive(int handle) const {
return false;
}
-void CGameObject::playGlobalSound(const CString &resName, VolumeMode mode, bool initialMute, bool repeated,
+void CGameObject::playAmbientSound(const CString &resName, VolumeMode mode, bool initialMute, bool repeated,
int handleIndex, Audio::Mixer::SoundType soundType) {
if (handleIndex < 0 || handleIndex > 3)
return;
@@ -524,7 +524,7 @@ void CGameObject::setSoundVolume(int handle, uint percent, uint seconds) {
}
}
-void CGameObject::stopGlobalSound(bool transition, int handleIndex) {
+void CGameObject::stopAmbientSound(bool transition, int handleIndex) {
CGameManager *gameManager = getGameManager();
if (!gameManager)
return;
@@ -550,7 +550,7 @@ void CGameObject::stopGlobalSound(bool transition, int handleIndex) {
}
}
-void CGameObject::setGlobalSoundVolume(VolumeMode mode, uint seconds, int handleIndex) {
+void CGameObject::setAmbientSoundVolume(VolumeMode mode, uint seconds, int handleIndex) {
CGameManager *gameManager = getGameManager();
if (!gameManager)
return;
@@ -559,7 +559,7 @@ void CGameObject::setGlobalSoundVolume(VolumeMode mode, uint seconds, int handle
if (handleIndex == -1) {
// Iterate through calling the method for each handle
for (int idx = 0; idx < 3; ++idx)
- setGlobalSoundVolume(mode, seconds, idx);
+ setAmbientSoundVolume(mode, seconds, idx);
} else if (handleIndex >= 0 && handleIndex <= 3 && _soundHandles[handleIndex] != -1) {
uint newVolume = sound._soundManager.getModeVolume(mode);
sound.setVolume(_soundHandles[handleIndex], newVolume, seconds);
diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h
index b592806977..f699d3a66a 100644
--- a/engines/titanic/core/game_object.h
+++ b/engines/titanic/core/game_object.h
@@ -254,7 +254,7 @@ protected:
void setSoundVolume(int handle, uint percent, uint seconds);
/**
- * Plays a sound, and saves it's handle in the global sound handles list
+ * Plays an ambient sound, and saves it's handle in the ambient sound handles list
* @param resName Filename of sound to play
* @param mode Volume mode level
* @param initialMute If set, sound transitions in from mute over 2 seconds
@@ -262,23 +262,23 @@ protected:
* @param handleIndex Slot 0 to 3 in the shared sound handle list to store the sound's handle
* @param soundType Specifies whether the sound is a sound effect or music
*/
- void playGlobalSound(const CString &resName, VolumeMode mode, bool initialMute, bool repeated,
+ void playAmbientSound(const CString &resName, VolumeMode mode, bool initialMute, bool repeated,
int handleIndex, Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType);
/**
- * Stops a sound saved in the global sound handle list
+ * Stops playing an ambient sound
* @param transition If set, the sound transitions to silent before stopping
- * @param handleIndex Index of sound to stop. If -1, all global sounds are stopped
+ * @param handleIndex Index of sound to stop. If -1, all ambient sounds are stopped
*/
- void stopGlobalSound(bool transition, int handleIndex);
+ void stopAmbientSound(bool transition, int handleIndex);
/**
- * Updates the volume for a global sound based on the specified mode's volume
+ * Updates the volume for an ambient sound based on the specified mode's volume
* @param mode Volume level mode
* @param seconds Number of seconds to transition to new volume
- * @param handleIndex Index of global sound to update. If -1, all global sounds are updated
+ * @param handleIndex Index of ambient sound to update. If -1, all ambient sounds are updated
*/
- void setGlobalSoundVolume(VolumeMode mode, uint seconds, int handleIndex);
+ void setAmbientSoundVolume(VolumeMode mode, uint seconds, int handleIndex);
/**
* Stops sound channel 3 or 0
diff --git a/engines/titanic/game/credits.cpp b/engines/titanic/game/credits.cpp
index ddb44f127c..016245dbb0 100644
--- a/engines/titanic/game/credits.cpp
+++ b/engines/titanic/game/credits.cpp
@@ -57,13 +57,13 @@ bool CCredits::SignalObject(CSignalObject *msg) {
}
bool CCredits::TimerMsg(CTimerMsg *msg) {
- stopGlobalSound(true, -1);
+ stopAmbientSound(true, -1);
setVisible(true);
loadSound(TRANSLATE("a#16.wav", "a#11.wav"));
loadSound(TRANSLATE("a#24.wav", "a#19.wav"));
if (playCutscene(0, 18)) {
- playGlobalSound(TRANSLATE("a#16.wav", "a#11.wav"), VOL_NORMAL, false, false, 0);
+ playAmbientSound(TRANSLATE("a#16.wav", "a#11.wav"), VOL_NORMAL, false, false, 0);
if (playCutscene(19, 642)) {
playSound(TRANSLATE("a#24.wav", "a#19.wav"));
playCutscene(643, 750);
@@ -77,7 +77,7 @@ bool CCredits::TimerMsg(CTimerMsg *msg) {
setVisible(false);
petShow();
enableMouse();
- stopGlobalSound(true, -1);
+ stopAmbientSound(true, -1);
return true;
}
diff --git a/engines/titanic/game/end_credit_text.cpp b/engines/titanic/game/end_credit_text.cpp
index 8809799a27..2392f9d321 100644
--- a/engines/titanic/game/end_credit_text.cpp
+++ b/engines/titanic/game/end_credit_text.cpp
@@ -44,7 +44,7 @@ void CEndCreditText::load(SimpleFile *file) {
}
bool CEndCreditText::ActMsg(CActMsg *msg) {
- playGlobalSound(TRANSLATE("z#41.wav", "z#573.wav"), VOL_NORMAL, false, false, 0);
+ playAmbientSound(TRANSLATE("z#41.wav", "z#573.wav"), VOL_NORMAL, false, false, 0);
createCredits();
_flag = true;
return true;
@@ -64,7 +64,7 @@ bool CEndCreditText::FrameMsg(CFrameMsg *msg) {
}
bool CEndCreditText::TimerMsg(CTimerMsg *msg) {
- setGlobalSoundVolume(VOL_MUTE, 2, -1);
+ setAmbientSoundVolume(VOL_MUTE, 2, -1);
sleep(1000);
quitGame();
return true;
diff --git a/engines/titanic/game/end_credits.cpp b/engines/titanic/game/end_credits.cpp
index 4ea54a3b76..84ac020a2c 100644
--- a/engines/titanic/game/end_credits.cpp
+++ b/engines/titanic/game/end_credits.cpp
@@ -45,11 +45,11 @@ void CEndCredits::load(SimpleFile *file) {
bool CEndCredits::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
if (_flag) {
deinit();
- stopGlobalSound(true, -1);
+ stopAmbientSound(true, -1);
_flag = false;
} else {
loadSound(TRANSLATE("z#41.wav", "z#573.wav"));
- playGlobalSound(TRANSLATE("z#41.wav", "z#573.wav"), VOL_NORMAL, false, false, 0);
+ playAmbientSound(TRANSLATE("z#41.wav", "z#573.wav"), VOL_NORMAL, false, false, 0);
_flag = true;
}
diff --git a/engines/titanic/game/end_explode_ship.cpp b/engines/titanic/game/end_explode_ship.cpp
index 5f90604fd7..5ad046b5ad 100644
--- a/engines/titanic/game/end_explode_ship.cpp
+++ b/engines/titanic/game/end_explode_ship.cpp
@@ -56,7 +56,7 @@ bool CEndExplodeShip::ActMsg(CActMsg *msg) {
} else if (msg->_action == "TakeOff") {
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);
+ playAmbientSound(TRANSLATE("a#13.wav", "a#6.wav"), VOL_NORMAL, true, true, 0);
addTimer(1, 10212, 0);
}
@@ -72,7 +72,7 @@ bool CEndExplodeShip::TimerMsg(CTimerMsg *msg) {
}
if (msg->_actionVal == 3) {
- setGlobalSoundVolume(VOL_MUTE, 2, -1);
+ setAmbientSoundVolume(VOL_MUTE, 2, -1);
CActMsg actMsg(_isExploding ? "ExplodeCredits" : "Credits");
actMsg.execute("EndGameCredits");
}
diff --git a/engines/titanic/game/end_sequence_control.cpp b/engines/titanic/game/end_sequence_control.cpp
index e8bc04aa85..a7abf01da0 100644
--- a/engines/titanic/game/end_sequence_control.cpp
+++ b/engines/titanic/game/end_sequence_control.cpp
@@ -62,7 +62,7 @@ bool CEndSequenceControl::TimerMsg(CTimerMsg *msg) {
}
bool CEndSequenceControl::MovieEndMsg(CMovieEndMsg *msg) {
- setGlobalSoundVolume(VOL_MUTE, 2, -1);
+ setAmbientSoundVolume(VOL_MUTE, 2, -1);
changeView("TheEnd.Node 3.N");
addTimer(2, 1000, 0);
return true;
@@ -72,7 +72,7 @@ bool CEndSequenceControl::EnterRoomMsg(CEnterRoomMsg *msg) {
petHide();
disableMouse();
addTimer(1, 1000, 0);
- playGlobalSound(TRANSLATE("a#15.wav", "a#8.wav"), VOL_NORMAL, true, true, 0, Audio::Mixer::kSpeechSoundType);
+ playAmbientSound(TRANSLATE("a#15.wav", "a#8.wav"), VOL_NORMAL, true, true, 0, Audio::Mixer::kSpeechSoundType);
return true;
}
diff --git a/engines/titanic/game/phonograph.cpp b/engines/titanic/game/phonograph.cpp
index 71fd42861a..71b3df768b 100644
--- a/engines/titanic/game/phonograph.cpp
+++ b/engines/titanic/game/phonograph.cpp
@@ -83,8 +83,8 @@ bool CPhonograph::PhonographPlayMsg(CPhonographPlayMsg *msg) {
_isPlaying = true;
msg->_value = 1;
} else {
- stopGlobalSound(false, -1);
- playGlobalSound(cylinderMsg._name, VOL_QUIET, true, true, 0);
+ stopAmbientSound(false, -1);
+ playAmbientSound(cylinderMsg._name, VOL_QUIET, true, true, 0);
_isPlaying = true;
msg->_value = 1;
}
@@ -107,7 +107,7 @@ bool CPhonograph::PhonographStopMsg(CPhonographStopMsg *msg) {
CStopMusicMsg stopMsg;
stopMsg.execute(this);
} else {
- stopGlobalSound(msg->_leavingRoom, -1);
+ stopAmbientSound(msg->_leavingRoom, -1);
}
msg->_cylinderPresent = true;
}
diff --git a/engines/titanic/game/transport/lift.cpp b/engines/titanic/game/transport/lift.cpp
index 568e5becaf..95a4a8ebb9 100644
--- a/engines/titanic/game/transport/lift.cpp
+++ b/engines/titanic/game/transport/lift.cpp
@@ -190,23 +190,23 @@ bool CLift::StatusChangeMsg(CStatusChangeMsg *msg) {
bool CLift::MovieEndMsg(CMovieEndMsg *msg) {
switch (msg->_endFrame) {
case 108:
- setGlobalSoundVolume(VOL_MUTE, 1, 0);
- setGlobalSoundVolume(VOL_QUIET, 1, 1);
+ setAmbientSoundVolume(VOL_MUTE, 1, 0);
+ setAmbientSoundVolume(VOL_QUIET, 1, 1);
break;
case 190:
- setGlobalSoundVolume(VOL_MUTE, 1, 1);
- setGlobalSoundVolume(VOL_QUIET, 1, 2);
+ setAmbientSoundVolume(VOL_MUTE, 1, 1);
+ setAmbientSoundVolume(VOL_QUIET, 1, 2);
break;
case 407:
- setGlobalSoundVolume(VOL_MUTE, 1, 2);
- setGlobalSoundVolume(VOL_QUIET, 1, 1);
+ setAmbientSoundVolume(VOL_MUTE, 1, 2);
+ setAmbientSoundVolume(VOL_QUIET, 1, 1);
break;
case 489:
- setGlobalSoundVolume(VOL_MUTE, 1, 1);
- setGlobalSoundVolume(VOL_QUIET, 1, 0);
+ setAmbientSoundVolume(VOL_MUTE, 1, 1);
+ setAmbientSoundVolume(VOL_QUIET, 1, 0);
break;
default: {
@@ -252,17 +252,17 @@ bool CLift::EnterRoomMsg(CEnterRoomMsg *msg) {
}
if (floorNum < 20) {
- 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);
+ playAmbientSound(TRANSLATE("z#520.wav", "z#259.wav"), VOL_QUIET, true, true, 0);
+ playAmbientSound(TRANSLATE("z#519.wav", "z#258.wav"), VOL_MUTE, false, true, 1);
+ playAmbientSound(TRANSLATE("z#518.wav", "z#257.wav"), VOL_MUTE, false, true, 2);
} else if (floorNum < 28) {
- 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);
+ playAmbientSound(TRANSLATE("z#520.wav", "z#259.wav"), VOL_MUTE, false, true, 0);
+ playAmbientSound(TRANSLATE("z#519.wav", "z#258.wav"), VOL_QUIET, true, true, 1);
+ playAmbientSound(TRANSLATE("z#518.wav", "z#257.wav"), VOL_MUTE, false, true, 2);
} else {
- 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);
+ playAmbientSound(TRANSLATE("z#520.wav", "z#259.wav"), VOL_MUTE, false, true, 0);
+ playAmbientSound(TRANSLATE("z#519.wav", "z#258.wav"), VOL_MUTE, false, true, 1);
+ playAmbientSound(TRANSLATE("z#518.wav", "z#257.wav"), VOL_QUIET, true, true, 2);
}
}
@@ -270,7 +270,7 @@ bool CLift::EnterRoomMsg(CEnterRoomMsg *msg) {
}
bool CLift::LeaveRoomMsg(CLeaveRoomMsg *msg) {
- stopGlobalSound(true, -1);
+ stopAmbientSound(true, -1);
CPetControl *pet = getPetControl();
if (pet->getRoomsElevatorNum() == 4 && _hasHead && !_hasCorrectHead) {
diff --git a/engines/titanic/game/transport/pellerator.cpp b/engines/titanic/game/transport/pellerator.cpp
index 64d0fadfe5..55f701f0f0 100644
--- a/engines/titanic/game/transport/pellerator.cpp
+++ b/engines/titanic/game/transport/pellerator.cpp
@@ -77,7 +77,7 @@ bool CPellerator::StatusChangeMsg(CStatusChangeMsg *msg) {
} else if (classNum == 3 || (msg->_newStatus > 4 && classNum != 1)) {
petDisplayMessage(1, CLASS_NOT_ALLOWED_AT_DEST);
} else if (newDest > _destination) {
- playGlobalSound(TRANSLATE("z#74.wav", "z#605.wav"), VOL_QUIET, true, true, 0);
+ playAmbientSound(TRANSLATE("z#74.wav", "z#605.wav"), VOL_QUIET, true, true, 0);
CString name = getName();
changeView(name == "PelleratorObject2" ?
@@ -180,7 +180,7 @@ bool CPellerator::StatusChangeMsg(CStatusChangeMsg *msg) {
playMovie(264, 264, MOVIE_NOTIFY_OBJECT);
_destination = newDest;
} else if (newDest < _destination) {
- playGlobalSound(TRANSLATE("z#74.wav", "z#605.wav"), VOL_QUIET, true, true, 0);
+ playAmbientSound(TRANSLATE("z#74.wav", "z#605.wav"), VOL_QUIET, true, true, 0);
CString name = getName();
changeView(name == "PelleratorObject2" ?
@@ -341,7 +341,7 @@ bool CPellerator::EnterRoomMsg(CEnterRoomMsg *msg) {
bool CPellerator::MovieEndMsg(CMovieEndMsg *msg) {
setVisible(false);
- stopGlobalSound(true, -1);
+ stopAmbientSound(true, -1);
switch (_destination) {
case 0:
diff --git a/engines/titanic/sound/auto_music_player_base.cpp b/engines/titanic/sound/auto_music_player_base.cpp
index 968344a5b5..3737782c44 100644
--- a/engines/titanic/sound/auto_music_player_base.cpp
+++ b/engines/titanic/sound/auto_music_player_base.cpp
@@ -70,7 +70,7 @@ bool CAutoMusicPlayerBase::TimerMsg(CTimerMsg *msg) {
bool CAutoMusicPlayerBase::LoadSuccessMsg(CLoadSuccessMsg *msg) {
if (_isEnabled)
- playGlobalSound(_filename, _volumeMode, _initialMute, true, 0,
+ playAmbientSound(_filename, _volumeMode, _initialMute, true, 0,
Audio::Mixer::kMusicSoundType);
return true;
@@ -79,22 +79,22 @@ bool CAutoMusicPlayerBase::LoadSuccessMsg(CLoadSuccessMsg *msg) {
bool CAutoMusicPlayerBase::ChangeMusicMsg(CChangeMusicMsg *msg) {
if (_isEnabled && msg->_action == MUSIC_STOP) {
_isEnabled = false;
- stopGlobalSound(_transition, -1);
+ stopAmbientSound(_transition, -1);
}
if (!msg->_filename.empty()) {
_filename = msg->_filename;
if (_isEnabled) {
- stopGlobalSound(_transition, -1);
- playGlobalSound(_filename, _volumeMode, _initialMute, true, 0,
+ stopAmbientSound(_transition, -1);
+ playAmbientSound(_filename, _volumeMode, _initialMute, true, 0,
Audio::Mixer::kMusicSoundType);
}
}
if (!_isEnabled && msg->_action == MUSIC_START) {
_isEnabled = true;
- playGlobalSound(_filename, _volumeMode, _initialMute, true, 0,
+ playAmbientSound(_filename, _volumeMode, _initialMute, true, 0,
Audio::Mixer::kMusicSoundType);
}
diff --git a/engines/titanic/sound/seasonal_music_player.cpp b/engines/titanic/sound/seasonal_music_player.cpp
index ff5e4809f8..92603773ea 100644
--- a/engines/titanic/sound/seasonal_music_player.cpp
+++ b/engines/titanic/sound/seasonal_music_player.cpp
@@ -99,22 +99,22 @@ bool CSeasonalMusicPlayer::ArboretumGateMsg(CArboretumGateMsg *msg) {
bool CSeasonalMusicPlayer::ChangeMusicMsg(CChangeMusicMsg *msg) {
if (_isEnabled && msg->_action == MUSIC_STOP) {
_isEnabled = false;
- stopGlobalSound(_transition, -1);
+ stopAmbientSound(_transition, -1);
}
if (!msg->_filename.empty()) {
if (_isSummer) {
- setGlobalSoundVolume(VOL_MUTE, 2, 0);
- setGlobalSoundVolume(VOL_QUIET, 2, 1);
+ setAmbientSoundVolume(VOL_MUTE, 2, 0);
+ setAmbientSoundVolume(VOL_QUIET, 2, 1);
} else if (_isAutumn) {
- setGlobalSoundVolume(VOL_MUTE, 2, 1);
- setGlobalSoundVolume(VOL_QUIET, 2, 2);
+ setAmbientSoundVolume(VOL_MUTE, 2, 1);
+ setAmbientSoundVolume(VOL_QUIET, 2, 2);
} else if (_isWinter) {
- setGlobalSoundVolume(VOL_MUTE, 2, 2);
- setGlobalSoundVolume(VOL_QUIET, 2, 3);
+ setAmbientSoundVolume(VOL_MUTE, 2, 2);
+ setAmbientSoundVolume(VOL_QUIET, 2, 3);
} else if (_isSpring) {
- setGlobalSoundVolume(VOL_MUTE, 2, 3);
- setGlobalSoundVolume(VOL_QUIET, 2, 0);
+ setAmbientSoundVolume(VOL_MUTE, 2, 3);
+ setAmbientSoundVolume(VOL_QUIET, 2, 0);
}
}
@@ -124,10 +124,10 @@ bool CSeasonalMusicPlayer::ChangeMusicMsg(CChangeMusicMsg *msg) {
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);
+ playAmbientSound(TRANSLATE("c#64.wav", "c#47.wav"), _springMode, _isSpring, true, 0);
+ playAmbientSound(TRANSLATE("c#63.wav", "c#46.wav"), _summerMode, _isSummer, true, 1);
+ playAmbientSound(TRANSLATE("c#65.wav", "c#48.wav"), _autumnMode, _isAutumn, true, 2);
+ playAmbientSound(TRANSLATE("c#62.wav", "c#47.wav"), _winterMode, _isWinter, true, 3);
}
return true;