aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2016-09-03 10:34:38 -0400
committerPaul Gilbert2016-09-03 10:34:38 -0400
commitc224d35a432fff7e1d0a6bf5368f7f2e81a45e27 (patch)
treec568bc54a2eaf5c0cbc69f76e1e771659690fd7c /engines
parent38cf75e885983b88d03272f35e39f5d874eae575 (diff)
downloadscummvm-rg350-c224d35a432fff7e1d0a6bf5368f7f2e81a45e27.tar.gz
scummvm-rg350-c224d35a432fff7e1d0a6bf5368f7f2e81a45e27.tar.bz2
scummvm-rg350-c224d35a432fff7e1d0a6bf5368f7f2e81a45e27.zip
TITANIC: Identified sound balance usage in the engine
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/carry/arm.cpp2
-rw-r--r--engines/titanic/carry/brain.cpp2
-rw-r--r--engines/titanic/carry/bridge_piece.cpp2
-rw-r--r--engines/titanic/carry/carry_parrot.cpp8
-rw-r--r--engines/titanic/core/game_object.cpp8
-rw-r--r--engines/titanic/core/game_object.h20
-rw-r--r--engines/titanic/game/computer.cpp16
-rw-r--r--engines/titanic/game/computer_screen.cpp2
-rw-r--r--engines/titanic/game/fan_noises.cpp20
-rw-r--r--engines/titanic/game/fan_noises.h2
-rw-r--r--engines/titanic/game/television.cpp4
-rw-r--r--engines/titanic/gfx/st_button.cpp2
-rw-r--r--engines/titanic/npcs/deskbot.cpp2
-rw-r--r--engines/titanic/sound/auto_sound_player.cpp8
-rw-r--r--engines/titanic/sound/auto_sound_player.h2
-rw-r--r--engines/titanic/sound/auto_sound_player_adsr.cpp8
-rw-r--r--engines/titanic/sound/gondolier_song.cpp4
-rw-r--r--engines/titanic/sound/proximity.cpp13
-rw-r--r--engines/titanic/sound/proximity.h9
-rw-r--r--engines/titanic/sound/sound_manager.cpp4
20 files changed, 70 insertions, 68 deletions
diff --git a/engines/titanic/carry/arm.cpp b/engines/titanic/carry/arm.cpp
index a67937ebdf..cbc14da477 100644
--- a/engines/titanic/carry/arm.cpp
+++ b/engines/titanic/carry/arm.cpp
@@ -161,7 +161,7 @@ bool CArm::MaitreDHappyMsg(CMaitreDHappyMsg *msg) {
CGameObject *petItem;
if (find(getName(), &petItem, FIND_PET)) {
if (!_field158)
- playSound("z#47.wav", 100, 0, 0);
+ playSound("z#47.wav");
if (_string6 == "Key" || _string6 == "AuditoryCentre") {
CGameObject *child = dynamic_cast<CGameObject *>(getFirstChild());
if (child) {
diff --git a/engines/titanic/carry/brain.cpp b/engines/titanic/carry/brain.cpp
index 102d8d9049..64b068697b 100644
--- a/engines/titanic/carry/brain.cpp
+++ b/engines/titanic/carry/brain.cpp
@@ -68,7 +68,7 @@ bool CBrain::UseWithOtherMsg(CUseWithOtherMsg *msg) {
petMoveToHiddenRoom();
CAddHeadPieceMsg headpieceMsg(getName());
headpieceMsg.execute(msg->_other);
- playSound("z#116.wav", 100, 0, 0);
+ playSound("z#116.wav");
setPosition(Point(0, 0));
setVisible(false);
_field134 = 1;
diff --git a/engines/titanic/carry/bridge_piece.cpp b/engines/titanic/carry/bridge_piece.cpp
index a2cb23add6..487ea32df6 100644
--- a/engines/titanic/carry/bridge_piece.cpp
+++ b/engines/titanic/carry/bridge_piece.cpp
@@ -60,7 +60,7 @@ bool CBridgePiece::UseWithOtherMsg(CUseWithOtherMsg *msg) {
return true;
} else {
setVisible(false);
- playSound("z#54.wav", 100, 0, 0);
+ playSound("z#54.wav");
setPosition(shipSetting->_pos1);
shipSetting->_itemName = getName();
petMoveToHiddenRoom();
diff --git a/engines/titanic/carry/carry_parrot.cpp b/engines/titanic/carry/carry_parrot.cpp
index 5e9a738e93..57d82af78a 100644
--- a/engines/titanic/carry/carry_parrot.cpp
+++ b/engines/titanic/carry/carry_parrot.cpp
@@ -124,7 +124,7 @@ bool CCarryParrot::MouseDragEndMsg(CMouseDragEndMsg *msg) {
setVisible(false);
_fieldE0 = 0;
CParrot::_v4 = 2;
- playSound("z#475.wav", 100, 0, 0);
+ playSound("z#475.wav");
sound8(true);
moveUnder(findRoom());
@@ -139,7 +139,7 @@ bool CCarryParrot::MouseDragEndMsg(CMouseDragEndMsg *msg) {
} else {
setVisible(false);
_fieldE0 = 0;
- playSound("z#475.wav", 100, 0, 0);
+ playSound("z#475.wav");
sound8(true);
moveUnder(findRoom());
}
@@ -171,7 +171,7 @@ bool CCarryParrot::PassOnDragStartMsg(CPassOnDragStartMsg *msg) {
startTalking(npc, 0x446BF);
_fieldE0 = 0;
- playSound("z#475.wav", 100, 0, 0);
+ playSound("z#475.wav");
moveUnder(findRoom());
msg->_value4 = 1;
@@ -208,7 +208,7 @@ bool CCarryParrot::ActMsg(CActMsg *msg) {
CActMsg actMsg("Shut");
actMsg.execute("ParrotCage");
} else {
- playSound("z#475.wav", 100, 0, 0);
+ playSound("z#475.wav");
if (!_feathersFlag) {
CCarry *feathers = dynamic_cast<CCarry *>(getRoot()->findByName("Feathers"));
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index 7848734792..edfce7f2ee 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -732,10 +732,10 @@ void CGameObject::loadSound(const CString &name) {
}
}
-int CGameObject::playSound(const CString &name, uint volume, int val3, bool repeated) {
+int CGameObject::playSound(const CString &name, uint volume, int balance, bool repeated) {
CProximity prox;
prox._channelVolume = volume;
- prox._fieldC = val3;
+ prox._balance = balance;
prox._repeated = repeated;
return playSound(name, prox);
}
@@ -758,9 +758,9 @@ int CGameObject::playSound(const CString &name, CProximity &prox) {
return 0;
}
-int CGameObject::queueSound(const CString &name, uint priorHandle, uint volume, int val3, bool repeated) {
+int CGameObject::queueSound(const CString &name, uint priorHandle, uint volume, int balance, bool repeated) {
CProximity prox;
- prox._fieldC = val3;
+ prox._balance = balance;
prox._repeated = repeated;
prox._channelVolume = volume;
prox._priorSoundHandle = priorHandle;
diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h
index d72fd94ac4..0da3fad605 100644
--- a/engines/titanic/core/game_object.h
+++ b/engines/titanic/core/game_object.h
@@ -189,24 +189,30 @@ protected:
/**
* Plays a sound
- * @param resName Filename of sound to play
+ * @param name Filename of sound to play
* @param volume Volume level
+ * @param balance Sound balance (not actually used in original)
+ * @param repeated If true, sound will repeat indefinitely
*/
- int playSound(const CString &name, uint volume = 100, int val3 = 0, bool repeated = false);
+ int playSound(const CString &name, uint volume = 100, int balance = 0, bool repeated = false);
/**
* Plays a sound
- * @param resName Filename of sound to play
+ * @param name Filename of sound to play
* @param prox Proximity object with the sound data
*/
int playSound(const CString &name, CProximity &prox);
/**
* Queues a sound to play after a specified one finishes
- * @param resName Filename of sound to play
- * @param volume Volume level
- */
- int queueSound(const CString &name, uint priorHandle, uint volume = 100, int val3 = 0, bool repeated = false);
+ * @param name Filename of sound to play
+ * @param priorHandle Sound to wait until finished before playing
+ * @param volume Volume level
+ * @param balance Sound balance (not actually used by original)
+ * @param repeated If true, sound will repeat indefinitely
+ */
+ int queueSound(const CString &name, uint priorHandle, uint volume = 100,
+ int balance = 0, bool repeated = false);
/**
* Stop a sound
diff --git a/engines/titanic/game/computer.cpp b/engines/titanic/game/computer.cpp
index 90574997b1..3077b46178 100644
--- a/engines/titanic/game/computer.cpp
+++ b/engines/titanic/game/computer.cpp
@@ -46,7 +46,7 @@ void CComputer::load(SimpleFile *file) {
bool CComputer::ActMsg(CActMsg *msg) {
if (_state) {
- playSound("a#35.wav", 100, 0, 0);
+ playSound("a#35.wav");
playMovie(32, 42, 0);
if (msg->_action == "CD1")
@@ -66,11 +66,11 @@ bool CComputer::ActMsg(CActMsg *msg) {
bool CComputer::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
if (_currentCD == "None") {
if (_state) {
- playSound("a#35.wav", 100, 0, 0);
+ playSound("a#35.wav");
playMovie(11, 21, 0);
_state = 0;
} else {
- playSound("a#34.wav", 100, 0, 0);
+ playSound("a#34.wav");
playMovie(0, 10, 0);
_state = 1;
}
@@ -81,7 +81,7 @@ bool CComputer::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
actMsg.execute(_currentCD);
_currentCD = "None";
} else {
- playSound("a#34.wav", 100, 0, 0);
+ playSound("a#34.wav");
playMovie(21, 31, 0);
_state = 1;
}
@@ -92,10 +92,10 @@ bool CComputer::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
bool CComputer::MovieEndMsg(CMovieEndMsg *msg) {
if (msg->_endFrame == 90) {
- playSound("a#32.wav", 100, 0, 0);
- playSound("a#33.wav", 100, 0, 0);
- playSound("a#31.wav", 100, 0, 0);
- playSound("a#0.wav", 100, 0, 0);
+ playSound("a#32.wav");
+ playSound("a#33.wav");
+ playSound("a#31.wav");
+ playSound("a#0.wav");
gotoView("Home.Node 4.E", "_TRACK,3,e-cu,4,E");
}
diff --git a/engines/titanic/game/computer_screen.cpp b/engines/titanic/game/computer_screen.cpp
index 0572258cef..9a7ac4b34e 100644
--- a/engines/titanic/game/computer_screen.cpp
+++ b/engines/titanic/game/computer_screen.cpp
@@ -57,7 +57,7 @@ bool CComputerScreen::ActMsg(CActMsg *msg) {
}
bool CComputerScreen::MovieEndMsg(CMovieEndMsg *msg) {
- playSound("z#47.wav", 100, 0, 0);
+ playSound("z#47.wav");
addTimer(0, 3000, 0);
for (int idx = 0; idx < 10; ++idx)
diff --git a/engines/titanic/game/fan_noises.cpp b/engines/titanic/game/fan_noises.cpp
index c6e6d203dd..9144f523f4 100644
--- a/engines/titanic/game/fan_noises.cpp
+++ b/engines/titanic/game/fan_noises.cpp
@@ -34,7 +34,7 @@ BEGIN_MESSAGE_MAP(CFanNoises, CGameObject)
END_MESSAGE_MAP()
CFanNoises::CFanNoises() : CGameObject(), _state(-1),
- _soundHandle(0), _soundPercent(70), _soundV3(-1), _soundSeconds(0),
+ _soundHandle(0), _soundPercent(70), _soundBalance(0), _soundSeconds(0),
_stopSeconds(0), _startFlag(true) {
}
@@ -43,7 +43,7 @@ void CFanNoises::save(SimpleFile *file, int indent) {
file->writeNumberLine(_state, indent);
file->writeNumberLine(_soundHandle, indent);
file->writeNumberLine(_soundPercent, indent);
- file->writeNumberLine(_soundV3, indent);
+ file->writeNumberLine(_soundBalance, indent);
file->writeNumberLine(_soundSeconds, indent);
file->writeNumberLine(_stopSeconds, indent);
file->writeNumberLine(_startFlag, indent);
@@ -56,7 +56,7 @@ void CFanNoises::load(SimpleFile *file) {
_state = file->readNumber();
_soundHandle = file->readNumber();
_soundPercent = file->readNumber();
- _soundV3 = file->readNumber();
+ _soundBalance = file->readNumber();
_soundSeconds = file->readNumber();
_stopSeconds = file->readNumber();
_startFlag = file->readNumber();
@@ -75,12 +75,12 @@ bool CFanNoises::EnterRoomMsg(CEnterRoomMsg *msg) {
switch (_state) {
case 1:
- _soundHandle = playSound("b#60.wav", 0, _soundV3, true);
+ _soundHandle = playSound("b#60.wav", 0, _soundBalance, true);
setSoundVolume(_soundHandle, _soundPercent, _soundSeconds);
_startFlag = true;
break;
case 2:
- _soundHandle = playSound("b#58.wav", 0, _soundV3, true);
+ _soundHandle = playSound("b#58.wav", 0, _soundBalance, true);
setSoundVolume(_soundHandle, _soundPercent, _soundSeconds);
_startFlag = true;
break;
@@ -122,7 +122,7 @@ bool CFanNoises::StatusChangeMsg(CStatusChangeMsg *msg) {
switch (oldState) {
case 1:
case 2:
- playSound("b#59.wav", _soundPercent, _soundV3);
+ playSound("b#59.wav", _soundPercent, _soundBalance);
break;
default:
break;
@@ -140,7 +140,7 @@ bool CFanNoises::StatusChangeMsg(CStatusChangeMsg *msg) {
switch (oldState) {
case 1:
case 2:
- _soundHandle = playSound("b#60.wav", _soundPercent, _soundV3);
+ _soundHandle = playSound("b#60.wav", _soundPercent, _soundBalance);
break;
default:
break;
@@ -156,7 +156,7 @@ bool CFanNoises::StatusChangeMsg(CStatusChangeMsg *msg) {
}
if (oldState == 1) {
- _soundHandle = playSound("b#58.wav", _soundPercent, _soundV3);
+ _soundHandle = playSound("b#58.wav", _soundPercent, _soundBalance);
}
break;
@@ -184,13 +184,13 @@ bool CFanNoises::LoadSuccessMsg(CLoadSuccessMsg *msg) {
switch (_state) {
case 1:
- playSound("b#60.wav", 0, _soundV3, true);
+ playSound("b#60.wav", 0, _soundBalance, true);
setSoundVolume(_soundHandle, _soundPercent, _soundSeconds);
_startFlag = true;
break;
case 2:
- playSound("b#58.wav", 0, _soundV3, true);
+ playSound("b#58.wav", 0, _soundBalance, true);
setSoundVolume(_soundHandle, _soundPercent, _soundSeconds);
_startFlag = true;
break;
diff --git a/engines/titanic/game/fan_noises.h b/engines/titanic/game/fan_noises.h
index 56c80c0764..488d42e79e 100644
--- a/engines/titanic/game/fan_noises.h
+++ b/engines/titanic/game/fan_noises.h
@@ -39,7 +39,7 @@ private:
int _state;
int _soundHandle;
int _soundPercent;
- int _soundV3;
+ int _soundBalance;
int _soundSeconds;
int _stopSeconds;
bool _startFlag;
diff --git a/engines/titanic/game/television.cpp b/engines/titanic/game/television.cpp
index ba30fbe281..780f92b5ad 100644
--- a/engines/titanic/game/television.cpp
+++ b/engines/titanic/game/television.cpp
@@ -237,8 +237,8 @@ bool CTelevision::MovieEndMsg(CMovieEndMsg *msg) {
}
if (_fieldE0 == 3 && compareRoomNameTo("SGTState") && !getPassengerClass()) {
- playSound("z#47.wav", 100, 0, 0);
- _soundHandle = playSound("b#20.wav", 100, 0, 0);
+ playSound("z#47.wav");
+ _soundHandle = playSound("b#20.wav");
CMagazine *magazine = dynamic_cast<CMagazine *>(getRoot()->findByName("Magazine"));
if (magazine) {
diff --git a/engines/titanic/gfx/st_button.cpp b/engines/titanic/gfx/st_button.cpp
index 6fc31f4c64..d735796bd6 100644
--- a/engines/titanic/gfx/st_button.cpp
+++ b/engines/titanic/gfx/st_button.cpp
@@ -68,7 +68,7 @@ void CSTButton::load(SimpleFile *file) {
bool CSTButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
playMovie(0);
- playSound(_soundName, 100, 0, 0);
+ playSound(_soundName);
return true;
}
diff --git a/engines/titanic/npcs/deskbot.cpp b/engines/titanic/npcs/deskbot.cpp
index d11b135983..5b6364f1cb 100644
--- a/engines/titanic/npcs/deskbot.cpp
+++ b/engines/titanic/npcs/deskbot.cpp
@@ -113,7 +113,7 @@ bool CDeskbot::MovieEndMsg(CMovieEndMsg *msg) {
petSetArea(PET_ROOMS);
dec54();
unlockMouse();
- playSound("z#47.wav", 100, 0, 0);
+ playSound("z#47.wav");
_classNum = false;
}
diff --git a/engines/titanic/sound/auto_sound_player.cpp b/engines/titanic/sound/auto_sound_player.cpp
index 8267d65037..4a3a1fe7f8 100644
--- a/engines/titanic/sound/auto_sound_player.cpp
+++ b/engines/titanic/sound/auto_sound_player.cpp
@@ -33,7 +33,7 @@ BEGIN_MESSAGE_MAP(CAutoSoundPlayer, CGameObject)
END_MESSAGE_MAP()
CAutoSoundPlayer::CAutoSoundPlayer() : CGameObject(),
- _fieldBC(0), _volume(70), _fieldD0(0), _repeated(false), _soundHandle(-1),
+ _fieldBC(0), _volume(70), _balance(0), _repeated(false), _soundHandle(-1),
_stopSeconds(0), _startSeconds(-1), _active(false), _fieldE8(0) {
}
@@ -42,7 +42,7 @@ void CAutoSoundPlayer::save(SimpleFile *file, int indent) {
file->writeNumberLine(_fieldBC, indent);
file->writeQuotedLine(_filename, indent);
file->writeNumberLine(_volume, indent);
- file->writeNumberLine(_fieldD0, indent);
+ file->writeNumberLine(_balance, indent);
file->writeNumberLine(_repeated, indent);
file->writeNumberLine(_soundHandle, indent);
file->writeNumberLine(_stopSeconds, indent);
@@ -58,7 +58,7 @@ void CAutoSoundPlayer::load(SimpleFile *file) {
_fieldBC = file->readNumber();
_filename = file->readString();
_volume = file->readNumber();
- _fieldD0 = file->readNumber();
+ _balance = file->readNumber();
_repeated = file->readNumber();
_soundHandle = file->readNumber();
_stopSeconds = file->readNumber();
@@ -72,7 +72,7 @@ void CAutoSoundPlayer::load(SimpleFile *file) {
bool CAutoSoundPlayer::TurnOn(CTurnOn *msg) {
if (_soundHandle == -1) {
CProximity prox;
- prox._fieldC = _fieldD0;
+ prox._balance = _balance;
prox._repeated = _repeated;
if (_fieldE8)
prox._positioningMode = POSMODE_VECTOR;
diff --git a/engines/titanic/sound/auto_sound_player.h b/engines/titanic/sound/auto_sound_player.h
index c8f1d3480e..9f4d11ee06 100644
--- a/engines/titanic/sound/auto_sound_player.h
+++ b/engines/titanic/sound/auto_sound_player.h
@@ -38,7 +38,7 @@ public:
int _fieldBC;
CString _filename;
int _volume;
- int _fieldD0;
+ int _balance;
bool _repeated;
int _soundHandle;
int _stopSeconds;
diff --git a/engines/titanic/sound/auto_sound_player_adsr.cpp b/engines/titanic/sound/auto_sound_player_adsr.cpp
index f9f045759b..d900ca0792 100644
--- a/engines/titanic/sound/auto_sound_player_adsr.cpp
+++ b/engines/titanic/sound/auto_sound_player_adsr.cpp
@@ -48,12 +48,12 @@ void CAutoSoundPlayerADSR::load(SimpleFile *file) {
bool CAutoSoundPlayerADSR::TurnOn(CTurnOn *msg) {
if (_soundHandle == -1) {
if (!_soundName1.empty()) {
- _soundHandle = playSound(_soundName1, _volume, _fieldD0);
+ _soundHandle = playSound(_soundName1, _volume, _balance);
if (!_soundName2.empty())
- _soundHandle = queueSound(_soundName2, _soundHandle, _volume, _fieldD0);
+ _soundHandle = queueSound(_soundName2, _soundHandle, _volume, _balance);
- _soundHandle = queueSound(_filename, _soundHandle, _volume, _fieldD0);
+ _soundHandle = queueSound(_filename, _soundHandle, _volume, _balance);
_active = true;
}
}
@@ -64,7 +64,7 @@ bool CAutoSoundPlayerADSR::TurnOn(CTurnOn *msg) {
bool CAutoSoundPlayerADSR::TurnOff(CTurnOff *msg) {
if (_soundHandle != -1) {
if (!_soundName3.empty())
- queueSound(_soundName3, _soundHandle, _volume, _fieldD0);
+ queueSound(_soundName3, _soundHandle, _volume, _balance);
if (isSoundActive(_soundHandle))
stopSound(_soundHandle);
diff --git a/engines/titanic/sound/gondolier_song.cpp b/engines/titanic/sound/gondolier_song.cpp
index a33ba12cd5..541ef7142f 100644
--- a/engines/titanic/sound/gondolier_song.cpp
+++ b/engines/titanic/sound/gondolier_song.cpp
@@ -49,9 +49,9 @@ bool CGondolierSong::TurnOn(CTurnOn *msg) {
int volume = _value * _volume / 100;
if (_startSeconds == -1) {
- _soundHandle = playSound(_filename, volume, _fieldD0, _repeated);
+ _soundHandle = playSound(_filename, volume, _balance, _repeated);
} else {
- _soundHandle = playSound(_filename, 0, _fieldD0, _repeated);
+ _soundHandle = playSound(_filename, 0, _balance, _repeated);
setSoundVolume(_soundHandle, _volume, _startSeconds);
}
diff --git a/engines/titanic/sound/proximity.cpp b/engines/titanic/sound/proximity.cpp
index 59639fd9b5..517f22208b 100644
--- a/engines/titanic/sound/proximity.cpp
+++ b/engines/titanic/sound/proximity.cpp
@@ -25,13 +25,14 @@
namespace Titanic {
-CProximity::CProximity() : _field4(0), _channelVolume(100), _fieldC(0),
- _priorSoundHandle(-1), _field14(0), _frequencyMultiplier(0.0), _field1C(1.875),
- _repeated(false), _channelMode(10), _positioningMode(POSMODE_NONE), _azimuth(0.0),
- _range(0.5), _elevation(0), _posX(0.0), _posY(0.0), _posZ(0.0),
+CProximity::CProximity() : _channelVolume(100), _balance(0),
+ _priorSoundHandle(-1), _frequencyMultiplier(0.0), _frequencyAdjust(1.875),
+ _repeated(false), _channelMode(10), _positioningMode(POSMODE_NONE),
+ _azimuth(0.0), _range(0.5), _elevation(0),
+ _posX(0.0), _posY(0.0), _posZ(0.0),
_hasVelocity(false), _velocityX(0), _velocityY(0), _velocityZ(0),
- _field54(0), _field58(0), _field5C(0), _freeSoundFlag(false), _endTalkerFn(nullptr),
- _talker(nullptr), _soundDuration(0), _soundType(Audio::Mixer::kPlainSoundType) {
+ _freeSoundFlag(false), _endTalkerFn(nullptr), _talker(nullptr),
+ _soundDuration(0), _soundType(Audio::Mixer::kPlainSoundType) {
}
} // End of namespace Titanic
diff --git a/engines/titanic/sound/proximity.h b/engines/titanic/sound/proximity.h
index adad97d099..06fd2b1d3e 100644
--- a/engines/titanic/sound/proximity.h
+++ b/engines/titanic/sound/proximity.h
@@ -36,13 +36,11 @@ typedef void (*CEndTalkerFn)(TTtalker *talker);
class CProximity {
public:
- int _field4;
int _channelVolume;
- int _fieldC;
+ int _balance;
int _priorSoundHandle;
- int _field14;
double _frequencyMultiplier;
- double _field1C;
+ double _frequencyAdjust;
bool _repeated;
int _channelMode;
PositioningMode _positioningMode;
@@ -56,9 +54,6 @@ public:
double _velocityX;
double _velocityY;
double _velocityZ;
- int _field54;
- int _field58;
- int _field5C;
bool _freeSoundFlag;
CEndTalkerFn _endTalkerFn;
TTtalker *_talker;
diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp
index 81ec5bc475..fb55e7dad9 100644
--- a/engines/titanic/sound/sound_manager.cpp
+++ b/engines/titanic/sound/sound_manager.cpp
@@ -371,7 +371,7 @@ int QSoundManager::playWave(CWaveFile *waveFile, int iChannel, uint flags, CProx
return 0;
prox._channelVolume = CLIP(prox._channelVolume, 0, 100);
- prox._fieldC = CLIP(prox._fieldC, -100, 100);
+ prox._balance = CLIP(prox._balance, -100, 100);
int slotIndex = findFreeSlot();
if (slotIndex == -1)
@@ -399,7 +399,7 @@ int QSoundManager::playWave(CWaveFile *waveFile, int iChannel, uint flags, CProx
break;
}
- if (prox._frequencyMultiplier || prox._field1C != 1.875) {
+ if (prox._frequencyMultiplier || prox._frequencyAdjust != 1.875) {
uint freq = (uint)(waveFile->getFrequency() * prox._frequencyMultiplier);
qsWaveMixSetFrequency(iChannel, 8, freq);
}