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
|
/**
* d_a_obj_kjgjs.cpp
* Object - Kjgjs
*/
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_obj_kjgjs.h"
#include "d/d_bg_w.h"
#include "f_pc/f_pc_name.h"
static const u32 l_dzbidx[2] = {8, 9};
static const char* l_arcName = "K_jgjs";
int daObjKJgjs_c::create1st() {
int phase = dComIfG_resLoad(this, l_arcName);
if (phase == cPhs_COMPLEATE_e) {
setMtx();
field_0x60c = getType();
if (field_0x60c < 0) {
field_0x60c = 0;
} else if (field_0x60c > 2) {
field_0x60c = 1;
}
phase = MoveBGCreate(l_arcName, l_dzbidx[field_0x60c], dBgS_MoveBGProc_TypicalRotY, 0x47f0,
&mMtx[0]);
if (phase == cPhs_ERROR_e) {
return phase;
}
}
return phase;
}
void daObjKJgjs_c::setMtx() {
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
mDoMtx_stack_c::XYZrotM(current.angle.x, current.angle.y, current.angle.z);
MTXCopy(mDoMtx_stack_c::now, mMtx[1]);
MTXCopy(mDoMtx_stack_c::now, mMtx[0]);
}
static const u32 l_bmdidx[2] = {4, 5};
int daObjKJgjs_c::CreateHeap() {
mpModel = mDoExt_J3DModel__create(
(J3DModelData*)dComIfG_getObjectRes(l_arcName, l_bmdidx[field_0x60c]), 0x80000, 0x11000084);
return mpModel != NULL ? 1 : 0;
}
static const cull_box l_cull_box[2] = {
{{-1260.0f, -3050.0f, -1260.0f},
{1260.0f, 2800.0f, 1260.0f}},
{{-76.37f, -10.83f, -78.51},
{75.52f, 10.95f, 78.06f}},
};
int daObjKJgjs_c::Create() {
fopAcM_SetMtx(this, mMtx[1]);
MTXCopy(mMtx[1], mpModel->mBaseTransformMtx);
mpBgW->OffRoofRegist();
if (!field_0x60c) {
fopAcM_setCullSizeBox(this, l_cull_box[0].min.x, l_cull_box[0].min.y, l_cull_box[0].min.z,
l_cull_box[0].max.x, l_cull_box[0].max.y, l_cull_box[0].max.z);
} else {
fopAcM_setCullSizeBox(this, l_cull_box[1].min.x, l_cull_box[1].min.y, l_cull_box[1].min.z,
l_cull_box[1].max.x, l_cull_box[1].max.y, l_cull_box[1].max.z);
}
return 1;
}
int daObjKJgjs_c::Execute(f32 (**i_mtx)[3][4]) {
*i_mtx = mMtx;
return 1;
}
int daObjKJgjs_c::Draw() {
g_env_light.settingTevStruct(0x10, ¤t.pos, &tevStr);
g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr);
dComIfGd_setListBG();
mDoExt_modelUpdateDL(mpModel);
dComIfGd_setList();
return 1;
}
int daObjKJgjs_c::Delete() {
dComIfG_resDelete(this, l_arcName);
return 1;
}
static int daObjKJgjs_create1st(daObjKJgjs_c* i_this) {
fopAcM_ct(i_this, daObjKJgjs_c);
return i_this->create1st();
}
static int daObjKJgjs_MoveBGDelete(daObjKJgjs_c* i_this) {
return static_cast<dBgS_MoveBgActor*>(i_this)->MoveBGDelete();
}
static int daObjKJgjs_MoveBGExecute(daObjKJgjs_c* i_this) {
return static_cast<dBgS_MoveBgActor*>(i_this)->MoveBGExecute();
}
static int daObjKJgjs_MoveBGDraw(daObjKJgjs_c* i_this) {
return static_cast<dBgS_MoveBgActor*>(i_this)->MoveBGDraw();
}
daObjKJgjs_c::~daObjKJgjs_c() {}
static actor_method_class daObjKJgjs_METHODS = {
(process_method_func)daObjKJgjs_create1st, (process_method_func)daObjKJgjs_MoveBGDelete,
(process_method_func)daObjKJgjs_MoveBGExecute, (process_method_func)NULL,
(process_method_func)daObjKJgjs_MoveBGDraw,
};
actor_process_profile_definition g_profile_Obj_KJgjs = {
/* Layer ID */ fpcLy_CURRENT_e,
/* List ID */ 3,
/* List Prio */ fpcPi_CURRENT_e,
/* Proc Name */ fpcNm_Obj_KJgjs_e,
/* Proc SubMtd */ &g_fpcLf_Method.base,
/* Size */ sizeof(daObjKJgjs_c),
/* Size Other */ 0,
/* Parameters */ 0,
/* Leaf SubMtd */ &g_fopAc_Method.base,
/* Draw Prio */ fpcDwPi_Obj_KJgjs_e,
/* Actor SubMtd */ &daObjKJgjs_METHODS,
/* Status */ fopAcStts_UNK_0x40000_e | fopAcStts_CULL_e,
/* Group */ fopAc_ACTOR_e,
/* Cull Type */ fopAc_CULLBOX_CUSTOM_e,
};
|