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
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
|
/**
* d_a_obj_bosswarp.cpp
* Object - Boss Warp
*/
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_obj_bosswarp.h"
#include "SSystem/SComponent/c_math.h"
#include "d/actor/d_a_midna.h"
#include "d/actor/d_a_player.h"
#include "f_pc/f_pc_name.h"
#include "d/actor/d_a_obj_life_container.h"
#include "d/actor/d_a_obj_ystone.h"
#include <cstring>
static char* l_arcName = "ef_Portal";
static char const* l_clearEvName[9] = {
"BOSSCLEAR01",
"BOSSCLEAR02",
"BOSSCLEAR03",
"BOSSCLEAR03",
"BOSSCLEAR05",
"BOSSCLEAR06",
"BOSSCLEAR07",
"BOSSCLEAR03",
"BOSSCLEAR03",
};
static char const* l_warp_check_evName = "WARP_CHECK";
static char const* l_warp_cancel_evName = "WARP_CANCEL";
static Vec const l_hair_offset[7] = {
{49.0f, -34.0f, -3.0f},
{46.0f, -15.0f, 3.0f},
{53.0f, -32.0f, 0.0f},
{50.0f, 0.0f, 0.0f},
{50.0f, 0.0f, 0.0f},
{50.0f, 0.0f, 0.0f},
{50.0f, 0.0f, 0.0f},
};
static Vec const l_hair_rotate[7] = {
{47.0f, 80.0f, 38.0f},
{-2.0f, 68.0f, 2.0f},
{160.0f, -60.0f, -160.0f},
{0.0f, 90.0f, 0.0f},
{0.0f, 90.0f, 0.0f},
{0.0f, 90.0f, 0.0f},
{0.0f, 90.0f, 0.0f},
};
static int CheckCreateHeap(fopAc_ac_c* i_this) {
return static_cast<daObjBossWarp_c*>(i_this)->CreateHeap();
}
static int getNowLevel() {
char const* stages[9] = {
"D_MN05A",
"D_MN04A",
"D_MN01A",
"D_MN10A",
"D_MN11A",
"D_MN06A",
"D_MN07A",
"D_MN08A",
"D_MN01A",
};
char const* start_stage = dComIfGp_getStartStageName();
for (int i = 0; i < 9; i++) {
if (!strcmp(start_stage, stages[i])) {
return i;
}
}
return -1;
}
void daObjBossWarp_c::initBaseMtx() {
scale.y = 0.15f;
mpModel->setBaseScale(scale);
setBaseMtx();
}
void daObjBossWarp_c::setBaseMtx() {
mDoMtx_stack_c::transS(current.pos.x, current.pos.y + 2.0f, current.pos.z);
mDoMtx_stack_c::YrotM(shape_angle.y);
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
}
int daObjBossWarp_c::Create() {
initBaseMtx();
int level = getNowLevel();
if (level == -1 || level == 8) {
mBossClearEventId = -1;
} else {
mBossClearEventId =
dComIfGp_getEventManager().getEventIdx(this, l_clearEvName[level], 0xff);
}
mBossClearMapToolId = 0xff;
if (!isFirst() || level == 8) {
mBossWarpInEventId = dComIfGp_getEventManager().getEventIdx(this, "BOSS_WARPIN", 0xff);
mBossWarpInMapToolId = 0xff;
mAction = 3;
set_appear();
} else {
mBossWarpInEventId = dComIfGp_getEventManager().getEventIdx(this, "BOSS_WARPIN_M", 0xff);
mBossWarpInMapToolId = 0xff;
mAction = 0;
}
eventInfo.mArchiveName = l_arcName;
mWarpCheckEventId = dComIfGp_getEventManager().getEventIdx(this, l_warp_check_evName, 0xff);
mWarpCancelEventId = dComIfGp_getEventManager().getEventIdx(this, l_warp_cancel_evName, 0xff);
mScaleF = 1.0f;
execute();
return 1;
}
int daObjBossWarp_c::CreateHeap() {
J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 6);
mpModel = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000284);
if (mpModel == NULL) {
return 0;
}
J3DAnmTevRegKey* brk_anm = (J3DAnmTevRegKey*)dComIfG_getObjectRes(l_arcName, 9);
mpBrkAnm = new mDoExt_brkAnm();
if (mpBrkAnm == NULL || !mpBrkAnm->init(model_data, brk_anm, 1, 0, 1.0f, 0, -1)) {
return 0;
}
mpBrkAnm->setPlaySpeed(0.0f);
static int const l_btk_idx[2] = {12, 13};
static int const l_play_mode[2] = {2, 0};
for (int i = 0; i < 2; i++) {
J3DAnmTextureSRTKey* btk_anm =
(J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, l_btk_idx[i]);
mpBtkAnm[i] = new mDoExt_btkAnm();
if (mpBtkAnm[i] == NULL ||
!mpBtkAnm[i]->init(model_data, btk_anm, 1, l_play_mode[i], 1.0f, 0, -1))
{
return 0;
}
mpBtkAnm[i]->setPlaySpeed(0.0f);
}
return 1;
}
cPhs_Step daObjBossWarp_c::create() {
fopAcM_ct(this, daObjBossWarp_c);
cPhs_Step step = dComIfG_resLoad(&mPhaseReq, l_arcName);
if (step == cPhs_COMPLEATE_e) {
if (!fopAcM_entrySolidHeap(this, CheckCreateHeap, 0x18e0)) {
return cPhs_ERROR_e;
}
if (!Create()) {
return cPhs_ERROR_e;
}
}
return step;
}
void daObjBossWarp_c::appear(int param_0) {
mParticlePos = current.pos;
mParticlePos.y += 2.0f;
static u16 const l_eff_id[4] = {0x8548, 0x8549, 0x854a, 0x854b};
for (int i = 0; i < 4; i++) {
if (mpParticle[i] == NULL) {
if (i == 3) {
mpParticle[i] = dComIfGp_particle_set(l_eff_id[i], &mParticlePos, NULL, &scale);
} else {
mpParticle[i] = dComIfGp_particle_set(l_eff_id[i], &mParticlePos, NULL, NULL);
if (i == 0) {
mpParticle[0] = NULL;
}
}
}
}
mpBrkAnm->setPlaySpeed(1.0f);
mpBtkAnm[0]->setPlaySpeed(1.0f);
mpBtkAnm[1]->setPlaySpeed(1.0f);
}
void daObjBossWarp_c::set_appear() {
mpBrkAnm->setFrame(mpBrkAnm->getEndFrame());
mpBtkAnm[1]->setFrame(mpBtkAnm[1]->getEndFrame());
appear(0);
}
void daObjBossWarp_c::disappear(int param_0) {
for (int i = 0; i < 4; i++) {
if (mpParticle[i] != NULL) {
mpParticle[i]->becomeInvalidEmitter();
mpParticle[i]->quitImmortalEmitter();
mpParticle[i] = NULL;
}
}
}
BOOL daObjBossWarp_c::checkDistance() {
daPy_py_c* player = daPy_getPlayerActorClass();
f32 dist_xz = player->current.pos.absXZ(current.pos);
f32 dist_y = player->current.pos.y - current.pos.y;
if (dist_xz < 150.0f && dist_y < 200.0f && dist_y > -1.0f) {
return true;
} else {
return false;
}
}
int daObjBossWarp_c::execute() {
if (dStage_stagInfo_GetSTType(dComIfGp_getStage()->getStagInfo()) != 3) {
u8 sw = getSwNo();
if (sw == 0xff || fopAcM_isSwitch(this, sw)) {
field_0x591 = true;
} else {
field_0x591 = false;
}
daPy_py_c* player = daPy_getPlayerActorClass();
if (field_0x591) {
appear(0);
if (checkDistance()) {
u8 scene = getSceneListNo();
player->onSceneChangeArea(scene, 0xff, 0);
}
}
} else {
if (!isFirst() && !dComIfGp_evmng_checkStartDemo()) {
field_0x595 = true;
field_0x620 = current.pos;
}
event_proc_call();
daMidna_c* midna = (daMidna_c*)daPy_py_c::getMidnaActor();
if (field_0x595 && midna != NULL) {
midna->onTagWaitPos(&field_0x620);
}
obj_ystone_class* ystone = (obj_ystone_class*)fopAcM_SearchByName(fpcNm_OBJ_YSTONE_e);
int level = getNowLevel();
if (ystone != NULL && midna != NULL) {
switch (field_0x599) {
case 0:
break;
case 1:
mDoMtx_stack_c::copy(midna->getMtxHairTop());
cXyz hair_offset = l_hair_offset[level];
mDoMtx_stack_c::transM(hair_offset);
mDoMtx_stack_c::ZXYrotM(
cM_deg2s(l_hair_rotate[level].x),
cM_deg2s(l_hair_rotate[level].y),
cM_deg2s(l_hair_rotate[level].z)
);
mDoMtx_stack_c::scaleM(mScaleF, mScaleF, mScaleF);
ystone->setBaseMtx(mDoMtx_stack_c::get());
break;
}
}
}
mpBrkAnm->play();
mpBtkAnm[0]->play();
mpBtkAnm[1]->play();
if (mScalingUp) {
cLib_chaseF(&scale.y, 1.0f, 0.016f);
}
if (mpParticle[3] != NULL) {
JGeometry::TVec3<f32> scale_vec;
JGeometry::setTVec3f(&scale.x, &scale_vec.x);
mpParticle[3]->setGlobalScale(scale_vec);
}
if (mpBrkAnm != NULL && mpBrkAnm->getFrame() != 0.0f) {
mDoAud_seStartLevel(Z2SE_OBJ_MDN_ESCAPE_HOLE, ¤t.pos, 0, 0);
}
setBaseMtx();
return 1;
}
void daObjBossWarp_c::event_proc_call() {
typedef void (daObjBossWarp_c::*daObjBossWarp_action)();
static daObjBossWarp_action l_func[11] = {
&daObjBossWarp_c::actionWait,
&daObjBossWarp_c::actionOrderEvent,
&daObjBossWarp_c::actionEvent,
&daObjBossWarp_c::actionWaitWarp,
&daObjBossWarp_c::actionOrderWarpEvent,
&daObjBossWarp_c::actionWarpEvent,
&daObjBossWarp_c::actionDead,
&daObjBossWarp_c::actionOrderChkEvent,
&daObjBossWarp_c::actionChkEvent,
&daObjBossWarp_c::actionOrderCancelEvent,
&daObjBossWarp_c::actionCancelEvent,
};
(this->*l_func[mAction])();
}
void daObjBossWarp_c::actionWait() {
setAction(ACT_ORDER_EVENT);
fopAcM_orderOtherEventId(this, mBossClearEventId, mBossClearMapToolId, 0xffff, 3, 1);
eventInfo.onCondition(2);
}
void daObjBossWarp_c::actionOrderEvent() {
if (eventInfo.checkCommandDemoAccrpt()) {
dComIfGp_event_setTalkPartner(fopAcM_SearchByName(fpcNm_OBJ_YSTONE_e));
setAction(ACT_EVENT);
mStaffId = dComIfGp_evmng_getMyStaffId("WARPHOLE", NULL, 0);
demoProc();
} else {
fopAcM_orderOtherEventId(this, mBossClearEventId, mBossClearMapToolId, 0xffff, 3, 1);
eventInfo.onCondition(2);
}
}
void daObjBossWarp_c::actionEvent() {
if (dComIfGp_evmng_endCheck(mBossClearEventId)) {
setAction(ACT_WAIT_WARP);
dComIfGp_event_reset();
} else {
demoProc();
}
}
void daObjBossWarp_c::actionWaitWarp() {
if (checkDistance()) {
setAction(ACT_ORDER_CHK_EVENT);
fopAcM_orderOtherEventId(this, mWarpCheckEventId, 0xff, 0xffff, 0, 1);
eventInfo.onCondition(2);
}
}
void daObjBossWarp_c::actionOrderWarpEvent() {
if (eventInfo.checkCommandDemoAccrpt()) {
setAction(ACT_WARP_EVENT);
mStaffId = dComIfGp_evmng_getMyStaffId("WARPHOLE", NULL, 0);
demoProc();
} else {
fopAcM_orderOtherEventId(this, mBossWarpInEventId, mBossWarpInMapToolId, 0xffff, 0, 1);
eventInfo.onCondition(2);
}
}
void daObjBossWarp_c::actionWarpEvent() {
if (!dComIfGp_evmng_endCheck(mBossWarpInEventId)) {
demoProc();
}
}
void daObjBossWarp_c::actionDead() {
/* empty function */
}
void daObjBossWarp_c::actionOrderChkEvent() {
daMidna_c* midna = daPy_py_c::getMidnaActor();
if (eventInfo.checkCommandDemoAccrpt()) {
setAction(ACT_CHK_EVENT);
mStaffId = dComIfGp_evmng_getMyStaffId("WARPHOLE", NULL, 0);
attention_info.position = midna->attention_info.position;
attention_info.position.y += 100.0f;
eyePos = attention_info.position;
demoProc();
} else {
fopAcM_orderOtherEventId(this, mWarpCheckEventId, 0xff, 0xffff, 0, 1);
eventInfo.onCondition(2);
}
}
void daObjBossWarp_c::actionChkEvent() {
if (dComIfGp_evmng_endCheck(mWarpCheckEventId)) {
dComIfGp_event_reset();
if (mWarpChoice == 0) {
setAction(ACT_ORDER_WARP_EVENT);
fopAcM_orderOtherEventId(this, mBossWarpInEventId, mBossWarpInMapToolId, 0xffff, 0, 1);
eventInfo.onCondition(2);
} else if (mWarpChoice == 1) {
setAction(ACT_ORDER_CANCEL_EVENT);
fopAcM_orderOtherEventId(this, mWarpCancelEventId, 0xff, 0xffff, 0, 1);
eventInfo.onCondition(2);
}
} else {
demoProc();
}
}
void daObjBossWarp_c::actionOrderCancelEvent() {
if (eventInfo.checkCommandDemoAccrpt()) {
setAction(ACT_CANCEL_EVENT);
mStaffId = dComIfGp_evmng_getMyStaffId("WARPHOLE", NULL, 0);
demoProc();
} else {
fopAcM_orderOtherEventId(this, mWarpCancelEventId, 0xff, 0xffff, 0, 1);
eventInfo.onCondition(2);
}
}
void daObjBossWarp_c::actionCancelEvent() {
if (dComIfGp_evmng_endCheck(mWarpCancelEventId)) {
dComIfGp_event_reset();
setAction(ACT_WAIT_WARP);
} else {
demoProc();
}
}
int daObjBossWarp_c::demoProc() {
static char* action_table[15] = {
"WAIT",
"APPEAR",
"DISAPPEAR",
"SCENE_CHG",
"STONE_FALL",
"STONE_MIDNA",
"WALK_TARGET1",
"APPEAR_END",
"STONE_DELETE",
"STONE_PUTAWAY",
"WCHECK",
"SETPOS",
"SCALING",
"STONE_SCALE",
"HEART_MOVE",
};
static int const l_dangeon_clr_bitNo[9] = {
0x37, /* dSv_event_flag_c::M_022 - Forest Temple - Forest Temple clear (Midna creates warp hole) */
0x40, /* dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear */
0x4E, /* dSv_event_flag_c::M_045 - Lakebed Temple - Lakebed Temple clear */
0x109, /* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */
0x10A, /* dSv_event_flag_c::F_0266 - Snowpeak Ruins - Snowpeak Ruins clear */
0x10B, /* dSv_event_flag_c::F_0267 - Temple of Time - Temple of Time clear */
0x10C,
-1,
-1
};
daPy_py_c* player = daPy_getPlayerActorClass();
obj_ystone_class* ystone = (obj_ystone_class*)fopAcM_SearchByName(fpcNm_OBJ_YSTONE_e);
cXyz unused(100000.0f, 0.0f, 0.0f);
daMidna_c* midna = (daMidna_c*)daPy_py_c::getMidnaActor();
daObjLife_c* life_container = (daObjLife_c*)fopAcM_SearchByName(fpcNm_Obj_LifeContainer_e);
cXyz life_pos(900.0f, 0.0f, 0.0f);
int act_idx = dComIfGp_evmng_getMyActIdx(mStaffId, action_table, 15, 0, 0);
if (dComIfGp_evmng_getIsAddvance(mStaffId)) {
switch (act_idx) {
case 0: { // WAIT
int* timer = dComIfGp_evmng_getMyIntegerP(mStaffId, "Timer");
if (timer == NULL) {
mTimer = 1;
} else {
mTimer = *timer;
}
break;
}
case 1: { // APPEAR
int level = getNowLevel();
if (level >= 0 && level < 10 && l_dangeon_clr_bitNo[level] > 0) {
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[l_dangeon_clr_bitNo[level]]);
}
appear(0);
break;
}
case 2: // DISAPPEAR
disappear(0);
break;
case 3: // SCENE_CHG
int scene;
if (isFirst()) {
scene = getSceneListNo();
} else {
scene = getSceneListNo();
}
player->onSceneChangeArea(scene, 0xff, 0);
break;
case 4: // STONE_FALL
if (ystone != NULL) {
mYstonePos = ystone->current.pos;
if (getNowLevel() < 3) {
mYstonePos.y += 50.0f;
} else if (getNowLevel() == 5) {
mYstonePos.y = player->current.pos.y + 270.0f + 120.0f;
ystone->setCurrentPos(mYstonePos);
} else {
mYstonePos.y += 120.0f;
}
}
if (getNowLevel() < 3) {
mYstoneTargetPos.set(0.0f, 145.0f, 74.0f);
} else {
mYstoneTargetPos.set(0.0f, 175.0f, 54.0f);
}
mDoMtx_stack_c::transS(player->current.pos);
mDoMtx_stack_c::YrotM(player->shape_angle.y);
mDoMtx_stack_c::multVec(&mYstoneTargetPos, &mYstoneTargetPos);
mYstonePos.x = mYstoneTargetPos.x;
mYstonePos.z = mYstoneTargetPos.z;
switch (getNowLevel()) {
case 0:
dComIfGs_onCollectCrystal(0);
break;
case 1:
dComIfGs_onCollectCrystal(1);
break;
case 2:
dComIfGs_onCollectCrystal(2);
break;
case 4:
dComIfGs_onCollectMirror(1);
break;
case 5:
dComIfGs_onCollectMirror(2);
break;
case 6:
dComIfGs_onCollectMirror(3);
break;
}
mCounter = 0;
break;
case 5: // STONE_MIDNA
mCounter = 0;
break;
case 9: // STONE_PUTAWAY
mCounter = 0;
break;
case 6: // WALK_TARGET1
dComIfGp_evmng_setGoal(¤t.pos);
break;
case 7: // APPEAR_END
break;
case 8: // STONE_DELETE
break;
case 10: // WCHECK
mMsgFlow.init(this, 0xbc0, 0, NULL);
break;
case 11: // SETPOS
setGoal();
break;
case 12: // SCALING
mScalingUp = true;
break;
case 13: // STONE_SCALE
break;
case 14: // HEART_MOVE
if (life_container != NULL) {
life_container->setPos(life_pos);
}
break;
}
}
switch (act_idx) {
case 0: // WAIT
if (cLib_calcTimer(&mTimer) == 0) {
dComIfGp_evmng_cutEnd(mStaffId);
}
break;
case 1: // APPEAR
dComIfGp_evmng_cutEnd(mStaffId);
break;
case 2: // DISAPPEAR
dComIfGp_evmng_cutEnd(mStaffId);
break;
case 3: // SCENE_CHG
break;
case 4: // STONE_FALL
if (ystone != NULL) {
f32 dist = cLib_addCalc(&mYstonePos.y, mYstoneTargetPos.y, 0.05f, 2.0f, 0.1f);
if (dist < 40.0f) {
mCounter++;
if (ystone->getMirrorMode() == 2) {
ystone->setMirrorMode(3);
}
}
if (dist == 0.0f && mCounter > 50) {
dComIfGp_evmng_cutEnd(mStaffId);
}
ystone->setCurrentPos(mYstonePos);
}
break;
case 5: // STONE_MIDNA
mCounter++;
if (mCounter == 12) {
field_0x599 = 1;
}
dComIfGp_evmng_cutEnd(mStaffId);
break;
case 9: // STONE_PUTAWAY
mCounter++;
if (cLib_chaseF(&mScaleF, 0.0f, 0.033f)) {
fopAcM_delete(fopAcM_GetID(ystone));
dComIfGp_evmng_cutEnd(mStaffId);
}
break;
case 7: // APPEAR_END
field_0x595 = true;
field_0x620 = midna->current.pos;
dComIfGp_evmng_cutEnd(mStaffId);
break;
case 10: // WCHECK
if (mMsgFlow.doFlow(this, NULL, 0)) {
dComIfGp_evmng_cutEnd(mStaffId);
} else if (mMsgFlow.isSelectMessage()) {
mWarpChoice = mMsgFlow.getSelectNum();
}
break;
default:
dComIfGp_evmng_cutEnd(mStaffId);
break;
}
return 1;
}
void daObjBossWarp_c::setGoal() {
daPy_py_c* player = daPy_getPlayerActorClass();
cXyz delta = player->current.pos - current.pos;
cXyz goal = current.pos + delta.normalizeZP() * 250.0f;
dComIfGp_evmng_setGoal(&goal);
}
int daObjBossWarp_c::draw() {
g_env_light.settingTevStruct(0, ¤t.pos, &tevStr);
g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr);
mpBrkAnm->entry(mpModel->getModelData());
mpBtkAnm[0]->entry(mpModel->getModelData());
mpBtkAnm[1]->entry(mpModel->getModelData());
mDoExt_modelUpdateDL(mpModel);
return 1;
}
int daObjBossWarp_c::_delete() {
disappear(0);
dComIfG_resDelete(&mPhaseReq, l_arcName);
return 1;
}
static int daObjBossWarp_Draw(daObjBossWarp_c* i_this) {
return i_this->draw();
}
static int daObjBossWarp_Execute(daObjBossWarp_c* i_this) {
return i_this->execute();
}
static int daObjBossWarp_Delete(daObjBossWarp_c* i_this) {
return i_this->_delete();
}
static cPhs_Step daObjBossWarp_Create(fopAc_ac_c* i_this) {
return static_cast<daObjBossWarp_c*>(i_this)->create();
}
static actor_method_class l_daObjBossWarp_Method = {
(process_method_func)daObjBossWarp_Create,
(process_method_func)daObjBossWarp_Delete,
(process_method_func)daObjBossWarp_Execute,
(process_method_func)NULL,
(process_method_func)daObjBossWarp_Draw,
};
actor_process_profile_definition g_profile_Obj_BossWarp = {
/* Layer ID */ fpcLy_CURRENT_e,
/* List ID */ 7,
/* List Prio */ fpcPi_CURRENT_e,
/* Proc Name */ fpcNm_Obj_BossWarp_e,
/* Proc SubMtd */ &g_fpcLf_Method.base,
/* Size */ sizeof(daObjBossWarp_c),
/* Size Other */ 0,
/* Parameters */ 0,
/* Leaf SubMtd */ &g_fopAc_Method.base,
/* Draw Prio */ fpcDwPi_Obj_BossWarp_e,
/* Actor SubMtd */ &l_daObjBossWarp_Method,
/* Status */ fopAcStts_UNK_0x40000_e | fopAcStts_UNK_0x4000_e,
/* Group */ fopAc_ACTOR_e,
/* Cull Type */ fopAc_CULLBOX_CUSTOM_e,
};
|