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

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Tue Jun 23 03:22:30 CEST 2009


Revision: 41795
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41795&view=rev
Author:   drmccoy
Date:     2009-06-23 01:22:30 +0000 (Tue, 23 Jun 2009)

Log Message:
-----------
Added Script::getStartOffset()

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

Modified: scummvm/trunk/engines/gob/game_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v1.cpp	2009-06-23 01:21:51 UTC (rev 41794)
+++ scummvm/trunk/engines/gob/game_v1.cpp	2009-06-23 01:22:30 UTC (rev 41795)
@@ -164,7 +164,7 @@
 			if (!_vm->_inter->_variables)
 				_vm->_inter->allocateVars(_script->getVariablesCount() & 0xFFFF);
 
-			_script->seek(READ_LE_UINT32(_script->getData() + 0x64));
+			_script->seek(_script->getStartOffset());
 
 			_vm->_inter->renewTimeInVars();
 

Modified: scummvm/trunk/engines/gob/game_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v2.cpp	2009-06-23 01:21:51 UTC (rev 41794)
+++ scummvm/trunk/engines/gob/game_v2.cpp	2009-06-23 01:22:30 UTC (rev 41795)
@@ -199,7 +199,7 @@
 			if (!_vm->_inter->_variables)
 				_vm->_inter->allocateVars(_script->getVariablesCount() & 0xFFFF);
 
-			_script->seek(READ_LE_UINT16(_script->getData() + 0x64));
+			_script->seek(_script->getStartOffset());
 
 			_vm->_inter->renewTimeInVars();
 

Modified: scummvm/trunk/engines/gob/script.cpp
===================================================================
--- scummvm/trunk/engines/gob/script.cpp	2009-06-23 01:21:51 UTC (rev 41794)
+++ scummvm/trunk/engines/gob/script.cpp	2009-06-23 01:22:30 UTC (rev 41795)
@@ -422,6 +422,8 @@
 	_exFileNumber   = _totData[60];
 	_communHandling = _totData[61];
 
+	_startOffset = READ_LE_UINT32(_totData + 100);
+
 	return true;
 }
 
@@ -534,6 +536,10 @@
 	return _communHandling;
 }
 
+uint32 Script::getStartOffset() const {
+	return _startOffset;
+}
+
 uint32 Script::getVariablesCount(const char *fileName, GobEngine *vm) {
 	if (!vm->_dataIO->existData(fileName))
 		return 0;

Modified: scummvm/trunk/engines/gob/script.h
===================================================================
--- scummvm/trunk/engines/gob/script.h	2009-06-23 01:21:51 UTC (rev 41794)
+++ scummvm/trunk/engines/gob/script.h	2009-06-23 01:22:30 UTC (rev 41795)
@@ -117,15 +117,16 @@
 	void call(uint32 offset);
 
 	// Fixed properties
-	uint8 getVersionMajor() const;
-	uint8 getVersionMinor() const;
-	uint32 getVariablesCount() const;
-	uint32 getTextsOffset() const;
+	uint8  getVersionMajor   () const;
+	uint8  getVersionMinor   () const;
+	uint32 getVariablesCount () const;
+	uint32 getTextsOffset    () const;
 	uint32 getResourcesOffset() const;
-	uint16 getAnimDataSize() const;
-	uint8 getImFileNumber() const;
-	uint8 getExFileNumber() const;
-	uint8 getCommunHandling() const;
+	uint16 getAnimDataSize   () const;
+	uint8  getImFileNumber   () const;
+	uint8  getExFileNumber   () const;
+	uint8  getCommunHandling () const;
+	uint32 getStartOffset    () const;
 
 	static uint32 getVariablesCount(const char *fileName, GobEngine *vm);
 
@@ -147,15 +148,16 @@
 
 	int16 _lomHandle;
 
-	uint8 _versionMajor;
-	uint8 _versionMinor;
-	uint32 _variablesCount;
-	uint32 _textsOffset;
-	uint32 _resourcesOffset;
-	uint16 _animDataSize;
-	uint8 _imFileNumber;
-	uint8 _exFileNumber;
-	uint8 _communHandling;
+	uint8   _versionMajor;
+	uint8   _versionMinor;
+	uint32  _variablesCount;
+	uint32  _textsOffset;
+	uint32  _resourcesOffset;
+	uint16  _animDataSize;
+	uint8   _imFileNumber;
+	uint8   _exFileNumber;
+	uint8   _communHandling;
+	uint32  _startOffset;
 
 	Common::Stack<CallEntry> _callStack;
 


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