summaryrefslogtreecommitdiff
path: root/src/object
diff options
context:
space:
mode:
authorTal Hayon <talhayon1@gmail.com>2022-03-14 12:54:30 +0200
committerTal Hayon <talhayon1@gmail.com>2022-03-14 12:54:30 +0200
commit5eec991497eb9de2d9d1761e187262fc961b7fb5 (patch)
tree6aac862c5d7071a1047fab36f634edb553cb7747 /src/object
parentdd81c3a59cb66f00c1c5a82283e00db01fcf7577 (diff)
Decompile object81
Diffstat (limited to 'src/object')
-rw-r--r--src/object/object81.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/object/object81.c b/src/object/object81.c
new file mode 100644
index 00000000..ea5b8072
--- /dev/null
+++ b/src/object/object81.c
@@ -0,0 +1,39 @@
+#define NENT_DEPRECATED
+#include "entity.h"
+#include "player.h"
+#include "functions.h"
+#include "sound.h"
+
+typedef struct {
+ Entity base;
+ u8 filler[0x18];
+ u16 tilePos;
+} Object81Entity;
+
+void Object81_Init(Object81Entity*);
+void Object81_Action1(Object81Entity*);
+
+void Object81(Entity* this) {
+ static void (*const actionFuncs[])(Object81Entity*) = {
+ Object81_Init,
+ Object81_Action1,
+ };
+
+ actionFuncs[this->action]((Object81Entity*)this);
+}
+
+void Object81_Init(Object81Entity* this) {
+ super->action = 1;
+ super->actionDelay = 0;
+ this->tilePos = COORD_TO_TILE(super);
+ if (gPlayerState.flags & PL_MINISH) {
+ super->collisionLayer = 2;
+ } else {
+ super->collisionLayer = 1;
+ }
+ UpdateSpriteForCollisionLayer(super);
+ sub_08000148(0x47, this->tilePos - 0x40, 1);
+}
+
+void Object81_Action1(Object81Entity* this) {
+}