diff options
-rw-r--r-- | engines/sherlock/fixed_text.cpp | 9 | ||||
-rw-r--r-- | engines/sherlock/fixed_text.h | 8 | ||||
-rw-r--r-- | engines/sherlock/objects.cpp | 15 |
3 files changed, 29 insertions, 3 deletions
diff --git a/engines/sherlock/fixed_text.cpp b/engines/sherlock/fixed_text.cpp index be9cf20031..c88b70e0e8 100644 --- a/engines/sherlock/fixed_text.cpp +++ b/engines/sherlock/fixed_text.cpp @@ -179,22 +179,27 @@ FixedText::FixedText(SherlockEngine *vm) { case Common::EN_ANY: // Used by Sherlock Holmes 1+2 _fixedJournalTextArray = fixedJournalTextEN; + _fixedObjectPickedUpText = "Picked Up %s"; break; case Common::DE_DEU: // Used by Sherlock Holmes 1+2 _fixedJournalTextArray = fixedJournalTextDE; + _fixedObjectPickedUpText = "%s eingesteckt"; break; case Common::FR_FRA: // Used by Sherlock Holmes 2 _fixedJournalTextArray = fixedJournalTextFR; + _fixedObjectPickedUpText = ""; // Not used, because there is no French Sherlock Holmes 1 break; case Common::ES_ESP: // Used by Sherlock Holmes 1+2 _fixedJournalTextArray = fixedJournalTextES; + _fixedObjectPickedUpText = "Cogido/a %s"; break; default: // Default to English _fixedJournalTextArray = fixedJournalTextEN; + _fixedObjectPickedUpText = "Picked Up %s"; break; } } @@ -210,4 +215,8 @@ const char *FixedText::getJournalText(int fixedJournalTextId) { return _fixedJournalTextArray[fixedJournalTextId]; } +const char *FixedText::getObjectPickedUpText() { + return _fixedObjectPickedUpText; +} + } // End of namespace Sherlock diff --git a/engines/sherlock/fixed_text.h b/engines/sherlock/fixed_text.h index aa6519d797..e4b09fdc4c 100644 --- a/engines/sherlock/fixed_text.h +++ b/engines/sherlock/fixed_text.h @@ -67,7 +67,7 @@ enum FixedJournalTextId { kFixedJournalText_ThenTheInspectorAsked, kFixedJournalText_ThenTheInspectorSaid, kFixedJournalText_ThenPersonAsked, - kFixedJournalText_ThenPersonSaid + kFixedJournalText_ThenPersonSaid, }; class SherlockEngine; @@ -96,8 +96,14 @@ public: */ const char *getJournalText(int fixedJournalTextId); + /** + * Gets object "Picked Up" text + */ + const char *getObjectPickedUpText(); + private: const char *const *_fixedJournalTextArray; + const char *_fixedObjectPickedUpText; }; } // End of namespace Sherlock diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index e70b707404..1372605a82 100644 --- a/engines/sherlock/objects.cpp +++ b/engines/sherlock/objects.cpp @@ -1424,8 +1424,19 @@ int Object::pickUpObject(FixedTextActionId fixedTextActionId) { ui.clearInfo(); Common::String itemName = _description; - itemName.setChar(tolower(itemName[0]), 0); - screen.print(Common::Point(0, INFO_LINE + 1), COL_INFO_FOREGROUND, "Picked up %s", itemName.c_str()); + + // It's an item, make it lowercase + switch (_vm->getLanguage()) { + case Common::DE_DEU: + // don't do this for German version + break; + default: + // do it for English + Spanish version + itemName.setChar(tolower(itemName[0]), 0); + break; + } + + screen.print(Common::Point(0, INFO_LINE + 1), COL_INFO_FOREGROUND, fixedText.getObjectPickedUpText(), itemName.c_str()); ui._menuCounter = 25; } } |