[Scummvm-cvs-logs] SF.net SVN: scummvm:[45335] scummvm/trunk/engines/scumm

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Thu Oct 22 13:33:06 CEST 2009


Revision: 45335
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45335&view=rev
Author:   Kirben
Date:     2009-10-22 11:33:05 +0000 (Thu, 22 Oct 2009)

Log Message:
-----------
Fix objects structure and object scripts in PCE version of Loom.

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/object.cpp
    scummvm/trunk/engines/scumm/script.cpp

Modified: scummvm/trunk/engines/scumm/object.cpp
===================================================================
--- scummvm/trunk/engines/scumm/object.cpp	2009-10-22 09:36:46 UTC (rev 45334)
+++ scummvm/trunk/engines/scumm/object.cpp	2009-10-22 11:33:05 UTC (rev 45335)
@@ -936,12 +936,13 @@
 		od->x_pos = *(ptr + 8) * 8;
 		od->y_pos = ((*(ptr + 9)) & 0x7F) * 8;
 
-		od->parentstate = (*(ptr + 11) & 0x80) ? 1 : 0;
+		od->parentstate = (*(ptr + 9) & 0x80) ? 1 : 0;
 		od->width = *(ptr + 10) * 8;
 
-		od->parent = *(ptr + 11);
-		od->walk_x = *(ptr + 13) * 8;
-		od->walk_y = (*(ptr + 14) & 0x1f) * 8;
+		// TODO: Where is parent data?
+		od->parent = 0;
+		od->walk_x = READ_LE_UINT16(ptr + 11);
+		od->walk_y = READ_LE_UINT16(ptr + 13);
 		od->actordir = (*(ptr + 15)) & 7;
 		od->height = *(ptr + 15) & 0xf8;
 	} else {

Modified: scummvm/trunk/engines/scumm/script.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script.cpp	2009-10-22 09:36:46 UTC (rev 45334)
+++ scummvm/trunk/engines/scumm/script.cpp	2009-10-22 11:33:05 UTC (rev 45335)
@@ -214,9 +214,10 @@
 			verbptr += 3;
 		} while (1);
 
-		if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine)
-			return verboffs + READ_LE_UINT16(verbptr + 1) + 3;
-		else if (_game.features & GF_SMALL_HEADER)
+		if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine) {
+			verbptr += READ_LE_UINT16(verbptr + 1) + 3;
+			return verbptr - objptr;
+		} else if (_game.features & GF_SMALL_HEADER)
 			return READ_LE_UINT16(verbptr + 1);
 		else
 			return verboffs + READ_LE_UINT16(verbptr + 1);


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