[Scummvm-cvs-logs] SF.net SVN: scummvm:[33668] scummvm/trunk/engines/cine/script_fw.cpp

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Wed Aug 6 22:47:59 CEST 2008


Revision: 33668
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33668&view=rev
Author:   buddha_
Date:     2008-08-06 20:47:59 +0000 (Wed, 06 Aug 2008)

Log Message:
-----------
Add 320x200 screen bounds checking to Operation Stealth's checkCollision function.
Fixes teleporting bug when getting out of the water after first arcade sequence.
The player previously got teleported to the beach near the hotel. Now it doesn't happen.
The player is still caught motionless and can't move after this fix though...

Modified Paths:
--------------
    scummvm/trunk/engines/cine/script_fw.cpp

Modified: scummvm/trunk/engines/cine/script_fw.cpp
===================================================================
--- scummvm/trunk/engines/cine/script_fw.cpp	2008-08-06 20:41:53 UTC (rev 33667)
+++ scummvm/trunk/engines/cine/script_fw.cpp	2008-08-06 20:47:59 UTC (rev 33668)
@@ -1789,6 +1789,13 @@
 	int16 result = 0;
 
 	for (int16 i = 0; i < numZones; i++) {
+		// Don't try to read data in Operation Stealth if position isn't in 320x200 screen bounds.
+		if (g_cine->getGameType() == Cine::GType_OS) {
+			if ((lx + i) < 0 || (lx + i) > 319 || ly < 0 || ly > 199) {
+				continue;
+			}
+		}
+
 		idx = getZoneFromPositionRaw(page3Raw, lx + i, ly, 320);
 
 		assert(idx >= 0 && idx < NUM_MAX_ZONE);


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