From 62ddaaa5f6fe2dc2aaa2dd002d4ce0b1d61a3cc9 Mon Sep 17 00:00:00 2001 From: theo3 Date: Mon, 13 Jul 2020 15:27:20 -0700 Subject: add subdirs --- src/object/windcrest.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/object/windcrest.c (limited to 'src/object/windcrest.c') diff --git a/src/object/windcrest.c b/src/object/windcrest.c new file mode 100644 index 00000000..231eb425 --- /dev/null +++ b/src/object/windcrest.c @@ -0,0 +1,41 @@ +#include "global.h" +#include "entity.h" +#include "functions.h" + +typedef struct { + u8 filler[64]; + u32 windcrests; +} struct_02002A40; + +extern void sub_0807DD64(Entity*); +extern void sub_0807DDAC(Entity*, u32); +extern void sub_0807DDE4(Entity*); +extern void sub_08078850(Entity*, u32, u32, u8*); +extern void PlaySFX(u32); +extern Entity* CreateFx (Entity*, u32, u32); + +extern u8 gUnk_08125010; +extern struct_02002A40 gUnk_02002A40; + +void Windcrest(Entity *this) +{ + if (this->action == 0) { + this->action++; + this->frameIndex = 0; + sub_0807DD64(this); + } + sub_0807DDAC(this, 0); + sub_0807DDE4(this); +} + +void sub_080A2124(Entity *this) +{ + sub_08078850(this, 1, 0xe, &gUnk_08125010); +} + +void Windcrest_Unlock(Entity *this) +{ + PlaySFX(0x72); + gUnk_02002A40.windcrests = gUnk_02002A40.windcrests | 1 << (this->entityType.parameter + 0x18); + CreateFx(this, 0x46, 0); +} -- cgit v1.2.3