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
|
//
// Generated by dtk
// Translation Unit: d_wpot_water.cpp
//
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_wpot_water.h"
#include "d/d_bg_s_gnd_chk.h"
#include "d/d_com_inf_game.h"
#include "f_op/f_op_kankyo_mng.h"
dWpotWater_EcallBack dWpotWater_c::mEcallback;
/* 8023F5D0-8023F64C .text draw__20dWpotWater_EcallBackFP14JPABaseEmitter */
void dWpotWater_EcallBack::draw(JPABaseEmitter* emtr) {
if (emtr->isZDraw()) {
GXSetAlphaCompare(GX_ALWAYS, 0, GX_AOP_AND, GX_ALWAYS, 0);
GXSetBlendMode(GX_BM_BLEND, GX_BL_DST_ALPHA, GX_BL_INV_DST_ALPHA, GX_LO_CLEAR);
GXSetZMode(GX_FALSE, GX_LEQUAL, GX_FALSE);
GXSetZCompLoc(GX_FALSE);
GXSetColorUpdate(GX_FALSE);
GXSetAlphaUpdate(GX_TRUE);
}
}
BOOL dWpotWater_c::draw() {
dComIfGd_getXluList()->entryImm(&mPacket, 0);
return TRUE;
}
/* 8023F64C-8023F688 .text dWpotWater_Draw__FP12dWpotWater_c */
static BOOL dWpotWater_Draw(dWpotWater_c* i_this) {
return i_this->draw();
}
BOOL dWpotWater_c::execute() {
mDoMtx_stack_c::transS(mPos.x, mPos.y + 50.0f, mPos.z);
mDoMtx_stack_c::scaleM(220.0f, 100.0f, 220.0f);
mDoMtx_concat(j3dSys.getViewMtx(), mDoMtx_stack_c::get(), mPacket.getMtx());
if (emtr->isEnableDeleteEmitter()) {
emtr->quitImmortalEmitter();
fopKyM_Delete(this);
}
return TRUE;
}
/* 8023F688-8023F740 .text dWpotWater_Execute__FP12dWpotWater_c */
static BOOL dWpotWater_Execute(dWpotWater_c* i_this) {
return i_this->execute();
}
/* 8023F740-8023F748 .text dWpotWater_IsDelete__FP12dWpotWater_c */
static BOOL dWpotWater_IsDelete(dWpotWater_c* i_this) {
return TRUE;
}
/* 8023F748-8023F750 .text dWpotWater_Delete__FP12dWpotWater_c */
static BOOL dWpotWater_Delete(dWpotWater_c* i_this) {
return TRUE;
}
cPhs_State dWpotWater_c::create() {
new (this) dWpotWater_c();
dComIfGp_particle_set(dPa_name::ID_IT_SN_WPOT_BITYA, &mPos);
dComIfGp_particle_set(dPa_name::ID_IT_SN_WPOT_SHIBUKI, &mPos);
emtr = dComIfGp_particle_set(dPa_name::ID_IT_SN_WPOT_YUKA, &mPos, NULL, NULL, 0xAA, &dWpotWater_c::mEcallback);
if (emtr == NULL) {
return cPhs_ERROR_e;
} else {
emtr->becomeImmortalEmitter();
return cPhs_COMPLEATE_e;
}
}
/* 8023F750-8023FFCC .text dWpotWater_Create__FP12kankyo_class */
static cPhs_State dWpotWater_Create(kankyo_class* i_this) {
dWpotWater_c* a_this = (dWpotWater_c*)i_this;
dBgS_GndChk gndChk;
dBgS_ObjGndChk_Yogan lavaChk;
cXyz pos;
s16 angle = 0;
for (s32 i = 0; i < 50; i++, angle += 10000) {
f32 f4 = i * 2.0408163f;
pos.set(
i_this->mPos.x + f4 * cM_scos(angle),
i_this->mPos.y + 100.0f,
i_this->mPos.z + f4 * cM_ssin(angle)
);
lavaChk.SetPos(&pos);
f32 lavaY = dComIfG_Bgsp()->GroundCross(&lavaChk);
if (lavaY != -G_CM3D_F_INF) {
gndChk.SetPos(&pos);
f32 groundY = dComIfG_Bgsp()->GroundCross(&gndChk);
if (lavaChk.ChkSetInfo() && dComIfG_Bgsp()->GetAttributeCode(lavaChk) == dBgS_Attr_LAVA_e && lavaY > groundY) {
cXyz spawnPos(pos.x, lavaY + 25.0f, pos.z);
fopAcM_create(fpcNm_Obj_Magmarock_e, 0, &spawnPos, i_this->mParam);
break;
}
}
}
pos.set(
i_this->mPos.x,
i_this->mPos.y + 100.0f,
i_this->mPos.z
);
gndChk.SetPos(&pos);
f32 groundY = dComIfG_Bgsp()->GroundCross(&gndChk);
i_this->mPos.y = groundY;
if (groundY != -G_CM3D_F_INF) {
cXyz sp18(i_this->mPos.x, i_this->mPos.y, i_this->mPos.z);
fopAcM_create(fpcNm_HITOBJ_e, 0, &sp18, i_this->mParam);
return a_this->create();
}
return cPhs_ERROR_e;
}
static kankyo_method_class l_dWpotWater_Method = {
(process_method_func)dWpotWater_Create,
(process_method_func)dWpotWater_Delete,
(process_method_func)dWpotWater_Execute,
(process_method_func)dWpotWater_IsDelete,
(process_method_func)dWpotWater_Draw,
};
kankyo_process_profile_definition g_profile_WPOT_WATER = {
/* Layer ID */ fpcLy_CURRENT_e,
/* List ID */ 0x0002,
/* List Prio */ fpcPi_CURRENT_e,
/* Proc Name */ fpcNm_WPOT_WATER_e,
/* Proc SubMtd */ &g_fpcLf_Method.base,
/* Size */ sizeof(dWpotWater_c),
/* Size Other */ 0,
/* Parameters */ 0,
/* Leaf SubMtd */ &g_fopKy_Method,
/* Draw Prio */ fpcDwPi_WPOT_WATER_e,
/* Kankyo SubMtd */ &l_dWpotWater_Method,
};
|