NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_base.cpp
Go to the documentation of this file.
1#include <game/bases/d_base.hpp>
2#include <game/bases/d_game_com.hpp>
4#include <constants/sjis_constants.h>
5/// @file
6
7/// @brief Random seed written to after dBase_c::preDraw.
8/// @decompnote{Not part of the dBase_c class as its mangled hash is the same as the demangled hash.}
9/// @unofficial
10/// @unused
12
16
18
20
21 // [Possibly a stripped assert? No way someone is this dumb]
22 const dBase_c* searchParent;
23 if (parent != nullptr) {
24 searchParent = parent;
25 } else {
26 searchParent = nullptr;
27 }
28
29 dBase_c* foundBase = (dBase_c*) fManager_c::searchBaseByProfName(profile, searchParent);
30
31 // [Same here]
32 if (foundBase != nullptr) {
33 return foundBase;
34 }
35 return nullptr;
36}
37
39 return (fBase_c::preCreate() != NOT_READY);
40}
41
45
47 return (fBase_c::preDelete() != NOT_READY);
48}
49
53
58
62
67
71
72const char *dBase_c::getKindString() const {
73 return D_BASE_KIND_STRING;
74}
75
77 return FAILED;
78}
79
81
86
87dBase_c *dBase_c::createBase(ProfileName profName, dBase_c *parent, unsigned long param, u8 groupType) {
88 return (dBase_c*)fBase_c::createChild(profName, parent, param, groupType);
89}
90
91dBase_c *dBase_c::createRoot(ProfileName profName, unsigned long param, u8 groupType) {
92 return (dBase_c*)fBase_c::createRoot(profName, param, groupType);
93}
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
virtual int preCreate()
pre method for the create operation.
Definition f_base.cpp:92
static int(* sLoadAsyncCallback)()
See Unused Content.
Definition f_base.hpp:269
virtual int preDelete()
pre method for the delete operation.
Definition f_base.cpp:126
static fBase_c * createChild(ProfileName profName, fBase_c *parent, unsigned long param, u8 groupType)
Creates a child base under the given parent.
Definition f_base.cpp:511
virtual int preExecute()
pre method for the execute operation.
Definition f_base.cpp:172
virtual void postCreate(MAIN_STATE_e state)
post method for the create operation.
Definition f_base.cpp:96
ProfileName mProfName
The base's profile name.
Definition f_base.hpp:57
virtual void postExecute(MAIN_STATE_e state)
post method for the execute operation.
Definition f_base.cpp:180
virtual int preDraw()
pre method for the draw operation.
Definition f_base.cpp:192
static fBase_c * createRoot(ProfileName profName, unsigned long param, u8 groupType)
Creates a root base.
Definition f_base.cpp:518
virtual void postDraw(MAIN_STATE_e state)
post method for the draw operation.
Definition f_base.cpp:200
virtual void postDelete(MAIN_STATE_e state)
post method for the delete operation.
Definition f_base.cpp:142
@ NOT_READY
The step could not completed at this time.
Definition f_base.hpp:39
@ FAILED
The step could not be completed.
Definition f_base.hpp:41
static void(* sUnloadCallback)()
See Unused Content.
Definition f_base.hpp:270
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
static u32 g_basesRandomSeed
Random seed written to after dBase_c::preDraw.
Definition d_base.cpp:11
char * dProf_getName(ProfileName profName)
Obtains a string representing the profile name.
u16 ProfileName
The name of a profile. Value is a fProfile::PROFILE_NAME_e.
Definition f_profile.hpp:32
u32 getRandomSeed()
Gets a seed used for randomness.