diff options
| author | Theo <65437533+notyourav@users.noreply.github.com> | 2024-01-01 13:10:06 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-01 13:10:06 -0800 |
| commit | 6fb8b41a8e003d0a4997740f4178aeb0c3f24ead (patch) | |
| tree | 9ada8fe01cc0e308e32e385f9b6965971010cda0 /src/object/pullableMushroom.c | |
| parent | 983412cc77d81692ad9431c0bd55f8d24e5554f8 (diff) | |
| parent | f5c6178ed4830769f65fbc74b18e3403eda05f86 (diff) | |
Merge pull request #686 from notyourav/followtest
document unused zelda follower and gust jar states
Diffstat (limited to 'src/object/pullableMushroom.c')
| -rw-r--r-- | src/object/pullableMushroom.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/object/pullableMushroom.c b/src/object/pullableMushroom.c index de90f11d..17333ae3 100644 --- a/src/object/pullableMushroom.c +++ b/src/object/pullableMushroom.c @@ -65,7 +65,7 @@ void PullableMushroom_Init(PullableMushroomEntity* this) { super->hitType = 0x6e; super->collisionMask = 0x0e; super->gustJarFlags = 1; - super->flags |= 0x80; + COLLISION_ON(super); super->spriteOffsetY = 4; break; case 1: @@ -116,13 +116,14 @@ void PullableMushroom_Action1_Type0(PullableMushroomEntity* this) { } void PullableMushroom_Action1_Type1(PullableMushroomEntity* this) { - if (*(u16*)&super->parent->action == 0x201) { + if (super->parent->action == 1 && super->parent->subAction == 2) { super->parent->child = NULL; DeleteThisEntity(); } else if (super->parent->action == 2) { sub_0808B168(this, 0); } } + void sub_0808ABC4(PullableMushroomEntity* this) { static const s8 gUnk_081211CC[] = { 0, -128, 0, -6, 0, 0, 5, -4, 0, 0, 0, 0, 0, -128, -5, -4 }; u32 tmp; @@ -292,7 +293,7 @@ void sub_0808AEB0(PullableMushroomEntity* this) { this->unk_7c = 1; super->animationState = AnimationStateFlip90(gPlayerEntity.base.animationState >> 1); super->direction = (super->animationState << 3); - super->flags &= ~0x80; + COLLISION_OFF(super); super->spriteSettings.flipX = gPlayerEntity.base.spriteSettings.flipX; InitializeAnimation(super, super->animationState + 5); if (sub_0808B21C(this, 0)) { @@ -320,7 +321,7 @@ void PullableMushroom_Action3(PullableMushroomEntity* this) { }; funcs[super->subAction](this); - if ((((gPlayerState.field_0x1c & 0xf) != 1) || ((super->contactFlags & 0x7f) != 0x13)) && (super->type == 1)) { + if ((((gPlayerState.gustJarState & 0xf) != 1) || ((super->contactFlags & 0x7f) != 0x13)) && (super->type == 1)) { (super->parent)->action = 1; (super->parent)->subAction = 1; super->direction = DirectionTurnAround(super->parent->direction); @@ -336,7 +337,7 @@ void sub_0808B05C(PullableMushroomEntity* this) { super->animationState = AnimationStateFlip90(gPlayerEntity.base.animationState >> 1); super->direction = super->animationState << 3; super->spriteSettings.flipX = gPlayerEntity.base.spriteSettings.flipX; - super->flags &= ~0x80; + COLLISION_OFF(super); InitializeAnimation(super, super->animationState + 5); if (sub_0808B21C(this, 1)) { sub_0808B168((PullableMushroomEntity*)super->child, 1); |
