NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
f_manager.hpp
1#pragma once
3#include <game/framework/f_list_mg_ptmf.hpp>
4#include <game/framework/f_list_mg.hpp>
5#include <game/framework/f_list_nd.hpp>
6#include <game/framework/f_list_nd_prio.hpp>
7#include <game/framework/f_tree_mg_ptmf.hpp>
8#include <game/framework/f_tree_nd.hpp>
10
11#define GET_PROC_FLAG(proc) BIT_FLAG((proc)-1)
12
13class fBase_c;
14
71private:
72
75 NONE, CONNECT, CREATE, EXECUTE, DELETE, DRAW
76 };
77
80 PROC_FLAG_NONE = GET_PROC_FLAG(NONE),
81 PROC_FLAG_CONNECT = GET_PROC_FLAG(CONNECT),
82 PROC_FLAG_CREATE = GET_PROC_FLAG(CREATE),
83 PROC_FLAG_EXECUTE = GET_PROC_FLAG(EXECUTE),
84 PROC_FLAG_DELETE = GET_PROC_FLAG(DELETE),
85 PROC_FLAG_DRAW = GET_PROC_FLAG(DRAW)
86 };
87
91 mConnectNode(owner),
92 mMainNode(owner),
93 mDrawNode(owner),
94 mSearchNode(owner) {}
95
98
99public:
103 static void mainLoop();
104
107 static fBase_c *searchBaseByID(fBaseID_e id);
108
111 static fBase_c *searchBaseByProfName(ProfileName profID, const fBase_c *parent);
112
115 static fBase_c *searchBaseByGroupType(unsigned char groupType, const fBase_c *parent);
116
117private:
119
125
131
136
139 static u32 m_StopProcInf;
140
145
146 friend class fBase_c;
147};
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
A base list made of fLiNdPrio_c nodes, with a reference to a process function.
A base list node.
Definition f_list_nd.hpp:11
A base list node, with priority fields for reordering.
Manages the execution of base operations.
Definition f_manager.hpp:70
static fLiMgPTMF_c m_drawManage
A list of all the bases scheduled for drawing.
static fTrMgPTMF_c m_connectManage
A tree that connects all loaded bases.
static fLiMgBa_c m_searchManage[8]
An array of lists used for base lookup.
static LOOP_PROC_e m_nowLoopProc
The current operation being globally executed. See mainLoop.
static fBase_c * searchBaseByGroupType(unsigned char groupType, const fBase_c *parent)
Searches for a base with a given group type, optionally under a given parent.
Definition f_manager.cpp:41
LOOP_PROC_e
The operation types.
Definition f_manager.hpp:74
PROC_FLAGS_e
The operation disable flags, induced from LOOP_PROC_e.
Definition f_manager.hpp:79
static fLiMgPTMF_c m_executeManage
A list of all the bases scheduled for execution.
static u32 m_StopProcInf
[Unused]. The operations which should be globally skipped this frame.
int getSearchTableNum()
Gets the index of the search list the owning base was added to. See m_searchManage.
Definition f_manager.cpp:14
static fLiMgPTMF_c m_deleteManage
A list of all the bases scheduled for deletion.
fLiNdPrio_c mDrawNode
The node in the draw list.
static void mainLoop()
Executes the currently enabled operations on all the bases in the respective lists.
Definition f_manager.cpp:56
fTrNdBa_c mConnectNode
The node in the connect tree.
static fLiMgPTMF_c m_createManage
A list of all the bases scheduled for creation.
fLiNdBa_c mSearchNode
The node in the search lists.
fLiNdPrio_c mMainNode
The node in the create, execute or delete list.
static fBase_c * searchBaseByID(fBaseID_e id)
Searches for a base with the given ID.
Definition f_manager.cpp:18
static fBase_c * searchBaseByProfName(ProfileName profID, const fBase_c *parent)
Searches for a base with a given profile name, optionally under a given parent.
Definition f_manager.cpp:26
fManager_c(fBase_c *owner)
Constructs a new manager.
Definition f_manager.hpp:90
A base tree made of fTrNdBa_c nodes, with a reference to a process function.
A base tree node.
Definition f_tree_nd.hpp:12
fBaseID_e
A unique identifier for each base.
Definition f_base_id.hpp:6
u16 ProfileName
The name of a profile. Value is a fProfile::PROFILE_NAME_e.
Definition f_profile.hpp:32