aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/scalpel/scalpel_map.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-07-13 20:17:02 -0400
committerPaul Gilbert2015-07-13 20:17:02 -0400
commit10c96babbcba734ab6bd8273d1a6ebff58018dd3 (patch)
tree835479dc4458500a60317cf55e37e24ddbf7dda7 /engines/sherlock/scalpel/scalpel_map.cpp
parent03acc4ec275793e0f8256053801ecaad566bc74e (diff)
downloadscummvm-rg350-10c96babbcba734ab6bd8273d1a6ebff58018dd3.tar.gz
scummvm-rg350-10c96babbcba734ab6bd8273d1a6ebff58018dd3.tar.bz2
scummvm-rg350-10c96babbcba734ab6bd8273d1a6ebff58018dd3.zip
SHERLOCK: Debugger locations command to show all locations on the map
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() {