From 3c45ee20eb6c12184da0756c0c189d82abb8bcab Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 17 May 2009 05:12:10 +0000 Subject: Properly named the dialog menu item 'selected' field svn-id: r40632 --- engines/cruise/cruise_main.cpp | 2 +- engines/cruise/mainDraw.cpp | 2 +- engines/cruise/menu.cpp | 6 +++--- engines/cruise/vars.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/cruise') 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; -- cgit v1.2.3