diff options
author | Strangerke | 2014-08-31 02:18:02 +0200 |
---|---|---|
committer | Strangerke | 2014-08-31 02:19:05 +0200 |
commit | 9d3460e9f707b1d53534e45c19e15bbb247eba70 (patch) | |
tree | fe26110b09c5b9e121b5a6f8236de377500d0cdb /engines/access/amazon/amazon_game.cpp | |
parent | b39d7df7cb754b975bcbfdb523f451f021847e72 (diff) | |
download | scummvm-rg350-9d3460e9f707b1d53534e45c19e15bbb247eba70.tar.gz scummvm-rg350-9d3460e9f707b1d53534e45c19e15bbb247eba70.tar.bz2 scummvm-rg350-9d3460e9f707b1d53534e45c19e15bbb247eba70.zip |
ACCESS: Implement printText()
Diffstat (limited to 'engines/access/amazon/amazon_game.cpp')
-rw-r--r-- | engines/access/amazon/amazon_game.cpp | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp index d18729aa19..f633cd8753 100644 --- a/engines/access/amazon/amazon_game.cpp +++ b/engines/access/amazon/amazon_game.cpp @@ -231,23 +231,26 @@ void AmazonEngine::loadEstablish(int sub) { _establishGroup = 0; _eseg = _files->loadFile(_estTable[oldGroup]); - } else { - _eseg = _files->loadFile("ETEXT.DAT"); - } + _establishCtrlTblOfs = READ_LE_UINT16(_eseg->data()); - _establishCtrlTblOfs = READ_LE_UINT16(_eseg->data()); + int ofs = _establishCtrlTblOfs + (sub * 2); + int idx = READ_LE_UINT16(_eseg->data() + ofs); + _narateFile = READ_LE_UINT16(_eseg->data() + idx); + _txtPages = READ_LE_UINT16(_eseg->data() + idx + 2); - int ofs = _establishCtrlTblOfs + (sub * 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; + if (!_txtPages) + return; - _sndSubFile = READ_LE_UINT16(_eseg->data() + idx + 4); - for (int i = 0; i < _txtPages; ++i) - _countTbl[i] = READ_LE_UINT16(_eseg->data() + idx + 6 + (2 * i)); + _sndSubFile = READ_LE_UINT16(_eseg->data() + idx + 4); + for (int i = 0; i < _txtPages; ++i) + _countTbl[i] = READ_LE_UINT16(_eseg->data() + idx + 6 + (2 * i)); + } else { + _establishGroup = 0; + _narateFile = 0; + _txtPages = 0; + _sndSubFile = 0; + _eseg = _files->loadFile("ETEXT.DAT"); + } } void AmazonEngine::doEstablish(int esatabIndex, int sub) { @@ -279,7 +282,7 @@ void AmazonEngine::doEstablish(int esatabIndex, int sub) { _printEnd = 155; if (_txtPages == 0) { Common::String msg((const char *)_eseg->data() + msgOffset); - _fonts._font2.printText(_screen, msg); + printText(_screen, msg); } else { Common::Array<Common::String> msgArr; for (int i = 0; i < _txtPages; ++i) { |