aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/core
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-11 20:08:49 -0400
committerPaul Gilbert2016-07-10 16:10:56 -0400
commit7ac4f7c3aa26831f771418472472735cf73bade9 (patch)
tree721c918233240d79080585bef0f9862f9e0f8291 /engines/titanic/core
parent54b055bcf58e8cbcf472ea6838f3ed7ecf377e37 (diff)
downloadscummvm-rg350-7ac4f7c3aa26831f771418472472735cf73bade9.tar.gz
scummvm-rg350-7ac4f7c3aa26831f771418472472735cf73bade9.tar.bz2
scummvm-rg350-7ac4f7c3aa26831f771418472472735cf73bade9.zip
TITANIC: Implementing CComputerScreen messages
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;