diff options
| author | notyourav <65437533+notyourav@users.noreply.github.com> | 2023-07-31 18:56:04 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-31 18:56:04 -0700 |
| commit | a443cb5d497d5e06245e92d417a69fb03a2c5941 (patch) | |
| tree | 5479043d5057399a9a6a64aab8a433d58e25c595 /src/enemy | |
| parent | 91a5a6783869bef302fb99c585f6c5dd14d2cf03 (diff) | |
| parent | 591563f4289f277924583bf318011efe341f46c0 (diff) | |
Merge pull request #617 from octorock/projectiles
Create new entity structs for Projectiles
Diffstat (limited to 'src/enemy')
| -rw-r--r-- | src/enemy/dust.c | 16 | ||||
| -rw-r--r-- | src/enemy/enemy50.c | 11 | ||||
| -rw-r--r-- | src/enemy/mulldozer.c | 12 | ||||
| -rw-r--r-- | src/enemy/stalfos.c | 12 |
4 files changed, 26 insertions, 25 deletions
diff --git a/src/enemy/dust.c b/src/enemy/dust.c index ead2273a..9b2bec8a 100644 --- a/src/enemy/dust.c +++ b/src/enemy/dust.c @@ -37,9 +37,9 @@ typedef struct { #define DUST_SPRITE_INDEX 0x1eb #endif -void sub_08044134(DustEntity*); -void sub_0804414C(DustEntity*); -void sub_0804415C(DustEntity*); +void Dust_OnTick(DustEntity*); +void Dust_OnCollision(DustEntity*); +void Dust_OnGrabbed(DustEntity*); void sub_080441E0(DustEntity*); void sub_080442A0(DustEntity*); void sub_080441CC(DustEntity*); @@ -56,15 +56,15 @@ extern void* sub_080AD8F0(u32, u32); extern const s8 gUnk_08126EE4[]; void (*const Dust_Functions[])(Entity*) = { - (EntityActionPtr)sub_08044134, (EntityActionPtr)sub_0804414C, GenericKnockback, GenericDeath, GenericConfused, - (EntityActionPtr)sub_0804415C, + (EntityActionPtr)Dust_OnTick, (EntityActionPtr)Dust_OnCollision, GenericKnockback, GenericDeath, GenericConfused, + (EntityActionPtr)Dust_OnGrabbed, }; void Dust(Entity* this) { Dust_Functions[GetNextFunction(this)](this); } -void sub_08044134(DustEntity* this) { +void Dust_OnTick(DustEntity* this) { static void (*const Dust_Actions[])(DustEntity*) = { sub_080441E0, sub_080442A0, @@ -72,11 +72,11 @@ void sub_08044134(DustEntity* this) { Dust_Actions[super->action](this); } -void sub_0804414C(DustEntity* this) { +void Dust_OnCollision(DustEntity* this) { EnemyFunctionHandlerAfterCollision(super, Dust_Functions); } -void sub_0804415C(DustEntity* this) { +void Dust_OnGrabbed(DustEntity* this) { static void (*const Dust_SubActions[])(DustEntity*) = { sub_080441BC, sub_080441C4, diff --git a/src/enemy/enemy50.c b/src/enemy/enemy50.c index 7e47330c..db7bd2c1 100644 --- a/src/enemy/enemy50.c +++ b/src/enemy/enemy50.c @@ -75,7 +75,7 @@ void Enemy50_OnTick(Enemy50Entity* this) { Enemy50_Actions[super->action](this); } -void sub_08040B9C(Enemy50Entity* this) { +void Enemy50_OnCollision(Enemy50Entity* this) { if (super->action == 8 || super->action == 9) { super->animationState = 0xff; InitializeAnimation(super, (super->knockbackDirection >> 4 ^ 1) + 1); @@ -119,7 +119,7 @@ _08040C9C: EnemyFunctionHandlerAfterCollision(super, Enemy50_Functions); } -void sub_08040CAC(Enemy50Entity* this) { +void Enemy50_OnKnockback(Enemy50Entity* this) { GetNextFrame(super); GenericKnockback2(super); if (super->type == 0) { @@ -137,7 +137,7 @@ void sub_08040CAC(Enemy50Entity* this) { } } -void sub_08040D30(Enemy50Entity* this) { +void Enemy50_OnConfused(Enemy50Entity* this) { if (super->animIndex != 7 && super->animIndex != 8) { InitializeAnimation(super, super->animationState + 7); } @@ -153,7 +153,7 @@ void sub_08040D30(Enemy50Entity* this) { } } -void sub_08040D90(Enemy50Entity* this) { +void Enemy50_OnGrabbed(Enemy50Entity* this) { if (sub_0806F520(super)) { Enemy50_SubActions[super->subAction](this); } else { @@ -436,7 +436,8 @@ bool32 sub_08041300(Enemy50Entity* this) { #endif void (*const Enemy50_Functions[])(Enemy50Entity*) = { - Enemy50_OnTick, sub_08040B9C, sub_08040CAC, (void (*)(Enemy50Entity*))GenericDeath, sub_08040D30, sub_08040D90, + Enemy50_OnTick, Enemy50_OnCollision, Enemy50_OnKnockback, (void (*)(Enemy50Entity*))GenericDeath, + Enemy50_OnConfused, Enemy50_OnGrabbed, }; void (*const Enemy50_Actions[])(Enemy50Entity*) = { Enemy50_Init, Enemy50_Action1, Enemy50_Action2, Enemy50_Action3, Enemy50_Action4, Enemy50_Action5, diff --git a/src/enemy/mulldozer.c b/src/enemy/mulldozer.c index 854235de..f8b79c7e 100644 --- a/src/enemy/mulldozer.c +++ b/src/enemy/mulldozer.c @@ -53,7 +53,7 @@ void Mulldozer_OnInit(MulldozerEntity* this) { Mulldozer_Actions[super->action](this); } -void sub_08032CAC(MulldozerEntity* this) { +void Mulldozer_OnCollision(MulldozerEntity* this) { if (super->confusedTime != 0) { Create0x68FX(super, 0x1c); } @@ -80,7 +80,7 @@ void sub_08032CAC(MulldozerEntity* this) { } } -void sub_08032D3C(MulldozerEntity* this) { +void Mulldozer_OnKnockback(MulldozerEntity* this) { if (--super->subtimer == 0) { super->subtimer = 2; super->animationState = (super->animationState + 1) & 7; @@ -90,7 +90,7 @@ void sub_08032D3C(MulldozerEntity* this) { GenericKnockback(super); } -void nullsub_157(MulldozerEntity* this) { +void Mulldozer_OnGrabbed(MulldozerEntity* this) { } void Mulldozer_Init(MulldozerEntity* this) { @@ -465,11 +465,11 @@ bool32 sub_08033364(MulldozerEntity* this) { void (*const Mulldozer_Functions[])(MulldozerEntity*) = { Mulldozer_OnInit, - sub_08032CAC, - sub_08032D3C, + Mulldozer_OnCollision, + Mulldozer_OnKnockback, (void (*)(MulldozerEntity*))GenericDeath, (void (*)(MulldozerEntity*))GenericConfused, - nullsub_157, + Mulldozer_OnGrabbed, }; void (*const Mulldozer_Actions[])(MulldozerEntity*) = { Mulldozer_Init, Mulldozer_Action1, Mulldozer_Action2, Mulldozer_Action3, diff --git a/src/enemy/stalfos.c b/src/enemy/stalfos.c index 91ca9530..bb2db80e 100644 --- a/src/enemy/stalfos.c +++ b/src/enemy/stalfos.c @@ -73,7 +73,7 @@ void Stalfos_OnTick(StalfosEntity* this) { } } -void sub_0803933C(StalfosEntity* this) { +void Stalfos_OnCollision(StalfosEntity* this) { Entity* r0; Entity* r1; u32 r2; @@ -120,7 +120,7 @@ void sub_0803933C(StalfosEntity* this) { EnemyFunctionHandlerAfterCollision(super, Stalfos_Functions); } -void sub_08039418(StalfosEntity* this) { +void Stalfos_OnDeath(StalfosEntity* this) { if (super->type == 0) { CreateDeathFx(super, 0xf3, 0); } else { @@ -128,7 +128,7 @@ void sub_08039418(StalfosEntity* this) { } } -void sub_08039438(StalfosEntity* this) { +void Stalfos_OnGrabbed(StalfosEntity* this) { if (sub_0806F520(super)) { Stalfos_SubActions[super->subAction](this); } @@ -475,11 +475,11 @@ found: void (*const Stalfos_Functions[])(StalfosEntity*) = { Stalfos_OnTick, - sub_0803933C, + Stalfos_OnCollision, (void (*)(StalfosEntity*))GenericKnockback, - sub_08039418, + Stalfos_OnDeath, (void (*)(StalfosEntity*))GenericConfused, - sub_08039438, + Stalfos_OnGrabbed, }; void (*const Stalfos_Actions[])(StalfosEntity*) = { Stalfos_Init, Stalfos_Action1, Stalfos_Action2, Stalfos_Action3, Stalfos_Action4, Stalfos_Action5, |
