summaryrefslogtreecommitdiff
path: root/include/file_system.h
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2019-08-10 05:15:50 -0400
committerGitHub <noreply@github.com>2019-08-10 05:15:50 -0400
commit9e969601456fb0ef392910d505e0e0673a902bd3 (patch)
treeaf8fdeb1c6cdf9cd8584f0d693a4049bfc408b9d /include/file_system.h
parent250a331df9dbd312d572aaf0d629503417cfc9d4 (diff)
parentba6f243c728de5d5c024aeb177026bcc59909e2e (diff)
Merge pull request #4 from nullableVoidPtr/master
Overhaul
Diffstat (limited to 'include/file_system.h')
-rw-r--r--include/file_system.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/file_system.h b/include/file_system.h
new file mode 100644
index 0000000..360f7ac
--- /dev/null
+++ b/include/file_system.h
@@ -0,0 +1,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