pmd-red/include/file_system.h

50 lines
1.0 KiB
C
Raw Normal View History

2018-01-21 21:51:04 +00:00
#ifndef GUARD_FILE_SYSTEM_H
#define GUARD_FILE_SYSTEM_H
2023-08-28 02:56:09 +00:00
// size: 0x8
typedef struct File
2018-01-21 21:51:04 +00:00
{
2023-08-28 02:56:09 +00:00
/* 0x0 */ char *name;
/* 0x4 */ u8 *data;
} File;
2018-01-21 21:51:04 +00:00
2023-08-28 02:56:09 +00:00
// size: 0x8
typedef struct OpenedFile
2018-01-21 21:51:04 +00:00
{
/* 0x0 */ File *file;
2023-08-28 02:56:09 +00:00
/* 0x4 */ u8 *data;
} OpenedFile;
2018-01-21 21:51:04 +00:00
2023-08-28 02:56:09 +00:00
// size: 0x10
typedef struct FileArchive
2018-01-21 21:51:04 +00:00
{
2023-08-28 02:56:09 +00:00
/* 0x0 */ char magic[8];
/* 0x8 */ s32 count;
/* 0xC */ File *entries;
} FileArchive;
2018-01-21 21:51:04 +00:00
2023-08-28 02:56:09 +00:00
// size: 0x8
typedef struct SiroArchive
2018-01-21 21:51:04 +00:00
{
2023-08-28 02:56:09 +00:00
/* 0x0 */ u32 magic;
/* 0x4 */ u8 *data;
} SiroArchive;
2018-01-21 21:51:04 +00:00
2023-08-28 02:56:09 +00:00
// size: 0x8
2023-09-07 07:26:32 +00:00
typedef struct UnkFileStruct
2020-09-21 06:40:48 +00:00
{
/* 0x0 */ u32 unk0;
/* 0x4 */ u32 unk4;
2023-09-07 07:26:32 +00:00
} UnkFileStruct;
2020-09-21 06:40:48 +00:00
2023-09-09 23:53:10 +00:00
OpenedFile *Call_OpenFileAndGetFileDataPtr(const u8 *filename, const FileArchive *arc);
void CloseFile(OpenedFile *openedFile);
u8 *GetFileDataPtr(OpenedFile *openedFile, s32 unused);
void InitFileSystem(void);
2023-09-09 23:53:10 +00:00
OpenedFile *OpenFile(const u8 *filename, const FileArchive *arc);
OpenedFile *OpenFileAndGetFileDataPtr(const u8 *filename, const FileArchive *arc);
2023-09-07 07:26:32 +00:00
2023-09-09 23:53:10 +00:00
u32 sub_800A8F8(u32 value);
2018-01-21 21:51:04 +00:00
#endif //GUARD_FILE_SYSTEM_H