aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/engine
diff options
context:
space:
mode:
authorathrxx2019-01-30 00:24:31 +0100
committerathrxx2019-03-06 20:48:21 +0100
commit7b8c84fa4d3f3d8e1c5fa543fae7ddbd7a495bb7 (patch)
treea4dd3631826170611174434f37d16d3fb5d0ea32 /engines/kyra/engine
parente00eaa4899d86fb97c333d4b609de4612895ffea (diff)
downloadscummvm-rg350-7b8c84fa4d3f3d8e1c5fa543fae7ddbd7a495bb7.tar.gz
scummvm-rg350-7b8c84fa4d3f3d8e1c5fa543fae7ddbd7a495bb7.tar.bz2
scummvm-rg350-7b8c84fa4d3f3d8e1c5fa543fae7ddbd7a495bb7.zip
KYRA: (EOB1/Amiga) - fix chargen and gui colors
Diffstat (limited to 'engines/kyra/engine')
-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
10 files changed, 95 insertions, 61 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;