diff options
author | Paul Gilbert | 2014-03-19 23:33:18 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-03-19 23:33:18 -0400 |
commit | 8d252f4f0e81cfd43e5b311df4a1ed5fb478953b (patch) | |
tree | 3e37aa66ca3ff9ef92d94cb317c26da16dce3d19 /engines/mads/hotspots.cpp | |
parent | 4ab73a89abd66890391a977ebf4a23eb361a44a4 (diff) | |
download | scummvm-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.cpp | 12 |
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; |