aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo/tattoo_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/tattoo/tattoo_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/tattoo/tattoo_map.cpp')
-rw-r--r--engines/sherlock/tattoo/tattoo_map.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/sherlock/tattoo/tattoo_map.cpp b/engines/sherlock/tattoo/tattoo_map.cpp
index f7af0f47f3..b60ac3aa8b 100644
--- a/engines/sherlock/tattoo/tattoo_map.cpp
+++ b/engines/sherlock/tattoo/tattoo_map.cpp
@@ -49,6 +49,7 @@ TattooMap::TattooMap(SherlockEngine *vm) : Map(vm), _mapTooltip(vm) {
}
int TattooMap::show() {
+ Debugger &debugger = *_vm->_debugger;
Events &events = *_vm->_events;
Music &music = *_vm->_music;
Resources &res = *_vm->_res;
@@ -129,6 +130,11 @@ int TattooMap::show() {
events.setButtonState();
Common::Point mousePos = events.screenMousePos();
+ if (debugger._showAllLocations == LOC_REFRESH) {
+ drawMapIcons();
+ screen.slamArea(screen._currentScroll.x, screen._currentScroll.y, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_WIDTH);
+ }
+
checkMapNames(true);
if (mousePos.x < (SHERLOCK_SCREEN_WIDTH / 6))
@@ -290,10 +296,12 @@ void TattooMap::loadData() {
}
void TattooMap::drawMapIcons() {
+ Debugger &debugger = *_vm->_debugger;
Screen &screen = *_vm->_screen;
for (uint idx = 0; idx < _data.size(); ++idx) {
- _vm->setFlagsDirect(idx + 1);
+ if (debugger._showAllLocations != LOC_DISABLED)
+ _vm->setFlagsDirect(idx + 1);
if (_data[idx]._iconNum != -1 && _vm->readFlags(idx + 1)) {
MapEntry &mapEntry = _data[idx];
@@ -302,6 +310,9 @@ void TattooMap::drawMapIcons() {
mapEntry.y - img._height / 2));
}
}
+
+ if (debugger._showAllLocations == LOC_REFRESH)
+ debugger._showAllLocations = LOC_ALL;
}
void TattooMap::checkMapNames(bool slamIt) {