NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
nw4r::ut Namespace Reference

Description

Debugging library which includes various utilities used by the rest of nw4r.

Classes

struct  Color
 A 32-bit RGBA color. More...
 
struct  Link
 A doubly-linked list node. See List. More...
 
class  LinkList
 
struct  List
 A doubly-linked list container. See Link. More...
 
struct  Rect
 
class  TagProcessorBase
 

Typedefs

typedef struct nw4r::ut::Rect Rect
 

Functions

void List_Init (List *list, u16 offset)
 Initializes the list.
 
void List_Append (List *list, void *obj)
 Adds an object to the end of the list.
 
void List_Prepend (List *list, void *obj)
 Adds an object to the beginning of the list.
 
void List_Insert (List *list, void *target, void *obj)
 Inserts an object at a specified position in the list.
 
void List_Remove (List *list, void *obj)
 Deletes an object from the list.
 
void * List_GetNext (const List *list, const void *obj)
 Gets the object linked after the given one.
 
void * List_GetPrev (const List *list, const void *obj)
 Gets the object linked before the given one.
 
template<typename T >
Min (T a, T b)
 Gets the smaller of the two given values.
 
template<typename T >
Max (T a, T b)
 Gets the larger of the two given values.
 

Function Documentation

◆ List_Init()

void nw4r::ut::List_Init ( List * list,
u16 offset )

Initializes the list.

Definition at line 8 of file list.cpp.

◆ List_Append()

void nw4r::ut::List_Append ( List * list,
void * obj )

Adds an object to the end of the list.

Definition at line 15 of file list.cpp.

◆ List_Prepend()

void nw4r::ut::List_Prepend ( List * list,
void * obj )

Adds an object to the beginning of the list.

Definition at line 40 of file list.cpp.

◆ List_Insert()

void nw4r::ut::List_Insert ( List * list,
void * target,
void * obj )

Inserts an object at a specified position in the list.

If target is not nullptr , obj is inserted in front of target , else it is added at the end of the list.

Definition at line 65 of file list.cpp.

◆ List_Remove()

void nw4r::ut::List_Remove ( List * list,
void * obj )

Deletes an object from the list.

Definition at line 93 of file list.cpp.

◆ List_GetNext()

void * nw4r::ut::List_GetNext ( const List * list,
const void * obj )

Gets the object linked after the given one.

If obj is nullptr , the list's head object is returned.

Definition at line 120 of file list.cpp.

◆ List_GetPrev()

void * nw4r::ut::List_GetPrev ( const List * list,
const void * obj )

Gets the object linked before the given one.

If obj is nullptr , the list's tail object is returned.

Definition at line 128 of file list.cpp.

◆ Min()

template<typename T >
T nw4r::ut::Min ( T a,
T b )
inline

Gets the smaller of the two given values.

Definition at line 9 of file inlines.hpp.

◆ Max()

template<typename T >
T nw4r::ut::Max ( T a,
T b )
inline

Gets the larger of the two given values.

Definition at line 15 of file inlines.hpp.