NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
f_list_mg_ptmf.hpp
1#pragma once
2
3#include <types.h>
4#include <game/framework/f_list_mg.hpp>
5#include <game/framework/f_list_nd_prio.hpp>
6
7class fBase_c;
8
9/// @brief A base list made of fLiNdPrio_c nodes, with a reference to a process function.
10/// @ingroup framework
11/// @unofficial
12class fLiMgPTMF_c : public fLiMgBa_c {
13public:
14
15 /// @brief Constructs a new list.
16 /// @param procFunc The process function, or @p nullptr.
17 fLiMgPTMF_c(int (fBase_c::*procFunc)()) : mpProcFunc(procFunc) {}
18
19 /**
20 * @brief Adds a node to the list, according to its priority.
21 *
22 * @param node The node to insert.
23 * @return If the operation was successful.
24 */
25 bool addNode(fLiNdPrio_c *node);
26
27 /// @brief Calls the @ref ::mpProcFunc "process function" on each base in the list.
28 /// @return Always returns true.
29 bool walkPack();
30
31 fLiNdPrio_c *getFirst() const {
32 return (fLiNdPrio_c *) fLiMgBa_c::getFirst();
33 }
34
35 fLiNdPrio_c *getLast() const {
36 return (fLiNdPrio_c *) fLiMgBa_c::getLast();
37 }
38
39private:
40 int (fBase_c::*mpProcFunc)(); ///< The process function for the list.
41};
The base class for all scenes, actors and various other processes.
Definition f_base.hpp:119
A base list, made of fLiNdBa_c nodes.
Definition f_list_mg.hpp:13
bool addNode(fLiNdPrio_c *node)
Adds a node to the list, according to its priority.
Definition f_list.cpp:6
int(fBase_c::* mpProcFunc)()
The process function for the list.
fLiMgPTMF_c(int(fBase_c::*procFunc)())
Constructs a new list.
bool walkPack()
Calls the process function on each base in the list.
Definition f_list.cpp:31
A base list node, with priority fields for reordering.