aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_control.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-17 21:08:42 -0400
committerPaul Gilbert2016-07-10 16:11:21 -0400
commit46a30255b0e5a7f5dad4fd032388d31a69208b62 (patch)
tree1e668339aecb1246c9ec20515b81866d81ab75d2 /engines/titanic/pet_control/pet_control.cpp
parenta11e677494d7cb3c6b8ed2c56095873d46a00ab8 (diff)
downloadscummvm-rg350-46a30255b0e5a7f5dad4fd032388d31a69208b62.tar.gz
scummvm-rg350-46a30255b0e5a7f5dad4fd032388d31a69208b62.tar.bz2
scummvm-rg350-46a30255b0e5a7f5dad4fd032388d31a69208b62.zip
TITANIC: Seperate PET classes setup and reset methods
Diffstat (limited to 'engines/titanic/pet_control/pet_control.cpp')
-rw-r--r--engines/titanic/pet_control/pet_control.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index 25ab972df9..31f95d1a88 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -45,6 +45,7 @@ CPetControl::CPetControl() : CGameObject(),
_currentArea(PET_CONVERSATION), _fieldC0(0), _locked(0), _fieldC8(0),
_treeItem1(nullptr), _treeItem2(nullptr), _hiddenRoom(nullptr),
_drawBounds(20, 350, 620, 480) {
+ setup();
_timers[0] = _timers[1] = nullptr;
_sections[PET_INVENTORY] = &_inventory;
_sections[PET_CONVERSATION] = &_conversations;
@@ -80,6 +81,17 @@ void CPetControl::load(SimpleFile *file) {
CGameObject::load(file);
}
+void CPetControl::setup() {
+ warning("TODO: CPetControl::setup");
+ _rooms.setup(this);
+ _remote.setup(this);
+ _inventory.setup(this);
+ _sub5.setup(this);
+ _saves.setup(this);
+ _sub7.setup(this);
+ _frame.setup(this);
+}
+
bool CPetControl::isValid() {
return _conversations.isValid(this) &&
_rooms.isValid(this) &&
@@ -399,8 +411,8 @@ void CPetControl::removeFromInventory(CCarry *item, bool refreshUI, bool sendMsg
removeFromInventory(item, view, refreshUI, sendMsg);
}
-void CPetControl::invFn3(CCarry *item) {
- _inventory.fn3(item);
+void CPetControl::invChange(CCarry *item) {
+ _inventory.change(item);
}
void CPetControl::moveToHiddenRoom(CTreeItem *item) {