summaryrefslogtreecommitdiff
path: root/src/d/actor/d_a_obj_msima.cpp
blob: 7514f4cc02c5ef140052c627849fde7ec3d420f3 (plain)
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
/**
 * @file d_a_obj_msima.cpp
 * 
*/

#include "d/dolzel_rel.h" // IWYU pragma: keep

#include "d/actor/d_a_obj_msima.h"
#include "Z2AudioLib/Z2Instances.h"
#include "c/c_damagereaction.h"
#include "d/actor/d_a_player.h"
#include "d/actor/d_a_midna.h"
#include "d/d_bg_w.h"
#include "d/d_com_inf_game.h"
#include "d/d_s_play.h"

daObj_Msima_HIO_c::daObj_Msima_HIO_c() {
    mId = -1;
    mSize = 1.0f;
    mMaxTiltAngle = 0xc00;
    mMaxSlopeAngle = 0;
    mBasicPosition = 800.0f;
}

#if DEBUG
void daObj_Msima_HIO_c::genMessage(JORMContext* context) {
    // Magma Island
    context->genLabel(" マグネ島 ", 0x80000001);
    // Size
    context->genSlider("サイズ", (float*)(this + 8), 0.0, 3.0);
    // Maximum Tilt Angle 
    context->genSlider("最大傾斜角(浮)", &mMaxTiltAngle, 0, 0x2000);
    // Maximum Slope Angle (Up)
    context->genSlider("最大傾斜角(上)", &mMaxSlopeAngle, 0, 0x2000);
    // Basic Position
    context->genSlider("基本位置", &mBasicPosition, -5000.0, 5000.0);
}
#endif

static void ride_call_back(dBgW* i_bgw, fopAc_ac_c* a_this, fopAc_ac_c* param_3) {
    if (fopAcM_GetName(param_3) == fpcNm_ALINK_e || fopAcM_GetName(param_3) == fpcNm_E_GOB_e ||
    fopAcM_GetName(param_3) == fpcNm_B_ZANT_e)
    {
        int idx = 0;
        if (fopAcM_GetName(param_3) != fpcNm_ALINK_e) {
            idx = 1;
        }
        
        obj_msima_class* i_this = (obj_msima_class*)a_this;
        i_this->field_0x5bc[idx] = fopAcM_GetID(param_3);
        i_this->field_0x5c4[idx] = 3;
    }
}

static int daObj_Msima_Draw(obj_msima_class* i_this) {
    fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->mActor;
    J3DModel* pModel;
    int i;
    int j;
    g_env_light.settingTevStruct(0x10, &a_this->current.pos, &a_this->tevStr);
    g_env_light.setLightTevColorType_MAJI(i_this->mpModel, &a_this->tevStr);
    dComIfGd_setListBG();
    i_this->mpBtk->entry(i_this->mpModel->getModelData());
    i_this->mpBrk->entry(i_this->mpModel->getModelData());
    mDoExt_modelUpdateDL(i_this->mpModel);
    dComIfGd_setList();
    if (i_this->field_0x570 != 1) {
        for (i = 0; i < 4; i++) {
            for (j = 0; j < 35; j++) {
                pModel = i_this->mChains[i].model[j];
                g_env_light.settingTevStruct(0, &a_this->current.pos, &a_this->tevStr);
                g_env_light.setLightTevColorType_MAJI(pModel, &a_this->tevStr);
                mDoExt_modelUpdateDL(pModel);
            }
        }
    }
    return 1;
}

static void msima_start(obj_msima_class* i_this) {
    i_this->field_0x598 = 0x802;
    i_this->field_0x59a = 0x708;
}

static bool hio_set;

static daObj_Msima_HIO_c l_HIO;

static cXyz c_pos(0.0f,0.0f,0.0f);

static void msima_drop(obj_msima_class* i_this) {
    fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->mActor;
    a_this->shape_angle.x = -i_this->field_0x59c * cM_ssin(i_this->field_0x594);
    a_this->shape_angle.z = -i_this->field_0x59c * cM_ssin(i_this->field_0x596);
    cLib_addCalc2(&i_this->field_0x59c, 300.0f, 0.1f, 30.0f);

    switch(i_this->field_0x584) {
    case 0:
         if (i_this->field_0x586[0] == 0) {
            a_this->current.pos.y += a_this->speed.y;
            a_this->speed.y -= 5.0f;
            if (a_this->speed.y <= -80.0f) {
                a_this->speed.y = -80.0f;
            }
        }

        if (a_this->current.pos.y < i_this->field_0x58c + l_HIO.mBasicPosition) {
            i_this->field_0x584 = 1;
            i_this->field_0x59c = 2000.0f;
            cXyz cStack_38(a_this->current.pos);
            cStack_38.y = 0.0f;
            dComIfGp_particle_set(0x8456, &cStack_38, 0, 0);
            dComIfGp_particle_set(0x8457, &cStack_38, 0, 0);
            dComIfGp_particle_set(0x8458, &cStack_38, 0, 0);
            mDoAud_seStart(Z2SE_OBJ_GOBFLOOR_INTO_MAGMA, &c_pos, 0,
                           dComIfGp_getReverb(fopAcM_GetRoomNo(a_this)));
        }
        break;
    case 1:
        break;
    }
}

static void msima_float(obj_msima_class* i_this) {
    fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->mActor;
    f32 dVar7 = i_this->field_0x59c * 0.004f;
    if (i_this->field_0x570 != 1) {
        cLib_addCalc2(&a_this->current.pos.y,
                      (i_this->field_0x58c + l_HIO.mBasicPosition + dVar7 * cM_ssin(i_this->mFloatingOscillator * 400)), 0.1f,
                      30.0f);
    }
    a_this->shape_angle.x = -i_this->field_0x59c * cM_ssin(i_this->field_0x594);
    a_this->shape_angle.z = -i_this->field_0x59c * cM_ssin(i_this->field_0x596);
    cLib_addCalcAngleS2(&i_this->field_0x598, 350, 1, 10);
    cLib_addCalcAngleS2(&i_this->field_0x59a, 300, 1, 10);
    cLib_addCalc2(&i_this->field_0x59c, 300.0f, 0.1f, 30.0f);
    cLib_addCalc2(&i_this->field_0x5a4, i_this->field_0x5a8, 0.2f, 20.0f);
    
    f32 fVar1;
    if (i_this->field_0x5a0 != 0) {
        fVar1 = -20.0f;
    } else {
        fVar1 = 0.0f;
    }

    cLib_addCalc2(&i_this->field_0x5a8, fVar1, 1.0f, 5.0f);
}

static void action(obj_msima_class* i_this) {
    fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->mActor;
    fopAc_ac_c* player = dComIfGp_getPlayer(0);
    cXyz cStack_70;
    cXyz cStack_7c;
    i_this->field_0x594 += i_this->field_0x598;
    i_this->field_0x596 += i_this->field_0x59a;

    switch (i_this->mAction) {
    case obj_msima_class::ACTION_START:
        msima_start(i_this);
        break;
    case obj_msima_class::ACTION_DROP:
        msima_drop(i_this);
        break;
    case obj_msima_class::ACTION_FLOAT_1:
    case obj_msima_class::ACTION_FLOAT_2:
        msima_float(i_this);
        break;
    }

    mDoMtx_stack_c::transS(a_this->current.pos.x,
                           a_this->current.pos.y + i_this->field_0x5a4 + 30.0f,
                           a_this->current.pos.z);
    mDoMtx_stack_c::YrotM(i_this->field_0x5ac);
    mDoMtx_stack_c::XrotM(i_this->field_0x5ae);
    mDoMtx_stack_c::YrotM(-i_this->field_0x5ac);
    mDoMtx_stack_c::YrotM((s16)a_this->shape_angle.y);
    mDoMtx_stack_c::XrotM((s16)a_this->shape_angle.x);
    mDoMtx_stack_c::ZrotM((s16)a_this->shape_angle.z);
    mDoMtx_stack_c::transM(0.0f, -30.0f, 0.0f);
    mDoMtx_stack_c::scaleM(l_HIO.mSize, l_HIO.mSize, l_HIO.mSize);
    i_this->mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
    i_this->mpBrk->play();
    i_this->mpBtk->play();
    cStack_70.set(0.0f, 0.0f, 0.0f);
    mDoMtx_stack_c::multVec(&cStack_70, &i_this->field_0x5b0);
    cXyz cStack_88(i_this->field_0x5b0);
    cStack_88.y += TREG_F(0) + 15.0f;
    a_this->eyePos = cStack_88;
    a_this->attention_info.position = cStack_88;
    MTXCopy(mDoMtx_stack_c::get(), i_this->mBgMtx);
    i_this->mpBgW->Move();
    cXyz cStack_94;
    s8 local_c8 = 0;
    if (daPy_getPlayerActorClass()->checkMagneBootsOn()) {
        i_this->field_0x5c4[0] = 3;
        i_this->field_0x5bc[0] = fopAcM_GetID(player);
    }
    for (int i = 0; i < 2; i++) {
        if (i_this->field_0x5c4[i] != 0) {
            i_this->field_0x5c4[i]--;
            fopAc_ac_c* iVar11 = fopAcM_SearchByID(i_this->field_0x5bc[i]);
            if (iVar11 != 0) {
                if (i_this->field_0x5a0 == 0) {
                    i_this->field_0x5a8 = AREG_F(0) + -50.0f;
                }

                i_this->field_0x5a0 = 3;
                if (local_c8 != 0) {
                    cStack_94 = cStack_94 + (iVar11->current.pos - cStack_94) * 0.5f;
                } else {
                    cStack_94 = iVar11->current.pos;
                }
                local_c8++;
            }
        }
    }

    if (local_c8 != 0) {
        f32 fVar1 = 1.0f;
        s16 local_c4 = 0x400;
        if (i_this->field_0x59c > 400.0f) {
            local_c4 = 0x4000;
            fVar1 = 1.5f;
        }
        f32 dVar16 = (cStack_94.x - a_this->current.pos.x);
        f32 dVar15 = (cStack_94.z - a_this->current.pos.z);
        cLib_addCalcAngleS2(&i_this->field_0x5ac, cM_atan2s(dVar16, dVar15), 8, local_c4);
        s16 local_c6 = l_HIO.mSize * ((TREG_F(3) + 2.5f) * JMAFastSqrt(dVar16 * dVar16 + dVar15 * dVar15));
        s16 local_50 = l_HIO.mMaxTiltAngle * fVar1;

        if (i_this->mAction == obj_msima_class::ACTION_START) {
            local_50 = l_HIO.mMaxSlopeAngle;
        } else {
            if (i_this->mAction == obj_msima_class::ACTION_FLOAT_2) {
                local_50 = 0;
            }
        }

        if (local_c6 > (s16)local_50) {
            local_c6 = local_50;
        } else if (local_c6 < (s16)-local_50) {
            local_c6 = -local_50;
        }
        cLib_addCalcAngleS2(&i_this->field_0x5ae, local_c6, 8, TREG_S(7) + 0x400);
    } else {
        cLib_addCalcAngleS2(&i_this->field_0x5ae, 0, 4, 0x800);
    }
}

static cXyz chain_p[4] = {
    cXyz(0.0f,200.0f,1100.0f),
    cXyz(-1100.0f,200.0f,0.0f),
    cXyz(0.0f,200.0f,-1100.0f),
    cXyz(1100.0f,200.0f,0.0f),
};

static void chain_move(obj_msima_class* i_this, ms_chain_s* param_2, int param_3) {
    fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->mActor;
    cXyz cStack_4c;
    f32 scale = 2.95f;
    MTXCopy(i_this->mpModel->getBaseTRMtx(), mDoMtx_stack_c::get());
    cXyz cStack_58(chain_p[param_3]);
    mDoMtx_stack_c::multVec(&cStack_58, &param_2->mPos);
    mDoMtx_stack_c::transS(param_2->mPos.x, param_2->mPos.y, param_2->mPos.z);
    mDoMtx_stack_c::YrotM(a_this->shape_angle.y + (param_3 << 14));
    s16 zRot = 0;
    for (int i = 0; i < 35; i++) {
        ANGLE_ADD(zRot, (s16)cM_rndFX2(3000.0f) + 0x4000);
        mDoMtx_stack_c::push();
        mDoMtx_stack_c::scaleM(scale, scale, scale);
        mDoMtx_stack_c::XrotM(0x4000);
        mDoMtx_stack_c::ZrotM(zRot);
        param_2->model[i]->setBaseTRMtx(mDoMtx_stack_c::get());
        mDoMtx_stack_c::pop();
        mDoMtx_stack_c::transM(0.0f, 55.0f, 0.0f);
    }
}

static cXyz chain_p2[4] = {
    cXyz(0.0f,4000.0f,1100.0f),
    cXyz(-1100.0f,4000.0f,0.0f),
    cXyz(0.0f,4000.0f,-1100.0f),
    cXyz(1100.0f,4000.0f,0.0f),
};

static void chain_move2(obj_msima_class* i_this, ms_chain_s* param_2, int param_3) {
    fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->mActor;
    cXyz local_5c;
    s16 zRot = 0;
    param_2->field_0x90++;
    f32 scale = 2.95f;
    cXyz cStack_58(chain_p2[param_3]);
    mDoMtx_stack_c::YrotS(a_this->shape_angle.y);
    mDoMtx_stack_c::multVec(&cStack_58, &local_5c);
    if (i_this->mAction == obj_msima_class::ACTION_FLOAT_2) {
        local_5c.y += 250.0f;
    }
    mDoMtx_stack_c::transS(local_5c.x, local_5c.y, local_5c.z);
    f32 dVar10 = 1.0f;
    for (int i = 0; i < 35; i++) {
        ANGLE_ADD(zRot, (s16)cM_rndFX2(3000.0f) + 0x4000);
        if (i > 5) {
            dVar10 = 0.8f * (i - 5) + 1.0f;
        }
        s16 iVar1 = (dVar10 * (param_2->field_0x8c * cM_ssin(param_2->field_0x90 * 2000 + i * -1200))) * 0.3f;
        s16 iVar2 = dVar10 * (param_2->field_0x8c * cM_ssin(param_2->field_0x90 * 2200 + i * -1200));
        mDoMtx_stack_c::XrotM(iVar1);
        mDoMtx_stack_c::ZrotM(iVar2);
        mDoMtx_stack_c::push();
        mDoMtx_stack_c::scaleM(scale, scale, scale);
        mDoMtx_stack_c::XrotM(0x4000);
        mDoMtx_stack_c::ZrotM(zRot);
        param_2->model[i]->setBaseTRMtx(mDoMtx_stack_c::get());
        mDoMtx_stack_c::pop();
        mDoMtx_stack_c::transM(0.0f, -55.0f, 0.0f);
    }
    cLib_addCalc0(&param_2->field_0x8c, 0.03f, 20.0f);
}

static int daObj_Msima_Execute(obj_msima_class* i_this) {
    fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->mActor;
    if (dComIfGp_event_runCheck()) {
        if (fopAcM_getTalkEventPartner(daPy_getLinkPlayerActorClass()) == daPy_py_c::getMidnaActor()) {
            return 1;
        }
    }
    i_this->mFloatingOscillator++;
    for (int i = 0; i < 2; i++) {
        if (i_this->field_0x586[i] != 0)
        {
            i_this->field_0x586[i]--;
        }
    }

    if (i_this->field_0x5a0 != 0) {
        i_this->field_0x5a0--;
    }

    action(i_this);
    i_this->mSound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this)));
    cM_initRnd2(0xc, 0x7b, 0x32);
    if (i_this->field_0x570 != 1) {
        for (int i = 0; i < 4; i++) {
            if (i_this->mChains[i].field_0x92 != 0) {
                chain_move2(i_this, &i_this->mChains[i], i);
            } else {
                chain_move(i_this, &i_this->mChains[i], i);
            }
        }
    }
    return 1;
}

static int daObj_Msima_IsDelete(obj_msima_class* i_this) {
    return 1;
}

static int daObj_Msima_Delete(obj_msima_class* i_this) {
    fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->mActor;
    fopAcM_GetID(a_this);
    dComIfG_resDelete(&i_this->mPhase, "MAGNESIMA");
    if (i_this->mIsHIOOwner) {
        hio_set = false;
        mDoHIO_DELETE_CHILD(l_HIO.mId);
    }
    dComIfG_Bgsp().Release(i_this->mpBgW);
    if (a_this->heap != NULL) {
        i_this->mSound.deleteObject();
    }
    return 1;
}

static int useHeapInit(fopAc_ac_c* a_this) {
    obj_msima_class* i_this = (obj_msima_class*)a_this;
    J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("MAGNESIMA", obj_msima_class::BMDR_S_MAGNE_SIMA);
    JUT_ASSERT(847, modelData != NULL);
    i_this->mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000284);
    if (i_this->mpModel == NULL) {
        return 0;
    }

    i_this->mpBgW = new dBgW();
    if (i_this->mpBgW == NULL) {
        return 0;
    }
    
    cBgD_t* bgd = (cBgD_t*)dComIfG_getObjectRes("MAGNESIMA", obj_msima_class::DZB_S_MAGNE_SIMA);
    if (i_this->mpBgW->Set(bgd, 1, &i_this->mBgMtx) == 1) {
        return 0;
    }

    i_this->mpBgW->SetCrrFunc(dBgS_MoveBGProc_Typical);
    i_this->mpBgW->SetRideCallback(ride_call_back);

    i_this->mpBtk = new mDoExt_btkAnm();
    if (i_this->mpBtk == NULL) {
        return 0;
    }

    if (!i_this->mpBtk->init(i_this->mpModel->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("MAGNESIMA", obj_msima_class::BTK_S_MAGNE_SIMA), 1, 2, 1.0f, 0, -1)) {
        return 0;
    }

    i_this->mpBrk = new mDoExt_brkAnm();
    if (i_this->mpBrk == NULL) {
        return 0;
    }

    if (!i_this->mpBrk->init(i_this->mpModel->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("MAGNESIMA", obj_msima_class::BRK_S_MAGNE_SIMA), 1, 2, 1.0f, 0, -1)) {
        return 0;
    }

    if (i_this->field_0x570 != 1) {
        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 35; j++) {
                modelData = (J3DModelData*)dComIfG_getObjectRes("MAGNESIMA", obj_msima_class::BMDR_KUSARI);
                JUT_ASSERT(898, modelData != NULL);
                i_this->mChains[i].model[j] =
                    mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
                if (i_this->mChains[i].model[j] == NULL) {
                    return 0;
                }
            }
            i_this->mChains[i].field_0x90 = cM_rndF(65536.0f);
        }
    }
    return 1;
}

static int daObj_Msima_Create(fopAc_ac_c* a_this) {
    obj_msima_class* i_this = (obj_msima_class*)a_this;
    fopAcM_ct(a_this, obj_msima_class);

    int rv = dComIfG_resLoad(&i_this->mPhase, "MAGNESIMA");
    if (rv == cPhs_COMPLEATE_e) {
        OS_REPORT("OBJ_MSIMA PARAM %x\n", fopAcM_GetParam(a_this));
        i_this->field_0x570 = fopAcM_GetParam(a_this) & 0xff;
        if (i_this->field_0x570 == 0xff) {
            i_this->field_0x570 = 0;
        }

        OS_REPORT("OBJ_MSIMA//////////////OBJ_MSIMA SET 1 !!\n");

        if (!fopAcM_entrySolidHeap(a_this, useHeapInit, 0x4b000)) {
            OS_REPORT("//////////////OBJ_MSIMA SET NON !!\n");
            return cPhs_ERROR_e;
        } 

        OS_REPORT("//////////////OBJ_MSIMA SET 2 !!\n");

        if (dComIfG_Bgsp().Regist(i_this->mpBgW, a_this) != 0) {
            return cPhs_ERROR_e;
        }

        if (!hio_set) {
            i_this->mIsHIOOwner = true;
            hio_set = 1;
            // Magma Island
            l_HIO.mId = mDoHIO_CREATE_CHILD("マグネ島", &l_HIO);
        }

        i_this->mSound.init(&a_this->current.pos, 2);
        i_this->mFloatingOscillator = cM_rndF(65536.0f);
        if (i_this->field_0x570 != 1) {
            if (dComIfGs_isStageMiddleBoss()) {
                i_this->mAction = obj_msima_class::ACTION_FLOAT_2;
                i_this->field_0x58c = 1150.0f;
                for (int i = 0; i < 4; i++) {
                    i_this->mChains[i].field_0x92 = 1;
                }
                a_this->current.pos.y = i_this->field_0x58c + l_HIO.mBasicPosition;
            } else {
                i_this->field_0x58c = a_this->home.pos.y;
                if (cDmr_SkipInfo != 0 || dComIfGs_isZoneSwitch(5, 0xffffffff)) {
                    a_this->current.pos.x = 0.0f;
                    a_this->current.pos.y = 801.0f;
                    a_this->current.pos.z = 0.0f;
                    for (int i = 0; i < 4; i++) {
                        i_this->mChains[i].field_0x92 = 1;
                    }
                    i_this->mAction = obj_msima_class::ACTION_FLOAT_1;
                } else {
                    i_this->mAction = obj_msima_class::ACTION_START;
                    a_this->current.pos.y = i_this->field_0x58c + 1900.0f;
                }
            }
            a_this->shape_angle.y = 0x2000;
            daObj_Msima_Execute(i_this);
            cXyz cStack_2c(0.0f, 0.0f, 0.0f);
            fopAcM_createChild(fpcNm_OBJ_MYOGAN_e, fopAcM_GetID(a_this), 0, &cStack_2c,
                               fopAcM_GetRoomNo(a_this), 0, 0, -1, 0);
        } else {
            for (int i = 0; i < 4; i++) {
                i_this->mChains[i].field_0x92 = 1;
            }
            i_this->mAction = obj_msima_class::ACTION_FLOAT_1;
        }
        OS_REPORT("//////////////OBJ_MSIMA SET 3 !!\n");
    }
    return rv;
}

static actor_method_class l_daObj_Msima_Method = {
    (process_method_func)daObj_Msima_Create,
    (process_method_func)daObj_Msima_Delete,
    (process_method_func)daObj_Msima_Execute,
    (process_method_func)daObj_Msima_IsDelete,
    (process_method_func)daObj_Msima_Draw,
};

actor_process_profile_definition g_profile_OBJ_MSIMA = {
    /* Layer ID     */ fpcLy_CURRENT_e,
    /* List ID      */ 3,
    /* List Prio    */ fpcPi_CURRENT_e,
    /* Proc Name    */ fpcNm_OBJ_MSIMA_e,
    /* Proc SubMtd  */ &g_fpcLf_Method.base,
    /* Size         */ sizeof(obj_msima_class),
    /* Size Other   */ 0,
    /* Parameters   */ 0,
    /* Leaf SubMtd  */ &g_fopAc_Method.base,
    /* Draw Prio    */ fpcDwPi_OBJ_MSIMA_e,
    /* Actor SubMtd */ &l_daObj_Msima_Method,
    /* Status       */ fopAcStts_UNK_0x40000_e | fopAcStts_UNK_0x4000_e,
    /* Group        */ fopAc_ACTOR_e,
    /* Cull Type    */ fopAc_CULLBOX_CUSTOM_e,
};

AUDIO_INSTANCES;