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
|
/**
* d_a_obj_sekizo.cpp
*
*/
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_obj_sekizo.h"
#include "d/d_bg_w.h"
#include "d/d_com_inf_game.h"
static struct {
u32 bmdIdx;
u32 resIdx;
} l_bmdData[1] = {4, 1};
static struct {
u32 dzbIdx;
u32 resIdx;
} l_dzbData[1] = {7, 1};
static char* l_resNameList[2] = {"", "Sekizo"};
static u8 lit_3800[12];
daObj_Sekizo_HIOParam const daObj_Sekizo_Param_c::m = {};
static OBJ_SEKIZO_HIO_CLASS l_HIO;
#if DEBUG
daObj_Sekizo_HIO_c::daObj_Sekizo_HIO_c() {
m = daObj_Sekizo_Param_c::m;
}
void daObj_Sekizo_HIO_c::listenPropertyEvent(const JORPropertyEvent* event) {
// NONMATCHING
}
void daObj_Sekizo_HIO_c::genMessage(JORMContext* ctx) {
// NONMATCHING
}
#endif
cPhs_Step daObj_Sekizo_c::create() {
fopAcM_ct(this, daObj_Sekizo_c);
field_0x5b0 = 0;
cPhs_Step step =
dComIfG_resLoad(&mPhaseReq, l_resNameList[l_bmdData[field_0x5b0].resIdx]);
if (step == cPhs_COMPLEATE_e) {
step = MoveBGCreate(l_resNameList[l_dzbData[field_0x5b0].resIdx],
l_dzbData[field_0x5b0].dzbIdx, dBgS_MoveBGProc_TypicalRotY,
0x4000, NULL);
if (step == cPhs_ERROR_e) {
return step;
}
}
return step;
}
int daObj_Sekizo_c::CreateHeap() {
J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(
l_resNameList[l_bmdData[field_0x5b0].resIdx], l_bmdData[field_0x5b0].bmdIdx);
mpModel = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000084);
if (mpModel == NULL) {
return false;
}
return true;
}
int daObj_Sekizo_c::Create() {
initBaseMtx();
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
fopAcM_setCullSizeBox2(this, mpModel->getModelData());
field_0x5b2 = false;
field_0x5b1 = true;
return 1;
}
int daObj_Sekizo_c::Delete() {
#if DEBUG
if (mpHIO != NULL) {
mpHIO->removeHIO();
}
#endif
dComIfG_resDelete(&mPhaseReq, l_resNameList[l_bmdData[field_0x5b0].resIdx]);
return 1;
}
int daObj_Sekizo_c::Execute(Mtx** i_mtx) {
if (home.roomNo == dComIfGp_roomControl_getStayNo()) {
*i_mtx = &mBgMtx;
setBaseMtx();
if (field_0x5b2) {
if (field_0x5b1) {
dComIfG_Bgsp().Release(mpBgW);
field_0x5b1 = false;
}
} else if (!field_0x5b1) {
dComIfG_Bgsp().Regist(mpBgW, this);
field_0x5b1 = true;
}
}
return 1;
}
int daObj_Sekizo_c::Draw() {
if (!field_0x5b2) {
g_env_light.settingTevStruct(0x10, ¤t.pos, &tevStr);
g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr);
dComIfGd_setListBG();
mDoExt_modelUpdateDL(mpModel);
dComIfGd_setList();
}
return 1;
}
void daObj_Sekizo_c::initBaseMtx() {
mpModel->setBaseScale(scale);
setBaseMtx();
}
void daObj_Sekizo_c::setBaseMtx() {
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::YrotM(shape_angle.y);
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
cMtx_copy(mDoMtx_stack_c::get(), mBgMtx);
}
static int daObj_Sekizo_Create(void* i_this) {
return static_cast<daObj_Sekizo_c*>(i_this)->create();
}
static int daObj_Sekizo_Delete(void* i_this) {
return static_cast<daObj_Sekizo_c*>(i_this)->MoveBGDelete();
}
static int daObj_Sekizo_Execute(void* i_this) {
return static_cast<daObj_Sekizo_c*>(i_this)->MoveBGExecute();
}
static int daObj_Sekizo_Draw(void* i_this) {
return static_cast<daObj_Sekizo_c*>(i_this)->MoveBGDraw();
}
static int daObj_Sekizo_IsDelete(void* i_this) {
return 1;
}
static actor_method_class daObj_Sekizo_MethodTable = {
(process_method_func)daObj_Sekizo_Create, (process_method_func)daObj_Sekizo_Delete,
(process_method_func)daObj_Sekizo_Execute, (process_method_func)daObj_Sekizo_IsDelete,
(process_method_func)daObj_Sekizo_Draw};
actor_process_profile_definition g_profile_OBJ_SEKIZO = {
/* Layer ID */ fpcLy_CURRENT_e,
/* List ID */ 7,
/* List Prio */ fpcPi_CURRENT_e,
/* Proc Name */ fpcNm_OBJ_SEKIZO_e,
/* Proc SubMtd */ &g_fpcLf_Method.base,
/* Size */ sizeof(daObj_Sekizo_c),
/* Size Other */ 0,
/* Parameters */ 0,
/* Leaf SubMtd */ &g_fopAc_Method.base,
/* Draw Prio */ fpcDwPi_OBJ_SEKIZO_e,
/* Actor SubMtd */ &daObj_Sekizo_MethodTable,
/* Status */ fopAcStts_UNK_0x40000_e | fopAcStts_UNK_0x4000_e,
/* Group */ fopAc_ACTOR_e,
/* Cull Type */ fopAc_CULLBOX_CUSTOM_e,
};
|