mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-09 03:59:34 -04:00
d_a_tag_* TUs mostly matching for debug (#3054)
* d_a_tag_event debug almost matching * d_a_tag_msg debug almost matching * d_a_tag_attention almost matching * d_a_tag_chkpoint debug almost matching (weak func order) * d_a_tag_evt debug almost matching (extra weak fns) * d_a_tag_evtarea debug almost matching (weak func order) * d_a_tag_evtmsg debug almost matching (weak func order) * d_a_tag_mist debug almost matching (weak func order) * d_a_tag_howl debug almost matching (weak func order) * d_a_tag_lantern debug almost matching (weak func order) * d_a_tag_push debug almost matching (weak func order) * d_a_tag_telop debug almost matching (weak func order) * d_a_tag_CstaSw debug almost matching (weak func order) * d_a_tag_ajnot debug almost matching (weak func order) * d_a_tag_attack_item debug almost matching (weak func order) * d_a_tag_gstart debug almost matching (weak func order) * d_a_tag_hinit debug almost matching (debug weak func order) * d_a_tag_hjump debug almost matching (weak func order) * d_a_tag_hstop debug almost matching (weak func order) * d_a_tag_lv2prchk debug almost matching (weak func order) * d_a_tag_magne debug almost matching (weak func order) * d_a_tag_mhint debug almost matching (weak func order) * d_a_tag_mstop debug almost matching (weak func order) * d_a_tag_spring debug almost matching (weak func order) * d_a_tag_statue_evt debug almost matching (weak func order) * d_a_tag_arena debug almost matching (weak func order) * d_a_tag_Lv6Gate debug almost matching (weak func order) * d_a_tag_Lv7Gate debug almost matching (weak func order) * d_a_tag_Lv8Gate debug almost matching (.data + weak func order) * d_a_tag_TWgate debug almost matching (weak func order) * d_a_tag_lv6CstaSw debug almost matching (weak func order) * d_a_tag_assistance debug almost matching (weak func order) * d_a_tag_bottle_item debug almost matching (weak func order) * d_a_tag_chgrestart debug almost matching (weak func order) * d_a_tag_csw debug almost matching (weak func order) * d_a_tag_escape debug almost matching (weak func order) * d_a_tag_firewall debug almost matching (weak func order) * d_a_tag_gra debug almost matching (weak func order) * d_a_tag_guard debug almost matching (weak func order) * d_a_tag_instruction debug almost matching (weak func order) * d_a_tag_kago_fall debug almost matching (weak func order) * d_a_tag_lightball debug almost matching (weak func order) * d_a_tag_lv5soup debug almost matching (weak func order) * d_a_tag_mmsg debug almost matching (weak func order) * d_a_tag_mwait debug almost matching (weak func order) * d_a_tag_myna2 debug almost matching (weak func order) * d_a_tag_myna_light debug almost matching (weak func order) * d_a_tag_pachi debug almost matching (weak func order) * d_a_tag_poFire debug almost matching (weak func order) * d_a_tag_qs debug almost matching (small mismatch in search) * d_a_tag_ret_room debug almost matching (weak func order) * d_a_tag_river_back debug almost matching (weak func order) * d_a_tag_rmbit_sw debug almost matching (weak func order) * d_a_tag_schedule debug almost matching (weak func order) * d_a_tag_setBall debug almost matching (weak func order) * d_a_tag_setrestart debug almost matching (weak func order) * d_a_tag_shop_item debug almost matching (weak func order) * d_a_tag_smk_emt debug almost matching (weak func order) * d_a_tag_spinner debug almost matching (weak func order) * d_a_tag_sspath debug almost matching (weak func order) * d_a_tag_ss_drink debug almost matching (weak func order) * d_a_tag_stream debug almost matching (weak func order) * d_a_tag_theB_hint debug almost matching (weak func order) * d_a_tag_watchge debug almost matching (weak func order) * d_a_tag_waterfall debug almost matching (weak func order) * d_a_tag_allmato debug almost matching (weak func order) * d_a_tag_camera debug almost matching (extra weak fns) * d_a_tag_wara_howl debug almost matching (RTTI mismatch?) * d_a_tag_yami debug almost matching (weak func order) * Fix Shield regressions related to d_a_tag_* debug work
This commit is contained in:
@@ -26185,7 +26185,7 @@ lbl_80537A93 = .sdata:0x80537A93; // type:object size:0x8 data:string
|
||||
lbl_80537A9B = .sdata:0x80537A9B; // type:object size:0x7 data:string
|
||||
lbl_80537AA2 = .sdata:0x80537AA2; // type:object size:0x5 data:string
|
||||
lbl_80537AA7 = .sdata:0x80537AA7; // type:object size:0x8 data:string
|
||||
lbl_80537AAF = .sdata:0x80537AAF; // type:object size:0x1 data:byte
|
||||
g_blackColor = .sdata:0x80537AAF; // type:object size:0x1 data:byte
|
||||
lbl_80537AB0 = .sdata:0x80537AB0; // type:object size:0x1 data:byte
|
||||
lbl_80537AB1 = .sdata:0x80537AB1; // type:object size:0x1 data:byte
|
||||
lbl_80537AB2 = .sdata:0x80537AB2; // type:object size:0x1 data:byte
|
||||
|
||||
@@ -25761,7 +25761,7 @@ lbl_8051DB33 = .sdata:0x8051DB33; // type:object size:0x8 data:string
|
||||
lbl_8051DB3B = .sdata:0x8051DB3B; // type:object size:0x7 data:string
|
||||
lbl_8051DB42 = .sdata:0x8051DB42; // type:object size:0x5 data:string
|
||||
lbl_8051DB47 = .sdata:0x8051DB47; // type:object size:0x8 data:string
|
||||
lbl_8051DB4F = .sdata:0x8051DB4F; // type:object size:0x1 data:byte
|
||||
g_blackColor = .sdata:0x8051DB4F; // type:object size:0x1 data:byte
|
||||
lbl_8051DB50 = .sdata:0x8051DB50; // type:object size:0x1 data:byte
|
||||
lbl_8051DB51 = .sdata:0x8051DB51; // type:object size:0x1 data:byte
|
||||
lbl_8051DB52 = .sdata:0x8051DB52; // type:object size:0x1 data:byte
|
||||
|
||||
@@ -25762,7 +25762,7 @@ lbl_8051B9AB = .sdata:0x8051B9AB; // type:object size:0x8 data:string
|
||||
lbl_8051B9B3 = .sdata:0x8051B9B3; // type:object size:0x7 data:string
|
||||
lbl_8051B9BA = .sdata:0x8051B9BA; // type:object size:0x5 data:string
|
||||
lbl_8051B9BF = .sdata:0x8051B9BF; // type:object size:0x8 data:string
|
||||
lbl_8051B9C7 = .sdata:0x8051B9C7; // type:object size:0x1 data:byte
|
||||
g_blackColor = .sdata:0x8051B9C7; // type:object size:0x1 data:byte
|
||||
lbl_8051B9C8 = .sdata:0x8051B9C8; // type:object size:0x1 data:byte
|
||||
lbl_8051B9C9 = .sdata:0x8051B9C9; // type:object size:0x1 data:byte
|
||||
lbl_8051B9CA = .sdata:0x8051B9CA; // type:object size:0x1 data:byte
|
||||
@@ -27811,6 +27811,7 @@ mParticleTracePCB__13dPa_control_c = .sbss:0x8051E988; // type:object size:0x4 s
|
||||
mWipe__12dDlst_list_c = .sbss:0x8051E990; // type:object size:0x1 data:byte
|
||||
mWipeRate__12dDlst_list_c = .sbss:0x8051E994; // type:object size:0x4 scope:global align:4 data:float
|
||||
mWipeSpeed__12dDlst_list_c = .sbss:0x8051E998; // type:object size:0x4 scope:global align:4 data:float
|
||||
lbl_8051E99C = .sbss:0x8051E99C; // type:object size:0x4
|
||||
init$0000 = .sbss:0x8051E9A0; // type:object size:0x1 scope:local data:byte
|
||||
S_parcent_bak$99593 = .sbss:0x8051E9A8; // type:object size:0x4 scope:local align:4 data:float
|
||||
S_rot_work1$100794 = .sbss:0x8051E9AC; // type:object size:0x2 scope:local align:4 data:2byte
|
||||
|
||||
@@ -25757,7 +25757,7 @@ lbl_8051E433 = .sdata:0x8051E433; // type:object size:0x8 data:string
|
||||
lbl_8051E43B = .sdata:0x8051E43B; // type:object size:0x7 data:string
|
||||
lbl_8051E442 = .sdata:0x8051E442; // type:object size:0x5 data:string
|
||||
lbl_8051E447 = .sdata:0x8051E447; // type:object size:0x8 data:string
|
||||
lbl_8051E44F = .sdata:0x8051E44F; // type:object size:0x1 data:byte
|
||||
g_blackColor = .sdata:0x8051E44F; // type:object size:0x1 data:byte
|
||||
lbl_8051E450 = .sdata:0x8051E450; // type:object size:0x1 data:byte
|
||||
lbl_8051E451 = .sdata:0x8051E451; // type:object size:0x1 data:byte
|
||||
lbl_8051E452 = .sdata:0x8051E452; // type:object size:0x1 data:byte
|
||||
|
||||
@@ -270,5 +270,5 @@ lbl_88_data_1BD8 = .data:0x00001BD8; // type:object size:0x24
|
||||
@120156 = .data:0x00001DD4; // type:object size:0xC scope:local data:string
|
||||
@120184 = .data:0x00001DF4; // type:object size:0xD scope:local data:string
|
||||
l_HIO = .bss:0x00000000; // type:object size:0x4 scope:global
|
||||
lbl_88_bss_4 = .bss:0x00000004; // type:object size:0x1 data:byte
|
||||
@GUARD@setAttnPos__12daNpc_Taro_cFv@prtclScl = .bss:0x00000004; // type:object size:0x1 data:byte
|
||||
@LOCAL@setAttnPos__12daNpc_Taro_cFv@prtclScl = .bss:0x00000008; // type:object size:0xC scope:local align:4 data:float
|
||||
|
||||
@@ -30,4 +30,4 @@ game_over_eff_name__11Tag_FWall_n = .data:0x00000040; // type:object size:0x8 sc
|
||||
l_daTag_FWall_Method = .data:0x00000060; // type:object size:0x20 scope:global
|
||||
g_profile_Tag_FWall = .data:0x00000080; // type:object size:0x30 scope:global
|
||||
fire_leader = .bss:0x00000000; // type:object size:0x4 scope:global
|
||||
lbl_708_bss_4 = .bss:0x00000004; // type:object size:0x1 data:byte
|
||||
fire_num = .bss:0x00000004; // type:object size:0x1 data:byte
|
||||
|
||||
@@ -61,5 +61,5 @@ __RTTI__20daTagWaterFall_HIO_c = .data:0x000001A0; // type:object size:0x8 scope
|
||||
@118516 = .data:0x000001A8; // type:object size:0xE scope:local data:string
|
||||
@118517 = .data:0x000001B8; // type:object size:0xC scope:local
|
||||
@118518 = .data:0x000001DC; // type:object size:0x11 scope:local data:string
|
||||
lbl_743_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte
|
||||
masterWaterfallTagExists = .bss:0x00000000; // type:object size:0x1 data:byte
|
||||
l_HIO = .bss:0x00000004; // type:object size:0x24 scope:global data:byte
|
||||
|
||||
+67
-67
@@ -2130,19 +2130,19 @@ config.libs = [
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_set_bgobj"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_swhit0"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_allmato"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_camera"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_chkpoint"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_event"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_evt"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_evtarea"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_evtmsg"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_howl"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_camera"), # debug extra weak fns
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_chkpoint"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_event"), # TODO: this is part of Rframework in ShieldD
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_evt"), # debug extra weak fns
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_evtarea"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_evtmsg"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_howl"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_kmsg"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_lantern"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_mist"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_msg"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_push"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_telop"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_lantern"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_mist"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_msg"), # TODO: this is part of Rframework in ShieldD
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_push"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_telop"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tbox"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tbox2"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_vrbox"),
|
||||
@@ -2223,19 +2223,19 @@ config.libs = [
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_shop_item"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_sq"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_swc00"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_CstaSw"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_ajnot"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_attack_item"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_gstart"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_hinit"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_hjump"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_hstop"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_lv2prchk"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_magne"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_mhint"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_mstop"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_spring"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_statue_evt"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_CstaSw"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_ajnot"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_attack_item"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_gstart"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_hinit"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_hjump"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_hstop"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_lv2prchk"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_magne"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_mhint"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_mstop"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_spring"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_statue_evt"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_ykgr"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_L7demo_dr"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_L7low_dr"),
|
||||
@@ -2805,7 +2805,7 @@ config.libs = [
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_obj_zra_freeze"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_obj_zra_rock"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_passer_mng"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_arena"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_arena"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_peru"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_ppolamp"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_skip_2D"),
|
||||
@@ -2813,49 +2813,49 @@ config.libs = [
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_swBall"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_swLBall"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_swTime"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_Lv6Gate"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_Lv7Gate"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_Lv8Gate"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_TWgate"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_lv6CstaSw"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_assistance"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_bottle_item"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_chgrestart"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_csw"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_escape"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_firewall"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_gra"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_guard"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_instruction"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_kago_fall"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_lightball"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_lv5soup"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_mmsg"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_mwait"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_myna2"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_myna_light"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_pachi"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_poFire"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_Lv6Gate"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_Lv7Gate"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_Lv8Gate"), # debug .data + weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_TWgate"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_lv6CstaSw"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_assistance"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_bottle_item"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_chgrestart"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_csw"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN, ALL_WII, "Shield"), "d_a_tag_escape"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_firewall"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN, ALL_WII, "Shield"), "d_a_tag_gra"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_guard"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN, ALL_WII, "Shield"), "d_a_tag_instruction"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_kago_fall"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_lightball"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_lv5soup"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_mmsg"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_mwait"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_myna2"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_myna_light"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_pachi"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_poFire"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_qs"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_ret_room"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_river_back"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_rmbit_sw"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_schedule"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tag_setBall"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_setrestart"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_shop_camera"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_shop_item"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_smk_emt"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_spinner"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_sppath"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_ss_drink"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_stream"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_theB_hint"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_wara_howl"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_watchge"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_waterfall"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_ret_room"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_river_back"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_rmbit_sw"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN, ALL_WII, "Shield"), "d_a_tag_schedule"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN, ALL_WII, "Shield"), "d_a_tag_setBall"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_setrestart"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_shop_camera"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_shop_item"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_smk_emt"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_spinner"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_sppath"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_ss_drink"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_stream"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_theB_hint"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_wara_howl"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_watchge"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_waterfall"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_wljump"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_yami"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_tag_yami"), # debug weak func order
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_talk"),
|
||||
ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_tboxSw"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_title"),
|
||||
|
||||
@@ -5,22 +5,6 @@
|
||||
#include "d/d_particle_copoly.h"
|
||||
#include "f_op/f_op_actor.h"
|
||||
|
||||
enum daCstatue_FLG0 {
|
||||
daCstatue_FLG0_1 = 0x1,
|
||||
daCstatue_FLG0_2 = 0x2,
|
||||
daCstatue_FLG0_4 = 0x4,
|
||||
daCstatue_FLG0_8 = 0x8,
|
||||
daCstatue_FLG0_10 = 0x10,
|
||||
daCstatue_FLG0_20 = 0x20,
|
||||
daCstatue_FLG0_Demo = 0x40,
|
||||
daCstatue_FLG0_80 = 0x80,
|
||||
daCstatue_FLG0_100 = 0x100,
|
||||
daCstatue_FLG0_200 = 0x200,
|
||||
daCstatue_FLG0_400 = 0x400,
|
||||
daCstatue_FLG0_800 = 0x800,
|
||||
daCstatue_FLG0_1000 = 0x1000,
|
||||
};
|
||||
|
||||
enum daCstatue_MoveMode {
|
||||
daCstatue_MoveMode_0,
|
||||
daCstatue_MoveMode_1,
|
||||
@@ -58,6 +42,22 @@ enum daCstatueType {
|
||||
*
|
||||
*/
|
||||
class daCstatue_c : public fopAc_ac_c {
|
||||
enum daCstatue_FLG0 {
|
||||
daCstatue_FLG0_1 = 0x1,
|
||||
daCstatue_FLG0_2 = 0x2,
|
||||
daCstatue_FLG0_4 = 0x4,
|
||||
daCstatue_FLG0_8 = 0x8,
|
||||
daCstatue_FLG0_10 = 0x10,
|
||||
daCstatue_FLG0_20 = 0x20,
|
||||
daCstatue_FLG0_Demo = 0x40,
|
||||
daCstatue_FLG0_80 = 0x80,
|
||||
daCstatue_FLG0_100 = 0x100,
|
||||
daCstatue_FLG0_200 = 0x200,
|
||||
daCstatue_FLG0_400 = 0x400,
|
||||
daCstatue_FLG0_800 = 0x800,
|
||||
daCstatue_FLG0_1000 = 0x1000,
|
||||
};
|
||||
|
||||
public:
|
||||
void atHitCallback(fopAc_ac_c*);
|
||||
int createHeap();
|
||||
|
||||
@@ -388,7 +388,7 @@ public:
|
||||
}
|
||||
BOOL checkHide() { return mHide || (mTwilight && !dComIfGs_wolfeye_effect_check()); }
|
||||
void setIntDemander(fopAc_ac_c* i_actor) { field_0x824.entry(i_actor); }
|
||||
void setIntFlowNodeNo(int i_flowNodeNo) { mFlowNodeNo = i_flowNodeNo; }
|
||||
void setIntFlowNodeNo(s32 i_flowNodeNo) { mFlowNodeNo = i_flowNodeNo; }
|
||||
void setCutType(int i_cutType) { mCutType = i_cutType; }
|
||||
void onInterrupt(u8 param_0) { field_0x9ef = param_0; }
|
||||
void onHide() { mHide = true; }
|
||||
|
||||
@@ -336,7 +336,7 @@ public:
|
||||
FLG0_FAST_SWORD_CUT = 0x80000,
|
||||
FLG0_UNK_40000 = 0x40000,
|
||||
FLG0_DK_CAUGHT2 = 0x20000,
|
||||
FLG0_UNK_10000 = 0x10000,
|
||||
FLG0_DEMO_STREAM_ACCEPT = 0x10000,
|
||||
FLG0_UNK_8000 = 0x8000,
|
||||
FLG0_UNK_4000 = 0x4000,
|
||||
FLG0_UNK_2000 = 0x2000,
|
||||
@@ -951,6 +951,8 @@ public:
|
||||
void onTraningCutLargeTurn() { onNoResetFlg3(FLG3_TRANING_CUT_LARGE_TURN); }
|
||||
void onTraningCutDown() { onNoResetFlg3(FLG3_TRANING_CUT_DOWN); }
|
||||
void onTraningShieldAttack() { onNoResetFlg3(FLG3_TRANING_SHIELD_ATTACK); }
|
||||
void onDemoStreamAccept() { onNoResetFlg0(FLG0_DEMO_STREAM_ACCEPT); }
|
||||
void offDemoStreamAccept() { offNoResetFlg0(FLG0_DEMO_STREAM_ACCEPT); }
|
||||
|
||||
BOOL checkStickArrowReset() const { return checkResetFlg0(RFLG0_STICK_ARROW_RESET); }
|
||||
BOOL getCutAtFlg() const { return checkNoResetFlg0(FLG0_CUT_AT_FLG); }
|
||||
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
int Draw();
|
||||
int Delete();
|
||||
|
||||
u8 getSw() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
u32 getSw() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
|
||||
private:
|
||||
/* 0x568 */ u8 mSwitch;
|
||||
@@ -25,11 +25,11 @@ private:
|
||||
class daTagCstaSw_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daTagCstaSw_HIO_c();
|
||||
virtual ~daTagCstaSw_HIO_c();
|
||||
virtual ~daTagCstaSw_HIO_c() {}
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
u8 unk_0x4;
|
||||
u8 show_range;
|
||||
};
|
||||
|
||||
#endif /* D_A_TAG_CSTASW_H */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
class daTagLv6Gate_c : public fopAc_ac_c {
|
||||
public:
|
||||
int createHeap();
|
||||
inline int createHeap();
|
||||
int create();
|
||||
inline int execute();
|
||||
int draw();
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
class daTagLv7Gate_c : public fopAc_ac_c {
|
||||
public:
|
||||
int create();
|
||||
void create_init();
|
||||
int execute();
|
||||
inline void create_init();
|
||||
inline int execute();
|
||||
void calcFly();
|
||||
|
||||
inline ~daTagLv7Gate_c();
|
||||
|
||||
inline int createHeap();
|
||||
inline void setPath(u8 i_path_ID);
|
||||
inline int setPath(int i_path_ID);
|
||||
inline void initBaseMtx();
|
||||
inline void setBaseMtx();
|
||||
inline void flyAnime();
|
||||
inline bool checkPoint(f32 i_speed);
|
||||
inline bool checkPoint(cXyz& i_point, f32 i_speed);
|
||||
inline bool setNextPoint();
|
||||
inline int draw();
|
||||
|
||||
u8 getPathID() { return fopAcM_GetParam(this) >> 0x10; }
|
||||
u16 getFlowNodeNo() { return fopAcM_GetParam(this); }
|
||||
u8 getPathID() { return (fopAcM_GetParam(this) >> 16) & 0xFF; }
|
||||
s16 getFlowNodeNo() { return (u16)fopAcM_GetParam(this); }
|
||||
|
||||
/* 0x568 */ J3DModel* mpModel;
|
||||
/* 0x56C */ mDoExt_bckAnm* mpBck;
|
||||
|
||||
@@ -10,8 +10,8 @@ class daTagLv8Gate_c : public fopAc_ac_c {
|
||||
public:
|
||||
inline ~daTagLv8Gate_c();
|
||||
|
||||
int createHeap();
|
||||
int execute();
|
||||
inline int createHeap();
|
||||
inline int execute();
|
||||
|
||||
void initBaseMtx();
|
||||
void create_init();
|
||||
|
||||
@@ -8,6 +8,26 @@
|
||||
class daTagTWGate_c;
|
||||
typedef void (daTagTWGate_c::*actionFunc)();
|
||||
|
||||
struct daTagTWGate_Attr_c {
|
||||
/* 0x00 */ u8 show_range;
|
||||
};
|
||||
|
||||
class daTagTWGate_Hio_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daTagTWGate_Hio_c();
|
||||
|
||||
inline void ct();
|
||||
|
||||
inline void dt();
|
||||
|
||||
void default_set();
|
||||
|
||||
inline void genMessage(JORMContext*);
|
||||
|
||||
/* 0x08 */ int field_0x8;
|
||||
/* 0x0C */ daTagTWGate_Attr_c attr;
|
||||
};
|
||||
|
||||
class daTagTWGate_c : public fopAc_ac_c {
|
||||
public:
|
||||
enum EType {
|
||||
@@ -31,6 +51,7 @@ public:
|
||||
/* 0x0A */ ACT_DEMO_HYRAL_1,
|
||||
/* 0x0B */ ACT_DEMO_HYRAL_2,
|
||||
/* 0x0C */ ACT_DEMO_HYRAL_3,
|
||||
/* 0x0D */ MODE_MAX_e,
|
||||
};
|
||||
|
||||
inline ~daTagTWGate_c();
|
||||
@@ -62,65 +83,47 @@ public:
|
||||
void initDemoHyral3();
|
||||
void executeDemoHyral3();
|
||||
void initBaseMtx();
|
||||
int downloadModels();
|
||||
inline int downloadModels();
|
||||
void initTalk(int, fopAc_ac_c**);
|
||||
bool talkProc(int*, int, fopAc_ac_c**);
|
||||
static int createHeapCallBack(fopAc_ac_c*);
|
||||
int CreateHeap();
|
||||
|
||||
u8 getSwitch() { return fopAcM_GetParam(this) >> 8; }
|
||||
u8 getSwitch() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
|
||||
u8 getType() { return fopAcM_GetParam(this); }
|
||||
|
||||
inline int create();
|
||||
|
||||
void create_init() {
|
||||
field_0x5e0 = 0;
|
||||
mActionID = 0;
|
||||
mAction = &ActionTable[mActionID][0];
|
||||
(this->**mAction)();
|
||||
inline void create_init();
|
||||
|
||||
inline void callExecute();
|
||||
|
||||
inline int execute();
|
||||
|
||||
inline int draw();
|
||||
|
||||
#if DEBUG
|
||||
daTagTWGate_Attr_c& attr() const {
|
||||
return mHio.attr;
|
||||
}
|
||||
#endif
|
||||
|
||||
void callExecute() {
|
||||
(this->*mAction[1])();
|
||||
mDoAud_seStartLevel(Z2SE_OBJ_DARK_GATE, ¤t.pos, 0, 0);
|
||||
}
|
||||
inline void callInit();
|
||||
|
||||
int execute() {
|
||||
callExecute();
|
||||
inline void setAction(Mode_e i_action);
|
||||
|
||||
if (field_0x5e0 != 0) {
|
||||
mpMorf->play(0, 0);
|
||||
mpMorf->modelCalc();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int draw() {
|
||||
if (field_0x5e0 != 0) {
|
||||
mpMorf->entryDL();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void callInit() {
|
||||
(this->*(*mAction))();
|
||||
}
|
||||
|
||||
void setAction(Mode_e action) {
|
||||
mActionID = action;
|
||||
mAction = ActionTable[mActionID];
|
||||
callInit();
|
||||
}
|
||||
|
||||
static u8 const mAttr[1];
|
||||
static actionFunc ActionTable[13][2];
|
||||
static daTagTWGate_Attr_c const mAttr;
|
||||
#if DEBUG
|
||||
static daTagTWGate_Hio_c mHio;
|
||||
#endif
|
||||
static const actionFunc ActionTable[][2];
|
||||
|
||||
private:
|
||||
/* 0x568 */ mDoExt_McaMorfSO* mpMorf;
|
||||
/* 0x56C */ request_of_phase_process_class mPhaseZevArc;
|
||||
/* 0x574 */ request_of_phase_process_class mPhaseMdRes;
|
||||
/* 0x57C */ request_of_phase_process_class mPhasePyRes;
|
||||
/* 0x584 */ actionFunc* mAction;
|
||||
/* 0x584 */ const actionFunc* mAction;
|
||||
/* 0x588 */ int mActionID;
|
||||
/* 0x58C */ dMsgFlow_c mMsgFlow;
|
||||
/* 0x5D8 */ u8 field_0x5d8[4];
|
||||
|
||||
@@ -5,21 +5,9 @@
|
||||
|
||||
class daTagAssist_c : public fopAc_ac_c {
|
||||
public:
|
||||
void create_init() {
|
||||
attention_info.flags = 0;
|
||||
field_0x570 = -1;
|
||||
}
|
||||
|
||||
int create() {
|
||||
fopAcM_ct(this, daTagAssist_c);
|
||||
create_init();
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
int execute() {
|
||||
fopAcM_searchPlayerDistanceXZ(this);
|
||||
return 1;
|
||||
}
|
||||
inline void create_init();
|
||||
inline int create();
|
||||
inline int execute();
|
||||
|
||||
u8 field_0x568[8];
|
||||
s16 field_0x570;
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
void action();
|
||||
BOOL checkHit();
|
||||
void createItem();
|
||||
int draw();
|
||||
int _delete();
|
||||
|
||||
virtual ~daTagAtkItem_c() {}
|
||||
|
||||
@@ -4,6 +4,22 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
class daAttp_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daAttp_HIO_c();
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x06 */ u8 enable_type_switching;
|
||||
/* 0x07 */ u8 type_spec;
|
||||
/* 0x08 */ u8 enable_distance_display;
|
||||
/* 0x0C */ f32 dist_max;
|
||||
/* 0x10 */ f32 dist_max_release;
|
||||
/* 0x14 */ f32 dist_adjust;
|
||||
/* 0x18 */ f32 upper_y;
|
||||
/* 0x1C */ f32 lower_y;
|
||||
};
|
||||
|
||||
class daAttp_c : public fopAc_ac_c {
|
||||
public:
|
||||
int Create();
|
||||
@@ -11,28 +27,33 @@ public:
|
||||
int execute();
|
||||
int draw();
|
||||
int _delete();
|
||||
|
||||
#if DEBUG
|
||||
Mtx field_0x568;
|
||||
u8 field_0x598;
|
||||
#endif
|
||||
}; // Size: 0x568
|
||||
|
||||
namespace daAttp_prm {
|
||||
static inline u32 getArg0(daAttp_c* pActor) {
|
||||
return fopAcM_GetParam(pActor) & 3;
|
||||
static inline u8 getArg0(daAttp_c* pActor) {
|
||||
return fopAcM_GetParam(pActor) & 0x3;
|
||||
}
|
||||
static inline u32 getArg1(daAttp_c* pActor) {
|
||||
return (fopAcM_GetParam(pActor) >> 2) & 3;
|
||||
static inline u8 getArg1(daAttp_c* pActor) {
|
||||
return (fopAcM_GetParam(pActor) >> 2) & 0x3;
|
||||
}
|
||||
static inline u32 getArg2(daAttp_c* pActor) {
|
||||
return (fopAcM_GetParam(pActor) >> 4) & 7;
|
||||
static inline u8 getArg2(daAttp_c* pActor) {
|
||||
return (fopAcM_GetParam(pActor) >> 4) & 0x7;
|
||||
}
|
||||
static inline u32 getArg3(daAttp_c* pActor) {
|
||||
return (fopAcM_GetParam(pActor) >> 7) & 1;
|
||||
static inline u8 getArg3(daAttp_c* pActor) {
|
||||
return (fopAcM_GetParam(pActor) >> 7) & 0x1;
|
||||
}
|
||||
static inline u32 getArg4(daAttp_c* pActor) {
|
||||
return (fopAcM_GetParam(pActor) >> 8) & 1;
|
||||
static inline u8 getArg4(daAttp_c* pActor) {
|
||||
return (fopAcM_GetParam(pActor) >> 8) & 0x1;
|
||||
}
|
||||
static inline u32 getSw1(daAttp_c* pActor) {
|
||||
static inline u8 getSw1(daAttp_c* pActor) {
|
||||
return (fopAcM_GetParam(pActor) >> 0x10) & 0xff;
|
||||
}
|
||||
static inline u32 getSw2(daAttp_c* pActor) {
|
||||
static inline u8 getSw2(daAttp_c* pActor) {
|
||||
return (fopAcM_GetParam(pActor) >> 0x18);
|
||||
}
|
||||
} // namespace daAttp_prm
|
||||
|
||||
@@ -14,18 +14,18 @@ private:
|
||||
/* 0x0576 */ u8 mBottleItemType;
|
||||
|
||||
public:
|
||||
s32 create();
|
||||
s32 Delete();
|
||||
s32 Execute();
|
||||
s32 Draw();
|
||||
int create();
|
||||
int Delete();
|
||||
int Execute();
|
||||
int Draw();
|
||||
void setTypeFromParam();
|
||||
void restart();
|
||||
void initialize();
|
||||
int checkProcess(ProcessFunc);
|
||||
int setProcess(ProcessFunc);
|
||||
void setAttnPos();
|
||||
s32 chkEvent();
|
||||
s32 orderEvent();
|
||||
int chkEvent();
|
||||
int orderEvent();
|
||||
void makeSoup();
|
||||
int wait(void*);
|
||||
virtual ~daTag_BottleItem_c();
|
||||
|
||||
@@ -14,6 +14,7 @@ public:
|
||||
u16 getAreaType();
|
||||
u16 getAreaNoChk();
|
||||
int execute();
|
||||
int draw();
|
||||
|
||||
inline int create();
|
||||
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
class daTagChgRestart_c : public fopAc_ac_c {
|
||||
public:
|
||||
daTagChgRestart_c() {}
|
||||
s32 Create();
|
||||
s32 create();
|
||||
s32 execute();
|
||||
s32 _delete();
|
||||
int Create();
|
||||
int create();
|
||||
int execute();
|
||||
int draw();
|
||||
int _delete();
|
||||
|
||||
/* 0x0568 */ cXyz mVertices[4];
|
||||
};
|
||||
@@ -17,8 +18,12 @@ public:
|
||||
STATIC_ASSERT(sizeof(daTagChgRestart_c) == 0x598);
|
||||
|
||||
namespace daTagChgRestart_prm {
|
||||
inline u8 getSwNo(daTagChgRestart_c* p_chgRestart) { return fopAcM_GetParam(p_chgRestart) >> 8; }
|
||||
inline u8 getPlayerNo(daTagChgRestart_c* p_chgRestart) { return fopAcM_GetParam(p_chgRestart); }
|
||||
inline u8 getSwNo(daTagChgRestart_c* p_chgRestart) {
|
||||
return (fopAcM_GetParam(p_chgRestart) >> 8) & 0xFF;
|
||||
}
|
||||
inline u8 getPlayerNo(daTagChgRestart_c* p_chgRestart) {
|
||||
return fopAcM_GetParam(p_chgRestart);
|
||||
}
|
||||
}; // namespace daTagChgRestart_prm
|
||||
|
||||
#endif /* D_A_TAG_CHGRESTART_H */
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
class daTag_Chk_c : public fopAc_ac_c {
|
||||
public:
|
||||
int execute();
|
||||
int draw();
|
||||
|
||||
u16 getAreaType() { return home.angle.z & 0x100; }
|
||||
u16 getHeight() { return fopAcM_GetParam(this) & 0xff; }
|
||||
u8 getSwBit() { return fopAcM_GetParam(this) >> 8; }
|
||||
u8 getSwBit2() { return fopAcM_GetParam(this) >> 16; }
|
||||
u8 getHeight() { return fopAcM_GetParam(this) & 0xff; }
|
||||
u8 getSwBit() { return (fopAcM_GetParam(this) & 0xff00) >> 8; }
|
||||
u8 getSwBit2() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; }
|
||||
|
||||
int create() {
|
||||
fopAcM_ct(this, daTag_Chk_c);
|
||||
@@ -34,8 +35,11 @@ public:
|
||||
|
||||
attention_info.position = current.pos;
|
||||
|
||||
u16 height = getHeight();
|
||||
height != 0xff ? attention_info.position.y += height * 10.0f : attention_info.position.y += scale.y * 0.5f;
|
||||
if (getHeight() != 0xff) {
|
||||
attention_info.position.y += getHeight() * 10.0f;
|
||||
} else {
|
||||
attention_info.position.y += scale.y * 0.5f;
|
||||
}
|
||||
|
||||
eyePos = attention_info.position;
|
||||
return cPhs_COMPLEATE_e;
|
||||
|
||||
@@ -23,7 +23,7 @@ struct daTagCsw_c : public fopAc_ac_c, public request_of_phase_process_class {
|
||||
int getSw2() { return fopAcM_GetParamBit(this, 9, 8); }
|
||||
int getType() { return fopAcM_GetParamBit(this, 0, 1); }
|
||||
int getParam(int param_1, int param_2, int param_3) {
|
||||
return (1 << param_3) - 1U & param_1 >> (param_2 & 0x3fU);
|
||||
return (1 << param_3) - 1U & param_1 >> param_2;
|
||||
}
|
||||
int getArg0() { return getParam(current.angle.x, 0, 8); }
|
||||
int getItemBit() { return fopAcM_GetParamBit(this, 17, 8); }
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
class daTagEscape_c : public fopAc_ac_c {
|
||||
public:
|
||||
daTagEscape_c() {}
|
||||
~daTagEscape_c() {}
|
||||
inline int create();
|
||||
|
||||
u8 getPathID() { return fopAcM_GetParam(this) & 0xff; }
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@ public:
|
||||
int getAppearPoint(Vec*);
|
||||
void createGuard(u32);
|
||||
|
||||
u8 getPathID() { return fopAcM_GetParam(this) >> 8; }
|
||||
u8 getPathID() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
|
||||
inline int create();
|
||||
inline void create_init();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
int destroy();
|
||||
int execute();
|
||||
int draw();
|
||||
u8 isAreaCheck();
|
||||
bool isAreaCheck();
|
||||
int getParam();
|
||||
u8 getSwitchBit();
|
||||
virtual ~daTag_Howl_c() {}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "d/d_msg_flow.h"
|
||||
|
||||
struct daTag_Lantern_HIOParam {
|
||||
u8 field_0x0;
|
||||
u8 enable_debug_info;
|
||||
};
|
||||
|
||||
class daTag_Lantern_Param_c {
|
||||
|
||||
@@ -13,8 +13,8 @@ public:
|
||||
int draw();
|
||||
int _delete();
|
||||
|
||||
u8 getSwBit() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
u32 getType() { return fopAcM_GetParamBit(this, 8, 4); }
|
||||
u8 getSwbit() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
u8 getType() { return fopAcM_GetParamBit(this, 8, 4); }
|
||||
|
||||
/* 0x568 */ DALKMIST_INFLUENCE mInfluence;
|
||||
/* 0x57C */ u8 field_0x57c;
|
||||
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
int Draw();
|
||||
int Delete();
|
||||
|
||||
u8 getSw() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
u32 getSw() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
|
||||
private:
|
||||
/* 0x568 */ u8 mSwitch;
|
||||
@@ -24,11 +24,11 @@ private:
|
||||
class daLv6CstaSw_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daLv6CstaSw_HIO_c();
|
||||
virtual ~daLv6CstaSw_HIO_c();
|
||||
virtual ~daLv6CstaSw_HIO_c() {}
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
u8 unk_0x4;
|
||||
u8 show_range;
|
||||
};
|
||||
|
||||
#endif /* D_A_TAG_LV6CSTASW_H */
|
||||
|
||||
@@ -11,6 +11,7 @@ public:
|
||||
int Create();
|
||||
int create();
|
||||
int execute();
|
||||
int draw();
|
||||
int _delete();
|
||||
|
||||
static u8 getPlayerNo();
|
||||
@@ -28,18 +29,18 @@ public:
|
||||
|
||||
namespace daTagMist_prm {
|
||||
inline u8 getSwNoNum(daTagMist_c* i_this) {
|
||||
return fopAcM_GetParam(i_this) >> 0x10;
|
||||
return (fopAcM_GetParam(i_this) >> 16) & 0xFF;
|
||||
}
|
||||
inline u8 getMySwNo(daTagMist_c* i_this) {
|
||||
return fopAcM_GetParam(i_this) >> 0x8;
|
||||
return (fopAcM_GetParam(i_this) >> 8) & 0xFF;
|
||||
}
|
||||
inline u8 getTopSwNo(daTagMist_c* i_this) {
|
||||
return fopAcM_GetParam(i_this);
|
||||
}
|
||||
inline u8 getExitNo(daTagMist_c* i_this) {
|
||||
return (fopAcM_GetParam(i_this) >> 0x18) & 0x3F;
|
||||
return (fopAcM_GetParam(i_this) >> 24) & 0x3F;
|
||||
}
|
||||
inline int getSwNo2(daTagMist_c* i_this) {
|
||||
inline u8 getSwNo2(daTagMist_c* i_this) {
|
||||
return i_this->field_0x5a2 & 0xFF;
|
||||
}
|
||||
} // namespace daTagMist_prm
|
||||
|
||||
@@ -12,13 +12,13 @@ public:
|
||||
int execute();
|
||||
|
||||
void onUseFlg() { mUseFlg = true; }
|
||||
bool checkNoAttention() { return mAttention == 0xFF; }
|
||||
bool checkNoAttention() const { return mAttention == 0xFF; }
|
||||
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568;
|
||||
/* 0x569 */ u8 field_0x569;
|
||||
/* 0x56A */ u8 mAttention;
|
||||
/* 0x56B */ bool field_0x56b;
|
||||
/* 0x56B */ u8 field_0x56b;
|
||||
/* 0x56C */ bool mUseFlg;
|
||||
/* 0x56D */ u8 field_0x56d[3];
|
||||
/* 0x570 */ u16 field_0x570;
|
||||
|
||||
@@ -16,6 +16,23 @@ public:
|
||||
static const daTag_Msg_HIO_Param_c m;
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
class daTag_Msg_HIO_c : public JORReflexible {
|
||||
public:
|
||||
daTag_Msg_HIO_c();
|
||||
~daTag_Msg_HIO_c();
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
s8 mChild;
|
||||
daTag_Msg_HIO_Param_c m;
|
||||
};
|
||||
|
||||
#define TAG_MSG_HIO_CLASS daTag_Msg_HIO_c
|
||||
#else
|
||||
#define TAG_MSG_HIO_CLASS daTag_Msg_Param_c
|
||||
#endif
|
||||
|
||||
class daTag_Msg_c : public fopAc_ac_c {
|
||||
public:
|
||||
virtual ~daTag_Msg_c();
|
||||
@@ -39,9 +56,9 @@ public:
|
||||
/* 0x5CC */ int mOrderEvtNum;
|
||||
/* 0x5D0 */ s16 mEventIdx;
|
||||
/* 0x5D2 */ u8 field_0x5D2[0x5D8 - 0x5D2];
|
||||
/* 0x5D8 */ daTag_Msg_Param_c* mParam;
|
||||
/* 0x5DC */ u8 field_0x5dc;
|
||||
/* 0x5DD */ u8 field_0x5dd;
|
||||
/* 0x5D8 */ TAG_MSG_HIO_CLASS* mpHIO;
|
||||
/* 0x5DC */ bool field_0x5dc;
|
||||
/* 0x5DD */ bool field_0x5dd;
|
||||
/* 0x5DE */ u8 mOnSwitch;
|
||||
/* 0x5DF */ u8 mOffSwitch;
|
||||
/* 0x5E0 */ u16 mOnSaveLabel;
|
||||
|
||||
@@ -8,8 +8,8 @@ public:
|
||||
s32 create();
|
||||
s32 execute();
|
||||
|
||||
u8 getSwBit() { return fopAcM_GetParam(this) >> 8; }
|
||||
u8 getMode() { return fopAcM_GetParam(this); }
|
||||
u8 getSwBit() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
|
||||
int getMode() { return fopAcM_GetParam(this) & 0xFF; }
|
||||
f32 getExtent() { return scale.x * 100.0f;}
|
||||
|
||||
private:
|
||||
|
||||
@@ -10,8 +10,8 @@ public:
|
||||
int Execute();
|
||||
int Draw();
|
||||
bool setTurnOnOffChange();
|
||||
u32 getTurnOnTime();
|
||||
u32 getTurnOffTime();
|
||||
u8 getTurnOnTime();
|
||||
u8 getTurnOffTime();
|
||||
void initialize();
|
||||
|
||||
virtual ~daTag_MynaLight_c();
|
||||
|
||||
@@ -16,12 +16,12 @@ public:
|
||||
|
||||
int getId() {
|
||||
u16 id = (fopAcM_GetParam(this) & 0xFF000000) >> 24;
|
||||
return (id == 0xFF) ? -1 : id;
|
||||
return id == 0xFF ? -1 : id;
|
||||
}
|
||||
|
||||
u8 getBitSW() { return fopAcM_GetParam(this) & 0xFF; }
|
||||
|
||||
u8 getBitSW2() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
|
||||
u8 getBitSW2() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
|
||||
|
||||
u32 getFlowNodeNo() {
|
||||
if (home.angle.x != 0xFFFF) {
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
int execute();
|
||||
int draw();
|
||||
|
||||
u8 getType() { return fopAcM_GetParamBit(this, 0, 1); }
|
||||
u32 getType() { return fopAcM_GetParamBit(this, 0, 1); }
|
||||
int getSwNo() { return fopAcM_GetParamBit(this, 1, 8); }
|
||||
|
||||
/* 0x568 */ f32 field_0x568;
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
int draw();
|
||||
int execute();
|
||||
void init();
|
||||
u8 chkPlyrInTag();
|
||||
bool chkPlyrInTag();
|
||||
|
||||
/* 0x56C */ f32 field_0x56c;
|
||||
/* 0x570 */ f32 field_0x570;
|
||||
|
||||
@@ -31,9 +31,11 @@ public:
|
||||
|
||||
void setAction(u8 i_action) { mAction = i_action; }
|
||||
|
||||
u8 getSwBit() { return fopAcM_GetParamBit(this, 8, 8); }
|
||||
u8 getSwbit() { return fopAcM_GetParamBit(this, 8, 8); }
|
||||
|
||||
u8 getSwBit2() { return fopAcM_GetParamBit(this, 0x10, 8); }
|
||||
u8 getSwbit2() { return fopAcM_GetParamBit(this, 0x10, 8); }
|
||||
|
||||
u8 getNextSceneNo() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
|
||||
/* 0x568 */ request_of_phase_process_class mPhase;
|
||||
/* 0x570 */ u8 mTimer;
|
||||
|
||||
@@ -12,13 +12,13 @@ public:
|
||||
int draw();
|
||||
int execute();
|
||||
void init();
|
||||
u8 chkPlyrInTag();
|
||||
bool chkPlyrInTag();
|
||||
|
||||
s8 getArg0_RoomSaveTableNo() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
s8 getArg1_RoomNo() { return fopAcM_GetParamBit(this, 8, 8); }
|
||||
u8 getArg2_CngBitVal() { return fopAcM_GetParamBit(this, 16, 1); }
|
||||
u8 getArg3_CngBitFlg() { return fopAcM_GetParamBit(this, 17, 1); }
|
||||
u8 getSwBit() { return fopAcM_GetParamBit(this, 24, 8); }
|
||||
int getSwBit() { return fopAcM_GetParamBit(this, 24, 8); }
|
||||
|
||||
/* 0x56C */ f32 field_0x56c;
|
||||
/* 0x570 */ f32 field_0x570;
|
||||
|
||||
@@ -8,6 +8,7 @@ public:
|
||||
int Create();
|
||||
int create();
|
||||
int execute();
|
||||
int draw();
|
||||
int _delete();
|
||||
|
||||
/* 0x568 */ s8 mPlayerRoomNo;
|
||||
|
||||
@@ -14,6 +14,7 @@ public:
|
||||
int CreateHeap();
|
||||
int create();
|
||||
int execute();
|
||||
int draw();
|
||||
int _delete();
|
||||
f32 GetR() { return mRadius; }
|
||||
};
|
||||
|
||||
@@ -10,10 +10,11 @@ public:
|
||||
int Create();
|
||||
int create();
|
||||
int execute();
|
||||
u8 checkArea();
|
||||
bool checkArea();
|
||||
int draw();
|
||||
int _delete();
|
||||
|
||||
u32 getSwbit() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
u8 getSwbit() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
|
||||
/* 0x568 */ u8 mTimer;
|
||||
}; // Size: 0x56C
|
||||
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
int Delete();
|
||||
int Execute();
|
||||
int Draw();
|
||||
int getTypeFromParam();
|
||||
u8 getTypeFromParam();
|
||||
u8 getSwitchFromParam();
|
||||
u16 getFlowNodeNum();
|
||||
u16 getValue();
|
||||
@@ -29,7 +29,6 @@ public:
|
||||
int talk(void*);
|
||||
~daTag_SSDrink_c();
|
||||
|
||||
s32 fopAcM_seenPlayerAngleY() { return fopAcM_seenActorAngleY(this, dComIfGp_getPlayer(0)); }
|
||||
bool checkShopOil() const { return field_0x5D2 == 4; }
|
||||
|
||||
/* 0x578 */ dMsgFlow_c field_0x578;
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
void endParticle();
|
||||
BOOL checkStartDemo();
|
||||
BOOL checkOnEffect();
|
||||
s32 getLetterCount();
|
||||
int getLetterCount();
|
||||
int draw();
|
||||
int _delete();
|
||||
|
||||
@@ -38,7 +38,7 @@ private:
|
||||
/* 0x596 */ u8 mMapToolId;
|
||||
/* 0x597 */ u8 mSkyCharacterEventBitIdIndex;
|
||||
/* 0x598 */ s16 mEventId;
|
||||
/* 0x59C */ u32 mTreasureDemoItemId;
|
||||
/* 0x59C */ u32 mItemId;
|
||||
/* 0x5A0 */ s32 mOwlStatueId;
|
||||
|
||||
enum Action_e {
|
||||
@@ -63,19 +63,23 @@ private:
|
||||
TAG_LOCATION_RUINED_THEATRE
|
||||
};
|
||||
|
||||
void setAction(Action_e action) {
|
||||
void setAction(u8 action) {
|
||||
mCurrentAction = action;
|
||||
}
|
||||
|
||||
|
||||
u32 getSwbit() {
|
||||
u8 getSwbit() {
|
||||
return fopAcM_GetParamBit(this, 0, 8);
|
||||
}
|
||||
|
||||
// Returns whether player has obtained a Sky Character from the tag
|
||||
u32 getSwbit2() {
|
||||
u8 getSwbit2() {
|
||||
return fopAcM_GetParamBit(this, 12, 8);
|
||||
}
|
||||
|
||||
u8 getType() {
|
||||
return fopAcM_GetParamBit(this, 8, 4);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* D_A_TAG_STATUE_EVT_H */
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
class daTagStream_c : public fopAc_ac_c {
|
||||
public:
|
||||
u8 getPriority() {
|
||||
u8 getPriority() const {
|
||||
return mPriority;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,61 +1,16 @@
|
||||
#ifndef D_A_TAG_THEB_HINT_H
|
||||
#define D_A_TAG_THEB_HINT_H
|
||||
|
||||
// #include "d/actor/d_a_npc_theB.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
// needs to be pulled from d_a_npc_theB.h eventually
|
||||
struct daNpcTheB_c {
|
||||
daNpcTheB_c();
|
||||
~daNpcTheB_c();
|
||||
void create();
|
||||
void CreateHeap();
|
||||
void Delete();
|
||||
void Execute();
|
||||
void Draw();
|
||||
void ctrlJoint(J3DJoint*, J3DModel*);
|
||||
void createHeapCallBack(fopAc_ac_c*);
|
||||
void ctrlJointCallBack(J3DJoint*, int);
|
||||
void getHandPos1(int);
|
||||
void getHandPos2(int);
|
||||
void setHintEvent(s32, u16, int);
|
||||
void main();
|
||||
void setParam();
|
||||
void ctrlBtk();
|
||||
void setAttnPos();
|
||||
void setExpressionAnm(int, bool);
|
||||
void setExpressionBtp(int);
|
||||
bool setMotionAnm(int, f32);
|
||||
bool drawDbgInfo();
|
||||
void reset();
|
||||
void playExpression();
|
||||
void playMotion();
|
||||
void doNormalAction();
|
||||
void doEvent();
|
||||
void lookat();
|
||||
void wait(void*);
|
||||
void setMotion(int, f32, int);
|
||||
void setExpression(int, f32);
|
||||
void talk(void*);
|
||||
void EvCut_PersonalCombatIntro(int);
|
||||
void EvCut_PersonalCombatRevenge(int);
|
||||
void EvCut_PersonalCombatAfter();
|
||||
void EvCut_AnnulationFieldRace(int);
|
||||
void EvCut_TheBHint(int);
|
||||
void EvCut_CoachGuardGameOver(int);
|
||||
|
||||
static u8 mEvtSeqList[72];
|
||||
};
|
||||
|
||||
class daTagTheBHint_c : public fopAc_ac_c {
|
||||
public:
|
||||
|
||||
u8 getSwitchNo() {
|
||||
u32 getSwitchNo() {
|
||||
return shape_angle.x & 0xff;
|
||||
}
|
||||
|
||||
u16 getMessageNo() {
|
||||
u32 getMessageNo() {
|
||||
return shape_angle.z & 0xffff;
|
||||
}
|
||||
|
||||
@@ -65,37 +20,11 @@ public:
|
||||
|
||||
s8 getRoomNo() {
|
||||
return fopAcM_GetParam(this) >> 24;
|
||||
}
|
||||
|
||||
int create() {
|
||||
fopAcM_ct(this, daTagTheBHint_c);
|
||||
field_0x568 = pow(scale.x * 100.0f,2.0f);
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
int execute() {
|
||||
if (fopAcM_isSwitch(this,getSwitchNo())) {
|
||||
fopAcM_delete(this);
|
||||
return 1;
|
||||
} else {
|
||||
f32 distance = fopAcM_searchPlayerDistanceXZ2(this);
|
||||
inline int create();
|
||||
inline int execute();
|
||||
|
||||
if (distance < field_0x568) {
|
||||
daNpcTheB_c* the_b = (daNpcTheB_c*)fpcM_SearchByName(PROC_NPC_THEB);
|
||||
if (the_b) {
|
||||
s8 roomNo = getRoomNo();
|
||||
|
||||
if (roomNo == 0xFF) {
|
||||
roomNo = fopAcM_GetRoomNo(this);
|
||||
}
|
||||
|
||||
the_b->setHintEvent(getMessageNo(),getLinkID(),roomNo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
/* 0x568 */ f32 field_0x568;
|
||||
};
|
||||
|
||||
|
||||
@@ -29,31 +29,31 @@ private:
|
||||
/* 0x574 */ f32 mFogNear;
|
||||
/* 0x578 */ f32 mFogFar;
|
||||
/* 0x57C */ f32 mColorBlend;
|
||||
/* 0x580 */ bool mPrevCameraInWaterfall;
|
||||
/* 0x580 */ u8 mPrevCameraInWaterfall;
|
||||
/* 0x581 */ u8 mFrameCountdown;
|
||||
/* 0x582 */ u8 mColpat;
|
||||
/* 0x583 */ u8 mIsMasterWaterfallTag;
|
||||
};
|
||||
|
||||
struct daTagWaterFall_HIO_c {
|
||||
struct daTagWaterFall_HIO_c : public JORReflexible {
|
||||
public:
|
||||
daTagWaterFall_HIO_c();
|
||||
virtual ~daTagWaterFall_HIO_c();
|
||||
virtual ~daTagWaterFall_HIO_c() {}
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x00 */ /* vtable */
|
||||
|
||||
/* 0x04 */ s8 field_0x04;
|
||||
/* 0x05 */ bool mShouldModifyFog;
|
||||
/* 0x06 */ u8 pad0[2];
|
||||
/* 0x08 */ f32 mBaseFogNear;
|
||||
/* 0x0C */ f32 mBaseFogFar;
|
||||
/* 0x10 */ f32 mColorBlendStepDivisor;
|
||||
/* 0x14 */ u8 field_0x14;
|
||||
/* 0x15 */ u8 field_0x15;
|
||||
/* 0x16 */ u8 pad1[2];
|
||||
/* 0x18 */ f32 field_0x18;
|
||||
/* 0x1C */ f32 field_0x1C;
|
||||
/* 0x20 */ f32 field_0x20;
|
||||
/* 0x04 */ s8 child;
|
||||
/* 0x05 */ u8 enable_fog_adjust;
|
||||
/* 0x08 */ f32 base_fog_far;
|
||||
/* 0x0C */ f32 base_fog_near;
|
||||
/* 0x10 */ f32 color_blend_step_divisor;
|
||||
/* 0x14 */ u8 draw_ellipse;
|
||||
/* 0x15 */ u8 enable_ellipse_adjust;
|
||||
/* 0x18 */ f32 ellipse_radius_a;
|
||||
/* 0x1C */ f32 ellipse_radius_b;
|
||||
/* 0x20 */ f32 ellipse_rotate;
|
||||
};
|
||||
|
||||
#endif /* D_A_TAG_WATERFALL_H */
|
||||
|
||||
@@ -16,8 +16,8 @@ public:
|
||||
void offMidnaTagSw2();
|
||||
void setCoC(cXyz i_coC) { mCoC = i_coC; }
|
||||
|
||||
u8 get_MTagSw() { return fopAcM_GetParamBit(this, 8, 8); }
|
||||
u8 get_MTagSw2() { return fopAcM_GetParamBit(this, 16, 8); }
|
||||
int get_MTagSw() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
|
||||
int get_MTagSw2() { return (fopAcM_GetParam(this) >> 16) & 0xFF; }
|
||||
s32 get_prm() { return fopAcM_GetParam(this) & 0xff; }
|
||||
|
||||
int is_CoHit() { return mIsCoHit; }
|
||||
|
||||
+1
-1
@@ -219,7 +219,7 @@ public:
|
||||
MtxP GetBaseMtxP() { return pm_base; }
|
||||
bool ChkNoCalcVtx() { return mFlags & NO_CALC_VTX_e; }
|
||||
bool ChkFlush() { return field_0x91 & 8; }
|
||||
void SetLock() { mFlags |= LOCK_e; }
|
||||
void SetLock() { mFlags |= (u8)LOCK_e; }
|
||||
void OffRoofRegist() { field_0x91 |= 0x4; }
|
||||
void OnRoofRegist() { field_0x91 &= ~0x04; }
|
||||
bool ChkRoofRegist() { return field_0x91 & 4;}
|
||||
|
||||
@@ -5275,7 +5275,7 @@ void daAlink_c::setIceSlipSpeed() {
|
||||
|
||||
void daAlink_c::setPolygonSpeed() {
|
||||
offNoResetFlg3(daPy_FLG3(FLG3_UNK_1000 | FLG3_UNK_2000));
|
||||
if ((!checkEventRun() || checkNoResetFlg0(daPy_FLG0(FLG0_UNK_10000 | FLG0_UNK_4000))) && !checkMagneBootsOn()) {
|
||||
if ((!checkEventRun() || checkNoResetFlg0(daPy_FLG0(FLG0_DEMO_STREAM_ACCEPT | FLG0_UNK_4000))) && !checkMagneBootsOn()) {
|
||||
cM3dGPla tripla;
|
||||
if (checkNoResetFlg3(FLG3_MIDNA_TALK_POLY_SPEED)) {
|
||||
offNoResetFlg3(FLG3_MIDNA_TALK_POLY_SPEED);
|
||||
@@ -13097,7 +13097,7 @@ void daAlink_c::posMove() {
|
||||
current.pos.x += mWindSpeed.x;
|
||||
current.pos.z += mWindSpeed.z;
|
||||
}
|
||||
} else if (checkNoResetFlg0(daPy_FLG0(FLG0_UNK_10000 | FLG0_UNK_4000))) {
|
||||
} else if (checkNoResetFlg0(daPy_FLG0(FLG0_DEMO_STREAM_ACCEPT | FLG0_UNK_4000))) {
|
||||
current.pos += field_0x3594;
|
||||
}
|
||||
} else if (checkOctaIealSpecialCollect()) {
|
||||
|
||||
@@ -888,7 +888,7 @@ void daAlink_c::resetSpecialEvent() {
|
||||
void daAlink_c::endDemoMode() {
|
||||
BOOL flyAtnWait = checkFlyAtnWait();
|
||||
endHighModel();
|
||||
offNoResetFlg0(daPy_FLG0(FLG0_UNK_10000 | FLG0_UNK_400));
|
||||
offNoResetFlg0(daPy_FLG0(FLG0_DEMO_STREAM_ACCEPT | FLG0_UNK_400));
|
||||
field_0x06f4 = NULL;
|
||||
|
||||
if (field_0x06f8 != NULL) {
|
||||
|
||||
@@ -6,12 +6,23 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_CstaSw.h"
|
||||
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
daTagCstaSw_HIO_c l_HIO;
|
||||
|
||||
daTagCstaSw_HIO_c::daTagCstaSw_HIO_c() {
|
||||
unk_0x4 = 0;
|
||||
show_range = 0;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
void daTagCstaSw_HIO_c::genMessage(JORMContext* ctx) {
|
||||
// "Show range"
|
||||
ctx->genCheckBox("範囲表示", &show_range, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
void daTagCstaSw_c::setBaseMtx() {
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle.x, shape_angle.y, shape_angle.z);
|
||||
@@ -21,12 +32,20 @@ int daTagCstaSw_c::create() {
|
||||
fopAcM_ct(this, daTagCstaSw_c);
|
||||
mSwitch = getSw();
|
||||
setBaseMtx();
|
||||
|
||||
#if DEBUG
|
||||
// "Stone statue SW tag"
|
||||
l_HIO.entryHIO("石像SWタグ");
|
||||
#endif
|
||||
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
fopAc_ac_c* daTagCstaSw_c::searchSekizoAct(void* i_actor, void*) {
|
||||
if (i_actor && fopAcM_IsActor(i_actor) && fopAcM_GetProfName(i_actor) == PROC_CSTAF) {
|
||||
return (fopAc_ac_c*)i_actor;
|
||||
fopAc_ac_c* daTagCstaSw_c::searchSekizoAct(void* i_actor, void* param_1) {
|
||||
fopAc_ac_c* actor2 = (fopAc_ac_c*)param_1;
|
||||
fopAc_ac_c* actor = (fopAc_ac_c*)i_actor;
|
||||
if (actor && fopAcM_IsActor(actor) && fopAcM_GetProfName(actor) == PROC_CSTAF) {
|
||||
return actor;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -40,7 +59,8 @@ bool daTagCstaSw_c::areaCheck() {
|
||||
}
|
||||
|
||||
cXyz vec_to_actor = current.pos - sekizo_p->current.pos;
|
||||
if (vec_to_actor.absXZ() <= scale.x * 100.0f) {
|
||||
f32 dist_to_actor = vec_to_actor.absXZ();
|
||||
if (dist_to_actor <= scale.x * 100.0f) {
|
||||
in_area = true;
|
||||
}
|
||||
|
||||
@@ -48,7 +68,8 @@ bool daTagCstaSw_c::areaCheck() {
|
||||
}
|
||||
|
||||
int daTagCstaSw_c::Execute() {
|
||||
if (areaCheck() == 1) {
|
||||
bool checkResult = areaCheck();
|
||||
if (checkResult == 1) {
|
||||
if (!fopAcM_isSwitch(this, mSwitch)) {
|
||||
fopAcM_onSwitch(this, mSwitch);
|
||||
}
|
||||
@@ -61,10 +82,23 @@ int daTagCstaSw_c::Execute() {
|
||||
}
|
||||
|
||||
int daTagCstaSw_c::Draw() {
|
||||
#if DEBUG
|
||||
if (l_HIO.show_range) {
|
||||
g_env_light.settingTevStruct(16, ¤t.pos, &tevStr);
|
||||
|
||||
GXColor color = (GXColor){0, 0, 0xff, 0x80};
|
||||
dDbVw_drawCylinderXlu(current.pos, scale.x * 100.0f, scale.y * 100.0f, color, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daTagCstaSw_c::Delete() {
|
||||
#if DEBUG
|
||||
l_HIO.removeHIO();
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -77,17 +111,16 @@ static int daTagCstaSw_Execute(daTagCstaSw_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTagCstaSw_Delete(daTagCstaSw_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return i_this->Delete();
|
||||
}
|
||||
|
||||
static int daTagCstaSw_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagCstaSw_c*>(i_this)->create();
|
||||
daTagCstaSw_c* cstaSw = static_cast<daTagCstaSw_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return cstaSw->create();
|
||||
}
|
||||
|
||||
daTagCstaSw_HIO_c::~daTagCstaSw_HIO_c() {}
|
||||
|
||||
static daTagCstaSw_HIO_c l_HIO;
|
||||
|
||||
static actor_method_class l_daTagCstaSw_Method = {
|
||||
(process_method_func)daTagCstaSw_Create, (process_method_func)daTagCstaSw_Delete,
|
||||
(process_method_func)daTagCstaSw_Execute, (process_method_func)NULL,
|
||||
|
||||
@@ -10,29 +10,32 @@
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
static int createSolidHeap(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagLv6Gate_c*>(i_this)->createHeap();
|
||||
}
|
||||
|
||||
static f32 const l_minRelative[] = {-700.0f, -300.0f, -2000.0f};
|
||||
|
||||
static f32 const l_maxRelative[] = {700.0f, 0.0f, 1000.0f};
|
||||
|
||||
static char* l_arcName = "Lv6Gate";
|
||||
|
||||
int daTagLv6Gate_c::createHeap() {
|
||||
static int createSolidHeap(fopAc_ac_c* i_this) {
|
||||
daTagLv6Gate_c* gate = static_cast<daTagLv6Gate_c*>(i_this);
|
||||
return gate->createHeap();
|
||||
}
|
||||
|
||||
inline int daTagLv6Gate_c::createHeap() {
|
||||
J3DAnmTextureSRTKey* btk;
|
||||
|
||||
J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 15);
|
||||
mpModel[0] = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000284);
|
||||
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 15);
|
||||
JUT_ASSERT(92, modelData != NULL);
|
||||
mpModel[0] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000284);
|
||||
if (mpModel[0] == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
btk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, 19);
|
||||
JUT_ASSERT(100, btk != NULL);
|
||||
mpBtk[0] = new mDoExt_btkAnm();
|
||||
if (mpBtk[0] == NULL ||
|
||||
!mpBtk[0]->init(model_data, btk, TRUE, J3DFrameCtrl::EMode_NONE, 1.0f, 0, -1))
|
||||
!mpBtk[0]->init(modelData, btk, TRUE, J3DFrameCtrl::EMode_NONE, 1.0f, 0, -1))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -42,15 +45,17 @@ int daTagLv6Gate_c::createHeap() {
|
||||
}
|
||||
|
||||
btk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, 20);
|
||||
JUT_ASSERT(108, btk != NULL);
|
||||
mpBtk[1] = new mDoExt_btkAnm();
|
||||
if (mpBtk[1] == NULL ||
|
||||
!mpBtk[1]->init(model_data, btk, TRUE, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1))
|
||||
!mpBtk[1]->init(modelData, btk, TRUE, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 16);
|
||||
mpModel[1] = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000084);
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 16);
|
||||
JUT_ASSERT(115, modelData != NULL);
|
||||
mpModel[1] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
|
||||
if (mpModel[1] == NULL) {
|
||||
return 0;
|
||||
}
|
||||
@@ -68,7 +73,9 @@ int daTagLv6Gate_c::createHeap() {
|
||||
}
|
||||
|
||||
static int daTagLv6Gate_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagLv6Gate_c*>(i_this)->create();
|
||||
daTagLv6Gate_c* gate = static_cast<daTagLv6Gate_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return gate->create();
|
||||
}
|
||||
|
||||
void daTagLv6Gate_c::initBaseMtx() {
|
||||
@@ -76,13 +83,13 @@ void daTagLv6Gate_c::initBaseMtx() {
|
||||
|
||||
mDoMtx_stack_c::transS(0.0f, 0.0f, 0.0f);
|
||||
mDoMtx_stack_c::YrotM(0);
|
||||
MTXCopy(mDoMtx_stack_c::get(), field_0x6f8[0]);
|
||||
cMtx_copy(mDoMtx_stack_c::get(), field_0x6f8[0]);
|
||||
mpModel[0]->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mBgW[0].Move();
|
||||
|
||||
mDoMtx_stack_c::transS(0.0f, 2887.0f, -8330.0f);
|
||||
mDoMtx_stack_c::YrotM(0);
|
||||
MTXCopy(mDoMtx_stack_c::get(), field_0x6f8[1]);
|
||||
cMtx_copy(mDoMtx_stack_c::get(), field_0x6f8[1]);
|
||||
mpModel[1]->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mBgW[1].Move();
|
||||
}
|
||||
@@ -159,27 +166,25 @@ inline int daTagLv6Gate_c::execute() {
|
||||
actor1 = NULL;
|
||||
fopAcM_SearchByID(parentActorID, &actor1);
|
||||
|
||||
if (actor1 == NULL) {
|
||||
break;
|
||||
if (actor1 != NULL) {
|
||||
fopAcM_GetOldPosition_p(actor1)->set(pos);
|
||||
fopAcM_GetPosition_p(actor1)->set(pos);
|
||||
|
||||
#if PLATFORM_GCN
|
||||
actor2 = NULL;
|
||||
fopAcM_SearchByName(PROC_NPC_TKC, &actor2);
|
||||
|
||||
if (actor2 == NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
*fopAcM_GetOldPosition_p(actor2) = pos;
|
||||
*fopAcM_GetPosition_p(actor2) = pos;
|
||||
#endif
|
||||
}
|
||||
|
||||
fopAcM_GetOldPosition_p(actor1)->set(pos);
|
||||
fopAcM_GetPosition_p(actor1)->set(pos);
|
||||
|
||||
#if VERSION != VERSION_SHIELD_DEBUG
|
||||
|
||||
actor2 = NULL;
|
||||
fopAcM_SearchByName(PROC_NPC_TKC, &actor2);
|
||||
|
||||
if (actor2 == NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
*fopAcM_GetOldPosition_p(actor2) = pos;
|
||||
*fopAcM_GetPosition_p(actor2) = pos;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case '0005':
|
||||
break;
|
||||
case '0006':
|
||||
fopAcM_onSwitch(this, getSwitchNo2());
|
||||
mpBtk[0]->setFrame(mpBtk[0]->getEndFrame());
|
||||
@@ -189,7 +194,9 @@ inline int daTagLv6Gate_c::execute() {
|
||||
fopAcM_delete(parentActorID);
|
||||
break;
|
||||
default:
|
||||
int unused; // debug: force extra b instruction at end of case
|
||||
JUT_ASSERT(332, FALSE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,8 +340,8 @@ int daTagLv6Gate_c::draw() {
|
||||
}
|
||||
|
||||
for (u16 i = 0; i < 2; i++) {
|
||||
J3DModelData* model_data = mpModel[1]->getModelData();
|
||||
model_data->getMaterialNodePointer(i)->getTevKColor(3)->a = field_0x760[i];
|
||||
J3DMaterial* material = mpModel[1]->getModelData()->getMaterialNodePointer(i);
|
||||
material->getTevKColor(3)->a = field_0x760[i];
|
||||
}
|
||||
|
||||
g_env_light.setLightTevColorType_MAJI(mpModel[1], &tevStr);
|
||||
@@ -360,6 +367,7 @@ daTagLv6Gate_c::~daTagLv6Gate_c() {
|
||||
}
|
||||
|
||||
static int daTagLv6Gate_Delete(daTagLv6Gate_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagLv6Gate_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -18,14 +18,16 @@ int daTagLv7Gate_c::createHeap() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 11);
|
||||
mpModel = mDoExt_J3DModel__create(model_data, 0, 0x11000084);
|
||||
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 11);
|
||||
JUT_ASSERT(92, modelData != NULL);
|
||||
mpModel = mDoExt_J3DModel__create(modelData, 0, 0x11000084);
|
||||
|
||||
if (mpModel == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
J3DAnmTransform* bck = (J3DAnmTransform*)dComIfG_getObjectRes(l_arcName, 7);
|
||||
JUT_ASSERT(100, bck != NULL);
|
||||
|
||||
mpBck = new mDoExt_bckAnm();
|
||||
|
||||
@@ -37,11 +39,14 @@ int daTagLv7Gate_c::createHeap() {
|
||||
}
|
||||
|
||||
static int createSolidHeap(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagLv7Gate_c*>(i_this)->createHeap();
|
||||
daTagLv7Gate_c* gate = static_cast<daTagLv7Gate_c*>(i_this);
|
||||
return gate->createHeap();
|
||||
}
|
||||
|
||||
static int daTagLv7Gate_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagLv7Gate_c*>(i_this)->create();
|
||||
daTagLv7Gate_c* gate = static_cast<daTagLv7Gate_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return gate->create();
|
||||
}
|
||||
|
||||
int daTagLv7Gate_c::create() {
|
||||
@@ -66,48 +71,46 @@ int daTagLv7Gate_c::create() {
|
||||
return phase;
|
||||
}
|
||||
|
||||
void daTagLv7Gate_c::setPath(u8 i_path_ID) {
|
||||
int daTagLv7Gate_c::setPath(int i_path_ID) {
|
||||
mRoomPath = dPath_GetRoomPath(i_path_ID, fopAcM_GetRoomNo(this));
|
||||
if (mRoomPath != NULL) {
|
||||
dPnt* pnt = dPath_GetPnt(mRoomPath, 0);
|
||||
cXyz pos1 = pnt->m_position;
|
||||
|
||||
pnt = dPath_GetPnt(mRoomPath, 1);
|
||||
cXyz pos2 = pnt->m_position;
|
||||
|
||||
mPos1 = pos1;
|
||||
|
||||
// Fake match?
|
||||
s16 angle_y = cLib_targetAngleY(&pos1, &pos2);
|
||||
// s16 angle_x = cLib_targetAngleX(&pos1, &pos2);
|
||||
|
||||
// field_0x594.set(-angle_x, angle_y, 0);
|
||||
field_0x594.x = -cLib_targetAngleX(&pos1, &pos2);
|
||||
// field_0x594.x = -angle_x;
|
||||
field_0x594.y = angle_y;
|
||||
field_0x594.z = 0;
|
||||
|
||||
mDistance = sqrtf(PSVECSquareDistance((Vec*)&mPos1, (Vec*)&pos2));
|
||||
field_0x5a0 = 1;
|
||||
mPos2 = pos2;
|
||||
if (mRoomPath == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
cXyz pos1 = dPath_GetPnt(mRoomPath, 0)->m_position;
|
||||
cXyz pos2 = dPath_GetPnt(mRoomPath, 1)->m_position;
|
||||
|
||||
mPos1.set(pos1);
|
||||
|
||||
field_0x594.set(-cLib_targetAngleX(&pos1, &pos2), cLib_targetAngleY(&pos1, &pos2), 0);
|
||||
|
||||
mDistance = mPos1.abs(pos2);
|
||||
field_0x5a0 = 1;
|
||||
mPos2.set(pos2);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void daTagLv7Gate_c::initBaseMtx() {
|
||||
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
|
||||
if (mpModel != NULL) {
|
||||
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
|
||||
setBaseMtx();
|
||||
}
|
||||
}
|
||||
|
||||
void daTagLv7Gate_c::setBaseMtx() {
|
||||
if (mpModel) {
|
||||
cXyz local_34(0.0f, 0.0f, speedF);
|
||||
|
||||
mDoMtx_stack_c::transS(mPos1);
|
||||
mDoMtx_stack_c::ZXYrotM((csXyz&)field_0x594);
|
||||
mDoMtx_stack_c::multVec(&local_34, (Vec*)&mPos1);
|
||||
MTXCopy(mDoMtx_stack_c::get(), mpModel->mBaseTransformMtx);
|
||||
|
||||
attention_info.position = mPos1;
|
||||
if (mpModel == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
cXyz local_34(0.0f, 0.0f, speedF);
|
||||
|
||||
mDoMtx_stack_c::transS(mPos1);
|
||||
mDoMtx_stack_c::ZXYrotM(field_0x594);
|
||||
mDoMtx_stack_c::multVec(&local_34, &mPos1);
|
||||
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
|
||||
attention_info.position = mPos1;
|
||||
}
|
||||
|
||||
void daTagLv7Gate_c::create_init() {
|
||||
@@ -119,14 +122,11 @@ void daTagLv7Gate_c::create_init() {
|
||||
field_0x5b0 = false;
|
||||
field_0x5b1 = false;
|
||||
|
||||
setPath(getPathID() & 0xFF);
|
||||
setPath(getPathID());
|
||||
|
||||
attention_info.position = mPos1;
|
||||
|
||||
if (mpModel) {
|
||||
initBaseMtx();
|
||||
setBaseMtx();
|
||||
}
|
||||
initBaseMtx();
|
||||
|
||||
// City in the Sky clear
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[268])) {
|
||||
@@ -149,13 +149,9 @@ void daTagLv7Gate_c::create_init() {
|
||||
|
||||
fopAcM_create(PROC_NPC_TKS, 7, &pos, fopAcM_GetRoomNo(this), &local_54, NULL, -1);
|
||||
|
||||
pos.x = 2603.315f;
|
||||
pos.y = -200.0f;
|
||||
pos.z = 5485.9224f;
|
||||
pos.set(2603.315f, -200.0f, 5485.9224f);
|
||||
|
||||
local_54.x = 0.0f;
|
||||
local_54.y = -0x4000;
|
||||
local_54.z = 0.0f;
|
||||
local_54.set(0, -0x4000, 0);
|
||||
|
||||
fopAcM_create(PROC_NPC_TKJ, 0, &pos, fopAcM_GetRoomNo(this), &local_54, NULL, -1);
|
||||
}
|
||||
@@ -163,6 +159,7 @@ void daTagLv7Gate_c::create_init() {
|
||||
eventInfo.setArchiveName(l_arcName);
|
||||
dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName());
|
||||
mEvtId = dComIfGp_getEventManager().getEventIdx(this, mEvName, -1);
|
||||
JUT_ASSERT(204, mEvtId != -1);
|
||||
fopAcM_orderOtherEventId(this, mEvtId, -1, -1, 2, 1);
|
||||
}
|
||||
|
||||
@@ -187,7 +184,7 @@ void daTagLv7Gate_c::flyAnime() {
|
||||
|
||||
if (bck_anm == bck_anm_3) {
|
||||
if (field_0x5ac < 150) {
|
||||
field_0x5ac += 1;
|
||||
field_0x5ac += (u16)1;
|
||||
if (field_0x5ac >= 150) {
|
||||
bck = bck_anm_4;
|
||||
attribute = J3DFrameCtrl::EMode_NONE;
|
||||
@@ -199,10 +196,7 @@ void daTagLv7Gate_c::flyAnime() {
|
||||
attribute = J3DFrameCtrl::EMode_NONE;
|
||||
}
|
||||
} else {
|
||||
// } else if (mpBck->isStop()) {
|
||||
// Fake match?
|
||||
mDoExt_bckAnm* tmp = mpBck;
|
||||
if (tmp->isStop()) {
|
||||
if (mpBck->isStop()) {
|
||||
if (bck_anm == bck_anm_2) {
|
||||
bck = bck_anm_3;
|
||||
attribute = J3DFrameCtrl::EMode_LOOP;
|
||||
@@ -287,46 +281,39 @@ int daTagLv7Gate_c::execute() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool daTagLv7Gate_c::checkPoint(f32 i_speed) {
|
||||
bool daTagLv7Gate_c::checkPoint(cXyz& i_point, f32 i_speed) {
|
||||
dPnt* pnt = dPath_GetPnt(mRoomPath, field_0x5a0);
|
||||
mDistance -= i_speed;
|
||||
if (sqrtf(PSVECSquareDistance((Vec*)&mPos1, (Vec*)&pnt->m_position)) < i_speed ||
|
||||
if (i_point.abs(pnt->m_position) < i_speed ||
|
||||
mDistance < 0.0f) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool daTagLv7Gate_c::setNextPoint() {
|
||||
bool bVar1;
|
||||
dPath_GetPnt(mRoomPath, field_0x5a0);
|
||||
dPnt* unusedPnt = dPath_GetPnt(mRoomPath, field_0x5a0);
|
||||
dPnt* pnt;
|
||||
field_0x5a0 += 1;
|
||||
if (field_0x5a0 >= mRoomPath->m_num) {
|
||||
field_0x5a0 = mRoomPath->m_num - 1;
|
||||
mDistance = 0;
|
||||
bVar1 = true;
|
||||
return true;
|
||||
} else {
|
||||
dPnt* pnt = dPath_GetPnt(mRoomPath, field_0x5a0);
|
||||
|
||||
cXyz pos1(mPos1.x, 0.0f, mPos1.z);
|
||||
|
||||
cXyz pos2(pnt->m_position.x, 0.0f, pnt->m_position.z);
|
||||
|
||||
mDistance = sqrtf(PSVECSquareDistance((Vec*)&pos1, (Vec*)&pos2));
|
||||
mPos2 = pnt->m_position;
|
||||
bVar1 = false;
|
||||
pnt = dPath_GetPnt(mRoomPath, field_0x5a0);
|
||||
mDistance = mPos1.absXZ(pnt->m_position);
|
||||
mPos2.set(pnt->m_position);
|
||||
return false;
|
||||
}
|
||||
if (bVar1) {
|
||||
field_0x5b1 = false;
|
||||
speedF = 0;
|
||||
}
|
||||
return bVar1;
|
||||
}
|
||||
|
||||
void daTagLv7Gate_c::calcFly() {
|
||||
f32 speed = speedF;
|
||||
if (checkPoint(speed)) {
|
||||
setNextPoint();
|
||||
if (checkPoint(mPos1, speedF)) {
|
||||
if (setNextPoint()) {
|
||||
field_0x5b1 = false;
|
||||
speedF = 0.0f;
|
||||
}
|
||||
}
|
||||
s16 angle_x = -cLib_targetAngleX(&mPos1, &mPos2);
|
||||
s16 angle_y = cLib_targetAngleY(&mPos1, &mPos2);
|
||||
@@ -361,6 +348,7 @@ daTagLv7Gate_c::~daTagLv7Gate_c() {
|
||||
}
|
||||
|
||||
static int daTagLv7Gate_Delete(daTagLv7Gate_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagLv7Gate_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
static char* l_arcName = "Lv8Gate";
|
||||
|
||||
static int createSolidHeap(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagLv8Gate_c*>(i_this)->createHeap();
|
||||
daTagLv8Gate_c* gate = static_cast<daTagLv8Gate_c*>(i_this);
|
||||
return gate->createHeap();
|
||||
}
|
||||
|
||||
daTagLv8Gate_c::~daTagLv8Gate_c() {
|
||||
@@ -43,21 +44,20 @@ inline int daTagLv8Gate_c::create() {
|
||||
fopAcM_ct(this, daTagLv8Gate_c);
|
||||
|
||||
cPhs__Step step;
|
||||
/* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */
|
||||
/* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */
|
||||
if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) {
|
||||
step = cPhs_ERROR_e;
|
||||
return cPhs_ERROR_e;
|
||||
} else {
|
||||
step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName);
|
||||
if (step == cPhs_COMPLEATE_e) {
|
||||
if (!fopAcM_entrySolidHeap(this, createSolidHeap, 0x1600)) {
|
||||
step = cPhs_ERROR_e;
|
||||
return cPhs_ERROR_e;
|
||||
} else {
|
||||
create_init();
|
||||
}
|
||||
}
|
||||
return step;
|
||||
}
|
||||
|
||||
return step;
|
||||
}
|
||||
|
||||
inline int daTagLv8Gate_c::draw() {
|
||||
@@ -81,18 +81,24 @@ inline int daTagLv8Gate_c::draw() {
|
||||
dComIfGd_setList();
|
||||
|
||||
if (mpBck != NULL) {
|
||||
mpModel->getModelData()->getJointNodePointer(0)->setMtxCalc(NULL);
|
||||
mpBck->remove(mpModel->getModelData());
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// this function and ::execute seem to be inline, but somehow both this function's .data and .rodata
|
||||
// are supposed to be placed before ::execute's (.data order is reversed for inline functions but
|
||||
// .rodata order is not)
|
||||
// retail function order also suggests that this function comes first
|
||||
int daTagLv8Gate_c::createHeap() {
|
||||
if (strcmp(dComIfGp_getStartStageName(), "D_MN08") == 0) {
|
||||
J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 8);
|
||||
mpModel = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000084);
|
||||
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 8);
|
||||
JUT_ASSERT(275, modelData != NULL);
|
||||
mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
|
||||
|
||||
J3DAnmTransform* bck = (J3DAnmTransform*)dComIfG_getObjectRes(l_arcName, 5);
|
||||
JUT_ASSERT(283, bck != NULL);
|
||||
mpBck = new mDoExt_bckAnm();
|
||||
if (mpBck == NULL ||
|
||||
!mpBck->init(bck, TRUE, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1, false))
|
||||
@@ -105,15 +111,16 @@ int daTagLv8Gate_c::createHeap() {
|
||||
}
|
||||
|
||||
static int daTagLv8Gate_Create(fopAc_ac_c* i_this) {
|
||||
daTagLv8Gate_c* a_this = static_cast<daTagLv8Gate_c*>(i_this);
|
||||
return a_this->create();
|
||||
daTagLv8Gate_c* gate = static_cast<daTagLv8Gate_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return gate->create();
|
||||
}
|
||||
|
||||
static int daTagLv8Gate_Execute(daTagLv8Gate_c* i_this) {
|
||||
return i_this->execute();
|
||||
}
|
||||
|
||||
inline int daTagLv8Gate_c::execute() {
|
||||
int daTagLv8Gate_c::execute() {
|
||||
if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) {
|
||||
dEvent_manager_c& eventManager = dComIfGp_getEventManager();
|
||||
s32 cut_index = eventManager.getMyStaffId(l_arcName, NULL, 0);
|
||||
@@ -132,8 +139,8 @@ inline int daTagLv8Gate_c::execute() {
|
||||
if (mirror_table != NULL) {
|
||||
static_cast<daObjMirrorTable_c*>(mirror_table)->setEffect();
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case '0002':
|
||||
dStage_changeScene(getSceneNo(), 0.0f, 0, fopAcM_GetRoomNo(this), 0, -1);
|
||||
break;
|
||||
@@ -215,6 +222,7 @@ static int daTagLv8Gate_IsDelete(daTagLv8Gate_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTagLv8Gate_Delete(daTagLv8Gate_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagLv8Gate_c();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+276
-143
@@ -4,12 +4,13 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_TWgate.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/actor/d_a_tag_TWgate.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_msg_object.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
struct daTagTWGate_zevParam {
|
||||
/* 0x00 */ char* mArcName;
|
||||
@@ -23,13 +24,11 @@ struct daTagTWGate_zevParam {
|
||||
/* 0x1B */ s8 mLayer;
|
||||
};
|
||||
|
||||
void daTagTWGate_c::initWait() {
|
||||
mEventID = -1;
|
||||
}
|
||||
daTagTWGate_Attr_c const daTagTWGate_c::mAttr = {};
|
||||
|
||||
u8 const daTagTWGate_c::mAttr[1] = {
|
||||
0x00,
|
||||
};
|
||||
#if DEBUG
|
||||
daTagTWGate_Hio_c daTagTWGate_c::mHio;
|
||||
#endif
|
||||
|
||||
static daTagTWGate_zevParam const l_zevParamTbl[4] = {
|
||||
{
|
||||
@@ -80,7 +79,7 @@ static daTagTWGate_zevParam const l_zevParamTbl[4] = {
|
||||
|
||||
static const char* l_myName = "Gate";
|
||||
|
||||
actionFunc daTagTWGate_c::ActionTable[13][2] = {
|
||||
const actionFunc daTagTWGate_c::ActionTable[][2] = {
|
||||
{&daTagTWGate_c::initWait, &daTagTWGate_c::executeWait},
|
||||
{&daTagTWGate_c::initDemoFilone1, &daTagTWGate_c::executeDemoFilone1},
|
||||
{&daTagTWGate_c::initDemoFilone2, &daTagTWGate_c::executeDemoFilone2},
|
||||
@@ -96,59 +95,117 @@ actionFunc daTagTWGate_c::ActionTable[13][2] = {
|
||||
{&daTagTWGate_c::initDemoHyral3, &daTagTWGate_c::executeDemoHyral3},
|
||||
};
|
||||
|
||||
void daTagTWGate_c::executeWait() {
|
||||
f32 radius = pow(scale.x * 100.0f, 2.0f);
|
||||
f32 distance = fopAcM_searchActorDistanceXZ2(this, (fopAc_ac_c*)dComIfGp_getPlayer(0));
|
||||
#if DEBUG
|
||||
daTagTWGate_Hio_c::daTagTWGate_Hio_c() {
|
||||
field_0x8 = 0;
|
||||
default_set();
|
||||
}
|
||||
|
||||
if (distance < radius) {
|
||||
void daTagTWGate_Hio_c::ct() {
|
||||
if (field_0x8++ == 0) {
|
||||
// "Twilight Gate tag"
|
||||
entryHIO("トワイライトゲートタグ");
|
||||
}
|
||||
}
|
||||
|
||||
void daTagTWGate_Hio_c::dt() {
|
||||
if (--field_0x8 == 0) {
|
||||
removeHIO();
|
||||
}
|
||||
}
|
||||
|
||||
void daTagTWGate_Hio_c::default_set() {
|
||||
attr = daTagTWGate_c::mAttr;
|
||||
}
|
||||
|
||||
void daTagTWGate_Hio_c::genMessage(JORMContext* ctx) {
|
||||
// "Twilight Gate tag parameter settings"
|
||||
ctx->genLabel("§ トワイライトゲートタグ パラメータ設定 §\n", 0);
|
||||
// "Draw range"
|
||||
ctx->genCheckBox("範囲描画", &attr.show_range, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline daTagTWGate_c::~daTagTWGate_c() {
|
||||
dComIfG_resDelete(&mPhaseZevArc, l_zevParamTbl[mType].mArcName);
|
||||
|
||||
if (mPhaseMdRes.id != cPhs_INIT_e) {
|
||||
dComIfG_resDelete(&mPhaseMdRes, "TWGate_Md");
|
||||
}
|
||||
|
||||
if (mPhasePyRes.id != cPhs_INIT_e) {
|
||||
dComIfG_resDelete(&mPhasePyRes, mIsWolf ? "TWGate_Wf" : "TWGate_Lk");
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
mHio.dt();
|
||||
#endif
|
||||
}
|
||||
|
||||
void daTagTWGate_c::initWait() {
|
||||
mEventID = -1;
|
||||
}
|
||||
|
||||
void daTagTWGate_c::setAction(Mode_e i_action) {
|
||||
JUT_ASSERT(233, i_action < MODE_MAX_e);
|
||||
int oldActionID = mActionID;
|
||||
mActionID = i_action;
|
||||
mAction = ActionTable[mActionID];
|
||||
callInit();
|
||||
}
|
||||
|
||||
void daTagTWGate_c::callInit() {
|
||||
JUT_ASSERT(289, mAction != NULL);
|
||||
(this->*(*mAction))();
|
||||
}
|
||||
|
||||
void daTagTWGate_c::callExecute() {
|
||||
JUT_ASSERT(302, mAction != NULL);
|
||||
(this->*mAction[1])();
|
||||
Z2GetAudioMgr()->seStartLevel(Z2SE_OBJ_DARK_GATE, ¤t.pos,
|
||||
0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
}
|
||||
|
||||
void daTagTWGate_c::executeWait() {
|
||||
f32 radius = std::pow(scale.x * 100.0f, 2.0f);
|
||||
|
||||
if (fopAcM_searchPlayerDistanceXZ2(this) < radius) {
|
||||
if (field_0x5de == 0) {
|
||||
field_0x5de = 1;
|
||||
|
||||
switch (mType) {
|
||||
case TYPE_FILONE:
|
||||
if (fopAcM_isSwitch(this, getSwitch())) {
|
||||
mActionID = ACT_DEMO_FILONE_2;
|
||||
mAction = &ActionTable[mActionID][0];
|
||||
(this->**mAction)();
|
||||
setAction(ACT_DEMO_FILONE_2);
|
||||
} else {
|
||||
mActionID = ACT_DEMO_FILONE_1;
|
||||
mAction = &ActionTable[mActionID][0];
|
||||
(this->**mAction)();
|
||||
setAction(ACT_DEMO_FILONE_1);
|
||||
}
|
||||
break;
|
||||
case TYPE_ORDIN:
|
||||
if (fopAcM_isSwitch(this, getSwitch())) {
|
||||
mActionID = ACT_DEMO_ORDIN_2;
|
||||
mAction = &ActionTable[mActionID][0];
|
||||
(this->**mAction)();
|
||||
setAction(ACT_DEMO_ORDIN_2);
|
||||
} else {
|
||||
mActionID = ACT_DEMO_ORDIN_1;
|
||||
mAction = &ActionTable[mActionID][0];
|
||||
(this->**mAction)();
|
||||
setAction(ACT_DEMO_ORDIN_1);
|
||||
}
|
||||
break;
|
||||
case TYPE_RANAIL:
|
||||
if (fopAcM_isSwitch(this, getSwitch())) {
|
||||
mActionID = ACT_DEMO_RANAIL_2;
|
||||
mAction = &ActionTable[mActionID][0];
|
||||
(this->**mAction)();
|
||||
setAction(ACT_DEMO_RANAIL_2);
|
||||
} else {
|
||||
mActionID = ACT_DEMO_RANAIL_1;
|
||||
mAction = &ActionTable[mActionID][0];
|
||||
(this->**mAction)();
|
||||
setAction(ACT_DEMO_RANAIL_1);
|
||||
}
|
||||
break;
|
||||
case TYPE_HYRAL:
|
||||
if (fopAcM_isSwitch(this, getSwitch())) {
|
||||
mActionID = ACT_DEMO_HYRAL_2;
|
||||
mAction = &ActionTable[mActionID][0];
|
||||
(this->**mAction)();
|
||||
setAction(ACT_DEMO_HYRAL_2);
|
||||
} else {
|
||||
mActionID = ACT_DEMO_HYRAL_1;
|
||||
mAction = &ActionTable[mActionID][0];
|
||||
(this->**mAction)();
|
||||
setAction(ACT_DEMO_HYRAL_1);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// "Twilight Gate demo tag argument 0 error Type=%d
|
||||
OS_REPORT("\nトワイライトゲートデモタグ 引数0エラー Type=%d\n\n", mType);
|
||||
JUT_ASSERT(344, FALSE);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -166,34 +223,36 @@ void daTagTWGate_c::executeDemoFilone1() {
|
||||
dEvent_manager_c& event_manager = dComIfGp_getEventManager();
|
||||
int staffId = event_manager.getMyStaffId(l_myName, NULL, 0);
|
||||
|
||||
int* cutName;
|
||||
if (staffId != -1) {
|
||||
int* cutName = (int*)event_manager.getMyNowCutName(staffId);
|
||||
cutName = (int*)event_manager.getMyNowCutName(staffId);
|
||||
|
||||
if (event_manager.getIsAddvance(staffId)) {
|
||||
switch (*cutName) {
|
||||
case 0x30303031:
|
||||
dComIfGp_getEvent()->setSkipProc(this, dEv_noFinishSkipProc, 0);
|
||||
dComIfGp_getEvent()->startCheckSkipEdge(this);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(395, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
switch (*cutName) {
|
||||
case 0x30303031:
|
||||
if (dComIfGp_getEvent()->chkFlag2(8)) {
|
||||
if (dComIfGp_getEvent()->checkSkipEdge()) {
|
||||
dComIfGp_getEvent()->onSkipFade();
|
||||
mActionID = ACT_DEMO_FILONE_2;
|
||||
mAction = ActionTable[mActionID];
|
||||
(this->**mAction)();
|
||||
setAction(ACT_DEMO_FILONE_2);
|
||||
}
|
||||
event_manager.cutEnd(staffId);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(407, FALSE);
|
||||
}
|
||||
|
||||
if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 &&
|
||||
event_manager.endCheck(mEventID))
|
||||
{
|
||||
mActionID = ACT_DEMO_FILONE_2;
|
||||
mAction = ActionTable[mActionID];
|
||||
(this->**mAction)();
|
||||
setAction(ACT_DEMO_FILONE_2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -213,12 +272,13 @@ void daTagTWGate_c::initDemoFilone2() {
|
||||
}
|
||||
|
||||
void daTagTWGate_c::executeDemoFilone2() {
|
||||
s32 staffId = dComIfGp_evmng_getMyStaffId(l_myName, NULL, 0);
|
||||
dEvent_manager_c& eventManager = dComIfGp_getEventManager();
|
||||
s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0);
|
||||
|
||||
if (staffId != -1) {
|
||||
int* cutName = (int*)dComIfGp_getEventManager().getMyNowCutName(staffId);
|
||||
int* cutName = (int*)eventManager.getMyNowCutName(staffId);
|
||||
|
||||
if (dComIfGp_evmng_getIsAddvance(staffId)) {
|
||||
if (eventManager.getIsAddvance(staffId)) {
|
||||
switch (*cutName) {
|
||||
case '0002':
|
||||
initTalk(0xBC1, NULL);
|
||||
@@ -226,40 +286,43 @@ void daTagTWGate_c::executeDemoFilone2() {
|
||||
case '0001':
|
||||
case '0003':
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(480, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
switch (*cutName) {
|
||||
case '0001':
|
||||
case '0003':
|
||||
dComIfGp_evmng_cutEnd(staffId);
|
||||
eventManager.cutEnd(staffId);
|
||||
break;
|
||||
case '0002':
|
||||
if (talkProc(NULL, 1, NULL)) {
|
||||
if (mMsgFlow.getChoiceNo() == 0) {
|
||||
mActionID = ACT_DEMO_FILONE_3;
|
||||
mAction = ActionTable[mActionID];
|
||||
(this->**mAction)();
|
||||
int choiceNo = mMsgFlow.getChoiceNo();
|
||||
// "Two-way branch %s" / "Yes" / "No"
|
||||
OS_REPORT("二択分岐 %s\n", choiceNo == 0 ? "はい" : "いいえ");
|
||||
if (choiceNo == 0) {
|
||||
setAction(ACT_DEMO_FILONE_3);
|
||||
}
|
||||
dComIfGp_evmng_cutEnd(staffId);
|
||||
eventManager.cutEnd(staffId);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(497, FALSE);
|
||||
}
|
||||
|
||||
if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 &&
|
||||
dComIfGp_evmng_endCheck(mEventID)) {
|
||||
dComIfGp_getEvent()->reset();
|
||||
eventManager.endCheck(mEventID)) {
|
||||
dComIfGp_event_reset();
|
||||
field_0x5e0 = 0;
|
||||
mActionID = ACT_WAIT;
|
||||
mAction = ActionTable[mActionID];
|
||||
(this->**mAction)();
|
||||
setAction(ACT_WAIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void daTagTWGate_c::initDemoFilone3() {
|
||||
field_0x5de = 1;
|
||||
mIsWolf = (dComIfGp_getLinkPlayer()->mNoResetFlg1 >> 25) & 1; // checking if wolf?
|
||||
mIsWolf = daPy_py_c::checkNowWolf() ? TRUE : FALSE;
|
||||
eventInfo.setArchiveName(l_zevParamTbl[mType].mArcName);
|
||||
dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName());
|
||||
mEventID =
|
||||
@@ -269,17 +332,18 @@ void daTagTWGate_c::initDemoFilone3() {
|
||||
}
|
||||
|
||||
void daTagTWGate_c::executeDemoFilone3() {
|
||||
s32 staffId = dComIfGp_evmng_getMyStaffId(l_myName, NULL, 0);
|
||||
dEvent_manager_c& eventManager = dComIfGp_getEventManager();
|
||||
s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0);
|
||||
|
||||
if (staffId != -1) {
|
||||
int* cutName = (int*)dComIfGp_getEventManager().getMyNowCutName(staffId);
|
||||
int* cutName = (int*)eventManager.getMyNowCutName(staffId);
|
||||
|
||||
if (dComIfGp_evmng_getIsAddvance(staffId)) {
|
||||
if (eventManager.getIsAddvance(staffId)) {
|
||||
switch (*cutName) {
|
||||
case 0x30303031:
|
||||
break;
|
||||
case 0x30303032:
|
||||
dComIfGp_getEvent()->setSkipProc(this, dEv_noFinishSkipProc, 0);
|
||||
dComIfGp_getEvent()->startCheckSkipEdge(this);
|
||||
field_0x5e1 = 0;
|
||||
break;
|
||||
case 0x30303033:
|
||||
@@ -287,50 +351,46 @@ void daTagTWGate_c::executeDemoFilone3() {
|
||||
mpMorf->setPlaySpeed(1.0f);
|
||||
field_0x5e0 = 1;
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(560, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
switch (*cutName) {
|
||||
case 0x30303031: {
|
||||
case 0x30303031:
|
||||
int modelSts = downloadModels();
|
||||
if (modelSts == 1) {
|
||||
dComIfGp_evmng_cutEnd(staffId);
|
||||
eventManager.cutEnd(staffId);
|
||||
} else if (modelSts == -1) {
|
||||
dComIfGp_setNextStage(l_zevParamTbl[mType].mStage, l_zevParamTbl[mType].mPoint,
|
||||
l_zevParamTbl[mType].mRoomNo, l_zevParamTbl[mType].mLayer);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x30303032: {
|
||||
if (dComIfGp_getEvent()->chkFlag2(8)) {
|
||||
case 0x30303032:
|
||||
if (dComIfGp_getEvent()->checkSkipEdge()) {
|
||||
dComIfGp_getEvent()->onSkipFade();
|
||||
dComIfGp_setNextStage(l_zevParamTbl[mType].mStage, l_zevParamTbl[mType].mPoint,
|
||||
l_zevParamTbl[mType].mRoomNo, l_zevParamTbl[mType].mLayer);
|
||||
}
|
||||
|
||||
u8 old_5e1 = field_0x5e1;
|
||||
field_0x5e1++;
|
||||
|
||||
if (old_5e1 == 43) {
|
||||
if (field_0x5e1++ == 43) {
|
||||
daPy_py_c* player = daPy_getPlayerActorClass();
|
||||
csXyz sxyz(0, player->shape_angle.y + 0x8000, 0);
|
||||
cXyz pos;
|
||||
csXyz sxyz(0, fopAcM_GetShapeAngle_p(player)->y + 0x8000, 0);
|
||||
|
||||
mDoMtx_stack_c::transS(player->current.pos);
|
||||
mDoMtx_stack_c::transS(fopAcM_GetPosition(player));
|
||||
mDoMtx_stack_c::YrotM(sxyz.y);
|
||||
mDoMtx_stack_c::transM(0.0f, 240.0f, -710.0f);
|
||||
|
||||
cXyz pos;
|
||||
pos.x = mDoMtx_stack_c::get()[0][3];
|
||||
pos.y = mDoMtx_stack_c::get()[1][3];
|
||||
pos.z = mDoMtx_stack_c::get()[2][3];
|
||||
mDoMtx_stack_c::multVecZero(&pos);
|
||||
dComIfGp_particle_set(0x86C5, &pos, &sxyz, NULL);
|
||||
mDoAud_seStart(Z2SE_OBJ_DARK_GATE_RIPPLE, &pos, 0, 0);
|
||||
dComIfGp_evmng_cutEnd(staffId);
|
||||
Z2GetAudioMgr()->seStart(Z2SE_OBJ_DARK_GATE_RIPPLE, &pos,
|
||||
0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
eventManager.cutEnd(staffId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x30303033:
|
||||
if (dComIfGp_getEvent()->chkFlag2(8)) {
|
||||
if (dComIfGp_getEvent()->checkSkipEdge()) {
|
||||
dComIfGp_getEvent()->onSkipFade();
|
||||
dComIfGp_setNextStage(l_zevParamTbl[mType].mStage,
|
||||
l_zevParamTbl[mType].mPoint,
|
||||
@@ -339,18 +399,19 @@ void daTagTWGate_c::executeDemoFilone3() {
|
||||
}
|
||||
|
||||
if (mpMorf->isStop()) {
|
||||
dComIfGp_evmng_cutEnd(staffId);
|
||||
eventManager.cutEnd(staffId);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(621, FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 &&
|
||||
dComIfGp_evmng_endCheck(mEventID)) {
|
||||
dComIfGp_getEvent()->reset();
|
||||
eventManager.endCheck(mEventID)) {
|
||||
dComIfGp_event_reset();
|
||||
field_0x5e0 = 0;
|
||||
mActionID = ACT_WAIT;
|
||||
mAction = ActionTable[mActionID];
|
||||
(this->**mAction)();
|
||||
setAction(ACT_WAIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -364,13 +425,16 @@ void daTagTWGate_c::initDemoOrdin1() {
|
||||
void daTagTWGate_c::executeDemoOrdin1() {
|
||||
dEvent_manager_c& evtMng = dComIfGp_getEventManager();
|
||||
int staffId = evtMng.getMyStaffId(l_myName, NULL, 0);
|
||||
int* cutName;
|
||||
if (staffId != -1) {
|
||||
int* cutName = (int*)evtMng.getMyNowCutName(staffId);
|
||||
cutName = (int*)evtMng.getMyNowCutName(staffId);
|
||||
if (evtMng.getIsAddvance(staffId)) {
|
||||
switch (*cutName) {
|
||||
case '0001':
|
||||
dComIfGp_getEvent()->startCheckSkipEdge(this);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(674, FALSE);
|
||||
}
|
||||
}
|
||||
switch (*cutName) {
|
||||
@@ -381,6 +445,9 @@ void daTagTWGate_c::executeDemoOrdin1() {
|
||||
}
|
||||
evtMng.cutEnd(staffId);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(686, FALSE);
|
||||
break;
|
||||
}
|
||||
if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 && evtMng.endCheck(mEventID)) {
|
||||
setAction(ACT_DEMO_ORDIN_2);
|
||||
@@ -417,23 +484,30 @@ void daTagTWGate_c::executeDemoOrdin2() {
|
||||
break;
|
||||
case '0003':
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(749, FALSE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
int choiceNo;
|
||||
switch(*cutName) {
|
||||
switch (*cutName) {
|
||||
case '0001':
|
||||
case '0003':
|
||||
evtMng.cutEnd(staffId);
|
||||
break;
|
||||
case '0002':
|
||||
if (talkProc(NULL, 1, NULL)) {
|
||||
choiceNo = mMsgFlow.getChoiceNo();
|
||||
int choiceNo = mMsgFlow.getChoiceNo();
|
||||
// "Two-way branch %s" / "Yes" / "No"
|
||||
OS_REPORT("二択分岐 %s\n", choiceNo == 0 ? "はい" : "いいえ");
|
||||
if (choiceNo == 0) {
|
||||
setAction(ACT_DEMO_ORDIN_3);
|
||||
}
|
||||
evtMng.cutEnd(staffId);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(766, FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 &&
|
||||
@@ -447,7 +521,7 @@ void daTagTWGate_c::executeDemoOrdin2() {
|
||||
|
||||
void daTagTWGate_c::initDemoOrdin3() {
|
||||
field_0x5de = 1;
|
||||
mIsWolf = (dComIfGp_getLinkPlayer()->mNoResetFlg1 >> 25) & 1; // checking if wolf?
|
||||
mIsWolf = daPy_py_c::checkNowWolf() ? TRUE : FALSE;
|
||||
eventInfo.setArchiveName(l_zevParamTbl[mType].mArcName);
|
||||
dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName());
|
||||
mEventID =
|
||||
@@ -477,7 +551,7 @@ void daTagTWGate_c::executeDemoOrdin3() {
|
||||
field_0x5e0 = 1;
|
||||
break;
|
||||
default:
|
||||
JUT_PANIC(829, "0");
|
||||
JUT_ASSERT(829, FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -527,7 +601,7 @@ void daTagTWGate_c::executeDemoOrdin3() {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
JUT_PANIC(890, "0");
|
||||
JUT_ASSERT(890, FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -547,13 +621,17 @@ void daTagTWGate_c::initDemoRanail1() {
|
||||
void daTagTWGate_c::executeDemoRanail1() {
|
||||
dEvent_manager_c& evtMng = dComIfGp_getEventManager();
|
||||
int staffId = evtMng.getMyStaffId(l_myName, NULL, 0);
|
||||
int* cutName;
|
||||
if (staffId != -1) {
|
||||
int* cutName = (int*)evtMng.getMyNowCutName(staffId);
|
||||
cutName = (int*)evtMng.getMyNowCutName(staffId);
|
||||
if (evtMng.getIsAddvance(staffId)) {
|
||||
switch (*cutName) {
|
||||
case '0001':
|
||||
dComIfGp_getEvent()->startCheckSkipEdge(this);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(943, FALSE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (*cutName) {
|
||||
@@ -564,6 +642,9 @@ void daTagTWGate_c::executeDemoRanail1() {
|
||||
}
|
||||
evtMng.cutEnd(staffId);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(955, FALSE);
|
||||
break;
|
||||
}
|
||||
if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 && evtMng.endCheck(mEventID)) {
|
||||
setAction(ACT_DEMO_RANAIL_2);
|
||||
@@ -600,23 +681,30 @@ void daTagTWGate_c::executeDemoRanail2() {
|
||||
break;
|
||||
case '0003':
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(1018, FALSE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
int choiceNo;
|
||||
switch(*cutName) {
|
||||
switch (*cutName) {
|
||||
case '0001':
|
||||
case '0003':
|
||||
evtMng.cutEnd(staffId);
|
||||
break;
|
||||
case '0002':
|
||||
if (talkProc(NULL, 1, NULL)) {
|
||||
choiceNo = mMsgFlow.getChoiceNo();
|
||||
int choiceNo = mMsgFlow.getChoiceNo();
|
||||
// "Two-way branch" / "Yes" / "No"
|
||||
OS_REPORT("二択分岐 %s\n", choiceNo == 0 ? "はい" : "いいえ");
|
||||
if (choiceNo == 0) {
|
||||
setAction(ACT_DEMO_RANAIL_3);
|
||||
}
|
||||
evtMng.cutEnd(staffId);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(1035, FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 &&
|
||||
@@ -630,7 +718,7 @@ void daTagTWGate_c::executeDemoRanail2() {
|
||||
|
||||
void daTagTWGate_c::initDemoRanail3() {
|
||||
field_0x5de = 1;
|
||||
mIsWolf = (dComIfGp_getLinkPlayer()->mNoResetFlg1 >> 25) & 1; // checking if wolf?
|
||||
mIsWolf = daPy_py_c::checkNowWolf() ? TRUE : FALSE;
|
||||
eventInfo.setArchiveName(l_zevParamTbl[mType].mArcName);
|
||||
dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName());
|
||||
mEventID =
|
||||
@@ -662,7 +750,7 @@ void daTagTWGate_c::executeDemoRanail3() {
|
||||
field_0x5e0 = 1;
|
||||
break;
|
||||
default:
|
||||
JUT_PANIC(1099, "0");
|
||||
JUT_ASSERT(1099, FALSE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -711,7 +799,7 @@ void daTagTWGate_c::executeDemoRanail3() {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
JUT_PANIC(1160, "0");
|
||||
JUT_ASSERT(1160, FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -731,13 +819,16 @@ void daTagTWGate_c::initDemoHyral1() {
|
||||
void daTagTWGate_c::executeDemoHyral1() {
|
||||
dEvent_manager_c& evtMng = dComIfGp_getEventManager();
|
||||
int staffId = evtMng.getMyStaffId(l_myName, NULL, 0);
|
||||
int* cutName;
|
||||
if (staffId != -1) {
|
||||
int* cutName = (int*)evtMng.getMyNowCutName(staffId);
|
||||
cutName = (int*)evtMng.getMyNowCutName(staffId);
|
||||
if (evtMng.getIsAddvance(staffId)) {
|
||||
switch (*cutName) {
|
||||
case '0001':
|
||||
dComIfGp_getEvent()->startCheckSkipEdge(this);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(1213, FALSE);
|
||||
}
|
||||
}
|
||||
switch (*cutName) {
|
||||
@@ -748,6 +839,9 @@ void daTagTWGate_c::executeDemoHyral1() {
|
||||
}
|
||||
evtMng.cutEnd(staffId);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(1225, FALSE);
|
||||
break;
|
||||
}
|
||||
if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 && evtMng.endCheck(mEventID)) {
|
||||
setAction(ACT_DEMO_HYRAL_2);
|
||||
@@ -783,23 +877,28 @@ void daTagTWGate_c::executeDemoHyral2() {
|
||||
case '0002':
|
||||
initTalk(0xbc1, NULL);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(1288, FALSE);
|
||||
}
|
||||
}
|
||||
int choiceNo;
|
||||
switch(*piVar3) {
|
||||
switch (*piVar3) {
|
||||
case '0001':
|
||||
case '0003':
|
||||
eventMgr.cutEnd(staffId);
|
||||
break;
|
||||
case '0002':
|
||||
if (talkProc(NULL, 1, NULL)) {
|
||||
choiceNo = mMsgFlow.getChoiceNo();
|
||||
int choiceNo = mMsgFlow.getChoiceNo();
|
||||
OS_REPORT("二択分岐 %s\n", choiceNo == 0 ? "はい" : "いいえ");
|
||||
if (choiceNo == 0) {
|
||||
setAction(ACT_DEMO_HYRAL_3);
|
||||
}
|
||||
eventMgr.cutEnd(staffId);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(1305, FALSE);
|
||||
break;
|
||||
}
|
||||
if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 &&
|
||||
eventMgr.endCheck(mEventID))
|
||||
@@ -812,7 +911,7 @@ void daTagTWGate_c::executeDemoHyral2() {
|
||||
|
||||
void daTagTWGate_c::initDemoHyral3() {
|
||||
field_0x5de = 1;
|
||||
mIsWolf = (dComIfGp_getLinkPlayer()->mNoResetFlg1 >> 25) & 1; // checking if wolf?
|
||||
mIsWolf = daPy_py_c::checkNowWolf() ? TRUE : FALSE;
|
||||
eventInfo.setArchiveName(l_zevParamTbl[mType].mArcName);
|
||||
dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName());
|
||||
mEventID =
|
||||
@@ -841,6 +940,8 @@ void daTagTWGate_c::executeDemoHyral3() {
|
||||
mpMorf->setPlaySpeed(1.0f);
|
||||
field_0x5e0 = 1;
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(1368, FALSE);
|
||||
}
|
||||
}
|
||||
switch(*piVar3) {
|
||||
@@ -883,6 +984,9 @@ void daTagTWGate_c::executeDemoHyral3() {
|
||||
eventMgr.cutEnd(staffId);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(1417, FALSE);
|
||||
break;
|
||||
}
|
||||
if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 &&
|
||||
eventMgr.endCheck(mEventID))
|
||||
@@ -894,17 +998,15 @@ void daTagTWGate_c::executeDemoHyral3() {
|
||||
}
|
||||
|
||||
void daTagTWGate_c::initBaseMtx() {
|
||||
cullMtx = mpMorf->getModel()->getBaseTRMtx();
|
||||
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
|
||||
fopAcM_SetMtx(this, mpMorf->getModel()->getBaseTRMtx());
|
||||
fopAc_ac_c* player = daPy_getPlayerActorClass();
|
||||
|
||||
shape_angle.y = player->shape_angle.y + 0x8000;
|
||||
mDoMtx_stack_c::transS(player->current.pos);
|
||||
shape_angle.y = fopAcM_GetShapeAngle_p(player)->y + 0x8000;
|
||||
mDoMtx_stack_c::transS(fopAcM_GetPosition(player));
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
mDoMtx_stack_c::transM(0.0f, 250.0f, -840.0f);
|
||||
|
||||
current.pos.x = mDoMtx_stack_c::get()[0][3];
|
||||
current.pos.y = mDoMtx_stack_c::get()[1][3];
|
||||
current.pos.z = mDoMtx_stack_c::get()[2][3];
|
||||
mDoMtx_stack_c::multVecZero(¤t.pos);
|
||||
|
||||
mpMorf->getModel()->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
}
|
||||
@@ -917,14 +1019,18 @@ int daTagTWGate_c::downloadModels() {
|
||||
}
|
||||
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
if (fopAcM_entrySolidHeap(this, createHeapCallBack, 0x3140)) {
|
||||
return 1;
|
||||
} else {
|
||||
if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x3140)) {
|
||||
return -1;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return phase_state == cPhs_ERROR_e ? -1 : 0;
|
||||
if (phase_state == cPhs_ERROR_e) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void daTagTWGate_c::initTalk(int param_0, fopAc_ac_c** param_1) {
|
||||
@@ -957,13 +1063,17 @@ bool daTagTWGate_c::talkProc(int* param_1, int param_2, fopAc_ac_c** param_3) {
|
||||
}
|
||||
|
||||
int daTagTWGate_c::createHeapCallBack(fopAc_ac_c* i_actor) {
|
||||
return ((daTagTWGate_c*)i_actor)->CreateHeap();
|
||||
daTagTWGate_c* gate = static_cast<daTagTWGate_c*>(i_actor);
|
||||
return gate->CreateHeap();
|
||||
}
|
||||
|
||||
int daTagTWGate_c::CreateHeap() {
|
||||
J3DModelData* modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes("TWGate_Md", 7));
|
||||
J3DModelData* mdlData_p = NULL;
|
||||
int var_r27 = 0;
|
||||
mdlData_p = static_cast<J3DModelData*>(dComIfG_getObjectRes("TWGate_Md", 7));
|
||||
JUT_ASSERT(1685, NULL != mdlData_p);
|
||||
mpMorf =
|
||||
new mDoExt_McaMorfSO(modelData, NULL, NULL,
|
||||
new mDoExt_McaMorfSO(mdlData_p, NULL, NULL,
|
||||
static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("TWGate_Md", 4)),
|
||||
0, 0.0f, 0, -1, NULL, 0, 0x11000084);
|
||||
|
||||
@@ -986,7 +1096,7 @@ int daTagTWGate_c::create() {
|
||||
|
||||
int phase_state;
|
||||
if (dComIfGs_isDarkClearLV(l_zevParamTbl[mType].mLv)) {
|
||||
phase_state = cPhs_ERROR_e;
|
||||
return cPhs_ERROR_e;
|
||||
} else {
|
||||
phase_state = dComIfG_resLoad(&mPhaseZevArc, l_zevParamTbl[mType].mArcName);
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
@@ -997,36 +1107,59 @@ int daTagTWGate_c::create() {
|
||||
return phase_state;
|
||||
}
|
||||
|
||||
static int daTagTWGate_Create(fopAc_ac_c* i_actor) {
|
||||
return ((daTagTWGate_c*)i_actor)->create();
|
||||
}
|
||||
|
||||
inline daTagTWGate_c::~daTagTWGate_c() {
|
||||
dComIfG_resDelete(&mPhaseZevArc, l_zevParamTbl[mType].mArcName);
|
||||
|
||||
if (mPhaseMdRes.id != cPhs_INIT_e) {
|
||||
dComIfG_resDelete(&mPhaseMdRes, "TWGate_Md");
|
||||
int daTagTWGate_c::draw() {
|
||||
if (field_0x5e0 != 0) {
|
||||
mpMorf->entryDL();
|
||||
}
|
||||
|
||||
if (mPhasePyRes.id != cPhs_INIT_e) {
|
||||
dComIfG_resDelete(&mPhasePyRes, mIsWolf ? "TWGate_Wf" : "TWGate_Lk");
|
||||
#if DEBUG
|
||||
if (attr().show_range) {
|
||||
dDbVw_drawCylinderOpa(current.pos, scale.x * 100.0f, scale.y * 100.0f, (GXColor){0xff, 0xff, 0xff, 0xff}, 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static int daTagTWGate_Delete(daTagTWGate_c* i_gate) {
|
||||
i_gate->~daTagTWGate_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daTagTWGate_Execute(daTagTWGate_c* i_gate) {
|
||||
return i_gate->execute();
|
||||
void daTagTWGate_c::create_init() {
|
||||
#if DEBUG
|
||||
mHio.ct();
|
||||
#endif
|
||||
field_0x5e0 = 0;
|
||||
setAction(ACT_WAIT);
|
||||
}
|
||||
|
||||
static int daTagTWGate_Draw(daTagTWGate_c* i_gate) {
|
||||
return i_gate->draw();
|
||||
static int daTagTWGate_Create(fopAc_ac_c* i_this) {
|
||||
daTagTWGate_c* gate = static_cast<daTagTWGate_c*>(i_this);
|
||||
fopAcM_RegisterCreateID(i_this, "Tag_TWGate");
|
||||
return gate->create();
|
||||
}
|
||||
|
||||
static int daTagTWGate_IsDelete(daTagTWGate_c*) {
|
||||
static int daTagTWGate_Delete(daTagTWGate_c* i_this) {
|
||||
fopAcM_RegisterDeleteID(i_this, "Tag_TWGate");
|
||||
i_this->~daTagTWGate_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daTagTWGate_c::execute() {
|
||||
callExecute();
|
||||
|
||||
if (field_0x5e0 != 0) {
|
||||
mpMorf->play(0, 0);
|
||||
mpMorf->modelCalc();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daTagTWGate_Execute(daTagTWGate_c* i_this) {
|
||||
return i_this->execute();
|
||||
}
|
||||
|
||||
static int daTagTWGate_Draw(daTagTWGate_c* i_this) {
|
||||
return i_this->draw();
|
||||
}
|
||||
|
||||
static int daTagTWGate_IsDelete(daTagTWGate_c* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,12 +15,15 @@ int daTagAJnot_c::create() {
|
||||
}
|
||||
|
||||
static int daTagAJnot_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagAJnot_c*>(i_this)->create();
|
||||
daTagAJnot_c* ajNot = static_cast<daTagAJnot_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return ajNot->create();
|
||||
}
|
||||
|
||||
daTagAJnot_c::~daTagAJnot_c() {}
|
||||
|
||||
static int daTagAJnot_Delete(daTagAJnot_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagAJnot_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include "d/actor/d_a_tag_allmato.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/actor/d_a_obj_itamato.h"
|
||||
#include "d/actor/d_a_obj_boumato.h"
|
||||
#include "d/actor/d_a_obj_itamato.h"
|
||||
#include "d/actor/d_a_arrow.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
|
||||
@@ -268,10 +268,14 @@ static fopAc_ac_c* l_findActorPtrs[100];
|
||||
static u32 l_findCount;
|
||||
|
||||
void* daTag_AllMato_c::srchBouMato(void* i_actor, void* i_data) {
|
||||
if (l_findCount < 100 && i_actor != NULL && i_actor != i_data) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(i_actor)) && fopAcM_GetName(i_actor) == PROC_OBJ_BOUMATO) {
|
||||
l_findActorPtrs[l_findCount] = (fopAc_ac_c*)i_actor;
|
||||
l_findCount++;
|
||||
void* data = i_data;
|
||||
if (l_findCount < 100) {
|
||||
fopAc_ac_c* actor = (fopAc_ac_c*)i_actor;
|
||||
if (actor != NULL && actor != data) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(actor)) && fopAcM_GetName(i_actor) == PROC_OBJ_BOUMATO) {
|
||||
l_findActorPtrs[l_findCount] = actor;
|
||||
l_findCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,10 +283,14 @@ void* daTag_AllMato_c::srchBouMato(void* i_actor, void* i_data) {
|
||||
}
|
||||
|
||||
void* daTag_AllMato_c::srchItaMato(void* i_actor, void* i_data) {
|
||||
if (l_findCount < 100 && i_actor != NULL && i_actor != i_data) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(i_actor)) && fopAcM_GetName(i_actor) == PROC_OBJ_ITAMATO) {
|
||||
l_findActorPtrs[l_findCount] = (fopAc_ac_c*)i_actor;
|
||||
l_findCount++;
|
||||
void* data = i_data;
|
||||
if (l_findCount < 100) {
|
||||
fopAc_ac_c* actor = (fopAc_ac_c*)i_actor;
|
||||
if (actor != NULL && actor != data) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(actor)) && fopAcM_GetName(i_actor) == PROC_OBJ_ITAMATO) {
|
||||
l_findActorPtrs[l_findCount] = actor;
|
||||
l_findCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,10 +298,14 @@ void* daTag_AllMato_c::srchItaMato(void* i_actor, void* i_data) {
|
||||
}
|
||||
|
||||
void* daTag_AllMato_c::srchTaro(void* i_actor, void* i_data) {
|
||||
if (l_findCount < 100 && i_actor != NULL && i_actor != i_data) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(i_actor)) && fopAcM_GetName(i_actor) == PROC_NPC_TARO) {
|
||||
l_findActorPtrs[l_findCount] = (fopAc_ac_c*)i_actor;
|
||||
l_findCount++;
|
||||
void* data = i_data;
|
||||
if (l_findCount < 100) {
|
||||
fopAc_ac_c* actor = (fopAc_ac_c*)i_actor;
|
||||
if (actor != NULL && actor != data) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(actor)) && fopAcM_GetName(i_actor) == PROC_NPC_TARO) {
|
||||
l_findActorPtrs[l_findCount] = actor;
|
||||
l_findCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,10 +313,14 @@ void* daTag_AllMato_c::srchTaro(void* i_actor, void* i_data) {
|
||||
}
|
||||
|
||||
void* daTag_AllMato_c::srchArrow(void* i_actor, void* i_data) {
|
||||
if (l_findCount < 100 && i_actor != NULL && i_actor != i_data) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(i_actor)) && fopAcM_GetName(i_actor) == PROC_ARROW) {
|
||||
l_findActorPtrs[l_findCount] = (fopAc_ac_c*)i_actor;
|
||||
l_findCount++;
|
||||
void* data = i_data;
|
||||
if (l_findCount < 100) {
|
||||
fopAc_ac_c* actor = (fopAc_ac_c*)i_actor;
|
||||
if (actor != NULL && actor != data) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(actor)) && fopAcM_GetName(i_actor) == PROC_ARROW) {
|
||||
l_findActorPtrs[l_findCount] = actor;
|
||||
l_findCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,11 +452,12 @@ fopAc_ac_c* daTag_AllMato_c::getTaroActorP() {
|
||||
fopAc_ac_c* boumato_actor_p = NULL;
|
||||
fopAc_ac_c* itamato_actor_p = NULL;
|
||||
|
||||
int sp14 = 0;
|
||||
for (int i = 0; i < 499; i++) {
|
||||
for (int j = 0; j < mBouMatoActorNum; j++) {
|
||||
boumato_actor_p = mBouMatoActorMngr[j].getActorP();
|
||||
if (boumato_actor_p != NULL) {
|
||||
int sp14 = ((daObj_BouMato_c*)boumato_actor_p)->checkCrs(arrow_p, field_0x590[i], field_0x590[i + 1], sp94.abs() + arrow_p->getArrowOutLength());
|
||||
sp14 = ((daObj_BouMato_c*)boumato_actor_p)->checkCrs(arrow_p, field_0x590[i], field_0x590[i + 1], sp94.abs() + arrow_p->getArrowOutLength());
|
||||
if (sp14 != 0) {
|
||||
mBrkMatoActorMngr.entry(mBouMatoActorMngr[j].getActorP());
|
||||
return sp14;
|
||||
@@ -451,7 +468,7 @@ fopAc_ac_c* daTag_AllMato_c::getTaroActorP() {
|
||||
for (int j = 0; j < mItaMatoActorNum; j++) {
|
||||
itamato_actor_p = mItaMatoActorMngr[j].getActorP();
|
||||
if (itamato_actor_p != NULL) {
|
||||
int sp14 = ((daObj_ItaMato_c*)itamato_actor_p)->checkCrs(arrow_p, field_0x590[i], field_0x590[i + 1], sp94.abs() + arrow_p->getArrowOutLength());
|
||||
sp14 = ((daObj_ItaMato_c*)itamato_actor_p)->checkCrs(arrow_p, field_0x590[i], field_0x590[i + 1], sp94.abs() + arrow_p->getArrowOutLength());
|
||||
if (sp14 != 0) {
|
||||
mBrkMatoActorMngr.entry(mItaMatoActorMngr[j].getActorP());
|
||||
return sp14;
|
||||
@@ -466,7 +483,7 @@ fopAc_ac_c* daTag_AllMato_c::getTaroActorP() {
|
||||
}
|
||||
|
||||
int daTag_AllMato_c::checkCrsMato2() {
|
||||
fopAc_ac_c* sp28;
|
||||
fopAc_ac_c* sp28 = NULL;
|
||||
getArrowActorP();
|
||||
|
||||
for (int i = 0; i < (int)l_findCount; i++) {
|
||||
@@ -499,13 +516,13 @@ int daTag_AllMato_c::checkCrsMato2() {
|
||||
}
|
||||
|
||||
fopAc_ac_c* sp18 = NULL;
|
||||
fopAc_ac_c* sp14 = NULL;
|
||||
int sp14 = NULL;
|
||||
|
||||
for (int i = 0; i < 499; i++) {
|
||||
for (int j = 0; j < mBouMatoActorNum; j++) {
|
||||
sp18 = mBouMatoActorMngr[j].getActorP();
|
||||
if (sp18 != NULL) {
|
||||
int sp14 = ((daObj_BouMato_c*)sp18)->checkCrs(arrow_p, field_0x590[i], field_0x590[i + 1], sp80.abs() + arrow_p->getArrowOutLength());
|
||||
sp14 = ((daObj_BouMato_c*)sp18)->checkCrs(arrow_p, field_0x590[i], field_0x590[i + 1], sp80.abs() + arrow_p->getArrowOutLength());
|
||||
if (sp14 != 0) {
|
||||
mBrkMatoActorMngr.entry(mBouMatoActorMngr[j].getActorP());
|
||||
return sp14;
|
||||
@@ -520,10 +537,11 @@ int daTag_AllMato_c::checkCrsMato2() {
|
||||
}
|
||||
|
||||
int daTag_AllMato_c::checkBrkMato() {
|
||||
daObj_ItaMato_c* actor_p = NULL;
|
||||
int rt = 0;
|
||||
|
||||
for (int i = 0; i < mItaMatoActorNum; i++) {
|
||||
daObj_ItaMato_c* actor_p = (daObj_ItaMato_c*)mItaMatoActorMngr[i].getActorP();
|
||||
actor_p = (daObj_ItaMato_c*)mItaMatoActorMngr[i].getActorP();
|
||||
rt = actor_p->checkBrk();
|
||||
if (rt != 0) {
|
||||
mBrkMatoActorMngr.entry(mItaMatoActorMngr[i].getActorP());
|
||||
|
||||
@@ -9,10 +9,12 @@
|
||||
|
||||
static int daTagArena_Create(fopAc_ac_c* i_this) {
|
||||
daTagArena_c* arena_tag = (daTagArena_c*)i_this;
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return arena_tag->create();
|
||||
}
|
||||
|
||||
static int daTagArena_Delete(daTagArena_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagArena_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,27 @@
|
||||
|
||||
#include "d/actor/d_a_tag_assistance.h"
|
||||
|
||||
void daTagAssist_c::create_init() {
|
||||
attention_info.flags = 0;
|
||||
field_0x570 = -1;
|
||||
}
|
||||
|
||||
int daTagAssist_c::create() {
|
||||
fopAcM_ct(this, daTagAssist_c);
|
||||
create_init();
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
int daTagAssist_c::execute() {
|
||||
if (fopAcM_searchPlayerDistanceXZ(this) < scale.x * 100.0f) {
|
||||
// empty block
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daTagAssist_Create(fopAc_ac_c* i_this) {
|
||||
daTagAssist_c* tag_assist = (daTagAssist_c*)i_this;
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return tag_assist->create();
|
||||
}
|
||||
|
||||
@@ -21,6 +40,7 @@ static int daTagAssist_IsDelete(daTagAssist_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTagAssist_Delete(daTagAssist_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagAssist_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_attack_item.h"
|
||||
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
|
||||
void daTagAtkItem_c::setBaseMtx() {
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
}
|
||||
class daTagAtkItem_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daTagAtkItem_HIO_c();
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
f32 field_0x8;
|
||||
u8 show_range;
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
daTagAtkItem_HIO_c l_HIO;
|
||||
#endif
|
||||
|
||||
static dCcD_SrcCyl l_cyl_src = {
|
||||
{
|
||||
@@ -17,14 +28,28 @@ static dCcD_SrcCyl l_cyl_src = {
|
||||
{0x0}, // mGObjCo
|
||||
}, // mObjInf
|
||||
{
|
||||
{
|
||||
{0.0f, 0.0f, 0.0f}, // mCenter
|
||||
50.0f, // mRadius
|
||||
100.0f // mHeight
|
||||
} // mCyl
|
||||
{
|
||||
{0.0f, 0.0f, 0.0f}, // mCenter
|
||||
50.0f, // mRadius
|
||||
100.0f // mHeight
|
||||
} // mCyl
|
||||
}
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
void daTagAtkItem_HIO_c::genMessage(JORMContext* ctx) {
|
||||
// "Attack reaction item"
|
||||
ctx->genLabel("攻撃反応アイテム", 0);
|
||||
// "Show range"
|
||||
ctx->genCheckBox("範囲表示", &show_range, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
void daTagAtkItem_c::setBaseMtx() {
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
}
|
||||
|
||||
int daTagAtkItem_c::Create() {
|
||||
mCcStts.Init(0, 0xFF, this);
|
||||
mCyl.Set(l_cyl_src);
|
||||
@@ -36,6 +61,11 @@ int daTagAtkItem_c::Create() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
daTagAtkItem_HIO_c::daTagAtkItem_HIO_c() {
|
||||
field_0x8 = 0.0f;
|
||||
show_range = 0;
|
||||
}
|
||||
|
||||
int daTagAtkItem_c::create() {
|
||||
fopAcM_ct(this, daTagAtkItem_c);
|
||||
|
||||
@@ -44,6 +74,11 @@ int daTagAtkItem_c::create() {
|
||||
}
|
||||
|
||||
OS_REPORT("攻撃反応アイテム:<%x>\n", fopAcM_GetParam(this));
|
||||
|
||||
#if DEBUG
|
||||
l_HIO.entryHIO("攻撃反応アイテム");
|
||||
#endif
|
||||
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
@@ -108,12 +143,7 @@ BOOL daTagAtkItem_c::checkHit() {
|
||||
void daTagAtkItem_c::createItem() {
|
||||
csXyz angle(0, 0, 0);
|
||||
|
||||
int create_num;
|
||||
if (getNum() == 0xFF) {
|
||||
create_num = 1;
|
||||
} else {
|
||||
create_num = getNum();
|
||||
}
|
||||
int create_num = getNum() == 0xFF ? 1 : getNum();
|
||||
|
||||
int item_bit = getItemBit();
|
||||
for (int i = 0; i < create_num; i++) {
|
||||
@@ -128,19 +158,40 @@ void daTagAtkItem_c::createItem() {
|
||||
}
|
||||
}
|
||||
|
||||
int daTagAtkItem_c::_delete() {
|
||||
int daTagAtkItem_c::draw() {
|
||||
#if DEBUG
|
||||
if (l_HIO.show_range) {
|
||||
GXColor color = (GXColor){0, 0, 0xff, 0x80};
|
||||
dDbVw_drawCylinderXlu(current.pos, scale.x * 50.0f, scale.y * 100.0f, color, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daTagAtkItem_c::_delete() {
|
||||
#if DEBUG
|
||||
l_HIO.removeHIO();
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daTagAtkItem_Draw(daTagAtkItem_c* i_this) {
|
||||
return i_this->draw();
|
||||
}
|
||||
|
||||
static int daTagAtkItem_Execute(daTagAtkItem_c* i_this) {
|
||||
return i_this->execute();
|
||||
}
|
||||
|
||||
static int daTagAtkItem_Delete(daTagAtkItem_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
static int daTagAtkItem_Create(daTagAtkItem_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return i_this->create();
|
||||
}
|
||||
|
||||
@@ -149,7 +200,11 @@ static actor_method_class l_daTagAtkItem_Method = {
|
||||
(process_method_func)daTagAtkItem_Delete,
|
||||
(process_method_func)daTagAtkItem_Execute,
|
||||
(process_method_func)NULL,
|
||||
#if DEBUG
|
||||
(process_method_func)daTagAtkItem_Draw,
|
||||
#else
|
||||
(process_method_func)NULL,
|
||||
#endif
|
||||
};
|
||||
|
||||
actor_process_profile_definition g_profile_Tag_AttackItem = {
|
||||
|
||||
@@ -6,12 +6,98 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_attention.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
|
||||
static const u8 l_dist_tbl[] = { 0x23, 0x24 };
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
|
||||
#if DEBUG
|
||||
daAttp_HIO_c l_HIO;
|
||||
|
||||
void daAttp_HIO_c::genMessage(JORMContext* ctx) {
|
||||
static const char* l_type_name[37] = {
|
||||
"注目なし - ダミー", // No focus - dummy
|
||||
"注目だけ - 標準", // Focus only - standard
|
||||
"会話 - 標準", // Conversation - standard
|
||||
"戦闘 - 標準", // Combat - standard
|
||||
"戦闘B - 標準", // Combat B - standard
|
||||
"会話B - 標準", // Conversation B - standard
|
||||
"持上げ - 標準", // Lifting - standard
|
||||
"持上げ - タル", // Lifting - barrel
|
||||
"持上げ - 壷大", // Lifting - large jar
|
||||
"持上げ - 水壷", // Lifting - water jar
|
||||
"持上げ - 椅子", // Lifting - chair
|
||||
"持上げ - 小石", // Lifting - pebble
|
||||
"持上げ - 岩", // Lifting - rock
|
||||
"馬", // Horse
|
||||
"ドア、宝箱", // Door, treasure chest
|
||||
"持上げボコの棒", // Lifting stick
|
||||
"敵氷", // Enemy ice
|
||||
"引き連れられ石像", // Dragged stone statue
|
||||
"引き連れられ石像", // Dragged stone statue
|
||||
"ジャガ-", // Jaguar
|
||||
"接近会話", // Close-range conversation
|
||||
"長距離戦闘", // Long-range combat
|
||||
"短距離戦闘", // Short-range combat
|
||||
"予備戦闘", // Reserve combat
|
||||
"予備戦闘", // Reserve combat
|
||||
"予備戦闘", // Reserve combat
|
||||
"床レバー用", // Floor lever
|
||||
"狼鎖", // Wolf chain
|
||||
"NPCナビィ - ハイラル城、呼びかけデモ用(会話)", // NPC Navii - Hyrule Castle, demo call (conversation)
|
||||
"NPCナビィ - ハイラル城、呼びかけデモ用(注目)", // NPC Navii - Hyrule Castle, demo call (focus)
|
||||
"狼掘る", // Wolf digging
|
||||
"カヌー", // Canoe
|
||||
"覗きタグ", // Peek tag
|
||||
"馬戦闘", // Horse combat
|
||||
"注目点 通常長さ", // Focus point - normal length
|
||||
"注目点 長注目版", // Focus point - long focus
|
||||
"調整用カスタム", // Adjustment custom
|
||||
};
|
||||
static const u8 l_type[37] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16,
|
||||
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
|
||||
33, 34, 35, 36, 37,
|
||||
};
|
||||
static const int num = 37;
|
||||
|
||||
// "Focus point"
|
||||
ctx->genLabel("注目点", 0, 0, NULL, -1, -1, 0x200, 0x18);
|
||||
// "Type switching ON"
|
||||
ctx->genCheckBox("タイプ切り替えON", &enable_type_switching, 1, 0, NULL, -1, -1, 0x200, 0x18);
|
||||
|
||||
// "Type specification"
|
||||
ctx->startComboBox("タイプ指定", &type_spec, 0, NULL, -1, -1, 0x100, 0x1a);
|
||||
for (int i = 0; i < num; i++) {
|
||||
ctx->genComboBoxItem(l_type_name[i], l_type[i]);
|
||||
}
|
||||
ctx->endComboBox();
|
||||
|
||||
// "Distance display ON"
|
||||
ctx->genCheckBox("距離表示ON", &enable_distance_display, 1, 0, NULL, -1, -1, 0x200, 0x18);
|
||||
|
||||
// "For adjustment"
|
||||
ctx->genLabel("調整用", 0, 0, NULL, -1, -1, 0x200, 0x18);
|
||||
ctx->genSlider("on", &dist_max, 0.0f, 10000.0f, 0, NULL, -1, -1, 0x200, 0x18);
|
||||
ctx->genSlider("off", &dist_max_release, 0.0f, 10000.0f, 0, NULL, -1, -1, 0x200, 0x18);
|
||||
ctx->genSlider("angle adjust", &dist_adjust, 0.0f, 10000.0f, 0, NULL, -1, -1, 0x200, 0x18);
|
||||
ctx->genSlider("hi", &upper_y, -10000.0f, 10000.0f, 0, NULL, -1, -1, 0x200, 0x18);
|
||||
ctx->genSlider("low", &lower_y, -10000.0f, 10000.0f, 0, NULL, -1, -1, 0x200, 0x18);
|
||||
}
|
||||
#endif
|
||||
|
||||
int daAttp_c::Create() {
|
||||
attention_info.distances[fopAc_attn_LOCK_e] = l_dist_tbl[daAttp_prm::getArg4(this)];
|
||||
static const u8 l_dist_tbl[] = { 35, 36 };
|
||||
|
||||
u8 arg4 = daAttp_prm::getArg4(this);
|
||||
attention_info.distances[fopAc_attn_LOCK_e] = l_dist_tbl[arg4];
|
||||
|
||||
#if DEBUG
|
||||
field_0x598 = l_dist_tbl[arg4];
|
||||
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
cMtx_copy(mDoMtx_stack_c::get(), field_0x568);
|
||||
fopAcM_SetMtx(this, field_0x568);
|
||||
#endif
|
||||
|
||||
execute();
|
||||
return 1;
|
||||
@@ -20,10 +106,31 @@ int daAttp_c::Create() {
|
||||
int daAttp_c::create() {
|
||||
fopAcM_ct(this, daAttp_c);
|
||||
Create();
|
||||
|
||||
#if DEBUG
|
||||
// "Key points"
|
||||
l_HIO.entryHIO("注目点");
|
||||
#endif
|
||||
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
int daAttp_c::execute() {
|
||||
#if DEBUG
|
||||
if (l_HIO.enable_type_switching) {
|
||||
attention_info.distances[fopAc_attn_LOCK_e] = l_HIO.type_spec;
|
||||
} else {
|
||||
attention_info.distances[fopAc_attn_LOCK_e] = field_0x598;
|
||||
}
|
||||
|
||||
dist_entry& distTable = dAttention_c::getDistTable(37);
|
||||
distTable.mDistMax = l_HIO.dist_max;
|
||||
distTable.mDistMaxRelease = l_HIO.dist_max_release;
|
||||
distTable.mDistanceAdjust = l_HIO.dist_adjust;
|
||||
distTable.mUpperY = l_HIO.upper_y;
|
||||
distTable.mLowerY = l_HIO.lower_y;
|
||||
#endif
|
||||
|
||||
bool bVar1 = true;
|
||||
fopAc_ac_c& link = *daPy_getPlayerActorClass();
|
||||
|
||||
@@ -58,6 +165,7 @@ int daAttp_c::execute() {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(432, FALSE);
|
||||
break;
|
||||
case 7:
|
||||
break;
|
||||
@@ -80,6 +188,8 @@ int daAttp_c::execute() {
|
||||
case 3:
|
||||
bVar1 = false;
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(461, FALSE);
|
||||
}
|
||||
} else {
|
||||
switch (daAttp_prm::getArg0(this)) {
|
||||
@@ -97,6 +207,9 @@ int daAttp_c::execute() {
|
||||
break;
|
||||
case 3:
|
||||
bVar1 = false;
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(485, FALSE);
|
||||
}
|
||||
|
||||
if (daAttp_prm::getSw2(this) != 0xff) {
|
||||
@@ -120,13 +233,36 @@ int daAttp_c::execute() {
|
||||
}
|
||||
|
||||
int daAttp_c::draw() {
|
||||
#if DEBUG
|
||||
if (l_HIO.enable_distance_display) {
|
||||
GXColor color1 = {0xff, 0, 0, 0x80};
|
||||
GXColor color2 = {0, 0, 0xff, 0x80};
|
||||
cXyz sp10(current.pos);
|
||||
sp10.y += 5.0f;
|
||||
dist_entry& distTable =
|
||||
dAttention_c::getDistTable(attention_info.distances[fopAc_attn_LOCK_e]);
|
||||
|
||||
dDbVw_drawCircleXlu(current.pos, distTable.mDistMax, color2, 1, 12);
|
||||
dDbVw_drawCircleXlu(current.pos, distTable.mDistMaxRelease, color1, 1, 12);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daAttp_c::_delete() {
|
||||
#if DEBUG
|
||||
l_HIO.removeHIO();
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
daAttp_HIO_c::daAttp_HIO_c() {
|
||||
type_spec = 0;
|
||||
dist_max = dist_max_release = dist_adjust = upper_y = lower_y = 0.0f;
|
||||
}
|
||||
|
||||
static int daAttp_Draw(daAttp_c* i_this) {
|
||||
return i_this->draw();
|
||||
}
|
||||
@@ -137,11 +273,14 @@ static int daAttp_Execute(daAttp_c* i_this) {
|
||||
}
|
||||
|
||||
static int daAttp_Delete(daAttp_c* i_this) {
|
||||
fpc_ProcID id = fopAcM_GetID(i_this);
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
static int daAttp_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daAttp_c*>(i_this)->create();
|
||||
daAttp_c* attp = static_cast<daAttp_c*>(i_this);
|
||||
fpc_ProcID id = fopAcM_GetID(i_this);
|
||||
return attp->create();
|
||||
}
|
||||
|
||||
static actor_method_class l_daAttp_Method = {
|
||||
|
||||
@@ -5,34 +5,32 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/actor/d_a_tag_bottle_item.h"
|
||||
#include "d/d_item.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
s32 daTag_BottleItem_c::create() {
|
||||
s32 ret;
|
||||
|
||||
int daTag_BottleItem_c::create() {
|
||||
fopAcM_ct(this, daTag_BottleItem_c);
|
||||
setTypeFromParam();
|
||||
|
||||
if (!isBottleItem(mBottleItemType)) {
|
||||
ret = cPhs_ERROR_e;
|
||||
} else {
|
||||
initialize();
|
||||
ret = cPhs_COMPLEATE_e;
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
return ret;
|
||||
initialize();
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
|
||||
s32 daTag_BottleItem_c::Delete() {
|
||||
int daTag_BottleItem_c::Delete() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 daTag_BottleItem_c::Execute() {
|
||||
if (chkEvent()) {
|
||||
int daTag_BottleItem_c::Execute() {
|
||||
int eventResult = chkEvent();
|
||||
if (eventResult) {
|
||||
if (mProcessFunc) {
|
||||
(this->*mProcessFunc)(0);
|
||||
}
|
||||
@@ -43,7 +41,7 @@ s32 daTag_BottleItem_c::Execute() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 daTag_BottleItem_c::Draw() {
|
||||
int daTag_BottleItem_c::Draw() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -72,26 +70,26 @@ int daTag_BottleItem_c::checkProcess(ProcessFunc i_processFunc) {
|
||||
}
|
||||
|
||||
int daTag_BottleItem_c::setProcess(ProcessFunc i_processFunc) {
|
||||
int uVar3 = 0;
|
||||
int retval = 0;
|
||||
|
||||
if (checkProcess(i_processFunc)) {
|
||||
return 0;
|
||||
return retval;
|
||||
} else {
|
||||
mEventType = 2;
|
||||
|
||||
if (mProcessFunc) {
|
||||
uVar3 = (this->*mProcessFunc)(0);
|
||||
retval = (this->*mProcessFunc)(0);
|
||||
}
|
||||
|
||||
mEventType = 0;
|
||||
mProcessFunc = i_processFunc;
|
||||
|
||||
if (mProcessFunc) {
|
||||
uVar3 = (this->*mProcessFunc)(0);
|
||||
retval = (this->*mProcessFunc)(0);
|
||||
}
|
||||
mEventType = 1;
|
||||
}
|
||||
return uVar3;
|
||||
return retval;
|
||||
}
|
||||
|
||||
void daTag_BottleItem_c::setAttnPos() {
|
||||
@@ -99,8 +97,8 @@ void daTag_BottleItem_c::setAttnPos() {
|
||||
eyePos = current.pos;
|
||||
}
|
||||
|
||||
s32 daTag_BottleItem_c::chkEvent() {
|
||||
s32 uVar2 = 1;
|
||||
int daTag_BottleItem_c::chkEvent() {
|
||||
int uVar2 = 1;
|
||||
|
||||
if (!dComIfGp_getEvent()->isOrderOK()) {
|
||||
uVar2 = 0;
|
||||
@@ -112,7 +110,7 @@ s32 daTag_BottleItem_c::chkEvent() {
|
||||
return uVar2;
|
||||
}
|
||||
|
||||
s32 daTag_BottleItem_c::orderEvent() {
|
||||
int daTag_BottleItem_c::orderEvent() {
|
||||
makeSoup();
|
||||
|
||||
if (!daPy_py_c::checkNowWolf() && mBottleItemType != fpcNm_ITEM_EMPTY_BOTTLE) {
|
||||
@@ -150,8 +148,9 @@ int daTag_BottleItem_c::wait(void* param_0) {
|
||||
if (eventInfo.checkCommandCatch() == 0){
|
||||
fopAc_ac_c* player = dComIfGp_getPlayer(0);
|
||||
cXyz pos = attention_info.position - player->attention_info.position;
|
||||
|
||||
dComIfGp_att_CatchRequest(this,mBottleItemType,140.0f,pos.y+100.0f,pos.y-100.0f,0x2000,1);
|
||||
|
||||
dComIfGp_att_CatchRequest(this, mBottleItemType, 140.0f + YREG_F(4), pos.y + 100.0f,
|
||||
pos.y - 100.0f, 0x2000 + YREG_S(5), 1);
|
||||
eventInfo.onCondition(dEvtCnd_40_e);
|
||||
}
|
||||
case 2:
|
||||
@@ -162,23 +161,23 @@ int daTag_BottleItem_c::wait(void* param_0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static s32 daTag_BottleItem_Create(void* i_this) {
|
||||
static int daTag_BottleItem_Create(void* i_this) {
|
||||
return static_cast<daTag_BottleItem_c*>(i_this)->create();
|
||||
}
|
||||
|
||||
static s32 daTag_BottleItem_Delete(void* i_this) {
|
||||
static int daTag_BottleItem_Delete(void* i_this) {
|
||||
return static_cast<daTag_BottleItem_c*>(i_this)->Delete();
|
||||
}
|
||||
|
||||
static s32 daTag_BottleItem_Execute(void* i_this) {
|
||||
static int daTag_BottleItem_Execute(void* i_this) {
|
||||
return static_cast<daTag_BottleItem_c*>(i_this)->Execute();
|
||||
}
|
||||
|
||||
static s32 daTag_BottleItem_Draw(void* i_this) {
|
||||
static int daTag_BottleItem_Draw(void* i_this) {
|
||||
return static_cast<daTag_BottleItem_c*>(i_this)->Draw();
|
||||
}
|
||||
|
||||
static s32 daTag_BottleItem_IsDelete(void* i_this) {
|
||||
static int daTag_BottleItem_IsDelete(void* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_camera.h"
|
||||
#include <cmath>
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "d/actor/d_a_tag_camera.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
namespace {
|
||||
bool always_true() {
|
||||
@@ -107,19 +109,19 @@ u8 daTag_Cam_c::getSwType() {
|
||||
}
|
||||
|
||||
u8 daTag_Cam_c::getPrio() {
|
||||
return (fopAcM_GetParam(this) >> 4) & 0xF;
|
||||
return (fopAcM_GetParam(this) & 0xF0) >> 4;
|
||||
}
|
||||
|
||||
u8 daTag_Cam_c::getSwBit() {
|
||||
return (fopAcM_GetParam(this) >> 8) & 0xFF;
|
||||
return (fopAcM_GetParam(this) & 0xFF00) >> 8;
|
||||
}
|
||||
|
||||
u8 daTag_Cam_c::getCondition() {
|
||||
return (fopAcM_GetParam(this) >> 0x10) & 0xFF;
|
||||
return (fopAcM_GetParam(this) & 0xFF0000) >> 16;
|
||||
}
|
||||
|
||||
u8 daTag_Cam_c::getCameraId() {
|
||||
return (fopAcM_GetParam(this) >> 0x18) & 0xFF;
|
||||
return (fopAcM_GetParam(this) & 0xFF000000) >> 24;
|
||||
}
|
||||
|
||||
u8 daTag_Cam_c::getRailID() {
|
||||
@@ -184,8 +186,10 @@ int daTag_Cam_c::create() {
|
||||
is_player_hugging_eal,
|
||||
};
|
||||
|
||||
int var_r27 = 22;
|
||||
|
||||
u8 func_index = getCondition();
|
||||
if ((int)func_index > 22) {
|
||||
if ((int)func_index > var_r27) {
|
||||
func_index = 3;
|
||||
}
|
||||
|
||||
@@ -251,7 +255,11 @@ int daTag_Cam_c::execute() {
|
||||
bool set_camera = mCheckFunc();
|
||||
|
||||
if (condition == 0xFF) {
|
||||
#if PLATFORM_SHIELD
|
||||
priority |= (u16)0x8000;
|
||||
#else
|
||||
priority |= 0x8000;
|
||||
#endif
|
||||
} else if (condition == 0xFA) {
|
||||
if (dCam_getBody()->CheckFlag(0x8000000)) {
|
||||
set_camera = true;
|
||||
@@ -269,6 +277,28 @@ int daTag_Cam_c::execute() {
|
||||
}
|
||||
|
||||
static int daTag_Cam_Draw(daTag_Cam_c* i_this) {
|
||||
#if DEBUG
|
||||
return i_this->draw();
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
int daTag_Cam_c::draw() {
|
||||
#if DEBUG
|
||||
if (g_envHIO.mOther.mDisplayTransparentCyl != 0) {
|
||||
if (getAreaType() == 0) {
|
||||
cXyz sp3C = (mBoundsHi - mBoundsLo) * 0.5f;
|
||||
cXyz sp30 = mBoundsLo + sp3C;
|
||||
csXyz sp10(0, 0, 0);
|
||||
dDbVw_drawCubeXlu(sp30, sp3C, sp10, (GXColor){0xc0, 0xff, 0x78, 0xa0});
|
||||
} else {
|
||||
cXyz cStack_3c = current.pos;
|
||||
dDbVw_drawCylinderXlu(cStack_3c, scale.x, scale.y, (GXColor){0xc0, 0xff, 0x78, 0xa0},
|
||||
1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -282,13 +312,16 @@ static int daTag_Cam_IsDelete(daTag_Cam_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTag_Cam_Delete(daTag_Cam_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTag_Cam_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daTag_Cam_Create(fopAc_ac_c* i_this) {
|
||||
daTag_Cam_c* a_this = (daTag_Cam_c*)i_this;
|
||||
return a_this->create();
|
||||
daTag_Cam_c* cam = (daTag_Cam_c*)i_this;
|
||||
int id = fopAcM_GetID(i_this);
|
||||
int result = cam->create();
|
||||
return result;
|
||||
}
|
||||
|
||||
static actor_method_class l_daTag_Cam_Method = {
|
||||
|
||||
@@ -6,9 +6,35 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_chgrestart.h"
|
||||
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
s32 daTagChgRestart_c::Create() {
|
||||
class daTagChgRestart_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daTagChgRestart_HIO_c();
|
||||
|
||||
void genMessage(JORMContext* ctx);
|
||||
|
||||
u8 show_range;
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
daTagChgRestart_HIO_c l_HIO;
|
||||
|
||||
daTagChgRestart_HIO_c::daTagChgRestart_HIO_c() {
|
||||
show_range = FALSE;
|
||||
}
|
||||
|
||||
void daTagChgRestart_HIO_c::genMessage(JORMContext* ctx) {
|
||||
// "Room return position change tag"
|
||||
ctx->genLabel("部屋戻し位置変更タグ", 0);
|
||||
// "Display range"
|
||||
ctx->genCheckBox("範囲表示", &show_range, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
int daTagChgRestart_c::Create() {
|
||||
mVertices[0].x = -100.0f * scale.x;
|
||||
mVertices[0].z = -100.0f * scale.z;
|
||||
|
||||
@@ -21,25 +47,27 @@ s32 daTagChgRestart_c::Create() {
|
||||
mVertices[3].x = -100.0f * scale.x;
|
||||
mVertices[3].z = 100.0f * scale.z;
|
||||
|
||||
mVertices[3].y = 0.0f;
|
||||
mVertices[2].y = 0.0f;
|
||||
mVertices[1].y = 0.0f;
|
||||
mVertices[0].y = 0.0f;
|
||||
mVertices[0].y = mVertices[1].y = mVertices[2].y = mVertices[3].y = 0.0f;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 daTagChgRestart_c::create() {
|
||||
int daTagChgRestart_c::create() {
|
||||
fopAcM_ct(this, daTagChgRestart_c);
|
||||
|
||||
if (!Create()) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
// "Room return position change tag"
|
||||
l_HIO.entryHIO("部屋戻し位置変更タグ");
|
||||
#endif
|
||||
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
s32 daTagChgRestart_c::execute() {
|
||||
int daTagChgRestart_c::execute() {
|
||||
if (fopAcM_isSwitch(this, daTagChgRestart_prm::getSwNo(this))) {
|
||||
return 1;
|
||||
}
|
||||
@@ -59,11 +87,13 @@ s32 daTagChgRestart_c::execute() {
|
||||
|
||||
u8 playerNo = daTagChgRestart_prm::getPlayerNo(this);
|
||||
if (playerNo != 0xFF) {
|
||||
dStage_roomDt_c* roomDt = dComIfGp_roomControl_getStatusRoomDt(fopAcM_GetRoomNo(this));
|
||||
int roomNo = fopAcM_GetRoomNo(this);
|
||||
dStage_roomDt_c* roomDt = dComIfGp_roomControl_getStatusRoomDt(roomNo);
|
||||
stage_actor_class* player_data = roomDt->getPlayer();
|
||||
|
||||
stage_actor_data_class* entry_p = player_data->m_entries;
|
||||
for (int i = 0; i < player_data->num; i++) {
|
||||
int i = 0;
|
||||
for (i = 0; i < player_data->num; i++) {
|
||||
if ((entry_p->base.angle.z & 0xFF) == playerNo) {
|
||||
break;
|
||||
}
|
||||
@@ -71,6 +101,11 @@ s32 daTagChgRestart_c::execute() {
|
||||
entry_p++;
|
||||
}
|
||||
|
||||
if (i == player_data->num) {
|
||||
OS_REPORT_ERROR("部屋戻し位置変更の為のプレイヤー番号が不正です!<%d>\n", i);
|
||||
JUT_ASSERT(317, FALSE);
|
||||
}
|
||||
|
||||
restart_pos = entry_p->base.position;
|
||||
restart_angle = entry_p->base.angle.y;
|
||||
}
|
||||
@@ -82,26 +117,74 @@ s32 daTagChgRestart_c::execute() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 daTagChgRestart_c::_delete() {
|
||||
int daTagChgRestart_c::draw() {
|
||||
#if DEBUG
|
||||
if (l_HIO.show_range) {
|
||||
GXColor color = {0, 0, 0x80, 0x80};
|
||||
cXyz sp10[8];
|
||||
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(current.angle.y);
|
||||
|
||||
sp10[0] = mVertices[0];
|
||||
sp10[1] = mVertices[1];
|
||||
sp10[2] = mVertices[3];
|
||||
sp10[3] = mVertices[2];
|
||||
sp10[4] = mVertices[0];
|
||||
sp10[5] = mVertices[1];
|
||||
sp10[6] = mVertices[3];
|
||||
sp10[7] = mVertices[2];
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
mDoMtx_stack_c::multVec(&sp10[i], &sp10[i]);
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
sp10[i].y += 1000.0f;
|
||||
}
|
||||
|
||||
dDbVw_drawCube8pXlu(sp10, color);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static s32 daTagChgRestart_Execute(daTagChgRestart_c* i_this) {
|
||||
int daTagChgRestart_c::_delete() {
|
||||
#if DEBUG
|
||||
l_HIO.removeHIO();
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daTagChgRestart_Execute(daTagChgRestart_c* i_this) {
|
||||
return i_this->execute();
|
||||
}
|
||||
|
||||
static s32 daTagChgRestart_Delete(daTagChgRestart_c* i_this) {
|
||||
static int daTagChgRestart_Delete(daTagChgRestart_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
static s32 daTagChgRestart_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagChgRestart_c*>(i_this)->create();
|
||||
static int daTagChgRestart_Create(fopAc_ac_c* i_this) {
|
||||
daTagChgRestart_c* chgRestart = static_cast<daTagChgRestart_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return chgRestart->create();
|
||||
}
|
||||
|
||||
static int daTagChgRestart_Draw(daTagChgRestart_c* i_this) {
|
||||
return i_this->draw();
|
||||
}
|
||||
|
||||
static actor_method_class l_daTagChgRestart_Method = {
|
||||
(process_method_func)daTagChgRestart_Create,
|
||||
(process_method_func)daTagChgRestart_Delete,
|
||||
(process_method_func)daTagChgRestart_Execute,
|
||||
NULL,
|
||||
#if DEBUG
|
||||
(process_method_func)daTagChgRestart_Draw,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
};
|
||||
|
||||
actor_process_profile_definition g_profile_Tag_ChgRestart = {
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
|
||||
#include "d/actor/d_a_tag_chkpoint.h"
|
||||
#include <cmath>
|
||||
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
int daTag_Chk_c::execute() {
|
||||
if (fopAcM_GetRoomNo(this) != dComIfGp_roomControl_getStayNo()) {
|
||||
@@ -32,10 +35,10 @@ int daTag_Chk_c::execute() {
|
||||
var_r27 = 2;
|
||||
}
|
||||
|
||||
u8 swbit2 = getSwBit2();
|
||||
if (swbit2 == 0xFF) {
|
||||
swbit = getSwBit2();
|
||||
if (swbit == 0xFF) {
|
||||
var_r26 = 0;
|
||||
} else if (dComIfGs_isSwitch(swbit2, fopAcM_GetRoomNo(this))) {
|
||||
} else if (dComIfGs_isSwitch(swbit, fopAcM_GetRoomNo(this))) {
|
||||
var_r26 = 1;
|
||||
} else {
|
||||
var_r26 = 2;
|
||||
@@ -44,20 +47,22 @@ int daTag_Chk_c::execute() {
|
||||
bool set_attention = false;
|
||||
|
||||
if (sp64[var_r27][var_r26] != 0) {
|
||||
cXyz& player_pos = dComIfGp_getLinkPlayer()->current.pos;
|
||||
daPy_py_c* player = dComIfGp_getLinkPlayer();
|
||||
|
||||
if (getAreaType() == 0) {
|
||||
if (mVtxA.x <= player_pos.x && player_pos.x <= mVtxB.x && mVtxA.y <= player_pos.y &&
|
||||
player_pos.y <= mVtxB.y && mVtxA.z <= player_pos.z && player_pos.z <= mVtxB.z)
|
||||
if (mVtxA.x <= player->current.pos.x && player->current.pos.x <= mVtxB.x &&
|
||||
mVtxA.y <= player->current.pos.y && player->current.pos.y <= mVtxB.y &&
|
||||
mVtxA.z <= player->current.pos.z && player->current.pos.z <= mVtxB.z)
|
||||
{
|
||||
set_attention = true;
|
||||
}
|
||||
} else {
|
||||
f32 x_dist = current.pos.x - player_pos.x;
|
||||
f32 z_dist = current.pos.z - player_pos.z;
|
||||
f32 x_dist = current.pos.x - player->current.pos.x;
|
||||
f32 z_dist = current.pos.z - player->current.pos.z;
|
||||
|
||||
if (std::sqrt(x_dist * x_dist + z_dist * z_dist) < scale.x && mVtxA.y <= player_pos.y &&
|
||||
player_pos.y <= mVtxB.y)
|
||||
f32 var_f29 = std::sqrt(x_dist * x_dist + z_dist * z_dist);
|
||||
if (var_f29 < scale.x && mVtxA.y <= player->current.pos.y &&
|
||||
player->current.pos.y <= mVtxB.y)
|
||||
{
|
||||
set_attention = true;
|
||||
}
|
||||
@@ -75,6 +80,30 @@ int daTag_Chk_c::execute() {
|
||||
}
|
||||
|
||||
static int daTag_Chk_Draw(daTag_Chk_c* i_this) {
|
||||
#if DEBUG
|
||||
return i_this->draw();
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
int daTag_Chk_c::draw() {
|
||||
#if DEBUG
|
||||
if (g_envHIO.mOther.mDisplayTransparentCyl) {
|
||||
if (getAreaType() == 0) {
|
||||
cXyz sp40 = (mVtxB - mVtxA) * 0.5f;
|
||||
cXyz sp34 = mVtxA + sp40;
|
||||
csXyz sp14(0,0,0);
|
||||
dDbVw_drawCubeXlu(sp34, sp40, sp14,(GXColor){0xc0, 0x78, 0xff, 0xa0});
|
||||
} else {
|
||||
cXyz sp28 = current.pos;
|
||||
dDbVw_drawCylinderXlu(sp28, scale.x, scale.y, (GXColor){0xc0, 0x78, 0xff, 0xa0}, 1);
|
||||
}
|
||||
}
|
||||
if (g_envHIO.mOther.mDisplayTransparentCyl) {
|
||||
dDbVw_drawSphereXlu(attention_info.position, 20.0f, (GXColor){0xc0, 0x78, 0xff, 0xc0}, 1);
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -88,12 +117,16 @@ static int daTag_Chk_IsDelete(daTag_Chk_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTag_Chk_Delete(daTag_Chk_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTag_Chk_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daTag_Chk_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTag_Chk_c*>(i_this)->create();
|
||||
daTag_Chk_c* chk = static_cast<daTag_Chk_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
int result = chk->create();
|
||||
return result;
|
||||
}
|
||||
|
||||
static actor_method_class l_daTag_Chk_Method = {
|
||||
|
||||
+100
-60
@@ -10,10 +10,36 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_bg_w.h"
|
||||
|
||||
class daTagCsw_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daTagCsw_HIO_c();
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
f32 field_0x8;
|
||||
};
|
||||
|
||||
static const char* l_arcName = "Lv6Warp";
|
||||
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
static int const l_bmd_idx[2] = {5, 6};
|
||||
|
||||
static int const l_brk_idx[2] = {9, 10};
|
||||
|
||||
static int const l_dbz_idx[2] = {13, 14};
|
||||
|
||||
#if DEBUG
|
||||
static daTagCsw_HIO_c l_HIO;
|
||||
|
||||
daTagCsw_HIO_c::daTagCsw_HIO_c() {
|
||||
field_0x8 = 5.0f;
|
||||
}
|
||||
|
||||
void daTagCsw_HIO_c::genMessage(JORMContext* ctx) {
|
||||
ctx->genLabel("石像ワープ", 0);
|
||||
ctx->genSlider("上昇速度", &field_0x8, 0.0f, 30.0f);
|
||||
}
|
||||
#endif
|
||||
|
||||
static dCcD_SrcCyl l_cyl_src = {
|
||||
{
|
||||
{0x0, {{0x0, 0x0, 0x0}, {0xffffffff, 0x0}, 0x19}}, // mObj
|
||||
@@ -22,17 +48,14 @@ static dCcD_SrcCyl l_cyl_src = {
|
||||
{0x0}, // mGObjCo
|
||||
}, // mObjInf
|
||||
{
|
||||
{
|
||||
{0.0f, 0.0f, 0.0f}, // mCenter
|
||||
300.0f, // mRadius
|
||||
600.0f // mHeight
|
||||
} // mCyl
|
||||
{
|
||||
{0.0f, 0.0f, 0.0f}, // mCenter
|
||||
300.0f, // mRadius
|
||||
600.0f // mHeight
|
||||
} // mCyl
|
||||
} // mCylAttr
|
||||
};
|
||||
#pragma pop
|
||||
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
static dCcD_SrcCyl l_tg_src = {
|
||||
{
|
||||
{0x0, {{0x0, 0x0, 0x0}, {0x400000, 0x11}, 0x0}}, // mObj
|
||||
@@ -41,29 +64,16 @@ static dCcD_SrcCyl l_tg_src = {
|
||||
{0x0}, // mGObjCo
|
||||
}, // mObjInf
|
||||
{
|
||||
{
|
||||
{0.0f, 0.0f, 0.0f}, // mCenter
|
||||
300.0f, // mRadius
|
||||
600.0f // mHeight
|
||||
} // mCyl
|
||||
{
|
||||
{0.0f, 0.0f, 0.0f}, // mCenter
|
||||
300.0f, // mRadius
|
||||
600.0f // mHeight
|
||||
} // mCyl
|
||||
} // mCylAttr
|
||||
};
|
||||
#pragma pop
|
||||
|
||||
daTagCsw_c::~daTagCsw_c() {}
|
||||
|
||||
static u8 const l_bmd_idx[8] = {
|
||||
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06,
|
||||
};
|
||||
|
||||
static u8 const l_brk_idx[8] = {
|
||||
0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0A,
|
||||
};
|
||||
|
||||
static u8 const l_dbz_idx[8] = {
|
||||
0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0E,
|
||||
};
|
||||
|
||||
void daTagCsw_c::setMtx() {
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::YrotM(current.angle.y);
|
||||
@@ -164,14 +174,13 @@ static int daTagCsw_c_createHeap(fopAc_ac_c* i_this) {
|
||||
|
||||
int daTagCsw_c::chkInsideStatueStart() {
|
||||
bool rv = false;
|
||||
bool var_r29;
|
||||
if (fopAcM_isSwitch(this, getSw())) {
|
||||
bool bVar1 = true;
|
||||
if (getSw() != 10) {
|
||||
if (fopAcM_isSwitch(this, getSw() + 1)) {
|
||||
bVar1 = false;
|
||||
}
|
||||
var_r29 = true;
|
||||
if (getSw() != 10 && fopAcM_isSwitch(this, getSw() + 1)) {
|
||||
var_r29 = false;
|
||||
}
|
||||
if (bVar1) {
|
||||
if (var_r29) {
|
||||
rv = true;
|
||||
}
|
||||
}
|
||||
@@ -180,6 +189,14 @@ int daTagCsw_c::chkInsideStatueStart() {
|
||||
|
||||
int daTagCsw_c::create() {
|
||||
fopAcM_ct(this, daTagCsw_c);
|
||||
|
||||
if (getSw() < 0 || getSw() > 10) {
|
||||
// "Stone statue warp tag: Switch bit is out of range:
|
||||
// Please use a save bit within the range (%d~%d)"
|
||||
OS_REPORT_ERROR("石像ワープタグ:スイッチビットが範囲外:%dセーブビット(%d~%d)でお願いします。\n",
|
||||
getSw(), 0, 10);
|
||||
}
|
||||
|
||||
field_0x570 = getType();
|
||||
int rv = dComIfG_resLoad(this, l_arcName);
|
||||
if (rv == cPhs_COMPLEATE_e) {
|
||||
@@ -191,7 +208,11 @@ int daTagCsw_c::create() {
|
||||
field_0x624 = 500.0f;
|
||||
} else if (chkInsideStatueStart()) {
|
||||
field_0x624 = 0.0f;
|
||||
#if DEBUG
|
||||
field_0x628 = l_HIO.field_0x8;
|
||||
#else
|
||||
field_0x628 = 5.0f;
|
||||
#endif
|
||||
if (getSw2() != 0xff) {
|
||||
fopAcM_onSwitch(this, getSw2());
|
||||
}
|
||||
@@ -225,24 +246,27 @@ int daTagCsw_c::create() {
|
||||
return rv;
|
||||
}
|
||||
|
||||
static void* searchTagCswOut(void* param_1, void* param_2) {
|
||||
if (param_1 != NULL && fopAcM_IsActor(param_1) && fopAcM_GetProfName(param_1) == PROC_TAG_CSW &&
|
||||
static_cast<daTagCsw_c*>(param_1)->getType() == 1)
|
||||
{
|
||||
if (static_cast<daTagCsw_c*>(param_1)->getSw() ==
|
||||
static_cast<daTagCsw_c*>(param_2)->getSw())
|
||||
{
|
||||
return param_1;
|
||||
static void* searchTagCswOut(void* param_0, void* param_1) {
|
||||
UNUSED(param_1);
|
||||
if (param_0 != NULL && fopAcM_IsActor(param_0) && fopAcM_GetProfName(param_0) == PROC_TAG_CSW) {
|
||||
daTagCsw_c* csw1 = static_cast<daTagCsw_c*>(param_0);
|
||||
daTagCsw_c* csw2 = static_cast<daTagCsw_c*>(param_1);
|
||||
if (csw1->getType() == 1) {
|
||||
if (csw1->getSw() == csw2->getSw()) {
|
||||
return param_0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void* searchCStatue(void* param_1, void* param_2) {
|
||||
if (param_1 != NULL && fopAcM_IsActor(param_1) && fopAcM_GetProfName(param_1) == PROC_CSTATUE &&
|
||||
static_cast<daCstatue_c*>(param_1)->checkNormalType())
|
||||
{
|
||||
return param_1;
|
||||
static void* searchCStatue(void* param_0, void* param_1) {
|
||||
UNUSED(param_1);
|
||||
if (param_0 != NULL && fopAcM_IsActor(param_0) && fopAcM_GetProfName(param_0) == PROC_CSTATUE) {
|
||||
daCstatue_c* cstatue = static_cast<daCstatue_c*>(param_0);
|
||||
if (cstatue->checkNormalType()) {
|
||||
return param_0;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -283,11 +307,14 @@ void daTagCsw_c::offLight() {
|
||||
int daTagCsw_c::execute() {
|
||||
bool bVar3 = false;
|
||||
daCstatue_c* statue = (daCstatue_c*)fopAcM_Search(searchCStatue, this);
|
||||
if (statue != NULL && statue->current.pos.absXZ(current.pos) < 75.0f &&
|
||||
statue->current.pos.y > current.pos.y - 30.0f &&
|
||||
statue->current.pos.y < current.pos.y + 200.0f)
|
||||
{
|
||||
bVar3 = true;
|
||||
if (statue != NULL) {
|
||||
f32 dist = statue->current.pos.absXZ(current.pos);
|
||||
if (dist < 75.0f &&
|
||||
statue->current.pos.y > current.pos.y - 30.0f &&
|
||||
statue->current.pos.y < current.pos.y + 200.0f)
|
||||
{
|
||||
bVar3 = true;
|
||||
}
|
||||
}
|
||||
if (field_0x570 == 0) {
|
||||
if (bVar3) {
|
||||
@@ -302,7 +329,11 @@ int daTagCsw_c::execute() {
|
||||
if (cM3d_IsZero(field_0x628) && getSw2() != 0xff) {
|
||||
fopAcM_onSwitch(this, getSw2());
|
||||
}
|
||||
#if DEBUG
|
||||
field_0x628 = -l_HIO.field_0x8;
|
||||
#else
|
||||
field_0x628 = -5.0f;
|
||||
#endif
|
||||
if (!field_0x588->ChkUsed()) {
|
||||
dComIfG_Bgsp().Regist(field_0x588, this);
|
||||
field_0x5ec = 0;
|
||||
@@ -342,14 +373,14 @@ int daTagCsw_c::execute() {
|
||||
}
|
||||
}
|
||||
if (field_0x570 == 0 && getSw() == 6 && field_0x8e2 != 0) {
|
||||
s16 angleDiff = (current.angle.y - statue->current.angle.y);
|
||||
s16 sVar4 = angleDiff / field_0x8e2;
|
||||
if (sVar4 > 0x800) {
|
||||
statue->current.angle.y += 0x800;
|
||||
} else if (sVar4 < -0x800) {
|
||||
statue->current.angle.y -= 0x800;
|
||||
s16 sp0A = current.angle.y - statue->current.angle.y;
|
||||
sp0A /= field_0x8e2;
|
||||
if (sp0A > 0x800) {
|
||||
statue->current.angle.y += (s16)0x800;
|
||||
} else if (sp0A < -0x800) {
|
||||
statue->current.angle.y -= (s16)0x800;
|
||||
} else {
|
||||
statue->current.angle.y += sVar4;
|
||||
statue->current.angle.y += sp0A;
|
||||
}
|
||||
statue->shape_angle.y = statue->current.angle.y;
|
||||
onLight();
|
||||
@@ -357,7 +388,11 @@ int daTagCsw_c::execute() {
|
||||
}
|
||||
if (!bVar3 && field_0x624 == 0.0f) {
|
||||
if (fopAcM_isSwitch(this, getSw())) {
|
||||
#if DEBUG
|
||||
field_0x628 = l_HIO.field_0x8;
|
||||
#else
|
||||
field_0x628 = 5.0f;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -365,7 +400,11 @@ int daTagCsw_c::execute() {
|
||||
if (getSw2() != 0xff) {
|
||||
fopAcM_onSwitch(this, getSw2());
|
||||
}
|
||||
#if DEBUG
|
||||
field_0x628 = l_HIO.field_0x8;
|
||||
#else
|
||||
field_0x628 = 5.0f;
|
||||
#endif
|
||||
onLight();
|
||||
}
|
||||
else if (field_0x624 == 500.0f) {
|
||||
@@ -498,7 +537,8 @@ static int daTagCsw_Delete(daTagCsw_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTagCsw_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagCsw_c*>(i_this)->create();
|
||||
daTagCsw_c* csw = static_cast<daTagCsw_c*>(i_this);
|
||||
return csw->create();
|
||||
}
|
||||
|
||||
static actor_method_class l_daTagCsw_Method = {
|
||||
|
||||
@@ -8,12 +8,19 @@
|
||||
#include "d/actor/d_a_tag_escape.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
static int daTagEscape_Create(fopAc_ac_c* i_this) {
|
||||
fopAcM_ct(i_this, daTagEscape_c);
|
||||
int daTagEscape_c::create() {
|
||||
fopAcM_ct(this, daTagEscape_c);
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
static int daTagEscape_Create(fopAc_ac_c* i_this) {
|
||||
daTagEscape_c* escape = static_cast<daTagEscape_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return escape->create();
|
||||
}
|
||||
|
||||
static int daTagEscape_Delete(daTagEscape_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagEscape_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "d/actor/d_a_tag_event.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
static fopAc_ac_c* daTag_getBk(u32 param_0) {
|
||||
return fopAcM_searchFromName("Bk", 0xF, param_0);
|
||||
}
|
||||
|
||||
u8 daTag_Event_c::getEventNo() {
|
||||
return fopAcM_GetParam(this) >> 0x18;
|
||||
return (fopAcM_GetParam(this) & 0xff000000) >> 24;
|
||||
}
|
||||
|
||||
u8 daTag_Event_c::getSwbit() {
|
||||
return fopAcM_GetParam(this) >> 0x8;
|
||||
return (fopAcM_GetParam(this) & 0xff00) >> 8;
|
||||
}
|
||||
|
||||
u8 daTag_Event_c::getSwbit2() {
|
||||
return fopAcM_GetParam(this) >> 0x10;
|
||||
return (fopAcM_GetParam(this) & 0xff0000) >> 16;
|
||||
}
|
||||
|
||||
u8 daTag_Event_c::getType() {
|
||||
@@ -103,10 +105,8 @@ int daTag_Event_c::create() {
|
||||
setActio(ACTION_WAIT);
|
||||
}
|
||||
|
||||
shape_angle.z = 0;
|
||||
shape_angle.x = 0;
|
||||
current.angle.z = 0;
|
||||
current.angle.x = 0;
|
||||
shape_angle.x = shape_angle.z = 0;
|
||||
current.angle.x = current.angle.z = 0;
|
||||
|
||||
scale.x *= 100.0f;
|
||||
scale.y *= 100.0f;
|
||||
@@ -131,8 +131,9 @@ int daTag_Event_c::actionNext() {
|
||||
mEventIdx = mMapEventIdx;
|
||||
mMapEventIdx = -1;
|
||||
|
||||
int roomNo = fopAcM_GetRoomNo(this);
|
||||
dStage_MapEvent_dt_c* event_data =
|
||||
dEvt_control_c::searchMapEventData(mMapToolId, fopAcM_GetRoomNo(this));
|
||||
dEvt_control_c::searchMapEventData(mMapToolId, roomNo);
|
||||
if (event_data != NULL) {
|
||||
mMapToolId = event_data->field_0x5;
|
||||
mMapEventIdx = dComIfGp_getEventManager().getEventIdx(this, mMapToolId);
|
||||
@@ -231,6 +232,10 @@ int daTag_Event_c::actionHunt() {
|
||||
if (swbit != 0xFF && dComIfGs_isSwitch(swbit, fopAcM_GetRoomNo(this))) {
|
||||
setActio(ACTION_WAIT);
|
||||
} else if (arrivalTerms() && checkArea()) {
|
||||
#if DEBUG
|
||||
mEventIdx = dComIfGp_getEventManager().getEventIdx(this, getEventNo());
|
||||
#endif
|
||||
|
||||
setActio(ACTION_READY);
|
||||
fopAcM_orderOtherEventId(this, mEventIdx, getEventNo(), 0xFFFF, 0, 1);
|
||||
}
|
||||
@@ -299,6 +304,36 @@ int daTag_Event_c::execute() {
|
||||
}
|
||||
|
||||
int daTag_Event_c::draw() {
|
||||
#if DEBUG
|
||||
static GXColor color = {0x00, 0x00, 0xFF, 0xFF};
|
||||
|
||||
if (g_envHIO.mOther.mDisplayTransparentCyl != 0) {
|
||||
if (getAreaType() == 0x8000) {
|
||||
cXyz sp30[8];
|
||||
cXyz sp20(current.pos.x - scale.x * 0.5f,
|
||||
current.pos.y,
|
||||
current.pos.z - scale.z * 0.5f);
|
||||
cXyz sp14(current.pos.x + scale.x * 0.5f,
|
||||
current.pos.y + scale.y,
|
||||
current.pos.z + scale.z * 0.5f);
|
||||
sp30[0].set(sp20.x, sp20.y, sp20.z);
|
||||
sp30[1].set(sp20.x, sp20.y, sp14.z);
|
||||
sp30[2].set(sp14.x, sp20.y, sp14.z);
|
||||
sp30[3].set(sp14.x, sp20.y, sp20.z);
|
||||
sp30[4].set(sp20.x, sp14.y, sp20.z);
|
||||
sp30[5].set(sp20.x, sp14.y, sp14.z);
|
||||
sp30[6].set(sp14.x, sp14.y, sp14.z);
|
||||
sp30[7].set(sp14.x, sp14.y, sp20.z);
|
||||
dDbVw_drawCube8pXlu(sp30, color);
|
||||
} else {
|
||||
cXyz sp08(current.pos);
|
||||
sp08.y -= scale.y;
|
||||
dDbVw_drawCylinderXlu(
|
||||
sp08, scale.x, scale.y * 2.0f,
|
||||
color, 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -316,12 +351,16 @@ static int daTag_Event_IsDelete(daTag_Event_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTag_Event_Delete(daTag_Event_c* i_this) {
|
||||
u32 actorId = fopAcM_GetID(i_this);
|
||||
i_this->~daTag_Event_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daTag_Event_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTag_Event_c*>(i_this)->create();
|
||||
daTag_Event_c* event = static_cast<daTag_Event_c*>(i_this);
|
||||
u32 actorId = fopAcM_GetID(i_this);
|
||||
int result = event->create();
|
||||
return result;
|
||||
}
|
||||
|
||||
static actor_method_class l_daTag_Event_Method = {
|
||||
|
||||
+27
-17
@@ -38,14 +38,20 @@ int daTag_Evt_c::destroy() {
|
||||
}
|
||||
|
||||
int daTag_Evt_c::execute() {
|
||||
cXyz sp14;
|
||||
int var_r29 = 0;
|
||||
BOOL bVar = true;
|
||||
u16 eventId;
|
||||
int iVar1;
|
||||
int actIdx;
|
||||
|
||||
eyePos.set(current.pos.x, current.pos.y + 100.0f, current.pos.z);
|
||||
attention_info.position = eyePos;
|
||||
fopAcM_SetRoomNo(this, dComIfGp_roomControl_getStayNo());
|
||||
if (field_0x5E4 == 0 || field_0x5E4 == 1) {
|
||||
if (dComIfGp_event_runCheck()) {
|
||||
bVar = false;
|
||||
int iVar1 = dComIfGp_evmng_getMyStaffId(field_0x568, 0, 0);
|
||||
iVar1 = dComIfGp_evmng_getMyStaffId(field_0x568, 0, 0);
|
||||
if (!eventInfo.checkCommandTalk()) {
|
||||
if (eventInfo.checkCommandDemoAccrpt()) {
|
||||
if (dComIfGp_getEventManager().endCheck(field_0x572)) {
|
||||
@@ -55,20 +61,20 @@ int daTag_Evt_c::execute() {
|
||||
bVar = true;
|
||||
} else {
|
||||
if (iVar1 != -1) {
|
||||
int actIdx = dComIfGp_getEventManager().getMyActIdx(
|
||||
actIdx = dComIfGp_getEventManager().getMyActIdx(
|
||||
iVar1, mEvtCutList, 3, 0, 0);
|
||||
int iVar2 = 0;
|
||||
var_r29 = 0;
|
||||
switch (actIdx) {
|
||||
case 0:
|
||||
iVar2 = doEvtCutWait(iVar1);
|
||||
var_r29 = doEvtCutWait(iVar1);
|
||||
break;
|
||||
case 1:
|
||||
iVar2 = doEvtCutTalk(iVar1);
|
||||
var_r29 = doEvtCutTalk(iVar1);
|
||||
break;
|
||||
case 2:
|
||||
iVar2 = doEvtCutNext(iVar1);
|
||||
var_r29 = doEvtCutNext(iVar1);
|
||||
}
|
||||
if (iVar2 != 0) {
|
||||
if (var_r29 != 0) {
|
||||
dComIfGp_getEventManager().cutEnd(iVar1);
|
||||
}
|
||||
}
|
||||
@@ -77,7 +83,7 @@ int daTag_Evt_c::execute() {
|
||||
} else if (field_0x5DC != 0) {
|
||||
if (mMsgFlow.doFlow(this, NULL, 0) != 0) {
|
||||
dComIfGp_event_reset();
|
||||
u16 eventId = mMsgFlow.getEventId(NULL);
|
||||
eventId = mMsgFlow.getEventId(NULL);
|
||||
if (eventId != 0) {
|
||||
daNpcMsg_setEvtNum(eventId);
|
||||
field_0x570 = 1;
|
||||
@@ -92,8 +98,8 @@ int daTag_Evt_c::execute() {
|
||||
}
|
||||
}
|
||||
if (!isDelete() && cLib_calcTimer(&field_0x5D0) == 0) {
|
||||
cXyz var1 = daPy_getPlayerActorClass()->current.pos - current.pos;
|
||||
if (var1.absXZ() < scale.x && -scale.y < var1.y && var1.y < scale.y) {
|
||||
sp14 = daPy_getPlayerActorClass()->current.pos - current.pos;
|
||||
if (sp14.absXZ() < scale.x && -scale.y < sp14.y && sp14.y < scale.y) {
|
||||
field_0x570 = 1;
|
||||
}
|
||||
}
|
||||
@@ -113,16 +119,16 @@ int daTag_Evt_c::draw() {
|
||||
|
||||
int daTag_Evt_c::getParam() {
|
||||
field_0x5E0 = fopAcM_GetParam(this) & 0xFFF;
|
||||
field_0x5E2 = (fopAcM_GetParam(this) >> 0xC) & 0xFFF;
|
||||
field_0x5E2 = (fopAcM_GetParam(this) & 0xFFF000) >> 12;
|
||||
if ((fopAcM_GetParam(this) & 0xF000000) != 0xF000000) {
|
||||
field_0x5D8 = (fopAcM_GetParam(this) & 0xF000000) >> 0x18;
|
||||
field_0x5D8 = (fopAcM_GetParam(this) & 0xF000000) >> 24;
|
||||
} else {
|
||||
field_0x5D8 = -1;
|
||||
}
|
||||
|
||||
field_0x5E4 = fopAcM_GetParam(this) >> 0x1E;
|
||||
field_0x5E4 = (fopAcM_GetParam(this) & 0xC0000000) >> 30;
|
||||
field_0x5DD = home.angle.x;
|
||||
field_0x5DE = (u16)home.angle.x >> 8;
|
||||
field_0x5DE = (home.angle.x & 0xFF00) >> 8;
|
||||
field_0x5D4 = home.angle.z & 0xFF;
|
||||
if ((home.angle.z & 0xFF00) != 0xFF00) {
|
||||
field_0x5D0 = ((home.angle.z & 0xFF00) >> 8) * 0x1E;
|
||||
@@ -175,16 +181,19 @@ int daTag_Evt_c::isDelete() {
|
||||
}
|
||||
|
||||
int daTag_Evt_c::doEvtCutWait(int param_0) {
|
||||
int* pTimer = NULL;
|
||||
if (dComIfGp_getEventManager().getIsAddvance(param_0)) {
|
||||
int* pTimer = dComIfGp_evmng_getMyIntegerP(param_0, "timer");
|
||||
mTimer = (pTimer == NULL ? 0 : *pTimer);
|
||||
pTimer = dComIfGp_evmng_getMyIntegerP(param_0, "timer");
|
||||
mTimer = pTimer == NULL ? 0 : *pTimer;
|
||||
}
|
||||
return cLib_calcTimer(&mTimer) == 0;
|
||||
}
|
||||
|
||||
int daTag_Evt_c::doEvtCutTalk(int param_0) {
|
||||
int* pTimer = NULL;
|
||||
if (dComIfGp_getEventManager().getIsAddvance(param_0)) {
|
||||
mMsgFlow.init(this, *dComIfGp_evmng_getMyIntegerP(param_0, "flowNodeNo"), 0, NULL);
|
||||
pTimer = dComIfGp_evmng_getMyIntegerP(param_0, "flowNodeNo");
|
||||
mMsgFlow.init(this, *pTimer, 0, NULL);
|
||||
return 0;
|
||||
} else {
|
||||
return mMsgFlow.doFlow(this, NULL, 0);
|
||||
@@ -192,6 +201,7 @@ int daTag_Evt_c::doEvtCutTalk(int param_0) {
|
||||
}
|
||||
|
||||
int daTag_Evt_c::doEvtCutNext(int param_0) {
|
||||
int* pTimer = NULL;
|
||||
if (dComIfGp_getEventManager().getIsAddvance(param_0)) {
|
||||
if ((field_0x5E4 == 0 || field_0x5E4 == 1) && field_0x5DE != 0xFF) {
|
||||
dComIfGs_onSwitch(field_0x5DE, fopAcM_GetRoomNo(this));
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include "d/d_procname.h"
|
||||
|
||||
cPhs__Step daTag_EvtArea_c::create() {
|
||||
int var_r28 = 0;
|
||||
|
||||
fopAcM_ct(this, daTag_EvtArea_c);
|
||||
|
||||
switch (getType()) {
|
||||
@@ -149,20 +151,19 @@ BOOL daTag_EvtArea_c::isDelete() {
|
||||
}
|
||||
|
||||
BOOL daTag_EvtArea_c::chkPointInArea(cXyz i_point, cXyz i_addSize) {
|
||||
cXyz area_vtx[4];
|
||||
cXyz size, center, player_to_home, point_to_current;
|
||||
|
||||
if (field_0x56c == 0) {
|
||||
if ((getOnEvtBit() != -1 && daNpcT_chkEvtBit(getOnEvtBit())) ||
|
||||
(getBitSW() != 0xff && dComIfGs_isSwitch(getBitSW(), fopAcM_GetRoomNo(this))) ||
|
||||
(getOnEvtBit() == -1 && getBitSW() == 0xFF))
|
||||
{
|
||||
size = scale + i_addSize;
|
||||
cXyz size = scale + i_addSize;
|
||||
cXyz center;
|
||||
|
||||
if (getType() == 15 || getType() == 16) {
|
||||
player_to_home = daPy_getPlayerActorClass()->current.pos;
|
||||
cXyz area_vtx[4];
|
||||
cXyz player_to_home = daPy_getPlayerActorClass()->current.pos;
|
||||
player_to_home -= home.pos;
|
||||
mDoMtx_YrotS(mDoMtx_stack_c::now, -current.angle.y);
|
||||
mDoMtx_stack_c::YrotS(-current.angle.y);
|
||||
mDoMtx_stack_c::multVec(&player_to_home, &player_to_home);
|
||||
|
||||
// bottom left
|
||||
@@ -184,7 +185,7 @@ BOOL daTag_EvtArea_c::chkPointInArea(cXyz i_point, cXyz i_addSize) {
|
||||
if (area_vtx[0].x < player_to_home.x && area_vtx[0].z < player_to_home.z &&
|
||||
area_vtx[2].x > player_to_home.x && area_vtx[2].z > player_to_home.z)
|
||||
{
|
||||
point_to_current = i_point - current.pos;
|
||||
cXyz point_to_current = i_point - current.pos;
|
||||
if (0 <= (int)point_to_current.y && (int)point_to_current.y < (int)size.y) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,13 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
enum evt_cut_e {
|
||||
EVT_CUT_NONE_e,
|
||||
EVT_CUT_TALK_e,
|
||||
EVT_CUT_WAIT_e,
|
||||
NUM_EVT_CUTS_e,
|
||||
};
|
||||
|
||||
char* daTag_EvtMsg_c::mEvtCutNameList[] = {"", "TALK", "WAIT"};
|
||||
|
||||
EvtCutFunc daTag_EvtMsg_c::mEvtCutList[] = {
|
||||
@@ -21,6 +28,8 @@ EvtCutFunc daTag_EvtMsg_c::mEvtCutList[] = {
|
||||
static char* l_myName = "EvtMsg";
|
||||
|
||||
int daTag_EvtMsg_c::create() {
|
||||
int var_r28 = 0;
|
||||
|
||||
fopAcM_ct(this, daTag_EvtMsg_c);
|
||||
|
||||
scale.x *= 100.0f;
|
||||
@@ -67,6 +76,10 @@ int daTag_EvtMsg_c::Execute() {
|
||||
staff_id = evt_mng.getMyStaffId(l_myName, this, -1);
|
||||
if (staff_id != -1) {
|
||||
int evtCutNo = evt_mng.getMyActIdx(staff_id, mEvtCutNameList, 3, 0, 0);
|
||||
|
||||
JUT_ASSERT(165, (0 <= evtCutNo) && (evtCutNo < NUM_EVT_CUTS_e));
|
||||
JUT_ASSERT(166, NULL != mEvtCutList[evtCutNo]);
|
||||
|
||||
if ((this->*mEvtCutList[evtCutNo])(staff_id) != 0) {
|
||||
evt_mng.cutEnd(staff_id);
|
||||
}
|
||||
@@ -82,18 +95,18 @@ int daTag_EvtMsg_c::Execute() {
|
||||
}
|
||||
} else if (isDelete()) {
|
||||
fopAcM_delete(this);
|
||||
} else if (mFlowID != -1) {
|
||||
if (chkPointInArea(daPy_getPlayerActorClass()->current.pos)) {
|
||||
} else {
|
||||
if (mFlowID != -1 && chkPointInArea(daPy_getPlayerActorClass()->current.pos)) {
|
||||
if (getProcType() == 0) {
|
||||
s16 var_r0 = (s16)(fopAcM_searchPlayerAngleY(this) + 0x7FFF);
|
||||
var_r0 = var_r0 - daPy_getPlayerActorClass()->current.angle.y;
|
||||
s16 var_r28 = (s16)(fopAcM_searchPlayerAngleY(this) + 0x7FFF);
|
||||
var_r28 = var_r28 - daPy_getPlayerActorClass()->current.angle.y;
|
||||
|
||||
if (var_r0 < 0) {
|
||||
var_r0 = -var_r0;
|
||||
if (var_r28 < 0) {
|
||||
var_r28 = -var_r28;
|
||||
}
|
||||
|
||||
if (var_r0 <= 0x1000) {
|
||||
mEventID = evt_mng.getEventIdx(this, "DEFAULT_EVT_TALK", 0xFF);
|
||||
if (var_r28 <= 0x1000) {
|
||||
mEventID = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_EVT_TALK", 0xFF);
|
||||
fopAcM_orderOtherEventId(this, mEventID, 0xFF, 0xFFFF, 0, 1);
|
||||
}
|
||||
} else {
|
||||
@@ -117,20 +130,12 @@ int daTag_EvtMsg_c::Draw() {
|
||||
|
||||
u32 daTag_EvtMsg_c::getOnEvtBit() {
|
||||
u32 bit = fopAcM_GetParam(this) & 0xFFF;
|
||||
if (bit != 0xFFF) {
|
||||
return bit;
|
||||
}
|
||||
|
||||
return -1;
|
||||
return bit == 0xFFF ? -1 : bit;
|
||||
}
|
||||
|
||||
u32 daTag_EvtMsg_c::getOffEvtBit() {
|
||||
u32 bit = (fopAcM_GetParam(this) >> 0xC) & 0xFFF;
|
||||
if (bit != 0xFFF) {
|
||||
return bit;
|
||||
}
|
||||
|
||||
return -1;
|
||||
u32 bit = (fopAcM_GetParam(this) & 0xFFF000) >> 12;
|
||||
return bit == 0xFFF ? -1 : bit;
|
||||
}
|
||||
|
||||
u8 daTag_EvtMsg_c::getOnSwBit() {
|
||||
@@ -138,7 +143,7 @@ u8 daTag_EvtMsg_c::getOnSwBit() {
|
||||
}
|
||||
|
||||
u8 daTag_EvtMsg_c::getOffSwBit() {
|
||||
return (home.angle.x >> 8) & 0xFF;
|
||||
return (home.angle.x & 0xFF00) >> 8;
|
||||
}
|
||||
|
||||
u8 daTag_EvtMsg_c::getProcType() {
|
||||
@@ -175,7 +180,8 @@ BOOL daTag_EvtMsg_c::chkPointInArea(cXyz param_0) {
|
||||
}
|
||||
|
||||
BOOL daTag_EvtMsg_c::ECut_talk(int i_staffID) {
|
||||
if (dComIfGp_getEventManager().getIsAddvance(i_staffID)) {
|
||||
dEvent_manager_c& eventMgr = dComIfGp_getEventManager();
|
||||
if (eventMgr.getIsAddvance(i_staffID)) {
|
||||
mMsgFlow.init(this, mFlowID, 0, NULL);
|
||||
}
|
||||
|
||||
@@ -188,9 +194,10 @@ BOOL daTag_EvtMsg_c::ECut_talk(int i_staffID) {
|
||||
|
||||
BOOL daTag_EvtMsg_c::ECut_wait(int i_staffID) {
|
||||
dEvent_manager_c& evt_mng = dComIfGp_getEventManager();
|
||||
int* data_p = NULL;
|
||||
int timer = 0;
|
||||
|
||||
int* data_p = dComIfGp_evmng_getMyIntegerP(i_staffID, "timer");
|
||||
data_p = dComIfGp_evmng_getMyIntegerP(i_staffID, "timer");
|
||||
if (data_p != NULL) {
|
||||
timer = *data_p;
|
||||
}
|
||||
|
||||
@@ -5,12 +5,13 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_firewall.h"
|
||||
#include <cmath>
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/actor/d_a_tag_firewall.h"
|
||||
#include "d/d_bomb.h"
|
||||
#include "d/d_camera.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
struct Tag_FWall_n {
|
||||
static dCcD_SrcSph cc_sph_src;
|
||||
@@ -42,6 +43,7 @@ static u8 fire_num;
|
||||
int daTag_FWall_c::execute() {
|
||||
cXyz cam_eye = dCam_getBody()->Eye();
|
||||
cXyz pos;
|
||||
u8 target_alpha = 0xff;
|
||||
|
||||
if (mSetGameoverEff) {
|
||||
pos.set(0.0f, 0.0f, 0.0f);
|
||||
@@ -108,8 +110,9 @@ int daTag_FWall_c::execute() {
|
||||
mCcSphs[i].OnAtSetBit();
|
||||
|
||||
pos = mWallPos[i];
|
||||
pos.y += nREG_F(17);
|
||||
mCcSphs[i].SetC(pos);
|
||||
mCcSphs[i].SetR(90.0f);
|
||||
mCcSphs[i].SetR(90.0f + nREG_F(16));
|
||||
dComIfG_Ccsp()->Set(&mCcSphs[i]);
|
||||
}
|
||||
|
||||
@@ -120,8 +123,7 @@ int daTag_FWall_c::execute() {
|
||||
if (emitter != NULL) {
|
||||
pos = cam_eye - mWallPos[i];
|
||||
|
||||
u8 target_alpha;
|
||||
if (pos.absXZ() < 250.0f && std::abs(pos.y) < 250.0f) {
|
||||
if (pos.absXZ() < 250.0f + nREG_F(18) && std::abs(pos.y) < 250.0f + nREG_F(19)) {
|
||||
target_alpha = 0;
|
||||
} else {
|
||||
target_alpha = 0xFF;
|
||||
@@ -163,23 +165,26 @@ static int daTag_FWall_IsDelete(daTag_FWall_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTag_FWall_Delete(daTag_FWall_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daTag_FWall_c::create() {
|
||||
fopAcM_ct(this, daTag_FWall_c);
|
||||
|
||||
OS_REPORT("Tag_FWall PARAM %x %d \n", fopAcM_GetParam(this), fire_num);
|
||||
|
||||
if (fire_num == 0) {
|
||||
field_0x568 = 0xFF;
|
||||
fire_leader = this;
|
||||
mCcStts.Init(0xFF, 0, this);
|
||||
}
|
||||
|
||||
fire_leader->mWallTimer[fire_num] = (fopAcM_GetParam(this) >> 8) & 0xFFFF;
|
||||
fire_leader->mWallTimer[fire_num] = (fopAcM_GetParam(this) & 0xFFFF00) >> 8;
|
||||
fire_leader->mExplodeTime[fire_num] = current.angle.x & 0xFFFF;
|
||||
fire_leader->field_0x65c[fire_num] = fopAcM_GetParam(this);
|
||||
|
||||
u8 temp_r0 = fopAcM_GetParam(this) >> 0x18;
|
||||
u8 temp_r0 = (fopAcM_GetParam(this) & 0xFF000000) >> 24;
|
||||
if (temp_r0 == 0xFF) {
|
||||
temp_r0 = 0;
|
||||
}
|
||||
@@ -194,12 +199,12 @@ int daTag_FWall_c::create() {
|
||||
fire_leader->mWallMode[fire_num] = 1;
|
||||
}
|
||||
|
||||
if (++fire_num > 1) {
|
||||
fire_num++;
|
||||
if (fire_num > 1) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
shape_angle.x = 0;
|
||||
current.angle.x = 0;
|
||||
current.angle.x = shape_angle.x = 0;
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,10 +9,12 @@
|
||||
|
||||
static int daTagGra_Create(fopAc_ac_c* i_this) {
|
||||
daTagGra_c* gra_tag = (daTagGra_c*)i_this;
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return gra_tag->create();
|
||||
}
|
||||
|
||||
static int daTagGra_Delete(daTagGra_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagGra_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -14,30 +14,33 @@ int daTagGstart_c::create() {
|
||||
fopAcM_ct(this, daTagGstart_c);
|
||||
|
||||
mSwNo = fopAcM_GetParam(this);
|
||||
mSwNo2 = fopAcM_GetParam(this) >> 8;
|
||||
field_0x56a = fopAcM_GetParam(this) >> 0x10;
|
||||
mSwNo2 = (fopAcM_GetParam(this) >> 8) & 0xFF;
|
||||
field_0x56a = (fopAcM_GetParam(this) >> 0x10) & 0xFF;
|
||||
mType = (fopAcM_GetParam(this) >> 0x18) & 0xF;
|
||||
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
static int daTagGstart_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagGstart_c*>(i_this)->create();
|
||||
daTagGstart_c* gStart = static_cast<daTagGstart_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return gStart->create();
|
||||
}
|
||||
|
||||
daTagGstart_c::~daTagGstart_c() {}
|
||||
|
||||
static int daTagGstart_Delete(daTagGstart_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagGstart_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daTagGstart_c::execute() {
|
||||
if ((mSwNo == 0xFF || dComIfGs_isSwitch(mSwNo, fopAcM_GetHomeRoomNo(this))) &&
|
||||
(mSwNo2 == 0xFF || !dComIfGs_isSwitch(mSwNo2, fopAcM_GetHomeRoomNo(this))))
|
||||
if ((mSwNo == 0xFF || fopAcM_isSwitch(this, mSwNo)) &&
|
||||
(mSwNo2 == 0xFF || !fopAcM_isSwitch(this, mSwNo2)))
|
||||
{
|
||||
if (mType != 0 || dComIfGp_getLinkPlayer()->checkWolf()) {
|
||||
dComIfGp_getLinkPlayer()->onSceneChangeDead(field_0x56a, fopAcM_GetRoomNo(this));
|
||||
if (mType != 0 || daPy_py_c::checkNowWolf()) {
|
||||
daPy_getLinkPlayerActorClass()->onSceneChangeDead(field_0x56a, fopAcM_GetRoomNo(this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ int daTagGuard_c::getAppearPoint(Vec* i_appearPnt) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*i_appearPnt = dPath_GetPnt(mPath, mPath->m_num - 1)->m_position;
|
||||
dPnt* pnt = dPath_GetPnt(mPath, mPath->m_num - 1);
|
||||
*i_appearPnt = pnt->m_position;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -21,8 +22,9 @@ void daTagGuard_c::createGuard(u32 i_parameters) {
|
||||
cXyz pos = current.pos;
|
||||
|
||||
if (getPathID() != 0xFF) {
|
||||
pos = dPath_GetPnt(mPath, 0)->m_position;
|
||||
i_parameters |= (getPathID() << 0x10);
|
||||
dPnt* pnt = dPath_GetPnt(mPath, 0);
|
||||
pos.set(pnt->m_position);
|
||||
i_parameters |= getPathID() << 0x10;
|
||||
}
|
||||
|
||||
fopAcM_createChild(PROC_NPC_GUARD, fopAcM_GetID(this), i_parameters, &pos,
|
||||
@@ -38,20 +40,31 @@ int daTagGuard_c::create() {
|
||||
void daTagGuard_c::create_init() {
|
||||
mPath = dPath_GetRoomPath(getPathID(), fopAcM_GetHomeRoomNo(this));
|
||||
|
||||
JUT_ASSERT(135, mPath != NULL);
|
||||
|
||||
dPnt* pnt1 = dPath_GetPnt(mPath, 0);
|
||||
dPnt* pnt2 = dPath_GetPnt(mPath, 1);
|
||||
|
||||
#if DEBUG
|
||||
current.pos.set(pnt1->m_position);
|
||||
#else
|
||||
//TODO: fakematch, using ::set causes a misplaced mr on GCN versions
|
||||
current.pos.x = pnt1->m_position.x;
|
||||
current.pos.y = pnt1->m_position.y;
|
||||
current.pos.z = pnt1->m_position.z;
|
||||
#endif
|
||||
|
||||
current.angle.y = cLib_targetAngleY(&pnt1->m_position, &pnt2->m_position);
|
||||
}
|
||||
|
||||
static int daTagGuard_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagGuard_c*>(i_this)->create();
|
||||
daTagGuard_c* guard = static_cast<daTagGuard_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return guard->create();
|
||||
}
|
||||
|
||||
static int daTagGuard_Delete(daTagGuard_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagGuard_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -25,12 +25,15 @@ int daTagHinit_c::create() {
|
||||
}
|
||||
|
||||
static int daTagHinit_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagHinit_c*>(i_this)->create();
|
||||
daTagHinit_c* hInit = static_cast<daTagHinit_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return hInit->create();
|
||||
}
|
||||
|
||||
daTagHinit_c::~daTagHinit_c() {}
|
||||
|
||||
static int daTagHinit_Delete(daTagHinit_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagHinit_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -11,8 +11,27 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/actor/d_a_horse.h"
|
||||
|
||||
class daTagHjump_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daTagHjump_HIO_c();
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
f32 depth;
|
||||
f32 height;
|
||||
};
|
||||
|
||||
static char const l_arcName[] = "Hfence";
|
||||
|
||||
#if DEBUG
|
||||
daTagHjump_HIO_c l_HIO;
|
||||
|
||||
void daTagHjump_HIO_c::genMessage(JORMContext* ctx) {
|
||||
ctx->genSlider("高さ", &height, 0.0f, 500.0f);
|
||||
ctx->genSlider("奥行き", &depth, 0.0f, 1000.0f);
|
||||
}
|
||||
#endif
|
||||
|
||||
int daTagHjump_c::CreateHeap() {
|
||||
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 4);
|
||||
mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
|
||||
@@ -43,7 +62,7 @@ int daTagHjump_c::create() {
|
||||
|
||||
if (phase == cPhs_COMPLEATE_e) {
|
||||
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
|
||||
tevStr.room_no = fopAcM_GetRoomNo(this);
|
||||
tevStr.room_no = (int)fopAcM_GetRoomNo(this);
|
||||
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
@@ -61,6 +80,11 @@ int daTagHjump_c::create() {
|
||||
fopAcM_SetMin(this, -scale.x, 0.0f, -50.0f);
|
||||
fopAcM_SetMax(this, scale.x, 200.0f, 50.0f);
|
||||
|
||||
#if DEBUG
|
||||
// "Horse jumping fence"
|
||||
l_HIO.entryHIO("馬ジャンプ柵");
|
||||
#endif
|
||||
|
||||
field_0x5ae = 0x2000;
|
||||
fopAcM_setCullSizeFar(this, 5.0f);
|
||||
field_0x5ad = 4;
|
||||
@@ -85,23 +109,41 @@ int daTagHjump_c::create() {
|
||||
return phase;
|
||||
}
|
||||
|
||||
daTagHjump_HIO_c::daTagHjump_HIO_c() {
|
||||
height = 350.0f;
|
||||
depth = 400.0f;
|
||||
}
|
||||
|
||||
static int daTagHjump_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagHjump_c*>(i_this)->create();
|
||||
daTagHjump_c* hJump = static_cast<daTagHjump_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return hJump->create();
|
||||
}
|
||||
|
||||
daTagHjump_c::~daTagHjump_c() {
|
||||
if (mType != TYPE_TRIGGER_e) {
|
||||
dComIfG_resDelete(&mPhase, l_arcName);
|
||||
|
||||
#if DEBUG
|
||||
l_HIO.removeHIO();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static int daTagHjump_Delete(daTagHjump_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->MoveBGDelete();
|
||||
i_this->~daTagHjump_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daTagHjump_c::execute() {
|
||||
#if DEBUG
|
||||
if (mType != 0) {
|
||||
scale.y = l_HIO.height;
|
||||
scale.z = l_HIO.depth;
|
||||
}
|
||||
#endif
|
||||
daHorse_c* horse_p = dComIfGp_getHorseActor();
|
||||
|
||||
if (horse_p != NULL &&
|
||||
|
||||
@@ -36,14 +36,16 @@ int daTag_Howl_c::draw() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 daTag_Howl_c::isAreaCheck() {
|
||||
bool daTag_Howl_c::isAreaCheck() {
|
||||
cXyz vec_to_player;
|
||||
|
||||
if (getSwitchBit() != 0xFF) {
|
||||
if (dComIfGs_isSaveSwitch(getSwitchBit())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
cXyz vec_to_player = daPy_getPlayerActorClass()->current.pos - current.pos;
|
||||
vec_to_player = daPy_getPlayerActorClass()->current.pos - current.pos;
|
||||
if (daPy_py_c::checkNowWolf()) {
|
||||
if (vec_to_player.absXZ() < scale.x && -scale.y < vec_to_player.y &&
|
||||
vec_to_player.y < scale.y)
|
||||
@@ -57,7 +59,7 @@ u8 daTag_Howl_c::isAreaCheck() {
|
||||
|
||||
int daTag_Howl_c::getParam() {
|
||||
mCurveID = fopAcM_GetParam(this) & 0xF;
|
||||
field_0x569 = fopAcM_GetParam(this) >> 0x1E;
|
||||
field_0x569 = (fopAcM_GetParam(this) & 0xC0000000) >> 30;
|
||||
scale.x *= 100.0f;
|
||||
scale.y *= 100.0f;
|
||||
scale.z *= 100.0f;
|
||||
@@ -65,7 +67,8 @@ int daTag_Howl_c::getParam() {
|
||||
}
|
||||
|
||||
u8 daTag_Howl_c::getSwitchBit() {
|
||||
return (fopAcM_GetParam(this) >> 4) & 0xFF;
|
||||
u8 param = (fopAcM_GetParam(this) & 0xFF0) >> 4;
|
||||
return param;
|
||||
}
|
||||
|
||||
static int daTag_Howl_Create(void* i_this) {
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "d/actor/d_a_tag_hstop.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "d/actor/d_a_horse.h"
|
||||
|
||||
int daTagHstop_c::create() {
|
||||
fopAcM_ct(this, daTagHstop_c);
|
||||
@@ -42,16 +44,16 @@ int daTagHstop_c::create() {
|
||||
|
||||
if (mPrm1 == 2) {
|
||||
if (daPy_py_c::checkRoomRestartStart()) {
|
||||
if (!dComIfGs_isSwitch(0x8A, fopAcM_GetHomeRoomNo(this))) {
|
||||
dComIfGs_onSwitch(0x8A, fopAcM_GetHomeRoomNo(this));
|
||||
} else if (!dComIfGs_isSwitch(0x8B, fopAcM_GetHomeRoomNo(this))) {
|
||||
dComIfGs_onSwitch(0x8B, fopAcM_GetHomeRoomNo(this));
|
||||
} else if (!dComIfGs_isSwitch(0x8C, fopAcM_GetHomeRoomNo(this))) {
|
||||
dComIfGs_onSwitch(0x8C, fopAcM_GetHomeRoomNo(this));
|
||||
if (!fopAcM_isSwitch(this, 0x8A)) {
|
||||
fopAcM_onSwitch(this, 0x8A);
|
||||
} else if (!fopAcM_isSwitch(this, 0x8B)) {
|
||||
fopAcM_onSwitch(this, 0x8B);
|
||||
} else if (!fopAcM_isSwitch(this, 0x8C)) {
|
||||
fopAcM_onSwitch(this, 0x8C);
|
||||
}
|
||||
}
|
||||
|
||||
if (dComIfGs_isSwitch(0x8C, fopAcM_GetHomeRoomNo(this))) {
|
||||
if (fopAcM_isSwitch(this, 0x8C)) {
|
||||
field_0x574 = 0;
|
||||
} else {
|
||||
field_0x574 = 1200;
|
||||
@@ -64,7 +66,9 @@ int daTagHstop_c::create() {
|
||||
}
|
||||
|
||||
static int daTagHstop_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagHstop_c*>(i_this)->create();
|
||||
daTagHstop_c* hStop = static_cast<daTagHstop_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return hStop->create();
|
||||
}
|
||||
|
||||
daTagHstop_c::~daTagHstop_c() {
|
||||
@@ -82,14 +86,15 @@ daTagHstop_c::~daTagHstop_c() {
|
||||
}
|
||||
|
||||
static int daTagHstop_Delete(daTagHstop_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
static_cast<daTagHstop_c*>(i_this)->~daTagHstop_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
void daTagHstop_c::setActive() {
|
||||
if (mPrm0 == 0xFF || mPrm1 == 2 ||
|
||||
(mPrm1 == 0 && dComIfGs_isSwitch(mPrm0, fopAcM_GetHomeRoomNo(this))) ||
|
||||
(mPrm1 == 1 && !dComIfGs_isSwitch(mPrm0, fopAcM_GetHomeRoomNo(this))))
|
||||
(mPrm1 == 0 && fopAcM_isSwitch(this, mPrm0)) ||
|
||||
(mPrm1 == 1 && !fopAcM_isSwitch(this, mPrm0)))
|
||||
{
|
||||
mActive = true;
|
||||
} else {
|
||||
@@ -105,19 +110,18 @@ int daTagHstop_c::execute() {
|
||||
m_msgFlow.init(this, (u16)shape_angle.z, 0, NULL);
|
||||
field_0x573 = 3;
|
||||
} else if (m_msgFlow.doFlow(this, NULL, 0)) {
|
||||
dComIfGp_getEvent()->reset();
|
||||
dComIfGp_event_reset();
|
||||
field_0x573 = 0;
|
||||
|
||||
s16 arrow_num = dComIfGp_getItemMaxArrowNumCount();
|
||||
dComIfGp_setItemArrowNumCount(arrow_num);
|
||||
dComIfGs_onSwitch(0x8D, fopAcM_GetHomeRoomNo(this));
|
||||
dComIfGp_setItemArrowNumCount(dComIfGp_getItemMaxArrowNumCount());
|
||||
fopAcM_onSwitch(this, 0x8D);
|
||||
}
|
||||
} else {
|
||||
if (field_0x574 != 0) {
|
||||
if (dComIfGs_isSwitch(0x8F, fopAcM_GetHomeRoomNo(this))) {
|
||||
if (fopAcM_isSwitch(this, 0x8F)) {
|
||||
field_0x574 = 0;
|
||||
} else if (dComIfGp_getLinkPlayer()->checkSingleBoarBattleSecondBowReady()) {
|
||||
dComIfGs_onSwitch(0x8F, fopAcM_GetHomeRoomNo(this));
|
||||
} else if (daPy_getLinkPlayerActorClass()->checkSingleBoarBattleSecondBowReady()) {
|
||||
fopAcM_onSwitch(this, 0x8F);
|
||||
field_0x574 = 0;
|
||||
} else {
|
||||
field_0x574--;
|
||||
@@ -127,35 +131,35 @@ int daTagHstop_c::execute() {
|
||||
setActive();
|
||||
|
||||
if (field_0x573) {
|
||||
daHorse_c* horse_p = dComIfGp_getHorseActor();
|
||||
daHorse_c* horse_p = (daHorse_c*)dComIfGp_getHorseActor();
|
||||
|
||||
if (mPrm1 != 2 || dComIfGs_getArrowNum() != 0 || horse_p == NULL) {
|
||||
field_0x573 = 0;
|
||||
} else if (field_0x573 == 1) {
|
||||
if (dComIfGp_getHorseActor()->checkTurnStand() &&
|
||||
!dComIfGp_getHorseActor()->checkTurnStandCamera())
|
||||
if (horse_p->checkTurnStand() &&
|
||||
!horse_p->checkTurnStandCamera())
|
||||
{
|
||||
field_0x573 = 2;
|
||||
}
|
||||
} else if (field_0x573 == 2 && !dComIfGp_getHorseActor()->checkTurnStand()) {
|
||||
} else if (field_0x573 == 2 && !horse_p->checkTurnStand()) {
|
||||
fopAcM_orderSpeakEvent(this, 0, 0);
|
||||
eventInfo.onCondition(dEvtCnd_CANTALK_e);
|
||||
}
|
||||
} else if (mPrm1 == 2 && !dComIfGp_event_runCheck()) {
|
||||
if (dComIfGs_getArrowNum() == 0 && !dComIfGs_isSwitch(0x8D, fopAcM_GetHomeRoomNo(this)))
|
||||
if (dComIfGs_getArrowNum() == 0 && !fopAcM_isSwitch(this, 0x8D))
|
||||
{
|
||||
dComIfGs_onSwitch(0x8D, fopAcM_GetHomeRoomNo(this));
|
||||
fopAcM_onSwitch(this, 0x8D);
|
||||
dMeter2Info_setFloatingFlow(43, 90, true);
|
||||
|
||||
if (!dComIfGs_isSwitch(0x8F, fopAcM_GetHomeRoomNo(this))) {
|
||||
if (!fopAcM_isSwitch(this, 0x8F)) {
|
||||
field_0x574 = 1200;
|
||||
dComIfGs_offSwitch(0x8A, fopAcM_GetHomeRoomNo(this));
|
||||
dComIfGs_offSwitch(0x8B, fopAcM_GetHomeRoomNo(this));
|
||||
dComIfGs_offSwitch(0x8C, fopAcM_GetHomeRoomNo(this));
|
||||
fopAcM_offSwitch(this, 0x8A);
|
||||
fopAcM_offSwitch(this, 0x8B);
|
||||
fopAcM_offSwitch(this, 0x8C);
|
||||
}
|
||||
} else if (field_0x574 == 0 && !dComIfGs_isSwitch(0x8F, fopAcM_GetHomeRoomNo(this))) {
|
||||
dComIfGs_onSwitch(0x8F, fopAcM_GetHomeRoomNo(this));
|
||||
dComIfGs_onSwitch(0x8E, fopAcM_GetHomeRoomNo(this));
|
||||
} else if (field_0x574 == 0 && !fopAcM_isSwitch(this, 0x8F)) {
|
||||
fopAcM_onSwitch(this, 0x8F);
|
||||
fopAcM_onSwitch(this, 0x8E);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,7 +171,31 @@ static int daTagHstop_Execute(daTagHstop_c* i_this) {
|
||||
return i_this->execute();
|
||||
}
|
||||
|
||||
static int daTagHstop_Draw(daTagHstop_c*) {
|
||||
static int daTagHstop_Draw(daTagHstop_c* i_this) {
|
||||
#if DEBUG
|
||||
if (UREG_S(9) != 0) {
|
||||
cXyz sp08[8];
|
||||
sp08[0].set(-i_this->scale.x, i_this->scale.y, -i_this->scale.z);
|
||||
sp08[1].set(i_this->scale.x, sp08[0].y, sp08[0].z);
|
||||
sp08[2].set(sp08[0].x, sp08[0].y, i_this->scale.z);
|
||||
sp08[3].set(sp08[1].x, sp08[0].y, sp08[2].z);
|
||||
sp08[4].set(sp08[0].x, 0.0f, sp08[0].z);
|
||||
sp08[5].set(sp08[1].x, 0.0f, sp08[1].z);
|
||||
sp08[6].set(sp08[2].x, 0.0f, sp08[2].z);
|
||||
sp08[7].set(sp08[3].x, 0.0f, sp08[3].z);
|
||||
|
||||
mDoMtx_stack_c::transS(i_this->current.pos);
|
||||
mDoMtx_stack_c::YrotM(i_this->shape_angle.y);
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
mDoMtx_stack_c::multVec(&sp08[i], &sp08[i]);
|
||||
}
|
||||
|
||||
static GXColor color = {0xff, 0, 0xff, 0x80};
|
||||
dDbVw_drawCube8pXlu(sp08, color);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,11 +9,13 @@
|
||||
#include "d/d_procname.h"
|
||||
|
||||
static int daTagInst_Create(fopAc_ac_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
fopAcM_ct(i_this, daTagInst_c);
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
static int daTagInst_Delete(daTagInst_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagInst_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_camera.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/d_msg_object.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
|
||||
@@ -28,7 +29,7 @@ int daTagKagoFall_c::create() {
|
||||
mExitID = 2;
|
||||
mStartPoint = 0;
|
||||
|
||||
mDoMtx_trans(mDoMtx_stack_c::get(), current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
mDoMtx_inverse(mDoMtx_stack_c::get(), mMtx);
|
||||
|
||||
@@ -84,7 +85,7 @@ void daTagKagoFall_c::actionWaitRiver() {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
mNoCarryTimer = 150;
|
||||
mNoCarryTimer = 150 + nREG_S(5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +100,7 @@ void daTagKagoFall_c::actionWaitRiver() {
|
||||
mRestartPos = dCam_getBody()->Eye();
|
||||
mActionState = 1;
|
||||
mTimer = 30;
|
||||
player->onNoResetFlg0(daPy_py_c::FLG0_UNK_10000);
|
||||
player->onDemoStreamAccept();
|
||||
mRiverTimer = 60;
|
||||
}
|
||||
}
|
||||
@@ -111,7 +112,7 @@ void daTagKagoFall_c::actionWaitRiver() {
|
||||
}
|
||||
|
||||
if (mRiverTimer == 0) {
|
||||
Z2GetAudioMgr()->seStart(Z2SE_FORCE_BACK, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
mDoAud_seStart(Z2SE_FORCE_BACK, NULL, 0, 0);
|
||||
mDoGph_gInf_c::fadeOut(0.05f, static_cast<JUtility::TColor&>(g_blackColor));
|
||||
mRiverTimer = 20;
|
||||
mActionState = 2;
|
||||
@@ -122,7 +123,7 @@ void daTagKagoFall_c::actionWaitRiver() {
|
||||
|
||||
case 2:
|
||||
if (mRiverTimer == 0) {
|
||||
daPy_getPlayerActorClass()->offNoResetFlg0(daPy_py_c::FLG0_UNK_10000);
|
||||
daPy_getPlayerActorClass()->offDemoStreamAccept();
|
||||
mActionState = 3;
|
||||
mTimer = 40;
|
||||
}
|
||||
@@ -136,25 +137,21 @@ void daTagKagoFall_c::actionWaitRiver() {
|
||||
}
|
||||
break;
|
||||
|
||||
case 4: {
|
||||
daPy_getPlayerActorClass()->offNoResetFlg0(daPy_py_c::FLG0_UNK_10000);
|
||||
case 4:
|
||||
daPy_getPlayerActorClass()->offDemoStreamAccept();
|
||||
|
||||
int msg = mMsgFlow.doFlow(this, NULL, 0);
|
||||
if (msg != 0) {
|
||||
if (mMsgFlow.doFlow(this, NULL, 0) != 0) {
|
||||
if (dMsgObject_getSelectCursorPos() != 0) {
|
||||
dStage_changeScene(mExitID, 0.0f, 0, fopAcM_GetRoomNo(this), 0, -1);
|
||||
} else {
|
||||
int room = dStage_roomControl_c::mStayNo;
|
||||
dComIfGp_setNextStage("F_SP112", mStartPoint, room, dComIfG_play_c::getLayerNo(0),
|
||||
0.0f, 10, 1, 0, 0, 1, 0);
|
||||
dComIfGp_setNextStage("F_SP112", mStartPoint, dComIfGp_roomControl_getStayNo(),
|
||||
dComIfG_play_c::getLayerNo(0), 0.0f, 10, 1, 0, 0, 1, 0);
|
||||
}
|
||||
mActionState = 5;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 5:
|
||||
// Maybe contained some stripped out debug code?
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -179,7 +176,7 @@ void daTagKagoFall_c::actionWaitFall() {
|
||||
mActionState = 1;
|
||||
}
|
||||
} else {
|
||||
mNoCarryTimer = 150;
|
||||
mNoCarryTimer = 150 + nREG_S(5);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -188,9 +185,8 @@ void daTagKagoFall_c::actionWaitFall() {
|
||||
if (dComIfGs_getLife() == 0) {
|
||||
player->onSceneChangeAreaJump(mExitID, -1, NULL);
|
||||
|
||||
if (player->checkNoResetFlg2(daPy_py_c::FLG2_SCENE_CHANGE_START) && !mPlayedSceneChangeSfx)
|
||||
{
|
||||
Z2GetAudioMgr()->seStart(Z2SE_FORCE_BACK, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
if (player->checkSceneChangeAreaStart() && !mPlayedSceneChangeSfx) {
|
||||
mDoAud_seStart(Z2SE_FORCE_BACK, NULL, 0, 0);
|
||||
player->voiceStart(Z2SE_WL_V_FALL_TO_RESTART);
|
||||
mPlayedSceneChangeSfx = true;
|
||||
}
|
||||
@@ -202,7 +198,7 @@ void daTagKagoFall_c::actionWaitFall() {
|
||||
mDoGph_gInf_c::fadeOut(0.05f, static_cast<JUtility::TColor&>(g_blackColor));
|
||||
mTimer = 60;
|
||||
mActionState = 2;
|
||||
Z2GetAudioMgr()->seStart(Z2SE_FORCE_BACK, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
mDoAud_seStart(Z2SE_FORCE_BACK, NULL, 0, 0);
|
||||
player->voiceStart(Z2SE_WL_V_FALL_TO_RESTART);
|
||||
}
|
||||
break;
|
||||
@@ -236,14 +232,12 @@ void daTagKagoFall_c::actionWaitFall() {
|
||||
|
||||
case 3: {
|
||||
player->setPlayerPosAndAngle(&mRestartPos, 0, 0);
|
||||
int msg = mMsgFlow.doFlow(this, NULL, 0);
|
||||
if (msg != 0) {
|
||||
if (mMsgFlow.doFlow(this, NULL, 0) != 0) {
|
||||
if (dMsgObject_getSelectCursorPos() != 0) {
|
||||
dStage_changeScene(mExitID, 0.0f, 0, fopAcM_GetRoomNo(this), 0, -1);
|
||||
} else {
|
||||
int room = dStage_roomControl_c::mStayNo;
|
||||
dComIfGp_setNextStage("F_SP112", mStartPoint, room, dComIfG_play_c::getLayerNo(0),
|
||||
0.0f, 10, 1, 0, 0, 1, 0);
|
||||
dComIfGp_setNextStage("F_SP112", mStartPoint, dComIfGp_roomControl_getStayNo(),
|
||||
dComIfG_play_c::getLayerNo(0), 0.0f, 10, 1, 0, 0, 1, 0);
|
||||
}
|
||||
mActionState = 10;
|
||||
}
|
||||
@@ -265,10 +259,12 @@ static int daTagKagoFall_Execute(daTagKagoFall_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTagKagoFall_Delete(daTagKagoFall_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
static int daTagKagoFall_Create(daTagKagoFall_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return i_this->create();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,21 +6,46 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_lantern.h"
|
||||
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
static TAG_LANTERN_HIO_CLASS l_HIO;
|
||||
|
||||
daTag_Lantern_HIOParam const daTag_Lantern_Param_c::m = {0};
|
||||
|
||||
#if DEBUG
|
||||
daTag_Lantern_HIO_c::daTag_Lantern_HIO_c() {
|
||||
m = daTag_Lantern_Param_c::m;
|
||||
}
|
||||
|
||||
void daTag_Lantern_HIO_c::listenPropertyEvent(const JORPropertyEvent* event) {
|
||||
// NONMATCHING
|
||||
JORReflexible::listenPropertyEvent(event);
|
||||
JORFile file;
|
||||
switch ((int)event->id) {
|
||||
case 0x40000002:
|
||||
if (file.open(JORFile::EFlags_WRITE | JORFile::EFlags_UNK_0x4, "すべてのファイル(*.*)\0*.*\0", NULL, NULL, NULL)) {
|
||||
char sp138[0x7d0];
|
||||
memset(sp138, 0, sizeof(sp138));
|
||||
int msgLen = 0;
|
||||
sprintf(sp138 + msgLen, "%d, \t// デバグ情報ON\n", m.enable_debug_info);
|
||||
msgLen = strlen(sp138);
|
||||
file.writeData(sp138, msgLen);
|
||||
file.close();
|
||||
OS_REPORT("write append success!::%6d\n", msgLen);
|
||||
} else {
|
||||
OS_REPORT("write append failure!\n");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void daTag_Lantern_HIO_c::genMessage(JORMContext* ctx) {
|
||||
// NONMATCHING
|
||||
// "Debug information ON"
|
||||
ctx->genCheckBox("デバグ情報ON ", &m.enable_debug_info, 1);
|
||||
// "Export file"
|
||||
ctx->genButton("ファイル書き出し", 0x40000002, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -39,6 +64,7 @@ int daTag_Lantern_c::create() {
|
||||
}
|
||||
|
||||
int daTag_Lantern_c::Delete() {
|
||||
fopAcM_RegisterDeleteID(this, "TAG_LANTERN");
|
||||
this->~daTag_Lantern_c();
|
||||
return 1;
|
||||
}
|
||||
@@ -80,12 +106,25 @@ int daTag_Lantern_c::Execute() {
|
||||
}
|
||||
|
||||
int daTag_Lantern_c::Draw() {
|
||||
#if DEBUG
|
||||
if (mpHIO->m.enable_debug_info) {
|
||||
dDbVw_drawCylinderXlu(current.pos, scale.x, scale.y,
|
||||
(GXColor){0x80, 0x80, 0x80, 0x80}, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void daTag_Lantern_c::initialize() {
|
||||
fopAcM_setCullSizeBox(this, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
#if DEBUG
|
||||
mpHIO = &l_HIO;
|
||||
// "Lantern check tag"
|
||||
mpHIO->entryHIO("カンテラチェックタグ");
|
||||
#endif
|
||||
|
||||
if (home.angle.z != 0xFFFF) {
|
||||
mFlowIndex = home.angle.z;
|
||||
} else {
|
||||
|
||||
@@ -17,7 +17,7 @@ void daTagLightBall_c::setBaseMtx() {
|
||||
|
||||
int daTagLightBall_c::Create() {
|
||||
initBaseMtx();
|
||||
u8 swbit = getSwBit();
|
||||
u8 swbit = getSwbit();
|
||||
if (fopAcM_GetRoomNo(this) == 7) {
|
||||
if (!fopAcM_isSwitch(this, 70)) {
|
||||
fopAcM_offSwitch(this, swbit);
|
||||
@@ -56,7 +56,7 @@ int daTagLightBall_c::create() {
|
||||
}
|
||||
|
||||
int daTagLightBall_c::execute() {
|
||||
u8 swbit = getSwBit();
|
||||
u8 swbit = getSwbit();
|
||||
if (swbit != 0xFF) {
|
||||
if (getType() == 15) {
|
||||
if (field_0x57c && !fopAcM_isSwitch(this, swbit)) {
|
||||
@@ -102,11 +102,14 @@ static int daTagLightBall_Execute(daTagLightBall_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTagLightBall_Delete(daTagLightBall_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
static int daTagLightBall_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagLightBall_c*>(i_this)->create();
|
||||
daTagLightBall_c* lightBall = static_cast<daTagLightBall_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return lightBall->create();
|
||||
}
|
||||
|
||||
static actor_method_class l_daTagLightBall_Method = {
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
int daTagLv2PrChk_c::Create() {
|
||||
mSwbit2 = getSwbit2();
|
||||
if (mSwbit2 == 0xFF) {
|
||||
// "Boomerang puzzle monitoring tag: switch 2 is not specified"
|
||||
OS_REPORT("\x1b[43;30mブーメランネタ監視タグ:スイッチ2の指定がありません\n\x1b[m");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -21,6 +23,9 @@ int daTagLv2PrChk_c::Create() {
|
||||
mAction = ACTION_CHECK_e;
|
||||
}
|
||||
|
||||
// "Boomerang puzzle monitoring tag: switch 1 <%d> switch 2 <%d>"
|
||||
OS_REPORT("ブーメランネタ監視タグ:スイッチ1<%d>スイッチ2<%d>\n", getSwbit(), getSwbit2());
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -120,6 +125,8 @@ void daTagLv2PrChk_c::actionCheck() {
|
||||
case MODE_PUZZLE_CLEAR:
|
||||
fopAcM_onSwitch(this, getSwbit());
|
||||
mAction = ACTION_END_e;
|
||||
// "Boomerang puzzle monitoring tag: SW<%d> was turned on"
|
||||
OS_REPORT("ブーメランネタ監視タグ:SW<%d>オンしました\n", getSwbit());
|
||||
break;
|
||||
case MODE_CHECK_RESET:
|
||||
if (!switch_1 && !switch_2 && !switch_3 && !switch_4) {
|
||||
@@ -151,6 +158,8 @@ void daTagLv2PrChk_c::actionEnd() {}
|
||||
|
||||
void daTagLv2PrChk_c::seStartWrong() {
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SYS_RESULT_WRONG, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
// "♪ Wrong answer!!!!"
|
||||
OS_REPORT("♪ハズレ!!!!\n");
|
||||
}
|
||||
|
||||
int daTagLv2PrChk_c::_delete() {
|
||||
@@ -162,10 +171,12 @@ static int daTagLv2PrChk_Execute(daTagLv2PrChk_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTagLv2PrChk_Delete(daTagLv2PrChk_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
static int daTagLv2PrChk_Create(daTagLv2PrChk_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return i_this->create();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@ int daTag_Lv5Soup_c::Draw() {
|
||||
}
|
||||
|
||||
bool daTag_Lv5Soup_c::isAreaCheck() {
|
||||
cXyz dist = daPy_getPlayerActorClass()->current.pos - current.pos;
|
||||
cXyz dist;
|
||||
dist = daPy_getPlayerActorClass()->current.pos - current.pos;
|
||||
f32 boundX = scale.x * 100.0f;
|
||||
f32 boundY = scale.y * 100.0f;
|
||||
|
||||
|
||||
@@ -6,12 +6,23 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_lv6CstaSw.h"
|
||||
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
static daLv6CstaSw_HIO_c l_HIO;
|
||||
|
||||
daLv6CstaSw_HIO_c::daLv6CstaSw_HIO_c() {
|
||||
unk_0x4 = 0;
|
||||
show_range = 0;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
void daLv6CstaSw_HIO_c::genMessage(JORMContext* ctx) {
|
||||
// "Display range"
|
||||
ctx->genCheckBox("範囲表示", &show_range, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
void daLv6CstaSw_c::setBaseMtx() {
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle.x, shape_angle.y, shape_angle.z);
|
||||
@@ -21,12 +32,19 @@ int daLv6CstaSw_c::create() {
|
||||
fopAcM_ct(this, daLv6CstaSw_c);
|
||||
mSwitch = getSw();
|
||||
setBaseMtx();
|
||||
|
||||
#if DEBUG
|
||||
l_HIO.entryHIO("石像SWタグ");
|
||||
#endif
|
||||
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
fopAc_ac_c* daLv6CstaSw_c::searchSekizoAct(void* i_actor, void*) {
|
||||
if (i_actor != NULL && fopAcM_IsActor(i_actor) && fopAcM_GetProfName(i_actor) == PROC_CSTATUE) {
|
||||
return (fopAc_ac_c*)i_actor;
|
||||
fopAc_ac_c* daLv6CstaSw_c::searchSekizoAct(void* i_actor, void* param_1) {
|
||||
fopAc_ac_c* actor2 = (fopAc_ac_c*)param_1;
|
||||
fopAc_ac_c* actor = (fopAc_ac_c*)i_actor;
|
||||
if (actor != NULL && fopAcM_IsActor(actor) && fopAcM_GetProfName(actor) == PROC_CSTATUE) {
|
||||
return actor;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -41,7 +59,8 @@ bool daLv6CstaSw_c::areaCheck() {
|
||||
}
|
||||
|
||||
cXyz vec_to_actor = current.pos - sekizo_p->current.pos;
|
||||
if (vec_to_actor.absXZ() <= scale.x * 100.0f) {
|
||||
f32 dist_to_actor = vec_to_actor.absXZ();
|
||||
if (dist_to_actor <= scale.x * 100.0f) {
|
||||
in_area = true;
|
||||
}
|
||||
|
||||
@@ -49,7 +68,8 @@ bool daLv6CstaSw_c::areaCheck() {
|
||||
}
|
||||
|
||||
int daLv6CstaSw_c::Execute() {
|
||||
if (areaCheck() == true) {
|
||||
bool result = areaCheck();
|
||||
if (result == true) {
|
||||
if (!fopAcM_isSwitch(this, mSwitch)) {
|
||||
fopAcM_onSwitch(this, mSwitch);
|
||||
}
|
||||
@@ -63,10 +83,22 @@ int daLv6CstaSw_c::Execute() {
|
||||
}
|
||||
|
||||
int daLv6CstaSw_c::Draw() {
|
||||
#if DEBUG
|
||||
if (l_HIO.show_range) {
|
||||
g_env_light.settingTevStruct(16, ¤t.pos, &tevStr);
|
||||
GXColor color = (GXColor){0, 0, 0xff, 0x80};
|
||||
dDbVw_drawCylinderXlu(current.pos, scale.x * 100.0f, scale.y * 100.0f, color, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daLv6CstaSw_c::Delete() {
|
||||
#if DEBUG
|
||||
l_HIO.removeHIO();
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -79,17 +111,16 @@ static int daLv6CstaSw_Execute(daLv6CstaSw_c* i_this) {
|
||||
}
|
||||
|
||||
static int daLv6CstaSw_Delete(daLv6CstaSw_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return i_this->Delete();
|
||||
}
|
||||
|
||||
static int daLv6CstaSw_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daLv6CstaSw_c*>(i_this)->create();
|
||||
daLv6CstaSw_c* cStaSw = static_cast<daLv6CstaSw_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return cStaSw->create();
|
||||
}
|
||||
|
||||
daLv6CstaSw_HIO_c::~daLv6CstaSw_HIO_c() {}
|
||||
|
||||
static daLv6CstaSw_HIO_c l_HIO;
|
||||
|
||||
static actor_method_class l_daLv6CstaSw_Method = {
|
||||
(process_method_func)daLv6CstaSw_Create, (process_method_func)daLv6CstaSw_Delete,
|
||||
(process_method_func)daLv6CstaSw_Execute, (process_method_func)NULL,
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
int daTagMagne_c::Create() {
|
||||
if (mTagMagne != NULL) {
|
||||
// "Multiple magnet cord(?) management tags are placed!"
|
||||
OS_REPORT_ERROR("マグネコード管理タグが複数置かれています!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -24,7 +26,7 @@ int daTagMagne_c::Create() {
|
||||
int daTagMagne_c::create() {
|
||||
fopAcM_ct(this, daTagMagne_c);
|
||||
|
||||
if (mTagMagne != NULL && mTagMagne->current.roomNo != current.roomNo) {
|
||||
if (mTagMagne != NULL && fopAcM_GetRoomNo(mTagMagne) != fopAcM_GetRoomNo(this)) {
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
|
||||
@@ -32,6 +34,8 @@ int daTagMagne_c::create() {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
OS_REPORT("TAG MAGNE PARAM=%x\n", fopAcM_GetParam(this));
|
||||
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
@@ -41,11 +45,14 @@ int daTagMagne_c::_delete() {
|
||||
}
|
||||
|
||||
static void daTagMagne_Delete(daTagMagne_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->_delete();
|
||||
}
|
||||
|
||||
static void daTagMagne_Create(fopAc_ac_c* i_this) {
|
||||
((daTagMagne_c*)i_this)->create();
|
||||
daTagMagne_c* magne = static_cast<daTagMagne_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
magne->create();
|
||||
}
|
||||
|
||||
static actor_method_class l_daTagMagne_Method = {
|
||||
|
||||
@@ -64,12 +64,15 @@ int daTagMhint_c::create() {
|
||||
}
|
||||
|
||||
static int daTagMhint_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagMhint_c*>(i_this)->create();
|
||||
daTagMhint_c* mhint = static_cast<daTagMhint_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return mhint->create();
|
||||
}
|
||||
|
||||
daTagMhint_c::~daTagMhint_c() {}
|
||||
|
||||
static int daTagMhint_Delete(daTagMhint_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagMhint_c();
|
||||
return 1;
|
||||
}
|
||||
@@ -132,13 +135,14 @@ int daTagMhint_c::execute() {
|
||||
} else if (eventInfo.checkCommandTalk()) {
|
||||
if (!midna_p->checkShadowModeTalkWait()) {
|
||||
if (field_0x56e == 0) {
|
||||
mMsgFlow.init(this, shape_angle.z & 0xFFFF, 0, NULL);
|
||||
mMsgFlow.init(this, (u16)shape_angle.z, 0, NULL);
|
||||
field_0x56e = 1;
|
||||
mDoAud_seStart(Z2SE_NAVI_TALK_START, NULL, 0, 0);
|
||||
field_0x571 = 0;
|
||||
} else if (mMsgFlow.doFlow(this, NULL, 0)) {
|
||||
int sp28;
|
||||
if (mMsgFlow.getEventId(&sp28) == 7) {
|
||||
u16 eventId = mMsgFlow.getEventId(&sp28);
|
||||
if (eventId == 7) {
|
||||
dMeter2Info_setPauseStatus(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,14 +7,37 @@
|
||||
|
||||
#include "d/actor/d_a_tag_mist.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
void daTagMist_c::offSw() {
|
||||
u8 sw_no_num;
|
||||
u8 top_sw_no;
|
||||
class daTagMist_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daTagMist_HIO_c();
|
||||
|
||||
top_sw_no = daTagMist_prm::getTopSwNo(this);
|
||||
sw_no_num = daTagMist_prm::getSwNoNum(this);
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
u8 show_range;
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
daTagMist_HIO_c l_HIO;
|
||||
|
||||
daTagMist_HIO_c::daTagMist_HIO_c() {
|
||||
show_range = 0;
|
||||
}
|
||||
|
||||
void daTagMist_HIO_c::genMessage(JORMContext* ctx) {
|
||||
// "Fog range tag"
|
||||
ctx->genLabel("霧の範囲タグ", 0);
|
||||
// "Show range"
|
||||
ctx->genCheckBox("範囲表示", &show_range, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
void daTagMist_c::offSw() {
|
||||
u8 top_sw_no = daTagMist_prm::getTopSwNo(this);
|
||||
u8 my_sw_no = daTagMist_prm::getMySwNo(this);
|
||||
u8 sw_no_num = daTagMist_prm::getSwNoNum(this);
|
||||
|
||||
for (int i = 0; i < sw_no_num; i++) {
|
||||
fopAcM_offSwitch(this, top_sw_no + i);
|
||||
@@ -22,11 +45,8 @@ void daTagMist_c::offSw() {
|
||||
}
|
||||
|
||||
void daTagMist_c::onMySw() {
|
||||
u32 my_sw_no;
|
||||
u32 top_sw_no;
|
||||
|
||||
top_sw_no = daTagMist_prm::getTopSwNo(this);
|
||||
my_sw_no = daTagMist_prm::getMySwNo(this);
|
||||
u8 top_sw_no = daTagMist_prm::getTopSwNo(this);
|
||||
u8 my_sw_no = daTagMist_prm::getMySwNo(this);
|
||||
|
||||
if (my_sw_no != 0xFF) {
|
||||
fopAcM_onSwitch(this, top_sw_no + my_sw_no);
|
||||
@@ -34,11 +54,8 @@ void daTagMist_c::onMySw() {
|
||||
}
|
||||
|
||||
BOOL daTagMist_c::isMySw() {
|
||||
u32 my_sw_no;
|
||||
u32 top_sw_no;
|
||||
|
||||
top_sw_no = daTagMist_prm::getTopSwNo(this);
|
||||
my_sw_no = daTagMist_prm::getMySwNo(this);
|
||||
u8 top_sw_no = daTagMist_prm::getTopSwNo(this);
|
||||
u8 my_sw_no = daTagMist_prm::getMySwNo(this);
|
||||
|
||||
if (my_sw_no != 0xFF && fopAcM_isSwitch(this, top_sw_no + my_sw_no)) {
|
||||
return TRUE;
|
||||
@@ -60,10 +77,7 @@ int daTagMist_c::Create() {
|
||||
mVertices[3].x = scale.x * -50.0f;
|
||||
mVertices[3].z = scale.z * 50.0f;
|
||||
|
||||
mVertices[3].y = 0.0f;
|
||||
mVertices[2].y = 0.0f;
|
||||
mVertices[1].y = 0.0f;
|
||||
mVertices[0].y = 0.0f;
|
||||
mVertices[0].y = mVertices[1].y = mVertices[2].y = mVertices[3].y = 0.0f;
|
||||
|
||||
if (isMySw()) {
|
||||
setPlayerNo(daTagMist_prm::getExitNo(this));
|
||||
@@ -82,23 +96,26 @@ int daTagMist_c::create() {
|
||||
field_0x5a2 = home.angle.x;
|
||||
field_0x5a4 = home.angle.z;
|
||||
|
||||
home.angle.z = 0;
|
||||
home.angle.x = 0;
|
||||
current.angle.z = 0;
|
||||
current.angle.x = 0;
|
||||
shape_angle.z = 0;
|
||||
shape_angle.x = 0;
|
||||
home.angle.x = home.angle.z = 0;
|
||||
current.angle.x = current.angle.z = 0;
|
||||
shape_angle.x = shape_angle.z = 0;
|
||||
}
|
||||
|
||||
if (!Create()) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
// "Fog range tag"
|
||||
l_HIO.entryHIO("霧の範囲タグ");
|
||||
#endif
|
||||
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
int daTagMist_c::execute() {
|
||||
if (fopAcM_isSwitch(this, daTagMist_prm::getSwNo2(this))) {
|
||||
u8 sw_no_2 = daTagMist_prm::getSwNo2(this);
|
||||
if (fopAcM_isSwitch(this, sw_no_2)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -109,33 +126,76 @@ int daTagMist_c::execute() {
|
||||
mDoMtx_stack_c::YrotS(-current.angle.y);
|
||||
mDoMtx_stack_c::multVec(&player_dist, &player_dist);
|
||||
|
||||
u8 player_inside = (mVertices[0].x < player_dist.x && mVertices[0].z < player_dist.z) &&
|
||||
(mVertices[2].x > player_dist.x && mVertices[2].z > player_dist.z);
|
||||
u8 player_inside = mVertices[0].x < player_dist.x && mVertices[0].z < player_dist.z &&
|
||||
mVertices[2].x > player_dist.x && mVertices[2].z > player_dist.z;
|
||||
|
||||
if (player_inside && !mPlayerTouched) {
|
||||
offSw();
|
||||
onMySw();
|
||||
mPlayerNo = daTagMist_prm::getExitNo(this);
|
||||
setPlayerNo(daTagMist_prm::getExitNo(this));
|
||||
}
|
||||
|
||||
mPlayerTouched = player_inside;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daTagMist_c::_delete() {
|
||||
int daTagMist_c::draw() {
|
||||
#if DEBUG
|
||||
if (l_HIO.show_range) {
|
||||
GXColor color = {0, 0, 0x80, 0x80};
|
||||
cXyz sp10[8];
|
||||
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(current.angle.y);
|
||||
|
||||
sp10[0] = mVertices[0];
|
||||
sp10[1] = mVertices[1];
|
||||
sp10[2] = mVertices[3];
|
||||
sp10[3] = mVertices[2];
|
||||
sp10[4] = mVertices[0];
|
||||
sp10[5] = mVertices[1];
|
||||
sp10[6] = mVertices[3];
|
||||
sp10[7] = mVertices[2];
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
mDoMtx_stack_c::multVec(&sp10[i], &sp10[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
sp10[i].y += 1000.0f;
|
||||
}
|
||||
|
||||
dDbVw_drawCube8pXlu(sp10, color);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daTagMist_c::_delete() {
|
||||
#if DEBUG
|
||||
l_HIO.removeHIO();
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daTagMist_Draw(daTagMist_c* i_this) {
|
||||
return i_this->draw();
|
||||
}
|
||||
|
||||
static int daTagMist_Execute(daTagMist_c* i_this) {
|
||||
return i_this->execute();
|
||||
}
|
||||
|
||||
static int daTagMist_Delete(daTagMist_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
static int daTagMist_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagMist_c*>(i_this)->create();
|
||||
daTagMist_c* mist = static_cast<daTagMist_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return mist->create();
|
||||
}
|
||||
|
||||
static actor_method_class l_daTagMist_Method = {
|
||||
@@ -143,7 +203,11 @@ static actor_method_class l_daTagMist_Method = {
|
||||
(process_method_func)daTagMist_Delete,
|
||||
(process_method_func)daTagMist_Execute,
|
||||
(process_method_func)NULL,
|
||||
#if DEBUG
|
||||
(process_method_func)daTagMist_Draw,
|
||||
#else
|
||||
(process_method_func)NULL,
|
||||
#endif
|
||||
};
|
||||
|
||||
actor_process_profile_definition g_profile_Tag_Mist = {
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
int daTagMmsg_c::create() {
|
||||
fopAcM_ct(this, daTagMmsg_c);
|
||||
|
||||
field_0x570 = fpcM_GetParam(this) & 0x3FF;
|
||||
field_0x572 = (fpcM_GetParam(this) >> 10) & 0x3FF;
|
||||
field_0x56b = (fpcM_GetParam(this) >> 29) & 1;
|
||||
field_0x570 = fopAcM_GetParam(this) & 0x3FF;
|
||||
field_0x572 = (fopAcM_GetParam(this) >> 10) & 0x3FF;
|
||||
field_0x56b = (fopAcM_GetParam(this) >> 29) & 0x1;
|
||||
field_0x568 = shape_angle.x;
|
||||
field_0x569 = (shape_angle.x >> 8) & 0xFF;
|
||||
|
||||
if ((fpcM_GetParam(this) >> 30) & 1) {
|
||||
if ((fopAcM_GetParam(this) >> 30) & 0x1) {
|
||||
scale.x *= 10.0f;
|
||||
scale.y *= 10.0f;
|
||||
}
|
||||
@@ -24,10 +24,9 @@ int daTagMmsg_c::create() {
|
||||
mAttention = shape_angle.y;
|
||||
|
||||
if (!checkNoAttention()) {
|
||||
s32 roomNo = fopAcM_GetRoomNo(this);
|
||||
stage_arrow_data_class* arrowData =
|
||||
&dComIfGp_getRoomArrow(roomNo)
|
||||
->m_entries[dComIfGp_getRoomCamera(roomNo)->m_entries[mAttention].m_arrow_idx];
|
||||
&dComIfGp_getRoomArrow(fopAcM_GetRoomNo(this))
|
||||
->m_entries[dComIfGp_getRoomCamera(fopAcM_GetRoomNo(this))->m_entries[mAttention].m_arrow_idx];
|
||||
eyePos.set(arrowData->posX, arrowData->posY, arrowData->posZ);
|
||||
attention_info.position = eyePos;
|
||||
}
|
||||
@@ -37,18 +36,22 @@ int daTagMmsg_c::create() {
|
||||
}
|
||||
|
||||
static int daTagMmsg_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagMmsg_c*>(i_this)->create();
|
||||
daTagMmsg_c* mmsg = static_cast<daTagMmsg_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return mmsg->create();
|
||||
}
|
||||
|
||||
daTagMmsg_c::~daTagMmsg_c() {}
|
||||
|
||||
static int daTagMmsg_Delete(daTagMmsg_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagMmsg_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daTagMmsg_c::execute() {
|
||||
if (daPy_py_c::getMidnaActor() == NULL) {
|
||||
daMidna_c* midna = daPy_py_c::getMidnaActor();
|
||||
if (midna == NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -57,13 +60,13 @@ int daTagMmsg_c::execute() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (field_0x569 != 0xFF && dComIfGs_isSwitch(field_0x569, fopAcM_GetHomeRoomNo(this))) {
|
||||
if (field_0x569 != 0xFF && fopAcM_isSwitch(this, field_0x569)) {
|
||||
fopAcM_delete(this);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (mUseFlg && !dComIfGp_event_runCheck() && field_0x56b && field_0x569 != 0xFF) {
|
||||
dComIfGs_onSwitch(field_0x569, fopAcM_GetHomeRoomNo(this));
|
||||
fopAcM_onSwitch(this, field_0x569);
|
||||
fopAcM_delete(this);
|
||||
return 1;
|
||||
}
|
||||
@@ -73,7 +76,7 @@ int daTagMmsg_c::execute() {
|
||||
(fopAcM_searchPlayerDistanceXZ2(this) < field_0x574) &&
|
||||
(field_0x570 == 0x3FF ||
|
||||
dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[field_0x570])) &&
|
||||
(field_0x568 == 0xFF || dComIfGs_isSwitch(field_0x568, fopAcM_GetHomeRoomNo(this))))
|
||||
(field_0x568 == 0xFF || fopAcM_isSwitch(this, field_0x568)))
|
||||
{
|
||||
player->setMidnaMsgNum(this, shape_angle.z);
|
||||
}
|
||||
|
||||
+52
-15
@@ -5,12 +5,14 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_msg.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/actor/d_a_tag_msg.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
|
||||
static int createHeapCallBack(fopAc_ac_c* i_this) {
|
||||
return ((daTag_Msg_c*)i_this)->createHeap();
|
||||
daTag_Msg_c* msg = (daTag_Msg_c*)i_this;
|
||||
return msg->createHeap();
|
||||
}
|
||||
|
||||
static char* l_resName = "TagMsg";
|
||||
@@ -20,8 +22,20 @@ static char* l_evtNameTBL[2] = {
|
||||
"SPEAK",
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
daTag_Msg_HIO_c::daTag_Msg_HIO_c() {
|
||||
m = daTag_Msg_Param_c::m;
|
||||
}
|
||||
#endif
|
||||
|
||||
daTag_Msg_c::~daTag_Msg_c() {
|
||||
dComIfG_resDelete(&mPhase, getResName());
|
||||
|
||||
#if DEBUG
|
||||
if (mpHIO != NULL) {
|
||||
mDoHIO_deleteChild(mpHIO->mChild);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int daTag_Msg_c::create() {
|
||||
@@ -38,14 +52,18 @@ int daTag_Msg_c::create() {
|
||||
if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x10)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
mpHIO->mChild = mDoHIO_createChild("メッセ-ジタグ", mpHIO);
|
||||
#endif
|
||||
}
|
||||
|
||||
return phase_state;
|
||||
}
|
||||
|
||||
int daTag_Msg_c::createHeap() {
|
||||
mParam = new daTag_Msg_Param_c();
|
||||
if (mParam == NULL) {
|
||||
mpHIO = new TAG_MSG_HIO_CLASS();
|
||||
if (mpHIO == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -53,6 +71,7 @@ int daTag_Msg_c::createHeap() {
|
||||
}
|
||||
|
||||
int daTag_Msg_c::destroy() {
|
||||
int id = fopAcM_GetID(this);
|
||||
this->~daTag_Msg_c();
|
||||
return 1;
|
||||
}
|
||||
@@ -128,6 +147,14 @@ int daTag_Msg_c::execute() {
|
||||
}
|
||||
|
||||
int daTag_Msg_c::draw() {
|
||||
#if DEBUG
|
||||
if (mpHIO->m.mDebugAdjustON) {
|
||||
cXyz sp0C(current.pos);
|
||||
sp0C.y -= scale.y;
|
||||
dDbVw_drawCylinderXlu(sp0C, scale.x, 2.0f * scale.y, (GXColor){0x80, 0x80, 0x80, 0x80}, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -159,15 +186,15 @@ BOOL daTag_Msg_c::otherCheck() {
|
||||
|
||||
if (field_0x5dd) {
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
s16 var_r28 = fopAcM_searchActorAngleY(this, daPy_getPlayerActorClass()) + 0x7FFF;
|
||||
s16 angle_to_player = var_r28 - daPy_getPlayerActorClass()->current.angle.y;
|
||||
if (angle_to_player < 0) {
|
||||
angle_to_player = -angle_to_player;
|
||||
}
|
||||
|
||||
s16 var_r28 = fopAcM_searchActorAngleY(this, daPy_getPlayerActorClass()) + 0x7FFF;
|
||||
s16 angle_to_player = var_r28 - daPy_getPlayerActorClass()->current.angle.y;
|
||||
if (angle_to_player < 0) {
|
||||
angle_to_player = -angle_to_player;
|
||||
return angle_to_player <= 0x1000;
|
||||
}
|
||||
|
||||
return angle_to_player <= 0x1000;
|
||||
}
|
||||
|
||||
char* daTag_Msg_c::getResName() {
|
||||
@@ -176,14 +203,15 @@ char* daTag_Msg_c::getResName() {
|
||||
|
||||
void daTag_Msg_c::getParam() {
|
||||
mOnSwitch = home.angle.x & 0xFF;
|
||||
mOffSwitch = (home.angle.x >> 8) & 0xFF;
|
||||
mOffSwitch = (home.angle.x & 0xFF00) >> 8;
|
||||
mOnSaveLabel = fopAcM_GetParam(this) & 0xFFF;
|
||||
mOffSaveLabel = (fopAcM_GetParam(this) >> 0xC) & 0xFFF;
|
||||
mOffSaveLabel = (fopAcM_GetParam(this) & 0xFFF000) >> 12;
|
||||
field_0x5dc = (fopAcM_GetParam(this) & 0x1000000) != 0;
|
||||
field_0x5dd = (fopAcM_GetParam(this) & 0x2000000) != 0;
|
||||
|
||||
if ((home.angle.z & 0xFFFF) != 0) {
|
||||
mFlowID = home.angle.z & 0xFFFF;
|
||||
u16 var_r30 = (u16)home.angle.z;
|
||||
if (var_r30 != 0) {
|
||||
mFlowID = var_r30;
|
||||
} else {
|
||||
mFlowID = -1;
|
||||
}
|
||||
@@ -227,6 +255,15 @@ static int daTag_Msg_IsDelete(void* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
daTag_Msg_HIO_c::~daTag_Msg_HIO_c() {
|
||||
}
|
||||
|
||||
void daTag_Msg_HIO_c::genMessage(JORMContext* ctx) {
|
||||
ctx->genCheckBox("デバグ描画ON ", &m.mDebugAdjustON, 1, 0, NULL, -1, -1, 0x200, 0x18);
|
||||
}
|
||||
#endif
|
||||
|
||||
void dummyString() {
|
||||
DEAD_STRING("Timer");
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
int daTagMstop_c::create() {
|
||||
fopAcM_ct(this, daTagMstop_c);
|
||||
|
||||
field_0x56b = fopAcM_GetParam(this) >> 16;
|
||||
field_0x56b = (fopAcM_GetParam(this) >> 16) & 0xFF;
|
||||
field_0x56a = (fopAcM_GetParam(this) >> 24) & 0xF;
|
||||
|
||||
if (field_0x56a == 1 || field_0x56a == 2) {
|
||||
@@ -40,23 +40,17 @@ int daTagMstop_c::create() {
|
||||
field_0x572 = 0xFFFF;
|
||||
}
|
||||
|
||||
f32 tmp = scale.x;
|
||||
tmp *= 10000.0f * scale.x;
|
||||
|
||||
field_0x5c0 = tmp;
|
||||
field_0x5c0 = scale.x * (scale.x * 10000.0f);
|
||||
field_0x5c4 = current.pos.y + scale.y * 100.0f;
|
||||
|
||||
u16 param = fopAcM_GetParam(this);
|
||||
csXyz pos_angle;
|
||||
|
||||
daNpcF_getPlayerInfoFromPlayerList(fopAcM_GetParam(this) & 0xFFFF, fopAcM_GetRoomNo(this),
|
||||
field_0x5c8, pos_angle);
|
||||
|
||||
u8 idx = field_0x56b;
|
||||
daNpcF_getPlayerInfoFromPlayerList(param, fopAcM_GetRoomNo(this), field_0x5c8, pos_angle);
|
||||
|
||||
if (!checkNoAttention()) {
|
||||
s32 room = fopAcM_GetRoomNo(this);
|
||||
stage_arrow_data_class* arrowData = &dComIfGp_getRoomArrow(room)
|
||||
->m_entries[dComIfGp_getRoomCamera(room)->m_entries[idx].m_arrow_idx];
|
||||
stage_arrow_data_class* arrowData = &dComIfGp_getRoomArrow(fopAcM_GetRoomNo(this))->
|
||||
m_entries[dComIfGp_getRoomCamera(fopAcM_GetRoomNo(this))->
|
||||
m_entries[field_0x56b].m_arrow_idx];
|
||||
|
||||
eyePos.set(arrowData->posX, arrowData->posY, arrowData->posZ);
|
||||
attention_info.position = eyePos;
|
||||
@@ -67,12 +61,15 @@ int daTagMstop_c::create() {
|
||||
}
|
||||
|
||||
static int daTagMstop_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagMstop_c*>(i_this)->create();
|
||||
daTagMstop_c* mstop = static_cast<daTagMstop_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return mstop->create();
|
||||
}
|
||||
|
||||
daTagMstop_c::~daTagMstop_c() {}
|
||||
|
||||
static int daTagMstop_Delete(daTagMstop_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagMstop_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
int daTagMwait_c::create() {
|
||||
fopAcM_ct(this, daTagMwait_c);
|
||||
|
||||
mEnterSw = fopAcM_GetParam(this) >> 8;
|
||||
mEnterSw = (fopAcM_GetParam(this) >> 8) & 0xFF;
|
||||
|
||||
if (fopAcM_isSwitch(this, mEnterSw)) {
|
||||
return cPhs_ERROR_e;
|
||||
@@ -39,12 +39,12 @@ int daTagMwait_c::create() {
|
||||
|
||||
scale *= 100.0f;
|
||||
|
||||
u32 wait_y_offset = (fopAcM_GetParam(this) >> 0x18) & 0xFF;
|
||||
if (wait_y_offset == 0 || wait_y_offset == 0xFF) {
|
||||
wait_y_offset = 0;
|
||||
prm = (fopAcM_GetParam(this) >> 0x18) & 0xFF; // wait Y offset
|
||||
if (prm == 0 || prm == 0xFF) {
|
||||
prm = 0;
|
||||
}
|
||||
|
||||
mWaitPosition.set(current.pos.x, current.pos.y + (wait_y_offset * 10.0f), current.pos.z);
|
||||
mWaitPosition.set(current.pos.x, current.pos.y + (prm * 10.0f), current.pos.z);
|
||||
attention_info.position.set(mWaitPosition.x, mWaitPosition.y + 220.0f, mWaitPosition.z);
|
||||
eyePos.set(mWaitPosition.x, mWaitPosition.y + 150.0f, mWaitPosition.z);
|
||||
|
||||
@@ -54,12 +54,15 @@ int daTagMwait_c::create() {
|
||||
}
|
||||
|
||||
static int daTagMwait_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagMwait_c*>(i_this)->create();
|
||||
daTagMwait_c* mWait = static_cast<daTagMwait_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return mWait->create();
|
||||
}
|
||||
|
||||
daTagMwait_c::~daTagMwait_c() {}
|
||||
|
||||
static int daTagMwait_Delete(daTagMwait_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagMwait_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/actor/d_a_tag_myna2.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
@@ -17,27 +18,25 @@ s32 daTagMyna2_c::create() {
|
||||
}
|
||||
|
||||
s32 daTagMyna2_c::execute() {
|
||||
if (!dComIfGp_event_runCheck()) {
|
||||
if (!dComIfGs_isSwitch(mSwitchNo,fopAcM_GetRoomNo(this))) {
|
||||
if ((dComIfGp_getPlayer(0)->current.pos - current.pos).absXZ() < getExtent()) {
|
||||
s16 angle_y = (s16)fopAcM_searchPlayerAngleY(this);
|
||||
csXyz actor_angle(0x1e,angle_y,0);
|
||||
cXyz actor_pos = current.pos;
|
||||
actor_pos.y += 1000.0f;
|
||||
if (!dComIfGp_event_runCheck() &&
|
||||
!dComIfGs_isSwitch(mSwitchNo,fopAcM_GetRoomNo(this)) &&
|
||||
(daPy_getPlayerActorClass()->current.pos - current.pos).absXZ() < getExtent()) {
|
||||
csXyz actor_angle(30, (s16)fopAcM_searchPlayerAngleY(this), 0);
|
||||
cXyz actor_pos = current.pos;
|
||||
actor_pos.y += 1000.0f;
|
||||
|
||||
if (fopAcM_gc_c::gndCheck(&actor_pos) != 0) {
|
||||
actor_pos.y = fopAcM_gc_c::getGroundY();
|
||||
} else {
|
||||
actor_pos = current.pos;
|
||||
}
|
||||
if (fopAcM_gc_c::gndCheck(&actor_pos) != 0) {
|
||||
actor_pos.y = fopAcM_gc_c::getGroundY();
|
||||
} else {
|
||||
actor_pos = current.pos;
|
||||
}
|
||||
|
||||
if (mTimer == 0) {
|
||||
s32 actor_create = fopAcM_create(PROC_MYNA2, (mSwitchNo << 8 | 0xffff0001), &actor_pos, fopAcM_GetRoomNo(this), &actor_angle, 0, 0xffffffff);
|
||||
|
||||
if (actor_create != 0xFFFFFFFF) {
|
||||
dComIfGs_onSwitch(mSwitchNo,fopAcM_GetRoomNo(this));
|
||||
}
|
||||
}
|
||||
u32 var_r29 = 0xffff0001;
|
||||
if (mTimer == 0) {
|
||||
if (fopAcM_create(PROC_MYNA2, var_r29 | mSwitchNo << 8, &actor_pos,
|
||||
fopAcM_GetRoomNo(this), &actor_angle, 0, -1)
|
||||
!= fpcM_ERROR_PROCESS_ID_e) {
|
||||
dComIfGs_onSwitch(mSwitchNo,fopAcM_GetRoomNo(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +51,9 @@ s32 daTagMyna2_c::execute() {
|
||||
}
|
||||
|
||||
static s32 daTagMyna2_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagMyna2_c*>(i_this)->create();
|
||||
daTagMyna2_c* myna2 = static_cast<daTagMyna2_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return myna2->create();
|
||||
}
|
||||
|
||||
static s32 daTagMyna2_Execute(daTagMyna2_c* i_this) {
|
||||
@@ -60,6 +61,7 @@ static s32 daTagMyna2_Execute(daTagMyna2_c* i_this) {
|
||||
}
|
||||
|
||||
static s32 daTagMyna2_Delete(daTagMyna2_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagMyna2_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -25,18 +25,15 @@ int daTag_MynaLight_c::Delete() {
|
||||
}
|
||||
|
||||
int daTag_MynaLight_c::Execute() {
|
||||
u8 uVar1 = (int)(dComIfGs_getTime() * 0.06666667f) & 0xFF;
|
||||
u8 turn_on_time = getTurnOnTime() & 0xFF;
|
||||
u8 turn_off_time = getTurnOffTime() & 0xFF;
|
||||
|
||||
if (turn_off_time > turn_on_time) {
|
||||
if (uVar1 >= (getTurnOnTime() & 0xFF) && uVar1 < (getTurnOffTime() & 0xFF)) {
|
||||
u8 var_r30 = (int)(dComIfGs_getTime() * 0.06666667f);
|
||||
if (getTurnOffTime() > getTurnOnTime()) {
|
||||
if (var_r30 >= getTurnOnTime() && var_r30 < getTurnOffTime()) {
|
||||
field_0x578 = true;
|
||||
} else {
|
||||
field_0x578 = false;
|
||||
}
|
||||
} else {
|
||||
if (uVar1 >= (getTurnOffTime() & 0xFF) && uVar1 < (getTurnOnTime() & 0xFF)) {
|
||||
if (var_r30 >= getTurnOffTime() && var_r30 < getTurnOnTime()) {
|
||||
field_0x578 = false;
|
||||
} else {
|
||||
field_0x578 = true;
|
||||
@@ -45,10 +42,10 @@ int daTag_MynaLight_c::Execute() {
|
||||
|
||||
if (mTurnOnFlag) {
|
||||
if (dComIfGp_roomControl_getStayNo() != 0) {
|
||||
mDoAud_seStartLevel(Z2SE_OBJ_MYNA_LIGHT_BURNING, (Vec*)¤t.pos, 0,
|
||||
dComIfGp_getReverb(dComIfGp_roomControl_getStayNo()));
|
||||
mDoAud_seStartLevel(Z2SE_OBJ_MYNA_LIGHT_BURNING, ¤t.pos, 0,
|
||||
dComIfGp_getReverb(dComIfGp_roomControl_getStayNo()));
|
||||
} else {
|
||||
mDoAud_seStartLevel(Z2SE_OBJ_MYNA_LIGHT_BURNING, (Vec*)¤t.pos, 0, 0);
|
||||
mDoAud_seStartLevel(Z2SE_OBJ_MYNA_LIGHT_BURNING, ¤t.pos, 0, 0);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
@@ -110,12 +107,14 @@ bool daTag_MynaLight_c::setTurnOnOffChange() {
|
||||
return mTurnOnFlag;
|
||||
}
|
||||
|
||||
u32 daTag_MynaLight_c::getTurnOnTime() {
|
||||
return fopAcM_GetParamBit(this, 0, 5);
|
||||
u8 daTag_MynaLight_c::getTurnOnTime() {
|
||||
u8 param = fopAcM_GetParam(this) & 0x1F;
|
||||
return param;
|
||||
}
|
||||
|
||||
u32 daTag_MynaLight_c::getTurnOffTime() {
|
||||
return fopAcM_GetParamBit(this, 5, 5);
|
||||
u8 daTag_MynaLight_c::getTurnOffTime() {
|
||||
u8 param = (fopAcM_GetParam(this) & 0x3E0) >> 5;
|
||||
return param;
|
||||
}
|
||||
|
||||
void daTag_MynaLight_c::initialize() {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "d/actor/d_a_tag_pachi.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
daTagPati_c::~daTagPati_c() {}
|
||||
|
||||
@@ -24,6 +25,7 @@ static dCcD_SrcCyl const l_sph_src = {
|
||||
|
||||
int daTagPati_c::create() {
|
||||
fopAcM_ct(this, daTagPati_c);
|
||||
OS_REPORT("-------------- TAG YAMI CREATE!!\n");
|
||||
field_0x6E0 = get_prm();
|
||||
mStts.Init(0xFF, 0xFF, this);
|
||||
mCyl.Set(l_sph_src);
|
||||
@@ -39,25 +41,41 @@ int daTagPati_c::Execute() {
|
||||
}
|
||||
|
||||
void daTagPati_c::col_set() {
|
||||
mCyl.SetR(1350.f);
|
||||
f32 var_f31 = 1350.f;
|
||||
if (field_0x6E0 == 0 || field_0x6E0 == 1) {
|
||||
var_f31 += tREG_F(18);
|
||||
} else if (field_0x6E0 == 2 || field_0x6E0 == 3) {
|
||||
var_f31 += tREG_F(19);
|
||||
}
|
||||
mCyl.SetR(var_f31);
|
||||
mCyl.SetH(300000.0f);
|
||||
mCyl.SetC(home.pos);
|
||||
dComIfG_Ccsp()->Set(&mCyl);
|
||||
}
|
||||
|
||||
u32 daTagPati_c::chk_CoHit() {
|
||||
return mCyl.ChkCoHit() ? 1 : 0;
|
||||
if (mCyl.ChkCoHit()) {
|
||||
OS_REPORT("----mtype = %d\n", field_0x6E0);
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int daTagPati_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagPati_c*>(i_this)->create();
|
||||
daTagPati_c* pati = static_cast<daTagPati_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return pati->create();
|
||||
}
|
||||
|
||||
static int daTagPati_Execute(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagPati_c*>(i_this)->Execute();
|
||||
daTagPati_c* pati = static_cast<daTagPati_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return pati->Execute();
|
||||
}
|
||||
|
||||
static int daTagPati_Delete(daTagPati_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->~daTagPati_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,12 @@ daTagPoFire_HIO_c::daTagPoFire_HIO_c() {
|
||||
unk_0x4 = 0x14;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
void daTagPoFire_HIO_c::genMessage(JORMContext* ctx) {
|
||||
// empty function
|
||||
}
|
||||
#endif
|
||||
|
||||
void daTagPoFire_c::setBaseMtx() {
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle.x, shape_angle.y, shape_angle.z);
|
||||
@@ -48,11 +54,14 @@ static int daTagPoFire_Execute(daTagPoFire_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTagPoFire_Delete(daTagPoFire_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return i_this->Delete();
|
||||
}
|
||||
|
||||
static int daTagPoFire_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagPoFire_c*>(i_this)->create();
|
||||
daTagPoFire_c* poFire = static_cast<daTagPoFire_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
return poFire->create();
|
||||
}
|
||||
|
||||
daTagPoFire_HIO_c::~daTagPoFire_HIO_c() {}
|
||||
|
||||
@@ -5,52 +5,60 @@
|
||||
#include "d/d_procname.h"
|
||||
|
||||
void* daTag_Push_c::srchActor(void* param_0, void* param_1) {
|
||||
daTag_Push_c* push = (daTag_Push_c*)param_0;
|
||||
BOOL bVar1 = false;
|
||||
if (param_0 != NULL && fopAcM_IsActor(param_0)) {
|
||||
if (push != NULL && fopAcM_IsActor(push)) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(param_0))) {
|
||||
switch (((daTag_Push_c*)param_1)->getId()) {
|
||||
int id = ((daTag_Push_c*)param_1)->getId();
|
||||
switch (id) {
|
||||
case 1:
|
||||
bVar1 = fopAcM_GetName(param_0) == PROC_NPC_TARO;
|
||||
bVar1 = fopAcM_GetName(push) == PROC_NPC_TARO;
|
||||
break;
|
||||
case 2:
|
||||
bVar1 = fopAcM_GetName(param_0) == PROC_NPC_JAGAR;
|
||||
bVar1 = fopAcM_GetName(push) == PROC_NPC_JAGAR;
|
||||
break;
|
||||
case 3:
|
||||
bVar1 = fopAcM_GetName(param_0) == PROC_NPC_LEN;
|
||||
bVar1 = fopAcM_GetName(push) == PROC_NPC_LEN;
|
||||
break;
|
||||
case 4:
|
||||
bVar1 = fopAcM_GetName(param_0) == PROC_NPC_TARO;
|
||||
bVar1 = fopAcM_GetName(push) == PROC_NPC_TARO;
|
||||
break;
|
||||
case 5:
|
||||
bVar1 = fopAcM_GetName(param_0) == PROC_NPC_MARO;
|
||||
bVar1 = fopAcM_GetName(push) == PROC_NPC_MARO;
|
||||
break;
|
||||
case 6:
|
||||
bVar1 = fopAcM_GetName(param_0) == PROC_NPC_BESU;
|
||||
bVar1 = fopAcM_GetName(push) == PROC_NPC_BESU;
|
||||
break;
|
||||
case 7:
|
||||
bVar1 = fopAcM_GetName(param_0) == PROC_NPC_BOU;
|
||||
bVar1 = fopAcM_GetName(push) == PROC_NPC_BOU;
|
||||
break;
|
||||
case 8:
|
||||
bVar1 = fopAcM_GetName(param_0) == PROC_NPC_GRS;
|
||||
bVar1 = fopAcM_GetName(push) == PROC_NPC_GRS;
|
||||
break;
|
||||
case 9:
|
||||
bVar1 = fopAcM_GetName(param_0) == PROC_NPC_GRO;
|
||||
bVar1 = fopAcM_GetName(push) == PROC_NPC_GRO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!bVar1) {
|
||||
param_0 = NULL;
|
||||
push = NULL;
|
||||
}
|
||||
return param_0;
|
||||
return push;
|
||||
}
|
||||
|
||||
int daTag_Push_c::create() {
|
||||
int var_r29 = 0;
|
||||
fopAcM_ct(this, daTag_Push_c);
|
||||
scale.x *= 100.0f;
|
||||
scale.y *= 100.0f;
|
||||
scale.z = scale.x;
|
||||
|
||||
OS_REPORT("\t(%s:%d) PlayerNo:%d, BitSW:%02x, BitSW2:%02x, flowNo:%d<%08x>\n",
|
||||
fopAcM_getProcNameString(this), getId(), getPlayerListNo(), getBitSW(), getBitSW2(),
|
||||
getFlowNodeNo(), fopAcM_GetParam(this));
|
||||
|
||||
if (isDelete()) {
|
||||
return cPhs_ERROR_e;
|
||||
} else {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user