diff --git a/configure.py b/configure.py index fede87b1378..21b03a80216 100755 --- a/configure.py +++ b/configure.py @@ -1706,7 +1706,7 @@ config.libs = [ ActorRel(MatchingFor("GZ2E01"), "d_a_e_tk_ball"), ActorRel(NonMatching, "d_a_e_tt"), ActorRel(Equivalent, "d_a_e_vt"), - ActorRel(NonMatching, "d_a_e_warpappear"), + ActorRel(Equivalent, "d_a_e_warpappear"), # weak func order ActorRel(NonMatching, "d_a_e_wb"), ActorRel(NonMatching, "d_a_e_ws"), ActorRel(NonMatching, "d_a_e_ww"), diff --git a/include/d/actor/d_a_e_warpappear.h b/include/d/actor/d_a_e_warpappear.h index 18237f466d7..62e9335cc81 100644 --- a/include/d/actor/d_a_e_warpappear.h +++ b/include/d/actor/d_a_e_warpappear.h @@ -2,7 +2,8 @@ #define D_A_E_WARPAPPEAR_H #include "d/d_msg_flow.h" -#include "f_op/f_op_actor_mng.h" +#include "f_op/f_op_actor.h" +#include "SSystem/SComponent/c_phase.h" /** * @ingroup actors-enemies diff --git a/include/d/actor/d_a_obj_ihasi.h b/include/d/actor/d_a_obj_ihasi.h index 965291d0639..498229cd3dc 100644 --- a/include/d/actor/d_a_obj_ihasi.h +++ b/include/d/actor/d_a_obj_ihasi.h @@ -14,6 +14,7 @@ * @details * */ + class obj_ihasi_class : public fopAc_ac_c { public: /* 0x568 */ request_of_phase_process_class mPhaseReq; @@ -27,7 +28,7 @@ public: /* 0x586 */ s8 mFlag2; /* 0x588 */ Mtx mMtx; /* 0x5B8 */ dBgW* mpBgW; - /* 0x5BC */ u32 field_0x5bc; + /* 0x5BC */ u32 mParticleKey; /* 0x5C0 */ u8 field_0x5c0[4]; }; diff --git a/src/d/actor/d_a_e_warpappear.cpp b/src/d/actor/d_a_e_warpappear.cpp index 26e80899e2a..8b71e1b7ca1 100644 --- a/src/d/actor/d_a_e_warpappear.cpp +++ b/src/d/actor/d_a_e_warpappear.cpp @@ -1,17 +1,14 @@ /** * @file d_a_e_warpappear.cpp - * -*/ + * + */ #include "d/actor/d_a_e_warpappear.h" -#include "d/d_com_inf_game.h" #include "d/actor/d_a_e_s1.h" -#include "d/actor/d_a_player.h" #include "d/actor/d_a_horse.h" #include "d/actor/d_a_obj_ihasi.h" -#include "d/d_camera.h" -/* 807CF7D8-807CF8BC 000078 00E4+00 1/0 0/0 0/0 .text daE_Warpappear_Draw__FP18e_warpappear_class */ +/* 807CF7D8-807CF8BC 000078 00E4+00 1/0 0/0 0/0 .text daE_Warpappear_Draw__FP18e_warpappear_class */ static int daE_Warpappear_Draw(e_warpappear_class* i_this) { int i_no = (fopAcM_GetParam(i_this) >> 8) & 0xFF; if (i_no != 0xff) { @@ -71,7 +68,9 @@ static void* s_s1_sub(void* i_actor, void* i_data) { static void* s_s1drop_sub(void* i_actor, void* i_data) { e_s1_class* shadowBeast = (e_s1_class*)i_actor; fopAc_ac_c* data = (fopAc_ac_c*)i_data; - if ((fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_S1) && shadowBeast->mMode != 2) { + if ((fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_S1) && + shadowBeast->mMode != 2) + { shadowBeast->current.pos = data->current.pos; shadowBeast->current.pos.y += 400.0f; shadowBeast->mMode = 2; @@ -119,19 +118,19 @@ static int entry_no; /* 807CFBC4-807CFC8C 000464 00C8+00 1/1 0/0 0/0 .text s_s1entry_sub__FPvPv */ static void* s_s1entry_sub(void* i_actor, void* i_data) { - // NONMATCHING if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_S1) { e_s1_class* shadowBeast = (e_s1_class*)i_actor; e_warpappear_class* data = (e_warpappear_class*)i_data; cXyz sp28 = shadowBeast->current.pos - data->current.pos; + sp28.y = 0.0f; if (shadowBeast->mAction != 20) { shadowBeast->mAction = 20; shadowBeast->mMode = 0; shadowBeast->mEntryNo = entry_no; entry_no++; - + data->field_0x64c++; } } @@ -144,7 +143,9 @@ static void* s_s1drop2_sub(void* i_actor, void* i_data) { e_s1_class* shadowBeast = (e_s1_class*)i_actor; e_warpappear_class* data = (e_warpappear_class*)i_data; - if ((fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_S1) && data->field_0x64c == shadowBeast->mEntryNo) { + if ((fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_S1) && + data->field_0x64c == shadowBeast->mEntryNo) + { shadowBeast->current.pos = data->current.pos; shadowBeast->current.pos.y += 400.0f; @@ -166,7 +167,9 @@ static void* s_s1Yangset_sub(void* i_actor, void* i_data) { e_s1_class* shadowBeast = (e_s1_class*)i_actor; e_warpappear_class* data = (e_warpappear_class*)i_data; - if ((fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_S1) && data->field_0x64c == shadowBeast->mEntryNo) { + if ((fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_S1) && + data->field_0x64c == shadowBeast->mEntryNo) + { shadowBeast->shape_angle.y = shadowBeast->current.angle.y = ew_s1angy; return i_actor; @@ -198,531 +201,573 @@ static void* s_s1start_sub(void* i_actor, void* i_data) { /* 807CFFD4-807D032C 000874 0358+00 1/1 0/0 0/0 .text action__FP18e_warpappear_class */ static void action(e_warpappear_class* i_this) { - // NONMATCHING + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; fopAc_ac_c* player = dComIfGp_getPlayer(0); f32 fVar1 = -15200.0f - player->current.pos.x; f32 fVar2 = -35.0f - player->current.pos.z; fVar1 = JMAFastSqrt(fVar1 * fVar1 + fVar2 * fVar2); - bool bVar1 = false; + s8 bVar1 = false; switch (i_this->field_0x596) { - case 0: - if (i_this->field_0x570 == 53) { - if (i_this->field_0x64c == 0) { - entry_no = 0; - fpcM_Search(s_s1entry_sub, i_this); - } - - if (dComIfGs_isEventBit(0x701)) { - if (dComIfGs_isSwitch(18, fopAcM_GetRoomNo(i_this))) { - i_this->field_0x596 = 1; - i_this->field_0x59e = 20; - } - } - } else if (i_this->field_0x570 == 255) { - fpcM_Search(s_s1_sub, i_this); - if (fVar1 < 950.0f) { - i_this->field_0x59e = 1; - i_this->field_0x596 = 1; - } + case 0: + if (i_this->field_0x570 == 53) { + if (i_this->field_0x64c == 0) { + entry_no = 0; + fpcM_Search(s_s1entry_sub, i_this); } + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x40]) && + dComIfGs_isSwitch(18, fopAcM_GetRoomNo(a_this))) + { + i_this->field_0x596 = 1; + i_this->field_0x59e = 20; + } + + } else if (i_this->field_0x570 == 255) { + fpcM_Search(s_s1_sub, i_this); + if (fVar1 < 950.0f) { + i_this->field_0x59e = 1; + i_this->field_0x596 = 1; + } + + } else { entry_no = 0; fpcM_Search(s_s1entry_sub, i_this); if (i_this->field_0x64c != 0) { - int i_no = fopAcM_GetParam(i_this); - if (i_no != 0xff && !dComIfGs_isSwitch(i_no, fopAcM_GetRoomNo(i_this))) { + u32 i_no = fopAcM_GetParamBit(a_this, 8, 8); + if ((s32)i_no != 0xff && !dComIfGs_isSwitch(i_no, fopAcM_GetRoomNo(a_this))) { return; } - if (i_this->field_0x59a[0] == 0 && fopAcM_searchPlayerDistanceXZ(i_this) < 1000.0f) { + if (i_this->field_0x59a[0] == 0 && fopAcM_searchPlayerDistanceXZ(a_this) < 1000.0f) + { i_this->field_0x59e = 10; i_this->field_0x596 = 1; } } - - break; + } + break; - case 20: - i_this->field_0x584 = 1; - case 1: - // break; + case 1: + break; - case 10: - i_this->mpBrks[0]->setPlaySpeed(1.0f); + case 10: + i_this->mpBrks[0]->setPlaySpeed(1.0f); + bVar1 = true; + break; - cXyz sp68(i_this->scale.x, i_this->scale.x, i_this->scale.x); - if (i_this->field_0x598 == 0) { - i_this->field_0x598 = 1; - dComIfGp_particle_set(0x84a4, &i_this->current.pos, NULL, &sp68); - } - - i_this->mParticle1 = dComIfGp_particle_set(i_this->mParticle1, 0x84a6, &i_this->current.pos, NULL, &sp68); - i_this->mParticle2 = dComIfGp_particle_set(i_this->mParticle2, 0x84a7, &i_this->current.pos, NULL, &sp68); + case 20: + i_this->field_0x584 = 1; + break; + } + + if (bVar1 != 0) { + cXyz sp68(i_this->scale.x, i_this->scale.x, i_this->scale.x); + if (i_this->field_0x598 == 0) { + i_this->field_0x598++; + dComIfGp_particle_set(0x84a4, &a_this->current.pos, NULL, &sp68); + } + + i_this->mParticle1 = + dComIfGp_particle_set(i_this->mParticle1, 0x84a6, &a_this->current.pos, NULL, &sp68); + i_this->mParticle2 = + dComIfGp_particle_set(i_this->mParticle2, 0x84a7, &a_this->current.pos, NULL, &sp68); } } -/* 807D032C-807D1A54 000BCC 1728+00 2/1 0/0 0/0 .text demo_camera__FP18e_warpappear_class */ +/* 807D032C-807D1A54 000BCC 1728+00 2/1 0/0 0/0 .text demo_camera__FP18e_warpappear_class + */ static void demo_camera(e_warpappear_class* i_this) { - // NONMATCHING static u16 w_id[20] = { - 0x850D, 0x850E, 0x850F, 0x8510, 0x8511, 0x8512, 0x8513, - 0x8514, 0x8515, 0x8516, 0x8517, 0x8518, 0x8519, 0x851A, - 0x851B, 0x851C, 0x851D, 0x851E, 0x851F, 0x8520, + 0x850D, 0x850E, 0x850F, 0x8510, 0x8511, 0x8512, 0x8513, 0x8514, 0x8515, 0x8516, + 0x8517, 0x8518, 0x8519, 0x851A, 0x851B, 0x851C, 0x851D, 0x851E, 0x851F, 0x8520, }; daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); - daHorse_c* horseActor = dComIfGp_getHorseActor(); + daHorse_c* horseActor = (daHorse_c*)dComIfGp_getHorseActor(); cXyz sp48, sp54; + dComIfG_play_c* play; switch (i_this->field_0x59e) { - case 1: - if (!i_this->eventInfo.checkCommandDemoAccrpt()) { - fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); - i_this->eventInfo.onCondition(2); - return; - } + case 1: + if (!i_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); + i_this->eventInfo.onCondition(2); + return; + } - camera->mCamera.Stop(); - i_this->field_0x59e = 2; + camera->mCamera.Stop(); + i_this->field_0x59e = 2; + i_this->field_0x5a0 = 0; + i_this->field_0x5f4 = 55.0f; + i_this->field_0x5a0 = 0; + i_this->field_0x5ec = 300.0f; + i_this->field_0x5f0 = 1000.0f; + i_this->field_0x5f8 = 0.0f; + + camera->mCamera.SetTrimSize(3); + daPy_getPlayerActorClass()->changeOriginalDemo(); + daPy_getPlayerActorClass()->changeDemoMode(23, 0, 0, 0); + // [[fallthrough]] + + case 2: + sp54.set(-15600.0f, 0.0f, -200.0f); + player->setPlayerPosAndAngle(&sp54, 0x4ef8, 0); + i_this->current.pos.x = sp54.x; + i_this->current.pos.z = sp54.z; + i_this->field_0x5ec = 200.0f; + i_this->field_0x5f0 = -500.0f; + + mDoMtx_stack_c::YrotS(player->shape_angle.y); + sp48.x = -100.0f; + sp48.y = i_this->field_0x5ec; + sp48.z = i_this->field_0x5f0; + + mDoMtx_stack_c::multVec(&sp48, &i_this->field_0x5a4); + i_this->field_0x5a4 += player->current.pos; + i_this->field_0x5b0 = player->current.pos; + i_this->field_0x5b0.y += 100.0f; + + if (i_this->field_0x5a0 > 20) { + i_this->field_0x59e = 3; i_this->field_0x5a0 = 0; - i_this->field_0x5f4 = 55.0f; + } + break; + + case 3: + cLib_addCalc2(&i_this->field_0x5b0.y, i_this->current.pos.y, 0.1f, i_this->field_0x5f8); + cLib_addCalc2(&i_this->field_0x5f8, 200.0f, 1.0f, 10.0f); + if (i_this->field_0x5a0 == 40) { + i_this->field_0x596 = 10; + Z2GetAudioMgr()->seStart(Z2SE_DEMO_NS_WARPHOLE, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, + 0); + } + + if (i_this->field_0x5a0 > 150) { + i_this->field_0x59e = 4; i_this->field_0x5a0 = 0; - i_this->field_0x5ec = 300.0f; - i_this->field_0x5f0 = 1000.0f; + } + break; + + case 4: + sp54.set(-15600.0f, 0.0f, 200.0f); + player->setPlayerPosAndAngle(&sp54, 0x6e38, 0); + i_this->current.pos.x = sp54.x; + i_this->current.pos.z = sp54.z; + cLib_addCalc2(&i_this->field_0x5f4, 70.0f, 0.05f, 0.08f); + mDoMtx_stack_c::YrotS(player->shape_angle.y); + sp48.x = -100.0f; + sp48.y = -1000.0f; + sp48.z = -1500.0f; + mDoMtx_stack_c::multVec(&sp48, &i_this->field_0x5a4); + i_this->field_0x5a4 += i_this->current.pos; + i_this->field_0x5b0 = i_this->current.pos; + i_this->field_0x5b0.y += -300.0f; + + if (i_this->field_0x5a0 == 50 || i_this->field_0x5a0 == 70 || i_this->field_0x5a0 == 90) { + fpcM_Search(s_s1drop_sub, i_this); + } + + if (i_this->field_0x5a0 == 110) { + i_this->field_0x596 = 20; + } + + if (i_this->field_0x5a0 == 200) { + i_this->field_0x59e = 5; + i_this->field_0x5a0 = 0; + fpcM_Search(s_s1riv_sub, i_this); + + i_this->field_0x5b0.set(-14654.0f, 13.0f, -1518.0f); + i_this->field_0x5a4.set(-15595.0f, 140.0f, -335.0f); + i_this->field_0x5c8.set(-14932.0f, -19.0f, -847.0f); + i_this->field_0x5bc.set(-15806.0f, 92.0f, 385.0f); + + i_this->field_0x5d4 = fabsf(i_this->field_0x5bc.x - i_this->field_0x5a4.x); + i_this->field_0x5d8 = fabsf(i_this->field_0x5bc.y - i_this->field_0x5a4.y); + i_this->field_0x5dc = fabsf(i_this->field_0x5bc.z - i_this->field_0x5a4.z); + i_this->field_0x5e0 = fabsf(i_this->field_0x5c8.x - i_this->field_0x5b0.x); + i_this->field_0x5e4 = fabsf(i_this->field_0x5c8.y - i_this->field_0x5b0.y); + i_this->field_0x5e8 = fabsf(i_this->field_0x5c8.z - i_this->field_0x5b0.z); + i_this->field_0x5b0.y += 4200.0f; i_this->field_0x5f8 = 0.0f; - - camera->mCamera.SetTrimSize(3); - daPy_getPlayerActorClass()->changeOriginalDemo(); - daPy_getPlayerActorClass()->changeDemoMode(23, 0, 0, 0); - // fallthrough - case 2: - sp54.set(-15600.0f, 0.0f, -200.0f); - player->setPlayerPosAndAngle(&sp54, 0x4ef8, 0); - i_this->current.pos.x = sp54.x; - i_this->current.pos.z = sp54.z; - i_this->field_0x5ec = 200.0f; - i_this->field_0x5f0 = -500.0f; - - mDoMtx_stack_c::YrotS(player->shape_angle.y); - sp48.x = -100.0f; - sp48.y = i_this->field_0x5ec; - sp48.z = i_this->field_0x5f0; - - mDoMtx_stack_c::multVec(&sp48, &i_this->field_0x5a4); - i_this->field_0x5a4 += player->current.pos; - i_this->field_0x5b0 = player->current.pos; - i_this->field_0x5b0.y += 100.0f; - - if (i_this->field_0x5a0 > 20) { - i_this->field_0x59e = 3; - i_this->field_0x5a0 = 0; - } - break; - - case 3: - cLib_addCalc2(&i_this->field_0x5b0.y, i_this->current.pos.y, 0.1f, i_this->field_0x5f8); - cLib_addCalc2(&i_this->field_0x5f8, 200.0f, 1.0f, 10.0f); - if (i_this->field_0x5a0 == 40) { - i_this->field_0x596 = 10; - Z2GetAudioMgr()->seStart(Z2SE_DEMO_NS_WARPHOLE, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); - } - - if (i_this->field_0x5a0 > 150) { - i_this->field_0x59e = 4; - i_this->field_0x5a0 = 0; - } - break; - - case 4: - sp54.set(-15600.0f, 0.0f, 200.0f); - player->setPlayerPosAndAngle(&sp54, 0x6e38, 0); - i_this->current.pos.x = sp54.x; - i_this->current.pos.z = sp54.z; - cLib_addCalc2(&i_this->field_0x5f4, 70.0f, 0.05f, 0.08f); - mDoMtx_stack_c::YrotS(player->shape_angle.y); - sp48.x = -100.0f; - sp48.y = -1000.0f; - sp48.z = -1500.0f; - mDoMtx_stack_c::multVec(&sp48, &i_this->field_0x5a4); - i_this->field_0x5a4 += i_this->current.pos; - i_this->field_0x5b0 = i_this->current.pos; - i_this->field_0x5b0.y += -300.0f; - - if (i_this->field_0x5a0 == 50 || i_this->field_0x5a0 == 70 || i_this->field_0x5a0 == 90) { - fpcM_Search(s_s1drop_sub,i_this); - } - - if (i_this->field_0x5a0 == 110) { - i_this->field_0x596 = 20; - } - - if (i_this->field_0x5a0 == 200) { - i_this->field_0x59e = 5; - i_this->field_0x5a0 = 0; - fpcM_Search(s_s1riv_sub,i_this); - - i_this->field_0x5b0.set(-14654.0f, 13.0f, -1518.0f); - i_this->field_0x5a4.set(-15595.0f, 140.0f, -335.0f); - i_this->field_0x5c8.set(-14932.0f, -19.0f, -847.0f); - i_this->field_0x5bc.set(-15806.0f, 92.0f, 385.0f); - - i_this->field_0x5d4 = fabsf(i_this->field_0x5bc.x - i_this->field_0x5a4.x); - i_this->field_0x5d8 = fabsf(i_this->field_0x5bc.y - i_this->field_0x5a4.y); - i_this->field_0x5dc = fabsf(i_this->field_0x5bc.z - i_this->field_0x5a4.z); - i_this->field_0x5e0 = fabsf(i_this->field_0x5c8.x - i_this->field_0x5b0.x); - i_this->field_0x5e4 = fabsf(i_this->field_0x5c8.y - i_this->field_0x5b0.y); - i_this->field_0x5e8 = fabsf(i_this->field_0x5c8.z - i_this->field_0x5b0.z); - i_this->field_0x5b0.y += 4200.0f; - i_this->field_0x5f8 = 0.0f; - i_this->field_0x5f4 = 55.0f; - } - break; - - case 5: - case 6: - sp54.set(-15600.0f, 0.0f, 200.0f); - player->setPlayerPosAndAngle(&sp54, 0x6e38, 0); - if (i_this->field_0x5a0 == 38) { - dComIfGp_getVibration().StartShock(5, 1, cXyz(0.0f, 1.0f, 0.0f)); - i_this->field_0x5fc = 30.0f; - } - - if (i_this->field_0x5a0 <= 80) { - cLib_addCalc2(&i_this->field_0x5b0.y, 13.0f, 0.4f, 100.0f); - } else { - f32 fVar1 = 0.1f; - if (i_this->field_0x59e == 6) { - fVar1 = 0.2f; - } - - cLib_addCalc2(&i_this->field_0x5b0.x, i_this->field_0x5c8.x, fVar1, i_this->field_0x5e0 * i_this->field_0x5f8); - cLib_addCalc2(&i_this->field_0x5b0.y, i_this->field_0x5c8.y, fVar1, i_this->field_0x5e4 * i_this->field_0x5f8); - cLib_addCalc2(&i_this->field_0x5b0.z, i_this->field_0x5c8.z, fVar1, i_this->field_0x5e8 * i_this->field_0x5f8); - cLib_addCalc2(&i_this->field_0x5a4.x, i_this->field_0x5bc.x, fVar1, i_this->field_0x5d4 * i_this->field_0x5f8); - cLib_addCalc2(&i_this->field_0x5a4.y, i_this->field_0x5bc.y, fVar1, i_this->field_0x5d8 * i_this->field_0x5f8); - cLib_addCalc2(&i_this->field_0x5a4.z, i_this->field_0x5bc.z, fVar1, i_this->field_0x5dc * i_this->field_0x5f8); - cLib_addCalc2(&i_this->field_0x5f8, 0.05f, 1.0f, 0.002f); - } - - if (i_this->field_0x5a0 == 150) { - i_this->field_0x5b0.set(-16437.0f, 251.0f, -605.0f); - i_this->field_0x5a4.set(-15451.0f, 45.0f, 526.0f); - i_this->field_0x5c8.set(-16531.0f, 251.0f, -511.0f); - i_this->field_0x5bc.set(-15454.0f, 45.0f, 501.0f); - i_this->field_0x5d4 = fabsf(i_this->field_0x5bc.x - i_this->field_0x5a4.x) * 0.2f; - i_this->field_0x5d8 = fabsf(i_this->field_0x5bc.y - i_this->field_0x5a4.y) * 0.2f; - i_this->field_0x5dc = fabsf(i_this->field_0x5bc.z - i_this->field_0x5a4.z) * 0.2f; - i_this->field_0x5e0 = fabsf(i_this->field_0x5c8.x - i_this->field_0x5b0.x) * 0.2f; - i_this->field_0x5e4 = fabsf(i_this->field_0x5c8.y - i_this->field_0x5b0.y) * 0.2f; - i_this->field_0x5e8 = fabsf(i_this->field_0x5c8.z - i_this->field_0x5b0.z) * 0.2f; - i_this->field_0x5f8 = 0.02f; - - master_ns[1]->current.pos.x = master_ns[1]->home.pos.x; - master_ns[1]->current.pos.z = master_ns[1]->home.pos.z; - master_ns[1]->current.pos.y = master_ns[1]->home.pos.y + 500.0f; - master_ns[1]->speed.y = -120.0f; - master_ns[1]->gravity = -7.0f; - } - - if (i_this->field_0x5a0 == 210) { - i_this->field_0x5b0.set(-14474.0f, 87.0f, -154.0f); - i_this->field_0x5a4.set(-15888.0f, 40.0f, 390.0f); - i_this->field_0x5c8.set(-14447.0f, -131.0f, 15.0f); - i_this->field_0x5bc.set(-15895.0f, 145.0f, 365.0f); - i_this->field_0x5d4 = fabsf(i_this->field_0x5bc.x - i_this->field_0x5a4.x) * 0.2f; - i_this->field_0x5d8 = fabsf(i_this->field_0x5bc.y - i_this->field_0x5a4.y) * 0.2f; - i_this->field_0x5dc = fabsf(i_this->field_0x5bc.z - i_this->field_0x5a4.z) * 0.2f; - i_this->field_0x5e0 = fabsf(i_this->field_0x5c8.x - i_this->field_0x5b0.x) * 0.2f; - i_this->field_0x5e4 = fabsf(i_this->field_0x5c8.y - i_this->field_0x5b0.y) * 0.2f; - i_this->field_0x5e8 = fabsf(i_this->field_0x5c8.z - i_this->field_0x5b0.z) * 0.2f; - i_this->field_0x5f8 = 0.02f; - - master_ns[2]->current.pos.x = master_ns[2]->home.pos.x; - master_ns[2]->current.pos.z = master_ns[2]->home.pos.z; - master_ns[2]->current.pos.y = master_ns[2]->home.pos.y + 500.0f; - master_ns[2]->speed.y = -120.0f; - master_ns[2]->gravity = -7.0f; - } - - if (i_this->field_0x5a0 == 290) { - i_this->field_0x5b0.set(-15312.0f, 361.0f, 1425.0f); - i_this->field_0x5a4.set(-15630.0f, 16.0f, -15.0f); - i_this->field_0x5c8.set(-15312.0f, 361.0f, 1425.0f); - i_this->field_0x5bc.set(-15630.0f, 16.0f, -15.0f); - i_this->field_0x5f8 = 0.0f; - } - - dComIfGp_event_onHindFlag(15); - - if (i_this->field_0x59e == 5) { - if (i_this->field_0x5a0 >= 310) { - if (i_this->field_0x5a0 == 310) { - i_this->mMsgFlow.init(i_this, 127, 0, NULL); - } - i_this->mMsgFlow.doFlow(i_this, NULL, 0); - } - - if (i_this->mMsgFlow.getNowMsgNo() == 0x13a5 || i_this->mMsgFlow.getNowMsgNo() == 0x13e3) { - i_this->field_0x59e = 6; - i_this->field_0x5b0.set(-15605.0f, 144.0f, -1017.0f); - i_this->field_0x5a4.set(-15487.0f, 69.0f, 491.0f); - i_this->field_0x5c8.set(-15560.0f, 85.0f, 108.0f); - i_this->field_0x5bc.set(-15778.0f, 534.0f, 1538.0f); - i_this->field_0x5d4 = fabsf(i_this->field_0x5bc.x - i_this->field_0x5a4.x) * 0.9f; - i_this->field_0x5d8 = fabsf(i_this->field_0x5bc.y - i_this->field_0x5a4.y) * 0.9f; - i_this->field_0x5dc = fabsf(i_this->field_0x5bc.z - i_this->field_0x5a4.z) * 0.9f; - i_this->field_0x5e0 = fabsf(i_this->field_0x5c8.x - i_this->field_0x5b0.x) * 0.9f; - i_this->field_0x5e4 = fabsf(i_this->field_0x5c8.y - i_this->field_0x5b0.y) * 0.9f; - i_this->field_0x5e8 = fabsf(i_this->field_0x5c8.z - i_this->field_0x5b0.z) * 0.9f; - i_this->field_0x5f8 = 0.02f; - } - } else if (i_this->field_0x59e == 6 && i_this->mMsgFlow.doFlow(i_this, NULL, 0) != 0) { - camera->mCamera.Reset(i_this->field_0x5b0, i_this->field_0x5a4, i_this->field_0x5f4, 0); - camera->mCamera.Start(); - camera->mCamera.SetTrimSize(0); - dComIfGp_event_reset(); - daPy_getPlayerActorClass()->cancelOriginalDemo(); - fopAcM_delete(i_this); - fpcM_Search(s_s1fight_sub, i_this); - dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[151]); - } - break; - - case 10: - if (!i_this->eventInfo.checkCommandDemoAccrpt()) { - fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); - i_this->eventInfo.onCondition(2); - return; - } - - camera->mCamera.Stop(); - i_this->field_0x59e = 11; - i_this->field_0x5a0 = 0; i_this->field_0x5f4 = 55.0f; - i_this->field_0x5a0 = 0; - i_this->field_0x5ec = 300.0f; - i_this->field_0x5f0 = 1000.0f; + } + break; + + case 5: + case 6: + sp54.set(-15600.0f, 0.0f, 200.0f); + player->setPlayerPosAndAngle(&sp54, 0x6e38, 0); + if (i_this->field_0x5a0 == 38) { + dComIfGp_getVibration().StartShock(5, 1, cXyz(0.0f, 1.0f, 0.0f)); + i_this->field_0x5fc = 30.0f; + } + + if (i_this->field_0x5a0 <= 80) { + cLib_addCalc2(&i_this->field_0x5b0.y, 13.0f, 0.4f, 100.0f); + } else { + f32 fVar1 = 0.1f; + if (i_this->field_0x59e == 6) { + fVar1 = 0.2f; + } + + cLib_addCalc2(&i_this->field_0x5b0.x, i_this->field_0x5c8.x, fVar1, + i_this->field_0x5e0 * i_this->field_0x5f8); + cLib_addCalc2(&i_this->field_0x5b0.y, i_this->field_0x5c8.y, fVar1, + i_this->field_0x5e4 * i_this->field_0x5f8); + cLib_addCalc2(&i_this->field_0x5b0.z, i_this->field_0x5c8.z, fVar1, + i_this->field_0x5e8 * i_this->field_0x5f8); + cLib_addCalc2(&i_this->field_0x5a4.x, i_this->field_0x5bc.x, fVar1, + i_this->field_0x5d4 * i_this->field_0x5f8); + cLib_addCalc2(&i_this->field_0x5a4.y, i_this->field_0x5bc.y, fVar1, + i_this->field_0x5d8 * i_this->field_0x5f8); + cLib_addCalc2(&i_this->field_0x5a4.z, i_this->field_0x5bc.z, fVar1, + i_this->field_0x5dc * i_this->field_0x5f8); + cLib_addCalc2(&i_this->field_0x5f8, 0.05f, 1.0f, 0.002f); + } + + if (i_this->field_0x5a0 == 150) { + i_this->field_0x5b0.set(-16437.0f, 251.0f, -605.0f); + i_this->field_0x5a4.set(-15451.0f, 45.0f, 526.0f); + i_this->field_0x5c8.set(-16531.0f, 251.0f, -511.0f); + i_this->field_0x5bc.set(-15454.0f, 45.0f, 501.0f); + i_this->field_0x5d4 = fabsf(i_this->field_0x5bc.x - i_this->field_0x5a4.x) * 0.2f; + i_this->field_0x5d8 = fabsf(i_this->field_0x5bc.y - i_this->field_0x5a4.y) * 0.2f; + i_this->field_0x5dc = fabsf(i_this->field_0x5bc.z - i_this->field_0x5a4.z) * 0.2f; + i_this->field_0x5e0 = fabsf(i_this->field_0x5c8.x - i_this->field_0x5b0.x) * 0.2f; + i_this->field_0x5e4 = fabsf(i_this->field_0x5c8.y - i_this->field_0x5b0.y) * 0.2f; + i_this->field_0x5e8 = fabsf(i_this->field_0x5c8.z - i_this->field_0x5b0.z) * 0.2f; + i_this->field_0x5f8 = 0.02f; + + master_ns[1]->current.pos.x = master_ns[1]->home.pos.x; + master_ns[1]->current.pos.z = master_ns[1]->home.pos.z; + master_ns[1]->current.pos.y = master_ns[1]->home.pos.y + 500.0f; + master_ns[1]->speed.y = -120.0f; + master_ns[1]->gravity = -7.0f; + } + + if (i_this->field_0x5a0 == 210) { + i_this->field_0x5b0.set(-14474.0f, 87.0f, -154.0f); + i_this->field_0x5a4.set(-15888.0f, 40.0f, 390.0f); + i_this->field_0x5c8.set(-14447.0f, -131.0f, 15.0f); + i_this->field_0x5bc.set(-15895.0f, 145.0f, 365.0f); + i_this->field_0x5d4 = fabsf(i_this->field_0x5bc.x - i_this->field_0x5a4.x) * 0.2f; + i_this->field_0x5d8 = fabsf(i_this->field_0x5bc.y - i_this->field_0x5a4.y) * 0.2f; + i_this->field_0x5dc = fabsf(i_this->field_0x5bc.z - i_this->field_0x5a4.z) * 0.2f; + i_this->field_0x5e0 = fabsf(i_this->field_0x5c8.x - i_this->field_0x5b0.x) * 0.2f; + i_this->field_0x5e4 = fabsf(i_this->field_0x5c8.y - i_this->field_0x5b0.y) * 0.2f; + i_this->field_0x5e8 = fabsf(i_this->field_0x5c8.z - i_this->field_0x5b0.z) * 0.2f; + i_this->field_0x5f8 = 0.02f; + + master_ns[2]->current.pos.x = master_ns[2]->home.pos.x; + master_ns[2]->current.pos.z = master_ns[2]->home.pos.z; + master_ns[2]->current.pos.y = master_ns[2]->home.pos.y + 500.0f; + master_ns[2]->speed.y = -120.0f; + master_ns[2]->gravity = -7.0f; + } + + if (i_this->field_0x5a0 == 290) { + i_this->field_0x5b0.set(-15312.0f, 361.0f, 1425.0f); + i_this->field_0x5a4.set(-15630.0f, 16.0f, -15.0f); + i_this->field_0x5c8.set(-15312.0f, 361.0f, 1425.0f); + i_this->field_0x5bc.set(-15630.0f, 16.0f, -15.0f); i_this->field_0x5f8 = 0.0f; - camera->mCamera.SetTrimSize(3); - daPy_getPlayerActorClass()->changeOriginalDemo(); - daPy_getPlayerActorClass()->changeDemoMode(23, 0, 0, 0); - // fallthrough - case 11: - if (strcmp(dComIfGp_getStartStageName(), "F_SP104") == 0) { - if (i_this->field_0x5a0 >= 40) { - if (i_this->field_0x5a0 == 40) { - i_this->mMsgFlow.init(i_this, 0xbba, 0, NULL); - } + } - if (i_this->mMsgFlow.doFlow(i_this, NULL, 0)) { - i_this->field_0x59e = 12; - i_this->field_0x5a0 = 0; - } + play = &g_dComIfG_gameInfo.play; + play->getEvent().onHindFlag(15); + + if (i_this->field_0x59e == 5) { + if (i_this->field_0x5a0 >= 310) { + if (i_this->field_0x5a0 == 310) { + i_this->mMsgFlow.init(i_this, 127, 0, NULL); } - } else if (i_this->field_0x5a0 == 40) { - i_this->field_0x59e = 12; - i_this->field_0x5a0 = 0; + i_this->mMsgFlow.doFlow(i_this, NULL, 0); } - sp54 = i_this->home.pos; - sp54.y = player->current.pos.y + 200.0f; - - if (fopAcM_gc_c::gndCheck(&sp54)) { - sp54.y = fopAcM_gc_c::getGroundY(); - } else { - sp54.y = player->current.pos.y; + if (i_this->mMsgFlow.getNowMsgNo() == 0x13a5 || + i_this->mMsgFlow.getNowMsgNo() == 0x13e3) + { + i_this->field_0x59e = 6; + i_this->field_0x5b0.set(-15605.0f, 144.0f, -1017.0f); + i_this->field_0x5a4.set(-15487.0f, 69.0f, 491.0f); + i_this->field_0x5c8.set(-15560.0f, 85.0f, 108.0f); + i_this->field_0x5bc.set(-15778.0f, 534.0f, 1538.0f); + i_this->field_0x5d4 = fabsf(i_this->field_0x5bc.x - i_this->field_0x5a4.x) * 0.9f; + i_this->field_0x5d8 = fabsf(i_this->field_0x5bc.y - i_this->field_0x5a4.y) * 0.9f; + i_this->field_0x5dc = fabsf(i_this->field_0x5bc.z - i_this->field_0x5a4.z) * 0.9f; + i_this->field_0x5e0 = fabsf(i_this->field_0x5c8.x - i_this->field_0x5b0.x) * 0.9f; + i_this->field_0x5e4 = fabsf(i_this->field_0x5c8.y - i_this->field_0x5b0.y) * 0.9f; + i_this->field_0x5e8 = fabsf(i_this->field_0x5c8.z - i_this->field_0x5b0.z) * 0.9f; + i_this->field_0x5f8 = 0.02f; } - player->setPlayerPosAndAngle(&sp54, i_this->home.angle.y, 0); + } else if (i_this->field_0x59e == 6 && i_this->mMsgFlow.doFlow(i_this, NULL, 0) != 0) { + camera->mCamera.Reset(i_this->field_0x5b0, i_this->field_0x5a4, i_this->field_0x5f4, 0); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + play->getEvent().reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + fopAcM_delete(i_this); + fpcM_Search(s_s1fight_sub, i_this); + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[151]); + } + break; - i_this->field_0x5ec = 200.0f; - i_this->field_0x5f0 = -500.0f; - mDoMtx_stack_c::YrotS(i_this->home.angle.y); - sp48.x = -100.0f; - sp48.y = i_this->field_0x5ec; - sp48.z = i_this->field_0x5f0; - mDoMtx_stack_c::multVec(&sp48, &i_this->field_0x5a4); - i_this->field_0x5a4 += player->current.pos; - i_this->field_0x5b0 = player->current.pos; - i_this->field_0x5b0.y += 100.0f; - break; + case 10: + if (!i_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); + i_this->eventInfo.onCondition(2); + return; + } - case 12: - if (i_this->field_0x5a0 > 28) { - cLib_addCalc2(&i_this->field_0x5b0.y, i_this->current.pos.y, 0.2f, i_this->field_0x5f8); - cLib_addCalc2(&i_this->field_0x5f8, 200.0f, 1.0f, 10.0f); + camera->mCamera.Stop(); + i_this->field_0x59e = 11; + i_this->field_0x5a0 = 0; + i_this->field_0x5f4 = 55.0f; + i_this->field_0x5a0 = 0; + i_this->field_0x5ec = 300.0f; + i_this->field_0x5f0 = 1000.0f; + i_this->field_0x5f8 = 0.0f; + camera->mCamera.SetTrimSize(3); + daPy_getPlayerActorClass()->changeOriginalDemo(); + daPy_getPlayerActorClass()->changeDemoMode(23, 0, 0, 0); + // [[fallthrough]] - if (i_this->field_0x5a0 == 69) { - i_this->field_0x596 = 10; - Z2GetAudioMgr()->seStart(Z2SE_DEMO_NS_WARPHOLE, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + case 11: + if (strcmp(dComIfGp_getStartStageName(), "F_SP104") == 0) { + if (i_this->field_0x5a0 >= 40) { + if (i_this->field_0x5a0 == 40) { + i_this->mMsgFlow.init(i_this, 0xbba, 0, NULL); } - if (i_this->field_0x5a0 > 159) { - i_this->field_0x59e = 13; + if (i_this->mMsgFlow.doFlow(i_this, NULL, 0)) { + i_this->field_0x59e = 12; i_this->field_0x5a0 = 0; } } - break; + } else if (i_this->field_0x5a0 == 40) { + i_this->field_0x59e = 12; + i_this->field_0x5a0 = 0; + } - case 13: - cLib_addCalc2(&i_this->field_0x5f4, 70.0f, 0.05f, 0.08f); - mDoMtx_stack_c::YrotS(i_this->home.angle.y); - sp48.x = -100.0f; - sp48.y = -1000.0f; - sp48.z = -1500.0f; - mDoMtx_stack_c::multVec(&sp48, &i_this->field_0x5a4); - i_this->field_0x5a4 += i_this->current.pos; - i_this->field_0x5b0 = i_this->current.pos; - i_this->field_0x5b0.y += -300.0f; + sp54 = i_this->home.pos; + sp54.y = player->current.pos.y + 200.0f; - if (i_this->field_0x5a0 == 50 && i_this->field_0x64c != 0) { - i_this->field_0x64c--; - fpcM_Search(s_s1drop2_sub,i_this); - if (i_this->field_0x64c != 0) { - i_this->field_0x5a0 += -20; + if (fopAcM_gc_c::gndCheck(&sp54)) { + sp54.y = fopAcM_gc_c::getGroundY(); + } else { + sp54.y = player->current.pos.y; + } + player->setPlayerPosAndAngle(&sp54, i_this->home.angle.y, 0); + + i_this->field_0x5ec = 200.0f; + i_this->field_0x5f0 = -500.0f; + mDoMtx_stack_c::YrotS(i_this->home.angle.y); + sp48.x = -100.0f; + sp48.y = i_this->field_0x5ec; + sp48.z = i_this->field_0x5f0; + mDoMtx_stack_c::multVec(&sp48, &i_this->field_0x5a4); + i_this->field_0x5a4 += player->current.pos; + i_this->field_0x5b0 = player->current.pos; + i_this->field_0x5b0.y += 100.0f; + break; + + case 12: + if (i_this->field_0x5a0 >= 29) { + cLib_addCalc2(&i_this->field_0x5b0.y, i_this->current.pos.y, 0.2f, i_this->field_0x5f8); + cLib_addCalc2(&i_this->field_0x5f8, 200.0f, 1.0f, 10.0f); + + if (i_this->field_0x5a0 == 69) { + i_this->field_0x596 = 10; + Z2GetAudioMgr()->seStart(Z2SE_DEMO_NS_WARPHOLE, NULL, 0, 0, 1.0f, 1.0f, -1.0f, + -1.0f, 0); + } + + if (i_this->field_0x5a0 > 159) { + i_this->field_0x59e = 13; + i_this->field_0x5a0 = 0; + } + } + break; + + case 13: + cLib_addCalc2(&i_this->field_0x5f4, 70.0f, 0.05f, 0.08f); + mDoMtx_stack_c::YrotS(i_this->home.angle.y); + sp48.x = -100.0f; + sp48.y = -1000.0f; + sp48.z = -1500.0f; + mDoMtx_stack_c::multVec(&sp48, &i_this->field_0x5a4); + i_this->field_0x5a4 += i_this->current.pos; + i_this->field_0x5b0 = i_this->current.pos; + i_this->field_0x5b0.y += -300.0f; + + if (i_this->field_0x5a0 == 50 && i_this->field_0x64c != 0) { + i_this->field_0x64c--; + fpcM_Search(s_s1drop2_sub, i_this); + if (i_this->field_0x64c != 0) { + i_this->field_0x5a0 += -20; + } + } + + if (i_this->field_0x5a0 == 70) { + i_this->field_0x596 = 20; + } + + if (i_this->field_0x5a0 == 140) { + fpcM_Search(s_s1start_sub, i_this); + camera->mCamera.Reset(i_this->field_0x5b0, i_this->field_0x5a4, i_this->field_0x5f4, 0); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + fopAcM_delete(i_this); + } + break; + + case 20: + if (!i_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); + i_this->eventInfo.onCondition(2); + return; + } + + camera->mCamera.Stop(); + i_this->field_0x59e = 21; + i_this->field_0x5a0 = 0; + i_this->field_0x5f4 = 55.0f; + i_this->field_0x5a0 = 0; + camera->mCamera.SetTrimSize(3); + i_this->field_0x5b0.set(34800.0f, 5700.0f, -26735.0f); + i_this->field_0x5a4.set(37592.0f, 1256.0f, -24152.0f); + // [[fallthrough]] + + case 21: + if ((daPy_getPlayerActorClass()->checkHorseRide() == 0 && horseActor != NULL) && + horseActor->current.pos.z > -28000.0f) + { + horseActor->current.pos.set(34785.0f, -300.0f, -28500.0f); + horseActor->old.pos.set(34785.0f, -300.0f, -28500.0f); + } + + if (i_this->field_0x5a0 == 40) { + i_this->field_0x596 = 10; + Z2GetAudioMgr()->seStart(Z2SE_DEMO_NS_WARPHOLE, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, + 0); + } + + if (i_this->field_0x5a0 >= 180) { + obj_ihasi_class* ihasiActor = (obj_ihasi_class*)fopAcM_SearchByName(PROC_OBJ_IHASI); + sp54.set(34800.0f, i_this->field_0x5ec + -300.0f, -26735.0f); + + ihasiActor->mParticleKey = + dComIfGp_particle_set(ihasiActor->mParticleKey, 0x8521, &sp54, 0, 0); + if (ihasiActor->mpBtkAnm->getFrame() >= 140.0f) { + cLib_addCalc2(&i_this->field_0x5ec, -1000.0f, 1.0f, 16.166668f); + } + + if (i_this->field_0x5a0 == 180) { + sp54 = i_this->field_0x5b0; + cXyz scale(i_this->scale.x, i_this->scale.x, i_this->scale.x); + dComIfGp_particle_set(0x850c, &sp54, NULL, &scale); + sp54.set(34800.0f, -300.0f, -26735.0f); + + for (int i = 0; i < 20; i++) { + dComIfGp_particle_set(w_id[i], &sp54, NULL, NULL); } - } - if (i_this->field_0x5a0 == 70) { - i_this->field_0x596 = 20; + i_this->field_0x5ec = -30.0f; + ihasiActor->mFlag2 = 1; } + } - if (i_this->field_0x5a0 == 140) { - fpcM_Search(s_s1start_sub,i_this); - camera->mCamera.Reset(i_this->field_0x5b0, i_this->field_0x5a4, i_this->field_0x5f4, 0); - camera->mCamera.Start(); - camera->mCamera.SetTrimSize(0); - dComIfGp_event_reset(); - daPy_getPlayerActorClass()->cancelOriginalDemo(); - fopAcM_delete(i_this); - } - break; + if (i_this->field_0x5a0 >= 182) { + cLib_addCalc2(&i_this->field_0x5b0.y, -300.0f, 0.5f, 800.0f); + } - case 20: - if (!i_this->eventInfo.checkCommandDemoAccrpt()) { - fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); - i_this->eventInfo.onCondition(2); - return; - } + if (i_this->field_0x5a0 == 190) { + dComIfGp_getVibration().StartQuake(3, 1, cXyz(0.0f, 1.0f, 0.0f)); + } - camera->mCamera.Stop(); - i_this->field_0x59e = 21; + if (i_this->field_0x5a0 >= 190 && i_this->field_0x5a0 < 222) { + i_this->field_0x5fc = 10.0f; + } + + if (i_this->field_0x5a0 == 222) { + dComIfGp_getVibration().StopQuake(31); + dComIfGp_getVibration().StartShock(8, 1, cXyz(0.0f, 1.0f, 0.0f)); + i_this->field_0x5fc = 25.0f; + } + + if (i_this->field_0x5a0 >= 460) { + i_this->field_0x59e = 22; i_this->field_0x5a0 = 0; - i_this->field_0x5f4 = 55.0f; - i_this->field_0x5a0 = 0; - camera->mCamera.SetTrimSize(3); i_this->field_0x5b0.set(34800.0f, 5700.0f, -26735.0f); i_this->field_0x5a4.set(37592.0f, 1256.0f, -24152.0f); - // fallthrough - case 21: - if ((!daPy_getPlayerActorClass()->checkHorseRide() && horseActor != NULL) && horseActor->current.pos.z > -28000.0f) { - horseActor->current.pos.set(34785.0f, -300.0f, -28500.0f); - horseActor->old.pos.set(34785.0f, -300.0f, -28500.0f); + sp54.set(34800.0f, 5700.0f, -26735.0f); + cXyz sp84(i_this->scale.x, i_this->scale.x, i_this->scale.x); + dComIfGp_particle_set(0x8522, &sp54, NULL, &sp84); + dComIfGp_particle_set(0x8523, &sp54, NULL, &sp84); + i_this->field_0x5f8 = 0.0f; + ew_s1angy = 0; + } + break; + + case 22: + if (i_this->field_0x5a0 >= 30) { + cLib_addCalc2(&i_this->field_0x5f4, 30.0f, 0.05f, i_this->field_0x5f8 * 0.2f); + cLib_addCalc2(&i_this->field_0x5f8, 1.0f, 1.0f, 0.03f); + } + + if (i_this->field_0x5a0 == 140 && i_this->field_0x64c != 0) { + i_this->field_0x64c--; + fpcM_Search(s_s1drop2_sub, i_this); + fpcM_Search(s_s1Yangset_sub, i_this); + ew_s1angy += 0x5555; + if (i_this->field_0x64c != 0) { + i_this->field_0x5a0 += -20; } + } - if (i_this->field_0x5a0 == 40) { - i_this->field_0x596 = 10; - Z2GetAudioMgr()->seStart(Z2SE_DEMO_NS_WARPHOLE, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + if (i_this->field_0x5a0 == 150) { + i_this->field_0x596 = 20; + } + + if (i_this->field_0x5a0 >= 230) { + fpcM_Search(s_s1start_sub, i_this); + i_this->field_0x59e = 23; + i_this->field_0x5a0 = 0; + i_this->field_0x5b0.set(34397.0f, -180.0f, -31312.0f); + i_this->field_0x5a4.set(34218.0f, -166.0f, -31724.0f); + i_this->field_0x5f4 = 55.0f; + } + break; + + case 23: + if (i_this->field_0x5a0 >= 80) { + camera->mCamera.Reset(i_this->field_0x5b0, i_this->field_0x5a4, i_this->field_0x5f4, 0); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + if (horseActor != NULL) { + horseActor->cancelOriginalDemo(); } + fopAcM_delete(i_this); + } + break; - if (i_this->field_0x5a0 >= 180) { - obj_ihasi_class* ihasiActor = (obj_ihasi_class*)fopAcM_SearchByName(PROC_OBJ_IHASI); - sp54.set(34800.0f, i_this->field_0x5ec + -300.0f, -26735.0f); - - ihasiActor->field_0x5bc = dComIfGp_particle_set(ihasiActor->field_0x5bc, 0x8521, &sp54, 0, 0); - if (ihasiActor->mpBtkAnm->getFrame() >= 140.0f) { - cLib_addCalc2(&i_this->field_0x5ec, -1000.0f, 1.0f, 16.166668f); - } - - if (i_this->field_0x5a0 == 180) { - sp54 = i_this->field_0x5b0; - dComIfGp_particle_set(0x850c, &sp54, NULL, &cXyz(i_this->scale.x, i_this->scale.x, i_this->scale.x)); - sp54.set(34800.0f, -300.0f, -26735.0f); - - for (int i = 0; i < 20; i++) { - dComIfGp_particle_set(w_id[i], &sp54, NULL, NULL); - } - - i_this->field_0x5ec = -30.0f; - ihasiActor->mFlag2 = 1; - } - } - - if (i_this->field_0x5a0 >= 182) { - cLib_addCalc2(&i_this->field_0x5b0.y, -300.0f, 0.5f, 800.0f); - } - - if (i_this->field_0x5a0 == 190) { - dComIfGp_getVibration().StartQuake(3, 1, cXyz(0.0f, 1.0f, 0.0f)); - } - - if (i_this->field_0x5a0 >= 190 && i_this->field_0x5a0 < 222) { - i_this->field_0x5fc = 10.0f; - } - - if (i_this->field_0x5a0 == 222) { - dComIfGp_getVibration().StopQuake(31); - dComIfGp_getVibration().StartShock(8, 1, cXyz(0.0f, 1.0f, 0.0f)); - i_this->field_0x5fc = 25.0f; - } - - if (i_this->field_0x5a0 >= 460) { - i_this->field_0x59e = 22; - i_this->field_0x5a0 = 0; - i_this->field_0x5b0.set(34800.0f, 5700.0f, -26735.0f); - i_this->field_0x5a4.set(37592.0f, 1256.0f, -24152.0f); - sp54.set(34800.0f, 5700.0f, -26735.0f); - cXyz sp84(i_this->scale.x, i_this->scale.x, i_this->scale.x); - dComIfGp_particle_set(0x8522, &sp54, NULL, &sp84); - dComIfGp_particle_set(0x8523, &sp54, NULL, &sp84); - i_this->field_0x5f8 = 0.0f; - ew_s1angy = 0; - } - break; - - case 22: - if (i_this->field_0x5a0 >= 30) { - cLib_addCalc2(&i_this->field_0x5f4, 30.0f, 0.05f, i_this->field_0x5f8 * 0.2f); - cLib_addCalc2(&i_this->field_0x5f8, 1.0f, 1.0f, 0.03f); - } - - if (i_this->field_0x5a0 == 140 && i_this->field_0x64c != 0) { - i_this->field_0x64c--; - fpcM_Search(s_s1drop2_sub,i_this); - fpcM_Search(s_s1Yangset_sub,i_this); - ew_s1angy += 0x5555; - if (i_this->field_0x64c != 0) { - i_this->field_0x5a0 += -20; - } - } - - if (i_this->field_0x5a0 == 150) { - i_this->field_0x596 = 20; - } - - if (i_this->field_0x5a0 >= 230) { - fpcM_Search(s_s1start_sub,i_this); - i_this->field_0x59e = 23; - i_this->field_0x5a0 = 0; - i_this->field_0x5b0.set(34397.0f, -180.0f, -31312.0f); - i_this->field_0x5a4.set(34218.0f, -166.0f, -31724.0f); - i_this->field_0x5f4 = 55.0f; - } - break; - - case 23: - if (i_this->field_0x5a0 >= 80) { - camera->mCamera.Reset(i_this->field_0x5b0, i_this->field_0x5a4, i_this->field_0x5f4, 0); - camera->mCamera.Start(); - camera->mCamera.SetTrimSize(0); - dComIfGp_event_reset(); - daPy_getPlayerActorClass()->cancelOriginalDemo(); - if (horseActor != NULL) { - horseActor->cancelOriginalDemo(); - } - fopAcM_delete(i_this); - } + case 0x7: + case 0x8: + case 0x9: + case 0xe: + case 0xf: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x0: + break; } if (i_this->field_0x59e != 0) { @@ -731,7 +776,7 @@ static void demo_camera(e_warpappear_class* i_this) { cXyz sp9c = i_this->field_0x5a4; sp90.y += i_this->field_0x5fc * cM_ssin(i_this->field_0x594 * 0x3200); sp9c.y += i_this->field_0x5fc * cM_ssin(i_this->field_0x594 * 0x3200); - camera->mCamera.Set(sp9c, sp90, sVar1, i_this->field_0x5f4); + camera->mCamera.Set(sp90, sp9c, sVar1, i_this->field_0x5f4); cLib_addCalc0(&i_this->field_0x5fc, 1.0f, 2.0f); i_this->field_0x5a0++; @@ -748,7 +793,8 @@ static void mtx_set(e_warpappear_class* i_this) { i_this->mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); } -/* 807D1BAC-807D1C50 00244C 00A4+00 1/0 0/0 0/0 .text daE_Warpappear_Execute__FP18e_warpappear_class */ +/* 807D1BAC-807D1C50 00244C 00A4+00 1/0 0/0 0/0 .text daE_Warpappear_Execute__FP18e_warpappear_class + */ static int daE_Warpappear_Execute(e_warpappear_class* i_this) { i_this->field_0x594++; i_this->scale.x = 20.0f; @@ -757,6 +803,7 @@ static int daE_Warpappear_Execute(e_warpappear_class* i_this) { i_this->field_0x59a[i]--; } } + action(i_this); demo_camera(i_this); mtx_set(i_this); @@ -765,12 +812,14 @@ static int daE_Warpappear_Execute(e_warpappear_class* i_this) { return 1; } -/* 807D1C50-807D1C58 0024F0 0008+00 1/0 0/0 0/0 .text daE_Warpappear_IsDelete__FP18e_warpappear_class */ +/* 807D1C50-807D1C58 0024F0 0008+00 1/0 0/0 0/0 .text + * daE_Warpappear_IsDelete__FP18e_warpappear_class */ static int daE_Warpappear_IsDelete(e_warpappear_class* i_this) { return 1; } -/* 807D1C58-807D1C8C 0024F8 0034+00 1/0 0/0 0/0 .text daE_Warpappear_Delete__FP18e_warpappear_class */ +/* 807D1C58-807D1C8C 0024F8 0034+00 1/0 0/0 0/0 .text daE_Warpappear_Delete__FP18e_warpappear_class + */ static int daE_Warpappear_Delete(e_warpappear_class* i_this) { dComIfG_resDelete(&i_this->mPhase, "Kytag04"); return 1; @@ -849,7 +898,7 @@ static int daE_Warpappear_Create(fopAc_ac_c* actor) { OS_REPORT("//////////////E_Warpappear SET NON !!\n"); return cPhs_ERROR_e; } - + OS_REPORT("//////////////E_Warpappear SET 2 !!\n"); mtx_set(i_this); } @@ -859,27 +908,25 @@ static int daE_Warpappear_Create(fopAc_ac_c* actor) { /* 807D2318-807D2338 -00001 0020+00 1/0 0/0 0/0 .data l_daE_Warpappear_Method */ static actor_method_class l_daE_Warpappear_Method = { - (process_method_func)daE_Warpappear_Create, - (process_method_func)daE_Warpappear_Delete, - (process_method_func)daE_Warpappear_Execute, - (process_method_func)daE_Warpappear_IsDelete, + (process_method_func)daE_Warpappear_Create, (process_method_func)daE_Warpappear_Delete, + (process_method_func)daE_Warpappear_Execute, (process_method_func)daE_Warpappear_IsDelete, (process_method_func)daE_Warpappear_Draw, }; /* 807D2338-807D2368 -00001 0030+00 0/0 0/0 1/0 .data g_profile_E_WAP */ extern actor_process_profile_definition g_profile_E_WAP = { - fpcLy_CURRENT_e, // mLayerID - 7, // mListID - fpcPi_CURRENT_e, // mListPrio - PROC_E_WAP, // mProcName - &g_fpcLf_Method.base, // sub_method - sizeof(e_warpappear_class), // mSize - 0, // mSizeOther - 0, // mParameters - &g_fopAc_Method.base, // sub_method - 233, // mPriority - &l_daE_Warpappear_Method, // sub_method - 0x00044000, // mStatus - fopAc_ACTOR_e, // mActorType - fopAc_CULLBOX_CUSTOM_e, // cullType + fpcLy_CURRENT_e, // mLayerID + 7, // mListID + fpcPi_CURRENT_e, // mListPrio + PROC_E_WAP, // mProcName + &g_fpcLf_Method.base, // sub_method + sizeof(e_warpappear_class), // mSize + 0, // mSizeOther + 0, // mParameters + &g_fopAc_Method.base, // sub_method + 233, // mPriority + &l_daE_Warpappear_Method, // sub_method + 0x00044000, // mStatus + fopAc_ACTOR_e, // mActorType + fopAc_CULLBOX_CUSTOM_e, // cullType };