NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
f_profile.hpp
Go to the documentation of this file.
1#pragma once
2#include <types.h>
3#include <game/framework/f_profile_name.hpp>
4/// @file
5
6/// @addtogroup profile
7/// @{
8
9/// @brief Creates a basic profile with the given execute and draw order values.
10/// @hideinitializer
11#define CUSTOM_BASE_PROFILE(profName, className, executeOrder, drawOrder) void *className##_classInit() { return new className(); } \
12 fProf::fBaseProfile_c g_profile_##profName = { &className##_classInit, executeOrder, drawOrder }
13
14/// @brief Creates an actor profile with the given execute/draw order and actor property values.
15/// @hideinitializer
16#define CUSTOM_ACTOR_PROFILE(profName, className, executeOrder, drawOrder, properties) void *className##_classInit() { return new className(); } \
17 fProf::fActorProfile_c g_profile_##profName = { &className##_classInit, executeOrder, drawOrder, properties }
18
19/// @brief Creates a basic profile, using the profile number as the execute and draw order value.
20/// @details The execution order is set to the profile number.
21/// @hideinitializer
22/// @see ACTOR_PROFILE
23#define BASE_PROFILE(profName, className) CUSTOM_BASE_PROFILE(profName, className, fProf::profName, fProf::DRAW_ORDER::profName);
24
25/// @brief Creates an actor profile, using the profile number as the execute and draw order value.
26/// @details The execution order is set to the profile number.
27/// @hideinitializer
28/// @see BASE_PROFILE
29#define ACTOR_PROFILE(profName, className, properties) CUSTOM_ACTOR_PROFILE(profName, className, fProf::profName, fProf::DRAW_ORDER::profName, properties);
30
31/// @brief The name of a profile. Value is a fProf::PROFILE_NAME_e.
32typedef u16 ProfileName;
33
34/**
35 * @brief Obtains a string representing the profile name.
36 * @unused
37 * @param profName The profile name to get the name string of.
38 * @return The profile name in string form.
39 */
40char *dProf_getName(ProfileName profName);
41
42/// @}
43
44/// @brief For all profile related structures.
45/// @unofficial
46/// @ingroup framework
47/// @ingroup profile
48namespace fProf {
49
50 /// @addtogroup profile
51 /// @{
52
53 /// @brief A set of basic information needed to construct a generic base.
55 void *(*mpClassInit)(); ///< The constructor function.
56 u16 mExecuteOrder; ///< The execution priority of the base. Lower values mean higher priority.
57 u16 mDrawOrder; ///< The draw priority of the base. Lower values mean higher priority.
58 };
59
60 /// @brief A set of basic information needed to construct an actor base.
62 void *(*mpClassInit)(); ///< The constructor function.
63 u16 mExecuteOrder; ///< The execution priority of the base. Lower values mean higher priority.
64 u16 mDrawOrder; ///< The draw priority of the base. Lower values mean higher priority.
65
66 /// @brief Various actor-related properties.
67 /// @details These properties will be copied @ref dBaseActor_c::mActorProperties "into the actor"
68 /// when it is constructed; this grants easy access to the properties and allows individual actor
69 /// configuration.
70 /// @todo Document the bitfield.
72 };
73
74 /// @}
75};
76
77/// @brief A manager for the profile list.
78/// @ingroup framework
79/// @ingroup profile
81public:
83 const fProf::fBaseProfile_c *mBaseProfile; ///< A base profile.
84 const fProf::fActorProfile_c *mActorProfile; ///< An actor profile.
85 };
86
87 static const fProfilePtr_c (*m_data_p)[fProf::PROFILE_COUNT]; ///< A list of all profiles.
88};
A manager for the profile list.
Definition f_profile.hpp:80
static const fProfilePtr_c(* m_data_p)[fProf::PROFILE_COUNT]
A list of all profiles.
Definition f_profile.hpp:87
char * dProf_getName(ProfileName profName)
Obtains a string representing the profile name.
u16 ProfileName
The name of a profile. Value is a fProf::PROFILE_NAME_e.
Definition f_profile.hpp:32
@ PROFILE_COUNT
The total number of profiles.
For all profile related structures.
Definition f_profile.hpp:48
A set of basic information needed to construct an actor base.
Definition f_profile.hpp:61
u16 mExecuteOrder
The execution priority of the base. Lower values mean higher priority.
Definition f_profile.hpp:63
u16 mDrawOrder
The draw priority of the base. Lower values mean higher priority.
Definition f_profile.hpp:64
u32 mActorProperties
Various actor-related properties.
Definition f_profile.hpp:71
A set of basic information needed to construct a generic base.
Definition f_profile.hpp:54
u16 mExecuteOrder
The execution priority of the base. Lower values mean higher priority.
Definition f_profile.hpp:56
u16 mDrawOrder
The draw priority of the base. Lower values mean higher priority.
Definition f_profile.hpp:57
const fProf::fBaseProfile_c * mBaseProfile
A base profile.
Definition f_profile.hpp:83
const fProf::fActorProfile_c * mActorProfile
An actor profile.
Definition f_profile.hpp:84