Added Script::getStartOffset()
svn-id: r41795
This commit is contained in:
parent
3470faa936
commit
792e77e653
4 changed files with 27 additions and 19 deletions
|
@ -164,7 +164,7 @@ void Game_v1::playTot(int16 skipPlay) {
|
|||
if (!_vm->_inter->_variables)
|
||||
_vm->_inter->allocateVars(_script->getVariablesCount() & 0xFFFF);
|
||||
|
||||
_script->seek(READ_LE_UINT32(_script->getData() + 0x64));
|
||||
_script->seek(_script->getStartOffset());
|
||||
|
||||
_vm->_inter->renewTimeInVars();
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ void Game_v2::playTot(int16 skipPlay) {
|
|||
if (!_vm->_inter->_variables)
|
||||
_vm->_inter->allocateVars(_script->getVariablesCount() & 0xFFFF);
|
||||
|
||||
_script->seek(READ_LE_UINT16(_script->getData() + 0x64));
|
||||
_script->seek(_script->getStartOffset());
|
||||
|
||||
_vm->_inter->renewTimeInVars();
|
||||
|
||||
|
|
|
@ -422,6 +422,8 @@ bool Script::getTOTProperties() {
|
|||
_exFileNumber = _totData[60];
|
||||
_communHandling = _totData[61];
|
||||
|
||||
_startOffset = READ_LE_UINT32(_totData + 100);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -534,6 +536,10 @@ uint8 Script::getCommunHandling() const {
|
|||
return _communHandling;
|
||||
}
|
||||
|
||||
uint32 Script::getStartOffset() const {
|
||||
return _startOffset;
|
||||
}
|
||||
|
||||
uint32 Script::getVariablesCount(const char *fileName, GobEngine *vm) {
|
||||
if (!vm->_dataIO->existData(fileName))
|
||||
return 0;
|
||||
|
|
|
@ -117,15 +117,16 @@ public:
|
|||
void call(uint32 offset);
|
||||
|
||||
// Fixed properties
|
||||
uint8 getVersionMajor() const;
|
||||
uint8 getVersionMinor() const;
|
||||
uint32 getVariablesCount() const;
|
||||
uint32 getTextsOffset() const;
|
||||
uint8 getVersionMajor () const;
|
||||
uint8 getVersionMinor () const;
|
||||
uint32 getVariablesCount () const;
|
||||
uint32 getTextsOffset () const;
|
||||
uint32 getResourcesOffset() const;
|
||||
uint16 getAnimDataSize() const;
|
||||
uint8 getImFileNumber() const;
|
||||
uint8 getExFileNumber() const;
|
||||
uint8 getCommunHandling() const;
|
||||
uint16 getAnimDataSize () const;
|
||||
uint8 getImFileNumber () const;
|
||||
uint8 getExFileNumber () const;
|
||||
uint8 getCommunHandling () const;
|
||||
uint32 getStartOffset () const;
|
||||
|
||||
static uint32 getVariablesCount(const char *fileName, GobEngine *vm);
|
||||
|
||||
|
@ -147,15 +148,16 @@ private:
|
|||
|
||||
int16 _lomHandle;
|
||||
|
||||
uint8 _versionMajor;
|
||||
uint8 _versionMinor;
|
||||
uint32 _variablesCount;
|
||||
uint32 _textsOffset;
|
||||
uint32 _resourcesOffset;
|
||||
uint16 _animDataSize;
|
||||
uint8 _imFileNumber;
|
||||
uint8 _exFileNumber;
|
||||
uint8 _communHandling;
|
||||
uint8 _versionMajor;
|
||||
uint8 _versionMinor;
|
||||
uint32 _variablesCount;
|
||||
uint32 _textsOffset;
|
||||
uint32 _resourcesOffset;
|
||||
uint16 _animDataSize;
|
||||
uint8 _imFileNumber;
|
||||
uint8 _exFileNumber;
|
||||
uint8 _communHandling;
|
||||
uint32 _startOffset;
|
||||
|
||||
Common::Stack<CallEntry> _callStack;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue