diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-11 16:14:54 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-11 16:14:54 +0100 |
| commit | 24af775b5041cbed67dfc84f3a0d67850a4b6a1b (patch) | |
| tree | 8858ba5158aa7a4b78e12ecbd17b509afda3f9d7 /include/list.h | |
| parent | 4933a7c038087ae465e588fafb392a57d7f92b87 (diff) | |
pathfinding
Diffstat (limited to 'include/list.h')
| -rw-r--r-- | include/list.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/list.h b/include/list.h new file mode 100644 index 0000000..d4809de --- /dev/null +++ b/include/list.h @@ -0,0 +1,27 @@ + +#ifndef INCLUDE_LIST +#define INCLUDE_LIST + +#include <projectbase/project_base.h> + +typedef struct t_list_item +{ + void *next; + void *data; +} list_item; + +typedef struct t_list +{ + list_item *start; + u32 count; + u16 size; +} list; + +void list_destroy(list* list); +list list_create(u16 size); +list_item *list_push(list *list, void *data); +void* list_at(list *list, u32 index); +void list_remove_at(list *list, u32 index); +void list_debug_print(list *list); + +#endif
\ No newline at end of file |
