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
|
//
// Generated by dtk
// Translation Unit: d_a_tpota.cpp
//
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_tpota.h"
#include "JSystem/JGeometry.h"
#include "d/d_particle.h"
#include "JSystem/JParticle/JPAParticle.h"
#include "d/d_particle.h"
#include "d/d_com_inf_game.h"
const u16 l_daTpota_idx_table[2] = {dPa_name::ID_IT_SN_TAKIURA_POTAA00, dPa_name::ID_IT_SN_TAKIURA_POTAB00};
/* 00000078-000001D0 .text _create__9daTpota_cFv */
cPhs_State daTpota_c::_create() {
fopAcM_ct(this, daTpota_c);
JPABaseEmitter* emitter;
for (int i = 0; i < 2; i++) {
mPositions[i] = current.pos;
mAngles[i] = current.angle;
emitter = dComIfGp_particle_set(
l_daTpota_idx_table[i],
&mPositions[i],
&mAngles[i],
NULL, 0xff, NULL, -1, NULL, NULL, NULL
);
mpEmitters[i] = emitter;
}
return cPhs_COMPLEATE_e;
}
/* 00000250-00000298 .text _delete__9daTpota_cFv */
bool daTpota_c::_delete() {
for (int i = 0; i < 2; i++) {
if (mpEmitters[i] != NULL) {
mpEmitters[i]->becomeInvalidEmitter();
mpEmitters[i] = NULL;
}
}
return true;
}
/* 00000298-000002FC .text make_ripple__9daTpota_cF4cXyz */
void daTpota_c::make_ripple(cXyz i_position) {
dComIfGp_particle_set(dPa_name::ID_IT_SN_TAKIURA_HAMON00, &i_position,
NULL, NULL, 0xff, NULL, -1, NULL, NULL, NULL);
}
/* 000002FC-00000354 .text check_water_h__9daTpota_cFP15JPABaseParticlef */
BOOL daTpota_c::check_water_h(JPABaseParticle* i_ptcl, float i_position_y) {
unknown_struct* unknown_struct = field_0x2C4;
int ret = FALSE;
if (i_position_y <= -230.0f) {
for (int i = 0; i < ARRAY_SIZE(field_0x2C4); i++, unknown_struct++) {
if (unknown_struct->ptcl == i_ptcl) {
if (unknown_struct->pos_y > -230.0f) {
ret = TRUE;
}
break;
}
}
}
return ret;
}
/* 00000354-00000380 .text clear_splash__9daTpota_cFv */
void daTpota_c::clear_splash() {
unknown_struct* unknown_struct = field_0x2C4;
for (int i = 0; i < 30; i++) {
unknown_struct->ptcl = NULL;
unknown_struct->pos_y = 0.0f;
unknown_struct++;
}
}
/* 00000380-000003F4 .text renew_splash__9daTpota_cFv */
void daTpota_c::renew_splash() {
if (mpEmitters[1] != NULL) {
JSUPtrList* list = mpEmitters[1]->getParticleList();
unknown_struct *unknown_struct = field_0x2C4;
if(list != NULL){
clear_splash();
for (JSUPtrLink* link = list->getFirstLink(); link != NULL && (link != NULL); link = link->getNext()){
JPABaseParticle* particle = (JPABaseParticle*)link->getObjectPtr();
JGeometry::TVec3<f32> position;
particle->getGlobalPosition(position);
unknown_struct->ptcl = particle;
unknown_struct->pos_y = position.y;
unknown_struct++;
}
}
}
}
/* 000003F4-000004C8 .text _execute__9daTpota_cFv */
bool daTpota_c::_execute() {
if (mpEmitters[1] != NULL){
JSUPtrList* list = mpEmitters[1]->getParticleList();
if(list != NULL){
for (JSUPtrLink* link = list->getFirstLink(); link != NULL && (link != NULL);
link = link->getNext()){
JPABaseParticle* particle = (JPABaseParticle *)link->getObjectPtr();
JGeometry::TVec3<f32> position;
particle->getGlobalPosition(position);
if(check_water_h(particle, position.y)){
cXyz local_48;
local_48.x = position.x;
local_48.y = -230.0;
local_48.z = position.z;
make_ripple(local_48);
}
}
}
renew_splash();
}
return true;
}
/* 000004C8-000004D0 .text _draw__9daTpota_cFv */
bool daTpota_c::_draw() {
return TRUE;
}
namespace {
/* 000004D0-000004F0 .text Mthd_Create__23@unnamed@d_a_tpota_cpp@FPv */
cPhs_State Mthd_Create(void* i_this) {
return static_cast<daTpota_c*>(i_this)->_create();
}
/* 000004F0-00000514 .text Mthd_Delete__23@unnamed@d_a_tpota_cpp@FPv */
BOOL Mthd_Delete(void* i_this) {
return static_cast<daTpota_c*>(i_this)->_delete();
}
/* 00000514-00000538 .text Mthd_Execute__23@unnamed@d_a_tpota_cpp@FPv */
BOOL Mthd_Execute(void* i_this) {
return static_cast<daTpota_c*>(i_this)->_execute();
}
/* 00000538-0000055C .text Mthd_Draw__23@unnamed@d_a_tpota_cpp@FPv */
BOOL Mthd_Draw(void* i_this) {
return static_cast<daTpota_c*>(i_this)->_draw();
}
/* 0000055C-00000564 .text Mthd_IsDelete__23@unnamed@d_a_tpota_cpp@FPv */
BOOL Mthd_IsDelete(void*) {
return TRUE;
}
static actor_method_class Tpota_Mthd_Table = {
(process_method_func)Mthd_Create,
(process_method_func)Mthd_Delete,
(process_method_func)Mthd_Execute,
(process_method_func)Mthd_IsDelete,
(process_method_func)Mthd_Draw,
};
}; // namespace
actor_process_profile_definition g_profile_Tpota = {
/* Layer ID */ fpcLy_CURRENT_e,
/* List ID */ 0x0007,
/* List Prio */ fpcPi_CURRENT_e,
/* Proc Name */ fpcNm_Tpota_e,
/* Proc SubMtd */ &g_fpcLf_Method.base,
/* Size */ sizeof(daTpota_c),
/* Size Other */ 0,
/* Parameters */ 0,
/* Leaf SubMtd */ &g_fopAc_Method.base,
/* Draw Prio */ fpcDwPi_Tpota_e,
/* Actor SubMtd */ &Tpota_Mthd_Table,
/* Status */ fopAcStts_UNK40000_e,
/* Group */ fopAc_ACTOR_e,
/* Cull Type */ fopAc_CULLBOX_CUSTOM_e,
};
|