Angband
obj-list.h
Go to the documentation of this file.
1 
19 #ifndef OBJECT_LIST_H
20 #define OBJECT_LIST_H
21 
22 #define MAX_ITEMLIST 2560
23 
24 typedef enum object_list_section_e {
29 
30 typedef struct object_list_entry_s {
31  struct object *object;
35 
36 typedef struct object_list_s {
38  size_t entries_size;
43  bool sorted;
45 
48 void object_list_init(void);
49 void object_list_finalize(void);
53 int object_list_standard_compare(const void *a, const void *b);
55  int (*compare)(const void *, const void *));
58  char *line_buffer, size_t size);
59 
60 #endif /* OBJECT_LIST_H */
uint16_t u16b
Definition: h-basic.h:169
s16b dx
Definition: obj-list.h:33
void object_list_reset(object_list_t *list)
Zero out the contents of an object list.
Definition: obj-list.c:117
Definition: obj-list.h:36
object_list_entry_t * entries
Definition: obj-list.h:37
s16b dy
Definition: obj-list.h:33
uint8_t byte
Definition: h-basic.h:167
u16b distinct_entries
Definition: obj-list.h:39
void object_list_sort(object_list_t *list, int(*compare)(const void *, const void *))
Sort the object list with the given sort function.
Definition: obj-list.c:297
int object_list_standard_compare(const void *a, const void *b)
Standard comparison function for the object list.
Definition: obj-list.c:275
void object_list_format_name(const object_list_entry_t *entry, char *line_buffer, size_t size)
Format the object name so that the prefix is right aligned to a common column.
Definition: obj-list.c:364
u16b total_entries[OBJECT_LIST_SECTION_MAX]
Definition: obj-list.h:41
Object information, for a specific object.
Definition: object.h:394
object_list_section_e
Definition: obj-list.h:24
s32b creation_turn
Definition: obj-list.h:40
byte object_list_entry_line_attribute(const object_list_entry_t *entry)
Return an attribute to display a particular list entry with.
Definition: obj-list.c:323
struct object_list_entry_s object_list_entry_t
bool sorted
Definition: obj-list.h:43
Definition: obj-list.h:25
Definition: obj-list.h:27
Definition: obj-list.h:30
int16_t s16b
Definition: h-basic.h:170
object_list_t * object_list_new(void)
Allocate a new object list.
Definition: obj-list.c:33
Definition: obj-list.h:26
u16b total_objects[OBJECT_LIST_SECTION_MAX]
Definition: obj-list.h:42
size_t entries_size
Definition: obj-list.h:38
enum object_list_section_e object_list_section_t
object_list_t * object_list_shared_instance(void)
Return a common object list instance.
Definition: obj-list.c:93
int32_t s32b
Definition: h-basic.h:173
struct object * object
Definition: obj-list.h:31
void object_list_finalize(void)
Tear down the object list module.
Definition: obj-list.c:85
png_uint_32 size
Definition: libpng12/png.h:1546
void object_list_free(object_list_t *list)
Free an object list.
Definition: obj-list.c:56
u16b count[OBJECT_LIST_SECTION_MAX]
Definition: obj-list.h:32
struct object_list_s object_list_t
void object_list_collect(object_list_t *list)
Collect object information from the current cave.
Definition: obj-list.c:155
void object_list_init(void)
Initialize the object list module.
Definition: obj-list.c:77