NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
g3d_resdict.h
1
#ifndef NW4R_G3D_RES_RES_DICT_H
2
#define NW4R_G3D_RES_RES_DICT_H
3
#include <nw4r/types_nw4r.h>
4
5
#include <nw4r/g3d/res/g3d_rescommon.h>
6
7
namespace
nw4r {
8
namespace
g3d
{
9
10
struct
ResDicNodeData
{
11
u16 ref;
// at 0x0
12
u16 flag;
// at 0x2
13
u16 idxLeft;
// at 0x4
14
u16 idxRight;
// at 0x6
15
s32 ofsString;
// at 0x8
16
s32 ofsData;
// at 0xC
17
};
18
19
struct
ResDicData
{
20
ulong size;
// at 0x0
21
ulong numData;
// at 0x4
22
ResDicNodeData
data[1];
// at 0x8
23
};
24
25
class
ResDic
:
public
ResCommon<ResDicData> {
26
public
:
27
static
const
s32 NOT_FOUND = -1;
28
29
public
:
30
NW4R_G3D_RESOURCE_FUNC_DEF(
ResDic
);
31
32
void
* operator[](
const
char
* pName)
const
;
33
void
* operator[](
const
ResName
name)
const
;
34
void
* operator[](
int
idx)
const
{
35
if
(IsValid()) {
36
return
const_cast<
void
*
>
(
37
ofs_to_ptr<void>(ref().data[idx + 1].ofsData));
38
}
39
40
return
NULL;
41
}
42
43
s32 GetIndex(
const
ResName
name)
const
;
44
45
ulong GetNumData()
const
{
46
if
(IsValid()) {
47
return
ptr()->numData;
48
}
49
50
return
0;
51
}
52
53
private
:
54
ResDicNodeData
* Get(
const
ResName
name)
const
;
55
ResDicNodeData
* Get(
const
char
* pName, ulong len)
const
;
56
};
57
58
}
// namespace g3d
59
}
// namespace nw4r
60
61
#endif
nw4r::g3d::ResDic
Definition
g3d_resdict.h:25
nw4r::g3d::ResName
Definition
g3d_rescommon.h:165
nw4r::g3d
3D graphics drawing library.
Definition
g3d_3dsmax.h:10
nw4r::g3d::ResDicData
Definition
g3d_resdict.h:19
nw4r::g3d::ResDicNodeData
Definition
g3d_resdict.h:10
include
lib
nw4r
g3d
res
g3d_resdict.h
Made with ❤️ by
CLF78
and
RootCubed
. Logos by
Chasical
and
B1
. Website generated by
Doxygen
1.13.2