diff options
author | Paul Gilbert | 2011-04-27 21:23:47 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-04-27 21:23:47 +1000 |
commit | 34fe545dc7f619a40cffa207b8660ecb0c027c1f (patch) | |
tree | 4c39813a3a8f1be435e893955e873c15b82e7e54 /engines/tsage/core.cpp | |
parent | bc0e373da88155e6fe694ff727ca430a40081c88 (diff) | |
download | scummvm-rg350-34fe545dc7f619a40cffa207b8660ecb0c027c1f.tar.gz scummvm-rg350-34fe545dc7f619a40cffa207b8660ecb0c027c1f.tar.bz2 scummvm-rg350-34fe545dc7f619a40cffa207b8660ecb0c027c1f.zip |
TSAGE: Created stub classes for ASound and Sound, and reworked engine to use proper named methods
Diffstat (limited to 'engines/tsage/core.cpp')
-rw-r--r-- | engines/tsage/core.cpp | 46 |
1 files changed, 8 insertions, 38 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index e56cadb68a..36e2961aca 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -32,6 +32,7 @@ #include "tsage/scenes.h" #include "tsage/staticres.h" #include "tsage/globals.h" +#include "tsage/sound.h" namespace tSage { @@ -2911,53 +2912,22 @@ int SceneRegions::indexOf(const Common::Point &pt) { /*--------------------------------------------------------------------------*/ -SoundHandler::SoundHandler() { +ASound::ASound() { _action = NULL; _field280 = -1; - if (_globals) - _globals->_sceneListeners.push_back(this); -} - -SoundHandler::~SoundHandler() { - if (_globals) - _globals->_sceneListeners.remove(this); } -void SoundHandler::dispatch() { - EventHandler::dispatch(); - int v = _sound.proc12(); - - if (v != -1) { - _field280 = v; - _sound.proc2(-1); - - if (_action) - _action->signal(); - } +void ASound::synchronise(Serialiser &s) { + EventHandler::synchronise(s); - if (_field280 != -1) { - // FIXME: Hardcoded to only flag a sound ended if an action has been set - if (_action) { -// if (!_sound.proc3()) { - _field280 = -1; - if (_action) { - _action->signal(); - _action = NULL; - } - } - } + SYNC_POINTER(_action); + s.syncAsSint16LE(_field280); } -void SoundHandler::startSound(int soundNum, Action *action, int volume) { - _action = action; - _field280 = 0; - setVolume(volume); - _sound.startSound(soundNum); - - warning("TODO: SoundHandler::startSound"); +void ASound::dispatch() { + } - /*--------------------------------------------------------------------------*/ void SceneItemList::addItems(SceneItem *first, ...) { |