From cf8dee054d0e534e423d5c81f64235db0d94e80a Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 20 May 2007 20:35:08 +0000 Subject: Fixed regression: location comment wasn't shown on every location except the first visited. svn-id: r26895 --- engines/parallaction/location.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/parallaction/location.cpp b/engines/parallaction/location.cpp index b353dffd28..da67c556af 100644 --- a/engines/parallaction/location.cpp +++ b/engines/parallaction/location.cpp @@ -122,6 +122,7 @@ void Parallaction::parseLocation(const char *filename) { } if (!scumm_stricmp(_tokens[0], "COMMENT")) { _location._comment = parseComment(*_locationScript); + debugC(3, kDebugLocation, "Location comment: '%s'", _location._comment); } if (!scumm_stricmp(_tokens[0], "ENDCOMMENT")) { _location._endComment = parseComment(*_locationScript); @@ -370,7 +371,11 @@ void Parallaction::changeLocation(char *location) { runJobs(); _gfx->swapBuffers(); } - + + if (_location._comment) { + doLocationEnterTransition(); + } + runJobs(); _gfx->swapBuffers(); @@ -399,9 +404,11 @@ void Parallaction::changeLocation(char *location) { void Parallaction::doLocationEnterTransition() { debugC(1, kDebugLocation, "doLocationEnterTransition"); - if (_localFlags[_currentLocationIndex] & kFlagsVisited) - return; // visited - + if (_localFlags[_currentLocationIndex] & kFlagsVisited) { + debugC(3, kDebugLocation, "skipping location transition"); + return; // visited + } + byte pal[PALETTE_SIZE]; _gfx->buildBWPalette(pal); _gfx->setPalette(pal); -- cgit v1.2.3