aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-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;