[Scummvm-cvs-logs] SF.net SVN: scummvm:[55493] scummvm/trunk/engines/mohawk
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Mon Jan 24 03:43:08 CET 2011
Revision: 55493
http://scummvm.svn.sourceforge.net/scummvm/?rev=55493&view=rev
Author: mthreepwood
Date: 2011-01-24 02:43:07 +0000 (Mon, 24 Jan 2011)
Log Message:
-----------
MOHAWK: Recheck the current hotspot if a script has changed the enabled hotspots in Riven
Modified Paths:
--------------
scummvm/trunk/engines/mohawk/riven.cpp
scummvm/trunk/engines/mohawk/riven.h
scummvm/trunk/engines/mohawk/riven_external.cpp
scummvm/trunk/engines/mohawk/riven_scripts.cpp
Modified: scummvm/trunk/engines/mohawk/riven.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven.cpp 2011-01-24 01:58:43 UTC (rev 55492)
+++ scummvm/trunk/engines/mohawk/riven.cpp 2011-01-24 02:43:07 UTC (rev 55493)
@@ -376,8 +376,7 @@
}
// Now we need to redraw the cursor if necessary and handle mouse over scripts
- _curHotspot = -1;
- checkHotspotChange();
+ updateCurrentHotspot();
}
void MohawkEngine_Riven::loadCard(uint16 id) {
@@ -496,6 +495,11 @@
}
}
+void MohawkEngine_Riven::updateCurrentHotspot() {
+ _curHotspot = -1;
+ checkHotspotChange();
+}
+
Common::String MohawkEngine_Riven::getHotspotName(uint16 hotspot) {
assert(hotspot < _hotspotCount);
Modified: scummvm/trunk/engines/mohawk/riven.h
===================================================================
--- scummvm/trunk/engines/mohawk/riven.h 2011-01-24 01:58:43 UTC (rev 55492)
+++ scummvm/trunk/engines/mohawk/riven.h 2011-01-24 02:43:07 UTC (rev 55493)
@@ -146,6 +146,7 @@
void checkInventoryClick();
bool _showHotspots;
void updateZipMode();
+ void checkHotspotChange();
// Variables
uint32 *_vars;
@@ -177,7 +178,7 @@
void runHotspotScript(uint16 hotspot, uint16 scriptType);
int32 getCurHotspot() const { return _curHotspot; }
Common::String getHotspotName(uint16 hotspot);
- void checkHotspotChange();
+ void updateCurrentHotspot();
// Variable functions
void initVars();
Modified: scummvm/trunk/engines/mohawk/riven_external.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven_external.cpp 2011-01-24 01:58:43 UTC (rev 55492)
+++ scummvm/trunk/engines/mohawk/riven_external.cpp 2011-01-24 02:43:07 UTC (rev 55493)
@@ -1796,8 +1796,7 @@
_vm->_hotspots[3].enabled = !_vm->_hotspots[3].enabled;
// Update the cursor
- _vm->_curHotspot = -1;
- _vm->checkHotspotChange();
+ _vm->updateCurrentHotspot();
}
void RivenExternal::xjatboundary(uint16 argc, uint16 *argv) {
@@ -2460,8 +2459,7 @@
// Check the new hotspots and refresh everything
*marble = 0;
setMarbleHotspots();
- _vm->_curHotspot = -1;
- _vm->checkHotspotChange();
+ _vm->updateCurrentHotspot();
_vm->_gfx->updateScreen();
}
Modified: scummvm/trunk/engines/mohawk/riven_scripts.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven_scripts.cpp 2011-01-24 01:58:43 UTC (rev 55492)
+++ scummvm/trunk/engines/mohawk/riven_scripts.cpp 2011-01-24 02:43:07 UTC (rev 55493)
@@ -380,6 +380,9 @@
_vm->_hotspots[i].enabled = true;
}
}
+
+ // Recheck our current hotspot because it may have now changed
+ _vm->updateCurrentHotspot();
}
// Command 10: disable hotspot (blst_id)
@@ -390,6 +393,9 @@
_vm->_hotspots[i].enabled = false;
}
}
+
+ // Recheck our current hotspot because it may have now changed
+ _vm->updateCurrentHotspot();
}
// Command 12: stop sounds (flags)
@@ -589,6 +595,9 @@
}
delete blst;
+
+ // Recheck our current hotspot because it may have now changed
+ _vm->updateCurrentHotspot();
}
// Command 44: activate FLST record (information on which SFXE resource this card should use)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list