[Scummvm-cvs-logs] scummvm master -> d5ef626490f52348997a2c25592b91ce2343e289
m-kiewitz
m_kiewitz at users.sourceforge.net
Wed Oct 7 15:06:00 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d5ef626490 SHERLOCK: SS: Multilingual press key text
Commit: d5ef626490f52348997a2c25592b91ce2343e289
https://github.com/scummvm/scummvm/commit/d5ef626490f52348997a2c25592b91ce2343e289
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-10-07T15:06:48+02:00
Commit Message:
SHERLOCK: SS: Multilingual press key text
Press key to continue/for more is now translated in the Spanish+German
versions of the game
Changed paths:
engines/sherlock/scalpel/scalpel_fixed_text.cpp
engines/sherlock/scalpel/scalpel_fixed_text.h
engines/sherlock/scalpel/scalpel_talk.cpp
engines/sherlock/scalpel/scalpel_user_interface.cpp
diff --git a/engines/sherlock/scalpel/scalpel_fixed_text.cpp b/engines/sherlock/scalpel/scalpel_fixed_text.cpp
index cc48cdf..372fbc3 100644
--- a/engines/sherlock/scalpel/scalpel_fixed_text.cpp
+++ b/engines/sherlock/scalpel/scalpel_fixed_text.cpp
@@ -55,6 +55,11 @@ static const char *const fixedTextEN[] = {
"Backward",
"Forward",
"Text Not Found !",
+ // SH1: Press key text
+ "Press any Key for More.",
+ "P",
+ "Press any Key to Continue.",
+ "P",
// SH1: Initial Inventory
"A message requesting help",
"A number of business cards",
@@ -163,6 +168,11 @@ static const char *const fixedTextDE[] = {
"R\201ckw\204rts", // original: "Backward"
"Vorw\204rts", // original: "Forward"
"Text nicht gefunden!",
+ // SH1: Press key text
+ "Mehr auf Tastendruck...",
+ "M",
+ "Beliebige Taste dr\201cken.",
+ "B",
// SH1: Initial Inventory
"Ein Hilferuf von Lestrade",
"Holmes' Visitenkarten",
@@ -270,6 +280,11 @@ static const char *const fixedTextES[] = {
"Retroceder",
"Avanzar",
"Texto no encontrado!",
+ // SH1: Press key text
+ "Tecla para ver mas",
+ "T",
+ "Tecla para continuar",
+ "T",
// SH1: Initial Inventory
"Un mensaje solicitando ayuda",
"Unas cuantas tarjetas de visita",
diff --git a/engines/sherlock/scalpel/scalpel_fixed_text.h b/engines/sherlock/scalpel/scalpel_fixed_text.h
index b8f5171..f46587c 100644
--- a/engines/sherlock/scalpel/scalpel_fixed_text.h
+++ b/engines/sherlock/scalpel/scalpel_fixed_text.h
@@ -57,6 +57,11 @@ enum FixedTextId {
kFixedText_JournalSearch_Backward,
kFixedText_JournalSearch_Forward,
kFixedText_JournalSearch_NotFound,
+ // Press key text
+ kFixedText_PressKey_ForMore,
+ kFixedText_PressKey_ForMoreHotkey,
+ kFixedText_PressKey_ToContinue,
+ kFixedText_PressKey_ToContinueHotkey,
// Initial inventory
kFixedText_InitInventory_Message,
kFixedText_InitInventory_HolmesCard,
diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp
index 0458c30..64aac4e 100644
--- a/engines/sherlock/scalpel/scalpel_talk.cpp
+++ b/engines/sherlock/scalpel/scalpel_talk.cpp
@@ -709,10 +709,13 @@ void ScalpelTalk::drawInterface() {
screen.makeButton(Common::Rect(181, CONTROLS_Y, 221, CONTROLS_Y + 10),
200 - screen.stringWidth(fixedText_Down) / 2, fixedText_Down);
} else {
- int strWidth = screen.stringWidth(Scalpel::PRESS_KEY_TO_CONTINUE);
+ Common::String fixedText_PressKeyToContinue = fixedText.getText(kFixedText_PressKey_ToContinue);
+ Common::String fixedText_PressKeyToContinueHotkey = fixedText.getText(kFixedText_PressKey_ToContinueHotkey);
+ int fixedText_PressKeyToContinueLen = screen.stringWidth(fixedText_PressKeyToContinue);
+
screen.makeButton(Common::Rect(46, CONTROLS_Y, 273, CONTROLS_Y + 10),
- 160 - strWidth / 2, Scalpel::PRESS_KEY_TO_CONTINUE);
- screen.gPrint(Common::Point(160 - strWidth / 2, CONTROLS_Y), COMMAND_FOREGROUND, "P");
+ 160 - fixedText_PressKeyToContinueLen / 2, fixedText_PressKeyToContinue);
+ screen.gPrint(Common::Point(160 - fixedText_PressKeyToContinueLen / 2, CONTROLS_Y), COMMAND_FOREGROUND, fixedText_PressKeyToContinueHotkey.c_str());
}
}
diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp
index 4418907..6ee9577 100644
--- a/engines/sherlock/scalpel/scalpel_user_interface.cpp
+++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp
@@ -67,8 +67,6 @@ const int INVENTORY_POINTS[8][3] = {
const char COMMANDS[13] = "LMTPOCIUGJFS";
const char COMMANDS_3DO[13] = "LMTPOCIUGSFF";
const char INVENTORY_COMMANDS[9] = { "ELUG-+,." };
-const char *const PRESS_KEY_FOR_MORE = "Press any Key for More.";
-const char *const PRESS_KEY_TO_CONTINUE = "Press any Key to Continue.";
const int UI_OFFSET_3DO = 16; // (320 - 288) / 2
/*----------------------------------------------------------------*/
@@ -1808,6 +1806,7 @@ void ScalpelUserInterface::printObjectDesc(const Common::String &str, bool first
ScalpelInventory &inv = *(ScalpelInventory *)_vm->_inventory;
ScalpelScreen &screen = *(ScalpelScreen *)_vm->_screen;
Talk &talk = *_vm->_talk;
+ FixedText &fixedText = *_vm->_fixedText;
if (str.hasPrefix("_")) {
_lookScriptFlag = true;
@@ -1938,20 +1937,28 @@ void ScalpelUserInterface::printObjectDesc(const Common::String &str, bool first
// Handle display depending on whether all the message was shown
if (!endOfStr) {
+ Common::String fixedText_PressKeyForMore = fixedText.getText(kFixedText_PressKey_ForMore);
+ Common::String fixedText_PressKeyForMoreHotkey = fixedText.getText(kFixedText_PressKey_ForMoreHotkey);
+ int fixedText_PressKeyForMoreLen = screen.stringWidth(fixedText_PressKeyForMore);
+
screen.makeButton(Common::Rect(46, CONTROLS_Y, 272, CONTROLS_Y + 10),
- (SHERLOCK_SCREEN_WIDTH - screen.stringWidth(PRESS_KEY_FOR_MORE)) / 2,
- PRESS_KEY_FOR_MORE);
+ (SHERLOCK_SCREEN_WIDTH - fixedText_PressKeyForMoreLen) / 2,
+ fixedText_PressKeyForMore);
screen.gPrint(Common::Point((SHERLOCK_SCREEN_WIDTH -
- screen.stringWidth(PRESS_KEY_FOR_MORE)) / 2, CONTROLS_Y),
- COMMAND_FOREGROUND, "P");
+ fixedText_PressKeyForMoreLen) / 2, CONTROLS_Y),
+ COMMAND_FOREGROUND, fixedText_PressKeyForMoreHotkey.c_str());
_descStr = msgP;
} else {
+ Common::String fixedText_PressKeyToContinue = fixedText.getText(kFixedText_PressKey_ToContinue);
+ Common::String fixedText_PressKeyToContinueHotkey = fixedText.getText(kFixedText_PressKey_ToContinueHotkey);
+ int fixedText_PressKeyToContinueLen = screen.stringWidth(fixedText_PressKeyToContinue);
+
screen.makeButton(Common::Rect(46, CONTROLS_Y, 272, CONTROLS_Y + 10),
- (SHERLOCK_SCREEN_WIDTH - screen.stringWidth(PRESS_KEY_TO_CONTINUE)) / 2,
- PRESS_KEY_TO_CONTINUE);
+ (SHERLOCK_SCREEN_WIDTH - fixedText_PressKeyToContinueLen) / 2,
+ fixedText_PressKeyToContinue);
screen.gPrint(Common::Point((SHERLOCK_SCREEN_WIDTH -
- screen.stringWidth(PRESS_KEY_TO_CONTINUE)) / 2, CONTROLS_Y),
- COMMAND_FOREGROUND, "P");
+ fixedText_PressKeyToContinueLen) / 2, CONTROLS_Y),
+ COMMAND_FOREGROUND, fixedText_PressKeyToContinueHotkey.c_str());
_descStr = "";
}
More information about the Scummvm-git-logs
mailing list