aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/filesystem.h
diff options
context:
space:
mode:
authorEmma Miler <emma.pi@protonmail.com>2022-11-14 01:11:59 +0100
committerGitHub <noreply@github.com>2022-11-14 00:11:59 +0000
commit0c6d1f4e79d31de6fde4979a72afacdd6d13ca60 (patch)
tree06a9f21b76ac94d8ee11cf109ea3a32ac584982c /NorthstarDLL/filesystem.h
parent2139e0ec6d95ed7c5f673b53dec71f39a013dd93 (diff)
downloadNorthstarLauncher-0c6d1f4e79d31de6fde4979a72afacdd6d13ca60.tar.gz
NorthstarLauncher-0c6d1f4e79d31de6fde4979a72afacdd6d13ca60.zip
New syntax for reversed structs (#324)
* Initial commit Co-Authored-By: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> * Format change * Revert `VPKData` definition * Add `FIELDS` macro Co-authored-by: BobTheBob <32057864+BobTheBob9@users.noreply.github.com>
Diffstat (limited to 'NorthstarDLL/filesystem.h')
-rw-r--r--NorthstarDLL/filesystem.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/NorthstarDLL/filesystem.h b/NorthstarDLL/filesystem.h
index c326b419..9a22893a 100644
--- a/NorthstarDLL/filesystem.h
+++ b/NorthstarDLL/filesystem.h
@@ -5,25 +5,32 @@
typedef void* FileHandle_t;
#pragma pack(push, 1)
-struct VPKFileEntry
+
+// clang-format off
+OFFSET_STRUCT(VPKFileEntry)
{
- char* directory;
- char* filename;
- char* extension;
- unsigned char unknown[0x38];
+ STRUCT_SIZE(0x44);
+ FIELDS(0x0,
+ char* directory;
+ char* filename;
+ char* extension;
+ )
};
+// clang-format on
#pragma pack(pop)
#pragma pack(push, 1)
+// clang-format off
struct VPKData
{
- unsigned char unknown[5];
- char path[255];
- unsigned char unknown2[0x134];
- int32_t numEntries;
- unsigned char unknown3[12];
- VPKFileEntry* entries;
+ STRUCT_SIZE(0x50);
+ FIELDS(0x0,
+ char* directory;
+ char* filename;
+ char* extension;
+ )
};
+// clang-format on
#pragma pack(pop)
enum SearchPathAdd_t