aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorSven Hesse2009-06-23 01:21:51 +0000
committerSven Hesse2009-06-23 01:21:51 +0000
commit3470faa9365445fe39653ba545117dca18e040a5 (patch)
tree853fcf4d00023865afd0f5821d2573e9e382d256 /engines/gob
parent43923e8b333e97116c481d4ce266bb08c37bc195 (diff)
downloadscummvm-rg350-3470faa9365445fe39653ba545117dca18e040a5.tar.gz
scummvm-rg350-3470faa9365445fe39653ba545117dca18e040a5.tar.bz2
scummvm-rg350-3470faa9365445fe39653ba545117dca18e040a5.zip
Added Script::getAnimDataSize()
svn-id: r41794
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/game_v1.cpp3
-rw-r--r--engines/gob/game_v2.cpp3
-rw-r--r--engines/gob/script.cpp12
-rw-r--r--engines/gob/script.h2
4 files changed, 13 insertions, 7 deletions
diff --git a/engines/gob/game_v1.cpp b/engines/gob/game_v1.cpp
index fd859fdc2d..960c8e6e39 100644
--- a/engines/gob/game_v1.cpp
+++ b/engines/gob/game_v1.cpp
@@ -160,8 +160,7 @@ void Game_v1::playTot(int16 skipPlay) {
loadImFile();
loadExtTable();
- _vm->_global->_inter_animDataSize =
- READ_LE_UINT16(_script->getData() + 0x38);
+ _vm->_global->_inter_animDataSize = _script->getAnimDataSize();
if (!_vm->_inter->_variables)
_vm->_inter->allocateVars(_script->getVariablesCount() & 0xFFFF);
diff --git a/engines/gob/game_v2.cpp b/engines/gob/game_v2.cpp
index 3c72172124..96a25cdf61 100644
--- a/engines/gob/game_v2.cpp
+++ b/engines/gob/game_v2.cpp
@@ -195,8 +195,7 @@ void Game_v2::playTot(int16 skipPlay) {
loadImFile();
loadExtTable();
- _vm->_global->_inter_animDataSize =
- READ_LE_UINT16(_script->getData() + 0x38);
+ _vm->_global->_inter_animDataSize = _script->getAnimDataSize();
if (!_vm->_inter->_variables)
_vm->_inter->allocateVars(_script->getVariablesCount() & 0xFFFF);
diff --git a/engines/gob/script.cpp b/engines/gob/script.cpp
index b5b7566e35..ef7fc40db0 100644
--- a/engines/gob/script.cpp
+++ b/engines/gob/script.cpp
@@ -413,11 +413,13 @@ bool Script::getTOTProperties() {
_variablesCount = READ_LE_UINT32(_totData + 44);
- _textsOffset = READ_LE_UINT32(_totData + 48);
+ _textsOffset = READ_LE_UINT32(_totData + 48);
_resourcesOffset = READ_LE_UINT32(_totData + 52);
- _imFileNumber = _totData[59];
- _exFileNumber = _totData[60];
+ _animDataSize = READ_LE_UINT16(_totData + 56);
+
+ _imFileNumber = _totData[59];
+ _exFileNumber = _totData[60];
_communHandling = _totData[61];
return true;
@@ -516,6 +518,10 @@ uint32 Script::getResourcesOffset() const {
return _resourcesOffset;
}
+uint16 Script::getAnimDataSize() const {
+ return _animDataSize;
+}
+
uint8 Script::getImFileNumber() const {
return _imFileNumber;
}
diff --git a/engines/gob/script.h b/engines/gob/script.h
index 577d9ef287..0e5dfc825c 100644
--- a/engines/gob/script.h
+++ b/engines/gob/script.h
@@ -122,6 +122,7 @@ public:
uint32 getVariablesCount() const;
uint32 getTextsOffset() const;
uint32 getResourcesOffset() const;
+ uint16 getAnimDataSize() const;
uint8 getImFileNumber() const;
uint8 getExFileNumber() const;
uint8 getCommunHandling() const;
@@ -151,6 +152,7 @@ private:
uint32 _variablesCount;
uint32 _textsOffset;
uint32 _resourcesOffset;
+ uint16 _animDataSize;
uint8 _imFileNumber;
uint8 _exFileNumber;
uint8 _communHandling;