SHERLOCK: Add some code for the interactive demo (still crashing)
This commit is contained in:
parent
6d110485bc
commit
1f81f61cf9
5 changed files with 25 additions and 6 deletions
|
@ -122,6 +122,13 @@ bool Sherlock::SherlockEngine::hasFeature(EngineFeature f) const {
|
|||
(f == kSupportsSavingDuringRuntime);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the version is a demo
|
||||
*/
|
||||
bool Sherlock::SherlockEngine::getIsDemo() const {
|
||||
return _gameDescription->desc.flags & ADGF_DEMO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of savegames
|
||||
*/
|
||||
|
|
|
@ -84,6 +84,7 @@ static const SherlockGameDescription gameDescriptions[] = {
|
|||
|
||||
{
|
||||
// Case of the Rose Tattoo - English CD
|
||||
// Provided by dreammaster
|
||||
{
|
||||
"rosetattoo",
|
||||
"CD",
|
||||
|
|
|
@ -69,6 +69,7 @@ Map::Map(SherlockEngine *vm): _vm(vm), _topLine(SHERLOCK_SCREEN_WIDTH, 12) {
|
|||
for (int idx = 0; idx < MAX_HOLMES_SEQUENCE; ++idx)
|
||||
Common::fill(&_sequences[idx][0], &_sequences[idx][MAX_FRAME], 0);
|
||||
|
||||
if (!_vm->getIsDemo())
|
||||
loadData();
|
||||
}
|
||||
|
||||
|
|
|
@ -215,9 +215,11 @@ void ScalpelEngine::initialize() {
|
|||
_flags[3] = true; // Turn on Alley
|
||||
_flags[39] = true; // Turn on Baker Street
|
||||
|
||||
if (!getIsDemo()) {
|
||||
// Load the map co-ordinates for each scene and sequence data
|
||||
_map->loadPoints(NUM_PLACES, &MAP_X[0], &MAP_Y[0], &MAP_TRANSLATE[0]);
|
||||
_map->loadSequences(3, &MAP_SEQUENCES[0][0]);
|
||||
}
|
||||
|
||||
// Load the inventory
|
||||
loadInventory();
|
||||
|
@ -226,6 +228,9 @@ void ScalpelEngine::initialize() {
|
|||
_talk->setSequences(&TALK_SEQUENCES[0][0], &STILL_SEQUENCES[0][0], MAX_PEOPLE);
|
||||
|
||||
// Starting scene
|
||||
if (getIsDemo())
|
||||
_scene->_goToScene = 3;
|
||||
else
|
||||
_scene->_goToScene = 4;
|
||||
}
|
||||
|
||||
|
@ -233,6 +238,9 @@ void ScalpelEngine::initialize() {
|
|||
* Show the opening sequence
|
||||
*/
|
||||
void ScalpelEngine::showOpening() {
|
||||
if (getIsDemo())
|
||||
return;
|
||||
|
||||
if (!showCityCutscene())
|
||||
return;
|
||||
if (!showAlleyCutscene())
|
||||
|
|
|
@ -457,10 +457,12 @@ bool Scene::loadScene(const Common::String &filename) {
|
|||
_walkedInScene = false;
|
||||
saves._justLoaded = false;
|
||||
|
||||
if (!_vm->getIsDemo()) {
|
||||
// Reset the previous map location and position on overhead map
|
||||
map._oldCharPoint = _currentScene;
|
||||
map._overPos.x = map[_currentScene].x * 100 - 600;
|
||||
map._overPos.y = map[_currentScene].y * 100 + 900;
|
||||
}
|
||||
|
||||
events.clearEvents();
|
||||
return flag;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue