Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_resorce.h
Go to the documentation of this file.
1#ifndef D_D_RESORCE_H
2#define D_D_RESORCE_H
3
5#include "m_Do/m_Do_ext.h"
6
7class JKRArchive;
8class JKRHeap;
9class JKRSolidHeap;
10
11class dRes_info_c {
12public:
13 /* 8003A260 */ dRes_info_c();
14 /* 8003A280 */ ~dRes_info_c();
15 /* 8003A348 */ int set(char const*, char const*, u8, JKRHeap*);
16 /* 8003AB30 */ static void onWarpMaterial(J3DModelData*);
17 /* 8003AC1C */ static void offWarpMaterial(J3DModelData*);
18 /* 8003AD08 */ static void setWarpSRT(J3DModelData*, cXyz const&, f32, f32);
19 /* 8003AE14 */ static J3DModelData* loaderBasicBmd(u32, void*);
20 /* 8003B30C */ int loadResource();
21 /* 8003B998 */ void deleteArchiveRes();
22 /* 8003BAC4 */ int setRes(JKRArchive*, JKRHeap*);
23 /* 8003BAF8 */ int setRes();
24 /* 8003BD2C */ static void dump_long(dRes_info_c*, int);
25 /* 8003BE38 */ static void dump(dRes_info_c*, int);
26
27 void* getRes(u32 resIdx) { return *(mRes + resIdx); }
28 int getCount() { return mCount; }
29 char* getArchiveName() { return mArchiveName; }
32 void incCount() { mCount++; }
34 return --mCount;
35 }
36
37private:
38 /* 0x00 */ char mArchiveName[11];
39 /* 0x0C */ u16 mCount;
41 /* 0x14 */ JKRArchive* mArchive;
42 /* 0x18 */ JKRHeap* heap;
44 /* 0x20 */ void** mRes;
45}; // Size: 0x24
46
47STATIC_ASSERT(sizeof(dRes_info_c) == 0x24);
48
49class dRes_control_c {
50public:
52 /* 8003BFB0 */ ~dRes_control_c();
53 /* 8003C078 */ static int setRes(char const*, dRes_info_c*, int, char const*, u8, JKRHeap*);
54 /* 8003C160 */ static int syncRes(char const*, dRes_info_c*, int);
55 /* 8003C194 */ static int deleteRes(char const*, dRes_info_c*, int);
56 /* 8003C37C */ static void* getRes(char const*, char const*, dRes_info_c*, int);
57 /* 8003C1E4 */ static dRes_info_c* getResInfo(char const*, dRes_info_c*, int);
58 /* 8003C260 */ static dRes_info_c* newResInfo(dRes_info_c*, int);
59 /* 8003C288 */ static dRes_info_c* getResInfoLoaded(char const*, dRes_info_c*, int);
60 /* 8003C2EC */ static void* getRes(char const*, s32, dRes_info_c*, int);
61 /* 8003C400 */ static void* getIDRes(char const*, u16, dRes_info_c*, int);
62 /* 8003C470 */ static int syncAllRes(dRes_info_c*, int);
63 /* 8003C4E4 */ int setObjectRes(char const*, void*, u32, JKRHeap*);
64 /* 8003C5BC */ int setStageRes(char const*, JKRHeap*);
65 /* 8003C638 */ void dump();
66 /* 8003C6B8 */ int getObjectResName2Index(char const*, char const*);
67
68 int setObjectRes(const char* name, u8 param_1, JKRHeap* heap) {
69 return setRes(name, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo), "/res/Object/", param_1,
70 heap);
71 }
72
73 void* getObjectRes(const char* arcName, const char* resName) {
75 }
76
77 void* getObjectRes(const char* arcName, s32 param_1) {
79 }
80
81 void* getObjectIDRes(const char* arcName, u16 id) {
83 }
84
85 int syncObjectRes(const char* name) {
86 return syncRes(name, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo));
87 }
88
89 int syncStageRes(const char* name) {
90 return syncRes(name, &mStageInfo[0], ARRAY_SIZE(mStageInfo));
91 }
92
94
95 int deleteObjectRes(const char* name) {
96 return deleteRes(name, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo));
97 }
98
99 int deleteStageRes(const char* name) {
100 return deleteRes(name, &mStageInfo[0], ARRAY_SIZE(mStageInfo));
101 }
102
103 void* getStageRes(const char* arcName, const char* resName) {
105 }
106
110
114
115 /* 0x0000 */ dRes_info_c mObjectInfo[0x80];
116 /* 0x1200 */ dRes_info_c mStageInfo[0x40];
117}; // Size: 0x1B00
118
119#endif /* D_D_RESORCE_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JKRArchive.h:57
Definition JKRHeap.h:16
Definition JKRSolidHeap.h:10
Definition m_Do_dvd_thread.h:78
u32 resIdx
Definition d_a_obj_sekizo.cpp:28
STATIC_ASSERT(sizeof(dRes_info_c)==0x24)
Definition d_a_ep.cpp:51
Definition d_a_hozelda.cpp:20
Definition d_a_ep.cpp:60
dRes_control_c()
Definition d_resorce.h:51
void * getObjectRes(const char *arcName, const char *resName)
Definition d_resorce.h:73
static dRes_info_c * getResInfoLoaded(char const *, dRes_info_c *, int)
Definition d_resorce.cpp:746
dRes_info_c mStageInfo[0x40]
Definition d_resorce.h:116
void * getStageRes(const char *arcName, const char *resName)
Definition d_resorce.h:103
~dRes_control_c()
Definition d_resorce.cpp:646
static void * getRes(char const *, s32, dRes_info_c *, int)
void dump()
Definition d_resorce.cpp:859
static int deleteRes(char const *, dRes_info_c *, int)
Definition d_resorce.cpp:705
int syncStageRes(const char *name)
Definition d_resorce.h:89
dRes_info_c * getObjectResInfo(const char *arcName)
Definition d_resorce.h:107
void * getObjectRes(const char *arcName, s32 param_1)
Definition d_resorce.h:77
static int syncAllRes(dRes_info_c *, int)
Definition d_resorce.cpp:819
static int setRes(char const *, dRes_info_c *, int, char const *, u8, JKRHeap *)
Definition d_resorce.cpp:658
void getRes(char const *, s32, dRes_info_c *, int)
Definition d_resorce.cpp:761
int setStageRes(char const *, JKRHeap *)
Definition d_resorce.cpp:851
void * getObjectIDRes(const char *arcName, u16 id)
Definition d_resorce.h:81
static dRes_info_c * getResInfo(char const *, dRes_info_c *, int)
Definition d_resorce.cpp:720
int deleteObjectRes(const char *name)
Definition d_resorce.h:95
dRes_info_c mObjectInfo[0x80]
Definition d_resorce.h:115
int syncAllObjectRes()
Definition d_resorce.h:93
dRes_info_c * getStageResInfo(const char *arcName)
Definition d_resorce.h:111
int setObjectRes(char const *, void *, u32, JKRHeap *)
Definition d_resorce.cpp:831
int setObjectRes(const char *name, u8 param_1, JKRHeap *heap)
Definition d_resorce.h:68
int syncObjectRes(const char *name)
Definition d_resorce.h:85
int deleteStageRes(const char *name)
Definition d_resorce.h:99
static void * getIDRes(char const *, u16, dRes_info_c *, int)
Definition d_resorce.cpp:800
int getObjectResName2Index(char const *, char const *)
Definition d_resorce.cpp:871
static int syncRes(char const *, dRes_info_c *, int)
Definition d_resorce.cpp:693
static dRes_info_c * newResInfo(dRes_info_c *, int)
Definition d_resorce.cpp:734
Definition d_a_ep.cpp:58
static void offWarpMaterial(J3DModelData *)
Definition d_resorce.cpp:191
int loadResource()
Definition d_resorce.cpp:305
int setRes()
Definition d_resorce.cpp:496
mDoDvdThd_mountArchive_c * mDMCommand
Definition d_resorce.h:40
JKRSolidHeap * mDataHeap
Definition d_resorce.h:43
static void onWarpMaterial(J3DModelData *)
Definition d_resorce.cpp:174
dRes_info_c()
Definition d_resorce.cpp:24
void ** mRes
Definition d_resorce.h:44
char * getArchiveName()
Definition d_resorce.h:29
~dRes_info_c()
Definition d_resorce.cpp:34
void deleteArchiveRes()
Definition d_resorce.cpp:452
static void setWarpSRT(J3DModelData *, cXyz const &, f32, f32)
Definition d_resorce.cpp:208
void incCount()
Definition d_resorce.h:32
JKRArchive * getArchive()
Definition d_resorce.h:31
char mArchiveName[11]
Definition d_resorce.h:38
JKRHeap * heap
Definition d_resorce.h:42
void * getRes(u32 resIdx)
Definition d_resorce.h:27
u16 decCount()
Definition d_resorce.h:33
int set(char const *, char const *, u8, JKRHeap *)
Definition d_resorce.cpp:51
int getCount()
Definition d_resorce.h:28
static J3DModelData * loaderBasicBmd(u32, void *)
Definition d_resorce.cpp:227
static void dump(dRes_info_c *, int)
Definition d_resorce.cpp:617
JKRArchive * mArchive
Definition d_resorce.h:41
mDoDvdThd_mountArchive_c * getDMCommand()
Definition d_resorce.h:30
static void dump_long(dRes_info_c *, int)
Definition d_resorce.cpp:576
u16 mCount
Definition d_resorce.h:39
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
unsigned short u16
Definition types.h:9
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8