2015-03-15 16:52:55 -04:00
|
|
|
/* 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/scalpel/scalpel.h"
|
2015-03-15 21:25:07 -04:00
|
|
|
#include "sherlock/sherlock.h"
|
2015-03-15 16:52:55 -04:00
|
|
|
|
|
|
|
namespace Sherlock {
|
|
|
|
|
|
|
|
namespace Scalpel {
|
|
|
|
|
2015-03-20 22:01:52 -04:00
|
|
|
#define NUM_PLACES 100
|
|
|
|
const int MAP_X[NUM_PLACES] = {
|
|
|
|
0, 368, 0, 219, 0, 282, 0, 43, 0, 0, 396, 408, 0, 0, 0, 568, 37, 325,
|
|
|
|
28, 0, 263, 36, 148, 469, 342, 143, 443, 229, 298, 0, 157, 260, 432,
|
|
|
|
174, 0, 351, 0, 528, 0, 136, 0, 0, 0, 555, 165, 0, 506, 0, 0, 344, 0, 0
|
|
|
|
};
|
|
|
|
const int MAP_Y[NUM_PLACES] = {
|
|
|
|
0, 147, 0, 166, 0, 109, 0, 61, 0, 0, 264, 70, 0, 0, 0, 266, 341, 30, 275,
|
|
|
|
0, 294, 146, 311, 230, 184, 268, 133, 94, 207, 0, 142, 142, 330, 255, 0,
|
|
|
|
37, 0, 70, 0, 116, 0, 0, 0, 50, 21, 0, 303, 0, 0, 229, 0, 0
|
|
|
|
};
|
|
|
|
|
2015-03-31 22:42:57 -04:00
|
|
|
#define MAX_PEOPLE 66
|
|
|
|
|
|
|
|
const byte STILL_SEQUENCES[MAX_PEOPLE][MAX_TALK_SEQUENCES] = {
|
|
|
|
{ 1, 0, 0 }, // Sherlock Holmes
|
|
|
|
{ 6, 0, 0 }, // Dr. Watson
|
|
|
|
{ 4, 0, 0 }, // Inspector Lestrade
|
|
|
|
{ 2, 0, 0 }, // Constable #1
|
|
|
|
{ 2, 0, 0 }, // Constable #2
|
|
|
|
{ 2, 0, 0 }, // Sheila Parker
|
|
|
|
{ 3, 0, 0 }, // Henry Carruthers
|
|
|
|
{ 9, 0, 0 }, // Lesly (flower girl)
|
|
|
|
{ 13, 0, 0 }, // Usher #1
|
|
|
|
{ 2, 0, 0 }, // Usher #2
|
|
|
|
{ 4, 0, 0 }, // Fredrick Epstein
|
|
|
|
{ 9, 0, 0 }, // Mrs.Worthington
|
|
|
|
{ 2, 0, 0 }, // Coach
|
|
|
|
{ 8, 0, 0 }, // Player
|
|
|
|
{ 13, 0, 0 }, // Waterboy
|
|
|
|
{ 6, 0, 0 }, // James Sanders
|
|
|
|
{ 1, 0, 0 }, // Belle (perfumerie)
|
|
|
|
{ 20, 0, 0 }, // Cleaning Girl (perfumerie)
|
|
|
|
{ 17, 0, 0 }, // Epstien in the Opera Balcony
|
|
|
|
{ 3, 0, 0 }, // Wiggins
|
|
|
|
{ 2, 0, 0 }, // Paul (Brumwell/Carroway)
|
|
|
|
{ 1, 0, 0 }, // Bartender
|
|
|
|
{ 1, 0, 0 }, // Dirty Drunk
|
|
|
|
{ 1, 0, 0 }, // Shouting Drunk
|
|
|
|
{ 1, 0, 0 }, // Staggering Drunk
|
|
|
|
{ 1, 0, 0 }, // Bouncer
|
|
|
|
{ 6, 0, 0 }, // James Sanders - At Home
|
|
|
|
{ 6, 0, 0 }, // The Coroner
|
|
|
|
{ 1, 0, 0 }, // The Equestrian Shop Keeper
|
|
|
|
{ 1, 0, 0 }, // George Blackwood
|
|
|
|
{ 7, 0, 0 }, // Lars
|
|
|
|
{ 1, 0, 0 }, // Sheila Parker
|
|
|
|
{ 8, 0, 0 }, // Chemist
|
|
|
|
{ 6, 0, 0 }, // Inspector Gregson
|
|
|
|
{ 1, 0, 0 }, // Lawyer
|
|
|
|
{ 1, 0, 0 }, // Mycroft
|
|
|
|
{ 7, 0, 0 }, // Old Sherman
|
|
|
|
{ 1, 0, 0 }, // Stock Boy in Chemist Shop
|
|
|
|
{ 1, 0, 0 }, // Barman
|
|
|
|
{ 1, 0, 0 }, // Dandy Player
|
|
|
|
{ 1, 0, 0 }, // Rough-looking Player
|
|
|
|
{ 1, 0, 0 }, // Spectator
|
|
|
|
{ 1, 0, 0 }, // Robert Hunt
|
|
|
|
{ 3, 0, 0 }, // Violet Secretary
|
|
|
|
{ 1, 0, 0 }, // Pettigrew
|
|
|
|
{ 8, 0, 0 }, // Augie (apple seller)
|
|
|
|
{ 16, 0, 0 }, // Anna Carroway
|
|
|
|
{ 1, 0, 0 }, // Guard
|
|
|
|
{ 8, 0, 0 }, // Antonio Caruso
|
|
|
|
{ 1, 0, 0 }, // Toby the Dog
|
|
|
|
{ 13, 0, 0 }, // Simon Kingsley
|
|
|
|
{ 2, 0, 0 }, // Alfred Tobacco Clerk
|
|
|
|
{ 1, 0, 0 }, // Lady Brumwell
|
|
|
|
{ 1, 0, 0 }, // Madame Rosa
|
|
|
|
{ 1, 0, 0 }, // Lady Brumwell
|
|
|
|
{ 1, 0, 0 }, // Joseph Moorehead
|
|
|
|
{ 5, 0, 0 }, // Mrs. Beale
|
|
|
|
{ 1, 0, 0 }, // Felix the Lion
|
|
|
|
{ 1, 0, 0 }, // Hollingston
|
|
|
|
{ 1, 0, 0 }, // Constable Callaghan
|
|
|
|
{ 2, 0, 0 }, // Sergeant Jeremy Duncan
|
|
|
|
{ 1, 0, 0 }, // Lord Brumwell
|
|
|
|
{ 1, 0, 0 }, // Nigel Jameson
|
|
|
|
{ 1, 0, 0 }, // Jonas (newspaper seller)
|
|
|
|
{ 1, 0, 0 }, // Constable Dugan
|
|
|
|
{ 4, 0, 0 } // Inspector Lestrade (Yard)
|
|
|
|
};
|
|
|
|
|
|
|
|
byte TALK_SEQUENCES[MAX_PEOPLE][MAX_TALK_SEQUENCES] = {
|
|
|
|
{ 1, 0, 0 }, // Sherlock Holmes
|
|
|
|
{ 5, 5, 6, 7, 8, 7, 8, 6, 0, 0 }, // Dr. Watson
|
|
|
|
{ 2, 0, 0 }, // Inspector Lestrade
|
|
|
|
{ 1, 0, 0 }, // Constable #1
|
|
|
|
{ 1, 0, 0 }, // Constable #2
|
|
|
|
{ 2, 3, 0, 0 }, // Sheila Parker
|
|
|
|
{ 3, 0, 0 }, // Henry Carruthers
|
|
|
|
{ 1, 2, 3, 2, 1, 2, 3, 0, 0 }, // Lesly (flower girl)
|
|
|
|
{ 13, 14, 0, 0 }, // Usher #1
|
|
|
|
{ 2, 0, 0 }, // Usher #2
|
|
|
|
{ 1, 2, 3, 4, 3, 4, 3, 2, 0, 0 }, // Fredrick Epstein
|
|
|
|
{ 8, 0, 0 }, // Mrs.Worthington
|
|
|
|
{ 1, 2, 3, 4, 5, 4, 3, 2, 0, 0 }, // Coach
|
|
|
|
{ 7, 8, 0, 0 }, // Player
|
|
|
|
{ 12, 13, 0, 0 }, // Waterboy
|
|
|
|
{ 3, 4, 0, 0 }, // James Sanders
|
|
|
|
{ 4, 5, 0, 0 }, // Belle (perfumerie)
|
|
|
|
{ 14, 15, 16, 17, 18, 19, 20, 20, 20, 0, 0 }, // Cleaning Girl (perfumerie)
|
|
|
|
{ 16, 17, 18, 18, 18, 17, 17, 0, 0 }, // Epstien in the Opera Balcony
|
|
|
|
{ 2, 3, 0, 0 }, // Wiggins
|
|
|
|
{ 1, 2, 0, 0 }, // Paul (Brumwell/Carroway)
|
|
|
|
{ 1, 0, 0 }, // Bartender
|
|
|
|
{ 1, 0, 0 }, // Dirty Drunk
|
|
|
|
{ 1, 0, 0 }, // Shouting Drunk
|
|
|
|
{ 1, 0, 0 }, // Staggering Drunk
|
|
|
|
{ 1, 0, 0 }, // Bouncer
|
|
|
|
{ 5, 6, 0, 0 }, // James Sanders - At Home
|
|
|
|
{ 4, 5, 0, 0 }, // The Coroner
|
|
|
|
{ 1, 0, 0 }, // The Equestrian Shop Keeper
|
|
|
|
{ 1, 0, 0 }, // George Blackwood
|
|
|
|
{ 5, 6, 0, 0 }, // Lars
|
|
|
|
{ 1, 0, 0 }, // Sheila Parker
|
|
|
|
{ 8, 9, 0, 0 }, // Chemist
|
|
|
|
{ 5, 6, 0, 0 }, // Inspector Gregson
|
|
|
|
{ 1, 0, 0 }, // Lawyer
|
|
|
|
{ 1, 0, 0 }, // Mycroft
|
|
|
|
{ 7, 8, 0, 0 }, // Old Sherman
|
|
|
|
{ 1, 0, 0 }, // Stock Boy in Chemist Shop
|
|
|
|
{ 1, 0, 0 }, // Barman
|
|
|
|
{ 1, 0, 0 }, // Dandy Player
|
|
|
|
{ 1, 0, 0 }, // Rough-looking Player
|
|
|
|
{ 1, 0, 0 }, // Spectator
|
|
|
|
{ 1, 0, 0 }, // Robert Hunt
|
|
|
|
{ 3, 4, 0, 0 }, // Violet Secretary
|
|
|
|
{ 1, 0, 0 }, // Pettigrew
|
|
|
|
{ 14, 15, 0, 0 }, // Augie (apple seller)
|
|
|
|
{ 3, 4, 5, 6, 0, 0 }, // Anna Carroway
|
|
|
|
{ 4, 5, 6, 0, 0 }, // Guard
|
|
|
|
{ 7, 8, 0, 0 }, // Antonio Caruso
|
|
|
|
{ 1, 0, 0 }, // Toby the Dog
|
|
|
|
{ 13, 14, 0, 0 }, // Simon Kingsley
|
|
|
|
{ 2, 3, 0, 0 }, // Alfred Tobacco Clerk
|
|
|
|
{ 3, 4, 0, 0 }, // Lady Brumwell
|
|
|
|
{ 1, 30, 0, 0 }, // Madame Rosa
|
|
|
|
{ 3, 4, 0, 0 }, // Lady Brumwell
|
|
|
|
{ 1, 0, 0 }, // Joseph Moorehead
|
|
|
|
{ 14, 15, 16, 17, 18, 19, 20, 0, 0 }, // Mrs. Beale
|
|
|
|
{ 1, 0, 0 }, // Felix the Lion
|
|
|
|
{ 1, 0, 0 }, // Hollingston
|
|
|
|
{ 1, 0, 0 }, // Constable Callaghan
|
|
|
|
{ 1, 1, 2, 2, 0, 0 }, // Sergeant Jeremy Duncan
|
|
|
|
{ 9, 10, 0, 0 }, // Lord Brumwell
|
|
|
|
{ 1, 2, 0, 138, 3, 4, 0, 138, 0, 0 }, // Nigel Jameson
|
|
|
|
{ 1, 8, 0, 0 }, // Jonas (newspaper seller)
|
|
|
|
{ 1, 0, 0 }, // Constable Dugan
|
|
|
|
{ 2, 0, 0 } // Inspector Lestrade (Yard)
|
|
|
|
};
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------*/
|
|
|
|
|
2015-03-18 22:32:41 -04:00
|
|
|
ScalpelEngine::ScalpelEngine(OSystem *syst, const SherlockGameDescription *gameDesc) :
|
|
|
|
SherlockEngine(syst, gameDesc) {
|
2015-03-18 23:01:47 -04:00
|
|
|
_darts = nullptr;
|
2015-04-15 08:22:40 -05:00
|
|
|
_mapResult = 0;
|
2015-03-18 22:32:41 -04:00
|
|
|
}
|
|
|
|
|
2015-03-18 23:01:47 -04:00
|
|
|
ScalpelEngine::~ScalpelEngine() {
|
|
|
|
delete _darts;
|
|
|
|
}
|
|
|
|
|
2015-03-15 16:52:55 -04:00
|
|
|
/**
|
2015-03-15 17:50:10 -04:00
|
|
|
* Game initialization
|
2015-03-15 16:52:55 -04:00
|
|
|
*/
|
2015-03-15 17:50:10 -04:00
|
|
|
void ScalpelEngine::initialize() {
|
2015-03-15 18:42:24 -04:00
|
|
|
SherlockEngine::initialize();
|
|
|
|
|
2015-03-18 23:01:47 -04:00
|
|
|
_darts = new Darts(this);
|
|
|
|
|
2015-03-15 16:52:55 -04:00
|
|
|
_flags.resize(100 * 8);
|
|
|
|
_flags[3] = true; // Turn on Alley
|
|
|
|
_flags[39] = true; // Turn on Baker Street
|
2015-03-15 17:50:10 -04:00
|
|
|
|
2015-03-20 22:01:52 -04:00
|
|
|
// Load the map co-ordinates for each scene
|
2015-04-15 08:22:40 -05:00
|
|
|
_map->loadPoints(NUM_PLACES, &MAP_X[0], &MAP_Y[0]);
|
2015-03-20 22:01:52 -04:00
|
|
|
|
2015-03-29 09:52:23 -04:00
|
|
|
// Load the inventory
|
|
|
|
loadInventory();
|
|
|
|
|
2015-03-31 22:42:57 -04:00
|
|
|
// Set up constants used by the talk system
|
|
|
|
_talk->setSequences(&TALK_SEQUENCES[0][0], &STILL_SEQUENCES[0][0], MAX_PEOPLE);
|
|
|
|
|
2015-03-18 23:01:47 -04:00
|
|
|
// Starting scene
|
2015-03-22 09:02:31 -04:00
|
|
|
_scene->_goToScene = 4;
|
2015-03-15 16:52:55 -04:00
|
|
|
}
|
|
|
|
|
2015-03-15 18:42:24 -04:00
|
|
|
/**
|
|
|
|
* Show the opening sequence
|
|
|
|
*/
|
|
|
|
void ScalpelEngine::showOpening() {
|
2015-03-16 22:42:19 -04:00
|
|
|
if (!showCityCutscene())
|
|
|
|
return;
|
|
|
|
if (!showAlleyCutscene())
|
|
|
|
return;
|
|
|
|
if (!showStreetCutscene())
|
|
|
|
return;
|
|
|
|
if (!showOfficeCutscene())
|
|
|
|
return;
|
2015-03-15 21:25:07 -04:00
|
|
|
|
|
|
|
_events->clearEvents();
|
|
|
|
_sound->stopMusic();
|
|
|
|
}
|
|
|
|
|
2015-03-16 22:42:19 -04:00
|
|
|
bool ScalpelEngine::showCityCutscene() {
|
2015-03-17 23:09:04 -04:00
|
|
|
byte palette[PALETTE_SIZE];
|
2015-03-15 21:25:07 -04:00
|
|
|
|
|
|
|
_sound->playMusic("prolog1.mus");
|
2015-03-15 23:16:38 -04:00
|
|
|
_titleOverride = "title.lib";
|
|
|
|
_soundOverride = "title.snd";
|
2015-03-17 23:09:04 -04:00
|
|
|
bool finished = _animation->playPrologue("26open1", 1, 255, true, 2);
|
|
|
|
|
|
|
|
if (finished) {
|
2015-03-19 19:49:42 -04:00
|
|
|
ImageFile titleImages("title2.vgs", true);
|
2015-03-28 20:13:57 -04:00
|
|
|
_screen->_backBuffer1.blitFrom(*_screen);
|
2015-03-17 23:09:04 -04:00
|
|
|
_screen->_backBuffer2.blitFrom(*_screen);
|
|
|
|
|
|
|
|
// London, England
|
2015-03-28 20:13:57 -04:00
|
|
|
_screen->_backBuffer1.transBlitFrom(titleImages[0], Common::Point(10, 11));
|
2015-03-17 23:09:04 -04:00
|
|
|
_screen->randomTransition();
|
|
|
|
finished = _events->delay(1000, true);
|
|
|
|
|
|
|
|
// November, 1888
|
|
|
|
if (finished) {
|
2015-03-28 20:13:57 -04:00
|
|
|
_screen->_backBuffer1.transBlitFrom(titleImages[1], Common::Point(101, 102));
|
2015-03-17 23:09:04 -04:00
|
|
|
_screen->randomTransition();
|
|
|
|
finished = _events->delay(5000, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Transition out the title
|
2015-03-28 20:13:57 -04:00
|
|
|
_screen->_backBuffer1.blitFrom(_screen->_backBuffer2);
|
2015-03-17 23:09:04 -04:00
|
|
|
_screen->randomTransition();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (finished)
|
|
|
|
finished = _animation->playPrologue("26open2", 1, 0, false, 2);
|
|
|
|
|
|
|
|
if (finished) {
|
2015-03-19 19:49:42 -04:00
|
|
|
ImageFile titleImages("title.vgs", true);
|
2015-03-28 20:13:57 -04:00
|
|
|
_screen->_backBuffer1.blitFrom(*_screen);
|
2015-03-17 23:09:04 -04:00
|
|
|
_screen->_backBuffer2.blitFrom(*_screen);
|
|
|
|
|
|
|
|
// The Lost Files of
|
2015-03-28 20:13:57 -04:00
|
|
|
_screen->_backBuffer1.transBlitFrom(titleImages[0], Common::Point(75, 6));
|
2015-03-17 23:09:04 -04:00
|
|
|
// Sherlock Holmes
|
2015-03-28 20:13:57 -04:00
|
|
|
_screen->_backBuffer1.transBlitFrom(titleImages[1], Common::Point(34, 21));
|
2015-03-17 23:09:04 -04:00
|
|
|
// copyright
|
2015-03-28 20:13:57 -04:00
|
|
|
_screen->_backBuffer1.transBlitFrom(titleImages[2], Common::Point(4, 190));
|
2015-03-17 23:09:04 -04:00
|
|
|
|
|
|
|
_screen->verticalTransition();
|
|
|
|
finished = _events->delay(4000, true);
|
|
|
|
|
|
|
|
if (finished) {
|
2015-03-28 20:13:57 -04:00
|
|
|
_screen->_backBuffer1.blitFrom(_screen->_backBuffer2);
|
2015-03-17 23:09:04 -04:00
|
|
|
_screen->randomTransition();
|
|
|
|
finished = _events->delay(2000);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (finished) {
|
|
|
|
_screen->getPalette(palette);
|
|
|
|
_screen->fadeToBlack(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (finished) {
|
|
|
|
// In the alley...
|
2015-03-19 19:49:42 -04:00
|
|
|
_screen->transBlitFrom(titleImages[3], Common::Point(72, 51));
|
2015-03-17 23:09:04 -04:00
|
|
|
_screen->fadeIn(palette, 3);
|
|
|
|
finished = _events->delay(3000, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
_titleOverride = "";
|
|
|
|
_soundOverride = "";
|
|
|
|
return finished;
|
2015-03-15 18:42:24 -04:00
|
|
|
}
|
|
|
|
|
2015-03-16 22:42:19 -04:00
|
|
|
bool ScalpelEngine::showAlleyCutscene() {
|
2015-04-08 22:55:33 +02:00
|
|
|
byte palette[PALETTE_SIZE];
|
|
|
|
_sound->playMusic("prolog2.mus");
|
|
|
|
|
|
|
|
_titleOverride = "TITLE.LIB";
|
|
|
|
_soundOverride = "TITLE.SND";
|
|
|
|
|
|
|
|
bool finished = _animation->playPrologue("27PRO1", 1, 3, true, 2);
|
|
|
|
if (finished)
|
|
|
|
_animation->playPrologue("27PRO2", 1, 0, false, 2);
|
|
|
|
|
|
|
|
if (finished) {
|
|
|
|
ImageFile screamImages("SCREAM.LBV", false);
|
|
|
|
_screen->_backBuffer1.transBlitFrom(screamImages[0], Common::Point(0, 0));
|
|
|
|
_screen->_backBuffer2.blitFrom(_screen->_backBuffer1);
|
|
|
|
finished = _events->delay(6000);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (finished)
|
|
|
|
_animation->playPrologue("27PRO3", 1, 0, true, 2);
|
|
|
|
|
|
|
|
if(finished) {
|
|
|
|
_screen->getPalette(palette);
|
|
|
|
_screen->fadeToBlack(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(finished) {
|
|
|
|
ImageFile titleImages("title3.vgs", true);
|
|
|
|
// "Early the following morning on Baker Street..."
|
|
|
|
_screen->_backBuffer1.transBlitFrom(titleImages[0], Common::Point(35, 51), false, 0);
|
|
|
|
_screen->fadeIn(palette, 3);
|
|
|
|
finished = _events->delay(1000);
|
|
|
|
}
|
|
|
|
|
|
|
|
_titleOverride = "";
|
|
|
|
_soundOverride = "";
|
|
|
|
return finished;
|
2015-03-15 21:25:07 -04:00
|
|
|
}
|
|
|
|
|
2015-03-16 22:42:19 -04:00
|
|
|
bool ScalpelEngine::showStreetCutscene() {
|
2015-03-18 22:32:41 -04:00
|
|
|
// TODO
|
2015-03-16 22:42:19 -04:00
|
|
|
return true;
|
2015-03-15 21:25:07 -04:00
|
|
|
}
|
|
|
|
|
2015-03-16 22:42:19 -04:00
|
|
|
bool ScalpelEngine::showOfficeCutscene() {
|
2015-03-18 22:32:41 -04:00
|
|
|
// TODO
|
2015-03-16 22:42:19 -04:00
|
|
|
return true;
|
2015-03-15 21:25:07 -04:00
|
|
|
}
|
|
|
|
|
2015-03-29 09:52:23 -04:00
|
|
|
void ScalpelEngine::loadInventory() {
|
|
|
|
Inventory &inv = *_inventory;
|
|
|
|
|
|
|
|
// Initial inventory
|
|
|
|
inv._holdings = 2;
|
|
|
|
inv.push_back(InventoryItem(0, "Message", "A message requesting help", "_ITEM03A"));
|
|
|
|
inv.push_back(InventoryItem(0, "Holmes Card", "A number of business cards", "_ITEM07A"));
|
|
|
|
|
|
|
|
// Potential items
|
|
|
|
inv.push_back(InventoryItem(95, "Tickets", "Opera Tickets", "_ITEM10A"));
|
|
|
|
inv.push_back(InventoryItem(138, "Cuff Link", "Cuff Link", "_ITEM04A"));
|
|
|
|
inv.push_back(InventoryItem(138, "Wire Hook", "Wire Hook", "_ITEM06A"));
|
|
|
|
inv.push_back(InventoryItem(150, "Note", "Note", "_ITEM13A"));
|
|
|
|
inv.push_back(InventoryItem(481, "Open Watch", "An open pocket watch", "_ITEM62A"));
|
|
|
|
inv.push_back(InventoryItem(481, "Paper", "A piece of paper with numbers on it", "_ITEM44A"));
|
|
|
|
inv.push_back(InventoryItem(532, "Letter", "A letter folded many times", "_ITEM68A"));
|
|
|
|
inv.push_back(InventoryItem(544, "Tarot", "Tarot Cards", "_ITEM71A"));
|
|
|
|
inv.push_back(InventoryItem(544, "Ornate Key", "An ornate key", "_ITEM70A"));
|
|
|
|
inv.push_back(InventoryItem(586, "Pawn ticket", "A pawn ticket", "_ITEM16A"));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2015-03-18 22:32:41 -04:00
|
|
|
/**
|
|
|
|
* Starting a scene within the game
|
|
|
|
*/
|
|
|
|
void ScalpelEngine::startScene() {
|
2015-03-22 09:02:31 -04:00
|
|
|
if (_scene->_goToScene == 100 || _scene->_goToScene == 98) {
|
2015-03-18 22:32:41 -04:00
|
|
|
// Chessboard selection
|
2015-03-21 18:18:12 -04:00
|
|
|
if (_sound->_musicOn) {
|
2015-03-18 22:32:41 -04:00
|
|
|
if (_sound->loadSong(100)) {
|
|
|
|
if (_sound->_music)
|
|
|
|
_sound->startSong();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-04-15 08:22:40 -05:00
|
|
|
_scene->_goToScene = _map->show();
|
2015-03-18 22:32:41 -04:00
|
|
|
|
|
|
|
_sound->freeSong();
|
2015-03-21 09:20:39 -04:00
|
|
|
_scene->_hsavedPos = Common::Point(-1, -1);
|
|
|
|
_scene->_hsavedFs = -1;
|
2015-03-18 22:32:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// Some rooms are prologue cutscenes, rather than normal game scenes. These are:
|
|
|
|
// 2: Blackwood's capture
|
|
|
|
// 52: Rescuing Anna
|
|
|
|
// 53: Moorehead's death / subway train
|
|
|
|
// 55: Fade out and exit
|
|
|
|
// 70: Brumwell suicide
|
2015-03-22 09:02:31 -04:00
|
|
|
switch (_scene->_goToScene) {
|
2015-03-18 22:32:41 -04:00
|
|
|
case 2:
|
|
|
|
case 52:
|
|
|
|
case 53:
|
|
|
|
case 70:
|
2015-03-22 09:02:31 -04:00
|
|
|
if (_sound->_musicOn && _sound->loadSong(_scene->_goToScene)) {
|
2015-03-18 22:32:41 -04:00
|
|
|
if (_sound->_music)
|
|
|
|
_sound->startSong();
|
|
|
|
}
|
|
|
|
|
2015-03-22 09:02:31 -04:00
|
|
|
switch (_scene->_goToScene) {
|
2015-03-18 22:32:41 -04:00
|
|
|
case 2:
|
|
|
|
// Blackwood's capture
|
|
|
|
_res->addToCache("final2.vda", "epilogue.lib");
|
|
|
|
_res->addToCache("final2.vdx", "epilogue.lib");
|
|
|
|
_animation->playPrologue("final1", 1, 3, true, 4);
|
|
|
|
_animation->playPrologue("final22", 1, 0, false, 4);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 52:
|
|
|
|
// Rescuing Anna
|
|
|
|
_res->addToCache("finalr2.vda", "epilogue.lib");
|
|
|
|
_res->addToCache("finalr2.vdx", "epilogue.lib");
|
|
|
|
_res->addToCache("finale1.vda", "epilogue.lib");
|
|
|
|
_res->addToCache("finale1.vdx", "epilogue.lib");
|
|
|
|
_res->addToCache("finale2.vda", "epilogue.lib");
|
|
|
|
_res->addToCache("finale2.vdx", "epilogue.lib");
|
|
|
|
_res->addToCache("finale3.vda", "epilogue.lib");
|
|
|
|
_res->addToCache("finale3.vdx", "epilogue.lib");
|
|
|
|
_res->addToCache("finale4.vda", "EPILOG2.lib");
|
|
|
|
_res->addToCache("finale4.vdx", "EPILOG2.lib");
|
|
|
|
|
|
|
|
_animation->playPrologue("finalr1", 1, 3, true, 4);
|
|
|
|
_animation->playPrologue("finalr2", 1, 0, false, 4);
|
|
|
|
|
|
|
|
if (!_res->isInCache("finale2.vda")) {
|
|
|
|
// Finale file isn't cached
|
|
|
|
_res->addToCache("finale2.vda", "epilogue.lib");
|
|
|
|
_res->addToCache("finale2.vdx", "epilogue.lib");
|
|
|
|
_res->addToCache("finale3.vda", "epilogue.lib");
|
|
|
|
_res->addToCache("finale3.vdx", "epilogue.lib");
|
|
|
|
_res->addToCache("finale4.vda", "EPILOG2.lib");
|
|
|
|
_res->addToCache("finale4.vdx", "EPILOG2.lib");
|
|
|
|
}
|
|
|
|
|
|
|
|
_animation->playPrologue("finale1", 1, 0, false, 4);
|
|
|
|
_animation->playPrologue("finale2", 1, 0, false, 4);
|
|
|
|
_animation->playPrologue("finale3", 1, 0, false, 4);
|
|
|
|
|
|
|
|
_useEpilogue2 = true;
|
|
|
|
_animation->playPrologue("finale4", 1, 0, false, 4);
|
|
|
|
_useEpilogue2 = false;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 53:
|
|
|
|
// Moorehead's death / subway train
|
|
|
|
_res->addToCache("SUBWAY2.vda", "epilogue.lib");
|
|
|
|
_res->addToCache("SUBWAY2.vdx", "epilogue.lib");
|
|
|
|
_res->addToCache("SUBWAY3.vda", "epilogue.lib");
|
|
|
|
_res->addToCache("SUBWAY3.vdx", "epilogue.lib");
|
|
|
|
|
|
|
|
_animation->playPrologue("SUBWAY1", 1, 3, true, 4);
|
|
|
|
_animation->playPrologue("SUBWAY2", 1, 0, false, 4);
|
|
|
|
_animation->playPrologue("SUBWAY3", 1, 0, false, 4);
|
|
|
|
|
|
|
|
// Set fading to direct fade temporary so the transition goes quickly.
|
2015-03-22 09:02:31 -04:00
|
|
|
_scene->_tempFadeStyle = _screen->_fadeStyle ? 257 : 256;
|
2015-03-18 22:32:41 -04:00
|
|
|
_screen->_fadeStyle = false;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 70:
|
|
|
|
// Brumwell suicide
|
|
|
|
_animation->playPrologue("suicid", 1, 3, true, 4);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Except for the Moorehead Murder scene, fade to black first
|
2015-03-22 09:02:31 -04:00
|
|
|
if (_scene->_goToScene != 53) {
|
2015-03-18 22:32:41 -04:00
|
|
|
_events->wait(40);
|
|
|
|
_screen->fadeToBlack(3);
|
|
|
|
}
|
|
|
|
|
2015-03-22 09:02:31 -04:00
|
|
|
switch (_scene->_goToScene) {
|
2015-03-18 22:32:41 -04:00
|
|
|
case 52:
|
2015-03-22 09:02:31 -04:00
|
|
|
_scene->_goToScene = 27; // Go to the Lawyer's Office
|
2015-03-18 23:01:47 -04:00
|
|
|
_scene->_bigPos = Common::Point(0, 0); // Overland scroll position
|
|
|
|
_scene->_overPos = Common::Point(22900 - 600, 9400 + 900); // Overland position
|
|
|
|
_scene->_oldCharPoint = 27;
|
2015-03-18 22:32:41 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 53:
|
2015-03-22 09:02:31 -04:00
|
|
|
_scene->_goToScene = 17; // Go to St. Pancras Station
|
2015-03-18 23:01:47 -04:00
|
|
|
_scene->_bigPos = Common::Point(0, 0); // Overland scroll position
|
|
|
|
_scene->_overPos = Common::Point(32500 - 600, 3000 + 900); // Overland position
|
|
|
|
_scene->_oldCharPoint = 17;
|
2015-03-18 22:32:41 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2015-03-22 09:02:31 -04:00
|
|
|
_scene->_goToScene = 4; // Back to Baker st.
|
2015-03-18 23:01:47 -04:00
|
|
|
_scene->_bigPos = Common::Point(0, 0); // Overland scroll position
|
|
|
|
_scene->_overPos = Common::Point(14500 - 600, 8400 + 900); // Overland position
|
|
|
|
_scene->_oldCharPoint = 4;
|
2015-03-18 22:32:41 -04:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Free any song from the previous scene
|
|
|
|
_sound->freeSong();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 55:
|
|
|
|
// Exit game
|
|
|
|
_screen->fadeToBlack(3);
|
|
|
|
quitGame();
|
|
|
|
return;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
_events->loadCursors("rmouse.vgs");
|
2015-03-21 20:25:15 -04:00
|
|
|
_events->setCursor(ARROW);
|
2015-03-18 22:32:41 -04:00
|
|
|
|
2015-03-22 09:02:31 -04:00
|
|
|
if (_scene->_goToScene == 99) {
|
2015-03-18 22:32:41 -04:00
|
|
|
// Chess Board
|
2015-03-18 23:01:47 -04:00
|
|
|
_darts->playDarts();
|
2015-04-15 08:22:40 -05:00
|
|
|
_mapResult = _scene->_goToScene = 19; // Go back to the bar
|
2015-03-18 22:32:41 -04:00
|
|
|
}
|
|
|
|
|
2015-04-15 08:22:40 -05:00
|
|
|
_mapResult = _scene->_goToScene;
|
2015-03-18 22:32:41 -04:00
|
|
|
}
|
|
|
|
|
2015-03-22 00:52:02 -04:00
|
|
|
/**
|
|
|
|
* Takes care of clearing the mirror in scene 12, in case anything drew over it
|
|
|
|
*/
|
|
|
|
void ScalpelEngine::eraseMirror12() {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Takes care of drawing Holme's reflection onto the mirror in scene 12
|
|
|
|
*/
|
|
|
|
void ScalpelEngine::doMirror12() {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This clears the mirror in scene 12 in case anything messed draw over it
|
|
|
|
*/
|
|
|
|
void ScalpelEngine::flushMirror12() {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2015-03-15 16:52:55 -04:00
|
|
|
} // End of namespace Scalpel
|
|
|
|
|
|
|
|
} // End of namespace Scalpel
|