diff options
-rw-r--r-- | engines/titanic/core/game_object.cpp | 8 | ||||
-rw-r--r-- | engines/titanic/game/television.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_control.cpp | 8 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms_glyphs.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms_glyphs.h | 7 |
5 files changed, 15 insertions, 16 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index 79ceb92116..f0fd08ae94 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -790,12 +790,6 @@ void CGameObject::dec54() { getGameManager()->dec54(); } -void CGameObject::petAddRandomRoom(int passClassNum) { - CPetControl *petControl = getPetControl(); - if (petControl) - petControl->addRandomRoom(passClassNum); -} - void CGameObject::lockMouse() { CGameManager *gameMan = getGameManager(); gameMan->lockInputHandler(); @@ -897,7 +891,7 @@ void CGameObject::checkPlayMovie(const CString &name, int flags) { void CGameObject::clearPet() const { CPetControl *petControl = getPetControl(); if (petControl) - petControl->clear(); + petControl->resetActiveNPC(); } CPetControl *CGameObject::getPetControl() const { diff --git a/engines/titanic/game/television.cpp b/engines/titanic/game/television.cpp index a3f8ec3391..4d8e3f2042 100644 --- a/engines/titanic/game/television.cpp +++ b/engines/titanic/game/television.cpp @@ -141,7 +141,7 @@ bool CTelevision::ChangeSeasonMsg(CChangeSeasonMsg *msg) { bool CTelevision::EnterViewMsg(CEnterViewMsg *msg) { setPetArea(PET_REMOTE); petHighlightGlyph(GLYPH_TELEVISION_CONTROL); - petFn3(0); + petSetRemoteTarget(); setVisible(0); _fieldE0 = 1; diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp index 802e0ada12..22b513ef75 100644 --- a/engines/titanic/pet_control/pet_control.cpp +++ b/engines/titanic/pet_control/pet_control.cpp @@ -59,7 +59,7 @@ void CPetControl::save(SimpleFile *file, int indent) const { file->writeNumberLine(0, indent); file->writeNumberLine(_currentArea, indent); file->writeQuotedLine(_activeNPCName, indent); - file->writeQuotedLine(_string2, indent); + file->writeQuotedLine(_remoteTargetName, indent); saveAreas(file, indent); CGameObject::save(file, indent); @@ -72,7 +72,7 @@ void CPetControl::load(SimpleFile *file) { if (!val) { _currentArea = (PetArea)file->readNumber(); _activeNPCName = file->readString(); - _string2 = file->readString(); + _remoteTargetName = file->readString(); loadAreas(file, 0); } @@ -151,8 +151,8 @@ void CPetControl::postLoad() { if (!_activeNPCName.empty() && root) _activeNPC = root->findByName(_activeNPCName); - if (!_string2.empty() && root) - _remoteTarget = root->findByName(_string2); + if (!_remoteTargetName.empty() && root) + _remoteTarget = static_cast<CGameObject *>(root->findByName(_remoteTargetName)); setArea(_currentArea); loaded(); diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.cpp b/engines/titanic/pet_control/pet_rooms_glyphs.cpp index 786049791e..9ecaefbf68 100644 --- a/engines/titanic/pet_control/pet_rooms_glyphs.cpp +++ b/engines/titanic/pet_control/pet_rooms_glyphs.cpp @@ -80,8 +80,10 @@ int CPetRoomsGlyph::proc33() { return 1; } -void CPetRoomsGlyph::proc39() { - +void CPetRoomsGlyph::loadFlags(SimpleFile *file, int val) { + if (!val) { + _roomFlags = file->readNumber(); + } } void CPetRoomsGlyph::changeLocation(int newClassNum) { diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.h b/engines/titanic/pet_control/pet_rooms_glyphs.h index 98ddcc74e9..bed167f934 100644 --- a/engines/titanic/pet_control/pet_rooms_glyphs.h +++ b/engines/titanic/pet_control/pet_rooms_glyphs.h @@ -24,6 +24,7 @@ #define TITANIC_PET_ROOMS_GLYPHS_H #include "titanic/pet_control/pet_glyphs.h" +#include "titanic/support/simple_file.h" namespace Titanic { @@ -71,9 +72,11 @@ public: virtual void save2(SimpleFile *file, int indent) const; virtual int proc33(); - - virtual void proc39(); + /** + * Loads flags for the glyph + */ + virtual void loadFlags(SimpleFile *file, int val); /** * Set the room flags for the glyph |