rework TTY_PERM_INVENT; update window port interface
Change the inner workings of the experimental TTY_PERM_INVENT. Switch to delivering the content to tty for the experimental perm_invent via the existing window port interface (start_menu(), add_menu(), end_menu). This also adds a new window port interface call ctrl_nhwindow() for delivering information to the window port, and/or obtaining specific information from the window port. The information and requests can be extended as required. To be documented later once the changes settle down. Due to the intrusive nature of these changes and the possibility of some bugs in the new code, I'm going to leave TTY_PERM_INVENT commented out in the repository for a day or two. Anyone wishing to test it out can do so by uncommenting TTY_PERM_INVENT in config.h.
This commit is contained in:
@@ -490,15 +490,13 @@ void NetHackQtBind::qt_update_inventory(int arg UNUSED)
|
||||
*/
|
||||
}
|
||||
|
||||
perminvent_info *NetHackQtBind::qt_update_invent_slot(
|
||||
winid wid UNUSED, /* window to use, must be of type NHW_MENU */
|
||||
int inventory_slot UNUSED, /* slot id: 0 - info return to core */
|
||||
/* 1 - gold slot */
|
||||
/* 2 - 29 obj slots */
|
||||
perminvent_info *pi UNUSED)
|
||||
win_request_info *NetHackQtBind::qt_ctrl_nhwindow(
|
||||
winid wid UNUSED,
|
||||
int request UNUSED,
|
||||
win_request_info *wri UNUSED)
|
||||
{
|
||||
NetHackQtWindow* window UNUSED =id_to_window[(int)wid];
|
||||
return (perminvent_info *) 0;
|
||||
return (win_request_info *) 0;
|
||||
}
|
||||
|
||||
void NetHackQtBind::qt_mark_synch()
|
||||
@@ -1111,7 +1109,7 @@ struct window_procs Qt_procs = {
|
||||
#endif
|
||||
genl_can_suspend_yes,
|
||||
nethack_qt_::NetHackQtBind::qt_update_inventory,
|
||||
nethack_qt_::NetHackQtBind::qt_update_invent_slot,
|
||||
nethack_qt_::NetHackQtBind::qt_ctrl_nhwindow,
|
||||
};
|
||||
|
||||
#ifndef WIN32
|
||||
|
||||
Reference in New Issue
Block a user