aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cruise/cruise_main.cpp2
-rw-r--r--engines/cruise/mainDraw.cpp2
-rw-r--r--engines/cruise/menu.cpp6
-rw-r--r--engines/cruise/vars.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index 1d6907ebf0..97681d9cac 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -774,7 +774,7 @@ menuElementSubStruct *getSelectedEntryInMenu(menuStruct *pMenu) {
pMenuElement = pMenu->ptrNextElement;
while (pMenuElement) {
- if (pMenuElement->varC) {
+ if (pMenuElement->selected) {
currentMenuElementX = pMenuElement->x;
currentMenuElementY = pMenuElement->y;
currentMenuElement = pMenuElement;
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index 5d7ffe4ca0..be128a3ffb 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -1313,7 +1313,7 @@ void drawMenu(menuStruct *pMenu) {
int color;
- if (p1->varC) {
+ if (p1->selected) {
color = selectColor;
} else {
if (p1->color != 255) {
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp
index 7246ec65b4..9b59494f96 100644
--- a/engines/cruise/menu.cpp
+++ b/engines/cruise/menu.cpp
@@ -101,7 +101,7 @@ void addSelectableMenuEntry(int ovlIdx, int headerIdx, menuStruct *pMenu, int pa
pNewElement->string = menuText;
pNewElement->next = NULL;
- pNewElement->varC = 0;
+ pNewElement->selected = false;
pNewElement->color = color;
pNewElement->gfx = renderText(160, menuText);
@@ -129,13 +129,13 @@ void updateMenuMouse(int mouseX, int mouseY, menuStruct *pMenu) {
menuElementStruct *pCurrentEntry = pMenu->ptrNextElement;
while (pCurrentEntry) {
- pCurrentEntry->varC = 0;
+ pCurrentEntry->selected = false;
if (var_2 == 0) {
if ((mouseX > pCurrentEntry->x) && ((pCurrentEntry->x + 160) >= mouseX)) {
if ((mouseY > pCurrentEntry->y) && ((pCurrentEntry->y + height) >= mouseY)) {
var_2 = 1;
- pCurrentEntry->varC = 1;
+ pCurrentEntry->selected = true;
}
}
}
diff --git a/engines/cruise/vars.h b/engines/cruise/vars.h
index cd0929e212..7208a8bea0 100644
--- a/engines/cruise/vars.h
+++ b/engines/cruise/vars.h
@@ -45,7 +45,7 @@ struct menuElementStruct {
int x;
int y;
int varA;
- int varC;
+ bool selected;
unsigned char color;
gfxEntryStruct *gfx;
menuElementSubStruct *ptrSub;