diff options
author | Paul Gilbert | 2016-06-23 07:39:25 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-15 19:24:11 -0400 |
commit | 3fb8c888a76762160179f331b2df2d3fa967b242 (patch) | |
tree | 4241fbf665a4618164ee9988718a49d644b24456 /engines/titanic/core | |
parent | 5a328ce28f4edfe3da0c261d7abc884aa6af94a2 (diff) | |
download | scummvm-rg350-3fb8c888a76762160179f331b2df2d3fa967b242.tar.gz scummvm-rg350-3fb8c888a76762160179f331b2df2d3fa967b242.tar.bz2 scummvm-rg350-3fb8c888a76762160179f331b2df2d3fa967b242.zip |
TITANIC: Adding miscellaneous CGameObject & CPetControl methods
Diffstat (limited to 'engines/titanic/core')
-rw-r--r-- | engines/titanic/core/game_object.cpp | 22 | ||||
-rw-r--r-- | engines/titanic/core/game_object.h | 20 |
2 files changed, 34 insertions, 8 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index 695a6d66a5..79ceb92116 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -402,10 +402,10 @@ void CGameObject::petShowCursor() { pet->showCursor(); } -void CGameObject::petFn3(CTreeItem *item) { +void CGameObject::petSetRemoteTarget() { CPetControl *pet = getPetControl(); if (pet) - pet->fn3(item); + pet->setRemoteTarget(this); } void CGameObject::playMovie(uint startFrame, uint endFrame, uint flags) { @@ -1057,4 +1057,22 @@ void CGameObject::resetMail() { mailMan->resetValue(); } +void CGameObject::petSetRooms1D0(int val) { + CPetControl *petControl = getPetControl(); + if (petControl) + petControl->setRooms1D0(val); +} + +int CGameObject::petGetRooms1D0() const { + CPetControl *petControl = getPetControl(); + return petControl ? petControl->getRooms1D0() : 0; +} + +void CGameObject::petAddRandomRoom(int passClassNum) { + CPetControl *petControl = getPetControl(); + if (petControl) + petControl->addRandomRoom(passClassNum); +} + + } // End of namespace Titanic diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index bb6b161a48..0a6070463f 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -141,17 +141,16 @@ protected: */ void petShowCursor(); - void petFn3(CTreeItem *item); + /** + * Set the remote target in the PET to this object + */ + void petSetRemoteTarget(); + void incState38(); void inc54(); void dec54(); /** - * Adds a room to the room list - */ - void petAddRandomRoom(int passClassNum); - - /** * Locks/hides the mouse */ void lockMouse(); @@ -565,6 +564,15 @@ public: * Sets up credits text */ void createCredits(); + + void petSetRooms1D0(int val); + + int petGetRooms1D0() const; + + /** + * Adds a random room to the pET + */ + void petAddRandomRoom(int passClassNum); }; } // End of namespace Titanic |