aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/script.h
diff options
context:
space:
mode:
authorFilippos Karapetis2011-11-05 02:53:08 +0200
committerFilippos Karapetis2011-11-05 03:00:42 +0200
commit267c6f1756c9582b8bd9534334c7f264a2400929 (patch)
tree3371fa3b24dc20abb4145f6e87291cdcf0e4b955 /engines/sci/engine/script.h
parentd70d6c4c50942ec3679fce07ff6045b5d18ed9a1 (diff)
downloadscummvm-rg350-267c6f1756c9582b8bd9534334c7f264a2400929.tar.gz
scummvm-rg350-267c6f1756c9582b8bd9534334c7f264a2400929.tar.bz2
scummvm-rg350-267c6f1756c9582b8bd9534334c7f264a2400929.zip
SCI: Made more fields of the Script class private. Some cleanup.
Diffstat (limited to 'engines/sci/engine/script.h')
-rw-r--r--engines/sci/engine/script.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h
index ff061e0e36..b6610aadea 100644
--- a/engines/sci/engine/script.h
+++ b/engines/sci/engine/script.h
@@ -69,6 +69,8 @@ private:
uint16 _localsCount;
bool _markedAsDeleted;
+ SegmentId _localsSegment; /**< The local variable segment */
+ LocalVariables *_localsBlock;
public:
/**
@@ -76,8 +78,6 @@ public:
* Indexed by the TODO offset.
*/
ObjMap _objects;
- SegmentId _localsSegment; /**< The local variable segment */
- LocalVariables *_localsBlock;
public:
int getLocalsOffset() const { return _localsOffset; }
@@ -89,6 +89,9 @@ public:
const byte *getBuf(uint offset = 0) const { return _buf + offset; }
int getScriptNumber() const { return _nr; }
+ SegmentId getLocalsSegment() const { return _localsSegment; }
+ reg_t *getLocalsBegin() { return _localsBlock ? _localsBlock->_locals.begin() : NULL; }
+ void syncLocalsBlock(SegManager *segMan);
public:
Script();
@@ -295,6 +298,8 @@ private:
* @param segmentId The script's segment id
*/
void initializeObjectsSci3(SegManager *segMan, SegmentId segmentId);
+
+ LocalVariables *allocLocalsSegment(SegManager *segMan);
};
} // End of namespace Sci