summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTal Hayon <talhayon1@gmail.com>2022-02-12 07:35:05 +0200
committerTal Hayon <talhayon1@gmail.com>2022-02-12 07:35:05 +0200
commit05b2f892b39ff8a9b7c980f2d39fda2d4cd19e92 (patch)
treef32e10d08d9d906298a7be1619162a7c0ede54f6 /src
parentb9876fd30f2bc04036a3a223c193fd8fd833cafa (diff)
match Farmers
Diffstat (limited to 'src')
-rw-r--r--src/npc/farmers.c22
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;