aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2009-05-03 09:18:56 +0000
committerMax Horn2009-05-03 09:18:56 +0000
commit2a89c7d1d4532f082c2050ec5631f36f6707dc23 (patch)
tree0d257657daa2a7fa034981895c1b810b7a4e217b /engines
parent240be613f9cd141470eda1e08bb07ee2c7d7e503 (diff)
downloadscummvm-rg350-2a89c7d1d4532f082c2050ec5631f36f6707dc23.tar.gz
scummvm-rg350-2a89c7d1d4532f082c2050ec5631f36f6707dc23.tar.bz2
scummvm-rg350-2a89c7d1d4532f082c2050ec5631f36f6707dc23.zip
SCI: Removed MEM_OBJ_RESERVED and related code
svn-id: r40265
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/seg_manager.cpp24
-rw-r--r--engines/sci/engine/vm.h4
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;
};