NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_actor_data.hpp
1#pragma once
2
3#include <types.h>
5
6/// @unofficial
7enum MAP_ACTOR_INFO_FLAG_e {
8 ACTOR_CREATE_GLOBAL = BIT_FLAG(1), ///< The actor spawns regardless of its distance to the camera.
9 ACTOR_CREATE_UNK_4 = BIT_FLAG(2), ///< [Seemingly only used for sprites that mess with the camera (Zoom, Scroll Limiters).]
10 ACTOR_CREATE_MAPOBJ = BIT_FLAG(3), ///< Identifies the actor as a map object (blocks, surfaces and decorations) rather than an enemy.
11 ACTOR_CREATE_GROUPABLE = BIT_FLAG(4) ///< Allows the actor to be managed by a Group Controller if a valid Group ID is provided.
12};
13
14/// @brief The configuration for a map actor.
16public:
17 ProfileName mProfileName; ///< The profile spawned by the map actor.
18 int mSpawnOffsetX; ///< The horizontal offset from the map actor to the actor's spawn position.
19 int mSpawnOffsetY; ///< The vertical offset from the map actor to the actor's spawn position.
20 int mSpawnRangeOffsetX; ///< The horizontal offset of the actor's bounding box from the actor's position.
21 int mSpawnRangeOffsetY; ///< The vertical offset of the actor's bounding box from the actor's position.
22 int mSpawnRangeHalfWidth; ///< The half-width of the actor's bounding box.
23 int mSpawnRangeHalfHeight; ///< The half-height of the actor's bounding box.
24 u16 mSpawnMarginTop; ///< The additional padding added to the top of the bounding box to prevent pop-in.
25 u16 mSpawnMarginBottom; ///< The additional padding added to the bottom of the bounding box to prevent pop-in.
26 u16 mSpawnMarginLeft; ///< The additional padding added to the left of the bounding box to prevent pop-in.
27 u16 mSpawnMarginRight; ///< The additional padding added to the right of the bounding box to prevent pop-in.
28 u16 mFlags; ///< Various flags that control map actor spawning behaviour. Value is a bitfield from MAP_ACTOR_INFO_FLAG_e.
29
30 static dActorData_c l_actor_data_tbl[]; ///< The configuration for each map actor.
31 static inline dActorData_c *getMapActorInfo(int idx) { return &l_actor_data_tbl[idx]; }
32};
The configuration for a map actor.
int mSpawnRangeOffsetY
The vertical offset of the actor's bounding box from the actor's position.
u16 mSpawnMarginBottom
The additional padding added to the bottom of the bounding box to prevent pop-in.
int mSpawnRangeHalfWidth
The half-width of the actor's bounding box.
u16 mFlags
Various flags that control map actor spawning behaviour. Value is a bitfield from MAP_ACTOR_INFO_FLAG...
ProfileName mProfileName
The profile spawned by the map actor.
int mSpawnOffsetY
The vertical offset from the map actor to the actor's spawn position.
u16 mSpawnMarginTop
The additional padding added to the top of the bounding box to prevent pop-in.
u16 mSpawnMarginLeft
The additional padding added to the left of the bounding box to prevent pop-in.
int mSpawnRangeOffsetX
The horizontal offset of the actor's bounding box from the actor's position.
static dActorData_c l_actor_data_tbl[]
The configuration for each map actor.
int mSpawnOffsetX
The horizontal offset from the map actor to the actor's spawn position.
u16 mSpawnMarginRight
The additional padding added to the right of the bounding box to prevent pop-in.
int mSpawnRangeHalfHeight
The half-height of the actor's bounding box.
u16 ProfileName
The name of a profile. Value is a fProfile::PROFILE_NAME_e.
Definition f_profile.hpp:32