aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/action.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-06-01 14:43:26 -0400
committerPaul Gilbert2014-06-01 14:43:26 -0400
commit69d6e72f849786de672144bd7367761df89d242e (patch)
tree55fa9cd3a55b1f6e32ac04dbe92f71c733349359 /engines/mads/action.cpp
parentd42317b35cd18a963798e0a81582b8b184107297 (diff)
downloadscummvm-rg350-69d6e72f849786de672144bd7367761df89d242e.tar.gz
scummvm-rg350-69d6e72f849786de672144bd7367761df89d242e.tar.bz2
scummvm-rg350-69d6e72f849786de672144bd7367761df89d242e.zip
MADS: Fix dynamic hotspots in scenes with multiple such hotspots
Diffstat (limited to 'engines/mads/action.cpp')
-rw-r--r--engines/mads/action.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/mads/action.cpp b/engines/mads/action.cpp
index 80480cbdfd..d0b4583d92 100644
--- a/engines/mads/action.cpp
+++ b/engines/mads/action.cpp
@@ -190,7 +190,7 @@ void MADSAction::set() {
verbId = scene._hotspots[_hotspotId]._verbId;
} else {
// Get the verb Id from the scene object
- verbId = scene._dynamicHotspots[_hotspotId - scene._hotspots.size()]._verbId;
+ verbId = scene._dynamicHotspots.get(_hotspotId - scene._hotspots.size())._verbId;
}
if (verbId > 0) {
@@ -213,7 +213,7 @@ void MADSAction::set() {
_action._objectNameId = scene._hotspots[_hotspotId]._vocabId;
} else {
// Get name from temporary scene hotspot
- _action._objectNameId = scene._dynamicHotspots[_hotspotId - scene._hotspots.size()]._descId;
+ _action._objectNameId = scene._dynamicHotspots.get(_hotspotId - scene._hotspots.size())._descId;
}
appendVocab(_action._objectNameId);
}
@@ -226,7 +226,7 @@ void MADSAction::set() {
} else if (_secondObject < (int)scene._hotspots.size()) {
_action._indirectObjectId = scene._hotspots[_secondObject]._vocabId;
} else {
- _action._indirectObjectId = scene._dynamicHotspots[_secondObject - scene._hotspots.size()]._descId;
+ _action._indirectObjectId = scene._dynamicHotspots.get(_secondObject - scene._hotspots.size())._descId;
}
}
@@ -241,7 +241,7 @@ void MADSAction::set() {
} else if (_hotspotId < (int)scene._hotspots.size()) {
articleNum = scene._hotspots[_hotspotId]._articleNumber;
} else {
- articleNum = scene._dynamicHotspots[_hotspotId - scene._hotspots.size()]._articleNumber;
+ articleNum = scene._dynamicHotspots.get(_hotspotId - scene._hotspots.size())._articleNumber;
}
_statusText += kArticleList[articleNum];
@@ -344,7 +344,7 @@ void MADSAction::startAction() {
hotspotId = _savedFields._secondObject;
if (hotspotId >= (int)hotspots.size()) {
- DynamicHotspot &hs = dynHotspots[hotspotId - hotspots.size()];
+ DynamicHotspot &hs = dynHotspots.get(hotspotId - hotspots.size());
if ((hs._feetPos.x == -1) || (hs._feetPos.x == -3)) {
startWalkingDirectly(hs._feetPos.x);
} else if (hs._feetPos.x == 0) {