summaryrefslogtreecommitdiff
path: root/src/object/windcrest.c
diff options
context:
space:
mode:
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);
+}