aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r--engines/titanic/pet_control/pet_control.cpp8
-rw-r--r--engines/titanic/pet_control/pet_rooms_glyphs.cpp6
-rw-r--r--engines/titanic/pet_control/pet_rooms_glyphs.h7
3 files changed, 13 insertions, 8 deletions
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