mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 06:54:28 -04:00
8185d87f85
* initial copy of hbm from sdk_2009-12-11 * some more nw4hbm cleanup * nw4hbm db mostly done * nw4hbm snd copied from oot-vc * nw4hbm ut copied * nw4hbm lyt copied * nw4hbm copied, mostly matching usa 1.0 * setup nw4hbm debug define * fix HBMDataInfo struct * add rvl sdk card lib
68 lines
1.4 KiB
C
68 lines
1.4 KiB
C
#ifndef _REVOLUTION_ARC_H_
|
|
#define _REVOLUTION_ARC_H_
|
|
|
|
#include <revolution/types.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define ARC_ENTRY_NUM_INVALID (-1)
|
|
|
|
typedef struct {
|
|
unsigned int magic;
|
|
int fstStart;
|
|
int fstSize;
|
|
int fileStart;
|
|
int pad[4];
|
|
} ARCHeader;
|
|
|
|
typedef struct {
|
|
void* archiveStartAddr; // 0x0
|
|
void* FSTStart; // 0x4
|
|
void* fileStart; // 0x8
|
|
u32 entryNum; // 0xC
|
|
char* FSTStringStart; // 0x10
|
|
u32 FSTLength; // 0x14
|
|
u32 currDir; // 0x18
|
|
} ARCHandle;
|
|
|
|
typedef struct {
|
|
ARCHandle* handle;
|
|
u32 startOffset;
|
|
u32 length;
|
|
} ARCFileInfo;
|
|
|
|
typedef struct {
|
|
ARCHandle* handle;
|
|
u32 entryNum;
|
|
u32 location;
|
|
u32 next;
|
|
} ARCDir;
|
|
|
|
typedef struct {
|
|
ARCHandle* handle;
|
|
u32 entryNum;
|
|
BOOL isDir;
|
|
char* name;
|
|
} ARCDirEntry;
|
|
|
|
BOOL ARCInitHandle(void*, ARCHandle*);
|
|
BOOL ARCFastOpen(ARCHandle*, s32, ARCFileInfo*);
|
|
s32 ARCConvertPathToEntrynum(ARCHandle*, const char*);
|
|
void* ARCGetStartAddrInMem(ARCFileInfo*);
|
|
u32 ARCGetLength(ARCFileInfo*);
|
|
BOOL ARCClose(ARCFileInfo*);
|
|
BOOL ARCChangeDir(ARCHandle*, const char*);
|
|
BOOL ARCGetCurrentDir(ARCHandle*, char*, u32);
|
|
|
|
BOOL ARCOpenDir(ARCHandle*, const char*, ARCDir*);
|
|
BOOL ARCReadDir(ARCDir*, ARCDirEntry*);
|
|
BOOL ARCCloseDir(ARCDir*);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // _REVOLUTION_ARC_H_
|