diff options
author | Filippos Karapetis | 2010-06-03 10:16:21 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-03 10:16:21 +0000 |
commit | 86b452d36cb781c24e1b167dd6cef768b7c6286b (patch) | |
tree | 97a66ac538ca14982f082d4ca93c5c90c98f4a6c /engines/sci/engine/segment.h | |
parent | 86dcc28342021933f04ff3542932fc8823ff2360 (diff) | |
download | scummvm-rg350-86b452d36cb781c24e1b167dd6cef768b7c6286b.tar.gz scummvm-rg350-86b452d36cb781c24e1b167dd6cef768b7c6286b.tar.bz2 scummvm-rg350-86b452d36cb781c24e1b167dd6cef768b7c6286b.zip |
Moved several object-related defines inside vm.h into segment.h, where the Object class resides. Also, removed several unused defines
svn-id: r49406
Diffstat (limited to 'engines/sci/engine/segment.h')
-rw-r--r-- | engines/sci/engine/segment.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index 051354bf7a..d89f54fbe2 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -205,6 +205,22 @@ enum { OBJECT_FLAG_FREED = (1 << 0) }; +enum infoSelectorFlags { + kInfoFlagClone = 0x0001, + kInfoFlagClass = 0x8000 +}; + +enum ObjectOffsets { + kOffsetLocalVariables = -6, + kOffsetFunctionArea = -4, + kOffsetSelectorCounter = -2, + kOffsetSelectorSegment = 0, + kOffsetInfoSelectorSci0 = 4, + kOffsetNamePointerSci0 = 6, + kOffsetInfoSelectorSci11 = 14, + kOffsetNamePointerSci11 = 16, +}; + class Object { public: Object() { @@ -264,9 +280,12 @@ public: */ int locateVarSelector(SegManager *segMan, Selector slc) const; - bool isClass() const { return (getInfoSelector().offset & SCRIPT_INFO_CLASS); } + bool isClass() const { return (getInfoSelector().offset & kInfoFlagClass); } const Object *getClass(SegManager *segMan) const; + void markAsClone() { setInfoSelector(make_reg(0, kInfoFlagClone)); } + bool isClone() const { return (getInfoSelector().offset & kInfoFlagClone); } + void markAsFreed() { _flags |= OBJECT_FLAG_FREED; } bool isFreed() const { return _flags & OBJECT_FLAG_FREED; } |