aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/hotspots.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-03-19 23:33:18 -0400
committerPaul Gilbert2014-03-19 23:33:18 -0400
commit8d252f4f0e81cfd43e5b311df4a1ed5fb478953b (patch)
tree3e37aa66ca3ff9ef92d94cb317c26da16dce3d19 /engines/mads/hotspots.cpp
parent4ab73a89abd66890391a977ebf4a23eb361a44a4 (diff)
downloadscummvm-rg350-8d252f4f0e81cfd43e5b311df4a1ed5fb478953b.tar.gz
scummvm-rg350-8d252f4f0e81cfd43e5b311df4a1ed5fb478953b.tar.bz2
scummvm-rg350-8d252f4f0e81cfd43e5b311df4a1ed5fb478953b.zip
MADS: Implemented methods for checking action at mouse position and clicking
Diffstat (limited to 'engines/mads/hotspots.cpp')
-rw-r--r--engines/mads/hotspots.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/mads/hotspots.cpp b/engines/mads/hotspots.cpp
index df56a69e5a..91b8127d92 100644
--- a/engines/mads/hotspots.cpp
+++ b/engines/mads/hotspots.cpp
@@ -122,16 +122,20 @@ void DynamicHotspots::reset() {
}
void DynamicHotspots::refresh() {
+ // Reset the screen objects back to only contain UI elements
+ ScreenObjects &scrObjects = _vm->_game->_screenObjects;
+ scrObjects.resize(scrObjects._uiCount);
+
+ // Loop through adding hotspots
for (uint i = 0; i < _entries.size(); ++i) {
DynamicHotspot &dh = (*this)[i];
if ((*this)[i]._active) {
- switch (_vm->_game->_screenObjects._v832EC) {
+ switch (scrObjects._v832EC) {
case 0:
case 2:
- _vm->_game->_screenObjects.add(dh._bounds, _vm->_game->_scene._layer,
- CAT_12, dh._descId);
- _vm->_game->_screenObjects._v8333C = true;
+ scrObjects.add(dh._bounds, _vm->_game->_scene._layer, CAT_12, dh._descId);
+ scrObjects._v8333C = true;
break;
default:
break;