diff options
Diffstat (limited to 'engines/sherlock/people.cpp')
-rw-r--r-- | engines/sherlock/people.cpp | 182 |
1 files changed, 3 insertions, 179 deletions
diff --git a/engines/sherlock/people.cpp b/engines/sherlock/people.cpp index 0eda40c03f..3a630fdd99 100644 --- a/engines/sherlock/people.cpp +++ b/engines/sherlock/people.cpp @@ -50,144 +50,6 @@ static const uint8 CHARACTER_SEQUENCES[MAX_HOLMES_SEQUENCE][MAX_FRAME] = { { 52, 1, 2, 3, 4, 0 } // Goto Stand Down Left }; -const char PORTRAITS[MAX_PEOPLE][5] = { - { "HOLM" }, // Sherlock Holmes - { "WATS" }, // Dr. Watson - { "LEST" }, // Inspector Lestrade - { "CON1" }, // Constable O'Brien - { "CON2" }, // Constable Lewis - { "SHEI" }, // Sheila Parker - { "HENR" }, // Henry Carruthers - { "LESL" }, // Lesley (flower girl) - { "USH1" }, // Usher #1 - { "USH2" }, // Usher #2 - { "FRED" }, // Fredrick Epstein - { "WORT" }, // Mrs. Worthington - { "COAC" }, // Coach - { "PLAY" }, // Player - { "WBOY" }, // Tim (Waterboy) - { "JAME" }, // James Sanders - { "BELL" }, // Belle (perfumerie) - { "GIRL" }, // Cleaning Girl (perfumerie) - { "EPST" }, // Epstien in the Opera Balcony - { "WIGG" }, // Wiggins - { "PAUL" }, // Paul (Brumwell / Carroway) - { "BART" }, // Bartender - { "DIRT" }, // Dirty Drunk - { "SHOU" }, // Shouting Drunk - { "STAG" }, // Staggering Drunk - { "BOUN" }, // Bouncer - { "SAND" }, // James Sanders - At Home - { "CORO" }, // The Coroner - { "EQUE" }, // The Equestrian Shop Keeper - { "GEOR" }, // George Blackwood - { "LARS" }, // Lars - { "PARK" }, // Sheila Parker (happy) - { "CHEM" }, // Chemist - { "GREG" }, // Inspector Gregson - { "LAWY" }, // Jacob Farthington Lawyer - { "MYCR" }, // Mycroft - { "SHER" }, // Old Sherman - { "CHMB" }, // Richard Chemist Stock boy - { "BARM" }, // Barman - { "DAND" }, // Dandy Player - { "ROUG" }, // Rough-looking Player - { "SPEC" }, // Spectator - { "HUNT" }, // Robert Hunt - { "VIOL" }, // Violet Secretary - { "PETT" }, // Pettigrew - { "APPL" }, // Augie (apple seller) - { "ANNA" }, // Anna Carroway - { "GUAR" }, // Guard - { "ANTO" }, // Antonio Caruso - { "TOBY" }, // Toby the Dog - { "KING" }, // Simon Kingsley - { "ALFR" }, // Alfred Tobacco Clerk - { "LADY" }, // Lady Brumwell - { "ROSA" }, // Madame Rosa - { "LADB" }, // Lady Brumwell - { "MOOR" }, // Joseph Moorehead - { "BEAL" }, // Mrs. Beale - { "LION" }, // Felix the Lion - { "HOLL" }, // Hollingston - { "CALL" }, // Constable Callaghan - { "JERE" }, // Sergeant Jeremy Duncan - { "LORD" }, // Lord Brumwell - { "NIGE" }, // Nigel Jameson - { "JONA" }, // Jonas (newspaper seller) - { "DUGA" }, // Constable Dugan - { "INSP" } // Inspector Lestrade (Scotland Yard) -}; - -const char *const NAMES[MAX_PEOPLE] = { - "Sherlock Holmes", - "Dr. Watson", - "Inspector Lestrade", - "Constable O'Brien", - "Constable Lewis", - "Sheila Parker", - "Henry Carruthers", - "Lesley", - "An Usher", - "An Usher", - "Fredrick Epstein", - "Mrs. Worthington", - "The Coach", - "A Player", - "Tim", - "James Sanders", - "Belle", - "Cleaning Girl", - "Fredrick Epstein", - "Wiggins", - "Paul", - "The Bartender", - "A Dirty Drunk", - "A Shouting Drunk", - "A Staggering Drunk", - "The Bouncer", - "James Sanders", - "The Coroner", - "Reginald Snipes", - "George Blackwood", - "Lars", - "Sheila Parker", - "The Chemist", - "Inspector Gregson", - "Jacob Farthington", - "Mycroft", - "Old Sherman", - "Richard", - "The Barman", - "A Dandy Player", - "A Rough-looking Player", - "A Spectator", - "Robert Hunt", - "Violet", - "Pettigrew", - "Augie", - "Anna Carroway", - "A Guard", - "Antonio Caruso", - "Toby the Dog", - "Simon Kingsley", - "Alfred", - "Lady Brumwell", - "Madame Rosa", - "Lady Brumwell", - "Joseph Moorehead", - "Mrs. Beale", - "Felix", - "Hollingston", - "Constable Callaghan", - "Sergeant Duncan", - "Lord Brumwell", - "Nigel Jaimeson", - "Jonas", - "Constable Dugan", - "Inspector Lestrade" -}; - /*----------------------------------------------------------------*/ People::People(SherlockEngine *vm) : _vm(vm), _player(_data[0]) { @@ -217,11 +79,8 @@ People::~People() { delete[] _portrait._sequences; } -/** - * Reset the player data - */ void People::reset() { - // Note: The engine has theoretical support for two player charactersm but only the first one is used. + // Note: The engine has theoretical support for two player characters but only the first one is used. // Watson is, instead, handled by a different sprite in each scene, with a very simple initial movement, if any Sprite &p = _data[PLAYER]; @@ -247,9 +106,6 @@ void People::reset() { _walkTo.clear(); } -/** - * Load the walking images for Sherlock - */ bool People::loadWalk() { if (_walkLoaded) { return false; @@ -262,9 +118,6 @@ bool People::loadWalk() { } } -/** - * If the walk data has been loaded, then it will be freed - */ bool People::freeWalk() { if (_walkLoaded) { delete _player._images; @@ -277,11 +130,6 @@ bool People::freeWalk() { } } -/** - * Set the variables for moving a character from one poisition to another - * in a straight line - goAllTheWay must have been previously called to - * check for any obstacles in the path. - */ void People::setWalking() { Map &map = *_vm->_map; Scene &scene = *_vm->_scene; @@ -427,10 +275,6 @@ void People::setWalking() { _player._frameNumber = oldFrame; } -/** - * Bring a moving character to a standing position. If the Scalpel chessboard - * is being displayed, then the chraracter will always face down. - */ void People::gotoStand(Sprite &sprite) { Map &map = *_vm->_map; _walkTo.clear(); @@ -481,9 +325,6 @@ void People::gotoStand(Sprite &sprite) { _allowWalkAbort = true; } -/** - * Walk to the co-ordinates passed, and then face the given direction - */ void People::walkToCoords(const Common::Point &destPos, int destDir) { Events &events = *_vm->_events; Scene &scene = *_vm->_scene; @@ -516,11 +357,6 @@ void People::walkToCoords(const Common::Point &destPos, int destDir) { } } -/** - * Called to set the character walking to the current cursor location. - * It uses the zones and the inter-zone points to determine a series - * of steps to walk to get to that position. - */ void People::goAllTheWay() { Scene &scene = *_vm->_scene; Common::Point srcPt(_player._position.x / 100 + _player.frameWidth() / 2, @@ -608,9 +444,6 @@ void People::goAllTheWay() { } } -/** - * Finds the scene background object corresponding to a specified speaker - */ int People::findSpeaker(int speaker) { Scene &scene = *_vm->_scene; @@ -620,7 +453,7 @@ int People::findSpeaker(int speaker) { if (obj._type == ACTIVE_BG_SHAPE) { Common::String name(obj._name.c_str(), obj._name.c_str() + 4); - if (scumm_stricmp(PORTRAITS[speaker], name.c_str()) == 0 + if (name.equalsIgnoreCase(_characters[speaker]._portrait) && obj._name[4] >= '0' && obj._name[4] <= '9') return idx; } @@ -629,9 +462,6 @@ int People::findSpeaker(int speaker) { return -1; } -/** - * Turn off any currently active portraits, and removes them from being drawn - */ void People::clearTalking() { Scene &scene = *_vm->_scene; Screen &screen = *_vm->_screen; @@ -662,9 +492,6 @@ void People::clearTalking() { } } -/** - * Setup the data for an animating speaker portrait at the top of the screen - */ void People::setTalking(int speaker) { Resources &res = *_vm->_res; @@ -674,7 +501,7 @@ void People::setTalking(int speaker) { if (_portraitsOn) { delete _talkPics; - Common::String filename = Common::String::format("%s.vgs", PORTRAITS[speaker]); + Common::String filename = Common::String::format("%s.vgs", _characters[speaker]._portrait); _talkPics = new ImageFile(filename); // Load portrait sequences @@ -724,9 +551,6 @@ void People::setTalking(int speaker) { } } -/** - * Synchronize the data for a savegame - */ void People::synchronize(Common::Serializer &s) { s.syncAsByte(_holmesOn); s.syncAsSint16LE(_player._position.x); |