summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-01-22 12:38:17 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2020-01-22 12:38:17 -0500
commit0495cce90418b84dc53b5d5c9f3b2bfe46f0ed62 (patch)
tree7565f225380ba5f4b3099793b41e6096d2eee908 /src
parent70bb1a99e2211f7856f301827f11b7faec334a02 (diff)
start decomping rfu_union_tool
Diffstat (limited to 'src')
-rw-r--r--src/rfu_union_tool.c80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/rfu_union_tool.c b/src/rfu_union_tool.c
new file mode 100644
index 000000000..d50187b56
--- /dev/null
+++ b/src/rfu_union_tool.c
@@ -0,0 +1,80 @@
+#include "global.h"
+#include "event_data.h"
+#include "rfu_union_tool.h"
+#include "constants/flags.h"
+
+const u8 gUnknown_84570D8[][10] = {
+ {0x29, 0x36, 0x27, 0x12, 0x13, 0x14, 0x19, 0x1A},
+ {0x2A, 0x3A, 0x28, 0x16, 0x17, 0x18, 0x1C, 0x1D}
+};
+
+const s16 gUnknown_84570EC[][2] = {
+ {0x4, 0x6},
+ {0xd, 0x8},
+ {0xa, 0x6},
+ {0x1, 0x8},
+ {0xd, 0x4},
+ {0x7, 0x4},
+ {0x1, 0x4},
+ {0x7, 0x8}
+};
+
+const s8 gUnknown_845710C[][2] = {
+ { 0, 0},
+ { 1, 0},
+ { 0, -1},
+ {-1, 0},
+ { 0, 1}
+};
+
+const u8 gUnknown_8457116[] = {
+ 0x00, 0x02, 0x01, 0x04, 0x03
+};
+
+const u8 gUnknown_845711B[] = {
+ 0x01, 0x03, 0x01, 0x04, 0x02
+};
+
+bool32 is_walking_or_running(void)
+{
+ if (gPlayerAvatar.tileTransitionState == 2 || gPlayerAvatar.tileTransitionState == 0)
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+u8 sub_811B524(u32 a0, u32 a1)
+{
+ return gUnknown_84570D8[a0][a1 % 8];
+}
+
+void sub_811B53C(u32 a0, u32 a1, s32 * a2, s32 * a3)
+{
+ *a2 = gUnknown_84570EC[a0][0] + gUnknown_845710C[a1][0] + 7;
+ *a3 = gUnknown_84570EC[a0][1] + gUnknown_845710C[a1][1] + 7;
+}
+
+bool32 sub_811B58C(u32 a0, u32 a1, s32 a2, s32 a3)
+{
+ if (gUnknown_84570EC[a0][0] + gUnknown_845710C[a1][0] + 7 != a2)
+ {
+ return FALSE;
+ }
+ else if (gUnknown_84570EC[a0][1] + gUnknown_845710C[a1][1] + 7 != a3)
+ {
+ return FALSE;
+ }
+ else
+ {
+ return TRUE;
+ }
+}
+//
+//bool32 IsUnionRoomPlayerHidden(u32 player_idx)
+//{
+// return FlagGet(FLAG_HIDE_UNION_ROOM_PLAYER_1 + player_idx);
+//}