diff options
author | Paul Gilbert | 2016-08-07 19:04:28 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-07 19:04:28 -0400 |
commit | 8b6ac03f18c69a519f1fdcd9bb49920bcfe78012 (patch) | |
tree | 6aa7f58317530b6a16464029e09282a1dd412b38 /engines/titanic/sound/music_room.cpp | |
parent | 0b244412e302bf5366327ac3ce4ee265b053a9da (diff) | |
download | scummvm-rg350-8b6ac03f18c69a519f1fdcd9bb49920bcfe78012.tar.gz scummvm-rg350-8b6ac03f18c69a519f1fdcd9bb49920bcfe78012.tar.bz2 scummvm-rg350-8b6ac03f18c69a519f1fdcd9bb49920bcfe78012.zip |
TITANIC: Start of music player class
Diffstat (limited to 'engines/titanic/sound/music_room.cpp')
-rw-r--r-- | engines/titanic/sound/music_room.cpp | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/engines/titanic/sound/music_room.cpp b/engines/titanic/sound/music_room.cpp index 593c572277..06cf866811 100644 --- a/engines/titanic/sound/music_room.cpp +++ b/engines/titanic/sound/music_room.cpp @@ -20,17 +20,45 @@ * */ -#include "titanic/sound/music_room.h" #include "common/textconsole.h" +#include "titanic/sound/music_room.h" +#include "titanic/sound/sound.h" +#include "titanic/game_manager.h" +#include "titanic/titanic.h" namespace Titanic { +CMusicHandler *CMusicRoom::_musicHandler; + CMusicRoom::CMusicRoom(CGameManager *gameManager) : _gameManager(gameManager) { + _sound = &_gameManager->_sound; + _items.resize(4); +} + +CMusicRoom::~CMusicRoom() { + destroyMusicHandler(); +} + +CMusicHandler *CMusicRoom::createMusicHandler() { + if (_musicHandler) + destroyMusicHandler(); + + _musicHandler = new CMusicHandler(_gameManager->_project, &_sound->_soundManager); + return _musicHandler; +} + +void CMusicRoom::destroyMusicHandler() { + delete _musicHandler; + _musicHandler = nullptr; +} + +void CMusicRoom::startMusic(int musicId) { + // TODO } -void CMusicRoom::preLoad() { - warning("TODO: CMusicRoom::preLoad"); +void CMusicRoom::stopMusic() { + // TODO } } // End of namespace Titanic |