'sortloot' revamp
Change the sortloot option to use qsort() instead of naive insertion sort. After sorting, it reorders the linked list into the sorted order, so might have some subtle change(s) in behavior since that wasn't done before. pickup.c includes some formatting cleanup. modified: include/extern.h, hack.h, obj.h src/do.c, do_wear.c, end.c, invent.c, pickup.c
This commit is contained in:
+3
-3
@@ -2520,9 +2520,9 @@ int retry;
|
||||
all_worn_categories = TRUE;
|
||||
}
|
||||
|
||||
n = query_objlist("What do you want to take off?", invent,
|
||||
SIGNAL_NOMENU | USE_INVLET | INVORDER_SORT, &pick_list,
|
||||
PICK_ANY,
|
||||
n = query_objlist("What do you want to take off?", &invent,
|
||||
(SIGNAL_NOMENU | USE_INVLET | INVORDER_SORT),
|
||||
&pick_list, PICK_ANY,
|
||||
all_worn_categories ? is_worn : is_worn_by_type);
|
||||
if (n > 0) {
|
||||
for (i = 0; i < n; i++)
|
||||
|
||||
Reference in New Issue
Block a user