aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Kagerer2009-09-30 20:42:58 +0000
committerFlorian Kagerer2009-09-30 20:42:58 +0000
commit94572773d0567151627e87fcd5f3cba8420321cb (patch)
treea02e4fe3bde70f435be951a3ecef6c49b462706d
parenta5d1094daba6dd0f9df42d7b0307a05d78fdaa36 (diff)
downloadscummvm-rg350-94572773d0567151627e87fcd5f3cba8420321cb.tar.gz
scummvm-rg350-94572773d0567151627e87fcd5f3cba8420321cb.tar.bz2
scummvm-rg350-94572773d0567151627e87fcd5f3cba8420321cb.zip
LOL/PC-98: - fix spell effect colors
- fix some font color glitches svn-id: r44498
-rw-r--r--engines/kyra/gui_lol.cpp20
-rw-r--r--engines/kyra/lol.cpp14
2 files changed, 31 insertions, 3 deletions
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index 632d4c38b3..e98f2a6049 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -266,7 +266,14 @@ void LoLEngine::gui_printCharacterStats(int index, int redraw, int value) {
if (offs)
_screen->copyRegion(294, y, 182 + offs, y, 18, 8, 6, _screen->_curPage, Screen::CR_NO_P_CHECK);
+ Screen::FontId of;
+ if (_flags.use16ColorMode)
+ of = _screen->setFont(Screen::FID_SJIS_FNT);
+
_screen->fprintString("%d", 200 + offs, y, col, 0, _flags.use16ColorMode ? 2 : 6, value);
+
+ if (_flags.use16ColorMode)
+ _screen->setFont(of);
}
void LoLEngine::gui_changeCharacterStats(int charNum) {
@@ -2465,7 +2472,10 @@ int GUI_LoL::runMenu(Menu &menu) {
int my = d->sy - 1;
int mw = (d->w << 3) + 1;
int mh = d->h + 1;
- _screen->drawShadedBox(mx, my, mx + mw, my + mh, 227, 223);
+ if (_vm->gameFlags().use16ColorMode)
+ _screen->drawShadedBox(mx, my, mx + mw, my + mh, 0xdd, 0xff);
+ else
+ _screen->drawShadedBox(mx, my, mx + mw, my + mh, 227, 223);
int pg = _screen->setCurPage(0);
_vm->_txt->clearDim(8);
textCursorTimer = 0;
@@ -2581,7 +2591,13 @@ void GUI_LoL::setupSavegameNames(Menu &menu, int num) {
}
void GUI_LoL::printMenuText(const char *str, int x, int y, uint8 c0, uint8 c1, uint8 flags, Screen::FontId font) {
- _screen->fprintString("%s", x, y, c0, c1, _vm->gameFlags().use16ColorMode ? flags & 3 : flags, str);
+ if (_vm->gameFlags().use16ColorMode) {
+ Screen::FontId of = _screen->setFont(Screen::FID_SJIS_FNT);
+ _screen->fprintString("%s", x, y, c0, c1, flags & 3, str);
+ _screen->setFont(of);
+ } else {
+ _screen->fprintString("%s", x, y, c0, c1, flags, str);
+ }
}
int GUI_LoL::getMenuCenterStringX(const char *str, int x1, int x2) {
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index 704413288e..c28ea6a35c 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -1754,10 +1754,22 @@ void LoLEngine::createGfxTables() {
if (_flags.isTalkie || _loadSuppFilesFlag)
return;
+ Palette tpal(256);
if (_flags.use16ColorMode) {
+ static const uint8 colTbl[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F };
+ uint8 *p = _screen->getPalette(0).getData();
+
+ tpal.fill(0, 256, 0xff);
+ uint8 *d = tpal.getData();
+ for (int i = 15; i >= 0; i--) {
+ d[colTbl[i] * 3 + 2] = p[i * 3 + 2];
+ d[colTbl[i] * 3 + 1] = p[i * 3 + 1];
+ d[colTbl[i] * 3] = p[i * 3];
+ }
+
+ _screen->generateTruelightTables(colTbl, 16, tpal, tpal, _trueLightTable1, _trueLightTable2, 80);
_screen->loadPalette("lol.nol", _screen->getPalette(0));
} else {
- Palette tpal(256);
_screen->loadPalette("fxpal.col", tpal);
_screen->loadBitmap("fxpal.shp", 3, 3, 0);
const uint8 *shpPal = _screen->getPtrToShape(_screen->getCPagePtr(2), 0) + 11;