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 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 * @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{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 void *(*mpClassInit)(); ///< The constructor function.
62 u16 mExecuteOrder; ///< The execution priority of the base. Lower values mean higher priority.
63 u16 mDrawOrder; ///< The draw priority of the base. Lower values mean higher priority.
64
65 /// @brief Various actor-related properties.
66 /// @details These properties will be copied @ref dBaseActor_c::mActorProperties "into the actor"
67 /// when it is constructed; this grants easy access to the properties and allows individual actor
68 /// configuration.
69 /// @todo Document the bitfield.
71 };
72
74 const fBaseProfile_c *mBaseProfile; ///< A base profile.
75 const fActorProfile_c *mActorProfile; ///< An actor profile.
76 };
77
78 extern const fProfilePtr_c (*sProfileList)[PROFILE_COUNT]; ///< A list of all profiles.
79 /// @}
80
81} // namespace fProfile
const fProfilePtr_c(* sProfileList)[PROFILE_COUNT]
A list of all profiles.
Definition f_profile.cpp:5
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
@ 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
u16 mDrawOrder
The draw priority of the base. Lower values mean higher priority.
Definition f_profile.hpp:63
u32 mActorProperties
Various actor-related properties.
Definition f_profile.hpp:70
u16 mExecuteOrder
The execution priority of the base. Lower values mean higher priority.
Definition f_profile.hpp:62
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
const fActorProfile_c * mActorProfile
An actor profile.
Definition f_profile.hpp:75
const fBaseProfile_c * mBaseProfile
A base profile.
Definition f_profile.hpp:74