diff options
author | Florian Kagerer | 2009-09-26 18:25:36 +0000 |
---|---|---|
committer | Florian Kagerer | 2009-09-26 18:25:36 +0000 |
commit | 5d17bae1208012d3f8213ac43d10481a6776c2f7 (patch) | |
tree | 3e59807a5c1a916f5cb94196f25f464f26fe7e9b /engines/kyra | |
parent | eb24b8e4552bd1459d5340514593fab78ddcb58e (diff) | |
download | scummvm-rg350-5d17bae1208012d3f8213ac43d10481a6776c2f7.tar.gz scummvm-rg350-5d17bae1208012d3f8213ac43d10481a6776c2f7.tar.bz2 scummvm-rg350-5d17bae1208012d3f8213ac43d10481a6776c2f7.zip |
LOL/PC-98: more fixes for text displayer and character inventory
svn-id: r44380
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/gui_lol.cpp | 45 | ||||
-rw-r--r-- | engines/kyra/lol.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/screen_lol.cpp | 21 | ||||
-rw-r--r-- | engines/kyra/script_lol.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/script_tim.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/text_lol.cpp | 5 |
6 files changed, 55 insertions, 28 deletions
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp index da4f84519b..1518ba2e4b 100644 --- a/engines/kyra/gui_lol.cpp +++ b/engines/kyra/gui_lol.cpp @@ -165,14 +165,17 @@ void LoLEngine::gui_displayCharInventory(int charNum) { _screen->copyRegion(80, 143, 80, 143, 232, 35, 0, 2); gui_drawAllCharPortraitsWithStats(); - _screen->fprintString("%s", 157, 9, 254, 0, 5, l->name); + if (_flags.use16ColorMode) + _screen->fprintString("%s", 156, 8, 0xe1, 0, 1, l->name); + else + _screen->fprintString("%s", 157, 9, 254, 0, 5, l->name); gui_printCharInventoryStats(charNum); for (int i = 0; i < 11; i++) gui_drawCharInventoryItem(i); - _screen->fprintString("%s", 182, 103, 172, 0, 5, getLangString(0x4033)); + _screen->fprintString("%s", 182, 103, _flags.use16ColorMode ? 0xbb : 172, 0, 5, getLangString(0x4033)); static const uint16 statusFlags[] = { 0x0080, 0x0000, 0x1000, 0x0002, 0x100, 0x0001, 0x0000, 0x0000 }; @@ -203,8 +206,11 @@ void LoLEngine::gui_displayCharInventory(int charNum) { if (c && !b) b = 1; } - - gui_drawBarGraph(154, 64 + i * 10, 34, 5, b, e, 132, 0); + + if (_flags.use16ColorMode) + gui_drawBarGraph(154, 66 + i * 8, 34, 5, b, e, 0x88, 0); + else + gui_drawBarGraph(154, 64 + i * 10, 34, 5, b, e, 132, 0); } _screen->drawClippedLine(14, 120, 194, 120, 1); @@ -229,23 +235,38 @@ void LoLEngine::gui_printCharacterStats(int index, int redraw, int value) { if (index < 2) { // might // protection - y = index * 10 + 22; - col = 158; - if (redraw) - _screen->fprintString("%s", offs + 108, y, col, 0, 4, getLangString(0x4014 + index)); + if (_flags.use16ColorMode) { + y = (index + 2) << 3; + col = 0xa1; + if (redraw) + _screen->fprintString("%s", offs + 108, y, col, 0, 0, getLangString(0x4014 + index)); + } else { + y = index * 10 + 22; + col = 158; + if (redraw) + _screen->fprintString("%s", offs + 108, y, col, 0, 4, getLangString(0x4014 + index)); + } } else { //skills int s = index - 2; y = s * 10 + 62; - col = _characters[_selectedCharacter].flags & (0x200 << s) ? 254 : 180; - if (redraw) - _screen->fprintString("%s", offs + 108, y, col, 0, 4, getLangString(0x4014 + index)); + if (_flags.use16ColorMode) { + y = (s + 8) << 3; + col = _characters[_selectedCharacter].flags & (0x200 << s) ? 0xe1 : 0x81; + if (redraw) + _screen->fprintString("%s", offs + 108, y, col, 0, 0, getLangString(0x4014 + index)); + } else { + y = s * 10 + 62; + col = _characters[_selectedCharacter].flags & (0x200 << s) ? 254 : 180; + if (redraw) + _screen->fprintString("%s", offs + 108, y, col, 0, 4, getLangString(0x4014 + index)); + } } if (offs) _screen->copyRegion(294, y, 182 + offs, y, 18, 8, 6, _screen->_curPage, Screen::CR_NO_P_CHECK); - _screen->fprintString("%d", 200 + offs, y, col, 0, 6, value); + _screen->fprintString("%d", 200 + offs, y, col, 0, _flags.use16ColorMode ? 2 : 6, value); } void LoLEngine::gui_changeCharacterStats(int charNum) { diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 82447a4836..704413288e 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -1578,7 +1578,7 @@ void LoLEngine::initDialogueSequence(int controlMode, int pageNum) { gui_drawBox(1, 130, 318, 69, 136, 251, 252); } - _screen->modifyScreenDim(5, 8, 131, 304, 66); + _screen->modifyScreenDim(5, 8, 131, 306, 66); _screen->modifyScreenDim(4, 1, 133, 38, 60); _txt->clearDim(4); @@ -1623,7 +1623,7 @@ void LoLEngine::restoreAfterDialogueSequence(int controlMode) { _updateFlags &= 0xfffd; } else { const ScreenDim *d = _screen->getScreenDim(5); - _screen->fillRect(d->sx, d->sy, d->sx + d->w - 2, d->sy + d->h - 2, d->unkA); + _screen->fillRect(d->sx, d->sy, d->sx + d->w - (_flags.use16ColorMode ? 3 : 2), d->sy + d->h - 2, d->unkA); _txt->clearDim(4); _txt->setupField(false); } diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp index f8ccb3727c..6ad1b86e47 100644 --- a/engines/kyra/screen_lol.cpp +++ b/engines/kyra/screen_lol.cpp @@ -108,14 +108,21 @@ void Screen_LoL::fprintString(const char *format, int x, int y, uint8 col1, uint if (flags & 2) x -= getTextWidth(string); - if (flags & 4) { - printText(string, x - 1, y, 1, col2); - printText(string, x, y + 1, 1, col2); - } + if (_use16ColorMode) { + if (flags & 12) { + printText(string, x - 1, y, 0x44, col2); + printText(string, x, y + 1, 0x44, col2); + } + } else { + if (flags & 4) { + printText(string, x - 1, y, 1, col2); + printText(string, x, y + 1, 1, col2); + } - if (flags & 8) { - printText(string, x - 1, y, 227, col2); - printText(string, x, y + 1, 227, col2); + if (flags & 8) { + printText(string, x - 1, y, 227, col2); + printText(string, x, y + 1, 227, col2); + } } printText(string, x, y, col1, col2); diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp index 09d84a87ce..43b386123b 100644 --- a/engines/kyra/script_lol.cpp +++ b/engines/kyra/script_lol.cpp @@ -580,7 +580,7 @@ int LoLEngine::olol_clearDialogueField(EMCState *script) { _screen->setScreenDim(5); const ScreenDim *d = _screen->getScreenDim(5); - _screen->fillRect(d->sx, d->sy, d->sx + d->w - 2, d->sy + d->h - 2, d->unkA); + _screen->fillRect(d->sx, d->sy, d->sx + d->w - (_flags.use16ColorMode ? 3 : 2), d->sy + d->h - 2, d->unkA); _txt->clearDim(4); _txt->resetDimTextPositions(4); @@ -616,7 +616,7 @@ int LoLEngine::olol_fadePalette(EMCState *script) { } int LoLEngine::olol_loadBitmap(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_clearDialogueField(%p) (%s, %d)", (const void *)script, stackPosString(0), stackPos(1)); + debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_loadBitmap(%p) (%s, %d)", (const void *)script, stackPosString(0), stackPos(1)); _screen->loadBitmap(stackPosString(0), 3, 3, &_screen->getPalette(3)); if (stackPos(1) != 2) _screen->copyPage(3, stackPos(1)); @@ -2540,7 +2540,7 @@ int LoLEngine::tlol_clearTextField(const TIM *tim, const uint16 *param) { return 1; _screen->setScreenDim(5); const ScreenDim *d = _screen->_curDim; - _screen->fillRect(d->sx, d->sy, d->sx + d->w - 2, d->sy + d->h - 2, d->unkA); + _screen->fillRect(d->sx, d->sy, d->sx + d->w - (_flags.use16ColorMode ? 3 : 2), d->sy + d->h - 2, d->unkA); _txt->clearDim(4); _txt->resetDimTextPositions(4); return 1; diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp index a48fce883f..6ccbacc537 100644 --- a/engines/kyra/script_tim.cpp +++ b/engines/kyra/script_tim.cpp @@ -1288,7 +1288,7 @@ uint16 TIMInterpreter_LoL::processDialogue() { _screen->fillRect(d->sx, d->sy + d->h - 9, d->sx + d->w - 1, d->sy + d->h - 1, d->unkA); } else { const ScreenDim *d = _screen->_curDim; - _screen->fillRect(d->sx, d->sy, d->sx + d->w - 2, d->sy + d->h - 1, d->unkA); + _screen->fillRect(d->sx, d->sy, d->sx + d->w - (_vm->gameFlags().use16ColorMode ? 3 : 2), d->sy + d->h - 1, d->unkA); _vm->_txt->clearDim(4); _vm->_txt->resetDimTextPositions(4); } diff --git a/engines/kyra/text_lol.cpp b/engines/kyra/text_lol.cpp index 732f97f749..384681987b 100644 --- a/engines/kyra/text_lol.cpp +++ b/engines/kyra/text_lol.cpp @@ -787,12 +787,11 @@ void TextDisplayer_LoL::textPageBreak() { void TextDisplayer_LoL::clearCurDim() { int d = _screen->curDimIndex(); - const ScreenDim *tmp = _screen->getScreenDim(_screen->curDimIndex()); + const ScreenDim *tmp = _screen->getScreenDim(d); if (_vm->gameFlags().use16ColorMode) { _screen->fillRect(tmp->sx << 3, tmp->sy, ((tmp->sx + tmp->w) << 3) - 2, (tmp->sy + tmp->h) - 2, _textDimData[d].color2); - } else { + } else _screen->fillRect(tmp->sx << 3, tmp->sy, ((tmp->sx + tmp->w) << 3) - 1, (tmp->sy + tmp->h) - 1, _textDimData[d].color2); - } _lineCount = 0; _textDimData[d].column = _textDimData[d].line = 0; |