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 fProfile::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 const fProfile::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, fProfile::profName, fProfile::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, fProfile::profName, fProfile::DRAW_ORDER::profName, properties);
30
31/// @brief The name of a profile. Value is a fProfile::PROFILE_NAME_e.
32typedef u16 ProfileName;
33
34/**
35 * @unused Obtains a string representing the profile name.
36 * @param profName The profile name to get the name string of.
37 * @return The profile name in string form.
38 */
39char *dProf_getName(ProfileName profName);
40
41/// @}
42
43/// @brief For all profile related structures.
44/// @unofficial
45/// @decompnote{The compilation order suggests that this file might have been grouped together with the
46/// rest of @ref framework, so a similar naming scheme has been applied here.}
47namespace fProfile {
48
49 /// @addtogroup profile
50 /// @{
51
52 /// @brief A set of basic information needed to construct a generic base.
54 void *(*mpClassInit)(); ///< The constructor function.
55 u16 mExecuteOrder; ///< The execution priority of the base. Lower values mean higher priority.
56 u16 mDrawOrder; ///< The draw priority of the base. Lower values mean higher priority.
57 };
58
59 /// @brief A set of basic information needed to construct an actor base.
61
62 /// @brief Various actor-related properties.
63 /// @details These properties will be copied @ref dBaseActor_c::mActorProperties "into the actor"
64 /// when it is constructed; this grants easy access to the properties and allows individual actor
65 /// configuration.
66 /// @todo Document the bitfield.
68 };
69
70 extern const fBaseProfile_c *(*sProfileList)[PROFILE_COUNT]; ///< A list of all profiles.
71 /// @}
72
73} // namespace fProfile
char * dProf_getName(ProfileName profName)
[Unused]. 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
@ PROFILE_COUNT
The total number of profiles.
For all profile related structures.
Definition f_profile.hpp:47
A set of basic information needed to construct an actor base.
Definition f_profile.hpp:60
u32 mActorProperties
Various actor-related properties.
Definition f_profile.hpp:67
A set of basic information needed to construct a generic base.
Definition f_profile.hpp:53
u16 mDrawOrder
The draw priority of the base. Lower values mean higher priority.
Definition f_profile.hpp:56
u16 mExecuteOrder
The execution priority of the base. Lower values mean higher priority.
Definition f_profile.hpp:55