[Scummvm-cvs-logs] SF.net SVN: scummvm: [21778] scummvm/trunk/engines/lure

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Tue Apr 11 03:43:03 CEST 2006


Revision: 21778
Author:   dreammaster
Date:     2006-04-11 03:42:32 -0700 (Tue, 11 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21778&view=rev

Log Message:
-----------
Added a script method for setting a blocking hotspot script

Modified Paths:
--------------
    scummvm/trunk/engines/lure/scripts.cpp
    scummvm/trunk/engines/lure/scripts.h
Modified: scummvm/trunk/engines/lure/scripts.cpp
===================================================================
--- scummvm/trunk/engines/lure/scripts.cpp	2006-04-11 10:04:59 UTC (rev 21777)
+++ scummvm/trunk/engines/lure/scripts.cpp	2006-04-11 10:42:32 UTC (rev 21778)
@@ -175,6 +175,20 @@
 	res.fieldList().setField(GENERAL, v);
 }
 
+// Sets a character to a given hotspot script, and sets the character's current 
+// action to executing a script
+
+void Script::setBlockingHotspotScript(uint16 charId, uint16 scriptIndex, uint16 v3) {
+	Resources &r = Resources::getReference();
+	uint16 offset = r.getHotspotScript(scriptIndex);
+
+	HotspotData *rsc = r.getHotspot(charId);
+	rsc->sequenceOffset = offset;
+
+	Hotspot *hs = r.getActiveHotspot(charId);
+	hs->setCurrentAction(EXEC_HOTSPOT_SCRIPT);
+}
+
 // Decrements the number of inventory itemst he player has
 
 void Script::decrInventoryItems(uint16 v1, uint16 v2, uint16 v3) {
@@ -325,9 +339,8 @@
 
 void Script::checkCellDoor(uint16 v1, uint16 v2, uint16 v3) {
 	// In the original game, this method checks to see if the cell door
-	// is currently open, if it is, starts a music sequence. I'll 
-	// implement this method properly when I get around to implementing
-	// the in-game music
+	// is currently open, if it is, starts a music sequence. 
+	// TODO: Implement starting music if cell door is open
 }
 
 typedef void(*SequenceMethodPtr)(uint16, uint16, uint16);
@@ -353,6 +366,7 @@
 	{20, Script::checkCellDoor},
 	{22, Script::getDoorBlocked},
 	{23, Script::isSkorlInCell},
+	{27, Script::setBlockingHotspotScript},
 	{28, Script::decrInventoryItems},
 	{30, Script::setFrameNumber},
 	{32, Script::disableHotspot},

Modified: scummvm/trunk/engines/lure/scripts.h
===================================================================
--- scummvm/trunk/engines/lure/scripts.h	2006-04-11 10:04:59 UTC (rev 21777)
+++ scummvm/trunk/engines/lure/scripts.h	2006-04-11 10:42:32 UTC (rev 21778)
@@ -89,6 +89,7 @@
 	static void remoteRoomViewSetup(uint16 v1, uint16 v2, uint16 v3);
 	static void getDoorBlocked(uint16 hotspotId, uint16 v2, uint16 v3);
 	static void isSkorlInCell(uint16 v1, uint16 v2, uint16 v3);
+	static void setBlockingHotspotScript(uint16 charId, uint16 scriptIndex, uint16 v3);
 	static void decrInventoryItems(uint16 v1, uint16 v2, uint16 v3);
 	static void setFrameNumber(uint16 hotspotId, uint16 offset, uint16 v3);
 	static void disableHotspot(uint16 hotspotId, uint16 v2, uint16 v3);


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