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

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


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

Log Message:
-----------
Added Script methods to query commun file handling

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

Modified: scummvm/trunk/engines/gob/game.cpp
===================================================================
--- scummvm/trunk/engines/gob/game.cpp	2009-06-23 01:19:03 UTC (rev 41788)
+++ scummvm/trunk/engines/gob/game.cpp	2009-06-23 01:19:21 UTC (rev 41789)
@@ -176,7 +176,7 @@
 		tableSize = 0;
 		_vm->_dataIO->closeData(_extHandle);
 		strcpy(path, "commun.ex1");
-		path[strlen(path) - 1] = *(_script->getData() + 0x3C) + '0';
+		path[strlen(path) - 1] = _script->getExFileNumber() + '0';
 		commonHandle = _vm->_dataIO->openData(path);
 		handle = commonHandle;
 	} else
@@ -451,12 +451,12 @@
 void Game::loadImFile(void) {
 	char path[20];
 
-	if ((_script->getData()[0x3D] != 0) && (_script->getData()[0x3B] == 0))
+	if ((_script->getCommunHandling() != 0) && (_script->getImFileNumber() == 0))
 		return;
 
 	strcpy(path, "commun.im1");
-	if (_script->getData()[0x3B] != 0)
-		path[strlen(path) - 1] = '0' + _script->getData()[0x3B];
+	if (_script->getImFileNumber() != 0)
+		path[strlen(path) - 1] = '0' + _script->getImFileNumber();
 
 	if (!_vm->_dataIO->existData(path))
 		return;

Modified: scummvm/trunk/engines/gob/script.cpp
===================================================================
--- scummvm/trunk/engines/gob/script.cpp	2009-06-23 01:19:03 UTC (rev 41788)
+++ scummvm/trunk/engines/gob/script.cpp	2009-06-23 01:19:21 UTC (rev 41789)
@@ -411,6 +411,10 @@
 	_versionMajor = _totData[39] - '0';
 	_versionMinor = _totData[41] - '0';
 
+	_imFileNumber = _totData[59];
+	_exFileNumber = _totData[60];
+	_communHandling = _totData[61];
+
 	return true;
 }
 
@@ -495,4 +499,16 @@
 	return _versionMinor;
 }
 
+uint8 Script::getImFileNumber() const {
+	return _imFileNumber;
+}
+
+uint8 Script::getExFileNumber() const {
+	return _exFileNumber;
+}
+
+uint8 Script::getCommunHandling() const {
+	return _communHandling;
+}
+
 } // End of namespace Gob

Modified: scummvm/trunk/engines/gob/script.h
===================================================================
--- scummvm/trunk/engines/gob/script.h	2009-06-23 01:19:03 UTC (rev 41788)
+++ scummvm/trunk/engines/gob/script.h	2009-06-23 01:19:21 UTC (rev 41789)
@@ -119,6 +119,9 @@
 	// Fixed properties
 	uint8 getVersionMajor() const;
 	uint8 getVersionMinor() const;
+	uint8 getImFileNumber() const;
+	uint8 getExFileNumber() const;
+	uint8 getCommunHandling() const;
 
 private:
 	struct CallEntry {
@@ -140,6 +143,9 @@
 
 	uint8 _versionMajor;
 	uint8 _versionMinor;
+	uint8 _imFileNumber;
+	uint8 _exFileNumber;
+	uint8 _communHandling;
 
 	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