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

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Sat Dec 29 05:25:27 CET 2007


Revision: 30066
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30066&view=rev
Author:   dreammaster
Date:     2007-12-28 20:25:26 -0800 (Fri, 28 Dec 2007)

Log Message:
-----------
Fix to ensure any active conversation data or selected hotspot is cleared when restoring or restarting a game

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

Modified: scummvm/trunk/engines/lure/res.cpp
===================================================================
--- scummvm/trunk/engines/lure/res.cpp	2007-12-29 00:31:15 UTC (rev 30065)
+++ scummvm/trunk/engines/lure/res.cpp	2007-12-29 04:25:26 UTC (rev 30066)
@@ -97,6 +97,9 @@
 	freeData();
 
 	_fieldList.reset();
+	_talkState = TALK_NONE;
+	_activeTalkData = NULL;
+
 	reloadData();
 }
 
@@ -712,6 +715,9 @@
 		_talkingCharacter = 0;
 	}
 
+	_talkState = TALK_NONE;
+	_activeTalkData = NULL;
+
 	debugC(ERROR_DETAILED, kLureDebugScripts, "Loading hotspot data");
 	_hotspotData.loadFromStream(stream);
 	debugC(ERROR_DETAILED, kLureDebugScripts, "Loading active hotspots");

Modified: scummvm/trunk/engines/lure/room.cpp
===================================================================
--- scummvm/trunk/engines/lure/room.cpp	2007-12-29 00:31:15 UTC (rev 30065)
+++ scummvm/trunk/engines/lure/room.cpp	2007-12-29 04:25:26 UTC (rev 30066)
@@ -756,6 +756,11 @@
 	if (saveVersion >= 26)
 		_talkDialog = TalkDialog::loadFromStream(stream);
 
+	// Clear any active hotspot
+	_hotspotId = 0;
+	_hotspotName[0] = '\0';
+	_statusLine[0] = '\0';
+
 	uint16 roomNum = stream->readUint16LE();
 	_roomNumber = 999; // Dummy room number so current room is faded out
 	setRoomNumber(roomNum, false);
@@ -765,4 +770,13 @@
 	_cursorState = (CursorState) stream->readUint16LE();
 }
 
+void Room::reset() { 
+	_roomNumber = 999; 
+	setTalkDialog(0, 0, 0, 0);
+
+	_hotspotId = 0;
+	_hotspotName[0] = '\0';
+	_statusLine[0] = '\0';
+}
+
 } // end of namespace Lure

Modified: scummvm/trunk/engines/lure/room.h
===================================================================
--- scummvm/trunk/engines/lure/room.h	2007-12-29 00:31:15 UTC (rev 30065)
+++ scummvm/trunk/engines/lure/room.h	2007-12-29 04:25:26 UTC (rev 30066)
@@ -127,7 +127,7 @@
 	char *statusLine() { return _statusLine; }
 	void saveToStream(Common::WriteStream *stream);
 	void loadFromStream(Common::ReadStream *stream);
-	void reset() { _roomNumber = 999; }
+	void reset();
 };
 
 } // end of namespace Lure


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