From 552b88cbd5464d1468b6b3b7f3cf4cc44378b8fc Mon Sep 17 00:00:00 2001 From: Matthew Stewart Date: Wed, 8 Aug 2018 20:59:21 -0400 Subject: STARTREK: Bugfix to map preview of republic --- engines/startrek/awaymission.h | 1 + engines/startrek/menu.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/startrek/awaymission.h b/engines/startrek/awaymission.h index 7db9ef8e19..9c4d591073 100644 --- a/engines/startrek/awaymission.h +++ b/engines/startrek/awaymission.h @@ -629,6 +629,7 @@ struct AwayMission { bool bridgeCrewmanDead; // 0x30 bool scannedCaptainsChair; // 0x31 bool scannedComputerBank; // 0x32 + bool showedRepublicMapFirstTime; // 0x33 bool impulseEnginesOn; // 0x34 // 0: beam still in place diff --git a/engines/startrek/menu.cpp b/engines/startrek/menu.cpp index fdbbf1911d..d284809268 100644 --- a/engines/startrek/menu.cpp +++ b/engines/startrek/menu.cpp @@ -1023,7 +1023,7 @@ void StarTrekEngine::showRepublicMap(int16 arg0, int16 turbolift) { actorFunc1(); _gfx->pushSprites(); - if (!_awayMission.veng.scannedComputerBank) { + if (!_awayMission.veng.showedRepublicMapFirstTime) { _gfx->setBackgroundImage(_gfx->loadBitmap("veng9b")); _gfx->copyBackgroundScreen(); _system->updateScreen(); @@ -1071,7 +1071,13 @@ void StarTrekEngine::showRepublicMap(int16 arg0, int16 turbolift) { } } - _awayMission.veng.scannedComputerBank = true; // FIXME? + // BUGFIX: Original game used variable "scannedComputerBank" (0x32) instead of + // "showedRepublicMapFirstTime" (0x33), which is used elsewhere. Byte 0x33 is + // otherwise unused, so maybe this is a weird off-by-1 error. + // The effective result is that scanning the computer bank would cause the preview + // of the map screen to not appear. + _awayMission.veng.showedRepublicMapFirstTime = true; + _gfx->fadeoutScreen(); } -- cgit v1.2.3