identifying via menu
From the newsgroup: identifying by menu pops up multiple menus in succession if the player picks fewer invent entries than are being granted, but the second and subsequent ones could cover up the message window and hide the feedback from prior ones. If multiple popup menus are needed when identifying, issue --More-- before each menu after the first. The code seemed to be trying to do this already, but it should have used wait_synch() rather than mark_synch(), or perhaps used display_nhwindow(WIN_MESSAGE, TRUE) instead of either one of those. For curses, both mark_synch() and wait_synch() were no-ops. Now they do something. X11's behavior wasn't right either; it seemed to be lagging one message behind (something I had noticed recently and then forgotten about; I still don't remember the context then so don't know whether this fixes that earlier situation).
This commit is contained in:
10
src/invent.c
10
src/invent.c
@@ -2351,7 +2351,8 @@ menu_identify(int id_limit)
|
||||
for (i = 0; i < n; i++, id_limit--)
|
||||
(void) identify(pick_list[i].item.a_obj);
|
||||
free((genericptr_t) pick_list);
|
||||
mark_synch(); /* Before we loop to pop open another menu */
|
||||
if (id_limit)
|
||||
wait_synch(); /* Before we loop to pop open another menu */
|
||||
first = 0;
|
||||
} else if (n == -2) { /* player used ESC to quit menu */
|
||||
break;
|
||||
@@ -2381,8 +2382,9 @@ count_unidentified(struct obj *objchn)
|
||||
|
||||
/* dialog with user to identify a given number of items; 0 means all */
|
||||
void
|
||||
identify_pack(int id_limit,
|
||||
boolean learning_id) /* T: just read unknown identify scroll */
|
||||
identify_pack(
|
||||
int id_limit,
|
||||
boolean learning_id) /* T: just read unknown identify scroll */
|
||||
{
|
||||
struct obj *obj;
|
||||
int n, unid_cnt = count_unidentified(gi.invent);
|
||||
@@ -2396,7 +2398,7 @@ identify_pack(int id_limit,
|
||||
for (obj = gi.invent; obj; obj = obj->nobj) {
|
||||
if (not_fully_identified(obj)) {
|
||||
(void) identify(obj);
|
||||
if (unid_cnt == 1)
|
||||
if (--unid_cnt < 1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user