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

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Sun Sep 30 12:53:40 CEST 2007


Revision: 29137
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29137&view=rev
Author:   dreammaster
Date:     2007-09-30 03:53:40 -0700 (Sun, 30 Sep 2007)

Log Message:
-----------
Fix load offset for straw fire, and added proper cross-language handling of initial talks to strangers

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

Modified: scummvm/trunk/engines/lure/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/lure/hotspots.cpp	2007-09-30 10:51:33 UTC (rev 29136)
+++ scummvm/trunk/engines/lure/hotspots.cpp	2007-09-30 10:53:40 UTC (rev 29137)
@@ -2054,6 +2054,7 @@
 	Resources &res = Resources::getReference();
 	uint16 talkIndex;
 	TalkHeaderData *headerEntry;
+	bool isEnglish = LureEngine::getReference().getLanguage() == EN_ANY;
 
 	// If the hotspot has a talk data override, return it
 	if (charHotspot->talkOverride != 0) {
@@ -2066,10 +2067,13 @@
 	// Get offset of talk set to use
 	headerEntry = res.getTalkHeader(charHotspot->hotspotId);
 
-	// Calculate talk index to use
-	if (charHotspot->nameId == STRANGER_ID)
+	// Check whether character is a stranger 
+	if ((isEnglish && (charHotspot->nameId == 378)) ||
+		(!isEnglish && ((charHotspot->nameId == 381) || (charHotspot->nameId == 382))))
+		// Is a stranger, so force talk Index to be 0 (initial talk)
 		talkIndex = 0;
 	else
+		// Set the talk index based on the current game-wide talk index
 		talkIndex = res.fieldList().getField(TALK_INDEX) + 1;
 
 	return headerEntry->getEntry(talkIndex);
@@ -3016,7 +3020,7 @@
 			// Enable the fire and activate its animation
 			HotspotData *fire = res.getHotspot(0x418);
 			fire->flags |= 0x80;
-			fire->loadOffset = 0x7172; 
+			fire->loadOffset = 4;
 			res.activateHotspot(0x418);
 		}
  	}

Modified: scummvm/trunk/engines/lure/luredefs.h
===================================================================
--- scummvm/trunk/engines/lure/luredefs.h	2007-09-30 10:51:33 UTC (rev 29136)
+++ scummvm/trunk/engines/lure/luredefs.h	2007-09-30 10:53:40 UTC (rev 29137)
@@ -280,7 +280,6 @@
 #define PLAYER_FIGHT_TICK_PROC_ID 39
 
 // String constants
-#define STRANGER_ID 0x17A
 #define TALK_MAGIC_ID 0x424
 #define TALK_RESPONSE_MAGIC_ID 0x1092
 


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