mirror of
https://github.com/zeldaret/tmc
synced 2026-08-18 21:48:21 -04:00
Create new entity structs for Projectiles
This commit is contained in:
+8
-8
@@ -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,
|
||||
|
||||
+6
-5
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
+6
-6
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user