aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorathrxx2019-01-30 00:24:31 +0100
committerathrxx2019-03-06 20:48:21 +0100
commit7b8c84fa4d3f3d8e1c5fa543fae7ddbd7a495bb7 (patch)
treea4dd3631826170611174434f37d16d3fb5d0ea32
parente00eaa4899d86fb97c333d4b609de4612895ffea (diff)
downloadscummvm-rg350-7b8c84fa4d3f3d8e1c5fa543fae7ddbd7a495bb7.tar.gz
scummvm-rg350-7b8c84fa4d3f3d8e1c5fa543fae7ddbd7a495bb7.tar.bz2
scummvm-rg350-7b8c84fa4d3f3d8e1c5fa543fae7ddbd7a495bb7.zip
KYRA: (EOB1/Amiga) - fix chargen and gui colors
-rw-r--r--engines/kyra/engine/chargen.cpp87
-rw-r--r--engines/kyra/engine/darkmoon.cpp6
-rw-r--r--engines/kyra/engine/darkmoon.h2
-rw-r--r--engines/kyra/engine/eob.cpp9
-rw-r--r--engines/kyra/engine/eob.h3
-rw-r--r--engines/kyra/engine/eobcommon.cpp32
-rw-r--r--engines/kyra/engine/eobcommon.h2
-rw-r--r--engines/kyra/engine/kyra_rpg.h11
-rw-r--r--engines/kyra/engine/lol.cpp2
-rw-r--r--engines/kyra/engine/lol.h2
-rw-r--r--engines/kyra/graphics/screen_eob.cpp3
-rw-r--r--engines/kyra/gui/gui_eob.cpp219
-rw-r--r--engines/kyra/gui/gui_eob.h1
-rw-r--r--engines/kyra/resource/staticres_eob.cpp19
-rw-r--r--engines/kyra/resource/staticres_lol.cpp2
-rw-r--r--engines/kyra/script/script_eob.cpp15
-rw-r--r--engines/kyra/sequence/sequences_eob.cpp34
-rw-r--r--engines/kyra/text/text_rpg.cpp20
-rw-r--r--engines/kyra/text/text_rpg.h5
19 files changed, 291 insertions, 183 deletions
diff --git a/engines/kyra/engine/chargen.cpp b/engines/kyra/engine/chargen.cpp
index 5032e86376..14e72f832c 100644
--- a/engines/kyra/engine/chargen.cpp
+++ b/engines/kyra/engine/chargen.cpp
@@ -160,6 +160,8 @@ CharacterGenerator::CharacterGenerator(EoBCoreEngine *vm, Screen_EoB *screen) :
}
CharacterGenerator::~CharacterGenerator() {
+ _vm->_gui->updateBoxFrameHighLight(-1);
+
if (_chargenMagicShapes) {
for (int i = 0; i < 10; i++)
delete[] _chargenMagicShapes[i];
@@ -263,10 +265,6 @@ bool CharacterGenerator::start(EoBCharacter *characters, uint8 ***faceShapes) {
}
void CharacterGenerator::init() {
- /*_screen->loadEoBBitmap("MENU", 0, 3, 3, 2);
- Common::SeekableReadStream *s = _res->createReadStream("facedat.dmp");
- _screen->loadFileDataToPage(s, 2, 64000);*/
-
_screen->loadShapeSetBitmap("CHARGENA", 3, 3);
if (_faceShapes) {
for (int i = 0; i < 44; i++)
@@ -279,7 +277,14 @@ void CharacterGenerator::init() {
_faceShapes[i] = _screen->encodeShape((i % 10) << 2, (i / 10) << 5, 4, 32, true, _vm->_cgaMappingDefault);
_screen->_curPage = 0;
+ if (_vm->gameFlags().platform == Common::kPlatformAmiga)
+ _screen->fadeToBlack(32);
+
_screen->loadEoBBitmap("CHARGEN", _vm->_cgaMappingDefault, 3, 3, 0);
+
+ if (_vm->gameFlags().platform == Common::kPlatformAmiga)
+ _screen->fadeFromBlack(32);
+
_screen->loadShapeSetBitmap("CHARGENB", 3, 3);
if (_chargenMagicShapes) {
for (int i = 0; i < 10; i++)
@@ -352,7 +357,7 @@ void CharacterGenerator::checkForCompleteParty() {
_screen->copyRegion(0, 0, 160, 0, 160, 128, 2, 2, Screen::CR_NO_P_CHECK);
int cp = _screen->setCurPage(2);
int x = (_vm->gameFlags().platform == Common::kPlatformFMTowns) ? 184 : 168;
- _screen->printShadedText(_chargenStrings1[8], x, 16, 15, 0);
+ _screen->printShadedText(_chargenStrings1[8], x, 16, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->setCurPage(cp);
_screen->copyRegion(160, 0, 144, 64, 160, 128, 2, 0, Screen::CR_NO_P_CHECK);
@@ -364,7 +369,7 @@ void CharacterGenerator::checkForCompleteParty() {
if (numChars == 4) {
_screen->setCurPage(2);
- _screen->printShadedText(_chargenStrings1[0], x, 61, 15, 0);
+ _screen->printShadedText(_chargenStrings1[0], x, 61, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->setCurPage(0);
_screen->copyRegion(168, 61, 152, 125, 136, 40, 2, 0, Screen::CR_NO_P_CHECK);
toggleSpecialButton(15, 0, 0);
@@ -445,7 +450,7 @@ int CharacterGenerator::viewDeleteCharacter() {
if (_characters[_activeBox].name[0]) {
processSpecialButton(16);
_characters[_activeBox].name[0] = 0;
- processNameInput(_activeBox, 12);
+ processNameInput(_activeBox, _vm->guiSettings()->colors.menuTxtColBlack);
processFaceMenuSelection(_activeBox + 50);
}
} else {
@@ -506,10 +511,10 @@ void CharacterGenerator::createPartyMember() {
for (_characters[_activeBox].name[0] = 0; _characters[_activeBox].name[0] == 0 && !_vm->shouldQuit();) {
processFaceMenuSelection(_chargenMinStats[6]);
printStats(_activeBox, 0);
- _screen->printShadedText(_chargenStrings2[11], 149, 100, 9, 0);
+ _screen->printShadedText(_chargenStrings2[11], 149, 100, _vm->guiSettings()->colors.menuTxtColLightBlue, 0, _vm->guiSettings()->colors.menuTxtColBlack);
if (!_vm->shouldQuit()) {
- _vm->_gui->getTextInput(_characters[_activeBox].name, 24, 100, 10, 15, 0, 8);
- processNameInput(_activeBox, 2);
+ _vm->_gui->getTextInput(_characters[_activeBox].name, 24, 100, 10, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColDarkRed);
+ processNameInput(_activeBox, _vm->guiSettings()->colors.menuTxtColBlue);
}
}
}
@@ -518,7 +523,7 @@ void CharacterGenerator::createPartyMember() {
int CharacterGenerator::raceSexMenu() {
_screen->drawBox(_chargenBoxX[_activeBox], _chargenBoxY[_activeBox], _chargenBoxX[_activeBox] + 32, _chargenBoxY[_activeBox] + 33, 12);
_screen->copyRegion(0, 0, 144, 64, 160, 128, 2, 0, Screen::CR_NO_P_CHECK);
- _screen->printShadedText(_chargenStrings2[8], 147, 67, 9, 0);
+ _screen->printShadedText(_chargenStrings2[8], 147, 67, _vm->guiSettings()->colors.menuTxtColLightBlue, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_vm->removeInputTop();
_vm->_gui->simpleMenu_setup(1, 0, _chargenRaceSexStrings, -1, 0, 0);
@@ -545,7 +550,7 @@ int CharacterGenerator::classMenu(int raceSex) {
updateMagicShapes();
_screen->copyRegion(0, 0, 144, 64, 160, 128, 2, 0, Screen::CR_NO_P_CHECK);
- _screen->printShadedText(_chargenStrings2[9], 147, 67, 9, 0);
+ _screen->printShadedText(_chargenStrings2[9], 147, 67, _vm->guiSettings()->colors.menuTxtColLightBlue, 0, _vm->guiSettings()->colors.menuTxtColBlack);
toggleSpecialButton(5, 0, 0);
@@ -593,7 +598,7 @@ int CharacterGenerator::alignmentMenu(int cClass) {
updateMagicShapes();
_screen->copyRegion(0, 0, 144, 64, 160, 128, 2, 0, Screen::CR_NO_P_CHECK);
- _screen->printShadedText(_chargenStrings2[10], 147, 67, 9, 0);
+ _screen->printShadedText(_chargenStrings2[10], 147, 67, _vm->guiSettings()->colors.menuTxtColLightBlue, 0, _vm->guiSettings()->colors.menuTxtColBlack);
toggleSpecialButton(5, 0, 0);
@@ -918,24 +923,24 @@ void CharacterGenerator::printStats(int index, int mode) {
if (mode != 4)
_screen->drawShape(2, c->faceShape, 224, 2, 0);
- _screen->printShadedText(c->name, 160 + ((160 - _screen->getTextWidth(c->name)) / 2), 35, 15, 0);
- _screen->printShadedText(_chargenRaceSexStrings[c->raceSex], 160 + ((20 - strlen(_chargenRaceSexStrings[c->raceSex])) << 2), 45, 15, 0);
- _screen->printShadedText(_chargenClassStrings[c->cClass], 160 + ((20 - strlen(_chargenClassStrings[c->cClass])) << 2), 54, 15, 0);
+ _screen->printShadedText(c->name, 160 + ((160 - _screen->getTextWidth(c->name)) / 2), 35, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
+ _screen->printShadedText(_chargenRaceSexStrings[c->raceSex], 160 + ((20 - strlen(_chargenRaceSexStrings[c->raceSex])) << 2), 45, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
+ _screen->printShadedText(_chargenClassStrings[c->cClass], 160 + ((20 - strlen(_chargenClassStrings[c->cClass])) << 2), 54, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
for (int i = 0; i < 6; i++)
- _screen->printShadedText(_chargenStatStrings[i], 163, (i + 8) << 3, 15, 0);
+ _screen->printShadedText(_chargenStatStrings[i], 163, (i + 8) << 3, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
- _screen->printShadedText(_chargenStrings1[2], 248, 64, 15, 0);
+ _screen->printShadedText(_chargenStrings1[2], 248, 64, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
Common::String str = Common::String::format(_chargenStrings1[3], _vm->getCharStrength(c->strengthCur, c->strengthExtCur).c_str(), c->intelligenceCur, c->wisdomCur, c->dexterityCur, c->constitutionCur, c->charismaCur);
- _screen->printShadedText(str.c_str(), 192, 64, 15, 0);
+ _screen->printShadedText(str.c_str(), 192, 64, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
str = Common::String::format(_chargenStrings1[4], c->armorClass, c->hitPointsMax);
- _screen->printShadedText(str.c_str(), 280, 64, 15, 0);
+ _screen->printShadedText(str.c_str(), 280, 64, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
const char *lvlStr = c->level[2] ? _chargenStrings1[7] : (c->level[1] ? _chargenStrings1[6] : _chargenStrings1[5]);
str = Common::String::format(lvlStr, c->level[0], c->level[1], c->level[2]);
- _screen->printShadedText(str.c_str(), 280, 80, 15, 0);
+ _screen->printShadedText(str.c_str(), 280, 80, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
switch (mode) {
case 1:
@@ -970,7 +975,7 @@ void CharacterGenerator::printStats(int index, int mode) {
void CharacterGenerator::processNameInput(int index, int textColor) {
Screen::FontId of = _screen->setFont(Screen::FID_6_FNT);
- _screen->fillRect(_chargenNameFieldX[index], _chargenNameFieldY[index], _chargenNameFieldX[index] + 59, _chargenNameFieldY[index] + 5, 12);
+ _screen->fillRect(_chargenNameFieldX[index], _chargenNameFieldY[index], _chargenNameFieldX[index] + 59, _chargenNameFieldY[index] + 5, _vm->guiSettings()->colors.menuTxtColBlack);
int xOffs = (60 - _screen->getTextWidth(_characters[index].name)) >> 1;
_screen->printText(_characters[index].name, _chargenNameFieldX[index] + xOffs, _chargenNameFieldY[index], textColor, 0);
_screen->updateScreen();
@@ -1005,7 +1010,7 @@ int CharacterGenerator::modifyStat(int index, int8 *stat1, int8 *stat2) {
Common::String statStr = index ? Common::String::format("%d", *s1) : _vm->getCharStrength(*s1, *s2);
_screen->copyRegion(b->x - 112, b->y - 64, b->x + 32, b->y, 40, b->height, 2, 0, Screen::CR_NO_P_CHECK);
- _screen->printShadedText(statStr.c_str(), b->x + 32, b->y, 6, 0);
+ _screen->printShadedText(statStr.c_str(), b->x + 32, b->y, _vm->guiSettings()->colors.menuTxtColLightRed, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->updateScreen();
EoBCharacter *c = &_characters[_activeBox];
@@ -1084,7 +1089,7 @@ int CharacterGenerator::modifyStat(int index, int8 *stat1, int8 *stat2) {
statStr = index ? Common::String::format("%d", *s1) : _vm->getCharStrength(*s1, *s2);
_screen->copyRegion(b->x - 112, b->y - 64, b->x + 32, b->y, 40, b->height, 2, 0, Screen::CR_NO_P_CHECK);
- _screen->printShadedText(statStr.c_str(), b->x + 32, b->y, 6, 0);
+ _screen->printShadedText(statStr.c_str(), b->x + 32, b->y, _vm->guiSettings()->colors.menuTxtColLightRed, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->updateScreen();
if (index == 4) {
@@ -1096,7 +1101,7 @@ int CharacterGenerator::modifyStat(int index, int8 *stat1, int8 *stat2) {
if (c->hitPointsCur != oldVal) {
statStr = Common::String::format("%d", c->hitPointsCur);
_screen->copyRegion(120, 72, 264, 136, 40, 8, 2, 0, Screen::CR_NO_P_CHECK);
- _screen->printShadedText(statStr.c_str(), 264, 136, 15, 0);
+ _screen->printShadedText(statStr.c_str(), 264, 136, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->updateScreen();
}
@@ -1107,14 +1112,14 @@ int CharacterGenerator::modifyStat(int index, int8 *stat1, int8 *stat2) {
if (c->armorClass != oldVal) {
statStr = Common::String::format("%d", c->armorClass);
_screen->copyRegion(120, 64, 264, 128, 40, 8, 2, 0, Screen::CR_NO_P_CHECK);
- _screen->printShadedText(statStr.c_str(), 264, 128, 15, 0);
+ _screen->printShadedText(statStr.c_str(), 264, 128, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->updateScreen();
}
}
if (loop == false) {
statStr = index ? Common::String::format("%d", *s1) : _vm->getCharStrength(*s1, *s2);
- _screen->printText(statStr.c_str(), b->x + 32, b->y, 15, 0);
+ _screen->printText(statStr.c_str(), b->x + 32, b->y, _vm->guiSettings()->colors.menuTxtColWhite, 0);
_screen->updateScreen();
}
}
@@ -1167,7 +1172,7 @@ int CharacterGenerator::getMinHp(int cclass, int constitution, int level1, int l
void CharacterGenerator::finish() {
_screen->copyRegion(0, 0, 160, 0, 160, 128, 2, 2, Screen::CR_NO_P_CHECK);
int cp = _screen->setCurPage(2);
- _screen->printShadedText(_chargenEnterGameStrings[0], (_vm->gameFlags().platform == Common::kPlatformFMTowns) ? 184 : 168, 32, 15, 0);
+ _screen->printShadedText(_chargenEnterGameStrings[0], (_vm->gameFlags().platform == Common::kPlatformFMTowns) ? 184 : 168, 32, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->setCurPage(cp);
_screen->copyRegion(160, 0, 144, 64, 160, 128, 2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
@@ -1626,8 +1631,8 @@ int TransferPartyWiz::selectCharactersMenu() {
_screen->clearCurPage();
_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);
+ _screen->printText(_strings2[0], 5, 3, _vm->guiSettings()->colors.menuTxtColWhite, 0);
+ _screen->printText(_strings2[1], 5, 10, _vm->guiSettings()->colors.menuTxtColWhite, 0);
for (int i = 0; i < 6; i++)
drawCharPortraitWithStats(i, 0);
@@ -1635,8 +1640,8 @@ int TransferPartyWiz::selectCharactersMenu() {
_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);
+ _screen->printShadedText(_labels[0], 9, 151, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
+ _screen->printShadedText(_labels[1], 288, 151, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->setCurPage(0);
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
@@ -1715,7 +1720,7 @@ int TransferPartyWiz::selectCharactersMenu() {
if (count == 4 || _vm->shouldQuit())
loop = false;
else
- _vm->_gui->messageDialogue(16, count < 4 ? 69 : 70, 6);
+ _vm->_gui->messageDialogue(16, count < 4 ? 69 : 70, _vm->guiSettings()->colors.menuTxtColLightRed);
_screen->updateScreen();
}
@@ -1724,7 +1729,7 @@ int TransferPartyWiz::selectCharactersMenu() {
if (_vm->shouldQuit())
return 0;
else
- _vm->_gui->messageDialogue(16, 71, 6);
+ _vm->_gui->messageDialogue(16, 71, _vm->guiSettings()->colors.menuTxtColLightRed);
return selection;
}
@@ -1742,17 +1747,17 @@ void TransferPartyWiz::drawCharPortraitWithStats(int charIndex, bool enabled) {
_screen->drawShape(_screen->_curPage, c->faceShape, x + 4, y + 25, 0);
- int color1 = 15;
- int color2 = 12;
+ int color1 = _vm->guiSettings()->colors.menuTxtColWhite;
+ int color2 = _vm->guiSettings()->colors.menuTxtColBlack;
if (enabled) {
- color1 = 6;
- color2 = 15;
+ color1 = _vm->guiSettings()->colors.menuTxtColLightRed;
+ color2 = _vm->guiSettings()->colors.menuTxtColWhite;
} else {
_screen->drawShape(_screen->_curPage, _vm->_disabledCharGrid, x + 4, y + 25, 0);
}
- _screen->printShadedText(c->name, x + 44, y + 27, color1, 0);
+ _screen->printShadedText(c->name, x + 44, y + 27, color1, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->printText(_vm->_chargenRaceSexStrings[c->raceSex], x + 43, y + 36, color2, 0);
_screen->printText(_vm->_chargenClassStrings[c->cClass], x + 43, y + 43, color2, 0);
@@ -1765,7 +1770,7 @@ void TransferPartyWiz::drawCharPortraitWithStats(int charIndex, bool enabled) {
void TransferPartyWiz::updateHighlight(int index) {
static const int16 xPos[] = { 9, 288 };
if (_highlight > 5 && _highlight != index)
- _screen->printText(_labels[_highlight - 6], xPos[_highlight - 6], 151, 15, 0);
+ _screen->printText(_labels[_highlight - 6], xPos[_highlight - 6], 151, _vm->guiSettings()->colors.menuTxtColWhite, 0);
if (index < 6) {
_vm->_gui->updateBoxFrameHighLight(14 + index);
@@ -1779,7 +1784,7 @@ void TransferPartyWiz::updateHighlight(int index) {
if (_highlight < 6)
_vm->_gui->updateBoxFrameHighLight(-1);
- _screen->printText(_labels[index - 6], xPos[index - 6], 151, 6, 0);
+ _screen->printText(_labels[index - 6], xPos[index - 6], 151, _vm->guiSettings()->colors.menuTxtColLightRed, 0);
_screen->updateScreen();
_highlight = index;
}
diff --git a/engines/kyra/engine/darkmoon.cpp b/engines/kyra/engine/darkmoon.cpp
index 4978164922..e3b151b05d 100644
--- a/engines/kyra/engine/darkmoon.cpp
+++ b/engines/kyra/engine/darkmoon.cpp
@@ -395,8 +395,8 @@ void DarkMoonEngine::restParty_npc() {
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->set16bitShadingLevel(0);
- _gui->messageDialogue2(11, 63, 6);
- _gui->messageDialogue2(11, 64, 6);
+ _gui->messageDialogue2(11, 63, guiSettings()->colors.menuTxtColLightRed);
+ _gui->messageDialogue2(11, 64, guiSettings()->colors.menuTxtColLightRed);
}
bool DarkMoonEngine::restParty_extraAbortCondition() {
@@ -490,7 +490,7 @@ void DarkMoonEngine::characterLevelGain(int charIndex) {
}
}
-const KyraRpgGUISettings *DarkMoonEngine::guiSettings() {
+const KyraRpgGUISettings *DarkMoonEngine::guiSettings() const {
return (_flags.platform == Common::kPlatformFMTowns) ? &_guiSettingsFMTowns : &_guiSettingsDOS;
}
diff --git a/engines/kyra/engine/darkmoon.h b/engines/kyra/engine/darkmoon.h
index d1012dbfa6..ab8d93f4f2 100644
--- a/engines/kyra/engine/darkmoon.h
+++ b/engines/kyra/engine/darkmoon.h
@@ -120,7 +120,7 @@ private:
int charSelectDialogue();
void characterLevelGain(int charIndex);
- const KyraRpgGUISettings *guiSettings();
+ const KyraRpgGUISettings *guiSettings() const;
const char *const *_hornStrings;
const uint8 *_hornSounds;
diff --git a/engines/kyra/engine/eob.cpp b/engines/kyra/engine/eob.cpp
index b1cf50052c..25ab86d9ff 100644
--- a/engines/kyra/engine/eob.cpp
+++ b/engines/kyra/engine/eob.cpp
@@ -567,8 +567,13 @@ void EoBEngine::healParty() {
}
}
-const KyraRpgGUISettings *EoBEngine::guiSettings() {
- return (_configRenderMode == Common::kRenderCGA || _configRenderMode == Common::kRenderEGA) ? &_guiSettingsEGA : &_guiSettingsVGA;
+const KyraRpgGUISettings *EoBEngine::guiSettings() const {
+ if (_flags.platform == Common::kPlatformAmiga)
+ return &_guiSettingsAmiga;
+ else if (_configRenderMode == Common::kRenderCGA || _configRenderMode == Common::kRenderEGA)
+ return &_guiSettingsEGA;
+ else
+ return &_guiSettingsVGA;
}
} // End of namespace Kyra
diff --git a/engines/kyra/engine/eob.h b/engines/kyra/engine/eob.h
index 0eb8fd3a64..896f332047 100644
--- a/engines/kyra/engine/eob.h
+++ b/engines/kyra/engine/eob.h
@@ -111,10 +111,11 @@ private:
int resurrectionSelectDialogue();
void healParty();
- const KyraRpgGUISettings *guiSettings();
+ const KyraRpgGUISettings *guiSettings() const;
static const KyraRpgGUISettings _guiSettingsVGA;
static const KyraRpgGUISettings _guiSettingsEGA;
+ static const KyraRpgGUISettings _guiSettingsAmiga;
static const uint8 _egaDefaultPalette[];
};
diff --git a/engines/kyra/engine/eobcommon.cpp b/engines/kyra/engine/eobcommon.cpp
index e6e01ff781..bf991c95f9 100644
--- a/engines/kyra/engine/eobcommon.cpp
+++ b/engines/kyra/engine/eobcommon.cpp
@@ -33,18 +33,17 @@
#include "common/config-manager.h"
#include "common/translation.h"
+#include "gui/error.h"
+
#include "backends/keymapper/keymapper.h"
namespace Kyra {
const char *const EoBCoreEngine::kKeymapName = "eob";
-EoBCoreEngine::EoBCoreEngine(OSystem *system, const GameFlags &flags)
- : KyraRpgEngine(system, flags), _numLargeItemShapes(flags.gameID == GI_EOB1 ? 14 : 11),
- _numSmallItemShapes(flags.gameID == GI_EOB1 ? 23 : 26),
- _numThrownItemShapes(flags.gameID == GI_EOB1 ? 12 : 9),
- _numItemIconShapes(flags.gameID == GI_EOB1 ? 89 : 112),
- _teleporterWallId(flags.gameID == GI_EOB1 ? 52 : 44) {
+EoBCoreEngine::EoBCoreEngine(OSystem *system, const GameFlags &flags) : KyraRpgEngine(system, flags), _numLargeItemShapes(flags.gameID == GI_EOB1 ? 14 : 11),
+ _numSmallItemShapes(flags.gameID == GI_EOB1 ? 23 : 26), _numThrownItemShapes(flags.gameID == GI_EOB1 ? 12 : 9),
+ _numItemIconShapes(flags.gameID == GI_EOB1 ? 89 : 112), _teleporterWallId(flags.gameID == GI_EOB1 ? 52 : 44) {
_screen = 0;
_gui = 0;
@@ -436,10 +435,27 @@ Common::Error EoBCoreEngine::init() {
assert(_debugger);
if (_flags.platform == Common::kPlatformAmiga) {
+ bool showErrorDlg = false;
if (_res->exists("EOBF6.FONT"))
_screen->loadFont(Screen::FID_6_FNT, "EOBF6.FONT");
+ else if (_res->exists("FONTS/EOBF6.FONT"))
+ _screen->loadFont(Screen::FID_6_FNT, "FONTS/EOBF6.FONT");
+ else
+ showErrorDlg = true;
+
if (_res->exists("EOBF8.FONT"))
_screen->loadFont(Screen::FID_8_FNT, "EOBF8.FONT");
+ else if (_res->exists("FONTS/EOBF8.FONT"))
+ _screen->loadFont(Screen::FID_8_FNT, "FONTS/EOBF8.FONT");
+ else
+ showErrorDlg = true;
+
+ if (showErrorDlg) {
+ ::GUI::displayErrorDialog("This AMIGA version requires the following font files:\n\nEOBF6.FONT\nEOBF6/6\nEOBF8.FONT\nEOBF8/8\n\n"
+ "If you used the orginal installer for the installation these files\nshould be located in the AmigaDOS system 'Fonts/' folder.\n"
+ "Please copy them into the EOB game data directory.\n");
+ error("Failed to load font files.");
+ }
} else {
_screen->loadFont(Screen::FID_6_FNT, "FONT6.FNT");
_screen->loadFont(Screen::FID_8_FNT, "FONT8.FNT");
@@ -1863,11 +1879,11 @@ bool EoBCoreEngine::checkPassword() {
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, guiSettings()->colors.fill);
+ _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, guiSettings()->colors.menuTxtColWhite, guiSettings()->colors.fill, guiSettings()->colors.menuTxtColBlack);
memset(answ, 0, 20);
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)
+ if (_gui->getTextInput(answ, 10, 103, 15, guiSettings()->colors.menuTxtColWhite, guiSettings()->colors.fill, guiSettings()->colors.menuTxtColDarkRed) < 0)
i = 3;
if (!scumm_stricmp(_mnWord[c], answ))
break;
diff --git a/engines/kyra/engine/eobcommon.h b/engines/kyra/engine/eobcommon.h
index 38bdae0a7c..74e8ad403c 100644
--- a/engines/kyra/engine/eobcommon.h
+++ b/engines/kyra/engine/eobcommon.h
@@ -682,7 +682,7 @@ protected:
void gui_drawFoodStatusGraph(int index);
void gui_drawHorizontalBarGraph(int x, int y, int w, int h, int32 curVal, int32 maxVal, int col1, int col2);
void gui_drawCharPortraitStatusFrame(int index);
- void gui_drawInventoryItem(int slot, int special, int pageNum);
+ void gui_drawInventoryItem(int slot, int redraw, int pageNum);
void gui_drawCompass(bool force);
void gui_drawDialogueBox();
void gui_drawSpellbook();
diff --git a/engines/kyra/engine/kyra_rpg.h b/engines/kyra/engine/kyra_rpg.h
index a446c87a0e..0e04c77f46 100644
--- a/engines/kyra/engine/kyra_rpg.h
+++ b/engines/kyra/engine/kyra_rpg.h
@@ -97,7 +97,7 @@ struct KyraRpgGUISettings {
uint8 frame2;
int fill;
- uint8 unused;
+ uint8 sfill;
uint8 barGraph;
uint8 warningFrame1;
@@ -111,6 +111,13 @@ struct KyraRpgGUISettings {
uint8 inactiveTabFrame1;
uint8 inactiveTabFrame2;
int inactiveTabFill;
+
+ uint8 menuTxtColWhite;
+ uint8 menuTxtColLightRed;
+ uint8 menuTxtColDarkRed;
+ uint8 menuTxtColLightBlue;
+ uint8 menuTxtColBlue;
+ uint8 menuTxtColBlack;
} colors;
};
@@ -291,7 +298,7 @@ protected:
bool clickedShape(int shapeIndex);
- virtual const KyraRpgGUISettings *guiSettings() = 0;
+ virtual const KyraRpgGUISettings *guiSettings() const = 0;
int _clickedShapeXOffs;
int _clickedShapeYOffs;
diff --git a/engines/kyra/engine/lol.cpp b/engines/kyra/engine/lol.cpp
index 9cf045a876..c80d7fe6f4 100644
--- a/engines/kyra/engine/lol.cpp
+++ b/engines/kyra/engine/lol.cpp
@@ -1977,7 +1977,7 @@ void LoLEngine::delay(uint32 millis, bool doUpdate, bool) {
}
}
-const KyraRpgGUISettings *LoLEngine::guiSettings() {
+const KyraRpgGUISettings *LoLEngine::guiSettings() const {
return &_guiSettings;
}
diff --git a/engines/kyra/engine/lol.h b/engines/kyra/engine/lol.h
index 14811d21f1..bbaae9864e 100644
--- a/engines/kyra/engine/lol.h
+++ b/engines/kyra/engine/lol.h
@@ -1151,7 +1151,7 @@ private:
// misc
void delay(uint32 millis, bool doUpdate = false, bool isMainLoop = false);
- const KyraRpgGUISettings *guiSettings();
+ const KyraRpgGUISettings *guiSettings() const;
uint8 _compassBroken;
uint8 _drainMagic;
diff --git a/engines/kyra/graphics/screen_eob.cpp b/engines/kyra/graphics/screen_eob.cpp
index df859b0837..c7bfec92f1 100644
--- a/engines/kyra/graphics/screen_eob.cpp
+++ b/engines/kyra/graphics/screen_eob.cpp
@@ -120,7 +120,8 @@ void Screen_EoB::setClearScreenDim(int dim) {
}
void Screen_EoB::clearCurDim() {
- fillRect(_curDim->sx << 3, _curDim->sy, ((_curDim->sx + _curDim->w) << 3) - 1, (_curDim->sy + _curDim->h) - 1, _curDim->unkA);
+ static const uint8 amigaColorMap[16] = { 0x00, 0x06, 0x1d, 0x1b, 0x1a, 0x17, 0x18, 0x0e, 0x19, 0x1c, 0x1c, 0x1e, 0x13, 0x0a, 0x11, 0x1f };
+ fillRect(_curDim->sx << 3, _curDim->sy, ((_curDim->sx + _curDim->w) << 3) - 1, (_curDim->sy + _curDim->h) - 1, _isAmiga ? amigaColorMap[_curDim->unkA] : _curDim->unkA);
}
void Screen_EoB::setMouseCursor(int x, int y, const byte *shape) {
diff --git a/engines/kyra/gui/gui_eob.cpp b/engines/kyra/gui/gui_eob.cpp
index 761524177e..3f7843ec45 100644
--- a/engines/kyra/gui/gui_eob.cpp
+++ b/engines/kyra/gui/gui_eob.cpp
@@ -83,12 +83,12 @@ void EoBCoreEngine::gui_drawCharPortraitWithStats(int index) {
static const uint16 charPortraitPosY[] = { 2, 54, 106 };
EoBCharacter *c = &_characters[index];
- int txtCol1 = 12;
- int txtCol2 = 15;
+ int txtCol1 = guiSettings()->colors.menuTxtColBlack;
+ int txtCol2 = guiSettings()->colors.menuTxtColWhite;
if ((_flags.gameID == GI_EOB1 && c->flags & 6) || (_flags.gameID == GI_EOB2 && c->flags & 0x0E)) {
- txtCol1 = 8;
- txtCol2 = 6;
+ txtCol1 = guiSettings()->colors.menuTxtColDarkRed;
+ txtCol2 = guiSettings()->colors.menuTxtColLightRed;
}
if (_currentControlMode == 0) {
@@ -101,7 +101,7 @@ void EoBCoreEngine::gui_drawCharPortraitWithStats(int index) {
int cp = _screen->setCurPage(2);
if (index == _exchangeCharacterId)
- _screen->printText(_characterGuiStringsSt[0], x2 + 2, y2 + 2, 8, guiSettings()->colors.fill);
+ _screen->printText(_characterGuiStringsSt[0], x2 + 2, y2 + 2, guiSettings()->colors.menuTxtColDarkRed, guiSettings()->colors.fill);
else
_screen->printText(c->name, x2 + 2, y2 + (_flags.platform == Common::kPlatformFMTowns ? 1 : 2), txtCol1, guiSettings()->colors.fill);
@@ -116,7 +116,7 @@ void EoBCoreEngine::gui_drawCharPortraitWithStats(int index) {
if (c->damageTaken > 0) {
_screen->drawShape(2, _redSplatShape, x2 + 13, y2 + 30, 0);
Common::String tmpStr = Common::String::format("%d", c->damageTaken);
- _screen->printText(tmpStr.c_str(), x2 + 34 - tmpStr.size() * 3, y2 + 42, (_configRenderMode == Common::kRenderCGA) ? 12 : 15, 0);
+ _screen->printText(tmpStr.c_str(), x2 + 34 - tmpStr.size() * 3, y2 + 42, (_configRenderMode == Common::kRenderCGA) ? 12 : guiSettings()->colors.menuTxtColWhite, 0);
}
_screen->setCurPage(cp);
@@ -130,23 +130,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, guiSettings()->colors.fill);
+ _screen->printShadedText(c->name, 219, 6, txtCol2, 0, guiSettings()->colors.menuTxtColBlack);
gui_drawHitpoints(index);
gui_drawFoodStatusGraph(index);
if (_currentControlMode == 1) {
if (c->hitPointsCur == -10)
- _screen->printShadedText(_characterGuiStringsSt[1], 247, 158, 6, guiSettings()->colors.extraFill);
+ _screen->printShadedText(_characterGuiStringsSt[1], 247, 158, guiSettings()->colors.menuTxtColLightRed, guiSettings()->colors.sfill, guiSettings()->colors.menuTxtColBlack);
else if (c->hitPointsCur < 1)
- _screen->printShadedText(_characterGuiStringsSt[2], 226, 158, 6, guiSettings()->colors.extraFill);
+ _screen->printShadedText(_characterGuiStringsSt[2], 226, 158, guiSettings()->colors.menuTxtColLightRed, guiSettings()->colors.sfill, guiSettings()->colors.menuTxtColBlack);
else if (c->effectFlags & (_flags.gameID == GI_EOB1 ? 0x80 : 0x2000))
- _screen->printShadedText(_characterGuiStringsSt[3], 220, 158, 6, guiSettings()->colors.extraFill);
+ _screen->printShadedText(_characterGuiStringsSt[3], 220, 158, guiSettings()->colors.menuTxtColLightRed, guiSettings()->colors.sfill, guiSettings()->colors.menuTxtColBlack);
else if (c->flags & 2)
- _screen->printShadedText(_characterGuiStringsSt[4], 235, 158, 6, guiSettings()->colors.extraFill);
+ _screen->printShadedText(_characterGuiStringsSt[4], 235, 158, guiSettings()->colors.menuTxtColLightRed, guiSettings()->colors.sfill, guiSettings()->colors.menuTxtColBlack);
else if (c->flags & 4)
- _screen->printShadedText(_characterGuiStringsSt[5], 232, 158, 6, guiSettings()->colors.extraFill);
+ _screen->printShadedText(_characterGuiStringsSt[5], 232, 158, guiSettings()->colors.menuTxtColLightRed, guiSettings()->colors.sfill, guiSettings()->colors.menuTxtColBlack);
else if (c->flags & 8)
- _screen->printShadedText(_characterGuiStringsSt[6], 232, 158, 6, guiSettings()->colors.extraFill);
+ _screen->printShadedText(_characterGuiStringsSt[6], 232, 158, guiSettings()->colors.menuTxtColLightRed, guiSettings()->colors.sfill, guiSettings()->colors.menuTxtColBlack);
for (int i = 0; i < 27; i++)
gui_drawInventoryItem(i, 0, 2);
@@ -159,38 +159,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], guiSettings()->colors.extraFill);
+ _screen->fillRect(cm2X1[i], cm2Y1[i], cm2X2[i], cm2Y2[i], guiSettings()->colors.sfill);
- _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);
+ _screen->printShadedText(_characterGuiStringsIn[0], 183, 42, guiSettings()->colors.menuTxtColWhite, guiSettings()->colors.sfill, guiSettings()->colors.menuTxtColBlack);
+ _screen->printText(_chargenClassStrings[c->cClass], 183, 55, guiSettings()->colors.menuTxtColBlack, guiSettings()->colors.sfill);
+ _screen->printText(_chargenAlignmentStrings[c->alignment], 183, 62, guiSettings()->colors.menuTxtColBlack, guiSettings()->colors.sfill);
+ _screen->printText(_chargenRaceSexStrings[c->raceSex], 183, 69, guiSettings()->colors.menuTxtColBlack, guiSettings()->colors.sfill);
for (int i = 0; i < 6; i++)
- _screen->printText(_chargenStatStrings[6 + i], 183, 82 + i * 7, 12, guiSettings()->colors.extraFill);
+ _screen->printText(_chargenStatStrings[6 + i], 183, 82 + i * 7, guiSettings()->colors.menuTxtColBlack, guiSettings()->colors.sfill);
- _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(_characterGuiStringsIn[1], 183, 124, guiSettings()->colors.menuTxtColBlack, guiSettings()->colors.sfill);
+ _screen->printText(_characterGuiStringsIn[2], 239, 138, guiSettings()->colors.menuTxtColBlack, guiSettings()->colors.sfill);
+ _screen->printText(_characterGuiStringsIn[3], 278, 138, guiSettings()->colors.menuTxtColBlack, guiSettings()->colors.sfill);
- _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);
+ _screen->printText(getCharStrength(c->strengthCur, c->strengthExtCur).c_str(), 275, 82, guiSettings()->colors.menuTxtColWhite, guiSettings()->colors.sfill);
+ _screen->printText(Common::String::format("%d", c->intelligenceCur).c_str(), 275, 89, guiSettings()->colors.menuTxtColWhite, guiSettings()->colors.sfill);
+ _screen->printText(Common::String::format("%d", c->wisdomCur).c_str(), 275, 96, guiSettings()->colors.menuTxtColWhite, guiSettings()->colors.sfill);
+ _screen->printText(Common::String::format("%d", c->dexterityCur).c_str(), 275, 103, guiSettings()->colors.menuTxtColWhite, guiSettings()->colors.sfill);
+ _screen->printText(Common::String::format("%d", c->constitutionCur).c_str(), 275, 110, guiSettings()->colors.menuTxtColWhite, guiSettings()->colors.sfill);
+ _screen->printText(Common::String::format("%d", c->charismaCur).c_str(), 275, 117, guiSettings()->colors.menuTxtColWhite, guiSettings()->colors.sfill);
+ _screen->printText(Common::String::format("%d", c->armorClass).c_str(), 275, 124, guiSettings()->colors.menuTxtColWhite, guiSettings()->colors.sfill);
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, guiSettings()->colors.extraFill);
+ _screen->printText(_chargenClassStrings[t + 15], 180, 145 + 7 * i, guiSettings()->colors.menuTxtColBlack, guiSettings()->colors.sfill);
Common::String tmpStr = Common::String::format("%d", c->experience[i]);
- _screen->printText(tmpStr.c_str(), 251 - tmpStr.size() * 3, 145 + 7 * i, 15, guiSettings()->colors.extraFill);
+ _screen->printText(tmpStr.c_str(), 251 - tmpStr.size() * 3, 145 + 7 * i, guiSettings()->colors.menuTxtColWhite, guiSettings()->colors.sfill);
tmpStr = Common::String::format("%d", c->level[i]);
- _screen->printText(tmpStr.c_str(), 286 - tmpStr.size() * 3, 145 + 7 * i, 15, guiSettings()->colors.extraFill);
+ _screen->printText(tmpStr.c_str(), 286 - tmpStr.size() * 3, 145 + 7 * i, guiSettings()->colors.menuTxtColWhite, guiSettings()->colors.sfill);
}
}
@@ -323,7 +323,7 @@ void EoBCoreEngine::gui_drawWeaponSlotStatus(int x, int y, int status) {
break;
}
- int textColor = (_configRenderMode == Common::kRenderCGA) ? 2 : 15;
+ int textColor = (_configRenderMode == Common::kRenderCGA) ? 2 : guiSettings()->colors.menuTxtColWhite;
if (!tmpStr2.empty()) {
_screen->printText(tmpStr.c_str(), x + (16 - tmpStr.size() * 3), y + 2, textColor, 0);
@@ -342,7 +342,9 @@ void EoBCoreEngine::gui_drawHitpoints(int index) {
static const uint8 xCoords[] = { 23, 95 };
static const uint8 yCoords[] = { 46, 98, 150 };
- static const uint8 barColor[] = { 3, 5, 8 };
+ static const uint8 barColorDefault[] = { 3, 5, 8 };
+ static const uint8 barColorAmiga[] = { 27, 7, 25 };
+ const uint8 *barColor = (_flags.platform == Common::kPlatformAmiga) ? barColorAmiga : barColorDefault;
int x = xCoords[index & 1];
int y = yCoords[index >> 1];
@@ -369,7 +371,7 @@ void EoBCoreEngine::gui_drawHitpoints(int index) {
col = 2;
if (!_currentControlMode)
- _screen->printText(_characterGuiStringsHp[0], x - 13, y - 1, 12, 0);
+ _screen->printText(_characterGuiStringsHp[0], x - 13, y - 1, guiSettings()->colors.menuTxtColBlack, 0);
gui_drawHorizontalBarGraph(x, y, w, h, bgCur, bgMax, barColor[col], guiSettings()->colors.barGraph);
@@ -382,7 +384,7 @@ void EoBCoreEngine::gui_drawHitpoints(int index) {
y -= 1;
}
- _screen->printText(tmpString.c_str(), x, y, 12, guiSettings()->colors.fill);
+ _screen->printText(tmpString.c_str(), x, y, guiSettings()->colors.menuTxtColBlack, guiSettings()->colors.fill);
}
}
@@ -400,7 +402,11 @@ void EoBCoreEngine::gui_drawFoodStatusGraph(int index) {
if (index != _updateCharNum)
return;
- uint8 col = c->food < 20 ? 8 : (c->food < 33 ? 5 : 3);
+ static const uint8 barColorDefault[] = { 3, 5, 8 };
+ static const uint8 barColorAmiga[] = { 27, 7, 25 };
+ const uint8 *barColor = (_flags.platform == Common::kPlatformAmiga) ? barColorAmiga : barColorDefault;
+
+ uint8 col = c->food < 20 ? barColor[2] : (c->food < 33 ? barColor[1] : barColor[0]);
gui_drawHorizontalBarGraph(250, 25, 51, 5, c->food, 100, col, guiSettings()->colors.barGraph);
}
@@ -475,19 +481,22 @@ void EoBCoreEngine::gui_drawCharPortraitStatusFrame(int index) {
}
}
-void EoBCoreEngine::gui_drawInventoryItem(int slot, int special, int pageNum) {
+void EoBCoreEngine::gui_drawInventoryItem(int slot, int redraw, int pageNum) {
int x = _inventorySlotsX[slot];
int y = _inventorySlotsY[slot];
int item = _characters[_updateCharNum].inventory[slot];
int cp = _screen->setCurPage(pageNum);
- if (special) {
+ if (redraw) {
int wh = (slot == 25 || slot == 26) ? 10 : 18;
uint8 col1 = guiSettings()->colors.frame1;
uint8 col2 = guiSettings()->colors.frame2;
- if (_configRenderMode == Common::kRenderCGA) {
+ if (_flags.platform == Common::kPlatformAmiga) {
+ col1 = guiSettings()->colors.inactiveTabFrame1;
+ col2 = guiSettings()->colors.inactiveTabFrame2;
+ } else if (_configRenderMode == Common::kRenderCGA) {
col1 = 1;
col2 = 3;
}
@@ -495,11 +504,11 @@ void EoBCoreEngine::gui_drawInventoryItem(int slot, int special, int pageNum) {
gui_drawBox(x - 1, y - 1, wh, wh, col1, col2, slot == 16 ? -1 : guiSettings()->colors.fill);
if (slot == 16) {
- _screen->fillRect(227, 65, 238, 69, 12);
+ _screen->fillRect(227, 65, 238, 69, guiSettings()->colors.menuTxtColBlack);
int cnt = countQueuedItems(_characters[_updateCharNum].inventory[slot], -1, -1, 1, 1);
x = cnt >= 10 ? 227 : 233;
Common::String str = Common::String::format("%d", cnt);
- _screen->printText(str.c_str(), x, 65, 15, 0);
+ _screen->printText(str.c_str(), x, 65, guiSettings()->colors.menuTxtColWhite, 0);
}
}
@@ -557,20 +566,20 @@ void EoBCoreEngine::gui_drawSpellbook() {
col3 = guiSettings()->colors.inactiveTabFill;
if (i == _openBookSpellLevel) {
- col1 = guiSettings()->colors.frame1;
- col2 = guiSettings()->colors.frame2;
- col3 = guiSettings()->colors.fill;
+ col1 = guiSettings()->colors.frame1;
+ col2 = _flags.platform == Common::kPlatformAmiga ? 31 : guiSettings()->colors.frame2;
+ col3 = _flags.platform == Common::kPlatformAmiga ? guiSettings()->colors.frame2 : guiSettings()->colors.fill;
}
}
if (_flags.gameID == GI_EOB1) {
gui_drawBox(i * 21 + 71, 122, 21, 9, col1, col2, col3);
- _screen->printText(_magicStrings7[i], i * 21 + 73, 123, 12, 0);
+ _screen->printText(_magicStrings7[i], i * 21 + 73, 123, guiSettings()->colors.menuTxtColBlack, 0);
} else {
_screen->set16bitShadingLevel(4);
gui_drawBox(i * 18 + 68, 121, 18, 9, col1, col2, col3);
_screen->set16bitShadingLevel(0);
- _screen->printText(Common::String::format("%d", i + 1).c_str(), i * 18 + 75, 123, 12, 0);
+ _screen->printText(Common::String::format("%d", i + 1).c_str(), i * 18 + 75, 123, guiSettings()->colors.menuTxtColBlack, 0);
}
}
@@ -587,8 +596,8 @@ void EoBCoreEngine::gui_drawSpellbook() {
gui_drawSpellbookScrollArrow(165, 169, 1);
}
- int textCol1 = (_configRenderMode == Common::kRenderCGA) ? 3 : 15;
- int textCol2 = 8;
+ int textCol1 = (_configRenderMode == Common::kRenderCGA) ? 3 : guiSettings()->colors.menuTxtColWhite;
+ int textCol2 = guiSettings()->colors.menuTxtColDarkRed;
int textXa = 74;
int textXs = 71;
int textY = 170;
@@ -597,7 +606,7 @@ void EoBCoreEngine::gui_drawSpellbook() {
int col5 = 12;
if (_flags.gameID == GI_EOB1) {
- textCol2 = (_configRenderMode == Common::kRenderCGA) ? 12 : 11;
+ textCol2 = (_configRenderMode == Common::kRenderCGA) ? 12 : (_flags.platform == Common::kPlatformAmiga ? 16 : 11);
textXa = textXs = 73;
textY = 168;
col4 = col3;
@@ -1414,7 +1423,13 @@ GUI_EoB::GUI_EoB(EoBCoreEngine *vm) : GUI(vm), _vm(vm), _screen(vm->_screen) {
_charSelectRedraw = false;
- _highLightColorTable = (_vm->game() == GI_EOB1 && (_vm->_configRenderMode == Common::kRenderCGA || _vm->_configRenderMode == Common::kRenderEGA)) ? _highlightColorTableEGA : _highlightColorTableVGA;
+ if (_vm->gameFlags().platform == Common::kPlatformAmiga)
+ _highLightColorTable = _highlightColorTableAmiga;
+ else if (_vm->game() == GI_EOB1 && (_vm->_configRenderMode == Common::kRenderCGA || _vm->_configRenderMode == Common::kRenderEGA))
+ _highLightColorTable = _highlightColorTableEGA;
+ else
+ _highLightColorTable = _highlightColorTableVGA;
+
_updateBoxIndex = -1;
_highLightBoxTimer = 0;
_updateBoxColorIndex = 0;
@@ -1938,9 +1953,9 @@ void GUI_EoB::simpleMenu_setup(int sd, int maxItem, const char *const *strings,
for (int i = 0; i < _menuNumItems; i++) {
int item = simpleMenu_getMenuItem(i, menuItemsMask, itemOffset);
int ty = y + i * (lineSpacing + _screen->getFontHeight());
- _screen->printShadedText(strings[item], x, ty, (_vm->_configRenderMode == Common::kRenderCGA) ? 1 : dm->unkA, 0);
+ _screen->printShadedText(strings[item], x, ty, (_vm->_configRenderMode == Common::kRenderCGA) ? 1 : _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
if (item == v)
- _screen->printText(strings[item], x, ty, dm->unkC, 0);
+ _screen->printText(strings[item], x, ty, _vm->guiSettings()->colors.menuTxtColLightRed, 0);
}
_screen->updateScreen();
@@ -1991,14 +2006,14 @@ int GUI_EoB::simpleMenu_process(int sd, const char *const *strings, void *b, int
}
if (newItem != currentItem) {
- _screen->printText(strings[simpleMenu_getMenuItem(currentItem, menuItemsMask, itemOffset)], x, y + currentItem * lineH, (_vm->_configRenderMode == Common::kRenderCGA) ? 1 : dm->unkA, 0);
- _screen->printText(strings[simpleMenu_getMenuItem(newItem, menuItemsMask, itemOffset)], x, y + newItem * lineH , dm->unkC, 0);
+ _screen->printText(strings[simpleMenu_getMenuItem(currentItem, menuItemsMask, itemOffset)], x, y + currentItem * lineH, (_vm->_configRenderMode == Common::kRenderCGA) ? 1 : _vm->guiSettings()->colors.menuTxtColWhite, 0);
+ _screen->printText(strings[simpleMenu_getMenuItem(newItem, menuItemsMask, itemOffset)], x, y + newItem * lineH , _vm->guiSettings()->colors.menuTxtColLightRed, 0);
_screen->updateScreen();
}
if (result != -1) {
result = simpleMenu_getMenuItem(result, menuItemsMask, itemOffset);
- simpleMenu_flashSelection(strings[result], x, y + newItem * lineH, dm->unkA, dm->unkC, 0);
+ simpleMenu_flashSelection(strings[result], x, y + newItem * lineH, _vm->guiSettings()->colors.menuTxtColWhite, _vm->guiSettings()->colors.menuTxtColLightRed, 0);
}
_menuCur = newItem;
@@ -2292,10 +2307,10 @@ bool GUI_EoB::runLoadMenu(int x, int y) {
runLoop = result = false;
} else if (slot >= 0) {
if (_saveSlotIdTemp[slot] == -1) {
- messageDialogue(11, 65, 6);
+ messageDialogue(11, 65, _vm->guiSettings()->colors.menuTxtColLightRed);
} else {
if (_vm->loadGameState(_saveSlotIdTemp[slot]).getCode() != Common::kNoError)
- messageDialogue(11, 16, 6);
+ messageDialogue(11, 16, _vm->guiSettings()->colors.menuTxtColLightRed);
runLoop = false;
result = true;
}
@@ -2355,7 +2370,7 @@ bool GUI_EoB::confirmDialogue2(int dim, int id, int deflt) {
if (newHighlight != lastHighlight) {
for (int i = 0; i < 2; i++)
- _screen->printShadedText(_vm->_menuYesNoStrings[i], x[i] + 16 - (_screen->getTextWidth(_vm->_menuYesNoStrings[i]) / 2) + 1, y + 3, i == newHighlight ? 6 : 15, 0);
+ _screen->printShadedText(_vm->_menuYesNoStrings[i], x[i] + 16 - (_screen->getTextWidth(_vm->_menuYesNoStrings[i]) / 2) + 1, y + 3, i == newHighlight ? _vm->guiSettings()->colors.menuTxtColLightRed : _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->updateScreen();
lastHighlight = newHighlight;
}
@@ -2387,7 +2402,7 @@ void GUI_EoB::messageDialogue(int dim, int id, int buttonTextCol) {
int bw = _screen->getTextWidth(_vm->_menuOkString) + 7;
drawMenuButtonBox(bx, by, bw, 14, false, false);
- _screen->printShadedText(_vm->_menuOkString, bx + 4, by + 3, buttonTextCol, 0);
+ _screen->printShadedText(_vm->_menuOkString, bx + 4, by + 3, buttonTextCol, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->updateScreen();
for (bool runLoop = true; runLoop && !_vm->shouldQuit();) {
@@ -2418,7 +2433,7 @@ void GUI_EoB::messageDialogue2(int dim, int id, int buttonTextCol) {
_screen->_curPage = 2;
_screen->setClearScreenDim(dim);
drawMenuButtonBox(_screen->_curDim->sx << 3, _screen->_curDim->sy, _screen->_curDim->w << 3, _screen->_curDim->h, false, false);
- _screen->printShadedText(getMenuString(id), (_screen->_curDim->sx << 3) + 5, _screen->_curDim->sy + 5, 15, 0);
+ _screen->printShadedText(getMenuString(id), (_screen->_curDim->sx << 3) + 5, _screen->_curDim->sy + 5, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->_curPage = 0;
_screen->copyRegion(_screen->_curDim->sx << 3, _screen->_curDim->sy, _screen->_curDim->sx << 3, _screen->_curDim->sy, _screen->_curDim->w << 3, _screen->_curDim->h, 2, 0, Screen::CR_NO_P_CHECK);
@@ -2426,7 +2441,7 @@ void GUI_EoB::messageDialogue2(int dim, int id, int buttonTextCol) {
int y = _screen->_curDim->sy + _screen->_curDim->h - 21;
int w = _screen->getTextWidth(_vm->_menuOkString) + 8;
drawMenuButtonBox(x, y, w, 14, false, false);
- _screen->printShadedText(_vm->_menuOkString, x + 4, y + 3, buttonTextCol, 0);
+ _screen->printShadedText(_vm->_menuOkString, x + 4, y + 3, buttonTextCol, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->updateScreen();
for (bool runLoop = true; runLoop && !_vm->shouldQuit();) {
@@ -2447,7 +2462,7 @@ void GUI_EoB::messageDialogue2(int dim, int id, int buttonTextCol) {
_screen->updateScreen();
_vm->_system->delayMillis(80);
drawMenuButtonBox(x, y, w, 14, false, false);
- _screen->printShadedText(_vm->_menuOkString, x + 4, y + 3, buttonTextCol, 0);
+ _screen->printShadedText(_vm->_menuOkString, x + 4, y + 3, buttonTextCol, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->updateScreen();
}
@@ -2504,7 +2519,7 @@ int GUI_EoB::getTextInput(char *dest, int x, int y, int destMaxLen, int textColo
_screen->copyRegion((x - 1) << 3, y, 0, 191, (destMaxLen + 2) << 3, 9, 0, 2, Screen::CR_NO_P_CHECK);
if (_vm->gameFlags().platform == Common::kPlatformFMTowns)
_screen->copyRegion(0, 0, 160, 0, 160, 128, 2, 2, Screen::CR_NO_P_CHECK);
- _screen->printShadedText(dest, x << 3, y, textColor1, textColor2);
+ _screen->printShadedText(dest, x << 3, y, textColor1, textColor2, _vm->guiSettings()->colors.menuTxtColBlack);
uint32 next = _vm->_system->getMillis() + 2 * _vm->_tickLength;
sufx[0] = (pos < len) ? dest[pos] : 32;
@@ -2523,7 +2538,7 @@ int GUI_EoB::getTextInput(char *dest, int x, int y, int destMaxLen, int textColo
if (next <= _vm->_system->getMillis()) {
if (cursorState) {
_screen->copyRegion((pos + 1) << 3, 191, (x + pos) << 3, y, 8, 9, 2, 0, Screen::CR_NO_P_CHECK);
- _screen->printShadedText(sufx, (x + pos) << 3, y, textColor1, textColor2);
+ _screen->printShadedText(sufx, (x + pos) << 3, y, textColor1, textColor2, _vm->guiSettings()->colors.menuTxtColBlack);
} else {
_screen->fillRect((x + pos) << 3, y, ((x + pos) << 3) + 7, y + 7, cursorColor);
_screen->printText(sufx, (x + pos) << 3, y, textColor1, cursorColor);
@@ -2638,7 +2653,7 @@ int GUI_EoB::getTextInput(char *dest, int x, int y, int destMaxLen, int textColo
}
_screen->copyRegion(0, 191, (x - 1) << 3, y, (destMaxLen + 2) << 3, 9, 2, 0, Screen::CR_NO_P_CHECK);
- _screen->printShadedText(dest, x << 3, y, textColor1, textColor2);
+ _screen->printShadedText(dest, x << 3, y, textColor1, textColor2, _vm->guiSettings()->colors.menuTxtColBlack);
if (_vm->_flags.platform == Common::kPlatformFMTowns) {
if (pos < len) {
@@ -2655,7 +2670,7 @@ int GUI_EoB::getTextInput(char *dest, int x, int y, int destMaxLen, int textColo
if (cursorState)
_screen->printText(sufx, (x + pos) << 3, y, textColor1, cursorColor);
else
- _screen->printShadedText(sufx, (x + pos) << 3, y, textColor1, textColor2);
+ _screen->printShadedText(sufx, (x + pos) << 3, y, textColor1, textColor2, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->updateScreen();
} while (_keyPressed.keycode != Common::KEYCODE_RETURN && _keyPressed.keycode != Common::KEYCODE_ESCAPE && !_vm->shouldQuit());
@@ -2689,7 +2704,7 @@ int GUI_EoB::checkKatakanaSelection() {
if (_csjis[0] != '\x81' || _csjis[1] != '\x40') {
highlight = lineOffs << 8 | column;
- _screen->printShadedText(_csjis, x & ~7, y & ~15, 6, 0);
+ _screen->printShadedText(_csjis, x & ~7, y & ~15, _vm->guiSettings()->colors.menuTxtColLightRed, 0, _vm->guiSettings()->colors.menuTxtColBlack);
}
x = 288; y = 168;
@@ -2702,7 +2717,7 @@ int GUI_EoB::checkKatakanaSelection() {
continue;
highlight = 0x400 | i;
- _screen->printShadedText(_vm->_katakanaSelectStrings[i], kanaSelXCrds[i], 176, 6, 0);
+ _screen->printShadedText(_vm->_katakanaSelectStrings[i], kanaSelXCrds[i], 176, _vm->guiSettings()->colors.menuTxtColLightRed, 0, _vm->guiSettings()->colors.menuTxtColBlack);
i = 3;
}
}
@@ -2718,13 +2733,13 @@ int GUI_EoB::checkKatakanaSelection() {
if (_menuCur != -1) {
if (_menuCur & 0x400) {
- _screen->printShadedText(_vm->_katakanaSelectStrings[_menuCur & 3], kanaSelXCrds[_menuCur & 3], 176, 15, 0);
+ _screen->printShadedText(_vm->_katakanaSelectStrings[_menuCur & 3], kanaSelXCrds[_menuCur & 3], 176, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
} else {
char osjis[3];
osjis[0] = _vm->_katakanaLines[_currentKanaPage * 4 + (_menuCur >> 8)][_menuCur & 0xFF];
osjis[1] = _vm->_katakanaLines[_currentKanaPage * 4 + (_menuCur >> 8)][(_menuCur & 0xFF) + 1];
osjis[2] = 0;
- _screen->printShadedText(osjis, 152 + ((_menuCur & 0xFF) << 2), 112 + ((_menuCur >> 4) & ~0x0F), 15, 0);
+ _screen->printShadedText(osjis, 152 + ((_menuCur & 0xFF) << 2), 112 + ((_menuCur >> 4) & ~0x0F), _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
}
}
@@ -2762,11 +2777,11 @@ void GUI_EoB::printKatakanaOptions(int page) {
_currentKanaPage = page;
_screen->copyRegion(160, 44, 144, 108, 160, 84, 2, 0, Screen::CR_NO_P_CHECK);
for (int i = 0; i < 4; i++)
- _screen->printShadedText(_vm->_katakanaLines[page * 4 + i], 152, (i << 4) + 112, 15, 0);
+ _screen->printShadedText(_vm->_katakanaLines[page * 4 + i], 152, (i << 4) + 112, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
static uint16 kanaSelCrds[] = { 224, 272, 186 };
for (int i = 0; i < 3; i++)
- _screen->printShadedText(_vm->_katakanaSelectStrings[i], kanaSelCrds[i], 176, 15, 0);
+ _screen->printShadedText(_vm->_katakanaSelectStrings[i], kanaSelCrds[i], 176, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
}
void GUI_EoB::transferWaitBox() {
@@ -2833,7 +2848,7 @@ bool GUI_EoB::transferFileMenu(Common::String &targetName, Common::String &selec
break;
if (_saveSlotIdTemp[slot] == -1)
- messageDialogue(11, 65, 6);
+ messageDialogue(11, 65, _vm->guiSettings()->colors.menuTxtColLightRed);
else {
_screen->modifyScreenDim(11, xo, yo, dm->w, dm->h);
selection = _vm->getSavegameFilename(targetName, _saveSlotIdTemp[slot]);
@@ -2904,7 +2919,7 @@ bool GUI_EoB::runSaveMenu(int x, int y) {
of = _vm->screen()->setFont(Screen::FID_6_FNT);
y++;
} else {
- in = getTextInput(_saveSlotStringsTemp[slot], x + 1, fy, 19, 2, 0, 8);
+ in = getTextInput(_saveSlotStringsTemp[slot], x + 1, fy, 19, _vm->guiSettings()->colors.menuTxtColBlue, 0, _vm->guiSettings()->colors.menuTxtColDarkRed);
}
if (in == -1) {
useSlot = false;
@@ -2912,7 +2927,7 @@ bool GUI_EoB::runSaveMenu(int x, int y) {
}
if (!strlen(_saveSlotStringsTemp[slot])) {
- messageDialogue(11, 54, 6);
+ messageDialogue(11, 54, _vm->guiSettings()->colors.menuTxtColLightRed);
in = -1;
}
}
@@ -2922,7 +2937,7 @@ bool GUI_EoB::runSaveMenu(int x, int y) {
}
_screen->fillRect(fx - 2, fy, fx + 160, fy + 8, _vm->guiSettings()->colors.fill);
- _screen->printShadedText(_saveSlotStringsTemp[slot], (x + 1) << 3, fy, 15, 0);
+ _screen->printShadedText(_saveSlotStringsTemp[slot], (x + 1) << 3, fy, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->set16bitShadingLevel(0);
_screen->setFont(of);
_screen->updateScreen();
@@ -2935,7 +2950,7 @@ bool GUI_EoB::runSaveMenu(int x, int y) {
if (err.getCode() == Common::kNoError)
result = true;
else
- messageDialogue(11, 15, 6);
+ messageDialogue(11, 15, _vm->guiSettings()->colors.menuTxtColLightRed);
runLoop = false;
}
@@ -2947,14 +2962,14 @@ bool GUI_EoB::runSaveMenu(int x, int y) {
int GUI_EoB::selectSaveSlotDialogue(int x, int y, int id) {
_saveSlotX = _saveSlotY = 0;
- int col1 = (_vm->_configRenderMode == Common::kRenderCGA) ? 1 : 15;
+ int col1 = (_vm->_configRenderMode == Common::kRenderCGA) ? 1 : _vm->guiSettings()->colors.menuTxtColWhite;
_screen->setCurPage(2);
_savegameOffset = 0;
drawMenuButtonBox(0, 0, 176, 144, false, false);
const char *title = (id < 2) ? _vm->_saveLoadStrings[2 + id] : _vm->_transferStringsScummVM[id - 1];
- _screen->printShadedText(title, 52, 5, col1, 0);
+ _screen->printShadedText(title, 52, 5, col1, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->copyRegion(0, 0, x, y, 176, 144, 2, 0, Screen::CR_NO_P_CHECK);
_screen->setCurPage(0);
@@ -3033,11 +3048,11 @@ int GUI_EoB::selectSaveSlotDialogue(int x, int y, int id) {
if (lastHighlight != newHighlight) {
drawSaveSlotButton(lastHighlight, 0, col1);
- drawSaveSlotButton(newHighlight, 0, 6);
+ drawSaveSlotButton(newHighlight, 0, _vm->guiSettings()->colors.menuTxtColLightRed);
// 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);
+ int sli = (newHighlight == 6) ? _savegameOffset : (_savegameOffset + newHighlight);
_screen->set16bitShadingLevel(4);
_screen->printText(Common::String::format("%03d/989", sli).c_str(), _saveSlotX + 5, _saveSlotY + 135, _vm->guiSettings()->colors.frame2, _vm->guiSettings()->colors.fill);
_screen->set16bitShadingLevel(0);
@@ -3048,10 +3063,10 @@ int GUI_EoB::selectSaveSlotDialogue(int x, int y, int id) {
}
}
- drawSaveSlotButton(newHighlight, 2, 6);
+ drawSaveSlotButton(newHighlight, 2, _vm->guiSettings()->colors.menuTxtColLightRed);
_screen->updateScreen();
_vm->_system->delayMillis(80);
- drawSaveSlotButton(newHighlight, 1, 6);
+ drawSaveSlotButton(newHighlight, 1, _vm->guiSettings()->colors.menuTxtColLightRed);
_screen->updateScreen();
return newHighlight;
@@ -3200,7 +3215,7 @@ void GUI_EoB::runMemorizePrayMenu(int charIndex, int spellType) {
if (updateDesc) {
updateDesc = false;
_screen->set16bitShadingLevel(4);
- _screen->printShadedText(Common::String::format(_vm->_menuStringsMgc[1], np[lastHighLightButton] - numAssignedSpellsPerBookPage[lastHighLightButton], np[lastHighLightButton]).c_str(), 8, 38, 9, _vm->guiSettings()->colors.fill);
+ _screen->printShadedText(Common::String::format(_vm->_menuStringsMgc[1], np[lastHighLightButton] - numAssignedSpellsPerBookPage[lastHighLightButton], np[lastHighLightButton]).c_str(), 8, 38, 9, _vm->guiSettings()->colors.fill, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->set16bitShadingLevel(0);
}
@@ -3393,7 +3408,7 @@ void GUI_EoB::scribeScrollDialogue() {
buttonList = initMenu(6);
for (int i = 0; i < s; i++)
- _screen->printShadedText(_vm->_mageSpellList[menuItems[i]], 8, 9 * i + 50, 15, 0);
+ _screen->printShadedText(_vm->_mageSpellList[menuItems[i]], 8, 9 * i + 50, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
redraw = false;
lastHighLight = -1;
@@ -3402,9 +3417,9 @@ void GUI_EoB::scribeScrollDialogue() {
if (lastHighLight != newHighLight) {
if (lastHighLight >= 0)
- _screen->printText(_vm->_mageSpellList[menuItems[lastHighLight]], 8, 9 * lastHighLight + 50, 15, 0);
+ _screen->printText(_vm->_mageSpellList[menuItems[lastHighLight]], 8, 9 * lastHighLight + 50, _vm->guiSettings()->colors.menuTxtColWhite, 0);
lastHighLight = newHighLight;
- _screen->printText(_vm->_mageSpellList[menuItems[lastHighLight]], 8, 9 * lastHighLight + 50, 6, 0);
+ _screen->printText(_vm->_mageSpellList[menuItems[lastHighLight]], 8, 9 * lastHighLight + 50, _vm->guiSettings()->colors.menuTxtColLightRed, 0);
_screen->updateScreen();
}
@@ -3746,7 +3761,7 @@ bool GUI_EoB::confirmDialogue(int id) {
Button *buttonList = initMenu(5);
- _screen->printShadedText(getMenuString(id), (_screen->_curDim->sx + 1) << 3, _screen->_curDim->sy + 4, 15, 0);
+ _screen->printShadedText(getMenuString(id), (_screen->_curDim->sx + 1) << 3, _screen->_curDim->sy + 4, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
int newHighlight = 0;
int lastHighlight = -1;
@@ -3968,7 +3983,7 @@ void GUI_EoB::displayTextBox(int id) {
const ScreenDim *dm = _screen->getScreenDim(11);
drawMenuButtonBox(dm->sx << 3, dm->sy, dm->w << 3, dm->h, false, false);
- _screen->printShadedText(getMenuString(id), (dm->sx << 3) + 5, dm->sy + 5, 15, 0);
+ _screen->printShadedText(getMenuString(id), (dm->sx << 3) + 5, dm->sy + 5, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->copyRegion(dm->sx << 3, dm->sy, dm->sx << 3, dm->sy, dm->w << 3, dm->h, 2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
@@ -3997,7 +4012,7 @@ Button *GUI_EoB::initMenu(int id) {
drawMenuButtonBox(dm->sx << 3, dm->sy, dm->w << 3, dm->h, false, false);
}
- _screen->printShadedText(getMenuString(m->titleStrId), 5, 5, m->titleCol, 0);
+ _screen->printShadedText(getMenuString(m->titleStrId), 5, 5, m->titleCol, 0, _vm->guiSettings()->colors.menuTxtColBlack);
Button *buttons = 0;
for (int i = 0; i < m->numButtons; i++) {
@@ -4054,12 +4069,12 @@ void GUI_EoB::drawMenuButton(Button *b, bool clicked, bool highlight, bool noFil
yOffs = (b->height - 7) >> 1;
}
- int col1 = (_vm->_configRenderMode == Common::kRenderCGA) ? 1 : 15;
+ int col1 = (_vm->_configRenderMode == Common::kRenderCGA) ? 1 : _vm->guiSettings()->colors.menuTxtColWhite;
if (noFill || clicked)
- _screen->printText(s, b->x + xOffs, b->y + yOffs, highlight ? 6 : col1, 0);
+ _screen->printText(s, b->x + xOffs, b->y + yOffs, highlight ? _vm->guiSettings()->colors.menuTxtColLightRed : col1, 0);
else
- _screen->printShadedText(s, b->x + xOffs, b->y + yOffs, highlight ? 6 : col1, 0);
+ _screen->printShadedText(s, b->x + xOffs, b->y + yOffs, highlight ? _vm->guiSettings()->colors.menuTxtColLightRed : col1, 0, _vm->guiSettings()->colors.menuTxtColBlack);
}
}
@@ -4088,7 +4103,7 @@ void GUI_EoB::drawTextBox(int dim, int id) {
_screen->setCurPage(2);
drawMenuButtonBox(0, 0, dm->w << 3, dm->h, false, false);
- _screen->printShadedText(getMenuString(id), 5, 5, 15, 0);
+ _screen->printShadedText(getMenuString(id), 5, 5, _vm->guiSettings()->colors.menuTxtColWhite, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->setCurPage(0);
_screen->copyRegion(0, 0, dm->sx << 3, dm->sy, dm->w << 3, dm->h, 2, 0, Screen::CR_NO_P_CHECK);
@@ -4122,7 +4137,7 @@ void GUI_EoB::drawSaveSlotButton(int slot, int redrawBox, int textCol) {
y++;
}
- _screen->printShadedText(slotString, x + 4, y + 3, textCol, 0);
+ _screen->printShadedText(slotString, x + 4, y + 3, textCol, 0, _vm->guiSettings()->colors.menuTxtColBlack);
_vm->screen()->setFont(fnt);
}
@@ -4131,7 +4146,7 @@ void GUI_EoB::memorizePrayMenuPrintString(int spellId, int bookPageIndex, int sp
return;
int y = bookPageIndex * 9 + 50;
- int col1 = (_vm->_configRenderMode == Common::kRenderCGA) ? 1 : 15;
+ int col1 = (_vm->_configRenderMode == Common::kRenderCGA) ? 1 : _vm->guiSettings()->colors.menuTxtColWhite;
_screen->set16bitShadingLevel(4);
if (spellId) {
@@ -4146,9 +4161,9 @@ void GUI_EoB::memorizePrayMenuPrintString(int spellId, int bookPageIndex, int sp
}
if (noFill)
- _screen->printText(s.c_str(), 8, y, highLight ? 6 : col1, 0);
+ _screen->printText(s.c_str(), 8, y, highLight ? _vm->guiSettings()->colors.menuTxtColLightRed : col1, 0);
else
- _screen->printShadedText(s.c_str(), 8, y, highLight ? 6 : col1, _vm->guiSettings()->colors.fill);
+ _screen->printShadedText(s.c_str(), 8, y, highLight ? _vm->guiSettings()->colors.menuTxtColLightRed : col1, _vm->guiSettings()->colors.fill, _vm->guiSettings()->colors.menuTxtColBlack);
} else {
_screen->fillRect(6, y, 168, y + 8, _vm->guiSettings()->colors.fill);
}
@@ -4293,13 +4308,13 @@ void GUI_EoB::restParty_updateRestTime(int hours, bool init) {
_vm->_txt->clearCurDim();
drawMenuButtonBox(_screen->_curDim->sx << 3, _screen->_curDim->sy, _screen->_curDim->w << 3, _screen->_curDim->h, false, false);
_screen->copyRegion(_screen->_curDim->sx << 3, _screen->_curDim->sy, _screen->_curDim->sx << 3, _screen->_curDim->sy, _screen->_curDim->w << 3, _screen->_curDim->h, 0, 2, Screen::CR_NO_P_CHECK);
- _screen->printShadedText(getMenuString(42), (_screen->_curDim->sx + 1) << 3, _screen->_curDim->sy + 5, 9, 0);
+ _screen->printShadedText(getMenuString(42), (_screen->_curDim->sx + 1) << 3, _screen->_curDim->sy + 5, 9, 0, _vm->guiSettings()->colors.menuTxtColBlack);
}
_screen->setCurPage(0);
_screen->set16bitShadingLevel(4);
_screen->fillRect((_screen->_curDim->sx + 1) << 3, _screen->_curDim->sy + 20, ((_screen->_curDim->sx + 19) << 3) + 1, _screen->_curDim->sy + 29, _vm->guiSettings()->colors.fill);
- _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->printShadedText(Common::String::format(_vm->_menuStringsRest2[3], hours).c_str(), (_screen->_curDim->sx + 1) << 3, _screen->_curDim->sy + 20, _vm->guiSettings()->colors.menuTxtColWhite, _vm->guiSettings()->colors.fill, _vm->guiSettings()->colors.menuTxtColBlack);
_screen->set16bitShadingLevel(0);
_screen->updateScreen();
_vm->delay(160);
@@ -4334,6 +4349,8 @@ const uint8 GUI_EoB::_highlightColorTableVGA[] = { 0x0F, 0xB0, 0xB2, 0xB4, 0xB6,
const uint8 GUI_EoB::_highlightColorTableEGA[] = { 0x0C, 0x0D, 0x0E, 0x0F, 0x0E, 0x0D, 0x00 };
+const uint8 GUI_EoB::_highlightColorTableAmiga[] = { 0x13, 0x0B, 0x12, 0x0A, 0x11, 0x09, 0x11, 0x0A, 0x12, 0x0B, 0x00 };
+
} // End of namespace Kyra
#endif // ENABLE_EOB
diff --git a/engines/kyra/gui/gui_eob.h b/engines/kyra/gui/gui_eob.h
index eadb7b0801..82721fca95 100644
--- a/engines/kyra/gui/gui_eob.h
+++ b/engines/kyra/gui/gui_eob.h
@@ -154,6 +154,7 @@ private:
static const EoBRect16 _highlightFrames[];
static const uint8 _highlightColorTableVGA[];
static const uint8 _highlightColorTableEGA[];
+ static const uint8 _highlightColorTableAmiga[];
// FM-Towns specific
int checkKatakanaSelection();
diff --git a/engines/kyra/resource/staticres_eob.cpp b/engines/kyra/resource/staticres_eob.cpp
index eaa911231e..35b0d2bbe4 100644
--- a/engines/kyra/resource/staticres_eob.cpp
+++ b/engines/kyra/resource/staticres_eob.cpp
@@ -801,6 +801,12 @@ void EoBCoreEngine::initMenus() {
_menuDefs[2].numButtons = 4;
_menuDefs[2].firstButtonStrId = 44;
}
+
+ if (_flags.platform == Common::kPlatformAmiga) {
+ // assign Amiga text colors
+ _menuDefs[0].titleCol = _menuDefs[1].titleCol = _menuDefs[2].titleCol = _menuDefs[4].titleCol = _menuDefs[6].titleCol = guiSettings()->colors.menuTxtColLightBlue;
+ _menuDefs[3].titleCol = _menuDefs[5].titleCol = guiSettings()->colors.menuTxtColWhite;
+ }
}
@@ -1287,12 +1293,17 @@ void EoBEngine::initSpells() {
const KyraRpgGUISettings EoBEngine::_guiSettingsVGA = {
{ 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 }
+ { 135, 130, 132, 180, 133, 17, 23, 20, 184, 177, 180, 184, 177, 180, 15, 6, 8, 9, 2, 12 }
};
const KyraRpgGUISettings EoBEngine::_guiSettingsEGA = {
{ 9, 15, 95, 9, 7, { 285, 139 }, { 189, 162 }, { 31, 31 } },
- { 13, 9, 2, 133, 2, 6, 13, 8, 13, 15, 14, 13, 15, 14 }
+ { 13, 9, 2, 14, 2, 6, 13, 8, 13, 15, 14, 13, 15, 14, 15, 6, 8, 9, 2, 12 }
+};
+
+const KyraRpgGUISettings EoBEngine::_guiSettingsAmiga = {
+ { 28, 31, 95, 9, 7, { 285, 139 }, { 189, 162 }, { 31, 31 } },
+ { 18, 17, 10, 17, 11, 24, 22, 25, 18, 9, 10, 18, 9, 10, 31, 24, 25, 28, 29, 19 }
};
const uint8 EoBEngine::_egaDefaultPalette[] = {
@@ -1393,12 +1404,12 @@ void DarkMoonEngine::initSpells() {
const KyraRpgGUISettings DarkMoonEngine::_guiSettingsFMTowns = {
{ 9, 15, 95, 11, 7, { 221, 76 }, { 187, 162 }, { 95, 95 } },
- { 186, 181, 183, 133, 184, 17, 23, 20, 186, 181, 183, 182, 177, 180 }
+ { 186, 181, 183, 183, 184, 17, 23, 20, 186, 181, 183, 182, 177, 180, 15, 6, 8, 9, 2, 12 }
};
const KyraRpgGUISettings DarkMoonEngine::_guiSettingsDOS = {
{ 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 }
+ { 186, 181, 183, 183, 184, 17, 23, 20, 186, 181, 183, 182, 177, 180, 15, 6, 8, 9, 2, 12 }
};
const uint8 DarkMoonEngine::_egaDefaultPalette[] = {
diff --git a/engines/kyra/resource/staticres_lol.cpp b/engines/kyra/resource/staticres_lol.cpp
index b4093cee46..d2fbcef16f 100644
--- a/engines/kyra/resource/staticres_lol.cpp
+++ b/engines/kyra/resource/staticres_lol.cpp
@@ -779,7 +779,7 @@ const int8 LoLEngine::_mapCoords[12][4] = {
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 }
+ { 136, 251, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
const MistOfDoomAnimData LoLEngine::_mistAnimData[] = {
diff --git a/engines/kyra/script/script_eob.cpp b/engines/kyra/script/script_eob.cpp
index 709921deb9..cc3fc0a84f 100644
--- a/engines/kyra/script/script_eob.cpp
+++ b/engines/kyra/script/script_eob.cpp
@@ -514,6 +514,7 @@ int EoBInfProcessor::oeob_moveInventoryItemToBlock(int8 *data) {
}
int EoBInfProcessor::oeob_printMessage_v1(int8 *data) {
+ static const uint8 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;
@@ -524,11 +525,19 @@ int EoBInfProcessor::oeob_printMessage_v1(int8 *data) {
col[1] = *pos++;
col[3] = *pos++;
+
+ if (_vm->gameFlags().platform == Common::kPlatformAmiga) {
+ assert(col[1] < 16);
+ assert(col[3] < 16);
+ col[1] = amigaColorMap[col[1]];
+ col[3] = amigaColorMap[col[3]];
+ }
+
_vm->txt()->printMessage(col);
_vm->txt()->printMessage(str);
- col[1] = _screen->_curDim->unk8;
- col[3] = _screen->_curDim->unkA;
+ col[1] = _vm->txt()->colorMap()[_screen->_curDim->unk8];
+ col[3] = _vm->txt()->colorMap()[_screen->_curDim->unkA];
_vm->txt()->printMessage(col);
_vm->txt()->printMessage("\r");
@@ -1495,7 +1504,7 @@ int EoBInfProcessor::oeob_sequence(int8 *data) {
break;
case -1:
- if (_vm->gameFlags().platform == Common::kPlatformDOS)
+ if (_vm->gameFlags().platform == Common::kPlatformDOS || _vm->gameFlags().platform == Common::kPlatformAmiga)
_vm->_runFlag = _vm->checkPassword();
break;
diff --git a/engines/kyra/sequence/sequences_eob.cpp b/engines/kyra/sequence/sequences_eob.cpp
index 7b3618f3d1..a0b10e3c88 100644
--- a/engines/kyra/sequence/sequences_eob.cpp
+++ b/engines/kyra/sequence/sequences_eob.cpp
@@ -1041,25 +1041,42 @@ int EoBEngine::mainMenu() {
while (menuChoice >= 0 && !shouldQuit()) {
switch (menuChoice) {
case 0: {
- if (_configRenderMode != Common::kRenderEGA)
- _screen->loadPalette("EOBPAL.COL", _screen->getPalette(0));
- _screen->loadEoBBitmap(_flags.platform == Common::kPlatformAmiga ? "TITLE" : "INTRO", _cgaMappingDefault, 5, 3, 2);
- _screen->setScreenPalette(_screen->getPalette(0));
+ if (_flags.platform == Common::kPlatformAmiga) {
+ _screen->fadeToBlack(10);
+ _screen->loadEoBBitmap("TITLE", 0, 5, 3, 1);
+ _screen->fadeFromBlack(10);
+ } else {
+ if (_configRenderMode != Common::kRenderEGA)
+ _screen->loadPalette("EOBPAL.COL", _screen->getPalette(0));
+ _screen->loadEoBBitmap("INTRO", _cgaMappingDefault, 5, 3, 2);
+ _screen->setScreenPalette(_screen->getPalette(0));
+ }
+
_screen->_curPage = 2;
of = _screen->setFont(Screen::FID_6_FNT);
Common::String versionString(Common::String::format("ScummVM %s", gScummVMVersion));
_screen->printText(versionString.c_str(), 280 - versionString.size() * 6, 153, _screen->getPagePixel(2, 0, 0), 0);
_screen->setFont(of);
_screen->fillRect(0, 159, 319, 199, _screen->getPagePixel(2, 0, 0));
- gui_drawBox(77, 165, 173, 29, 14, 13, 12);
- gui_drawBox(76, 164, 175, 31, 14, 13, -1);
+
+ if (_flags.platform == Common::kPlatformAmiga) {
+ gui_drawBox(75, 165, 177, 29, 22, 28, -1);
+ gui_drawBox(74, 164, 179, 31, 22, 28, -1);
+ } else {
+ gui_drawBox(77, 165, 173, 29, 14, 13, 12);
+ gui_drawBox(76, 164, 175, 31, 14, 13, -1);
+ }
+
_screen->_curPage = 0;
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
+
_allowImport = true;
menuChoice = mainMenuLoop();
_allowImport = false;
- } break;
+ }
+
+ break;
case 1:
// load game in progress
@@ -1081,10 +1098,13 @@ int EoBEngine::mainMenu() {
_sound->selectAudioResourceSet(kMusicIntro);
_sound->loadSoundFile(0);
_screen->hideMouse();
+
seq_playIntro();
+
_screen->showMouse();
_sound->selectAudioResourceSet(kMusicIngame);
_sound->loadSoundFile(0);
+
menuChoice = 0;
break;
}
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