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

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


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

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

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

Modified: scummvm/trunk/engines/gob/draw.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw.cpp	2009-06-23 01:22:30 UTC (rev 41795)
+++ scummvm/trunk/engines/gob/draw.cpp	2009-06-23 01:22:51 UTC (rev 41796)
@@ -390,8 +390,8 @@
 	adjustCoords(1, &left, &top);
 	adjustCoords(1, &right, &bottom);
 
-	if (READ_LE_UINT16(_vm->_game->_script->getData() + 0x7E) != 0) {
-		_vm->_game->_script->call(READ_LE_UINT16(_vm->_game->_script->getData() + 0x7E));
+	if (_vm->_game->_script->getCenterOffset() != 0) {
+		_vm->_game->_script->call(_vm->_game->_script->getCenterOffset());
 
 		WRITE_VAR(17, (uint32) id);
 		WRITE_VAR(18, (uint32) left);

Modified: scummvm/trunk/engines/gob/script.cpp
===================================================================
--- scummvm/trunk/engines/gob/script.cpp	2009-06-23 01:22:30 UTC (rev 41795)
+++ scummvm/trunk/engines/gob/script.cpp	2009-06-23 01:22:51 UTC (rev 41796)
@@ -424,6 +424,8 @@
 
 	_startOffset = READ_LE_UINT32(_totData + 100);
 
+	_centerOffset = READ_LE_UINT16(_totData + 126);
+
 	return true;
 }
 
@@ -540,6 +542,10 @@
 	return _startOffset;
 }
 
+uint32 Script::getCenterOffset() const {
+	return _centerOffset;
+}
+
 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:22:30 UTC (rev 41795)
+++ scummvm/trunk/engines/gob/script.h	2009-06-23 01:22:51 UTC (rev 41796)
@@ -127,6 +127,7 @@
 	uint8  getExFileNumber   () const;
 	uint8  getCommunHandling () const;
 	uint32 getStartOffset    () const;
+	uint32 getCenterOffset   () const;
 
 	static uint32 getVariablesCount(const char *fileName, GobEngine *vm);
 
@@ -148,16 +149,17 @@
 
 	int16 _lomHandle;
 
-	uint8   _versionMajor;
-	uint8   _versionMinor;
-	uint32  _variablesCount;
-	uint32  _textsOffset;
-	uint32  _resourcesOffset;
-	uint16  _animDataSize;
-	uint8   _imFileNumber;
-	uint8   _exFileNumber;
-	uint8   _communHandling;
-	uint32  _startOffset;
+	uint8  _versionMajor;
+	uint8  _versionMinor;
+	uint32 _variablesCount;
+	uint32 _textsOffset;
+	uint32 _resourcesOffset;
+	uint16 _animDataSize;
+	uint8  _imFileNumber;
+	uint8  _exFileNumber;
+	uint8  _communHandling;
+	uint32 _startOffset;
+	uint16 _centerOffset;
 
 	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