1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 15:34:41 +00:00

Player Docs: public facing csAction things (#1561)

* name public csAction functions

* format

* adjust function comment

* format
This commit is contained in:
fig02 2023-10-28 07:46:24 -04:00 committed by GitHub
parent 3475651701
commit 4908b8b37c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
64 changed files with 359 additions and 317 deletions

View file

@ -1057,20 +1057,45 @@ void func_8002DF18(PlayState* play, Player* player) {
func_8006DC68(play, player);
}
s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction) {
/**
* Sets a Player Cutscene Action specified by `csAction`.
* There are no safety checks to see if Player is already in some form of a cutscene state.
* This will instantly take effect.
*
* `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);
player->csAction = csAction;
player->unk_448 = actor;
player->csActor = csActor;
player->cv.haltActorsDuringCsAction = false;
return true;
}
s32 func_8002DF54(PlayState* play, Actor* actor, u8 csAction) {
/**
* Sets a Player Cutscene Action specified by `csAction`.
* There are no safety checks to see if Player is already in some form of a cutscene state.
* This will instantly take effect.
*
* `haltActorsDuringCsAction` being set to true in this function means that eventually `PLAYER_STATE1_29` 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);
func_8002DF38(play, actor, csAction);
Player_SetCsAction(play, csActor, csAction);
player->cv.haltActorsDuringCsAction = true;
return true;