aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/core
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/core')
-rw-r--r--engines/titanic/core/game_object.cpp8
-rw-r--r--engines/titanic/core/game_object.h5
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index c179ed8b50..7e731bdbe7 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -459,6 +459,14 @@ bool CGameObject::playSound(const CString &name, CProximity &prox) {
return false;
}
+int CGameObject::addTimer(int endVal, uint firstDuration, uint duration) {
+ CTimeEventInfo *timer = new CTimeEventInfo(g_vm->_events->getTicksCount(),
+ duration != 0, firstDuration, duration, this, endVal, CString());
+
+ getGameManager()->addTimer(timer);
+ return timer->_id;
+}
+
void CGameObject::gotoView(const CString &viewName, const CString &clipName) {
CViewItem *newView = parseView(viewName);
CGameManager *gameManager = getGameManager();
diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h
index a8d8513587..bc1020d03f 100644
--- a/engines/titanic/core/game_object.h
+++ b/engines/titanic/core/game_object.h
@@ -140,6 +140,11 @@ protected:
* Plays a sound
*/
bool playSound(const CString &name, CProximity &prox);
+
+ /**
+ * Adds a timer
+ */
+ int addTimer(int endVal, uint firstDuration, uint duration);
public:
int _field60;
CursorId _cursorId;