summaryrefslogtreecommitdiff
path: root/src/object/windcrest.c
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2020-07-13 15:27:20 -0700
committertheo3 <arisstephenson2@gmail.com>2020-07-13 15:27:20 -0700
commit62ddaaa5f6fe2dc2aaa2dd002d4ce0b1d61a3cc9 (patch)
treed625ad1b183fc6aa5b56c00ce6573ef850679731 /src/object/windcrest.c
parentc47f16e5e7b0abb010133b3ee1a58099d8b8915d (diff)
add subdirs
Diffstat (limited to 'src/object/windcrest.c')
-rw-r--r--src/object/windcrest.c41
1 files changed, 41 insertions, 0 deletions
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);
+}