SCI: Make Script::_exportTable const (yay :-)
svn-id: r49315
This commit is contained in:
parent
5143e7fff4
commit
42d6ed880b
4 changed files with 4 additions and 4 deletions
|
@ -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");
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue