diff options
author | Paul Gilbert | 2016-08-09 21:51:19 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-09 21:51:19 -0400 |
commit | 668c486f4fdf270a88cfd799ba54871d5a314383 (patch) | |
tree | e7c48a32fb9ff2ce2aa7b739faa3311c9cd52e70 /engines/titanic/core | |
parent | 30936a6115160e8e79b3c768c2ee97aae9cbd554 (diff) | |
download | scummvm-rg350-668c486f4fdf270a88cfd799ba54871d5a314383.tar.gz scummvm-rg350-668c486f4fdf270a88cfd799ba54871d5a314383.tar.bz2 scummvm-rg350-668c486f4fdf270a88cfd799ba54871d5a314383.zip |
TITANIC: Implemented more sound related classes
Diffstat (limited to 'engines/titanic/core')
-rw-r--r-- | engines/titanic/core/game_object.cpp | 17 | ||||
-rw-r--r-- | engines/titanic/core/game_object.h | 12 |
2 files changed, 26 insertions, 3 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index e0a4903f75..3a100ffd29 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -783,6 +783,14 @@ int CGameObject::addTimer(uint firstDuration, uint repeatDuration) { return timer->_id; } +int CGameObject::startAnimTimer(const CString &action, uint firstDuration, uint repeatDuration) { + CTimeEventInfo *timer = new CTimeEventInfo(g_vm->_events->getTicksCount(), + repeatDuration > 0, firstDuration, repeatDuration, this, 0, action); + getGameManager()->addTimer(timer); + + return timer->_id; +} + void CGameObject::stopTimer(int id) { getGameManager()->stopTimer(id); } @@ -1330,14 +1338,14 @@ void CGameObject::fn10(int v1, int v2, int v3) { _field4C = v3; } -void CGameObject::setMovie14(int v) { +void CGameObject::movieSetAudioTiming(bool flag) { if (!_surface && !_resource.empty()) { loadResource(_resource); _resource.clear(); } if (_surface && _surface->_movie) - _surface->_movie->_field14 = v; + _surface->_movie->_hasAudioTiming = flag; } void CGameObject::movieEvent(int frameNumber) { @@ -1481,6 +1489,11 @@ CTreeItem *CGameObject::petContainerRemove(CGameObject *obj) { return item; } +bool CGameObject::petCheckNode(const CString &name) { + CPetControl *pet = getPetControl(); + return pet ? pet->checkNode(name) : false; +} + bool CGameObject::petDismissBot(const CString &name) { CPetControl *pet = getPetControl(); return pet ? pet->dismissBot(name) : false; diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index 19eb296965..cad05dea00 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -260,6 +260,11 @@ protected: int addTimer(uint firstDuration, uint repeatDuration = 0); /** + * Start an animation timer + */ + int startAnimTimer(const CString &action, uint firstDuration, uint repeatDuration = 0); + + /** * Stops a timer */ void stopTimer(int id); @@ -417,7 +422,10 @@ protected: */ void setPassengerClass(int newClass); - void setMovie14(int v); + /** + * Overrides whether the object's movie has audio timing + */ + void movieSetAudioTiming(bool flag); void fn10(int v1, int v2, int v3); @@ -768,6 +776,8 @@ public: CTreeItem *petContainerRemove(CGameObject *obj); + bool petCheckNode(const CString &name); + /** * Dismiss a bot */ |