diff options
| author | notyourav <65437533+notyourav@users.noreply.github.com> | 2022-02-12 13:47:47 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-12 13:47:47 -0800 |
| commit | 98739c400e99fceb82bbfeabfb0ebb1bb344120a (patch) | |
| tree | b50e56f985ee50be9425904c31d1680ded79c1bf /src | |
| parent | 543222364c6fa48a3fdbaf35f7247af00095c449 (diff) | |
| parent | 05b2f892b39ff8a9b7c980f2d39fda2d4cd19e92 (diff) | |
Merge pull request #375 from hatal175/farmers
match Farmers
Diffstat (limited to 'src')
| -rw-r--r-- | src/npc/farmers.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/npc/farmers.c b/src/npc/farmers.c index 06dea3c3..92d520da 100644 --- a/src/npc/farmers.c +++ b/src/npc/farmers.c @@ -8,7 +8,26 @@ extern Dialog gUnk_08113158[]; extern SpriteLoadData gUnk_08113140[]; void sub_0806BC58(Entity* this); -ASM_FUNC("asm/non_matching/farmers/Farmers.inc", void Farmers(Entity* this)) +void Farmers(Entity* this) { + if (this->action == 0) { + if (LoadExtraSpriteData(this, &gUnk_08113140[this->type * 3]) == 0) { + return; + } + this->action++; + this->spriteSettings.flipX = this->actionDelay; + if (this->spriteSettings.flipX == 0) { + this->animationState = 6; + } else { + this->animationState = 2; + } + this->actionDelay = this->animationState; + sub_0806BC58(this); + sub_0807DD64(this); + } + ExecuteScriptForEntity(this, 0); + HandleEntity0x82Actions(this); + GetNextFrame(this); +} void sub_0806BC58(Entity* this) { SetDefaultPriority(this, PRIO_MESSAGE); @@ -48,7 +67,6 @@ void sub_0806BCE8(Entity* this) { } void Farmers_Fusion(Entity* this) { - if (this->action == 0) { if (LoadExtraSpriteData(this, &gUnk_08113140[this->type * 3]) != 0) { this->action = this->action + 1; |
