[Scummvm-cvs-logs] SF.net SVN: scummvm:[49315] scummvm/trunk/engines/sci

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat May 29 23:42:43 CEST 2010


Revision: 49315
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49315&view=rev
Author:   fingolfin
Date:     2010-05-29 21:42:42 +0000 (Sat, 29 May 2010)

Log Message:
-----------
SCI: Make Script::_exportTable const (yay :-)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/engine/savegame.cpp
    scummvm/trunk/engines/sci/engine/segment.cpp
    scummvm/trunk/engines/sci/engine/segment.h

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2010-05-29 20:32:25 UTC (rev 49314)
+++ scummvm/trunk/engines/sci/console.cpp	2010-05-29 21:42:42 UTC (rev 49315)
@@ -1247,7 +1247,7 @@
 		Script *scr = (Script *)mobj;
 		DebugPrintf("script.%03d locked by %d, bufsize=%d (%x)\n", scr->_nr, scr->getLockers(), (uint)scr->_bufSize, (uint)scr->_bufSize);
 		if (scr->_exportTable)
-			DebugPrintf("  Exports: %4d at %d\n", scr->_numExports, (int)(((byte *)scr->_exportTable) - ((byte *)scr->_buf)));
+			DebugPrintf("  Exports: %4d at %d\n", scr->_numExports, (int)(((const byte *)scr->_exportTable) - ((const byte *)scr->_buf)));
 		else
 			DebugPrintf("  Exports: none\n");
 

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2010-05-29 20:32:25 UTC (rev 49314)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2010-05-29 21:42:42 UTC (rev 49315)
@@ -800,7 +800,7 @@
 				scr->setExportTableOffset(6);
 			}
 		} else {
-			scr->_exportTable = (uint16 *) scr->findBlock(SCI_OBJ_EXPORTS);
+			scr->_exportTable = (const uint16 *)scr->findBlock(SCI_OBJ_EXPORTS);
 			scr->_synonyms = scr->findBlock(SCI_OBJ_SYNONYMS);
 			scr->_exportTable += 3;
 		}

Modified: scummvm/trunk/engines/sci/engine/segment.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/segment.cpp	2010-05-29 20:32:25 UTC (rev 49314)
+++ scummvm/trunk/engines/sci/engine/segment.cpp	2010-05-29 21:42:42 UTC (rev 49315)
@@ -362,7 +362,7 @@
 
 void Script::setExportTableOffset(int offset) {
 	if (offset) {
-		_exportTable = (uint16 *)(_buf + offset + 2);
+		_exportTable = (const uint16 *)(_buf + offset + 2);
 		_numExports = READ_SCI11ENDIAN_UINT16(_exportTable - 1);
 	} else {
 		_exportTable = NULL;

Modified: scummvm/trunk/engines/sci/engine/segment.h
===================================================================
--- scummvm/trunk/engines/sci/engine/segment.h	2010-05-29 20:32:25 UTC (rev 49314)
+++ scummvm/trunk/engines/sci/engine/segment.h	2010-05-29 21:42:42 UTC (rev 49315)
@@ -329,7 +329,7 @@
 
 	byte *_heapStart; /**< Start of heap if SCI1.1, NULL otherwise */
 
-	uint16 *_exportTable; /**< Abs. offset of the export table or 0 if not present */
+	const uint16 *_exportTable; /**< Abs. offset of the export table or 0 if not present */
 	int _numExports; /**< Number of entries in the exports table */
 
 	const byte *_synonyms; /**< Synonyms block or 0 if not present*/


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