aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_control.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-29 19:29:28 -0400
committerPaul Gilbert2016-07-10 16:37:24 -0400
commit6ec129d188a2b5b86dba6540b38a959bbf8b2491 (patch)
tree312a0ffb0e0c91afeec2465c62789bfb9a1c09a9 /engines/titanic/pet_control/pet_control.cpp
parent5d087a8fcd709550ec14fc6b01acf045f8d6614b (diff)
downloadscummvm-rg350-6ec129d188a2b5b86dba6540b38a959bbf8b2491.tar.gz
scummvm-rg350-6ec129d188a2b5b86dba6540b38a959bbf8b2491.tar.bz2
scummvm-rg350-6ec129d188a2b5b86dba6540b38a959bbf8b2491.zip
TITANIC: Added PET Conversations enter, PET Timers, and Text Cursor show
Diffstat (limited to 'engines/titanic/pet_control/pet_control.cpp')
-rw-r--r--engines/titanic/pet_control/pet_control.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index 997d35b681..d67ce543fe 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -46,8 +46,6 @@ CPetControl::CPetControl() : CGameObject(),
_currentArea(PET_CONVERSATION), _fieldC0(0), _locked(0), _fieldC8(0),
_activeNPC(nullptr), _treeItem2(nullptr), _hiddenRoom(nullptr),
_drawBounds(20, 350, 620, 480) {
- setup();
- _timers[0] = _timers[1] = nullptr;
_sections[PET_INVENTORY] = &_inventory;
_sections[PET_CONVERSATION] = &_conversations;
_sections[PET_REMOTE] = &_remote;
@@ -487,4 +485,22 @@ void CPetControl::summonNPC(const CString &name, int val) {
}
}
+void CPetControl::startPetTimer(uint timerIndex, uint firstDuration, uint duration, void *target) {
+ stopPetTimer(timerIndex);
+ _timers[timerIndex]._id = (timerIndex, firstDuration, duration);
+ _timers[timerIndex]._target = target;
+ setTimer44(_timers[timerIndex]._id, 0);
+}
+
+void CPetControl::stopPetTimer(uint timerIndex) {
+ if (_timers[timerIndex]._target) {
+ stopTimer(_timers[timerIndex]._id);
+ _timers[timerIndex]._target = nullptr;
+ }
+}
+
+void CPetControl::setTimer44(int id, int val) {
+ getGameManager()->setTimer44(id, val);
+}
+
} // End of namespace Titanic