|
NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <game/bases/d_actorcreate_manager.hpp>
Manager for map actor creation.
Definition at line 34 of file d_actorcreate_manager.hpp.
Public Member Functions | |
| void | ActorCreateInfoClear () |
| Resets all temporary data for map actor spawning. | |
| bool | ScroolAreaInCheck (int boundsEdge, int areaEdge, int boundMin, int boundMax, int areaMin, int areaMax) |
| Checks whether an actor should be spawned based on the camera's current scroll position. | |
| bool | ScroolAreaInLoopCheck (int boundsEdge, int areaEdge, int boundMin, int boundMax, int areaMin, int areaMax) |
| Checks whether an actor should be spawned due to being close to a screen edge (for looping stages). | |
| void | setMapActorCreate () |
| Initializes map actors on first area load. | |
| void | setMapActorCreate_next () |
| Initializes map actors on area reload. | |
| void | MapActorInital_set () |
| Triggers actor creation on first area load. | |
| void | MapActorInital_next () |
| Triggers actor creation on area reload. | |
| bool | GlobalActorCheck (sMapActorData *data) |
| Checks whether the profile associated to the map actor is allowed to ignore screen bounds on spawn. | |
| void | processGroupId (sMapActorData *data, u8 file, u32 mapActorIdx) |
| Adds a group-based map actor to the group manager. | |
| bool | GroupIdCheck (ulong param) |
| Checks whether the provided actor parameters contain a group ID definition. | |
| void | MapActorInitialCreate (sMapActorData *levelData, u16 *deleteVal, u8 *spawnFlags, int mapActorCount, bool isAreaReload) |
| Manages actor spawning when entering a level or area. | |
| void | MapActorScroolCreateCheck () |
| Checks for screen scrolling and zoom changes to trigger spawning of nearby actors. | |
| void | MapActorScrollCreate (sMapActorCreateBounds *createBounds, int isScreenScroll) |
| Performs spawning of nearby actors as they enter the screen via scrolling or zoom changes. | |
| void | incZposCount () |
| Updates the Z-position index for the next spawned actor. | |
| float | addZposCount () |
| Gets the Z position for the next spawned actor. | |
| void | incZposCount_layer2 () |
| Updates the Z-position index for the next spawned actor on layer 2. | |
| float | addZposCount_layer2 () |
| Gets the Z position for the next spawned actor on layer 2. | |
| void | incMapObjZposCount () |
| Updates the Z-position index for the next spawned non-enemy actor. | |
| float | addMapObjZposCount () |
| Gets the Z position for the next spawned non-enemy actor. | |
| void | incMapObjZposCount_layer2 () |
| Updates the Z-position index for the next spawned non-enemy actor on layer 2. | |
| float | addMapObjZposCount_layer2 () |
| Gets the Z position for the next spawned non-enemy actor on layer 2. | |
| dActor_c * | mapActorSpawn (sMapActorData *data, dActorData_c *info, u8 *spawnFlags, u16 *deleteVal, u8 areaNo) |
| Spawns an actor from the corresponding map actor data. | |
Public Attributes | |
| int | mZPosCount |
| The Z position index for the next spawned actor. | |
| int | mZPosCountLayer2 |
| The Z position index for the next spawned actor on layer 2. | |
| int | mMapObjZPosCount |
| The Z position index for the next spawned non-enemy actor. | |
| int | mMapObjZPosCountLayer2 |
| The Z position index for the next spawned non-enemy actor on layer 2. | |
| u16 | mDeleteVals [MAX_MAP_ACTOR_COUNT] |
| A value that each map actor can write to when it is deleted. | |
| u8 | mSpawnFlags [MAX_MAP_ACTOR_COUNT] |
| Flags indicating each map actor' spawn status. See dActor_c::ACTOR_SPAWN_FLAG_e. | |
| u16 | mYoshiColor |
| The color of the next spawned Yoshi (egg). | |
| bool | mIsEndingDemo |
| Whether an end-of-level cutscene is active. | |
| bool | mIsGoalPoleDemo |
| Whether a goal flagpole cutscene is active. | |
| int | mScreenLeftPos |
| The screen's left edge. | |
| int | mScreenTopPos |
| The screen's top edge. | |
| int | mPrevScrollBoundaryTileX |
| The previous scroll boundary on the X axis, used to check if the screen has scrolled. | |
| int | mPrevScrollBoundaryTileY |
| The previous scroll boundary on the Y axis, used to check if the screen has scrolled. | |
Static Public Attributes | |
| static const ProfileName | l_GoAheadEnemy [] |
| The profiles allowed to spawn outside of the screen. | |
| static dActorCreateMng_c * | m_instance |
| The static instance of the map actor creation manager. | |
| void dActorCreateMng_c::ActorCreateInfoClear | ( | ) |
Resets all temporary data for map actor spawning.
Definition at line 20 of file d_actorcreate_manager.cpp.
| bool dActorCreateMng_c::ScroolAreaInCheck | ( | int | boundsEdge, |
| int | areaEdge, | ||
| int | boundMin, | ||
| int | boundMax, | ||
| int | areaMin, | ||
| int | areaMax ) |
Checks whether an actor should be spawned based on the camera's current scroll position.
This check succeeds if the actor spawn area's edge lies exactly on the screen boundary's edge and the area overlaps with the boundary on the perpendicular axis.
| boundsEdge | The coordinate of the screen boundary edge (on the axis of movement), in tiles. |
| areaEdge | The coordinate of the actor's corresponding spawn area edge, in tiles. |
| boundMin | The minimum coordinate of the boundary on the perpendicular axis, in tiles. |
| boundMax | The maximum coordinate of the boundary on the perpendicular axis, in tiles. |
| areaMin | The minimum coordinate of the spawn area on the perpendicular axis, in tiles. |
| areaMax | The maximum coordinate of the spawn area on the perpendicular axis, in tiles. |
true if the actor should be spawned, false otherwise. Definition at line 30 of file d_actorcreate_manager.cpp.
| bool dActorCreateMng_c::ScroolAreaInLoopCheck | ( | int | boundsEdge, |
| int | areaEdge, | ||
| int | boundMin, | ||
| int | boundMax, | ||
| int | areaMin, | ||
| int | areaMax ) |
Checks whether an actor should be spawned due to being close to a screen edge (for looping stages).
Definition at line 37 of file d_actorcreate_manager.cpp.
| void dActorCreateMng_c::setMapActorCreate | ( | ) |
Initializes map actors on first area load.
Definition at line 41 of file d_actorcreate_manager.cpp.
| void dActorCreateMng_c::setMapActorCreate_next | ( | ) |
Initializes map actors on area reload.
Definition at line 58 of file d_actorcreate_manager.cpp.
| void dActorCreateMng_c::MapActorInital_set | ( | ) |
Triggers actor creation on first area load.
Definition at line 78 of file d_actorcreate_manager.cpp.
| void dActorCreateMng_c::MapActorInital_next | ( | ) |
Triggers actor creation on area reload.
Definition at line 89 of file d_actorcreate_manager.cpp.
| bool dActorCreateMng_c::GlobalActorCheck | ( | sMapActorData * | data | ) |
Checks whether the profile associated to the map actor is allowed to ignore screen bounds on spawn.
true if the actor is in the "global" whitelist. Definition at line 101 of file d_actorcreate_manager.cpp.
| void dActorCreateMng_c::processGroupId | ( | sMapActorData * | data, |
| u8 | file, | ||
| u32 | mapActorIdx ) |
Adds a group-based map actor to the group manager.
| data | The map actor to be added. |
| file | The course file the map actor is in. |
| mapActorIdx | The index of the map actor in the level data. |
Definition at line 117 of file d_actorcreate_manager.cpp.
| bool dActorCreateMng_c::GroupIdCheck | ( | ulong | param | ) |
Checks whether the provided actor parameters contain a group ID definition.
true if the actor does NOT use groups, false otherwise. Definition at line 121 of file d_actorcreate_manager.cpp.
| void dActorCreateMng_c::MapActorInitialCreate | ( | sMapActorData * | levelData, |
| u16 * | deleteVal, | ||
| u8 * | spawnFlags, | ||
| int | mapActorCount, | ||
| bool | isAreaReload ) |
Manages actor spawning when entering a level or area.
| levelData | The map actor data for the file/area. |
| deleteVal | A pointer to the delete value array for the file/area. |
| spawnFlags | A pointer to the spawn flags array for the file/area. |
| mapActorCount | The amount of map actors to process. |
| isAreaReload | Whether the area is being reloaded (e.g. next goto that points to the same area). |
Definition at line 125 of file d_actorcreate_manager.cpp.
| void dActorCreateMng_c::MapActorScroolCreateCheck | ( | ) |
Checks for screen scrolling and zoom changes to trigger spawning of nearby actors.
Definition at line 234 of file d_actorcreate_manager.cpp.
| void dActorCreateMng_c::MapActorScrollCreate | ( | sMapActorCreateBounds * | createBounds, |
| int | isScreenScroll ) |
Performs spawning of nearby actors as they enter the screen via scrolling or zoom changes.
| createBounds | The boundary data required to perform the screen-based checks. |
| isScreenScroll | Whether the actor spawning is triggered by screen scrolling (1) or zoom changes (0). |
Definition at line 352 of file d_actorcreate_manager.cpp.
| void dActorCreateMng_c::incZposCount | ( | ) |
Updates the Z-position index for the next spawned actor.
Definition at line 450 of file d_actorcreate_manager.cpp.
| float dActorCreateMng_c::addZposCount | ( | ) |
Gets the Z position for the next spawned actor.
Definition at line 457 of file d_actorcreate_manager.cpp.
| void dActorCreateMng_c::incZposCount_layer2 | ( | ) |
Updates the Z-position index for the next spawned actor on layer 2.
Definition at line 463 of file d_actorcreate_manager.cpp.
| float dActorCreateMng_c::addZposCount_layer2 | ( | ) |
Gets the Z position for the next spawned actor on layer 2.
Definition at line 470 of file d_actorcreate_manager.cpp.
| void dActorCreateMng_c::incMapObjZposCount | ( | ) |
Updates the Z-position index for the next spawned non-enemy actor.
Definition at line 476 of file d_actorcreate_manager.cpp.
| float dActorCreateMng_c::addMapObjZposCount | ( | ) |
Gets the Z position for the next spawned non-enemy actor.
Definition at line 483 of file d_actorcreate_manager.cpp.
| void dActorCreateMng_c::incMapObjZposCount_layer2 | ( | ) |
Updates the Z-position index for the next spawned non-enemy actor on layer 2.
Definition at line 489 of file d_actorcreate_manager.cpp.
| float dActorCreateMng_c::addMapObjZposCount_layer2 | ( | ) |
Gets the Z position for the next spawned non-enemy actor on layer 2.
Definition at line 496 of file d_actorcreate_manager.cpp.
| dActor_c * dActorCreateMng_c::mapActorSpawn | ( | sMapActorData * | data, |
| dActorData_c * | info, | ||
| u8 * | spawnFlags, | ||
| u16 * | deleteVal, | ||
| u8 | areaNo ) |
Spawns an actor from the corresponding map actor data.
| data | The map actor data. |
| info | The map actor info. |
| spawnFlags | A pointer to the actor's spawn flags. |
| deleteVal | A pointer to the actor's delete value, or nullptr . |
| areaNo | The zone the actor will be linked to. |
nullptr if it's a dummy actor or the actor creation fails. Definition at line 502 of file d_actorcreate_manager.cpp.
| int dActorCreateMng_c::mZPosCount |
The Z position index for the next spawned actor.
Definition at line 120 of file d_actorcreate_manager.hpp.
| int dActorCreateMng_c::mZPosCountLayer2 |
The Z position index for the next spawned actor on layer 2.
Definition at line 121 of file d_actorcreate_manager.hpp.
| int dActorCreateMng_c::mMapObjZPosCount |
The Z position index for the next spawned non-enemy actor.
Definition at line 122 of file d_actorcreate_manager.hpp.
| int dActorCreateMng_c::mMapObjZPosCountLayer2 |
The Z position index for the next spawned non-enemy actor on layer 2.
Definition at line 123 of file d_actorcreate_manager.hpp.
| u16 dActorCreateMng_c::mDeleteVals[MAX_MAP_ACTOR_COUNT] |
A value that each map actor can write to when it is deleted.
Definition at line 125 of file d_actorcreate_manager.hpp.
| u8 dActorCreateMng_c::mSpawnFlags[MAX_MAP_ACTOR_COUNT] |
Flags indicating each map actor' spawn status. See dActor_c::ACTOR_SPAWN_FLAG_e.
Definition at line 126 of file d_actorcreate_manager.hpp.
| u16 dActorCreateMng_c::mYoshiColor |
The color of the next spawned Yoshi (egg).
Definition at line 127 of file d_actorcreate_manager.hpp.
| bool dActorCreateMng_c::mIsEndingDemo |
Whether an end-of-level cutscene is active.
Definition at line 129 of file d_actorcreate_manager.hpp.
| bool dActorCreateMng_c::mIsGoalPoleDemo |
Whether a goal flagpole cutscene is active.
Definition at line 130 of file d_actorcreate_manager.hpp.
| int dActorCreateMng_c::mScreenLeftPos |
The screen's left edge.
Definition at line 132 of file d_actorcreate_manager.hpp.
| int dActorCreateMng_c::mScreenTopPos |
The screen's top edge.
Definition at line 133 of file d_actorcreate_manager.hpp.
| int dActorCreateMng_c::mPrevScrollBoundaryTileX |
The previous scroll boundary on the X axis, used to check if the screen has scrolled.
Definition at line 134 of file d_actorcreate_manager.hpp.
| int dActorCreateMng_c::mPrevScrollBoundaryTileY |
The previous scroll boundary on the Y axis, used to check if the screen has scrolled.
Definition at line 135 of file d_actorcreate_manager.hpp.
|
static |
The profiles allowed to spawn outside of the screen.
Definition at line 11 of file d_actorcreate_manager.hpp.
|
static |
The static instance of the map actor creation manager.
Definition at line 138 of file d_actorcreate_manager.hpp.