aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/pet_control/pet_control.cpp')
-rw-r--r--engines/titanic/pet_control/pet_control.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index 2ab30af5de..95438ce81e 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -52,7 +52,7 @@ CPetControl::CPetControl() : CGameObject(),
_sections[PET_ROOMS] = &_rooms;
_sections[PET_REAL_LIFE] = &_realLife;
_sections[PET_STARFIELD] = &_starfield;
- _sections[PET_MESSAGE] = &_message;
+ _sections[PET_TRANSLATION] = &_translation;
}
void CPetControl::save(SimpleFile *file, int indent) {
@@ -87,7 +87,7 @@ void CPetControl::setup() {
_inventory.setup(this);
_starfield.setup(this);
_realLife.setup(this);
- _message.setup(this);
+ _translation.setup(this);
_frame.setup(this);
}
@@ -98,7 +98,7 @@ bool CPetControl::isValid() {
_inventory.isValid(this) &&
_starfield.isValid(this) &&
_realLife.isValid(this) &&
- _message.isValid(this) &&
+ _translation.isValid(this) &&
_frame.isValid(this);
}
@@ -109,7 +109,7 @@ void CPetControl::loadAreas(SimpleFile *file, int param) {
_inventory.load(file, param);
_starfield.load(file, param);
_realLife.load(file, param);
- _message.load(file, param);
+ _translation.load(file, param);
_frame.load(file, param);
}
@@ -120,7 +120,7 @@ void CPetControl::saveAreas(SimpleFile *file, int indent) {
_inventory.save(file, indent);
_starfield.save(file, indent);
_realLife.save(file, indent);
- _message.save(file, indent);
+ _translation.save(file, indent);
_frame.save(file, indent);
}
@@ -165,7 +165,7 @@ void CPetControl::loaded() {
_inventory.postLoad();
_starfield.postLoad();
_realLife.postLoad();
- _message.postLoad();
+ _translation.postLoad();
_frame.postLoad();
}
@@ -386,6 +386,15 @@ void CPetControl::displayMessage(const CString &str, int param) const {
_sections[_currentArea]->displayMessage(msg);
}
+void CPetControl::addTranslation(StringId id1, StringId id2) {
+ setArea(PET_TRANSLATION);
+ _translation.addTranslation(_strings[id1], _strings[id2]);
+}
+
+void CPetControl::clearTranslation() {
+ _translation.clearTranslation();
+}
+
CGameObject *CPetControl::getFirstObject() const {
return dynamic_cast<CGameObject *>(getFirstChild());
}