NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_base.hpp
1#pragma once
2#include <game/framework/f_base.hpp>
4
5/// @brief The minimum required implementation for a base.
6/// @ingroup bases
7class dBase_c : public fBase_c, public cOwnerSetMg_c {
8public:
9 /// @copydoc fBase_c::fBase_c
10 dBase_c();
11
12 virtual int preCreate();
13 virtual void postCreate(fBase_c::MAIN_STATE_e status);
14
15 virtual int preDelete();
16 virtual void postDelete(fBase_c::MAIN_STATE_e status);
17
18 virtual int preExecute();
19 virtual void postExecute(fBase_c::MAIN_STATE_e status);
20
21 virtual int preDraw();
22 virtual void postDraw(fBase_c::MAIN_STATE_e status);
23
24 /// @copydoc fBase_c::~fBase_c
25 virtual ~dBase_c();
26
27 /// @brief Gets the base's kind string.
28 virtual const char *getKindString() const;
29
30 /// @copydoc fManager_c::searchBaseByProfName
31 static dBase_c *searchBaseByProfName(ProfileName profile, const dBase_c* parent);
32
33 /// @brief Sets the callbacks for the scrapped relocatable profile system.
34 /// @unused
35 static void initLoader();
36
37 /// @copydoc fBase_c::createChild
38 static dBase_c *createBase(ProfileName profName, dBase_c *parent, unsigned long param, u8 groupType);
39
40 /// @copydoc fBase_c::createRoot
41 static dBase_c *createRoot(ProfileName profName, unsigned long param, u8 groupType);
42
43protected:
44 const char* mpKindString; ///< @brief The base's kind string. @unused
45 const char* mpNameString; ///< @brief The base's profile name string. @unused
46
47private:
48 /// @brief Module loading callback for the scrapped relocatable profile system.
49 /// @unofficial
50 /// @unused
51 /// @return Always returns @ref fBase_c::PACK_RESULT_e::FAILED "FAILED".
52 static int loadAsyncCallback();
53
54 /// @brief Module unloading callback for the scrapped relocatable profile system.
55 /// @unofficial
56 /// @unused
57 static void unloadCallback();
58};
cOwnerSetMg_c()
Constructs a new set container.
dBase_c()
Constructs a new base.
Definition d_base.cpp:13
static void initLoader()
Sets the callbacks for the scrapped relocatable profile system.
Definition d_base.cpp:82
virtual int preDelete()
pre method for the delete operation.
Definition d_base.cpp:46
virtual ~dBase_c()
Destroys the base.
Definition d_base.cpp:17
virtual void postExecute(fBase_c::MAIN_STATE_e status)
post method for the execute operation.
Definition d_base.cpp:59
const char * mpKindString
The base's kind string.
Definition d_base.hpp:44
virtual void postDraw(fBase_c::MAIN_STATE_e status)
post method for the draw operation.
Definition d_base.cpp:68
virtual void postCreate(fBase_c::MAIN_STATE_e status)
post method for the create operation.
Definition d_base.cpp:42
const char * mpNameString
The base's profile name string.
Definition d_base.hpp:45
virtual const char * getKindString() const
Gets the base's kind string.
Definition d_base.cpp:72
virtual int preDraw()
pre method for the draw operation.
Definition d_base.cpp:63
static dBase_c * createRoot(ProfileName profName, unsigned long param, u8 groupType)
Creates a root base.
Definition d_base.cpp:91
virtual void postDelete(fBase_c::MAIN_STATE_e status)
post method for the delete operation.
Definition d_base.cpp:50
virtual int preExecute()
pre method for the execute operation.
Definition d_base.cpp:54
virtual int preCreate()
pre method for the create operation.
Definition d_base.cpp:38
static dBase_c * createBase(ProfileName profName, dBase_c *parent, unsigned long param, u8 groupType)
Creates a child base under the given parent.
Definition d_base.cpp:87
static void unloadCallback()
Module unloading callback for the scrapped relocatable profile system.
Definition d_base.cpp:80
static int loadAsyncCallback()
Module loading callback for the scrapped relocatable profile system.
Definition d_base.cpp:76
static dBase_c * searchBaseByProfName(ProfileName profile, const dBase_c *parent)
Searches for a base with a given profile name, optionally under a given parent.
Definition d_base.cpp:19
MAIN_STATE_e
The possible operation results.
Definition f_base.hpp:30
fBase_c()
Constructs a new base.
Definition f_base.cpp:15
u16 ProfileName
The name of a profile. Value is a fProfile::PROFILE_NAME_e.
Definition f_profile.hpp:32