NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
list.hpp
Go to the documentation of this file.
1#pragma once
2#include <types.h>
3///@file
4
5namespace nw4hbm {
6namespace ut {
7
8/// @brief See nw4r::ut::Link.
9struct Link {
10 void *mpPrev;
11 void *mpNext;
12};
13
14/// @brief See nw4r::ut::List.
15struct List {
16 void *mpHead;
17 void *mpTail;
18 u16 mCount;
19 u16 mOffset;
20};
21
22void List_Init(List *list, u16 offset); ///< See include/lib/nw4r/ut/list.hpp.
23void List_Append(List *list, void *obj); ///< See include/lib/nw4r/ut/list.hpp.
24void List_Remove(List *list, void *obj); ///< See include/lib/nw4r/ut/list.hpp.
25void *List_GetNext(const List *list, const void *obj); ///< See include/lib/nw4r/ut/list.hpp.
26
27/// @brief Gets the nth linked object, starting from the top of the list.
28/// @details Returns @p nullptr if the index is not valid.
29void *List_GetNth(const List *list, u16 n);
30
31} // namespace ut
32} // namespace nw4hbm
See nw4r::ut::List.
Definition list.hpp:15