pmd-red/include/file_system.h
2018-01-21 16:51:04 -05:00

35 lines
683 B
C

#ifndef GUARD_FILE_SYSTEM_H
#define GUARD_FILE_SYSTEM_H
struct File
{
char *name;
u8 *data;
};
struct OpenedFile
{
struct File *file;
u8 *data;
};
struct FileArchive
{
char magic[8];
s32 count;
struct File *entries;
};
struct SiroArchive
{
u32 magic;
u8 *data;
};
struct OpenedFile *OpenFile(const char *filename, const struct FileArchive *arc);
u8 *GetFileDataPtr(struct OpenedFile *openedFile, int unused);
struct OpenedFile *OpenFileAndGetFileDataPtr(const char *filename, const struct FileArchive *arc);
struct OpenedFile *Call_OpenFileAndGetFileDataPtr(const char *filename, const struct FileArchive *arc);
#endif //GUARD_FILE_SYSTEM_H