diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sherlock/detection.cpp | 4 | ||||
-rw-r--r-- | engines/sherlock/module.mk | 1 | ||||
-rw-r--r-- | engines/sherlock/people.cpp | 20 | ||||
-rw-r--r-- | engines/sherlock/sherlock.h | 5 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo.cpp | 9 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_resources.cpp | 329 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_resources.h | 42 |
7 files changed, 409 insertions, 1 deletions
diff --git a/engines/sherlock/detection.cpp b/engines/sherlock/detection.cpp index ea68d79a1b..35a810efb1 100644 --- a/engines/sherlock/detection.cpp +++ b/engines/sherlock/detection.cpp @@ -44,6 +44,10 @@ Common::Platform SherlockEngine::getPlatform() const { return _gameDescription->desc.platform; } +Common::Language SherlockEngine::getLanguage() const { + return _gameDescription->desc.language; +} + } // End of namespace Sherlock static const PlainGameDescriptor sherlockGames[] = { diff --git a/engines/sherlock/module.mk b/engines/sherlock/module.mk index 3a03a70564..7edd08dda6 100644 --- a/engines/sherlock/module.mk +++ b/engines/sherlock/module.mk @@ -13,6 +13,7 @@ MODULE_OBJS = \ scalpel/scalpel_user_interface.o \ scalpel/settings.o \ tattoo/tattoo.o \ + tattoo/tattoo_resources.o \ tattoo/tattoo_scene.o \ tattoo/tattoo_talk.o \ tattoo/tattoo_user_interface.o \ diff --git a/engines/sherlock/people.cpp b/engines/sherlock/people.cpp index f4060f65da..e59a90e5f8 100644 --- a/engines/sherlock/people.cpp +++ b/engines/sherlock/people.cpp @@ -583,6 +583,7 @@ void People::goAllTheWay() { int People::findSpeaker(int speaker) { Scene &scene = *_vm->_scene; + const char *portrait = _characters[speaker]._portrait; for (int idx = 0; idx < (int)scene._bgShapes.size(); ++idx) { Object &obj = scene._bgShapes[idx]; @@ -590,12 +591,29 @@ int People::findSpeaker(int speaker) { if (obj._type == ACTIVE_BG_SHAPE) { Common::String name(obj._name.c_str(), obj._name.c_str() + 4); - if (name.equalsIgnoreCase(_characters[speaker]._portrait) + if (name.equalsIgnoreCase(portrait) && obj._name[4] >= '0' && obj._name[4] <= '9') return idx; } } + // Fallback in Rose Tattoo + if (IS_ROSE_TATTOO) { + bool flag = _vm->readFlags(76); + + if (_data[0]._type == CHARACTER && ((speaker == 0 && flag) || (speaker == 1 && !flag))) + return -1; + + for (uint idx = 1; idx < MAX_CHARACTERS; ++idx) { + if (_data[idx]._type == CHARACTER) { + Common::String name(_data[idx]._name.c_str(), _data[idx]._name.c_str() + 4); + + if (name.equalsIgnoreCase(portrait) && _data[idx]._npcName[4] >= '0' && _data[idx]._npcName[4] <= '9') + return idx + 256; + } + } + } + return -1; } diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h index a392e1d8b2..66b0313fb3 100644 --- a/engines/sherlock/sherlock.h +++ b/engines/sherlock/sherlock.h @@ -177,6 +177,11 @@ public: Common::Platform getPlatform() const; /** + * Return the game's language + */ + Common::Language getLanguage() const; + + /** * Return a random number */ int getRandomNumber(int limit) { return _randomSource.getRandomNumber(limit - 1); } diff --git a/engines/sherlock/tattoo/tattoo.cpp b/engines/sherlock/tattoo/tattoo.cpp index 273f37051e..ea96a4958a 100644 --- a/engines/sherlock/tattoo/tattoo.cpp +++ b/engines/sherlock/tattoo/tattoo.cpp @@ -22,7 +22,9 @@ #include "engines/util.h" #include "sherlock/tattoo/tattoo.h" +#include "sherlock/tattoo/tattoo_resources.h" #include "sherlock/tattoo/tattoo_scene.h" +#include "sherlock/people.h" namespace Sherlock { @@ -47,6 +49,13 @@ void TattooEngine::initialize() { // Add some more files to the cache _res->addToCache("walk.lib"); + + // Set up list of people + for (int idx = 0; idx < TATTOO_MAX_PEOPLE; ++idx) { + _people->_characters.push_back(PersonData( + getLanguage() == Common::FR_FRA ? FRENCH_NAMES[idx] : ENGLISH_NAMES[idx], + PORTRAITS[idx], nullptr, nullptr)); + } // Starting scene _scene->_goToScene = STARTING_INTRO_SCENE; diff --git a/engines/sherlock/tattoo/tattoo_resources.cpp b/engines/sherlock/tattoo/tattoo_resources.cpp new file mode 100644 index 0000000000..3be41e2650 --- /dev/null +++ b/engines/sherlock/tattoo/tattoo_resources.cpp @@ -0,0 +1,329 @@ +/* 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 "sherlock/tattoo/tattoo_resources.h" + +namespace Sherlock { + +namespace Tattoo { + +const char PORTRAITS[TATTOO_MAX_PEOPLE][5] = { + { "HOLM" }, // Sherlock Holmes + { "WATS" }, // Dr. Watson + { "HUDS" }, // Mrs. Hudson + { "FORB" }, // Stanley Forbes + { "MYCR" }, // Mycroft Holmes + { "WIGG" }, // Wiggins + { "BURN" }, // Police Constable Burns + { "TRIM" }, // Augustus Trimble + { "DALE" }, // Police Constable Daley + { "MATR" }, // Matron + { "GRAC" }, // Sister Grace + { "MCCA" }, // Preston McCabe + { "COLL" }, // Bob Colleran + { "JONA" }, // Jonas Rigby + { "ROAC" }, // Police Constable Roach + { "DEWA" }, // James Dewar + { "JERE" }, // Sergeant Jeremy Duncan + { "GREG" }, // Inspector Gregson + { "LEST" }, // Inspector Lestrade + { "NEED" }, // Jesse Needhem + { "FLEM" }, // Arthur Fleming + { "PRAT" }, // Mr. Thomas Pratt + { "TILL" }, // Mathilda (Tillie) Mason + { "RUSS" }, // Adrian Russell + { "WHIT" }, // Eldridge Whitney + { "HEPP" }, // Hepplethwaite + { "HORA" }, // Horace Silverbridge + { "SHER" }, // Old Sherman + { "VERN" }, // Maxwell Verner + { "REDD" }, // Millicent Redding + { "VIRG" }, // Virgil Silverbridge + { "GEOR" }, // George O'Keeffe + { "LAWT" }, // Lord Denys Lawton + { "JENK" }, // Jenkins + { "JOCK" }, // Jock Mahoney + { "BART" }, // Bartender + { "LADY" }, // Lady Cordelia Lockridge + { "PETT" }, // Pettigrew + { "FANS" }, // Sir Avery Fanshawe + { "HODG" }, // Hodgkins + { "WILB" }, // Wilbur "Birdy" Heywood + { "JACO" }, // Jacob Farthington + { "BLED" }, // Philip Bledsoe + { "FOWL" }, // Sidney Fowler + { "PROF" }, // Professor Theodore Totman + { "ROSE" }, // Rose Hinchem + { "TALL" }, // Tallboy + { "STIT" }, // Ethlebert "Stitch" Rumsey + { "FREE" }, // Charles Freedman + { "HEMM" }, // Nigel Hemmings + { "CART" }, // Fairfax Carter + { "WILH" }, // Wilhelm II + { "WACH" }, // Wachthund + { "WILS" }, // Jonathan Wilson + { "DAVE" }, // David Lloyd-Jones + { "HARG" }, // Edward Hargrove + { "MORI" }, // Professor James Moriarty + { "LASC" }, // The Lascar + { "PARR" }, // Parrot + { "SCAR" }, // Vincent Scarrett + { "ALEX" }, // Alexandra + { "QUEE" }, // Queen Victoria + { "JOHN" }, // John Brown + { "PAT1" }, // Patient #1 + { "PAT2" }, // Patient #2 + { "PATR" }, // Patron + { "QUEN" }, // Queen Victoria + { "WITE" }, // Patient in White + { "LUSH" }, // Lush + { "DRNK" }, // Drunk + { "PROS" }, // Prostitute + { "MUDL" }, // Mudlark + { "GRIN" }, // Grinder + { "BOUN" }, // Bouncer + { "RATC" }, // Agnes Ratchet + { "ALOY" }, // Aloysius Ratchet + { "REAL" }, // Real Estate Agent + { "CAND" }, // Candy Clerk + { "BEAD" }, // Beadle + { "PRUS" }, // Prussian + { "ROWB" }, // Mrs. Rowbottom + { "MSLJ" }, // Miss Lloyd-Jones + { "TPAT" }, // Tavern patron + { "USER" }, // User + { "TOBY" }, // Toby + { "STAT" }, // Stationer + { "CLRK" }, // Law Clerk + { "CLER" }, // Ministry Clerk + { "BATH" }, // Bather + { "MAID" }, // Maid + { "LADF" }, // Lady Fanshawe + { "SIDN" }, // Sidney Ratchet + { "BOYO" }, // Boy + { "PTR2" }, // Second Patron + { "BRIT" }, // Constable Brit + { "DROV" } // Wagon Driver +}; + +const char *const FRENCH_NAMES[TATTOO_MAX_PEOPLE] = { + "Sherlock Holmes", + "Dr. Watson", + "Mme. Hudson", + "Stanley Forbes", + "Mycroft Holmes", + "Wiggins", + "Sergent Burns", + "Augustus Trimble", + "Sergent Daley", + "Infirmi?re chef", + "Mme. Grace", + "Preston McCabe", + "Bob Colleran", + "Jonas Rigby", + "Sergent Roach", + "James Dewar", + "Sergent Jeremy Duncan", + "Inspecteur Gregson", + "Inspecteur Lestrade", + "Jesse Needhem", + "Arthur Fleming", + "M. Thomas Pratt", + "Mathilda (Tillie) Mason", + "Adrian Russell", + "Eldridge Whitney", + "Hepplethwaite", + "Horace Silverbridge", + "Sherman", + "Maxwell Verner", + "Millicent Redding", + "Virgil Silverbridge", + "George O'Keeffe", + "Lord Denys Lawton", + "Jenkins", + "Jock Mahoney", + "Serveur", + "Lady Cordelia Lockridge", + "Pettigrew", + "Sir Avery Fanshawe", + "Hodgkins", + "Wilbur \"Birdy\" Heywood", + "Jacob Farthington", + "Philip Bledsoe", + "Sidney Fowler", + "Professeur Theodore Totman", + "Rose Hinchem", + "Tallboy", + "Ethlebert \"Stitch\" Rumsey", + "Charles Freedman", + "Nigel Hemmings", + "Fairfax Carter", + "Wilhelm II", + "Wachthund", + "Jonathan Wilson", + "David Lloyd-Jones", + "Edward Hargrove", + "Misteray", + "Le Lascar", + "Oiseau", + "Vincent Scarrett", + "Alexandra", + "Queen Victoria", + "John Brown", + "Patient", + "Patient", + "Client", + "Queen Victoria", + "Patient en blanc", + "Ivrogne", + "Ivrogne", + "Belle femme", + "Mudlark", + "Broyeur", + "Videur", + "Agnes Ratchet", + "Aloysius Ratchet", + "Immobilier", + "Gar?on", + "Beadle", + "Prussian", + "Mme. Rowbottom", + "Mme Lloyd-Jones", + "Tavern Client", + "User", + "Toby", + "Papeterie", + "Law Clerc", + "Ministry Employ?", + "Clint du thermes", + "Bonne", + "Lady Fanshawe", + "Sidney Ratchet", + "Gar?on", + "Client", + "Sergent Brit", + "Wagon Driver" +}; + +const char *const ENGLISH_NAMES[TATTOO_MAX_PEOPLE] = { + "Sherlock Holmes", + "Dr. Watson", + "Mrs. Hudson", + "Stanley Forbes", + "Mycroft Holmes", + "Wiggins", + "Police Constable Burns", + "Augustus Trimble", + "Police Constable Daley", + "Matron", + "Sister Grace", + "Preston McCabe", + "Bob Colleran", + "Jonas Rigby", + "Police Constable Roach", + "James Dewar", + "Sergeant Jeremy Duncan", + "Inspector Gregson", + "Inspector Lestrade", + "Jesse Needhem", + "Arthur Fleming", + "Mr. Thomas Pratt", + "Mathilda (Tillie) Mason", + "Adrian Russell", + "Eldridge Whitney", + "Hepplethwaite", + "Horace Silverbridge", + "Old Sherman", + "Maxwell Verner", + "Millicent Redding", + "Virgil Silverbridge", + "George O'Keeffe", + "Lord Denys Lawton", + "Jenkins", + "Jock Mahoney", + "Bartender", + "Lady Cordelia Lockridge", + "Pettigrew", + "Sir Avery Fanshawe", + "Hodgkins", + "Wilbur \"Birdy\" Heywood", + "Jacob Farthington", + "Philip Bledsoe", + "Sidney Fowler", + "Professor Theodore Totman", + "Rose Hinchem", + "Tallboy", + "Ethlebert \"Stitch\" Rumsey", + "Charles Freedman", + "Nigel Hemmings", + "Fairfax Carter", + "Wilhelm II", + "Wachthund", + "Jonathan Wilson", + "David Lloyd-Jones", + "Edward Hargrove", + "Misteray", + "The Lascar", + "Parrot", + "Vincent Scarrett", + "Alexandra", + "Queen Victoria", + "John Brown", + "A Patient", + "A Patient", + "Patron", + "Queen Victoria", + "Patient in white", + "Lush", + "Drunk", + "Prostitute", + "Mudlark", + "Grinder", + "Bouncer", + "Agnes Ratchet", + "Aloysius Ratchet", + "Real Estate Agent", + "Candy Clerk", + "Beadle", + "Prussian", + "Mrs. Rowbottom", + "Miss Lloyd-Jones", + "Tavern patron", + "User", + "Toby", + "Stationer", + "Law Clerk", + "Ministry Clerk", + "Bather", + "Maid", + "Lady Fanshawe", + "Sidney Ratchet", + "Boy", + "Patron", + "Constable Brit", + "Wagon Driver" +}; + + +} // End of namespace Tattoo + +} // End of namespace Sherlock diff --git a/engines/sherlock/tattoo/tattoo_resources.h b/engines/sherlock/tattoo/tattoo_resources.h new file mode 100644 index 0000000000..b706d90f2d --- /dev/null +++ b/engines/sherlock/tattoo/tattoo_resources.h @@ -0,0 +1,42 @@ +/* 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 SHERLOCK_TATTOO_RESOURCES_H +#define SHERLOCK_TATTOO_RESOURCES_H + +#include "common/scummsys.h" + +namespace Sherlock { + +namespace Tattoo { + +#define TATTOO_MAX_PEOPLE 96 + +extern const char PORTRAITS[TATTOO_MAX_PEOPLE][5]; +extern const char *const FRENCH_NAMES[TATTOO_MAX_PEOPLE]; +extern const char *const ENGLISH_NAMES[TATTOO_MAX_PEOPLE]; + +} // End of namespace Tattoo + +} // End of namespace Sherlock + +#endif |