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:
+20
-7
@@ -74,7 +74,7 @@ struct window_procs safe_procs = {
|
||||
safe_create_nhwindow, safe_clear_nhwindow, safe_display_nhwindow,
|
||||
safe_destroy_nhwindow, safe_curs, safe_putstr, safe_putmixed,
|
||||
safe_display_file, safe_start_menu, safe_add_menu, safe_end_menu,
|
||||
safe_select_menu, safe_message_menu, safe_update_inventory,
|
||||
safe_select_menu, safe_message_menu,
|
||||
safe_mark_synch,
|
||||
safe_wait_synch,
|
||||
#ifdef CLIPPING
|
||||
@@ -100,6 +100,8 @@ struct window_procs safe_procs = {
|
||||
safe_status_finish, safe_status_enablefield,
|
||||
safe_status_update,
|
||||
safe_can_suspend,
|
||||
safe_update_inventory,
|
||||
safe_update_invent_slot,
|
||||
};
|
||||
|
||||
struct window_procs *
|
||||
@@ -270,12 +272,6 @@ safe_message_menu(
|
||||
return '\033';
|
||||
}
|
||||
|
||||
void
|
||||
safe_update_inventory(int arg UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_mark_synch(void)
|
||||
{
|
||||
@@ -476,6 +472,23 @@ safe_status_update(
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
safe_update_inventory(int arg UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
perminvent_info *
|
||||
safe_update_invent_slot(
|
||||
winid window, /* window to use, must be of type NHW_MENU */
|
||||
int inventory_slot, /* slot id: 0 - info return to core */
|
||||
/* 1 - gold slot */
|
||||
/* 2 - 29 obj slots */
|
||||
perminvent_info *pi)
|
||||
{
|
||||
return (perminvent_info *) 0;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
* These are some optionally selectable routines that add
|
||||
* some base functionality over the safe_* versions above.
|
||||
|
||||
Reference in New Issue
Block a user