diff options
author | Martin Kiewitz | 2015-06-14 17:52:11 +0200 |
---|---|---|
committer | Martin Kiewitz | 2015-06-14 17:52:11 +0200 |
commit | 1b6a60f359eb20130f34a8f79bfe9e5d4ea25b5a (patch) | |
tree | 760c80f31b1013d9a58a5d8445e04e766dd0fb18 /engines/sherlock/fixed_text.cpp | |
parent | b26bc296194c3a745fa9d222862ce1ad12a13e3e (diff) | |
download | scummvm-rg350-1b6a60f359eb20130f34a8f79bfe9e5d4ea25b5a.tar.gz scummvm-rg350-1b6a60f359eb20130f34a8f79bfe9e5d4ea25b5a.tar.bz2 scummvm-rg350-1b6a60f359eb20130f34a8f79bfe9e5d4ea25b5a.zip |
SHERLOCK: action processing uses fixed text class
action error messages are now localized too
Diffstat (limited to 'engines/sherlock/fixed_text.cpp')
-rw-r--r-- | engines/sherlock/fixed_text.cpp | 182 |
1 files changed, 172 insertions, 10 deletions
diff --git a/engines/sherlock/fixed_text.cpp b/engines/sherlock/fixed_text.cpp index 48e778bcf8..2d6c963fdd 100644 --- a/engines/sherlock/fixed_text.cpp +++ b/engines/sherlock/fixed_text.cpp @@ -85,10 +85,12 @@ static const Common::String fixedTextDE[] = { // Journal search "Zur\201ck", "R\201ckw\204rts", // original: "Backward" - "V\224rw\204rts", // original: "Forward" + "Vorw\204rts", // original: "Forward" "Text nicht gefunden!" }; - + +// up-side down exclamation mark - 0xAD / octal 255 +// up-side down question mark - 0xA8 / octal 250 static const Common::String fixedTextES[] = { // Window buttons "Exit", @@ -119,31 +121,191 @@ static const Common::String fixedTextES[] = { "Texto no encontrado!" }; -static const SherlockFixedTextLanguageEntry fixedTextLanguages[] = { - { Common::DE_DEU, fixedTextDE }, - { Common::ES_ESP, fixedTextES }, - { Common::EN_ANY, fixedTextEN }, - { Common::UNK_LANG, fixedTextEN } +// ========================================= + +static const Common::String fixedTextEN_ActionOpen[] = { + "This cannot be opened", + "It is already open", + "It is locked", + "Wait for Watson", + " ", + "." +}; + +static const Common::String fixedTextDE_ActionOpen[] = { + "Das kann man nicht \224ffnen", + "Ist doch schon offen!", + "Leider verschlossen", + "Warte auf Watson", + " ", + "." +}; + +static const Common::String fixedTextES_ActionOpen[] = { + "No puede ser abierto", + "Ya esta abierto", + "Esta cerrado", + "Espera a Watson", + " ", + "." +}; + +static const Common::String fixedTextEN_ActionClose[] = { + "This cannot be closed", + "It is already closed", + "The safe door is in the way" +}; + +static const Common::String fixedTextDE_ActionClose[] = { + "Das kann man nicht schlie\341en", + "Ist doch schon zu!", + "Die safet\201r ist Weg" +}; + +static const Common::String fixedTextES_ActionClose[] = { + "No puede ser cerrado", + "Ya esta cerrado", + "La puerta de seguridad esta entre medias" +}; + +static const Common::String fixedTextEN_ActionMove[] = { + "This cannot be moved", + "It is bolted to the floor", + "It is too heavy", + "The other crate is in the way" +}; + + +static const Common::String fixedTextDE_ActionMove[] = { + "L\204\341t sich nicht bewegen", + "Festged\201belt in der Erde...", + "Oha, VIEL zu schwer", + "Der andere Kiste ist im Weg" // [sic] +}; + +static const Common::String fixedTextES_ActionMove[] = { + "No puede moverse", + "Esta sujeto a la pared", + "Es demasiado pesado", + "El otro cajon esta en mitad" +}; + +static const Common::String fixedTextEN_ActionPick[] = { + "Nothing of interest here", + "It is bolted down", + "It is too big to carry", + "It is too heavy", + "I think a girl would be more your type", + "Those flowers belong to Penny", + "She's far too young for you!", + "I think a girl would be more your type!", + "Government property for official use only" }; +static const Common::String fixedTextDE_ActionPick[] = { + "Nichts Interessantes da", + "Zu gut befestigt", + "Ist ja wohl ein bi\341chen zu gro\341, oder ?", + "Ich denke, Du stehst mehr auf M\204dchen ?", + "Diese Blumen geh\224ren Penny", + "Sie ist doch viel zu jung f\201r Dich!", + "Staatseigentum - Nur für den Dienstgebrauch !" +}; + +static const Common::String fixedTextES_ActionPick[] = { + "No hay nada interesante", + "Esta anclado al suelo", + "Es muy grande para llevarlo", + "Pesa demasiado", + "Creo que una chica sera mas tu tipo", + "Esas flores pertenecen a Penny", + "\255Es demasiado joven para ti!" + "\255Creo que una chica sera mas tu tipo!", + "Propiedad del gobierno para uso oficial" +}; + +static const Common::String fixedTextEN_ActionUse[] = { + "You can't do that", + "It had no effect", + "You can't reach it", + "OK, the door looks bigger! Happy?" + "Doors don't smoke" +}; + +static const Common::String fixedTextDE_ActionUse[] = { + "Nein, das geht wirklich nicht", + "Tja keinerlei Wirkung", + "Da kommst du nicht dran", + "Na gut, die Tür sieht jetzt gr\224\341er aus. Zufrieden?" + "Türen sind Nichtraucher!" +}; + +static const Common::String fixedTextES_ActionUse[] = { + "No puedes hacerlo", + "No tuvo ningun efecto", + "No puedes alcanzarlo", + "Bien, \255es enorme! \250Feliz?" + "Las puertas no fuman" +}; + +static const FixedTextActionEntry fixedTextEN_Actions[] = { + { fixedTextEN_ActionOpen }, + { fixedTextEN_ActionClose }, + { fixedTextEN_ActionMove }, + { fixedTextEN_ActionPick }, + { fixedTextEN_ActionUse } +}; + +static const FixedTextActionEntry fixedTextDE_Actions[] = { + { fixedTextDE_ActionOpen }, + { fixedTextDE_ActionClose }, + { fixedTextDE_ActionMove }, + { fixedTextDE_ActionPick }, + { fixedTextDE_ActionUse } +}; + +static const FixedTextActionEntry fixedTextES_Actions[] = { + { fixedTextES_ActionOpen }, + { fixedTextES_ActionClose }, + { fixedTextES_ActionMove }, + { fixedTextES_ActionPick }, + { fixedTextES_ActionUse } +}; + +// ========================================= + +static const FixedTextLanguageEntry fixedTextLanguages[] = { + { Common::DE_DEU, fixedTextDE, fixedTextDE_Actions }, + { Common::ES_ESP, fixedTextES, fixedTextES_Actions }, + { Common::EN_ANY, fixedTextEN, fixedTextEN_Actions }, + { Common::UNK_LANG, fixedTextEN, fixedTextEN_Actions } +}; + +// ========================================= + +// ========================================= FixedText::FixedText(SherlockEngine *vm) : _vm(vm) { // Figure out which fixed texts to use Common::Language curLanguage = _vm->getLanguage(); - const SherlockFixedTextLanguageEntry *curLanguageEntry = fixedTextLanguages; + const FixedTextLanguageEntry *curLanguageEntry = fixedTextLanguages; while (curLanguageEntry->language != Common::UNK_LANG) { if (curLanguageEntry->language == curLanguage) break; // found current language curLanguageEntry++; } - _fixedText = curLanguageEntry->fixedTextArray; + _curLanguageEntry = curLanguageEntry; } const Common::String FixedText::getText(FixedTextId fixedTextId) { - return _fixedText[fixedTextId]; + return _curLanguageEntry->fixedTextArray[fixedTextId]; } +const Common::String FixedText::getActionMessage(FixedTextActionId actionId, int messageIndex) { + assert(actionId >= 0); + return _curLanguageEntry->actionArray[actionId].fixedTextArray[messageIndex]; +} } // End of namespace Sherlock |