aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-11-11 15:24:53 -0500
committerPaul Gilbert2016-11-11 15:24:53 -0500
commit23af9d1a3cd3a991edb2417d215132c6bba773e7 (patch)
tree8b2d0415e8c294b9593f1d33877b98522a2b1cb7
parentddf9b7307f7b11c6d923cd9d6bf4222124cb04e2 (diff)
downloadscummvm-rg350-23af9d1a3cd3a991edb2417d215132c6bba773e7.tar.gz
scummvm-rg350-23af9d1a3cd3a991edb2417d215132c6bba773e7.tar.bz2
scummvm-rg350-23af9d1a3cd3a991edb2417d215132c6bba773e7.zip
TITANIC: Load more text strings from data file
-rw-r--r--engines/titanic/carry/arm.cpp4
-rw-r--r--engines/titanic/carry/carry.cpp6
-rw-r--r--engines/titanic/carry/central_core.cpp2
-rw-r--r--engines/titanic/carry/chicken.cpp2
-rw-r--r--engines/titanic/carry/hose.cpp3
-rw-r--r--engines/titanic/carry/perch.cpp2
-rw-r--r--engines/titanic/carry/plug_in.cpp2
-rw-r--r--engines/titanic/game/pet/pet.cpp2
-rw-r--r--engines/titanic/game/television.cpp4
-rw-r--r--engines/titanic/game/transport/gondolier.cpp2
-rw-r--r--engines/titanic/messages/messages.cpp13
-rw-r--r--engines/titanic/messages/messages.h16
-rw-r--r--engines/titanic/pet_control/pet_control.cpp5
-rw-r--r--engines/titanic/pet_control/pet_control.h1
-rw-r--r--engines/titanic/pet_control/pet_conversations.cpp31
-rw-r--r--engines/titanic/pet_control/pet_remote_glyphs.cpp91
-rw-r--r--engines/titanic/pet_control/pet_remote_glyphs.h30
-rw-r--r--engines/titanic/pet_control/pet_text.cpp5
-rw-r--r--engines/titanic/pet_control/pet_text.h5
-rw-r--r--engines/titanic/support/strings.cpp2
-rw-r--r--engines/titanic/support/strings.h52
-rw-r--r--engines/titanic/titanic.cpp1
-rw-r--r--engines/titanic/titanic.h1
23 files changed, 212 insertions, 70 deletions
diff --git a/engines/titanic/carry/arm.cpp b/engines/titanic/carry/arm.cpp
index f6d1f28400..1f77247e93 100644
--- a/engines/titanic/carry/arm.cpp
+++ b/engines/titanic/carry/arm.cpp
@@ -108,7 +108,7 @@ bool CArm::TranslateObjectMsg(CTranslateObjectMsg *msg) {
bool CArm::UseWithOtherMsg(CUseWithOtherMsg *msg) {
if (_string6 != "None") {
- CShowTextMsg textMsg("The arm is already holding something.");
+ CShowTextMsg textMsg(ARM_ALREADY_HOLDING);
textMsg.execute("PET");
return false;
} else if (msg->_other->getName() == "GondolierLeftLever") {
@@ -138,7 +138,7 @@ bool CArm::UseWithOtherMsg(CUseWithOtherMsg *msg) {
bool CArm::MouseDragStartMsg(CMouseDragStartMsg *msg) {
if (!_fieldE0) {
- CShowTextMsg textMsg("You can't get this.");
+ CShowTextMsg textMsg(YOU_CANT_GET_THIS);
textMsg.execute("PET");
} else if (checkStartDragging(msg)) {
hideMouse();
diff --git a/engines/titanic/carry/carry.cpp b/engines/titanic/carry/carry.cpp
index deac2d5128..4f8df11260 100644
--- a/engines/titanic/carry/carry.cpp
+++ b/engines/titanic/carry/carry.cpp
@@ -49,8 +49,8 @@ CCarry::CCarry() : CGameObject(), _fieldDC(0), _fieldE0(1),
_itemFrame(0), _enterFrame(0), _enterFrameSet(false), _visibleFrame(0),
_string1("None"),
_fullViewName("NULL"),
- _string3("That doesn't seem to do anything."),
- _string4("It doesn't seem to want this.") {
+ _string3(g_vm->_strings[DOESNT_DO_ANYTHING]),
+ _string4(g_vm->_strings[DOESNT_WANT_THIS]) {
}
void CCarry::save(SimpleFile *file, int indent) {
@@ -109,7 +109,7 @@ bool CCarry::MouseDragStartMsg(CMouseDragStartMsg *msg) {
}
} else {
if (_visible) {
- CShowTextMsg textMsg("You can't get this.");
+ CShowTextMsg textMsg(YOU_CANT_GET_THIS);
textMsg.execute("PET");
}
}
diff --git a/engines/titanic/carry/central_core.cpp b/engines/titanic/carry/central_core.cpp
index e210b34cbe..afc3b85bf0 100644
--- a/engines/titanic/carry/central_core.cpp
+++ b/engines/titanic/carry/central_core.cpp
@@ -47,7 +47,7 @@ bool CCentralCore::UseWithOtherMsg(CUseWithOtherMsg *msg) {
CPuzzleSolvedMsg solvedMsg;
solvedMsg.execute("BigHammer");
} else if (name == "SpeechCentre") {
- CShowTextMsg textMsg("This does not reach.");
+ CShowTextMsg textMsg(DOES_NOT_REACH);
textMsg.execute("PET");
}
diff --git a/engines/titanic/carry/chicken.cpp b/engines/titanic/carry/chicken.cpp
index 08ebd28478..b80096b718 100644
--- a/engines/titanic/carry/chicken.cpp
+++ b/engines/titanic/carry/chicken.cpp
@@ -74,7 +74,7 @@ bool CChicken::UseWithOtherMsg(CUseWithOtherMsg *msg) {
actMsg.execute(this);
petAddToInventory();
} else {
- CShowTextMsg textMsg("The chicken is already clean.");
+ CShowTextMsg textMsg(CHICKEN_ALREADY_CLEAN);
textMsg.execute("PET");
}
diff --git a/engines/titanic/carry/hose.cpp b/engines/titanic/carry/hose.cpp
index e90119138a..3bfb4eae47 100644
--- a/engines/titanic/carry/hose.cpp
+++ b/engines/titanic/carry/hose.cpp
@@ -22,6 +22,7 @@
#include "titanic/carry/hose.h"
#include "titanic/npcs/succubus.h"
+#include "titanic/titanic.h"
namespace Titanic {
@@ -44,7 +45,7 @@ void CHose::deinit() {
}
CHose::CHose() : CCarry(),
- _string6("Succ-U-Bus auxiliary hose attachment incompatible with sliding glass cover.") {
+ _string6(g_vm->_strings[HOSE_INCOMPATIBLE]) {
}
void CHose::save(SimpleFile *file, int indent) {
diff --git a/engines/titanic/carry/perch.cpp b/engines/titanic/carry/perch.cpp
index 4f0e76bdb0..f432dafa85 100644
--- a/engines/titanic/carry/perch.cpp
+++ b/engines/titanic/carry/perch.cpp
@@ -40,7 +40,7 @@ void CPerch::load(SimpleFile *file) {
bool CPerch::UseWithOtherMsg(CUseWithOtherMsg *msg) {
if (msg->_other->isEquals("SpeechCentre")) {
- CShowTextMsg textMsg("This does not reach.");
+ CShowTextMsg textMsg(DOES_NOT_REACH);
textMsg.execute("PET");
}
diff --git a/engines/titanic/carry/plug_in.cpp b/engines/titanic/carry/plug_in.cpp
index 438b9a5883..55767ce9a8 100644
--- a/engines/titanic/carry/plug_in.cpp
+++ b/engines/titanic/carry/plug_in.cpp
@@ -50,7 +50,7 @@ bool CPlugIn::UseWithOtherMsg(CUseWithOtherMsg *msg) {
if (otherName == "PET") {
return CCarry::UseWithOtherMsg(msg);
} else if (isEquals("DatasideTransporter")) {
- CShowTextMsg textMsg("This item is incorrectly calibrated.");
+ CShowTextMsg textMsg(INCORRECTLY_CALIBRATED);
textMsg.execute("PET");
} else if (isEquals("DatasideTransporter")) {
error("TODO: Set msg->_other->fieldC4 = 2");
diff --git a/engines/titanic/game/pet/pet.cpp b/engines/titanic/game/pet/pet.cpp
index 99c9e01eb3..235d68f242 100644
--- a/engines/titanic/game/pet/pet.cpp
+++ b/engines/titanic/game/pet/pet.cpp
@@ -62,7 +62,7 @@ void CPET::load(SimpleFile *file) {
bool CPET::ShowTextMsg(CShowTextMsg *msg) {
CPetControl *pet = getPetControl();
if (pet)
- pet->petDisplayMessage(1, msg->_value);
+ pet->petDisplayMessage(1, msg->_message);
return true;
}
diff --git a/engines/titanic/game/television.cpp b/engines/titanic/game/television.cpp
index 571ebcd6fa..2d5a09790b 100644
--- a/engines/titanic/game/television.cpp
+++ b/engines/titanic/game/television.cpp
@@ -257,11 +257,11 @@ bool CTelevision::MovieEndMsg(CMovieEndMsg *msg) {
if (_turnOn)
loadFrame(502);
else
- warning("There is currently nothing available for your viewing pleasure on this channel.");
+ petDisplayMessage(NOTHING_ON_CHANNEL);
} else if (_fieldE0 == 5 && *CGetLiftEye2::_destObject != "NULL") {
loadFrame(393 + _v4);
} else {
- warning("There is currently nothing available for your viewing pleasure on this channel.");
+ petDisplayMessage(NOTHING_ON_CHANNEL);
}
return true;
diff --git a/engines/titanic/game/transport/gondolier.cpp b/engines/titanic/game/transport/gondolier.cpp
index 8c28ff9b66..85f3b365b5 100644
--- a/engines/titanic/game/transport/gondolier.cpp
+++ b/engines/titanic/game/transport/gondolier.cpp
@@ -46,7 +46,7 @@ void CGondolier::load(SimpleFile *file) {
}
bool CGondolier::StatusChangeMsg(CStatusChangeMsg *msg) {
- CShowTextMsg textMsg("Only First Class passengers are allowed to use the Gondoliers.");
+ CShowTextMsg textMsg(GONDOLIERS_FIRST_CLASS_ONLY);
textMsg.execute("PET");
return true;
}
diff --git a/engines/titanic/messages/messages.cpp b/engines/titanic/messages/messages.cpp
index a8507063ff..db89c3de3d 100644
--- a/engines/titanic/messages/messages.cpp
+++ b/engines/titanic/messages/messages.cpp
@@ -25,6 +25,7 @@
#include "titanic/core/game_object.h"
#include "titanic/core/message_target.h"
#include "titanic/core/tree_item.h"
+#include "titanic/pet_control/pet_control.h"
#include "titanic/titanic.h"
namespace Titanic {
@@ -163,4 +164,16 @@ bool CMessage::isLeaveViewMsg() const {
return dynamic_cast<const CLeaveViewMsg *>(this) != nullptr;
}
+/*------------------------------------------------------------------------*/
+
+CShowTextMsg::CShowTextMsg() : CMessage(), _message("NO TEXT INCLUDED!!!") {
+}
+
+CShowTextMsg::CShowTextMsg(const CString &msg) : CMessage(), _message(msg) {
+}
+
+CShowTextMsg::CShowTextMsg(StringId stringId) : CMessage() {
+ _message = g_vm->_strings[stringId];
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/messages/messages.h b/engines/titanic/messages/messages.h
index 4b66159dc5..fbe504700b 100644
--- a/engines/titanic/messages/messages.h
+++ b/engines/titanic/messages/messages.h
@@ -26,6 +26,7 @@
#include "common/keyboard.h"
#include "titanic/core/saveable_object.h"
#include "titanic/core/tree_item.h"
+#include "titanic/support/strings.h"
namespace Titanic {
@@ -182,6 +183,20 @@ public:
}
};
+class CShowTextMsg : public CMessage {
+public:
+ CString _message;
+public:
+ CLASSDEF;
+ CShowTextMsg();
+ CShowTextMsg(const CString &msg);
+ CShowTextMsg(StringId stringId);
+
+ static bool isSupportedBy(const CTreeItem *item) {
+ return supports(item, _type);
+ }
+};
+
MESSAGE1(CActMsg, CString, action, "");
MESSAGE1(CActivationmsg, CString, value, "");
MESSAGE1(CAddHeadPieceMsg, CString, value, "NULL");
@@ -301,7 +316,6 @@ MESSAGE0(CSetMusicControlsMsg);
MESSAGE2(CSetVarMsg, CString, varName, "", int, value, 0);
MESSAGE2(CSetVolumeMsg, int, volume, 70, int, secondsTransition, 0);
MESSAGE2(CShipSettingMsg, int, value, 0, CString, name, "");
-MESSAGE1(CShowTextMsg, CString, value, "NO TEXT INCLUDED!!!");
MESSAGE2(CSignalObject, CString, strValue, "", int, numValue, 0);
MESSAGE1(CSpeechFallsFromTreeMsg, Point, pos, Point());
MESSAGE1(CStartMusicMsg, CMusicPlayer *, musicPlayer, (CMusicPlayer *)nullptr);
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index 2d44885a3e..415d1e9821 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -27,6 +27,7 @@
#include "titanic/messages/pet_messages.h"
#include "titanic/game_manager.h"
#include "titanic/game_state.h"
+#include "titanic/titanic.h"
namespace Titanic {
@@ -387,7 +388,7 @@ bool CPetControl::checkDragEnd(CGameObject *item) const {
}
void CPetControl::displayMessage(StringId stringId, int param) const {
- CString msg = CString::format(_strings[stringId].c_str(), param);
+ CString msg = CString::format(g_vm->_strings[stringId].c_str(), param);
_sections[_currentArea]->displayMessage(msg);
}
@@ -398,7 +399,7 @@ void CPetControl::displayMessage(const CString &str, int param) const {
void CPetControl::addTranslation(StringId id1, StringId id2) {
setArea(PET_TRANSLATION);
- _translation.addTranslation(_strings[id1], _strings[id2]);
+ _translation.addTranslation(g_vm->_strings[id1], g_vm->_strings[id2]);
}
void CPetControl::clearTranslation() {
diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h
index d6f426b507..34d1330b52 100644
--- a/engines/titanic/pet_control/pet_control.h
+++ b/engines/titanic/pet_control/pet_control.h
@@ -68,7 +68,6 @@ private:
CRoomItem *_hiddenRoom;
Rect _drawBounds;
PetEventInfo _timers[2];
- Strings _strings;
private:
/**
* Returns true if the control is in a valid state
diff --git a/engines/titanic/pet_control/pet_conversations.cpp b/engines/titanic/pet_control/pet_conversations.cpp
index 9b7e08aaaf..c2cddd9598 100644
--- a/engines/titanic/pet_control/pet_conversations.cpp
+++ b/engines/titanic/pet_control/pet_conversations.cpp
@@ -23,6 +23,7 @@
#include "titanic/pet_control/pet_conversations.h"
#include "titanic/pet_control/pet_control.h"
#include "titanic/game_manager.h"
+#include "titanic/titanic.h"
namespace Titanic {
@@ -164,7 +165,7 @@ bool CPetConversations::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
if (_doorBot.MouseButtonUpMsg(msg->_mousePos)) {
switch (canSummonBot("DoorBot")) {
case SUMMON_CANT:
- _log.addLine("Sadly, it is not possible to summon the DoorBot from this location.", getColor(1));
+ _log.addLine(g_vm->_strings[CANT_SUMMON_DOORBOT], getColor(1));
break;
case SUMMON_CAN:
summonBot("DoorBot");
@@ -181,7 +182,7 @@ bool CPetConversations::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
if (_bellBot.MouseButtonUpMsg(msg->_mousePos)) {
switch (canSummonBot("BellBot")) {
case SUMMON_CANT:
- _log.addLine("Sadly, it is not possible to summon the BellBot from this location.", getColor(1));
+ _log.addLine(g_vm->_strings[CANT_SUMMON_BELLBOT], getColor(1));
break;
case SUMMON_CAN:
summonBot("BellBot");
@@ -277,40 +278,42 @@ void CPetConversations::timerExpired(int val) {
}
void CPetConversations::displayNPCName(CGameObject *npc) {
+ const Strings &strings = g_vm->_strings;
+
if (npc) {
displayMessage(CString());
- CString msg = "Talking to ";
+ CString msg = strings[TALKING_TO];
CString name = npc->getName();
int id = 1;
if (name.contains("Doorbot")) {
- msg += "the DoorBot";
+ msg += strings[DOORBOT_NAME];
} else if (name.contains("Deskbot")) {
id = 2;
- msg += "the DeskBot";
+ msg += strings[DESKBOT_NAME];
} else if (name.contains("LiftBot")) {
id = 3;
- msg += "a LiftBot";
+ msg += strings[LIFTBOT_NAME];
} else if (name.contains("Parrot")) {
id = 4;
- msg += "the Parrot";
+ msg += strings[PARROT_NAME];
} else if (name.contains("BarBot")) {
id = 5;
- msg += "the BarBot";
+ msg += strings[BARBOT_NAME];
} else if (name.contains("ChatterBot")) {
id = 6;
- msg += "a ChatterBot";
+ msg += strings[CHATTERBOT_NAME];
} else if (name.contains("BellBot")) {
id = 7;
- msg += "the BellBot";
+ msg += strings[BELLBOT_NAME];
} else if (name.contains("Maitre")) {
id = 8;
- msg += "the Maitre d'Bot";
+ msg += strings[MAITRED_NAME];
} else if (name.contains("Succubus") || name.contains("Sub")) {
id = 9;
- msg += "a Succ-U-Bus";
+ msg += strings[SUCCUBUS_NAME];
} else {
- msg += "Unknown";
+ msg += strings[UNKNOWN_NAME];
}
_log.setNPC(1, id);
@@ -507,7 +510,7 @@ void CPetConversations::textLineEntered(const CString &textLine) {
if (!inputMsg._response.empty())
_log.addLine(inputMsg._response);
} else {
- _log.addLine("There is no one here to talk to", getColor(1));
+ _log.addLine(g_vm->_strings[NO_ONE_TO_TALK_TO], getColor(1));
}
// Clear input line and scroll log down to end to show response
diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp
index aa756bc941..a33f1163c2 100644
--- a/engines/titanic/pet_control/pet_remote_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp
@@ -24,6 +24,7 @@
#include "titanic/pet_control/pet_remote.h"
#include "titanic/pet_control/pet_control.h"
#include "titanic/messages/pet_messages.h"
+#include "titanic/support/strings.h"
#include "titanic/titanic.h"
namespace Titanic {
@@ -216,7 +217,7 @@ bool CTelevisionControlGlyph::MouseButtonUpMsg(const Point &pt) {
}
void CTelevisionControlGlyph::getTooltip(CPetText *text) {
- text->setText("Television control");
+ text->setText(TELEVISION_CONTROL);
}
/*------------------------------------------------------------------------*/
@@ -280,7 +281,7 @@ bool CEntertainmentDeviceGlyph::MouseButtonUpMsg(const Point &pt) {
}
void CEntertainmentDeviceGlyph::getTooltip(CPetText *text) {
- text->setText("Operate visual entertainment device");
+ text->setText(OPERATE_ENTERTAINMENT);
}
/*------------------------------------------------------------------------*/
@@ -334,7 +335,7 @@ bool COperateLightsGlyph::MouseButtonUpMsg(const Point &pt) {
}
void COperateLightsGlyph::getTooltip(CPetText *text) {
- text->setText("Operate the lights");
+ text->setText(OPERATE_LIGHTS);
}
/*------------------------------------------------------------------------*/
@@ -346,7 +347,7 @@ bool CDeployFloralGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
}
void CDeployFloralGlyph::getTooltip(CPetText *text) {
- text->setText("Deploy floral enhancement");
+ text->setText(DEPLOY_FLORAL_ENHANCEMENT);
}
@@ -359,7 +360,7 @@ bool CDeployFullyRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *own
}
void CDeployFullyRelaxationGlyph::getTooltip(CPetText *text) {
- text->setText("Deploy fully recumbent relaxation device");
+ text->setText(DEPLOY_FULLY_RELAXATION);
}
/*------------------------------------------------------------------------*/
@@ -371,7 +372,7 @@ bool CDeployComfortGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
}
void CDeployComfortGlyph::getTooltip(CPetText *text) {
- text->setText("Deploy comfort workstation");
+ text->setText(DEPLOY_COMFORT_WORKSTATION);
}
/*------------------------------------------------------------------------*/
@@ -383,7 +384,7 @@ bool CDeployMinorStorageGlyph::setup(CPetControl *petControl, CPetGlyphs *owner)
}
void CDeployMinorStorageGlyph::getTooltip(CPetText *text) {
- text->setText("Deploy minor horizontally mobile storage compartment");
+ text->setText(DEPLOY_MINOR_STORAGE);
}
/*------------------------------------------------------------------------*/
@@ -395,7 +396,7 @@ bool CDeployMajorRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *own
}
void CDeployMajorRelaxationGlyph::getTooltip(CPetText *text) {
- text->setText("Deploy major semi-recumbent relaxation device");
+ text->setText(DEPLOY_MAJOR_RELAXATION);
}
/*------------------------------------------------------------------------*/
@@ -407,7 +408,7 @@ bool CInflateRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *owner)
}
void CInflateRelaxationGlyph::getTooltip(CPetText *text) {
- text->setText("Inflate fully recumbent relaxation device ");
+ text->setText(INFLATE_RELAXATION_DEVICE);
}
/*------------------------------------------------------------------------*/
@@ -419,7 +420,7 @@ bool CDeployMaintenanceGlyph::setup(CPetControl *petControl, CPetGlyphs *owner)
}
void CDeployMaintenanceGlyph::getTooltip(CPetText *text) {
- text->setText("Deploy personal maintenance hub");
+ text->setText(DEPLOY_MAINTENANCE_HUB);
}
/*------------------------------------------------------------------------*/
@@ -431,7 +432,7 @@ bool CDeployWorkSurfaceGlyph::setup(CPetControl *petControl, CPetGlyphs *owner)
}
void CDeployWorkSurfaceGlyph::getTooltip(CPetText *text) {
- text->setText("Deploy executive horizontal worksurface");
+ text->setText(DEPLOY_EXECUTIVE_SURFACE);
}
/*------------------------------------------------------------------------*/
@@ -443,7 +444,7 @@ bool CDeployMinorRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *own
}
void CDeployMinorRelaxationGlyph::getTooltip(CPetText *text) {
- text->setText("Deploy minor semi-recumbent relaxation device");
+ text->setText(DEPLOY_MINOR_RELAXATION);
}
/*------------------------------------------------------------------------*/
@@ -455,7 +456,7 @@ bool CDeploySinkGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
}
void CDeploySinkGlyph::getTooltip(CPetText *text) {
- text->setText("Deploy aqueous cleansing receptacle");
+ text->setText(DEPLOY_SINK);
}
/*------------------------------------------------------------------------*/
@@ -467,7 +468,7 @@ bool CDeployMajorStorageGlyph::setup(CPetControl *petControl, CPetGlyphs *owner)
}
void CDeployMajorStorageGlyph::getTooltip(CPetText *text) {
- text->setText("Deploy major horizontally mobile storage compartment");
+ text->setText(DEPLOY_MAJOR_STORAGE);
}
/*------------------------------------------------------------------------*/
@@ -515,7 +516,7 @@ bool CSuccubusDeliveryGlyph::MouseButtonUpMsg(const Point &pt) {
}
void CSuccubusDeliveryGlyph::getTooltip(CPetText *text) {
- text->setText("Succ-U-Bus delivery system control");
+ text->setText(SUCCUBUS_DELIVERY_SYSTEM);
}
/*------------------------------------------------------------------------*/
@@ -554,9 +555,67 @@ bool CNavigationControllerGlyph::MouseButtonUpMsg(const Point &pt) {
}
void CNavigationControllerGlyph::getTooltip(CPetText *text) {
- text->setText("Navigation controller");
+ text->setText(NAVIGATION_CONTROLLER);
}
/*------------------------------------------------------------------------*/
+CSummonElevatorGlyph::CSummonElevatorGlyph() : CBasicRemoteGlyph(
+ "3PetLift", g_vm->_strings[SUMMON_ELEVATOR], "Lift") {
+}
+
+/*------------------------------------------------------------------------*/
+
+CSummonPelleratorGlyph::CSummonPelleratorGlyph() : CBasicRemoteGlyph(
+ "3PetPellerator", g_vm->_strings[SUMMON_PELLERATOR], "Pellerator") {
+}
+
+/*------------------------------------------------------------------------*/
+
+CGotoBottomOfWellGlyph::CGotoBottomOfWellGlyph() : CRemoteGotoGlyph("3PetBotOfWell",
+ g_vm->_strings[GO_TO_BOTTOM_OF_WELL]) {
+}
+
+/*------------------------------------------------------------------------*/
+
+CGotoTopOfWellGlyph::CGotoTopOfWellGlyph() : CRemoteGotoGlyph("3PetTopOfWell",
+ g_vm->_strings[GO_TO_TOP_OF_WELL]) {
+}
+
+/*------------------------------------------------------------------------*/
+
+CGotoStateroomGlyph::CGotoStateroomGlyph() : CRemoteGotoGlyph("3PetRoom",
+ g_vm->_strings[GO_TO_STATEROOM]) {
+}
+
+/*------------------------------------------------------------------------*/
+
+CGotoBarGlyph::CGotoBarGlyph() : CRemoteGotoGlyph("3PetBar",
+ g_vm->_strings[GO_TO_BAR]) {
+}
+
+/*------------------------------------------------------------------------*/
+
+CGotoPromenadeDeckGlyph::CGotoPromenadeDeckGlyph() : CRemoteGotoGlyph("3PetPromDeck",
+ g_vm->_strings[GO_TO_PROMENADE_DECK]) {
+}
+
+/*------------------------------------------------------------------------*/
+
+CGotoArboretumGlyph::CGotoArboretumGlyph() : CRemoteGotoGlyph("3PetArboretum",
+ g_vm->_strings[GO_TO_ARBORETUM]) {
+}
+
+/*------------------------------------------------------------------------*/
+
+CGotoMusicRoomGlyph::CGotoMusicRoomGlyph() : CRemoteGotoGlyph("3PetMusicRoom",
+ g_vm->_strings[GO_TO_MUSIC_ROOM]) {
+}
+
+/*------------------------------------------------------------------------*/
+
+CGotoRestaurantGlyph::CGotoRestaurantGlyph() : CRemoteGotoGlyph("3Pet1stClassRest",
+ g_vm->_strings[GO_TO_1ST_CLASS_RESTAURANT]) {
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_remote_glyphs.h b/engines/titanic/pet_control/pet_remote_glyphs.h
index 6114c81a9f..341f13e035 100644
--- a/engines/titanic/pet_control/pet_remote_glyphs.h
+++ b/engines/titanic/pet_control/pet_remote_glyphs.h
@@ -186,14 +186,12 @@ public:
class CSummonElevatorGlyph : public CBasicRemoteGlyph {
public:
- CSummonElevatorGlyph() : CBasicRemoteGlyph(
- "3PetLift", "Summon Elevator", "Lift") {}
+ CSummonElevatorGlyph();
};
class CSummonPelleratorGlyph : public CBasicRemoteGlyph {
public:
- CSummonPelleratorGlyph() : CBasicRemoteGlyph(
- "3PetPellerator", "Summon Pellerator", "Pellerator") {}
+ CSummonPelleratorGlyph();
};
class CTelevisionControlGlyph : public CPetRemoteGlyph {
@@ -664,50 +662,42 @@ public:
class CGotoBottomOfWellGlyph : public CRemoteGotoGlyph {
public:
- CGotoBottomOfWellGlyph() : CRemoteGotoGlyph("3PetBotOfWell",
- "Go to the Bottom of the Well") {}
+ CGotoBottomOfWellGlyph();
};
class CGotoTopOfWellGlyph : public CRemoteGotoGlyph {
public:
- CGotoTopOfWellGlyph() : CRemoteGotoGlyph("3PetTopOfWell",
- "Go to the Top of the Well") {}
+ CGotoTopOfWellGlyph();
};
class CGotoStateroomGlyph : public CRemoteGotoGlyph {
public:
- CGotoStateroomGlyph() : CRemoteGotoGlyph("3PetRoom",
- "Go to your stateroom") {}
+ CGotoStateroomGlyph();
};
class CGotoBarGlyph : public CRemoteGotoGlyph {
public:
- CGotoBarGlyph() : CRemoteGotoGlyph("3PetBar",
- "Go to the Bar") {}
+ CGotoBarGlyph();
};
class CGotoPromenadeDeckGlyph : public CRemoteGotoGlyph {
public:
- CGotoPromenadeDeckGlyph() : CRemoteGotoGlyph("3PetPromDeck",
- "Go to the Promenade Deck") {}
+ CGotoPromenadeDeckGlyph();
};
class CGotoArboretumGlyph : public CRemoteGotoGlyph {
public:
- CGotoArboretumGlyph() : CRemoteGotoGlyph("3PetArboretum",
- "Go to the Arboretum") {}
+ CGotoArboretumGlyph();
};
class CGotoMusicRoomGlyph : public CRemoteGotoGlyph {
public:
- CGotoMusicRoomGlyph() : CRemoteGotoGlyph("3PetMusicRoom",
- "Go to the Music Room") {}
+ CGotoMusicRoomGlyph();
};
class CGotoRestaurantGlyph : public CRemoteGotoGlyph {
public:
- CGotoRestaurantGlyph() : CRemoteGotoGlyph("3Pet1stClassRest",
- "Go to the First Class Restaurant") {}
+ CGotoRestaurantGlyph();
};
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/pet_control/pet_text.cpp
index a7b794eeb8..7bb0bad16e 100644
--- a/engines/titanic/pet_control/pet_text.cpp
+++ b/engines/titanic/pet_control/pet_text.cpp
@@ -21,6 +21,7 @@
*/
#include "titanic/pet_control/pet_text.h"
+#include "titanic/titanic.h"
namespace Titanic {
@@ -212,6 +213,10 @@ void CPetText::setText(const CString &str) {
appendText(str);
}
+void CPetText::setText(StringId stringId) {
+ setText(g_vm->_strings[stringId]);
+}
+
void CPetText::appendText(const CString &str) {
int lineSize = _array[_lineCount]._line.size();
int strSize = str.size();
diff --git a/engines/titanic/pet_control/pet_text.h b/engines/titanic/pet_control/pet_text.h
index 671ab4b916..9b2f47274c 100644
--- a/engines/titanic/pet_control/pet_text.h
+++ b/engines/titanic/pet_control/pet_text.h
@@ -136,6 +136,11 @@ public:
void setText(const CString &str);
/**
+ * Set the text
+ */
+ void setText(StringId stringId);
+
+ /**
* Set text color
*/
void setColor(uint col);
diff --git a/engines/titanic/support/strings.cpp b/engines/titanic/support/strings.cpp
index 7664b6849b..a8ab45800f 100644
--- a/engines/titanic/support/strings.cpp
+++ b/engines/titanic/support/strings.cpp
@@ -25,7 +25,7 @@
namespace Titanic {
-Strings::Strings() {
+void Strings::load() {
Common::SeekableReadStream *r = g_vm->_filesManager->getResource("TEXT/STRINGS");
while (r->pos() < r->size())
push_back(readStringFromStream(r));
diff --git a/engines/titanic/support/strings.h b/engines/titanic/support/strings.h
index 5164897522..2a184356e6 100644
--- a/engines/titanic/support/strings.h
+++ b/engines/titanic/support/strings.h
@@ -86,6 +86,56 @@ enum StringId {
NICE_IF_TAKE_BUT_CANT,
BOWL_OF_NUTS,
NOT_A_BOWL_OF_NUTS,
+ CANT_SUMMON_DOORBOT,
+ CANT_SUMMON_BELLBOT,
+ NO_ONE_TO_TALK_TO,
+ TALKING_TO,
+ DOORBOT_NAME,
+ DESKBOT_NAME,
+ LIFTBOT_NAME,
+ PARROT_NAME,
+ BARBOT_NAME,
+ CHATTERBOT_NAME,
+ BELLBOT_NAME,
+ MAITRED_NAME,
+ SUCCUBUS_NAME,
+ UNKNOWN_NAME,
+ ARM_ALREADY_HOLDING,
+ YOU_CANT_GET_THIS,
+ DOESNT_DO_ANYTHING,
+ DOESNT_WANT_THIS,
+ DOES_NOT_REACH,
+ CHICKEN_ALREADY_CLEAN,
+ HOSE_INCOMPATIBLE,
+ INCORRECTLY_CALIBRATED,
+ GONDOLIERS_FIRST_CLASS_ONLY,
+ NOTHING_ON_CHANNEL,
+ TELEVISION_CONTROL,
+ OPERATE_ENTERTAINMENT,
+ OPERATE_LIGHTS,
+ DEPLOY_FLORAL_ENHANCEMENT,
+ DEPLOY_FULLY_RELAXATION,
+ DEPLOY_COMFORT_WORKSTATION,
+ DEPLOY_MINOR_STORAGE,
+ DEPLOY_MAJOR_RELAXATION,
+ INFLATE_RELAXATION_DEVICE,
+ DEPLOY_MAINTENANCE_HUB,
+ DEPLOY_EXECUTIVE_SURFACE,
+ DEPLOY_MINOR_RELAXATION,
+ DEPLOY_SINK,
+ DEPLOY_MAJOR_STORAGE,
+ SUCCUBUS_DELIVERY_SYSTEM,
+ NAVIGATION_CONTROLLER,
+ SUMMON_ELEVATOR,
+ SUMMON_PELLERATOR,
+ GO_TO_BOTTOM_OF_WELL,
+ GO_TO_TOP_OF_WELL,
+ GO_TO_STATEROOM,
+ GO_TO_BAR,
+ GO_TO_PROMENADE_DECK,
+ GO_TO_ARBORETUM,
+ GO_TO_MUSIC_ROOM,
+ GO_TO_1ST_CLASS_RESTAURANT,
// German version only
DE_SUMMER,
@@ -139,7 +189,7 @@ enum StringId {
class Strings : public Common::StringArray {
public:
- Strings();
+ void load();
};
} // End of namespace Titanic
diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp
index 88cc25af43..29730c36c8 100644
--- a/engines/titanic/titanic.cpp
+++ b/engines/titanic/titanic.cpp
@@ -107,6 +107,7 @@ void TitanicEngine::initialize() {
_screen = new Graphics::Screen(0, 0);
_screenManager = new OSScreenManager(this);
_window = new CMainGameWindow(this);
+ _strings.load();
setItemNames();
setRoomNames();
diff --git a/engines/titanic/titanic.h b/engines/titanic/titanic.h
index b0776c55a5..d8e0f880f7 100644
--- a/engines/titanic/titanic.h
+++ b/engines/titanic/titanic.h
@@ -122,6 +122,7 @@ public:
CString _itemObjects[TOTAL_ITEMS];
StringArray _itemIds;
StringArray _roomNames;
+ Strings _strings;
public:
TitanicEngine(OSystem *syst, const TitanicGameDescription *gameDesc);
virtual ~TitanicEngine();