status display - core modules (trunk only)
Introduction of a new set of window port status display routines. The new routines are conditional on STATUS_VIA_WINDOWPORT being defined in config.h. See the experimental section, where the #define resides for the time being.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)config.h 3.4 2003/02/19 */
|
||||
/* SCCS Id: @(#)config.h 3.4 2003/11/23 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -353,7 +353,8 @@ typedef unsigned char uchar;
|
||||
*/
|
||||
|
||||
/*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */
|
||||
#define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup - M. Allison */
|
||||
#define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */
|
||||
#define STATUS_VIA_WINDOWPORT /* re-work of the status line updating process */
|
||||
|
||||
/* End of Section 5 */
|
||||
|
||||
|
||||
@@ -320,7 +320,10 @@ E NEARDATA boolean vision_full_recalc; /* TRUE if need vision recalc */
|
||||
E NEARDATA char **viz_array; /* could see/in sight row pointers */
|
||||
|
||||
/* Window system stuff */
|
||||
E NEARDATA winid WIN_MESSAGE, WIN_STATUS;
|
||||
E NEARDATA winid WIN_MESSAGE;
|
||||
#ifndef STATUS_VIA_WINDOWPORT
|
||||
E NEARDATA winid WIN_STATUS;
|
||||
#endif
|
||||
E NEARDATA winid WIN_MAP, WIN_INVEN;
|
||||
E char toplines[];
|
||||
#ifndef TCAP_H
|
||||
|
||||
@@ -131,6 +131,14 @@ E long NDECL(botl_score);
|
||||
E int FDECL(describe_level, (char *));
|
||||
E const char *FDECL(rank_of, (int,SHORT_P,BOOLEAN_P));
|
||||
E void NDECL(bot);
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
E void FDECL(status_initialize, (BOOLEAN_P));
|
||||
E void NDECL(status_finish);
|
||||
E void NDECL(genl_status_init);
|
||||
E void NDECL(genl_status_finish);
|
||||
E void FDECL(genl_status_update, (int, genericptr_t, int, int));
|
||||
E void FDECL(genl_status_enablefield, (int, const char *, const char *,BOOLEAN_P));
|
||||
#endif
|
||||
|
||||
/* ### cmd.c ### */
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef WINPROCS_H
|
||||
#define WINPROCS_H
|
||||
|
||||
#include "botl.h"
|
||||
|
||||
struct window_procs {
|
||||
const char *name;
|
||||
unsigned long wincap; /* window port capability options supported */
|
||||
@@ -67,6 +69,12 @@ struct window_procs {
|
||||
void FDECL((*win_preference_update), (const char *));
|
||||
char * FDECL((*win_getmsghistory), (BOOLEAN_P));
|
||||
void FDECL((*win_putmsghistory), (const char *));
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
void NDECL((*win_status_init));
|
||||
void NDECL((*win_status_finish));
|
||||
void FDECL((*win_status_enablefield), (int,const char *,const char *,BOOLEAN_P));
|
||||
void FDECL((*win_status_update), (int,genericptr_t,int,int));
|
||||
#endif
|
||||
};
|
||||
|
||||
extern NEARDATA struct window_procs windowprocs;
|
||||
@@ -138,6 +146,13 @@ extern NEARDATA struct window_procs windowprocs;
|
||||
#define preference_update (*windowprocs.win_preference_update)
|
||||
#define getmsghistory (*windowprocs.win_getmsghistory)
|
||||
#define putmsghistory (*windowprocs.win_putmsghistory)
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
/* there is a status_initialize() in botl.c,
|
||||
* which calls win_status_init() directly; same with status_finish.
|
||||
*/
|
||||
#define status_enablefield (*windowprocs.win_status_enablefield)
|
||||
#define status_update (*windowprocs.win_status_update)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* WINCAP
|
||||
|
||||
@@ -14,6 +14,10 @@ typedef union any {
|
||||
int a_int;
|
||||
char a_char;
|
||||
schar a_schar;
|
||||
unsigned int a_uint;
|
||||
int *a_iptr;
|
||||
long *a_lptr;
|
||||
unsigned *a_uptr;
|
||||
/* add types as needed */
|
||||
} anything;
|
||||
#define ANY_P union any /* avoid typedef in prototypes */
|
||||
@@ -67,5 +71,4 @@ typedef struct mi {
|
||||
#define MENU_INVERT_PAGE '~'
|
||||
#define MENU_SEARCH ':'
|
||||
|
||||
|
||||
#endif /* WINTYPE_H */
|
||||
|
||||
Reference in New Issue
Block a user