aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/scalpel/scalpel_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sherlock/scalpel/scalpel_map.cpp')
-rw-r--r--engines/sherlock/scalpel/scalpel_map.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/sherlock/scalpel/scalpel_map.cpp b/engines/sherlock/scalpel/scalpel_map.cpp
index 6da52e687f..369822ba02 100644
--- a/engines/sherlock/scalpel/scalpel_map.cpp
+++ b/engines/sherlock/scalpel/scalpel_map.cpp
@@ -122,6 +122,7 @@ void ScalpelMap::loadData() {
}
int ScalpelMap::show() {
+ Debugger &debugger = *_vm->_debugger;
Events &events = *_vm->_events;
People &people = *_vm->_people;
Screen &screen = *_vm->_screen;
@@ -175,6 +176,11 @@ int ScalpelMap::show() {
events.pollEventsAndWait();
events.setButtonState();
+ if (debugger._showAllLocations == LOC_REFRESH) {
+ showPlaces();
+ screen.slamArea(screen._currentScroll.x, screen._currentScroll.y, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_WIDTH);
+ }
+
// Keyboard handling
if (events.kbHit()) {
Common::KeyState keyState = events.getKey();
@@ -342,12 +348,16 @@ void ScalpelMap::freeSprites() {
}
void ScalpelMap::showPlaces() {
+ Debugger &debugger = *_vm->_debugger;
Screen &screen = *_vm->_screen;
for (uint idx = 0; idx < _points.size(); ++idx) {
const MapEntry &pt = _points[idx];
if (pt.x != 0 && pt.y != 0) {
+ if (debugger._showAllLocations != LOC_DISABLED)
+ _vm->setFlagsDirect(idx);
+
if (pt.x >= _bigPos.x && (pt.x - _bigPos.x) < SHERLOCK_SCREEN_WIDTH
&& pt.y >= _bigPos.y && (pt.y - _bigPos.y) < SHERLOCK_SCREEN_HEIGHT) {
if (_vm->readFlags(idx)) {
@@ -357,6 +367,9 @@ void ScalpelMap::showPlaces() {
}
}
}
+
+ if (debugger._showAllLocations == LOC_REFRESH)
+ debugger._showAllLocations = LOC_ALL;
}
void ScalpelMap::saveTopLine() {