aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2017-02-17 11:49:52 -0600
committerColin Snover2017-04-23 13:07:25 -0500
commitcb50682b15c308cb075b7c46ce24b499827f4260 (patch)
tree09c185dde2e0b95b35c2daa5e2bb7c98bd3addf3 /engines
parent0394fd44e8d1b4e20cbf465365fef1ad0e8bf658 (diff)
downloadscummvm-rg350-cb50682b15c308cb075b7c46ce24b499827f4260.tar.gz
scummvm-rg350-cb50682b15c308cb075b7c46ce24b499827f4260.tar.bz2
scummvm-rg350-cb50682b15c308cb075b7c46ce24b499827f4260.zip
SCI: Improve documentation of Object class
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/object.h40
1 files changed, 36 insertions, 4 deletions
diff --git a/engines/sci/engine/object.h b/engines/sci/engine/object.h
index 8957a61799..4fd1385c79 100644
--- a/engines/sci/engine/object.h
+++ b/engines/sci/engine/object.h
@@ -284,15 +284,47 @@ public:
private:
void initSelectorsSci3(const SciSpan<const byte> &buf, const bool initVariables);
- SciSpan<const byte> _baseObj; /**< base + object offset within base */
- Common::Array<uint16> _baseVars; /**< The varselector area for this object */
- Common::Array<uint16> _baseMethod; /**< The method selector area for this object */
- Common::Array<uint32> _propertyOffsetsSci3; /**< Enables relocation of property values in SCI3 */
+ /**
+ * A pointer to the raw object data within the object's owner script.
+ */
+ SciSpan<const byte> _baseObj;
+
+ /**
+ * A lookup table from a property index to its corresponding selector number.
+ */
+ Common::Array<uint16> _baseVars;
+ /**
+ * A lookup table from a method index to its corresponding selector number.
+ */
+ Common::Array<uint16> _baseMethod;
+
+ /**
+ * A lookup table from a property index to the property's current value.
+ */
Common::Array<reg_t> _variables;
+
+ /**
+ * A lookup table from a property index to the property's original absolute
+ * offset within the raw script data. This absolute offset is coded into the
+ * script's relocation table, and is used to look up 32-bit values for
+ * properties in the relocation table (which is used to break the 16-bit
+ * barrier, since the script format still only holds 16-bit values inline).
+ */
+ Common::Array<uint32> _propertyOffsetsSci3;
+
+ /**
+ * The number of methods on the object.
+ */
uint16 _methodCount;
int _flags;
+
+ /**
+ * For SCI0 through SCI2.1, an extra index offset used when looking up
+ * special object properties -species-, -super-, -info-, and name.
+ */
uint16 _offset;
+
reg_t _pos; /**< Object offset within its script; for clones, this is their base */
reg_t _superClassPosSci3; /**< reg_t pointing to superclass for SCI3 */
reg_t _speciesSelectorSci3; /**< reg_t containing species "selector" for SCI3 */