summaryrefslogtreecommitdiff
path: root/src/object
diff options
context:
space:
mode:
authorTal Hayon <talhayon1@gmail.com>2022-02-27 15:54:12 +0200
committerTal Hayon <talhayon1@gmail.com>2022-02-27 16:30:37 +0200
commitee11972a67d034707b53145f083094f0463f64f6 (patch)
tree96e2170a0fa8af4c642f81b8022e1f25aa29c346 /src/object
parenta60953268ad5f228b3ee24e0dc166cde0dab1686 (diff)
decompile macroShoes
Diffstat (limited to 'src/object')
-rw-r--r--src/object/macroShoes.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/object/macroShoes.c b/src/object/macroShoes.c
new file mode 100644
index 00000000..36cc84e5
--- /dev/null
+++ b/src/object/macroShoes.c
@@ -0,0 +1,44 @@
+#include "entity.h"
+#include "asm.h"
+
+void sub_0800445C(Entity*);
+void MacroShoes_Init(Entity*);
+void MacroShoes_Idle(Entity*);
+
+static const Hitbox MacroShoes_Type0Hitbox;
+static const Hitbox MacroShoes_Type1Hitbox;
+
+static const Hitbox* const MacroShoes_TypeHitboxes[] = {
+ &MacroShoes_Type0Hitbox,
+ &MacroShoes_Type1Hitbox,
+};
+
+static const Hitbox MacroShoes_Type0Hitbox = {
+ 0, 0, { 4, 0, 0, 0 }, 0x34, 0x20,
+};
+
+static const Hitbox MacroShoes_Type1Hitbox = {
+ 0, 0, { 4, 0, 0, 0 }, 0x30, 0x10,
+};
+
+void MacroShoes(Entity* this) {
+ static void (*const actionFuncs[])(Entity*) = {
+ MacroShoes_Init,
+ MacroShoes_Idle,
+ };
+ actionFuncs[this->action](this);
+ sub_0800445C(this);
+}
+
+void MacroShoes_Init(Entity* this) {
+ this->action = 1;
+ this->hitbox = (Hitbox*)MacroShoes_TypeHitboxes[this->type];
+ if (this->type2 == 1) {
+ SetTile(0x4024, 0x410, 1);
+ SetTile(0x4026, 0x411, 1);
+ SetTile(0x4025, 0x412, 1);
+ }
+}
+
+void MacroShoes_Idle(Entity* this) {
+}