diff options
author | Strangerke | 2014-08-31 01:05:52 +0200 |
---|---|---|
committer | Strangerke | 2014-08-31 01:06:50 +0200 |
commit | aa755b9f3ff93e1e0918abe77b2a49b2e203e2a5 (patch) | |
tree | f5a771326a7f4da20ad33cda86730aa825ba378c /engines/access | |
parent | adddb1377d927403abc406c09f1d76ac5700188a (diff) | |
download | scummvm-rg350-aa755b9f3ff93e1e0918abe77b2a49b2e203e2a5.tar.gz scummvm-rg350-aa755b9f3ff93e1e0918abe77b2a49b2e203e2a5.tar.bz2 scummvm-rg350-aa755b9f3ff93e1e0918abe77b2a49b2e203e2a5.zip |
ACCESS: Fix loadEstablish for the CD version
Diffstat (limited to 'engines/access')
-rw-r--r-- | engines/access/amazon/amazon_game.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp index 712a25289d..8fbc4cf2ff 100644 --- a/engines/access/amazon/amazon_game.cpp +++ b/engines/access/amazon/amazon_game.cpp @@ -235,19 +235,19 @@ void AmazonEngine::loadEstablish(int sub) { _eseg = _files->loadFile("ETEXT.DAT"); } - _establishCtrlTblOfs = READ_LE_UINT16(_eseg); + _establishCtrlTblOfs = READ_LE_UINT16(_eseg->data()); int ofs = _establishCtrlTblOfs + (sub * 2); - int idx = READ_LE_UINT16(_eseg + ofs); - _narateFile = READ_LE_UINT16(_eseg + idx); - _txtPages = READ_LE_UINT16(_eseg + idx + 2); + int idx = READ_LE_UINT16(_eseg->data() + ofs); + _narateFile = READ_LE_UINT16(_eseg->data() + idx); + _txtPages = READ_LE_UINT16(_eseg->data() + idx + 2); if (!_txtPages) return; - _sndSubFile = READ_LE_UINT16(_eseg + idx + 4); + _sndSubFile = READ_LE_UINT16(_eseg->data() + idx + 4); for (int i = 0; i < _txtPages; ++i) - _countTbl[i] = READ_LE_UINT16(_eseg + idx + 6 + (2 * i)); + _countTbl[i] = READ_LE_UINT16(_eseg->data() + idx + 6 + (2 * i)); } void AmazonEngine::doEstablish(int esatabIndex, int sub) { @@ -278,12 +278,12 @@ void AmazonEngine::doEstablish(int esatabIndex, int sub) { _printEnd = 155; if (_txtPages == 0) { - Common::String msg((const char *)_eseg + msgOffset); + Common::String msg((const char *)_eseg->data() + msgOffset); _fonts._font2.printText(_screen, msg); } else { Common::Array<Common::String> msgArr; for (int i = 0; i < _txtPages; ++i) { - Common::String msg((const char *)_eseg + msgOffset); + Common::String msg((const char *)_eseg->data() + msgOffset); msgOffset += msg.size() + 1; msgArr.push_back(msg); } @@ -293,7 +293,7 @@ void AmazonEngine::doEstablish(int esatabIndex, int sub) { _screen->forceFadeOut(); _screen->clearScreen(); - free(_eseg); + delete _eseg; if (_establishMode == 0) _room->init4Quads(); } |