[Scummvm-cvs-logs] SF.net SVN: scummvm:[41757] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Mon Jun 22 12:15:52 CEST 2009


Revision: 41757
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41757&view=rev
Author:   drmccoy
Date:     2009-06-22 10:15:52 +0000 (Mon, 22 Jun 2009)

Log Message:
-----------
Giving CollisionArea a full-blown Script pointer instead the data pointer

Modified Paths:
--------------
    scummvm/trunk/engines/gob/game.h
    scummvm/trunk/engines/gob/game_v1.cpp
    scummvm/trunk/engines/gob/game_v2.cpp
    scummvm/trunk/engines/gob/game_v6.cpp

Modified: scummvm/trunk/engines/gob/game.h
===================================================================
--- scummvm/trunk/engines/gob/game.h	2009-06-22 10:15:14 UTC (rev 41756)
+++ scummvm/trunk/engines/gob/game.h	2009-06-22 10:15:52 UTC (rev 41757)
@@ -48,8 +48,7 @@
 		uint16 funcEnter;
 		uint16 funcLeave;
 		uint16 funcSub;
-		byte *totFileData;
-		uint32 totSize;
+		Script *script;
 	} PACKED_STRUCT;
 
 #define szGame_TotTextItem (2 + 2)

Modified: scummvm/trunk/engines/gob/game_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v1.cpp	2009-06-22 10:15:14 UTC (rev 41756)
+++ scummvm/trunk/engines/gob/game_v1.cpp	2009-06-22 10:15:52 UTC (rev 41757)
@@ -280,8 +280,7 @@
 		ptr->funcEnter = funcEnter;
 		ptr->funcLeave = funcLeave;
 		ptr->funcSub = funcSub;
-		ptr->totFileData = 0;
-		ptr->totSize = 0;
+		ptr->script = 0;
 
 		return i;
 	}

Modified: scummvm/trunk/engines/gob/game_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v2.cpp	2009-06-22 10:15:14 UTC (rev 41756)
+++ scummvm/trunk/engines/gob/game_v2.cpp	2009-06-22 10:15:52 UTC (rev 41757)
@@ -331,8 +331,7 @@
 		ptr->funcEnter = funcEnter;
 		ptr->funcLeave = funcLeave;
 		ptr->funcSub = funcSub;
-		ptr->totFileData = 0;
-		ptr->totSize = 0;
+		ptr->script = 0;
 
 		return i;
 	}

Modified: scummvm/trunk/engines/gob/game_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v6.cpp	2009-06-22 10:15:14 UTC (rev 41756)
+++ scummvm/trunk/engines/gob/game_v6.cpp	2009-06-22 10:15:52 UTC (rev 41757)
@@ -148,8 +148,7 @@
 		ptr->funcEnter = funcEnter;
 		ptr->funcLeave = funcLeave;
 		ptr->funcSub = funcSub;
-		ptr->totFileData = _script->getData();
-		ptr->totSize = _script->getSize();
+		ptr->script = _script;
 
 		return i;
 	}
@@ -925,21 +924,14 @@
 			if (collArea->flags & 0x80)
 				continue;
 
-		byte *totFileData = collArea->totFileData;
-		uint32 totSize = collArea->totSize;
+		Script *curScript = _script;
 
-		if (!totFileData || (totSize == 0)) {
-			totFileData = _script->getData();
-			totSize = _script->getSize();
-		}
+		_script = collArea->script;
+		if (!_script)
+			_script = curScript;
 
-		uint32 savedPos = _script->pos();
-		byte *savedData = _script->getData();
-		uint32 savedSize = _script->getSize();
+		_script->call(collArea->funcSub);
 
-		_script->cuckoo(totFileData, totSize);
-		_script->seek(collArea->funcSub);
-
 		int16 left   = _script->readValExpr();
 		int16 top    = _script->readValExpr();
 		int16 width  = _script->readValExpr();
@@ -982,8 +974,9 @@
 		if ((collArea->id & 0xF000) == 0xA000)
 			collArea->flags = flags;
 
-		_script->cuckoo(savedData, savedSize);
-		_script->seek(savedPos);
+		_script->pop();
+
+		_script = curScript;
 	}
 }
 


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