Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
J3DModel.h
Go to the documentation of this file.
1#ifndef J3DMODEL_H
2#define J3DMODEL_H
3
6#include "dolphin/types.h"
7
9 /* 0x00001 */ J3DMdlFlag_Unk00001 = 0x1,
10 /* 0x00002 */ J3DMdlFlag_Unk00002 = 0x2,
11 /* 0x00004 */ J3DMdlFlag_SkinPosCpu = 0x4,
12 /* 0x00008 */ J3DMdlFlag_SkinNrmCpu = 0x8,
13 /* 0x00010 */ J3DMdlFlag_Unk00010 = 0x10,
14 /* 0x20000 */ J3DMdlFlag_Unk20000 = 0x20000,
15 /* 0x40000 */ J3DMdlFlag_Unk40000 = 0x40000,
16 /* 0x80000 */ J3DMdlFlag_Unk80000 = 0x80000,
17};
18
24 virtual void calc(J3DModel* model);
25};
26
32 virtual void unk();
33 virtual void calc(J3DModelData* mpModelData);
34};
35
37
42class J3DModel {
43public:
45 initialize();
46 }
51
52 /* 80327100 */ void initialize();
53 /* 80327184 */ s32 entryModelData(J3DModelData*, u32, u32);
54 /* 80327300 */ s32 createShapePacket(J3DModelData*);
55 /* 803273CC */ s32 createMatPacket(J3DModelData*, u32);
56 /* 803275FC */ s32 newDifferedDisplayList(u32);
57 /* 8032767C */ void lock();
58 /* 803276B4 */ void unlock();
59 /* 803279A0 */ void diff();
60 /* 80327A2C */ s32 setDeformData(J3DDeformData*, u32);
61 /* 80327AA0 */ s32 setSkinDeform(J3DSkinDeform*, u32);
62 /* 80327BD4 */ void calcAnmMtx();
63 /* 80327C58 */ void calcWeightEnvelopeMtx();
64 /* 80328190 */ void calcNrmMtx();
65 /* 803281B4 */ void calcBumpMtx();
66 /* 803282B8 */ void calcBBoardMtx();
67 /* 803282EC */ void prepareShapePackets();
68
69 /* 80327CA4 */ virtual void update();
70 /* 80327E4C */ virtual void entry();
71 /* 80327CF0 */ virtual void calc();
72 /* 803276EC */ virtual void calcMaterial();
73 /* 80327858 */ virtual void calcDiffTexMtx();
74 /* 80327F40 */ virtual void viewCalc();
75 /* 80328350 */ virtual ~J3DModel() {}
76
78
79 void onFlag(u32 flag) { mFlags |= flag; }
80 void offFlag(u32 flag) { mFlags &= ~flag; }
81 bool checkFlag(u32 flag) const { return (mFlags & flag) ? true : false; }
82
84
87 u32 getMtxCalcMode() const { return mFlags & 0x03; }
89 J3DMatPacket* getMatPacket(u16 idx) const { return &mMatPacket[idx]; }
90 J3DShapePacket* getShapePacket(u16 idx) const { return &mShapePacket[idx]; }
92 void setScaleFlag(int idx, u8 flag) { mMtxBuffer->setScaleFlag(idx, flag); }
93 Mtx33* getBumpMtxPtr(int idx) const { return mMtxBuffer->getBumpMtxPtr(idx); }
94 Mtx33* getNrmMtxPtr() const { return mMtxBuffer->getNrmMtxPtr(); }
95 Mtx* getDrawMtxPtr() const { return mMtxBuffer->getDrawMtxPtr(); }
96 void setBaseScale(const Vec& scale) { mBaseScale = scale; }
98 u32 getUserArea() const { return mUserArea; }
99 Vec* getBaseScale() { return &mBaseScale; }
102
104 /* 0x08 */ u32 mFlags;
105 /* 0x0C */ u32 mDiffFlag;
107 /* 0x14 */ u32 mUserArea;
108 /* 0x18 */ Vec mBaseScale;
110 /* 0x54 */ Mtx mInternalView;
120};
121
122#endif /* J3DMODEL_H */
void(* J3DCalcCallBack)(J3DModel *, u32 timing)
Definition J3DModel.h:36
J3DMdlFlag
Definition J3DModel.h:8
@ J3DMdlFlag_Unk00001
Definition J3DModel.h:9
@ J3DMdlFlag_SkinPosCpu
Definition J3DModel.h:11
@ J3DMdlFlag_SkinNrmCpu
Definition J3DModel.h:12
@ J3DMdlFlag_Unk80000
Definition J3DModel.h:16
@ J3DMdlFlag_Unk20000
Definition J3DModel.h:14
@ J3DMdlFlag_Unk00002
Definition J3DModel.h:10
@ J3DMdlFlag_Unk40000
Definition J3DModel.h:15
@ J3DMdlFlag_Unk00010
Definition J3DModel.h:13
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition J3DCluster.h:74
Definition J3DPacket.h:206
Definition J3DMtxBuffer.h:12
Mtx33 * getNrmMtxPtr() const
Definition J3DMtxBuffer.h:42
Mtx * getDrawMtxPtr() const
Definition J3DMtxBuffer.h:39
void setScaleFlag(int idx, u8 flag)
Definition J3DMtxBuffer.h:33
MtxP getAnmMtx(int idx) const
Definition J3DMtxBuffer.h:28
void setAnmMtx(int i, Mtx m)
Definition J3DMtxBuffer.h:29
Mtx33 * getBumpMtxPtr(int idx) const
Definition J3DMtxBuffer.h:45
Definition J3DPacket.h:174
Definition J3DSkinDeform.h:34
Definition J3DVertex.h:75
static SECTION_RODATA u8 const jointNo[4]
Definition d_a_npc_besu.cpp:1776
static volatile BOOL flag
Definition dspproc.cpp:20
int m
Definition e_atan2.c:62
f32 Mtx33[3][3]
Definition mtx.h:16
f32(* MtxP)[4]
Definition mtx.h:18
f32 Mtx[3][4]
Definition mtx.h:15
Definition d_a_ep.cpp:51
Definition d_a_ep.cpp:155
virtual void calcMaterial()
Definition J3DModel.cpp:224
J3DUnkCalc1 * mUnkCalc1
Definition J3DModel.h:118
J3DSkinDeform * mSkinDeform
Definition J3DModel.h:116
void setAnmMtx(int jointNo, Mtx m)
Definition J3DModel.h:100
J3DVertexBuffer * getVertexBuffer() const
Definition J3DModel.h:88
u32 getUserArea() const
Definition J3DModel.h:98
Mtx33 * getBumpMtxPtr(int idx) const
Definition J3DModel.h:93
s32 createMatPacket(J3DModelData *, u32)
Definition J3DModel.cpp:113
s32 newDifferedDisplayList(u32)
Definition J3DModel.cpp:194
void calcNrmMtx()
Definition J3DModel.cpp:498
Mtx mInternalView
Definition J3DModel.h:110
J3DMtxBuffer * getMtxBuffer() const
Definition J3DModel.h:91
J3DCalcCallBack mCalcCallBack
Definition J3DModel.h:106
void calcBBoardMtx()
Definition J3DModel.cpp:522
J3DMatPacket * mMatPacket
Definition J3DModel.h:113
u32 mDiffFlag
Definition J3DModel.h:105
J3DShapePacket * getShapePacket(u16 idx) const
Definition J3DModel.h:90
Vec mBaseScale
Definition J3DModel.h:108
virtual void calc()
Definition J3DModel.cpp:387
J3DModel(J3DModelData *param_0, u32 param_1, u32 param_2)
Definition J3DModel.h:47
s32 entryModelData(J3DModelData *, u32, u32)
Definition J3DModel.cpp:38
J3DMatPacket * getMatPacket(u16 idx) const
Definition J3DModel.h:89
Mtx * getDrawMtxPtr() const
Definition J3DModel.h:95
J3DModelData * getModelData()
Definition J3DModel.h:77
s32 setSkinDeform(J3DSkinDeform *, u32)
Definition J3DModel.cpp:310
void offFlag(u32 flag)
Definition J3DModel.h:80
u32 getMtxCalcMode() const
Definition J3DModel.h:87
u32 mUserArea
Definition J3DModel.h:107
void diff()
Definition J3DModel.cpp:282
void unlock()
Definition J3DModel.cpp:215
J3DShapePacket * mShapePacket
Definition J3DModel.h:114
virtual void update()
Definition J3DModel.cpp:380
virtual ~J3DModel()
Definition J3DModel.h:75
J3DUnkCalc2 * mUnkCalc2
Definition J3DModel.h:119
J3DMtxBuffer * mMtxBuffer
Definition J3DModel.h:111
Mtx33 * getNrmMtxPtr() const
Definition J3DModel.h:94
s32 setDeformData(J3DDeformData *, u32)
Definition J3DModel.cpp:291
Mtx mBaseTransformMtx
Definition J3DModel.h:109
void calcAnmMtx()
Definition J3DModel.cpp:359
void onFlag(u32 flag)
Definition J3DModel.h:79
void initialize()
Definition J3DModel.cpp:12
virtual void viewCalc()
Definition J3DModel.cpp:461
J3DDeformData * mDeformData
Definition J3DModel.h:115
void setBaseTRMtx(Mtx m)
Definition J3DModel.h:86
Mtx & getBaseTRMtx()
Definition J3DModel.h:85
void prepareShapePackets()
Definition J3DModel.cpp:529
J3DModel()
Definition J3DModel.h:44
virtual void calcDiffTexMtx()
Definition J3DModel.cpp:258
void setUserArea(u32 area)
Definition J3DModel.h:97
J3DVtxColorCalc * mVtxColorCalc
Definition J3DModel.h:117
void setBaseScale(const Vec &scale)
Definition J3DModel.h:96
void lock()
Definition J3DModel.cpp:206
bool isCpuSkinningOn() const
Definition J3DModel.h:83
s32 createShapePacket(J3DModelData *)
Definition J3DModel.cpp:91
void calcBumpMtx()
Definition J3DModel.cpp:503
bool checkFlag(u32 flag) const
Definition J3DModel.h:81
void setScaleFlag(int idx, u8 flag)
Definition J3DModel.h:92
u32 mFlags
Definition J3DModel.h:104
J3DModelData * mModelData
Definition J3DModel.h:103
MtxP getAnmMtx(int jointNo)
Definition J3DModel.h:101
virtual void entry()
Definition J3DModel.cpp:434
void calcWeightEnvelopeMtx()
Definition J3DModel.cpp:371
J3DVertexBuffer mVertexBuffer
Definition J3DModel.h:112
Vec * getBaseScale()
Definition J3DModel.h:99
Definition J3DModel.h:23
virtual void calc(J3DModel *model)
Definition J3DModel.h:31
virtual void unk()
virtual void calc(J3DModelData *mpModelData)
Definition J3DVertex.h:16
Definition d_a_hozelda.cpp:18
unsigned long u32
Definition types.h:10
unsigned short u16
Definition types.h:9
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8
static VITimingInfo timing[10]
Definition vi.c:292