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

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Thu Oct 25 12:40:26 CEST 2007


Revision: 29258
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29258&view=rev
Author:   dreammaster
Date:     2007-10-25 03:40:26 -0700 (Thu, 25 Oct 2007)

Log Message:
-----------
Talk dialogs can now only be closed early if it's the player talking, or an NPC is talking directly to the player

Modified Paths:
--------------
    scummvm/trunk/engines/lure/room.cpp

Modified: scummvm/trunk/engines/lure/room.cpp
===================================================================
--- scummvm/trunk/engines/lure/room.cpp	2007-10-25 10:39:19 UTC (rev 29257)
+++ scummvm/trunk/engines/lure/room.cpp	2007-10-25 10:40:26 UTC (rev 29258)
@@ -649,6 +649,20 @@
 	// Don't allow dialog close if it's still in progress
 	if (_talkDialog->isBuilding()) return false;
 
+	// Only allow the dialog to be closable if it's the player talking, or 
+	// someone talking to the player
+	Resources &res = Resources::getReference();
+	uint16 talkerId = res.getTalkingCharacter();
+	if ((talkerId == NOONE_ID) || (talkerId == 0))
+		return false;
+
+	if (talkerId != PLAYER_ID) {
+		HotspotData *charHotspot = res.getHotspot(talkerId);
+		assert(charHotspot);
+		if (charHotspot->talkDestCharacterId != PLAYER_ID)
+			return false;
+	}
+
 	// Check boundaries
 	Mouse &mouse = Mouse::getReference();
 	return ((mouse.x() >= _talkDialogX) && (mouse.y() >= _talkDialogY) &&


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