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:
15
16 int set(char const* i_arcName, char const* i_path, u8 i_mountDirection, JKRHeap* i_heap);
17 int loadResource();
18 void deleteArchiveRes();
20 int setRes();
21
26 static void dump_long(dRes_info_c* i_resInfo, int i_infoNum);
27 static void dump(dRes_info_c* i_resInfo, int i_infoNum);
28
30 JUT_ASSERT(25, i_index >= 0 && i_index < getResNum());
31 return *(mRes + i_index);
32 }
33
35
36 int getCount() { return mCount; }
37 char* getArchiveName() { return mArchiveName; }
40 void incCount() { mCount++; }
42 return --mCount;
43 }
44
45 static const int NAME_MAX = 8;
46
47private:
48 /* 0x00 */ char mArchiveName[11];
49 /* 0x0C */ u16 mCount;
51 /* 0x14 */ JKRArchive* mArchive;
52 /* 0x18 */ JKRHeap* heap;
54 /* 0x20 */ void** mRes;
55}; // Size: 0x24
56
57STATIC_ASSERT(sizeof(dRes_info_c) == 0x24);
58
59class dRes_control_c {
60public:
63
65 int setStageRes(char const* i_arcName, JKRHeap* i_heap);
66 void dump();
67 int getObjectResName2Index(char const* i_arcName, char const* i_resName);
68
69 static int setRes(char const* i_arcName, dRes_info_c* i_resInfo, int i_infoNum, char const* i_path, u8 i_mountDirection, JKRHeap* i_heap);
70 static int syncRes(char const* i_arcName, dRes_info_c* i_resInfo, int i_infoNum);
71 static int deleteRes(char const* i_arcName, dRes_info_c* i_resInfo, int i_infoNum);
72 static void* getRes(char const* i_arcName, char const* i_resName, dRes_info_c* i_resInfo, int i_infoNum);
76 static void* getRes(char const* i_arcName, s32 i_index, dRes_info_c* i_resInfo, int i_infoNum);
77 static void* getIDRes(char const* i_arcName, u16 i_resID, dRes_info_c* i_resInfo, int i_infoNum);
78 static int syncAllRes(dRes_info_c* i_resInfo, int i_infoNum);
79
84
85 void* getObjectRes(const char* i_arcName, const char* resName) {
87 }
88
92
96
100
101 int syncStageRes(const char* i_arcName) {
103 }
104
106
110
114
115 void* getStageRes(const char* i_arcName, const char* i_resName) {
117 }
118
122
126
127 /* 0x0000 */ dRes_info_c mObjectInfo[128];
128 /* 0x1200 */ dRes_info_c mStageInfo[64];
129}; // Size: 0x1B00
130
131#endif /* D_D_RESORCE_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:79
Definition JKRArchive.h:57
virtual u32 countFile(const char *) const
Definition JKRArchivePub.cpp:339
Definition JKRHeap.h:16
Definition JKRSolidHeap.h:10
Definition m_Do_dvd_thread.h:81
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
int setObjectRes(char const *i_arcName, void *i_archiveRes, u32 i_bufferSize, JKRHeap *i_heap)
Definition d_resorce.cpp:926
void * getObjectRes(const char *i_arcName, s32 i_index)
Definition d_resorce.h:89
dRes_control_c()
Definition d_resorce.h:61
dRes_info_c * getStageResInfo(const char *i_arcName)
Definition d_resorce.h:123
int deleteStageRes(const char *i_arcName)
Definition d_resorce.h:111
static void * getIDRes(char const *i_arcName, u16 i_resID, dRes_info_c *i_resInfo, int i_infoNum)
Definition d_resorce.cpp:896
~dRes_control_c()
Definition d_resorce.cpp:722
dRes_info_c mObjectInfo[128]
Definition d_resorce.h:127
static void * getRes(char const *i_arcName, s32 i_index, dRes_info_c *i_resInfo, int i_infoNum)
void dump()
Definition d_resorce.cpp:965
static int setRes(char const *i_arcName, dRes_info_c *i_resInfo, int i_infoNum, char const *i_path, u8 i_mountDirection, JKRHeap *i_heap)
Definition d_resorce.cpp:734
int syncStageRes(const char *i_arcName)
Definition d_resorce.h:101
static dRes_info_c * getResInfoLoaded(char const *i_arcName, dRes_info_c *i_resInfo, int i_infoNum)
Definition d_resorce.cpp:835
int getObjectResName2Index(char const *i_arcName, char const *i_resName)
Definition d_resorce.cpp:977
void * getObjectRes(const char *i_arcName, const char *resName)
Definition d_resorce.h:85
static int deleteRes(char const *i_arcName, dRes_info_c *i_resInfo, int i_infoNum)
Definition d_resorce.cpp:786
dRes_info_c * getObjectResInfo(const char *i_arcName)
Definition d_resorce.h:119
int setObjectRes(const char *i_arcName, u8 i_mountDirection, JKRHeap *i_heap)
Definition d_resorce.h:80
static int syncRes(char const *i_arcName, dRes_info_c *i_resInfo, int i_infoNum)
Definition d_resorce.cpp:762
void * getObjectIDRes(const char *i_arcName, u16 i_resID)
Definition d_resorce.h:93
int deleteObjectRes(const char *i_arcName)
Definition d_resorce.h:107
static dRes_info_c * newResInfo(dRes_info_c *i_resInfo, int i_infoNum)
Definition d_resorce.cpp:822
void getRes(char const *, s32, dRes_info_c *, int)
Definition d_resorce.cpp:856
int setStageRes(char const *i_arcName, JKRHeap *i_heap)
Definition d_resorce.cpp:957
static dRes_info_c * getResInfo(char const *i_arcName, dRes_info_c *i_resInfo, int i_infoNum)
Definition d_resorce.cpp:807
int syncAllObjectRes()
Definition d_resorce.h:105
int syncObjectRes(const char *i_arcName)
Definition d_resorce.h:97
void * getStageRes(const char *i_arcName, const char *i_resName)
Definition d_resorce.h:115
static int syncAllRes(dRes_info_c *i_resInfo, int i_infoNum)
Definition d_resorce.cpp:913
dRes_info_c mStageInfo[64]
Definition d_resorce.h:128
Definition d_a_ep.cpp:58
int loadResource()
Definition d_resorce.cpp:318
int setRes()
Definition d_resorce.cpp:552
mDoDvdThd_mountArchive_c * mDMCommand
Definition d_resorce.h:50
JKRSolidHeap * mDataHeap
Definition d_resorce.h:53
static const int NAME_MAX
Definition d_resorce.h:45
dRes_info_c()
Definition d_resorce.cpp:17
void ** mRes
Definition d_resorce.h:54
static J3DModelData * loaderBasicBmd(u32 i_tag, void *i_data)
Definition d_resorce.cpp:235
char * getArchiveName()
Definition d_resorce.h:37
~dRes_info_c()
Definition d_resorce.cpp:27
static void offWarpMaterial(J3DModelData *i_modelData)
Definition d_resorce.cpp:200
void deleteArchiveRes()
Definition d_resorce.cpp:498
void incCount()
Definition d_resorce.h:40
JKRArchive * getArchive()
Definition d_resorce.h:39
char mArchiveName[11]
Definition d_resorce.h:48
JKRHeap * heap
Definition d_resorce.h:52
u16 decCount()
Definition d_resorce.h:41
void * getRes(s32 i_index)
Definition d_resorce.h:29
static void setWarpSRT(J3DModelData *i_modelData, const cXyz &i_pos, f32 i_transX, f32 i_transY)
Definition d_resorce.cpp:217
int getCount()
Definition d_resorce.h:36
s32 getResNum()
Definition d_resorce.h:34
JKRArchive * mArchive
Definition d_resorce.h:51
static void dump_long(dRes_info_c *i_resInfo, int i_infoNum)
Definition d_resorce.cpp:636
mDoDvdThd_mountArchive_c * getDMCommand()
Definition d_resorce.h:38
int set(char const *i_arcName, char const *i_path, u8 i_mountDirection, JKRHeap *i_heap)
Definition d_resorce.cpp:44
static void dump(dRes_info_c *i_resInfo, int i_infoNum)
Definition d_resorce.cpp:682
static void onWarpMaterial(J3DModelData *i_modelData)
Definition d_resorce.cpp:182
u16 mCount
Definition d_resorce.h:49
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