3#include <game/bases/d_actor.hpp>
4#include <game/bases/d_actor_data.hpp>
5#include <game/bases/d_cd.hpp>
6#include <game/mLib/m_vec.hpp>
9#define GROUP_ID(param) (param >> 24)
13 enum BOUND_SCROLL_DIR_X_e {
14 BOUND_SCROLL_X_RIGHT = -1,
19 enum BOUND_SCROLL_DIR_Y_e {
20 BOUND_SCROLL_Y_DOWN = -1,
25 int mScrollBoundaryTileX, mScrollBoundaryTileY;
26 int mTileLeft, mTileRight, mTileTop, mTileBottom;
27 BOUND_SCROLL_DIR_X_e mScrollDirX;
28 BOUND_SCROLL_DIR_Y_e mScrollDirY;
50 bool ScroolAreaInCheck(
int boundsEdge,
int areaEdge,
int boundMin,
int boundMax,
int areaMin,
int areaMax);
54 bool ScroolAreaInLoopCheck(
int boundsEdge,
int areaEdge,
int boundMin,
int boundMax,
int areaMin,
int areaMax);
Manager for map actor creation.
int mScreenTopPos
The screen's top edge.
int mZPosCount
The Z position index for the next spawned actor.
void incZposCount()
Updates the Z-position index for the next spawned actor.
bool mIsEndingDemo
Whether an end-of-level cutscene is active.
int mMapObjZPosCount
The Z position index for the next spawned non-enemy actor.
dActor_c * mapActorSpawn(sMapActorData *data, dActorData_c *info, u8 *spawnFlags, u16 *deleteVal, u8 areaNo)
Spawns an actor from the corresponding map actor data.
int mPrevScrollBoundaryTileY
The previous scroll boundary on the Y axis, used to check if the screen has scrolled.
bool GroupIdCheck(ulong param)
Checks whether the provided actor parameters contain a group ID definition.
void incZposCount_layer2()
Updates the Z-position index for the next spawned actor on layer 2.
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.
void incMapObjZposCount_layer2()
Updates the Z-position index for the next spawned non-enemy actor on layer 2.
void setMapActorCreate_next()
Initializes map actors on area reload.
bool GlobalActorCheck(sMapActorData *data)
Checks whether the profile associated to the map actor is allowed to ignore screen bounds on spawn.
static const ProfileName l_GoAheadEnemy[]
The profiles allowed to spawn outside of the screen.
void processGroupId(sMapActorData *data, u8 file, u32 mapActorIdx)
Adds a group-based map actor to the group manager.
float addMapObjZposCount_layer2()
Gets the Z position for the next spawned non-enemy actor on layer 2.
void incMapObjZposCount()
Updates 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.
int mScreenLeftPos
The screen's left edge.
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).
void ActorCreateInfoClear()
Resets all temporary data for map actor spawning.
int mPrevScrollBoundaryTileX
The previous scroll boundary on the X axis, used to check if the screen has scrolled.
int mZPosCountLayer2
The Z position index for the next spawned actor on layer 2.
void MapActorScroolCreateCheck()
Checks for screen scrolling and zoom changes to trigger spawning of nearby actors.
bool mIsGoalPoleDemo
Whether a goal flagpole cutscene is active.
void MapActorInital_next()
Triggers actor creation on area reload.
float addMapObjZposCount()
Gets the Z position for the next spawned non-enemy actor.
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).
float addZposCount()
Gets the Z position for the next spawned actor.
float addZposCount_layer2()
Gets the Z position for the next spawned actor on layer 2.
void MapActorInital_set()
Triggers actor creation on first area load.
u16 mDeleteVals[MAX_MAP_ACTOR_COUNT]
A value that each map actor can write to when it is deleted.
void MapActorInitialCreate(sMapActorData *levelData, u16 *deleteVal, u8 *spawnFlags, int mapActorCount, bool isAreaReload)
Manages actor spawning when entering a level or area.
void MapActorScrollCreate(sMapActorCreateBounds *createBounds, int isScreenScroll)
Performs spawning of nearby actors as they enter the screen via scrolling or zoom changes.
void setMapActorCreate()
Initializes map actors on first area load.
static dActorCreateMng_c * m_instance
The static instance of the map actor creation manager.
The configuration for a map actor.
The minimum required implementation for a stage actor.
#define MAX_MAP_ACTOR_COUNT
The maximum number of map actors that can exist simultaneously.
u16 ProfileName
The name of a profile. Value is a fProfile::PROFILE_NAME_e.