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
|
//
// Generated by dtk
// Translation Unit: d_a_hot_floor.cpp
//
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_hot_floor.h"
#include "f_op/f_op_actor_mng.h"
#include "JSystem/JParticle/JPAParticle.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "d/d_bg_w.h"
#include "d/d_com_inf_game.h"
#include "m_Do/m_Do_ext.h"
#include "m_Do/m_Do_mtx.h"
const char daHot_Floor_c::M_arcname[8] = "Ylesr00";
/* 00000078-00000108 .text set_mtx_init__13daHot_Floor_cFv */
void daHot_Floor_c::set_mtx_init() {
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::ZXYrotM(shape_angle);
for (s32 i = 0; i < 5; i++)
mDoMtx_copy(mDoMtx_stack_c::get(), mtx[i]);
}
/* 00000108-00000218 .text set_mtx__13daHot_Floor_cFv */
void daHot_Floor_c::set_mtx() {
for (s32 i = 4; i > 0; i--)
mDoMtx_copy(mtx[i - 1], mtx[i]);
if (mtx_p != NULL) {
cXyz pos = cXyz::Zero;
mDoMtx_stack_c::copy(mtx_p);
mDoMtx_stack_c::transM(0.0f, 5.0f, -5.0f);
mDoMtx_copy(mDoMtx_stack_c::get(), mtx[0]);
mDoMtx_stack_c::multVec(&pos, ¤t.pos);
if (mEmitter2 != NULL)
mEmitter2->setGlobalRTMatrix(mtx[0]);
if (mEmitter1 != NULL)
mEmitter1->setGlobalRTMatrix(mtx[0]);
}
mtx_p = NULL;
}
/* 00000218-00000264 .text CreateInit__13daHot_Floor_cFv */
cPhs_State daHot_Floor_c::CreateInit() {
mbSpawnParticle = true;
mSpawnTimer = 0.0f;
set_mtx_init();
fopAcM_SetMtx(this, mtx[0]);
return cPhs_COMPLEATE_e;
}
cPhs_State daHot_Floor_c::_create() {
#if VERSION > VERSION_DEMO
// Bug: This actor is never initialized in the demo.
fopAcM_ct(this, daHot_Floor_c);
#endif
return CreateInit();
}
bool daHot_Floor_c::_delete() {
if (mEmitter2 != NULL)
mEmitter2->becomeInvalidEmitter();
if (mEmitter1 != NULL)
mEmitter1->becomeInvalidEmitter();
return TRUE;
}
bool daHot_Floor_c::_execute() {
if (mbSpawnParticle) {
if (mEmitter2 == NULL && !(fopAcM_GetParam(this) & 1))
mEmitter2 = dComIfGp_particle_set(dPa_name::ID_AK_SN_HEATFLOOR01, ¤t.pos);
if (mEmitter1 == NULL && !(fopAcM_GetParam(this) & 2))
mEmitter1 = dComIfGp_particle_set(dPa_name::ID_AK_SN_HEATFLOOR00, ¤t.pos);
cLib_chaseF(&mSpawnTimer, 60.0f, 5.0f);
mbSpawnParticle = false;
} else {
cLib_chaseF(&mSpawnTimer, 0.0f, 0.4f);
if (mSpawnTimer < 20.0f) {
if (mEmitter2 != NULL) {
mEmitter2->becomeInvalidEmitter();
mEmitter2 = NULL;
}
if (mEmitter1 != NULL) {
mEmitter1->becomeInvalidEmitter();
mEmitter1 = NULL;
}
}
if (mSpawnTimer <= 0.4f)
fopAcM_delete(this);
}
set_mtx();
return FALSE;
}
bool daHot_Floor_c::_draw() {
return TRUE;
}
/* 00000264-000002F8 .text daHot_FloorCreate__FPv */
static cPhs_State daHot_FloorCreate(void* i_this) {
return ((daHot_Floor_c*)i_this)->_create();
}
/* 000003F8-00000440 .text daHot_FloorDelete__FPv */
static BOOL daHot_FloorDelete(void* i_this) {
return ((daHot_Floor_c*)i_this)->_delete();
}
/* 00000440-00000604 .text daHot_FloorExecute__FPv */
static BOOL daHot_FloorExecute(void* i_this) {
return ((daHot_Floor_c*)i_this)->_execute();
}
/* 00000604-0000060C .text daHot_FloorDraw__FPv */
static BOOL daHot_FloorDraw(void* i_this) {
return ((daHot_Floor_c*)i_this)->_draw();
}
/* 0000060C-00000614 .text daHot_FloorIsDelete__FPv */
static BOOL daHot_FloorIsDelete(void* i_this) {
return TRUE;
}
static actor_method_class daHot_FloorMethodTable = {
(process_method_func)daHot_FloorCreate,
(process_method_func)daHot_FloorDelete,
(process_method_func)daHot_FloorExecute,
(process_method_func)daHot_FloorIsDelete,
(process_method_func)daHot_FloorDraw,
};
actor_process_profile_definition g_profile_Hot_Floor = {
/* Layer ID */ fpcLy_CURRENT_e,
/* List ID */ 0x0007,
/* List Prio */ fpcPi_CURRENT_e,
/* Proc Name */ fpcNm_Hot_Floor_e,
/* Proc SubMtd */ &g_fpcLf_Method.base,
/* Size */ sizeof(daHot_Floor_c),
/* Size Other */ 0,
/* Parameters */ 0,
/* Leaf SubMtd */ &g_fopAc_Method.base,
/* Draw Prio */ fpcDwPi_Hot_Floor_e,
/* Actor SubMtd */ &daHot_FloorMethodTable,
/* Status */ fopAcStts_CULL_e | fopAcStts_UNK40000_e,
/* Group */ fopAc_ACTOR_e,
/* Cull Type */ fopAc_CULLBOX_0_e,
};
|