[Scummvm-cvs-logs] SF.net SVN: scummvm:[43766] scummvm/trunk/engines/gob
strangerke at users.sourceforge.net
strangerke at users.sourceforge.net
Thu Aug 27 12:37:48 CEST 2009
Revision: 43766
http://scummvm.svn.sourceforge.net/scummvm/?rev=43766&view=rev
Author: strangerke
Date: 2009-08-27 10:37:48 +0000 (Thu, 27 Aug 2009)
Log Message:
-----------
Playtoons/Adi2 - Add rudimentary Hotspots search function based on shortId. The long Id checked is ShortId plus 0xD000, 0xB000 or 0x4000.
Modified Paths:
--------------
scummvm/trunk/engines/gob/hotspots.cpp
scummvm/trunk/engines/gob/hotspots.h
Modified: scummvm/trunk/engines/gob/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/gob/hotspots.cpp 2009-08-27 10:35:39 UTC (rev 43765)
+++ scummvm/trunk/engines/gob/hotspots.cpp 2009-08-27 10:37:48 UTC (rev 43766)
@@ -1564,6 +1564,16 @@
return cursor;
}
+bool Hotspots::searchHotspot(int16 shortId) {
+ for (int i = 0; i < kHotspotCount; i++) {
+ if (_hotspots[i].isDisabled())
+ return false;
+ if ((_hotspots[i].id == 0xD000 + shortId) || (_hotspots[i].id == 0xB000 + shortId) || (_hotspots[i].id == 0x4000 + shortId))
+ return true;
+ }
+ return false;
+}
+
uint16 Hotspots::inputToHotspot(uint16 input) const {
uint16 inputIndex = 0;
for (int i = 0; i < kHotspotCount; i++) {
Modified: scummvm/trunk/engines/gob/hotspots.h
===================================================================
--- scummvm/trunk/engines/gob/hotspots.h 2009-08-27 10:35:39 UTC (rev 43765)
+++ scummvm/trunk/engines/gob/hotspots.h 2009-08-27 10:37:48 UTC (rev 43766)
@@ -101,6 +101,9 @@
/** Return the cursor found in the hotspot to the coordinates. */
int16 findCursor(uint16 x, uint16 y) const;
+ /** Check the existance of a hotspot based on its short Id */
+ bool searchHotspot (int16 shortId);
+
private:
struct Hotspot {
uint16 id;
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