aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/include
diff options
context:
space:
mode:
authorJordi Vilalta Prat2009-02-21 23:27:24 +0000
committerJordi Vilalta Prat2009-02-21 23:27:24 +0000
commit817fde6cdddc700650e16018e9d6184ae29d1ecf (patch)
tree64379a245f082d7384bd45c015c8795a257d530c /engines/sci/include
parentb5b4cb66a173bfea3792058e160f6b9a0b30e2ff (diff)
downloadscummvm-rg350-817fde6cdddc700650e16018e9d6184ae29d1ecf.tar.gz
scummvm-rg350-817fde6cdddc700650e16018e9d6184ae29d1ecf.tar.bz2
scummvm-rg350-817fde6cdddc700650e16018e9d6184ae29d1ecf.zip
SCI: Convert the segment manager into a class
svn-id: r38767
Diffstat (limited to 'engines/sci/include')
-rw-r--r--engines/sci/include/engine.h2
-rw-r--r--engines/sci/include/vm.h17
2 files changed, 17 insertions, 2 deletions
diff --git a/engines/sci/include/engine.h b/engines/sci/include/engine.h
index 5c2ace7ee0..8265088b89 100644
--- a/engines/sci/include/engine.h
+++ b/engines/sci/include/engine.h
@@ -234,7 +234,7 @@ struct EngineState {
int classtable_size; /* Number of classes in the table- for debugging */
class_t *classtable; /* Table of all classes */
- SegManager seg_manager;
+ SegManager *seg_manager;
int gc_countdown; /* Number of kernel calls until next gc */
int selector_names_nr; /* Number of selector names */
diff --git a/engines/sci/include/vm.h b/engines/sci/include/vm.h
index 05585632e8..6362c2f072 100644
--- a/engines/sci/include/vm.h
+++ b/engines/sci/include/vm.h
@@ -256,8 +256,23 @@ struct dynmem_t {
byte *buf;
}; /* Free-style memory */
+enum memObjType {
+ MEM_OBJ_INVALID = 0,
+ MEM_OBJ_SCRIPT = 1,
+ MEM_OBJ_CLONES = 2,
+ MEM_OBJ_LOCALS = 3,
+ MEM_OBJ_STACK = 4,
+ MEM_OBJ_SYS_STRINGS = 5,
+ MEM_OBJ_LISTS = 6,
+ MEM_OBJ_NODES = 7,
+ MEM_OBJ_HUNK = 8,
+ MEM_OBJ_DYNMEM = 9,
+ MEM_OBJ_RESERVED = 10,
+ MEM_OBJ_MAX = MEM_OBJ_RESERVED // For sanity checking
+};
+
struct mem_obj_t {
- int type;
+ memObjType type;
int segmgr_id; /* Internal value used by the seg_manager's hash map */
union {
script_t script;