summaryrefslogtreecommitdiff
path: root/src/object/rupee.c
diff options
context:
space:
mode:
authoroctorock <79596758+octorock@users.noreply.github.com>2022-07-23 12:43:43 +0200
committeroctorock <79596758+octorock@users.noreply.github.com>2022-07-25 22:45:55 +0200
commit852effa474c159398014da736ade6f0fea454de7 (patch)
tree97da22c4758ca4156dc9fb7ac123c7a3b0a9e9f5 /src/object/rupee.c
parentccba86d292a0e4c8a0e07325ac4fb25e5a58dc89 (diff)
Rename objects
Diffstat (limited to 'src/object/rupee.c')
-rw-r--r--src/object/rupee.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/object/rupee.c b/src/object/rupee.c
index f511f652..2d0756d8 100644
--- a/src/object/rupee.c
+++ b/src/object/rupee.c
@@ -1,17 +1,30 @@
-#include "object.h"
+/**
+ * @file rupee.c
+ * @ingroup Objects
+ *
+ * @brief Rupee object
+ */
#include "functions.h"
#include "hitbox.h"
+#include "object.h"
void sub_08086A6C(Entity*);
-
-void (*const gUnk_081206C4[])(Entity*);
+void Rupee_Init(Entity*);
+void Rupee_Action_1(Entity*);
+void Rupee_Action_2(Entity*);
// Main
void Rupee(Entity* ent) {
- gUnk_081206C4[ent->action](ent);
+ static void (*const Rupee_Actions[])(Entity*) = {
+ Rupee_Init,
+ Rupee_Action_1,
+ Rupee_Action_2,
+ };
+
+ Rupee_Actions[ent->action](ent);
}
-void sub_080869DC(Entity* ent) {
+void Rupee_Init(Entity* ent) {
Entity* itemEntity;
ent->action = 1;
@@ -28,7 +41,7 @@ void sub_080869DC(Entity* ent) {
}
}
-void sub_08086A28(Entity* ent) {
+void Rupee_Action_1(Entity* ent) {
if (ent->child->next == NULL) {
ent->action = 2;
} else {
@@ -41,7 +54,7 @@ void sub_08086A28(Entity* ent) {
}
}
-void sub_08086A5C(Entity* ent) {
+void Rupee_Action_2(Entity* ent) {
ent->child->parent = NULL;
DeleteThisEntity();
}
@@ -54,9 +67,3 @@ void sub_08086A6C(Entity* ent) {
ent->direction = DirectionNormalize(uVar1 >> 16);
ent->speed = uVar1 & 480;
}
-
-void (*const gUnk_081206C4[])(Entity*) = {
- sub_080869DC,
- sub_08086A28,
- sub_08086A5C,
-};