NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
arc.h
1/**
2 * Modified from decompilation by riidefi in WiiCore
3 */
4
5#ifndef RVL_SDK_ARC_H
6#define RVL_SDK_ARC_H
7#include <types.h>
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct ARCHandle {
13 void* archiveStartAddr; // at 0x0
14 void* FSTStart; // at 0x4
15 void* fileStart; // at 0x8
16 u32 entryNum; // at 0xC
17 char* FSTStringStart; // at 0x10
18 u32 FSTLength; // at 0x14
19 s32 currDir; // at 0x18
20} ARCHandle;
21
22typedef struct ARCFileInfo {
23 ARCHandle* handle; // at 0x0
24 u32 startOffset; // at 0x4
25 u32 length; // at 0x8
27
28typedef struct ARCDir {
29 ARCHandle* handle; // at 0x0
30 u32 entryNum; // at 0x4
31 u32 location; // at 0x8
32 u32 next; // at 0xC
33} ARCDir;
34
35typedef struct ARCDirEntry {
36 ARCHandle* handle; // at 0x0
37 u32 entryNum; // at 0x4
38 BOOL isDir; // at 0x8
39 char* name; // at 0xC
41
42BOOL ARCGetCurrentDir(ARCHandle* handle, char* string, u32 maxlen);
43BOOL ARCInitHandle(void* bin, ARCHandle* handle);
44BOOL ARCOpen(ARCHandle* handle, const char* path, ARCFileInfo* info);
45BOOL ARCFastOpen(ARCHandle* handle, s32 entrynum, ARCFileInfo* info);
46s32 ARCConvertPathToEntrynum(ARCHandle* handle, const char* path);
47void* ARCGetStartAddrInMem(ARCFileInfo* info);
48u32 ARCGetStartOffset(ARCFileInfo* info);
49u32 ARCGetLength(ARCFileInfo* info);
50BOOL ARCClose(ARCFileInfo* info);
51BOOL ARCChangeDir(ARCHandle* handle, const char* path);
52BOOL ARCOpenDir(ARCHandle* handle, const char* path, ARCDir* dir);
53BOOL ARCReadDir(ARCDir* dir, ARCDirEntry* entry);
54BOOL ARCCloseDir(ARCDir* dir);
55
56#ifdef __cplusplus
57}
58#endif
59#endif
Definition arc.h:28