diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/npc/npc26.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/npc/npc26.c b/src/npc/npc26.c new file mode 100644 index 00000000..18157cb9 --- /dev/null +++ b/src/npc/npc26.c @@ -0,0 +1,66 @@ +#include "global.h" +#include "entity.h" +#include "functions.h" +#include "script.h" + +static void (*const gUnk_081106D4[])(Entity*); +static void (*const gUnk_081106E0[])(Entity*); + +void NPC26(Entity* this) { + if ((this->flags & 2) != 0) { + gUnk_081106E0[this->action](this); + } else { + gUnk_081106D4[this->action](this); + sub_0806ED78(this); + } +} + +static void sub_080669B8(Entity* this) { + this->action = 1; + this->spriteSettings.b.draw = 1; + InitAnimationForceUpdate(this, 2); + sub_08078778(this); +} + +static void sub_080669DC(Entity* this) { + s32 sVar1; + s32 sVar2; + + sVar1 = sub_0806ED9C(this, 0x28, 0x28); + if (sVar1 < 0) { + sVar1 = 2; + } else { + if (this->field_0xf == 0) { + this->field_0xf = 0x10; + } else { + this->field_0xf = this->field_0xf - 1; + sVar1 = this->animIndex; + } + } + sVar2 = sub_0806F078(this, sVar1); + if (sVar2 == 0) { + UpdateAnimationSingleFrame(this); + } + if (this->interactType != 0) { + this->action = 2; + this->interactType = 0; + } +} + +static void sub_08066A30(Entity* this) { + this->action = 1; +} + +static void sub_08066A38(Entity* this) { + this->action = 1; + this->spriteSettings.b.draw = 1; + sub_0807DD50(this); +} + +static void sub_08066A50(Entity* this) { + sub_0807DD94(this, NULL); +} + +static void (*const gUnk_081106D4[])(Entity*) = { sub_080669B8, sub_080669DC, sub_08066A30 }; + +static void (*const gUnk_081106E0[])(Entity*) = { sub_08066A38, sub_08066A50 };
\ No newline at end of file |
