Skip to content

Commit

Permalink
ACCESS: Fix the end of the demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke authored and dreammaster committed Dec 13, 2014
1 parent bf36171 commit b864b84
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions engines/access/amazon/amazon_game.cpp
Expand Up @@ -621,22 +621,28 @@ void AmazonEngine::dead(int deathId) {
_screen->clearScreen();
_screen->setPanel(3);

if (deathId != 10) {
if ((deathId == 10) && !isDemo()) {
quitGame();
_events->pollEvents();
return;
} else {
if (!isDemo())
_midi->newMusic(62, 0);
_files->_setPaletteFlag = false;
_files->loadScreen(94, 0);
_files->_setPaletteFlag = true;
_buffer2.copyFrom(*_screen);

for (int i = 0; i < 3; ++i) {
_sound->playSound(0);
_screen->forceFadeIn();
_sound->playSound(0);
_screen->forceFadeOut();
if (!isDemo() || deathId != 10) {
for (int i = 0; i < 3; ++i) {
_sound->playSound(0);
_screen->forceFadeIn();
_sound->playSound(0);
_screen->forceFadeOut();

if (shouldQuit())
return;
if (shouldQuit())
return;
}
}

if (!isDemo()) {
Expand Down Expand Up @@ -708,9 +714,6 @@ void AmazonEngine::dead(int deathId) {
warning("TODO: restart game");
quitGame();
_events->pollEvents();
} else {
quitGame();
_events->pollEvents();
}
}

Expand Down

0 comments on commit b864b84

Please sign in to comment.