Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
J3DVertex.h
Go to the documentation of this file.
1#ifndef J3DVERTEX_H
2#define J3DVERTEX_H
3
4#include "dolphin/gx/GXAttr.h"
5#include "dolphin/mtx/vec.h"
6
7typedef struct _GXColor GXColor;
8class J3DModel;
10class J3DVertexBuffer;
11
17 /* 8032E180 */ void calc(J3DModel*);
18 virtual void calc(J3DVertexBuffer*);
19
20 /* 0x0 */ void* vtable; // inlined vtable?
21 /* 0x4 */ u32 mFlags;
23};
24
30public:
32
33 void* getVtxPosArray() const { return mVtxPosArray; }
34 void* getVtxNrmArray() const { return mVtxNrmArray; }
35 GXColor* getVtxColorArray(u8 idx) const { return mVtxColorArray[idx]; }
36 void* getVtxTexCoordArray(u8 idx) const { return mVtxTexCoordArray[idx]; }
37 void* getVtxNBTArray() const { return mVtxNBTArray; }
38 u32 getNrmNum() const { return mNrmNum; }
39 u32 getVtxNum() const { return mVtxNum; }
43 int getVtxPosType() { return mVtxPosType; }
44 int getVtxNrmType() { return mVtxNrmType; }
45
47 void setVtxPosType(GXCompType type) { mVtxPosType = type; }
49 void setVtxNrmType(GXCompType type) { mVtxNrmType = type; }
50
51private:
52 friend class J3DModelLoader;
53
54 /* 0x00 */ u32 mVtxNum;
55 /* 0x04 */ u32 mNrmNum;
56 /* 0x08 */ u32 mColNum;
57 /* 0x0C */ u32 mTexCoordNum;
58 /* 0x10 */ u32 mPacketNum;
60 /* 0x18 */ void* mVtxPosArray;
61 /* 0x1C */ void* mVtxNrmArray;
62 /* 0x20 */ void* mVtxNBTArray;
63 /* 0x24 */ GXColor* mVtxColorArray[2];
64 /* 0x2C */ void* mVtxTexCoordArray[8];
65 /* 0x4C */ u8 mVtxPosFrac;
67 /* 0x54 */ u8 mVtxNrmFrac;
69};
70
76public:
78
79 /* 80310F78 */ void setVertexData(J3DVertexData*);
80 /* 80310FD8 */ void init();
81 /* 80311030 */ ~J3DVertexBuffer();
82 /* 8031106C */ void setArray() const;
83 /* 80311090 */ s32 copyLocalVtxPosArray(u32);
84 /* 803111B0 */ s32 copyLocalVtxNrmArray(u32);
85 /* 803112D0 */ s32 copyLocalVtxArray(u32);
86 /* 80311478 */ s32 allocTransformedVtxPosArray();
87 /* 8031152C */ s32 allocTransformedVtxNrmArray();
88
90 void* getCurrentVtxPos() { return mCurrentVtxPos; }
91
93 void* getCurrentVtxNrm() { return mCurrentVtxNrm; }
94
96
102
103 void* getTransformedVtxPos(int idx) { return mTransformedVtxPosArray[idx]; }
104 void* getTransformedVtxNrm(int idx) { return mTransformedVtxNrmArray[idx]; }
106
112
118
120 void* temp = mVtxPosArray[0];
122 mVtxPosArray[1] = temp;
123 }
124
126 void* temp = mVtxNrmArray[0];
128 mVtxNrmArray[1] = temp;
129 }
130
131 void* getVtxPosArrayPointer(int index) {
132 return mVtxPosArray[index];
133 }
134
135 void* getVtxNrmArrayPointer(int index) {
136 return mVtxNrmArray[index];
137 }
138
139private:
141 /* 0x04 */ void* mVtxPosArray[2];
142 /* 0x0C */ void* mVtxNrmArray[2];
143 /* 0x14 */ GXColor* mVtxColArray[2];
144 /* 0x1C */ void* mTransformedVtxPosArray[2];
145 /* 0x24 */ void* mTransformedVtxNrmArray[2];
146 /* 0x2C */ void* mCurrentVtxPos;
147 /* 0x30 */ void* mCurrentVtxNrm;
149}; // Size: 0x38
150
153};
154
155#endif /* J3DVERTEX_H */
enum _GXCompType GXCompType
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition J3DAnimation.h:757
Definition J3DModelLoader.h:246
Definition J3DVertex.h:75
void * mTransformedVtxNrmArray[2]
Definition J3DVertex.h:145
void swapVtxNrmArrayPointer()
Definition J3DVertex.h:125
s32 copyLocalVtxNrmArray(u32)
Definition J3DVertex.cpp:124
void * getVtxPosArrayPointer(int index)
Definition J3DVertex.h:131
void * mCurrentVtxNrm
Definition J3DVertex.h:147
GXColor * mCurrentVtxCol
Definition J3DVertex.h:148
void * getTransformedVtxNrm(int idx)
Definition J3DVertex.h:104
s32 allocTransformedVtxPosArray()
Definition J3DVertex.cpp:204
void * getVtxNrmArrayPointer(int index)
Definition J3DVertex.h:135
void * getTransformedVtxPos(int idx)
Definition J3DVertex.h:103
void setCurrentVtxPos(void *pVtxPos)
Definition J3DVertex.h:89
void * mVtxNrmArray[2]
Definition J3DVertex.h:142
J3DVertexBuffer()
Definition J3DVertex.h:77
void * mVtxPosArray[2]
Definition J3DVertex.h:141
~J3DVertexBuffer()
Definition J3DVertex.cpp:84
void swapTransformedVtxNrm()
Definition J3DVertex.h:113
void setArray() const
Definition J3DVertex.cpp:87
void * mTransformedVtxPosArray[2]
Definition J3DVertex.h:144
void init()
Definition J3DVertex.cpp:58
void swapTransformedVtxPos()
Definition J3DVertex.h:107
void setCurrentVtxNrm(void *pVtxNrm)
Definition J3DVertex.h:92
void swapVtxPosArrayPointer()
Definition J3DVertex.h:119
void setVertexData(J3DVertexData *)
Definition J3DVertex.cpp:40
void setCurrentVtxCol(GXColor *pVtxCol)
Definition J3DVertex.h:95
void * getCurrentVtxPos()
Definition J3DVertex.h:90
GXColor * mVtxColArray[2]
Definition J3DVertex.h:143
s32 copyLocalVtxArray(u32)
Definition J3DVertex.cpp:152
J3DVertexData * mVtxData
Definition J3DVertex.h:140
void frameInit()
Definition J3DVertex.h:97
void * getCurrentVtxNrm()
Definition J3DVertex.h:93
s32 copyLocalVtxPosArray(u32)
Definition J3DVertex.cpp:95
void * mCurrentVtxPos
Definition J3DVertex.h:146
s32 allocTransformedVtxNrmArray()
Definition J3DVertex.cpp:221
J3DVertexData * getVertexData()
Definition J3DVertex.h:105
Definition J3DVertex.h:29
u32 mPacketNum
Definition J3DVertex.h:58
GXCompType mVtxNrmType
Definition J3DVertex.h:68
void setVtxNrmFrac(u8 frac)
Definition J3DVertex.h:48
u32 mTexCoordNum
Definition J3DVertex.h:57
void * getVtxTexCoordArray(u8 idx) const
Definition J3DVertex.h:36
u32 getVtxNum() const
Definition J3DVertex.h:39
GXVtxAttrFmtList * getVtxAttrFmtList()
Definition J3DVertex.h:40
void setVtxNrmType(GXCompType type)
Definition J3DVertex.h:49
u8 getVtxPosFrac()
Definition J3DVertex.h:41
J3DVertexData()
Definition J3DVertex.cpp:14
void * mVtxTexCoordArray[8]
Definition J3DVertex.h:64
u32 getNrmNum() const
Definition J3DVertex.h:38
void * mVtxNBTArray
Definition J3DVertex.h:62
u32 mColNum
Definition J3DVertex.h:56
u32 mNrmNum
Definition J3DVertex.h:55
void * mVtxNrmArray
Definition J3DVertex.h:61
u8 getVtxNrmFrac()
Definition J3DVertex.h:42
GXVtxAttrFmtList * mVtxAttrFmtList
Definition J3DVertex.h:59
void * mVtxPosArray
Definition J3DVertex.h:60
void * getVtxNBTArray() const
Definition J3DVertex.h:37
GXColor * mVtxColorArray[2]
Definition J3DVertex.h:63
void * getVtxPosArray() const
Definition J3DVertex.h:33
u8 mVtxPosFrac
Definition J3DVertex.h:65
int getVtxPosType()
Definition J3DVertex.h:43
GXColor * getVtxColorArray(u8 idx) const
Definition J3DVertex.h:35
void setVtxPosFrac(u8 frac)
Definition J3DVertex.h:46
void setVtxPosType(GXCompType type)
Definition J3DVertex.h:47
int getVtxNrmType()
Definition J3DVertex.h:44
GXCompType mVtxPosType
Definition J3DVertex.h:66
u8 mVtxNrmFrac
Definition J3DVertex.h:67
void * getVtxNrmArray() const
Definition J3DVertex.h:34
u32 mVtxNum
Definition J3DVertex.h:54
static char * tmp[5]
Definition d_a_npc_ashB.cpp:231
Definition d_a_ep.cpp:155
Definition J3DVertex.h:16
void * vtable
Definition J3DVertex.h:20
void calc(J3DModel *)
Definition J3DSkinDeform.cpp:643
J3DAnmVtxColor * mpVtxColor
Definition J3DVertex.h:22
virtual void calc(J3DVertexBuffer *)
u32 mFlags
Definition J3DVertex.h:21
Definition d_a_hozelda.cpp:18
Definition J3DVertex.h:151
Vec data
Definition J3DVertex.h:152
Definition d_a_ep.cpp:68
Definition GXAttr.h:15
unsigned long u32
Definition types.h:10
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8