summaryrefslogtreecommitdiff
path: root/include/file_system.h
blob: 360f7aca0469d6b4cba8aeaebbce4ffd955ab252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#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