diff options
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r-- | engines/titanic/pet_control/pet_control.cpp | 18 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_control.h | 12 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_control_sub_base.h | 8 |
3 files changed, 33 insertions, 5 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp index 7ed223d595..a61773d319 100644 --- a/engines/titanic/pet_control/pet_control.cpp +++ b/engines/titanic/pet_control/pet_control.cpp @@ -21,6 +21,8 @@ */ #include "titanic/pet_control/pet_control.h" +#include "titanic/game_manager.h" +#include "titanic/game_state.h" namespace Titanic { @@ -49,10 +51,6 @@ void CPetControl::load(SimpleFile *file) { CGameObject::load(file); } -void CPetControl::postLoad() { - // TODO -} - bool CPetControl::isValid() const { return _sub1.isValid() && _sub2.isValid() && _sub3.isValid() && _sub4.isValid() @@ -82,5 +80,17 @@ void CPetControl::saveSubObjects(SimpleFile *file, int indent) const { _sub8.save(file, indent); } +void CPetControl::postLoad() { + warning("TODO: CPetControl::postLoad"); +} + +void CPetControl::enterNode(CNodeItem *node) { + getGameManager()->_gameState.enterNode(); +} + +void CPetControl::enterRoom(CRoomItem *room) { + _sub2.enterRoom(room); + _sub3.enterRoom(room); +} } // End of namespace Titanic diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index 70f6850bc7..f1e4bb2a10 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -24,6 +24,8 @@ #define TITANIC_PET_CONTROL_H #include "titanic/core/game_object.h" +#include "titanic/core/node_item.h" +#include "titanic/core/room_item.h" #include "titanic/pet_control/pet_control_sub1.h" #include "titanic/pet_control/pet_control_sub2.h" #include "titanic/pet_control/pet_control_sub3.h" @@ -80,6 +82,16 @@ public: * Called after loading a game has finished */ void postLoad(); + + /** + * Called when a new node is entered + */ + void enterNode(CNodeItem *node); + + /** + * Called when a new room is entered + */ + void enterRoom(CRoomItem *room); }; } // End of namespace Titanic diff --git a/engines/titanic/pet_control/pet_control_sub_base.h b/engines/titanic/pet_control/pet_control_sub_base.h index b59c85b30a..f95e1a98f5 100644 --- a/engines/titanic/pet_control/pet_control_sub_base.h +++ b/engines/titanic/pet_control/pet_control_sub_base.h @@ -24,6 +24,7 @@ #define TITANIC_PET_CONTROL_SUB_BASE_H #include "titanic/simple_file.h" +#include "titanic/core/room_item.h" namespace Titanic { @@ -81,7 +82,12 @@ public: virtual void proc21() {} virtual void proc22() {} virtual void proc23() {} - virtual void proc24() {} + + /** + * Called when a new room is entered + */ + virtual void enterRoom(CRoomItem *room) {} + virtual void proc25(); virtual int proc26() { return 0; } virtual void proc27(); |