diff options
author | athrxx | 2011-09-18 15:53:47 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-12-26 16:18:15 +0100 |
commit | ac1aa43ca8b2ad9f2743006a5e40a7967a40fec5 (patch) | |
tree | a780256e5dbd68321726baea7632f34bc1afdd45 /engines/kyra | |
parent | 68ed8b95989d784fe42f4e6e400224ffb63ba80b (diff) | |
download | scummvm-rg350-ac1aa43ca8b2ad9f2743006a5e40a7967a40fec5.tar.gz scummvm-rg350-ac1aa43ca8b2ad9f2743006a5e40a7967a40fec5.tar.bz2 scummvm-rg350-ac1aa43ca8b2ad9f2743006a5e40a7967a40fec5.zip |
KYRA: (EOB) - fix char generator regression + cleanup
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/chargen.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/text_eob.cpp | 18 | ||||
-rw-r--r-- | engines/kyra/text_eob.h | 3 |
3 files changed, 21 insertions, 6 deletions
diff --git a/engines/kyra/chargen.cpp b/engines/kyra/chargen.cpp index 0e38ffec3d..92d1b15ec3 100644 --- a/engines/kyra/chargen.cpp +++ b/engines/kyra/chargen.cpp @@ -380,7 +380,7 @@ int CharacterGenerator::viewDeleteCharacter() { int res = 0; for (bool loop = true; loop && _characters[_activeBox].name[0] && !_vm->shouldQuit(); ) { _vm->_gui->updateBoxFrameHighLight(_activeBox + 6); - int inputFlag =getInput(_vm->_activeButtons); + int inputFlag = getInput(_vm->_activeButtons); int cbx = _activeBox; _vm->removeInputTop(); @@ -517,7 +517,7 @@ int CharacterGenerator::classMenu(int raceSex) { while (res == -1 && !_vm->shouldQuit()) { updateMagicShapes(); - int in = getInput(_vm->_activeButtons) & 0xff; + int in = getInput(0) & 0xff; Common::Point mp = _vm->getMousePos(); if (in == _vm->_keyMap[Common::KEYCODE_ESCAPE] || _vm->_gui->_menuLastInFlags == _vm->_keyMap[Common::KEYCODE_ESCAPE] || _vm->_gui->_menuLastInFlags == _vm->_keyMap[Common::KEYCODE_b]) { @@ -565,7 +565,7 @@ int CharacterGenerator::alignmentMenu(int cClass) { while (res == -1 && !_vm->shouldQuit()) { updateMagicShapes(); - int in = getInput(_vm->_activeButtons) & 0xff; + int in = getInput(0) & 0xff; Common::Point mp = _vm->getMousePos(); if (in == _vm->_keyMap[Common::KEYCODE_ESCAPE] || _vm->_gui->_menuLastInFlags == _vm->_keyMap[Common::KEYCODE_ESCAPE] || _vm->_gui->_menuLastInFlags == _vm->_keyMap[Common::KEYCODE_b]) { diff --git a/engines/kyra/text_eob.cpp b/engines/kyra/text_eob.cpp index 0fe01df770..e4e9b37379 100644 --- a/engines/kyra/text_eob.cpp +++ b/engines/kyra/text_eob.cpp @@ -55,6 +55,11 @@ TextDisplayer_Eob::TextDisplayer_Eob(LolEobBaseEngine *engine, Screen *sScreen) _textDimData[i].column = d->unkE; } + _table1 = new char[128]; + memset(_table1, 0, 128); + _table2 = new char[16]; + memset(_table2, 0, 16); + _waitButtonSpace = 0; } @@ -62,6 +67,8 @@ TextDisplayer_Eob::~TextDisplayer_Eob() { delete[] _dialogueBuffer; delete[] _currentLine; delete[] _textDimData; + delete[] _table1; + delete[] _table2; } void TextDisplayer_Eob::setupField(int dim, bool mode) { @@ -257,6 +264,7 @@ char TextDisplayer_Eob::parseCommand() { } void TextDisplayer_Eob::readNextPara() { + char c = 0; char d = 0; if (_tempString2) { @@ -275,12 +283,16 @@ void TextDisplayer_Eob::readNextPara() { _tempString1 = 0; } - if (d & 0x80) { - warning("TextDisplayer_Eob::readNextPara():"); + if ((_vm->game() != GI_LOL) && (d & 0x80)) { + d &= 0x7f; + c = d & 7; + d = (d & 0x78) >> 3; + c = _table1[(d << 3) + c]; + d = _table2[d]; } _ctrl[1] = d; - _ctrl[2] = 0; + _ctrl[2] = c; } void TextDisplayer_Eob::printLine(char *str) { diff --git a/engines/kyra/text_eob.h b/engines/kyra/text_eob.h index eb4957448b..9409ac43f0 100644 --- a/engines/kyra/text_eob.h +++ b/engines/kyra/text_eob.h @@ -103,6 +103,9 @@ protected: private: LolEobBaseEngine *_vm; Screen *_screen; + + char *_table1; + char *_table2; }; } // End of namespace Kyra |