blob: 348519ac1261cf83eddfb567828bf6f399a4b439 (
plain)
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
//
// Generated By: dol2asm
// Translation Unit: J3DModelData
//
#include "JSystem/J3DGraphAnimator/J3DModelData.h"
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h"
#include "JSystem/J3DGraphBase/J3DMaterial.h"
#include "dol2asm.h"
#include "dolphin/os.h"
//
// Forward References:
//
extern "C" void clear__12J3DModelDataFv();
extern "C" void __ct__12J3DModelDataFv();
extern "C" void newSharedDisplayList__12J3DModelDataFUl();
extern "C" void indexToPtr__12J3DModelDataFv();
extern "C" void makeSharedDL__12J3DModelDataFv();
extern "C" void simpleCalcMaterial__12J3DModelDataFUsPA4_f();
extern "C" void syncJ3DSysPointers__12J3DModelDataCFv();
extern "C" void syncJ3DSysFlags__12J3DModelDataCFv();
extern "C" void __dt__13J3DShapeTableFv();
extern "C" void __dt__12J3DModelDataFv();
//
// External References:
//
extern "C" void __dl__FPv();
extern "C" void __ct__13J3DVertexDataFv();
extern "C" void __dt__14J3DDrawMtxDataFv();
extern "C" void countDLSize__11J3DMaterialFv();
extern "C" void newSharedDisplayList__11J3DMaterialFUl();
extern "C" void newSingleSharedDisplayList__11J3DMaterialFUl();
extern "C" void __ct__12J3DJointTreeFv();
extern "C" void __ct__16J3DMaterialTableFv();
extern "C" void __dt__16J3DMaterialTableFv();
extern "C" void _savegpr_27();
extern "C" void _savegpr_29();
extern "C" void _restgpr_27();
extern "C" void _restgpr_29();
extern "C" extern void* __vt__12J3DJointTree[4 + 1 /* padding */];
//
// Declarations:
//
/* 80325D88-80325DA0 3206C8 0018+00 1/1 2/2 0/0 .text clear__12J3DModelDataFv */
void J3DModelData::clear() {
mpRawData = 0;
mFlags = 0;
mbHasBumpArray = 0;
mbHasBillboard = 0;
}
/* ############################################################################################## */
/* 803CED08-803CED14 02BE28 000C+00 3/3 0/0 0/0 .data __vt__13J3DShapeTable */
SECTION_DATA extern void* __vt__13J3DShapeTable[3] = {
(void*)NULL /* RTTI */,
(void*)NULL,
(void*)__dt__13J3DShapeTableFv,
};
/* 803CED14-803CED20 02BE34 000C+00 2/2 0/0 0/0 .data __vt__12J3DModelData */
SECTION_DATA extern void* __vt__12J3DModelData[3] = {
(void*)NULL /* RTTI */,
(void*)NULL,
(void*)__dt__12J3DModelDataFv,
};
/* 80325DA0-80325E14 3206E0 0074+00 0/0 2/2 0/0 .text __ct__12J3DModelDataFv */
J3DModelData::J3DModelData() {
clear();
}
/* 80325E14-80325EC8 320754 00B4+00 0/0 2/2 0/0 .text newSharedDisplayList__12J3DModelDataFUl */
s32 J3DModelData::newSharedDisplayList(u32 flag) {
u16 matNum = getMaterialNum();
for (u16 i = 0; i < matNum; i++) {
if (!!(flag & 0x40000)) {
s32 ret = getMaterialNodePointer(i)->newSingleSharedDisplayList(getMaterialNodePointer(i)->countDLSize());
if (ret != kJ3DError_Success)
return ret;
} else {
s32 ret = getMaterialNodePointer(i)->newSharedDisplayList(getMaterialNodePointer(i)->countDLSize());
if (ret != kJ3DError_Success)
return ret;
}
}
return kJ3DError_Success;
}
/* ############################################################################################## */
/* 804515E8-804515EC 000AE8 0004+00 1/1 0/0 0/0 .sbss sInterruptFlag$965 */
static s32 sInterruptFlag;
/* 804515EC-804515F0 000AEC 0004+00 1/1 0/0 0/0 .sbss None */
static s8 sInitInterruptFlag;
/* 80325EC8-80325F94 320808 00CC+00 0/0 1/1 0/0 .text indexToPtr__12J3DModelDataFv */
void J3DModelData::indexToPtr() {
J3DTexture* tex = getTexture();
j3dSys.setTexture(tex);
if (!sInitInterruptFlag) {
sInterruptFlag = OSDisableInterrupts();
sInitInterruptFlag = true;
}
OSDisableScheduler();
GDLObj gdl_obj;
u16 matNum = getMaterialNum();
for (u16 i = 0; i < matNum; i++) {
J3DMaterial* matNode = getMaterialNodePointer(i);
J3DDisplayListObj* dl_obj = matNode->getSharedDisplayListObj();
GDInitGDLObj(&gdl_obj, dl_obj->getDisplayList(0), dl_obj->getDisplayListSize());
GDSetCurrent(&gdl_obj);
matNode->getTevBlock()->indexToPtr();
}
GDSetCurrent(NULL);
OSEnableScheduler();
OSRestoreInterrupts(sInterruptFlag);
}
/* 80325F94-8032600C 3208D4 0078+00 0/0 2/2 0/0 .text makeSharedDL__12J3DModelDataFv */
void J3DModelData::makeSharedDL() {
J3DTexture* tex = getTexture();
j3dSys.setTexture(tex);
u16 matNum = getMaterialNum();
for (u16 i = 0; i < matNum; i++) {
getMaterialNodePointer(i)->makeSharedDisplayList();
}
}
/* 8032600C-803260CC 32094C 00C0+00 0/0 3/3 7/7 .text simpleCalcMaterial__12J3DModelDataFUsPA4_f
*/
void J3DModelData::simpleCalcMaterial(u16 idx, Mtx param_1) {
syncJ3DSysFlags();
J3DJoint* jointNode = getJointNodePointer(idx);
for (J3DMaterial* mat = jointNode->getMesh(); mat != NULL; mat = mat->getNext()) {
if (mat->getMaterialAnm() != NULL) {
mat->getMaterialAnm()->calc(mat);
}
mat->calc(param_1);
}
}
/* 803260CC-803260F8 320A0C 002C+00 0/0 1/1 0/0 .text syncJ3DSysPointers__12J3DModelDataCFv */
void J3DModelData::syncJ3DSysPointers() const {
j3dSys.setTexture(getTexture());
j3dSys.setVtxPos(getVtxPosArray());
j3dSys.setVtxNrm(getVtxNrmArray());
j3dSys.setVtxCol(getVtxColorArray(0));
}
/* 803260F8-80326134 320A38 003C+00 1/1 5/5 0/0 .text syncJ3DSysFlags__12J3DModelDataCFv
*/
void J3DModelData::syncJ3DSysFlags() const {
if (checkFlag(0x20)) {
j3dSys.onFlag(J3DSysFlag_PostTexMtx);
} else {
j3dSys.offFlag(J3DSysFlag_PostTexMtx);
}
}
/* 80326134-8032617C 320A74 0048+00 1/0 0/0 0/0 .text __dt__13J3DShapeTableFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
extern "C" asm void __dt__13J3DShapeTableFv() {
// asm J3DShapeTable::~J3DShapeTable() {
nofralloc
#include "asm/JSystem/J3DGraphAnimator/J3DModelData/__dt__13J3DShapeTableFv.s"
}
#pragma pop
/* 8032617C-80326214 320ABC 0098+00 1/0 0/0 0/0 .text __dt__12J3DModelDataFv */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm J3DModelData::~J3DModelData() {
nofralloc
#include "asm/JSystem/J3DGraphAnimator/J3DModelData/__dt__12J3DModelDataFv.s"
}
#pragma pop
|