NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
f_line_nd.hpp
1#pragma once
2#include <types.h>
3#include <game/cLib/c_line.hpp>
4
5class fBase_c;
6
7/// @brief A base line node.
8/// @details Each node is owned by a @ref fBase_c "base" and represents it in the @ref fLiMgBa_c "list".
9/// @ingroup framework
10class fLiNdBaLink_c : public cLineNd_c {
11public:
12
13 /// @brief Constructs a new list node.
14 /// @param owner The node's owner.
15 fLiNdBaLink_c(fBase_c *owner) : mpOwner(owner) {}
16
17 inline fLiNdBaLink_c *getPrev() const {
18 return (fLiNdBaLink_c *) cLineNd_c::getPrev();
19 }
20
21 inline fLiNdBaLink_c *getNext() const {
22 return (fLiNdBaLink_c *) cLineNd_c::getNext();
23 }
24
25 /// @brief Removes this node from the owner's @ref fBase_c::mUnusedList "mUnusedList".
26 void clearData();
27
28 fBase_c *mpOwner; ///< The owner of this node.
29};
30
31/// @brief A base line node, with priority fields for reordering.
32/// @ingroup framework
33class fLiNdBaPr_c : public fLiNdBaLink_c {
34public:
35
36 /// @brief Constructs a new list node.
37 /// @param owner The node's owner.
38 fLiNdBaPr_c(fBase_c *owner) : fLiNdBaLink_c(owner), mOrder(0), mNewOrder(0) {}
39
40 fLiNdBaPr_c *getPrev() const {
41 return (fLiNdBaPr_c *) fLiNdBaLink_c::getPrev();
42 }
43
44 fLiNdBaPr_c *getNext() const {
45 return (fLiNdBaPr_c *) fLiNdBaLink_c::getNext();
46 }
47
48 u16 getOrder() const {
49 return mOrder;
50 }
51
52 u16 getNewOrder() const {
53 return mNewOrder;
54 }
55
56 u16 mOrder; ///< The priority of this node. Lower values mean higher priority.
57 u16 mNewOrder; ///< The priority the node should change to if it differs from #mOrder.
58};
cLineNd_c()
Constructs a new list node.
Definition c_line.hpp:9
The base class for all scenes, actors and various other processes.
Definition f_base.hpp:17
A base line node, with priority fields for reordering.
Definition f_line_nd.hpp:33
u16 mOrder
The priority of this node. Lower values mean higher priority.
Definition f_line_nd.hpp:56
u16 mNewOrder
The priority the node should change to if it differs from mOrder.
Definition f_line_nd.hpp:57
fLiNdBaPr_c(fBase_c *owner)
Constructs a new list node.
Definition f_line_nd.hpp:38