aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/gui_lol.cpp9
-rw-r--r--engines/kyra/gui_lol.h18
-rw-r--r--engines/kyra/screen.cpp3
3 files changed, 23 insertions, 7 deletions
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index 1518ba2e4b..4f8c373fd2 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -1936,6 +1936,7 @@ int LoLEngine::clickedStatusIcon(Button *button) {
GUI_LoL::GUI_LoL(LoLEngine *vm) : GUI(vm), _vm(vm), _screen(vm->_screen) {
_scrollUpFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::scrollUp);
_scrollDownFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::scrollDown);
+
_redrawButtonFunctor = BUTTON_FUNCTOR(GUI, this, &GUI::redrawButtonCallback);
_redrawShadedButtonFunctor = BUTTON_FUNCTOR(GUI, this, &GUI::redrawShadedButtonCallback);
@@ -2279,7 +2280,7 @@ int GUI_LoL::processButtonList(Button *buttonList, uint16 inputFlag, int8 mouseW
}
int GUI_LoL::redrawButtonCallback(Button *button) {
- if (!_displayMenu)
+ if (!_displayMenu || _vm->gameFlags().use16ColorMode)
return 0;
_screen->drawBox(button->x + 1, button->y + 1, button->x + button->width - 1, button->y + button->height - 1, 225);
@@ -2287,7 +2288,7 @@ int GUI_LoL::redrawButtonCallback(Button *button) {
}
int GUI_LoL::redrawShadedButtonCallback(Button *button) {
- if (!_displayMenu)
+ if (!_displayMenu || _vm->gameFlags().use16ColorMode)
return 0;
_screen->drawShadedBox(button->x, button->y, button->x + button->width, button->y + button->height, 223, 227, Screen::kShadeTypeLol);
@@ -2452,7 +2453,7 @@ int GUI_LoL::runMenu(Menu &menu) {
_screen->updateScreen();
}
- if (_currentMenu == &_mainMenu) {
+ if (_currentMenu == &_mainMenu && !_vm->gameFlags().use16ColorMode) {
Screen::FontId f = _screen->setFont(Screen::FID_6_FNT);
_screen->fprintString("%s", menu.x + 8, menu.y + menu.height - 12, 204, 0, 8, gScummVMVersion);
_screen->setFont(f);
@@ -2580,7 +2581,7 @@ void GUI_LoL::setupSavegameNames(Menu &menu, int num) {
}
void GUI_LoL::printMenuText(const char *str, int x, int y, uint8 c0, uint8 c1, uint8 flags, Screen::FontId font) {
- _screen->fprintString("%s", x, y, c0, c1, flags, str);
+ _screen->fprintString("%s", x, y, c0, c1, _vm->gameFlags().use16ColorMode ? flags & 3 : flags, str);
}
int GUI_LoL::getMenuCenterStringX(const char *str, int x1, int x2) {
diff --git a/engines/kyra/gui_lol.h b/engines/kyra/gui_lol.h
index 832199f23e..df383b0d29 100644
--- a/engines/kyra/gui_lol.h
+++ b/engines/kyra/gui_lol.h
@@ -38,15 +38,21 @@ namespace Kyra {
menu.y = (dim->sy); \
menu.width = (dim->w << 3); \
menu.height = (dim->h); \
+ if (_vm->gameFlags().use16ColorMode) { \
+ menu.bkgdColor = 0xcc; \
+ menu.color1 = 0xff; \
+ menu.color2 = 0xdd; \
+ } else { \
menu.bkgdColor = 225; \
menu.color1 = 223; \
menu.color2 = 227; \
+ } \
menu.menuNameId = b; \
menu.highlightedItem = c; \
menu.numberOfItems = d; \
menu.titleX = (dim->sx << 3) + (dim->w << 2); \
menu.titleY = 6; \
- menu.textColor = 254; \
+ menu.textColor = _vm->gameFlags().use16ColorMode ? 0xe1 : 254; \
menu.scrollUpButtonX = e; \
menu.scrollUpButtonY = f; \
menu.scrollDownButtonX = g; \
@@ -62,12 +68,18 @@ namespace Kyra {
item.y = c; \
item.width = d; \
item.height = e; \
- item.textColor = 204; \
- item.highlightColor = 254; \
+ item.textColor = _vm->gameFlags().use16ColorMode ? 0xc1 : 204;; \
+ item.highlightColor = _vm->gameFlags().use16ColorMode ? 0xe1 : 254; \
item.titleX = -1; \
+ if (_vm->gameFlags().use16ColorMode) { \
+ item.bkgdColor = 0xcc; \
+ item.color1 = 0xff; \
+ item.color2 = 0xdd; \
+ } else { \
item.bkgdColor = 225; \
item.color1 = 223; \
item.color2 = 227; \
+ } \
item.saveSlot = 0; \
item.labelId = f; \
item.labelString = 0; \
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 3bad7cce0d..f2221d0c3c 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -1017,6 +1017,9 @@ void Screen::drawShadedBox(int x1, int y1, int x2, int y2, int color1, int color
}
drawClippedLine(x1, y2, x2, y2, color2);
+ if (shadeType == kShadeTypeLol && _use16ColorMode)
+ drawBox(x1, y1, x2, y2, 0);
+
showMouse();
}