diff options
-rw-r--r-- | engines/sci/engine/seg_manager.cpp | 24 | ||||
-rw-r--r-- | engines/sci/engine/vm.h | 4 |
2 files changed, 2 insertions, 26 deletions
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index f18af6cf26..91d9f57cdf 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -286,9 +286,6 @@ int SegManager::deallocate(int seg, bool recursive) { mobj->data.hunks.table = NULL; mobj->data.hunks.entries_nr = mobj->data.hunks.max_entry = 0; break; - case MEM_OBJ_RESERVED: - free(mobj->data.reserved); - break; case MEM_OBJ_STRING_FRAG: break; default: @@ -1284,16 +1281,8 @@ byte *SegManager::dereference(reg_t pointer, int *size) { return NULL; } - case MEM_OBJ_RESERVED: - sciprintf("Error: Trying to dereference pointer "PREG" to reserved segment `%s'!\n", - PRINT_REG(pointer), - mobj->data.reserved); - return NULL; - break; - default: - sciprintf("Error: Trying to dereference pointer "PREG" to inappropriate" - " segment!\n", + error("Error: Trying to dereference pointer "PREG" to inappropriate segment", PRINT_REG(pointer)); return NULL; } @@ -1689,14 +1678,6 @@ void SegInterfaceDynMem::freeAtAddress(reg_t sub_addr) { } -//-------------------- reserved -------------------- -class SegInterfaceReserved : public SegInterface { -public: - SegInterfaceReserved(SegManager *segmgr, MemObject *mobj, SegmentId segId) : - SegInterface(segmgr, mobj, segId, MEM_OBJ_RESERVED) {} -}; - - SegInterface *SegManager::getSegInterface(SegmentId segid) { if (!check(segid)) return NULL; // Invalid segment @@ -1734,9 +1715,6 @@ SegInterface *SegManager::getSegInterface(SegmentId segid) { case MEM_OBJ_STRING_FRAG: retval = new SegInterfaceStringFrag(this, mobj, segid); break; - case MEM_OBJ_RESERVED: - retval = new SegInterfaceReserved(this, mobj, segid); - break; default: error("Improper segment interface for %d", mobj->type); } diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index 2dd2873ed6..cd5324dd5a 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -338,8 +338,7 @@ enum memObjType { MEM_OBJ_HUNK = 8, MEM_OBJ_DYNMEM = 9, MEM_OBJ_STRING_FRAG = 10, - MEM_OBJ_RESERVED = 11, - MEM_OBJ_MAX = MEM_OBJ_RESERVED // For sanity checking + MEM_OBJ_MAX = 11 // For sanity checking }; struct MemObject { @@ -355,7 +354,6 @@ struct MemObject { NodeTable nodes; HunkTable hunks; DynMem dynmem; - char *reserved; } data; }; |