diff options
-rw-r--r-- | engines/gob/totfile.cpp | 8 | ||||
-rw-r--r-- | engines/gob/totfile.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/engines/gob/totfile.cpp b/engines/gob/totfile.cpp index 0a955b086d..bbf62c143b 100644 --- a/engines/gob/totfile.cpp +++ b/engines/gob/totfile.cpp @@ -48,7 +48,7 @@ bool TOTFile::load(const Common::String &fileName) { _stream = _vm->_dataIO->getDataStream(fileName.c_str()); if (!_stream) - // Trying to open from video video + // Trying to open from video _stream = _vm->_vidPlayer->getExtraData(fileName.c_str()); if (!_stream) @@ -97,6 +97,12 @@ bool TOTFile::getProperties(Properties &props) const { for (int i = 0; i < 14; i++) props.functions[i] = READ_LE_UINT16(_header + 100 + i * 2); + props.scriptEnd = _stream->size(); + if (props.textsOffset > 0) + props.scriptEnd = MIN(props.scriptEnd, props.textsOffset); + if (props.resourcesOffset > 0) + props.scriptEnd = MIN(props.scriptEnd, props.resourcesOffset); + return true; } diff --git a/engines/gob/totfile.h b/engines/gob/totfile.h index f76f695258..00963d36a2 100644 --- a/engines/gob/totfile.h +++ b/engines/gob/totfile.h @@ -52,6 +52,7 @@ public: uint8 exFileNumber; uint8 communHandling; uint16 functions[14]; + uint32 scriptEnd; }; TOTFile(GobEngine *vm); |