From 5941ab78584147a751602b4a90061899fb63e0b2 Mon Sep 17 00:00:00 2001 From: Thanasis Antoniou Date: Thu, 5 Sep 2019 10:37:47 +0300 Subject: BLADERUNNER: Fix displaying of clues in KIA Fixes bug where clues with no type would appear in KIA sections "End of Act 2" would appear in Sadik's and Clovis' suspect pages, and in Bradbury crime page, whereas Sadik's photo would not appear in Sadik's page. --- engines/bladerunner/ui/kia_section_suspects.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'engines/bladerunner/ui/kia_section_suspects.cpp') diff --git a/engines/bladerunner/ui/kia_section_suspects.cpp b/engines/bladerunner/ui/kia_section_suspects.cpp index cfe3fc3252..ba1f6a5f7f 100644 --- a/engines/bladerunner/ui/kia_section_suspects.cpp +++ b/engines/bladerunner/ui/kia_section_suspects.cpp @@ -66,7 +66,7 @@ KIASectionSuspects::KIASectionSuspects(BladeRunnerEngine *vm, ActorClues *clues) _replicantCheckBox = new UICheckBox(_vm, checkBoxCallback, this, Common::Rect(142, 338, 275, 348), 1, _replicantFilter); _nonReplicantCheckBox = new UICheckBox(_vm, checkBoxCallback, this, Common::Rect(142, 348, 275, 358), 1, _nonReplicantFilter); _othersCheckBox = new UICheckBox(_vm, checkBoxCallback, this, Common::Rect(142, 358, 275, 368), 1, _othersFilter); - _cluesScrollBox = new UIScrollBox(_vm, scrollBoxCallback, this,_vm->_gameInfo->getClueCount(), 1, false, Common::Rect(312, 172, 500, 376), Common::Rect(506, 160, 506, 394)); + _cluesScrollBox = new UIScrollBox(_vm, scrollBoxCallback, this, kClueCount, 1, false, Common::Rect(312, 172, 500, 376), Common::Rect(506, 160, 506, 394)); _crimesScrollBox = new UIScrollBox(_vm, scrollBoxCallback, this, 50, 1, false, Common::Rect(154, 258, 291, 298), Common::Rect(120, 249, 120, 297)); _uiContainer->add(_whereaboutsCheckBox); _uiContainer->add(_MOCheckBox); @@ -380,9 +380,10 @@ void KIASectionSuspects::onButtonPressed(int buttonId) { void KIASectionSuspects::populateAcquiredClues() { _acquiredClueCount = 0; for (int i = 0; i < kClueCount; ++i) { - if (_clues->isAcquired(i)) { - _acquiredClues[_acquiredClueCount].clueId = i; - _acquiredClues[_acquiredClueCount].actorId = _clues->getFromActorId(i); + int clueId = _clues->getClueIdByIndex(i); + if (_clues->isAcquired(clueId)) { + _acquiredClues[_acquiredClueCount].clueId = clueId; + _acquiredClues[_acquiredClueCount].actorId = _clues->getFromActorId(clueId); ++_acquiredClueCount; } } @@ -453,7 +454,7 @@ void KIASectionSuspects::populateVisibleClues() { for (int i = 0; i < _acquiredClueCount; ++i) { int clueId = _acquiredClues[i].clueId; - if (_vm->_crimesDatabase->getAssetType(i) != -1) { + if (_vm->_crimesDatabase->getAssetType(clueId) != -1) { SuspectDatabaseEntry *suspect = _vm->_suspectsDatabase->get(_suspectSelected); bool showClue = false; -- cgit v1.2.3