aboutsummaryrefslogtreecommitdiff
path: root/sword2/driver/menu.cpp
diff options
context:
space:
mode:
authorJonathan Gray2003-08-20 11:13:13 +0000
committerJonathan Gray2003-08-20 11:13:13 +0000
commit77f13830ed1f526279fc000d6b8800234f3c890c (patch)
treed2ce6026b5685b5f673742569c8cfc5c50945b5e /sword2/driver/menu.cpp
parent52f3fa76dc8503109a3ae1e2ace222d52a65d566 (diff)
downloadscummvm-rg350-77f13830ed1f526279fc000d6b8800234f3c890c.tar.gz
scummvm-rg350-77f13830ed1f526279fc000d6b8800234f3c890c.tar.bz2
scummvm-rg350-77f13830ed1f526279fc000d6b8800234f3c890c.zip
SetMenuIcon(), other stubs in menu.cpp will have to be done for things to be visible, don't have time to do this at the moment. As a side note the demo is now finishable even though you can't see the inventory :)
svn-id: r9791
Diffstat (limited to 'sword2/driver/menu.cpp')
-rw-r--r--sword2/driver/menu.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/sword2/driver/menu.cpp b/sword2/driver/menu.cpp
index d615d8300f..9581287158 100644
--- a/sword2/driver/menu.cpp
+++ b/sword2/driver/menu.cpp
@@ -130,21 +130,19 @@ static uint8 menuStatus[2] =
{
RDMENU_HIDDEN, RDMENU_HIDDEN
};
-/*
+
static uint8 *icons[2][RDMENU_MAXPOCKETS] =
{
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
-*/
-/*
-static LPDIRECTDRAWSURFACE lpIconSurface[2][RDMENU_MAXPOCKETS] =
+// static LPDIRECTDRAWSURFACE lpIconSurface[2][RDMENU_MAXPOCKETS] =
+static Surface *lpIconSurface[2][RDMENU_MAXPOCKETS] =
{
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
-*/
static uint8 pocketStatus[2][RDMENU_MAXPOCKETS] =
{
@@ -154,7 +152,7 @@ static uint8 pocketStatus[2][RDMENU_MAXPOCKETS] =
//static uint8 menuCounter[2];
//static uint8 lastIcon[2];
-//static uint8 iconCount = 0;
+static uint8 iconCount = 0;
@@ -517,10 +515,11 @@ int32 CloseMenuImmediately(void)
int32 SetMenuIcon(uint8 menu, uint8 pocket, uint8 *icon)
{
- warning("stub SetMenuIcon( %d, %d )", menu, pocket);
-/*
+ debug(5, "stub SetMenuIcon( %d, %d )", menu, pocket);
- HRESULT hr;
+
+// HRESULT hr;
+ int32 hr;
// Check for invalid menu parameter.
@@ -537,7 +536,8 @@ int32 SetMenuIcon(uint8 menu, uint8 pocket, uint8 *icon)
iconCount--;
free(icons[menu][pocket]);
icons[menu][pocket] = NULL;
- IDirectDrawSurface2_Release(lpIconSurface[menu][pocket]);
+// IDirectDrawSurface2_Release(lpIconSurface[menu][pocket]);
+ delete lpIconSurface[menu][pocket];
lpIconSurface[menu][pocket] = NULL;
}
@@ -551,14 +551,14 @@ int32 SetMenuIcon(uint8 menu, uint8 pocket, uint8 *icon)
memcpy(icons[menu][pocket], icon, RDMENU_ICONWIDE * RDMENU_ICONDEEP);
hr = CreateIconSurface(menu, pocket);
- if (hr != DD_OK)
+ //if (hr != DD_OK)
+ if (hr != RD_OK)
return(hr);
hr = LoadIconSurface(menu, pocket);
if (hr != RD_OK)
return(hr);
}
-*/
return RD_OK;
}