move some parts of TTY_PERM_INVENT into core
This starts the tty perm_invent just in time later in the startup rather than initializing it with the other game windows. This also splits the duties: The core will inquire from the window port about how many inventory slots it can fill. The core will handle figuring out the inventory text and inventory letters, and will do the traversing of internal data structures like obj chains, and passing customization options on to the window port. The window port will look after placing each inventory slot's text at an appropriate location on the screen. This, in theory, makes the core-portion available for window ports other than tty to use, though none currently do. The decision of what goes in an inventory slot is all left up to the core with the update_invent_slot interface. Documentation updates will come later, not at this time.
This commit is contained in:
@@ -972,9 +972,9 @@ struct instance_globals {
|
||||
persistent one doesn't get shrunk during filtering for item selection
|
||||
then regrown to full inventory, possibly being resized in the process */
|
||||
winid cached_pickinv_win;
|
||||
#ifdef TTY_PERM_INVENT
|
||||
winid tty_invent_win;
|
||||
#endif
|
||||
winid perm_invent_win;
|
||||
int core_invent_state;
|
||||
|
||||
/* query objlist callback: return TRUE if obj type matches "this_type" */
|
||||
int this_type;
|
||||
const char *this_title; /* title for inventory list of specific type */
|
||||
|
||||
Reference in New Issue
Block a user