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
|
/**
* d_a_demo_kmm.cpp
* NPC - Seagull (cutscenes)
*/
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_demo_kmm.h"
#include "f_op/f_op_actor_mng.h"
#include "d/d_com_inf_game.h"
#include "m_Do/m_Do_ext.h"
#include "res/Object/Demo_Kmm.h"
const char daDemo_Kmm_c::M_arcname[] = "Demo_Kmm";
/* 00000078-00000098 .text CheckCreateHeap__FP10fopAc_ac_c */
static BOOL CheckCreateHeap(fopAc_ac_c* a_this) {
return ((daDemo_Kmm_c*)a_this)->CreateHeap();
}
/* 00000098-00000190 .text CreateHeap__12daDemo_Kmm_cFv */
BOOL daDemo_Kmm_c::CreateHeap() {
mpMorf = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectIDRes(M_arcname, dRes_ID_DEMO_KMM_BMD_KA_e), NULL, NULL, NULL, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1, 0, NULL, 0, 0x11020203);
if (mpMorf == NULL || mpMorf->getModel() == NULL) {
return FALSE;
}
setAnime(dRes_ID_DEMO_KMM_BCK_KA_WAIT1_e, J3DFrameCtrl::EMode_LOOP, 0.0f, 1.0f);
return TRUE;
}
/* 00000190-00000228 .text calcMtx__12daDemo_Kmm_cFv */
void daDemo_Kmm_c::calcMtx() {
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
mDoMtx_stack_c::YrotM(current.angle.y);
mpMorf->getModel()->setBaseTRMtx(mDoMtx_stack_c::get());
eyePos = current.pos;
attention_info.position = current.pos;
}
/* 00000228-000002D0 .text setAnime__12daDemo_Kmm_cFiiff */
void daDemo_Kmm_c::setAnime(int animId, int loopMode, f32 morf, f32 playSpeed) {
mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectIDRes(M_arcname, animId), loopMode, morf, playSpeed, 0.0f, -1.0f, NULL);
}
/* 000002D0-00000308 .text CreateInit__12daDemo_Kmm_cFv */
BOOL daDemo_Kmm_c::CreateInit() {
tevStr.mRoomNo = current.roomNo;
setAction(0);
unk_29E = 0;
calcMtx();
return TRUE;
}
/* 00000308-000003A0 .text create__12daDemo_Kmm_cFv */
cPhs_State daDemo_Kmm_c::create() {
fopAcM_ct_Retail(this, daDemo_Kmm_c);
cPhs_State ret = dComIfG_resLoad(&this->mPhase, M_arcname);
if (ret != cPhs_COMPLEATE_e) {
return ret;
}
fopAcM_ct_Demo(this, daDemo_Kmm_c);
if (!fopAcM_entrySolidHeap(this, CheckCreateHeap, 0x5700)) {
return cPhs_ERROR_e;
}
CreateInit();
return cPhs_COMPLEATE_e;
}
/* 000003A0-000003A8 .text daDemo_Kmm_actionWait__FP12daDemo_Kmm_c */
static BOOL daDemo_Kmm_actionWait(daDemo_Kmm_c* i_this) {
return TRUE;
}
/* 000003A8-0000040C .text daDemo_Kmm_Draw__FP12daDemo_Kmm_c */
static BOOL daDemo_Kmm_Draw(daDemo_Kmm_c* i_this) {
g_env_light.settingTevStruct(TEV_TYPE_BG0, &i_this->current.pos, &i_this->tevStr);
g_env_light.setLightTevColorType(i_this->mpMorf->getModel(), &i_this->tevStr);
i_this->mpMorf->entryDL();
return TRUE;
}
BOOL daDemo_Kmm_c::execute() {
typedef BOOL (*action)(daDemo_Kmm_c*);
static action l_action[] = {
daDemo_Kmm_actionWait,
};
l_action[unk_29C](this);
calcMtx();
if (!dDemo_setDemoData(this, dDemo_actor_c::ENABLE_TRANS_e | dDemo_actor_c::ENABLE_ROTATE_e | dDemo_actor_c::ENABLE_ANM_e | dDemo_actor_c::ENABLE_ANM_FRAME_e, mpMorf, M_arcname)) {
mpMorf->play(&eyePos,0,0);
}
mpMorf->calc();
return TRUE;
}
/* 0000040C-000004A8 .text daDemo_Kmm_Execute__FP12daDemo_Kmm_c */
static BOOL daDemo_Kmm_Execute(daDemo_Kmm_c* i_this) {
return i_this->execute();
}
/* 000004A8-000004B0 .text daDemo_Kmm_IsDelete__FP12daDemo_Kmm_c */
static BOOL daDemo_Kmm_IsDelete(daDemo_Kmm_c*) {
return TRUE;
}
/* 000004B0-00000500 .text daDemo_Kmm_Delete__FP12daDemo_Kmm_c */
static BOOL daDemo_Kmm_Delete(daDemo_Kmm_c* i_this) {
dComIfG_resDelete(&i_this->mPhase, daDemo_Kmm_c::M_arcname);
i_this->~daDemo_Kmm_c();
return TRUE;
}
/* 00000500-00000520 .text daDemo_Kmm_Create__FP10fopAc_ac_c */
static cPhs_State daDemo_Kmm_Create(fopAc_ac_c* i_this) {
return ((daDemo_Kmm_c*)i_this)->create();
}
static actor_method_class l_daDemo_Kmm_Method = {
(process_method_func)daDemo_Kmm_Create,
(process_method_func)daDemo_Kmm_Delete,
(process_method_func)daDemo_Kmm_Execute,
(process_method_func)daDemo_Kmm_IsDelete,
(process_method_func)daDemo_Kmm_Draw,
};
actor_process_profile_definition g_profile_DEMO_KMM = {
/* Layer ID */ fpcLy_CURRENT_e,
/* List ID */ 0x0007,
/* List Prio */ fpcPi_CURRENT_e,
/* Proc Name */ fpcNm_DEMO_KMM_e,
/* Proc SubMtd */ &g_fpcLf_Method.base,
/* Size */ sizeof(daDemo_Kmm_c),
/* Size Other */ 0,
/* Parameters */ 0,
/* Leaf SubMtd */ &g_fopAc_Method.base,
/* Draw Prio */ fpcDwPi_DEMO_KMM_e,
/* Actor SubMtd */ &l_daDemo_Kmm_Method,
/* Status */ fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
/* Group */ fopAc_ACTOR_e,
/* Cull Type */ fopAc_CULLBOX_6_e,
};
|