diff options
author | Sven Hesse | 2009-06-23 01:22:51 +0000 |
---|---|---|
committer | Sven Hesse | 2009-06-23 01:22:51 +0000 |
commit | c967db5fa0f523f685991e87bbf7d3510ac45a98 (patch) | |
tree | 8782792409093bc21fb04c19c7a69f06c9bcaa4f /engines | |
parent | 792e77e653bcb8c023919ee3d07110fb84e1cb60 (diff) | |
download | scummvm-rg350-c967db5fa0f523f685991e87bbf7d3510ac45a98.tar.gz scummvm-rg350-c967db5fa0f523f685991e87bbf7d3510ac45a98.tar.bz2 scummvm-rg350-c967db5fa0f523f685991e87bbf7d3510ac45a98.zip |
Added Script::getCenterOffset()
svn-id: r41796
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/draw.cpp | 4 | ||||
-rw-r--r-- | engines/gob/script.cpp | 6 | ||||
-rw-r--r-- | engines/gob/script.h | 22 |
3 files changed, 20 insertions, 12 deletions
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index 83266beb3a..66f046339f 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -390,8 +390,8 @@ void Draw::printTextCentered(int16 id, int16 left, int16 top, int16 right, adjustCoords(1, &left, &top); adjustCoords(1, &right, &bottom); - if (READ_LE_UINT16(_vm->_game->_script->getData() + 0x7E) != 0) { - _vm->_game->_script->call(READ_LE_UINT16(_vm->_game->_script->getData() + 0x7E)); + if (_vm->_game->_script->getCenterOffset() != 0) { + _vm->_game->_script->call(_vm->_game->_script->getCenterOffset()); WRITE_VAR(17, (uint32) id); WRITE_VAR(18, (uint32) left); diff --git a/engines/gob/script.cpp b/engines/gob/script.cpp index 18d47d4333..4bed65704e 100644 --- a/engines/gob/script.cpp +++ b/engines/gob/script.cpp @@ -424,6 +424,8 @@ bool Script::getTOTProperties() { _startOffset = READ_LE_UINT32(_totData + 100); + _centerOffset = READ_LE_UINT16(_totData + 126); + return true; } @@ -540,6 +542,10 @@ uint32 Script::getStartOffset() const { return _startOffset; } +uint32 Script::getCenterOffset() const { + return _centerOffset; +} + uint32 Script::getVariablesCount(const char *fileName, GobEngine *vm) { if (!vm->_dataIO->existData(fileName)) return 0; diff --git a/engines/gob/script.h b/engines/gob/script.h index 6fa08aa7ae..a1200a7ce4 100644 --- a/engines/gob/script.h +++ b/engines/gob/script.h @@ -127,6 +127,7 @@ public: uint8 getExFileNumber () const; uint8 getCommunHandling () const; uint32 getStartOffset () const; + uint32 getCenterOffset () const; static uint32 getVariablesCount(const char *fileName, GobEngine *vm); @@ -148,16 +149,17 @@ private: int16 _lomHandle; - uint8 _versionMajor; - uint8 _versionMinor; - uint32 _variablesCount; - uint32 _textsOffset; - uint32 _resourcesOffset; - uint16 _animDataSize; - uint8 _imFileNumber; - uint8 _exFileNumber; - uint8 _communHandling; - uint32 _startOffset; + uint8 _versionMajor; + uint8 _versionMinor; + uint32 _variablesCount; + uint32 _textsOffset; + uint32 _resourcesOffset; + uint16 _animDataSize; + uint8 _imFileNumber; + uint8 _exFileNumber; + uint8 _communHandling; + uint32 _startOffset; + uint16 _centerOffset; Common::Stack<CallEntry> _callStack; |