Gnome updates (from <Someone> <Someone> Simon)

- fix destruction of primary game windows
- One, it makes the color of the cursor box dynamic (these are the gnmap.c
changes), based on hp/hpmax (continuous colors white -> yellow -> red ->
magenta rather than discrete like in Qt).
- Two, it adds a new window, NHW_WORN (all the other changes and new files
gnworn.[ch]), placed at the end of the first row, to the right of the status,
with tiles of all the items currently equiped.  I had to change the spacing of
the first row (no longer homogeneous) to accomodate this, but I think it still
looks okay.  It's mostly like the Qt version but the equiped items are in
slightly different places, and a bit more compactly (added quiver, ball/chain,
monster skin armor; see the definition in gnworn.c for the layout).
This commit is contained in:
cohrs
2002-04-21 17:09:34 +00:00
parent a277db8f73
commit b1055ae7c1
11 changed files with 169 additions and 9 deletions

View File

@@ -13,6 +13,7 @@
#include "gnyesno.h"
GNHWinData gnome_windowlist[MAXWINDOWS];
winid WIN_WORN = WIN_ERR;
extern void tty_raw_print(const char *);
extern void tty_raw_print_bold(const char *);
@@ -105,6 +106,9 @@ void gnome_init_nhwindows(int* argc, char** argv)
//wizard = TRUE;
iflags.window_inited = TRUE;
/* gnome-specific window creation */
WIN_WORN = gnome_create_nhwindow(NHW_WORN);
}
@@ -434,6 +438,13 @@ gnome_create_nhwindow_by_id( int type, winid i)
ghack_main_window_add_status_window( gnome_windowlist[i].win);
break;
}
case NHW_WORN:
{
gnome_windowlist[i].win = ghack_init_worn_window( );
gnome_windowlist[i].type = NHW_WORN;
ghack_main_window_add_worn_window(gnome_windowlist[i].win);
break;
}
case NHW_MENU:
{
gnome_windowlist[i].type = NHW_MENU;
@@ -502,9 +513,9 @@ void gnome_display_nhwindow(winid wid, BOOLEAN_P block)
*/
void gnome_destroy_nhwindow(winid wid)
{
if ((wid == NHW_MAP) ||
(wid == NHW_MESSAGE) ||
(wid == NHW_STATUS)) {
if ((wid == WIN_MAP) ||
(wid == WIN_MESSAGE) ||
(wid == WIN_STATUS)) {
/* no thanks, I'll do these myself */
return;
}