diff options
author | Filippos Karapetis | 2010-05-31 11:25:59 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-31 11:25:59 +0000 |
commit | 3f4302214c334a590b8428fe7ae32c76e64b6ed5 (patch) | |
tree | 974dea8d632d482a566d57e742c0f2daf13fa995 /engines/sci/engine/segment.h | |
parent | 9d50dac101b0d545b23397eef83f34b75a382303 (diff) | |
download | scummvm-rg350-3f4302214c334a590b8428fe7ae32c76e64b6ed5.tar.gz scummvm-rg350-3f4302214c334a590b8428fe7ae32c76e64b6ed5.tar.bz2 scummvm-rg350-3f4302214c334a590b8428fe7ae32c76e64b6ed5.zip |
The save/load object init code is now unified with the regular object init code
svn-id: r49346
Diffstat (limited to 'engines/sci/engine/segment.h')
-rw-r--r-- | engines/sci/engine/segment.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index dce1eb8445..051354bf7a 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -270,10 +270,9 @@ public: void markAsFreed() { _flags |= OBJECT_FLAG_FREED; } bool isFreed() const { return _flags & OBJECT_FLAG_FREED; } - void setVarCount(uint size) { _variables.resize(size); } uint getVarCount() const { return _variables.size(); } - void init(byte *buf, reg_t obj_pos); + void init(byte *buf, reg_t obj_pos, bool initVariables = true); reg_t getVariable(uint var) const { return _variables[var]; } reg_t &getVariableRef(uint var) { return _variables[var]; } @@ -295,16 +294,17 @@ public: void initSpecies(SegManager *segMan, reg_t addr); void initSuperClass(SegManager *segMan, reg_t addr); - bool initBaseObject(SegManager *segMan, reg_t addr); + bool initBaseObject(SegManager *segMan, reg_t addr, bool doInitSuperClass = true); // TODO: make private // Only SegManager::reconstructScripts() is left needing direct access to these public: const byte *_baseObj; /**< base + object offset within base */ + +private: const uint16 *_baseVars; /**< Pointer to the varselector area for this object */ const uint16 *_baseMethod; /**< Pointer to the method selector area for this object */ -private: Common::Array<reg_t> _variables; uint16 _methodCount; int _flags; @@ -394,7 +394,7 @@ public: * @returns A newly created Object describing the object, * stored within the relevant script */ - Object *scriptObjInit(reg_t obj_pos); + Object *scriptObjInit(reg_t obj_pos, bool fullObjectInit = true); /** * Removes a script object |