diff options
author | Max Horn | 2010-05-29 21:42:42 +0000 |
---|---|---|
committer | Max Horn | 2010-05-29 21:42:42 +0000 |
commit | 42d6ed880b92e19c469c70da92397bd860abb483 (patch) | |
tree | 301a6c565a81bf91e81c1267e2838bfd2eda1a0b /engines | |
parent | 5143e7fff42de358021c1a150d2bd7495374ba49 (diff) | |
download | scummvm-rg350-42d6ed880b92e19c469c70da92397bd860abb483.tar.gz scummvm-rg350-42d6ed880b92e19c469c70da92397bd860abb483.tar.bz2 scummvm-rg350-42d6ed880b92e19c469c70da92397bd860abb483.zip |
SCI: Make Script::_exportTable const (yay :-)
svn-id: r49315
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/console.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/savegame.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/segment.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/segment.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 51aa1a59d0..73086de39f 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -1247,7 +1247,7 @@ bool Console::segmentInfo(int nr) { 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"); diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index ab8b9eec58..7310993473 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -800,7 +800,7 @@ void SegManager::reconstructScripts(EngineState *s) { 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; } diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp index 02d3a8987b..17d0b67cf1 100644 --- a/engines/sci/engine/segment.cpp +++ b/engines/sci/engine/segment.cpp @@ -362,7 +362,7 @@ void Script::setLockers(int lockers) { 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; diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index 44bf6569b6..baff120b1c 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -329,7 +329,7 @@ public: 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*/ |