From 1aeb2a0c542fbe873b72b18b61057e9ee6cd8f13 Mon Sep 17 00:00:00 2001 From: hatal175 Date: Thu, 18 Sep 2025 03:09:59 +0300 Subject: [PATCH] d_a_e_wb equivalent (#2667) * Some work d_a_e_wb * Match more in e_wb * d_a_e_wb equivalent --- config/GZ2E01/rels/d_a_e_rd/symbols.txt | 7 +- config/GZ2E01/rels/d_a_e_wb/symbols.txt | 5 +- include/d/actor/d_a_e_wb.h | 55 +- include/d/actor/d_a_horse.h | 13 +- include/d/d_cc_d.h | 1 + include/d/d_procname.h | 1584 +++++------ src/d/actor/d_a_e_rd.cpp | 10 +- src/d/actor/d_a_e_wb.cpp | 3307 +++++++++++++++++++---- 8 files changed, 3651 insertions(+), 1331 deletions(-) diff --git a/config/GZ2E01/rels/d_a_e_rd/symbols.txt b/config/GZ2E01/rels/d_a_e_rd/symbols.txt index ac2b249ae4f..32e71e0f29d 100644 --- a/config/GZ2E01/rels/d_a_e_rd/symbols.txt +++ b/config/GZ2E01/rels/d_a_e_rd/symbols.txt @@ -445,14 +445,17 @@ S_find = .bss:0x000000AC; // type:object size:0x2 scope:global data:2byte lbl_70_bss_AE = .bss:0x000000AE; // type:object size:0x1 data:byte @4242 = .bss:0x000000B0; // type:object size:0xC scope:local S_find_pos = .bss:0x000000BC; // type:object size:0xC scope:global align:4 data:float -lbl_70_bss_C8 = .bss:0x000000C8; // type:object size:0x1 data:byte +data_80519200 = .bss:0x000000C8; // type:object size:0x1 data:byte +data_80519201 = .bss:0x000000C9; // type:object size:0x1 data:byte target_info = .bss:0x000000CC; // type:object size:0x28 scope:global data:4byte target_info_count = .bss:0x000000F4; // type:object size:0x4 scope:global data:4byte +data_80519230 = .bss:0x000000F8; // type:object size:0x1 scope:local data:byte check_index$5284 = .bss:0x000000FC; // type:object size:0xFF scope:local rd_count = .bss:0x000001FC; // type:object size:0x4 scope:global data:4byte lbl_70_bss_200 = .bss:0x00000200; // type:object size:0x1 data:byte c_start = .bss:0x00000204; // type:object size:0x4 scope:global @11269 = .bss:0x00000208; // type:object size:0xC scope:local +init$8899 = .bss:0x00000214; // type:object size:0x1 scope:local @11272 = .bss:0x00000218; // type:object size:0xC scope:local @11273 = .bss:0x00000224; // type:object size:0xC scope:local @11274 = .bss:0x00000230; // type:object size:0xC scope:local @@ -460,9 +463,11 @@ c_start = .bss:0x00000204; // type:object size:0x4 scope:global @11276 = .bss:0x00000248; // type:object size:0xC scope:local set_pos$11268 = .bss:0x00000254; // type:object size:0x48 scope:local @11412 = .bss:0x0000029C; // type:object size:0xC scope:local +init$9041 = .bss:0x000002A8; // type:object size:0x1 scope:local @11415 = .bss:0x000002AC; // type:object size:0xC scope:local @11416 = .bss:0x000002B8; // type:object size:0xC scope:local set_pos$11411 = .bss:0x000002C4; // type:object size:0x24 scope:local +instanceCount = .bss:0x000002E8; // type:object size:0x1 scope:local sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x000002EC; // type:object size:0x4 scope:global sInstance__35JASGlobalInstance<14JASAudioThread> = .bss:0x000002F0; // type:object size:0x4 scope:global sInstance__27JASGlobalInstance<7Z2SeMgr> = .bss:0x000002F4; // type:object size:0x4 scope:global diff --git a/config/GZ2E01/rels/d_a_e_wb/symbols.txt b/config/GZ2E01/rels/d_a_e_wb/symbols.txt index e6195f0cc4b..8c9c8c94fa3 100644 --- a/config/GZ2E01/rels/d_a_e_wb/symbols.txt +++ b/config/GZ2E01/rels/d_a_e_wb/symbols.txt @@ -542,7 +542,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa lbl_244_bss_45 = .bss:0x00000045; // type:object size:0x1 data:byte lbl_244_bss_46 = .bss:0x00000046; // type:object size:0x1 data:byte lbl_244_bss_47 = .bss:0x00000047; // type:object size:0x1 data:byte -lbl_244_bss_48 = .bss:0x00000048; // type:object size:0x1 data:byte +l_HIOInit = .bss:0x00000048; // type:object size:0x1 data:byte @4435 = .bss:0x0000004C; // type:object size:0xC scope:local l_HIO = .bss:0x00000058; // type:object size:0x5C scope:global data:byte @4746 = .bss:0x000000B4; // type:object size:0xC scope:local @@ -569,13 +569,16 @@ init$3883 = .bss:0x0000024C; // type:object size:0x1 scope:local @6615 = .bss:0x00000250; // type:object size:0xC scope:local ikki2_pos$6611 = .bss:0x0000025C; // type:object size:0x18 scope:local @7515 = .bss:0x00000274; // type:object size:0xC scope:local +init$4754 = .bss:0x00000280; // type:object size:0x1 scope:local sc$7514 = .bss:0x00000284; // type:object size:0xC scope:local rd_count = .bss:0x00000290; // type:object size:0x4 scope:global data:4byte @7814 = .bss:0x00000294; // type:object size:0xC scope:local +init$5045 = .bss:0x000002A0; // type:object size:0x1 scope:local @7817 = .bss:0x000002A4; // type:object size:0xC scope:local @7818 = .bss:0x000002B0; // type:object size:0xC scope:local sh_pos$7813 = .bss:0x000002BC; // type:object size:0x24 scope:local @7820 = .bss:0x000002E0; // type:object size:0xC scope:local +init$5051 = .bss:0x000002EC; // type:object size:0x1 scope:local @7823 = .bss:0x000002F0; // type:object size:0xC scope:local @7824 = .bss:0x000002FC; // type:object size:0xC scope:local sh_posH$7819 = .bss:0x00000308; // type:object size:0x24 scope:local diff --git a/include/d/actor/d_a_e_wb.h b/include/d/actor/d_a_e_wb.h index 96a2cb9f8e3..3b70e40d384 100644 --- a/include/d/actor/d_a_e_wb.h +++ b/include/d/actor/d_a_e_wb.h @@ -119,10 +119,7 @@ public: /* 0x0690 */ s16 mActionID; /* 0x0692 */ s16 field_0x692; /* 0x0694 */ int mShadowKey; - /* 0x0698 */ s16 field_0x698; - /* 0x069A */ s16 field_0x69a; - /* 0x069C */ s16 field_0x69c; - /* 0x069E */ s16 field_0x69e; + /* 0x0698 */ s16 field_0x698[4]; /* 0x06A0 */ s16 field_0x6a0; /* 0x06A2 */ u8 field_0x6a2[0x6ae - 0x6a2]; /* 0x06AE */ csXyz field_0x6ae; @@ -131,7 +128,7 @@ public: /* 0x06B8 */ u8 field_0x6b8[0x6ba - 0x6b8]; /* 0x06BA */ s16 field_0x6ba; /* 0x06BC */ u8 field_0x6bc; - /* 0x06BD */ u8 field_0x6bd; + /* 0x06BD */ s8 field_0x6bd; /* 0x06BE */ u16 field_0x6be; /* 0x06C0 */ s8 field_0x6c0; /* 0x06C4 */ f32 field_0x6c4; @@ -147,7 +144,7 @@ public: /* 0x06DE */ s16 field_0x6de; /* 0x06E0 */ s16 field_0x6e0; /* 0x06E2 */ s16 field_0x6e2; - /* 0x06E4 */ u8 field_0x6e4; + /* 0x06E4 */ s8 field_0x6e4; /* 0x06E5 */ u8 field_0x6e5[0x6ec - 0x6e5]; /* 0x06EC */ csXyz field_0x6ec[0x1d]; /* 0x079A */ s16 field_0x79a; @@ -163,21 +160,19 @@ public: /* 0x07A8 */ f32 field_0x7a8; /* 0x07AC */ dBgS_AcchCir field_0x7ac; /* 0x07EC */ dBgS_ObjAcch mAcch; - /* 0x09C4 */ dCcD_Stts field_0x9c4; + /* 0x09C4 */ dCcD_Stts mStts; /* 0x0A00 */ dCcD_Sph field_0xa00[7]; /* 0x1288 */ dCcD_Sph field_0x1288; /* 0x13C0 */ dCcU_AtInfo field_0x13c0; /* 0x13E4 */ u8 field_0x13e4; - /* 0x13E8 */ u32 field_0x13e8; - /* 0x13EC */ u32 field_0x13ec; + /* 0x13E8 */ u32 field_0x13e8[2]; /* 0x13F0 */ u32 field_0x13f0; /* 0x13F4 */ u32 field_0x13f4; /* 0x13F8 */ u32 field_0x13f8; /* 0x13FC */ u32 field_0x13fc; /* 0x1400 */ u32 field_0x1400; /* 0x1404 */ u32 field_0x1404; - /* 0x1408 */ u32 field_0x1408; - /* 0x140C */ u32 field_0x140c; + /* 0x1408 */ u32 field_0x1408[2]; /* 0x1410 */ u32 field_0x1410; /* 0x1414 */ u32 field_0x1414; /* 0x1418 */ u32 field_0x1418; @@ -196,7 +191,7 @@ public: /* 0x1648 */ mDoExt_3DlineMat1_c field_0x1648; /* 0x1684 */ f32 field_0x1684; /* 0x1688 */ s16 field_0x1688; - /* 0x168A */ u16 field_0x168a; + /* 0x168A */ s16 field_0x168a; /* 0x168C */ f32 field_0x168c; /* 0x1690 */ f32 field_0x1690; /* 0x1694 */ u8 field_0x1694[0x169e - 0x1694]; @@ -216,7 +211,7 @@ public: /* 0x1710 */ f32 field_0x1710; /* 0x1714 */ f32 field_0x1714; /* 0x1718 */ f32 field_0x1718; - /* 0x171C */ u8 field_0x171c[0x1720 - 0x171c]; + /* 0x171C */ f32 field_0x171c; /* 0x1720 */ s8 field_0x1720; /* 0x1721 */ s8 field_0x1721; /* 0x1722 */ s8 field_0x1722; @@ -233,40 +228,6 @@ public: STATIC_ASSERT(sizeof(e_wb_class) == 0x17EC); -class daE_WB_HIO_c : public JORReflexible { -public: - /* 807D248C */ daE_WB_HIO_c(); - /* 807E20DC */ virtual ~daE_WB_HIO_c() {}; - void genMessage(JORMContext*); - - /* イノシシ - Wild Boar */ - /* 0x00 */ // vtable - /* 0x04 */ s8 mId; - /* 0x08 */ f32 base_size; // 基本サイズ - Base Size - /* 0x0C */ f32 leader_size_ratio; // リーダーサイズ比 - Leader Size Ratio - /* 0x10 */ f32 movement_speed; // 移動速度 - Movement Speed - /* 0x14 */ f32 max_speed; // 最速度 - Max Speed - /* 0x18 */ f32 cavalry_battle_max_speed; // 騎馬戦最速 - Cavalry Battle Max Speed - /* 0x1C */ f32 normal_speed_vi; - /* 0x20 */ f32 medium_speed_vi; - /* 0x24 */ f32 mMaxSpeedVi; - /* 0x28 */ f32 leader_walking_speed; // 歩き速(リ)- Leader Walking Speed - /* 0x2C */ f32 leader_max_speed; // 最速度(リ)- Leader Max Speed - /* 0x30 */ f32 leader_cavalry_battle_max_speed; // 騎馬戦最(リ)- Leader Cavalry Battle Max Speed - /* 0x34 */ f32 mSingleRiderSpeed; - /* 0x38 */ f32 player_recognition_dist; // PL認識距離 - Player Recognition Distance - /* 0x3C */ f32 mPlayerMountedMaxSpeed; - /* 0x40 */ f32 mPlayerMountedMotionPlaybackSpeed; - /* 0x44 */ s16 mPlayerMountedDashTime; - /* 0x48 */ f32 mSearchIgnoreDistance1; - /* 0x4C */ f32 mSearchIgnoreDistance2; - /* 0x50 */ f32 mGuidanceDisplayDistance1; - /* 0x54 */ f32 mGuidanceDisplayDistance2; - /* 0x58 */ u8 field_0x58; - /* 0x59 */ u8 mNoReins; -}; - -STATIC_ASSERT(sizeof(daE_WB_HIO_c) == 0x5C); #endif /* D_A_E_WB_H */ diff --git a/include/d/actor/d_a_horse.h b/include/d/actor/d_a_horse.h index 20e68c2ee4a..3bd6f1ef82f 100644 --- a/include/d/actor/d_a_horse.h +++ b/include/d/actor/d_a_horse.h @@ -135,8 +135,17 @@ public: m_demoMode = 1; } - /* 807E27F8 */ void onDemoJumpDistance(f32, f32); - /* 807E28B8 */ void changeDemoPos0(cXyz const*); + /* 807E27F8 */ void onDemoJumpDistance(f32 param_1, f32 param_2) { + field_0x1768 = param_1; + field_0x176c = param_2; + field_0x1770 = param_1; + + } + + /* 807E28B8 */ void changeDemoPos0(cXyz const* pos) { + m_demoPos0 = *pos; + } + /* 80838498 */ void coHitCallbackBoarJump(fopAc_ac_c*); /* 80838798 */ void coHitCallbackBoarHit(fopAc_ac_c*, dCcD_GObjInf*); /* 80838904 */ void coHitCallbackCowHit(fopAc_ac_c*); diff --git a/include/d/d_cc_d.h b/include/d/d_cc_d.h index a8cb913d249..1633f9b47df 100644 --- a/include/d/d_cc_d.h +++ b/include/d/d_cc_d.h @@ -50,6 +50,7 @@ enum dCcD_Material { enum dCcG_At_Spl { /* 0x0 */ dCcG_At_Spl_UNK_0, /* 0x1 */ dCcG_At_Spl_UNK_1, + /* 0x7 */ dCcG_At_Spl_UNK_7 = 0x7, /* 0xD */ dCcG_At_Spl_UNK_D = 0xD, }; diff --git a/include/d/d_procname.h b/include/d/d_procname.h index 5c37388c003..4362dc851f8 100644 --- a/include/d/d_procname.h +++ b/include/d/d_procname.h @@ -4,800 +4,800 @@ #include "global.h" enum { - PROC_OVERLAP0, - PROC_OVERLAP1, - PROC_OVERLAP3, - PROC_OVERLAP6, - PROC_OVERLAP7, - PROC_OVERLAP8, - PROC_OVERLAP9, - PROC_OVERLAP10, - PROC_OVERLAP11, - PROC_LOGO_SCENE, - PROC_MENU_SCENE, - PROC_PLAY_SCENE, - PROC_OPENING_SCENE, - PROC_NAME_SCENE, - PROC_NAMEEX_SCENE, + /* 0x000 */ PROC_OVERLAP0, + /* 0x001 */ PROC_OVERLAP1, + /* 0x002 */ PROC_OVERLAP3, + /* 0x003 */ PROC_OVERLAP6, + /* 0x004 */ PROC_OVERLAP7, + /* 0x005 */ PROC_OVERLAP8, + /* 0x006 */ PROC_OVERLAP9, + /* 0x007 */ PROC_OVERLAP10, + /* 0x008 */ PROC_OVERLAP11, + /* 0x009 */ PROC_LOGO_SCENE, + /* 0x00A */ PROC_MENU_SCENE, + /* 0x00B */ PROC_PLAY_SCENE, + /* 0x00C */ PROC_OPENING_SCENE, + /* 0x00D */ PROC_NAME_SCENE, + /* 0x00E */ PROC_NAMEEX_SCENE, #if VERSION != VERSION_WII_USA_R0 - PROC_WARNING_SCENE, - PROC_WARNING2_SCENE, + /* 0x00F */ PROC_WARNING_SCENE, + /* 0x010 */ PROC_WARNING2_SCENE, #endif - PROC_OVERLAP2, - PROC_ROOM_SCENE, - PROC_KANKYO, - PROC_ALLDIE, - PROC_ENVSE, - PROC_Obj_Swpush, - PROC_Obj_Swpush2, - PROC_Obj_Swpush5, - PROC_Tag_Gstart, - PROC_NO_CHG_ROOM, - PROC_Obj_Lv6ElevtA, - PROC_OBJ_SO, - PROC_Obj_Movebox, - PROC_Obj_SwTurn, - PROC_Obj_Lv6SwTurn, - PROC_OBJ_SEKIZOA, - PROC_OBJ_GRA, - PROC_TAG_GRA, - PROC_TAG_YAMI, - PROC_Obj_Ladder, - PROC_OBJ_BEF, - PROC_OBJ_FMOBJ, - PROC_OBJ_LBOX, - PROC_OBJ_WEB0, - PROC_OBJ_WEB1, - PROC_OBJ_CB, - PROC_OBJ_MAKI, - PROC_OBJ_BRG, - PROC_OBJ_GB, - PROC_OBJ_GM, - PROC_OBJ_TOBY, - PROC_OBJ_TP, - PROC_TREESH, - PROC_Obj_ZDoor, - PROC_Obj_Pillar, - PROC_Obj_Cdoor, - PROC_GRDWATER, - PROC_Obj_RotBridge, - PROC_Obj_MagLift, - PROC_Obj_MagLiftRot, - PROC_Obj_Lv1Cdl00, - PROC_Obj_Lv1Cdl01, - PROC_Obj_TvCdlst, - PROC_Obj_HsTarget, - PROC_Obj_HeavySw, - PROC_Obj_GoGate, - PROC_Obj_TaFence, - PROC_Obj_Saidan, - PROC_Obj_SpinLift, - PROC_Obj_BmWindow, - PROC_Obj_RfHole, - PROC_Obj_WaterPillar, - PROC_Obj_SyRock, - PROC_Obj_BsGate, - PROC_Obj_AmiShutter, - PROC_Obj_WtGate, - PROC_Obj_Lv2Candle, - PROC_Obj_TogeTrap, - PROC_Obj_RotTrap, - PROC_Obj_SwallShutter, - PROC_Obj_IceWall, - PROC_Obj_Lv5SwIce, - PROC_Obj_Lv5FBoard, - PROC_Obj_Turara, - PROC_Obj_TwGate, - PROC_Obj_Digholl, - PROC_Obj_Digpl, - PROC_Obj_TestCube, - PROC_Obj_Kshutter, - PROC_NPC_COACH, - PROC_NPC_THEB, - PROC_COACH_FIRE, - PROC_COACH2D, - PROC_BALLOON2D, - PROC_SKIP2D, - PROC_Obj_MvStair, - PROC_Obj_Cowdoor, - PROC_Obj_Swpropeller, - PROC_Obj_BoomShutter, - PROC_NPC_KS, - PROC_Obj_Hfuta, - PROC_Obj_BkDoor, - PROC_Obj_Cboard, - PROC_Obj_MGate, - PROC_Obj_Ikada, - PROC_Obj_Ice_l, - PROC_Obj_Ice_s, - PROC_Obj_E_CREATE, - PROC_Obj_Bhbridge, - PROC_Obj_Kaisou, - PROC_Obj_HHASHI, - PROC_Obj_BHASHI, - PROC_OCTHASHI, - PROC_Obj_THASHI, - PROC_Obj_CRVGATE, - PROC_Obj_CRVFENCE, - PROC_Obj_CRVHAHEN, - PROC_Obj_CRVSTEEL, - PROC_Obj_CRVLH_UP, - PROC_Obj_CRVLH_DW, - PROC_Obj_RIVERROCK, - PROC_Obj_DUST, - PROC_Obj_ITA, - PROC_Obj_Window, - PROC_Obj_MetalBox, - PROC_Obj_BBox, - PROC_OBJ_MSIMA, - PROC_OBJ_MYOGAN, - PROC_B_ZANTS, - PROC_Obj_ChainBlock, - PROC_Obj_ChainWall, - PROC_Obj_KkrGate, - PROC_Obj_RiderGate, - PROC_Obj_Onsen, - PROC_Obj_Chest, - PROC_Obj_Bemos, - PROC_Obj_RopeBridge, - PROC_Obj_WellCover, - PROC_Obj_GraveStone, - PROC_Obj_ZraRock, - PROC_Obj_GraRock, - PROC_Obj_GrzRock, - PROC_GRA_WALL, - PROC_OBJ_ONSEN_FIRE, - PROC_Obj_Lv6bemos, - PROC_Obj_Lv6bemos2, - PROC_Obj_BarDesk, - PROC_Obj_DigSnow, - PROC_Obj_Ytaihou, - PROC_Obj_Elevator, - PROC_Obj_Lv6TogeRoll, - PROC_Obj_Lv6TogeTrap, - PROC_Obj_Lv6Tenbin, - PROC_Obj_Lv6SwGate, - PROC_Obj_Lv6Lblock, - PROC_Obj_Lv6ChgGate, - PROC_Obj_Lv6FuriTrap, - PROC_Obj_Lv6SzGate, - PROC_Obj_Lv4EdShutter, - PROC_Obj_Lv4Gate, - PROC_Obj_Lv4PoGate, - PROC_Obj_Lv4SlideWall, - PROC_Obj_Lv4HsTarget, - PROC_Obj_Lv7PropY, - PROC_Obj_Lv7BsGate, - PROC_Obj_Lv8OptiLift, - PROC_Obj_Lv8KekkaiTrap, - PROC_Obj_Lv8Lift, - PROC_Obj_Lv8UdFloor, - PROC_Obj_Lv9SwShutter, - PROC_Obj_TobyHouse, - PROC_Obj_poCandle, - PROC_Obj_Lv4DigSand, - PROC_Obj_FallObj, - PROC_Obj_SmgDoor, - PROC_Obj_SwLight, - PROC_Obj_Avalanche, - PROC_Obj_MirrorScrew, - PROC_Obj_MirrorSand, - PROC_Obj_MirrorTable, - PROC_Obj_MirrorChain, - PROC_Obj_Mirror6Pole, - PROC_Obj_SwSpinner, - PROC_Obj_TDoor, - PROC_Obj_Lv7Bridge, - PROC_Obj_zrTurara, - PROC_Obj_TakaraDai, - PROC_Obj_Table, - PROC_Obj_CatDoor, - PROC_Obj_Gake, - PROC_CSTAF, - PROC_Obj_Lv4RailWall, - PROC_Obj_Lv4Sand, - PROC_Obj_PushDoor, - PROC_PushDoor, - PROC_Obj_GanonWall2, - PROC_Obj_Lv4Bridge, - PROC_Obj_Lv4Floor, - PROC_Tag_Spinner, - PROC_Obj_SwHang, - PROC_Obj_RotStair, - PROC_Obj_MagneArm, - PROC_Obj_KWheel00, - PROC_Obj_KWheel01, - PROC_Obj_Ychndlr, - PROC_Obj_PRElvtr, - PROC_Obj_MHasu, - PROC_Obj_YIblltray, - PROC_Obj_Lv6EGate, - PROC_Obj_PDtile, - PROC_Obj_PDwall, - PROC_Obj_Lv4PRwall, - PROC_Obj_KLift00, - PROC_B_OH, - PROC_Obj_Lv4Chan, - PROC_Obj_Lv3R10Saka, - PROC_Obj_Lv3Water, - PROC_Obj_Lv3Water2, - PROC_OBJ_LV3WATERB, - PROC_Obj_HBombkoya, - PROC_Obj_SZbridge, - PROC_Obj_KakarikoBrg, - PROC_Obj_OrdinBrg, - PROC_Obj_BurnBox, - PROC_Obj_KJgjs, - PROC_OBJ_IHASI, - PROC_Obj_IceBlock, - PROC_Obj_VolcanicBall, - PROC_Obj_VolcanicBomb, - PROC_Obj_VolcGnd, - PROC_Obj_KKanban, - PROC_E_PH, - PROC_NPC_ZRA, - PROC_Obj_Chandelier, - PROC_Obj_Stopper2, - PROC_DOOR20, - PROC_Tag_Hinit, - PROC_Tag_Hjump, - PROC_Tag_AJnot, - PROC_Tag_Hstop, - PROC_CANOE, - PROC_HORSE, - PROC_E_WB, - PROC_OBJ_ITO, - PROC_OBJ_SW, - PROC_SPINNER, - PROC_B_OB, - PROC_KAGO, - PROC_E_YC, - PROC_B_DS, - PROC_B_DR, - PROC_B_ZANTZ, - PROC_B_ZANT, - PROC_B_ZANTM, - PROC_TBOX, - PROC_TBOX2, - PROC_ALINK, - PROC_BOOMERANG, - PROC_MIDNA, - PROC_NPC_TK, - PROC_NPC_WORM, - PROC_PPolamp, - PROC_BkyRock, - PROC_HITOBJ, - PROC_EP, - PROC_COW, - PROC_PERU, - PROC_NI, - PROC_NPC_TKJ2, - PROC_SQ, - PROC_NPC_SQ, - PROC_DO, - PROC_NPC_NE, - PROC_NPC_TR, - PROC_NPC_LF, - PROC_OBJ_FOOD, - PROC_OBJ_KI, - PROC_OBJ_KITA, - PROC_OBJ_KEY, - PROC_OBJ_KEYHOLE, - PROC_Obj_Lv5Key, - PROC_OBJ_LP, - PROC_OBJ_TATIGI, - PROC_OBJ_ROCK, - PROC_OBJ_WFLAG, - PROC_OBJ_KAGE, - PROC_OBJ_KANBAN2, - PROC_OBJ_BALLOON, - PROC_OBJ_SUISYA, - PROC_OBJ_OILTUBO, - PROC_OBJ_ROTEN, - PROC_OBJ_SSDRINK, - PROC_OBJ_SSITEM, - PROC_TAG_SSDRINK, - PROC_TAG_BTLITM, - PROC_TAG_LV5SOUP, - PROC_TAG_MNLIGHT, - PROC_TAG_SHOPCAM, - PROC_TAG_SHOPITM, - PROC_OBJ_NDOOR, - PROC_OBJ_UDOOR, - PROC_OBJ_USAKU, - PROC_Obj_SM_DOOR, - PROC_OBJ_BED, - PROC_OBJ_BOUMATO, - PROC_OBJ_ITAMATO, - PROC_OBJ_NOUGU, - PROC_OBJ_STICK, - PROC_OBJ_MIE, - PROC_OBJ_SEKIDOOR, - PROC_OBJ_SEKIZO, - PROC_OBJ_SMTILE, - PROC_NPC_FISH, - PROC_MG_FISH, - PROC_FSHOP, - PROC_NPC_DU, - PROC_DISAPPEAR, - PROC_Obj_Mato, - PROC_Obj_Flag, - PROC_Obj_Flag2, - PROC_Obj_Flag3, - PROC_Obj_GOMIKABE, - PROC_Obj_Yousei, - PROC_Obj_Kabuto, - PROC_Obj_Cho, - PROC_Obj_Kuw, - PROC_Obj_Nan, - PROC_Obj_Dan, - PROC_Obj_Kam, - PROC_Obj_Ten, - PROC_Obj_Ari, - PROC_Obj_Kag, - PROC_Obj_Batta, - PROC_Obj_Tombo, - PROC_Obj_Kat, - PROC_Obj_H_Saku, - PROC_Obj_Yobikusa, - PROC_Obj_KazeNeko, - PROC_Obj_KznkArm, - PROC_Obj_NamePlate, - PROC_Obj_OnCloth, - PROC_Obj_LndRope, - PROC_Obj_ItaRope, - PROC_Obj_Sakuita, - PROC_Obj_Laundry, - PROC_WarpBug, - PROC_Izumi_Gate, - PROC_Obj_Fchain, - PROC_Obj_Wchain, - PROC_Tag_Attp, - PROC_Obj_Tornado, - PROC_Obj_Tornado2, - PROC_Obj_FirePillar, - PROC_Obj_FirePillar2, - PROC_Obj_InoBone, - PROC_Obj_Stopper, - PROC_Obj_MHole, - PROC_Tag_Magne, - PROC_Obj_BossWarp, - PROC_Obj_WoodPendulum, - PROC_Obj_WdStick, - PROC_Obj_StairBlock, - PROC_Obj_Geyser, - PROC_Tag_KtOnFire, - PROC_Obj_FireWood, - PROC_Obj_FireWood2, - PROC_Obj_GpTaru, - PROC_Obj_OnsenTaru, - PROC_Obj_KiPot, - PROC_TBOX_SW, - PROC_Obj_SwChain, - PROC_Obj_WoodenSword, - PROC_Obj_StoneMark, - PROC_Obj_Lv3Candle, - PROC_Tag_Lv4Candle, - PROC_Tag_Lv4CandleDm, - PROC_Obj_DamCps, - PROC_Obj_Smoke, - PROC_Obj_WaterFall, - PROC_Obj_ZoraCloth, - PROC_Obj_poFire, - PROC_Tag_poFire, - PROC_Obj_glowSphere, - PROC_Tag_LightBall, - PROC_SwLBall, - PROC_SwBall, - PROC_Obj_WaterEff, - PROC_Tag_RiverBack, - PROC_Tag_KagoFall, - PROC_Tag_Lv2PrChk, - PROC_Obj_Lv4Gear, - PROC_Obj_MasterSword, - PROC_Obj_WoodStatue, - PROC_Obj_Fan, - PROC_Obj_IceLeaf, - PROC_Obj_zrTuraraRc, - PROC_Tag_RetRoom, - PROC_Obj_WindStone, - PROC_Tag_WaraHowl, - PROC_Obj_SCannon, - PROC_Obj_SmWStone, - PROC_Obj_SCannonCrs, - PROC_Tag_SnowEff, - PROC_Tag_CstaSw, - PROC_Tag_Lv6CstaSw, - PROC_Obj_awaPlar, - PROC_Obj_poTbox, - PROC_Obj_TimeFire, - PROC_Obj_TMoon, - PROC_Obj_GanonWall, - PROC_Obj_Prop, - PROC_CSTATUE, - PROC_Obj_SwBallA, - PROC_Obj_SwBallB, - PROC_Obj_SnowSoup, - PROC_Obj_Nagaisu, - PROC_Obj_RCircle, - PROC_Obj_Picture, - PROC_Tag_SetBall, - PROC_Tag_SmkEmt, - PROC_SwTime, - PROC_Obj_HFtr, - PROC_Obj_HBarrel, - PROC_Obj_Crystal, - PROC_Obj_SCannonTen, - PROC_Obj_SwBallC, - PROC_SCENE_EXIT2, - PROC_Obj_Hata, - PROC_Obj_ToaruMaki, - PROC_Tag_AttackItem, - PROC_Tag_RmbitSw, - PROC_Obj_Sword, - PROC_Tag_Spring, - PROC_Tag_Statue, - PROC_E_AI, - PROC_E_GS, - PROC_E_GOB, - PROC_E_DD, - PROC_E_DN, - PROC_E_S1, - PROC_E_MF, - PROC_E_SG, - PROC_E_BS, - PROC_E_SF, - PROC_E_SH, - PROC_E_DF, - PROC_E_GM, - PROC_E_MD, - PROC_E_SM, - PROC_E_SM2, - PROC_E_ST, - PROC_E_ST_LINE, - PROC_E_SB, - PROC_E_TH, - PROC_E_CR, - PROC_E_CR_EGG, - PROC_E_DB, - PROC_E_DB_LEAF, - PROC_E_GA, - PROC_E_GB, - PROC_E_HB, - PROC_E_HB_LEAF, - PROC_E_HZELDA, - PROC_E_YD, - PROC_E_YH, - PROC_E_YD_LEAF, - PROC_E_HM, - PROC_E_TK, - PROC_E_TK2, - PROC_E_TK_BALL, - PROC_E_RB, - PROC_E_RD, - PROC_E_RDB, - PROC_E_RDY, - PROC_E_FM, - PROC_E_FS, - PROC_E_PM, - PROC_E_PO, - PROC_E_MB, - PROC_E_MK, - PROC_E_MM, - PROC_E_FZ, - PROC_E_ZS, - PROC_E_KK, - PROC_E_HP, - PROC_E_ZH, - PROC_E_ZM, - PROC_E_PZ, - PROC_E_FB, - PROC_E_FK, - PROC_E_MS, - PROC_E_NEST, - PROC_E_NZ, - PROC_E_BA, - PROC_E_BU, - PROC_E_BUG, - PROC_E_BEE, - PROC_E_IS, - PROC_E_KG, - PROC_E_KR, - PROC_E_SW, - PROC_E_GE, - PROC_Tag_WatchGe, - PROC_E_YM, - PROC_E_YM_TAG, - PROC_E_YMB, - PROC_Tag_FWall, - PROC_Tag_WaterFall, - PROC_E_YK, - PROC_E_YR, - PROC_E_YG, - PROC_E_HZ, - PROC_E_WS, - PROC_E_OC, - PROC_E_OT, - PROC_E_DT, - PROC_E_BG, - PROC_E_OctBg, - PROC_DR, - PROC_L7lowDr, - PROC_L7ODR, - PROC_E_TT, - PROC_E_DK, - PROC_E_VT, - PROC_E_WW, - PROC_E_GI, - PROC_B_BH, - PROC_B_BQ, - PROC_B_GM, - PROC_B_GND, - PROC_B_GO, - PROC_B_OH2, - PROC_B_YO, - PROC_B_YOI, - PROC_B_TN, - PROC_B_GG, - PROC_B_DRE, - PROC_B_MGN, - PROC_E_WAP, - PROC_ITEM, - PROC_Obj_SmallKey, - PROC_Obj_Kantera, - PROC_Obj_LifeContainer, - PROC_Obj_Shield, - PROC_Demo_Item, - PROC_ShopItem, - PROC_Obj_Drop, - PROC_OBJ_RW, - PROC_NBOMB, - PROC_TAG_CSW, - PROC_TAG_QS, - PROC_HOZELDA, - PROC_SWC00, - PROC_KNOB20, - PROC_DBDOOR, - PROC_BOSS_DOOR, - PROC_L1BOSS_DOOR, - PROC_L1MBOSS_DOOR, - PROC_L5BOSS_DOOR, - PROC_DSHUTTER, - PROC_SPIRAL_DOOR, - PROC_Tag_ChgRestart, - PROC_Tag_Restart, - PROC_ANDSW, - PROC_ANDSW2, - PROC_MYNA, - PROC_NPC_GND, - PROC_NPC_GRA, - PROC_NPC_GRC, - PROC_NPC_GRD, - PROC_NPC_GRM, - PROC_NPC_GRMC, - PROC_NPC_GRO, - PROC_NPC_GRR, - PROC_NPC_GRS, - PROC_NPC_GRZ, - PROC_NPC_YAMID, - PROC_NPC_YAMIT, - PROC_NPC_YAMIS, - PROC_NPC_BLUENS, - PROC_NPC_KAKASHI, - PROC_NPC_KDK, - PROC_NPC_ARU, - PROC_NPC_BANS, - PROC_NPC_BESU, - PROC_NPC_BOU, - PROC_NPC_BOU_S, - PROC_NPC_CLERKA, - PROC_NPC_CLERKB, - PROC_NPC_CLERKT, - PROC_NPC_WRESTLER, - PROC_Tag_Arena, - PROC_Tag_Instruction, - PROC_NPC_DOC, - PROC_NPC_GWOLF, - PROC_NPC_LEN, - PROC_NPC_LUD, - PROC_NPC_FAIRY_SEIREI, - PROC_NPC_FAIRY, - PROC_NPC_HANJO, - PROC_NPC_HENNA, - PROC_NPC_HENNA0, - PROC_NPC_HOZ, - PROC_NPC_JAGAR, - PROC_NPC_KKRI, - PROC_NPC_KN, - PROC_KN_BULLET, - PROC_NPC_KNJ, - PROC_NPC_KOLIN, - PROC_NPC_KOLINB, - PROC_NPC_KYURY, - PROC_NPC_MARO, - PROC_NPC_MIDP, - PROC_NPC_MOI, - PROC_NPC_RACA, - PROC_NPC_SARU, - PROC_NPC_SEIB, - PROC_NPC_SEIC, - PROC_NPC_SEID, - PROC_NPC_SEIRA, - PROC_NPC_SERA2, - PROC_NPC_SEIREI, - PROC_NPC_SHAMAN, - PROC_NPC_SMARO, - PROC_NPC_SOLA, - PROC_NPC_TARO, - PROC_NPC_PACHI_BESU, - PROC_NPC_PACHI_TARO, - PROC_NPC_PACHI_MARO, - PROC_TAG_PATI, - PROC_NPC_THE, - PROC_NPC_TKJ, - PROC_NPC_TKS, - PROC_NPC_TKC, - PROC_OBJ_TKS, - PROC_NPC_TOBY, - PROC_NPC_URI, - PROC_NPC_YELIA, - PROC_NPC_YKM, - PROC_NPC_YKW, - PROC_NPC_ZANB, - PROC_NPC_ZANT, - PROC_NPC_ZELDA, - PROC_NPC_ZELR, - PROC_NPC_ZELRO, - PROC_OBJ_ZRAFREEZE, - PROC_NPC_ZRC, - PROC_NPC_ZRZ, - PROC_ZRA_MARK, - PROC_MYNA2, - PROC_TAG_MYNA2, - PROC_NPC_CD3, - PROC_Tag_Schedule, - PROC_Tag_Escape, - PROC_NPC_CHAT, - PROC_NPC_SOLDIERa, - PROC_NPC_SOLDIERb, - PROC_PASSER_MNG, - PROC_NPC_PASSER, - PROC_NPC_PASSER2, - PROC_NPC_POST, - PROC_NPC_POUYA, - PROC_FORMATION_MNG, - PROC_NPC_FGUARD, - PROC_GUARD_MNG, - PROC_TAG_GUARD, - PROC_NPC_GUARD, - PROC_NPC_ASH, - PROC_NPC_ASHB, - PROC_NPC_SHAD, - PROC_NPC_RAFREL, - PROC_NPC_MOIR, - PROC_NPC_IMPAL, - PROC_NPC_SHOE, - PROC_NPC_DOORBOY, - PROC_NPC_PRAYER, - PROC_NPC_KASIHANA, - PROC_NPC_KASIKYU, - PROC_NPC_KASIMICH, - PROC_NPC_DRSOL, - PROC_NPC_CHIN, - PROC_NPC_INS, - PROC_NPC_SHOP0, - PROC_NPC_MK, - PROC_NPC_P2, - PROC_KYTAG00, - PROC_KYTAG01, - PROC_KYTAG02, - PROC_KYTAG03, - PROC_KYTAG04, - PROC_KYTAG05, - PROC_KYTAG06, - PROC_KYTAG07, - PROC_KYTAG08, - PROC_KYTAG09, - PROC_KYTAG10, - PROC_KYTAG11, - PROC_KYTAG12, - PROC_KYTAG13, - PROC_KYTAG14, - PROC_KYTAG15, - PROC_KYTAG16, - PROC_KYTAG17, - PROC_Ykgr, - PROC_TALK, - PROC_Obj_Crope, - PROC_Obj_Bombf, - PROC_Obj_BkLeaf, - PROC_Tag_Mhint, - PROC_Tag_Mmsg, - PROC_Tag_Mwait, - PROC_Tag_Mstop, - PROC_Tag_Stream, - PROC_Tag_Sppath, - PROC_Tag_Wljump, - PROC_Tag_TWGate, - PROC_Tag_Lv6Gate, - PROC_Tag_Lv7Gate, - PROC_Tag_Lv8Gate, - PROC_Tag_TheBHint, - PROC_Tag_Assist, - PROC_DEMO00, - PROC_TAG_CAMERA, - PROC_TAG_CHKPOINT, - PROC_TAG_EVENT, - PROC_TAG_EVT, - PROC_TAG_TELOP, - PROC_TAG_HOWL, - PROC_TAG_MSG, - PROC_TAG_LANTERN, - PROC_Tag_Mist, - PROC_DMIDNA, - PROC_KY_THUNDER, - PROC_VRBOX, - PROC_VRBOX2, - PROC_BG, - PROC_SET_BG_OBJ, - PROC_BG_OBJ, - PROC_MIRROR, - PROC_MOVIE_PLAYER, - PROC_TITLE, - PROC_FR, - PROC_ECONT, - PROC_MG_ROD, - PROC_E_ARROW, - PROC_BULLET, - PROC_SWHIT0, - PROC_E_TH_BALL, - PROC_TAG_EVTAREA, - PROC_TAG_EVTMSG, - PROC_TAG_KMSG, - PROC_TAG_PUSH, - PROC_E_MK_BO, - PROC_E_MM_MT, - PROC_OBJ_KBOX, - PROC_OBJ_FW, - PROC_B_GOS, - PROC_OBJ_YSTONE, - PROC_MANT, - PROC_CROD, - PROC_OBJ_PLEAF, - PROC_OBJ_KBACKET, - PROC_OBJ_YBAG, - PROC_OBJ_PUMPKIN, - PROC_OBJ_AUTOMATA, - PROC_OBJ_GADGET, - PROC_OBJ_KAGO, - PROC_Obj_Carry, - PROC_Obj_Stone, - PROC_OBJ_HB, - PROC_NPC_INKO, - PROC_BD, - PROC_Obj_Eff, - PROC_WPILLAR, - PROC_WMARK, - PROC_E_BI, - PROC_E_BI_LEAF, - PROC_START_AND_GOAL, - PROC_NPC_DF, - PROC_ARROW, - PROC_PATH_LINE, - PROC_TAG_ALLMATO, - PROC_Obj_Timer, - PROC_SCENE_EXIT, - PROC_CAMERA, - PROC_CAMERA2, - PROC_SUSPEND, - PROC_GRASS, - PROC_KYEFF, - PROC_KYEFF2, - PROC_MSG_OBJECT, - PROC_MENUWINDOW, - PROC_TIMER, - PROC_METER2, - PROC_GAMEOVER, + /* 0x011 */ PROC_OVERLAP2, + /* 0x012 */ PROC_ROOM_SCENE, + /* 0x013 */ PROC_KANKYO, + /* 0x014 */ PROC_ALLDIE, + /* 0x015 */ PROC_ENVSE, + /* 0x016 */ PROC_Obj_Swpush, + /* 0x017 */ PROC_Obj_Swpush2, + /* 0x018 */ PROC_Obj_Swpush5, + /* 0x019 */ PROC_Tag_Gstart, + /* 0x01A */ PROC_NO_CHG_ROOM, + /* 0x01B */ PROC_Obj_Lv6ElevtA, + /* 0x01C */ PROC_OBJ_SO, + /* 0x01D */ PROC_Obj_Movebox, + /* 0x01E */ PROC_Obj_SwTurn, + /* 0x01F */ PROC_Obj_Lv6SwTurn, + /* 0x020 */ PROC_OBJ_SEKIZOA, + /* 0x021 */ PROC_OBJ_GRA, + /* 0x022 */ PROC_TAG_GRA, + /* 0x023 */ PROC_TAG_YAMI, + /* 0x024 */ PROC_Obj_Ladder, + /* 0x025 */ PROC_OBJ_BEF, + /* 0x026 */ PROC_OBJ_FMOBJ, + /* 0x027 */ PROC_OBJ_LBOX, + /* 0x028 */ PROC_OBJ_WEB0, + /* 0x029 */ PROC_OBJ_WEB1, + /* 0x02A */ PROC_OBJ_CB, + /* 0x02B */ PROC_OBJ_MAKI, + /* 0x02C */ PROC_OBJ_BRG, + /* 0x02D */ PROC_OBJ_GB, + /* 0x02E */ PROC_OBJ_GM, + /* 0x02F */ PROC_OBJ_TOBY, + /* 0x030 */ PROC_OBJ_TP, + /* 0x031 */ PROC_TREESH, + /* 0x032 */ PROC_Obj_ZDoor, + /* 0x033 */ PROC_Obj_Pillar, + /* 0x034 */ PROC_Obj_Cdoor, + /* 0x035 */ PROC_GRDWATER, + /* 0x036 */ PROC_Obj_RotBridge, + /* 0x037 */ PROC_Obj_MagLift, + /* 0x038 */ PROC_Obj_MagLiftRot, + /* 0x039 */ PROC_Obj_Lv1Cdl00, + /* 0x03A */ PROC_Obj_Lv1Cdl01, + /* 0x03B */ PROC_Obj_TvCdlst, + /* 0x03C */ PROC_Obj_HsTarget, + /* 0x03D */ PROC_Obj_HeavySw, + /* 0x03E */ PROC_Obj_GoGate, + /* 0x03F */ PROC_Obj_TaFence, + /* 0x040 */ PROC_Obj_Saidan, + /* 0x041 */ PROC_Obj_SpinLift, + /* 0x042 */ PROC_Obj_BmWindow, + /* 0x043 */ PROC_Obj_RfHole, + /* 0x044 */ PROC_Obj_WaterPillar, + /* 0x045 */ PROC_Obj_SyRock, + /* 0x046 */ PROC_Obj_BsGate, + /* 0x047 */ PROC_Obj_AmiShutter, + /* 0x048 */ PROC_Obj_WtGate, + /* 0x049 */ PROC_Obj_Lv2Candle, + /* 0x04A */ PROC_Obj_TogeTrap, + /* 0x04B */ PROC_Obj_RotTrap, + /* 0x04C */ PROC_Obj_SwallShutter, + /* 0x04D */ PROC_Obj_IceWall, + /* 0x04E */ PROC_Obj_Lv5SwIce, + /* 0x04F */ PROC_Obj_Lv5FBoard, + /* 0x050 */ PROC_Obj_Turara, + /* 0x051 */ PROC_Obj_TwGate, + /* 0x052 */ PROC_Obj_Digholl, + /* 0x053 */ PROC_Obj_Digpl, + /* 0x054 */ PROC_Obj_TestCube, + /* 0x055 */ PROC_Obj_Kshutter, + /* 0x056 */ PROC_NPC_COACH, + /* 0x057 */ PROC_NPC_THEB, + /* 0x058 */ PROC_COACH_FIRE, + /* 0x059 */ PROC_COACH2D, + /* 0x05A */ PROC_BALLOON2D, + /* 0x05B */ PROC_SKIP2D, + /* 0x05C */ PROC_Obj_MvStair, + /* 0x05D */ PROC_Obj_Cowdoor, + /* 0x05E */ PROC_Obj_Swpropeller, + /* 0x05F */ PROC_Obj_BoomShutter, + /* 0x060 */ PROC_NPC_KS, + /* 0x061 */ PROC_Obj_Hfuta, + /* 0x062 */ PROC_Obj_BkDoor, + /* 0x063 */ PROC_Obj_Cboard, + /* 0x064 */ PROC_Obj_MGate, + /* 0x065 */ PROC_Obj_Ikada, + /* 0x066 */ PROC_Obj_Ice_l, + /* 0x067 */ PROC_Obj_Ice_s, + /* 0x068 */ PROC_Obj_E_CREATE, + /* 0x069 */ PROC_Obj_Bhbridge, + /* 0x06A */ PROC_Obj_Kaisou, + /* 0x06B */ PROC_Obj_HHASHI, + /* 0x06C */ PROC_Obj_BHASHI, + /* 0x06D */ PROC_OCTHASHI, + /* 0x06E */ PROC_Obj_THASHI, + /* 0x06F */ PROC_Obj_CRVGATE, + /* 0x070 */ PROC_Obj_CRVFENCE, + /* 0x071 */ PROC_Obj_CRVHAHEN, + /* 0x072 */ PROC_Obj_CRVSTEEL, + /* 0x073 */ PROC_Obj_CRVLH_UP, + /* 0x074 */ PROC_Obj_CRVLH_DW, + /* 0x075 */ PROC_Obj_RIVERROCK, + /* 0x076 */ PROC_Obj_DUST, + /* 0x077 */ PROC_Obj_ITA, + /* 0x078 */ PROC_Obj_Window, + /* 0x079 */ PROC_Obj_MetalBox, + /* 0x07A */ PROC_Obj_BBox, + /* 0x07B */ PROC_OBJ_MSIMA, + /* 0x07C */ PROC_OBJ_MYOGAN, + /* 0x07D */ PROC_B_ZANTS, + /* 0x07E */ PROC_Obj_ChainBlock, + /* 0x07F */ PROC_Obj_ChainWall, + /* 0x080 */ PROC_Obj_KkrGate, + /* 0x081 */ PROC_Obj_RiderGate, + /* 0x082 */ PROC_Obj_Onsen, + /* 0x083 */ PROC_Obj_Chest, + /* 0x084 */ PROC_Obj_Bemos, + /* 0x085 */ PROC_Obj_RopeBridge, + /* 0x086 */ PROC_Obj_WellCover, + /* 0x087 */ PROC_Obj_GraveStone, + /* 0x088 */ PROC_Obj_ZraRock, + /* 0x089 */ PROC_Obj_GraRock, + /* 0x08A */ PROC_Obj_GrzRock, + /* 0x08B */ PROC_GRA_WALL, + /* 0x08C */ PROC_OBJ_ONSEN_FIRE, + /* 0x08D */ PROC_Obj_Lv6bemos, + /* 0x08E */ PROC_Obj_Lv6bemos2, + /* 0x08F */ PROC_Obj_BarDesk, + /* 0x090 */ PROC_Obj_DigSnow, + /* 0x091 */ PROC_Obj_Ytaihou, + /* 0x092 */ PROC_Obj_Elevator, + /* 0x093 */ PROC_Obj_Lv6TogeRoll, + /* 0x094 */ PROC_Obj_Lv6TogeTrap, + /* 0x095 */ PROC_Obj_Lv6Tenbin, + /* 0x096 */ PROC_Obj_Lv6SwGate, + /* 0x097 */ PROC_Obj_Lv6Lblock, + /* 0x098 */ PROC_Obj_Lv6ChgGate, + /* 0x099 */ PROC_Obj_Lv6FuriTrap, + /* 0x09A */ PROC_Obj_Lv6SzGate, + /* 0x09B */ PROC_Obj_Lv4EdShutter, + /* 0x09C */ PROC_Obj_Lv4Gate, + /* 0x09D */ PROC_Obj_Lv4PoGate, + /* 0x09E */ PROC_Obj_Lv4SlideWall, + /* 0x09F */ PROC_Obj_Lv4HsTarget, + /* 0x0A0 */ PROC_Obj_Lv7PropY, + /* 0x0A1 */ PROC_Obj_Lv7BsGate, + /* 0x0A2 */ PROC_Obj_Lv8OptiLift, + /* 0x0A3 */ PROC_Obj_Lv8KekkaiTrap, + /* 0x0A4 */ PROC_Obj_Lv8Lift, + /* 0x0A5 */ PROC_Obj_Lv8UdFloor, + /* 0x0A6 */ PROC_Obj_Lv9SwShutter, + /* 0x0A7 */ PROC_Obj_TobyHouse, + /* 0x0A8 */ PROC_Obj_poCandle, + /* 0x0A9 */ PROC_Obj_Lv4DigSand, + /* 0x0AA */ PROC_Obj_FallObj, + /* 0x0AB */ PROC_Obj_SmgDoor, + /* 0x0AC */ PROC_Obj_SwLight, + /* 0x0AD */ PROC_Obj_Avalanche, + /* 0x0AE */ PROC_Obj_MirrorScrew, + /* 0x0AF */ PROC_Obj_MirrorSand, + /* 0x0B0 */ PROC_Obj_MirrorTable, + /* 0x0B1 */ PROC_Obj_MirrorChain, + /* 0x0B2 */ PROC_Obj_Mirror6Pole, + /* 0x0B3 */ PROC_Obj_SwSpinner, + /* 0x0B4 */ PROC_Obj_TDoor, + /* 0x0B5 */ PROC_Obj_Lv7Bridge, + /* 0x0B6 */ PROC_Obj_zrTurara, + /* 0x0B7 */ PROC_Obj_TakaraDai, + /* 0x0B8 */ PROC_Obj_Table, + /* 0x0B9 */ PROC_Obj_CatDoor, + /* 0x0BA */ PROC_Obj_Gake, + /* 0x0BB */ PROC_CSTAF, + /* 0x0BC */ PROC_Obj_Lv4RailWall, + /* 0x0BD */ PROC_Obj_Lv4Sand, + /* 0x0BE */ PROC_Obj_PushDoor, + /* 0x0BF */ PROC_PushDoor, + /* 0x0C0 */ PROC_Obj_GanonWall2, + /* 0x0C1 */ PROC_Obj_Lv4Bridge, + /* 0x0C2 */ PROC_Obj_Lv4Floor, + /* 0x0C3 */ PROC_Tag_Spinner, + /* 0x0C4 */ PROC_Obj_SwHang, + /* 0x0C5 */ PROC_Obj_RotStair, + /* 0x0C6 */ PROC_Obj_MagneArm, + /* 0x0C7 */ PROC_Obj_KWheel00, + /* 0x0C8 */ PROC_Obj_KWheel01, + /* 0x0C9 */ PROC_Obj_Ychndlr, + /* 0x0CA */ PROC_Obj_PRElvtr, + /* 0x0CB */ PROC_Obj_MHasu, + /* 0x0CC */ PROC_Obj_YIblltray, + /* 0x0CD */ PROC_Obj_Lv6EGate, + /* 0x0CE */ PROC_Obj_PDtile, + /* 0x0CF */ PROC_Obj_PDwall, + /* 0x0D0 */ PROC_Obj_Lv4PRwall, + /* 0x0D1 */ PROC_Obj_KLift00, + /* 0x0D2 */ PROC_B_OH, + /* 0x0D3 */ PROC_Obj_Lv4Chan, + /* 0x0D4 */ PROC_Obj_Lv3R10Saka, + /* 0x0D5 */ PROC_Obj_Lv3Water, + /* 0x0D6 */ PROC_Obj_Lv3Water2, + /* 0x0D7 */ PROC_OBJ_LV3WATERB, + /* 0x0D8 */ PROC_Obj_HBombkoya, + /* 0x0D9 */ PROC_Obj_SZbridge, + /* 0x0DA */ PROC_Obj_KakarikoBrg, + /* 0x0DB */ PROC_Obj_OrdinBrg, + /* 0x0DC */ PROC_Obj_BurnBox, + /* 0x0DD */ PROC_Obj_KJgjs, + /* 0x0DE */ PROC_OBJ_IHASI, + /* 0x0DF */ PROC_Obj_IceBlock, + /* 0x0E0 */ PROC_Obj_VolcanicBall, + /* 0x0E1 */ PROC_Obj_VolcanicBomb, + /* 0x0E2 */ PROC_Obj_VolcGnd, + /* 0x0E3 */ PROC_Obj_KKanban, + /* 0x0E4 */ PROC_E_PH, + /* 0x0E5 */ PROC_NPC_ZRA, + /* 0x0E6 */ PROC_Obj_Chandelier, + /* 0x0E7 */ PROC_Obj_Stopper2, + /* 0x0E8 */ PROC_DOOR20, + /* 0x0E9 */ PROC_Tag_Hinit, + /* 0x0EA */ PROC_Tag_Hjump, + /* 0x0EB */ PROC_Tag_AJnot, + /* 0x0EC */ PROC_Tag_Hstop, + /* 0x0ED */ PROC_CANOE, + /* 0x0EE */ PROC_HORSE, + /* 0x0EF */ PROC_E_WB, + /* 0x0F0 */ PROC_OBJ_ITO, + /* 0x0F1 */ PROC_OBJ_SW, + /* 0x0F2 */ PROC_SPINNER, + /* 0x0F3 */ PROC_B_OB, + /* 0x0F4 */ PROC_KAGO, + /* 0x0F5 */ PROC_E_YC, + /* 0x0F6 */ PROC_B_DS, + /* 0x0F7 */ PROC_B_DR, + /* 0x0F8 */ PROC_B_ZANTZ, + /* 0x0F9 */ PROC_B_ZANT, + /* 0x0FA */ PROC_B_ZANTM, + /* 0x0FB */ PROC_TBOX, + /* 0x0FC */ PROC_TBOX2, + /* 0x0FD */ PROC_ALINK, + /* 0x0FE */ PROC_BOOMERANG, + /* 0x0FF */ PROC_MIDNA, + /* 0x100 */ PROC_NPC_TK, + /* 0x101 */ PROC_NPC_WORM, + /* 0x102 */ PROC_PPolamp, + /* 0x103 */ PROC_BkyRock, + /* 0x104 */ PROC_HITOBJ, + /* 0x105 */ PROC_EP, + /* 0x106 */ PROC_COW, + /* 0x107 */ PROC_PERU, + /* 0x108 */ PROC_NI, + /* 0x109 */ PROC_NPC_TKJ2, + /* 0x10A */ PROC_SQ, + /* 0x10B */ PROC_NPC_SQ, + /* 0x10C */ PROC_DO, + /* 0x10D */ PROC_NPC_NE, + /* 0x10E */ PROC_NPC_TR, + /* 0x10F */ PROC_NPC_LF, + /* 0x110 */ PROC_OBJ_FOOD, + /* 0x111 */ PROC_OBJ_KI, + /* 0x112 */ PROC_OBJ_KITA, + /* 0x113 */ PROC_OBJ_KEY, + /* 0x114 */ PROC_OBJ_KEYHOLE, + /* 0x115 */ PROC_Obj_Lv5Key, + /* 0x116 */ PROC_OBJ_LP, + /* 0x117 */ PROC_OBJ_TATIGI, + /* 0x118 */ PROC_OBJ_ROCK, + /* 0x119 */ PROC_OBJ_WFLAG, + /* 0x11A */ PROC_OBJ_KAGE, + /* 0x11B */ PROC_OBJ_KANBAN2, + /* 0x11C */ PROC_OBJ_BALLOON, + /* 0x11D */ PROC_OBJ_SUISYA, + /* 0x11E */ PROC_OBJ_OILTUBO, + /* 0x11F */ PROC_OBJ_ROTEN, + /* 0x120 */ PROC_OBJ_SSDRINK, + /* 0x121 */ PROC_OBJ_SSITEM, + /* 0x122 */ PROC_TAG_SSDRINK, + /* 0x123 */ PROC_TAG_BTLITM, + /* 0x124 */ PROC_TAG_LV5SOUP, + /* 0x125 */ PROC_TAG_MNLIGHT, + /* 0x126 */ PROC_TAG_SHOPCAM, + /* 0x127 */ PROC_TAG_SHOPITM, + /* 0x128 */ PROC_OBJ_NDOOR, + /* 0x129 */ PROC_OBJ_UDOOR, + /* 0x12A */ PROC_OBJ_USAKU, + /* 0x12B */ PROC_Obj_SM_DOOR, + /* 0x12C */ PROC_OBJ_BED, + /* 0x12D */ PROC_OBJ_BOUMATO, + /* 0x12E */ PROC_OBJ_ITAMATO, + /* 0x12F */ PROC_OBJ_NOUGU, + /* 0x130 */ PROC_OBJ_STICK, + /* 0x131 */ PROC_OBJ_MIE, + /* 0x132 */ PROC_OBJ_SEKIDOOR, + /* 0x133 */ PROC_OBJ_SEKIZO, + /* 0x134 */ PROC_OBJ_SMTILE, + /* 0x135 */ PROC_NPC_FISH, + /* 0x136 */ PROC_MG_FISH, + /* 0x137 */ PROC_FSHOP, + /* 0x138 */ PROC_NPC_DU, + /* 0x139 */ PROC_DISAPPEAR, + /* 0x13A */ PROC_Obj_Mato, + /* 0x13B */ PROC_Obj_Flag, + /* 0x13C */ PROC_Obj_Flag2, + /* 0x13D */ PROC_Obj_Flag3, + /* 0x13E */ PROC_Obj_GOMIKABE, + /* 0x13F */ PROC_Obj_Yousei, + /* 0x140 */ PROC_Obj_Kabuto, + /* 0x141 */ PROC_Obj_Cho, + /* 0x142 */ PROC_Obj_Kuw, + /* 0x143 */ PROC_Obj_Nan, + /* 0x144 */ PROC_Obj_Dan, + /* 0x145 */ PROC_Obj_Kam, + /* 0x146 */ PROC_Obj_Ten, + /* 0x147 */ PROC_Obj_Ari, + /* 0x148 */ PROC_Obj_Kag, + /* 0x149 */ PROC_Obj_Batta, + /* 0x14A */ PROC_Obj_Tombo, + /* 0x14B */ PROC_Obj_Kat, + /* 0x14C */ PROC_Obj_H_Saku, + /* 0x14D */ PROC_Obj_Yobikusa, + /* 0x14E */ PROC_Obj_KazeNeko, + /* 0x14F */ PROC_Obj_KznkArm, + /* 0x150 */ PROC_Obj_NamePlate, + /* 0x151 */ PROC_Obj_OnCloth, + /* 0x152 */ PROC_Obj_LndRope, + /* 0x153 */ PROC_Obj_ItaRope, + /* 0x154 */ PROC_Obj_Sakuita, + /* 0x155 */ PROC_Obj_Laundry, + /* 0x156 */ PROC_WarpBug, + /* 0x157 */ PROC_Izumi_Gate, + /* 0x158 */ PROC_Obj_Fchain, + /* 0x159 */ PROC_Obj_Wchain, + /* 0x15A */ PROC_Tag_Attp, + /* 0x15B */ PROC_Obj_Tornado, + /* 0x15C */ PROC_Obj_Tornado2, + /* 0x15D */ PROC_Obj_FirePillar, + /* 0x15E */ PROC_Obj_FirePillar2, + /* 0x15F */ PROC_Obj_InoBone, + /* 0x160 */ PROC_Obj_Stopper, + /* 0x161 */ PROC_Obj_MHole, + /* 0x162 */ PROC_Tag_Magne, + /* 0x163 */ PROC_Obj_BossWarp, + /* 0x164 */ PROC_Obj_WoodPendulum, + /* 0x165 */ PROC_Obj_WdStick, + /* 0x166 */ PROC_Obj_StairBlock, + /* 0x167 */ PROC_Obj_Geyser, + /* 0x168 */ PROC_Tag_KtOnFire, + /* 0x169 */ PROC_Obj_FireWood, + /* 0x16A */ PROC_Obj_FireWood2, + /* 0x16B */ PROC_Obj_GpTaru, + /* 0x16C */ PROC_Obj_OnsenTaru, + /* 0x16D */ PROC_Obj_KiPot, + /* 0x16E */ PROC_TBOX_SW, + /* 0x16F */ PROC_Obj_SwChain, + /* 0x170 */ PROC_Obj_WoodenSword, + /* 0x171 */ PROC_Obj_StoneMark, + /* 0x172 */ PROC_Obj_Lv3Candle, + /* 0x173 */ PROC_Tag_Lv4Candle, + /* 0x174 */ PROC_Tag_Lv4CandleDm, + /* 0x175 */ PROC_Obj_DamCps, + /* 0x176 */ PROC_Obj_Smoke, + /* 0x177 */ PROC_Obj_WaterFall, + /* 0x178 */ PROC_Obj_ZoraCloth, + /* 0x179 */ PROC_Obj_poFire, + /* 0x17A */ PROC_Tag_poFire, + /* 0x17B */ PROC_Obj_glowSphere, + /* 0x17C */ PROC_Tag_LightBall, + /* 0x17D */ PROC_SwLBall, + /* 0x17E */ PROC_SwBall, + /* 0x17F */ PROC_Obj_WaterEff, + /* 0x180 */ PROC_Tag_RiverBack, + /* 0x181 */ PROC_Tag_KagoFall, + /* 0x182 */ PROC_Tag_Lv2PrChk, + /* 0x183 */ PROC_Obj_Lv4Gear, + /* 0x184 */ PROC_Obj_MasterSword, + /* 0x185 */ PROC_Obj_WoodStatue, + /* 0x186 */ PROC_Obj_Fan, + /* 0x187 */ PROC_Obj_IceLeaf, + /* 0x188 */ PROC_Obj_zrTuraraRc, + /* 0x189 */ PROC_Tag_RetRoom, + /* 0x18A */ PROC_Obj_WindStone, + /* 0x18B */ PROC_Tag_WaraHowl, + /* 0x18C */ PROC_Obj_SCannon, + /* 0x18D */ PROC_Obj_SmWStone, + /* 0x18E */ PROC_Obj_SCannonCrs, + /* 0x18F */ PROC_Tag_SnowEff, + /* 0x190 */ PROC_Tag_CstaSw, + /* 0x191 */ PROC_Tag_Lv6CstaSw, + /* 0x192 */ PROC_Obj_awaPlar, + /* 0x193 */ PROC_Obj_poTbox, + /* 0x194 */ PROC_Obj_TimeFire, + /* 0x195 */ PROC_Obj_TMoon, + /* 0x196 */ PROC_Obj_GanonWall, + /* 0x197 */ PROC_Obj_Prop, + /* 0x198 */ PROC_CSTATUE, + /* 0x199 */ PROC_Obj_SwBallA, + /* 0x19A */ PROC_Obj_SwBallB, + /* 0x19B */ PROC_Obj_SnowSoup, + /* 0x19C */ PROC_Obj_Nagaisu, + /* 0x19D */ PROC_Obj_RCircle, + /* 0x19E */ PROC_Obj_Picture, + /* 0x19F */ PROC_Tag_SetBall, + /* 0x1A0 */ PROC_Tag_SmkEmt, + /* 0x1A1 */ PROC_SwTime, + /* 0x1A2 */ PROC_Obj_HFtr, + /* 0x1A3 */ PROC_Obj_HBarrel, + /* 0x1A4 */ PROC_Obj_Crystal, + /* 0x1A5 */ PROC_Obj_SCannonTen, + /* 0x1A6 */ PROC_Obj_SwBallC, + /* 0x1A7 */ PROC_SCENE_EXIT2, + /* 0x1A8 */ PROC_Obj_Hata, + /* 0x1A9 */ PROC_Obj_ToaruMaki, + /* 0x1AA */ PROC_Tag_AttackItem, + /* 0x1AB */ PROC_Tag_RmbitSw, + /* 0x1AC */ PROC_Obj_Sword, + /* 0x1AD */ PROC_Tag_Spring, + /* 0x1AE */ PROC_Tag_Statue, + /* 0x1AF */ PROC_E_AI, + /* 0x1B0 */ PROC_E_GS, + /* 0x1B1 */ PROC_E_GOB, + /* 0x1B2 */ PROC_E_DD, + /* 0x1B3 */ PROC_E_DN, + /* 0x1B4 */ PROC_E_S1, + /* 0x1B5 */ PROC_E_MF, + /* 0x1B6 */ PROC_E_SG, + /* 0x1B7 */ PROC_E_BS, + /* 0x1B8 */ PROC_E_SF, + /* 0x1B9 */ PROC_E_SH, + /* 0x1BA */ PROC_E_DF, + /* 0x1BB */ PROC_E_GM, + /* 0x1BC */ PROC_E_MD, + /* 0x1BD */ PROC_E_SM, + /* 0x1BE */ PROC_E_SM2, + /* 0x1BF */ PROC_E_ST, + /* 0x1C0 */ PROC_E_ST_LINE, + /* 0x1C1 */ PROC_E_SB, + /* 0x1C2 */ PROC_E_TH, + /* 0x1C3 */ PROC_E_CR, + /* 0x1C4 */ PROC_E_CR_EGG, + /* 0x1C5 */ PROC_E_DB, + /* 0x1C6 */ PROC_E_DB_LEAF, + /* 0x1C7 */ PROC_E_GA, + /* 0x1C8 */ PROC_E_GB, + /* 0x1C9 */ PROC_E_HB, + /* 0x1CA */ PROC_E_HB_LEAF, + /* 0x1CB */ PROC_E_HZELDA, + /* 0x1CC */ PROC_E_YD, + /* 0x1CD */ PROC_E_YH, + /* 0x1CE */ PROC_E_YD_LEAF, + /* 0x1CF */ PROC_E_HM, + /* 0x1D0 */ PROC_E_TK, + /* 0x1D1 */ PROC_E_TK2, + /* 0x1D2 */ PROC_E_TK_BALL, + /* 0x1D3 */ PROC_E_RB, + /* 0x1D4 */ PROC_E_RD, + /* 0x1D5 */ PROC_E_RDB, + /* 0x1D6 */ PROC_E_RDY, + /* 0x1D7 */ PROC_E_FM, + /* 0x1D8 */ PROC_E_FS, + /* 0x1D9 */ PROC_E_PM, + /* 0x1DA */ PROC_E_PO, + /* 0x1DB */ PROC_E_MB, + /* 0x1DC */ PROC_E_MK, + /* 0x1DD */ PROC_E_MM, + /* 0x1DE */ PROC_E_FZ, + /* 0x1DF */ PROC_E_ZS, + /* 0x1E0 */ PROC_E_KK, + /* 0x1E1 */ PROC_E_HP, + /* 0x1E2 */ PROC_E_ZH, + /* 0x1E3 */ PROC_E_ZM, + /* 0x1E4 */ PROC_E_PZ, + /* 0x1E5 */ PROC_E_FB, + /* 0x1E6 */ PROC_E_FK, + /* 0x1E7 */ PROC_E_MS, + /* 0x1E8 */ PROC_E_NEST, + /* 0x1E9 */ PROC_E_NZ, + /* 0x1EA */ PROC_E_BA, + /* 0x1EB */ PROC_E_BU, + /* 0x1EC */ PROC_E_BUG, + /* 0x1ED */ PROC_E_BEE, + /* 0x1EE */ PROC_E_IS, + /* 0x1EF */ PROC_E_KG, + /* 0x1F0 */ PROC_E_KR, + /* 0x1F1 */ PROC_E_SW, + /* 0x1F2 */ PROC_E_GE, + /* 0x1F3 */ PROC_Tag_WatchGe, + /* 0x1F4 */ PROC_E_YM, + /* 0x1F5 */ PROC_E_YM_TAG, + /* 0x1F6 */ PROC_E_YMB, + /* 0x1F7 */ PROC_Tag_FWall, + /* 0x1F8 */ PROC_Tag_WaterFall, + /* 0x1F9 */ PROC_E_YK, + /* 0x1FA */ PROC_E_YR, + /* 0x1FB */ PROC_E_YG, + /* 0x1FC */ PROC_E_HZ, + /* 0x1FD */ PROC_E_WS, + /* 0x1FE */ PROC_E_OC, + /* 0x1FF */ PROC_E_OT, + /* 0x200 */ PROC_E_DT, + /* 0x201 */ PROC_E_BG, + /* 0x202 */ PROC_E_OctBg, + /* 0x203 */ PROC_DR, + /* 0x204 */ PROC_L7lowDr, + /* 0x205 */ PROC_L7ODR, + /* 0x206 */ PROC_E_TT, + /* 0x207 */ PROC_E_DK, + /* 0x208 */ PROC_E_VT, + /* 0x209 */ PROC_E_WW, + /* 0x20A */ PROC_E_GI, + /* 0x20B */ PROC_B_BH, + /* 0x20C */ PROC_B_BQ, + /* 0x20D */ PROC_B_GM, + /* 0x20E */ PROC_B_GND, + /* 0x20F */ PROC_B_GO, + /* 0x210 */ PROC_B_OH2, + /* 0x211 */ PROC_B_YO, + /* 0x212 */ PROC_B_YOI, + /* 0x213 */ PROC_B_TN, + /* 0x214 */ PROC_B_GG, + /* 0x215 */ PROC_B_DRE, + /* 0x216 */ PROC_B_MGN, + /* 0x217 */ PROC_E_WAP, + /* 0x218 */ PROC_ITEM, + /* 0x219 */ PROC_Obj_SmallKey, + /* 0x21A */ PROC_Obj_Kantera, + /* 0x21B */ PROC_Obj_LifeContainer, + /* 0x21C */ PROC_Obj_Shield, + /* 0x21D */ PROC_Demo_Item, + /* 0x21E */ PROC_ShopItem, + /* 0x21F */ PROC_Obj_Drop, + /* 0x220 */ PROC_OBJ_RW, + /* 0x221 */ PROC_NBOMB, + /* 0x222 */ PROC_TAG_CSW, + /* 0x223 */ PROC_TAG_QS, + /* 0x224 */ PROC_HOZELDA, + /* 0x225 */ PROC_SWC00, + /* 0x226 */ PROC_KNOB20, + /* 0x227 */ PROC_DBDOOR, + /* 0x228 */ PROC_BOSS_DOOR, + /* 0x229 */ PROC_L1BOSS_DOOR, + /* 0x22A */ PROC_L1MBOSS_DOOR, + /* 0x22B */ PROC_L5BOSS_DOOR, + /* 0x22C */ PROC_DSHUTTER, + /* 0x22D */ PROC_SPIRAL_DOOR, + /* 0x22E */ PROC_Tag_ChgRestart, + /* 0x22F */ PROC_Tag_Restart, + /* 0x230 */ PROC_ANDSW, + /* 0x231 */ PROC_ANDSW2, + /* 0x232 */ PROC_MYNA, + /* 0x233 */ PROC_NPC_GND, + /* 0x234 */ PROC_NPC_GRA, + /* 0x235 */ PROC_NPC_GRC, + /* 0x236 */ PROC_NPC_GRD, + /* 0x237 */ PROC_NPC_GRM, + /* 0x238 */ PROC_NPC_GRMC, + /* 0x239 */ PROC_NPC_GRO, + /* 0x23A */ PROC_NPC_GRR, + /* 0x23B */ PROC_NPC_GRS, + /* 0x23C */ PROC_NPC_GRZ, + /* 0x23D */ PROC_NPC_YAMID, + /* 0x23E */ PROC_NPC_YAMIT, + /* 0x23F */ PROC_NPC_YAMIS, + /* 0x240 */ PROC_NPC_BLUENS, + /* 0x241 */ PROC_NPC_KAKASHI, + /* 0x242 */ PROC_NPC_KDK, + /* 0x243 */ PROC_NPC_ARU, + /* 0x244 */ PROC_NPC_BANS, + /* 0x245 */ PROC_NPC_BESU, + /* 0x246 */ PROC_NPC_BOU, + /* 0x247 */ PROC_NPC_BOU_S, + /* 0x248 */ PROC_NPC_CLERKA, + /* 0x249 */ PROC_NPC_CLERKB, + /* 0x24A */ PROC_NPC_CLERKT, + /* 0x24B */ PROC_NPC_WRESTLER, + /* 0x24C */ PROC_Tag_Arena, + /* 0x24D */ PROC_Tag_Instruction, + /* 0x24E */ PROC_NPC_DOC, + /* 0x24F */ PROC_NPC_GWOLF, + /* 0x250 */ PROC_NPC_LEN, + /* 0x251 */ PROC_NPC_LUD, + /* 0x252 */ PROC_NPC_FAIRY_SEIREI, + /* 0x253 */ PROC_NPC_FAIRY, + /* 0x254 */ PROC_NPC_HANJO, + /* 0x255 */ PROC_NPC_HENNA, + /* 0x256 */ PROC_NPC_HENNA0, + /* 0x257 */ PROC_NPC_HOZ, + /* 0x258 */ PROC_NPC_JAGAR, + /* 0x259 */ PROC_NPC_KKRI, + /* 0x25A */ PROC_NPC_KN, + /* 0x25B */ PROC_KN_BULLET, + /* 0x25C */ PROC_NPC_KNJ, + /* 0x25D */ PROC_NPC_KOLIN, + /* 0x25E */ PROC_NPC_KOLINB, + /* 0x25F */ PROC_NPC_KYURY, + /* 0x260 */ PROC_NPC_MARO, + /* 0x261 */ PROC_NPC_MIDP, + /* 0x262 */ PROC_NPC_MOI, + /* 0x263 */ PROC_NPC_RACA, + /* 0x264 */ PROC_NPC_SARU, + /* 0x265 */ PROC_NPC_SEIB, + /* 0x266 */ PROC_NPC_SEIC, + /* 0x267 */ PROC_NPC_SEID, + /* 0x268 */ PROC_NPC_SEIRA, + /* 0x269 */ PROC_NPC_SERA2, + /* 0x26A */ PROC_NPC_SEIREI, + /* 0x26B */ PROC_NPC_SHAMAN, + /* 0x26C */ PROC_NPC_SMARO, + /* 0x26D */ PROC_NPC_SOLA, + /* 0x26E */ PROC_NPC_TARO, + /* 0x26F */ PROC_NPC_PACHI_BESU, + /* 0x270 */ PROC_NPC_PACHI_TARO, + /* 0x271 */ PROC_NPC_PACHI_MARO, + /* 0x272 */ PROC_TAG_PATI, + /* 0x273 */ PROC_NPC_THE, + /* 0x274 */ PROC_NPC_TKJ, + /* 0x275 */ PROC_NPC_TKS, + /* 0x276 */ PROC_NPC_TKC, + /* 0x277 */ PROC_OBJ_TKS, + /* 0x278 */ PROC_NPC_TOBY, + /* 0x279 */ PROC_NPC_URI, + /* 0x27A */ PROC_NPC_YELIA, + /* 0x27B */ PROC_NPC_YKM, + /* 0x27C */ PROC_NPC_YKW, + /* 0x27D */ PROC_NPC_ZANB, + /* 0x27E */ PROC_NPC_ZANT, + /* 0x27F */ PROC_NPC_ZELDA, + /* 0x280 */ PROC_NPC_ZELR, + /* 0x281 */ PROC_NPC_ZELRO, + /* 0x282 */ PROC_OBJ_ZRAFREEZE, + /* 0x283 */ PROC_NPC_ZRC, + /* 0x284 */ PROC_NPC_ZRZ, + /* 0x285 */ PROC_ZRA_MARK, + /* 0x286 */ PROC_MYNA2, + /* 0x287 */ PROC_TAG_MYNA2, + /* 0x288 */ PROC_NPC_CD3, + /* 0x289 */ PROC_Tag_Schedule, + /* 0x28A */ PROC_Tag_Escape, + /* 0x28B */ PROC_NPC_CHAT, + /* 0x28C */ PROC_NPC_SOLDIERa, + /* 0x28D */ PROC_NPC_SOLDIERb, + /* 0x28E */ PROC_PASSER_MNG, + /* 0x28F */ PROC_NPC_PASSER, + /* 0x290 */ PROC_NPC_PASSER2, + /* 0x291 */ PROC_NPC_POST, + /* 0x292 */ PROC_NPC_POUYA, + /* 0x293 */ PROC_FORMATION_MNG, + /* 0x294 */ PROC_NPC_FGUARD, + /* 0x295 */ PROC_GUARD_MNG, + /* 0x296 */ PROC_TAG_GUARD, + /* 0x297 */ PROC_NPC_GUARD, + /* 0x298 */ PROC_NPC_ASH, + /* 0x299 */ PROC_NPC_ASHB, + /* 0x29A */ PROC_NPC_SHAD, + /* 0x29B */ PROC_NPC_RAFREL, + /* 0x29C */ PROC_NPC_MOIR, + /* 0x29D */ PROC_NPC_IMPAL, + /* 0x29E */ PROC_NPC_SHOE, + /* 0x29F */ PROC_NPC_DOORBOY, + /* 0x2A0 */ PROC_NPC_PRAYER, + /* 0x2A1 */ PROC_NPC_KASIHANA, + /* 0x2A2 */ PROC_NPC_KASIKYU, + /* 0x2A3 */ PROC_NPC_KASIMICH, + /* 0x2A4 */ PROC_NPC_DRSOL, + /* 0x2A5 */ PROC_NPC_CHIN, + /* 0x2A6 */ PROC_NPC_INS, + /* 0x2A7 */ PROC_NPC_SHOP0, + /* 0x2A8 */ PROC_NPC_MK, + /* 0x2A9 */ PROC_NPC_P2, + /* 0x2AA */ PROC_KYTAG00, + /* 0x2AB */ PROC_KYTAG01, + /* 0x2AC */ PROC_KYTAG02, + /* 0x2AD */ PROC_KYTAG03, + /* 0x2AE */ PROC_KYTAG04, + /* 0x2AF */ PROC_KYTAG05, + /* 0x2B0 */ PROC_KYTAG06, + /* 0x2B1 */ PROC_KYTAG07, + /* 0x2B2 */ PROC_KYTAG08, + /* 0x2B3 */ PROC_KYTAG09, + /* 0x2B4 */ PROC_KYTAG10, + /* 0x2B5 */ PROC_KYTAG11, + /* 0x2B6 */ PROC_KYTAG12, + /* 0x2B7 */ PROC_KYTAG13, + /* 0x2B8 */ PROC_KYTAG14, + /* 0x2B9 */ PROC_KYTAG15, + /* 0x2BA */ PROC_KYTAG16, + /* 0x2BB */ PROC_KYTAG17, + /* 0x2BC */ PROC_Ykgr, + /* 0x2BD */ PROC_TALK, + /* 0x2BE */ PROC_Obj_Crope, + /* 0x2BF */ PROC_Obj_Bombf, + /* 0x2C0 */ PROC_Obj_BkLeaf, + /* 0x2C1 */ PROC_Tag_Mhint, + /* 0x2C2 */ PROC_Tag_Mmsg, + /* 0x2C3 */ PROC_Tag_Mwait, + /* 0x2C4 */ PROC_Tag_Mstop, + /* 0x2C5 */ PROC_Tag_Stream, + /* 0x2C6 */ PROC_Tag_Sppath, + /* 0x2C7 */ PROC_Tag_Wljump, + /* 0x2C8 */ PROC_Tag_TWGate, + /* 0x2C9 */ PROC_Tag_Lv6Gate, + /* 0x2CA */ PROC_Tag_Lv7Gate, + /* 0x2CB */ PROC_Tag_Lv8Gate, + /* 0x2CC */ PROC_Tag_TheBHint, + /* 0x2CD */ PROC_Tag_Assist, + /* 0x2CE */ PROC_DEMO00, + /* 0x2CF */ PROC_TAG_CAMERA, + /* 0x2D0 */ PROC_TAG_CHKPOINT, + /* 0x2D1 */ PROC_TAG_EVENT, + /* 0x2D2 */ PROC_TAG_EVT, + /* 0x2D3 */ PROC_TAG_TELOP, + /* 0x2D4 */ PROC_TAG_HOWL, + /* 0x2D5 */ PROC_TAG_MSG, + /* 0x2D6 */ PROC_TAG_LANTERN, + /* 0x2D7 */ PROC_Tag_Mist, + /* 0x2D8 */ PROC_DMIDNA, + /* 0x2D9 */ PROC_KY_THUNDER, + /* 0x2DA */ PROC_VRBOX, + /* 0x2DB */ PROC_VRBOX2, + /* 0x2DC */ PROC_BG, + /* 0x2DD */ PROC_SET_BG_OBJ, + /* 0x2DE */ PROC_BG_OBJ, + /* 0x2DF */ PROC_MIRROR, + /* 0x2E0 */ PROC_MOVIE_PLAYER, + /* 0x2E1 */ PROC_TITLE, + /* 0x2E2 */ PROC_FR, + /* 0x2E3 */ PROC_ECONT, + /* 0x2E4 */ PROC_MG_ROD, + /* 0x2E5 */ PROC_E_ARROW, + /* 0x2E6 */ PROC_BULLET, + /* 0x2E7 */ PROC_SWHIT0, + /* 0x2E8 */ PROC_E_TH_BALL, + /* 0x2E9 */ PROC_TAG_EVTAREA, + /* 0x2EA */ PROC_TAG_EVTMSG, + /* 0x2EB */ PROC_TAG_KMSG, + /* 0x2EC */ PROC_TAG_PUSH, + /* 0x2ED */ PROC_E_MK_BO, + /* 0x2EE */ PROC_E_MM_MT, + /* 0x2EF */ PROC_OBJ_KBOX, + /* 0x2F0 */ PROC_OBJ_FW, + /* 0x2F1 */ PROC_B_GOS, + /* 0x2F2 */ PROC_OBJ_YSTONE, + /* 0x2F3 */ PROC_MANT, + /* 0x2F4 */ PROC_CROD, + /* 0x2F5 */ PROC_OBJ_PLEAF, + /* 0x2F6 */ PROC_OBJ_KBACKET, + /* 0x2F7 */ PROC_OBJ_YBAG, + /* 0x2F8 */ PROC_OBJ_PUMPKIN, + /* 0x2F9 */ PROC_OBJ_AUTOMATA, + /* 0x2FA */ PROC_OBJ_GADGET, + /* 0x2FB */ PROC_OBJ_KAGO, + /* 0x2FC */ PROC_Obj_Carry, + /* 0x2FD */ PROC_Obj_Stone, + /* 0x2FE */ PROC_OBJ_HB, + /* 0x2FF */ PROC_NPC_INKO, + /* 0x300 */ PROC_BD, + /* 0x301 */ PROC_Obj_Eff, + /* 0x302 */ PROC_WPILLAR, + /* 0x303 */ PROC_WMARK, + /* 0x304 */ PROC_E_BI, + /* 0x305 */ PROC_E_BI_LEAF, + /* 0x306 */ PROC_START_AND_GOAL, + /* 0x307 */ PROC_NPC_DF, + /* 0x308 */ PROC_ARROW, + /* 0x309 */ PROC_PATH_LINE, + /* 0x30A */ PROC_TAG_ALLMATO, + /* 0x30B */ PROC_Obj_Timer, + /* 0x30C */ PROC_SCENE_EXIT, + /* 0x30D */ PROC_CAMERA, + /* 0x30E */ PROC_CAMERA2, + /* 0x30F */ PROC_SUSPEND, + /* 0x310 */ PROC_GRASS, + /* 0x311 */ PROC_KYEFF, + /* 0x312 */ PROC_KYEFF2, + /* 0x313 */ PROC_MSG_OBJECT, + /* 0x314 */ PROC_MENUWINDOW, + /* 0x315 */ PROC_TIMER, + /* 0x316 */ PROC_METER2, + /* 0x317 */ PROC_GAMEOVER, }; #endif /* D_PROCNAME_H */ diff --git a/src/d/actor/d_a_e_rd.cpp b/src/d/actor/d_a_e_rd.cpp index 9d10f6fdca0..8c91a61223b 100644 --- a/src/d/actor/d_a_e_rd.cpp +++ b/src/d/actor/d_a_e_rd.cpp @@ -696,7 +696,7 @@ static void ride_off(e_rd_class* i_this) { } bullbo->mActionID = 7; - bullbo->field_0x69a = cM_rndF(30.0f) + 80.0f; + bullbo->field_0x698[1] = cM_rndF(30.0f) + 80.0f; } } @@ -4145,7 +4145,7 @@ static void damage_check(e_rd_class* i_this) { } uVar1 = 3; - bullbo_p->field_0x69e = 100; + bullbo_p->field_0x698[3] = 100; dComIfGs_onSaveDunSwitch(7); } else { uVar1 = 2; @@ -7011,7 +7011,7 @@ static void coach_game_actor_set(e_rd_class* i_this) { } } -static s8 gap_05_000002E8_bss; +static s8 instanceCount; /* 80516B04-805171FC 012184 06F8+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ static int useHeapInit(fopAc_ac_c* a_this) { @@ -7419,8 +7419,8 @@ static cPhs__Step daE_RD_Create(fopAc_ac_c* a_this) { i_this->field_0x1100.Set(at_sph_src); i_this->field_0x1100.SetStts(&i_this->mStts); - i_this->field_0x970 = gap_05_000002E8_bss | (u16)(cM_rndF(65535.0f)) & 0xFF00; - gap_05_000002E8_bss++; + i_this->field_0x970 = instanceCount | (u16)(cM_rndF(65535.0f)) & 0xFF00; + instanceCount++; i_this->mSound.init(&a_this->current.pos, &a_this->eyePos, 3, 1); diff --git a/src/d/actor/d_a_e_wb.cpp b/src/d/actor/d_a_e_wb.cpp index 25217b62727..98686f08d5a 100644 --- a/src/d/actor/d_a_e_wb.cpp +++ b/src/d/actor/d_a_e_wb.cpp @@ -3,18 +3,57 @@ * */ -#include "d/dolzel_rel.h" + #include "d/dolzel_rel.h" + #include "d/actor/d_a_e_rdb.h" + #include "d/actor/d_a_obj_crvgate.h" + #include "d/actor/d_a_obj_crvsteel.h" + #include "d/d_msg_object.h" #include "d/actor/d_a_e_wb.h" #include "c/c_damagereaction.h" #include "d/actor/d_a_alink.h" #include "d/actor/d_a_e_rd.h" #include "d/d_com_inf_game.h" #include "d/d_s_play.h" -#include "dol2asm.h" #include "m_Do/m_Do_controller_pad.h" #include "m_Do/m_Do_graphic.h" #include "Z2AudioLib/Z2Instances.h" + +class daE_WB_HIO_c : public JORReflexible { +public: + /* 807D248C */ daE_WB_HIO_c(); + /* 807E20DC */ virtual ~daE_WB_HIO_c() {}; + void genMessage(JORMContext*); + + /* イノシシ - Wild Boar */ + /* 0x00 */ // vtable + /* 0x04 */ s8 mId; + /* 0x08 */ f32 base_size; // 基本サイズ - Base Size + /* 0x0C */ f32 leader_size_ratio; // リーダーサイズ比 - Leader Size Ratio + /* 0x10 */ f32 movement_speed; // 移動速度 - Movement Speed + /* 0x14 */ f32 max_speed; // 最速度 - Max Speed + /* 0x18 */ f32 cavalry_battle_max_speed; // 騎馬戦最速 - Cavalry Battle Max Speed + /* 0x1C */ f32 normal_speed_vi; + /* 0x20 */ f32 medium_speed_vi; + /* 0x24 */ f32 mMaxSpeedVi; + /* 0x28 */ f32 leader_walking_speed; // 歩き速(リ)- Leader Walking Speed + /* 0x2C */ f32 leader_max_speed; // 最速度(リ)- Leader Max Speed + /* 0x30 */ f32 leader_cavalry_battle_max_speed; // 騎馬戦最(リ)- Leader Cavalry Battle Max Speed + /* 0x34 */ f32 mSingleRiderSpeed; + /* 0x38 */ f32 player_recognition_dist; // PL認識距離 - Player Recognition Distance + /* 0x3C */ f32 mPlayerMountedMaxSpeed; + /* 0x40 */ f32 mPlayerMountedMotionPlaybackSpeed; + /* 0x44 */ s16 mPlayerMountedDashTime; + /* 0x48 */ f32 mSearchIgnoreDistance1; + /* 0x4C */ f32 mSearchIgnoreDistance2; + /* 0x50 */ f32 mGuidanceDisplayDistance1; + /* 0x54 */ f32 mGuidanceDisplayDistance2; + /* 0x58 */ u8 field_0x58; + /* 0x59 */ u8 mNoReins; +}; + +STATIC_ASSERT(sizeof(daE_WB_HIO_c) == 0x5C); + static u8 const lit_3882[12] = {0}; /* 807D248C-807D2548 0000EC 00BC+00 1/1 0/0 0/0 .text __ct__12daE_WB_HIO_cFv */ @@ -142,10 +181,10 @@ static int nodeCallBack(J3DJoint* i_joint, int param_1) { /* 807E35B5 0001+00 data_807E35B5 None */ /* 807E35B6 0001+00 data_807E35B6 None */ /* 807E35B7 0001+00 data_807E35B7 None */ -static s8 lbl_244_bss_44; static s8 lbl_244_bss_45; static s8 lbl_244_bss_46; static s8 lbl_244_bss_47; +static bool l_HIOInit; /* 807E35B8-807E35BC 000048 0004+00 1/2 0/0 0/0 .bss None */ // static u8 lbl_244_bss_48; @@ -1148,8 +1187,8 @@ static void e_wb_f_run(e_wb_class* i_this) { i_this->field_0x5de = 0; uVar15 = 0.5f; } else { - if (i_this->field_0x69c == 0) { - i_this->field_0x69c = cM_rndF(10.0f) + 3.0f; + if (i_this->field_0x698[2] == 0) { + i_this->field_0x698[2] = cM_rndF(10.0f) + 3.0f; local_70.x = i_this->field_0x6c4; local_70.y = 0.0f; local_70.z = 1500.0f; @@ -1200,7 +1239,7 @@ static void e_wb_f_run(e_wb_class* i_this) { if (dVar13 < 400.0f) { i_this->mActionMode = 3; - i_this->field_0x698 = 40; + i_this->field_0x698[0] = 40; } } i_this->field_0x142c = 1; @@ -1209,11 +1248,11 @@ static void e_wb_f_run(e_wb_class* i_this) { i_this->field_0x6bd = 1; dVar16 = l_HIO.max_speed; uVar15 = 3.0f; - if (i_this->field_0x698 == 0xf) { + if (i_this->field_0x698[0] == 0xf) { i_this->field_0x6be |= 0x20; } - if (i_this->field_0x698 == 0) { + if (i_this->field_0x698[0] == 0) { i_this->mActionMode = 4; anm_init(i_this, 0x25, 3.0f, 2, 1.0f); } @@ -1277,11 +1316,11 @@ static void e_wb_b_wait(e_wb_class* i_this) { case 0: anm_init(i_this, 0x2a, 10.0f, 2, 1.0f); i_this->mActionMode = 1; - i_this->field_0x698 = cM_rndF(100.0f) + 100.0f; + i_this->field_0x698[0] = cM_rndF(100.0f) + 100.0f; i_this->field_0x6be |= 0x20; // fallthrough case 1: - if (i_this->field_0x698 == 0 && i_this->field_0x68c != 0) { + if (i_this->field_0x698[0] == 0 && i_this->field_0x68c != 0) { i_this->mActionMode = 2; } else if (dVar7 < 2000.0f) { i_this->mActionID = ACT_B_RUN; @@ -1362,7 +1401,7 @@ static void e_wb_b_run2(e_wb_class* i_this) { } i_this->mBPathIdx = local_e0; - i_this->field_0x698 = cM_rndF(100.0f) + 100.0f; + i_this->field_0x698[0] = cM_rndF(100.0f) + 100.0f; } break; @@ -1407,7 +1446,7 @@ static void e_wb_b_run2(e_wb_class* i_this) { fVar10 = l_HIO.leader_max_speed; i_this->field_0x142c = 1; - if (i_this->field_0x698 == 0 && dist < 5000.0f) { + if (i_this->field_0x698[0] == 0 && dist < 5000.0f) { anm_init(i_this, 0x25, 3.0f, 2, 1.0f); i_this->mActionMode = 3; } @@ -1545,7 +1584,7 @@ static void e_wb_b_run(e_wb_class* i_this) { i_this->mBPathIdx = local_e4; } else { - if (lbl_244_bss_44 == 1) { + if (lbl_244_bss_45 == 1) { i_this->mBPathIdx = 6; } else { i_this->mBPathIdx = 2; @@ -1637,7 +1676,7 @@ static void e_wb_b_run(e_wb_class* i_this) { if (dist > 6000.0f) { i_this->mActionMode = 3; - i_this->field_0x698 = 0xd; + i_this->field_0x698[0] = 0xd; } i_this->field_0x142c = 1; @@ -1647,11 +1686,11 @@ static void e_wb_b_run(e_wb_class* i_this) { speed_target = l_HIO.max_speed; speed_step = 3.0f; - if (i_this->field_0x698 == 10) { + if (i_this->field_0x698[0] == 10) { i_this->field_0x6be |= 0x20; } - if (i_this->field_0x698 == 0) { + if (i_this->field_0x698[0] == 0) { i_this->mActionMode = 4; anm_init(i_this, 0x25, 3.0f, 2, 1.0f); } @@ -1720,7 +1759,7 @@ static void e_wb_b_run(e_wb_class* i_this) { for (int i = 0; i < 8; i++) { cMtx_YrotS(*calc_mtx, i << 0xd); - if (lbl_244_bss_44 == 1) { + if (lbl_244_bss_45 == 1) { pos1.z = cM_rndF(3000.0f) + 12000.0f; MtxPosition(&pos1, &pos2); } else if (i_this->field_0x79e >= 4) { @@ -1834,10 +1873,10 @@ static void e_wb_b_ikki(e_wb_class* i_this) { case 0: anm_init(i_this, 0x2a, 10.0f, 2, 1.0f); i_this->mActionMode = 1; - i_this->field_0x69e = 10; + i_this->field_0x698[3] = 10; break; case 1: - if (i_this->field_0x69e == 0 && !dComIfGp_event_runCheck()) { + if (i_this->field_0x698[3] == 0 && !dComIfGp_event_runCheck()) { i_this->mActionMode = 2; i_this->mBPathIdx = 1; } @@ -2070,11 +2109,11 @@ static void e_wb_b_ikki2(e_wb_class* i_this) { case 0: anm_init(i_this, 0x2a, 10.0f, 2, 1.0f); i_this->mActionMode = 1; - i_this->field_0x69e = 10; + i_this->field_0x698[3] = 10; break; case 1: - if (i_this->field_0x69e == 0 && !dComIfGp_event_runCheck()) { + if (i_this->field_0x698[3] == 0 && !dComIfGp_event_runCheck()) { i_this->mActionMode = 2; i_this->mBPathIdx = 1; Z2GetAudioMgr()->subBgmStart(Z2BGM_FACE_OFF_BATTLE); @@ -2136,7 +2175,7 @@ static void e_wb_b_ikki2(e_wb_class* i_this) { guidance_dist = l_HIO.mGuidanceDisplayDistance1; } - if (i_this->field_0x69e == 0 && angle_diff < 0x3000 && angle_diff > -0x3000) { + if (i_this->field_0x698[3] == 0 && angle_diff < 0x3000 && angle_diff > -0x3000) { if (dist > ignore_dist) { cLib_addCalc2(&a_this->current.pos.x, player->current.pos.x, 0.05f, a_this->speedF * i_this->field_0x1690); @@ -2276,7 +2315,7 @@ static void e_wb_b_lv9_end(e_wb_class* i_this) { switch (i_this->mActionMode) { case 0: - i_this->field_0x698 = 30; + i_this->field_0x698[0] = 30; i_this->mActionMode = 1; anm_init(i_this, 0x2b, 0.0f, 2, 1.0f); a_this->current.pos.set(-7080.0f, 50.0f, -6634.0f); @@ -2287,22 +2326,22 @@ static void e_wb_b_lv9_end(e_wb_class* i_this) { i_this->mAngleTarget = a_this->current.angle.y; // fallthrough case 1: - if (i_this->field_0x698 == 0) { + if (i_this->field_0x698[0] == 0) { i_this->mActionMode = 2; - i_this->field_0x698 = NREG_S(0) + 65; + i_this->field_0x698[0] = NREG_S(0) + 65; } break; case 2: target_speed = NREG_F(12) + 15.0f; - if (i_this->field_0x698 == 0) { + if (i_this->field_0x698[0] == 0) { anm_init(i_this, 0x2a, 10.0f, 2, 1.0f); i_this->mActionMode = 3; i_this->field_0x6be |= 8; - i_this->field_0x698 = 40; + i_this->field_0x698[0] = 40; } break; case 3: - if (i_this->field_0x698 == 1) { + if (i_this->field_0x698[0] == 1) { i_this->field_0x6be |= 8; } break; @@ -2314,16 +2353,16 @@ static void e_wb_b_lv9_end(e_wb_class* i_this) { if (i_this->mpModelMorf->isStop()) { anm_init(i_this, 0x20, 2.0f, 2, 1.0f); i_this->mActionMode = 6; - i_this->field_0x698 = 80; + i_this->field_0x698[0] = 80; } break; case 6: target_speed = NREG_F(13) + 40.0f; speed_step = 5.0f; - if (i_this->field_0x698 < 30) { + if (i_this->field_0x698[0] < 30) { i_this->field_0x142c = 1; } - if (i_this->field_0x698 == 0) { + if (i_this->field_0x698[0] == 0) { local_44.x = -12682.0f - a_this->current.pos.x; local_44.z = -2701.0f - a_this->current.pos.z; i_this->mAngleTarget = cM_atan2s(local_44.x, local_44.z); @@ -2348,17 +2387,17 @@ static void e_wb_a_run(e_wb_class* i_this) { anm_init(i_this, 0x20, 5.0f, 2, 1.399999976158142f); i_this->mActionMode = 1; i_this->mAngleTarget = a_this->current.angle.y; - i_this->field_0x69a = cM_rndF(30.0f) + 80.0f; + i_this->field_0x698[1] = cM_rndF(30.0f) + 80.0f; case 1: i_this->field_0x6bd = 1; i_this->field_0x142c = 1; - if (i_this->field_0x698 == 0) { - i_this->field_0x698 = cM_rndF(30.0f) + 10.0f; + if (i_this->field_0x698[0] == 0) { + i_this->field_0x698[0] = cM_rndF(30.0f) + 10.0f; i_this->mAngleTarget += (s16)cM_rndFX(10000.0f); } - if (i_this->field_0x69a == 1 || i_this->field_0x142f == 2) { + if (i_this->field_0x698[1] == 1 || i_this->field_0x142f == 2) { i_this->mActionID = ACT_LR_DAMAGE; i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_DAMAGE, -1); i_this->mActionMode = 0; @@ -2371,100 +2410,6 @@ static void e_wb_a_run(e_wb_class* i_this) { } } - -/* 807E3000-807E3008 0000A8 0008+00 0/1 0/0 0/0 .data footd$7448 */ -static int footd[2] = { - 6, - 10, -}; - -/* 807E3008-807E3010 0000B0 0008+00 0/1 0/0 0/0 .data footd_B$7449 */ -static int footd_B[2] = { - 6, - 10, -}; - -/* 807E3010-807E3018 0000B8 0006+02 0/1 0/0 0/0 .data w_eff_name$7501 */ -static u16 w_eff_name[3] = { - dPa_RM(ID_ZI_S_ENEMY_RUNWTRA_A), - dPa_RM(ID_ZI_S_ENEMY_RUNWTRA_B), - dPa_RM(ID_ZI_S_ENEMY_RUNWTRA_C), -}; - -/* 807E3018-807E3020 0000C0 0006+02 0/1 0/0 0/0 .data w_eff_name2$7502 */ -static u16 w_eff_name2[3] = { - dPa_RM(ID_ZI_S_ENEMY_DOWNWTRA_A), - dPa_RM(ID_ZI_S_ENEMY_DOWNWTRA_B), - dPa_RM(ID_ZI_S_ENEMY_DOWNWTRA_C), -}; - -/* 807E3020-807E3028 0000C8 0008+00 0/1 0/0 0/0 .data w_eff_id$7518 */ -static u16 w_eff_id[4] = { - ID_ZI_J_DOWNWTRA_A, - ID_ZI_J_DOWNWTRA_B, - ID_ZI_J_DOWNWTRA_C, - ID_ZI_J_DOWNWTRA_D, -}; - -/* 807E323C-807E3240 0002E4 0004+00 1/1 0/0 0/0 .data key_eno$8737 */ -static u16 key_eno_8737[2] = { - dPa_RM(ID_ZM_S_KEYLIGHT00), - dPa_RM(ID_ZM_S_KEYLIGHT01), -}; - -/* 807E3240-807E3244 0002E8 0004+00 1/1 0/0 0/0 .data key_eno$8748 */ -static u16 key_eno_8748[2] = { - dPa_RM(ID_ZM_S_KEYLIGHT00), - dPa_RM(ID_ZM_S_KEYLIGHT01), -}; - -/* 807E33CC-807E33DC 000474 0010+00 1/1 0/0 0/0 .data foot_no$9903 */ -static int foot_no[4] = { - 5, - 24, - 9, - 20, -}; - -/* 807E33DC-807E33EC 000484 0010+00 1/1 0/0 0/0 .data foot_no_B$9904 */ -static int foot_no_B[4] = {5, 28, 9, 23}; - -/* 807E33EC-807E3404 000494 0018+00 0/1 0/0 0/0 .data pass_r$10268 */ -static f32 pass_r[6] = { - 0.0f, 3000.0f, 3000.0f, -100.0f, -150.0f, -100.0f, -}; - -/* 807E3404-807E341C 0004AC 0018+00 0/1 0/0 0/0 .data x_check_off$10269 */ -static f32 x_check_off[6] = { - 2300.0f, -3000.0f, 3000.0f, -300.0f, 0.0f, 300.0f, -}; - -/* 807E341C-807E345C 0004C4 0040+00 0/1 0/0 0/0 .data cc_sph_src$10277 */ -static dCcD_SrcSph cc_sph_src = { - { - {0x0, {{0x0, 0x0, 0x0}, {0x486022, 0x3}, 0x75}}, // mObj - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph - } // mSphAttr -}; - -/* 807E345C-807E349C 000504 0040+00 0/1 0/0 0/0 .data at_sph_src$10278 */ -static dCcD_SrcSph at_sph_src = { - { - {0x0, {{AT_TYPE_1000, 0x2, 0x1f}, {0x0, 0x0}, 0x0}}, // mObj - {dCcD_SE_HARD_BODY, 0x0, 0x0, 0x0, 0x0}, // mGObjAt - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 35.0f} // mSph - } // mSphAttr -}; - /* 807D8A78-807D8C3C 0066D8 01C4+00 1/1 0/0 0/0 .text e_wb_s_damage__FP10e_wb_class */ static void e_wb_s_damage(e_wb_class* i_this) { fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; @@ -2519,59 +2464,686 @@ static void e_wb_s_damage(e_wb_class* i_this) { } /* 807D8C3C-807D901C 00689C 03E0+00 1/1 0/0 0/0 .text e_wb_damage__FP10e_wb_class */ -static int e_wb_damage(e_wb_class* param_0) { - // NONMATCHING +static int e_wb_damage(e_wb_class* i_this) { + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + cXyz local_2c; + cXyz local_38; + + i_this->field_0x6a0 = 10; + BOOL local_48 = FALSE; + + switch (i_this->mActionMode) { + case 0: + dKy_Sound_set(a_this->current.pos, 100, fopAcM_GetID(a_this), 5); + anm_init(i_this, 8, 1.0f, 0, 1.0f); + i_this->mActionMode = 1; + a_this->speedF = -15.0f; + a_this->speed.y = 50.0f + cM_rndF(20.0f); + a_this->current.angle.y += (s16)cM_rndFX(3000.0f); + i_this->field_0x6be |= 0x40; + break; + + case 1: + if (i_this->mAcch.ChkGroundHit()) { + i_this->mActionMode = 2; + a_this->speedF *= 0.5f; + a_this->speed.y = 40.0f; + anm_init(i_this, 0x22, 2.0f, 0, 1.0f); + i_this->field_0x6b6 = (s16)cM_rndFX(2000.0f); + } + break; + + case 2: + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = 3; + if (cM_rndF(1.0f) < 0.5f) { + anm_init(i_this, 0xc, 2.0f, 0, 1.0f); + i_this->field_0x6e4 = 0; + } else { + anm_init(i_this, 0xd, 2.0f, 0, 1.0f); + i_this->field_0x6e4 = 1; + } + i_this->field_0x698[0] = (s16)(cM_rndF(40.0f) + 70.0f); + } + break; + + case 3: + local_48 = TRUE; + if (i_this->mpModelMorf->isStop()) { + if (i_this->mAnmID == 0xc) { + anm_init(i_this, 0x12, 3.0f, 2, 1.0f); + } else if (i_this->mAnmID == 0xd) { + anm_init(i_this, 0x13, 3.0f, 2, 1.0f); + } + } + + if (i_this->mAcch.ChkGroundHit()) { + a_this->speedF = 0.0f; + cLib_addCalcAngleS2(&i_this->field_0x6b6, 0, 1, 0x96); + } + + if (i_this->field_0x698[0] == 0 && i_this->field_0x6ae.x > -0x200) { + if (i_this->field_0x6e4 == 0) { + anm_init(i_this, 0x10, 2.0f, 0, 1.0f); + } else { + anm_init(i_this, 0x11, 2.0f, 0, 1.0f); + } + i_this->mActionMode = 4; + } + break; + + case 4: + if (i_this->mpModelMorf->isStop()) { + i_this->mActionID = ACT_WAIT; + i_this->mActionMode = 0; + i_this->field_0x6ae.x = 0; + a_this->current.angle.y += i_this->field_0x6ae.y; + a_this->shape_angle.y = a_this->current.angle.y; + i_this->field_0x6b6 = 0; + i_this->field_0x6ae.y = 0; + } + break; + } + + i_this->field_0x6ae.y += i_this->field_0x6b6; + + if (i_this->mActionMode >= 3) { + cLib_addCalcAngleS2(&i_this->field_0x6ae.x, 0, 1, 0x600); + } else { + cLib_addCalcAngleS2(&i_this->field_0x6ae.x, -0x4000, 1, 0x200); + } + + return local_48; } /* 807D901C-807D91EC 006C7C 01D0+00 1/1 0/0 0/0 .text e_wb_bg_damage__FP10e_wb_class */ -static int e_wb_bg_damage(e_wb_class* param_0) { - // NONMATCHING +static int e_wb_bg_damage(e_wb_class* i_this) { + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + cXyz local_30; + BOOL return_value = FALSE; + + i_this->field_0x6a0 = 10; + + switch (i_this->mActionMode) { + case 0: + dKy_Sound_set(a_this->current.pos, 100, fopAcM_GetID(a_this), 5); + anm_init(i_this, 5, 2.0f, 0, 1.0f); + i_this->mActionMode = 1; + a_this->speedF = 0.0f; + i_this->field_0x6be |= 0x80; + i_this->field_0x1432 = 0; + break; + + case 1: + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = 2; + anm_init(i_this, 7, 2.0f, 2, 1.0f); + i_this->field_0x698[0] = (s16)(cM_rndF(60.0f) + 150.0f); + } + break; + + case 2: + return_value = TRUE; + if (i_this->field_0x698[0] == 0) { + anm_init(i_this, 6, 3.0f, 0, 1.0f); + i_this->mActionMode = 3; + } + break; + + case 3: + if (i_this->mpModelMorf->isStop()) { + i_this->mActionID = ACT_WAIT; + i_this->mActionMode = 0; + } + break; + } + + return return_value; } /* 807D91EC-807D9608 006E4C 041C+00 1/1 0/0 0/0 .text e_wb_lr_damage__FP10e_wb_class */ -static int e_wb_lr_damage(e_wb_class* param_0) { - // NONMATCHING +static int e_wb_lr_damage(e_wb_class* i_this) { + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + cXyz local_2c; + cXyz local_38; + BOOL return_value = FALSE; + + i_this->field_0x6a0 = 10; + + switch (i_this->mActionMode) { + case 0: + { + f32 rnd = cM_rndF(1.0f); + if (rnd < 0.5f || i_this->field_0x1720 != 0) { + anm_init(i_this, 0xc, 2.0f, 0, 1.0f); + i_this->field_0x6e4 = 0; + } else { + anm_init(i_this, 0xd, 2.0f, 0, 1.0f); + i_this->field_0x6e4 = 1; + } + i_this->mActionMode = 1; + i_this->field_0x6be |= 0x40; + i_this->field_0x698[0] = (s16)(cM_rndF(60.0f) + 150.0f); + i_this->field_0x698[1] = 15; + + if (i_this->field_0x1720 != 0) { + a_this->speedF = -50.0f; + i_this->field_0x6b6 = -0x640; + } else { + i_this->field_0x6b6 = (s16)cM_rndFX(a_this->speedF * 50.0f); + } + } + break; + + case 1: + { + int frame = i_this->mpModelMorf->getFrame(); + if (frame == 10) { + i_this->field_0x1684 = 40.0f; + i_this->field_0x168a = 4000; + + if (a_this->speedF > 30.0f) { + if (i_this->field_0x6e4 == 0) { + anm_init(i_this, 0xe, 2.0f, 2, 1.0f); + } else { + anm_init(i_this, 0xf, 2.0f, 2, 1.0f); + } + i_this->mActionMode = 2; + a_this->speedF = 30.0f; + } + i_this->field_0x142e = 1; + dKy_Sound_set(a_this->current.pos, 100, fopAcM_GetID(a_this), 5); + } + + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = 3; + if (i_this->mAnmID == 0xc) { + anm_init(i_this, 0x12, 3.0f, 2, 1.0f); + } else if (i_this->mAnmID == 0xd) { + anm_init(i_this, 0x13, 3.0f, 2, 1.0f); + } + } + } + goto case3; + + case 2: + if (a_this->speedF < 5.0f) { + if (i_this->mAnmID == 14) { + anm_init(i_this, 0x12, 3.0f, 2, 1.0f); + } else if (i_this->mAnmID == 15) { + anm_init(i_this, 0x13, 3.0f, 2, 1.0f); + } + i_this->mActionMode = 3; + } + // fallthrough + + case 3: + case3: + if (i_this->field_0x698[1] == 0) { + return_value = TRUE; + } + + if (a_this->speedF > 15.0f) { + i_this->field_0x142c = 2; + } + + if (i_this->field_0x698[0] == 0 && i_this->field_0x1720 == 0) { + if (i_this->field_0x6e4 == 0) { + anm_init(i_this, 0x10, 3.0f, 0, 1.0f); + } else { + anm_init(i_this, 0x11, 3.0f, 0, 1.0f); + } + i_this->mActionMode = 4; + } + + cLib_addCalcAngleS2(&i_this->field_0x6b6, 0, 1, 100); + break; + + case 4: + if (i_this->mpModelMorf->isStop()) { + i_this->mActionID = ACT_WAIT; + i_this->mActionMode = 0; + a_this->current.angle.y += i_this->field_0x6ae.y; + a_this->shape_angle.y = a_this->current.angle.y; + i_this->field_0x6b6 = 0; + i_this->field_0x6ae.y = 0; + } + break; + } + + cLib_addCalc0(&a_this->speedF, 1.0f, 1.5f); + i_this->field_0x6ae.y += i_this->field_0x6b6; + + return return_value; } /* 807D9608-807D9698 007268 0090+00 1/1 0/0 0/0 .text e_wb_kiba_start__FP10e_wb_class */ -static void e_wb_kiba_start(e_wb_class* param_0) { - // NONMATCHING +static void e_wb_kiba_start(e_wb_class* i_this) { + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + + switch (i_this->mActionMode) { + case 0: + anm_init(i_this, 0x2a, 10.0f, 2, 1.0f); + i_this->field_0x169e = 0x1e; + i_this->mActionMode = 1; + i_this->field_0x7a2 = 1; + break; + case 1: + default: + break; + } + + cLib_addCalc2(&a_this->speedF, 0.0f, 1.0f, 5.0f); } /* 807D9698-807D98D4 0072F8 023C+00 1/1 0/0 0/0 .text e_wb_kiba_end__FP10e_wb_class */ -static void e_wb_kiba_end(e_wb_class* param_0) { - // NONMATCHING +static void e_wb_kiba_end(e_wb_class* i_this) { + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + + i_this->field_0x6a0 = 10; + + switch (i_this->mActionMode) { + case 0: + if (i_this->mAnmID != 0x20) { + anm_init(i_this, 0x20, 1.0f, 2, 1.0f); + } + i_this->mActionMode = 1; + i_this->field_0x169e = 1; + break; + + case 1: + i_this->field_0x142c = 1; + i_this->field_0x1684 = 60.0f; + i_this->field_0x168a = 5000; + + if (a_this->current.pos.x > 34000.0f && a_this->current.pos.x < 35500.0f && + a_this->current.pos.z < -14500.0f) + { + a_this->speed.y = 55.0f; + anm_init(i_this, 0x18, 2.0f, 0, 1.0f); + i_this->mActionMode = 2; + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_RDB_V_HOICK, -1); + i_this->field_0x6be |= 0x100; + } + break; + + case 2: + if (a_this->speed.y < 10.0f) { + anm_init(i_this, 0x19, 10.0f, 0, 1.0f); + i_this->mActionMode = 3; + } + break; + + case 3: + if (i_this->mAnmID == 0x19) { + if (a_this->speed.y < -30.0f || i_this->mAcch.ChkGroundHit()) { + anm_init(i_this, 0x1a, 2.0f, 0, 1.0f); + i_this->field_0x142d |= 0xc; + i_this->field_0x142e = 1; + i_this->field_0x6be |= 0x200; + } + } else if (i_this->mAnmID == 0x1a && i_this->mpModelMorf->isStop()) { + anm_init(i_this, 0x20, 2.0f, 2, 1.0f); + i_this->mActionMode = 4; + } + break; + case 4: + break; + } + + cLib_addCalc2(&a_this->speedF, 40.0f, 1.0f, 5.0f); } /* 807D98D4-807D9D44 007534 0470+00 1/1 0/0 0/0 .text damage_check__FP10e_wb_class */ -static void damage_check(e_wb_class* param_0) { - // NONMATCHING +static void damage_check(e_wb_class* i_this) { + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + + a_this->health = 100; + + if (i_this->field_0x6ba != 0) { + i_this->field_0x6ba--; + } + + for (int i = 0; i <= 2; i++) { + if (i_this->field_0xa00[i].ChkCoHit()) { + cCcD_Obj* hit_obj = i_this->field_0xa00[i].GetCoHitObj(); + fopAc_ac_c* hit_actor = hit_obj->GetAc(); + + if (!daAlink_getAlinkActorClass()->checkBoarRideOwn(a_this) && + i_this->field_0x6a0 == 0 && a_this->speedF < 1.0f && + fopAcM_GetName(hit_actor) == PROC_ALINK) { + i_this->field_0x6ba += 2; + if (i_this->field_0x6ba >= 150) { + i_this->field_0x692 = i_this->mActionID; + i_this->mActionID = ACT_S_DAMAGE; + i_this->mActionMode = 0; + i_this->field_0x6a0 = 20; + return; + } + } + + if ((lbl_244_bss_47 != 0 || lbl_244_bss_45 != 0) && + fopAcM_GetName(hit_actor) == PROC_E_WB && i_this->field_0x6a0 == 0) + { + e_wb_class* wb = (e_wb_class*)hit_actor; + if (wb->field_0x6a0 == 0 && i_this->field_0x79d == 0 && wb->field_0x79d == 0) { + u8 temp = wb->mParam2; + wb->mParam2 = i_this->mParam2; + i_this->mParam2 = temp; + i_this->field_0x6a0 = 10; + } + } + + if (i_this->field_0x79d >= 2 && a_this->speedF >= 30.0f) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_RDB_V_RUNDOWN, -1); + i_this->mZ2Ride.startCreatureSound(Z2SE_EN_BB_RUNDOWN, 0, -1); + + e_rd_class* rider = (e_rd_class*)fopAcM_SearchByID(i_this->field_0x1434); + rider->field_0x998 = 20; + } else { + if (i_this->field_0x79d == 0 || i_this->field_0x142f == 0) { + fopAc_ac_c* hit_actor = i_this->field_0xa00[i].GetCoHitObj()->GetAc(); + + if (a_this->speedF >= 20.0f) { + cCcD_Stts* hit_stts = i_this->field_0xa00[i].GetCoHitObj()->GetStts(); + u8 weight = hit_stts->GetWeightUc(); + + if (weight > 100 && + (i_this->mActionID == ACT_C_F_RUN || i_this->mActionID == ACT_B_RUN) && + hit_actor->speedF >= 20.0f) { + + cXyz pos_diff = hit_actor->current.pos - a_this->current.pos; + s16 angle = cM_atan2s(pos_diff.x, pos_diff.z) - a_this->shape_angle.y; + + if (angle < 0) { + i_this->field_0x5de = 0x1000; + a_this->current.angle.y += 0x800; + } else { + i_this->field_0x5de = -0x1000; + a_this->current.angle.y -= 0x800; + } + } + } + } + } + } + } + + i_this->mStts.Move(); + + if (i_this->field_0x6a0 == 0) { + dCcU_AtInfo at_info; + + for (int i = 0; i <= 6; i++) { + if (i_this->field_0xa00[i].ChkTgHit()) { + i_this->field_0x13c0.mpCollider = i_this->field_0xa00[i].GetTgHitObj(); + + if (i_this->field_0x79d != 0 || (daPy_getPlayerActorClass()->checkHorseRide() && + (i_this->field_0x6be & 3) != 0)) { + if (i_this->field_0x79d != 0) { + def_se_set(&i_this->mZ2Ride, i_this->field_0x13c0.mpCollider, 0x28, NULL); + } + } else { + at_power_check(&i_this->field_0x13c0); + cc_at_check(a_this, &i_this->field_0x13c0); + + if ((i_this->field_0x6be & 3) != 0) { + if (i_this->field_0x13c0.mAttackPower < 30) { + i_this->field_0x692 = i_this->mActionID; + i_this->mActionID = ACT_S_DAMAGE; + } else { + i_this->mActionID = ACT_LR_DAMAGE; + } + i_this->mActionMode = 0; + } else { + i_this->mActionID = ACT_S_DAMAGE; + i_this->mActionMode = 0; + } + } + + if (i_this->field_0x13c0.mpCollider->ChkAtType(AT_TYPE_UNK)) { + i_this->field_0x6a0 = 20; + } else { + i_this->field_0x6a0 = 10; + } + + i_this->field_0x1684 = 30.0f; + return; + } + } + } } -/* 807E37F4-807E3800 000284 000C+00 0/1 0/0 0/0 .bss sc$7514 */ -#pragma push -#pragma force_active on -static u8 sc[12]; -#pragma pop - /* 807D9D44-807DA5D8 0079A4 0894+00 1/1 0/0 0/0 .text effect_set__FP10e_wb_class */ -static void effect_set(e_wb_class* param_0) { - // NONMATCHING +static void effect_set(e_wb_class* i_this) { + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + cXyz pos; + cXyz effect_pos; + dBgS_GndChk gnd_chk; + dBgS_ObjGndChk_Spl obj_gnd_chk; + + pos = a_this->current.pos; + pos.y += 100.0f; + gnd_chk.SetPos(&pos); + obj_gnd_chk.SetPos(&pos); + + s8 is_water = false; + s8 in_water = false; + f32 ground_y = dComIfG_Bgsp().GroundCross(&gnd_chk); + if (dComIfG_Bgsp().GroundCross(&obj_gnd_chk) - ground_y > 0.0f) { + is_water = true; + } + + if (i_this->field_0x142c == 1) { + if (i_this->mpModelMorf->checkFrame(11.0f)) { + i_this->field_0x142d |= 4; + } else if (i_this->mpModelMorf->checkFrame(13.0f)) { + i_this->field_0x142d |= 8; + } + } else if (i_this->field_0x142c == 2) { + pos.set(0.0f, 0.0f, 0.0f); + J3DModel* model = i_this->mpModelMorf->getModel(); + int foot_idx = (i_this->field_0x68e & 2) >> 1; + + static int footd[2] = { + 6, + 10, + }; + + static int footd_B[2] = { + 6, + 10, + }; + + if (i_this->field_0x79d != 0) { + MTXCopy(model->getAnmMtx(footd_B[foot_idx]), *calc_mtx); + } else { + MTXCopy(model->getAnmMtx(footd[foot_idx]), *calc_mtx); + } + MtxPosition(&pos, &effect_pos); + + if (is_water) { + in_water = true; + } else if ((i_this->field_0x68e & 1) == 0) { + fopAcM_effSmokeSet2(&i_this->field_0x13e8[foot_idx], + &i_this->field_0x1408[foot_idx], &effect_pos, &a_this->shape_angle, a_this->scale.z * 2.0f, &a_this->tevStr); + } + } + + if (i_this->field_0x142d != 0) { + J3DModel* model = i_this->mpModelMorf->getModel(); + pos.set(0.0f, 0.0f, 0.0f); + + if ((i_this->field_0x142d & 1) != 0) { + MTXCopy(model->getAnmMtx(10), *calc_mtx); + MtxPosition(&pos, &effect_pos); + if (is_water) { + in_water = true; + } else { + fopAcM_effSmokeSet2(i_this->field_0x13e8 + 1, + i_this->field_0x1408 + 1, &effect_pos, &a_this->shape_angle, a_this->scale.z * 2.0f, &a_this->tevStr); + if (i_this->field_0x142c != 0) { + i_this->field_0x13fc = dComIfGp_particle_set(i_this->field_0x13fc, dPa_RM(ID_ZI_S_WBCLOD_A), + &effect_pos, &a_this->shape_angle, 0); + } + } + } + + if ((i_this->field_0x142d & 2) != 0) { + MTXCopy(model->getAnmMtx(6), *calc_mtx); + MtxPosition(&pos, &effect_pos); + if (is_water) { + in_water = true; + } else { + fopAcM_effSmokeSet2(i_this->field_0x13e8, + i_this->field_0x1408, &effect_pos, &a_this->shape_angle, a_this->scale.z * 2.0f, &a_this->tevStr); + if (i_this->field_0x142c != 0) { + i_this->field_0x13f8 = dComIfGp_particle_set(i_this->field_0x13f8, dPa_RM(ID_ZI_S_WBCLOD_A), + &effect_pos, &a_this->shape_angle, 0); + } + } + } + + if ((i_this->field_0x142d & 4) != 0) { + if (i_this->field_0x79d != 0) { + MTXCopy(model->getAnmMtx(29), *calc_mtx); + } else { + MTXCopy(model->getAnmMtx(25), *calc_mtx); + } + MtxPosition(&pos, &effect_pos); + if (is_water) { + in_water = true; + } else { + fopAcM_effSmokeSet2(&i_this->field_0x13f0, + &i_this->field_0x1410, &effect_pos, &a_this->shape_angle, a_this->scale.z * 2.0f, &a_this->tevStr); + if (i_this->field_0x142c != 0) { + i_this->field_0x1400 = dComIfGp_particle_set(i_this->field_0x1400, dPa_RM(ID_ZI_S_WBCLOD_A), + &effect_pos, &a_this->shape_angle, 0); + } + } + } + + if ((i_this->field_0x142d & 8) != 0) { + if (i_this->field_0x79d != 0) { + MTXCopy(model->getAnmMtx(24), *calc_mtx); + } else { + MTXCopy(model->getAnmMtx(21), *calc_mtx); + } + MtxPosition(&pos, &effect_pos); + if (is_water) { + in_water = true; + } else { + fopAcM_effSmokeSet2(&i_this->field_0x13f4, + &i_this->field_0x1414, &effect_pos, &a_this->shape_angle, a_this->scale.z * 2.0f, &a_this->tevStr); + if (i_this->field_0x142c != 0) { + i_this->field_0x1404 = dComIfGp_particle_set(i_this->field_0x1404, dPa_RM(ID_ZI_S_WBCLOD_A), + &effect_pos, &a_this->shape_angle, 0); + } + } + } + } + + if (i_this->field_0x142e != 0) { + if (is_water) { + in_water = true; + } else { + pos.set(0.0f, 0.0f, 0.0f); + J3DModel* model = i_this->mpModelMorf->getModel(); + MTXCopy(model->getAnmMtx(i_this->field_0x688 + 0xb), *calc_mtx); + MtxPosition(&pos, &effect_pos); + fopAcM_effSmokeSet1(&i_this->field_0x1418, + &i_this->field_0x141c, &effect_pos, NULL, a_this->scale.z * 2.0f, &a_this->tevStr, 1); + } + } + + if (in_water) { + cXyz scale(2.0f, 2.0f, 2.0f); + csXyz angle(0, 0, 0); + + static u16 w_eff_name[3] = { + dPa_RM(ID_ZI_S_ENEMY_RUNWTRA_A), + dPa_RM(ID_ZI_S_ENEMY_RUNWTRA_B), + dPa_RM(ID_ZI_S_ENEMY_RUNWTRA_C), + }; + + static u16 w_eff_name2[3] = { + dPa_RM(ID_ZI_S_ENEMY_DOWNWTRA_A), + dPa_RM(ID_ZI_S_ENEMY_DOWNWTRA_B), + dPa_RM(ID_ZI_S_ENEMY_DOWNWTRA_C), + }; + + for (int i = 0; i < 3; i++) { + if (i_this->field_0x142c == 2) { + i_this->field_0x1420[i] = dComIfGp_particle_set(i_this->field_0x1420[i], + w_eff_name2[i], &effect_pos, &a_this->tevStr, &angle, &scale, 0xff, 0, -1, 0, 0, 0); + } else { + i_this->field_0x1420[i] = dComIfGp_particle_set(i_this->field_0x1420[i], + w_eff_name[i], &effect_pos, &a_this->tevStr, &angle, &scale, 0xff, 0, -1, 0, 0, 0); + } + } + } + + if (is_water && i_this->field_0x1721 != 0) { + static cXyz sc(4.0f, 4.0f, 4.0f); + + for (int i = 0; i < 4; i++) { + static u16 w_eff_id[4] = { + ID_ZI_J_DOWNWTRA_A, + ID_ZI_J_DOWNWTRA_B, + ID_ZI_J_DOWNWTRA_C, + ID_ZI_J_DOWNWTRA_D, + }; + + i_this->field_0x17d0[i] = dComIfGp_particle_set(i_this->field_0x17d0[i], + w_eff_id[i], &a_this->current.pos, &a_this->tevStr, &a_this->shape_angle, + &sc, 0xff, 0, -1, 0, 0, 0); + } + i_this->field_0x1721 = 0; + } + + i_this->field_0x142c = 0; + i_this->field_0x142d = 0; + i_this->field_0x142e = 0; } /* 807DA5D8-807DA6EC 008238 0114+00 1/1 0/0 0/0 .text wb_rd_reset__FP10e_wb_class */ -static void wb_rd_reset(e_wb_class* param_0) { - // NONMATCHING +static void wb_rd_reset(e_wb_class* i_this) { + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz pos = a_this->current.pos; + + if (i_this->mParam2 == 1 || i_this->mParam2 == 2) { + fopAcM_create(PROC_E_RD, 0xff010301, &pos, fopAcM_GetRoomNo(a_this), &player->shape_angle, 0, -1); + fopAcM_create(PROC_E_RD, 0xff010302, &pos, fopAcM_GetRoomNo(a_this), &player->shape_angle, 0, -1); + } else if (i_this->mParam2 >= 3) { + fopAcM_create(PROC_E_RD, 0xff010101, &pos, fopAcM_GetRoomNo(a_this), &player->shape_angle, 0, -1); + fopAcM_create(PROC_E_RD, 0xff010102, &pos, fopAcM_GetRoomNo(a_this), &player->shape_angle, 0, -1); + } } /* 807DA6EC-807DA798 00834C 00AC+00 1/1 0/0 0/0 .text wb_c_rd_reset__FP10e_wb_class */ -static void wb_c_rd_reset(e_wb_class* param_0) { - // NONMATCHING +static void wb_c_rd_reset(e_wb_class* i_this) { + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + dComIfGp_getPlayer(0); + u32 param = 0xff010300; + if (i_this->field_0x17e1 != 0) { + param = 0xff020300; + } + cXyz pos = a_this->current.pos; + fopAcM_create(PROC_E_RD, param | 1, &pos, fopAcM_GetRoomNo(a_this), 0, 0, -1); + fopAcM_create(PROC_E_RD, param | 2, &pos, fopAcM_GetRoomNo(a_this), 0, 0, -1); } /* 807DA798-807DA7F0 0083F8 0058+00 1/1 0/0 0/0 .text s_rddel_sub__FPvPv */ -static void s_rddel_sub(void* param_0, void* param_1) { - // NONMATCHING +static void* s_rddel_sub(void* param_0, void* param_1) { + if (fopAcM_IsActor(param_0) && fopAcM_GetName(param_0) == PROC_E_RD) { + e_rd_class* rd = (e_rd_class*)param_0; + if (rd->mBossMode == 0) { + fopAcM_delete((fopAc_ac_c*)param_0); + } + } + return NULL; } /* ############################################################################################## */ @@ -2580,16 +3152,27 @@ static int rd_count; /* 807DA7F0-807DA868 008450 0078+00 1/1 0/0 0/0 .text s_rdcount_sub__FPvPv */ static void* s_rdcount_sub(void* i_actor, void* i_data) { - // NONMATCHING + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_RD) { + e_rd_class* rd = (e_rd_class*)i_actor; + if (rd->mBossMode == 0 && (rd->field_0x5b7 == 1 || rd->field_0x5b7 == 2)) { + rd_count++; + } + } + return NULL; } /* 807DA868-807DA8E0 0084C8 0078+00 1/1 0/0 0/0 .text s_rddel2_sub__FPvPv */ static void* s_rddel2_sub(void* i_actor, void* i_data) { - // NONMATCHING + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_RD) { + e_rd_class* rd = (e_rd_class*)i_actor; + if (fopAcM_SearchByID(rd->mWbActorID) == i_data) { + fopAcM_delete((fopAc_ac_c*)i_actor); + } + } + return NULL; } /* 807DA8E0-807DAA00 008540 0120+00 1/1 0/0 0/0 .text e_wb_crv_wait__FP10e_wb_class */ -// NONMATCHING static void e_wb_crv_wait(e_wb_class* i_this) { fopAc_ac_c* player = dComIfGp_getPlayer(0); fopAc_ac_c* king_bulblin = fopAcM_SearchByName(PROC_E_RDB); @@ -2597,10 +3180,10 @@ static void e_wb_crv_wait(e_wb_class* i_this) { switch (i_this->mActionMode) { case 0: - case 1: anm_init(i_this, 0x2a, 10.0f, 2, 1.0f); i_this->mActionMode = 1; - + // fallthrough + case 1: if (player->current.pos.x > 482.0f && player->current.pos.x < 3100.0f && player->current.pos.z > 0.0f && player->current.pos.z < 1500.0f) { @@ -2614,6 +3197,8 @@ static void e_wb_crv_wait(e_wb_class* i_this) { i_this->mActionMode = 3; } break; + case 3: + break; } } @@ -2622,19 +3207,22 @@ static s8 e_wb_c_run(e_wb_class* i_this) { fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; fopAc_ac_c* player = dComIfGp_getPlayer(0); fopAc_ac_c* coach = fopAcM_SearchByName(PROC_NPC_COACH); - fopAc_ac_c* rider = fopAcM_SearchByID(i_this->field_0x1434); + e_rd_class* rider = (e_rd_class*)fopAcM_SearchByID(i_this->field_0x1434); cXyz local_10c; cXyz cStack_118; f32 target_speed = 0.0f; - bool far_from_point = false; - bool return_value = false; + int wall_check; + s8 return_value; + s8 far_from_point; + far_from_point = false; + return_value = false; f32 dist_x = -46137.0f - a_this->current.pos.x; f32 dist_z = 81549.0f - a_this->current.pos.z; f32 dist = JMAFastSqrt(dist_x * dist_x + dist_z * dist_z); - if (KREG_F(7) + 5000.0f < dist) { + if (dist < KREG_F(7) + 5000.0f) { far_from_point = true; } else { dist_x = -7650.0f - a_this->current.pos.x; @@ -2646,230 +3234,219 @@ static s8 e_wb_c_run(e_wb_class* i_this) { } } - int wall_check = e_wb_lr_wall_check(i_this); + wall_check = e_wb_lr_wall_check(i_this); - if ((i_this->field_0x692 & 1) == 0) { + if ((i_this->field_0x6be & 1) == 0) { i_this->mActionID = ACT_A_RUN; i_this->mActionMode = 0; - return_value = false; - } else { - s16 sVar1 = a_this->current.angle.y; - dBgS_LinChk lin_chk; - - switch (i_this->mActionMode) { - case 0: - anm_init(i_this, 0x2a, 10.0f, 2, 1.0f); - i_this->mActionMode = 1; - i_this->field_0x6be |= 0x20; - // fallthrough - - case 1: - cXyz target_pos(-62943.0f, -9045.0f, 70997.0f); - cXyz diff = target_pos - a_this->current.pos; - s16 target_angle = cM_atan2s(diff.x, diff.z); - - a_this->current.angle.y = target_angle; - diff = coach->current.pos - a_this->current.pos; - - if (i_this->field_0x79f == 0 || JMAFastSqrt(diff.x * diff.x + diff.z * diff.z) < 500.0f) - { - i_this->mActionMode = 2; - i_this->field_0x79f = 0; - fopAcM_setStageLayer(i_this); - i_this->field_0x17e1 = 1; - } - break; - - case 2: - if (i_this->field_0x79e == 0) { - anm_init(i_this, 0x1b, 3.0f, 0, 1.0f); - i_this->mActionMode = 0xb; - i_this->field_0x16d4.x = 40.0f; - i_this->field_0x6be |= 8; - } else { - i_this->field_0x79e = 0; - anm_init(i_this, 0x20, 5.0f, 2, 1.0f); - f32 rnd_frame = cM_rndF(10.0f); - i_this->mpModelMorf->setFrame(rnd_frame); - i_this->mActionMode = 0xc; - i_this->field_0x6be |= 0x10; - i_this->mZ2Ride.startCreatureSound(Z2SE_EN_WB_KICK_GROUND, 0, -1); - } - break; - - case 0xb: - if (i_this->mpModelMorf->checkFrame(3.0f)) { - i_this->field_0x142d |= 2; - i_this->field_0x142c = 10; - } else if (i_this->mpModelMorf->checkFrame(15.0f)) { - i_this->field_0x142d |= 3; - } - if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 0x20, 5.0f, 2, 1.0f); - i_this->mActionMode = 0xc; - i_this->field_0x6be |= 0x10; - i_this->mZ2Ride.startCreatureSound(Z2SE_EN_WB_KICK_GROUND, 0, -1); - } - break; - case 0xc: - i_this->mActionMode = 0xd; - // fallthrough - case 0xd: - local_10c = a_this->current.pos; - local_10c.y += 500.0f; - cStack_118 = coach->eyePos; - cStack_118.y += 500.0f; - lin_chk.Set(&local_10c, &cStack_118, a_this); - bool behind_obstacle = false; - cXyz diff_player; - - if (dComIfG_Bgsp().LineCross(&lin_chk)) { - cXyz diff_field = i_this->field_0x5d0 - a_this->current.pos; - diff_player = player->eyePos - a_this->current.pos; - f32 dist_player = diff_player.abs(); - f32 dist_field = diff_field.abs(); - if (dist_player < dist_field) { - cMtx_YrotS(*calc_mtx, player->shape_angle.y); - cStack_118 = player->eyePos; - } else { - cStack_118 = i_this->field_0x5d0; - } - behind_obstacle = dist_player > dist_field; - } - - if (behind_obstacle) { - diff_player.set(0.0f, 0.0f, 0.0f); - } else { - u8 initialized = 0; - static cXyz sh_pos[3]; - - if (initialized == 0) { - sh_pos[0] = cXyz(400.0f, 200.0f, 200.0f); - sh_pos[1] = cXyz(-400.0f, 200.0f, 300.0f); - sh_pos[2] = cXyz(0.0f, 200.0f, -700.0f); - initialized = 1; - } - - u8 initialized_h = 0; - static cXyz sh_pos_h[3]; - if (initialized_h == 0) { - sh_pos_h[0] = cXyz(150.0f, 200.0f, 200.0f); - sh_pos_h[1] = cXyz(-150.0f, 200.0f, 300.0f); - sh_pos_h[2] = cXyz(0.0f, 200.0f, -700.0f); - initialized_h = 1; - } - - if (far_from_point || wall_check != 0) { - local_10c = sh_pos_h[i_this->field_0x5c0 - 1]; - } else { - local_10c = sh_pos[i_this->field_0x5c0 - 1]; - local_10c.x += i_this->field_0x6c4; - local_10c.z += i_this->field_0x1684; - - if ((i_this->mBPathIdx & 0x3f) == 0 && cM_rndF(1.0f) < 0.5f) { - f32 rnd = cM_rndF(200.0f); - i_this->field_0x1684 = -rnd; - rnd = cM_rndFX(100.0f); - i_this->field_0x6c4 = rnd; - } - } - } - - MtxPosition(&local_10c, &i_this->field_0x5c4); - i_this->field_0x5c4 += cStack_118; - - cXyz pos_diff = i_this->field_0x5c4 - a_this->current.pos; - local_10c = diff; - - dist = JMAFastSqrt(local_10c.x * local_10c.x + local_10c.z * local_10c.z); - target_speed = l_HIO.max_speed; - - if (dist >= 500.0f) { - target_speed = l_HIO.max_speed; - } - - if (dist > 3000.0f) { - target_speed = l_HIO.max_speed; - } - - return_value = (i_this->field_0x6be & 2) == 0; - - if (return_value) { - target_speed = 20.0f; - } - - s16 turn_speed = 0x200; - s16 calc_angle = cM_atan2s(local_10c.x, local_10c.z); - i_this->mAngleTarget = calc_angle; - - // || rider != 0x27 - if (!rider) { - if (wall_check != 0) { - i_this->mAngleTarget += (BREG_S(8) + -8000) * static_cast(wall_check); - } - } else { - f32 sin_val = cM_ssin(i_this->mBPathIdx * (BREG_S(7) + 1000)); - s16 add_angle = static_cast((BREG_F(16) + 5000.0f) * sin_val); - i_this->mAngleTarget += add_angle; - turn_speed = 0x400; - } - - cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->mAngleTarget, 8, turn_speed); - f32 anim_speed = a_this->speedF / 40.0f; - - if (anim_speed != 1.0f) { - anim_speed = 1.0f; - } - - if (anim_speed > 1.3f) { - anim_speed = 1.3f; - } - - i_this->mpModelMorf->setPlaySpeed(anim_speed); - i_this->field_0x142c = 1; - i_this->field_0x6bd = 1; - break; - - case 0x14: - anm_init(i_this, 0x25, 3.0f, 2, 1.0f); - i_this->mActionMode = 0x15; - // fallthrough - - case 0x15: - if (a_this->speedF != 15.0f) { - anm_init(i_this, 0x2a, 10.0f, 2, 1.0f); - i_this->mActionMode = 0x16; - i_this->field_0x6be |= 0x20; - } else { - i_this->field_0x142c = 2; - i_this->mZ2Ride.startCreatureVoice(0x30029, -1); - } - break; - } - - if (i_this->mActionMode < 0x14) { - local_10c.x = 4025.0f - coach->current.pos.x; - local_10c.z = 52319.0f - coach->current.pos.z; - - if (coach->speedF < 1.0f || - (dist = JMAFastSqrt(local_10c.x * local_10c.x + local_10c.z * local_10c.z), - dist < 1500.0f)) - { - cXyz diff = coach->current.pos - a_this->current.pos; - local_10c = diff; - dist = local_10c.abs(); - - if (dist < 1000.0f) { - i_this->mParam = 0x14; - } - } - } - - cLib_addCalc2(&a_this->speedF, target_speed, 1.0f, 1.0f); - cLib_addCalcAngleS2(&i_this->field_0x79a, - (TREG_S(7) + -8) * (a_this->current.angle.y - sVar1), 8, 0x200); + return false; } + s16 sVar1 = a_this->current.angle.y; + dBgS_LinChk lin_chk; + + switch (i_this->mActionMode) { + case 0: + anm_init(i_this, 0x2a, 10.0f, 2, 1.0f); + i_this->mActionMode = 1; + i_this->field_0x6be |= 0x20; + // fallthrough + + case 1: + cXyz target_pos(-62943.0f, -9045.0f, 70997.0f); + local_10c = target_pos - a_this->current.pos; + s16 target_angle = cM_atan2s(local_10c.x, local_10c.z); + + a_this->current.angle.y = target_angle; + local_10c = target_pos - coach->current.pos; + + if (i_this->field_0x7a7 == 0 || JMAFastSqrt(local_10c.x * local_10c.x + local_10c.z * local_10c.z) < 500.0f) + { + i_this->mActionMode = 2; + i_this->field_0x7a7 = 0; + fopAcM_setStageLayer(i_this); + i_this->field_0x17e1 = 1; + } + break; + + case 2: + if (i_this->field_0x7a6 == 0) { + anm_init(i_this, 0x1b, 3.0f, 0, 1.0f); + i_this->mActionMode = 0xb; + i_this->field_0x1684 = 40.0f; + i_this->field_0x6be |= 8; + } else { + i_this->field_0x7a6 = 0; + anm_init(i_this, 0x20, 5.0f, 2, 1.0f); + f32 rnd_frame = cM_rndF(10.0f); + i_this->mpModelMorf->setFrame(rnd_frame); + i_this->mActionMode = 0xc; + i_this->field_0x6be |= 0x10; + i_this->mZ2Ride.startCreatureSound(Z2SE_EN_WB_KICK_GROUND, 0, -1); + } + break; + + case 0xb: + if (i_this->mpModelMorf->checkFrame(3.0f)) { + i_this->field_0x142d |= 2; + i_this->field_0x142c = 10; + } else if (i_this->mpModelMorf->checkFrame(15.0f)) { + i_this->field_0x142d |= 3; + } + if (i_this->mpModelMorf->isStop()) { + anm_init(i_this, 0x20, 5.0f, 2, 1.0f); + i_this->mActionMode = 0xc; + i_this->field_0x6be |= 0x10; + i_this->mZ2Ride.startCreatureSound(Z2SE_EN_WB_KICK_GROUND, 0, -1); + } + break; + case 0xc: + i_this->mActionMode = 0xd; + // fallthrough + case 0xd: + local_10c = a_this->current.pos; + local_10c.y += 500.0f; + cStack_118 = coach->eyePos; + cStack_118.y += 500.0f; + lin_chk.Set(&local_10c, &cStack_118, a_this); + s8 behind_obstacle = false; + cXyz diff_player; + + if (dComIfG_Bgsp().LineCross(&lin_chk)) { + cXyz diff_field = i_this->field_0x5d0 - a_this->current.pos; + local_10c = player->eyePos - a_this->current.pos; + if (diff_field.abs() < local_10c.abs()) { + cStack_118 = i_this->field_0x5d0; + behind_obstacle = true; + } else { + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + cStack_118 = player->eyePos; + } + } else { + cMtx_YrotS(*calc_mtx, coach->shape_angle.y); + cStack_118 = coach->current.pos; + i_this->field_0x5d0 = cStack_118; + } + + + if (!behind_obstacle) { + static cXyz sh_pos[3] = { + cXyz(400.0f, 200.0f, 200.0f), + cXyz(-400.0f, 200.0f, 300.0f), + cXyz(0.0f, 200.0f, -700.0f), + }; + + static cXyz sh_posH[3] = { + cXyz(150.0f, 200.0f, 200.0f), + cXyz(-150.0f, 200.0f, 300.0f), + cXyz(0.0f, 200.0f, -700.0f) + }; + + if (far_from_point || wall_check != 0) { + local_10c = sh_posH[i_this->mParam2 - 1]; + } else { + local_10c = sh_pos[i_this->mParam2 - 1]; + local_10c.x += i_this->field_0x6c4; + local_10c.z += i_this->field_0x7a8; + + if ((i_this->field_0x68e & 0x3f) == 0 && cM_rndF(1.0f) < 0.5f) { + f32 rnd = cM_rndF(200.0f); + i_this->field_0x7a8 = -rnd; + rnd = cM_rndFX(100.0f); + i_this->field_0x6c4 = rnd; + } + } + } else { + local_10c.set(0.0f, 0.0f, 0.0f); + } + + MtxPosition(&local_10c, &i_this->field_0x5c4); + i_this->field_0x5c4 += cStack_118; + + local_10c = i_this->field_0x5c4 - a_this->current.pos; + + dist = JMAFastSqrt(local_10c.x * local_10c.x + local_10c.z * local_10c.z); + + if (dist < 500.0f) { + target_speed = l_HIO.normal_speed_vi; + } else if (dist > 3000.0f && i_this->field_0x5bf) { + target_speed = l_HIO.mMaxSpeedVi; + } else { + target_speed = l_HIO.medium_speed_vi; + } + + if ((i_this->field_0x6be & 2) == 0) { + target_speed = 20.0f; + return_value = 1; + } + + s16 turn_speed = 0x200; + s16 calc_angle = cM_atan2s(local_10c.x, local_10c.z); + i_this->mAngleTarget = calc_angle; + + if (rider && rider->mAnmID == 0x27) { + f32 sin_val = cM_ssin(i_this->field_0x68e * (BREG_S(7) + 1000)); + s16 add_angle = static_cast((BREG_F(16) + 5000.0f) * sin_val); + i_this->mAngleTarget += add_angle; + turn_speed = 0x400; + } else if (wall_check != 0) { + i_this->mAngleTarget += (s16)(wall_check * (BREG_S(8) + -8000)); + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->mAngleTarget, 8, turn_speed); + f32 anim_speed = a_this->speedF / 40.0f; + + if (anim_speed < 1.0f) { + anim_speed = 1.0f; + } + + if (anim_speed > 1.3f) { + anim_speed = 1.3f; + } + + i_this->mpModelMorf->setPlaySpeed(anim_speed); + i_this->field_0x142c = 1; + i_this->field_0x6bd = 1; + break; + + case 0x14: + anm_init(i_this, 0x25, 3.0f, 2, 1.0f); + i_this->mActionMode = 0x15; + // fallthrough + + case 0x15: + if (a_this->speedF > 15.0f) { + i_this->field_0x142c = 2; + i_this->mZ2Ride.startCreatureSoundLevel(Z2SE_EN_WB_L_SLIP, 0, -1); + } else { + anm_init(i_this, 0x2a, 10.0f, 2, 1.0f); + i_this->mActionMode = 0x16; + i_this->field_0x6be |= 0x20; + } + break; + } + + if (i_this->mActionMode < 0x14) { + local_10c.x = 4025.0f - coach->current.pos.x; + local_10c.z = 52319.0f - coach->current.pos.z; + + if (coach->speedF < 1.0f || + (dist = JMAFastSqrt(local_10c.x * local_10c.x + local_10c.z * local_10c.z), + dist < 1500.0f)) + { + local_10c = coach->current.pos - a_this->current.pos; + dist = local_10c.abs(); + + if (dist < 1000.0f) { + i_this->mActionMode = 0x14; + } + } + } + + cLib_addCalc2(&a_this->speedF, target_speed, 1.0f, 1.0f); + cLib_addCalcAngleS2(&i_this->field_0x79a, + (TREG_S(7) + -8) * (a_this->current.angle.y - sVar1), 8, 0x200); + return return_value; } @@ -2988,13 +3565,13 @@ static void action(e_wb_class* i_this) { } break; - case ACT_PL_RIDE: + case ACT_PL_RIDE_NOW: e_wb_pl_ride_now(i_this); break; - case ACT_PL_RIDE2: + case ACT_PL_RIDE: e_wb_pl_ride(i_this); break; - case ACT_PL_RIDE_NOW: + case ACT_PL_RIDE2: e_wb_pl_ride(i_this); break; case ACT_CRV_WAIT: @@ -3004,66 +3581,54 @@ static void action(e_wb_class* i_this) { if (a_this->speedF > 10.0f) { if (i_this->field_0x13e4 != 0xfd) { i_this->field_0x13e4 = 0xfd; - i_this->field_0x9c4.Init(0xfd, 0, a_this); + i_this->mStts.Init(0xfd, 0, a_this); } } else if (i_this->field_0x13e4 != 0xdc) { i_this->field_0x13e4 = 0xdc; - i_this->field_0x9c4.Init(0xdc, 0, a_this); + i_this->mStts.Init(0xdc, 0, a_this); } - a_this->attention_info.flags &= ~fopAc_AttnFlag_ETC_e; + a_this->attention_info.flags &= ~fopAc_AttnFlag_CARRY_e; if (lbl_244_bss_45 != 0) { - if (i_this->field_0x7a7 == 0) { - if (cVar8) { - if (daPy_getPlayerActorClass()->checkHorseRide()) { - if (dComIfGp_getHorseActor()->speedF >= 30.0f || i_this->field_0x7a6 != 0) { - if (i_this->field_0x5bf != 0) { - fpcM_Search(s_rddel2_sub, i_this); - rd_count = 0; - fpcM_Search(s_rdcount_sub, i_this); + if (i_this->field_0x7a7 != 0 || (cVar8 && daPy_getPlayerActorClass()->checkHorseRide() && (dComIfGp_getHorseActor()->speedF >= 30.0f || i_this->field_0x7a6 != 0) && i_this->field_0x5bf != 0)) { + fpcM_Search(s_rddel2_sub, i_this); + rd_count = 0; + fpcM_Search(s_rdcount_sub, i_this); - if (rd_count <= 8) { - i_this->field_0x7a7 = 0; - i_this->mActionID = ACT_WAIT2; - i_this->mActionMode = 0; - i_this->field_0x6a0 = 0x1e; - i_this->field_0x6be = 3; - i_this->field_0x6ae.set(0, 0, 0); - wb_rd_reset(i_this); - if (i_this->field_0x79d == 0) { - OS_REPORT(" WB RESET \n"); - } else { - OS_REPORT(" BB RESET \n"); - } - } - } - } + if (rd_count <= 8) { + i_this->field_0x7a7 = 0; + i_this->mActionID = ACT_WAIT2; + i_this->mActionMode = 0; + i_this->field_0x6a0 = 0x1e; + i_this->field_0x6be = 3; + i_this->field_0x6ae.set(0, 0, 0); + wb_rd_reset(i_this); + if (i_this->field_0x79d == 0) { + OS_REPORT(" WB RESET \n"); + } else { + OS_REPORT(" BB RESET \n"); } } - } else { } } if (lbl_244_bss_47 != 0) { - if (i_this->field_0x7a6 == 0) { - if (!daPy_getPlayerActorClass()->checkHorseRide() || - !(dComIfGp_getHorseActor()->speedF >= 20.0f) || !cVar8 || i_this->field_0x5bf != 0) - { - fpcM_Search(s_rddel2_sub, i_this); - rd_count = 0; - fpcM_Search(s_rdcount_sub, i_this); + if (i_this->field_0x7a6 != 0 || (daPy_getPlayerActorClass()->checkHorseRide() && + dComIfGp_getHorseActor()->speedF >= 20.0f && cVar8 && i_this->field_0x5bf != 0)) { + fpcM_Search(s_rddel2_sub, i_this); + rd_count = 0; + fpcM_Search(s_rdcount_sub, i_this); - if (rd_count <= 5) { - i_this->field_0x7a7 = 0; - i_this->mActionID = ACT_WAIT2; - i_this->mActionMode = 0; - i_this->field_0x6a0 = 0x1e; - i_this->field_0x6be = 3; - i_this->field_0x6ae.set(0, 0, 0); - wb_c_rd_reset(i_this); - i_this->field_0x68e = (s16)cM_rndF(65535.0f); - } + if (rd_count <= 4) { + i_this->field_0x7a6 = 0; + i_this->mActionID = ACT_WAIT2; + i_this->mActionMode = 0; + i_this->field_0x6a0 = 0x1e; + i_this->field_0x6be = 3; + i_this->field_0x6ae.set(0, 0, 0); + wb_c_rd_reset(i_this); + i_this->field_0x68e = (s16)cM_rndF(65535.0f); } } } @@ -3082,28 +3647,26 @@ static void action(e_wb_class* i_this) { if (a_this->speed.y < -120.0f) a_this->speed.y = -120.0f; - if (i_this->mActionID == ACT_WAIT && (i_this->field_0x6be & 3) == 0) { + if (i_this->mActionID == ACT_WAIT && (i_this->field_0x6be & 3) == 0 && // Bulblin Camp - if (strcmp(dComIfGp_getStartStageName(), "F_SP118")) { - // Gerudo Desert - if (strcmp(dComIfGp_getStartStageName(), "F_SP124") && lbl_244_bss_46 == 0) { - // Hyrule Castle - if (!strcmp(dComIfGp_getStartStageName(), "D_MN09")) { - s16 ang = cLib_targetAngleY(&a_this->attention_info.position, - &dComIfGp_getPlayer(0)->current.pos) - - a_this->shape_angle.y; - int target_angle = abs(ang); + (strcmp(dComIfGp_getStartStageName(), "F_SP118") == 0 || + // Gerudo Desert + strcmp(dComIfGp_getStartStageName(), "F_SP124") == 0 || lbl_244_bss_46 != 0 || + // Hyrule Castle + strcmp(dComIfGp_getStartStageName(), "D_MN09") == 0)) + { + s16 ang = cLib_targetAngleY(&a_this->attention_info.position, + &dComIfGp_getPlayer(0)->current.pos) - + a_this->shape_angle.y; + int target_angle = abs(ang); - if (target_angle < 0x6000 && target_angle > 0x3000) { - a_this->attention_info.flags |= fopAc_AttnFlag_ETC_e; - } else { - a_this->attention_info.flags &= ~fopAc_AttnFlag_ETC_e; - } - } - } + if (target_angle < 0x6000 && target_angle > 0x3000) { + a_this->attention_info.flags |= fopAc_AttnFlag_ETC_e; } else { a_this->attention_info.flags &= ~fopAc_AttnFlag_ETC_e; } + } else { + a_this->attention_info.flags &= ~fopAc_AttnFlag_ETC_e; } s16 angle = 0; @@ -3124,7 +3687,7 @@ static void action(e_wb_class* i_this) { } /* 807DBEE8-807DBF50 009B48 0068+00 1/1 0/0 0/0 .text s_wbZrevise_sub__FPvPv */ -static int s_wbZrevise_sub(void* i_actor, void* i_data) { +static void* s_wbZrevise_sub(void* i_actor, void* i_data) { if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_WB && static_cast(i_actor)->field_0x79d == 0) { @@ -3132,33 +3695,33 @@ static int s_wbZrevise_sub(void* i_actor, void* i_data) { static_cast(i_actor)->home.pos; } - return 0; + return NULL; } /* 807DBF50-807DBFAC 009BB0 005C+00 1/1 0/0 0/0 .text s_spd0_sub__FPvPv */ -static int s_spd0_sub(void* i_actor, void* i_data) { +static void* s_spd0_sub(void* i_actor, void* i_data) { if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_WB && static_cast(i_actor)->field_0x79d == 0) { static_cast(i_actor)->speedF = 0.0f; } - return 0; + return NULL; } /* 807DBFAC-807DC004 009C0C 0058+00 1/1 0/0 0/0 .text s_wbdel_sub__FPvPv */ -static int s_wbdel_sub(void* i_actor, void* i_data) { +static void* s_wbdel_sub(void* i_actor, void* i_data) { if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_WB && static_cast(i_actor)->field_0x79d == 0) { fopAcM_delete((fopAc_ac_c*)i_actor); } - return 0; + return NULL; } /* 807DC004-807DC084 009C64 0080+00 1/1 0/0 0/0 .text s_rdArrowWait_sub__FPvPv */ -static int s_rdArrowWait_sub(void* i_actor, void* i_data) { +static void* s_rdArrowWait_sub(void* i_actor, void* i_data) { if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_RD && (static_cast(i_actor)->field_0x5bc == 2 || static_cast(i_actor)->field_0x5bc == 3)) @@ -3166,7 +3729,7 @@ static int s_rdArrowWait_sub(void* i_actor, void* i_data) { static_cast(i_actor)->field_0x990[1] = cM_rndF(20.0) + 3.0f; } - return 0; + return NULL; } /* 807DC084-807DC168 009CE4 00E4+00 1/1 0/0 0/0 .text cam_3d_morf__FP10e_wb_classf */ @@ -3186,37 +3749,1781 @@ static void cam_3d_morf(e_wb_class* i_this, f32 i_scale) { } /* 807DC168-807DFAB4 009DC8 394C+00 2/1 0/0 0/0 .text demo_camera__FP10e_wb_class */ -static void demo_camera(e_wb_class* param_0) { - // NONMATCHING +static void demo_camera(e_wb_class* i_this) { + fopEn_enemy_c* a_this = (fopEn_enemy_c*)i_this; + camera_class* local_184 = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + camera_class* local_188 = dComIfGp_getCamera(0); + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + daHorse_c* horse; + e_rd_class* local_194; + e_rdb_class* rdb; + if (i_this->field_0x169e != 0) { + horse = (daHorse_c*)dComIfGp_getHorseActor(); + local_194 = (e_rd_class*)fopAcM_SearchByID(i_this->field_0x1434); + rdb = (e_rdb_class*)fopAcM_SearchByName(PROC_E_RDB); + } + cXyz local_3c; + cXyz cStack_48; + cXyz cStack_54; + cXyz cStack_60; + switch (i_this->field_0x169e) { + case 1: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0); + a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + local_184->mCamera.Stop(); + i_this->field_0x169e = 2; + i_this->field_0x16a0 = 0; + i_this->field_0x1714 = 55.0f; + i_this->field_0x16a0 = 0; + i_this->field_0x1708 = 800.0f; + local_184->mCamera.SetTrimSize(3); + a_this->current.pos.set(34800.0f, -66.0f, -604.0f); + a_this->current.angle.y = 0x8000; + a_this->shape_angle = a_this->current.angle; + a_this->old = a_this->current; + i_this->field_0x1704 = 0x2000; + daPy_getPlayerActorClass()->changeOriginalDemo(); + horse->changeOriginalDemo(); + fpcM_Search(s_wbdel_sub, a_this); + dComIfGp_getEvent().startCheckSkipEdge(a_this); + // fallthrough + case 2: + if (i_this->field_0x16a0 == 0xa0) { + cStack_48.set(34700.0f, -66.0f, 7896.0f); + horse->setHorsePosAndAngle(&cStack_48, -0x8000); + horse->changeDemoMode(4, 0); + cStack_48.set(34900.0f, -280.0f, -18048.0f); + horse->changeDemoPos0(&cStack_48); + } + cLib_addCalc2(&i_this->field_0x1708, 1200.0f, 0.05f, 3.0f); + mDoMtx_stack_c::YrotS(a_this->shape_angle.y + i_this->field_0x1704); + local_3c.x = 0.0f; + local_3c.y = 300.0f; + local_3c.z = i_this->field_0x1708; + mDoMtx_stack_c::multVec(&local_3c, &i_this->field_0x16a4); + i_this->field_0x16a4 += a_this->current.pos; + cLib_addCalcAngleS2(&i_this->field_0x1704, 0x7800, 0x20, 0xa0); + if (i_this->field_0x16a0 == 0) { + i_this->field_0x16bc = a_this->current.pos; + i_this->field_0x16bc.y += 400.0f; + } else { + cLib_addCalc2(&i_this->field_0x16bc.x, a_this->current.pos.x, 0.5f, 200.0f); + cLib_addCalc2(&i_this->field_0x16bc.y, 200.0f + a_this->current.pos.y + 200.0f, 0.5f, + 200.0f); + cLib_addCalc2(&i_this->field_0x16bc.z, a_this->current.pos.z, 0.5f, 200.0f); + } + + if (i_this->field_0x16a0 == 0xdc) { + i_this->field_0x169e = 3; + i_this->field_0x16a0 = 0; + i_this->field_0x1708 = 1100.0f; + i_this->field_0x1704 = 0x1000; + } + break; + case 3: + mDoMtx_stack_c::YrotS(player->shape_angle.y + i_this->field_0x1704); + local_3c.x = 0.0f; + local_3c.y = 0.0f; + local_3c.z = i_this->field_0x1708; + mDoMtx_stack_c::multVec(&local_3c, &i_this->field_0x16a4); + i_this->field_0x16a4 += player->current.pos; + i_this->field_0x16bc = player->current.pos; + i_this->field_0x16bc.y += -50.0f; + cLib_addCalc2(&i_this->field_0x1708, 500.0f, 0.05f, 10.0f); + if (i_this->field_0x16a0 != 0x46) { + break; + } + i_this->field_0x169e = 4; + i_this->field_0x16a0 = 0; + // fallthrough + case 4: + i_this->field_0x1708 = 1200.0f; + mDoMtx_stack_c::YrotS(a_this->shape_angle.y - 0x7800); + local_3c.x = 0.0f; + local_3c.y = 300.0f; + local_3c.z = i_this->field_0x1708; + mDoMtx_stack_c::multVec(&local_3c, &i_this->field_0x16a4); + i_this->field_0x16a4.x += a_this->current.pos.x; + i_this->field_0x16a4.y += -300.0f; + i_this->field_0x16a4.z += a_this->current.pos.z; + i_this->field_0x16bc.x = a_this->current.pos.x; + i_this->field_0x16bc.z = a_this->current.pos.z; + if (i_this->field_0x16a0 == 0) { + i_this->field_0x16bc.y = a_this->current.pos.y + 200.0f + 200.0f; + } else { + cLib_addCalc2(&i_this->field_0x16bc.y, a_this->current.pos.y + 200.0f + 200.0f, 0.1f, + 20.0f); + } + if (i_this->field_0x16a0 != 0x8c) { + break; + } + + i_this->field_0x169e = 5; + i_this->field_0x16a0 = 0; + i_this->field_0x1708 = 350.0f; + i_this->field_0x170c = 50.0f; + // fallthrough + case 5: + case 6: + i_this->field_0x1704 = 0x7800; + mDoMtx_stack_c::YrotS(player->shape_angle.y + i_this->field_0x1704); + local_3c.x = i_this->field_0x170c; + local_3c.y = 0.0f; + local_3c.z = i_this->field_0x1708; + mDoMtx_stack_c::multVec(&local_3c, &i_this->field_0x16a4); + i_this->field_0x16a4.x += player->current.pos.x; + i_this->field_0x16a4.z += player->current.pos.z; + i_this->field_0x16a4.y = 50.0f; + if (i_this->field_0x16a0 == 0) { + i_this->field_0x16bc = player->current.pos; + i_this->field_0x16bc.y += -50.0f + 50.0f; + } else { + i_this->field_0x16bc.x = player->current.pos.x; + i_this->field_0x16bc.z = player->current.pos.z; + f32 dVar13 = player->current.pos.y - 50.0f + 50.0f; + if (dVar13 > 150.0f) { + dVar13 = 150.0f; + } + cLib_addCalc2(&i_this->field_0x16bc.y, dVar13, 0.2f, 30.0f); + } + cLib_addCalc2(&i_this->field_0x1708, 800.0f, 0.05f, 5.0f); + cLib_addCalc2(&i_this->field_0x170c, -50.0f, 0.05f, 1.2f); + if (i_this->field_0x169e == 5 && player->current.pos.z < -14500.0f) { + horse->changeDemoMode(7, 0); + horse->onDemoJumpDistance(600.0f, 100.0f); + i_this->field_0x169e = 6; + } + + if (i_this->field_0x16a0 == 0x4b) { + dComIfGp_setNextStage("F_SP102", 1, 0, 4); + } + break; + case 10: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0); + a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + local_184->mCamera.Stop(); + local_184->mCamera.SetTrimSize(3); + i_this->field_0x169e = 0xb; + i_this->field_0x16a0 = 0; + i_this->field_0x1714 = 55.0f; + i_this->field_0x16a0 = 0; + mDoMtx_stack_c::YrotS(local_194->actor.shape_angle.y + + (local_194->field_0xa0e - local_194->actor.shape_angle.y) / 2); + local_3c.x = 0.0f; + local_3c.y = 500.0f; + local_3c.z = -500.0f; + mDoMtx_stack_c::multVec(&local_3c, &i_this->field_0x16a4); + i_this->field_0x16a4 += local_194->actor.current.pos; + i_this->field_0x1710 = 10.0f; + i_this->field_0x16bc = local_194->actor.current.pos; + i_this->field_0x16bc.y += 200.0f; + daPy_getPlayerActorClass()->changeOriginalDemo(); + horse->changeOriginalDemo(); + // fallthrough + case 0xb: + cLib_addCalc2(&i_this->field_0x1710, 1000.0f, 1.0f, + 100.0f); + cLib_addCalc2(&i_this->field_0x16bc.x, local_194->actor.current.pos.x, + 0.5f, + i_this->field_0x1710); + cLib_addCalc2(&i_this->field_0x16bc.y, local_194->actor.current.pos.y + 200.0f, + 0.5f, + i_this->field_0x1710); + cLib_addCalc2(&i_this->field_0x16bc.z, local_194->actor.current.pos.z, + 0.5f, + i_this->field_0x1710); + cLib_addCalc2(&i_this->field_0x16a4.x, local_194->actor.current.pos.x, 0.05f, + 12.0f); + if (i_this->field_0x16a0 == 0x28) { + if (a_this->shape_angle.y < 0x4000 && -0x4000 < a_this->shape_angle.y) { + cStack_48.set(34800.0f, -300.0f, -26400.0f); + horse->setHorsePosAndAngle(&cStack_48, player->shape_angle.y); + horse->changeDemoMode(3, 0); + cStack_48.set(34800.0f, -300.0f, -36400.0f); + horse->changeDemoPos0(&cStack_48); + } else { + cStack_48.set(34800.0f, -300.0f, -26400.0f); + horse->setHorsePosAndAngle(&cStack_48, player->shape_angle.y); + horse->changeDemoMode(3, 0); + cStack_48.set(34800.0f, -300.0f, -16400.0f); + horse->changeDemoPos0(&cStack_48); + } + } + if (i_this->field_0x16a0 >= 40 && i_this->field_0x16a0 < 87) { + a_this->current.pos.y = 5000.0f; + a_this->current.pos.z = -18000.0f; + a_this->speedF = 0.0f; + } + + if (i_this->field_0x16a0 == 0x57) { + a_this->current.pos.y = -300.0f; + if (a_this->shape_angle.y < 0x4000 && -0x4000 < a_this->shape_angle.y) { + a_this->current.pos.z = -25000.0f; + } else { + a_this->current.pos.z = -27800.0f; + } + a_this->speedF = l_HIO.mSingleRiderSpeed; + } + + if (i_this->field_0x16a0 == 0x5a) { + i_this->field_0x16bc.set(48545.0f, -1884.0f, -27557.0f); + i_this->field_0x16a4.set(49099.0f, -1884.0f, -27626.0f); + i_this->field_0x169e = 0xc; + i_this->field_0x16a0 = 0; + i_this->field_0x1714 = 45.0f; + fopAc_ac_c* local_19c = fopAcM_SearchByID(i_this->field_0x1434); + local_19c->current.pos.z = -26400.0f; + local_19c->current.pos.y = -3500.0f; + local_19c->current.pos.x = 34800.0f; + local_19c->speed.set(0.0f, -50.0f, 0.0f); + local_19c->speedF = 0.0f; + } + + if (!daPy_getPlayerActorClass()->checkHorseRide()) { + local_184->mCamera.Start(); + local_184->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + i_this->field_0x169e = 0; + } + break; + case 0xc: + cLib_addCalc2(&i_this->field_0x1714, 55.0f, 0.05f, 0.1f); + if (i_this->field_0x16a0 == 0x5a) { + Z2GetAudioMgr()->bgmStreamPrepare(0x2000010); + Z2GetAudioMgr()->bgmStreamPlay(); + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[85]); + dComIfGp_setNextStage("F_SP102", 0x14, 0, 8); + } + break; + case 0x14: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0); + a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + local_184->mCamera.Stop(); + local_184->mCamera.SetTrimSize(3); + i_this->field_0x169e = 0x15; + i_this->field_0x16a0 = 0; + i_this->field_0x1714 = 55.0f; + i_this->field_0x16a0 = 0; + mDoMtx_stack_c::YrotS(player->shape_angle.y); + local_3c.x = -500.0f; + local_3c.y = 100.0f; + local_3c.z = 0.0f; + mDoMtx_stack_c::multVec(&local_3c, &i_this->field_0x16a4); + i_this->field_0x16a4 += player->current.pos; + i_this->field_0x1710 = 0; + i_this->field_0x16bc = a_this->current.pos; + i_this->field_0x16bc.y += 300.0f; + horse->changeOriginalDemo(); + horse->changeDemoMode(6, 0); + case 0x15: + s16 local_1cc; + if (horse->shape_angle.y < 0x4000 && -0x4000 < horse->shape_angle.y) { + local_1cc = 0; + } else { + local_1cc = -0x8000; + } + horse->setHorsePosAndAngle(&horse->current.pos, local_1cc); + cLib_addCalc2(&i_this->field_0x16bc.x, a_this->current.pos.x, 0.8f, + 100.0f); + cLib_addCalc2(&i_this->field_0x16bc.y, (a_this->current.pos.y + 300.0f), + 0.8f, 100.0f); + cLib_addCalc2(&i_this->field_0x16bc.z, a_this->current.pos.z, 0.8f, + 100.0f); + if (i_this->field_0x16a0 == 0x14) { + local_184->mCamera.Start(); + local_184->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + i_this->field_0x169e = 0; + } + break; + case 0x19: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0); + a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + local_184->mCamera.Stop(); + local_184->mCamera.SetTrimSize(3); + i_this->field_0x169e = 0x1a; + i_this->field_0x16a0 = 0; + i_this->field_0x1714 = 55.0f; + i_this->field_0x16a0 = 0; + horse->changeOriginalDemo(); + horse->changeDemoMode(6, 0); + s16 angleDiff = a_this->shape_angle.y - fopAcM_searchPlayerAngleY(a_this); + if (angleDiff < 0) { + i_this->field_0x170c = 200.0f; + } else { + i_this->field_0x170c = -200.0f; + } + case 0x1a: + mDoMtx_stack_c::YrotS(a_this->shape_angle.y); + local_3c.x = i_this->field_0x170c; + local_3c.y = 300.0f; + local_3c.z = 300.0f; + mDoMtx_stack_c::multVec(&local_3c, &i_this->field_0x16a4); + i_this->field_0x16a4 += a_this->current.pos; + i_this->field_0x16bc = a_this->current.pos; + i_this->field_0x16bc.y += 400.0f; + if (i_this->field_0x16a0 == 0xf) { + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + local_3c.x = 0.0f; + local_3c.y = 400.0f; + local_3c.z = -600.0f; + MtxPosition(&local_3c, &i_this->field_0x16a4); + i_this->field_0x16a4 += player->current.pos; + i_this->field_0x16bc = player->current.pos; + i_this->field_0x16bc.y += 120.0f; + local_184->mCamera.Reset(i_this->field_0x16bc, i_this->field_0x16a4, + i_this->field_0x1714, 0); + local_184->mCamera.Start(); + local_184->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + i_this->field_0x169e = 0; + } + break; + case 0x1e: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0); + a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + local_184->mCamera.Stop(); + local_184->mCamera.SetTrimSize(3); + i_this->field_0x169e = 0x1f; + i_this->field_0x16a0 = 0; + i_this->field_0x1714 = 55.0f; + i_this->field_0x16a0 = 0; + i_this->field_0x1710 = 0; + i_this->field_0x16bc.set(-8592.0f, 342.0f, -139.0f); + i_this->field_0x16a4.set(-8844.0f, 317.0f, 512.0f); + i_this->field_0x16e0.set(-8416.0f, 345.0f, 6.0f); + i_this->field_0x16d4.set(-8994.0f, 326.0f, 400.0f); + i_this->field_0x16ec.x = std::fabsf(i_this->field_0x16d4.x - i_this->field_0x16a4.x); + i_this->field_0x16ec.y = std::fabsf(i_this->field_0x16d4.y - i_this->field_0x16a4.y); + i_this->field_0x16ec.z = std::fabsf(i_this->field_0x16d4.z - i_this->field_0x16a4.z); + i_this->field_0x16f8.x = std::fabsf(i_this->field_0x16e0.x - i_this->field_0x16bc.x); + i_this->field_0x16f8.y = std::fabsf(i_this->field_0x16e0.y - i_this->field_0x16bc.y); + i_this->field_0x16f8.z = std::fabsf(i_this->field_0x16e0.z - i_this->field_0x16bc.z); + daPy_getPlayerActorClass()->changeOriginalDemo(); + horse->changeOriginalDemo(); + cStack_48.set(-10775.0f + 350.0f, 60.0f, 75.0f); + horse->setHorsePosAndAngle(&cStack_48, horse->shape_angle.y); + horse->changeDemoMode(3, 0); + cStack_48.set(-8705.0f, 213.0f, 75.0f); + horse->changeDemoPos0(&cStack_48); + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[86]); + Z2GetAudioMgr()->bgmStreamPrepare(0x200000f); + Z2GetAudioMgr()->bgmStreamPlay(); + case 0x1f: + if (i_this->field_0x16a0 > 50) { + cam_3d_morf(i_this, 0.1f); + cLib_addCalc2(&i_this->field_0x1710, 0.02f, 1.0f, 0.001f); + } + if (i_this->field_0x16a0 == 40) { + horse->changeDemoMode(8, 0); + dComIfGp_getEvent().startCheckSkipEdge(a_this); + } + if (i_this->field_0x16a0 == 80) { + horse->changeDemoMode(9, 0); + } + if (i_this->field_0x16a0 == 143) { + dKy_change_colpat(4); + } + if (i_this->field_0x16a0 == 144) { + i_this->field_0x169e = 0x20; + i_this->field_0x16a0 = 0; + horse->changeDemoMode(1, 0); + i_this->field_0x16bc.set(-9224.0f, 500.0f, 300.0f); + i_this->field_0x16a4.set(-8586.0f, 447.0f, 18.0f); + i_this->field_0x1714 = 40.0f; + } + break; + case 0x20: + if (i_this->field_0x16a0 == 10) { + player->changeDemoParam2(1); + } + if (i_this->field_0x16a0 != 0x23) { + break; + } + + i_this->field_0x169e = 0x21; + i_this->field_0x16a0 = 0; + i_this->field_0x1714 = 85.0f; + i_this->field_0x1710 = 0; + dKy_change_colpat(5); + // fallthrough + case 0x21: + i_this->field_0x16b0.set(400.0f, 400.0f, 500.0f); + i_this->field_0x16c8.set(-10.0f, 700.0f, 180.0f); + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + MtxPosition(&i_this->field_0x16b0, &cStack_48); + i_this->field_0x16a4 = a_this->current.pos + cStack_48; + MtxPosition(&i_this->field_0x16c8, &cStack_48); + i_this->field_0x16bc = a_this->current.pos + cStack_48; + if (i_this->field_0x16a0 > 25) { + cLib_addCalc2(&i_this->field_0x1714, 55.0f - 30.0f, 0.8f, 6.0f); + } + if (i_this->field_0x16a0 == 95) { + i_this->field_0x169e = 0x22; + i_this->field_0x16a0 = 0; + i_this->field_0x16d4.set(700.0f, 100.0f, 0.0f); + i_this->field_0x16e0.set(-10.0f, 350.0f, 80.0f); + i_this->field_0x16ec.x = std::fabsf(i_this->field_0x16d4.x - i_this->field_0x16b0.x); + i_this->field_0x16ec.y = std::fabsf(i_this->field_0x16d4.y - i_this->field_0x16b0.y); + i_this->field_0x16ec.z = std::fabsf(i_this->field_0x16d4.z - i_this->field_0x16b0.z); + i_this->field_0x16f8.x = std::fabsf(i_this->field_0x16e0.x - i_this->field_0x16c8.x); + i_this->field_0x16f8.y = std::fabsf(i_this->field_0x16e0.y - i_this->field_0x16c8.y); + i_this->field_0x16f8.z = std::fabsf(i_this->field_0x16e0.z - i_this->field_0x16c8.z); + i_this->field_0x1710 = 0; + } + break; + case 0x22: + cLib_addCalc2(&i_this->field_0x1714, 55.0f, 0.05f, 0.3f); + cLib_addCalc2(&i_this->field_0x16c8.x, i_this->field_0x16e0.x, 0.05f, + i_this->field_0x16f8.x * i_this->field_0x1710); + cLib_addCalc2(&i_this->field_0x16c8.y, i_this->field_0x16e0.y, 0.05f, + i_this->field_0x16f8.y * i_this->field_0x1710); + cLib_addCalc2(&i_this->field_0x16c8.z, i_this->field_0x16e0.z, 0.05f, + i_this->field_0x16f8.z * i_this->field_0x1710); + cLib_addCalc2(&i_this->field_0x16b0.x, i_this->field_0x16d4.x, 0.05f, + (i_this->field_0x16ec.x * i_this->field_0x1710)); + cLib_addCalc2(&i_this->field_0x16b0.y, i_this->field_0x16d4.y, 0.05f, + (i_this->field_0x16ec.y * i_this->field_0x1710)); + cLib_addCalc2(&i_this->field_0x16b0.z, i_this->field_0x16d4.z, 0.05f, + (i_this->field_0x16ec.z * i_this->field_0x1710)); + cLib_addCalc2(&i_this->field_0x1710, 0.01f, 1.0f, 0.0005f); + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + MtxPosition(&i_this->field_0x16b0, &i_this->field_0x16a4); + i_this->field_0x16a4 += a_this->current.pos; + MtxPosition(&i_this->field_0x16c8, &i_this->field_0x16bc); + i_this->field_0x16bc += a_this->current.pos; + if (i_this->field_0x16a0 == 130) { + local_194->mMode++; + player->changeDemoParam2(0); + } + if (i_this->field_0x16a0 == 220) { + i_this->field_0x169e = 0x23; + i_this->field_0x16a0 = 0; + dKy_change_colpat(4); + } + break; + case 0x23: + i_this->field_0x1714 = 55.0f; + i_this->field_0x16bc.set(-9110.0f, 492.0f, 331.0f); + i_this->field_0x16a4.set(-8469.0f, 372.0f, -54.0f); + if (i_this->field_0x16a0 == 10) { + daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); + } + + if (i_this->field_0x16a0 == 50) { + i_this->field_0x169e = 0x24; + i_this->field_0x16a0 = 0; + } + break; + case 0x24: + i_this->field_0x16b0.set(700.0f, 100.0f, 500.0f); + i_this->field_0x16c8.set(-10.0f, 350.0f, 80.0f); + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + MtxPosition(&i_this->field_0x16b0, &i_this->field_0x16a4); + i_this->field_0x16a4 += a_this->current.pos; + MtxPosition(&i_this->field_0x16c8, &i_this->field_0x16bc); + i_this->field_0x16bc += a_this->current.pos; + if (i_this->field_0x16a0 == 20) { + local_194->mMode++; + } + if (i_this->field_0x16a0 != 92) { + break; + } + i_this->field_0x169e = 0x25; + i_this->field_0x16a0 = 0; + fpcM_Search(s_wbstart_sub, a_this); + i_this->field_0x16bc.set(-12800.0f, 153.0f, 51.0f); + i_this->field_0x16a4.set(-12022.0f, 82.0f, 51.0f); + i_this->field_0x16e0.set(-13168.0f, 163.0f, -200.0f); + i_this->field_0x16d4.set(-12500.0f, 83.0f, -593.0f); + i_this->field_0x16ec.x = std::fabsf(i_this->field_0x16d4.x - + i_this->field_0x16a4.x); + i_this->field_0x16ec.y = std::fabsf(i_this->field_0x16d4.y - + i_this->field_0x16a4.y); + i_this->field_0x16ec.z = std::fabsf(i_this->field_0x16d4.z - + i_this->field_0x16a4.z); + i_this->field_0x16f8.x = std::fabsf(i_this->field_0x16e0.x - + i_this->field_0x16bc.x); + i_this->field_0x16f8.y = std::fabsf(i_this->field_0x16e0.y - + i_this->field_0x16bc.y); + i_this->field_0x16f8.z = std::fabsf(i_this->field_0x16e0.z - + i_this->field_0x16bc.z); + i_this->field_0x1710 = 0; + + // fallthrough + case 0x25: + if (i_this->field_0x16a0 < 110) { + fpcM_Search(s_spd0_sub, i_this); + } + if (i_this->field_0x16a0 < 0xd2) { + fpcM_Search(s_rdArrowWait_sub, i_this); + } + if (i_this->field_0x16a0 > 165) { + cam_3d_morf(i_this, 0.1f); + cLib_addCalc2(&i_this->field_0x1710, 0.01f, 1.0f, + 0.00015f); + } + if (i_this->field_0x16a0 == 245) { + dComIfGp_getVibration().StartQuake(4, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); + } + + if (i_this->field_0x16a0 == 295) { + dComIfGp_getVibration().StopQuake(0x1f); + } + + if (i_this->field_0x16a0 > 250 && i_this->field_0x16a0 < 285) { + cLib_addCalc2(&i_this->field_0x171c, 35.0f - 10.0f, 1.0f, + 3.0f); + } + + if (i_this->field_0x16a0 == 325) { + fpcM_Search(s_wbZrevise_sub, i_this); + } + + if (i_this->field_0x16a0 == 0x14f) { + i_this->field_0x169e = 0x26; + i_this->field_0x16a0 = 0; + i_this->field_0x7a2 = 0; + i_this->mActionID = ACT_B_RUN; + i_this->mActionMode = 0; + i_this->field_0x16bc.set(-8416.0f, 345.0f, 6.0f); + i_this->field_0x16a4.set(-8994.0f, 326.0f, 400.0f); + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_RDB_V_HOICK, -1); + local_194->field_0x990[3] = 700; + } + break; + case 0x26: + if (i_this->field_0x16a0 == 50) { + local_184->mCamera.Reset(i_this->field_0x16bc, i_this->field_0x16a4); + local_184->mCamera.Start(); + local_184->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + horse->cancelOriginalDemo(); + i_this->field_0x169e = 0; + Z2GetAudioMgr()->subBgmStart(Z2BGM_HORSE_BATTLE); + dKy_change_colpat(3); + } + break; + case 0x28: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0); + a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + local_184->mCamera.Stop(); + local_184->mCamera.SetTrimSize(3); + i_this->field_0x169e = 0x29; + i_this->field_0x1714 = 55.0f; + i_this->field_0x16a0 = 0; + i_this->field_0x1710 = 0; + i_this->field_0x16bc.set(36156.0f, 985.0f, -16931.0f); + i_this->field_0x16a4.set(36496.0f, 1358.0f, -17344.0f); + i_this->field_0x16e0.set(36453.0f, 1116.0f, -16995.0f); + i_this->field_0x16d4.set(35835.0f, 955.0f, -16867.0f); + i_this->field_0x16ec.x = std::fabsf(i_this->field_0x16d4.x - i_this->field_0x16a4.x) * 0.3f; + i_this->field_0x16ec.y = std::fabsf(i_this->field_0x16d4.y - i_this->field_0x16a4.y) * 0.3f; + i_this->field_0x16ec.z = std::fabsf(i_this->field_0x16d4.z - i_this->field_0x16a4.z) * 0.3f; + i_this->field_0x16f8.x = std::fabsf(i_this->field_0x16e0.x - i_this->field_0x16bc.x); + i_this->field_0x16f8.y = std::fabsf(i_this->field_0x16e0.y - i_this->field_0x16bc.y); + i_this->field_0x16f8.z = std::fabsf(i_this->field_0x16e0.z - i_this->field_0x16bc.z); + daPy_getPlayerActorClass()->changeOriginalDemo(); + horse->changeOriginalDemo(); + cStack_48.set(34800.0f, -300.0f, -15200.0f); + horse->setHorsePosAndAngle(&cStack_48, -0x8000); + horse->changeDemoMode(3, 0); + cStack_48.set(34800.0f, -300.0f, -20000.0f); + horse->changeDemoPos0(&cStack_48); + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[87]); + Z2GetAudioMgr()->bgmStart(Z2BGM_HORSE_BATTLE_D02, 0, 0); + dComIfGp_getEvent().startCheckSkipEdge(i_this); + // fallthrough + case 0x29: + if (i_this->field_0x16a0 == 30) { + horse->changeDemoMode(8, 0); + } + + if (i_this->field_0x16a0 > 70) { + cam_3d_morf(i_this, 0.2f); + cLib_addCalc2(&i_this->field_0x1710, 0.2f, 1.0f, 0.01f); + if (i_this->field_0x16a0 == 150) { + i_this->field_0x16bc.set(35528.0f, 316.0f, -16987.0f); + i_this->field_0x16a4.set(35059.0f, -128.0f, -16992.0f); + i_this->field_0x16ec.set(0.0f, 0.0f, 0.0f); + i_this->field_0x16e0.set(34973.0f, -148.0f, -16346.0f); + i_this->field_0x16f8.x = + std::fabsf(i_this->field_0x16e0.x - i_this->field_0x16bc.x); + i_this->field_0x16f8.y = + std::fabsf(i_this->field_0x16e0.y - i_this->field_0x16bc.y); + i_this->field_0x16f8.z = + std::fabsf(i_this->field_0x16e0.z - i_this->field_0x16bc.z); + i_this->field_0x1710 = 0; + i_this->field_0x169e = 0x2a; + i_this->field_0x16a0 = 0; + } + } + break; + case 0x2a: + i_this->field_0x1710 = 0.075f; + cam_3d_morf(i_this, 0.5f); + if (i_this->field_0x16a0 == 20) { + i_this->field_0x1722 = 1; + i_this->field_0x1718 = 0.0f; + Z2GetAudioMgr()->seStart(Z2SE_OBJ_STRAWFENCE_IGNITION, &saku_p, 0, 0, 1.0f, 1.0f, -1.0f, + -1.0f, 0); + Z2GetAudioMgr()->seStart(Z2SE_OBJ_STRAWFENCE_IGNITION, &saku_p2, 0, 0, 1.0f, 1.0f, + -1.0f, -1.0f, 0); + } + + if (i_this->field_0x16a0 == 23) { + horse->changeDemoMode(9, 0); + } + + if (i_this->field_0x16a0 == 83) { + i_this->field_0x16bc.set(34800.0f, 15.7f, -16820.0f); + i_this->field_0x16a4.set(34800.0f, 10.0f, -16170.0f); + i_this->field_0x1710 = 0; + i_this->field_0x1714 = 55.0f; + i_this->field_0x169e = 0x2b; + i_this->field_0x16a0 = 0; + i_this->mActionMode = -100; + } + break; + case 0x2b: + if (i_this->field_0x16a0 == 5) { + horse->changeDemoMode(1, 0); + daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); + fpcM_Search(s_rddel_sub, i_this); + } + + if (i_this->field_0x16a0 > 40) { + cLib_addCalc2(&i_this->field_0x1714, 4.5f, 0.4f, 3.5f); + if (i_this->field_0x16a0 == 130) { + i_this->field_0x16bc.set(34843.0f, -92.7f, -35956.0f); + i_this->field_0x16a4.set(35167.0f, -202.0f, -35403.0f); + i_this->field_0x16e0.set(34740.0f, -92.7f, -35966.0f); + i_this->field_0x16d4.set(34320.0, -202.0, -35490.0); + i_this->field_0x16ec.x = + std::fabsf(i_this->field_0x16d4.x - i_this->field_0x16a4.x); + i_this->field_0x16ec.y = + std::fabsf(i_this->field_0x16d4.y - i_this->field_0x16a4.y); + i_this->field_0x16ec.z = + std::fabsf(i_this->field_0x16d4.z - i_this->field_0x16a4.z); + i_this->field_0x16f8.x = + std::fabsf(i_this->field_0x16e0.x - i_this->field_0x16bc.x); + i_this->field_0x16f8.y = + std::fabsf(i_this->field_0x16e0.y - i_this->field_0x16bc.y); + i_this->field_0x16f8.z = + std::fabsf(i_this->field_0x16e0.z - i_this->field_0x16bc.z); + i_this->field_0x1714 = 55.0f; + i_this->field_0x169e = 0x2c; + i_this->field_0x16a0 = 0; + i_this->field_0x698[0] = 0x14; + } + } + break; + case 0x2c: + cam_3d_morf(i_this, 0.05f); + cLib_addCalc2(&i_this->field_0x1710, 0.005f, 1.0f, 0.0002f); + if (i_this->field_0x16a0 == 170) { + i_this->mActionMode++; + } + + if (i_this->field_0x16a0 == 258) { + cStack_48.set(34800.0f, -300.0f, -18700.0f); + horse->setHorsePosAndAngle(&cStack_48, horse->shape_angle.y); + } + if (i_this->field_0x16a0 == 306) { + local_184->mCamera.Reset(i_this->field_0x16bc, i_this->field_0x16a4); + local_184->mCamera.Start(); + local_184->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + horse->cancelOriginalDemo(); + i_this->field_0x169e = 0; + Z2GetAudioMgr()->subBgmStart(Z2BGM_FACE_OFF_BATTLE2); + } + break; + case 0x32: + if (!rdb->enemy.eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(&rdb->enemy, 2, 0xffff, 0); + rdb->enemy.eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + local_184->mCamera.Stop(); + local_184->mCamera.SetTrimSize(3); + i_this->field_0x169e = 0x33; + i_this->field_0x1714 = 55.0f; + i_this->field_0x16a0 = 0; + i_this->field_0x1710 = 0; + i_this->field_0x16bc.set(1679.0, 100.0, 852.0); + i_this->field_0x16a4.set(1873.0, 64.0, 527.0); + daPy_getPlayerActorClass()->changeOriginalDemo(); + dComIfGp_getEvent().startCheckSkipEdge(i_this); + dComIfGs_onOneZoneSwitch(4, -1); + case 0x33: + if (i_this->field_0x16a0 < 30) { + cStack_48.set(1787.0f, 1.75f, 484.0f); + player->setPlayerPosAndAngle(&cStack_48, -0x12c3, 0); + } + + if (i_this->field_0x16a0 == 30) { + player->changeDemoMode(2, 1, 0, 0); + cStack_48.set(1634.0, 1.4, 811.0); + player->changeDemoPos0(&cStack_48); + } + + if (i_this->field_0x16a0 == 139) { + rdb->field_0x6d8 = 2; + } + + if (i_this->field_0x16a0 == 0x8c) { + i_this->field_0x169e = 0x34; + i_this->field_0x16a0 = 0; + cMtx_YrotS(*calc_mtx, rdb->enemy.shape_angle.y); + local_3c.x = 0.0f; + local_3c.y = 150.0f; + local_3c.z = 800.0f; + MtxPosition(&local_3c, &i_this->field_0x16a4); + i_this->field_0x16a4 += rdb->enemy.current.pos; + i_this->field_0x16bc = rdb->enemy.current.pos; + i_this->field_0x16bc.y += 150.0f; + rdb->mMode = 2; + rdb->field_0x6b8[0] = 0x28; + case 0x34: + cLib_addCalc0(&rdb->field_0x6e0, 1.0f, 0.3f); + if (i_this->field_0x16a0 == 145) { + rdb->field_0x6d8 = 3; + } + if (i_this->field_0x16a0 == 0xaf) { + rdb->mMode = 4; + } + if (i_this->field_0x16a0 == 0x138) { + i_this->mActionID = 0x18; + i_this->mActionMode = 0; + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_DAMAGE, -1); + cXyz cStack_6c(a_this->current.pos); + cStack_6c.y += 150.0f; + dComIfGp_setHitMark(3, 0, &cStack_6c, &a_this->shape_angle, 0, 0); + } + if (i_this->field_0x16a0 == 315) { + i_this->field_0x16bc.set(1717.0f, 96.0f, 910.0f); + i_this->field_0x16a4.set(2226.0f, 56.0f, 751.0f); + i_this->field_0x16e0.set(1780.0f, 92.0f, 967.0f); + i_this->field_0x16d4.set(1988.0f, 69.0f, 475.0f); + i_this->field_0x16ec.x = + std::fabsf(i_this->field_0x16d4.x - i_this->field_0x16a4.x); + i_this->field_0x16ec.y = + std::fabsf(i_this->field_0x16d4.y - i_this->field_0x16a4.y); + i_this->field_0x16ec.z = + std::fabsf(i_this->field_0x16d4.z - i_this->field_0x16a4.z); + i_this->field_0x16f8.x = + std::fabsf(i_this->field_0x16e0.x - i_this->field_0x16bc.x); + i_this->field_0x16f8.y = + std::fabsf(i_this->field_0x16e0.y - i_this->field_0x16bc.y); + i_this->field_0x16f8.z = + std::fabsf(i_this->field_0x16e0.z - i_this->field_0x16bc.z); + i_this->field_0x1710 = 0; + player->setPlayerPosAndAngle(&player->current.pos, player->shape_angle.y - 4000, 0); + } + if (i_this->field_0x16a0 == 345) { + daPy_getPlayerActorClass()->setThrowDamage(rdb->enemy.shape_angle.y - 8000, 40.0f, + 25.0f, 0, 1, 0); + daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0); + cXyz cStack_78(player->current.pos); + cStack_78.y += 150.0f; + dComIfGp_setHitMark(3, 0, &cStack_78, &player->shape_angle, 0, 0); + } + + if (i_this->field_0x16a0 == 418) { + daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); + } + + if (i_this->field_0x16a0 >= 378) { + cam_3d_morf(i_this, 0.1f); + cLib_addCalc2(&i_this->field_0x1710, 0.05f, 1.0f, 0.001f); + } + + if (i_this->field_0x16a0 >= 490) { + local_184->mCamera.Reset(i_this->field_0x16bc, i_this->field_0x16a4); + local_184->mCamera.Start(); + local_184->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + i_this->field_0x169e = 0; + rdb->mMode = 7; + Z2GetAudioMgr()->subBgmStart(Z2BGM_FACE_OFF_BATTLE3); + } + } + break; + case 0x3c: + if (!rdb->enemy.eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(&rdb->enemy, 2, 0xffff, 0); + rdb->enemy.eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + local_184->mCamera.Stop(); + local_184->mCamera.SetTrimSize(3); + i_this->field_0x169e = 0x3d; + i_this->field_0x1714 = 55.0f; + i_this->field_0x16a0 = 0; + i_this->field_0x1710 = 0; + i_this->field_0x16bc.set(2297.0f, 81.0f, 1668.0f); + i_this->field_0x16a4.set(2285.0f, 95.0f, 1988.0f); + rdb->enemy.current.pos.set(2341.0f, 1.0f, 1292.0f); + rdb->enemy.current.angle.y = 0x958; + rdb->enemy.shape_angle.y = 0x958; + daPy_getPlayerActorClass()->changeOriginalDemo(); + daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); + dComIfGs_onOneZoneSwitch(5, -1); + // fallthrough + case 0x3d: + if (i_this->field_0x16a0 == 170) { + daPy_getPlayerActorClass()->changeDemoMode(0xc, 0, 0, 0); + } + + cStack_48.set(2120.0f, player->current.pos.y, 1200.0f); + player->setPlayerPosAndAngle(&cStack_48, 5300, 0); + cStack_60.y = rdb->enemy.eyePos.y; + if (cStack_60.y < 81.0f) { + cStack_60.y = 81.0f; + } + + if (cStack_60.y > 120.0f) { + cStack_60.y = 120.0f; + } + + cLib_addCalc2(&i_this->field_0x16bc.y, cStack_60.y, 0.1f, 10.0f); + if (i_this->field_0x16a0 == 260) { + rdb->mMode = 3; + } + + if (i_this->field_0x16a0 == 630) { + i_this->field_0x16bc.set(2272.0f, 136.0f, 1555.0f); + i_this->field_0x16a4.set(2056.0f, 160.0f, 1318.0f); + i_this->field_0x169e = 0x3e; + i_this->field_0x16a0 = 0; + } + break; + case 0x3e: + daObjCRVSTEEL_c* crvSteel = (daObjCRVSTEEL_c*)fopAcM_SearchByName(PROC_Obj_CRVSTEEL); + if (i_this->field_0x16a0 == 20) { + crvSteel->OpenSet(20.0f, 350.0f); + Z2GetAudioMgr()->seStart(Z2SE_OBJ_CRVN_URA_GATE, &crvSteel->current.pos, 0, 0, 1.0f, + 1.0f, -1.0f, -1.0f, 0); + } + + if (i_this->field_0x16a0 == 130) { + crvSteel->CloseSet(-40.0f); + } + + if (i_this->field_0x16a0 == 140) { + dComIfGp_getVibration().StartShock(5, 0x4f, cXyz(0.0f, 1.0f, 0.0f)); + } + + if (i_this->field_0x16a0 != 170) { + break; + } + rdb->mMode = 10; + rdb->field_0x680 = 0; + i_this->field_0x16e0.set(2834.0f, 490.0f, 1584.0f); + i_this->field_0x16d4.set(1978.0f, 87.0f, 1225.0f); + i_this->field_0x16ec.x = std::fabsf(i_this->field_0x16d4.x - i_this->field_0x16a4.x); + i_this->field_0x16ec.y = std::fabsf(i_this->field_0x16d4.y - i_this->field_0x16a4.y); + i_this->field_0x16ec.z = std::fabsf(i_this->field_0x16d4.z - i_this->field_0x16a4.z); + i_this->field_0x16f8.x = std::fabsf(i_this->field_0x16e0.x - i_this->field_0x16bc.x); + i_this->field_0x16f8.y = std::fabsf(i_this->field_0x16e0.y - i_this->field_0x16bc.y); + i_this->field_0x16f8.z = std::fabsf(i_this->field_0x16e0.z - i_this->field_0x16bc.z); + i_this->field_0x1710 = 0; + i_this->field_0x169e = 0x3f; + i_this->field_0x16a0 = 0; + // fallthrough + case 0x3f: + if (i_this->field_0x16a0 == 40) { + rdb->field_0xfe4 = 1; + Z2GetAudioMgr()->bgmStart(Z2BGM_EVENT02, 0, 0); + } + + if (i_this->field_0x16a0 == 60) { + rdb->field_0x6d8 = 4; + } + + if (i_this->field_0x16a0 > 60) { + cam_3d_morf(i_this, 0.05f); + cLib_addCalc2(&i_this->field_0x1710, 0.05f, 1.0f, 0.0002); + } + + if (i_this->field_0x16a0 == 110) { + daPy_getPlayerActorClass()->changeDemoMode(0x14, 0, 0, 0); + } + + if (i_this->field_0x16a0 != 220) { + break; + } + + i_this->field_0x16bc.set(1425.0f, 259.0f, 1583.0f); + i_this->field_0x16a4.set(2265.0f, 127.0f, 1011.0f); + i_this->field_0x16e0.set(1267.0f, 259.0f, 821.0f); + i_this->field_0x16d4.set(2265.0f, 127.0f, 1011.0f); + i_this->field_0x16ec.x = std::fabsf(i_this->field_0x16d4.x - i_this->field_0x16a4.x); + i_this->field_0x16ec.y = std::fabsf(i_this->field_0x16d4.y - i_this->field_0x16a4.y); + i_this->field_0x16ec.z = std::fabsf(i_this->field_0x16d4.z - i_this->field_0x16a4.z); + i_this->field_0x16f8.x = std::fabsf(i_this->field_0x16e0.x - i_this->field_0x16bc.x); + i_this->field_0x16f8.y = std::fabsf(i_this->field_0x16e0.y - i_this->field_0x16bc.y); + i_this->field_0x16f8.z = std::fabsf(i_this->field_0x16e0.z - i_this->field_0x16bc.z); + i_this->field_0x1710 = 0; + i_this->field_0x1714 = 60.0f; + i_this->field_0x169e = 0x40; + i_this->field_0x16a0 = 0; + daPy_getPlayerActorClass()->changeDemoMode(0x14, 0, 0, 0); + // fallthrough + case 0x40: + if (i_this->field_0x16a0 > 60) { + cam_3d_morf(i_this, 0.05f); + cLib_addCalc2(&i_this->field_0x1710, 0.05f, 1.0f, 0.0002f); + } + + if (i_this->field_0x16a0 == 170) { + i_this->field_0x1720 = 0; + } + + if (i_this->field_0x16a0 == 250) { + local_184->mCamera.Reset(i_this->field_0x16bc, i_this->field_0x16a4); + local_184->mCamera.Start(); + local_184->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + i_this->field_0x169e = 0; + } + break; + case 0x46: + if (!rdb->enemy.eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(&rdb->enemy, 2, 0xffff, 0); + rdb->enemy.eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + local_184->mCamera.Stop(); + local_184->mCamera.SetTrimSize(3); + i_this->field_0x169e = 0x47; + i_this->field_0x1714 = 55.0f; + i_this->field_0x16a0 = 0; + i_this->field_0x1710 = 0; + i_this->field_0x16bc.set(1895.0, 159.0, -129.0); + i_this->field_0x16a4.set(1984.0, 151.0, 158.0); + daPy_getPlayerActorClass()->changeOriginalDemo(); + fpcM_Search(s_rddel_sub, i_this); + rdb->field_0x6d8 = 1; + // fallthrough + case 0x47: + cStack_48.set(1800.0f, player->current.pos.y, -192.0f); + player->setPlayerPosAndAngle(&cStack_48, 0, 0); + if (i_this->field_0x16a0 == 2) { + daObjCRVGATE_c* crvGate = (daObjCRVGATE_c*)fopAcM_SearchByName(PROC_Obj_CRVGATE); + crvGate->SetB_Close(); + } + + if (i_this->field_0x16a0 == 25) { + daPy_getPlayerActorClass()->changeDemoMode(0x19, 0, 0, 0); + } + + if (i_this->field_0x16a0 == 73) { + local_184->mCamera.Reset(i_this->field_0x16bc, i_this->field_0x16a4); + local_184->mCamera.Start(); + local_184->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + i_this->field_0x169e = 0; + } + break; + case 0x50: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0); + a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + + local_184->mCamera.Stop(); + local_184->mCamera.SetTrimSize(3); + i_this->field_0x169e = 0x51; + i_this->field_0x1714 = 55.0f; + i_this->field_0x16a0 = 0; + i_this->field_0x1710 = 0.0f; + a_this->current.pos.x = 1800.0f; + a_this->current.pos.z = 0.0f; + i_this->field_0x16bc.set(1631.0f, 195.0f, -224.0f); + i_this->field_0x16a4.set(1233.0f, 167.0f, 195.0f); + daPy_getPlayerActorClass()->changeOriginalDemo(); + // fallthrough + case 0x51: + a_this->current.angle.y = 0x8000; + a_this->shape_angle.y = 0x8000; + i_this->mTargetAngleStep = 0; + cLib_addCalc2(&i_this->field_0x16bc.x, a_this->eyePos.x, 0.2f, 200.0f); + cLib_addCalc2(&i_this->field_0x16bc.y, a_this->eyePos.y, 0.2f, 200.0f); + cLib_addCalc2(&i_this->field_0x16bc.z, a_this->eyePos.z, 0.2f, 200.0f); + if (i_this->field_0x16a0 > 20) { + if (i_this->field_0x16a0 >= 52) { + if (i_this->field_0x16a0 == 52) { + i_this->field_0x16a4 = a_this->current.pos; + i_this->field_0x16a4.x += 300.0f; + i_this->field_0x16a4.y += 150.0f; + i_this->field_0x16a4.z -= 1400.0f; + } + } else { + i_this->field_0x16a4 = a_this->current.pos; + i_this->field_0x16a4.y += 400.0f; + i_this->field_0x16a4.z += 700.0f; + } + } + if (i_this->field_0x16a0 == 140) { + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[90]); + dComIfGp_setNextStage("F_SP118", 0, 3, 0, 0.0f, 0, 1, 0, 0, 1, 0); + } + break; + case 0x5a: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0); + a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + local_184->mCamera.Stop(); + local_184->mCamera.SetTrimSize(3); + i_this->field_0x169e = 0x5b; + i_this->field_0x16a0 = 0; + i_this->field_0x1714 = 55.0; + i_this->field_0x16a0 = 0; + i_this->field_0x1710 = 0; + daPy_getPlayerActorClass()->changeOriginalDemo(); + horse->changeOriginalDemo(); + a_this->current.pos.set(-93640.0f, a_this->current.pos.y, 44000.0f); + a_this->shape_angle.y = 0x8000; + a_this->current.angle.y = 0x8000; + i_this->field_0x16bc = a_this->current.pos; + i_this->field_0x16bc.y = a_this->eyePos.y + 200.0f; + i_this->field_0x16a4 = a_this->current.pos; + i_this->field_0x16a4.y += 300.0f; + i_this->field_0x16a4.z += 500.0f; + horse->changeDemoMode(1, 0); + daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0); + // fallthrough + case 0x5b: + cStack_48.set(-93335.0f, horse->current.pos.y, 44500.0f); + horse->setHorsePosAndAngle(&cStack_48, 0); + cLib_addCalc2(&i_this->field_0x16bc.x, a_this->eyePos.x, 0.2f, + 200.0f); + cLib_addCalc2(&i_this->field_0x16bc.y, a_this->eyePos.y + 150.0f, 0.2f, + 200.0f); + cLib_addCalc2(&i_this->field_0x16bc.z, a_this->eyePos.z, 0.2f, + 200.0f); + i_this->field_0x16a4.z += a_this->speed.z * 0.8f; + if (i_this->field_0x16a0 == 111) { + i_this->field_0x169e = 0x5c; + i_this->field_0x16a0 = 0; + i_this->field_0x16a4 = a_this->current.pos; + i_this->field_0x16a4.x += -300.0f; + i_this->field_0x16a4.y += 100.0f; + i_this->field_0x16a4.z += -1300.0f; + } + + i_this->field_0x171c = 23.0f; + if (!daPy_getPlayerActorClass()->checkHorseRide()) { + local_184->mCamera.Start(); + local_184->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + i_this->field_0x169e = 0; + } + break; + case 0x5c: + cLib_addCalc2(&i_this->field_0x16bc.x, a_this->eyePos.x, 0.2f, 200.0f); + cLib_addCalc2(&i_this->field_0x16bc.y, a_this->eyePos.y + 100.0f, 0.2f, 200.0f); + cLib_addCalc2(&i_this->field_0x16bc.z, a_this->eyePos.z, 0.2f, 200.0f); + if (i_this->field_0x16a0 != 60) { + break; + } + + i_this->field_0x169e = 0x5d; + i_this->field_0x16a0 = 0; + i_this->field_0x16a4 = a_this->current.pos; + i_this->field_0x16a4.x += 100.0f; + i_this->field_0x16a4.y += 600.0f; + i_this->field_0x16a4.z += -500.0f; + i_this->field_0x16bc = local_194->actor.current.pos; + i_this->field_0x16bc.y = local_194->actor.current.pos.y + 100.0f; + // fallthrough + case 0x5d: + if (local_194 != NULL) { + cLib_addCalc2(&i_this->field_0x1710, 1000.0f, 1.0f, 100.0f); + cLib_addCalc2(&i_this->field_0x16bc.x, local_194->actor.current.pos.x, 0.5f, + i_this->field_0x1710); + cLib_addCalc2(&i_this->field_0x16bc.y, local_194->actor.current.pos.y + 100.0f, 0.5f, + i_this->field_0x1710); + cLib_addCalc2(&i_this->field_0x16bc.z, local_194->actor.current.pos.z, 0.5f, + i_this->field_0x1710); + cLib_addCalc2(&i_this->field_0x16a4.x, local_194->actor.current.pos.x - 10.0f, 0.05f, + 12.0f); + if (i_this->field_0x16a0 >= 40) { + if (i_this->field_0x16a0 == 40) { + i_this->field_0x5c4 = local_194->actor.current.pos; + } + + for (int i = 0; i < 2; i++) { + static u16 key_eno[2] = { + dPa_RM(ID_ZM_S_KEYLIGHT00), + dPa_RM(ID_ZM_S_KEYLIGHT01), + }; + i_this->field_0x17d0[i] = dComIfGp_particle_set( + i_this->field_0x17d0[i], key_eno[i], &i_this->field_0x5c4, 0, 0); + } + local_3c = player->eyePos - i_this->field_0x5c4; + cMtx_YrotS(*calc_mtx, cM_atan2s(local_3c.x, local_3c.z)); + cMtx_XrotM(*calc_mtx, -cM_atan2s(local_3c.y, JMAFastSqrt( + local_3c.x * local_3c.x + local_3c.z * local_3c.z))); + local_3c.x = 0.0f; + local_3c.y = 0.0f; + local_3c.z = 30.0f; + MtxPosition(&local_3c, &cStack_48); + i_this->field_0x5c4 += cStack_48; + } + + if (i_this->field_0x16a0 == 100) { + i_this->field_0x169e = 0x5e; + i_this->field_0x16a0 = 0; + i_this->field_0x16a4.set(-93217.0f, -5783.0f, 44734.0f); + i_this->field_0x16bc.set(-92351.0f, -4742.0f, 43295.0f); + i_this->field_0x5c4 = i_this->field_0x16bc; + i_this->field_0x1430 = 1; + a_this->current.angle.y = player->shape_angle.y; + fopAcM_delete(&local_194->actor); + } + } + break; + case 0x5e: + for (int i = 0; i < 2; i++) { + static u16 key_eno[2] = { + dPa_RM(ID_ZM_S_KEYLIGHT00), + dPa_RM(ID_ZM_S_KEYLIGHT01), + }; + i_this->field_0x17d0[i] = dComIfGp_particle_set(i_this->field_0x17d0[i], key_eno[i], + &i_this->field_0x5c4, 0, 0); + } + local_3c = player->eyePos - i_this->field_0x5c4; + if (local_3c.abs() < 50.0f) { + i_this->field_0x169e = 0x5f; + i_this->field_0x16a0 = 0; + daPy_getPlayerActorClass()->changeDemoMode(0x3b, 0, 0, 0); + i_this->field_0x5c4 = player->eyePos; + } else { + cMtx_YrotS(*calc_mtx, cM_atan2s(local_3c.x, local_3c.z)); + cMtx_XrotM(*calc_mtx, -cM_atan2s(local_3c.y, JMAFastSqrt(local_3c.x * local_3c.x + local_3c.z * local_3c.z))); + local_3c.x = 0.0f; + local_3c.y = 0.0f; + local_3c.z = 30.0f; + MtxPosition(&local_3c, &cStack_48); + i_this->field_0x5c4 += cStack_48; + } + // fallthrough + case 0x5f: + cLib_addCalc2(&i_this->field_0x16bc.x, i_this->field_0x5c4.x, 0.2f, 100.0f); + cLib_addCalc2(&i_this->field_0x16bc.y, i_this->field_0x5c4.y, 0.2f, 100.0f); + cLib_addCalc2(&i_this->field_0x16bc.z, i_this->field_0x5c4.z, 0.2f, 100.0f); + if (i_this->field_0x169e == 95) { + if (i_this->field_0x16a0 == 50) { + daPy_getPlayerActorClass()->changeDemoMode(0xb, 0xf3, 0, 0); + } + if (i_this->field_0x16a0 >= 60) { + cLib_addCalc2(&i_this->field_0x1714, 30.0f, 0.2f, + 1.5f); + } + if (i_this->field_0x16a0 >= 120 && !dMsgObject_isTalkNowCheck()) + { + i_this->field_0x169e = 0x60; + i_this->field_0x16a0 = 0; + daPy_getPlayerActorClass()->changeDemoMode(1, 1, 0, 0); + i_this->field_0x16bc.set(-93375.0f, -5700.0f, 44622.0f); + i_this->field_0x16a4.set(-93153.0f, -5635.0f, 44717.0f); + i_this->field_0x1714 = 55.0f; + a_this->current.pos = player->current.pos; + a_this->current.pos.z += 3000.0f; + } + } + break; + case 0x60: + if (i_this->field_0x16a0 >= 100) { + fopAc_ac_c* local_1b0 = fopAcM_SearchByName(PROC_NPC_COACH); + a_this->current.pos = local_1b0->eyePos; + a_this->current.pos.z = a_this->current.pos.z; + } + if (i_this->field_0x16a0 >= 220 && !dMsgObject_isTalkNowCheck()) + { + i_this->field_0x169e = 0x61; + i_this->field_0x16a0 = 0; + } + break; + case 0x61: + fopAc_ac_c* local_1b4 = fopAcM_SearchByName(PROC_NPC_COACH); + a_this->current.pos = local_1b4->eyePos; + a_this->current.pos.z = a_this->current.pos.z; + if (i_this->field_0x16a0 == 120) { + dComIfGp_setNextStage("F_SP121", 99, 13, 2, 0.0f, 0, 1, 0, 0, 1, + 0); + } + } + if (i_this->field_0x169e != 0) { + cStack_60 = i_this->field_0x16bc; + cStack_54 = i_this->field_0x16a4; + s16 local_1d0 = 0; + if (i_this->field_0x171c > 0.0f) { + i_this->field_0x16bc.y += i_this->field_0x171c * cM_ssin(i_this->field_0x16a0 * 0x2400); + local_1d0 = 10.0f * + (i_this->field_0x171c * cM_scos(i_this->field_0x16a0 * 0x2100)); + cLib_addCalc0(&i_this->field_0x171c, 1.0f, 1.5f); + } + local_184->mCamera.Set(cStack_60, cStack_54, local_1d0, i_this->field_0x1714); + i_this->field_0x16a0++; + if (i_this->field_0x16a0 > 10000) { + i_this->field_0x16a0 = 10000; + } + + if (i_this->field_0x169e < 10 || (i_this->field_0x169e >= 30 && i_this->field_0x169e < 60)) { + if (dComIfGp_getEvent().checkSkipEdge()) { + cDmr_SkipInfo = 0x28; + Z2GetAudioMgr()->bgmStop(0, 0); + if (i_this->field_0x169e < 10 || dComIfG_play_c::getLayerNo(0) == 4) { + dComIfGp_setNextStage("F_SP102", 1, 0, 4, 0.0f, 0, 1, 13, + 0, 1, 0); + Z2GetAudioMgr()->bgmStreamStop(0x1e); + if (i_this->field_0x169e < 10) { + cDmr_SkipInfo = 0; + } + i_this->field_0x169e = 1000; + } else if (i_this->field_0x169e < 50) { + dComIfGp_setNextStage("F_SP102", 0, 0, 0, 0.0f, 0, 1, 13, + 0, 1, 0); + Z2GetAudioMgr()->bgmStreamStop(0x1e); + i_this->field_0x169e = 1000; + } else { + cDmr_SkipInfo = 0; + mDoGph_gInf_c::fadeIn(0.066, g_blackColor); + i_this->mActionID = ACT_LR_DAMAGE; + anm_init(i_this, 0x12, 0.0f, 2, 1.0); + i_this->mActionMode = 3; + a_this->current.pos.x = 828.0f; + a_this->current.pos.z = 554.0f; + a_this->shape_angle.y = 0x800; + a_this->current.angle.y = 0x800; + rdb->mMode = 7; + rdb->field_0xfcf = 0; + rdb->field_0x6e0 = 0; + rdb->field_0x6d8 = 3; + local_184->mCamera.Reset(i_this->field_0x16bc, i_this->field_0x16a4); + local_184->mCamera.Start(); + local_184->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + i_this->field_0x169e = 0; + Z2GetAudioMgr()->subBgmStart(Z2BGM_FACE_OFF_BATTLE3); + } + } + } + } } /* 807DFB18-807E0388 00D778 0870+00 1/1 0/0 0/0 .text anm_se_eff_set__FP10e_wb_class */ static void anm_se_eff_set(e_wb_class* i_this) { - // NONMATCHING + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + J3DModel* model = i_this->mpModelMorf->getModel(); + + if (i_this->mAnmID == 12 || i_this->mAnmID == 13) { + if (i_this->mpModelMorf->checkFrame(9.0f)) { + i_this->mZ2Ride.startCreatureSound(Z2SE_CM_BODYFALL_L, 0, -1); + i_this->field_0x1721 = 1; + } + } else if (i_this->mAnmID == 38) { + i_this->field_0x17c4 = dComIfGp_particle_set( + i_this->field_0x17c4, dPa_RM(ID_ZI_S_BB_STARTHANAIKI), + &a_this->current.pos, &a_this->tevStr); + + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->field_0x17c4); + if (emitter != NULL) { + emitter->setGlobalSRTMatrix(model->getAnmMtx(15)); + } + + if (i_this->mpModelMorf->checkFrame(1.0f)) { + cXyz scale(a_this->scale.z, a_this->scale.z, a_this->scale.z); + dComIfGp_particle_set(dPa_RM(ID_ZI_S_BB_STARTCLOD), &a_this->current.pos, + &a_this->tevStr, &a_this->shape_angle, &scale); + dComIfGp_particle_set(dPa_RM(ID_ZI_S_BB_STARTFOOTMARK), &a_this->current.pos, + &a_this->tevStr, &a_this->shape_angle, &scale); + } + } else if (i_this->mAnmID == 5) { + if (i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_CRASH, -1); + i_this->mZ2Ride.startCreatureSound(Z2SE_EN_WB_RUNDOWN, 0, -1); + } else if (i_this->mpModelMorf->checkFrame(15.0f)) { + i_this->mZ2Ride.startCreatureSound(Z2SE_CM_BODYFALL_L, 0, -1); + } + } else if (i_this->mAnmID == 6) { + if (i_this->mpModelMorf->checkFrame(2.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_UP, -1); + } + } else if (i_this->mAnmID == 7) { + if (i_this->mpModelMorf->checkFrame(18.0f) || i_this->mpModelMorf->checkFrame(40.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_BREATH, -1); + } + } else if (i_this->mAnmID == 8) { + if (i_this->mpModelMorf->checkFrame(4.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_INANAKI_DMG, -1); + } + } else if (i_this->mAnmID == 12) { + if (i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_DOWN, -1); + } + } else if (i_this->mAnmID == 13) { + if (i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_DOWN, -1); + } + } else if (i_this->mAnmID == 16) { + if (i_this->mpModelMorf->checkFrame(12.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_BREATH, -1); + } + } else if (i_this->mAnmID == 17) { + if (i_this->mpModelMorf->checkFrame(16.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_BREATH, -1); + } + } else if (i_this->mAnmID == 9) { + if (i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_DAMAGE, -1); + } + } else if (i_this->mAnmID == 27) { + if (i_this->mpModelMorf->checkFrame(14.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_INANAKI, -1); + } + } else if (i_this->mAnmID == 31) { + if (i_this->mpModelMorf->checkFrame(2.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_RIDE, -1); + } + } else if (i_this->mAnmID == 32 || i_this->mAnmID == 33) { + if (i_this->mpModelMorf->checkFrame(7.5f) || i_this->mpModelMorf->checkFrame(12.5f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_BREATH, -1); + } + } else if (i_this->mAnmID == 34) { + if (i_this->mpModelMorf->checkFrame(3.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_DAMAGE, -1); + } + } else if (i_this->mAnmID == 40) { + if (i_this->mpModelMorf->checkFrame(6.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_BREATH, -1); + } + } else if (i_this->mAnmID == 42) { + if (i_this->mpModelMorf->checkFrame(11.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_BREATH, -1); + } + } else if (i_this->mAnmID == 43) { + if (i_this->mpModelMorf->checkFrame(25.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_BREATH, -1); + } + } + + // Special sound effects for the leader Bulblin + if (i_this->field_0x79d != 0) { + if (i_this->mAnmID == 0x20 || i_this->mAnmID == 0x21) { + if (i_this->mpModelMorf->checkFrame(4.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_BB_V_BREATH, -1); + } + } else if (i_this->mAnmID == 0x2B) { + if (i_this->mpModelMorf->checkFrame(14.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_BB_V_BREATH, -1); + } + } else if (i_this->mAnmID == 0x2A) { + if (i_this->mpModelMorf->checkFrame(6.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_BB_V_BREATH, -1); + } + } else if (i_this->mAnmID == 0x1B) { + if (i_this->mpModelMorf->checkFrame(17.0f)) { + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_BB_V_INANAKI, -1); + } + } + } } -/* 807E382C-807E3850 0002BC 0024+00 0/0 0/0 0/0 .bss sh_pos$7813 */ -// static u8 sh_pos[36]; - -/* 807E3878-807E389C 000308 0024+00 0/0 0/0 0/0 .bss sh_posH$7819 */ -// static u8 sh_posH[36]; - /* 807E389C-807E38A0 00032C 0004+00 0/2 0/0 0/0 .bss c_start */ -static u32 c_start; +static int c_start; /* 807E0388-807E1020 00DFE8 0C98+00 2/1 0/0 0/0 .text daE_WB_Execute__FP10e_wb_class */ -static void daE_WB_Execute(e_wb_class* param_0) { - // NONMATCHING +static int daE_WB_Execute(e_wb_class* i_this) { + if (c_start == 0) { + if (dComIfGp_event_runCheck()) { + if (lbl_244_bss_46 != 0 || cDmrNowMidnaTalk()) { + return 1; + } + } + } + + if (i_this->field_0x169e == 1000) { + return 1; + } + + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + + cXyz local_130; + cXyz local_13c; + + a_this->scale.z = l_HIO.base_size; + + if (fopAcM_CheckCondition(a_this, fopAcCnd_NODRAW_e)) { + i_this->field_0x5bf = 1; + } else { + i_this->field_0x5bf = 0; + } + + if (i_this->field_0x79d != 0) { + a_this->scale.z = a_this->scale.z * l_HIO.leader_size_ratio; + } + + i_this->field_0x68e++; + + if (i_this->field_0x1430 == 0) { + fopAcM_OffStatus(a_this, 0); + a_this->attention_info.flags = 0; + i_this->field_0x6be &= 3; + + for (int i = 0; i < 4; i++) { + if (i_this->field_0x698[i] != 0) { + i_this->field_0x698[i]--; + } + } + + if (i_this->field_0x6a0 != 0) { + i_this->field_0x6a0--; + } + + if (i_this->field_0x1432 != 0) { + i_this->field_0x1432--; + } + + action(i_this); + } + + if (i_this->field_0x79d != 0 || i_this->field_0x169e != 0) { + demo_camera(i_this); + } + + if (i_this->field_0x1430 != 0) { + a_this->eyePos = a_this->current.pos; + return 1; + } + + if (i_this->field_0x79d == 0 || i_this->field_0x142f == 0) { + cXyz* move_p = i_this->mStts.GetCCMoveP(); + if (move_p != NULL) { + f32 move_scale = TREG_F(19) + 0.3f; + a_this->current.pos.x += move_p->x * move_scale; + a_this->current.pos.y += move_p->y * move_scale; + a_this->current.pos.z += move_p->z * move_scale; + } + } + + if ((i_this->field_0x5bf == 0) && !dComIfGp_event_runCheck()) { + s16 wall_check = e_wb_wall_check(i_this); + if (wall_check != 0 && wall_check > -0x2000 && wall_check < 0x2000) { + if ((i_this->mActionID == ACT_C_F_RUN || i_this->mActionID == ACT_PL_RIDE2 || + i_this->mActionID == ACT_A_RUN) && + (a_this->speedF >= 5.0f)) + { + if (a_this->speedF > l_HIO.max_speed - 5.0f) { + if (i_this->mActionID == ACT_PL_RIDE2) { + dComIfGp_getVibration().StartShock(8, 0x4f, cXyz(0.0f, 1.0f, 0.0f)); + } + i_this->mActionID = ACT_BG_DAMAGE; + i_this->mActionMode = 0; + i_this->field_0x1684 = 50.0f; + i_this->mZ2Ride.startCreatureVoice(Z2SE_EN_WB_V_DAMAGE, -1); + } else { + if (i_this->mActionID != ACT_PL_RIDE2) { + if (i_this->mActionID == ACT_C_F_RUN) { + i_this->mActionID = ACT_F_WAIT; + } else { + i_this->mActionID = ACT_WAIT; + } + i_this->mActionMode = 0; + } + } + + if (i_this->mActionID != ACT_PL_RIDE2) { + a_this->current.pos = a_this->old.pos; + } + } + + dBgS_LinChk linChk; + cXyz pos1; + pos1 = a_this->current.pos; + pos1.y += 100.0f; + linChk.Set(&pos1, &a_this->eyePos, a_this); + + if (dComIfG_Bgsp().LineCross(&linChk)) { + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + local_130.x = 0.0f; + local_130.y = 0.0f; + local_130.z = KREG_F(11) + -20.0f; + MtxPosition(&local_130, &local_13c); + a_this->current.pos += local_13c; + + if (i_this->mActionID != ACT_PL_RIDE2) { + a_this->speedF = 0.0f; + } + } + } + } + + i_this->mAcch.CrrPos(dComIfG_Bgsp()); + cLib_addCalcAngleS2(&a_this->shape_angle.y, a_this->current.angle.y, 4, 0x2000); + + if (i_this->mAcch.ChkGroundHit()) { + dBgS_GndChk gndChk; + Vec local_154; + cXyz pos2; + + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + local_130.x = 0.0f; + local_130.y = 200.0f; + local_130.z = 100.0f; + MtxPosition(&local_130, &local_13c); + local_13c += a_this->current.pos; + + local_130.z = -100.0f; + MtxPosition(&local_130, &pos2); + pos2 += a_this->current.pos; + + local_154.x = local_13c.x; + local_154.y = local_13c.y; + local_154.z = local_13c.z; + + gndChk.SetPos(&local_154); + local_13c.y = dComIfG_Bgsp().GroundCross(&gndChk); + + local_154.x = pos2.x; + local_154.y = pos2.y; + local_154.z = pos2.z; + + gndChk.SetPos(&local_154); + pos2.y = dComIfG_Bgsp().GroundCross(&gndChk); + + if (fabsf(local_13c.y - pos2.y) <= 200.0f) { + a_this->current.angle.x = -cM_atan2s(local_13c.y - pos2.y, 200.0f); + } + + a_this->speed.y = -20.0f; + } + + cLib_addCalcAngleS2(&a_this->shape_angle.x, a_this->current.angle.x, 4, 0x1000); + cLib_addCalcAngleS2(&a_this->shape_angle.z, a_this->current.angle.z, 4, 0x1000); + + mDoMtx_stack_c::transS(a_this->current.pos.x, a_this->current.pos.y, a_this->current.pos.z); + mDoMtx_stack_c::YrotM(a_this->shape_angle.y + i_this->field_0x7a4); + mDoMtx_stack_c::XrotM((s16)a_this->shape_angle.x); + mDoMtx_stack_c::ZrotM(a_this->shape_angle.z); + mDoMtx_stack_c::transM(0.0f, 150.0f, 0.0f); + mDoMtx_stack_c::YrotM((s16)i_this->field_0x6ae.y); + mDoMtx_stack_c::XrotM((s16)i_this->field_0x6ae.x); + mDoMtx_stack_c::transM(0.0f, -150.0f, -50.0f); + + f32 scale = a_this->scale.z; + mDoMtx_stack_c::scaleM(scale, scale, scale); + + J3DModel* model = i_this->mpModelMorf->getModel(); + model->setBaseTRMtx(mDoMtx_stack_c::get()); + + int soundParam; + + if (-1000000000.0f != i_this->mAcch.GetGroundH()) { + if (i_this->mAcch.ChkWaterHit() && i_this->mAcch.m_wtr.GetHeight() > a_this->current.pos.y) + { + soundParam = dKy_pol_sound_get(&i_this->mAcch.m_wtr); + } else if (i_this->mAcch.ChkGroundHit()) { + soundParam = dKy_pol_sound_get(&i_this->mAcch.m_gnd); + } else { + soundParam = 0; + } + } else { + soundParam = 0; + } + + i_this->mpModelMorf->play(soundParam, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this))); + i_this->mpModelMorf->modelCalc(); + + anm_se_eff_set(i_this); + + if (i_this->mActionID != ACT_EVENT) { + f32 size_scale = 1.0f; + if (i_this->field_0x79d >= 2) { + size_scale += JREG_F(15) + 1.1f; + } + + MTXCopy(model->getAnmMtx(i_this->field_0x688 + 0xd), *calc_mtx); + local_130.set(KREG_F(13) + -20.0f, KREG_F(14) + -30.0f, KREG_F(15)); + MtxPosition(&local_130, &a_this->eyePos); + + a_this->attention_info.position.set( + a_this->current.pos.x - cM_ssin(a_this->shape_angle.y) * 30.0f, + a_this->current.pos.y + 150.0f, + a_this->current.pos.z - cM_scos(a_this->shape_angle.y) * 30.0f); + + i_this->field_0xa00[0].SetC(a_this->eyePos); + i_this->field_0xa00[0].SetR((KREG_F(16) + 40.0f) * l_HIO.base_size * size_scale); + + u32 tg_group; + if (i_this->mActionID == ACT_PL_RIDE) { + tg_group = 4; + } else { + tg_group = 2; + } + + for (int i = 0; i < 7; i++) { + i_this->field_0xa00[i].SetTgGrp(tg_group); + } + + dComIfG_Ccsp()->Set(&i_this->field_0xa00[0]); + + if (i_this->field_0x6bd != 0) { + + local_130.set(KREG_F(10) + -30.0f, KREG_F(11) + -50.0f, KREG_F(12)); + MtxPosition(&local_130, &local_13c); + i_this->field_0x1288.SetC(local_13c); + i_this->field_0x1288.SetR((KREG_F(8) + 55.0f) * l_HIO.base_size); + + dComIfG_Ccsp()->Set(&i_this->field_0x1288); + + if ((i_this->mActionID == ACT_PL_RIDE) || (i_this->mActionID == ACT_PL_RIDE2)) { + i_this->field_0x1288.SetAtType(AT_TYPE_NORMAL_SWORD); + } else { + i_this->field_0x1288.SetAtType(AT_TYPE_1000); + } + + if (a_this->speedF > l_HIO.max_speed - 2.0f) { + i_this->field_0x1288.SetAtSpl(dCcG_At_Spl_UNK_7); + + if (i_this->field_0x1288.ChkAtHit()) { + cCcD_Obj* hit_obj = i_this->field_0x1288.GetAtHitObj(); + fopAc_ac_c* hit_actor = dCc_GetAc(hit_obj->GetAc()); + + if (hit_actor != NULL) { + if (fopAcM_GetName(hit_actor) == PROC_E_RD) { + i_this->mZ2Ride.startCreatureSound(Z2SE_EN_WB_RUNDOWN, 0, -1); + } else if (fopAcM_GetName(hit_actor) == PROC_ALINK) { + if (daPy_getPlayerActorClass()->checkPlayerGuard()) { + dComIfGp_getVibration().StartShock(4, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); + } + } + } + } + } else { + i_this->field_0x1288.SetAtSpl(dCcG_At_Spl_UNK_0); + } + + if (daPy_getPlayerActorClass()->checkHorseRide()) { + i_this->field_0x1288.OffAtVsPlayerBit(); + } else { + i_this->field_0x1288.OnAtVsPlayerBit(); + } + + i_this->field_0x6bd = 0; + } else { + cXyz temp_pos(-200000.0f, -200000.0f, 200000.0f); + i_this->field_0x1288.SetC(temp_pos); + } + + local_130.set(JREG_F(0) + -30.0f, JREG_F(1), JREG_F(2)); + MTXCopy(model->getAnmMtx(i_this->field_0x688 + 0xb), *calc_mtx); + MtxPosition(&local_130, &local_13c); + i_this->field_0xa00[1].SetC(local_13c); + i_this->field_0xa00[1].SetR(l_HIO.base_size * 50.0f); + + MTXCopy(model->getAnmMtx(i_this->field_0x688 + 0x11), *calc_mtx); + local_130.set(JREG_F(3) + 10.0f, JREG_F(4) + 20.0f, JREG_F(5)); + MtxPosition(&local_130, &local_13c); + i_this->field_0xa00[2].SetC(local_13c); + i_this->field_0xa00[2].SetR(l_HIO.base_size * 40.0f + 20.0f + JREG_F(6)); + + dComIfG_Ccsp()->Set(&i_this->field_0xa00[1]); + dComIfG_Ccsp()->Set(&i_this->field_0xa00[2]); + + local_130.set(0.0f, 0.0f, 0.0f); + for (int i = 0; i < 4; i++) { + static int foot_no[4] = {5, 24, 9, 20}; + static int foot_no_B[4] = {5, 28, 9, 23}; + + if (i_this->field_0x79d != 0) { + MTXCopy(model->getAnmMtx(foot_no_B[i]), *calc_mtx); + } else { + MTXCopy(model->getAnmMtx(foot_no[i]), *calc_mtx); + } + + MtxPosition(&local_130, &local_13c); + i_this->field_0xa00[i + 3].SetC(local_13c); + i_this->field_0xa00[i + 3].SetR(l_HIO.base_size * 20.0f); + + dComIfG_Ccsp()->Set(&i_this->field_0xa00[i + 3]); + } + + for (int i = 0; i < 6; i++) { + if (i_this->field_0x79d == 0) { + i_this->field_0xa00[i + 1].OnTgSetBit(); + } else { + i_this->field_0xa00[i + 1].OffTgSetBit(); + } + } + } + + i_this->field_0x1688 += i_this->field_0x168a; + cLib_addCalcAngleS2(&i_this->field_0x168a, a_this->speedF * 50.0f + 1500.0f, 1, 0x3c); + + cLib_addCalc2(&i_this->field_0x1684, a_this->speedF * (YREG_F(8) + 1.5f) + BREG_F(6), 1.0f, BREG_F(7) + 0.9f); + + i_this->field_0x1434 = fpcM_ERROR_PROCESS_ID_e; + + effect_set(i_this); + i_this->field_0x6c0 = 0; + + return 1; } /* 807E1020-807E1028 00EC80 0008+00 1/0 0/0 0/0 .text daE_WB_IsDelete__FP10e_wb_class */ -static bool daE_WB_IsDelete(e_wb_class* param_0) { - return true; +static int daE_WB_IsDelete(e_wb_class* i_this) { + return 1; } /* 807E1028-807E108C 00EC88 0064+00 1/0 0/0 0/0 .text daE_WB_Delete__FP10e_wb_class */ -static void daE_WB_Delete(e_wb_class* param_0) { - // NONMATCHING +static int daE_WB_Delete(e_wb_class* i_this) { + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + fopAcM_GetID(i_this); + dComIfG_resDelete(&i_this->mPhase, i_this->mResName); + if (i_this->field_0x17e0 != 0) { + l_HIOInit = false; + mDoHIO_DELETE_CHILD(l_HIO.mId); + } + + if (a_this->heap != NULL) { + i_this->mpModelMorf->stopZelAnime(); + } + + return 1; } /* 807E108C-807E13A8 00ECEC 031C+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ @@ -3259,9 +5566,9 @@ static int useHeapInit(fopAc_ac_c* a_this) { f32* size = i_this->field_0x15d0[i].getSize(0); for (int j = 0; j < 16; j++) { if (i_this->field_0x79d != 0) { - *size = 3.0f + PREG_S(0); + *size = 5.0f + PREG_S(0); } else { - *size = 5.0f + PREG_S(1); + *size = 3.0f + PREG_S(1); } size++; } @@ -3286,9 +5593,9 @@ static int useHeapInit(fopAc_ac_c* a_this) { for (int i = 0; i < 2; i++) { if (i_this->field_0x79d != 0) { - *size = 3.0f + PREG_S(0); + *size = 5.0f + PREG_S(0); } else { - *size = 5.0f + PREG_S(1); + *size = 3.0f + PREG_S(1); } size++; } @@ -3405,6 +5712,14 @@ static int daE_WB_Create(fopAc_ac_c* a_this) { room_no, 0, 0, -1, 0); } + static f32 pass_r[6] = { + 0.0f, 800.0f, 800.0f, -100.0f, -150.0f, -100.0f, + }; + + static f32 x_check_off[6] = { + 600.0f, -800.0f, 800.0f, -300.0f, 0.0f, 300.0f, + }; + i_this->field_0x7a8 = pass_r[i_this->mParam2]; i_this->field_0x6c4 = x_check_off[i_this->mParam2]; } @@ -3421,9 +5736,9 @@ static int daE_WB_Create(fopAc_ac_c* a_this) { OS_REPORT("//////////////E_WB SET NON !!\n"); return cPhs_ERROR_e; } else { - if (lbl_244_bss_47 == 0) { + if (!l_HIOInit) { i_this->field_0x17e0 = 1; - lbl_244_bss_47 = 1; + l_HIOInit = true; l_HIO.mId = mDoHIO_CREATE_CHILD("イノシシ", &l_HIO); } @@ -3447,14 +5762,26 @@ static int daE_WB_Create(fopAc_ac_c* a_this) { a_this->field_0x560 = 10; if (i_this->field_0x79d != 0) { - i_this->field_0x9c4.Init(0xfe, 0, a_this); + i_this->mStts.Init(0xfe, 0, a_this); } else { - i_this->field_0x9c4.Init(0xfd, 0, a_this); + i_this->mStts.Init(0xfd, 0, a_this); } for (int i = 0; i <= 6; i++) { + static dCcD_SrcSph cc_sph_src = { + { + {0x0, {{0x0, 0x0, 0x0}, {0x486022, 0x3}, 0x75}}, // mObj + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph + } // mSphAttr + }; + i_this->field_0xa00[i].Set(cc_sph_src); - i_this->field_0xa00[i].SetStts(&i_this->field_0x9c4); + i_this->field_0xa00[i].SetStts(&i_this->mStts); if (i_this->field_0x79d != 0) { i_this->field_0xa00[i].OnTgShield(); @@ -3462,8 +5789,20 @@ static int daE_WB_Create(fopAc_ac_c* a_this) { } } + static dCcD_SrcSph at_sph_src = { + { + {0x0, {{AT_TYPE_1000, 0x2, 0x1f}, {0x0, 0x0}, 0x0}}, // mObj + {dCcD_SE_HARD_BODY, 0x0, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 35.0f} // mSph + } // mSphAttr + }; + i_this->field_0x1288.Set(at_sph_src); - i_this->field_0x1288.SetStts(&i_this->field_0x9c4); + i_this->field_0x1288.SetStts(&i_this->mStts); a_this->attention_info.distances[fopAc_attn_CARRY_e] = 0x28; a_this->attention_info.distances[fopAc_attn_LOCK_e] = 0x16; @@ -3513,7 +5852,7 @@ static int daE_WB_Create(fopAc_ac_c* a_this) { } fopAcM_setCullSizeFar(a_this, 30000.0f); - i_this->mSpeedRate = l_HIO.mSearchIgnoreDistance2; + i_this->mSpeedRate = l_HIO.mPlayerMountedMaxSpeed; c_start = 1; daE_WB_Execute(i_this); c_start = 0; @@ -3553,3 +5892,5 @@ extern actor_process_profile_definition g_profile_E_WB = { }; AUDIO_INSTANCES; +#include "JSystem/JAudio2/JAUSectionHeap.h" +JAUSectionHeap* JASGlobalInstance::sInstance;