diff options
| author | theo3 <arisstephenson2@gmail.com> | 2020-07-12 22:58:48 -0700 |
|---|---|---|
| committer | theo3 <arisstephenson2@gmail.com> | 2020-07-12 22:58:48 -0700 |
| commit | 6aba97697bcf1c970de2d53bc3485f711b0a17db (patch) | |
| tree | 4a5654ae704f5dccabe4967df4cbfff8e6614729 /src | |
| parent | d429f7f9cbe2a5c1d90139d9459fcd899b390fbc (diff) | |
gentari.c OK
Diffstat (limited to 'src')
| -rw-r--r-- | src/dampe.c | 6 | ||||
| -rw-r--r-- | src/gentari.c | 53 |
2 files changed, 55 insertions, 4 deletions
diff --git a/src/dampe.c b/src/dampe.c index 822f6c2c..b7947c32 100644 --- a/src/dampe.c +++ b/src/dampe.c @@ -9,8 +9,7 @@ extern void sub_0805E3A0(Entity*, u32); extern void sub_0807DD50(Entity*); -extern void GetFacingDirection(Entity*, Entity*); -extern u32 sub_0806F5A4(void); +extern u32 sub_0806F5A4(u32); extern void sub_0806F118(Entity*); extern void sub_0807DD94(Entity*, u32); extern u32 sub_0801E99C(void); @@ -37,8 +36,7 @@ void Dampe(Entity* this) { if (this->interactType == 2) { this->action = 2; this->interactType = 0; - GetFacingDirection(this, &gLinkEntity); - InitAnimationForceUpdate(this, sub_0806F5A4() + 4); + InitAnimationForceUpdate(this, sub_0806F5A4(GetFacingDirection(this, &gLinkEntity)) + 4); sub_0806F118(this); } else { sub_0807DD94(this, 0); diff --git a/src/gentari.c b/src/gentari.c new file mode 100644 index 00000000..f41a7438 --- /dev/null +++ b/src/gentari.c @@ -0,0 +1,53 @@ +#include "global.h" +#include "entity.h" +#include "npc.h" +#include "link.h" + +extern void sub_0805E3A0(Entity*, u32); +extern u32 sub_0801E99C(Entity*); +extern void sub_08078784(Entity*, u32); +extern void sub_0807DD50(Entity*); +extern u32 sub_0806F5A4(u32); +extern void sub_0806F118(Entity*); +extern void sub_0807DD94(Entity*, u32); + +void Gentari(Entity *this) +{ + switch (this->action) { + case 0: + this->action = 1; + this->spriteSettings.b.draw = TRUE; + sub_0805E3A0(this, 2); + this->field_0x68 = sub_0801E99C(this); + sub_08078784(this, this->field_0x68); + sub_0807DD50(this); + break; + case 1: + if (this->interactType == 2) { + this->action = 2; + this->interactType = 0; + InitAnimationForceUpdate(this, sub_0806F5A4(GetFacingDirection(this, &gLinkEntity))); + sub_0806F118(this); + } else { + sub_0807DD94(this, 0); + } + break; + case 2: + if (UpdateFuseInteraction(this)) { + this->action = 1; + } + } +} + +void Gentari_Fusion(Entity *this) +{ + if (this->action == 0) { + this->action++; + this->spriteSettings.b.draw = TRUE; + sub_0805E3A0(this, 2); + InitAnimationForceUpdate(this, 10); + } + else { + UpdateAnimationSingleFrame(this); + } +}
\ No newline at end of file |
