aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2009-06-24 21:48:27 +0000
committerSven Hesse2009-06-24 21:48:27 +0000
commitef33f98a1a966b3956990414e62584ec371a550e (patch)
tree91a80f72af43eadf009849e96e839d8e0f6b1bee /engines
parent53c4e66b71bf6fa42ef0281ec848cf2ed2fc3286 (diff)
downloadscummvm-rg350-ef33f98a1a966b3956990414e62584ec371a550e.tar.gz
scummvm-rg350-ef33f98a1a966b3956990414e62584ec371a550e.tar.bz2
scummvm-rg350-ef33f98a1a966b3956990414e62584ec371a550e.zip
Added the scriptEnd property
svn-id: r41838
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/totfile.cpp8
-rw-r--r--engines/gob/totfile.h1
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);