diff options
Diffstat (limited to 'engines/kyra/script')
-rw-r--r-- | engines/kyra/script/script_eob.cpp | 16 | ||||
-rw-r--r-- | engines/kyra/script/script_eob.h | 2 |
2 files changed, 15 insertions, 3 deletions
diff --git a/engines/kyra/script/script_eob.cpp b/engines/kyra/script/script_eob.cpp index 1c96a53498..a7363967d7 100644 --- a/engines/kyra/script/script_eob.cpp +++ b/engines/kyra/script/script_eob.cpp @@ -518,7 +518,6 @@ int EoBInfProcessor::oeob_moveInventoryItemToBlock(int8 *data) { } int EoBInfProcessor::oeob_printMessage_v1(int8 *data) { - static const char amigaColorMap[16] = { 0x00, 0x06, 0x1d, 0x1b, 0x1a, 0x17, 0x18, 0x0e, 0x19, 0x1c, 0x1c, 0x1e, 0x13, 0x0a, 0x11, 0x1f }; static const char colorConfig[] = "\x6\x21\x2\x21"; char col[5]; int8 *pos = data; @@ -533,8 +532,8 @@ int EoBInfProcessor::oeob_printMessage_v1(int8 *data) { if (_vm->gameFlags().platform == Common::kPlatformAmiga) { assert((uint8)col[1] < 16); assert((uint8)col[3] < 16); - col[1] = amigaColorMap[(uint8)col[1]]; - col[3] = amigaColorMap[(uint8)col[3]]; + col[1] = _amigaColorMap[(uint8)col[1]]; + col[3] = _amigaColorMap[(uint8)col[3]]; } _vm->txt()->printMessage(col); @@ -549,6 +548,7 @@ int EoBInfProcessor::oeob_printMessage_v1(int8 *data) { } int EoBInfProcessor::oeob_printMessage_v2(int8 *data) { + int8 *pos = data; uint16 str = READ_LE_UINT16(pos); pos += 2; @@ -556,6 +556,12 @@ int EoBInfProcessor::oeob_printMessage_v2(int8 *data) { pos += 2; int c = 0; + _vm->_dialogueFieldAmiga = true; + if (_vm->gameFlags().platform == Common::kPlatformAmiga) { + assert(col < 16); + col = _amigaColorMap[col]; + } + if (_activeCharacter == -1) { c = _vm->rollDice(1, 6, -1); while (!_vm->testCharacter(c, 3)) @@ -1633,6 +1639,10 @@ int EoBInfProcessor::oeob_specialEvent(int8 *data) { return pos - data; } +const uint8 EoBInfProcessor::_amigaColorMap[16] = { + 0x00, 0x06, 0x1d, 0x1b, 0x1a, 0x17, 0x18, 0x0e, 0x19, 0x1c, 0x1c, 0x1e, 0x13, 0x0a, 0x11, 0x1f +}; + } // End of namespace Kyra #endif // ENABLE_EOB diff --git a/engines/kyra/script/script_eob.h b/engines/kyra/script/script_eob.h index b996e314d5..67d2fffe38 100644 --- a/engines/kyra/script/script_eob.h +++ b/engines/kyra/script/script_eob.h @@ -121,6 +121,8 @@ private: int8 _activeCharacter; + static const uint8 _amigaColorMap[16]; + const int _commandMin; }; |