diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/game/music_console_button.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/module.mk | 2 | ||||
-rw-r--r-- | engines/titanic/sound/music_player.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/sound/music_room.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/sound/music_room.h | 6 | ||||
-rw-r--r-- | engines/titanic/sound/music_room_handler.cpp (renamed from engines/titanic/sound/music_handler.cpp) | 34 | ||||
-rw-r--r-- | engines/titanic/sound/music_room_handler.h (renamed from engines/titanic/sound/music_handler.h) | 12 |
7 files changed, 32 insertions, 32 deletions
diff --git a/engines/titanic/game/music_console_button.cpp b/engines/titanic/game/music_console_button.cpp index 6a64647e92..dc86765476 100644 --- a/engines/titanic/game/music_console_button.cpp +++ b/engines/titanic/game/music_console_button.cpp @@ -22,7 +22,7 @@ #include "titanic/game/music_console_button.h" #include "titanic/core/room_item.h" -#include "titanic/sound/music_handler.h" +#include "titanic/sound/music_room_handler.h" #include "titanic/titanic.h" namespace Titanic { diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 793427991d..01ad617d6c 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -405,8 +405,8 @@ MODULE_OBJS := \ sound/dome_from_top_of_well.o \ sound/enter_view_toggles_other_music.o \ sound/gondolier_song.o \ - sound/music_handler.o \ sound/music_room.o \ + sound/music_room_handler.o \ sound/music_player.o \ sound/music_wave.o \ sound/node_auto_sound_player.o \ diff --git a/engines/titanic/sound/music_player.cpp b/engines/titanic/sound/music_player.cpp index 9106160d1f..a1aaf8ff8b 100644 --- a/engines/titanic/sound/music_player.cpp +++ b/engines/titanic/sound/music_player.cpp @@ -124,7 +124,7 @@ bool CMusicPlayer::CreateMusicPlayerMsg(CCreateMusicPlayerMsg *msg) { return true; } - CMusicHandler *musicHandler = getMusicRoom()->createMusicHandler(); + CMusicRoomHandler *musicHandler = getMusicRoom()->createMusicHandler(); CMusicWave *wave; if (musicHandler) { diff --git a/engines/titanic/sound/music_room.cpp b/engines/titanic/sound/music_room.cpp index 29772cc65f..9586f55c58 100644 --- a/engines/titanic/sound/music_room.cpp +++ b/engines/titanic/sound/music_room.cpp @@ -27,7 +27,7 @@ namespace Titanic { -CMusicHandler *CMusicRoom::_musicHandler; +CMusicRoomHandler *CMusicRoom::_musicHandler; CMusicRoom::CMusicRoom(CGameManager *gameManager) : _gameManager(gameManager) { @@ -39,11 +39,11 @@ CMusicRoom::~CMusicRoom() { destroyMusicHandler(); } -CMusicHandler *CMusicRoom::createMusicHandler() { +CMusicRoomHandler *CMusicRoom::createMusicHandler() { if (_musicHandler) destroyMusicHandler(); - _musicHandler = new CMusicHandler(_gameManager->_project, &_sound->_soundManager); + _musicHandler = new CMusicRoomHandler(_gameManager->_project, &_sound->_soundManager); return _musicHandler; } diff --git a/engines/titanic/sound/music_room.h b/engines/titanic/sound/music_room.h index 74f28acd29..4b584a0dd4 100644 --- a/engines/titanic/sound/music_room.h +++ b/engines/titanic/sound/music_room.h @@ -24,7 +24,7 @@ #define TITANIC_MUSIC_ROOM_H #include "common/array.h" -#include "titanic/sound/music_handler.h" +#include "titanic/sound/music_room_handler.h" namespace Titanic { @@ -45,7 +45,7 @@ class CMusicRoom { private: Common::Array<Controls> _controls; public: - static CMusicHandler *_musicHandler; + static CMusicRoomHandler *_musicHandler; public: CGameManager *_gameManager; CSound *_sound; @@ -56,7 +56,7 @@ public: /** * Creates a music handler */ - CMusicHandler *createMusicHandler(); + CMusicRoomHandler *createMusicHandler(); /** * Destroys and currently active music handler diff --git a/engines/titanic/sound/music_handler.cpp b/engines/titanic/sound/music_room_handler.cpp index e2f2ce8dec..ca37485eab 100644 --- a/engines/titanic/sound/music_handler.cpp +++ b/engines/titanic/sound/music_room_handler.cpp @@ -20,26 +20,26 @@ * */ -#include "titanic/sound/music_handler.h" +#include "titanic/sound/music_room_handler.h" #include "titanic/sound/sound_manager.h" #include "titanic/core/project_item.h" namespace Titanic { -CMusicHandler::CMusicHandler(CProjectItem *project, CSoundManager *soundManager) : +CMusicRoomHandler::CMusicRoomHandler(CProjectItem *project, CSoundManager *soundManager) : _project(project), _soundManager(soundManager), _stopWaves(false), _soundHandle(-1), _waveFile(nullptr), _soundVolume(100), _ticks(0), _field108(0) { Common::fill(&_musicWaves[0], &_musicWaves[4], (CMusicWave *)nullptr); } -CMusicHandler::~CMusicHandler() { +CMusicRoomHandler::~CMusicRoomHandler() { stop(); for (int idx = 0; idx < 4; ++idx) delete _musicWaves[idx]; } -CMusicWave *CMusicHandler::createMusicWave(int waveIndex, int count) { +CMusicWave *CMusicRoomHandler::createMusicWave(int waveIndex, int count) { switch (waveIndex) { case 0: _musicWaves[waveIndex] = new CMusicWave(_project, _soundManager, 2); @@ -61,17 +61,17 @@ CMusicWave *CMusicHandler::createMusicWave(int waveIndex, int count) { return _musicWaves[waveIndex]; } -void CMusicHandler::createWaveFile(int musicVolume) { +void CMusicRoomHandler::createWaveFile(int musicVolume) { _soundVolume = musicVolume; // _waveFile = _soundManager->loadMusic() } -bool CMusicHandler::poll() { +bool CMusicRoomHandler::poll() { // TODO return false; } -void CMusicHandler::stop() { +void CMusicRoomHandler::stop() { if (_waveFile) { _soundManager->stopSound(_soundHandle); delete _waveFile; @@ -85,52 +85,52 @@ void CMusicHandler::stop() { } } -bool CMusicHandler::checkSound(int index) const { +bool CMusicRoomHandler::checkSound(int index) const { // TODO return false; } -void CMusicHandler::setSpeedControl2(MusicControlArea area, int value) { +void CMusicRoomHandler::setSpeedControl2(MusicControlArea area, int value) { if (area >= 0 && area <= 3 && value >= -2 && value <= 2) _array2[area]._speedControl = value; } -void CMusicHandler::setPitchControl2(MusicControlArea area, int value) { +void CMusicRoomHandler::setPitchControl2(MusicControlArea area, int value) { if (area >= 0 && area <= 3 && value >= -2 && value <= 2) _array2[area]._pitchControl = value * 3; } -void CMusicHandler::setInversionControl2(MusicControlArea area, int value) { +void CMusicRoomHandler::setInversionControl2(MusicControlArea area, int value) { if (area >= 0 && area <= 3 && value >= -2 && value <= 2) _array2[area]._inversionControl = value; } -void CMusicHandler::setDirectionControl2(MusicControlArea area, int value) { +void CMusicRoomHandler::setDirectionControl2(MusicControlArea area, int value) { if (area >= 0 && area <= 3 && value >= -2 && value <= 2) _array2[area]._directionControl = value; } -void CMusicHandler::setPitchControl(MusicControlArea area, int value) { +void CMusicRoomHandler::setPitchControl(MusicControlArea area, int value) { if (area >= 0 && area <= 3 && value >= -2 && value <= 2) _array1[area]._pitchControl = value; } -void CMusicHandler::setSpeedControl(MusicControlArea area, int value) { +void CMusicRoomHandler::setSpeedControl(MusicControlArea area, int value) { if (area >= 0 && area <= 3 && value >= -2 && value <= 2) _array1[area]._speedControl = value; } -void CMusicHandler::setDirectionControl(MusicControlArea area, int value) { +void CMusicRoomHandler::setDirectionControl(MusicControlArea area, int value) { if (area >= 0 && area <= 3 && value >= -2 && value <= 2) _array1[area]._directionControl = value; } -void CMusicHandler::setInversionControl(MusicControlArea area, int value) { +void CMusicRoomHandler::setInversionControl(MusicControlArea area, int value) { if (area >= 0 && area <= 3 && value >= -2 && value <= 2) _array1[area]._inversionControl = value; } -void CMusicHandler::setMuteControl(MusicControlArea area, int value) { +void CMusicRoomHandler::setMuteControl(MusicControlArea area, int value) { if (area >= 0 && area <= 3 && value >= -2 && value <= 2) _array1[area]._muteControl = value; } diff --git a/engines/titanic/sound/music_handler.h b/engines/titanic/sound/music_room_handler.h index 27b429d523..61b332dc7a 100644 --- a/engines/titanic/sound/music_handler.h +++ b/engines/titanic/sound/music_room_handler.h @@ -20,8 +20,8 @@ * */ -#ifndef TITANIC_MUSIC_HANDLER_H -#define TITANIC_MUSIC_HANDLER_H +#ifndef TITANIC_MUSIC_ROOM_HANDLER_H +#define TITANIC_MUSIC_ROOM_HANDLER_H #include "titanic/sound/music_wave.h" #include "titanic/sound/wave_file.h" @@ -33,7 +33,7 @@ class CSoundManager; enum MusicControlArea { BELLS = 0, SNAKE = 1, PIANO = 2, BASS = 3 }; -class CMusicHandler { +class CMusicRoomHandler { struct Controls { int _pitchControl; int _speedControl; @@ -62,8 +62,8 @@ private: uint _ticks; int _field108; public: - CMusicHandler(CProjectItem *project, CSoundManager *soundManager); - ~CMusicHandler(); + CMusicRoomHandler(CProjectItem *project, CSoundManager *soundManager); + ~CMusicRoomHandler(); /** * Creates a new music wave class instance, and assigns it to a slot @@ -122,4 +122,4 @@ public: } // End of namespace Titanic -#endif /* TITANIC_MUSIC_HANDLER_H */ +#endif /* TITANIC_MUSIC_ROOM_HANDLER_H */ |