From 035d4a150f3341aecd6d9d124c7f2cb99ac83473 Mon Sep 17 00:00:00 2001 From: theo3 Date: Wed, 15 Jul 2020 20:12:52 -0700 Subject: tingleSiblings.c started --- src/npc/tingleSiblings.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/npc/tingleSiblings.c (limited to 'src') diff --git a/src/npc/tingleSiblings.c b/src/npc/tingleSiblings.c new file mode 100644 index 00000000..ab50c63c --- /dev/null +++ b/src/npc/tingleSiblings.c @@ -0,0 +1,43 @@ +#include "global.h" +#include "entity.h" +#include "npc.h" +#include "textbox.h" + +extern void sub_08064DE4(Entity*); +extern void sub_08064D78(Entity*); +extern void sub_08064EE8(Entity*); + +extern void (*const gUnk_0810FBFC[])(Entity*); + +void TingleSiblings(Entity* this) { + if ((this->flags & 2) != 0) { + sub_08064DE4(this); + } + else { + sub_08064D78(this); + } +} + +void sub_08064D78(Entity* this) { + gUnk_0810FBFC[this->action](this); +} + +void sub_08064D90(Entity* this) { + InitAnimationForceUpdate(this, 2); + this->field_0xf = 1; +} + +void sub_08064DA0(Entity* this) { + sub_08064EE8(this); + if (this->interactType != 0) { + this->action = 2; + InitAnimationForceUpdate(this, 6); + TextboxNoOverlapFollow(0); + } +} + +void sub_08064DCC(Entity* this) { + sub_08064EE8(this); + InitAnimationForceUpdate(this, 2); + this->action = 1; +} \ No newline at end of file -- cgit v1.2.3