1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
#ifndef J3DSTRUCT_H
#define J3DSTRUCT_H
#include "dolphin/gx/GXStruct.h"
#include "dolphin/mtx.h"
#include "dolphin/mtx/vec.h"
/**
* @ingroup jsystem-j3d
*
*/
class J3DLightInfo {
public:
/* 803256C4 */ J3DLightInfo& operator=(J3DLightInfo const&);
/* 0x00 */ Vec mLightPosition;
/* 0x0C */ Vec mLightDirection;
/* 0x18 */ GXColor mColor;
/* 0x1C */ Vec mCosAtten;
/* 0x28 */ Vec mDistAtten;
}; // Size = 0x34
extern "C" extern J3DLightInfo const j3dDefaultLightInfo;
/**
* @ingroup jsystem-j3d
*
*/
class J3DLightObj {
public:
/* 80018C0C */ J3DLightObj() { mInfo = j3dDefaultLightInfo; }
/* 80323590 */ void load(u32) const;
J3DLightInfo& getLightInfo() { return mInfo; }
J3DLightObj& operator=(J3DLightObj const& other) {
mInfo = other.mInfo;
return *this;
}
/* 0x00 */ J3DLightInfo mInfo;
/* 0x34 */ GXLightObj mLightObj;
}; // Size = 0x74
/**
* @ingroup jsystem-j3d
*
*/
struct J3DTextureSRTInfo {
/* 0x00 */ f32 mScaleX;
/* 0x04 */ f32 mScaleY;
/* 0x08 */ s16 mRotation;
/* 0x0C */ f32 mTranslationX;
/* 0x10 */ f32 mTranslationY;
inline void operator=(J3DTextureSRTInfo const& other) {
register const f32* src = &other.mScaleX;
register f32* dst = &mScaleX;
register f32 xy;
asm {
psq_l xy, 0(src), 0, 0
psq_st xy, 0(dst), 0, 0
};
// Unclear why there's a 4 byte copy here.
*(u32*)&mRotation = *(u32*)&other.mRotation;
src = &other.mTranslationX;
dst = &mTranslationX;
asm {
psq_l xy, 0(src), 0, 0
psq_st xy, 0(dst), 0, 0
};
}
}; // Size: 0x14
enum J3DTexMtxMode {
J3DTexMtxMode_None,
J3DTexMtxMode_EnvmapBasic,
J3DTexMtxMode_ProjmapBasic,
J3DTexMtxMode_ViewProjmapBasic,
J3DTexMtxMode_Unknown4,
J3DTexMtxMode_Unknown5,
J3DTexMtxMode_EnvmapOld,
J3DTexMtxMode_Envmap,
J3DTexMtxMode_Projmap,
J3DTexMtxMode_ViewProjmap,
J3DTexMtxMode_EnvmapOldEffectMtx,
J3DTexMtxMode_EnvmapEffectMtx,
};
/**
* @ingroup jsystem-j3d
*
*/
struct J3DTexMtxInfo {
/* 80325718 */ J3DTexMtxInfo& operator=(J3DTexMtxInfo const&);
/* 80325794 */ void setEffectMtx(Mtx);
/* 0x00 */ u8 mProjection;
/* 0x01 */ u8 mInfo;
/* 0x02 */ u8 field_0x2;
/* 0x03 */ u8 field_0x3;
/* 0x04 */ Vec mCenter;
/* 0x10 */ J3DTextureSRTInfo mSRT;
/* 0x24 */ Mtx44 mEffectMtx;
}; // Size: 0x64
/**
* @ingroup jsystem-j3d
*
*/
struct J3DIndTexMtxInfo {
J3DIndTexMtxInfo& operator=(J3DIndTexMtxInfo const&);
/* 0x00 */ Mtx23 field_0x0;
/* 0x18 */ u8 field_0x18;
}; // Size: 0x1C
/**
* @ingroup jsystem-j3d
*
*/
struct J3DFogInfo {
/* 80325800 */ J3DFogInfo& operator=(J3DFogInfo const&);
/* 0x00 */ u8 mType;
/* 0x01 */ u8 mAdjEnable;
/* 0x02 */ u16 mCenter;
/* 0x04 */ f32 mStartZ;
/* 0x08 */ f32 mEndZ;
/* 0x0C */ f32 mNearZ;
/* 0x10 */ f32 mFarZ;
/* 0x14 */ GXColor mColor;
/* 0x18 */ GXFogAdjTable mFogAdjTable;
}; // Size: 0x2C
/**
* @ingroup jsystem-j3d
*
*/
struct J3DNBTScaleInfo {
/* 8032587C */ J3DNBTScaleInfo& operator=(J3DNBTScaleInfo const&);
/* 0x0 */ bool mbHasScale;
/* 0x4 */ Vec mScale;
}; // Size: 0x10
#endif /* J3DSTRUCT_H */
|