diff options
author | Northstar <northstar@northstar.tf> | 2022-02-03 22:09:08 -0300 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-02-03 22:09:08 -0300 |
commit | 75bf194b2fca06de805a7bc025c6dd8379250fa5 (patch) | |
tree | c9327ac7921ae80bb2d91381bb7db11b47ca2403 /NorthstarDedicatedTest/filesystem.h | |
parent | e9f93ba2e8b9df280aed20131a1606d731d2dbbe (diff) | |
download | NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.tar.gz NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.zip |
Format project
Diffstat (limited to 'NorthstarDedicatedTest/filesystem.h')
-rw-r--r-- | NorthstarDedicatedTest/filesystem.h | 77 |
1 files changed, 39 insertions, 38 deletions
diff --git a/NorthstarDedicatedTest/filesystem.h b/NorthstarDedicatedTest/filesystem.h index cf93df8d..960c2836 100644 --- a/NorthstarDedicatedTest/filesystem.h +++ b/NorthstarDedicatedTest/filesystem.h @@ -4,66 +4,67 @@ // taken from ttf2sdk typedef void* FileHandle_t; -#pragma pack(push,1) +#pragma pack(push, 1) struct VPKFileEntry { - char* directory; - char* filename; - char* extension; - unsigned char unknown[0x38]; + char* directory; + char* filename; + char* extension; + unsigned char unknown[0x38]; }; #pragma pack(pop) -#pragma pack(push,1) +#pragma pack(push, 1) struct VPKData { - unsigned char unknown[5]; - char path[255]; - unsigned char unknown2[0x134]; - int32_t numEntries; - unsigned char unknown3[12]; - VPKFileEntry* entries; + unsigned char unknown[5]; + char path[255]; + unsigned char unknown2[0x134]; + int32_t numEntries; + unsigned char unknown3[12]; + VPKFileEntry* entries; }; #pragma pack(pop) enum SearchPathAdd_t { - PATH_ADD_TO_HEAD, // First path searched - PATH_ADD_TO_TAIL, // Last path searched + PATH_ADD_TO_HEAD, // First path searched + PATH_ADD_TO_TAIL, // Last path searched }; class CSearchPath { -public: - unsigned char unknown[0x18]; - const char* debugPath; + public: + unsigned char unknown[0x18]; + const char* debugPath; }; class IFileSystem { -public: - struct VTable - { - void* unknown[10]; - void(*AddSearchPath) (IFileSystem* fileSystem, const char* pPath, const char* pathID, SearchPathAdd_t addType); - void* unknown2[84]; - bool(*ReadFromCache) (IFileSystem* fileSystem, const char* path, void* result); - void* unknown3[15]; - VPKData* (*MountVPK) (IFileSystem* fileSystem, const char* vpkPath); - }; + public: + struct VTable + { + void* unknown[10]; + void (*AddSearchPath)(IFileSystem* fileSystem, const char* pPath, const char* pathID, SearchPathAdd_t addType); + void* unknown2[84]; + bool (*ReadFromCache)(IFileSystem* fileSystem, const char* path, void* result); + void* unknown3[15]; + VPKData* (*MountVPK)(IFileSystem* fileSystem, const char* vpkPath); + }; - struct VTable2 - { - int(*Read) (IFileSystem::VTable2** fileSystem, void* pOutput, int size, FileHandle_t file); - void* unknown[1]; - FileHandle_t(*Open) (IFileSystem::VTable2** fileSystem, const char* pFileName, const char* pOptions, const char* pathID, int64_t unknown); - void(*Close) (IFileSystem* fileSystem, FileHandle_t file); - void* unknown2[6]; - bool(*FileExists)(IFileSystem::VTable2** fileSystem, const char* pFileName, const char* pPathID); - }; + struct VTable2 + { + int (*Read)(IFileSystem::VTable2** fileSystem, void* pOutput, int size, FileHandle_t file); + void* unknown[1]; + FileHandle_t (*Open)( + IFileSystem::VTable2** fileSystem, const char* pFileName, const char* pOptions, const char* pathID, int64_t unknown); + void (*Close)(IFileSystem* fileSystem, FileHandle_t file); + void* unknown2[6]; + bool (*FileExists)(IFileSystem::VTable2** fileSystem, const char* pFileName, const char* pPathID); + }; - VTable* m_vtable; - VTable2* m_vtable2; + VTable* m_vtable; + VTable2* m_vtable2; }; std::string ReadVPKFile(const char* path); |