Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JKRFileLoader.h
Go to the documentation of this file.
1#ifndef JKRFILELOADER_H
2#define JKRFILELOADER_H
3
5
6class JKRFileFinder;
7
12class JKRFileLoader : public JKRDisposer {
13public:
14 JKRFileLoader(void);
15 virtual ~JKRFileLoader();
16
17 bool isMounted() const { return this->mIsMounted; }
18 u32 getVolumeType() const { return this->mVolumeType; }
19
20public:
21 /* vt[03] */ virtual void unmount(void);
22 /* vt[04] */ virtual bool becomeCurrent(const char*) = 0;
23 /* vt[05] */ virtual void* getResource(const char*) = 0;
24 /* vt[06] */ virtual void* getResource(u32, const char*) = 0;
25 /* vt[07] */ virtual u32 readResource(void*, u32, const char*) = 0;
26 /* vt[08] */ virtual u32 readResource(void*, u32, u32, const char*) = 0;
27 /* vt[09] */ virtual void removeResourceAll(void) = 0;
28 /* vt[10] */ virtual bool removeResource(void*) = 0;
29 /* vt[11] */ virtual bool detachResource(void*) = 0;
30 /* vt[12] */ virtual u32 getResSize(const void*) const = 0;
31 /* vt[13] */ virtual u32 countFile(const char*) const = 0;
32 /* vt[14] */ virtual JKRFileFinder* getFirstFile(const char*) const = 0;
33
34protected:
35 /* 0x00 */ // vtable
36 /* 0x04 */ // JKRDisposer
38 /* 0x28 */ const char* mVolumeName;
39 /* 0x2C */ u32 mVolumeType;
40 /* 0x30 */ bool mIsMounted;
41 /* 0x31 */ u8 field_0x31[3];
42 /* 0x34 */ u32 mMountCount;
43
44public:
45 static void* getGlbResource(const char*);
46 static void* getGlbResource(const char*, JKRFileLoader*);
47 static bool removeResource(void*, JKRFileLoader*);
48 static bool detachResource(void*, JKRFileLoader*);
49 static JKRFileLoader* findVolume(const char**);
50 static const char* fetchVolumeName(char*, s32, const char*);
51
55
58};
59
63
64inline void* JKRGetNameResource(const char* name, JKRFileLoader* loader) {
66}
67
68inline void* JKRGetResource(const char* name) {
70}
71
72#endif /* JKRFILELOADER_H */
void * JKRGetNameResource(const char *name, JKRFileLoader *loader)
Definition JKRFileLoader.h:64
void * JKRGetResource(const char *name)
Definition JKRFileLoader.h:68
bool JKRDetachResource(void *resource, JKRFileLoader *fileLoader)
Definition JKRFileLoader.h:60
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JKRDisposer.h:12
Definition JKRFileFinder.h:10
Definition JKRFileLoader.h:12
virtual void * getResource(u32, const char *)=0
static JSUList< JKRFileLoader > sVolumeList
Definition JKRFileLoader.h:57
virtual u32 countFile(const char *) const =0
virtual void unmount(void)
Definition JKRFileLoader.cpp:24
virtual u32 readResource(void *, u32, const char *)=0
virtual bool becomeCurrent(const char *)=0
virtual u32 getResSize(const void *) const =0
static JKRFileLoader * findVolume(const char **)
Definition JKRFileLoader.cpp:107
u32 mMountCount
Definition JKRFileLoader.h:42
bool mIsMounted
Definition JKRFileLoader.h:40
u32 mVolumeType
Definition JKRFileLoader.h:39
virtual ~JKRFileLoader()
Definition JKRFileLoader.cpp:17
virtual bool removeResource(void *)=0
const char * mVolumeName
Definition JKRFileLoader.h:38
virtual void * getResource(const char *)=0
static const char * fetchVolumeName(char *, s32, const char *)
Definition JKRFileLoader.cpp:132
static void setCurrentVolume(JKRFileLoader *fileLoader)
Definition JKRFileLoader.h:53
virtual bool detachResource(void *)=0
u32 getVolumeType() const
Definition JKRFileLoader.h:18
static JSUList< JKRFileLoader > & getVolumeList()
Definition JKRFileLoader.h:54
static JKRFileLoader * sCurrentVolume
Definition JKRFileLoader.h:56
u8 field_0x31[3]
Definition JKRFileLoader.h:41
JSULink< JKRFileLoader > mFileLoaderLink
Definition JKRFileLoader.h:37
JKRFileLoader(void)
Definition JKRFileLoader.cpp:13
virtual JKRFileFinder * getFirstFile(const char *) const =0
bool isMounted() const
Definition JKRFileLoader.h:17
virtual void removeResourceAll(void)=0
static JKRFileLoader * getCurrentVolume()
Definition JKRFileLoader.h:52
virtual u32 readResource(void *, u32, u32, const char *)=0
static void * getGlbResource(const char *)
Definition JKRFileLoader.cpp:37
Definition JSUList.h:96
unsigned long u32
Definition types.h:10
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8