diff options
Diffstat (limited to 'engines/gob/script.cpp')
-rw-r--r-- | engines/gob/script.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/engines/gob/script.cpp b/engines/gob/script.cpp index 4bed65704e..72085ed756 100644 --- a/engines/gob/script.cpp +++ b/engines/gob/script.cpp @@ -422,10 +422,6 @@ bool Script::getTOTProperties() { _exFileNumber = _totData[60]; _communHandling = _totData[61]; - _startOffset = READ_LE_UINT32(_totData + 100); - - _centerOffset = READ_LE_UINT16(_totData + 126); - return true; } @@ -538,12 +534,14 @@ uint8 Script::getCommunHandling() const { return _communHandling; } -uint32 Script::getStartOffset() const { - return _startOffset; -} +uint16 Script::getFunctionOffset(uint8 function) const { + if (!_totData) + return 0; + + // Offsets 100-128, 2 bytes per function + assert(function <= 13); -uint32 Script::getCenterOffset() const { - return _centerOffset; + return READ_LE_UINT16(_totData + 100 + function * 2); } uint32 Script::getVariablesCount(const char *fileName, GobEngine *vm) { |