diff options
| author | Eblo <7004497+Eblo@users.noreply.github.com> | 2025-11-20 16:12:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-20 16:12:01 -0500 |
| commit | 38fa0061a261b5b5bbda49815ad39cf9336c845f (patch) | |
| tree | bde2d46b82a4a579c3f8a39b91bf3ead2693f024 /mm | |
| parent | c74531cd2d5be71cce63d63708c1d7932c4aca9e (diff) | |
Reset Invadepoh state (#1350)
* Reset sInvasionState in z_en_invadepoh.c
* Reset reward state as well
* Reset more static variables
* oh clang
* oh clang again
Diffstat (limited to 'mm')
| -rw-r--r-- | mm/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mm/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c b/mm/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c index 6d55e117e..96a18b977 100644 --- a/mm/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c +++ b/mm/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c @@ -96,6 +96,7 @@ typedef enum FaceAnimationType { void EnInvadepoh_Init(Actor* thisx, PlayState* play2); void EnInvadepoh_Destroy(Actor* thisx, PlayState* play2); void EnInvadepoh_InvasionHandler_Update(Actor* thisx, PlayState* play2); +void EnInvadepoh_Reset(void); // Update functions void EnInvadepoh_Alien_WaitForObject(Actor* thisx, PlayState* play2); @@ -242,6 +243,7 @@ ActorProfile En_Invadepoh_Profile = { /**/ EnInvadepoh_Destroy, /**/ EnInvadepoh_InvasionHandler_Update, /**/ NULL, + /**/ EnInvadepoh_Reset, }; static ColliderCylinderInit sAlienCylinderInit = { @@ -5483,3 +5485,13 @@ void EnInvadepoh_Cremia_Draw(Actor* thisx, PlayState* play) { CLOSE_DISPS(play->state.gfxCtx); } + +void EnInvadepoh_Reset() { + sInvasionState = INVASION_STATE_NONE; + sRewardFinished = false; + sAliensExtremeThreat = false; + for (int i = 0; i < ALIEN_COUNT; i++) { + sAliens[i] = NULL; + sAlienStateFlags[i] = 0; + } +} |
