From 8b42d65a7e922a9b9241ebe509968331fe958fb6 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 15 Oct 2003 06:40:31 +0000 Subject: Dumped most of the remaining "driver" code into a new "Display" class. This touches a lot of the code, of course, and adds yet another global variable (temporarily, I hope), but everything still seems to work. Knock on wood. svn-id: r10806 --- sword2/icons.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sword2/icons.cpp') diff --git a/sword2/icons.cpp b/sword2/icons.cpp index f0b8a23e10..8de09452a1 100644 --- a/sword2/icons.cpp +++ b/sword2/icons.cpp @@ -18,6 +18,7 @@ */ #include "stdafx.h" +#include "bs2/sword2.h" #include "bs2/driver/driver96.h" #include "bs2/defs.h" #include "bs2/icons.h" @@ -207,23 +208,22 @@ void Build_menu(void) { if (icon_coloured) icon += (RDMENU_ICONWIDE * RDMENU_ICONDEEP); - SetMenuIcon(RDMENU_BOTTOM, j, icon); + g_display->setMenuIcon(RDMENU_BOTTOM, j, icon); res_man.close(res); } else { // no icon here - SetMenuIcon(RDMENU_BOTTOM, j, NULL); + g_display->setMenuIcon(RDMENU_BOTTOM, j, NULL); debug(5, " NULL for %d", j); } } - ShowMenu(RDMENU_BOTTOM); + g_display->showMenu(RDMENU_BOTTOM); } void Build_system_menu(void) { // start a fresh top system menu uint8 *icon; - int j; uint32 icon_list[5] = { OPTIONS_ICON, @@ -236,7 +236,7 @@ void Build_system_menu(void) { // build them all high in full colour - when one is clicked on all the // rest will grey out - for (j = 0; j < ARRAYSIZE(icon_list); j++) { + for (int j = 0; j < ARRAYSIZE(icon_list); j++) { icon = res_man.open(icon_list[j]) + sizeof(_standardHeader); // The only case when an icon is grayed is when the player @@ -245,11 +245,11 @@ void Build_system_menu(void) { if (!DEAD || icon_list[j] != SAVE_ICON) icon += (RDMENU_ICONWIDE * RDMENU_ICONDEEP); - SetMenuIcon(RDMENU_TOP, j, icon); + g_display->setMenuIcon(RDMENU_TOP, j, icon); res_man.close(icon_list[j]); } - ShowMenu(RDMENU_TOP); + g_display->showMenu(RDMENU_TOP); } } // End of namespace Sword2 -- cgit v1.2.3