Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
J3DStruct.h
Go to the documentation of this file.
1#ifndef J3DSTRUCT_H
2#define J3DSTRUCT_H
3
5#include "dolphin/mtx.h"
6#include "dolphin/mtx/vec.h"
7
13public:
14 /* 803256C4 */ J3DLightInfo& operator=(J3DLightInfo const&);
15
16 /* 0x00 */ Vec mLightPosition;
17 /* 0x0C */ Vec mLightDirection;
18 /* 0x18 */ GXColor mColor;
19 /* 0x1C */ Vec mCosAtten;
20 /* 0x28 */ Vec mDistAtten;
21}; // Size = 0x34
22
23extern "C" extern J3DLightInfo const j3dDefaultLightInfo;
24
30public:
31 /* 80018C0C */ J3DLightObj() { mInfo = j3dDefaultLightInfo; }
32 /* 80323590 */ void load(u32) const;
33
36 mInfo = other.mInfo;
37 return *this;
38 }
39
40 /* 0x00 */ J3DLightInfo mInfo;
42}; // Size = 0x74
43
49 /* 0x00 */ f32 mScaleX;
50 /* 0x04 */ f32 mScaleY;
51 /* 0x08 */ s16 mRotation;
52 /* 0x0C */ f32 mTranslationX;
53 /* 0x10 */ f32 mTranslationY;
54
55 inline void operator=(J3DTextureSRTInfo const& other) {
56 register const f32* src = &other.mScaleX;
57 register f32* dst = &mScaleX;
58 register f32 xy;
59 asm {
60 psq_l xy, 0(src), 0, 0
61 psq_st xy, 0(dst), 0, 0
62 };
63 // Unclear why there's a 4 byte copy here.
64 *(u32*)&mRotation = *(u32*)&other.mRotation;
65 src = &other.mTranslationX;
66 dst = &mTranslationX;
67 asm {
68 psq_l xy, 0(src), 0, 0
69 psq_st xy, 0(dst), 0, 0
70 };
71 }
72}; // Size: 0x14
73
88
94 /* 80325718 */ J3DTexMtxInfo& operator=(J3DTexMtxInfo const&);
95 /* 80325794 */ void setEffectMtx(Mtx);
96
97 /* 0x00 */ u8 mProjection;
98 /* 0x01 */ u8 mInfo;
99 /* 0x02 */ u8 field_0x2;
100 /* 0x03 */ u8 field_0x3;
101 /* 0x04 */ Vec mCenter;
103 /* 0x24 */ Mtx44 mEffectMtx;
104}; // Size: 0x64
105
112 /* 0x00 */ Mtx23 field_0x0;
113 /* 0x18 */ u8 field_0x18;
114}; // Size: 0x1C
115
121 /* 80325800 */ J3DFogInfo& operator=(J3DFogInfo const&);
122
123 /* 0x00 */ u8 mType;
124 /* 0x01 */ u8 mAdjEnable;
125 /* 0x02 */ u16 mCenter;
126 /* 0x04 */ f32 mStartZ;
127 /* 0x08 */ f32 mEndZ;
128 /* 0x0C */ f32 mNearZ;
129 /* 0x10 */ f32 mFarZ;
130 /* 0x14 */ GXColor mColor;
132}; // Size: 0x2C
133
139 /* 8032587C */ J3DNBTScaleInfo& operator=(J3DNBTScaleInfo const&);
140
141 /* 0x0 */ bool mbHasScale;
142 /* 0x4 */ Vec mScale;
143}; // Size: 0x10
144
145#endif /* J3DSTRUCT_H */
J3DLightInfo const j3dDefaultLightInfo
J3DTexMtxMode
Definition J3DStruct.h:74
@ J3DTexMtxMode_ProjmapBasic
Definition J3DStruct.h:77
@ J3DTexMtxMode_EnvmapEffectMtx
Definition J3DStruct.h:86
@ J3DTexMtxMode_EnvmapBasic
Definition J3DStruct.h:76
@ J3DTexMtxMode_EnvmapOldEffectMtx
Definition J3DStruct.h:85
@ J3DTexMtxMode_Unknown5
Definition J3DStruct.h:80
@ J3DTexMtxMode_None
Definition J3DStruct.h:75
@ J3DTexMtxMode_ViewProjmap
Definition J3DStruct.h:84
@ J3DTexMtxMode_Projmap
Definition J3DStruct.h:83
@ J3DTexMtxMode_Envmap
Definition J3DStruct.h:82
@ J3DTexMtxMode_ViewProjmapBasic
Definition J3DStruct.h:78
@ J3DTexMtxMode_EnvmapOld
Definition J3DStruct.h:81
@ J3DTexMtxMode_Unknown4
Definition J3DStruct.h:79
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition J3DStruct.h:12
GXColor mColor
Definition J3DStruct.h:18
Vec mDistAtten
Definition J3DStruct.h:20
Vec mLightDirection
Definition J3DStruct.h:17
J3DLightInfo & operator=(J3DLightInfo const &)
Definition J3DStruct.cpp:9
Vec mCosAtten
Definition J3DStruct.h:19
Vec mLightPosition
Definition J3DStruct.h:16
Definition J3DStruct.h:29
J3DLightObj()
Definition J3DStruct.h:31
J3DLightInfo & getLightInfo()
Definition J3DStruct.h:34
J3DLightInfo mInfo
Definition J3DStruct.h:40
void load(u32) const
Definition J3DTevs.cpp:15
GXLightObj mLightObj
Definition J3DStruct.h:41
J3DLightObj & operator=(J3DLightObj const &other)
Definition J3DStruct.h:35
f32 Mtx44[4][4]
Definition mtx44.h:6
f32 Mtx23[2][3]
Definition mtx.h:17
f32 Mtx[3][4]
Definition mtx.h:15
Definition J3DStruct.h:120
u8 mAdjEnable
Definition J3DStruct.h:124
f32 mEndZ
Definition J3DStruct.h:127
GXFogAdjTable mFogAdjTable
Definition J3DStruct.h:131
u16 mCenter
Definition J3DStruct.h:125
f32 mStartZ
Definition J3DStruct.h:126
GXColor mColor
Definition J3DStruct.h:130
J3DFogInfo & operator=(J3DFogInfo const &)
Definition J3DStruct.cpp:54
f32 mNearZ
Definition J3DStruct.h:128
u8 mType
Definition J3DStruct.h:123
f32 mFarZ
Definition J3DStruct.h:129
Definition J3DStruct.h:110
Mtx23 field_0x0
Definition J3DStruct.h:112
u8 field_0x18
Definition J3DStruct.h:113
J3DIndTexMtxInfo & operator=(J3DIndTexMtxInfo const &)
Definition J3DStruct.cpp:46
Definition J3DStruct.h:138
J3DNBTScaleInfo & operator=(J3DNBTScaleInfo const &)
Definition J3DStruct.cpp:71
bool mbHasScale
Definition J3DStruct.h:141
Vec mScale
Definition J3DStruct.h:142
Definition J3DStruct.h:93
void setEffectMtx(Mtx)
Definition J3DStruct.cpp:33
Vec mCenter
Definition J3DStruct.h:101
u8 field_0x3
Definition J3DStruct.h:100
u8 mInfo
Definition J3DStruct.h:98
J3DTextureSRTInfo mSRT
Definition J3DStruct.h:102
Mtx44 mEffectMtx
Definition J3DStruct.h:103
J3DTexMtxInfo & operator=(J3DTexMtxInfo const &)
Definition J3DStruct.cpp:17
u8 mProjection
Definition J3DStruct.h:97
u8 field_0x2
Definition J3DStruct.h:99
Definition J3DStruct.h:48
f32 mTranslationY
Definition J3DStruct.h:53
f32 mScaleY
Definition J3DStruct.h:50
void operator=(J3DTextureSRTInfo const &other)
Definition J3DStruct.h:55
s16 mRotation
Definition J3DStruct.h:51
f32 mTranslationX
Definition J3DStruct.h:52
f32 mScaleX
Definition J3DStruct.h:49
Definition d_a_hozelda.cpp:18
Definition d_a_ep.cpp:68
Definition GXStruct.h:76
Definition GXStruct.h:59
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
signed short s16
Definition types.h:5
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8