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

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Sat Apr 14 13:00:33 CEST 2007


Revision: 26467
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26467&view=rev
Author:   dreammaster
Date:     2007-04-14 04:00:29 -0700 (Sat, 14 Apr 2007)

Log Message:
-----------
Gave proper names to previously unknown/partially-known constants

Modified Paths:
--------------
    scummvm/trunk/engines/lure/hotspots.cpp
    scummvm/trunk/engines/lure/hotspots.h
    scummvm/trunk/engines/lure/res_struct.h
    scummvm/trunk/engines/lure/scripts.cpp
    scummvm/trunk/engines/lure/scripts.h

Modified: scummvm/trunk/engines/lure/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/lure/hotspots.cpp	2007-04-14 05:02:12 UTC (rev 26466)
+++ scummvm/trunk/engines/lure/hotspots.cpp	2007-04-14 11:00:29 UTC (rev 26467)
@@ -804,7 +804,7 @@
 		(hotspot->hotspotId == NELLIE_ID)) {
 		// Check for a bar place
 		if (getBarPlace() == BP_KEEP_TRYING)
-			return PC_INITIAL;
+			return PC_WAIT;
 	} else if (hotspot->roomNumber != roomNumber()) {
 		// loc_884
 		if (actionCtr() == 0) 
@@ -822,32 +822,33 @@
 		} 
 
 		if ((hotspot->hotspotId >= FIRST_NONCHARACTER_ID) || 
-			(hotspot->characterMode == CHARMODE_8) ||
-			(hotspot->characterMode == CHARMODE_4) ||
-			(hotspot->characterMode == CHARMODE_7)) {
+			(hotspot->characterMode == CHARMODE_INTERACTING) ||
+			(hotspot->characterMode == CHARMODE_WAIT_FOR_PLAYER) ||
+			(hotspot->characterMode == CHARMODE_WAIT_FOR_INTERACT)) {
 			// loc_880
 			if (characterWalkingCheck(hotspot))
-				return PC_INITIAL;
+				return PC_WAIT;
 		} else {
 			// loc_886
 			setActionCtr(0);
 			converse(0, 0xE);
-			return PC_UNKNOWN;
+			return PC_FAILED;
 		}
 	} else {
 		setActionCtr(1);
 		if ((hotspot->hotspotId >= FIRST_NONCHARACTER_ID) ||
-			((hotspot->actionHotspotId != _hotspotId) && (hotspot->characterMode == CHARMODE_4))) {
+			((hotspot->actionHotspotId != _hotspotId) && 
+			 (hotspot->characterMode == CHARMODE_WAIT_FOR_PLAYER))) {
 			// loc_880
 			if (characterWalkingCheck(hotspot))
-				return PC_INITIAL;
+				return PC_WAIT;
 
 		} else if (hotspot->actionHotspotId != _hotspotId) {
 			if (fields.getField(88) == 2) {
 				// loc_882
 				hotspot->v2b = 0x2A;
 				hotspot->useHotspotId = _hotspotId;
-				return PC_INITIAL;
+				return PC_WAIT;
 			} else {
 				converse(NOONE_ID, 5);
 				setDelayCtr(4);
@@ -858,7 +859,7 @@
 	// loc_888
 	setActionCtr(0);
 	if (hotspot->hotspotId < FIRST_NONCHARACTER_ID) {
-		hotspot->characterMode = CHARMODE_8;
+		hotspot->characterMode = CHARMODE_INTERACTING;
 		hotspot->delayCtr = 30;
 		hotspot->actionHotspotId = hotspot->hotspotId;
 	}
@@ -1110,7 +1111,7 @@
 	Resources &res = Resources::getReference();
 	HotspotPrecheckResult result = actionPrecheck(hotspot);
 
-	if (result == PC_INITIAL) return;
+	if (result == PC_WAIT) return;
 	else if (result != PC_EXECUTE) {
 		endAction();
 		return;
@@ -1151,7 +1152,7 @@
 	Action action = _currentActions.top().supportData().action();
 
 	HotspotPrecheckResult result = actionPrecheck(hotspot);
-	if (result == PC_INITIAL) return;
+	if (result == PC_WAIT) return;
 	else if (result != PC_EXECUTE) {
 		endAction();
 		return;
@@ -1186,7 +1187,7 @@
 	}
 
 	HotspotPrecheckResult result = actionPrecheck(hotspot);
-	if (result == PC_INITIAL) return;
+	if (result == PC_WAIT) return;
 	else if (result != PC_EXECUTE) {
 		endAction();
 		return;
@@ -1240,7 +1241,7 @@
 	}
 
 	HotspotPrecheckResult result = actionPrecheck(hotspot);
-	if (result == PC_INITIAL) return;
+	if (result == PC_WAIT) return;
 	else if (result != PC_EXECUTE) {
 		endAction();
 		return;
@@ -1296,7 +1297,7 @@
 	}
 
 	HotspotPrecheckResult result = actionPrecheck(hotspot);
-	if (result == PC_INITIAL) return;
+	if (result == PC_WAIT) return;
 	else if (result != PC_EXECUTE) {
 		endAction();
 		return;
@@ -1339,7 +1340,7 @@
 	}
 
 	HotspotPrecheckResult result = actionPrecheck(hotspot);
-	if (result == PC_INITIAL) return;
+	if (result == PC_WAIT) return;
 	else if (result != PC_EXECUTE) {
 		endAction();
 		return;
@@ -1383,7 +1384,7 @@
 		(hotspot->hotspotId != 0x3EB))) {
 
 		HotspotPrecheckResult result = actionPrecheck(hotspot);
-		if (result == PC_INITIAL) return;
+		if (result == PC_WAIT) return;
 		else if (result != PC_EXECUTE) {
 			endAction();
 			return;
@@ -1421,7 +1422,7 @@
 	assert(character);
 
 	HotspotPrecheckResult hsResult = actionPrecheck(hotspot);
-	if (hsResult == PC_INITIAL) return;
+	if (hsResult == PC_WAIT) return;
 	else if (hsResult != PC_EXECUTE) {
 		endAction();
 		return;
@@ -1472,7 +1473,7 @@
 		if (!*tempId) {
 			// Hotspot wasn't in the list
 			HotspotPrecheckResult result = actionPrecheck(hotspot);
-			if (result == PC_INITIAL) return;
+			if (result == PC_WAIT) return;
 			else if (result != PC_EXECUTE) {
 				endAction();
 				return;
@@ -1509,7 +1510,7 @@
 		if (!*tempId) {
 			// Hotspot wasn't in the list
 			HotspotPrecheckResult result = actionPrecheck(hotspot);
-			if (result == PC_INITIAL) return;
+			if (result == PC_WAIT) return;
 			else if (result != PC_EXECUTE) {
 				endAction();
 				return;
@@ -1546,7 +1547,7 @@
 	_data->useHotspotId = usedId;
 
 	HotspotPrecheckResult result = actionPrecheck(hotspot);
-	if (result == PC_INITIAL) return;
+	if (result == PC_WAIT) return;
 	else if (result != PC_EXECUTE) {
 		endAction();
 		return;
@@ -1682,7 +1683,7 @@
 	fields.setField(USE_HOTSPOT_ID, hotspot->hotspotId);
 
 	HotspotPrecheckResult result = actionPrecheck(hotspot);
-	if (result == PC_INITIAL) return;
+	if (result == PC_WAIT) return;
 	else if (result != PC_EXECUTE) {
 		endAction();
 		return;
@@ -1744,7 +1745,7 @@
 	fields.setField(USE_HOTSPOT_ID, hotspot->hotspotId);
 
 	HotspotPrecheckResult result = actionPrecheck(hotspot);
-	if (result == PC_INITIAL) return;
+	if (result == PC_WAIT) return;
 	else if (result != PC_EXECUTE) {
 		endAction();
 		return;
@@ -1791,7 +1792,7 @@
 
 	// Get the character to remain in place for a while
 	setDelayCtr(130);
-	setCharacterMode(CHARMODE_4);
+	setCharacterMode(CHARMODE_WAIT_FOR_PLAYER);
 
 	// Set the talk override to the specified Id
 	CharacterScheduleEntry &entry = _currentActions.top().supportData();
@@ -1877,7 +1878,7 @@
 	HotspotPrecheckResult result = actionPrecheck(hotspot);
 	if (result == PC_EXECUTE) {
 		endAction();
-	} else if (result != PC_INITIAL) {
+	} else if (result != PC_WAIT) {
 		CharacterScheduleEntry *newEntry = Resources::getReference().
 			charSchedules().getEntry(entry.param(0), entry.parent());
 		_currentActions.top().setSupportData(newEntry);
@@ -2228,8 +2229,7 @@
 		debugC(ERROR_DETAILED, kLureDebugAnimations, "char mode = %d, delay ctr = %d", 
 			h.characterMode(), h.delayCtr());
 
-		if (h.characterMode() == CHARMODE_6) {
-			// TODO: Figure out what mode 6 is
+		if (h.characterMode() == CHARMODE_PLAYER_WAIT) {
 			h.updateMovement();
 			if (bumpedPlayer) return;
 		} else {
@@ -2256,7 +2256,7 @@
 		h.setCharacterMode(CHARMODE_NONE);
 		h.pathFinder().clear();
 
-		if ((currentMode == CHARMODE_4) || (currentMode == CHARMODE_7)) {
+		if ((currentMode == CHARMODE_WAIT_FOR_PLAYER) || (currentMode == CHARMODE_WAIT_FOR_INTERACT)) {
 			// TODO: HS[33h]=0
 			h.showMessage(1);
 		}
@@ -2353,7 +2353,7 @@
 				h.setDestHotspot(0xffff);
 
 			if (bumpedPlayer)
-				h.setCharacterMode(CHARMODE_6);
+				h.setCharacterMode(CHARMODE_PLAYER_WAIT);
 
 		} else {
 			debugC(ERROR_DETAILED, kLureDebugAnimations, "Character is blocked from moving");
@@ -2649,7 +2649,7 @@
 				res.pausedList().reset(h.hotspotId());
 				h.setBlockedState(BS_NONE);
 				h.currentActions().pop();
-				h.setCharacterMode(CHARMODE_6);
+				h.setCharacterMode(CHARMODE_PLAYER_WAIT);
 				h.setDelayCtr(7);
 				return;
 
@@ -2698,7 +2698,7 @@
 				if (room.cursorState() == CS_BUMPED)
 					room.setCursorState(CS_NONE);
 				if (fields.playerPendingPos().isSet) {
-					h.setCharacterMode(CHARMODE_6);
+					h.setCharacterMode(CHARMODE_PLAYER_WAIT);
 					h.setDelayCtr(IDLE_COUNTDOWN_SIZE);
 					return;
 				}

Modified: scummvm/trunk/engines/lure/hotspots.h
===================================================================
--- scummvm/trunk/engines/lure/hotspots.h	2007-04-14 05:02:12 UTC (rev 26466)
+++ scummvm/trunk/engines/lure/hotspots.h	2007-04-14 11:00:29 UTC (rev 26467)
@@ -218,7 +218,7 @@
 	void loadFromStream(Common::ReadStream *stream);
 };
 
-enum HotspotPrecheckResult {PC_EXECUTE, PC_NOT_IN_ROOM, PC_UNKNOWN, PC_INITIAL, PC_EXCESS};
+enum HotspotPrecheckResult {PC_EXECUTE, PC_NOT_IN_ROOM, PC_FAILED, PC_WAIT, PC_EXCESS};
 
 enum BarPlaceResult {BP_KEEP_TRYING, BP_GOT_THERE, BP_FAIL};
 

Modified: scummvm/trunk/engines/lure/res_struct.h
===================================================================
--- scummvm/trunk/engines/lure/res_struct.h	2007-04-14 05:02:12 UTC (rev 26466)
+++ scummvm/trunk/engines/lure/res_struct.h	2007-04-14 11:00:29 UTC (rev 26467)
@@ -381,7 +381,8 @@
 };
 
 enum CharacterMode {CHARMODE_NONE, CHARMODE_HESITATE, CHARMODE_IDLE, CHARMODE_PAUSED,
-	CHARMODE_4, CHARMODE_CONVERSING, CHARMODE_6, CHARMODE_7, CHARMODE_8};
+	CHARMODE_WAIT_FOR_PLAYER, CHARMODE_CONVERSING, CHARMODE_PLAYER_WAIT, 
+	CHARMODE_WAIT_FOR_INTERACT, CHARMODE_INTERACTING, CHARMODE_SPECIAL_PLAYER};
 
 enum BlockedState {BS_NONE, BS_INITIAL, BS_FINAL};
 

Modified: scummvm/trunk/engines/lure/scripts.cpp
===================================================================
--- scummvm/trunk/engines/lure/scripts.cpp	2007-04-14 05:02:12 UTC (rev 26466)
+++ scummvm/trunk/engines/lure/scripts.cpp	2007-04-14 11:00:29 UTC (rev 26467)
@@ -346,9 +346,9 @@
 	activeHotspot->setScript(0x630);
 }
 
-// Marks the door in room 14 for closing
+// Marks the jail door in room 14 for closing
 
-void Script::room14DoorClose(uint16 v1, uint16 v2, uint16 v3) {
+void Script::jailClose(uint16 v1, uint16 v2, uint16 v3) {
 	RoomExitJoinData *joinRec = Resources::getReference().getExitJoin(0x2719);
 	joinRec->blocked = 1;
 }
@@ -539,7 +539,7 @@
 	{34, Script::increaseNumGroats},
 	{35, Script::enableHotspot},
 	{37, Script::transformPlayer},
-	{39, Script::room14DoorClose},
+	{39, Script::jailClose},
 	{40, Script::checkDroppedDesc},
 	{42, Script::doorClose},
 	{44, Script::doorOpen},

Modified: scummvm/trunk/engines/lure/scripts.h
===================================================================
--- scummvm/trunk/engines/lure/scripts.h	2007-04-14 05:02:12 UTC (rev 26466)
+++ scummvm/trunk/engines/lure/scripts.h	2007-04-14 11:00:29 UTC (rev 26467)
@@ -106,7 +106,7 @@
 	static void increaseNumGroats(uint16 characterId, uint16 numGroats, uint16 v3);
 	static void enableHotspot(uint16 hotspotId, uint16 v2, uint16 v3);
 	static void transformPlayer(uint16 v1, uint16 v2, uint16 v3);
-	static void room14DoorClose(uint16 v1, uint16 v2, uint16 v3);
+	static void jailClose(uint16 v1, uint16 v2, uint16 v3);
 	static void checkDroppedDesc(uint16 hotspotId, uint16 v2, uint16 v3);
 	static void doorClose(uint16 hotspotId, uint16 v2, uint16 v3);
 	static void displayMessage(uint16 messageId, uint16 characterId, uint16 unknownVal);


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