[Scummvm-cvs-logs] CVS: scummvm/sword1 logic.cpp,1.34.2.2,1.34.2.3 sworddefs.h,1.13,1.13.2.1

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Sat Mar 13 04:21:05 CET 2004


Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2961

Modified Files:
      Tag: branch-0-6-0
	logic.cpp sworddefs.h 
Log Message:
Applied Lavosspawn's bugfix for #911508 (that caused ScummVM to crash on
loading certain savegames in Ireland) that was applied to the trunk
recently.


Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/logic.cpp,v
retrieving revision 1.34.2.2
retrieving revision 1.34.2.3
diff -u -d -r1.34.2.2 -r1.34.2.3
--- logic.cpp	12 Mar 2004 08:19:21 -0000	1.34.2.2
+++ logic.cpp	13 Mar 2004 12:12:13 -0000	1.34.2.3
@@ -80,6 +80,16 @@
 void Logic::newScreen(uint32 screen) {
 	Object *compact = (Object*)_objMan->fetchObject(PLAYER);
 
+	// work around script bug #911508
+	if (((screen == 25) || (_scriptVars[SCREEN] == 25)) && (_scriptVars[SAND_FLAG] == 4)) {
+		Object *cpt = _objMan->fetchObject(SAND_25);
+		Object *george = _objMan->fetchObject(PLAYER);
+		if (george->o_place == HOLDING_REPLICA_25) // is george holding the replica in his hands?
+			fnFullSetFrame(cpt, SAND_25, IMPFLRCDT, IMPFLR, 0, 0, 0, 0); // empty impression in floor			
+		else
+			fnFullSetFrame(cpt, SAND_25, IMPPLSCDT, IMPPLS, 0, 0, 0, 0); // impression filled with plaster
+	}
+
 	if (SwordEngine::_systemVars.justRestoredGame) { // if we've just restored a game - we want George to be exactly as saved
 		fnAddHuman(NULL, 0, 0, 0, 0, 0, 0, 0);
 		if (_scriptVars[GEORGE_WALKING]) { // except that if George was walking when we saveed the game

Index: sworddefs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sworddefs.h,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -u -d -r1.13 -r1.13.2.1
--- sworddefs.h	11 Jan 2004 15:47:41 -0000	1.13
+++ sworddefs.h	13 Mar 2004 12:12:13 -0000	1.13.2.1
@@ -1534,6 +1534,8 @@
 	POCKET_52
 };
 
+#define SAND_25 1638407
+#define HOLDING_REPLICA_25 1638408
 #define GMASTER_79 5177345
 #define SCR_std_off (0*0x10000 + 6)
 #define SCR_exit0 (0*0x10000 + 7)





More information about the Scummvm-git-logs mailing list