aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorathrxx2011-12-27 16:42:05 +0100
committerathrxx2011-12-28 00:01:27 +0100
commit37c046339dfc70f29c163457c72158e02a6c1cdb (patch)
treee4a0f11b2b222902ae703ef163482ab86b5a33e1
parent4fef4743fd5a2000a96c55c7b961d60e53562504 (diff)
downloadscummvm-rg350-37c046339dfc70f29c163457c72158e02a6c1cdb.tar.gz
scummvm-rg350-37c046339dfc70f29c163457c72158e02a6c1cdb.tar.bz2
scummvm-rg350-37c046339dfc70f29c163457c72158e02a6c1cdb.zip
KYRA: (EOB) - cleanup dialog settings a bit
-rw-r--r--engines/kyra/chargen.cpp12
-rw-r--r--engines/kyra/darkmoon.cpp29
-rw-r--r--engines/kyra/darkmoon.h4
-rw-r--r--engines/kyra/eob.cpp32
-rw-r--r--engines/kyra/eob.h4
-rw-r--r--engines/kyra/eobcommon.cpp23
-rw-r--r--engines/kyra/eobcommon.h12
-rw-r--r--engines/kyra/gui_eob.cpp130
-rw-r--r--engines/kyra/kyra_rpg.cpp23
-rw-r--r--engines/kyra/kyra_rpg.h51
-rw-r--r--engines/kyra/lol.cpp16
-rw-r--r--engines/kyra/lol.h4
-rw-r--r--engines/kyra/sequences_eob.cpp2
-rw-r--r--engines/kyra/staticres_eob.cpp10
-rw-r--r--engines/kyra/staticres_lol.cpp5
-rw-r--r--engines/kyra/text_rpg.cpp42
16 files changed, 191 insertions, 208 deletions
diff --git a/engines/kyra/chargen.cpp b/engines/kyra/chargen.cpp
index e4b89c9a99..50153d7de3 100644
--- a/engines/kyra/chargen.cpp
+++ b/engines/kyra/chargen.cpp
@@ -1616,15 +1616,15 @@ int TransferPartyWiz::selectCharactersMenu() {
_screen->setFont(Screen::FID_6_FNT);
_screen->clearCurPage();
- _vm->gui_drawBox(0, 0, 320, 163, _vm->_color1_1, _vm->_color2_1, _vm->_bkgColor_1);
+ _vm->gui_drawBox(0, 0, 320, 163, _vm->guiSettings()->colors.frame1, _vm->guiSettings()->colors.frame2, _vm->guiSettings()->colors.fill);
_screen->printText(_strings2[0], 5, 3, 15, 0);
_screen->printText(_strings2[1], 5, 10, 15, 0);
for (int i = 0; i < 6; i++)
drawCharPortraitWithStats(i, 0);
- _vm->gui_drawBox(4, 148, 43, 12, _vm->_color1_1, _vm->_color2_1, _vm->_bkgColor_1);
- _vm->gui_drawBox(272, 148, 43, 12, _vm->_color1_1, _vm->_color2_1, _vm->_bkgColor_1);
+ _vm->gui_drawBox(4, 148, 43, 12, _vm->guiSettings()->colors.frame1, _vm->guiSettings()->colors.frame2, _vm->guiSettings()->colors.fill);
+ _vm->gui_drawBox(272, 148, 43, 12, _vm->guiSettings()->colors.frame1, _vm->guiSettings()->colors.frame2, _vm->guiSettings()->colors.fill);
_screen->printShadedText(_labels[0], 9, 151, 15, 0);
_screen->printShadedText(_labels[1], 288, 151, 15, 0);
@@ -1686,10 +1686,10 @@ int TransferPartyWiz::selectCharactersMenu() {
}
int x = (highlight - 6) * 268 + 4;
- _vm->gui_drawBox(x, 148, 43, 12, _vm->_bkgColor_1, _vm->_bkgColor_1, -1);
+ _vm->gui_drawBox(x, 148, 43, 12, _vm->guiSettings()->colors.fill, _vm->guiSettings()->colors.fill, -1);
_screen->updateScreen();
_vm->_system->delayMillis(80);
- _vm->gui_drawBox(x, 148, 43, 12, _vm->_color1_1, _vm->_color2_1, -1);
+ _vm->gui_drawBox(x, 148, 43, 12, _vm->guiSettings()->colors.frame1, _vm->guiSettings()->colors.frame2, -1);
_screen->updateScreen();
if (highlight == 6 || _vm->shouldQuit()) {
@@ -1726,7 +1726,7 @@ void TransferPartyWiz::drawCharPortraitWithStats(int charIndex, bool enabled) {
EoBCharacter *c = &_vm->_characters[charIndex];
_screen->fillRect(x + 4, y + 24, x + 36, y + 57, 12);
- _vm->gui_drawBox(x + 40, y + 24, 118, 34, _vm->_color1_1, _vm->_color2_1, _vm->_bkgColor_1);
+ _vm->gui_drawBox(x + 40, y + 24, 118, 34, _vm->guiSettings()->colors.frame1, _vm->guiSettings()->colors.frame2, _vm->guiSettings()->colors.fill);
if (!(c->flags & 1))
return;
diff --git a/engines/kyra/darkmoon.cpp b/engines/kyra/darkmoon.cpp
index 304e5c9537..c12ef1050a 100644
--- a/engines/kyra/darkmoon.cpp
+++ b/engines/kyra/darkmoon.cpp
@@ -58,31 +58,6 @@ Common::Error DarkMoonEngine::init() {
_monsterProps = new EoBMonsterProperty[10];
- static const uint16 wX[] = { 221, 76 };
- static const uint8 wY[] = { 189, 162 };
- static const uint16 wW[] = { 95, 95 };
-
- _dialogueButtonLabelCol1 = 9;
- _dialogueButtonLabelCol2 = 15;
- _dialogueButtonW = 95;
- _dialogueButtonH = 9;
- _waitButtonPresX = wX;
- _waitButtonPresY = wY;
- _waitButtonPresW = wW;
- _waitButtonReverveW = 7;
-
- _bkgColor_1 = 183;
- _color1_1 = 186;
- _color2_1 = 181;
- _color4 = 133;
- _color5 = 184;
- _color6 = 183;
- _color7 = 181;
- _color8 = 186;
- _color12 = 180;
- _color13 = 177;
- _color14 = 182;
-
return Common::kNoError;
}
@@ -475,6 +450,10 @@ void DarkMoonEngine::characterLevelGain(int charIndex) {
}
}
+const KyraRpgGUISettings *DarkMoonEngine::guiSettings() {
+ return &_guiSettings;
+}
+
} // End of namespace Kyra
#endif // ENABLE_EOB
diff --git a/engines/kyra/darkmoon.h b/engines/kyra/darkmoon.h
index 590b2f4ea1..8abbc2bea2 100644
--- a/engines/kyra/darkmoon.h
+++ b/engines/kyra/darkmoon.h
@@ -128,8 +128,12 @@ private:
int charSelectDialogue();
void characterLevelGain(int charIndex);
+ const KyraRpgGUISettings *guiSettings();
+
const char *const *_hornStrings;
const uint8 *_hornSounds;
+
+ static const KyraRpgGUISettings _guiSettings;
};
} // End of namespace Kyra
diff --git a/engines/kyra/eob.cpp b/engines/kyra/eob.cpp
index 96eb388699..7524b077ff 100644
--- a/engines/kyra/eob.cpp
+++ b/engines/kyra/eob.cpp
@@ -61,32 +61,6 @@ Common::Error EoBEngine::init() {
_itemsOverlay = _res->fileData("ITEMRMP.VGA", 0);
- static const uint16 wX[] = { 285, 139 };
- static const uint8 wY[] = { 189, 162 };
- static const uint16 wW[] = { 31, 31 };
-
- _dialogueButtonLabelCol1 = 9;
- _dialogueButtonLabelCol2 = 15;
- _dialogueButtonW = 95;
- _dialogueButtonH = 9;
- _waitButtonPresX = wX;
- _waitButtonPresY = wY;
- _waitButtonPresW = wW;
- _waitButtonReverveW = 7;
-
- _bkgColor_1 = 132;
- _color1_1 = 135;
- _color2_1 = 130;
- _color4 = 133;
- _color5 = 133;
- _color6 = 180;
- _color7 = 177;
- _color8 = 184;
-
- _color14 = _color8;
- _color13 = _color7;
- _color12 = _color6;
-
_screen->modifyScreenDim(7, 0x01, 0xB3, 0x22, 0x12);
_screen->modifyScreenDim(9, 0x01, 0x7D, 0x26, 0x3F);
_screen->modifyScreenDim(12, 0x01, 0x04, 0x14, 0xA0);
@@ -520,7 +494,7 @@ void EoBEngine::turnUndeadAutoHit() {
bool EoBEngine::checkPartyStatusExtra() {
_screen->copyPage(0, 10);
int cd = _screen->curDimIndex();
- gui_drawBox(0, 121, 320, 80, _color1_1, _color2_1, _bkgColor_1);
+ gui_drawBox(0, 121, 320, 80, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
_txt->setupField(9, false);
_txt->printMessage(_menuStringsDefeat[0]);
while (!shouldQuit()) {
@@ -573,6 +547,10 @@ void EoBEngine::healParty() {
}
}
+const KyraRpgGUISettings *EoBEngine::guiSettings() {
+ return &_guiSettings;
+}
+
} // End of namespace Kyra
#endif // ENABLE_EOB
diff --git a/engines/kyra/eob.h b/engines/kyra/eob.h
index 0f83c47b03..6123c26726 100644
--- a/engines/kyra/eob.h
+++ b/engines/kyra/eob.h
@@ -139,6 +139,10 @@ private:
bool checkPartyStatusExtra();
int resurrectionSelectDialogue();
void healParty();
+
+ const KyraRpgGUISettings *guiSettings();
+
+ static const KyraRpgGUISettings _guiSettings;
};
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp
index 8e14b895a0..bc01fead6b 100644
--- a/engines/kyra/eobcommon.cpp
+++ b/engines/kyra/eobcommon.cpp
@@ -107,11 +107,6 @@ EoBCoreEngine::EoBCoreEngine(OSystem *system, const GameFlags &flags)
_dscDoorY1 = 0;
_dscDoorXE = 0;
- _color9 = 17;
- _color10 = 23;
- _color11 = 20;
- _color4 = _color5 = _color6 = _color7 = _color8 = _color12 = _color13 = _color14 = 0;
-
_menuDefs = 0;
_exchangeCharacterId = -1;
@@ -1106,7 +1101,7 @@ void EoBCoreEngine::npcSequence(int npcIndex) {
_screen->loadFileDataToPage(s, 5, 32000);
delete s;
- gui_drawBox(0, 121, 320, 79, _color1_1, _color2_1, _bkgColor_1);
+ gui_drawBox(0, 121, 320, 79, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
_txt->setupField(9, true);
_txt->resetPageBreakString();
@@ -1544,7 +1539,7 @@ void EoBCoreEngine::displayParchment(int id) {
// display text
Common::SeekableReadStream *s = _res->createReadStream("TEXT.DAT");
_screen->loadFileDataToPage(s, 5, 32000);
- gui_drawBox(0, 0, 176, 175, _color1_1, _color2_1, _bkgColor_1);
+ gui_drawBox(0, 0, 176, 175, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
_txt->setupField(12, 1);
if (_flags.gameID == GI_EOB2)
id++;
@@ -1686,21 +1681,21 @@ bool EoBCoreEngine::checkPassword() {
_screen->copyPage(0, 10);
_screen->setScreenDim(13);
- gui_drawBox(_screen->_curDim->sx << 3, _screen->_curDim->sy, _screen->_curDim->w << 3, _screen->_curDim->h, _color1_1, _color2_1, -1);
- gui_drawBox((_screen->_curDim->sx << 3) + 1, _screen->_curDim->sy + 1, (_screen->_curDim->w << 3) - 2, _screen->_curDim->h - 2, _color1_1, _color2_1, _bkgColor_1);
+ gui_drawBox(_screen->_curDim->sx << 3, _screen->_curDim->sy, _screen->_curDim->w << 3, _screen->_curDim->h, guiSettings()->colors.frame1, guiSettings()->colors.frame2, -1);
+ gui_drawBox((_screen->_curDim->sx << 3) + 1, _screen->_curDim->sy + 1, (_screen->_curDim->w << 3) - 2, _screen->_curDim->h - 2, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
_screen->modifyScreenDim(13, _screen->_curDim->sx + 1, _screen->_curDim->sy + 2, _screen->_curDim->w - 2, _screen->_curDim->h - 16);
for (int i = 0; i < 3; i++) {
- _screen->fillRect(_screen->_curDim->sx << 3, _screen->_curDim->sy, ((_screen->_curDim->sx + _screen->_curDim->w) << 3) - 1, (_screen->_curDim->sy + _screen->_curDim->h) - 1, _bkgColor_1);
+ _screen->fillRect(_screen->_curDim->sx << 3, _screen->_curDim->sy, ((_screen->_curDim->sx + _screen->_curDim->w) << 3) - 1, (_screen->_curDim->sy + _screen->_curDim->h) - 1, guiSettings()->colors.fill);
int c = rollDice(1, _mnNumWord - 1, -1);
const uint8 *shp = (_mnDef[c << 2] < _numLargeItemShapes) ? _largeItemShapes[_mnDef[c << 2]] : (_mnDef[c << 2] < 15 ? 0 : _smallItemShapes[_mnDef[c << 2] - 15]);
assert(shp);
_screen->drawShape(0, shp, 100, 2, 13);
- _screen->printShadedText(Common::String::format(_mnPrompt[0], _mnDef[(c << 2) + 1], _mnDef[(c << 2) + 2]).c_str(), (_screen->_curDim->sx + 1) << 3, _screen->_curDim->sy, _screen->_curDim->unk8, _bkgColor_1);
+ _screen->printShadedText(Common::String::format(_mnPrompt[0], _mnDef[(c << 2) + 1], _mnDef[(c << 2) + 2]).c_str(), (_screen->_curDim->sx + 1) << 3, _screen->_curDim->sy, _screen->_curDim->unk8, guiSettings()->colors.fill);
memset(answ, 0, 20);
- gui_drawBox(76, 100, 133, 14, _color2_1, _color1_1, -1);
- gui_drawBox(77, 101, 131, 12, _color2_1, _color1_1, -1);
- if (_gui->getTextInput(answ, 10, 103, 15, _screen->_curDim->unk8, _bkgColor_1, 8) < 0)
+ gui_drawBox(76, 100, 133, 14, guiSettings()->colors.frame2, guiSettings()->colors.frame1, -1);
+ gui_drawBox(77, 101, 131, 12, guiSettings()->colors.frame2, guiSettings()->colors.frame1, -1);
+ if (_gui->getTextInput(answ, 10, 103, 15, _screen->_curDim->unk8, guiSettings()->colors.fill, 8) < 0)
i = 3;
if (!scumm_stricmp(_mnWord[c], answ))
break;
diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h
index fa65c93a4e..9284a181b4 100644
--- a/engines/kyra/eobcommon.h
+++ b/engines/kyra/eobcommon.h
@@ -764,18 +764,6 @@ protected:
char _dialogueLastBitmap[13];
int _moveCounter;
- uint8 _color4;
- uint8 _color5;
- uint8 _color6;
- uint8 _color7;
- uint8 _color8;
- uint8 _color9;
- uint8 _color10;
- uint8 _color11;
- uint8 _color12;
- uint8 _color13;
- uint8 _color14;
-
const char *const *_chargenStatStrings;
const char *const *_chargenRaceSexStrings;
const char *const *_chargenClassStrings;
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index 51a9e52266..1ccb60ada1 100644
--- a/engines/kyra/gui_eob.cpp
+++ b/engines/kyra/gui_eob.cpp
@@ -100,9 +100,9 @@ void EoBCoreEngine::gui_drawCharPortraitWithStats(int index) {
int cp = _screen->setCurPage(2);
if (index == _exchangeCharacterId)
- _screen->printText(_characterGuiStringsSt[0], x2 + 2, y2 + 2, 8, _bkgColor_1);
+ _screen->printText(_characterGuiStringsSt[0], x2 + 2, y2 + 2, 8, guiSettings()->colors.fill);
else
- _screen->printText(c->name, x2 + 2, y2 + 2, txtCol1, _bkgColor_1);
+ _screen->printText(c->name, x2 + 2, y2 + 2, txtCol1, guiSettings()->colors.fill);
gui_drawFaceShape(index);
gui_drawWeaponSlot(index, 0);
@@ -129,23 +129,23 @@ void EoBCoreEngine::gui_drawCharPortraitWithStats(int index) {
_screen->copyRegion(176, 0, 0, 0, 144, 168, 2, 2, Screen::CR_NO_P_CHECK);
_screen->_curPage = 2;
gui_drawFaceShape(index);
- _screen->printShadedText(c->name, 219, 6, txtCol2, _bkgColor_1);
+ _screen->printShadedText(c->name, 219, 6, txtCol2, guiSettings()->colors.fill);
gui_drawHitpoints(index);
gui_drawFoodStatusGraph(index);
if (_currentControlMode == 1) {
if (c->hitPointsCur == -10)
- _screen->printShadedText(_characterGuiStringsSt[1], 247, 158, 6, _color6);
+ _screen->printShadedText(_characterGuiStringsSt[1], 247, 158, 6, guiSettings()->colors.extraFill);
else if (c->hitPointsCur < 1)
- _screen->printShadedText(_characterGuiStringsSt[2], 226, 158, 6, _color6);
+ _screen->printShadedText(_characterGuiStringsSt[2], 226, 158, 6, guiSettings()->colors.extraFill);
else if (c->effectFlags & (_flags.gameID == GI_EOB1 ? 0x80 : 0x2000))
- _screen->printShadedText(_characterGuiStringsSt[3], 220, 158, 6, _color6);
+ _screen->printShadedText(_characterGuiStringsSt[3], 220, 158, 6, guiSettings()->colors.extraFill);
else if (c->flags & 2)
- _screen->printShadedText(_characterGuiStringsSt[4], 235, 158, 6, _color6);
+ _screen->printShadedText(_characterGuiStringsSt[4], 235, 158, 6, guiSettings()->colors.extraFill);
else if (c->flags & 4)
- _screen->printShadedText(_characterGuiStringsSt[5], 232, 158, 6, _color6);
+ _screen->printShadedText(_characterGuiStringsSt[5], 232, 158, 6, guiSettings()->colors.extraFill);
else if (c->flags & 8)
- _screen->printShadedText(_characterGuiStringsSt[6], 232, 158, 6, _color6);
+ _screen->printShadedText(_characterGuiStringsSt[6], 232, 158, 6, guiSettings()->colors.extraFill);
for (int i = 0; i < 27; i++)
gui_drawInventoryItem(i, 0, 2);
@@ -158,38 +158,38 @@ void EoBCoreEngine::gui_drawCharPortraitWithStats(int index) {
static const uint16 cm2Y2[] = { 165, 165, 147 };
for (int i = 0; i < 3; i++)
- _screen->fillRect(cm2X1[i], cm2Y1[i], cm2X2[i], cm2Y2[i], _color6);
+ _screen->fillRect(cm2X1[i], cm2Y1[i], cm2X2[i], cm2Y2[i], guiSettings()->colors.extraFill);
- _screen->printShadedText(_characterGuiStringsIn[0], 183, 42, 15, _color6);
- _screen->printText(_chargenClassStrings[c->cClass], 183, 55, 12, _color6);
- _screen->printText(_chargenAlignmentStrings[c->alignment], 183, 62, 12, _color6);
- _screen->printText(_chargenRaceSexStrings[c->raceSex], 183, 69, 12, _color6);
+ _screen->printShadedText(_characterGuiStringsIn[0], 183, 42, 15, guiSettings()->colors.extraFill);
+ _screen->printText(_chargenClassStrings[c->cClass], 183, 55, 12, guiSettings()->colors.extraFill);
+ _screen->printText(_chargenAlignmentStrings[c->alignment], 183, 62, 12, guiSettings()->colors.extraFill);
+ _screen->printText(_chargenRaceSexStrings[c->raceSex], 183, 69, 12, guiSettings()->colors.extraFill);
for (int i = 0; i < 6; i++)
- _screen->printText(_chargenStatStrings[6 + i], 183, 82 + i * 7, 12, _color6);
+ _screen->printText(_chargenStatStrings[6 + i], 183, 82 + i * 7, 12, guiSettings()->colors.extraFill);
- _screen->printText(_characterGuiStringsIn[1], 183, 124, 12, _color6);
- _screen->printText(_characterGuiStringsIn[2], 239, 138, 12, _color6);
- _screen->printText(_characterGuiStringsIn[3], 278, 138, 12, _color6);
+ _screen->printText(_characterGuiStringsIn[1], 183, 124, 12, guiSettings()->colors.extraFill);
+ _screen->printText(_characterGuiStringsIn[2], 239, 138, 12, guiSettings()->colors.extraFill);
+ _screen->printText(_characterGuiStringsIn[3], 278, 138, 12, guiSettings()->colors.extraFill);
- _screen->printText(getCharStrength(c->strengthCur, c->strengthExtCur).c_str(), 275, 82, 15, _color6);
- _screen->printText(Common::String::format("%d", c->intelligenceCur).c_str(), 275, 89, 15, _color6);
- _screen->printText(Common::String::format("%d", c->wisdomCur).c_str(), 275, 96, 15, _color6);
- _screen->printText(Common::String::format("%d", c->dexterityCur).c_str(), 275, 103, 15, _color6);
- _screen->printText(Common::String::format("%d", c->constitutionCur).c_str(), 275, 110, 15, _color6);
- _screen->printText(Common::String::format("%d", c->charismaCur).c_str(), 275, 117, 15, _color6);
- _screen->printText(Common::String::format("%d", c->armorClass).c_str(), 275, 124, 15, _color6);
+ _screen->printText(getCharStrength(c->strengthCur, c->strengthExtCur).c_str(), 275, 82, 15, guiSettings()->colors.extraFill);
+ _screen->printText(Common::String::format("%d", c->intelligenceCur).c_str(), 275, 89, 15, guiSettings()->colors.extraFill);
+ _screen->printText(Common::String::format("%d", c->wisdomCur).c_str(), 275, 96, 15, guiSettings()->colors.extraFill);
+ _screen->printText(Common::String::format("%d", c->dexterityCur).c_str(), 275, 103, 15, guiSettings()->colors.extraFill);
+ _screen->printText(Common::String::format("%d", c->constitutionCur).c_str(), 275, 110, 15, guiSettings()->colors.extraFill);
+ _screen->printText(Common::String::format("%d", c->charismaCur).c_str(), 275, 117, 15, guiSettings()->colors.extraFill);
+ _screen->printText(Common::String::format("%d", c->armorClass).c_str(), 275, 124, 15, guiSettings()->colors.extraFill);
for (int i = 0; i < 3; i++) {
int t = getCharacterClassType(c->cClass, i);
if (t == -1)
continue;
- _screen->printText(_chargenClassStrings[t + 15], 180, 145 + 7 * i, 12, _color6);
+ _screen->printText(_chargenClassStrings[t + 15], 180, 145 + 7 * i, 12, guiSettings()->colors.extraFill);
Common::String tmpStr = Common::String::format("%d", c->experience[i]);
- _screen->printText(tmpStr.c_str(), 251 - tmpStr.size() * 3, 145 + 7 * i, 15, _color6);
+ _screen->printText(tmpStr.c_str(), 251 - tmpStr.size() * 3, 145 + 7 * i, 15, guiSettings()->colors.extraFill);
tmpStr = Common::String::format("%d", c->level[i]);
- _screen->printText(tmpStr.c_str(), 286 - tmpStr.size() * 3, 145 + 7 * i, 15, _color6);
+ _screen->printText(tmpStr.c_str(), 286 - tmpStr.size() * 3, 145 + 7 * i, 15, guiSettings()->colors.extraFill);
}
}
@@ -272,7 +272,7 @@ void EoBCoreEngine::gui_drawWeaponSlot(int charIndex, int slot) {
x += 176;
int itm = _characters[charIndex].inventory[slot];
- gui_drawBox(x, y, 31, 16, _color1_1, _color2_1, _bkgColor_1);
+ gui_drawBox(x, y, 31, 16, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
if (_characters[charIndex].slotStatus[slot]) {
gui_drawWeaponSlotStatus(x, y, _characters[charIndex].slotStatus[slot]);
@@ -297,7 +297,7 @@ void EoBCoreEngine::gui_drawWeaponSlotStatus(int x, int y, int status) {
if (status > -3 || status == -5)
_screen->drawShape(_screen->_curPage, _greenSplatShape, x - 1, y, 0);
else
- gui_drawBox(x, y, 31, 16, _color9, _color10, _color11);
+ gui_drawBox(x, y, 31, 16, guiSettings()->colors.warningFrame1, guiSettings()->colors.warningFrame2, guiSettings()->colors.warningFill);
switch (status + 5) {
case 0:
@@ -369,7 +369,7 @@ void EoBCoreEngine::gui_drawHitpoints(int index) {
_screen->printText(_characterGuiStringsHp[0], x - 13, y - 1, 12, 0);
- gui_drawHorizontalBarGraph(x, y, w, h, bgCur, bgMax, barColor[col], _color5);
+ gui_drawHorizontalBarGraph(x, y, w, h, bgCur, bgMax, barColor[col], guiSettings()->colors.barGraph);
} else {
Common::String tmpString = Common::String::format(_characterGuiStringsHp[1], c->hitPointsCur, c->hitPointsMax);
@@ -379,7 +379,7 @@ void EoBCoreEngine::gui_drawHitpoints(int index) {
y -= 1;
}
- _screen->printText(tmpString.c_str(), x, y, 12, _bkgColor_1);
+ _screen->printText(tmpString.c_str(), x, y, 12, guiSettings()->colors.fill);
}
}
@@ -398,11 +398,11 @@ void EoBCoreEngine::gui_drawFoodStatusGraph(int index) {
return;
uint8 col = c->food < 20 ? 8 : (c->food < 33 ? 5 : 3);
- gui_drawHorizontalBarGraph(250, 25, 51, 5, c->food, 100, col, _color5);
+ gui_drawHorizontalBarGraph(250, 25, 51, 5, c->food, 100, col, guiSettings()->colors.barGraph);
}
void EoBCoreEngine::gui_drawHorizontalBarGraph(int x, int y, int w, int h, int32 curVal, int32 maxVal, int col1, int col2) {
- gui_drawBox(x - 1, y - 1, w + 3, h + 2, _color2_1, _color1_1, -1);
+ gui_drawBox(x - 1, y - 1, w + 3, h + 2, guiSettings()->colors.frame2, guiSettings()->colors.frame1, -1);
KyraRpgEngine::gui_drawHorizontalBarGraph(x, y, w + 2, h, curVal, maxVal, col1, col2);
}
@@ -464,8 +464,8 @@ void EoBCoreEngine::gui_drawCharPortraitStatusFrame(int index) {
}
} else {
- _screen->drawClippedLine(x, y, x + 62, y, _color1_1);
- _screen->drawClippedLine(x, y + 49, x + 62, y + 49, _color2_1);
+ _screen->drawClippedLine(x, y, x + 62, y, guiSettings()->colors.frame1);
+ _screen->drawClippedLine(x, y + 49, x + 62, y + 49, guiSettings()->colors.frame2);
_screen->drawClippedLine(x - 1, y, x - 1, y + 50, 12);
_screen->drawClippedLine(x + 63, y, x + 63, y + 50, 12);
}
@@ -480,7 +480,7 @@ void EoBCoreEngine::gui_drawInventoryItem(int slot, int special, int pageNum) {
if (special) {
int wh = (slot == 25 || slot == 26) ? 10 : 18;
- gui_drawBox(x - 1, y - 1, wh, wh, _color1_1, _color2_1, slot == 16 ? -1 : _bkgColor_1);
+ gui_drawBox(x - 1, y - 1, wh, wh, guiSettings()->colors.frame1, guiSettings()->colors.frame2, slot == 16 ? -1 : guiSettings()->colors.fill);
if (slot == 16) {
_screen->fillRect(227, 65, 238, 69, 12);
@@ -517,7 +517,7 @@ void EoBCoreEngine::gui_drawCompass(bool force) {
}
void EoBCoreEngine::gui_drawDialogueBox() {
- gui_drawBox(0, 121, 320, 79, _color1_1, _color2_1, _bkgColor_1);
+ gui_drawBox(0, 121, 320, 79, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
txt()->clearCurDim();
}
@@ -527,14 +527,14 @@ void EoBCoreEngine::gui_drawSpellbook() {
_screen->copyRegion(64, 121, 64, 121, 112, 56, 0, 2, Screen::CR_NO_P_CHECK);
for (int i = 0; i < numTab; i++) {
- int col1 = _color14;
- int col2 = _color13;
- int col3 = _color12;
+ int col1 = guiSettings()->colors.inactiveTabFrame1;
+ int col2 = guiSettings()->colors.inactiveTabFrame2;
+ int col3 = guiSettings()->colors.inactiveTabFill;
if (i == _openBookSpellLevel) {
- col1 = _color1_1;
- col2 = _color2_1;
- col3 = _bkgColor_1;
+ col1 = guiSettings()->colors.frame1;
+ col2 = guiSettings()->colors.frame2;
+ col3 = guiSettings()->colors.fill;
}
if (_flags.gameID == GI_EOB1) {
@@ -547,12 +547,12 @@ void EoBCoreEngine::gui_drawSpellbook() {
}
if (_flags.gameID == GI_EOB1)
- gui_drawBox(71, 131, 105, 44, _color1_1, _color2_1, _bkgColor_1);
+ gui_drawBox(71, 131, 105, 44, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
else {
- gui_drawBox(68, 130, 108, 47, _color1_1, _color2_1, _bkgColor_1);
- gui_drawBox(68, 168, 78, 9, _color8, _color7, _color6);
- gui_drawBox(146, 168, 14, 9, _color8, _color7, _color6);
- gui_drawBox(160, 168, 16, 9, _color8, _color7, _color6);
+ gui_drawBox(68, 130, 108, 47, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
+ gui_drawBox(68, 168, 78, 9, guiSettings()->colors.extraFrame1, guiSettings()->colors.extraFrame2, guiSettings()->colors.extraFill);
+ gui_drawBox(146, 168, 14, 9, guiSettings()->colors.extraFrame1, guiSettings()->colors.extraFrame2, guiSettings()->colors.extraFill);
+ gui_drawBox(160, 168, 16, 9, guiSettings()->colors.extraFrame1, guiSettings()->colors.extraFrame2, guiSettings()->colors.extraFill);
gui_drawSpellbookScrollArrow(150, 169, 0);
gui_drawSpellbookScrollArrow(165, 169, 1);
}
@@ -562,14 +562,14 @@ void EoBCoreEngine::gui_drawSpellbook() {
int textXa = 74;
int textXs = 71;
int textY = 170;
- int col3 = _bkgColor_1;
- int col4 = _color6;
+ int col3 = guiSettings()->colors.fill;
+ int col4 = guiSettings()->colors.extraFill;
if (_flags.gameID == GI_EOB1) {
textCol2 = 11;
textXa = textXs = 73;
textY = 168;
- col4 = _bkgColor_1;
+ col4 = guiSettings()->colors.fill;
}
for (int i = 0; i < 7; i++) {
@@ -2377,7 +2377,7 @@ void GUI_EoB::messageDialogue2(int dim, int id, int buttonTextCol) {
}
}
- _vm->gui_drawBox(x, y, w, 14, _vm->_color2_1, _vm->_bkgColor_1, -1);
+ _vm->gui_drawBox(x, y, w, 14, _vm->guiSettings()->colors.frame2, _vm->guiSettings()->colors.fill, -1);
_screen->updateScreen();
_vm->_system->delayMillis(80);
drawMenuButtonBox(x, y, w, 14, false, false);
@@ -2657,7 +2657,7 @@ bool GUI_EoB::runSaveMenu(int x, int y) {
int fy = y + slot * 17 + 23;
for (int in = -1; in == -1 && !_vm->shouldQuit();) {
- _screen->fillRect(fx - 2, fy, fx + 160, fy + 8, _vm->_bkgColor_1);
+ _screen->fillRect(fx - 2, fy, fx + 160, fy + 8, _vm->guiSettings()->colors.fill);
in = getTextInput(_saveSlotStringsTemp[slot], x + 1, fy, 19, 2, 0, 8);
if (!strlen(_saveSlotStringsTemp[slot])) {
messageDialogue(11, 54, 6);
@@ -2665,7 +2665,7 @@ bool GUI_EoB::runSaveMenu(int x, int y) {
}
};
- _screen->fillRect(fx - 2, fy, fx + 160, fy + 8, _vm->_bkgColor_1);
+ _screen->fillRect(fx - 2, fy, fx + 160, fy + 8, _vm->guiSettings()->colors.fill);
_screen->printShadedText(_saveSlotStringsTemp[slot], (x + 1) << 3, fy, 15, 0);
Graphics::Surface thumb;
@@ -2778,7 +2778,7 @@ int GUI_EoB::selectSaveSlotDialogue(int x, int y, int id) {
// Display highlighted slot index in the bottom left corner to avoid people getting lost with the 990 save slots
_screen->setFont(Screen::FID_6_FNT);
int sli = (newHighlight == 6) ? _savegameOffset : (_savegameOffset + newHighlight);
- _screen->printText(Common::String::format("%03d/989", sli).c_str(), _saveSlotX + 5, _saveSlotY + 135, _vm->_color2_1, _vm->_bkgColor_1);
+ _screen->printText(Common::String::format("%03d/989", sli).c_str(), _saveSlotX + 5, _saveSlotY + 135, _vm->guiSettings()->colors.frame2, _vm->guiSettings()->colors.fill);
_screen->setFont(Screen::FID_8_FNT);
_screen->updateScreen();
@@ -2937,7 +2937,7 @@ void GUI_EoB::runMemorizePrayMenu(int charIndex, int spellType) {
if (updateDesc) {
updateDesc = false;
- _screen->printShadedText(Common::String::format(_vm->_menuStringsMgc[1], np[lastHighLightButton] - numAssignedSpellsPerBookPage[lastHighLightButton], np[lastHighLightButton]).c_str(), 8, 38, 9, _vm->_bkgColor_1);
+ _screen->printShadedText(Common::String::format(_vm->_menuStringsMgc[1], np[lastHighLightButton] - numAssignedSpellsPerBookPage[lastHighLightButton], np[lastHighLightButton]).c_str(), 8, 38, 9, _vm->guiSettings()->colors.fill);
}
if (newHighLightText < 0)
@@ -3721,7 +3721,7 @@ Button *GUI_EoB::initMenu(int id) {
if (m->dim) {
const ScreenDim *dm = _screen->getScreenDim(m->dim);
- _screen->fillRect(dm->sx << 3, dm->sy, ((dm->sx + dm->w) << 3) - 1, (dm->sy + dm->h) - 1, _vm->_bkgColor_1);
+ _screen->fillRect(dm->sx << 3, dm->sy, ((dm->sx + dm->w) << 3) - 1, (dm->sy + dm->h) - 1, _vm->guiSettings()->colors.fill);
_screen->setScreenDim(m->dim);
drawMenuButtonBox(dm->sx << 3, dm->sy, dm->w << 3, dm->h, false, false);
}
@@ -3789,14 +3789,14 @@ void GUI_EoB::drawMenuButton(Button *b, bool clicked, bool highlight, bool noFil
}
void GUI_EoB::drawMenuButtonBox(int x, int y, int w, int h, bool clicked, bool noFill) {
- uint8 col1 = _vm->_color1_1;
- uint8 col2 = _vm->_color2_1;
+ uint8 col1 = _vm->guiSettings()->colors.frame1;
+ uint8 col2 = _vm->guiSettings()->colors.frame2;
if (clicked)
- col1 = col2 = _vm->_bkgColor_1;
+ col1 = col2 = _vm->guiSettings()->colors.fill;
_vm->gui_drawBox(x, y, w, h, col1, col2, -1);
- _vm->gui_drawBox(x + 1, y + 1, w - 2, h - 2, _vm->_color1_1, _vm->_color2_1, noFill ? -1 : _vm->_bkgColor_1);
+ _vm->gui_drawBox(x + 1, y + 1, w - 2, h - 2, _vm->guiSettings()->colors.frame1, _vm->guiSettings()->colors.frame2, noFill ? -1 : _vm->guiSettings()->colors.fill);
}
void GUI_EoB::drawTextBox(int dim, int id) {
@@ -3852,10 +3852,10 @@ void GUI_EoB::memorizePrayMenuPrintString(int spellId, int bookPageIndex, int sp
if (noFill)
_screen->printText(s.c_str(), 8, y, highLight ? 6 : 15, 0);
else
- _screen->printShadedText(s.c_str(), 8, y, highLight ? 6 : 15, _vm->_bkgColor_1);
+ _screen->printShadedText(s.c_str(), 8, y, highLight ? 6 : 15, _vm->guiSettings()->colors.fill);
} else {
- _screen->fillRect(6, y, 168, y + 8, _vm->_bkgColor_1);
+ _screen->fillRect(6, y, 168, y + 8, _vm->guiSettings()->colors.fill);
}
}
@@ -4000,7 +4000,7 @@ void GUI_EoB::restParty_updateRestTime(int hours, bool init) {
}
_screen->setCurPage(2);
- _screen->printShadedText(Common::String::format(_vm->_menuStringsRest2[3], hours).c_str(), (_screen->_curDim->sx + 1) << 3, _screen->_curDim->sy + 20, 15, _vm->_bkgColor_1);
+ _screen->printShadedText(Common::String::format(_vm->_menuStringsRest2[3], hours).c_str(), (_screen->_curDim->sx + 1) << 3, _screen->_curDim->sy + 20, 15, _vm->guiSettings()->colors.fill);
_screen->setCurPage(0);
_screen->copyRegion(((_screen->_curDim->sx + 1) << 3) - 1, _screen->_curDim->sy + 20, ((_screen->_curDim->sx + 1) << 3) - 1, _screen->_curDim->sy + 20, 144, 8, 2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
diff --git a/engines/kyra/kyra_rpg.cpp b/engines/kyra/kyra_rpg.cpp
index 92aa12bc7a..4487290bf9 100644
--- a/engines/kyra/kyra_rpg.cpp
+++ b/engines/kyra/kyra_rpg.cpp
@@ -103,15 +103,6 @@ KyraRpgEngine::KyraRpgEngine(OSystem *system, const GameFlags &flags) : KyraEngi
_dialogueNumButtons = _dialogueButtonYoffs = _dialogueHighlightedButton = 0;
_currentControlMode = 0;
_specialSceneFlag = 0;
- _dialogueButtonLabelCol1 = 0;
- _dialogueButtonLabelCol2 = 0;
- _dialogueButtonW = 0;
- _dialogueButtonH = 0;
- _waitButtonPresX = 0;
- _waitButtonPresY = 0;
- _waitButtonPresW = 0;
- _waitButtonReverveW = 0;
-
_updateCharNum = -1;
_activeVoiceFileTotalTime = 0;
_updatePortraitSpeechAnimDuration = _resetPortraitAfterSpeechAnim = _needSceneRestore = 0;
@@ -193,6 +184,10 @@ Common::Error KyraRpgEngine::init() {
_envSfxDistThreshold = (_sound->getSfxType() == Sound::kAdLib || _sound->getSfxType() == Sound::kPCSpkr) ? 15 : 3;
+ _dialogueButtonLabelColor1 = guiSettings()->buttons.labelColor1;
+ _dialogueButtonLabelColor2 = guiSettings()->buttons.labelColor2;
+ _dialogueButtonWidth = guiSettings()->buttons.width;
+
return Common::kNoError;
}
@@ -213,9 +208,9 @@ void KyraRpgEngine::drawDialogueButtons() {
screen()->printText(_dialogueButtonString[i], (x + 37 - (screen()->getTextWidth(_dialogueButtonString[i])) / 2) & ~3,
((_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2) & ~7, _dialogueHighlightedButton == i ? 0xc1 : 0xe1, 0);
} else {
- gui_drawBox(x, (_dialogueButtonYoffs + _dialogueButtonPosY[i]), _dialogueButtonW, _dialogueButtonH, _color1_1, _color2_1, _bkgColor_1);
- screen()->printText(_dialogueButtonString[i], x + (_dialogueButtonW >> 1) - (screen()->getTextWidth(_dialogueButtonString[i])) / 2,
- (_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2, _dialogueHighlightedButton == i ? _dialogueButtonLabelCol1 : _dialogueButtonLabelCol2, 0);
+ gui_drawBox(x, (_dialogueButtonYoffs + _dialogueButtonPosY[i]), _dialogueButtonWidth, guiSettings()->buttons.height, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
+ screen()->printText(_dialogueButtonString[i], x + (_dialogueButtonWidth >> 1) - (screen()->getTextWidth(_dialogueButtonString[i])) / 2,
+ (_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2, _dialogueHighlightedButton == i ? _dialogueButtonLabelColor1 : _dialogueButtonLabelColor2, 0);
}
}
screen()->setFont(of);
@@ -230,7 +225,7 @@ uint16 KyraRpgEngine::processDialogue() {
int x = _dialogueButtonPosX[i];
int y = (gameFlags().use16ColorMode ? ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) & ~7) - 1 : (_dialogueButtonYoffs + _dialogueButtonPosY[i]));
Common::Point p = getMousePos();
- if (posWithinRect(p.x, p.y, x, y, x + _dialogueButtonW, y + _dialogueButtonH)) {
+ if (posWithinRect(p.x, p.y, x, y, x + _dialogueButtonWidth, y + guiSettings()->buttons.height)) {
_dialogueHighlightedButton = i;
break;
}
@@ -266,7 +261,7 @@ uint16 KyraRpgEngine::processDialogue() {
int x = _dialogueButtonPosX[i];
int y = (gameFlags().use16ColorMode ? ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) & ~7) - 1 : (_dialogueButtonYoffs + _dialogueButtonPosY[i]));
Common::Point p = getMousePos();
- if (posWithinRect(p.x, p.y, x, y, x + _dialogueButtonW, y + _dialogueButtonH)) {
+ if (posWithinRect(p.x, p.y, x, y, x + _dialogueButtonWidth, y + guiSettings()->buttons.height)) {
_dialogueHighlightedButton = i;
res = _dialogueHighlightedButton + 1;
break;
diff --git a/engines/kyra/kyra_rpg.h b/engines/kyra/kyra_rpg.h
index 678f8120b5..24c19105d9 100644
--- a/engines/kyra/kyra_rpg.h
+++ b/engines/kyra/kyra_rpg.h
@@ -80,6 +80,40 @@ struct EoBFlyingObject {
uint8 unused;
};
+struct KyraRpgGUISettings {
+ struct DialogueButtons {
+ uint8 labelColor1;
+ uint8 labelColor2;
+ uint16 width;
+ uint16 height;
+ int waitReserve;
+ const uint16 waitX[2];
+ const uint8 waitY[2];
+ const uint16 waitWidth[2];
+ } buttons;
+
+ struct Colors {
+ uint8 frame1;
+ uint8 frame2;
+ int fill;
+
+ uint8 unused;
+ uint8 barGraph;
+
+ uint8 warningFrame1;
+ uint8 warningFrame2;
+ int warningFill;
+
+ uint8 extraFrame1;
+ uint8 extraFrame2;
+ int extraFill;
+
+ uint8 inactiveTabFrame1;
+ uint8 inactiveTabFrame2;
+ int inactiveTabFill;
+ } colors;
+};
+
class KyraRpgEngine : public KyraEngine_v1 {
friend class TextDisplayer_rpg;
public:
@@ -251,6 +285,8 @@ protected:
bool clickedShape(int shapeIndex);
+ virtual const KyraRpgGUISettings *guiSettings() = 0;
+
int _clickedShapeXOffs;
int _clickedShapeYOffs;
@@ -283,22 +319,13 @@ protected:
const uint16 *_dialogueButtonPosX;
const uint8 *_dialogueButtonPosY;
int16 _dialogueButtonYoffs;
- uint16 _dialogueButtonW;
- uint16 _dialogueButtonH;
- const uint16 *_waitButtonPresX;
- const uint8 *_waitButtonPresY;
- const uint16 *_waitButtonPresW;
- int _waitButtonReverveW;
+ uint16 _dialogueButtonWidth;
int _dialogueNumButtons;
int _dialogueHighlightedButton;
int _currentControlMode;
int _specialSceneFlag;
- uint8 _dialogueButtonLabelCol1;
- uint8 _dialogueButtonLabelCol2;
-
- int _bkgColor_1;
- uint8 _color1_1;
- uint8 _color2_1;
+ uint8 _dialogueButtonLabelColor1;
+ uint8 _dialogueButtonLabelColor2;
const char *const *_moreStrings;
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index 01b1bdf065..a57fe4fdb8 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -380,18 +380,8 @@ Common::Error LoLEngine::init() {
assert(_gui);
_gui->initStaticData();
- _dialogueButtonLabelCol1 = 144;
- _dialogueButtonLabelCol2 = 254;
- _dialogueButtonW = 74;
- _dialogueButtonH = 9;
- _waitButtonReverveW = 80;
-
_txt = new TextDisplayer_LoL(this, _screen);
- _bkgColor_1 = -1;
- _color1_1 = 136;
- _color2_1 = 251;
-
_screen->setAnimBlockPtr(10000);
_screen->setScreenDim(0);
@@ -1941,7 +1931,7 @@ void LoLEngine::setupDialogueButtons(int numStr, const char *s1, const char *s2,
_dialogueButtonPosY = posY;
if (numStr == 1) {
- posX[0] = posX[1] = posX[2] = d->sx + d->w - (_dialogueButtonW + 3);
+ posX[0] = posX[1] = posX[2] = d->sx + d->w - (_dialogueButtonWidth + 3);
} else {
int xOffs = d->w / numStr;
posX[0] = d->sx + (xOffs >> 1) - 37;
@@ -1989,6 +1979,10 @@ void LoLEngine::delay(uint32 millis, bool doUpdate, bool) {
}
}
+const KyraRpgGUISettings *LoLEngine::guiSettings() {
+ return &_guiSettings;
+}
+
// spells
int LoLEngine::castSpell(int charNum, int spellType, int spellLevel) {
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index eeaa1b51ad..c6d05c45d1 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -1149,6 +1149,8 @@ private:
// misc
void delay(uint32 millis, bool doUpdate = false, bool isMainLoop = false);
+ const KyraRpgGUISettings *guiSettings();
+
uint8 _compassBroken;
uint8 _drainMagic;
uint16 _globalScriptVars2[8];
@@ -1156,6 +1158,8 @@ private:
uint8 *_pageBuffer1;
uint8 *_pageBuffer2;
+ static const KyraRpgGUISettings _guiSettings;
+
// spells
typedef Common::Functor1Mem<ActiveSpell *, int, LoLEngine> SpellProc;
Common::Array<const SpellProc*> _spellProcs;
diff --git a/engines/kyra/sequences_eob.cpp b/engines/kyra/sequences_eob.cpp
index 8fdd8680b1..2d8e85471b 100644
--- a/engines/kyra/sequences_eob.cpp
+++ b/engines/kyra/sequences_eob.cpp
@@ -166,7 +166,7 @@ void EoBEngine::seq_playFinale() {
_txt->resetPageBreakString();
_txt->setWaitButtonMode(1);
_txt->setupField(12, true);
- gui_drawBox(0, 0, 176, 175, _color1_1, _color2_1, _bkgColor_1);
+ gui_drawBox(0, 0, 176, 175, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
_txt->printDialogueText(51, _moreStrings[0]);
if (!checkScriptFlags(0x1ffe)) {
diff --git a/engines/kyra/staticres_eob.cpp b/engines/kyra/staticres_eob.cpp
index d51bf4eee3..ce43d22362 100644
--- a/engines/kyra/staticres_eob.cpp
+++ b/engines/kyra/staticres_eob.cpp
@@ -1190,6 +1190,11 @@ void EoBEngine::initSpells() {
}
}
+const KyraRpgGUISettings EoBEngine::_guiSettings = {
+ { 9, 15, 95, 9, 7, { 285, 139 }, { 189, 162 }, { 31, 31 } },
+ { 135, 130, 132, 133, 133, 17, 23, 20, 184, 177, 180, 184, 177, 180 }
+};
+
void DarkMoonEngine::initStaticResource() {
int temp;
_mainMenuStrings = _staticres->loadStrings(kEoB2MainMenuStrings, temp);
@@ -1312,6 +1317,11 @@ const char *DarkMoonEngine::_palFilesFinale[] = {
0
};
+const KyraRpgGUISettings DarkMoonEngine::_guiSettings = {
+ { 9, 15, 95, 9, 7, { 221, 76 }, { 189, 162 }, { 95, 95 } },
+ { 186, 181, 183, 133, 184, 17, 23, 20, 186, 181, 183, 182, 177, 180 }
+};
+
#endif // ENABLE_EOB
} // End of namespace Kyra
diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp
index 3faef7b981..deb6355384 100644
--- a/engines/kyra/staticres_lol.cpp
+++ b/engines/kyra/staticres_lol.cpp
@@ -764,6 +764,11 @@ const int8 LoLEngine::_mapCoords[12][4] = {
{ 3, 1, 3, 1 }, { -1, 6, -1, -8 }, { -7, -1, 5, -1 }
};
+const KyraRpgGUISettings LoLEngine::_guiSettings = {
+ { 144, 254, 74, 9, 80, { 0, 0 }, { 0, 0 }, { 0, 0 } },
+ { 136, 251, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+};
+
const MistOfDoomAnimData LoLEngine::_mistAnimData[] = {
{ 0, 7, 7, 13, 155 },
{ 0, 16, 16, 17, 155 },
diff --git a/engines/kyra/text_rpg.cpp b/engines/kyra/text_rpg.cpp
index 78206d3a06..a78adb93d9 100644
--- a/engines/kyra/text_rpg.cpp
+++ b/engines/kyra/text_rpg.cpp
@@ -73,7 +73,7 @@ TextDisplayer_rpg::~TextDisplayer_rpg() {
void TextDisplayer_rpg::setupField(int dim, bool mode) {
setPageBreakFlag();
- _textDimData[dim].color2 = _vm->_bkgColor_1;
+ _textDimData[dim].color2 = _vm->guiSettings()->colors.fill;
_screen->setScreenDim(dim);
if (mode)
@@ -335,13 +335,13 @@ void TextDisplayer_rpg::printLine(char *str) {
if ((lw + _textDimData[sdx].column) > w) {
if ((lines - 1 - (_waitButtonSpace << 1)) <= _lineCount)
// cut off line to leave space for "MORE" button
- w -= vm()->_waitButtonReverveW;
+ w -= vm()->guiSettings()->buttons.waitReserve;
} else {
if (!_sjisLineBreakFlag || (_lineCount + 1 < lines - 1))
ct = false;
else
// cut off line to leave space for "MORE" button
- w -= vm()->_waitButtonReverveW;
+ w -= vm()->guiSettings()->buttons.waitReserve;
}
if (ct) {
@@ -363,7 +363,7 @@ void TextDisplayer_rpg::printLine(char *str) {
if ((lw + _textDimData[sdx].column) > w) {
if ((lines - 1) <= _lineCount && _allowPageBreak)
// cut off line to leave space for "MORE" button
- w -= vm()->_waitButtonReverveW;
+ w -= vm()->guiSettings()->buttons.waitReserve;
w -= _textDimData[sdx].column;
@@ -510,7 +510,7 @@ 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()->_bkgColor_1;
+ _textDimData[dim].color2 = vm()->game() == GI_LOL ? _screen->_curDim->unkA : vm()->guiSettings()->colors.fill;
clearCurDim();
return res;
}
@@ -529,7 +529,7 @@ void TextDisplayer_rpg::clearCurDim() {
void TextDisplayer_rpg::textPageBreak() {
if (vm()->game() != GI_LOL)
- SWAP(vm()->_dialogueButtonLabelCol1, vm()->_dialogueButtonLabelCol2);
+ SWAP(vm()->_dialogueButtonLabelColor1, vm()->_dialogueButtonLabelColor2);
int cp = _screen->setCurPage(0);
Screen::FontId cf = _screen->setFont(vm()->gameFlags().use16ColorMode ? Screen::FID_SJIS_FNT : Screen::FID_6_FNT);
@@ -555,9 +555,9 @@ void TextDisplayer_rpg::textPageBreak() {
const ScreenDim *dim = _screen->getScreenDim(_screen->curDimIndex());
- int x = ((dim->sx + dim->w) << 3) - (_vm->_dialogueButtonW + 3);
+ int x = ((dim->sx + dim->w) << 3) - (_vm->_dialogueButtonWidth + 3);
int y = 0;
- int w = vm()->_dialogueButtonW;
+ int w = vm()->_dialogueButtonWidth;
if (vm()->game() == GI_LOL) {
if (vm()->_needSceneRestore && (vm()->_updateFlags & 2)) {
@@ -571,17 +571,17 @@ void TextDisplayer_rpg::textPageBreak() {
y = dim->sy + dim->h - 10;
}
} else {
- y = vm()->_waitButtonPresY[_waitButtonMode];
- x = vm()->_waitButtonPresX[_waitButtonMode];
- w = vm()->_waitButtonPresW[_waitButtonMode];
+ y = vm()->guiSettings()->buttons.waitY[_waitButtonMode];
+ x = vm()->guiSettings()->buttons.waitX[_waitButtonMode];
+ w = vm()->guiSettings()->buttons.waitWidth[_waitButtonMode];
}
if (vm()->gameFlags().use16ColorMode) {
vm()->gui_drawBox(x + 8, (y & ~7) - 1, 66, 10, 0xee, 0xcc, -1);
_screen->printText(_pageBreakString, (x + 37 - (strlen(_pageBreakString) << 1) + 4) & ~3, (y + 2) & ~7, 0xc1, 0);
} else {
- vm()->gui_drawBox(x, y, w, vm()->_dialogueButtonH, vm()->_color1_1, vm()->_color2_1, vm()->_bkgColor_1);
- _screen->printText(_pageBreakString, x + (w >> 1) - (vm()->screen()->getTextWidth(_pageBreakString) >> 1), y + 2, vm()->_dialogueButtonLabelCol1, 0);
+ vm()->gui_drawBox(x, y, w, vm()->guiSettings()->buttons.height, vm()->guiSettings()->colors.frame1, vm()->guiSettings()->colors.frame2, vm()->guiSettings()->colors.fill);
+ _screen->printText(_pageBreakString, x + (w >> 1) - (vm()->screen()->getTextWidth(_pageBreakString) >> 1), y + 2, vm()->_dialogueButtonLabelColor1, 0);
}
vm()->removeInputTop();
@@ -650,7 +650,7 @@ void TextDisplayer_rpg::textPageBreak() {
_screen->setCurPage(cp);
if (vm()->game() != GI_LOL)
- SWAP(vm()->_dialogueButtonLabelCol1, vm()->_dialogueButtonLabelCol2);
+ SWAP(vm()->_dialogueButtonLabelColor1, vm()->_dialogueButtonLabelColor2);
vm()->removeInputTop();
}
@@ -662,12 +662,12 @@ void TextDisplayer_rpg::displayWaitButton() {
vm()->_dialogueButtonString[2] = 0;
vm()->_dialogueHighlightedButton = 0;
- vm()->_dialogueButtonPosX = &vm()->_waitButtonPresX[_waitButtonMode];
- vm()->_dialogueButtonPosY = &vm()->_waitButtonPresY[_waitButtonMode];
- vm()->_dialogueButtonW = vm()->_waitButtonPresW[_waitButtonMode];
+ vm()->_dialogueButtonPosX = &vm()->guiSettings()->buttons.waitX[_waitButtonMode];
+ vm()->_dialogueButtonPosY = &vm()->guiSettings()->buttons.waitY[_waitButtonMode];
+ vm()->_dialogueButtonWidth = vm()->guiSettings()->buttons.waitWidth[_waitButtonMode];
vm()->_dialogueButtonYoffs = 0;
- SWAP(vm()->_dialogueButtonLabelCol1, vm()->_dialogueButtonLabelCol2);
+ SWAP(vm()->_dialogueButtonLabelColor1, vm()->_dialogueButtonLabelColor2);
vm()->drawDialogueButtons();
if (!vm()->shouldQuit())
@@ -675,10 +675,10 @@ void TextDisplayer_rpg::displayWaitButton() {
while (!vm()->processDialogue() && !vm()->shouldQuit()) {}
- _screen->fillRect(vm()->_dialogueButtonPosX[0], vm()->_dialogueButtonPosY[0], vm()->_dialogueButtonPosX[0] + vm()->_dialogueButtonW - 1, vm()->_dialogueButtonPosY[0] + vm()->_dialogueButtonH - 1, vm()->_bkgColor_1);
+ _screen->fillRect(vm()->_dialogueButtonPosX[0], vm()->_dialogueButtonPosY[0], vm()->_dialogueButtonPosX[0] + vm()->_dialogueButtonWidth - 1, vm()->_dialogueButtonPosY[0] + vm()->guiSettings()->buttons.height - 1, vm()->guiSettings()->colors.fill);
_screen->updateScreen();
- vm()->_dialogueButtonW = 95;
- SWAP(vm()->_dialogueButtonLabelCol1, vm()->_dialogueButtonLabelCol2);
+ vm()->_dialogueButtonWidth = 95;
+ SWAP(vm()->_dialogueButtonLabelColor1, vm()->_dialogueButtonLabelColor2);
clearCurDim();
}