diff options
author | Paul Gilbert | 2016-03-19 11:03:03 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-03-19 11:03:03 -0400 |
commit | d86941f8c6b497f2d3d8409c2628af88bc600dae (patch) | |
tree | 7364693345333bc0fcc0e92291f3a8c04d46a19a /engines/titanic/pet_control | |
parent | f1d674c745ba117e1e62ff6fa3ebb8a7cace3615 (diff) | |
download | scummvm-rg350-d86941f8c6b497f2d3d8409c2628af88bc600dae.tar.gz scummvm-rg350-d86941f8c6b497f2d3d8409c2628af88bc600dae.tar.bz2 scummvm-rg350-d86941f8c6b497f2d3d8409c2628af88bc600dae.zip |
TITANIC: Implement preEnterView and enterView
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(); |