summaryrefslogtreecommitdiff
path: root/include/JSystem/JKernel
diff options
context:
space:
mode:
authorlepelog <lepelog@users.noreply.github.com>2021-03-15 07:12:44 +0100
committerGitHub <noreply@github.com>2021-03-15 02:12:44 -0400
commit80ba3d9fd26f47ffd1dc198c67c0c0944158cd1a (patch)
tree865a44834bb6a12b19b5700c5ed8b33169a5bb92 /include/JSystem/JKernel
parent3b69d4cba0b957e33d141f23f4a66802e2bbf476 (diff)
Fix symbol names (#118)
* checkpoint * checkpoint * rename f_pc * checkpoint * small symbol rename and fix some fpc symbols * remove unneeded entries from ldscript * simplify ok check, update docker container Co-authored-by: Pheenoh <pheenoh@gmail.com>
Diffstat (limited to 'include/JSystem/JKernel')
-rw-r--r--include/JSystem/JKernel/JKRAramArchive/asm/func_802D7858.s2
-rw-r--r--include/JSystem/JKernel/JKRAramArchive/asm/func_802D7914.s2
-rw-r--r--include/JSystem/JKernel/JKRAramStream/asm/func_802D3CE0.s6
-rw-r--r--include/JSystem/JKernel/JKRCompArchive/asm/func_802D90C0.s2
-rw-r--r--include/JSystem/JKernel/JKRCompArchive/asm/func_802D9360.s2
-rw-r--r--include/JSystem/JKernel/JKRCompression.h54
-rw-r--r--include/JSystem/JKernel/JKRDvdAramRipper/asm/func_802DAA74.s2
-rw-r--r--include/JSystem/JKernel/JKRDvdAramRipper/asm/func_802DADD8.s2
-rw-r--r--include/JSystem/JKernel/JKRDvdRipper/asm/func_802D9D10.s4
-rw-r--r--include/JSystem/JKernel/JKRExpHeap/asm/func_802CFDCC.s2
-rw-r--r--include/JSystem/JKernel/JKRExpHeap/asm/func_802D00B4.s2
-rw-r--r--include/JSystem/JKernel/JKRThread/asm/func_802D1C74.s10
-rw-r--r--include/JSystem/JKernel/SArc.h126
13 files changed, 108 insertions, 108 deletions
diff --git a/include/JSystem/JKernel/JKRAramArchive/asm/func_802D7858.s b/include/JSystem/JKernel/JKRAramArchive/asm/func_802D7858.s
index e72c2ad900..9439b3b547 100644
--- a/include/JSystem/JKernel/JKRAramArchive/asm/func_802D7858.s
+++ b/include/JSystem/JKernel/JKRAramArchive/asm/func_802D7858.s
@@ -45,7 +45,7 @@ lbl_802D78E4:
/* 802D78F0 002D4830 38 A3 00 13 */ addi r5, r3, 0x13
/* 802D78F4 002D4834 38 C3 00 16 */ addi r6, r3, 0x16
/* 802D78F8 002D4838 4C C6 31 82 */ crclr 6
-/* 802D78FC 002D483C 48 00 A9 01 */ bl JUTException_NS_panic_f
+/* 802D78FC 002D483C 48 00 A9 01 */ bl panic_f__12JUTExceptionFPCciPCce
/* 802D7900 002D4840 38 60 00 00 */ li r3, 0
lbl_802D7904:
/* 802D7904 002D4844 80 01 00 14 */ lwz r0, 0x14(r1)
diff --git a/include/JSystem/JKernel/JKRAramArchive/asm/func_802D7914.s b/include/JSystem/JKernel/JKRAramArchive/asm/func_802D7914.s
index ba85f6c993..4037f21485 100644
--- a/include/JSystem/JKernel/JKRAramArchive/asm/func_802D7914.s
+++ b/include/JSystem/JKernel/JKRAramArchive/asm/func_802D7914.s
@@ -79,7 +79,7 @@ lbl_802D7A2C:
/* 802D7A38 002D4978 38 A3 00 13 */ addi r5, r3, 0x13
/* 802D7A3C 002D497C 38 C3 00 16 */ addi r6, r3, 0x16
/* 802D7A40 002D4980 4C C6 31 82 */ crclr 6
-/* 802D7A44 002D4984 48 00 A7 B9 */ bl JUTException_NS_panic_f
+/* 802D7A44 002D4984 48 00 A7 B9 */ bl panic_f__12JUTExceptionFPCciPCce
/* 802D7A48 002D4988 38 60 00 00 */ li r3, 0
lbl_802D7A4C:
/* 802D7A4C 002D498C 39 61 00 70 */ addi r11, r1, 0x70
diff --git a/include/JSystem/JKernel/JKRAramStream/asm/func_802D3CE0.s b/include/JSystem/JKernel/JKRAramStream/asm/func_802D3CE0.s
index 5eba315b21..7dc100aa93 100644
--- a/include/JSystem/JKernel/JKRAramStream/asm/func_802D3CE0.s
+++ b/include/JSystem/JKernel/JKRAramStream/asm/func_802D3CE0.s
@@ -76,14 +76,14 @@ lbl_802D3DD8:
/* 802D3DE4 002D0D24 38 A3 00 12 */ addi r5, r3, 0x12
/* 802D3DE8 002D0D28 38 C3 00 15 */ addi r6, r3, 0x15
/* 802D3DEC 002D0D2C 4C C6 31 82 */ crclr 6
-/* 802D3DF0 002D0D30 48 00 E4 0D */ bl JUTException_NS_panic_f
+/* 802D3DF0 002D0D30 48 00 E4 0D */ bl panic_f__12JUTExceptionFPCciPCce
lbl_802D3DF4:
/* 802D3DF4 002D0D34 28 1A 00 00 */ cmplwi r26, 0
/* 802D3DF8 002D0D38 41 82 00 AC */ beq lbl_802D3EA4
/* 802D3DFC 002D0D3C 80 78 00 10 */ lwz r3, 0x10(r24)
/* 802D3E00 002D0D40 7F A4 EB 78 */ mr r4, r29
/* 802D3E04 002D0D44 38 A0 00 00 */ li r5, 0
-/* 802D3E08 002D0D48 48 00 86 D5 */ bl JSURandomInputStream_NS_seek
+/* 802D3E08 002D0D48 48 00 86 D5 */ bl seek__20JSURandomInputStreamFl17JSUStreamSeekFrom
/* 802D3E0C 002D0D4C 48 00 00 70 */ b lbl_802D3E7C
lbl_802D3E10:
/* 802D3E10 002D0D50 7C 1E F8 40 */ cmplw r30, r31
@@ -94,7 +94,7 @@ lbl_802D3E20:
/* 802D3E20 002D0D60 80 78 00 10 */ lwz r3, 0x10(r24)
/* 802D3E24 002D0D64 7F 44 D3 78 */ mr r4, r26
/* 802D3E28 002D0D68 7F 25 CB 78 */ mr r5, r25
-/* 802D3E2C 002D0D6C 48 00 84 6D */ bl JSUInputStream_NS_read
+/* 802D3E2C 002D0D6C 48 00 84 6D */ bl read__14JSUInputStreamFPvl
/* 802D3E30 002D0D70 2C 03 00 00 */ cmpwi r3, 0
/* 802D3E34 002D0D74 40 82 00 0C */ bne lbl_802D3E40
/* 802D3E38 002D0D78 3B 80 00 00 */ li r28, 0
diff --git a/include/JSystem/JKernel/JKRCompArchive/asm/func_802D90C0.s b/include/JSystem/JKernel/JKRCompArchive/asm/func_802D90C0.s
index 0574a10ed0..5c17cd35dd 100644
--- a/include/JSystem/JKernel/JKRCompArchive/asm/func_802D90C0.s
+++ b/include/JSystem/JKernel/JKRCompArchive/asm/func_802D90C0.s
@@ -102,7 +102,7 @@ lbl_802D921C:
/* 802D9228 002D6168 38 A3 00 13 */ addi r5, r3, 0x13
/* 802D922C 002D616C 38 C3 00 16 */ addi r6, r3, 0x16
/* 802D9230 002D6170 4C C6 31 82 */ crclr 6
-/* 802D9234 002D6174 48 00 8F C9 */ bl JUTException_NS_panic_f
+/* 802D9234 002D6174 48 00 8F C9 */ bl panic_f__12JUTExceptionFPCciPCce
lbl_802D9238:
/* 802D9238 002D6178 28 1F 00 00 */ cmplwi r31, 0
/* 802D923C 002D617C 41 82 00 08 */ beq lbl_802D9244
diff --git a/include/JSystem/JKernel/JKRCompArchive/asm/func_802D9360.s b/include/JSystem/JKernel/JKRCompArchive/asm/func_802D9360.s
index 2ec587696c..77965b0f9e 100644
--- a/include/JSystem/JKernel/JKRCompArchive/asm/func_802D9360.s
+++ b/include/JSystem/JKernel/JKRCompArchive/asm/func_802D9360.s
@@ -93,7 +93,7 @@ lbl_802D94A4:
/* 802D94B0 002D63F0 38 A3 00 13 */ addi r5, r3, 0x13
/* 802D94B4 002D63F4 38 C3 00 27 */ addi r6, r3, 0x27
/* 802D94B8 002D63F8 4C C6 31 82 */ crclr 6
-/* 802D94BC 002D63FC 48 00 8D 41 */ bl JUTException_NS_panic_f
+/* 802D94BC 002D63FC 48 00 8D 41 */ bl panic_f__12JUTExceptionFPCciPCce
lbl_802D94C0:
/* 802D94C0 002D6400 88 BD 00 07 */ lbz r5, 7(r29)
/* 802D94C4 002D6404 88 9D 00 06 */ lbz r4, 6(r29)
diff --git a/include/JSystem/JKernel/JKRCompression.h b/include/JSystem/JKernel/JKRCompression.h
index 7877fbd7db..9a52f66e21 100644
--- a/include/JSystem/JKernel/JKRCompression.h
+++ b/include/JSystem/JKernel/JKRCompression.h
@@ -1,28 +1,28 @@
-#ifndef JKRCOMPREESION_H_
-#define JKRCOMPREESION_H_
-
-#include "JSystem/JKernel/SArc.h"
-#include "dolphin/types.h"
-
-inline u32 read_big_endian_u32(void* ptr) {
- u8* uptr = (u8*)ptr;
- return ((u32)uptr[0] << 0x18) | ((u32)uptr[1] << 0x10) | ((u32)uptr[2] << 8) | (u32)uptr[3];
-}
-
-inline u16 read_big_endian_u16(void* ptr) {
- u8* uptr = (u8*)ptr;
- return ((u16)uptr[0] << 8) | ((u16)uptr[1]);
-}
-
-typedef int JKRCompression;
-const JKRCompression COMPRESSION_NONE = 0;
-const JKRCompression COMPRESSION_YAY0 = 1;
-const JKRCompression COMPRESSION_YAZ0 = 2;
-const JKRCompression COMPRESSION_ASR = 3;
-
-inline u32 JKRDecompExpandSize(SArcHeader* header) {
- u8* fileLength = (u8*)&header->file_length;
- return read_big_endian_u32(fileLength);
-}
-
+#ifndef JKRCOMPREESION_H_
+#define JKRCOMPREESION_H_
+
+#include "JSystem/JKernel/SArc.h"
+#include "dolphin/types.h"
+
+inline u32 read_big_endian_u32(void* ptr) {
+ u8* uptr = (u8*)ptr;
+ return ((u32)uptr[0] << 0x18) | ((u32)uptr[1] << 0x10) | ((u32)uptr[2] << 8) | (u32)uptr[3];
+}
+
+inline u16 read_big_endian_u16(void* ptr) {
+ u8* uptr = (u8*)ptr;
+ return ((u16)uptr[0] << 8) | ((u16)uptr[1]);
+}
+
+typedef int JKRCompression;
+const JKRCompression COMPRESSION_NONE = 0;
+const JKRCompression COMPRESSION_YAY0 = 1;
+const JKRCompression COMPRESSION_YAZ0 = 2;
+const JKRCompression COMPRESSION_ASR = 3;
+
+inline u32 JKRDecompExpandSize(SArcHeader* header) {
+ u8* fileLength = (u8*)&header->file_length;
+ return read_big_endian_u32(fileLength);
+}
+
#endif \ No newline at end of file
diff --git a/include/JSystem/JKernel/JKRDvdAramRipper/asm/func_802DAA74.s b/include/JSystem/JKernel/JKRDvdAramRipper/asm/func_802DAA74.s
index 6d140687e7..461452a1fa 100644
--- a/include/JSystem/JKernel/JKRDvdAramRipper/asm/func_802DAA74.s
+++ b/include/JSystem/JKernel/JKRDvdAramRipper/asm/func_802DAA74.s
@@ -32,7 +32,7 @@ lbl_802DAAC8:
/* 802DAAE0 002D7A20 7C 7C 1B 79 */ or. r28, r3, r3
/* 802DAAE4 002D7A24 41 82 00 10 */ beq lbl_802DAAF4
/* 802DAAE8 002D7A28 7F C4 F3 78 */ mr r4, r30
-/* 802DAAEC 002D7A2C 48 00 1B 4D */ bl JSUFileInputStream_ct
+/* 802DAAEC 002D7A2C 48 00 1B 4D */ bl __ct__18JSUFileInputStreamFP7JKRFile
/* 802DAAF0 002D7A30 7C 7C 1B 78 */ mr r28, r3
lbl_802DAAF4:
/* 802DAAF4 002D7A34 93 9E 00 54 */ stw r28, 0x54(r30)
diff --git a/include/JSystem/JKernel/JKRDvdAramRipper/asm/func_802DADD8.s b/include/JSystem/JKernel/JKRDvdAramRipper/asm/func_802DADD8.s
index 1a27d68dc1..054bc21f60 100644
--- a/include/JSystem/JKernel/JKRDvdAramRipper/asm/func_802DADD8.s
+++ b/include/JSystem/JKernel/JKRDvdAramRipper/asm/func_802DADD8.s
@@ -16,7 +16,7 @@
/* 802DAE0C 002D7D4C 38 04 C4 B0 */ addi r0, r4, lbl_803CC4B0@l
/* 802DAE10 002D7D50 90 1E 00 00 */ stw r0, 0(r30)
/* 802DAE14 002D7D54 38 80 00 00 */ li r4, 0
-/* 802DAE18 002D7D58 48 00 14 25 */ bl JSUInputStream_NS_dtor
+/* 802DAE18 002D7D58 48 00 14 25 */ bl __dt__14JSUInputStreamFv
lbl_802DAE1C:
/* 802DAE1C 002D7D5C 7F E0 07 35 */ extsh. r0, r31
/* 802DAE20 002D7D60 40 81 00 0C */ ble lbl_802DAE2C
diff --git a/include/JSystem/JKernel/JKRDvdRipper/asm/func_802D9D10.s b/include/JSystem/JKernel/JKRDvdRipper/asm/func_802D9D10.s
index 903a0154d5..e88327297f 100644
--- a/include/JSystem/JKernel/JKRDvdRipper/asm/func_802D9D10.s
+++ b/include/JSystem/JKernel/JKRDvdRipper/asm/func_802D9D10.s
@@ -253,7 +253,7 @@ lbl_802DA06C:
/* 802DA078 002D6FB8 38 A3 00 11 */ addi r5, r3, 0x11
/* 802DA07C 002D6FBC 38 C3 00 14 */ addi r6, r3, 0x14
/* 802DA080 002D6FC0 4C C6 31 82 */ crclr 6
-/* 802DA084 002D6FC4 48 00 81 79 */ bl JUTException_NS_panic_f
+/* 802DA084 002D6FC4 48 00 81 79 */ bl panic_f__12JUTExceptionFPCciPCce
lbl_802DA088:
/* 802DA088 002D6FC8 7F 83 E3 78 */ mr r3, r28
/* 802DA08C 002D6FCC 48 00 01 40 */ b lbl_802DA1CC
@@ -268,7 +268,7 @@ lbl_802DA090:
/* 802DA0AC 002D6FEC 38 A3 00 11 */ addi r5, r3, 0x11
/* 802DA0B0 002D6FF0 38 C3 00 38 */ addi r6, r3, 0x38
/* 802DA0B4 002D6FF4 4C C6 31 82 */ crclr 6
-/* 802DA0B8 002D6FF8 48 00 81 45 */ bl JUTException_NS_panic_f
+/* 802DA0B8 002D6FF8 48 00 81 45 */ bl panic_f__12JUTExceptionFPCciPCce
lbl_802DA0BC:
/* 802DA0BC 002D6FFC 38 76 00 5C */ addi r3, r22, 0x5c
/* 802DA0C0 002D7000 7F A4 EB 78 */ mr r4, r29
diff --git a/include/JSystem/JKernel/JKRExpHeap/asm/func_802CFDCC.s b/include/JSystem/JKernel/JKRExpHeap/asm/func_802CFDCC.s
index 89310e548c..d6ff532b8a 100644
--- a/include/JSystem/JKernel/JKRExpHeap/asm/func_802CFDCC.s
+++ b/include/JSystem/JKernel/JKRExpHeap/asm/func_802CFDCC.s
@@ -15,7 +15,7 @@
/* 802CFDFC 002CCD3C 38 A6 00 34 */ addi r5, r6, 0x34
/* 802CFE00 002CCD40 38 C6 00 37 */ addi r6, r6, 0x37
/* 802CFE04 002CCD44 4C C6 31 82 */ crclr 6
-/* 802CFE08 002CCD48 48 01 23 F5 */ bl JUTException_NS_panic_f
+/* 802CFE08 002CCD48 48 01 23 F5 */ bl panic_f__12JUTExceptionFPCciPCce
lbl_802CFE0C:
/* 802CFE0C 002CCD4C 80 7E 00 84 */ lwz r3, 0x84(r30)
/* 802CFE10 002CCD50 38 00 48 4D */ li r0, 0x484d
diff --git a/include/JSystem/JKernel/JKRExpHeap/asm/func_802D00B4.s b/include/JSystem/JKernel/JKRExpHeap/asm/func_802D00B4.s
index 0d36bdcb45..33ed08abd5 100644
--- a/include/JSystem/JKernel/JKRExpHeap/asm/func_802D00B4.s
+++ b/include/JSystem/JKernel/JKRExpHeap/asm/func_802D00B4.s
@@ -33,7 +33,7 @@
/* 802D012C 002CD06C 38 A6 00 34 */ addi r5, r6, 0x34
/* 802D0130 002CD070 38 C6 00 6F */ addi r6, r6, 0x6f
/* 802D0134 002CD074 4C C6 31 82 */ crclr 6
-/* 802D0138 002CD078 48 01 20 C5 */ bl JUTException_NS_panic_f
+/* 802D0138 002CD078 48 01 20 C5 */ bl panic_f__12JUTExceptionFPCciPCce
lbl_802D013C:
/* 802D013C 002CD07C 7C 1D D8 40 */ cmplw r29, r27
/* 802D0140 002CD080 40 82 00 38 */ bne lbl_802D0178
diff --git a/include/JSystem/JKernel/JKRThread/asm/func_802D1C74.s b/include/JSystem/JKernel/JKRThread/asm/func_802D1C74.s
index fff5d68e72..153bd37ebf 100644
--- a/include/JSystem/JKernel/JKRThread/asm/func_802D1C74.s
+++ b/include/JSystem/JKernel/JKRThread/asm/func_802D1C74.s
@@ -21,10 +21,10 @@
/* 802D1CC4 002CEC04 80 DA 00 1C */ lwz r6, 0x1c(r26)
/* 802D1CC8 002CEC08 80 FA 00 10 */ lwz r7, 0x10(r26)
/* 802D1CCC 002CEC0C 4C C6 31 82 */ crclr 6
-/* 802D1CD0 002CEC10 48 01 5E E9 */ bl JUTConsole_NS_print_f
+/* 802D1CD0 002CEC10 48 01 5E E9 */ bl print_f__10JUTConsoleFPCce
/* 802D1CD4 002CEC14 7F 83 E3 78 */ mr r3, r28
/* 802D1CD8 002CEC18 7F A4 EB 78 */ mr r4, r29
-/* 802D1CDC 002CEC1C 48 01 5F 5D */ bl JUTConsole_NS_print
+/* 802D1CDC 002CEC1C 48 01 5F 5D */ bl print__10JUTConsoleFPCc
lbl_802D1CE0:
/* 802D1CE0 002CEC20 3C 60 80 43 */ lis r3, sThreadList__9JKRThread@ha
/* 802D1CE4 002CEC24 83 C3 42 8C */ lwz r30, sThreadList__9JKRThread@l(r3)
@@ -61,13 +61,13 @@ lbl_802D1D38:
/* 802D1D4C 002CEC8C 38 84 00 A7 */ addi r4, r4, 0xa7
/* 802D1D50 002CEC90 80 B9 00 70 */ lwz r5, 0x70(r25)
/* 802D1D54 002CEC94 4C C6 31 82 */ crclr 6
-/* 802D1D58 002CEC98 48 09 47 85 */ bl func_803664DC
+/* 802D1D58 002CEC98 48 09 47 85 */ bl sprintf
/* 802D1D5C 002CEC9C 3B A1 00 08 */ addi r29, r1, 8
lbl_802D1D60:
/* 802D1D60 002CECA0 83 F9 00 68 */ lwz r31, 0x68(r25)
/* 802D1D64 002CECA4 80 7A 00 18 */ lwz r3, 0x18(r26)
/* 802D1D68 002CECA8 80 9A 00 1C */ lwz r4, 0x1c(r26)
-/* 802D1D6C 002CECAC 48 09 09 51 */ bl func_803626BC
+/* 802D1D6C 002CECAC 48 09 09 51 */ bl __cvt_sll_flt
/* 802D1D70 002CECB0 80 19 00 64 */ lwz r0, 0x64(r25)
/* 802D1D74 002CECB4 C8 42 C5 C8 */ lfd f2, lbl_80455FC8-_SDA2_BASE_(r2)
/* 802D1D78 002CECB8 90 01 00 1C */ stw r0, 0x1c(r1)
@@ -97,7 +97,7 @@ lbl_802D1D60:
/* 802D1DD8 002CED18 7F E6 FB 78 */ mr r6, r31
/* 802D1DDC 002CED1C 7F 27 CB 78 */ mr r7, r25
/* 802D1DE0 002CED20 4C C6 31 82 */ crclr 6
-/* 802D1DE4 002CED24 48 01 5D D5 */ bl JUTConsole_NS_print_f
+/* 802D1DE4 002CED24 48 01 5D D5 */ bl print_f__10JUTConsoleFPCce
lbl_802D1DE8:
/* 802D1DE8 002CED28 83 DE 00 0C */ lwz r30, 0xc(r30)
lbl_802D1DEC:
diff --git a/include/JSystem/JKernel/SArc.h b/include/JSystem/JKernel/SArc.h
index 2ad23f2eb8..709e65d871 100644
--- a/include/JSystem/JKernel/SArc.h
+++ b/include/JSystem/JKernel/SArc.h
@@ -1,64 +1,64 @@
-#ifndef SARC_H_
-#define SARC_H_
-
-#include "dolphin/types.h"
-
-struct SArcHeader {
- u32 signature;
- u32 file_length;
- u32 header_length;
- u32 file_data_offset;
- u32 file_data_length;
- u32 field_0x14;
- u32 field_0x18;
- u32 field_0x1c;
-};
-
-struct SArcDataInfo {
- u32 num_nodes;
- u32 node_offset;
- u32 num_file_entries;
- u32 file_entry_offset;
- u32 string_table_length;
- u32 string_table_offset;
- u16 next_free_file_id;
- bool sync_file_ids_and_indices;
- u8 field_1b[5];
-};
-
-struct SDirEntry {
- union {
- u32 type;
- struct {
- u8 flags;
- u8 padding;
- u16 id;
- } other;
- };
-
- const char* name;
- u16 field_0x8;
- u16 num_entries;
- s32 first_file_index;
-};
-
-struct SDIFileEntry {
- u16 file_id;
- u16 name_hash;
- u32 type_flags_and_name_offset;
- u32 data_offset;
- u32 data_size;
- void* data;
-
- u32 getNameOffset() const { return type_flags_and_name_offset & 0xFFFFFF; }
- u16 getNameHash() const { return name_hash; }
- u32 getFlags() const { return type_flags_and_name_offset >> 24; }
- u32 getAttr() const { return getFlags(); }
- u16 getFileID() const { return file_id; }
- bool isDirectory() const { return (getFlags() & 0x02) != 0; }
- bool isUnknownFlag1() const { return (getFlags() & 0x01) != 0; }
- bool isCompressed() const { return (getFlags() & 0x04) != 0; }
- bool isYAZ0Compressed() const { return (getFlags() & 0x80) != 0; }
-};
-
+#ifndef SARC_H_
+#define SARC_H_
+
+#include "dolphin/types.h"
+
+struct SArcHeader {
+ u32 signature;
+ u32 file_length;
+ u32 header_length;
+ u32 file_data_offset;
+ u32 file_data_length;
+ u32 field_0x14;
+ u32 field_0x18;
+ u32 field_0x1c;
+};
+
+struct SArcDataInfo {
+ u32 num_nodes;
+ u32 node_offset;
+ u32 num_file_entries;
+ u32 file_entry_offset;
+ u32 string_table_length;
+ u32 string_table_offset;
+ u16 next_free_file_id;
+ bool sync_file_ids_and_indices;
+ u8 field_1b[5];
+};
+
+struct SDirEntry {
+ union {
+ u32 type;
+ struct {
+ u8 flags;
+ u8 padding;
+ u16 id;
+ } other;
+ };
+
+ const char* name;
+ u16 field_0x8;
+ u16 num_entries;
+ s32 first_file_index;
+};
+
+struct SDIFileEntry {
+ u16 file_id;
+ u16 name_hash;
+ u32 type_flags_and_name_offset;
+ u32 data_offset;
+ u32 data_size;
+ void* data;
+
+ u32 getNameOffset() const { return type_flags_and_name_offset & 0xFFFFFF; }
+ u16 getNameHash() const { return name_hash; }
+ u32 getFlags() const { return type_flags_and_name_offset >> 24; }
+ u32 getAttr() const { return getFlags(); }
+ u16 getFileID() const { return file_id; }
+ bool isDirectory() const { return (getFlags() & 0x02) != 0; }
+ bool isUnknownFlag1() const { return (getFlags() & 0x01) != 0; }
+ bool isCompressed() const { return (getFlags() & 0x04) != 0; }
+ bool isYAZ0Compressed() const { return (getFlags() & 0x80) != 0; }
+};
+
#endif \ No newline at end of file