diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/engine/eobcommon.cpp | 9 | ||||
-rw-r--r-- | engines/kyra/engine/kyra_rpg.cpp | 1 | ||||
-rw-r--r-- | engines/kyra/engine/kyra_rpg.h | 1 | ||||
-rw-r--r-- | engines/kyra/resource/staticres_eob.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/script/script_eob.cpp | 16 | ||||
-rw-r--r-- | engines/kyra/script/script_eob.h | 2 | ||||
-rw-r--r-- | engines/kyra/text/text_rpg.cpp | 24 |
7 files changed, 40 insertions, 15 deletions
diff --git a/engines/kyra/engine/eobcommon.cpp b/engines/kyra/engine/eobcommon.cpp index 798bfb6a93..6990427f52 100644 --- a/engines/kyra/engine/eobcommon.cpp +++ b/engines/kyra/engine/eobcommon.cpp @@ -1588,7 +1588,6 @@ void EoBCoreEngine::initDialogueSequence() { _npcSequenceSub = -1; _txt->setWaitButtonMode(0); _dialogueField = true; - _dialogueLastBitmap[0] = 0; _txt->resetPageBreakString(); @@ -1618,7 +1617,7 @@ void EoBCoreEngine::initDialogueSequence() { void EoBCoreEngine::restoreAfterDialogueSequence() { _txt->allowPageBreak(false); - _dialogueField = false; + _dialogueField = _dialogueFieldAmiga = false; _dialogueLastBitmap[0] = 0; @@ -1850,9 +1849,13 @@ void EoBCoreEngine::displayParchment(int id) { } else { // display bitmap - id = -id - 1; static const uint8 x[] = { 0, 20, 0 }; static const uint8 y[] = { 0, 0, 96 }; + id = -id - 1; + + if (_flags.platform == Common::kPlatformAmiga) + _txt->setupField(9, 0); + drawSequenceBitmap("MAP", 0, x[id], y[id], 0); removeInputTop(); diff --git a/engines/kyra/engine/kyra_rpg.cpp b/engines/kyra/engine/kyra_rpg.cpp index 616402445d..a2f0460a45 100644 --- a/engines/kyra/engine/kyra_rpg.cpp +++ b/engines/kyra/engine/kyra_rpg.cpp @@ -120,6 +120,7 @@ KyraRpgEngine::KyraRpgEngine(OSystem *system, const GameFlags &flags) : KyraEngi memset(_lvlTempData, 0, sizeof(_lvlTempData)); _dialogueField = false; + _dialogueFieldAmiga = true; _environmentSfx = _environmentSfxVol = _envSfxDistThreshold = 0; _monsterStepCounter = _monsterStepMode = 0; diff --git a/engines/kyra/engine/kyra_rpg.h b/engines/kyra/engine/kyra_rpg.h index a6625e169e..af1d27f993 100644 --- a/engines/kyra/engine/kyra_rpg.h +++ b/engines/kyra/engine/kyra_rpg.h @@ -367,6 +367,7 @@ protected: virtual TextDisplayer_rpg *txt() { return _txt; } bool _dialogueField; + bool _dialogueFieldAmiga; const char *_dialogueButtonString[9]; const uint16 *_dialogueButtonPosX; diff --git a/engines/kyra/resource/staticres_eob.cpp b/engines/kyra/resource/staticres_eob.cpp index 20497d05a8..90a8b904e4 100644 --- a/engines/kyra/resource/staticres_eob.cpp +++ b/engines/kyra/resource/staticres_eob.cpp @@ -1419,7 +1419,7 @@ const KyraRpgGUISettings DarkMoonEngine::_guiSettingsDOS = { }; const KyraRpgGUISettings DarkMoonEngine::_guiSettingsAmiga = { - { 28, 31, 95, 9, 7, { 285, 139 }, { 189, 162 }, { 31, 31 } }, + { 28, 31, 95, 9, 7, { 221, 76 }, { 189, 162 }, { 95, 95 } }, { 18, 17, 10, 17, 11, 10, 12, 25, 18, 9, 10, 18, 9, 10, 31, 24, 25, 28, 29, 7, 26, 27, 19 } }; 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; }; diff --git a/engines/kyra/text/text_rpg.cpp b/engines/kyra/text/text_rpg.cpp index 6f1ed2a9e7..f9d2a42472 100644 --- a/engines/kyra/text/text_rpg.cpp +++ b/engines/kyra/text/text_rpg.cpp @@ -37,6 +37,10 @@ TextDisplayer_rpg::TextDisplayer_rpg(KyraRpgEngine *engine, Screen *scr) : _vm(e _lineCount(0), _printFlag(false), _lineWidth(0), _numCharsTotal(0), _allowPageBreak(true), _numCharsLeft(0), _numCharsPrinted(0), _sjisTextModeLineBreak(false), _waitButtonMode(1) { + static const uint8 amigaColorMap[16] = { + 0x00, 0x06, 0x1d, 0x1b, 0x1a, 0x17, 0x18, 0x0e, 0x19, 0x1c, 0x1c, 0x1e, 0x13, 0x0a, 0x11, 0x1f + }; + _dialogueBuffer = new char[kEoBTextBufferSize]; memset(_dialogueBuffer, 0, kEoBTextBufferSize); @@ -48,14 +52,8 @@ TextDisplayer_rpg::TextDisplayer_rpg(KyraRpgEngine *engine, Screen *scr) : _vm(e for (int i = 0; i < 256; ++i) _colorMap[i] = i; - if (_vm->game() != GI_LOL) { - _colorMap[15] = _vm->guiSettings()->colors.guiColorWhite; - _colorMap[6] = _vm->guiSettings()->colors.guiColorLightRed; - _colorMap[8] = _vm->guiSettings()->colors.guiColorDarkRed; - _colorMap[9] = _vm->guiSettings()->colors.guiColorLightBlue; - _colorMap[2] = _vm->guiSettings()->colors.guiColorBlue; - _colorMap[12] = _vm->guiSettings()->colors.guiColorBlack; - } + if (_vm->gameFlags().platform == Common::kPlatformAmiga) + memcpy(_colorMap, amigaColorMap, 16); for (int i = 0; i < _screen->screenDimTableCount(); i++) { const ScreenDim *d = _screen->getScreenDim(i); @@ -94,6 +92,8 @@ void TextDisplayer_rpg::setupField(int dim, bool mode) { } else { resetDimTextPositions(dim); } + + _vm->_dialogueFieldAmiga = false; } void TextDisplayer_rpg::resetDimTextPositions(int dim) { @@ -189,11 +189,17 @@ void TextDisplayer_rpg::displayText(char *str, ...) { case 1: printLine(_currentLine); _textDimData[sdx].color2 = parseCommand(); + // EOB II Amiga does not use a color table here. EOB I doesn't do any color mapping here. + /*if (_vm->gameFlags().platform == Common::kPlatformAmiga) + _textDimData[sdx].color2 = _colorMap[_textDimData[sdx].color2];*/ break; case 5: printLine(_currentLine); _textDimData[sdx].color1 = parseCommand(); + // EOB I doesn't do any color mapping here. + if (_vm->gameFlags().platform == Common::kPlatformAmiga && _vm->game() == GI_EOB2) + _textDimData[sdx].color1 = _colorMap[_textDimData[sdx].color1]; break; case 8: @@ -531,6 +537,8 @@ void TextDisplayer_rpg::printDialogueText(int stringId, const char *pageBreakStr resetPageBreakString(); } } + + _vm->_dialogueFieldAmiga = true; } void TextDisplayer_rpg::printDialogueText(const char *str, bool wait) { |