[Scummvm-git-logs] scummvm master -> 207afb6f462fadbe48d4ec298ce7c30ea5c874f0

dreammaster dreammaster at scummvm.org
Sun Sep 11 17:34:17 CEST 2016


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
df4dadb5a6 DEVTOOLS: Beginnings of German strings list in create_titanic
207afb6f46 TITANIC: In progress work on German Translation view in PET


Commit: df4dadb5a6354d5962597d27a117a9fe53b35891
    https://github.com/scummvm/scummvm/commit/df4dadb5a6354d5962597d27a117a9fe53b35891
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-09-11T11:33:27-04:00

Commit Message:
DEVTOOLS: Beginnings of German strings list in create_titanic

Changed paths:
  A engines/titanic/pet_control/pet_translation.cpp
  A engines/titanic/pet_control/pet_translation.h
  R engines/titanic/pet_control/pet_message.cpp
  R engines/titanic/pet_control/pet_message.h
    devtools/create_titanic/create_titanic_dat.cpp



diff --git a/devtools/create_titanic/create_titanic_dat.cpp b/devtools/create_titanic/create_titanic_dat.cpp
index 6bbf8b1..c32b3c9 100644
--- a/devtools/create_titanic/create_titanic_dat.cpp
+++ b/devtools/create_titanic/create_titanic_dat.cpp
@@ -479,6 +479,131 @@ static const char *const STRINGS_EN[] = {
 	"Not a bowl of pistachio nuts."
 };
 
+static const char *const STRINGS_DE[] = {
+	"",
+	"You are standing outside the Pellerator.",
+	"I'm sorry, you cannot enter this pellerator at present as a bot is in the way.",
+	"The Succ-U-Bus is in Standby, or \"Off\" mode at present.",
+	"There is currently nothing to deliver.",
+	"There is currently nothing in the tray to send.",
+	"The Succ-U-Bus is a Single Entity Delivery Device.",
+	"Chickens are allocated on a one-per-customer basis.",
+	"Only one piece of chicken per passenger. Thank you.",
+	"You have been upgraded to 1st Class status. Enjoy hugely.",
+	"You have been upgraded to 2nd Class status. Enjoy.",
+	"This room is reserved for the exclusive use of first class passengers."
+	" That does not currently include you",
+	"No losers.",
+	"Passengers of your class are not permitted to enter this area.",
+	"Please exit from the other side.",
+	"For mysterious and unknowable reasons, this transport is temporarily out of order.",
+	"Unfortunately this fan controller has blown a fuse.",
+	"In case of emergency hammer requirement, poke with long stick.",
+	"This stick is too short to reach the branches.",
+	"You are standing outside Elevator %d",
+	"I'm sorry, you cannot enter this elevator at present as a bot is in the way.",
+	"This elevator is currently in an advanced state of non-functionality.",
+	"That light appears to be loose.",
+	"Lumi-Glow(tm) Lights.  They glow in the dark!",
+	"You already have one.",
+	"'This glass is totally and utterly unbreakable.",
+	"For emergency long stick, smash glass.",
+	"This dispenser has suddenly been fitted with unbreakable glass "
+	"to prevent unseemly hoarding of sticks.",
+	"The Chicken is already quite clean enough, thank you.",
+	"Now would be an excellent opportunity to adjust your viewing apparatus.",
+	"You cannot take this because the cage is locked shut.",
+	"You are already at your chosen destination.",
+	"Passengers of your class are not permitted to enter this area.",
+	"Sorry, you must be at least 3rd class before you can summon for help.",
+	"You have not assigned a room to go to.",
+	"Sorry, this elevator does not go below floor 27.",
+	"You must select a game to load first.",
+	"You must select a game to save first.",
+	"Please supply Galactic reference material.",
+	"This is the restaurant music system.  It appears to be locked.",
+	"You can't pick this up on account of it being stuck to the branch.",
+	"You cannot get this, it is frozen to the branch.",
+	"Please check in at the reception desk.",
+	"This foodstuff is already sufficiently garnished.",
+	"Sadly, this dispenser is currently empty.",
+	"Please place food source beneath dispenser for sauce delivery.",
+	"The Seasonal Adjustment switch is not operational at the present time.",
+	"This is your stateroom. It is for sleeping. If you desire "
+	"entertainment or relaxation, please visit your local leisure lounge.",
+	"The bed will not currently support your weight."
+	" We are working on this problem but are unlikely to be able to fix it.",
+	"This is not your assigned room. Please do not enjoy.",
+	"Sadly, this is out of your reach.",
+	"The Succ-U-Bus is a Single Entity Delivery Device.",
+	"Sadly, the Grand Canal transport system is closed for the winter.",
+	"This area is off limits to passengers.",
+	"Go where?",
+	"It would be nice if you could take that but you can't.",
+	"A bowl of pistachio nuts.",
+	"Not a bowl of pistachio nuts.",
+	
+	"Sommer",
+	"Herbst",
+	"Winter",
+	"Fr\0xFC" "nhling",
+	"Sn'ood",
+	"J'af'ah",
+	"Bitta",
+	"Fr\0xAA" "ic",
+	"Pflanzen bitte nicht ber\0xFC" "nhren.",
+	"!\0xBC" "ta'\0xAD" "ta! !T\0xAA" "z n\0xAA" " sappibundli t\0xAA"
+		"cn\0xAA" "z!",
+	
+	"Stop",
+	"!Hanaz!",
+	"VorwSrts",
+	"!Panaz!",
+	"T\0xAA" "z k'b\0xAA" "z",
+	"Ein wenig herumkurven",
+	"Otundo a\0x92" " doom\0xAA" "n n\0x92" "sanza",
+	"Sinnlose Drehung des Steuerrads",
+	"!0xBC" "ta\0x92\0xAD" "ta!  T\0xAA""z vidsta\0x92" "jaha i\0xAC"
+		"in\0x92" "qu\0xAA" " m\0xAA" "n\0xAA" "z",
+	"Sternenpanorama des Reiseziels hier einf\0xFC" "ngen.",
+
+	"V'lo\0xAC",
+	"Geschwindigkeit",
+	"Pan",
+	"Ein",
+	"Han",
+	"Aus",
+	"Turgo",
+	"Langsam",
+	"Pido",
+	"Schnell",
+
+	"\0xBC" "lu\0xAD" " q\0xB0 scu'b\0xAA" "rri",
+	"H\0xFC" "hnchen a la sauce tomate",
+	"\0xBC" "lu\0xAD" " q\0xB0 scu'jajaja",
+	"H0xFC" "hnchen a la sauce moutarde",
+	"\0xBC" "lu0xAD q\0xB0 scu'\0xAD" "lu\0xAD",
+	"H\0xFC" "hnchen a la sauce 'Vogel'",
+	"\0xBC" "lu\0xAD" " sanza scu, n\0xAA n\0xAA n\0xAA",
+	"H\0xFC" "hnchen bar jeglicher sauce",
+
+	"!\0xB2" "la! !\0xB2" "la!  !!!Sizzlo ab\0x92\0xAA\0xAA" "o s\0xAA"
+		"nza cr\0xAA" "dibo!!!  N\0xAA" "nto p\0xAA" "rificio i\0xAC" "ind\0xAA",
+	"Achtung, Lebensgefahr. Unglaublich hohe Voltzahl!!! Innen keine "
+		"artungsbed\0xFC" "rftigen Teile vorhanden.",
+	"!!!Birin\0xAC" "i sp\0xAA" "culato t\0xAA" "z n\0xAA n\0xAA n\0xAA"
+		" ouvraditiniz!  J\0x92" "in n\0xAA n\0xAA upraximus stifibilimus"
+		" j\0x92" "in sigorto funct",
+	"Sie hStten die erste Kontrollt\0xFC" "r nicht \0xF6"
+		"ffnen sollen! Dies ist nicht nur ungeheuer gef\0xE4"
+		"hrlich, Sie verlieren auch jegliche Garantie-Anspr\0xFC" "che.",
+	"!T\0xAA" "z n\0xAA bleabaz t\0xAA" "z n\0xAA j\0x92" "abaz!  Coco?",
+	"Und sagen Sie hinterher blo\0xFC nicht, niemand hStte Sie gewarnt.",
+	"Pin\0xAA" "z-pin\0xAA" "z stot \0xAF" "r\0xB0 jibbli",
+	"Dr\0xFC" "cken Sie den Knopf um die Bombe zu entschSrfen."
+
+};
+
 void NORETURN_PRE error(const char *s, ...) {
 	printf("%s\n", s);
 	exit(1);
diff --git a/engines/titanic/pet_control/pet_message.cpp b/engines/titanic/pet_control/pet_message.cpp
deleted file mode 100644
index 783c901..0000000
--- a/engines/titanic/pet_control/pet_message.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "titanic/pet_control/pet_message.h"
-
-namespace Titanic {
-
-CPetMessage::CPetMessage() {
-	Rect rect1(0, 0, 580, 70);
-	rect1.translate(32, 368);
-	_message.setBounds(rect1);
-	_message.resize(50);
-	_message.setHasBorder(false);
-
-	Rect rect2(0, 0, 580, 15);
-	rect2.translate(32, 445);
-	_tooltip.setBounds(rect2);
-	_tooltip.setHasBorder(false);
-}
-
-bool CPetMessage::setup(CPetControl *petControl) {
-	if (petControl && setupControl(petControl))
-		return reset();
-	return false;
-}
-
-void CPetMessage::draw(CScreenManager *screenManager) {
-	_message.draw(screenManager);
-	_tooltip.draw(screenManager);
-}
-
-bool CPetMessage::setupControl(CPetControl *petControl) {
-	if (petControl)
-		_petControl = petControl;
-	return true;
-}
-
-} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_message.h b/engines/titanic/pet_control/pet_message.h
deleted file mode 100644
index 499f274..0000000
--- a/engines/titanic/pet_control/pet_message.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef TITANIC_PET_MESSAGE_H
-#define TITANIC_PET_MESSAGE_H
-
-#include "titanic/pet_control/pet_section.h"
-#include "titanic/pet_control/pet_text.h"
-
-namespace Titanic {
-
-class CPetMessage : public CPetSection {
-private:
-	CPetText _message;
-	CPetText _tooltip;
-private:
-	/**
-	 * Setup the control
-	 */
-	bool setupControl(CPetControl *petControl);
-public:
-	CPetMessage();
-
-	/**
-	 * Sets up the section
-	 */
-	virtual bool setup(CPetControl *petControl);
-	
-	/**
-	 * Reset the section
-	 */
-	virtual bool reset() { return true; }
-
-	/**
-	 * Draw the section
-	 */
-	virtual void draw(CScreenManager *screenManager);
-	
-	/**
-	 * Following are handlers for the various messages that the PET can
-	 * pass onto the currently active section/area
-	 */
-	virtual bool MouseButtonDownMsg(CMouseButtonDownMsg *msg) { return false; }
-	virtual bool MouseButtonUpMsg(CMouseButtonUpMsg *msg) { return false; }
-
-	/**
-	 * Returns true if the object is in a valid state
-	 */
-	virtual bool isValid(CPetControl *petControl) {
-		return setupControl(petControl);
-	}
-
-	/**
-	 * Load the data for the class from file
-	 */
-	virtual void load(SimpleFile *file, int param) {}
-
-	/**
-	 * Called after a game has been loaded
-	 */
-	virtual void postLoad() { reset(); }
-
-	/**
-	 * Save the data for the class to file
-	 */
-	virtual void save(SimpleFile *file, int indent) {}
-
-	/**
-	 * Get a reference to the tooltip text associated with the section
-	 */
-	virtual CPetText *getText() { return &_tooltip; }
-
-};
-
-} // End of namespace Titanic
-
-#endif /* TITANIC_PET_MESSAGE_H */
diff --git a/engines/titanic/pet_control/pet_translation.cpp b/engines/titanic/pet_control/pet_translation.cpp
new file mode 100644
index 0000000..783c901
--- /dev/null
+++ b/engines/titanic/pet_control/pet_translation.cpp
@@ -0,0 +1,57 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "titanic/pet_control/pet_message.h"
+
+namespace Titanic {
+
+CPetMessage::CPetMessage() {
+	Rect rect1(0, 0, 580, 70);
+	rect1.translate(32, 368);
+	_message.setBounds(rect1);
+	_message.resize(50);
+	_message.setHasBorder(false);
+
+	Rect rect2(0, 0, 580, 15);
+	rect2.translate(32, 445);
+	_tooltip.setBounds(rect2);
+	_tooltip.setHasBorder(false);
+}
+
+bool CPetMessage::setup(CPetControl *petControl) {
+	if (petControl && setupControl(petControl))
+		return reset();
+	return false;
+}
+
+void CPetMessage::draw(CScreenManager *screenManager) {
+	_message.draw(screenManager);
+	_tooltip.draw(screenManager);
+}
+
+bool CPetMessage::setupControl(CPetControl *petControl) {
+	if (petControl)
+		_petControl = petControl;
+	return true;
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_translation.h b/engines/titanic/pet_control/pet_translation.h
new file mode 100644
index 0000000..499f274
--- /dev/null
+++ b/engines/titanic/pet_control/pet_translation.h
@@ -0,0 +1,96 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef TITANIC_PET_MESSAGE_H
+#define TITANIC_PET_MESSAGE_H
+
+#include "titanic/pet_control/pet_section.h"
+#include "titanic/pet_control/pet_text.h"
+
+namespace Titanic {
+
+class CPetMessage : public CPetSection {
+private:
+	CPetText _message;
+	CPetText _tooltip;
+private:
+	/**
+	 * Setup the control
+	 */
+	bool setupControl(CPetControl *petControl);
+public:
+	CPetMessage();
+
+	/**
+	 * Sets up the section
+	 */
+	virtual bool setup(CPetControl *petControl);
+	
+	/**
+	 * Reset the section
+	 */
+	virtual bool reset() { return true; }
+
+	/**
+	 * Draw the section
+	 */
+	virtual void draw(CScreenManager *screenManager);
+	
+	/**
+	 * Following are handlers for the various messages that the PET can
+	 * pass onto the currently active section/area
+	 */
+	virtual bool MouseButtonDownMsg(CMouseButtonDownMsg *msg) { return false; }
+	virtual bool MouseButtonUpMsg(CMouseButtonUpMsg *msg) { return false; }
+
+	/**
+	 * Returns true if the object is in a valid state
+	 */
+	virtual bool isValid(CPetControl *petControl) {
+		return setupControl(petControl);
+	}
+
+	/**
+	 * Load the data for the class from file
+	 */
+	virtual void load(SimpleFile *file, int param) {}
+
+	/**
+	 * Called after a game has been loaded
+	 */
+	virtual void postLoad() { reset(); }
+
+	/**
+	 * Save the data for the class to file
+	 */
+	virtual void save(SimpleFile *file, int indent) {}
+
+	/**
+	 * Get a reference to the tooltip text associated with the section
+	 */
+	virtual CPetText *getText() { return &_tooltip; }
+
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_PET_MESSAGE_H */


Commit: 207afb6f462fadbe48d4ec298ce7c30ea5c874f0
    https://github.com/scummvm/scummvm/commit/207afb6f462fadbe48d4ec298ce7c30ea5c874f0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-09-11T11:34:06-04:00

Commit Message:
TITANIC: In progress work on German Translation view in PET

Changed paths:
  A engines/titanic/pet_control/pet_show_translation.cpp
  A engines/titanic/pet_control/pet_show_translation.h
    engines/titanic/core/saveable_object.cpp
    engines/titanic/module.mk
    engines/titanic/pet_control/pet_control.cpp
    engines/titanic/pet_control/pet_control.h
    engines/titanic/pet_control/pet_frame.cpp
    engines/titanic/pet_control/pet_section.h
    engines/titanic/pet_control/pet_text.cpp
    engines/titanic/pet_control/pet_text.h
    engines/titanic/pet_control/pet_translation.cpp
    engines/titanic/pet_control/pet_translation.h
    engines/titanic/support/strings.h



diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp
index d74f9a2..f84ca23 100644
--- a/engines/titanic/core/saveable_object.cpp
+++ b/engines/titanic/core/saveable_object.cpp
@@ -385,6 +385,8 @@
 #include "titanic/pet_control/pet_pannel1.h"
 #include "titanic/pet_control/pet_pannel2.h"
 #include "titanic/pet_control/pet_pannel3.h"
+#include "titanic/pet_control/pet_show_translation.h"
+#include "titanic/pet_control/pet_translation.h"
 
 #include "titanic/sound/auto_music_player.h"
 #include "titanic/sound/auto_music_player_base.h"
@@ -738,6 +740,7 @@ DEFFN(CPetModePanel);
 DEFFN(CPetPannel1);
 DEFFN(CPetPannel2);
 DEFFN(CPetPannel3);
+DEFFN(CPetShowTranslation);
 DEFFN(CSendToSucc);
 DEFFN(CSGTSelector);
 DEFFN(CSliderButton);
@@ -1328,6 +1331,7 @@ void CSaveableObject::initClassList() {
 	ADDFN(CPetPannel1, CPetGraphic);
 	ADDFN(CPetPannel2, CPetGraphic);
 	ADDFN(CPetPannel3, CPetGraphic);
+	ADDFN(CPetShowTranslation, CGameObject);
 	ADDFN(CSendToSucc, CToggleSwitch);
 	ADDFN(CSGTSelector, CPetGraphic);
 	ADDFN(CSliderButton, CSTButton);
diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk
index 798d81d..377a22f 100644
--- a/engines/titanic/module.mk
+++ b/engines/titanic/module.mk
@@ -372,7 +372,6 @@ MODULE_OBJS := \
 	pet_control/pet_gfx_element.o \
 	pet_control/pet_inventory.o \
 	pet_control/pet_inventory_glyphs.o \
-	pet_control/pet_message.o \
 	pet_control/pet_starfield.o \
 	pet_control/pet_real_life.o \
 	pet_control/pet_remote.o \
@@ -380,6 +379,7 @@ MODULE_OBJS := \
 	pet_control/pet_rooms.o \
 	pet_control/pet_rooms_glyphs.o \
 	pet_control/pet_section.o \
+	pet_control/pet_translation.o \
 	pet_control/pet_drag_chev.o \
 	pet_control/pet_graphic2.o \
 	pet_control/pet_graphic.o \
@@ -395,6 +395,7 @@ MODULE_OBJS := \
 	pet_control/pet_pannel3.o \
 	pet_control/pet_quit.o \
 	pet_control/pet_save.o \
+	pet_control/pet_show_translation.o \
 	pet_control/pet_slider.o \
 	pet_control/pet_sound.o \
 	pet_control/pet_text.o \
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index 2ab30af..95438ce 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());
 }
diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h
index c4b6545..454fc09 100644
--- a/engines/titanic/pet_control/pet_control.h
+++ b/engines/titanic/pet_control/pet_control.h
@@ -31,7 +31,7 @@
 #include "titanic/pet_control/pet_conversations.h"
 #include "titanic/pet_control/pet_frame.h"
 #include "titanic/pet_control/pet_inventory.h"
-#include "titanic/pet_control/pet_message.h"
+#include "titanic/pet_control/pet_translation.h"
 #include "titanic/pet_control/pet_starfield.h"
 #include "titanic/pet_control/pet_real_life.h"
 #include "titanic/pet_control/pet_remote.h"
@@ -61,7 +61,7 @@ private:
 	CPetRemote _remote;
 	CPetRooms _rooms;
 	CPetRealLife _realLife;
-	CPetMessage _message;
+	CPetTranslation _translation;
 	CPetFrame _frame;
 	CString _activeNPCName;
 	CString _remoteTargetName;
@@ -242,6 +242,16 @@ public:
 	void displayMessage(const CString &str, int param = 0) const;
 
 	/**
+	 * Switches to the Translation display, and adds a line to it's content
+	 */
+	void addTranslation(StringId id1, StringId id2);
+
+	/**
+	 * Clears the translation display
+	 */
+	void clearTranslation();
+
+	/**
 	 * Get the first game object stored in the PET
 	 */
 	CGameObject *getFirstObject() const;
diff --git a/engines/titanic/pet_control/pet_frame.cpp b/engines/titanic/pet_control/pet_frame.cpp
index bc1a8e9..7375c69 100644
--- a/engines/titanic/pet_control/pet_frame.cpp
+++ b/engines/titanic/pet_control/pet_frame.cpp
@@ -126,7 +126,7 @@ bool CPetFrame::setPetControl(CPetControl *petControl) {
 
 void CPetFrame::setArea(PetArea newArea) {
 	resetArea();
-	if (newArea < PET_MESSAGE)
+	if (newArea < PET_TRANSLATION)
 		_modeButtons[PET_AREAS[newArea]].setMode(MODE_SELECTED);
 }
 
diff --git a/engines/titanic/pet_control/pet_section.h b/engines/titanic/pet_control/pet_section.h
index 8bc427e..dc2f70b 100644
--- a/engines/titanic/pet_control/pet_section.h
+++ b/engines/titanic/pet_control/pet_section.h
@@ -30,7 +30,7 @@ namespace Titanic {
 
 enum PetArea {
 	PET_INVENTORY = 0, PET_CONVERSATION = 1, PET_REMOTE = 2,
-	PET_ROOMS = 3, PET_REAL_LIFE = 4, PET_STARFIELD = 5, PET_MESSAGE = 6
+	PET_ROOMS = 3, PET_REAL_LIFE = 4, PET_STARFIELD = 5, PET_TRANSLATION = 6
 };
 
 class CPetControl;
diff --git a/engines/titanic/pet_control/pet_show_translation.cpp b/engines/titanic/pet_control/pet_show_translation.cpp
new file mode 100644
index 0000000..2a3b024
--- /dev/null
+++ b/engines/titanic/pet_control/pet_show_translation.cpp
@@ -0,0 +1,128 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "titanic/pet_control/pet_show_translation.h"
+#include "titanic/pet_control/pet_control.h"
+
+namespace Titanic {
+
+BEGIN_MESSAGE_MAP(CPetShowTranslation, CGameObject)
+	ON_MESSAGE(EnterViewMsg)
+	ON_MESSAGE(LeaveViewMsg)
+	ON_MESSAGE(ChangeSeasonMsg)
+	ON_MESSAGE(ArboretumGateMsg)
+END_MESSAGE_MAP()
+
+
+void CPetShowTranslation::save(SimpleFile *file, int indent) {
+	file->writeNumberLine(1, indent);
+	CGameObject::save(file, indent);
+}
+
+void CPetShowTranslation::load(SimpleFile *file) {
+	file->readNumber();
+	CGameObject::load(file);
+}
+
+bool CPetShowTranslation::EnterViewMsg(CEnterViewMsg *msg) {
+	CPetControl *pet = getPetControl();
+	if (!pet)
+		return true;
+
+	CString viewName = getFullViewName();
+	CString nodeView = msg->_newView->getNodeViewName();
+
+	if (viewName == "Arboretum.Node 2.N" || viewName == "FrozenArboretum.Node 2.N") {
+		switch (stateGetSeason()) {
+		case SEASON_SUMMER:
+			pet->addTranslation(DE_SUMMER_ARBORETUM, DE_SUMMER);
+			break;
+
+		case SEASON_AUTUMN:
+			pet->addTranslation(DE_AUTUMN_ARBORETUM, DE_AUTUMN);
+			break;
+
+		case SEASON_WINTER:
+			pet->addTranslation(DE_WINTER_ARBORETUM, DE_WINTER);
+			break;
+
+		case SEASON_SPRING:
+			pet->addTranslation(DE_SPRING_ARBORETUM, DE_SPRING);
+			break;
+
+		default:
+			break;
+		}
+
+		pet->addTranslation(DE_ARBORETUM_MSG1, DE_ARBORETUM_MSG2);
+	} else if (compareRoomNameTo("Bridge")) {
+		if (nodeView == "Node 3.N") {
+			pet->addTranslation(DE_BRIDGE_MSG1, DE_BRIDGE_MSG2);
+			pet->addTranslation(DE_BRIDGE_MSG3, DE_BRIDGE_MSG4);
+			pet->addTranslation(DE_BRIDGE_MSG5, DE_BRIDGE_MSG6);
+			pet->addTranslation(DE_BRIDGE_MSG7, DE_BRIDGE_MSG8);
+		} else if (nodeView == "Node 4.N") {
+			pet->addTranslation(DE_BRIDGE_MSG9, DE_BRIDGE_MSG10);
+		}
+	} else if (compareRoomNameTo("PromenadeDeck")) {
+		if (nodeView == "Node 2.S") {
+			pet->addTranslation(DE_PROMENADE_DECK_MSG1, DE_PROMENADE_DECK_MSG2);
+			pet->addTranslation(DE_PROMENADE_DECK_MSG3, DE_PROMENADE_DECK_MSG4);
+			pet->addTranslation(DE_PROMENADE_DECK_MSG5, DE_PROMENADE_DECK_MSG6);
+			pet->addTranslation(DE_PROMENADE_DECK_MSG7, DE_PROMENADE_DECK_MSG8);
+			pet->addTranslation(DE_PROMENADE_DECK_MSG9, DE_PROMENADE_DECK_MSG10);
+		}
+	} else if (compareRoomNameTo("SgtLobby")) {
+		if (nodeView == "Node 17.S") {
+			pet->addTranslation(DE_SGTLOBBY_MSG1, DE_SGTLOBBY_MSG2);
+			pet->addTranslation(DE_SGTLOBBY_MSG3, DE_SGTLOBBY_MSG4);
+			pet->addTranslation(DE_SGTLOBBY_MSG5, DE_SGTLOBBY_MSG6);
+			pet->addTranslation(DE_SGTLOBBY_MSG7, DE_SGTLOBBY_MSG8);
+		}
+	} else if (compareRoomNameTo("Titania")) {
+		if (nodeView == "Node 9.N") {
+			pet->addTranslation(DE_TITANIA_MSG1, DE_TITANIA_MSG2);
+		} else if (nodeView == "Node 10.N") {
+			pet->addTranslation(DE_TITANIA_MSG3, DE_TITANIA_MSG4);
+		} else if (nodeView == "Node 11.N") {
+			pet->addTranslation(DE_TITANIA_MSG5, DE_TITANIA_MSG6);
+		} else if (nodeView == "Node 13.N") {
+			pet->addTranslation(DE_TITANIA_MSG7, DE_TITANIA_MSG8);
+		}
+	}
+
+	return true;
+}
+
+bool CPetShowTranslation::LeaveViewMsg(CLeaveViewMsg *msg) {
+	return true;
+}
+
+bool CPetShowTranslation::ChangeSeasonMsg(CChangeSeasonMsg *msg) {
+	return true;
+}
+
+bool CPetShowTranslation::ArboretumGateMsg(CArboretumGateMsg *msg) {
+	return true;
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_show_translation.h b/engines/titanic/pet_control/pet_show_translation.h
new file mode 100644
index 0000000..cef9708
--- /dev/null
+++ b/engines/titanic/pet_control/pet_show_translation.h
@@ -0,0 +1,57 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef TITANIC_PET_SHOW_TRANSLATION_H
+#define TITANIC_PET_SHOW_TRANSLATION_H
+
+#include "titanic/core/game_object.h"
+
+namespace Titanic {
+
+/**
+ * Used by the German version to show contextual translation of
+ * English background text throughout the game
+ */
+class CPetShowTranslation: public CGameObject {
+	DECLARE_MESSAGE_MAP;
+	bool EnterViewMsg(CEnterViewMsg *msg);
+	bool LeaveViewMsg(CLeaveViewMsg *msg);
+	bool ChangeSeasonMsg(CChangeSeasonMsg *msg);
+	bool ArboretumGateMsg(CArboretumGateMsg *msg);
+public:
+	CLASSDEF;
+	CPetShowTranslation() : CGameObject() {}
+
+	/**
+	 * Save the data for the class to file
+	 */
+	virtual void save(SimpleFile *file, int indent);
+
+	/**
+	 * Load the data for the class from file
+	 */
+	virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_PET_SHOW_TRANSLATION_H */
diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/pet_control/pet_text.cpp
index 32a6a9a..2c20396 100644
--- a/engines/titanic/pet_control/pet_text.cpp
+++ b/engines/titanic/pet_control/pet_text.cpp
@@ -61,6 +61,11 @@ void CPetText::setLineColor(uint lineNum, uint col) {
 }
 
 void CPetText::setLineColor(uint lineNum, byte r, byte g, byte b) {
+	_array[lineNum]._rgb = getColorText(r, g, b);
+	_stringsMerged = false;
+}
+
+CString CPetText::getColorText(byte r, byte g, byte b) {
 	char buffer[6];
 	if (!r)
 		r = 1;
@@ -75,9 +80,8 @@ void CPetText::setLineColor(uint lineNum, byte r, byte g, byte b) {
 	buffer[3] = b;
 	buffer[4] = TEXTCMD_SET_COLOR;
 	buffer[5] = '\0';
-	_array[lineNum]._rgb = buffer;
 
-	_stringsMerged = false;
+	return CString(buffer);
 }
 
 void CPetText::load(SimpleFile *file, int param) {
diff --git a/engines/titanic/pet_control/pet_text.h b/engines/titanic/pet_control/pet_text.h
index ba199a3..0a6bb2d 100644
--- a/engines/titanic/pet_control/pet_text.h
+++ b/engines/titanic/pet_control/pet_text.h
@@ -151,6 +151,11 @@ public:
 	void setLineColor(uint lineNum, byte r, byte g, byte b);
 
 	/**
+	 * Gets the text string representing a color encoding
+	 */
+	static CString getColorText(byte r, byte g, byte b);
+
+	/**
 	 * Set the color for a line
 	 */
 	void setLineColor(uint lineNum, uint col);
diff --git a/engines/titanic/pet_control/pet_translation.cpp b/engines/titanic/pet_control/pet_translation.cpp
index 783c901..fe6c37c 100644
--- a/engines/titanic/pet_control/pet_translation.cpp
+++ b/engines/titanic/pet_control/pet_translation.cpp
@@ -20,11 +20,12 @@
  *
  */
 
-#include "titanic/pet_control/pet_message.h"
+#include "titanic/pet_control/pet_translation.h"
+#include "titanic/pet_control/pet_control.h"
 
 namespace Titanic {
 
-CPetMessage::CPetMessage() {
+CPetTranslation::CPetTranslation() {
 	Rect rect1(0, 0, 580, 70);
 	rect1.translate(32, 368);
 	_message.setBounds(rect1);
@@ -37,21 +38,33 @@ CPetMessage::CPetMessage() {
 	_tooltip.setHasBorder(false);
 }
 
-bool CPetMessage::setup(CPetControl *petControl) {
+bool CPetTranslation::setup(CPetControl *petControl) {
 	if (petControl && setupControl(petControl))
 		return reset();
 	return false;
 }
 
-void CPetMessage::draw(CScreenManager *screenManager) {
+void CPetTranslation::draw(CScreenManager *screenManager) {
 	_message.draw(screenManager);
 	_tooltip.draw(screenManager);
 }
 
-bool CPetMessage::setupControl(CPetControl *petControl) {
+bool CPetTranslation::setupControl(CPetControl *petControl) {
 	if (petControl)
 		_petControl = petControl;
 	return true;
 }
 
+void CPetTranslation::clearTranslation() {
+	_message.setup();
+}
+
+void CPetTranslation::addTranslation(const CString &str1, const CString &str2) {
+	CString msg = CString::format("%s%s - %s%s",
+		CPetText::getColorText(0, 0x80, 0).c_str(), str1.c_str(),
+		CPetText::getColorText(0, 0, 0).c_str(), str2.c_str());
+	_message.addLine(msg);
+	_petControl->makeDirty();
+}
+
 } // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_translation.h b/engines/titanic/pet_control/pet_translation.h
index 499f274..2fcc758 100644
--- a/engines/titanic/pet_control/pet_translation.h
+++ b/engines/titanic/pet_control/pet_translation.h
@@ -20,15 +20,15 @@
  *
  */
 
-#ifndef TITANIC_PET_MESSAGE_H
-#define TITANIC_PET_MESSAGE_H
+#ifndef TITANIC_PET_TRANSLATION_H
+#define TITANIC_PET_TRANSLATION_H
 
 #include "titanic/pet_control/pet_section.h"
 #include "titanic/pet_control/pet_text.h"
 
 namespace Titanic {
 
-class CPetMessage : public CPetSection {
+class CPetTranslation : public CPetSection {
 private:
 	CPetText _message;
 	CPetText _tooltip;
@@ -38,7 +38,7 @@ private:
 	 */
 	bool setupControl(CPetControl *petControl);
 public:
-	CPetMessage();
+	CPetTranslation();
 
 	/**
 	 * Sets up the section
@@ -89,8 +89,17 @@ public:
 	 */
 	virtual CPetText *getText() { return &_tooltip; }
 
+	/**
+	 * Clear any current translation text
+	 */
+	void clearTranslation();
+
+	/**
+	 * Adds a line to the translation display
+	 */
+	void addTranslation(const CString &str1, const CString &str2);
 };
 
 } // End of namespace Titanic
 
-#endif /* TITANIC_PET_MESSAGE_H */
+#endif /* TITANIC_PET_TRANSLATION_H */
diff --git a/engines/titanic/support/strings.h b/engines/titanic/support/strings.h
index 1f7187b..5164897 100644
--- a/engines/titanic/support/strings.h
+++ b/engines/titanic/support/strings.h
@@ -85,7 +85,56 @@ enum StringId {
 	GO_WHERE,
 	NICE_IF_TAKE_BUT_CANT,
 	BOWL_OF_NUTS,
-	NOT_A_BOWL_OF_NUTS
+	NOT_A_BOWL_OF_NUTS,
+
+	// German version only
+	DE_SUMMER,
+	DE_AUTUMN,
+	DE_WINTER,
+	DE_SPRING,
+	DE_SUMMER_ARBORETUM,
+	DE_AUTUMN_ARBORETUM,
+	DE_WINTER_ARBORETUM,
+	DE_SPRING_ARBORETUM,
+	DE_ARBORETUM_MSG1,
+	DE_ARBORETUM_MSG2,
+	DE_BRIDGE_MSG1,
+	DE_BRIDGE_MSG2,
+	DE_BRIDGE_MSG3,
+	DE_BRIDGE_MSG4,
+	DE_BRIDGE_MSG5,
+	DE_BRIDGE_MSG6,
+	DE_BRIDGE_MSG7,
+	DE_BRIDGE_MSG8,
+	DE_BRIDGE_MSG9,
+	DE_BRIDGE_MSG10,
+	DE_PROMENADE_DECK_MSG1,
+	DE_PROMENADE_DECK_MSG2,
+	DE_PROMENADE_DECK_MSG3,
+	DE_PROMENADE_DECK_MSG4,
+	DE_PROMENADE_DECK_MSG5,
+	DE_PROMENADE_DECK_MSG6,
+	DE_PROMENADE_DECK_MSG7,
+	DE_PROMENADE_DECK_MSG8,
+	DE_PROMENADE_DECK_MSG9,
+	DE_PROMENADE_DECK_MSG10,
+	DE_SGTLOBBY_MSG1,
+	DE_SGTLOBBY_MSG2,
+	DE_SGTLOBBY_MSG3,
+	DE_SGTLOBBY_MSG4,
+	DE_SGTLOBBY_MSG5,
+	DE_SGTLOBBY_MSG6,
+	DE_SGTLOBBY_MSG7,
+	DE_SGTLOBBY_MSG8,
+	DE_TITANIA_MSG1,
+	DE_TITANIA_MSG2,
+	DE_TITANIA_MSG3,
+	DE_TITANIA_MSG4,
+	DE_TITANIA_MSG5,
+	DE_TITANIA_MSG6,
+	DE_TITANIA_MSG7,
+	DE_TITANIA_MSG8
+
 };
 
 class Strings : public Common::StringArray {





More information about the Scummvm-git-logs mailing list