groundwork for an interface change
Add a new window-port interface function
perminvent_info *
update_invent_slot(winid window, int slot, perminvent_info *);
That should be nice and flexible and allow exchanges of useful
information between the core and the window port. Information
to be exchange can be easily modified in include/wintype.h as
things evolve.
Information useful to the core can be exchanged from the
window-port in struct to_core.
Information useful from the core to the window-port can be
passed in struct from_core.
I'm not going to update any docs until much later after things
are fully working and settled.
This also doesn't fix or have anything to do with existing
TTY_PERM_INVENT issues.
This commit is contained in:
@@ -162,6 +162,28 @@ typedef struct gi {
|
||||
|
||||
#define MENU_BEHAVE_STANDARD 0x0000000U
|
||||
|
||||
struct to_core {
|
||||
boolean active;
|
||||
boolean use_update_inventory; /* disable the newer slot interface */
|
||||
int slotcount;
|
||||
int low_slot_num, high_slot_num;
|
||||
int max_slot_text;
|
||||
};
|
||||
|
||||
struct from_core {
|
||||
long piflags;
|
||||
int slot; /* which inventory slot; 0 means info exchange only */
|
||||
int invlet;
|
||||
const char *text; /* the text to display */
|
||||
};
|
||||
|
||||
struct perminvent_info_t {
|
||||
struct to_core tocore;
|
||||
struct from_core fromcore;
|
||||
};
|
||||
|
||||
typedef struct perminvent_info_t perminvent_info;
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#endif /* WINTYPE_H */
|
||||
|
||||
Reference in New Issue
Block a user