aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/console.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2016-08-06 06:41:04 +0200
committerEugene Sandulenko2017-07-03 08:50:10 +0200
commit099b3b3d8ff4729b5556f07f0e4476555ce7659c (patch)
tree69e68b5ae072a8956bb9b51fcb36952703cc2138 /engines/mohawk/console.cpp
parent67d9a3c71bb2c201fc4c43f159025fc6ea4517e7 (diff)
downloadscummvm-rg350-099b3b3d8ff4729b5556f07f0e4476555ce7659c.tar.gz
scummvm-rg350-099b3b3d8ff4729b5556f07f0e4476555ce7659c.tar.bz2
scummvm-rg350-099b3b3d8ff4729b5556f07f0e4476555ce7659c.zip
MOHAWK: Move the hotspot list to RivenCard
Also replace all hardcoded accesses to the hotspot array with hotspot queries.
Diffstat (limited to 'engines/mohawk/console.cpp')
-rw-r--r--engines/mohawk/console.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index 4be76930c5..41dd535c3a 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -510,10 +510,12 @@ bool RivenConsole::Cmd_ChangeStack(int argc, const char **argv) {
}
bool RivenConsole::Cmd_Hotspots(int argc, const char **argv) {
- debugPrintf("Current card (%d) has %d hotspots:\n", _vm->getCurCard()->getId(), _vm->_hotspots.size());
+ Common::Array<RivenHotspot *> hotspots = _vm->_card->getHotspots();
- for (uint16 i = 0; i < _vm->_hotspots.size(); i++) {
- RivenHotspot *hotspot = _vm->_hotspots[i];
+ debugPrintf("Current card (%d) has %d hotspots:\n", _vm->getCurCard()->getId(), hotspots.size());
+
+ for (uint16 i = 0; i < hotspots.size(); i++) {
+ RivenHotspot *hotspot = hotspots[i];
debugPrintf("Hotspot %d, index %d, BLST ID %d (", i, hotspot->getIndex(), hotspot->getBlstId());
if (hotspot->isEnabled())