aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/text
diff options
context:
space:
mode:
authorathrxx2019-01-30 00:24:31 +0100
committerathrxx2019-03-06 20:48:21 +0100
commit7b8c84fa4d3f3d8e1c5fa543fae7ddbd7a495bb7 (patch)
treea4dd3631826170611174434f37d16d3fb5d0ea32 /engines/kyra/text
parente00eaa4899d86fb97c333d4b609de4612895ffea (diff)
downloadscummvm-rg350-7b8c84fa4d3f3d8e1c5fa543fae7ddbd7a495bb7.tar.gz
scummvm-rg350-7b8c84fa4d3f3d8e1c5fa543fae7ddbd7a495bb7.tar.bz2
scummvm-rg350-7b8c84fa4d3f3d8e1c5fa543fae7ddbd7a495bb7.zip
KYRA: (EOB1/Amiga) - fix chargen and gui colors
Diffstat (limited to 'engines/kyra/text')
-rw-r--r--engines/kyra/text/text_rpg.cpp20
-rw-r--r--engines/kyra/text/text_rpg.h5
2 files changed, 20 insertions, 5 deletions
diff --git a/engines/kyra/text/text_rpg.cpp b/engines/kyra/text/text_rpg.cpp
index 10e1a4409f..d865fc754c 100644
--- a/engines/kyra/text/text_rpg.cpp
+++ b/engines/kyra/text/text_rpg.cpp
@@ -45,10 +45,22 @@ TextDisplayer_rpg::TextDisplayer_rpg(KyraRpgEngine *engine, Screen *scr) : _vm(e
_textDimData = new TextDimData[_screen->screenDimTableCount()];
+ for (int i = 0; i < 256; ++i)
+ _colorMap[i] = i;
+
+ if (_vm->game() != GI_LOL) {
+ _colorMap[15] = _vm->guiSettings()->colors.menuTxtColWhite;
+ _colorMap[6] = _vm->guiSettings()->colors.menuTxtColLightRed;
+ _colorMap[8] = _vm->guiSettings()->colors.menuTxtColDarkRed;
+ _colorMap[9] = _vm->guiSettings()->colors.menuTxtColLightBlue;
+ _colorMap[2] = _vm->guiSettings()->colors.menuTxtColBlue;
+ _colorMap[12] = _vm->guiSettings()->colors.menuTxtColBlack;
+ }
+
for (int i = 0; i < _screen->screenDimTableCount(); i++) {
const ScreenDim *d = _screen->getScreenDim(i);
- _textDimData[i].color1 = d->unk8;
- _textDimData[i].color2 = d->unkA;
+ _textDimData[i].color1 = _colorMap[d->unk8];
+ _textDimData[i].color2 = _colorMap[d->unkA];
_textDimData[i].line = d->unkC;
_textDimData[i].column = d->unkE;
}
@@ -554,8 +566,8 @@ void TextDisplayer_rpg::printMessage(const char *str, int textColor, ...) {
int TextDisplayer_rpg::clearDim(int dim) {
int res = _screen->curDimIndex();
_screen->setScreenDim(dim);
- _textDimData[dim].color1 = _screen->_curDim->unk8;
- _textDimData[dim].color2 = _vm->game() == GI_LOL ? _screen->_curDim->unkA : _vm->guiSettings()->colors.fill;
+ _textDimData[dim].color1 = _colorMap[_screen->_curDim->unk8];
+ _textDimData[dim].color2 = (_vm->game() == GI_LOL || _vm->gameFlags().platform == Common::kPlatformAmiga) ? _colorMap[_screen->_curDim->unkA] : _vm->guiSettings()->colors.fill;
clearCurDim();
return res;
}
diff --git a/engines/kyra/text/text_rpg.h b/engines/kyra/text/text_rpg.h
index 30d3463726..7f5825f4bc 100644
--- a/engines/kyra/text/text_rpg.h
+++ b/engines/kyra/text/text_rpg.h
@@ -53,7 +53,8 @@ public:
void allowPageBreak(bool mode) { _allowPageBreak = mode; }
void setWaitButtonMode(int mode) { _waitButtonMode = mode; }
- int lineCount() { return _lineCount; }
+ int lineCount() const { return _lineCount; }
+ const uint8 *colorMap() const { return _colorMap; }
protected:
virtual KyraRpgEngine *vm() { return _vm; }
@@ -106,6 +107,8 @@ private:
char *_table1;
char *_table2;
+
+ uint8 _colorMap[256];
};
} // End of namespace Kyra