diff options
author | Strangerke | 2013-03-24 22:56:06 +0100 |
---|---|---|
committer | Strangerke | 2013-03-24 22:56:06 +0100 |
commit | ac338c3517d85156e83884164d378c3bf76851e5 (patch) | |
tree | 1a2e3df43d79fae887b130a57d95c6c4ce4ff0af /engines/hopkins/files.cpp | |
parent | 57abce19b1da832f1f108f6aff22e40649572f97 (diff) | |
download | scummvm-rg350-ac338c3517d85156e83884164d378c3bf76851e5.tar.gz scummvm-rg350-ac338c3517d85156e83884164d378c3bf76851e5.tar.bz2 scummvm-rg350-ac338c3517d85156e83884164d378c3bf76851e5.zip |
HOPKINS: Some more refactoring in Globals
Diffstat (limited to 'engines/hopkins/files.cpp')
-rw-r--r-- | engines/hopkins/files.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/hopkins/files.cpp b/engines/hopkins/files.cpp index 78ff7b2535..98cc34422e 100644 --- a/engines/hopkins/files.cpp +++ b/engines/hopkins/files.cpp @@ -35,6 +35,9 @@ namespace Hopkins { FileManager::FileManager(HopkinsEngine *vm) { _vm = vm; + + _catalogPos = 0; + _catalogSize = 0; } /** @@ -196,8 +199,8 @@ byte *FileManager::searchCat(const Common::String &file, CatMode mode) { if (name == filename) { // Found entry for file, so get it's details from the catalogue entry const byte *pData = ptr + offsetVal; - _vm->_globals->_catalogPos = READ_LE_UINT32(pData + 15); - _vm->_globals->_catalogSize = READ_LE_UINT32(pData + 19); + _catalogPos = READ_LE_UINT32(pData + 15); + _catalogSize = READ_LE_UINT32(pData + 19); matchFlag = true; } @@ -215,13 +218,13 @@ byte *FileManager::searchCat(const Common::String &file, CatMode mode) { if (!f.open(secondaryFilename)) error("CHARGE_FICHIER"); - f.seek(_vm->_globals->_catalogPos); + f.seek(_catalogPos); - byte *catData = _vm->_globals->allocMemory(_vm->_globals->_catalogSize); + byte *catData = _vm->_globals->allocMemory(_catalogSize); if (catData == g_PTRNUL) error("CHARGE_FICHIER"); - readStream(f, catData, _vm->_globals->_catalogSize); + readStream(f, catData, _catalogSize); f.close(); result = catData; } else { |