summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMacrepeh <63179588+Macrepeh@users.noreply.github.com>2020-07-14 19:15:39 -0400
committerGitHub <noreply@github.com>2020-07-14 19:15:39 -0400
commit0ed6703315f20b4def5a03ebca127b005e996e67 (patch)
tree55ffabe96a6a8b4bd6fda16b24b46eb5794d77e5 /src
parentc0ed079d03d0d17b69577cbbd15ec4c07d7ff07f (diff)
Add files via upload
Diffstat (limited to 'src')
-rw-r--r--src/npc/anju.c61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/npc/anju.c b/src/npc/anju.c
new file mode 100644
index 00000000..e1b7e4e8
--- /dev/null
+++ b/src/npc/anju.c
@@ -0,0 +1,61 @@
+#include "global.h"
+#include "entity.h"
+#include "link.h"
+#include "room.h"
+#include "flags.h"
+#include "sprite.h"
+#include "textbox.h"
+#include "npc.h"
+
+extern void sub_0805E3A0(Entity*, u32);
+extern void sub_0807DD50(Entity*);
+extern u32 sub_0806F5A4(u32);
+extern void sub_0806F118(Entity*);
+extern void sub_0807DD94(Entity*, u32);
+extern u32 sub_0801E99C(void);
+extern void sub_08078784(Entity*, u32);
+
+void Anju(Entity *this)
+{
+ switch (this->action) {
+ case 0:
+ this->action = 1;
+ this->spriteSettings.b.draw = 1;
+ this->animationState = this->actionDelay;
+ sub_0807DD50(this);
+ return;
+ case 1:
+ if (this->interactType == 2) {
+ this->action = 2;
+ this->interactType = 0;
+ InitializeAnimation(this,(this->animIndex & -4) + sub_0806F5A4(GetFacingDirection(this, &gLinkEntity)));
+ sub_0806F118(this);
+ } else {
+ sub_0807DD94(this, 0);
+ }
+ return;
+ case 2:
+ if (UpdateFuseInteraction(this)) {
+ this->action = 1;
+ }
+ default:
+ }
+}
+
+void sub_0806C354(Entity *this)
+{
+ this->field_0x68 = sub_0801E99C();
+ sub_08078784(this,this->field_0x68);
+}
+
+void Anju_Fusion(Entity *this)
+{
+ if (this->action == 0) {
+ this->action++;
+ this->spriteSettings.b.draw = 1;
+ InitAnimationForceUpdate(this,6);
+ }
+ else {
+ UpdateAnimationSingleFrame(this);
+ }
+} \ No newline at end of file