From 824ecc0aad325c54f34c8fb7f64cf4df71c53090 Mon Sep 17 00:00:00 2001 From: Peter Kohaut Date: Wed, 21 Nov 2018 23:16:15 +0100 Subject: BLADERUNNER: Preliminary saving & loading support Saving and loading is accessible via ScummVM dialogs. No in-game UI support yet. It is possible to load saves from original game via debugger console. ScummVM saves have additional header and are incompatibile with original game. --- engines/bladerunner/ui/kia_section_suspects.cpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 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 54e33cb62b..460f744a2a 100644 --- a/engines/bladerunner/ui/kia_section_suspects.cpp +++ b/engines/bladerunner/ui/kia_section_suspects.cpp @@ -86,6 +86,7 @@ KIASectionSuspects::KIASectionSuspects(BladeRunnerEngine *vm, ActorClues *clues) _suspectSelected = -1; _suspectPhotoShapeId = -1; + _suspectPhotoNotUsed = -1; _suspectPhotoShape = nullptr; _suspectsFoundCount = 0; _suspectsFound.resize(_vm->_gameInfo->getSuspectCount()); @@ -108,6 +109,22 @@ KIASectionSuspects::~KIASectionSuspects() { delete _uiContainer; } +void KIASectionSuspects::reset() { + _acquiredClueCount = 0; + _suspectsFoundCount = 0; + _mouseX = 0; + _mouseY = 0; + _suspectSelected = -1; + _crimeSelected = -1; + _suspectPhotoShapeId = -1; + _suspectPhotoNotUsed = -1; + _whereaboutsFilter = true; + _MOFilter = true; + _replicantFilter = true; + _nonReplicantFilter = true; + _othersFilter = true; +} + void KIASectionSuspects::open() { _scheduledSwitch = false; @@ -169,7 +186,6 @@ void KIASectionSuspects::draw(Graphics::Surface &surface) { _uiContainer->draw(surface); - _vm->_mainFont->drawColor(_vm->_textKIA->getText(0), surface, 300, 162, 0x77DF); _vm->_mainFont->drawColor(_vm->_textKIA->getText(46), surface, 142, 248, 0x77DF); _vm->_mainFont->drawColor(_vm->_textKIA->getText(47), surface, 142, 308, 0x77DF); @@ -479,18 +495,20 @@ void KIASectionSuspects::updateSuspectPhoto() { SuspectDatabaseEntry *suspect = _vm->_suspectsDatabase->get(_suspectSelected); _suspectPhotoShapeId = -1; + _suspectPhotoNotUsed = -1; int photoCluesCount = suspect->getPhotoCount(); if (photoCluesCount > 0) { for (int i = 0 ; i < photoCluesCount; i++) { - //TODO: weird stuff going on here... it's using index instead id, also some field is used but its always -1 + //TODO: weird stuff going on here... original game is using internal clue index instead id if (_clues->isAcquired(suspect->getPhotoClueId(i))) { _suspectPhotoShapeId = suspect->getPhotoShapeId(i); + _suspectPhotoNotUsed = suspect->getPhotoNotUsed(i); break; } } } - if (_suspectPhotoShapeId == -1) { + if (_suspectPhotoShapeId == -1 && _suspectPhotoNotUsed == -1) { if (suspect->getSex()) { _suspectPhotoShapeId = 14; } else { -- cgit v1.2.3