mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-04 02:09:46 -04:00
Player Docs: public facing csAction things (#1459)
* public cs * comments
This commit is contained in:
+25
-4
@@ -1402,7 +1402,17 @@ void Actor_SpawnHorse(PlayState* play, Player* player) {
|
||||
Horse_Spawn(play, player);
|
||||
}
|
||||
|
||||
s32 func_800B724C(PlayState* play, Actor* actor, u8 csAction) {
|
||||
/**
|
||||
* Sets a Player Cutscene Action specified by `csAction`.
|
||||
*
|
||||
* `haltActorsDuringCsAction` being set to false in this function means that all actors will
|
||||
* be able to update while Player is performing the cutscene action.
|
||||
*
|
||||
* Note: due to how player implements initializing the cutscene action state, `haltActorsDuringCsAction`
|
||||
* will only be considered the first time player starts a `csAction`.
|
||||
* Player must leave the cutscene action state and enter it again before halting actors can be toggled.
|
||||
*/
|
||||
s32 Player_SetCsAction(PlayState* play, Actor* csActor, u8 csAction) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((player->csAction == PLAYER_CSACTION_5) ||
|
||||
@@ -1411,15 +1421,26 @@ s32 func_800B724C(PlayState* play, Actor* actor, u8 csAction) {
|
||||
}
|
||||
|
||||
player->csAction = csAction;
|
||||
player->csActor = actor;
|
||||
player->csActor = csActor;
|
||||
player->cv.haltActorsDuringCsAction = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_800B7298(PlayState* play, Actor* actor, u8 csAction) {
|
||||
/**
|
||||
* Sets a Player Cutscene Action specified by `csAction`.
|
||||
*
|
||||
* `haltActorsDuringCsAction` being set to true in this function means that eventually `PLAYER_STATE1_20000000` will be
|
||||
* set. This makes it so actors belonging to categories `ACTORCAT_ENEMY` and `ACTORCAT_MISC` will not update while
|
||||
* Player is performing the cutscene action.
|
||||
*
|
||||
* Note: due to how player implements initializing the cutscene action state, `haltActorsDuringCsAction`
|
||||
* will only be considered the first time player starts a `csAction`.
|
||||
* Player must leave the cutscene action state and enter it again before halting actors can be toggled.
|
||||
*/
|
||||
s32 Player_SetCsActionWithHaltedActors(PlayState* play, Actor* csActor, u8 csAction) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (func_800B724C(play, actor, csAction)) {
|
||||
if (Player_SetCsAction(play, csActor, csAction)) {
|
||||
player->cv.haltActorsDuringCsAction = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user