diff options
author | Thanasis Antoniou | 2019-09-05 10:37:47 +0300 |
---|---|---|
committer | Thanasis Antoniou | 2019-09-05 10:39:51 +0300 |
commit | 5941ab78584147a751602b4a90061899fb63e0b2 (patch) | |
tree | 32ca34f767fd4a9916730bac6ae09a1cf371904a /engines/bladerunner/ui/kia_section_suspects.cpp | |
parent | b04be6f9e1e50f93fb9a57471907d5789c93e120 (diff) | |
download | scummvm-rg350-5941ab78584147a751602b4a90061899fb63e0b2.tar.gz scummvm-rg350-5941ab78584147a751602b4a90061899fb63e0b2.tar.bz2 scummvm-rg350-5941ab78584147a751602b4a90061899fb63e0b2.zip |
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.
Diffstat (limited to 'engines/bladerunner/ui/kia_section_suspects.cpp')
-rw-r--r-- | engines/bladerunner/ui/kia_section_suspects.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
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; |