summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2020-07-13 19:57:32 -0700
committertheo3 <arisstephenson2@gmail.com>2020-07-13 19:57:32 -0700
commited5c6d08dd012b1f5cd7c441b8b52169bb3ba6df (patch)
tree809e6905cd950005c659561fcc693cadc23b24d6 /src
parent94b6040d7d1455e26372b91b01a20dd1c6bec3e7 (diff)
npc9.c OK
Diffstat (limited to 'src')
-rw-r--r--src/npc/npc9.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/npc/npc9.c b/src/npc/npc9.c
new file mode 100644
index 00000000..3954ed8f
--- /dev/null
+++ b/src/npc/npc9.c
@@ -0,0 +1,53 @@
+#include "global.h"
+#include "entity.h"
+#include "textbox.h"
+
+extern void sub_08078778(Entity*);
+extern void sub_0805E47C(Entity*);
+extern void sub_0806ED78(Entity*);
+extern void sub_0805E584(Entity*);
+
+extern void (*const gUnk_0810C290[])(Entity*);
+
+void NPC9(Entity *this)
+{
+ gUnk_0810C290[this->action](this);
+}
+
+void sub_08062AF0(Entity *this)
+{
+ this->action = 1;
+ this->spriteSettings.b.draw = TRUE;
+ InitializeAnimation(this, 0);
+ sub_08078778(this);
+}
+
+void sub_08062B14(Entity *this)
+{
+ GetNextFrame(this);
+ if (this->interactType != 0) {
+ this->interactType = 0;
+ this->action++;
+ InitializeAnimation(this, 1);
+ sub_0805E47C(this);
+ }
+ sub_0806ED78(this);
+}
+
+void sub_08062B48(Entity *this)
+{
+ GetNextFrame(this);
+ if ((this->frames.b.f3) != 0) {
+ TextboxNoOverlapFollow(0xa01);
+ this->action++;
+ }
+}
+
+void sub_08062B70(Entity *this)
+{
+ if ((gTextBox.doTextBox & 0x7f) == 0) {
+ InitializeAnimation(this, 2);
+ this->action = 1;
+ sub_0805E584(this);
+ }
+} \ No newline at end of file