Skip to content

Commit 6ea64cb

Browse files
committed
Rework ARC
1 parent 22c5f85 commit 6ea64cb

2 files changed

Lines changed: 272 additions & 269 deletions

File tree

  • include/revolution/ARC
  • src/revolution/ARC

include/revolution/ARC/arc.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ typedef struct ARCHandle {
1212
u32 entryNum; // at 0xC
1313
char* FSTStringStart; // at 0x10
1414
u32 FSTLength; // at 0x14
15-
s32 currDir; // at 0x18
15+
u32 currDir; // at 0x18
1616
} ARCHandle;
1717

1818
typedef struct ARCFileInfo {
@@ -35,18 +35,19 @@ typedef struct ARCDirEntry {
3535
char* name; // at 0xC
3636
} ARCDirEntry;
3737

38-
BOOL ARCGetCurrentDir(ARCHandle* handle, char* string, u32 maxlen);
39-
BOOL ARCInitHandle(void* bin, ARCHandle* handle);
40-
BOOL ARCOpen(ARCHandle* handle, const char* path, ARCFileInfo* info);
41-
BOOL ARCFastOpen(ARCHandle* handle, s32 entrynum, ARCFileInfo* info);
42-
s32 ARCConvertPathToEntrynum(ARCHandle* handle, const char* path);
43-
void* ARCGetStartAddrInMem(ARCFileInfo* info);
44-
u32 ARCGetStartOffset(ARCFileInfo* info);
45-
u32 ARCGetLength(ARCFileInfo* info);
46-
BOOL ARCClose(ARCFileInfo* info);
47-
BOOL ARCChangeDir(ARCHandle* handle, const char* path);
48-
BOOL ARCOpenDir(ARCHandle* handle, const char* path, ARCDir* dir);
49-
BOOL ARCReadDir(ARCDir* dir, ARCDirEntry* entry);
38+
BOOL ARCInitHandle(void* arcStart, ARCHandle* handle);
39+
BOOL ARCOpen(ARCHandle* handle, const char* fileName, ARCFileInfo* af);
40+
BOOL ARCFastOpen(ARCHandle* handle, s32 entrynum, ARCFileInfo* af);
41+
s32 ARCConvertPathToEntrynum(ARCHandle* handle, const char* pathPtr);
42+
BOOL ARCEntrynumIsDir(const ARCHandle* handle, s32 entrynum);
43+
BOOL ARCGetCurrentDir(ARCHandle* handle, char* path, u32 maxlen);
44+
void* ARCGetStartAddrInMem(ARCFileInfo* af);
45+
u32 ARCGetStartOffset(ARCFileInfo* af);
46+
u32 ARCGetLength(ARCFileInfo* af);
47+
BOOL ARCClose(ARCFileInfo* af);
48+
BOOL ARCChangeDir(ARCHandle* handle, const char* dirName);
49+
BOOL ARCOpenDir(ARCHandle* handle, const char* dirName, ARCDir* dir);
50+
BOOL ARCReadDir(ARCDir* dir, ARCDirEntry* dirent);
5051
BOOL ARCCloseDir(ARCDir* dir);
5152

5253
#ifdef __cplusplus

0 commit comments

Comments
 (0)