diff --git a/src/files/setup/setupame.c b/src/files/setup/setupame.c index c3173b32a..3bdcb8bae 100644 --- a/src/files/setup/setupame.c +++ b/src/files/setup/setupame.c @@ -1210,8 +1210,8 @@ u8 func0410_init_cass[] = { u8 func040f_cass[] = { set_shotlist(GAILIST_IDLE) - if_chr_dying(CHR_CASS, /*goto*/ 0x06) - if_chr_unloaded(CHR_CASS, /*goto*/ 0x06) + if_chr_dead(CHR_CASS, /*goto*/ 0x06) + if_chr_knockedout(CHR_CASS, /*goto*/ 0x06) goto_next(0x2c) // Dying @@ -1435,8 +1435,8 @@ u8 func0411_secretary[] = { stop_chr label(0x06) set_shotlist(GAILIST_IDLE) - if_chr_dying(CHR_SECRETARY, /*goto*/ 0x06) - if_chr_unloaded(CHR_SECRETARY, /*goto*/ 0x06) + if_chr_dead(CHR_SECRETARY, /*goto*/ 0x06) + if_chr_knockedout(CHR_SECRETARY, /*goto*/ 0x06) goto_next(0x2c) label(0x06) @@ -1554,9 +1554,9 @@ u8 func0414_programmer[] = { set_reaction_speed(100) set_shotlist(AILIST_PROGRAMMER) set_chr_chrflag(CHR_PROGRAMMER, CHRCFLAG_00000080) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2c) label(0x06) @@ -1888,7 +1888,7 @@ u8 func0414_programmer[] = { beginloop(0xaf) if_stage_flag_eq(STAGEFLAG_PC_DESTROYED, TRUE, /*goto*/ LABEL_PC_BROKEN) - if_chr_dying(CHR_SELF, /*goto*/ 0xb1) + if_chr_dead(CHR_SELF, /*goto*/ 0xb1) if_timer_gt(1040, /*goto*/ 0x06) endloop(0xaf) @@ -2132,14 +2132,14 @@ u8 func1004_check_lab_lift_located[] = { label(0x2c) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c) - if_chr_dying(CHR_BOND, /*goto*/ 0x2c) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2c) + if_chr_dead(CHR_BOND, /*goto*/ 0x2c) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c) - if_chr_dying(CHR_COOP, /*goto*/ 0x2c) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2c) + if_chr_dead(CHR_COOP, /*goto*/ 0x2c) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) @@ -2156,8 +2156,8 @@ u8 func1006_check_programmer_dead[] = { if_difficulty_lt(DIFF_PA, /*goto*/ 0x06) beginloop(0x04) - if_chr_dying(CHR_PROGRAMMER, /*goto*/ 0x2c) - if_chr_unloaded(CHR_PROGRAMMER, /*goto*/ 0x2c) + if_chr_dead(CHR_PROGRAMMER, /*goto*/ 0x2c) + if_chr_knockedout(CHR_PROGRAMMER, /*goto*/ 0x2c) endloop(0x04) label(0x2c) @@ -2336,8 +2336,8 @@ u8 func1008_doorswitch[] = { u8 func1009_check_civilians_killed[] = { beginloop(0x04) - if_chr_dying(CHR_SECRETARY, /*goto*/ 0x2c) - if_chr_dying(CHR_CASS, /*goto*/ 0x09) + if_chr_dead(CHR_SECRETARY, /*goto*/ 0x2c) + if_chr_dead(CHR_CASS, /*goto*/ 0x09) label(0x06) endloop(0x04) @@ -3795,7 +3795,7 @@ u8 func042f_surrendering_guard[] = { if_chr_in_view(/*goto*/ 0x28) label(0x06) if_chr_death_animation_finished(CHR_PRESET, /*goto*/ 0x55) - if_chr_unloaded(CHR_PRESET, /*goto*/ 0x55) + if_chr_knockedout(CHR_PRESET, /*goto*/ 0x55) if_detected_chr(CHR_PRESET, /*goto*/ 0x57) if_chr_stopped(/*goto*/ 0x57) endloop(0x56) diff --git a/src/files/setup/setupark.c b/src/files/setup/setupark.c index 5b036dbb9..fc8a7fcbe 100644 --- a/src/files/setup/setupark.c +++ b/src/files/setup/setupark.c @@ -546,9 +546,9 @@ u8 func0401_drcaroll_following[] = { label(0x00) yield set_target_chr(CHR_BOND) - if_chr_dying(CHR_SELF, /*goto*/ 0x00) + if_chr_dead(CHR_SELF, /*goto*/ 0x00) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x00) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x00) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x00) goto_next(0x20) label(0x00) @@ -659,8 +659,8 @@ u8 func0401_drcaroll_following[] = { label(0x5c) dprint 'D','R',' ','C','H','A','N','G','E','L','I','S','T','\n',0, if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x20) - if_chr_dying(CHR_DRCAROLL, /*goto*/ 0x20) - if_chr_unloaded(CHR_DRCAROLL, /*goto*/ 0x20) + if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x20) + if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x20) chr_move_to_pad(CHR_DRCAROLL, 0x0079, 0x00, /*goto*/ 0x00) dprint 'T','E','L','E','P','O','R','T',' ','F','A','I','L','\n',0, label(0x00) @@ -675,9 +675,9 @@ u8 func0401_drcaroll_following[] = { * Waiting at the door to the top room while you clear it out. */ u8 func0405_drcaroll_waiting[] = { - if_chr_dying(CHR_DRCAROLL, /*goto*/ 0x20) + if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x20) if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x20) - if_chr_unloaded(CHR_DRCAROLL, /*goto*/ 0x20) + if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x20) goto_next(0x00) label(0x20) @@ -831,7 +831,7 @@ u8 func040f_top_guard[] = { endloop(0x21) label(0x00) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x1f) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x1f) beginloop(0x1f) if_distance_to_target_lt(200, /*goto*/ 0x20) @@ -851,8 +851,8 @@ u8 func040f_top_guard[] = { u8 func0411_top_guard_blinded[] = { if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x20) - if_chr_dying(CHR_SELF, /*goto*/ 0x20) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x20) + if_chr_dead(CHR_SELF, /*goto*/ 0x20) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x20) goto_next(0x00) label(0x20) @@ -882,9 +882,9 @@ u8 func0406_general_combat[] = { // Has gun label(0x20) - if_chr_dying(CHR_SELF, /*goto*/ 0x00) + if_chr_dead(CHR_SELF, /*goto*/ 0x00) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x00) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x00) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x00) goto_next(0x20) // Dying - wait a few frames then say quip @@ -929,7 +929,7 @@ u8 func0406_general_combat[] = { label(0x14) if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x00) label(0x20) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x10) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x10) label(0x00) kneel @@ -1000,7 +1000,7 @@ u8 func0406_general_combat[] = { say_quip(CHR_BOND, QUIP_SEEPLAYER, 0xff, 0x02, 0xff, BANK_0, 0x00, 0x00) label(0x20) if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x17) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x12) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x12) goto_next(0x13) beginloop(0x12) @@ -1059,10 +1059,10 @@ u8 func0406_general_combat[] = { goto_first(0x15) label(0x17) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x16) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x16) label(0x16) say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x00) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x00) goto_next(0x20) label(0x00) goto_first(0x12) @@ -1209,7 +1209,7 @@ u8 func0408_hovercopter[] = { // Low shooting label(0x43) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x44) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x44) goto_first(0x22) label(0x44) @@ -1236,7 +1236,7 @@ u8 func0408_hovercopter[] = { // Mid shooting label(0x48) dprint 'S','H','O','O','T',' ','M','I','D','\n',0, - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x49) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x49) goto_first(0x24) label(0x49) @@ -1262,7 +1262,7 @@ u8 func0408_hovercopter[] = { // High shooting (roof) label(0x4d) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x00) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x00) label(0x00) set_stage_flag(STAGEFLAG_HOVERCOPTER_ON_ROOF) if_stage_flag_eq(STAGEFLAG_SAID_FINAL_WARNING, TRUE, /*goto*/ 0x20) @@ -1277,7 +1277,7 @@ u8 func0408_hovercopter[] = { endloop(0x29) label(0x00) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x00) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x00) goto_first(0x26) label(0x00) @@ -1353,14 +1353,14 @@ u8 func1003_check_end_level[] = { label(0x20) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x20) - if_chr_dying(CHR_BOND, /*goto*/ 0x20) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x20) + if_chr_dead(CHR_BOND, /*goto*/ 0x20) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x20) goto_next(0x00) label(0x20) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x20) - if_chr_dying(CHR_COOP, /*goto*/ 0x20) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x20) + if_chr_dead(CHR_COOP, /*goto*/ 0x20) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x20) goto_next(0x00) label(0x20) @@ -1447,8 +1447,8 @@ u8 func1004_elevator_unlocking[] = { u8 func1005_check_bodyguards_dead[] = { #define if_alive_goto_00(chr, goto) \ if_chr_death_animation_finished(chr, goto) \ - if_chr_dying(chr, goto) \ - if_chr_unloaded(chr, goto) \ + if_chr_dead(chr, goto) \ + if_chr_knockedout(chr, goto) \ goto_next(0x00) \ label(goto) @@ -1473,8 +1473,8 @@ u8 func1005_check_bodyguards_dead[] = { if_alive_goto_00(0x1a, 0x20) if_chr_death_animation_finished(0x1b, /*goto*/ 0x20) - if_chr_dying(0x1b, /*goto*/ 0x20) - if_chr_unloaded(0x1b, /*goto*/ 0x20) + if_chr_dead(0x1b, /*goto*/ 0x20) + if_chr_knockedout(0x1b, /*goto*/ 0x20) goto_next(0x00) label(0x00) @@ -1507,8 +1507,8 @@ u8 func1006_check_hovercopter_destroyed[] = { u8 func100e_drcaroll_warnings[] = { beginloop(0x1f) if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x21) - if_chr_dying(CHR_DRCAROLL, /*goto*/ 0x21) - if_chr_unloaded(CHR_DRCAROLL, /*goto*/ 0x21) + if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x21) + if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x21) if_stage_flag_eq(STAGEFLAG_DRCAROLL_ATTACKED, TRUE, /*goto*/ 0x00) if_chr_shield_lt(CHR_DRCAROLL, 100, /*goto*/ 0x30) @@ -1519,8 +1519,8 @@ u8 func100e_drcaroll_warnings[] = { label(0x00) if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x00) - if_chr_dying(CHR_DRCAROLL, /*goto*/ 0x00) - if_chr_unloaded(CHR_DRCAROLL, /*goto*/ 0x00) + if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x00) + if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x00) reloop(0x1f) // Dead @@ -1968,8 +1968,8 @@ u8 func040d_cass[] = { // 2 players, or force walk failed label(0x20) if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x20) - if_chr_dying(CHR_DRCAROLL, /*goto*/ 0x20) - if_chr_unloaded(CHR_DRCAROLL, /*goto*/ 0x20) + if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x20) + if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x20) set_ailist(CHR_DRCAROLL, 0x0405) label(0x20) goto_next(0x00) @@ -2750,8 +2750,8 @@ u8 func1014_msg_cantleaveany[] = { label(0x20) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x26) - if_chr_dying(CHR_BOND, /*goto*/ 0x26) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x26) + if_chr_dead(CHR_BOND, /*goto*/ 0x26) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x26) restart_timer beginloop(0x21) @@ -2760,19 +2760,19 @@ u8 func1014_msg_cantleaveany[] = { label(0x20) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x26) - if_chr_dying(CHR_BOND, /*goto*/ 0x26) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x26) + if_chr_dead(CHR_BOND, /*goto*/ 0x26) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x26) speak(CHR_BOND, L_ARK(53), 0x73aa, CHANNEL_6, COLOR_09_BLUE) // "I can't leave any bodyguards standing." label(0x26) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x27) - if_chr_dying(CHR_BOND, /*goto*/ 0x27) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x27) + if_chr_dead(CHR_BOND, /*goto*/ 0x27) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x27) beginloop(0x5f) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x27) - if_chr_dying(CHR_BOND, /*goto*/ 0x27) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x27) + if_chr_dead(CHR_BOND, /*goto*/ 0x27) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x27) if_sound_finished(CHANNEL_6, /*goto*/ 0x20) endloop(0x5f) @@ -2810,8 +2810,8 @@ u8 func1016_msg_make_foyer_guards_alerted[] = { #define if_alive_set_alerted(chr) \ if_chr_death_animation_finished(chr, /*goto*/ 0x20) \ - if_chr_dying(chr, /*goto*/ 0x20) \ - if_chr_unloaded(chr, /*goto*/ 0x20) \ + if_chr_dead(chr, /*goto*/ 0x20) \ + if_chr_knockedout(chr, /*goto*/ 0x20) \ set_ailist(chr, GAILIST_ALERTED) \ increase_chr_alertness(100, chr) \ label(0x20) @@ -2840,62 +2840,62 @@ u8 func1017_remove_special_shock[] = { if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_RESTORED, TRUE, /*goto*/ 0x00) if_chr_death_animation_finished(0x01, /*goto*/ 0x20) - if_chr_dying(0x01, /*goto*/ 0x20) - if_chr_unloaded(0x01, /*goto*/ 0x20) + if_chr_dead(0x01, /*goto*/ 0x20) + if_chr_knockedout(0x01, /*goto*/ 0x20) reloop(0x1f) label(0x20) if_chr_death_animation_finished(0x02, /*goto*/ 0x20) - if_chr_dying(0x02, /*goto*/ 0x20) - if_chr_unloaded(0x02, /*goto*/ 0x20) + if_chr_dead(0x02, /*goto*/ 0x20) + if_chr_knockedout(0x02, /*goto*/ 0x20) reloop(0x1f) label(0x20) if_chr_death_animation_finished(0x03, /*goto*/ 0x20) - if_chr_dying(0x03, /*goto*/ 0x20) - if_chr_unloaded(0x03, /*goto*/ 0x20) + if_chr_dead(0x03, /*goto*/ 0x20) + if_chr_knockedout(0x03, /*goto*/ 0x20) reloop(0x1f) label(0x20) if_chr_death_animation_finished(0x04, /*goto*/ 0x20) - if_chr_dying(0x04, /*goto*/ 0x20) - if_chr_unloaded(0x04, /*goto*/ 0x20) + if_chr_dead(0x04, /*goto*/ 0x20) + if_chr_knockedout(0x04, /*goto*/ 0x20) reloop(0x1f) label(0x20) if_chr_death_animation_finished(0x05, /*goto*/ 0x20) - if_chr_dying(0x05, /*goto*/ 0x20) - if_chr_unloaded(0x05, /*goto*/ 0x20) + if_chr_dead(0x05, /*goto*/ 0x20) + if_chr_knockedout(0x05, /*goto*/ 0x20) reloop(0x1f) label(0x20) if_chr_death_animation_finished(0x06, /*goto*/ 0x20) - if_chr_dying(0x06, /*goto*/ 0x20) - if_chr_unloaded(0x06, /*goto*/ 0x20) + if_chr_dead(0x06, /*goto*/ 0x20) + if_chr_knockedout(0x06, /*goto*/ 0x20) reloop(0x1f) label(0x20) if_chr_death_animation_finished(0x07, /*goto*/ 0x20) - if_chr_dying(0x07, /*goto*/ 0x20) - if_chr_unloaded(0x07, /*goto*/ 0x20) + if_chr_dead(0x07, /*goto*/ 0x20) + if_chr_knockedout(0x07, /*goto*/ 0x20) reloop(0x1f) label(0x20) if_chr_death_animation_finished(0x08, /*goto*/ 0x20) - if_chr_dying(0x08, /*goto*/ 0x20) - if_chr_unloaded(0x08, /*goto*/ 0x20) + if_chr_dead(0x08, /*goto*/ 0x20) + if_chr_knockedout(0x08, /*goto*/ 0x20) reloop(0x1f) label(0x20) if_chr_death_animation_finished(0x09, /*goto*/ 0x20) - if_chr_dying(0x09, /*goto*/ 0x20) - if_chr_unloaded(0x09, /*goto*/ 0x20) + if_chr_dead(0x09, /*goto*/ 0x20) + if_chr_knockedout(0x09, /*goto*/ 0x20) reloop(0x1f) label(0x20) if_chr_death_animation_finished(0x0a, /*goto*/ 0x20) - if_chr_dying(0x0a, /*goto*/ 0x20) - if_chr_unloaded(0x0a, /*goto*/ 0x20) + if_chr_dead(0x0a, /*goto*/ 0x20) + if_chr_knockedout(0x0a, /*goto*/ 0x20) endloop(0x1f) label(0x20) diff --git a/src/files/setup/setupate.c b/src/files/setup/setupate.c index 602e989c0..39eb4caa7 100644 --- a/src/files/setup/setupate.c +++ b/src/files/setup/setupate.c @@ -139,7 +139,7 @@ u8 func1002_first_walk[] = { u8 func1007_second_walk[] = { // Wait until SA walk trigger beginloop(0x58) - if_chr_dying(CHR_BOND, /*goto*/ 0x2d) + if_chr_dead(CHR_BOND, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) if_stage_flag_eq(STAGEFLAG_SA_WALK_TRIGGER, TRUE, /*goto*/ 0x06) endloop(0x58) @@ -219,7 +219,7 @@ u8 func0401_move_to_pad[] = { u8 func1008_third_walk[] = { // Wait for flag or Jo dying beginloop(0x58) - if_chr_dying(CHR_BOND, /*goto*/ 0x2d) + if_chr_dead(CHR_BOND, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) if_stage_flag_eq(STAGEFLAG_PA_WALK_TRIGGER, TRUE, /*goto*/ 0x06) endloop(0x58) @@ -290,8 +290,8 @@ u8 func1005_main[] = { // Wait until guard dead beginloop(0x04) if_chr_death_animation_finished(CHR_GUARD, /*goto*/ 0x2d) - if_chr_dying(CHR_GUARD, /*goto*/ 0x2d) - if_chr_unloaded(CHR_GUARD, /*goto*/ 0x2d) + if_chr_dead(CHR_GUARD, /*goto*/ 0x2d) + if_chr_knockedout(CHR_GUARD, /*goto*/ 0x2d) endloop(0x04) label(0x2d) @@ -317,8 +317,8 @@ u8 func1005_main[] = { // Wait until Jonathan dead beginloop(0x09) if_chr_death_animation_finished(CHR_JONATHAN, /*goto*/ 0x2d) - if_chr_dying(CHR_JONATHAN, /*goto*/ 0x2d) - if_chr_unloaded(CHR_JONATHAN, /*goto*/ 0x2d) + if_chr_dead(CHR_JONATHAN, /*goto*/ 0x2d) + if_chr_knockedout(CHR_JONATHAN, /*goto*/ 0x2d) endloop(0x09) label(0x2d) @@ -344,8 +344,8 @@ u8 func1005_main[] = { // Wait until Trent dead beginloop(0x0c) if_chr_death_animation_finished(CHR_TRENT, /*goto*/ 0x2d) - if_chr_dying(CHR_TRENT, /*goto*/ 0x2d) - if_chr_unloaded(CHR_TRENT, /*goto*/ 0x2d) + if_chr_dead(CHR_TRENT, /*goto*/ 0x2d) + if_chr_knockedout(CHR_TRENT, /*goto*/ 0x2d) endloop(0x0c) label(0x2d) @@ -405,7 +405,7 @@ u8 func0402_guard_combat[] = { // Guard has come into view. Jump sideways. label(0x2d) - try_jump_sideways(/*goto*/ 0x08) + try_sidestep(/*goto*/ 0x08) beginloop(0x08) if_distance_to_target_lt(250, /*goto*/ 0x0e) @@ -420,10 +420,10 @@ u8 func0402_guard_combat[] = { // 2 seconds have passed without seeing guard, or guard has been shot label(0x06) - if_chr_dying(CHR_TARGET, /*goto*/ 0x2e) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x2d) + if_chr_dead(CHR_TARGET, /*goto*/ 0x2e) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x2d) label(0x2d) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x0c) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x0c) beginloop(0x0c) if_chr_stopped(/*goto*/ 0x06) @@ -464,10 +464,10 @@ u8 func0403_jon_combat[] = { reloop(0x08) label(0x06) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x2d) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x2d) label(0x2d) - try_roll_and_shoot(/*goto*/ 0x0c) - try_chr_kneel_and_shoot_thing(0x0200, 0x0000, /*goto*/ 0x0c) + try_attack_roll(/*goto*/ 0x0c) + try_attack_kneel(0x0200, 0x0000, /*goto*/ 0x0c) beginloop(0x0c) if_chr_stopped(/*goto*/ 0x06) @@ -502,10 +502,10 @@ u8 func0404_trent_combat[] = { // Attack label(0x06) - if_chr_dying(CHR_TARGET, /*goto*/ 0x2e) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x2d) + if_chr_dead(CHR_TARGET, /*goto*/ 0x2e) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x2d) label(0x2d) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x0c) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x0c) beginloop(0x0c) if_chr_stopped(/*goto*/ 0x06) diff --git a/src/files/setup/setupazt.c b/src/files/setup/setupazt.c index 44f84c18e..e6c86389c 100644 --- a/src/files/setup/setupazt.c +++ b/src/files/setup/setupazt.c @@ -1099,8 +1099,8 @@ u8 func1009_check_shuttle_destroyed[] = { u8 func100a_check_president_dead[] = { beginloop(0x06) if_chr_death_animation_finished(CHR_PRESIDENT, /*goto*/ 0x31) - if_chr_dying(CHR_PRESIDENT, /*goto*/ 0x31) - if_chr_unloaded(CHR_PRESIDENT, /*goto*/ 0x31) + if_chr_dead(CHR_PRESIDENT, /*goto*/ 0x31) + if_chr_knockedout(CHR_PRESIDENT, /*goto*/ 0x31) endloop(0x06) label(0x31) @@ -1113,8 +1113,8 @@ u8 func100a_check_president_dead[] = { u8 func100b_check_clone_dead[] = { beginloop(0x06) if_chr_death_animation_finished(CHR_PRES_CLONE, /*goto*/ 0x31) - if_chr_dying(CHR_PRES_CLONE, /*goto*/ 0x31) - if_chr_unloaded(CHR_PRES_CLONE, /*goto*/ 0x31) + if_chr_dead(CHR_PRES_CLONE, /*goto*/ 0x31) + if_chr_knockedout(CHR_PRES_CLONE, /*goto*/ 0x31) endloop(0x06) label(0x31) @@ -1261,9 +1261,9 @@ u8 func0418_robot[] = { set_shotlist(AILIST_ROBOT) label(0x66) set_self_chrflag(CHRCFLAG_00040000) - if_chr_dying(CHR_SELF, /*goto*/ 0x11) + if_chr_dead(CHR_SELF, /*goto*/ 0x11) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x11) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x08) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x08) goto_next(0x04) label(0x08) yield @@ -1339,7 +1339,7 @@ u8 func0418_robot[] = { set_target_chr(CHR_P1P2) restart_timer dprint 'P','A','R','T',' ','3','a','\n',0, - try_aim_and_shoot_thing1(0x0200, 0x0000, /*goto*/ 0x0e) + try_attack_stand1(0x0200, 0x0000, /*goto*/ 0x0e) goto_first(0x04) beginloop(0x0e) @@ -1461,9 +1461,9 @@ u8 func041b_init_president[] = { u8 func041c_president_waiting[] = { set_shotlist(AILIST_PRESIDENT_WAITING) - if_chr_dying(CHR_SELF, /*goto*/ 0x08) + if_chr_dead(CHR_SELF, /*goto*/ 0x08) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x08) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x08) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x08) goto_next(0x31) // Dying @@ -1498,9 +1498,9 @@ u8 func041d_president_running[] = { set_shotlist(AILIST_PRESIDENT_RUNNING) dprint 'R','E','S','T','A','R','T','\n',0, yield - if_chr_dying(CHR_SELF, /*goto*/ 0x08) + if_chr_dead(CHR_SELF, /*goto*/ 0x08) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x08) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x08) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x08) goto_next(0x31) // Dying @@ -1650,8 +1650,8 @@ u8 func041d_president_running[] = { u8 func100e_check_robots_left[] = { beginloop(0x06) if_chr_death_animation_finished(CHR_ROBOT1, /*goto*/ 0x31) - if_chr_dying(CHR_ROBOT1, /*goto*/ 0x31) - if_chr_unloaded(CHR_ROBOT1, /*goto*/ 0x31) + if_chr_dead(CHR_ROBOT1, /*goto*/ 0x31) + if_chr_knockedout(CHR_ROBOT1, /*goto*/ 0x31) if_chr_in_room(CHR_ROBOT1, 0x00, 0x004a, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT1, 0x00, 0x004b, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT1, 0x00, 0x004c, /*goto*/ 0x08) @@ -1662,8 +1662,8 @@ u8 func100e_check_robots_left[] = { label(0x31) if_chr_death_animation_finished(CHR_ROBOT2, /*goto*/ 0x31) - if_chr_dying(CHR_ROBOT2, /*goto*/ 0x31) - if_chr_unloaded(CHR_ROBOT2, /*goto*/ 0x31) + if_chr_dead(CHR_ROBOT2, /*goto*/ 0x31) + if_chr_knockedout(CHR_ROBOT2, /*goto*/ 0x31) if_chr_in_room(CHR_ROBOT2, 0x00, 0x004a, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT2, 0x00, 0x004b, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT2, 0x00, 0x004c, /*goto*/ 0x08) @@ -1674,8 +1674,8 @@ u8 func100e_check_robots_left[] = { label(0x31) if_chr_death_animation_finished(CHR_ROBOT3, /*goto*/ 0x31) - if_chr_dying(CHR_ROBOT3, /*goto*/ 0x31) - if_chr_unloaded(CHR_ROBOT3, /*goto*/ 0x31) + if_chr_dead(CHR_ROBOT3, /*goto*/ 0x31) + if_chr_knockedout(CHR_ROBOT3, /*goto*/ 0x31) if_chr_in_room(CHR_ROBOT3, 0x00, 0x004a, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT3, 0x00, 0x004b, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT3, 0x00, 0x004c, /*goto*/ 0x08) @@ -1686,8 +1686,8 @@ u8 func100e_check_robots_left[] = { label(0x31) if_chr_death_animation_finished(CHR_ROBOT4, /*goto*/ 0x31) - if_chr_dying(CHR_ROBOT4, /*goto*/ 0x31) - if_chr_unloaded(CHR_ROBOT4, /*goto*/ 0x31) + if_chr_dead(CHR_ROBOT4, /*goto*/ 0x31) + if_chr_knockedout(CHR_ROBOT4, /*goto*/ 0x31) if_chr_in_room(CHR_ROBOT4, 0x00, 0x004a, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT4, 0x00, 0x004b, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT4, 0x00, 0x004c, /*goto*/ 0x08) @@ -1748,10 +1748,10 @@ u8 func041f_trent_shooting[] = { label(0x08) label(0xa8) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0xa7) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0xa7) label(0xa7) say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x0a) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x0a) goto_next(0x31) // Shoot worked @@ -1763,7 +1763,7 @@ u8 func041f_trent_shooting[] = { goto_next(0x0b) // Unreachable - if_chr_dying(CHR_TARGET, /*goto*/ 0x0b) + if_chr_dead(CHR_TARGET, /*goto*/ 0x0b) goto_first(0x04) // Shoot failed @@ -1833,32 +1833,32 @@ u8 func100f_check_end_level[] = { label(0x31) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x31) - if_chr_dying(CHR_BOND, /*goto*/ 0x31) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x31) + if_chr_dead(CHR_BOND, /*goto*/ 0x31) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x31) goto_next(0x08) label(0x31) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x31) - if_chr_dying(CHR_COOP, /*goto*/ 0x31) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x31) + if_chr_dead(CHR_COOP, /*goto*/ 0x31) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x31) // Jo or Velvet alive label(0x08) if_chr_death_animation_finished(CHR_PRESIDENT, /*goto*/ 0x32) - if_chr_dying(CHR_PRESIDENT, /*goto*/ 0x32) - if_chr_unloaded(CHR_PRESIDENT, /*goto*/ 0x32) + if_chr_dead(CHR_PRESIDENT, /*goto*/ 0x32) + if_chr_knockedout(CHR_PRESIDENT, /*goto*/ 0x32) set_ailist(CHR_PRESIDENT, GAILIST_STOP_AND_IDLE) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x31) - if_chr_dying(CHR_BOND, /*goto*/ 0x31) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x31) + if_chr_dead(CHR_BOND, /*goto*/ 0x31) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x31) goto_next(0x08) // Both players dead label(0x31) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x31) - if_chr_dying(CHR_COOP, /*goto*/ 0x31) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x31) + if_chr_dead(CHR_COOP, /*goto*/ 0x31) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x31) goto_next(0x08) label(0x31) diff --git a/src/files/setup/setupcave.c b/src/files/setup/setupcave.c index 52ec14d05..53424621b 100644 --- a/src/files/setup/setupcave.c +++ b/src/files/setup/setupcave.c @@ -1139,9 +1139,9 @@ u8 func040b_unused[] = { u8 func0407_stewardess[] = { set_shotlist(AILIST_STEWARDESS) - if_chr_dying(CHR_SELF, /*goto*/ 0x02) - if_chr_dying(CHR_SELF, /*goto*/ 0x02) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) + if_chr_dead(CHR_SELF, /*goto*/ 0x02) + if_chr_dead(CHR_SELF, /*goto*/ 0x02) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) goto_next(0x31) label(0x02) @@ -1172,7 +1172,7 @@ u8 func0407_stewardess[] = { // Not injured, or recovered label(0x4c) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) goto_next(0x16) label(0x02) @@ -1351,9 +1351,9 @@ u8 func0406_become_unalerted[] = { label(0x02) if_target_is_player(/*goto*/ 0x02) - if_chr_dying(CHR_TARGET, /*goto*/ 0x02) + if_chr_dead(CHR_TARGET, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x02) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x02) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x02) set_shotlist(AILIST_BECOME_UNALERTED) set_returnlist(CHR_SELF, AILIST_BECOME_UNALERTED) set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET) @@ -1367,10 +1367,10 @@ u8 func0406_become_unalerted[] = { u8 func1005_check_civilians_killed[] = { beginloop(0x00) if_stage_flag_eq(STAGEFLAG_SECURITY_SHUT_DOWN, TRUE, /*goto*/ 0x02) - if_chr_dying(CHR_STEWARDESS, /*goto*/ 0x31) - if_chr_dying(CHR_SECRETARY, /*goto*/ 0x31) - if_chr_dying(CHR_OFFICE1, /*goto*/ 0x31) - if_chr_dying(CHR_OFFICE2, /*goto*/ 0x31) + if_chr_dead(CHR_STEWARDESS, /*goto*/ 0x31) + if_chr_dead(CHR_SECRETARY, /*goto*/ 0x31) + if_chr_dead(CHR_OFFICE1, /*goto*/ 0x31) + if_chr_dead(CHR_OFFICE2, /*goto*/ 0x31) endloop(0x00) label(0x31) @@ -1497,9 +1497,9 @@ u8 func040c_init_secretary[] = { u8 func0408_secretary[] = { set_shotlist(AILIST_SECRETARY) set_morale(0) - if_chr_dying(CHR_SELF, /*goto*/ 0x02) + if_chr_dead(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) goto_next(0x00) label(0x02) @@ -2053,9 +2053,9 @@ u8 func0409_office1[] = { set_self_chrflag(CHRCFLAG_00040000) set_morale(0) set_shotlist(AILIST_OFFICE1) - if_chr_dying(CHR_SELF, /*goto*/ 0x02) + if_chr_dead(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) goto_next(0x42) label(0x02) @@ -2190,9 +2190,9 @@ u8 func040a_office2[] = { set_self_chrflag(CHRCFLAG_00040000) set_morale(0) set_shotlist(AILIST_OFFICE2) - if_chr_dying(CHR_SELF, /*goto*/ 0x02) + if_chr_dead(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) goto_next(0x42) label(0x02) @@ -2248,9 +2248,9 @@ u8 func040a_office2[] = { endloop(0x05) label(0x02) - if_chr_dying(CHR_OFFICE1, /*goto*/ 0x02) + if_chr_dead(CHR_OFFICE1, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_OFFICE1, /*goto*/ 0x02) - if_chr_unloaded(CHR_OFFICE1, /*goto*/ 0x02) + if_chr_knockedout(CHR_OFFICE1, /*goto*/ 0x02) speak(CHR_TARGET, L_CAVE(43), 0x1ae9, CHANNEL_4, COLOR_09_BLUE) // "You get security - I'll deal with her..." increase_squadron_alertness(100) restart_timer @@ -2300,14 +2300,14 @@ u8 func100c_check_end_level[] = { set_stage_flag(STAGEFLAG_BOARDED_PLANE) unset_savefile_flag(SAVEFILEFLAG_AF1_ENTRY) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x31) - if_chr_dying(CHR_BOND, /*goto*/ 0x31) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x31) + if_chr_dead(CHR_BOND, /*goto*/ 0x31) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x31) goto_next(0x02) label(0x31) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x31) - if_chr_dying(CHR_COOP, /*goto*/ 0x31) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x31) + if_chr_dead(CHR_COOP, /*goto*/ 0x31) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x31) goto_next(0x02) // Both players dead @@ -2325,14 +2325,14 @@ u8 func100c_check_end_level[] = { set_stage_flag(STAGEFLAG_BOARDED_PLANE) set_savefile_flag(SAVEFILEFLAG_AF1_ENTRY) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x31) - if_chr_dying(CHR_BOND, /*goto*/ 0x31) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x31) + if_chr_dead(CHR_BOND, /*goto*/ 0x31) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x31) goto_next(0x02) label(0x31) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x31) - if_chr_dying(CHR_COOP, /*goto*/ 0x31) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x31) + if_chr_dead(CHR_COOP, /*goto*/ 0x31) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x31) goto_next(0x02) // Both players dead @@ -2420,9 +2420,9 @@ u8 func0410_unused[] = { u8 func040f_nsa[] = { set_shotlist(AILIST_NSA) - if_chr_dying(CHR_SELF, /*goto*/ 0x02) + if_chr_dead(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) goto_next(0x44) label(0x02) @@ -2607,9 +2607,9 @@ u8 func0412_init_takeover_lackey[] = { u8 func0411_takeover_lackey[] = { set_shotlist(GAILIST_ALERTED) - if_chr_dying(CHR_SELF, /*goto*/ 0x02) + if_chr_dead(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) goto_next(0x00) label(0x02) @@ -2618,9 +2618,9 @@ u8 func0411_takeover_lackey[] = { beginloop(0x00) chr_toggle_p1p2(CHR_SELF) set_target_chr(CHR_P1P2) - if_chr_dying(0x0c, /*goto*/ 0x7b) + if_chr_dead(0x0c, /*goto*/ 0x7b) if_chr_death_animation_finished(0x0c, /*goto*/ 0x7b) - if_chr_unloaded(0x0c, /*goto*/ 0x7b) + if_chr_knockedout(0x0c, /*goto*/ 0x7b) if_target_in_sight(/*goto*/ 0x31) goto_next(0x02) @@ -2636,13 +2636,13 @@ u8 func0411_takeover_lackey[] = { label(0x7b) label(0x02) set_chr_team(CHR_SELF, TEAM_04) - if_chr_dying(0x0c, /*goto*/ 0x02) + if_chr_dead(0x0c, /*goto*/ 0x02) if_chr_death_animation_finished(0x0c, /*goto*/ 0x02) - if_chr_unloaded(0x0c, /*goto*/ 0x02) + if_chr_knockedout(0x0c, /*goto*/ 0x02) set_target_chr(0x0c) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x31) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x31) label(0x31) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x04) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x04) beginloop(0x04) if_chr_stopped(/*goto*/ 0x02) @@ -2676,9 +2676,9 @@ u8 unregistered_function3[] = { u8 func0414_officeworker[] = { set_morale(0) - if_chr_dying(CHR_SELF, /*goto*/ 0x02) + if_chr_dead(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) goto_next(0x00) label(0x02) @@ -2773,7 +2773,7 @@ u8 func0414_officeworker[] = { beginloop(0x6d) damage_chr(CHR_SELF, 18) - if_chr_dying(CHR_SELF, /*goto*/ 0x31) + if_chr_dead(CHR_SELF, /*goto*/ 0x31) endloop(0x6d) label(0x31) @@ -3274,9 +3274,9 @@ u8 func0419_ba8c[] = { set_alertness(255) set_returnlist(CHR_SELF, 0x0419) set_shotlist(0x0419) - if_chr_dying(CHR_SELF, /*goto*/ 0x02) + if_chr_dead(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) goto_next(0x31) label(0x02) @@ -3930,9 +3930,9 @@ u8 func101f_msg_smallerthanithought[] = { u8 func1022_check_office1_dead[] = { beginloop(0x00) - if_chr_dying(CHR_OFFICE1, /*goto*/ 0x31) + if_chr_dead(CHR_OFFICE1, /*goto*/ 0x31) if_chr_death_animation_finished(CHR_OFFICE1, /*goto*/ 0x31) - if_chr_unloaded(CHR_OFFICE1, /*goto*/ 0x31) + if_chr_knockedout(CHR_OFFICE1, /*goto*/ 0x31) endloop(0x00) label(0x31) @@ -3943,9 +3943,9 @@ u8 func1022_check_office1_dead[] = { u8 func1023_check_office2_dead[] = { beginloop(0x00) - if_chr_dying(CHR_OFFICE2, /*goto*/ 0x31) + if_chr_dead(CHR_OFFICE2, /*goto*/ 0x31) if_chr_death_animation_finished(CHR_OFFICE2, /*goto*/ 0x31) - if_chr_unloaded(CHR_OFFICE2, /*goto*/ 0x31) + if_chr_knockedout(CHR_OFFICE2, /*goto*/ 0x31) endloop(0x00) label(0x31) @@ -3961,11 +3961,11 @@ u8 func1024_double_dy357[] = { set_object_flag2(0x31, OBJFLAG2_INVISIBLE) beginloop(0x00) - if_chr_unloaded(0x10, /*goto*/ 0x31) + if_chr_knockedout(0x10, /*goto*/ 0x31) reloop(0x00) label(0x31) - if_chr_unloaded(0x11, /*goto*/ 0x31) + if_chr_knockedout(0x11, /*goto*/ 0x31) endloop(0x00) label(0x31) @@ -4189,8 +4189,8 @@ u8 func102b_check_secretary_dead[] = { beginloop(0x00) if_stage_flag_eq(STAGEFLAG_SECURITY_SHUT_DOWN, TRUE, /*goto*/ 0x09) if_chr_death_animation_finished(CHR_SECRETARY, /*goto*/ 0x31) - if_chr_dying(CHR_SECRETARY, /*goto*/ 0x31) - if_chr_unloaded(CHR_SECRETARY, /*goto*/ 0x31) + if_chr_dead(CHR_SECRETARY, /*goto*/ 0x31) + if_chr_knockedout(CHR_SECRETARY, /*goto*/ 0x31) endloop(0x00) label(0x31) diff --git a/src/files/setup/setupdam.c b/src/files/setup/setupdam.c index 7f078ce04..c3ce44cd5 100644 --- a/src/files/setup/setupdam.c +++ b/src/files/setup/setupdam.c @@ -1210,31 +1210,31 @@ u8 func100c_check_end_level[] = { label(0x07) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x07) - if_chr_dying(CHR_BOND, /*goto*/ 0x07) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x07) + if_chr_dead(CHR_BOND, /*goto*/ 0x07) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x07) goto_next(0x08) label(0x07) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x07) - if_chr_dying(CHR_COOP, /*goto*/ 0x07) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x07) + if_chr_dead(CHR_COOP, /*goto*/ 0x07) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x07) // Jo or Velvet alive label(0x08) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x08) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x08) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x08) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x08) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x08) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x07) - if_chr_dying(CHR_BOND, /*goto*/ 0x07) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x07) + if_chr_dead(CHR_BOND, /*goto*/ 0x07) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x07) goto_next(0x04) // Both players dead - this check is redundant label(0x07) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x07) - if_chr_dying(CHR_COOP, /*goto*/ 0x07) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x07) + if_chr_dead(CHR_COOP, /*goto*/ 0x07) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x07) goto_next(0x04) // Both players dead @@ -1258,11 +1258,11 @@ u8 func100e_check_labtech_dead[] = { beginloop(0x00) if_chr_death_animation_finished(CHR_LABTECH1, /*goto*/ 0x07) - if_chr_dying(CHR_LABTECH1, /*goto*/ 0x07) + if_chr_dead(CHR_LABTECH1, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_LABTECH2, /*goto*/ 0x07) - if_chr_dying(CHR_LABTECH2, /*goto*/ 0x07) + if_chr_dead(CHR_LABTECH2, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_LABTECH3, /*goto*/ 0x07) - if_chr_dying(CHR_LABTECH3, /*goto*/ 0x07) + if_chr_dead(CHR_LABTECH3, /*goto*/ 0x07) endloop(0x00) label(0x07) @@ -1352,8 +1352,8 @@ u8 func040e_init_labtech1[] = { u8 func040b_labtech1[] = { set_shotlist(AILIST_LABTECH1) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_dying(CHR_SELF, /*goto*/ 0x07) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) + if_chr_dead(CHR_SELF, /*goto*/ 0x07) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) goto_next(0x04) // Dying @@ -1427,8 +1427,8 @@ u8 func040f_init_labtech2[] = { u8 func040c_labtech2[] = { set_shotlist(AILIST_LABTECH2) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_dying(CHR_SELF, /*goto*/ 0x07) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) + if_chr_dead(CHR_SELF, /*goto*/ 0x07) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) goto_next(0x04) // Dying @@ -1506,8 +1506,8 @@ u8 func040d_labtech3[] = { // lab tech 1's pads. set_shotlist(AILIST_LABTECH1) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_dying(CHR_SELF, /*goto*/ 0x07) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) + if_chr_dead(CHR_SELF, /*goto*/ 0x07) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) goto_next(0x04) // Dying @@ -1883,9 +1883,9 @@ u8 func0401_pilot_dying[] = { u8 func0401_pilot[] = { set_shotlist(AILIST_PILOT) - if_chr_dying(CHR_SELF, /*goto*/ 0x07) + if_chr_dead(CHR_SELF, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) goto_next(0x00) // Dying @@ -1932,8 +1932,8 @@ u8 func0401_pilot[] = { label(0x08) if_chr_death_animation_finished(CHR_ANGRY_PILOT, /*goto*/ 0x09) - if_chr_dying(CHR_ANGRY_PILOT, /*goto*/ 0x09) - if_chr_unloaded(CHR_ANGRY_PILOT, /*goto*/ 0x09) + if_chr_dead(CHR_ANGRY_PILOT, /*goto*/ 0x09) + if_chr_knockedout(CHR_ANGRY_PILOT, /*goto*/ 0x09) goto_first(0x0b) // Angry pilot dead or hasn't been chosen yet @@ -2037,21 +2037,21 @@ u8 func0401_pilot[] = { u8 func1011_check_pilots_dead[] = { beginloop(0x00) if_stage_flag_eq(STAGEFLAG_00080000, TRUE, /*goto*/ 0x08) - if_chr_dying(CHR_PILOT1, /*goto*/ 0x07) + if_chr_dead(CHR_PILOT1, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_PILOT1, /*goto*/ 0x07) - if_chr_unloaded(CHR_PILOT1, /*goto*/ 0x07) + if_chr_knockedout(CHR_PILOT1, /*goto*/ 0x07) reloop(0x00) label(0x07) - if_chr_dying(CHR_PILOT2, /*goto*/ 0x07) + if_chr_dead(CHR_PILOT2, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_PILOT2, /*goto*/ 0x07) - if_chr_unloaded(CHR_PILOT2, /*goto*/ 0x07) + if_chr_knockedout(CHR_PILOT2, /*goto*/ 0x07) reloop(0x00) label(0x07) - if_chr_dying(CHR_PILOT3, /*goto*/ 0x07) + if_chr_dead(CHR_PILOT3, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_PILOT3, /*goto*/ 0x07) - if_chr_unloaded(CHR_PILOT3, /*goto*/ 0x07) + if_chr_knockedout(CHR_PILOT3, /*goto*/ 0x07) endloop(0x00) // All pilots dead @@ -2092,25 +2092,25 @@ u8 func1012_choose_angry_pilot[] = { beginloop(0x03) if_kill_count_gt(0, /*goto*/ 0x08) - if_chr_dying(CHR_PILOT1, /*goto*/ 0x3b) + if_chr_dead(CHR_PILOT1, /*goto*/ 0x3b) if_chr_death_animation_finished(CHR_PILOT1, /*goto*/ 0x3b) - if_chr_unloaded(CHR_PILOT1, /*goto*/ 0x3b) + if_chr_knockedout(CHR_PILOT1, /*goto*/ 0x3b) if_chr_has_flag_bankx(CHR_PILOT1, CHRFLAG0_08000000, BANK_0, /*goto*/ 0x3b) set_ailist(CHR_PILOT1, AILIST_ANGRY_PILOT) set_ailist(CHR_SELF, GAILIST_IDLE) label(0x3b) - if_chr_dying(CHR_PILOT2, /*goto*/ 0x3c) + if_chr_dead(CHR_PILOT2, /*goto*/ 0x3c) if_chr_death_animation_finished(CHR_PILOT2, /*goto*/ 0x3c) - if_chr_unloaded(CHR_PILOT2, /*goto*/ 0x3c) + if_chr_knockedout(CHR_PILOT2, /*goto*/ 0x3c) if_chr_has_flag_bankx(CHR_PILOT2, CHRFLAG0_08000000, BANK_0, /*goto*/ 0x3c) set_ailist(CHR_PILOT2, AILIST_ANGRY_PILOT) set_ailist(CHR_SELF, GAILIST_IDLE) label(0x3c) - if_chr_dying(CHR_PILOT3, /*goto*/ 0x04) + if_chr_dead(CHR_PILOT3, /*goto*/ 0x04) if_chr_death_animation_finished(CHR_PILOT3, /*goto*/ 0x04) - if_chr_unloaded(CHR_PILOT3, /*goto*/ 0x04) + if_chr_knockedout(CHR_PILOT3, /*goto*/ 0x04) if_chr_has_flag_bankx(CHR_PILOT3, CHRFLAG0_08000000, BANK_0, /*goto*/ 0x04) set_ailist(CHR_PILOT3, AILIST_ANGRY_PILOT) set_ailist(CHR_SELF, GAILIST_IDLE) @@ -2136,9 +2136,9 @@ u8 func0404_angry_pilot[] = { unset_self_flag_bankx(CHRFLAG0_00100000, BANK_0) set_self_chrflag(CHRCFLAG_00000040) set_shotlist(AILIST_ANGRY_PILOT) - if_chr_dying(CHR_SELF, /*goto*/ 0x07) + if_chr_dead(CHR_SELF, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) goto_next(0x04) // Dying @@ -2167,25 +2167,25 @@ u8 func0404_angry_pilot[] = { // Select another pilot as target label(0x04) - if_chr_dying(CHR_PILOT1, /*goto*/ 0x3b) + if_chr_dead(CHR_PILOT1, /*goto*/ 0x3b) if_chr_death_animation_finished(CHR_PILOT1, /*goto*/ 0x3b) - if_chr_unloaded(CHR_PILOT1, /*goto*/ 0x3b) + if_chr_knockedout(CHR_PILOT1, /*goto*/ 0x3b) if_chr_has_flag_bankx(CHR_PILOT1, CHRFLAG0_00000004, BANK_0, /*goto*/ 0x3b) set_target_chr(CHR_PILOT1) goto_next(0x00) label(0x3b) - if_chr_dying(CHR_PILOT2, /*goto*/ 0x3c) + if_chr_dead(CHR_PILOT2, /*goto*/ 0x3c) if_chr_death_animation_finished(CHR_PILOT2, /*goto*/ 0x3c) - if_chr_unloaded(CHR_PILOT2, /*goto*/ 0x3c) + if_chr_knockedout(CHR_PILOT2, /*goto*/ 0x3c) if_chr_has_flag_bankx(CHR_PILOT2, CHRFLAG0_00000004, BANK_0, /*goto*/ 0x3c) set_target_chr(CHR_PILOT2) goto_next(0x00) label(0x3c) - if_chr_dying(CHR_PILOT3, /*goto*/ 0x04) + if_chr_dead(CHR_PILOT3, /*goto*/ 0x04) if_chr_death_animation_finished(CHR_PILOT3, /*goto*/ 0x04) - if_chr_unloaded(CHR_PILOT3, /*goto*/ 0x04) + if_chr_knockedout(CHR_PILOT3, /*goto*/ 0x04) if_chr_has_flag_bankx(CHR_PILOT3, CHRFLAG0_00000004, BANK_0, /*goto*/ 0x04) set_target_chr(CHR_PILOT3) goto_next(0x00) @@ -2221,9 +2221,9 @@ u8 func0404_angry_pilot[] = { goto_first(0x00) label(0x07) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x04) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x04) label(0x04) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x6e) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x6e) beginloop(0x6e) if_chr_stopped(/*goto*/ 0x07) @@ -2449,9 +2449,9 @@ u8 func101b_reactor_hum[] = { u8 func0415_elvis_at_start[] = { set_shotlist(AILIST_ELVIS_AT_START) - if_chr_dying(CHR_SELF, /*goto*/ 0x07) + if_chr_dead(CHR_SELF, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) goto_next(0x04) // Dying @@ -2593,9 +2593,9 @@ u8 func0415_elvis_at_start[] = { */ u8 func0416_elvis_leading[] = { set_shotlist(AILIST_ELVIS_LEADING) - if_chr_dying(CHR_SELF, /*goto*/ 0x07) + if_chr_dead(CHR_SELF, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) goto_next(0x04) // Dying @@ -2672,8 +2672,8 @@ u8 func0416_elvis_leading[] = { u8 func101c_check_elvis_dead[] = { beginloop(0x00) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x07) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x07) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) endloop(0x00) label(0x07) @@ -2697,9 +2697,9 @@ u8 func0418_elvis_at_moonpool[] = { endloop(0x00) label(0x07) - if_chr_dying(CHR_SELF, /*goto*/ 0x07) + if_chr_dead(CHR_SELF, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) do_preset_animation(-1) set_stage_flag(STAGEFLAG_MET_ELVIS) speak(CHR_P1P2, L_DAM(34), 0x81a4, CHANNEL_6, COLOR_06_WHITE) // "Joanna... What took you so long? Follow me - let's..." diff --git a/src/files/setup/setupdepo.c b/src/files/setup/setupdepo.c index cd48fd9e5..729f75a77 100644 --- a/src/files/setup/setupdepo.c +++ b/src/files/setup/setupdepo.c @@ -1151,9 +1151,9 @@ u8 func100a_give_keycards[] = { endloop(0x04) label(0x2c) - if_chr_dying(CHR_CLOAK_1A, /*goto*/ 0x06) + if_chr_dead(CHR_CLOAK_1A, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_CLOAK_1A, /*goto*/ 0x06) - if_chr_unloaded(CHR_CLOAK_1A, /*goto*/ 0x06) + if_chr_knockedout(CHR_CLOAK_1A, /*goto*/ 0x06) // First cloacked guard is alive give_object_to_chr(OBJ_KEYCARD1, CHR_CLOAK_1A) @@ -1175,8 +1175,8 @@ u8 func100a_give_keycards[] = { // Wait for the chr who holds the keycard to die beginloop(0x55) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x08) - if_chr_dying(CHR_TARGET, /*goto*/ 0x2c) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x08) + if_chr_dead(CHR_TARGET, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2c) endloop(0x55) @@ -1192,9 +1192,9 @@ u8 func100a_give_keycards[] = { // Second room label(0x2c) - if_chr_dying(CHR_CLOAK_2A, /*goto*/ 0x06) + if_chr_dead(CHR_CLOAK_2A, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_CLOAK_2A, /*goto*/ 0x06) - if_chr_unloaded(CHR_CLOAK_2A, /*goto*/ 0x06) + if_chr_knockedout(CHR_CLOAK_2A, /*goto*/ 0x06) // 2A alive give_object_to_chr(OBJ_KEYCARD2, CHR_CLOAK_2A) @@ -1203,18 +1203,18 @@ u8 func100a_give_keycards[] = { // 2A dead label(0x06) - if_chr_dying(CHR_CLOAK_2B, /*goto*/ 0x06) + if_chr_dead(CHR_CLOAK_2B, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_CLOAK_2B, /*goto*/ 0x06) - if_chr_unloaded(CHR_CLOAK_2B, /*goto*/ 0x06) + if_chr_knockedout(CHR_CLOAK_2B, /*goto*/ 0x06) give_object_to_chr(OBJ_KEYCARD2, CHR_CLOAK_2B) dprint 'G','I','V','E',' ','T','O','5',0, goto_next(0x2c) // 2B dead label(0x06) - if_chr_dying(CHR_CLOAK_2C, /*goto*/ 0x06) + if_chr_dead(CHR_CLOAK_2C, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_CLOAK_2C, /*goto*/ 0x06) - if_chr_unloaded(CHR_CLOAK_2C, /*goto*/ 0x06) + if_chr_knockedout(CHR_CLOAK_2C, /*goto*/ 0x06) give_object_to_chr(OBJ_KEYCARD2, CHR_CLOAK_2C) dprint 'G','I','V','E',' ','T','O','6',0, goto_next(0x2c) @@ -1413,8 +1413,8 @@ u8 func1012_check_for_end[] = { label(0x06) if_chr_death_animation_finished(CHR_P1P2, /*goto*/ 0x2c) - if_chr_dying(CHR_P1P2, /*goto*/ 0x2c) - if_chr_unloaded(CHR_P1P2, /*goto*/ 0x2c) + if_chr_dead(CHR_P1P2, /*goto*/ 0x2c) + if_chr_knockedout(CHR_P1P2, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) endloop(0x08) @@ -1444,14 +1444,14 @@ u8 func1012_check_for_end[] = { // Objectives complete label(0x53) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c) - if_chr_dying(CHR_BOND, /*goto*/ 0x2c) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2c) + if_chr_dead(CHR_BOND, /*goto*/ 0x2c) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c) - if_chr_dying(CHR_COOP, /*goto*/ 0x2c) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2c) + if_chr_dead(CHR_COOP, /*goto*/ 0x2c) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) @@ -2265,9 +2265,9 @@ u8 func0412_cloak_guard[] = { set_morale(0) set_shotlist(AILIST_CLOAK_GUARD) set_chr_cloaked(CHR_SELF, TRUE, FALSE) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x03) // Dead @@ -2316,9 +2316,9 @@ u8 func0412_cloak_guard[] = { set_chr_cloaked(CHR_SELF, FALSE, TRUE) label(0x0a) label(0x2c) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x2c) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x2c) label(0x2c) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x0b) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x0b) beginloop(0x0b) if_chr_stopped(/*goto*/ 0x0c) @@ -2977,12 +2977,12 @@ u8 func0411_hide[] = { u8 func1027_cloak1_check_one_remaining[] = { // Wait until either cloak guard dying (in first room) beginloop(0x04) - if_chr_dying(CHR_CLOAK_1A, /*goto*/ 0x2c) + if_chr_dead(CHR_CLOAK_1A, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_CLOAK_1A, /*goto*/ 0x2c) - if_chr_unloaded(CHR_CLOAK_1A, /*goto*/ 0x2c) - if_chr_dying(CHR_CLOAK_1B, /*goto*/ 0x2c) + if_chr_knockedout(CHR_CLOAK_1A, /*goto*/ 0x2c) + if_chr_dead(CHR_CLOAK_1B, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_CLOAK_1B, /*goto*/ 0x2c) - if_chr_unloaded(CHR_CLOAK_1B, /*goto*/ 0x2c) + if_chr_knockedout(CHR_CLOAK_1B, /*goto*/ 0x2c) endloop(0x04) label(0x2c) @@ -2995,33 +2995,33 @@ u8 func1028_cloak2_check_one_remaining[] = { // Count number of dead cloak guards in second room beginloop(0x04) set_morale(0) - if_chr_dying(CHR_CLOAK_2A, /*goto*/ 0x2c) + if_chr_dead(CHR_CLOAK_2A, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_CLOAK_2A, /*goto*/ 0x2c) - if_chr_unloaded(CHR_CLOAK_2A, /*goto*/ 0x2c) + if_chr_knockedout(CHR_CLOAK_2A, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) add_morale(1) label(0x06) - if_chr_dying(CHR_CLOAK_2B, /*goto*/ 0x2c) + if_chr_dead(CHR_CLOAK_2B, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_CLOAK_2B, /*goto*/ 0x2c) - if_chr_unloaded(CHR_CLOAK_2B, /*goto*/ 0x2c) + if_chr_knockedout(CHR_CLOAK_2B, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) add_morale(1) label(0x06) - if_chr_dying(CHR_CLOAK_2C, /*goto*/ 0x2c) + if_chr_dead(CHR_CLOAK_2C, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_CLOAK_2C, /*goto*/ 0x2c) - if_chr_unloaded(CHR_CLOAK_2C, /*goto*/ 0x2c) + if_chr_knockedout(CHR_CLOAK_2C, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) add_morale(1) label(0x06) - if_chr_dying(CHR_CLOAK_2D, /*goto*/ 0x2c) + if_chr_dead(CHR_CLOAK_2D, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_CLOAK_2D, /*goto*/ 0x2c) - if_chr_unloaded(CHR_CLOAK_2D, /*goto*/ 0x2c) + if_chr_knockedout(CHR_CLOAK_2D, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) diff --git a/src/files/setup/setupdish.c b/src/files/setup/setupdish.c index 1bc03ca2b..7f0dd0fd9 100644 --- a/src/files/setup/setupdish.c +++ b/src/files/setup/setupdish.c @@ -4514,8 +4514,8 @@ u8 func0403_holo4_guard1[] = { beginloop(0x04) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_dying(CHR_SELF, /*goto*/ 0x2f) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2f) + if_chr_dead(CHR_SELF, /*goto*/ 0x2f) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) endloop(0x04) label(0x2f) @@ -4535,8 +4535,8 @@ u8 func0404_holo4_guard2[] = { label(0x04) yield if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_dying(CHR_SELF, /*goto*/ 0x2f) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2f) + if_chr_dead(CHR_SELF, /*goto*/ 0x2f) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) goto_next(0x06) label(0x2f) @@ -4592,8 +4592,8 @@ u8 func1033_holo4_part1[] = { if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x57) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x57) if_chr_death_animation_finished(0x0d, /*goto*/ 0x2f) - if_chr_dying(0x0d, /*goto*/ 0x2f) - if_chr_unloaded(0x0d, /*goto*/ 0x2f) + if_chr_dead(0x0d, /*goto*/ 0x2f) + if_chr_knockedout(0x0d, /*goto*/ 0x2f) endloop(0x04) label(0x2f) @@ -4605,8 +4605,8 @@ u8 func1033_holo4_part1[] = { if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x57) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x57) if_chr_death_animation_finished(0x0e, /*goto*/ 0x2f) - if_chr_dying(0x0e, /*goto*/ 0x2f) - if_chr_unloaded(0x0e, /*goto*/ 0x2f) + if_chr_dead(0x0e, /*goto*/ 0x2f) + if_chr_knockedout(0x0e, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -4618,8 +4618,8 @@ u8 func1033_holo4_part1[] = { if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x57) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x57) if_chr_death_animation_finished(0x0f, /*goto*/ 0x2f) - if_chr_dying(0x0f, /*goto*/ 0x2f) - if_chr_unloaded(0x0f, /*goto*/ 0x2f) + if_chr_dead(0x0f, /*goto*/ 0x2f) + if_chr_knockedout(0x0f, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -4769,8 +4769,8 @@ u8 func0407_holo5_guard1[] = { yield label(0x2f) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x30) - if_chr_dying(CHR_SELF, /*goto*/ 0x30) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x30) + if_chr_dead(CHR_SELF, /*goto*/ 0x30) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x30) if_has_gun(CHR_SELF, /*goto*/ 0x06) label(0x2f) set_self_flag_bankx(CHRFLAG0_00008000, BANK_0) @@ -4847,8 +4847,8 @@ u8 func0409_holo5_guard2[] = { label(0x04) yield if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_dying(CHR_SELF, /*goto*/ 0x2f) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2f) + if_chr_dead(CHR_SELF, /*goto*/ 0x2f) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) restart_timer assign_path(0) start_path @@ -4856,8 +4856,8 @@ u8 func0409_holo5_guard2[] = { yield dprint 'O','n',' ','P','a','t','r','o','l',0, if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_dying(CHR_SELF, /*goto*/ 0x2f) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2f) + if_chr_dead(CHR_SELF, /*goto*/ 0x2f) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) if_target_in_sight(/*goto*/ 0x09) unset_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_alertness(0) @@ -4915,8 +4915,8 @@ u8 func040b_holo5_guard3[] = { beginloop(0x04) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_dying(CHR_SELF, /*goto*/ 0x2f) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2f) + if_chr_dead(CHR_SELF, /*goto*/ 0x2f) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) endloop(0x04) label(0x2f) @@ -4960,8 +4960,8 @@ u8 func1034_holo5_part1[] = { if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) if_chr_death_animation_finished(0x11, /*goto*/ 0x2f) - if_chr_dying(0x11, /*goto*/ 0x2f) - if_chr_unloaded(0x11, /*goto*/ 0x2f) + if_chr_dead(0x11, /*goto*/ 0x2f) + if_chr_knockedout(0x11, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -4973,8 +4973,8 @@ u8 func1034_holo5_part1[] = { if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) if_chr_death_animation_finished(0x12, /*goto*/ 0x2f) - if_chr_dying(0x12, /*goto*/ 0x2f) - if_chr_unloaded(0x12, /*goto*/ 0x2f) + if_chr_dead(0x12, /*goto*/ 0x2f) + if_chr_knockedout(0x12, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5215,8 +5215,8 @@ u8 func0416_holo_guard_unarmed_alert2[] = { restart_timer beginloop(0x04) - if_chr_dying(CHR_TARGET, /*goto*/ 0x57) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x57) + if_chr_dead(CHR_TARGET, /*goto*/ 0x57) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x57) if_distance_to_target_gt(100, /*goto*/ 0x2f) if_in_disarm_range(/*goto*/ 0x2f) if_timer_gt(120, /*goto*/ 0x10) @@ -5229,8 +5229,8 @@ u8 func0416_holo_guard_unarmed_alert2[] = { try_run_to_target(/*goto*/ 0x08) beginloop(0x08) - if_chr_dying(CHR_TARGET, /*goto*/ 0x57) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x57) + if_chr_dead(CHR_TARGET, /*goto*/ 0x57) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x57) if_timer_gt(20, /*goto*/ 0x10) if_chr_stopped(/*goto*/ 0x10) if_target_is_player(/*goto*/ 0x0e) @@ -5251,8 +5251,8 @@ u8 func0416_holo_guard_unarmed_alert2[] = { try_face_entity(0x0200, 0x0000, /*goto*/ 0x09) beginloop(0x09) - if_chr_dying(CHR_TARGET, /*goto*/ 0x57) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x57) + if_chr_dead(CHR_TARGET, /*goto*/ 0x57) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x57) if_distance_to_target_gt(400, /*goto*/ 0x10) if_jo_ccw_direction_lt(10, /*goto*/ 0x06) if_jo_ccw_direction_gt(246, /*goto*/ 0x06) @@ -5343,9 +5343,9 @@ u8 func102f_holo1_part1[] = { dprint 'N','O',' ','D','E','A','D',0, if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dying(0x13, /*goto*/ 0x2f) + if_chr_dead(0x13, /*goto*/ 0x2f) if_chr_death_animation_finished(0x13, /*goto*/ 0x2f) - if_chr_unloaded(0x13, /*goto*/ 0x2f) + if_chr_knockedout(0x13, /*goto*/ 0x2f) endloop(0x04) label(0x2f) @@ -5356,9 +5356,9 @@ u8 func102f_holo1_part1[] = { dprint 'C','H','R',' ','7','F','D',0, if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dying(0x14, /*goto*/ 0x2f) + if_chr_dead(0x14, /*goto*/ 0x2f) if_chr_death_animation_finished(0x14, /*goto*/ 0x2f) - if_chr_unloaded(0x14, /*goto*/ 0x2f) + if_chr_knockedout(0x14, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5369,9 +5369,9 @@ u8 func102f_holo1_part1[] = { dprint 'C','H','R',' ','8','F','D',0, if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dying(0x15, /*goto*/ 0x2f) + if_chr_dead(0x15, /*goto*/ 0x2f) if_chr_death_animation_finished(0x15, /*goto*/ 0x2f) - if_chr_unloaded(0x15, /*goto*/ 0x2f) + if_chr_knockedout(0x15, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5382,9 +5382,9 @@ u8 func102f_holo1_part1[] = { dprint 'C','H','R',' ','9','F','D',0, if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dying(0x16, /*goto*/ 0x2f) + if_chr_dead(0x16, /*goto*/ 0x2f) if_chr_death_animation_finished(0x16, /*goto*/ 0x2f) - if_chr_unloaded(0x16, /*goto*/ 0x2f) + if_chr_knockedout(0x16, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5604,14 +5604,14 @@ u8 func0419_holo_guard_armed_alert[] = { set_ailist(CHR_SELF, AILIST_HOLO_GUARD_UNARMED_ALERT) label(0x2f) label(0x8f) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x04) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x04) beginloop(0x04) if_in_disarm_range(/*goto*/ 0x2f) endloop(0x04) label(0x2f) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x08) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x08) beginloop(0x08) if_chr_injured_target(CHR_SELF, /*goto*/ 0x2f) @@ -5656,9 +5656,9 @@ u8 func1031_holo7_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dying(0x19, /*goto*/ 0x2f) + if_chr_dead(0x19, /*goto*/ 0x2f) if_chr_death_animation_finished(0x19, /*goto*/ 0x2f) - if_chr_unloaded(0x19, /*goto*/ 0x2f) + if_chr_knockedout(0x19, /*goto*/ 0x2f) endloop(0x04) label(0x2f) @@ -5669,9 +5669,9 @@ u8 func1031_holo7_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dying(0x1a, /*goto*/ 0x2f) + if_chr_dead(0x1a, /*goto*/ 0x2f) if_chr_death_animation_finished(0x1a, /*goto*/ 0x2f) - if_chr_unloaded(0x1a, /*goto*/ 0x2f) + if_chr_knockedout(0x1a, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5682,9 +5682,9 @@ u8 func1031_holo7_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dying(0x1b, /*goto*/ 0x2f) + if_chr_dead(0x1b, /*goto*/ 0x2f) if_chr_death_animation_finished(0x1b, /*goto*/ 0x2f) - if_chr_unloaded(0x1b, /*goto*/ 0x2f) + if_chr_knockedout(0x1b, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5695,9 +5695,9 @@ u8 func1031_holo7_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dying(0x17, /*goto*/ 0x2f) + if_chr_dead(0x17, /*goto*/ 0x2f) if_chr_death_animation_finished(0x17, /*goto*/ 0x2f) - if_chr_unloaded(0x17, /*goto*/ 0x2f) + if_chr_knockedout(0x17, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5708,9 +5708,9 @@ u8 func1031_holo7_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dying(0x18, /*goto*/ 0x2f) + if_chr_dead(0x18, /*goto*/ 0x2f) if_chr_death_animation_finished(0x18, /*goto*/ 0x2f) - if_chr_unloaded(0x18, /*goto*/ 0x2f) + if_chr_knockedout(0x18, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) diff --git a/src/files/setup/setupear.c b/src/files/setup/setupear.c index cd6a0a56b..6076b9c1d 100644 --- a/src/files/setup/setupear.c +++ b/src/files/setup/setupear.c @@ -922,9 +922,9 @@ u8 func0405_init_scientist[] = { u8 func0404_scientist[] = { set_shotlist(AILIST_SCIENTIST) - if_chr_dying(CHR_SELF, /*goto*/ 0x2f) + if_chr_dead(CHR_SELF, /*goto*/ 0x2f) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2f) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) goto_next(0x06) label(0x2f) @@ -981,16 +981,16 @@ u8 func0404_scientist[] = { chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x6b) - if_chr_dying(0x2b, /*goto*/ 0x2f) + if_chr_dead(0x2b, /*goto*/ 0x2f) if_chr_death_animation_finished(0x2b, /*goto*/ 0x2f) - if_chr_unloaded(0x2b, /*goto*/ 0x2f) + if_chr_knockedout(0x2b, /*goto*/ 0x2f) if_chr_stopped(/*goto*/ 0x6c) reloop(0x6b) label(0x2f) - if_chr_dying(0x2c, /*goto*/ 0x06) + if_chr_dead(0x2c, /*goto*/ 0x06) if_chr_death_animation_finished(0x2c, /*goto*/ 0x06) - if_chr_unloaded(0x2c, /*goto*/ 0x06) + if_chr_knockedout(0x2c, /*goto*/ 0x06) if_chr_stopped(/*goto*/ 0x6c) endloop(0x6b) @@ -1001,16 +1001,16 @@ u8 func0404_scientist[] = { chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x6e) - if_chr_dying(0x2d, /*goto*/ 0x2f) + if_chr_dead(0x2d, /*goto*/ 0x2f) if_chr_death_animation_finished(0x2d, /*goto*/ 0x2f) - if_chr_unloaded(0x2d, /*goto*/ 0x2f) + if_chr_knockedout(0x2d, /*goto*/ 0x2f) if_chr_stopped(/*goto*/ 0x6f) reloop(0x6e) label(0x2f) - if_chr_dying(0x2e, /*goto*/ 0x06) + if_chr_dead(0x2e, /*goto*/ 0x06) if_chr_death_animation_finished(0x2e, /*goto*/ 0x06) - if_chr_unloaded(0x2e, /*goto*/ 0x06) + if_chr_knockedout(0x2e, /*goto*/ 0x06) if_chr_stopped(/*goto*/ 0x6f) endloop(0x6e) @@ -1163,9 +1163,9 @@ u8 func0407_init_nasty_scientist[] = { u8 func0406_nasty_scientist[] = { set_shotlist(AILIST_NASTY_SCIENTIST) dprint 'N','A','S','T','Y','1','\n',0, - if_chr_dying(CHR_SELF, /*goto*/ 0x2f) + if_chr_dead(CHR_SELF, /*goto*/ 0x2f) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2f) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) goto_next(0x06) label(0x2f) @@ -1550,13 +1550,13 @@ u8 func1018_item_pickup_messages[] = { u8 func1005_check_unacceptable_casualties[] = { beginloop(0x04) - if_chr_dying(0x35, /*goto*/ 0x08) + if_chr_dead(0x35, /*goto*/ 0x08) if_chr_death_animation_finished(0x35, /*goto*/ 0x08) - if_chr_dying(0x36, /*goto*/ 0x09) + if_chr_dead(0x36, /*goto*/ 0x09) if_chr_death_animation_finished(0x36, /*goto*/ 0x09) - if_chr_dying(0x37, /*goto*/ 0x0a) + if_chr_dead(0x37, /*goto*/ 0x0a) if_chr_death_animation_finished(0x37, /*goto*/ 0x0a) - if_chr_dying(0x38, /*goto*/ 0x0a) + if_chr_dead(0x38, /*goto*/ 0x0a) if_chr_death_animation_finished(0x38, /*goto*/ 0x0a) reloop(0x04) @@ -1564,16 +1564,16 @@ u8 func1005_check_unacceptable_casualties[] = { if_difficulty_lt(DIFF_PA, /*goto*/ 0x2f) goto_next(0x0f) - if_chr_dying(0x36, /*goto*/ 0x0b) + if_chr_dead(0x36, /*goto*/ 0x0b) if_chr_death_animation_finished(0x36, /*goto*/ 0x0b) - if_chr_dying(0x37, /*goto*/ 0x0c) + if_chr_dead(0x37, /*goto*/ 0x0c) if_chr_death_animation_finished(0x37, /*goto*/ 0x0c) label(0x0b) if_difficulty_lt(DIFF_SA, /*goto*/ 0x2f) goto_next(0x0f) label(0x2f) - if_chr_dying(0x37, /*goto*/ 0x0f) + if_chr_dead(0x37, /*goto*/ 0x0f) if_chr_death_animation_finished(0x37, /*goto*/ 0x0f) reloop(0x04) @@ -1588,7 +1588,7 @@ u8 func1005_check_unacceptable_casualties[] = { goto_next(0x0f) label(0x2f) if_difficulty_lt(DIFF_SA, /*goto*/ 0x2f) - if_chr_dying(0x37, /*goto*/ 0x0f) + if_chr_dead(0x37, /*goto*/ 0x0f) if_chr_death_animation_finished(0x37, /*goto*/ 0x0f) label(0x2f) endloop(0x04) @@ -2631,14 +2631,14 @@ u8 func100f_check_for_end_level[] = { label(0x2f) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2f) - if_chr_dying(CHR_BOND, /*goto*/ 0x2f) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2f) + if_chr_dead(CHR_BOND, /*goto*/ 0x2f) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2f) goto_next(0x06) label(0x2f) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2f) - if_chr_dying(CHR_COOP, /*goto*/ 0x2f) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2f) + if_chr_dead(CHR_COOP, /*goto*/ 0x2f) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2f) goto_next(0x06) label(0x2f) @@ -2862,9 +2862,9 @@ u8 func0402_k7_guard[] = { endloop(0x04) label(0x06) - try_aim_and_shoot_thing1(0x0028, 0x0159, /*goto*/ 0x2f) + try_attack_stand1(0x0028, 0x0159, /*goto*/ 0x2f) label(0x2f) - try_aim_and_shoot_thing2(0x0008, 0x0159, /*goto*/ 0x2f) + try_attack_stand2(0x0008, 0x0159, /*goto*/ 0x2f) label(0x2f) say_quip(CHR_BOND, QUIP_ATTACK1, 0x32, 0x02, 0xff, BANK_0, 0x00, 0x00) diff --git a/src/files/setup/setupeld.c b/src/files/setup/setupeld.c index 7bc8b86eb..c0a8aa2ae 100644 --- a/src/files/setup/setupeld.c +++ b/src/files/setup/setupeld.c @@ -1434,7 +1434,7 @@ u8 func1004_check_negotiator[] = { // A and SA beginloop(0x04) if_stage_flag_eq(STAGEFLAG_NEGOTIATOR_ESCAPED, TRUE, /*goto*/ 0x2d) - if_chr_dying(CHR_NEGOTIATOR, /*goto*/ 0x06) + if_chr_dead(CHR_NEGOTIATOR, /*goto*/ 0x06) endloop(0x04) label(0x06) @@ -1500,7 +1500,7 @@ u8 func0402_taker[] = { label(0x06) set_target_chr(CHR_BOND) label(0x03) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x05) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x05) beginloop(0x05) if_distance_to_target_gt(1000, /*goto*/ 0x2e) @@ -1519,7 +1519,7 @@ u8 func0402_taker[] = { // Jo got too close label(0x06) set_self_flag_bankx(CHRFLAG0_00002000, BANK_0) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x09) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x09) label(0x09) yield if_chr_stopped(/*goto*/ 0x06) @@ -1546,7 +1546,7 @@ u8 func0402_taker[] = { restart_timer set_target_chr(CHR_NEGOTIATOR) label(0x03) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x04) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x04) beginloop(0x04) chr_toggle_p1p2(CHR_SELF) @@ -1556,7 +1556,7 @@ u8 func0402_taker[] = { if_self_flag_bankx_eq(CHRFLAG0_00200000, TRUE, BANK_0, /*goto*/ 0x06) set_target_chr(CHR_NEGOTIATOR) if_chr_death_animation_finished(CHR_NEGOTIATOR, /*goto*/ 0x10) - if_chr_dying(CHR_NEGOTIATOR, /*goto*/ 0x10) + if_chr_dead(CHR_NEGOTIATOR, /*goto*/ 0x10) if_difficulty_lt(DIFF_SA, /*goto*/ 0x2d) if_timer_gt(600, /*goto*/ 0x06) reloop(0x04) @@ -1572,7 +1572,7 @@ u8 func0402_taker[] = { beginloop(0x0c) if_chr_death_animation_finished(CHR_NEGOTIATOR, /*goto*/ 0x10) - if_chr_dying(CHR_NEGOTIATOR, /*goto*/ 0x10) + if_chr_dead(CHR_NEGOTIATOR, /*goto*/ 0x10) if_difficulty_lt(DIFF_SA, /*goto*/ 0x2d) if_timer_gt(600, /*goto*/ 0x06) reloop(0x0c) @@ -1584,17 +1584,17 @@ u8 func0402_taker[] = { // Shoot label(0x6f) label(0x06) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x08) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x08) beginloop(0x08) if_chr_death_animation_finished(CHR_NEGOTIATOR, /*goto*/ 0x06) - if_chr_dying(CHR_NEGOTIATOR, /*goto*/ 0x06) + if_chr_dead(CHR_NEGOTIATOR, /*goto*/ 0x06) if_chr_stopped(/*goto*/ 0x06) endloop(0x08) label(0x06) if_chr_death_animation_finished(CHR_NEGOTIATOR, /*goto*/ 0x10) - if_chr_dying(CHR_NEGOTIATOR, /*goto*/ 0x10) + if_chr_dead(CHR_NEGOTIATOR, /*goto*/ 0x10) goto_first(0x03) label(0x10) @@ -1646,15 +1646,15 @@ u8 func0402_taker[] = { u8 func100f_check_takers_dead[] = { beginloop(0x04) - if_chr_dying(CHR_TAKER1, /*goto*/ 0x2d) + if_chr_dead(CHR_TAKER1, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_TAKER1, /*goto*/ 0x2d) - if_chr_unloaded(CHR_TAKER1, /*goto*/ 0x2d) + if_chr_knockedout(CHR_TAKER1, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dying(CHR_TAKER2, /*goto*/ 0x2d) + if_chr_dead(CHR_TAKER2, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_TAKER2, /*goto*/ 0x2d) - if_chr_unloaded(CHR_TAKER2, /*goto*/ 0x2d) + if_chr_knockedout(CHR_TAKER2, /*goto*/ 0x2d) endloop(0x04) label(0x2d) @@ -1777,7 +1777,7 @@ u8 func0404_sniper[] = { stop_chr set_shotlist(AILIST_SNIPER) set_target_chr(CHR_BOND) - if_chr_dying(CHR_SELF, /*goto*/ 0x64) + if_chr_dead(CHR_SELF, /*goto*/ 0x64) if_self_flag_bankx_eq(CHRFLAG0_08000000, TRUE, BANK_0, /*goto*/ 0x04) beginloop(0x60) @@ -1889,13 +1889,13 @@ u8 func0404_sniper[] = { label(0x2d) restart_timer label(0x06) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x08) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x08) reloop(0x04) label(0x08) yield label(0x06) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x09) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x09) reloop(0x04) beginloop(0x09) @@ -1913,42 +1913,42 @@ u8 func0404_sniper[] = { u8 func1006_check_snipers_dead[] = { beginloop(0x04) - if_chr_dying(CHR_SNIPER1, /*goto*/ 0x2d) + if_chr_dead(CHR_SNIPER1, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SNIPER1, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dying(CHR_SNIPER2, /*goto*/ 0x2d) + if_chr_dead(CHR_SNIPER2, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SNIPER2, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dying(CHR_SNIPER3, /*goto*/ 0x2d) + if_chr_dead(CHR_SNIPER3, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SNIPER3, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dying(CHR_SNIPER4, /*goto*/ 0x2d) + if_chr_dead(CHR_SNIPER4, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SNIPER4, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dying(CHR_SNIPER5, /*goto*/ 0x2d) + if_chr_dead(CHR_SNIPER5, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SNIPER5, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dying(CHR_SNIPER6, /*goto*/ 0x2d) + if_chr_dead(CHR_SNIPER6, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SNIPER6, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dying(CHR_SNIPER7, /*goto*/ 0x2d) + if_chr_dead(CHR_SNIPER7, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SNIPER7, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dying(CHR_SNIPER8, /*goto*/ 0x2d) + if_chr_dead(CHR_SNIPER8, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SNIPER8, /*goto*/ 0x2d) endloop(0x04) @@ -2260,21 +2260,21 @@ u8 func100c_check_hackers_dead[] = { yield yield yield - if_chr_dying(CHR_HACKER1, /*goto*/ 0x2d) + if_chr_dead(CHR_HACKER1, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_HACKER1, /*goto*/ 0x2d) - if_chr_unloaded(CHR_HACKER1, /*goto*/ 0x2d) + if_chr_knockedout(CHR_HACKER1, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dying(CHR_HACKER2, /*goto*/ 0x2d) + if_chr_dead(CHR_HACKER2, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_HACKER2, /*goto*/ 0x2d) - if_chr_unloaded(CHR_HACKER2, /*goto*/ 0x2d) + if_chr_knockedout(CHR_HACKER2, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dying(CHR_HACKER3, /*goto*/ 0x2d) + if_chr_dead(CHR_HACKER3, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_HACKER3, /*goto*/ 0x2d) - if_chr_unloaded(CHR_HACKER3, /*goto*/ 0x2d) + if_chr_knockedout(CHR_HACKER3, /*goto*/ 0x2d) endloop(0x04) label(0x2d) @@ -2330,13 +2330,13 @@ u8 func100e_check_objectives_complete[] = { label(0x2d) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) - if_chr_dying(CHR_BOND, /*goto*/ 0x2d) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2d) + if_chr_dead(CHR_BOND, /*goto*/ 0x2d) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d) - if_chr_dying(CHR_COOP, /*goto*/ 0x2d) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2d) + if_chr_dead(CHR_COOP, /*goto*/ 0x2d) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2d) goto_next(0x06) // Mission failed - players dead @@ -2345,9 +2345,9 @@ u8 func100e_check_objectives_complete[] = { set_ailist(CHR_SELF, GAILIST_IDLE) label(0x06) - if_chr_dying(CHR_CARRINGTON, /*goto*/ 0x2d) + if_chr_dead(CHR_CARRINGTON, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_CARRINGTON, /*goto*/ 0x2d) - if_chr_unloaded(CHR_CARRINGTON, /*goto*/ 0x2d) + if_chr_knockedout(CHR_CARRINGTON, /*goto*/ 0x2d) // Mission complete set_ailist(CHR_SELF, AILIST_OUTRO) @@ -2439,8 +2439,8 @@ u8 func1014_give_keycard[] = { #define give_keycard_if_alive(chr) \ if_chr_death_animation_finished(chr, /*goto*/ 0x2d) \ - if_chr_dying(chr, /*goto*/ 0x2d) \ - if_chr_unloaded(chr, /*goto*/ 0x2d) \ + if_chr_dead(chr, /*goto*/ 0x2d) \ + if_chr_knockedout(chr, /*goto*/ 0x2d) \ give_object_to_chr(OBJ_KEYCARD, chr) \ goto_next(0x09) \ label(0x2d) @@ -2922,7 +2922,7 @@ u8 func101d_dual_cmp150[] = { // Wait 38.3 seconds or for CMP150 sniper to die beginloop(0x04) - if_chr_dying(CHR_SNIPER7, /*goto*/ 0x2d) + if_chr_dead(CHR_SNIPER7, /*goto*/ 0x2d) if_timer_gt(2300, /*goto*/ 0x06) endloop(0x04) @@ -2983,9 +2983,9 @@ u8 func101e_unlock_doors[] = { u8 func101f_check_one_basement_guard_remaining[] = { #define inc_var_if_chr_dead(chr) \ - if_chr_dying(chr, /*goto*/ 0x2d) \ + if_chr_dead(chr, /*goto*/ 0x2d) \ if_chr_death_animation_finished(chr, /*goto*/ 0x2d) \ - if_chr_unloaded(chr, /*goto*/ 0x2d) \ + if_chr_knockedout(chr, /*goto*/ 0x2d) \ goto_next(0x06) \ label(0x2d) \ add_morale(1) \ diff --git a/src/files/setup/setupimp.c b/src/files/setup/setupimp.c index 732076230..fe629fc88 100644 --- a/src/files/setup/setupimp.c +++ b/src/files/setup/setupimp.c @@ -1568,7 +1568,7 @@ u8 func1003_hide_blondes_and_skedar[] = { u8 func100c_check_carrington_dead[] = { beginloop(0x04) - if_chr_dying(CHR_CARRINGTON, /*goto*/ 0x2e) + if_chr_dead(CHR_CARRINGTON, /*goto*/ 0x2e) endloop(0x04) label(0x2e) @@ -1596,9 +1596,9 @@ u8 func0416_init_hostage_fr2[] = { u8 func0414_firingrange_hostage[] = { set_shotlist(AILIST_FIRINGRANGE_HOSTAGE) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x04) label(0x2e) @@ -1721,9 +1721,9 @@ u8 func041a_hostage_holo[] = { set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_00040000) set_shotlist(AILIST_HOSTAGE_HOLO) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x04) // Dying @@ -1899,10 +1899,10 @@ u8 func041f_holoclone[] = { set_target_chr(holoclone) \ label(0x04) \ yield \ - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0xb9) \ + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0xb9) \ label(0xb9) \ say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) \ - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x0a) \ + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x0a) \ \ beginloop(0x0a) \ if_chr_stopped(/*goto*/ 0x08) \ @@ -1950,8 +1950,8 @@ u8 func0423_init_shock[] = { u8 func0426_init_saved_hostage[] = { set_shotlist(AILIST_HOSTAGE_THANK_AND_RUN) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) set_chr_team(CHR_SELF, TEAM_NONCOMBAT) add_health_or_armor(80) set_chr_maxdamage(CHR_SELF, 1) @@ -1967,9 +1967,9 @@ u8 func0426_init_saved_hostage[] = { u8 func0425_hostage_thank_and_run[] = { set_shotlist(AILIST_HOSTAGE_THANK_AND_RUN) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x03) label(0x2e) @@ -2059,9 +2059,9 @@ u8 func0427_drop_devastator[] = { set_ailist(CHR_SELF, AILIST_HOSTAGE_THANK_AND_RUN) label(0x08) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x03) label(0x2e) @@ -2122,21 +2122,21 @@ u8 func0427_drop_devastator[] = { u8 func100f_check_holo_takers_dead[] = { beginloop(0x03) - if_chr_dying(CHR_TAKER_HOLO1, /*goto*/ 0x2e) + if_chr_dead(CHR_TAKER_HOLO1, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_TAKER_HOLO1, /*goto*/ 0x2e) - if_chr_unloaded(CHR_TAKER_HOLO1, /*goto*/ 0x2e) + if_chr_knockedout(CHR_TAKER_HOLO1, /*goto*/ 0x2e) reloop(0x03) label(0x2e) - if_chr_dying(CHR_TAKER_HOLO2, /*goto*/ 0x2e) + if_chr_dead(CHR_TAKER_HOLO2, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_TAKER_HOLO2, /*goto*/ 0x2e) - if_chr_unloaded(CHR_TAKER_HOLO2, /*goto*/ 0x2e) + if_chr_knockedout(CHR_TAKER_HOLO2, /*goto*/ 0x2e) reloop(0x03) label(0x2e) - if_chr_dying(CHR_TAKER_HOLO3, /*goto*/ 0x2e) + if_chr_dead(CHR_TAKER_HOLO3, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_TAKER_HOLO3, /*goto*/ 0x2e) - if_chr_unloaded(CHR_TAKER_HOLO3, /*goto*/ 0x2e) + if_chr_knockedout(CHR_TAKER_HOLO3, /*goto*/ 0x2e) endloop(0x03) label(0x2e) @@ -2147,15 +2147,15 @@ u8 func100f_check_holo_takers_dead[] = { u8 func1010_check_device_takers_dead[] = { beginloop(0x03) - if_chr_dying(CHR_TAKER_DEVICE_M, /*goto*/ 0x2e) + if_chr_dead(CHR_TAKER_DEVICE_M, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_TAKER_DEVICE_M, /*goto*/ 0x2e) - if_chr_unloaded(CHR_TAKER_DEVICE_M, /*goto*/ 0x2e) + if_chr_knockedout(CHR_TAKER_DEVICE_M, /*goto*/ 0x2e) reloop(0x03) label(0x2e) - if_chr_dying(CHR_TAKER_DEVICE_F, /*goto*/ 0x2e) + if_chr_dead(CHR_TAKER_DEVICE_F, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_TAKER_DEVICE_F, /*goto*/ 0x2e) - if_chr_unloaded(CHR_TAKER_DEVICE_F, /*goto*/ 0x2e) + if_chr_knockedout(CHR_TAKER_DEVICE_F, /*goto*/ 0x2e) endloop(0x03) label(0x2e) @@ -2166,15 +2166,15 @@ u8 func1010_check_device_takers_dead[] = { u8 func1011_check_info_takers_dead[] = { beginloop(0x03) - if_chr_dying(CHR_TAKER_INFO_F, /*goto*/ 0x2e) + if_chr_dead(CHR_TAKER_INFO_F, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_TAKER_INFO_F, /*goto*/ 0x2e) - if_chr_unloaded(CHR_TAKER_INFO_F, /*goto*/ 0x2e) + if_chr_knockedout(CHR_TAKER_INFO_F, /*goto*/ 0x2e) reloop(0x03) label(0x2e) - if_chr_dying(CHR_TAKER_INFO_M, /*goto*/ 0x2e) + if_chr_dead(CHR_TAKER_INFO_M, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_TAKER_INFO_M, /*goto*/ 0x2e) - if_chr_unloaded(CHR_TAKER_INFO_M, /*goto*/ 0x2e) + if_chr_knockedout(CHR_TAKER_INFO_M, /*goto*/ 0x2e) endloop(0x03) label(0x2e) @@ -2199,9 +2199,9 @@ u8 func042d_init_hostage_device_m[] = { u8 func042b_deviceroom_hostage[] = { set_shotlist(AILIST_DEVICEROOM_HOSTAGE) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x12) label(0x2e) @@ -2240,9 +2240,9 @@ u8 func042f_init_taker_device_m[] = { u8 func042e_taker_device_m[] = { set_shotlist(AILIST_TAKER_DEVICE_M) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) goto_next(0x08) // Dying @@ -2292,9 +2292,9 @@ u8 func0431_init_taker_device_f[] = { u8 func0430_taker_device_f[] = { set_shotlist(AILIST_TAKER_DEVICE_F) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) goto_next(0x08) // Dying @@ -2340,8 +2340,8 @@ u8 func0430_taker_device_f[] = { u8 func0432_taker_attack[] = { set_shotlist(AILIST_TAKER_ATTACK) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x08) // Dying @@ -2366,10 +2366,10 @@ u8 func0432_taker_attack[] = { // Healthy label(0x04) yield - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0xb9) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0xb9) label(0xb9) say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x0a) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x0a) beginloop(0x0a) if_chr_stopped(/*goto*/ 0x08) @@ -2401,9 +2401,9 @@ u8 func0435_init_hostage_info_f[] = { u8 func0433_inforoom_hostage[] = { set_shotlist(AILIST_INFOROOM_HOSTAGE) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x04) label(0x2e) @@ -2507,8 +2507,8 @@ u8 func0437_init_taker_info_m[] = { u8 func0436_taker_info_m[] = { set_shotlist(AILIST_TAKER_INFO_M) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x08) // Dying @@ -2540,8 +2540,8 @@ u8 func0439_init_taker_info_f[] = { u8 func0438_taker_info_f[] = { set_shotlist(AILIST_TAKER_INFO_F) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x08) // Dying @@ -2569,29 +2569,29 @@ u8 func1013_check_hostages_saved[] = { yield beginloop(0x0a) - if_chr_dying(CHR_HOSTAGE_FR1, /*goto*/ 0x2f) + if_chr_dead(CHR_HOSTAGE_FR1, /*goto*/ 0x2f) if_chr_death_animation_finished(CHR_HOSTAGE_FR1, /*goto*/ 0x2f) - if_chr_unloaded(CHR_HOSTAGE_FR1, /*goto*/ 0x2f) + if_chr_knockedout(CHR_HOSTAGE_FR1, /*goto*/ 0x2f) goto_next(0x2e) // FR1 hostage dead label(0x2f) - if_chr_dying(CHR_HOSTAGE_FR2, /*goto*/ 0x2f) + if_chr_dead(CHR_HOSTAGE_FR2, /*goto*/ 0x2f) if_chr_death_animation_finished(CHR_HOSTAGE_FR2, /*goto*/ 0x2f) - if_chr_unloaded(CHR_HOSTAGE_FR2, /*goto*/ 0x2f) + if_chr_knockedout(CHR_HOSTAGE_FR2, /*goto*/ 0x2f) // FR1 hostage alive label(0x2e) - if_chr_dying(CHR_TAKER_FR1, /*goto*/ 0x2e) + if_chr_dead(CHR_TAKER_FR1, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_TAKER_FR1, /*goto*/ 0x2e) - if_chr_unloaded(CHR_TAKER_FR1, /*goto*/ 0x2e) + if_chr_knockedout(CHR_TAKER_FR1, /*goto*/ 0x2e) endloop(0x0a) // FR1 hostage alive and FR1 taker dead label(0x2e) - if_chr_dying(CHR_TAKER_FR2, /*goto*/ 0x2e) + if_chr_dead(CHR_TAKER_FR2, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_TAKER_FR2, /*goto*/ 0x2e) - if_chr_unloaded(CHR_TAKER_FR2, /*goto*/ 0x2e) + if_chr_knockedout(CHR_TAKER_FR2, /*goto*/ 0x2e) goto_first(0x0a) // Both FR hostages dead @@ -2600,37 +2600,37 @@ u8 func1013_check_hostages_saved[] = { // Both FR takers dead label(0x2e) if_stage_flag_eq(STAGEFLAG_DEVICE_TAKERS_DEAD, TRUE, /*goto*/ 0x2e) - if_chr_dying(CHR_HOSTAGE_DEVICE_F, /*goto*/ 0x2f) + if_chr_dead(CHR_HOSTAGE_DEVICE_F, /*goto*/ 0x2f) if_chr_death_animation_finished(CHR_HOSTAGE_DEVICE_F, /*goto*/ 0x2f) - if_chr_unloaded(CHR_HOSTAGE_DEVICE_F, /*goto*/ 0x2f) + if_chr_knockedout(CHR_HOSTAGE_DEVICE_F, /*goto*/ 0x2f) goto_first(0x0a) label(0x2f) - if_chr_dying(CHR_HOSTAGE_DEVICE_M, /*goto*/ 0x2e) + if_chr_dead(CHR_HOSTAGE_DEVICE_M, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_HOSTAGE_DEVICE_M, /*goto*/ 0x2e) - if_chr_unloaded(CHR_HOSTAGE_DEVICE_M, /*goto*/ 0x2e) + if_chr_knockedout(CHR_HOSTAGE_DEVICE_M, /*goto*/ 0x2e) goto_first(0x0a) // FR and device room done label(0x2e) if_stage_flag_eq(STAGEFLAG_INFO_TAKERS_DEAD, TRUE, /*goto*/ 0x2e) - if_chr_dying(CHR_HOSTAGE_INFO_M, /*goto*/ 0x2f) + if_chr_dead(CHR_HOSTAGE_INFO_M, /*goto*/ 0x2f) if_chr_death_animation_finished(CHR_HOSTAGE_INFO_M, /*goto*/ 0x2f) - if_chr_unloaded(CHR_HOSTAGE_INFO_M, /*goto*/ 0x2f) + if_chr_knockedout(CHR_HOSTAGE_INFO_M, /*goto*/ 0x2f) goto_first(0x0a) label(0x2f) - if_chr_dying(CHR_HOSTAGE_INFO_F, /*goto*/ 0x2e) + if_chr_dead(CHR_HOSTAGE_INFO_F, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_HOSTAGE_INFO_F, /*goto*/ 0x2e) - if_chr_unloaded(CHR_HOSTAGE_INFO_F, /*goto*/ 0x2e) + if_chr_knockedout(CHR_HOSTAGE_INFO_F, /*goto*/ 0x2e) goto_first(0x0a) // FR, device and info rooms done label(0x2e) if_stage_flag_eq(STAGEFLAG_HOLO_TAKERS_DEAD, TRUE, /*goto*/ 0x2e) - if_chr_dying(CHR_HOSTAGE_HOLO, /*goto*/ 0x2e) + if_chr_dead(CHR_HOSTAGE_HOLO, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_HOSTAGE_HOLO, /*goto*/ 0x2e) - if_chr_unloaded(CHR_HOSTAGE_HOLO, /*goto*/ 0x2e) + if_chr_knockedout(CHR_HOSTAGE_HOLO, /*goto*/ 0x2e) goto_first(0x0a) // All rooms done @@ -2648,13 +2648,13 @@ u8 func1014_carrington_messages[] = { restart_timer beginloop(0x03) - if_chr_dying(CHR_CARRINGTON, /*goto*/ 0xd9) + if_chr_dead(CHR_CARRINGTON, /*goto*/ 0xd9) if_stage_flag_eq(STAGEFLAG_INTRO_FINISHED, TRUE, /*goto*/ 0x2e) endloop(0x03) #define carrington_sanity_checks \ - if_chr_dying(CHR_CARRINGTON, /*goto*/ 0xd9) \ - if_chr_dying(CHR_BOND, /*goto*/ 0x05) \ + if_chr_dead(CHR_CARRINGTON, /*goto*/ 0xd9) \ + if_chr_dead(CHR_BOND, /*goto*/ 0x05) \ goto_next(0x06) \ \ label(0x05) \ @@ -2911,14 +2911,14 @@ u8 func1014_carrington_messages[] = { label(0x2e) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2e) - if_chr_dying(CHR_BOND, /*goto*/ 0x2e) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2e) + if_chr_dead(CHR_BOND, /*goto*/ 0x2e) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2e) goto_next(0x08) label(0x2e) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2e) - if_chr_dying(CHR_COOP, /*goto*/ 0x2e) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2e) + if_chr_dead(CHR_COOP, /*goto*/ 0x2e) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2e) goto_next(0x08) label(0x2e) @@ -3956,8 +3956,8 @@ u8 unregistered_function2[] = { u8 unregistered_function3[] = { beginloop(0x03) - if_chr_unloaded(CHR_TAKER_INFO_F, /*goto*/ 0x11) - if_chr_unloaded(CHR_TAKER_INFO_M, /*goto*/ 0x12) + if_chr_knockedout(CHR_TAKER_INFO_F, /*goto*/ 0x11) + if_chr_knockedout(CHR_TAKER_INFO_M, /*goto*/ 0x12) reloop(0x03) label(0x11) @@ -3974,8 +3974,8 @@ u8 unregistered_function3[] = { u8 func102d_firingrange_taker_invincibility[] = { beginloop(0x03) if_chr_death_animation_finished(CHR_TAKER_FR1, /*goto*/ 0x2e) - if_chr_dying(CHR_TAKER_FR1, /*goto*/ 0x2e) - if_chr_unloaded(CHR_TAKER_FR1, /*goto*/ 0x2e) + if_chr_dead(CHR_TAKER_FR1, /*goto*/ 0x2e) + if_chr_knockedout(CHR_TAKER_FR1, /*goto*/ 0x2e) if_chr_in_room(CHR_TAKER_FR1, 0x00, 0x0007, /*goto*/ 0x2e) if_chr_in_room(CHR_TAKER_FR1, 0x00, 0x0008, /*goto*/ 0x2e) if_chr_in_room(CHR_TAKER_FR1, 0x00, 0x0009, /*goto*/ 0x2e) @@ -3984,8 +3984,8 @@ u8 func102d_firingrange_taker_invincibility[] = { label(0x2e) if_chr_death_animation_finished(CHR_TAKER_FR2, /*goto*/ 0x2e) - if_chr_dying(CHR_TAKER_FR2, /*goto*/ 0x2e) - if_chr_unloaded(CHR_TAKER_FR2, /*goto*/ 0x2e) + if_chr_dead(CHR_TAKER_FR2, /*goto*/ 0x2e) + if_chr_knockedout(CHR_TAKER_FR2, /*goto*/ 0x2e) if_chr_in_room(CHR_TAKER_FR2, 0x00, 0x0007, /*goto*/ 0x2e) if_chr_in_room(CHR_TAKER_FR2, 0x00, 0x0008, /*goto*/ 0x2e) if_chr_in_room(CHR_TAKER_FR2, 0x00, 0x0009, /*goto*/ 0x2e) diff --git a/src/files/setup/setuplee.c b/src/files/setup/setuplee.c index e8901e2e5..9ac49702c 100644 --- a/src/files/setup/setuplee.c +++ b/src/files/setup/setuplee.c @@ -707,8 +707,8 @@ u8 func040d_elvis_wait_for_hangar_entry[] = { u8 func040e_elvis_give_ar34[] = { set_shotlist(AILIST_ELVIS_GIVE_AR34) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_dying(CHR_SELF, /*goto*/ 0x2c) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) + if_chr_dead(CHR_SELF, /*goto*/ 0x2c) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) @@ -798,9 +798,9 @@ u8 func0409_elvis_follow[] = { set_self_chrflag(CHRCFLAG_00000040) set_shotlist(AILIST_ELVIS_FOLLOW) set_returnlist(CHR_SELF, AILIST_ELVIS_FOLLOW) - if_chr_dying(CHR_SELF, /*goto*/ 0x2c) + if_chr_dead(CHR_SELF, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) // Dying @@ -882,8 +882,8 @@ u8 func0409_elvis_follow[] = { // Enemy detected label(0x08) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2c) - if_chr_dying(CHR_TARGET, /*goto*/ 0x2c) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x2c) + if_chr_dead(CHR_TARGET, /*goto*/ 0x2c) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2c) if_chrpresets_target_is_different(/*goto*/ 0x06) label(0x2c) goto_first(0x03) @@ -951,9 +951,9 @@ u8 func041d_init_elvis_outside_prebridgelift[] = { u8 func041c_elvis_outside_prebridgelift[] = { set_shotlist(AILIST_ELVIS_OUTSIDE_PREBRIDGELIFT) - if_chr_dying(CHR_SELF, /*goto*/ 0x2c) + if_chr_dead(CHR_SELF, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) // Dying @@ -991,9 +991,9 @@ u8 func041c_elvis_outside_prebridgelift[] = { u8 func040a_elvis_go_to_hangar_lift[] = { set_shotlist(AILIST_ELVIS_GO_TO_HANGAR_LIFT) - if_chr_dying(CHR_SELF, /*goto*/ 0x2c) + if_chr_dead(CHR_SELF, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) // Dying @@ -1048,9 +1048,9 @@ u8 func040a_elvis_go_to_hangar_lift[] = { u8 func041b_elvis_at_bridge[] = { stop_chr set_shotlist(AILIST_ELVIS_AT_BRIDGE) - if_chr_dying(CHR_SELF, /*goto*/ 0x2c) + if_chr_dead(CHR_SELF, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) // Dying @@ -1106,9 +1106,9 @@ u8 func041b_elvis_at_bridge[] = { u8 func1005_check_elvis_dead[] = { beginloop(0x04) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c) endloop(0x04) label(0x2c) @@ -1120,8 +1120,8 @@ u8 func1005_check_elvis_dead[] = { u8 func040f_init_skedar[] = { if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x0d) - if_chr_dying(CHR_SELF, /*goto*/ 0x0d) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x0d) + if_chr_dead(CHR_SELF, /*goto*/ 0x0d) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x0d) // Alive set_accuracy(20) @@ -1141,8 +1141,8 @@ u8 func040f_init_skedar[] = { u8 func0410_wake_suspendedanim_skedar[] = { if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_dying(CHR_SELF, /*goto*/ 0x2c) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) + if_chr_dead(CHR_SELF, /*goto*/ 0x2c) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) @@ -1199,8 +1199,8 @@ u8 func1006_wake_slayer_skedar[] = { open_door(0x13) if_chr_death_animation_finished(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c) - if_chr_dying(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c) - if_chr_unloaded(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c) + if_chr_dead(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c) + if_chr_knockedout(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c) set_ailist(CHR_SUSPENDEDANIM3, AILIST_WAKE_SUSPENDEDANIM_SKEDAR) set_chr_team(CHR_SUSPENDEDANIM3, TEAM_ENEMY) @@ -1353,8 +1353,8 @@ u8 func1008_hangar_lifts[] = { set_object_flag(OBJ_HANGARLIFT_JO, OBJFLAG_DEACTIVATED) unset_object_flag(OBJ_HANGARLIFT_ELVIS, OBJFLAG_DEACTIVATED) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c) set_ailist(CHR_ELVIS, GAILIST_STOP_AND_IDLE) yield if_chr_y(CHR_ELVIS, 400, OPERATOR_LESS_THAN, /*goto*/ 0x06) @@ -1385,8 +1385,8 @@ u8 func1008_hangar_lifts[] = { label(0x2c) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c) set_ailist(CHR_ELVIS, AILIST_ELVIS_FOLLOW) label(0x2c) @@ -1734,9 +1734,9 @@ u8 func0414_hangarclone[] = { u8 func0419_hangar_maian[] = { set_shotlist(AILIST_HANGAR_MAIAN) set_self_chrflag(CHRCFLAG_NOAUTOAIM) - if_chr_dying(CHR_SELF, /*goto*/ 0x2c) + if_chr_dead(CHR_SELF, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) @@ -1914,8 +1914,8 @@ u8 func100c_engineroom[] = { label(0x06) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c) set_ailist(CHR_ELVIS, AILIST_ELVIS_RUN_FROM_ENGINEROOM) play_x_music(CHANNEL_10, 10) speak(CHR_BOND, L_LEE(46), 0x73d7, CHANNEL_6, COLOR_04_ORANGE) // "We have to get out of here!" @@ -2167,8 +2167,8 @@ u8 func0415_bridgespawner[] = { label(0x2c) if_never_been_onscreen(/*goto*/ 0x4d) if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x2c) - if_chr_dying(CHR_CLONE, /*goto*/ 0x2c) - if_chr_unloaded(CHR_CLONE, /*goto*/ 0x2c) + if_chr_dead(CHR_CLONE, /*goto*/ 0x2c) + if_chr_knockedout(CHR_CLONE, /*goto*/ 0x2c) label(0x2c) if_chr_sees_player(/*goto*/ 0x08) endloop(0x04) @@ -2196,8 +2196,8 @@ u8 func0415_bridgespawner[] = { // Check clone is dead label(0x2c) if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x4d) - if_chr_dying(CHR_CLONE, /*goto*/ 0x4d) - if_chr_unloaded(CHR_CLONE, /*goto*/ 0x4d) + if_chr_dead(CHR_CLONE, /*goto*/ 0x4d) + if_chr_knockedout(CHR_CLONE, /*goto*/ 0x4d) goto_first(0x04) // Spawn @@ -2260,8 +2260,8 @@ u8 func0417_init_spawner_reveal[] = { u8 func041a_bridgeclone[] = { set_shotlist(AILIST_BRIDGECLONE) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_dying(CHR_SELF, /*goto*/ 0x2c) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) + if_chr_dead(CHR_SELF, /*goto*/ 0x2c) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) // Dying @@ -2280,7 +2280,7 @@ u8 func041a_bridgeclone[] = { call_rng if_rand_gt(128, /*goto*/ 0x2c) set_target_chr(CHR_COOP) - if_chr_dying(CHR_COOP, /*goto*/ 0x2c) + if_chr_dead(CHR_COOP, /*goto*/ 0x2c) goto_next(0xc2) label(0x2c) @@ -2289,8 +2289,8 @@ u8 func041a_bridgeclone[] = { beginloop(0xc2) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2c) - if_chr_dying(CHR_TARGET, /*goto*/ 0x2c) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x2c) + if_chr_dead(CHR_TARGET, /*goto*/ 0x2c) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) @@ -2305,10 +2305,10 @@ u8 func041a_bridgeclone[] = { try_walk_to_target(/*goto*/ 0x08) beginloop(0x08) - if_chr_dying(CHR_SELF, /*goto*/ 0xb8) + if_chr_dead(CHR_SELF, /*goto*/ 0xb8) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dying(CHR_TARGET, /*goto*/ 0x10) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x10) + if_chr_dead(CHR_TARGET, /*goto*/ 0x10) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) if_timer_gt(120, /*goto*/ 0x09) endloop(0x08) @@ -2318,10 +2318,10 @@ u8 func041a_bridgeclone[] = { // Start running beginloop(0x0a) - if_chr_dying(CHR_SELF, /*goto*/ 0xb8) + if_chr_dead(CHR_SELF, /*goto*/ 0xb8) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dying(CHR_TARGET, /*goto*/ 0x10) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x10) + if_chr_dead(CHR_TARGET, /*goto*/ 0x10) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) if_target_moving_away(/*goto*/ 0x2c) if_distance_to_target_lt(150, /*goto*/ 0x2e) label(0x2c) @@ -2342,10 +2342,10 @@ u8 func041a_bridgeclone[] = { try_face_entity(0x0200, 0x0001, /*goto*/ 0x0b) beginloop(0x0b) - if_chr_dying(CHR_SELF, /*goto*/ 0xb8) + if_chr_dead(CHR_SELF, /*goto*/ 0xb8) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dying(CHR_TARGET, /*goto*/ 0x10) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x10) + if_chr_dead(CHR_TARGET, /*goto*/ 0x10) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) if_jo_ccw_direction_lt(10, /*goto*/ 0x06) if_jo_ccw_direction_gt(246, /*goto*/ 0x06) if_timer_gt(15, /*goto*/ 0x06) @@ -2357,10 +2357,10 @@ u8 func041a_bridgeclone[] = { goto_first(0x03) beginloop(0x2f) - if_chr_dying(CHR_SELF, /*goto*/ 0xb8) + if_chr_dead(CHR_SELF, /*goto*/ 0xb8) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dying(CHR_TARGET, /*goto*/ 0x10) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x10) + if_chr_dead(CHR_TARGET, /*goto*/ 0x10) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) if_chr_stopped(/*goto*/ 0x06) endloop(0x2f) @@ -2373,7 +2373,7 @@ u8 func041a_bridgeclone[] = { stop_chr beginloop(0x0f) - if_chr_dying(CHR_SELF, /*goto*/ 0xb8) + if_chr_dead(CHR_SELF, /*goto*/ 0xb8) if_enemy_distance_lt_and_los(2540, /*goto*/ 0x06) endloop(0x0f) @@ -2388,21 +2388,21 @@ u8 func041a_bridgeclone[] = { u8 func100f_bridge_entry[] = { // Wait until 3 bridge Skedar dead beginloop(0x09) - if_chr_dying(CHR_BRIDGE1, /*goto*/ 0x2c) + if_chr_dead(CHR_BRIDGE1, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_BRIDGE1, /*goto*/ 0x2c) - if_chr_unloaded(CHR_BRIDGE1, /*goto*/ 0x2c) + if_chr_knockedout(CHR_BRIDGE1, /*goto*/ 0x2c) reloop(0x09) label(0x2c) - if_chr_dying(CHR_BRIDGE2, /*goto*/ 0x2c) + if_chr_dead(CHR_BRIDGE2, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_BRIDGE2, /*goto*/ 0x2c) - if_chr_unloaded(CHR_BRIDGE2, /*goto*/ 0x2c) + if_chr_knockedout(CHR_BRIDGE2, /*goto*/ 0x2c) reloop(0x09) label(0x2c) - if_chr_dying(CHR_BRIDGE3, /*goto*/ 0x2c) + if_chr_dead(CHR_BRIDGE3, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_BRIDGE3, /*goto*/ 0x2c) - if_chr_unloaded(CHR_BRIDGE3, /*goto*/ 0x2c) + if_chr_knockedout(CHR_BRIDGE3, /*goto*/ 0x2c) endloop(0x09) label(0x2c) @@ -2458,14 +2458,14 @@ u8 func1010_check_bridge_captured[] = { if_timer_gt(3600, /*goto*/ 0x0d) label(0x2c) if_chr_death_animation_finished(CHR_BRIDGESPAWNER1, /*goto*/ 0x2c) - if_chr_dying(CHR_BRIDGESPAWNER1, /*goto*/ 0x2c) - if_chr_unloaded(CHR_BRIDGESPAWNER1, /*goto*/ 0x2c) + if_chr_dead(CHR_BRIDGESPAWNER1, /*goto*/ 0x2c) + if_chr_knockedout(CHR_BRIDGESPAWNER1, /*goto*/ 0x2c) reloop(0x09) label(0x2c) if_chr_death_animation_finished(CHR_BRIDGESPAWNER2, /*goto*/ 0x2c) - if_chr_dying(CHR_BRIDGESPAWNER2, /*goto*/ 0x2c) - if_chr_unloaded(CHR_BRIDGESPAWNER2, /*goto*/ 0x2c) + if_chr_dead(CHR_BRIDGESPAWNER2, /*goto*/ 0x2c) + if_chr_knockedout(CHR_BRIDGESPAWNER2, /*goto*/ 0x2c) endloop(0x09) // 60 seconds elapsed @@ -2498,14 +2498,14 @@ u8 func1011_check_end_level[] = { label(0x06) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c) - if_chr_dying(CHR_BOND, /*goto*/ 0x2c) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2c) + if_chr_dead(CHR_BOND, /*goto*/ 0x2c) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c) - if_chr_dying(CHR_COOP, /*goto*/ 0x2c) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2c) + if_chr_dead(CHR_COOP, /*goto*/ 0x2c) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2c) goto_next(0x06) // Both players dead @@ -2516,8 +2516,8 @@ u8 func1011_check_end_level[] = { // Either buddy is alive label(0x06) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c) // Mission complete set_invincible(CHR_BOND) @@ -2956,9 +2956,9 @@ u8 func0420_init_bridge3[] = { */ u8 func0421_bridge_skedar[] = { set_shotlist(AILIST_BRIDGE_SKEDAR) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2c) // Dying @@ -2990,7 +2990,7 @@ u8 func0421_bridge_skedar[] = { label(0xc6) if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x06) set_target_chr(CHR_BOND) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0xc7) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0xc7) label(0x06) kneel @@ -3085,10 +3085,10 @@ u8 func0421_bridge_skedar[] = { label(0xca) if_self_flag_bankx_eq(CHRFLAG0_00002000, FALSE, BANK_0, /*goto*/ 0x60) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0xb1) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0xb1) label(0xb1) say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x06) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x06) goto_next(0x2c) label(0x60) @@ -3201,8 +3201,8 @@ u8 func0422_cass[] = { beginloop(0xc2) damage_chr(CHR_SELF, 18) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_dying(CHR_SELF, /*goto*/ 0x2c) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) + if_chr_dead(CHR_SELF, /*goto*/ 0x2c) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) endloop(0xc2) label(0x2c) diff --git a/src/files/setup/setuplip.c b/src/files/setup/setuplip.c index 70f7017f2..347cd0b32 100644 --- a/src/files/setup/setuplip.c +++ b/src/files/setup/setuplip.c @@ -1268,7 +1268,7 @@ u8 func0411_labtech_showers_agent[] = { beginloop(0x64) damage_chr(CHR_SELF, 18) - if_chr_dying(CHR_SELF, /*goto*/ 0x2d) + if_chr_dead(CHR_SELF, /*goto*/ 0x2d) endloop(0x64) label(0x2d) @@ -1299,9 +1299,9 @@ u8 func0412_init_labtech_showers[] = { u8 func0410_labtech_showers_sa_pa[] = { set_shotlist(AILIST_LABTECH_SA_PA) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) label(0x06) @@ -1682,9 +1682,9 @@ u8 func0419_init_doorman[] = { u8 func0418_doorman[] = { set_shotlist(GAILIST_ALERTED) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) label(0x06) @@ -1851,9 +1851,9 @@ u8 func0418_doorman[] = { u8 func100b_check_doorman_dead[] = { beginloop(0x04) chr_toggle_p1p2(CHR_SELF) - if_chr_dying(CHR_DOORMAN, /*goto*/ 0x2d) + if_chr_dead(CHR_DOORMAN, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_DOORMAN, /*goto*/ 0x2d) - if_chr_unloaded(CHR_DOORMAN, /*goto*/ 0x2d) + if_chr_knockedout(CHR_DOORMAN, /*goto*/ 0x2d) reloop(0x04) label(0x2d) @@ -1901,9 +1901,9 @@ u8 func100b_check_doorman_dead[] = { */ u8 func041a_labtech_harrysmate[] = { set_shotlist(AILIST_LABTECH_HARRYSMATE) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) label(0x06) @@ -2000,9 +2000,9 @@ u8 func041a_labtech_harrysmate[] = { u8 func041b_labtech_keycardguy[] = { set_shotlist(AILIST_LABTECH_KEYCARDGUY) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) // Dying @@ -2173,14 +2173,14 @@ u8 func100f_check_end_level[] = { beginloop(0x5c) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) - if_chr_dying(CHR_BOND, /*goto*/ 0x2d) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2d) + if_chr_dead(CHR_BOND, /*goto*/ 0x2d) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d) - if_chr_dying(CHR_COOP, /*goto*/ 0x2d) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2d) + if_chr_dead(CHR_COOP, /*goto*/ 0x2d) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) @@ -2210,33 +2210,33 @@ u8 func1010_give_keycard[] = { label(0x2d) label(0x2d) - if_chr_dying(0x23, /*goto*/ 0x06) + if_chr_dead(0x23, /*goto*/ 0x06) if_chr_death_animation_finished(0x23, /*goto*/ 0x06) - if_chr_unloaded(0x23, /*goto*/ 0x06) + if_chr_knockedout(0x23, /*goto*/ 0x06) give_object_to_chr(0x10, 0x23) dprint 'G','I','V','E',' ','T','O','4',0, goto_next(0x2d) label(0x06) - if_chr_dying(0x24, /*goto*/ 0x06) + if_chr_dead(0x24, /*goto*/ 0x06) if_chr_death_animation_finished(0x24, /*goto*/ 0x06) - if_chr_unloaded(0x24, /*goto*/ 0x06) + if_chr_knockedout(0x24, /*goto*/ 0x06) give_object_to_chr(0x10, 0x24) dprint 'G','I','V','E',' ','T','O','5',0, goto_next(0x2d) label(0x06) - if_chr_dying(0x25, /*goto*/ 0x06) + if_chr_dead(0x25, /*goto*/ 0x06) if_chr_death_animation_finished(0x25, /*goto*/ 0x06) - if_chr_unloaded(0x25, /*goto*/ 0x06) + if_chr_knockedout(0x25, /*goto*/ 0x06) give_object_to_chr(0x10, 0x25) dprint 'G','I','V','E',' ','T','O','6',0, goto_next(0x2d) label(0x06) if_chr_death_animation_finished(0x26, /*goto*/ 0x2d) - if_chr_dying(0x26, /*goto*/ 0x2d) - if_chr_unloaded(0x26, /*goto*/ 0x2d) + if_chr_dead(0x26, /*goto*/ 0x2d) + if_chr_knockedout(0x26, /*goto*/ 0x2d) dprint 'G','I','V','E',' ','T','O','7',0, label(0x2d) @@ -2253,9 +2253,9 @@ u8 func0414_init_mechanic[] = { u8 func0413_mechanic[] = { set_shotlist(AILIST_MECHANIC) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) label(0x06) @@ -2547,9 +2547,9 @@ u8 func1016_check_undisguised[] = { beginloop(0x04) chr_toggle_p1p2(CHR_SELF) if_stage_flag_eq(STAGEFLAG_DISGUISE_UNCOVERED, TRUE, /*goto*/ 0x06) - if_chr_dying(CHR_LABTECH_HARRYSMATE, /*goto*/ 0x06) - if_chr_dying(CHR_LABTECH_KEYCARDGUY, /*goto*/ 0x06) - if_chr_dying(CHR_DOORMAN, /*goto*/ 0x06) + if_chr_dead(CHR_LABTECH_HARRYSMATE, /*goto*/ 0x06) + if_chr_dead(CHR_LABTECH_KEYCARDGUY, /*goto*/ 0x06) + if_chr_dead(CHR_DOORMAN, /*goto*/ 0x06) if_chr_has_object(CHR_P1P2, OBJ_KEYCARD, /*goto*/ 0x06) endloop(0x04) @@ -2562,9 +2562,9 @@ u8 func1016_check_undisguised[] = { u8 func041f_labtech_lights[] = { set_shotlist(AILIST_LABTECH_LIGHTS) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) label(0x06) @@ -2791,9 +2791,9 @@ u8 func0421_init_labtech_doors[] = { u8 func0420_labtech_doors[] = { set_self_chrflag(CHRCFLAG_00000080) set_shotlist(AILIST_LABTECH_DOORS) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) label(0x06) @@ -3003,9 +3003,9 @@ u8 func0423_init_labtech_records[] = { u8 func0422_labtech_records[] = { set_shotlist(AILIST_LABTECH_RECORDS) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) label(0x06) set_shotlist(GAILIST_IDLE) @@ -4310,8 +4310,8 @@ u8 func102c_msg_hurry[] = { u8 func0416_become_unaware[] = { set_chr_hiddenflag(CHR_SELF, CHRHFLAG_00002000) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x0f) - if_chr_dying(CHR_SELF, /*goto*/ 0x0f) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x0f) + if_chr_dead(CHR_SELF, /*goto*/ 0x0f) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x0f) if_chr_sees_player(/*goto*/ 0x2d) set_alertness(0) return @@ -4460,33 +4460,33 @@ u8 func1031_toggle_doorman[] = { u8 func1032_count_last_room_guards[] = { beginloop(0x04) set_morale(0) - if_chr_dying(0x23, /*goto*/ 0x2d) + if_chr_dead(0x23, /*goto*/ 0x2d) if_chr_death_animation_finished(0x23, /*goto*/ 0x2d) - if_chr_unloaded(0x23, /*goto*/ 0x2d) + if_chr_knockedout(0x23, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) add_morale(1) label(0x06) - if_chr_dying(0x24, /*goto*/ 0x2d) + if_chr_dead(0x24, /*goto*/ 0x2d) if_chr_death_animation_finished(0x24, /*goto*/ 0x2d) - if_chr_unloaded(0x24, /*goto*/ 0x2d) + if_chr_knockedout(0x24, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) add_morale(1) label(0x06) - if_chr_dying(0x25, /*goto*/ 0x2d) + if_chr_dead(0x25, /*goto*/ 0x2d) if_chr_death_animation_finished(0x25, /*goto*/ 0x2d) - if_chr_unloaded(0x25, /*goto*/ 0x2d) + if_chr_knockedout(0x25, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) add_morale(1) label(0x06) - if_chr_dying(0x26, /*goto*/ 0x2d) + if_chr_dead(0x26, /*goto*/ 0x2d) if_chr_death_animation_finished(0x26, /*goto*/ 0x2d) - if_chr_unloaded(0x26, /*goto*/ 0x2d) + if_chr_knockedout(0x26, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) diff --git a/src/files/setup/setuplue.c b/src/files/setup/setuplue.c index b07f794de..ead8ddbe2 100644 --- a/src/files/setup/setuplue.c +++ b/src/files/setup/setuplue.c @@ -1288,14 +1288,14 @@ u8 func1008_check_end_level[] = { yield yield if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2e) - if_chr_dying(CHR_BOND, /*goto*/ 0x2e) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2e) + if_chr_dead(CHR_BOND, /*goto*/ 0x2e) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2e) goto_next(0x06) label(0x2e) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2e) - if_chr_dying(CHR_COOP, /*goto*/ 0x2e) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2e) + if_chr_dead(CHR_COOP, /*goto*/ 0x2e) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2e) goto_next(0x06) label(0x2e) @@ -1515,39 +1515,39 @@ u8 func0417_traitor[] = { label(0x09) open_door(0x11) - if_chr_dying(0x2f, /*goto*/ 0x0d) - if_chr_unloaded(0x2f, /*goto*/ 0x0d) + if_chr_dead(0x2f, /*goto*/ 0x0d) + if_chr_knockedout(0x2f, /*goto*/ 0x0d) set_target_chr(0x2f) goto_next(0x2e) label(0x0d) - if_chr_dying(0x2e, /*goto*/ 0x0e) - if_chr_unloaded(0x2e, /*goto*/ 0x0e) + if_chr_dead(0x2e, /*goto*/ 0x0e) + if_chr_knockedout(0x2e, /*goto*/ 0x0e) set_target_chr(0x2e) goto_next(0x2e) label(0x0e) - if_chr_dying(0x2d, /*goto*/ 0x0f) - if_chr_unloaded(0x2d, /*goto*/ 0x0f) + if_chr_dead(0x2d, /*goto*/ 0x0f) + if_chr_knockedout(0x2d, /*goto*/ 0x0f) set_target_chr(0x2d) goto_next(0x2e) label(0x0f) - if_chr_dying(0x2c, /*goto*/ 0x10) - if_chr_unloaded(0x2c, /*goto*/ 0x10) + if_chr_dead(0x2c, /*goto*/ 0x10) + if_chr_knockedout(0x2c, /*goto*/ 0x10) set_target_chr(0x2c) label(0x2e) call_rng if_rand_gt(128, /*goto*/ 0x2e) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x0a) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x0a) label(0x2e) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x0a) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x0a) dprint 'S','H','O','O','T','F','A','I','L','E','D','\n',0, yield label(0x0a) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x0b) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x0b) goto_next(0x0c) beginloop(0x0b) @@ -1595,8 +1595,8 @@ u8 func0417_traitor[] = { u8 func0416_mechanic[] = { set_shotlist(AILIST_MECHANIC) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) label(0x2e) @@ -1733,7 +1733,7 @@ u8 func040a_top_interceptor[] = { goto_first(0x09) label(0x59) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x5b) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x5b) reloop(0x0a) label(0x5b) @@ -2600,14 +2600,14 @@ u8 func1018_unhide_guards[] = { label(0x06) if_chr_death_animation_finished(0x10, /*goto*/ 0x06) - if_chr_dying(0x10, /*goto*/ 0x06) - if_chr_unloaded(0x10, /*goto*/ 0x06) + if_chr_dead(0x10, /*goto*/ 0x06) + if_chr_knockedout(0x10, /*goto*/ 0x06) goto_first(0x04) label(0x06) if_chr_death_animation_finished(0x11, /*goto*/ 0x2e) - if_chr_dying(0x11, /*goto*/ 0x2e) - if_chr_unloaded(0x11, /*goto*/ 0x2e) + if_chr_dead(0x11, /*goto*/ 0x2e) + if_chr_knockedout(0x11, /*goto*/ 0x2e) endloop(0x04) // Enable 4 more guards - the ones inside the blue door @@ -2714,14 +2714,14 @@ u8 func1019_spawn_guards_at_antenna[] = { label(0x06) if_chr_death_animation_finished(0x10, /*goto*/ 0x06) - if_chr_dying(0x10, /*goto*/ 0x06) - if_chr_unloaded(0x10, /*goto*/ 0x06) + if_chr_dead(0x10, /*goto*/ 0x06) + if_chr_knockedout(0x10, /*goto*/ 0x06) reloop(0x04) label(0x06) if_chr_death_animation_finished(0x11, /*goto*/ 0x2e) - if_chr_dying(0x11, /*goto*/ 0x2e) - if_chr_unloaded(0x11, /*goto*/ 0x2e) + if_chr_dead(0x11, /*goto*/ 0x2e) + if_chr_knockedout(0x11, /*goto*/ 0x2e) endloop(0x04) // Spawn 3 guards @@ -2837,7 +2837,7 @@ u8 func101a_check_mechanic_dead[] = { unset_savefile_flag(SAVEFILEFLAG_RESCUE_MECHANIC_DEAD) beginloop(0x04) - if_chr_dying(CHR_MECHANIC, /*goto*/ 0x2e) + if_chr_dead(CHR_MECHANIC, /*goto*/ 0x2e) endloop(0x04) label(0x2e) diff --git a/src/files/setup/setuppam.c b/src/files/setup/setuppam.c index 2c4af107e..71552f139 100644 --- a/src/files/setup/setuppam.c +++ b/src/files/setup/setuppam.c @@ -762,9 +762,9 @@ u8 func0402_elvis_follow_and_reactive_teleportals[] = { set_returnlist(CHR_SELF, AILIST_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) set_shotlist(AILIST_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) set_target_chr(CHR_PRESET) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -947,9 +947,9 @@ u8 func0404_elvis_follow_and_do_agent_megaweapon[] = { unset_self_flag_bankx(CHRFLAG1_00200000, BANK_1) set_shotlist(AILIST_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) set_target_chr(CHR_PRESET) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -1088,9 +1088,9 @@ u8 func0405_elvis_follow_nocombat[] = { unset_self_flag_bankx(CHRFLAG1_00200000, BANK_1) set_shotlist(0x0405) set_target_chr(CHR_PRESET) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -1168,9 +1168,9 @@ u8 func0405_elvis_follow_nocombat[] = { u8 func0406_elvis_follow_and_do_sa_megaweapon[] = { set_shotlist(AILIST_ELVIS_FOLLOW_AND_DO_SA_MEGAWEAPON) set_target_chr(CHR_PRESET) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -1268,9 +1268,9 @@ u8 func0406_elvis_follow_and_do_sa_megaweapon[] = { u8 func0407_elvis_go_to_sa_teleport[] = { set_shotlist(AILIST_ELVIS_GO_TO_SA_TELEPORT) set_target_chr(CHR_PRESET) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -1343,9 +1343,9 @@ u8 func0407_elvis_go_to_sa_teleport[] = { u8 func0403_elvis_give_farsight[] = { set_shotlist(AILIST_ELVIS_GIVE_FARSIGHT) set_target_chr(CHR_PRESET) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -2242,8 +2242,8 @@ u8 func0430_unused[] = { u8 func1006_msg_thiswillhelpus[] = { beginloop(0x04) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0d) if_objective_complete(0, /*goto*/ 0x2e) endloop(0x04) @@ -2252,8 +2252,8 @@ u8 func1006_msg_thiswillhelpus[] = { beginloop(0x08) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0d) if_timer_gt(180, /*goto*/ 0x2e) endloop(0x08) @@ -2269,8 +2269,8 @@ u8 func1007_msg_antibodymasking[] = { beginloop(0x04) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0d) endloop(0x04) // Unreachable @@ -2285,12 +2285,12 @@ u8 func1007_msg_antibodymasking[] = { u8 func1008_msg_theresdrcaroll[] = { beginloop(0x04) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0d) if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x0d) - if_chr_dying(CHR_DRCAROLL, /*goto*/ 0x0d) - if_chr_unloaded(CHR_DRCAROLL, /*goto*/ 0x0d) + if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x0d) + if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x0d) if_door_state(0xae, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2e) reloop(0x04) @@ -2322,8 +2322,8 @@ u8 func1009_msg_getoutofhere[] = { beginloop(0x08) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0d) if_timer_gt(120, /*goto*/ 0x2e) endloop(0x08) @@ -2507,8 +2507,8 @@ u8 func0414_teleport_bond_to_sapa[] = { set_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dying(CHR_COOP, /*goto*/ 0x61) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x61) + if_chr_dead(CHR_COOP, /*goto*/ 0x61) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2516,8 +2516,8 @@ u8 func0414_teleport_bond_to_sapa[] = { label(0x08) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x06) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x06) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x06) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x06) beginloop(0x63) chr_move_to_pad(CHR_ELVIS, 0x01c6, 0x01, /*goto*/ 0x06) @@ -2537,8 +2537,8 @@ u8 func0414_teleport_bond_to_sapa[] = { set_stage_flag(STAGEFLAG_TELEPORT_DONE) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dying(CHR_COOP, /*goto*/ 0x61) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x61) + if_chr_dead(CHR_COOP, /*goto*/ 0x61) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) set_ailist(CHR_ELVIS, AILIST_ELVIS_GIVE_FARSIGHT) @@ -2551,15 +2551,15 @@ u8 func0415_teleport_bond_to_drcaroll[] = { set_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dying(CHR_COOP, /*goto*/ 0x61) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x61) + if_chr_dead(CHR_COOP, /*goto*/ 0x61) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) set_ailist(CHR_ELVIS, AILIST_ELVIS_STOP) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x07) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x07) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) beginloop(0x65) chr_move_to_pad(CHR_ELVIS, 0x01bf, 0x01, /*goto*/ 0x06) @@ -2583,8 +2583,8 @@ u8 func0415_teleport_bond_to_drcaroll[] = { set_stage_flag(STAGEFLAG_TELEPORT_DONE) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dying(CHR_COOP, /*goto*/ 0x61) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x61) + if_chr_dead(CHR_COOP, /*goto*/ 0x61) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2604,8 +2604,8 @@ u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { set_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dying(CHR_COOP, /*goto*/ 0x61) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x61) + if_chr_dead(CHR_COOP, /*goto*/ 0x61) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2618,14 +2618,14 @@ u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { // PA if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dying(CHR_COOP, /*goto*/ 0x61) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x61) + if_chr_dead(CHR_COOP, /*goto*/ 0x61) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x07) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x07) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) beginloop(0x66) chr_move_to_pad(CHR_ELVIS, 0x01be, 0x01, /*goto*/ 0x06) @@ -2646,8 +2646,8 @@ u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { yield if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dying(CHR_COOP, /*goto*/ 0x61) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x61) + if_chr_dead(CHR_COOP, /*goto*/ 0x61) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2665,14 +2665,14 @@ u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { label(0x09) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dying(CHR_COOP, /*goto*/ 0x61) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x61) + if_chr_dead(CHR_COOP, /*goto*/ 0x61) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x07) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x07) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) beginloop(0x6b) chr_move_to_pad(CHR_ELVIS, 0x0040, 0x01, /*goto*/ 0x06) @@ -2694,8 +2694,8 @@ u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { set_stage_flag(STAGEFLAG_TELEPORT_DONE) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dying(CHR_COOP, /*goto*/ 0x61) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x61) + if_chr_dead(CHR_COOP, /*goto*/ 0x61) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2748,8 +2748,8 @@ u8 func100b_coop_teleports[] = { label(0x5e) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dying(CHR_BOND, /*goto*/ 0x61) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x61) + if_chr_dead(CHR_BOND, /*goto*/ 0x61) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2794,8 +2794,8 @@ u8 func100b_coop_teleports[] = { label(0x5e) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dying(CHR_BOND, /*goto*/ 0x61) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x61) + if_chr_dead(CHR_BOND, /*goto*/ 0x61) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2852,8 +2852,8 @@ u8 func100b_coop_teleports[] = { label(0x5e) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dying(CHR_BOND, /*goto*/ 0x61) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x61) + if_chr_dead(CHR_BOND, /*goto*/ 0x61) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2876,8 +2876,8 @@ u8 func100b_coop_teleports[] = { u8 func0417_teleport_coop_to_sapa[] = { if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dying(CHR_BOND, /*goto*/ 0x61) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x61) + if_chr_dead(CHR_BOND, /*goto*/ 0x61) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2885,8 +2885,8 @@ u8 func0417_teleport_coop_to_sapa[] = { label(0x08) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x06) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x06) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x06) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x06) beginloop(0x63) chr_move_to_pad(CHR_ELVIS, 0x01c6, 0x01, /*goto*/ 0x06) @@ -2906,8 +2906,8 @@ u8 func0417_teleport_coop_to_sapa[] = { set_stage_flag(STAGEFLAG_TELEPORT_DONE) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dying(CHR_BOND, /*goto*/ 0x61) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x61) + if_chr_dead(CHR_BOND, /*goto*/ 0x61) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2921,15 +2921,15 @@ u8 func0417_teleport_coop_to_sapa[] = { u8 func0418_teleport_coop_to_drcaroll[] = { if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dying(CHR_BOND, /*goto*/ 0x61) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x61) + if_chr_dead(CHR_BOND, /*goto*/ 0x61) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) set_ailist(CHR_ELVIS, AILIST_ELVIS_STOP) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x07) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x07) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) beginloop(0x65) chr_move_to_pad(CHR_ELVIS, 0x01bf, 0x01, /*goto*/ 0x06) @@ -2953,8 +2953,8 @@ u8 func0418_teleport_coop_to_drcaroll[] = { set_stage_flag(STAGEFLAG_TELEPORT_DONE) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dying(CHR_BOND, /*goto*/ 0x61) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x61) + if_chr_dead(CHR_BOND, /*goto*/ 0x61) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2972,8 +2972,8 @@ u8 func0418_teleport_coop_to_drcaroll[] = { u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dying(CHR_BOND, /*goto*/ 0x61) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x61) + if_chr_dead(CHR_BOND, /*goto*/ 0x61) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2985,14 +2985,14 @@ u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { // PA if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dying(CHR_BOND, /*goto*/ 0x61) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x61) + if_chr_dead(CHR_BOND, /*goto*/ 0x61) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x07) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x07) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) beginloop(0x66) chr_move_to_pad(CHR_ELVIS, 0x01be, 0x01, /*goto*/ 0x06) @@ -3013,8 +3013,8 @@ u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { yield if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dying(CHR_BOND, /*goto*/ 0x61) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x61) + if_chr_dead(CHR_BOND, /*goto*/ 0x61) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -3031,13 +3031,13 @@ u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { label(0x09) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dying(CHR_BOND, /*goto*/ 0x61) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x61) + if_chr_dead(CHR_BOND, /*goto*/ 0x61) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x07) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x07) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) beginloop(0x6b) chr_move_to_pad(CHR_ELVIS, 0x0040, 0x01, /*goto*/ 0x06) @@ -3059,8 +3059,8 @@ u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { set_stage_flag(STAGEFLAG_TELEPORT_DONE) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dying(CHR_BOND, /*goto*/ 0x61) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x61) + if_chr_dead(CHR_BOND, /*goto*/ 0x61) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -3154,9 +3154,9 @@ u8 func041d_sniper[] = { set_self_chrflag(CHRCFLAG_00000040) set_shotlist(AILIST_SNIPER) set_chr_cloaked(CHR_SELF, TRUE, FALSE) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x03) // Dying @@ -3223,9 +3223,9 @@ u8 func041d_sniper[] = { set_chr_cloaked(CHR_SELF, FALSE, TRUE) label(0x0a) label(0x2e) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x2e) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x2e) label(0x2e) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x0b) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x0b) beginloop(0x0b) if_chr_stopped(/*goto*/ 0x0c) @@ -3316,14 +3316,14 @@ u8 func100c_countdown_timer[] = { yield label(0x2e) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2e) - if_chr_dying(CHR_BOND, /*goto*/ 0x2e) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2e) + if_chr_dead(CHR_BOND, /*goto*/ 0x2e) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2e) goto_next(0x06) label(0x2e) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2e) - if_chr_dying(CHR_COOP, /*goto*/ 0x2e) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2e) + if_chr_dead(CHR_COOP, /*goto*/ 0x2e) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2e) goto_next(0x06) // Both players dead @@ -3343,8 +3343,8 @@ u8 func100c_countdown_timer[] = { u8 func100e_check_elvis_dead[] = { beginloop(0x04) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2e) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x2e) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x2e) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x2e) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2e) endloop(0x04) label(0x2e) @@ -3357,8 +3357,8 @@ u8 func100e_check_elvis_dead[] = { u8 func100f_check_drcaroll_dead[] = { beginloop(0x04) if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x2e) - if_chr_dying(CHR_DRCAROLL, /*goto*/ 0x2e) - if_chr_unloaded(CHR_DRCAROLL, /*goto*/ 0x2e) + if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x2e) + if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x2e) endloop(0x04) label(0x2e) @@ -3412,9 +3412,9 @@ u8 func040e_init_miniskedar[] = { u8 func040f_miniskedar[] = { set_shotlist(AILIST_MINISKEDAR) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -4109,12 +4109,12 @@ u8 func0420_init_pa_deadendroom_miniskedar[] = { u8 func1021_c6c4[] = { beginloop(0x04) if_stage_flag_eq(STAGEFLAG_PA_MIDDOORCYLINDER_DESTROYED, TRUE, /*goto*/ 0x2e) - if_chr_dying(0x30, /*goto*/ 0x2e) - if_chr_dying(0x31, /*goto*/ 0x2e) - if_chr_dying(0x32, /*goto*/ 0x2e) - if_chr_dying(0x33, /*goto*/ 0x2e) - if_chr_dying(0x34, /*goto*/ 0x2e) - if_chr_dying(0x35, /*goto*/ 0x2e) + if_chr_dead(0x30, /*goto*/ 0x2e) + if_chr_dead(0x31, /*goto*/ 0x2e) + if_chr_dead(0x32, /*goto*/ 0x2e) + if_chr_dead(0x33, /*goto*/ 0x2e) + if_chr_dead(0x34, /*goto*/ 0x2e) + if_chr_dead(0x35, /*goto*/ 0x2e) endloop(0x04) label(0x2e) @@ -4205,15 +4205,15 @@ u8 func1022_control_room[] = { endloop(0x04) label(0x2e) - if_chr_dying(CHR_BLONDE1, /*goto*/ 0x2e) + if_chr_dead(CHR_BLONDE1, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_BLONDE1, /*goto*/ 0x2e) - if_chr_unloaded(CHR_BLONDE1, /*goto*/ 0x2e) + if_chr_knockedout(CHR_BLONDE1, /*goto*/ 0x2e) goto_first(0x04) label(0x2e) - if_chr_dying(CHR_BLONDE2, /*goto*/ 0x2e) + if_chr_dead(CHR_BLONDE2, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_BLONDE2, /*goto*/ 0x2e) - if_chr_unloaded(CHR_BLONDE2, /*goto*/ 0x2e) + if_chr_knockedout(CHR_BLONDE2, /*goto*/ 0x2e) goto_first(0x04) label(0x2e) @@ -4230,11 +4230,11 @@ u8 func1023_check_drcaroll_restored[] = { beginloop(0x04) if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x0d) - if_chr_dying(CHR_DRCAROLL, /*goto*/ 0x0d) - if_chr_unloaded(CHR_DRCAROLL, /*goto*/ 0x0d) + if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x0d) + if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x0d) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0d) chr_toggle_p1p2(CHR_SELF) if_chr_distance_to_pad_lt(CHR_P1P2, 200, 0x0193, /*goto*/ 0x2e) reloop(0x04) @@ -4264,17 +4264,17 @@ u8 func1023_check_drcaroll_restored[] = { u8 func1024_update_elvis_target_chr[] = { beginloop(0x04) - if_chr_dying(CHR_BOND, /*goto*/ 0x08) + if_chr_dead(CHR_BOND, /*goto*/ 0x08) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x08) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x08) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x08) set_chr_target_chr(CHR_ELVIS, CHR_BOND) unset_stage_flag(STAGEFLAG_ELVIS_FOLLOWING_COOP) endloop(0x04) beginloop(0x08) - if_chr_dying(CHR_COOP, /*goto*/ 0x2e) + if_chr_dead(CHR_COOP, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2e) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2e) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2e) set_chr_target_chr(CHR_ELVIS, CHR_COOP) set_stage_flag(STAGEFLAG_ELVIS_FOLLOWING_COOP) endloop(0x08) @@ -4309,9 +4309,9 @@ u8 func042e_elvis_run_to_exit[] = { set_shotlist(AILIST_ELVIS_RUN_TO_EXIT) set_returnlist(CHR_SELF, AILIST_ELVIS_RUN_TO_EXIT) set_target_chr(CHR_PRESET) - if_chr_dying(CHR_SELF, /*goto*/ 0x2e) + if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -4476,8 +4476,8 @@ u8 func102a_kill_pelagic_guard[] = { u8 func102b_proxymines[] = { beginloop(0x04) if_chr_death_animation_finished(0x08, /*goto*/ 0x06) - if_chr_dying(0x08, /*goto*/ 0x06) - if_chr_unloaded(0x08, /*goto*/ 0x06) + if_chr_dead(0x08, /*goto*/ 0x06) + if_chr_knockedout(0x08, /*goto*/ 0x06) if_stage_flag_eq(STAGEFLAG_PURPLE_GUARD_SHOT_JO_OR_ELVIS, TRUE, /*goto*/ 0x2e) endloop(0x04) diff --git a/src/files/setup/setuppete.c b/src/files/setup/setuppete.c index 88bb5e3a4..c0bf14994 100644 --- a/src/files/setup/setuppete.c +++ b/src/files/setup/setuppete.c @@ -720,8 +720,8 @@ u8 func100f_check_mine[] = { beginloop(0x11) dprint 'M','A','I','N','\n',0, if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x29) - if_chr_dying(CHR_TARGET, /*goto*/ 0x29) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x29) + if_chr_dead(CHR_TARGET, /*goto*/ 0x29) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x29) if_ammo_quantity_lt(CHR_TARGET, AMMOTYPE_REMOTE_MINE, 1, /*goto*/ 0x03) endloop(0x11) @@ -730,8 +730,8 @@ u8 func100f_check_mine[] = { yield dprint 'D','E','A','D','\n',0, if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x28) - if_chr_dying(CHR_TARGET, /*goto*/ 0x28) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x28) + if_chr_dead(CHR_TARGET, /*goto*/ 0x28) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x28) yield dprint 'N','O','T','D','E','A','D','\n',0, if_ammo_quantity_lt(CHR_BOND, AMMOTYPE_REMOTE_MINE, 1, /*goto*/ 0x29) @@ -992,8 +992,8 @@ u8 func040c_taxi[] = { dprint 'B','U','G',' ','C','1','\n',0, \ set_target_chr(chr2) \ if_chr_death_animation_finished(chr, /*goto*/ 0x2f) \ - if_chr_dying(chr, /*goto*/ 0x2f) \ - if_chr_unloaded(chr, /*goto*/ 0x2f) \ + if_chr_dead(chr, /*goto*/ 0x2f) \ + if_chr_knockedout(chr, /*goto*/ 0x2f) \ if_ammo_quantity_lt(chr, AMMOTYPE_BUG, 1, /*goto*/ 0x03) \ label(0x04) \ endloop(0x11) \ @@ -1003,8 +1003,8 @@ u8 func040c_taxi[] = { dprint 'B','U','G',' ','D','O','\n',0, \ set_target_chr(chr2) \ if_chr_death_animation_finished(chr, /*goto*/ 0x30) \ - if_chr_dying(chr, /*goto*/ 0x30) \ - if_chr_unloaded(chr, /*goto*/ 0x30) \ + if_chr_dead(chr, /*goto*/ 0x30) \ + if_chr_knockedout(chr, /*goto*/ 0x30) \ label(0x31) \ yield \ yield \ @@ -1110,7 +1110,7 @@ u8 func1005_check_things_destroyed[] = { label(0x03) if_stage_flag_eq(STAGEFLAG_DIVERSION_CREATED, TRUE, /*goto*/ 0x03) if_stage_flag_eq(STAGEFLAG_ROBOT_DESTROYED, TRUE, /*goto*/ 0x03) - if_chr_dying(CHR_ROBOT, /*goto*/ 0x04) + if_chr_dead(CHR_ROBOT, /*goto*/ 0x04) goto_next(0x03) label(0x04) @@ -1184,14 +1184,14 @@ u8 func1006_check_for_end[] = { // Objectives complete label(0x05) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x03) - if_chr_dying(CHR_BOND, /*goto*/ 0x03) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x03) + if_chr_dead(CHR_BOND, /*goto*/ 0x03) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x03) goto_next(0x04) label(0x03) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x03) - if_chr_dying(CHR_COOP, /*goto*/ 0x03) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x03) + if_chr_dead(CHR_COOP, /*goto*/ 0x03) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x03) goto_next(0x04) label(0x03) @@ -1289,9 +1289,9 @@ u8 func040c_taxi_timing[] = { u8 func0412_cia[] = { set_returnlist(CHR_SELF, AILIST_CIA) set_shotlist(AILIST_CIA) - if_chr_dying(CHR_SELF, /*goto*/ 0x04) + if_chr_dead(CHR_SELF, /*goto*/ 0x04) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x04) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x04) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x04) goto_next(0x03) label(0x04) @@ -1560,9 +1560,9 @@ u8 func0413_bugspotter[] = { set_alertness(255) set_shotlist(AILIST_BUGSPOTTER) - if_chr_dying(CHR_SELF, /*goto*/ 0x04) + if_chr_dead(CHR_SELF, /*goto*/ 0x04) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x04) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x04) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x04) goto_next(0x03) label(0x04) @@ -1793,9 +1793,9 @@ u8 func0419_init_cia1[] = { u8 func041d_fbi[] = { set_shotlist(AILIST_FBI) - if_chr_dying(CHR_SELF, /*goto*/ 0x04) + if_chr_dead(CHR_SELF, /*goto*/ 0x04) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x04) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x04) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x04) goto_next(0x03) label(0x04) @@ -1900,7 +1900,7 @@ u8 func041d_fbi[] = { #define check_cia_dead(chr) \ beginloop(0x10) \ - if_chr_dying(chr, /*goto*/ 0x05) \ + if_chr_dead(chr, /*goto*/ 0x05) \ endloop(0x10) \ \ /* Unreachable */ \ @@ -1925,7 +1925,7 @@ u8 func1009_check_cia1_dead[] = { u8 func100a_check_cia2_dead[] = { beginloop(0x10) if_chr_has_flag_bankx(CHR_CIA2, CHRFLAG0_00002000, BANK_0, /*goto*/ 0x03) - if_chr_dying(CHR_CIA2, /*goto*/ 0x05) + if_chr_dead(CHR_CIA2, /*goto*/ 0x05) endloop(0x10) // Stop checking this chr @@ -1960,7 +1960,7 @@ u8 func041b_init_robot[] = { u8 func041a_robot[] = { set_self_chrflag(CHRCFLAG_00040000) set_chr_maxdamage(CHR_SELF, 1) - if_chr_dying(CHR_SELF, /*goto*/ 0x0c) + if_chr_dead(CHR_SELF, /*goto*/ 0x0c) assign_path(0) start_path @@ -2040,7 +2040,7 @@ u8 func041a_robot[] = { label(0x03) set_target_chr(CHR_P1P2) restart_timer - try_aim_and_shoot_thing1(0x0200, 0x0000, /*goto*/ 0x09) + try_attack_stand1(0x0200, 0x0000, /*goto*/ 0x09) reloop(0x02) beginloop(0x09) @@ -3019,22 +3019,22 @@ u8 func101d_msg_pointofingress[] = { u8 func101e_check_sealer_guards_dead[] = { beginloop(0x10) if_stage_flag_eq(STAGEFLAG_ELEVATOR_SEALED, TRUE, /*goto*/ 0x06) - if_chr_dying(CHR_SEALER1, /*goto*/ 0x03) + if_chr_dead(CHR_SEALER1, /*goto*/ 0x03) if_chr_death_animation_finished(CHR_SEALER1, /*goto*/ 0x03) endloop(0x10) label(0x03) - if_chr_dying(CHR_SEALER2, /*goto*/ 0x03) + if_chr_dead(CHR_SEALER2, /*goto*/ 0x03) if_chr_death_animation_finished(CHR_SEALER2, /*goto*/ 0x03) goto_first(0x10) label(0x03) - if_chr_dying(CHR_SEALER3, /*goto*/ 0x03) + if_chr_dead(CHR_SEALER3, /*goto*/ 0x03) if_chr_death_animation_finished(CHR_SEALER3, /*goto*/ 0x03) goto_first(0x10) label(0x03) - if_chr_dying(CHR_SEALER4, /*goto*/ 0x03) + if_chr_dead(CHR_SEALER4, /*goto*/ 0x03) if_chr_death_animation_finished(CHR_SEALER4, /*goto*/ 0x03) goto_first(0x10) diff --git a/src/files/setup/setuprit.c b/src/files/setup/setuprit.c index 27e732191..872837a54 100644 --- a/src/files/setup/setuprit.c +++ b/src/files/setup/setuprit.c @@ -856,9 +856,9 @@ u8 func0403_stripes[] = { // Got target label(0x06) if_target_is_player(/*goto*/ 0x06) - if_chr_dying(CHR_TARGET, /*goto*/ 0x2d) + if_chr_dead(CHR_TARGET, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2d) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x2d) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2d) set_returnlist(CHR_SELF, AILIST_STRIPES) set_shotlist(AILIST_STRIPES) set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET) @@ -1090,14 +1090,14 @@ u8 func1009_check_end_level[] = { yield label(0x06) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) - if_chr_dying(CHR_BOND, /*goto*/ 0x2d) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2d) + if_chr_dead(CHR_BOND, /*goto*/ 0x2d) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d) - if_chr_dying(CHR_COOP, /*goto*/ 0x2d) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2d) + if_chr_dead(CHR_COOP, /*goto*/ 0x2d) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2d) goto_next(0x06) // Both players dead @@ -1107,14 +1107,14 @@ u8 func1009_check_end_level[] = { // Redundant check label(0x06) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) - if_chr_dying(CHR_BOND, /*goto*/ 0x2d) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2d) + if_chr_dead(CHR_BOND, /*goto*/ 0x2d) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d) - if_chr_dying(CHR_COOP, /*goto*/ 0x2d) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2d) + if_chr_dead(CHR_COOP, /*goto*/ 0x2d) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) @@ -1180,8 +1180,8 @@ u8 func0406_init_president[] = { u8 func0405_president_in_room[] = { set_shotlist(AILIST_PRESIDENT_IN_ROOM) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) - if_chr_dying(CHR_SELF, /*goto*/ 0x2d) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2d) + if_chr_dead(CHR_SELF, /*goto*/ 0x2d) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2d) goto_next(0x06) // Dying @@ -1197,8 +1197,8 @@ u8 func0405_president_in_room[] = { beginloop(0x04) if_stage_flag_eq(STAGEFLAG_00100000, TRUE, /*goto*/ 0x03) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) - if_chr_dying(CHR_SELF, /*goto*/ 0x2d) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2d) + if_chr_dead(CHR_SELF, /*goto*/ 0x2d) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2d) endloop(0x04) // Dying @@ -1435,9 +1435,9 @@ u8 func0404_president_running[] = { set_self_chrflag(CHRCFLAG_01000000) set_shotlist(AILIST_PRESIDENT_RUNNING) set_target_chr(CHR_PRESET) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) // Dying @@ -1631,9 +1631,9 @@ u8 func0404_president_running[] = { u8 func100b_check_president_dead[] = { beginloop(0x04) - if_chr_dying(CHR_PRESIDENT, /*goto*/ 0x06) + if_chr_dead(CHR_PRESIDENT, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_PRESIDENT, /*goto*/ 0x06) - if_chr_unloaded(CHR_PRESIDENT, /*goto*/ 0x06) + if_chr_knockedout(CHR_PRESIDENT, /*goto*/ 0x06) endloop(0x04) label(0x06) @@ -1652,9 +1652,9 @@ u8 func0409_unused[] = { label(0x06) if_target_is_player(/*goto*/ 0x06) - if_chr_dying(CHR_TARGET, /*goto*/ 0x2d) + if_chr_dead(CHR_TARGET, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2d) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x2d) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2d) set_returnlist(CHR_SELF, 0x0409) set_shotlist(0x0409) set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET) @@ -1695,9 +1695,9 @@ u8 func100c_cockpit_stripes[] = { label(0x06) if_target_is_player(/*goto*/ 0x06) - if_chr_dying(CHR_TARGET, /*goto*/ 0x2d) + if_chr_dead(CHR_TARGET, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2d) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x2d) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2d) set_returnlist(CHR_SELF, AILIST_COCKPIT_STRIPES) set_shotlist(GAILIST_COMBAT_WITH_TARGET) set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET) @@ -1772,11 +1772,11 @@ u8 func0413_taker[] = { label(0x06) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x11) - if_chr_dying(CHR_TARGET, /*goto*/ 0x11) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x11) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x06) + if_chr_dead(CHR_TARGET, /*goto*/ 0x11) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x11) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x06) label(0x06) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x08) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x08) label(0x08) say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x00, BANK_0, 0x00, 0x00) say_quip(CHR_BOND, QUIP_ATTACK2, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) @@ -1800,7 +1800,7 @@ u8 func0413_taker[] = { endloop(0x0b) label(0x06) - if_chr_dying(CHR_TARGET, /*goto*/ 0x06) + if_chr_dead(CHR_TARGET, /*goto*/ 0x06) goto_first(0x0a) label(0x11) @@ -1843,15 +1843,15 @@ u8 func100c_cockpit[] = { endloop(0x04) label(0x2d) - if_chr_dying(CHR_TAKER1, /*goto*/ 0x2d) + if_chr_dead(CHR_TAKER1, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_TAKER1, /*goto*/ 0x2d) - if_chr_unloaded(CHR_TAKER1, /*goto*/ 0x2d) + if_chr_knockedout(CHR_TAKER1, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) - if_chr_dying(CHR_TAKER2, /*goto*/ 0x2d) + if_chr_dead(CHR_TAKER2, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_TAKER2, /*goto*/ 0x2d) - if_chr_unloaded(CHR_TAKER2, /*goto*/ 0x2d) + if_chr_knockedout(CHR_TAKER2, /*goto*/ 0x2d) goto_next(0x06) // Both takers dead @@ -2321,8 +2321,8 @@ u8 func040a_defend_pad[] = { set_shotlist(AILIST_DEFEND_PAD) set_returnlist(CHR_SELF, AILIST_DEFEND_PAD) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) - if_chr_dying(CHR_SELF, /*goto*/ 0x2d) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2d) + if_chr_dead(CHR_SELF, /*goto*/ 0x2d) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2d) goto_next(0x06) // Dying @@ -2726,9 +2726,9 @@ u8 func041e_blonde[] = { rebuild_squadrons set_accuracy(30) set_shotlist(AILIST_BLONDE) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) // Dying @@ -2756,7 +2756,7 @@ u8 func041e_blonde[] = { set_self_chrflag(CHRCFLAG_00000040) label(0x68) if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x06) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x75) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x75) label(0x06) kneel @@ -2782,7 +2782,7 @@ u8 func041e_blonde[] = { goto_next(0x6c) // Unreachable - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x6d) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x6d) goto_next(0x6e) // Reachable from below @@ -2843,7 +2843,7 @@ u8 func041e_blonde[] = { label(0x6c) say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x06) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x06) label(0x06) goto_first(0x6d) @@ -2851,10 +2851,10 @@ u8 func041e_blonde[] = { goto_first(0x6e) label(0x76) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x74) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x74) label(0x74) say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x06) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x06) goto_next(0x2d) label(0x06) goto_first(0x6d) @@ -2916,10 +2916,10 @@ u8 func0420_trent_attacking[] = { // President in sight label(0x06) label(0x76) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x74) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x74) label(0x74) say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x08) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x08) goto_next(0x2d) beginloop(0x08) @@ -2927,9 +2927,9 @@ u8 func0420_trent_attacking[] = { endloop(0x08) label(0x06) - if_chr_dying(CHR_TARGET, /*goto*/ 0x09) + if_chr_dead(CHR_TARGET, /*goto*/ 0x09) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x09) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x09) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x09) goto_first(0x03) label(0x2d) @@ -2974,13 +2974,13 @@ u8 func0422_trent_running[] = { u8 func1012_check_blondes_dead[] = { beginloop(0x04) - if_chr_dying(CHR_BLONDE1, /*goto*/ 0x2d) + if_chr_dead(CHR_BLONDE1, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_BLONDE1, /*goto*/ 0x2d) - if_chr_unloaded(CHR_BLONDE1, /*goto*/ 0x2d) + if_chr_knockedout(CHR_BLONDE1, /*goto*/ 0x2d) - if_chr_dying(CHR_BLONDE2, /*goto*/ 0x06) + if_chr_dead(CHR_BLONDE2, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_BLONDE2, /*goto*/ 0x06) - if_chr_unloaded(CHR_BLONDE2, /*goto*/ 0x06) + if_chr_knockedout(CHR_BLONDE2, /*goto*/ 0x06) reloop(0x04) // Blonde 2 dead @@ -2991,9 +2991,9 @@ u8 func1012_check_blondes_dead[] = { // Blonde 1 dead label(0x2d) set_stage_flag(STAGEFLAG_ONE_BLONDE_DEAD) - if_chr_dying(CHR_BLONDE2, /*goto*/ 0x2d) + if_chr_dead(CHR_BLONDE2, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_BLONDE2, /*goto*/ 0x2d) - if_chr_unloaded(CHR_BLONDE2, /*goto*/ 0x2d) + if_chr_knockedout(CHR_BLONDE2, /*goto*/ 0x2d) endloop(0x04) // Both blondes dead @@ -3042,13 +3042,13 @@ u8 func0429_be_unalert[] = { set_alertness(0) label(0x03) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x04) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x04) beginloop(0x04) if_chr_stopped(/*goto*/ 0x06) - if_chr_dying(CHR_PRESIDENT, /*goto*/ 0x2d) + if_chr_dead(CHR_PRESIDENT, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_PRESIDENT, /*goto*/ 0x2d) - if_chr_unloaded(CHR_PRESIDENT, /*goto*/ 0x2d) + if_chr_knockedout(CHR_PRESIDENT, /*goto*/ 0x2d) endloop(0x04) label(0x06) @@ -3273,9 +3273,9 @@ u8 func0407_steward_shot[] = { u8 func0407_stewardess[] = { set_chr_maxdamage(CHR_SELF, 0) set_shotlist(AILIST_STEWARDESS) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x03) label(0x06) @@ -3288,9 +3288,9 @@ u8 func0407_stewardess[] = { label(0x2d) if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x2d) if_saw_injury(0x00, /*goto*/ 0x2d) - if_chr_dying(CHR_STEWARD, /*goto*/ 0x2d) + if_chr_dead(CHR_STEWARD, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_STEWARD, /*goto*/ 0x2d) - if_chr_unloaded(CHR_STEWARD, /*goto*/ 0x2d) + if_chr_knockedout(CHR_STEWARD, /*goto*/ 0x2d) endloop(0x03) // Alerted @@ -3828,8 +3828,8 @@ u8 func101d_handle_early_president_death[] = { beginloop(0x08) if_chr_death_animation_finished(CHR_PRESIDENT, /*goto*/ 0x2d) - if_chr_dying(CHR_PRESIDENT, /*goto*/ 0x2d) - if_chr_unloaded(CHR_PRESIDENT, /*goto*/ 0x2d) + if_chr_dead(CHR_PRESIDENT, /*goto*/ 0x2d) + if_chr_knockedout(CHR_PRESIDENT, /*goto*/ 0x2d) endloop(0x08) label(0x2d) diff --git a/src/files/setup/setupsev.c b/src/files/setup/setupsev.c index eaff03e35..e95af4805 100644 --- a/src/files/setup/setupsev.c +++ b/src/files/setup/setupsev.c @@ -1362,14 +1362,14 @@ u8 func1009_check_for_exit[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_COOP, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c) - if_chr_dying(CHR_BOND, /*goto*/ 0x2c) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2c) + if_chr_dead(CHR_BOND, /*goto*/ 0x2c) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c) - if_chr_dying(CHR_COOP, /*goto*/ 0x2c) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2c) + if_chr_dead(CHR_COOP, /*goto*/ 0x2c) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2c) goto_next(0x06) // Both players dead @@ -1469,14 +1469,14 @@ u8 func100b_check_medlab_escapable[] = { // Timer expired, and no glass was broken. Check if lab techs are dead. label(0x2c) if_chr_death_animation_finished(CHR_LABTECH1, /*goto*/ 0x63) - if_chr_dying(CHR_LABTECH1, /*goto*/ 0x63) - if_chr_unloaded(CHR_LABTECH1, /*goto*/ 0x63) + if_chr_dead(CHR_LABTECH1, /*goto*/ 0x63) + if_chr_knockedout(CHR_LABTECH1, /*goto*/ 0x63) goto_next(0x06) label(0x63) if_chr_death_animation_finished(CHR_LABTECH2, /*goto*/ 0x65) - if_chr_dying(CHR_LABTECH2, /*goto*/ 0x65) - if_chr_unloaded(CHR_LABTECH2, /*goto*/ 0x65) + if_chr_dead(CHR_LABTECH2, /*goto*/ 0x65) + if_chr_knockedout(CHR_LABTECH2, /*goto*/ 0x65) label(0x06) if_chr_has_object(CHR_BOND, OBJ_PSYCHOSISGUN, /*goto*/ 0x2c) diff --git a/src/files/setup/setupsho.c b/src/files/setup/setupsho.c index 3ed4568a3..63b94f997 100644 --- a/src/files/setup/setupsho.c +++ b/src/files/setup/setupsho.c @@ -501,9 +501,9 @@ u8 func0401_init_unarmed_skedar[] = { u8 func0402_unarmed_skedar[] = { set_shotlist(AILIST_UNARMED_SKEDAR) set_action(MA_NORMAL, TRUE) - if_chr_dying(CHR_SELF, /*goto*/ 0x2d) + if_chr_dead(CHR_SELF, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2d) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2d) goto_next(0x06) // Dying @@ -595,8 +595,8 @@ u8 func0402_unarmed_skedar[] = { if_chr_in_room(CHR_SELF, 0x00, 0x003b, /*goto*/ LABEL_HANDLE_PHOENIX_AREA) if_chr_in_room(CHR_SELF, 0x00, 0x0041, /*goto*/ LABEL_HANDLE_WALL_AREA) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dying(CHR_TARGET, /*goto*/ 0x10) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x10) + if_chr_dead(CHR_TARGET, /*goto*/ 0x10) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) if_target_moving_away(/*goto*/ 0x2d) if_distance_to_target_lt(150, /*goto*/ 0x2f) label(0x2d) @@ -621,8 +621,8 @@ u8 func0402_unarmed_skedar[] = { if_chr_in_room(CHR_SELF, 0x00, 0x003b, /*goto*/ LABEL_HANDLE_PHOENIX_AREA) if_chr_in_room(CHR_SELF, 0x00, 0x0041, /*goto*/ LABEL_HANDLE_WALL_AREA) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dying(CHR_TARGET, /*goto*/ 0x10) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x10) + if_chr_dead(CHR_TARGET, /*goto*/ 0x10) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) if_jo_ccw_direction_lt(10, /*goto*/ 0x06) if_jo_ccw_direction_gt(246, /*goto*/ 0x06) if_timer_gt(60, /*goto*/ 0x06) @@ -641,16 +641,16 @@ u8 func0402_unarmed_skedar[] = { if_chr_in_room(CHR_SELF, 0x00, 0x003b, /*goto*/ LABEL_HANDLE_PHOENIX_AREA) if_chr_in_room(CHR_SELF, 0x00, 0x0041, /*goto*/ LABEL_HANDLE_WALL_AREA) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dying(CHR_TARGET, /*goto*/ 0x10) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x10) + if_chr_dead(CHR_TARGET, /*goto*/ 0x10) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) if_chr_stopped(/*goto*/ 0x06) endloop(0x30) // Finished attack label(0x06) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dying(CHR_TARGET, /*goto*/ 0x10) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x10) + if_chr_dead(CHR_TARGET, /*goto*/ 0x10) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) goto_first(0xd9) // Killed target @@ -731,9 +731,9 @@ u8 func0403_init_miniskedar[] = { u8 func0404_miniskedar[] = { set_shotlist(AILIST_MINISKEDAR) - if_chr_dying(CHR_SELF, /*goto*/ 0x2d) + if_chr_dead(CHR_SELF, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2d) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2d) goto_next(0x06) // Dying @@ -1659,9 +1659,9 @@ u8 func040a_init_reaper_slayer_skedar[] = { u8 func0409_reaper_slayer_skedar[] = { unset_self_chrflag(CHRCFLAG_HIDDEN) set_shotlist(AILIST_REAPER_SLAYER_SKEDAR) - if_chr_dying(CHR_SELF, /*goto*/ 0x06) + if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) // Dying @@ -1693,7 +1693,7 @@ u8 func0409_reaper_slayer_skedar[] = { label(0x5e) if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x06) set_target_chr(CHR_BOND) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x5f) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x5f) label(0x06) kneel @@ -1800,10 +1800,10 @@ u8 func0409_reaper_slayer_skedar[] = { label(0x71) if_self_flag_bankx_eq(CHRFLAG0_00002000, FALSE, BANK_0, /*goto*/ 0x72) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x70) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x70) label(0x70) say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x06) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x06) goto_next(0x2d) label(0x72) @@ -2042,10 +2042,10 @@ u8 func040d_king_combat[] = { label(0x06) say_quip(CHR_BOND, QUIP_ATTACK2, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x70) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x70) label(0x70) say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x7b) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x7b) goto_next(0x2d) label(0x06) @@ -2288,8 +2288,8 @@ u8 func040e_king_skedar_spawner[] = { beginloop(0x04) if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x2d) - if_chr_dying(CHR_CLONE, /*goto*/ 0x2d) - if_chr_unloaded(CHR_CLONE, /*goto*/ 0x2d) + if_chr_dead(CHR_CLONE, /*goto*/ 0x2d) + if_chr_knockedout(CHR_CLONE, /*goto*/ 0x2d) goto_next(0x06) // Clone dead @@ -2302,8 +2302,8 @@ u8 func040e_king_skedar_spawner[] = { label(0x4f) if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x4f) - if_chr_dying(CHR_CLONE, /*goto*/ 0x4f) - if_chr_unloaded(CHR_CLONE, /*goto*/ 0x4f) + if_chr_dead(CHR_CLONE, /*goto*/ 0x4f) + if_chr_knockedout(CHR_CLONE, /*goto*/ 0x4f) reloop(0x04) label(0x4f) @@ -2345,8 +2345,8 @@ u8 func0411_king_miniskedar_spawner[] = { beginloop(0x04) if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x2d) - if_chr_dying(CHR_CLONE, /*goto*/ 0x2d) - if_chr_unloaded(CHR_CLONE, /*goto*/ 0x2d) + if_chr_dead(CHR_CLONE, /*goto*/ 0x2d) + if_chr_knockedout(CHR_CLONE, /*goto*/ 0x2d) goto_next(0x06) // Clone dead @@ -2360,8 +2360,8 @@ u8 func0411_king_miniskedar_spawner[] = { // Redundant check label(0x4f) if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x4f) - if_chr_dying(CHR_CLONE, /*goto*/ 0x4f) - if_chr_unloaded(CHR_CLONE, /*goto*/ 0x4f) + if_chr_dead(CHR_CLONE, /*goto*/ 0x4f) + if_chr_knockedout(CHR_CLONE, /*goto*/ 0x4f) reloop(0x04) // Spawn clone @@ -2494,14 +2494,14 @@ u8 func1014_spike_top[] = { set_stage_flag(STAGEFLAG_SPIKE5_DESTROYED) yield if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) - if_chr_dying(CHR_BOND, /*goto*/ 0x2d) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2d) + if_chr_dead(CHR_BOND, /*goto*/ 0x2d) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d) - if_chr_dying(CHR_COOP, /*goto*/ 0x2d) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2d) + if_chr_dead(CHR_COOP, /*goto*/ 0x2d) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) diff --git a/src/files/setup/setupstat.c b/src/files/setup/setupstat.c index f773db64b..de3bffdf4 100644 --- a/src/files/setup/setupstat.c +++ b/src/files/setup/setupstat.c @@ -331,9 +331,9 @@ u8 func0402_init_king[] = { u8 func0401_defend[] = { set_shotlist(AILIST_DEFEND) set_self_chrflag(CHRCFLAG_NOAUTOAIM) - if_chr_dying(CHR_SELF, /*goto*/ 0x2d) + if_chr_dead(CHR_SELF, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2d) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2d) goto_next(0x06) // Dying @@ -390,9 +390,9 @@ u8 func0401_defend[] = { endloop(0x8f) label(0x2d) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x2d) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2d) - if_chr_dying(CHR_TARGET, /*goto*/ 0x2d) + if_chr_dead(CHR_TARGET, /*goto*/ 0x2d) dprint 'D','E','T','E','C','T','E','D','\n',0, set_returnlist(CHR_SELF, AILIST_DEFEND) set_shotlist(AILIST_DEFEND) @@ -518,17 +518,17 @@ u8 func0404_maian[] = { label(0x03) set_target_chr(CHR_KING1) - if_chr_dying(CHR_KING1, /*goto*/ 0x8f) + if_chr_dead(CHR_KING1, /*goto*/ 0x8f) if_chr_death_animation_finished(CHR_KING1, /*goto*/ 0x8f) - if_chr_unloaded(CHR_KING1, /*goto*/ 0x8f) + if_chr_knockedout(CHR_KING1, /*goto*/ 0x8f) goto_next(0x2d) // King 1 dead label(0x8f) set_target_chr(CHR_KING2) - if_chr_dying(CHR_KING2, /*goto*/ 0x90) + if_chr_dead(CHR_KING2, /*goto*/ 0x90) if_chr_death_animation_finished(CHR_KING2, /*goto*/ 0x90) - if_chr_unloaded(CHR_KING2, /*goto*/ 0x90) + if_chr_knockedout(CHR_KING2, /*goto*/ 0x90) goto_next(0x2d) // King 2 dead @@ -544,9 +544,9 @@ u8 func0404_maian[] = { beginloop(0x04) dprint 'G','O',' ','T','O',' ','P','A','D','\n',0, if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08) - if_chr_dying(CHR_TARGET, /*goto*/ 0x06) + if_chr_dead(CHR_TARGET, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x06) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x06) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x06) endloop(0x04) // King died while running to him @@ -556,9 +556,9 @@ u8 func0404_maian[] = { // Maian has line of sight to king label(0x08) dprint 'D','E','T','E','C','T','E','D','\n',0, - if_chr_dying(CHR_TARGET, /*goto*/ 0x06) + if_chr_dead(CHR_TARGET, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x06) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x06) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x06) set_returnlist(CHR_SELF, AILIST_MAIAN) set_shotlist(AILIST_MAIAN) set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET) @@ -902,8 +902,8 @@ u8 func0406_skedar[] = { u8 func1005_check_leader_dead[] = { beginloop(0x03) if_chr_death_animation_finished(CHR_MAIAN_LEADER, /*goto*/ 0x2d) - if_chr_dying(CHR_MAIAN_LEADER, /*goto*/ 0x2d) - if_chr_unloaded(CHR_MAIAN_LEADER, /*goto*/ 0x2d) + if_chr_dead(CHR_MAIAN_LEADER, /*goto*/ 0x2d) + if_chr_knockedout(CHR_MAIAN_LEADER, /*goto*/ 0x2d) endloop(0x03) label(0x2d) @@ -918,8 +918,8 @@ u8 func1009_check_king1_dead[] = { beginloop(0x03) if_chr_death_animation_finished(CHR_KING1, /*goto*/ 0x2d) - if_chr_dying(CHR_KING1, /*goto*/ 0x2d) - if_chr_unloaded(CHR_KING1, /*goto*/ 0x2d) + if_chr_dead(CHR_KING1, /*goto*/ 0x2d) + if_chr_knockedout(CHR_KING1, /*goto*/ 0x2d) endloop(0x03) label(0x2d) @@ -937,8 +937,8 @@ u8 func100a_check_king2_dead[] = { beginloop(0x03) if_chr_death_animation_finished(CHR_KING2, /*goto*/ 0x2d) - if_chr_dying(CHR_KING2, /*goto*/ 0x2d) - if_chr_unloaded(CHR_KING2, /*goto*/ 0x2d) + if_chr_dead(CHR_KING2, /*goto*/ 0x2d) + if_chr_knockedout(CHR_KING2, /*goto*/ 0x2d) endloop(0x03) label(0x2d) @@ -955,8 +955,8 @@ u8 func100b_check_king3_dead[] = { beginloop(0x03) if_chr_death_animation_finished(CHR_KING3, /*goto*/ 0x2d) - if_chr_dying(CHR_KING3, /*goto*/ 0x2d) - if_chr_unloaded(CHR_KING3, /*goto*/ 0x2d) + if_chr_dead(CHR_KING3, /*goto*/ 0x2d) + if_chr_knockedout(CHR_KING3, /*goto*/ 0x2d) endloop(0x03) label(0x2d) @@ -984,15 +984,15 @@ u8 func1007_check_end_level[] = { // Check Jo not dead label(0x2d) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) - if_chr_dying(CHR_BOND, /*goto*/ 0x2d) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2d) + if_chr_dead(CHR_BOND, /*goto*/ 0x2d) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2d) goto_next(0x06) // Check Velvet not dead label(0x2d) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d) - if_chr_dying(CHR_COOP, /*goto*/ 0x2d) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2d) + if_chr_dead(CHR_COOP, /*goto*/ 0x2d) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2d) goto_next(0x06) // Mission failed diff --git a/src/files/setup/setuptra.c b/src/files/setup/setuptra.c index 3ca1a90a5..fc0742f92 100644 --- a/src/files/setup/setuptra.c +++ b/src/files/setup/setuptra.c @@ -804,8 +804,8 @@ u8 func0403_init_jonathan[] = { u8 func0402_jonathan_waiting_for_meetup[] = { set_shotlist(AILIST_JONATHAN_WAITING_FOR_MEETUP) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) - if_chr_dying(CHR_SELF, /*goto*/ 0x32) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x32) + if_chr_dead(CHR_SELF, /*goto*/ 0x32) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x32) goto_next(0x67) label(0x32) @@ -875,8 +875,8 @@ u8 func0404_jonathan_following_and_mine[] = { set_returnlist(CHR_SELF, AILIST_JONATHAN_FOLLOWING_AND_MINE) set_shotlist(AILIST_JONATHAN_FOLLOWING_AND_MINE) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) - if_chr_dying(CHR_SELF, /*goto*/ 0x32) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x32) + if_chr_dead(CHR_SELF, /*goto*/ 0x32) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x32) goto_next(0x06) label(0x32) @@ -1058,8 +1058,8 @@ u8 func0413_jonathan_hangar[] = { set_returnlist(CHR_SELF, AILIST_JONATHAN_HANGAR) set_shotlist(AILIST_JONATHAN_HANGAR) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) - if_chr_dying(CHR_SELF, /*goto*/ 0x32) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x32) + if_chr_dead(CHR_SELF, /*goto*/ 0x32) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x32) goto_next(0x06) label(0x32) @@ -1116,16 +1116,16 @@ u8 func0413_jonathan_hangar[] = { // Start conversation label(0x06) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dying(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) restart_timer chr_do_animation(0x0232, -1, 200, 0x02, 0x00, CHR_ELVIS, 2) speak(CHR_P1P2, L_TRA(59), 0x1a9a, CHANNEL_5, COLOR_06_WHITE) // "Oh, no! We have a problem. It's a single seater!" beginloop(0x7d) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dying(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x7d) @@ -1140,8 +1140,8 @@ u8 func0413_jonathan_hangar[] = { beginloop(0x7e) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dying(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x7e) @@ -1155,8 +1155,8 @@ u8 func0413_jonathan_hangar[] = { beginloop(0x15) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dying(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x15) @@ -1171,8 +1171,8 @@ u8 func0413_jonathan_hangar[] = { beginloop(0x7f) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dying(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x7f) @@ -1186,8 +1186,8 @@ u8 func0413_jonathan_hangar[] = { beginloop(0x17) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dying(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) endloop(0x17) @@ -1202,8 +1202,8 @@ u8 func0413_jonathan_hangar[] = { beginloop(0x1a) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dying(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x1a) @@ -1217,8 +1217,8 @@ u8 func0413_jonathan_hangar[] = { beginloop(0x18) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dying(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x18) @@ -1232,8 +1232,8 @@ u8 func0413_jonathan_hangar[] = { beginloop(0x19) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dying(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x19) @@ -1252,8 +1252,8 @@ u8 func0413_jonathan_hangar[] = { label(0x66) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x06) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x06) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x06) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x06) set_ailist(CHR_ELVIS, AILIST_ELVIS_GO_TO_UFO) label(0x06) @@ -1367,8 +1367,8 @@ u8 func041c_elvis_go_to_ufo[] = { set_returnlist(CHR_SELF, AILIST_ELVIS_GO_TO_UFO) set_shotlist(AILIST_ELVIS_GO_TO_UFO) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) - if_chr_dying(CHR_SELF, /*goto*/ 0x32) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x32) + if_chr_dead(CHR_SELF, /*goto*/ 0x32) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x32) goto_next(0x06) label(0x32) @@ -1394,8 +1394,8 @@ u8 func041b_jonathan_after_terminals[] = { set_returnlist(CHR_SELF, AILIST_JONATHAN_AFTER_TERMINALS) set_shotlist(AILIST_JONATHAN_AFTER_TERMINALS) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) - if_chr_dying(CHR_SELF, /*goto*/ 0x32) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x32) + if_chr_dead(CHR_SELF, /*goto*/ 0x32) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x32) goto_next(0x06) label(0x32) @@ -1879,9 +1879,9 @@ u8 func100b_check_jonathan_dead[] = { // All difficulties beginloop(0x04) - if_chr_dying(CHR_JONATHAN, /*goto*/ 0x06) + if_chr_dead(CHR_JONATHAN, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_JONATHAN, /*goto*/ 0x06) - if_chr_unloaded(CHR_JONATHAN, /*goto*/ 0x06) + if_chr_knockedout(CHR_JONATHAN, /*goto*/ 0x06) endloop(0x04) label(0x06) @@ -1944,18 +1944,18 @@ u8 func100c_medpack_activation[] = { label(0x32) if_chr_death_animation_finished(CHR_JONATHAN, /*goto*/ 0x32) - if_chr_dying(CHR_JONATHAN, /*goto*/ 0x32) - if_chr_unloaded(CHR_JONATHAN, /*goto*/ 0x32) + if_chr_dead(CHR_JONATHAN, /*goto*/ 0x32) + if_chr_knockedout(CHR_JONATHAN, /*goto*/ 0x32) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x33) - if_chr_dying(CHR_BOND, /*goto*/ 0x33) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x33) + if_chr_dead(CHR_BOND, /*goto*/ 0x33) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x33) goto_next(0x06) // Joanna is dead label(0x33) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x32) - if_chr_dying(CHR_COOP, /*goto*/ 0x32) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x32) + if_chr_dead(CHR_COOP, /*goto*/ 0x32) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x32) goto_next(0x06) // Everyone is alive @@ -2116,9 +2116,9 @@ u8 func100d_check_terminals_destroyed[] = { u8 func100e_check_elvis_dead[] = { beginloop(0x04) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x06) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x06) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x06) endloop(0x04) label(0x06) @@ -2165,23 +2165,23 @@ u8 func1010_check_end_level[] = { label(0x32) dprint '6','\n',0, if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0f) - if_chr_dying(CHR_ELVIS, /*goto*/ 0x0f) - if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x0f) + if_chr_dead(CHR_ELVIS, /*goto*/ 0x0f) + if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0f) if_chr_death_animation_finished(CHR_JONATHAN, /*goto*/ 0x0f) - if_chr_dying(CHR_JONATHAN, /*goto*/ 0x0f) - if_chr_unloaded(CHR_JONATHAN, /*goto*/ 0x0f) + if_chr_dead(CHR_JONATHAN, /*goto*/ 0x0f) + if_chr_knockedout(CHR_JONATHAN, /*goto*/ 0x0f) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x32) - if_chr_dying(CHR_BOND, /*goto*/ 0x32) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x32) + if_chr_dead(CHR_BOND, /*goto*/ 0x32) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x32) goto_next(0x06) // Joanna is dead label(0x32) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x33) - if_chr_dying(CHR_COOP, /*goto*/ 0x33) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x33) + if_chr_dead(CHR_COOP, /*goto*/ 0x33) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x33) goto_next(0x06) // Both Joanna and Velvet are dead @@ -2792,14 +2792,14 @@ u8 func0c01_midcutscene[] = { hide_object(OBJ_HOVERBED) set_target_chr(CHR_BOND) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x33) - if_chr_dying(CHR_BOND, /*goto*/ 0x33) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x33) + if_chr_dead(CHR_BOND, /*goto*/ 0x33) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x33) goto_next(0x06) label(0x33) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x06) - if_chr_dying(CHR_COOP, /*goto*/ 0x06) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x06) + if_chr_dead(CHR_COOP, /*goto*/ 0x06) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x06) set_target_chr(CHR_COOP) label(0x06) diff --git a/src/files/setup/setupwax.c b/src/files/setup/setupwax.c index 619cc5918..c1c23314b 100644 --- a/src/files/setup/setupwax.c +++ b/src/files/setup/setupwax.c @@ -1263,9 +1263,9 @@ u8 func0412_init_cass[] = { }; u8 func0411_cass_in_office[] = { - if_chr_dying(CHR_SELF, /*goto*/ 0x2c) + if_chr_dead(CHR_SELF, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) // Dying @@ -1298,8 +1298,8 @@ u8 func0411_cass_in_office[] = { if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x5a) set_shotlist(AILIST_CASS_IN_OFFICE) set_self_chrflag(CHRCFLAG_00040000) - if_chr_dying(CHR_CASS, /*goto*/ 0x06) - if_chr_unloaded(CHR_CASS, /*goto*/ 0x06) + if_chr_dead(CHR_CASS, /*goto*/ 0x06) + if_chr_knockedout(CHR_CASS, /*goto*/ 0x06) goto_next(0x2c) label(0x06) set_ailist(CHR_SELF, GAILIST_IDLE) @@ -1350,9 +1350,9 @@ u8 func0411_cass_in_office[] = { reloop(0x5a) label(0x83) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x2c) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x2c) label(0x2c) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x82) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x82) // Wait until shooting animation finished beginloop(0x82) @@ -1369,9 +1369,9 @@ u8 func0413_cass_running[] = { remove_cass_necklace(CHR_CASS) unset_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_shotlist(AILIST_CASS_RUNNING) - if_chr_dying(CHR_CASS, /*goto*/ 0x06) + if_chr_dead(CHR_CASS, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_CASS, /*goto*/ 0x06) - if_chr_unloaded(CHR_CASS, /*goto*/ 0x06) + if_chr_knockedout(CHR_CASS, /*goto*/ 0x06) goto_next(0x2c) // Dying @@ -1462,9 +1462,9 @@ u8 func0413_cass_running[] = { u8 func1004_check_cass_dead[] = { // Wait until Cass dead beginloop(0x03) - if_chr_dying(CHR_CASS, /*goto*/ 0x2c) + if_chr_dead(CHR_CASS, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_CASS, /*goto*/ 0x2c) - if_chr_unloaded(CHR_CASS, /*goto*/ 0x2c) + if_chr_knockedout(CHR_CASS, /*goto*/ 0x2c) endloop(0x03) label(0x2c) @@ -1478,8 +1478,8 @@ u8 func1005_check_cass_captured[] = { // Wait until Cass at helipad beginloop(0x03) if_chr_death_animation_finished(CHR_CASS, /*goto*/ 0x0d) - if_chr_dying(CHR_CASS, /*goto*/ 0x0d) - if_chr_unloaded(CHR_CASS, /*goto*/ 0x0d) + if_chr_dead(CHR_CASS, /*goto*/ 0x0d) + if_chr_knockedout(CHR_CASS, /*goto*/ 0x0d) if_chr_y(CHR_CASS, 0, OPERATOR_LESS_THAN, /*goto*/ 0x2c) show_hudmsg(CHR_BOND, L_WAX(15)) // "Cassandra has been captured successfully." set_stage_flag(STAGEFLAG_CASS_CAPTURED) @@ -1529,8 +1529,8 @@ u8 func1006_lift_disabling[] = { // Wait until chief dead beginloop(0x08) if_chr_death_animation_finished(CHR_CHIEF, /*goto*/ 0x2c) - if_chr_dying(CHR_CHIEF, /*goto*/ 0x2c) - if_chr_unloaded(CHR_CHIEF, /*goto*/ 0x2c) + if_chr_dead(CHR_CHIEF, /*goto*/ 0x2c) + if_chr_knockedout(CHR_CHIEF, /*goto*/ 0x2c) endloop(0x08) label(0x2c) @@ -1568,9 +1568,9 @@ u8 func0415_chief[] = { set_shotlist(AILIST_CHIEF) // Check if dying - if_chr_dying(CHR_CHIEF, /*goto*/ 0x2c) + if_chr_dead(CHR_CHIEF, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_CHIEF, /*goto*/ 0x2c) - if_chr_unloaded(CHR_CHIEF, /*goto*/ 0x2c) + if_chr_knockedout(CHR_CHIEF, /*goto*/ 0x2c) goto_next(0x03) label(0x2c) set_ailist(CHR_SELF, GAILIST_IDLE) @@ -1586,9 +1586,9 @@ u8 func0415_chief[] = { // Attack while in sight label(0x2c) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x2c) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x2c) label(0x2c) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x82) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x82) beginloop(0x82) if_chr_stopped(/*goto*/ 0x06) @@ -1854,14 +1854,14 @@ u8 func100a_check_for_completion[] = { // If either player is alive label(0x06) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c) - if_chr_dying(CHR_BOND, /*goto*/ 0x2c) - if_chr_unloaded(CHR_BOND, /*goto*/ 0x2c) + if_chr_dead(CHR_BOND, /*goto*/ 0x2c) + if_chr_knockedout(CHR_BOND, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c) - if_chr_dying(CHR_COOP, /*goto*/ 0x2c) - if_chr_unloaded(CHR_COOP, /*goto*/ 0x2c) + if_chr_dead(CHR_COOP, /*goto*/ 0x2c) + if_chr_knockedout(CHR_COOP, /*goto*/ 0x2c) goto_next(0x06) // Both players dead diff --git a/src/game/chr/chraction.c b/src/game/chr/chraction.c index 667477b83..150a2f775 100644 --- a/src/game/chr/chraction.c +++ b/src/game/chr/chraction.c @@ -2083,7 +2083,7 @@ glabel func0f030120 ); GLOBAL_ASM( -glabel func0f030308 +glabel chrAttackLie /* f030308: 27bdffb8 */ addiu $sp,$sp,-72 /* f03030c: afbf0024 */ sw $ra,0x24($sp) /* f030310: afa5004c */ sw $a1,0x4c($sp) @@ -2127,7 +2127,7 @@ glabel func0f030308 ); GLOBAL_ASM( -glabel func0f0303a0 +glabel chrAttackKneel /* f0303a0: 27bdffa8 */ addiu $sp,$sp,-88 /* f0303a4: afbf0024 */ sw $ra,0x24($sp) /* f0303a8: afa5005c */ sw $a1,0x5c($sp) @@ -12789,7 +12789,7 @@ glabel chrIsStopped //} GLOBAL_ASM( -glabel func0f03978c +glabel chrCheckTargetInSight .late_rodata glabel var7f1a8de0 .word 0x40c907a9 @@ -12992,7 +12992,7 @@ glabel var7f1a8e10 /* f039a14: 00000000 */ sll $zero,$zero,0x0 ); -bool func0f039a18(struct chrdata *chr) +bool chrIsReadyForOrders(struct chrdata *chr) { if (chr->onladder) { return false; @@ -13067,7 +13067,7 @@ glabel var7f1a8ea0 /* f039b48: 54410052 */ bnel $v0,$at,.L0f039c94 /* f039b4c: 00001025 */ or $v0,$zero,$zero .L0f039b50: -/* f039b50: 0fc0e686 */ jal func0f039a18 +/* f039b50: 0fc0e686 */ jal chrIsReadyForOrders /* f039b54: 02002025 */ or $a0,$s0,$zero /* f039b58: 5040004e */ beqzl $v0,.L0f039c94 /* f039b5c: 00001025 */ or $v0,$zero,$zero @@ -13186,7 +13186,7 @@ glabel var7f1a8eb4 .L0f039cc8: /* f039cc8: 54400052 */ bnezl $v0,.L0f039e14 /* f039ccc: 00001025 */ or $v0,$zero,$zero -/* f039cd0: 0fc0e686 */ jal func0f039a18 +/* f039cd0: 0fc0e686 */ jal chrIsReadyForOrders /* f039cd4: 02002025 */ or $a0,$s0,$zero /* f039cd8: 5040004e */ beqzl $v0,.L0f039e14 /* f039cdc: 00001025 */ or $v0,$zero,$zero @@ -13280,7 +13280,7 @@ glabel var7f1a8eb4 ); GLOBAL_ASM( -glabel func0f039e28 +glabel chrTryRunSideways /* f039e28: 27bdffb8 */ addiu $sp,$sp,-72 /* f039e2c: afb10018 */ sw $s1,0x18($sp) /* f039e30: 00808825 */ or $s1,$a0,$zero @@ -13297,7 +13297,7 @@ glabel func0f039e28 /* f039e54: 54410058 */ bnel $v0,$at,.L0f039fb8 /* f039e58: 00001025 */ or $v0,$zero,$zero .L0f039e5c: -/* f039e5c: 0fc0e686 */ jal func0f039a18 +/* f039e5c: 0fc0e686 */ jal chrIsReadyForOrders /* f039e60: 02202025 */ or $a0,$s1,$zero /* f039e64: 10400053 */ beqz $v0,.L0f039fb4 /* f039e68: 3c0e800a */ lui $t6,%hi(g_Vars+0x8) @@ -13422,7 +13422,7 @@ glabel var7f1a8eb8 /* f03a008: 10000041 */ beqz $zero,.L0f03a110 /* f03a00c: 00001025 */ or $v0,$zero,$zero .L0f03a010: -/* f03a010: 0fc0e686 */ jal func0f039a18 +/* f03a010: 0fc0e686 */ jal chrIsReadyForOrders /* f03a014: 02002025 */ or $a0,$s0,$zero /* f03a018: 5040003d */ beqzl $v0,.L0f03a110 /* f03a01c: 00001025 */ or $v0,$zero,$zero @@ -13523,7 +13523,7 @@ glabel var7f1a8ebc /* f03a160: 10000041 */ beqz $zero,.L0f03a268 /* f03a164: 00001025 */ or $v0,$zero,$zero .L0f03a168: -/* f03a168: 0fc0e686 */ jal func0f039a18 +/* f03a168: 0fc0e686 */ jal chrIsReadyForOrders /* f03a16c: 02002025 */ or $a0,$s0,$zero /* f03a170: 5040003d */ beqzl $v0,.L0f03a268 /* f03a174: 00001025 */ or $v0,$zero,$zero @@ -13615,7 +13615,7 @@ glabel var7f1a8ec0 .L0f03a29c: /* f03a29c: 5440004e */ bnezl $v0,.L0f03a3d8 /* f03a2a0: 00001025 */ or $v0,$zero,$zero -/* f03a2a4: 0fc0e686 */ jal func0f039a18 +/* f03a2a4: 0fc0e686 */ jal chrIsReadyForOrders /* f03a2a8: 02002025 */ or $a0,$s0,$zero /* f03a2ac: 5040004a */ beqzl $v0,.L0f03a3d8 /* f03a2b0: 00001025 */ or $v0,$zero,$zero @@ -13727,7 +13727,7 @@ glabel var7f1a8ec4 /* f03a420: 54410050 */ bnel $v0,$at,.L0f03a564 /* f03a424: 00001025 */ or $v0,$zero,$zero .L0f03a428: -/* f03a428: 0fc0e686 */ jal func0f039a18 +/* f03a428: 0fc0e686 */ jal chrIsReadyForOrders /* f03a42c: 02002025 */ or $a0,$s0,$zero /* f03a430: 5040004c */ beqzl $v0,.L0f03a564 /* f03a434: 00001025 */ or $v0,$zero,$zero @@ -13822,7 +13822,7 @@ glabel var7f1a8ec4 /* f03a574: 00000000 */ sll $zero,$zero,0x0 ); -bool func0f03a578(struct chrdata *chr, s32 thingtype, s32 thingid) +bool func0f03a578(struct chrdata *chr, s32 entitytype, s32 entityid) { s32 race = CHRRACE(chr); @@ -13830,7 +13830,7 @@ bool func0f03a578(struct chrdata *chr, s32 thingtype, s32 thingid) return false; } - if (func0f039a18(chr)) { + if (chrIsReadyForOrders(chr)) { if (race == RACE_ROBOT) { func0f042808(chr); return true; @@ -13839,7 +13839,7 @@ bool func0f03a578(struct chrdata *chr, s32 thingtype, s32 thingid) if (race == RACE_HUMAN || race == RACE_SKEDAR) { if (chrGetEquippedWeaponPropWithCheck(chr, 0) || (chrGetEquippedWeaponPropWithCheck(chr, 1))) { - func0f030120(chr, thingtype, thingid); + func0f030120(chr, entitytype, entityid); return true; } } @@ -13848,13 +13848,13 @@ bool func0f03a578(struct chrdata *chr, s32 thingtype, s32 thingid) return false; } -bool func0f03a644(struct chrdata *chr, s32 thingtype, s32 thingid) +bool chrTryAttackKneel(struct chrdata *chr, s32 entitytype, s32 entityid) { s32 race = CHRRACE(chr); if (race == RACE_HUMAN || race == RACE_SKEDAR) { - if (func0f039a18(chr) && (chrGetEquippedWeaponPropWithCheck(chr, 0) || chrGetEquippedWeaponPropWithCheck(chr, 1))) { - func0f0303a0(chr, thingtype, thingid); + if (chrIsReadyForOrders(chr) && (chrGetEquippedWeaponPropWithCheck(chr, 0) || chrGetEquippedWeaponPropWithCheck(chr, 1))) { + chrAttackKneel(chr, entitytype, entityid); return true; } } @@ -13862,13 +13862,13 @@ bool func0f03a644(struct chrdata *chr, s32 thingtype, s32 thingid) return false; } -bool func0f03a6d8(struct chrdata *chr, s32 thingtype, s32 thingid) +bool chrTryAttackLie(struct chrdata *chr, s32 entitytype, s32 entityid) { s32 race = CHRRACE(chr); if (race == RACE_HUMAN || race == RACE_SKEDAR) { - if (func0f039a18(chr) && (chrGetEquippedWeaponPropWithCheck(chr, 0) || chrGetEquippedWeaponPropWithCheck(chr, 1))) { - func0f030308(chr, thingtype, thingid); + if (chrIsReadyForOrders(chr) && (chrGetEquippedWeaponPropWithCheck(chr, 0) || chrGetEquippedWeaponPropWithCheck(chr, 1))) { + chrAttackLie(chr, entitytype, entityid); return true; } } @@ -13876,7 +13876,7 @@ bool func0f03a6d8(struct chrdata *chr, s32 thingtype, s32 thingid) return false; } -bool func0f03a76c(struct chrdata *chr, u32 thingtype, s32 thingid) +bool func0f03a76c(struct chrdata *chr, u32 entitytype, s32 entityid) { s32 race = CHRRACE(chr); @@ -13884,9 +13884,9 @@ bool func0f03a76c(struct chrdata *chr, u32 thingtype, s32 thingid) return false; } - if (chr->actiontype == ACT_ATTACK && (chr->act_attack.unk04c & 0x60)) { - chr->act_attack.unk04c = thingtype; - chr->act_attack.unk050 = thingid; + if (chr->actiontype == ACT_ATTACK && (chr->act_attack.entitytype & 0x60)) { + chr->act_attack.entitytype = entitytype; + chr->act_attack.entityid = entityid; func0f031254(); return true; } @@ -13894,21 +13894,21 @@ bool func0f03a76c(struct chrdata *chr, u32 thingtype, s32 thingid) return false; } -bool chrFaceEntity(struct chrdata *chr, u32 entity_type, u32 entity_id) +bool chrFaceEntity(struct chrdata *chr, u32 entitytype, u32 entityid) { - if (func0f039a18(chr)) { + if (chrIsReadyForOrders(chr)) { if (chr->actiontype != ACT_STAND) { chrStand(chr); } - if (entity_type != chr->act_stand.face_entitytype || - entity_id != chr->act_stand.face_entityid) { - chr->act_stand.face_entitytype = entity_type; - chr->act_stand.face_entityid = entity_id; + if (entitytype != chr->act_stand.face_entitytype || + entityid != chr->act_stand.face_entityid) { + chr->act_stand.face_entitytype = entitytype; + chr->act_stand.face_entityid = entityid; chr->act_stand.unk038 = 0; chr->act_stand.unk040 = 0; - if (entity_type == ENTITYTYPE_TARGET && entity_id == 1) { + if (entitytype == ENTITYTYPE_TARGET && entityid == 1) { chr->act_stand.face_target = true; chr->act_stand.face_entityid = 0; } @@ -13928,7 +13928,7 @@ glabel func0f03a894 /* f03a8a0: afbf001c */ sw $ra,0x1c($sp) /* f03a8a4: 04a00027 */ bltz $a1,.L0f03a944 /* f03a8a8: afa60080 */ sw $a2,0x80($sp) -/* f03a8ac: 0fc0e686 */ jal func0f039a18 +/* f03a8ac: 0fc0e686 */ jal chrIsReadyForOrders /* f03a8b0: afa5007c */ sw $a1,0x7c($sp) /* f03a8b4: 10400023 */ beqz $v0,.L0f03a944 /* f03a8b8: 8fa7007c */ lw $a3,0x7c($sp) @@ -13987,7 +13987,7 @@ bool chrStartPath(struct chrdata *chr) { struct path *path = pathFindById(chr->path); - if (path && func0f039a18(chr)) { + if (path && chrIsReadyForOrders(chr)) { func0f038b9c(chr, path); return true; } @@ -13997,7 +13997,7 @@ bool chrStartPath(struct chrdata *chr) bool chrTrySurrender(struct chrdata *chr) { - if (CHRRACE(chr) == RACE_HUMAN && func0f039a18(chr)) { + if (CHRRACE(chr) == RACE_HUMAN && chrIsReadyForOrders(chr)) { chrSurrender(chr); return true; } @@ -14015,7 +14015,7 @@ bool chrFadeOut(struct chrdata *chr) bool chrGoToTarget(struct chrdata *chr, u32 speed) { - if (func0f039a18(chr)) { + if (chrIsReadyForOrders(chr)) { if (var80062cbc <= 8 || (chr->hidden & CHRHFLAG_00400000) == 0 || (chr->flags & CHRFLAG0_CAN_RUN_FOR_ALARM)) { @@ -14032,7 +14032,7 @@ bool chrGoToTarget(struct chrdata *chr, u32 speed) bool chrGoToChr(struct chrdata *chr, u32 dst_chrnum, u32 speed) { - if (func0f039a18(chr)) { + if (chrIsReadyForOrders(chr)) { if (var80062cbc <= 8 || (chr->hidden & CHRHFLAG_00400000) == 0 || (chr->flags & CHRFLAG0_CAN_RUN_FOR_ALARM)) { @@ -14049,7 +14049,7 @@ bool chrGoToChr(struct chrdata *chr, u32 dst_chrnum, u32 speed) bool chrGoToProp(struct chrdata *chr, struct prop *prop, s32 speed) { - if (func0f039a18(chr) && prop) { + if (chrIsReadyForOrders(chr) && prop) { if (chrGoToPos(chr, &prop->pos, &prop->rooms[0], speed)) { return true; } @@ -14065,7 +14065,7 @@ glabel func0f03abd0 /* f03abd8: afb00020 */ sw $s0,0x20($sp) /* f03abdc: afa40088 */ sw $a0,0x88($sp) /* f03abe0: afa5008c */ sw $a1,0x8c($sp) -/* f03abe4: 0fc0e686 */ jal func0f039a18 +/* f03abe4: 0fc0e686 */ jal chrIsReadyForOrders /* f03abe8: afa60090 */ sw $a2,0x90($sp) /* f03abec: 10400026 */ beqz $v0,.L0f03ac88 /* f03abf0: 3c0e8006 */ lui $t6,%hi(var80062cbc) @@ -14199,7 +14199,7 @@ bool chrTryStop(struct chrdata *chr) return true; } - if (func0f039a18(chr)) { + if (chrIsReadyForOrders(chr)) { chrStop(chr); return true; } @@ -14209,7 +14209,7 @@ bool chrTryStop(struct chrdata *chr) bool chrTrySurprisedOneHand(struct chrdata *chr) { - if (CHRRACE(chr) == RACE_HUMAN && func0f039a18(chr)) { + if (CHRRACE(chr) == RACE_HUMAN && chrIsReadyForOrders(chr)) { chrDoSurprisedOneHand(chr); return true; } @@ -14219,7 +14219,7 @@ bool chrTrySurprisedOneHand(struct chrdata *chr) bool chrTrySurprisedSurrender(struct chrdata *chr) { - if (CHRRACE(chr) == RACE_HUMAN && func0f039a18(chr)) { + if (CHRRACE(chr) == RACE_HUMAN && chrIsReadyForOrders(chr)) { chrDoSurprisedSurrender(chr); return true; } @@ -14229,7 +14229,7 @@ bool chrTrySurprisedSurrender(struct chrdata *chr) bool chrTrySurprisedLookAround(struct chrdata *chr) { - if (CHRRACE(chr) == RACE_HUMAN && func0f039a18(chr)) { + if (CHRRACE(chr) == RACE_HUMAN && chrIsReadyForOrders(chr)) { chrDoSurprisedLookAround(chr); return true; } @@ -14239,7 +14239,7 @@ bool chrTrySurprisedLookAround(struct chrdata *chr) bool chrTryKneel(struct chrdata *chr) { - if (CHRRACE(chr) == RACE_HUMAN && func0f039a18(chr)) { + if (CHRRACE(chr) == RACE_HUMAN && chrIsReadyForOrders(chr)) { chrKneel(chr); return true; } @@ -14249,7 +14249,7 @@ bool chrTryKneel(struct chrdata *chr) bool func0f03af44(struct chrdata *chr, u32 anim_id, f32 fstartframe, f32 fendframe, u8 flags, u32 transition, f32 result) { - if (func0f039a18(chr)) { + if (chrIsReadyForOrders(chr)) { func0f030ff8(chr, anim_id, fstartframe, fendframe, flags, transition, result); return true; } @@ -14266,7 +14266,7 @@ glabel func0f03afac /* f03afbc: afa40088 */ sw $a0,0x88($sp) /* f03afc0: 8fa40088 */ lw $a0,0x88($sp) /* f03afc4: 8c90001c */ lw $s0,0x1c($a0) -/* f03afc8: 0fc0e686 */ jal func0f039a18 +/* f03afc8: 0fc0e686 */ jal chrIsReadyForOrders /* f03afcc: afa20084 */ sw $v0,0x84($sp) /* f03afd0: 1040007d */ beqz $v0,.L0f03b1c8 /* f03afd4: 8fa30084 */ lw $v1,0x84($sp) @@ -14440,7 +14440,7 @@ glabel var7f1a8ed4 /* f03b224: 100000e6 */ beqz $zero,.L0f03b5c0 /* f03b228: 00001025 */ or $v0,$zero,$zero .L0f03b22c: -/* f03b22c: 0fc0e686 */ jal func0f039a18 +/* f03b22c: 0fc0e686 */ jal chrIsReadyForOrders /* f03b230: 00000000 */ sll $zero,$zero,0x0 /* f03b234: 104000e1 */ beqz $v0,.L0f03b5bc /* f03b238: 27b700a8 */ addiu $s7,$sp,0xa8 @@ -14701,7 +14701,7 @@ glabel var7f1a8ed4 bool func0f03b5f0(struct chrdata *chr, s32 pad_id) { - if (CHRRACE(chr) == RACE_HUMAN && func0f039a18(chr)) { + if (CHRRACE(chr) == RACE_HUMAN && chrIsReadyForOrders(chr)) { pad_id = chrResolvePadId(chr, pad_id); if (pad_id >= 0) { @@ -14724,7 +14724,7 @@ s32 chrConsiderGrenadeThrow(struct chrdata *chr, u32 entitytype, u32 entityid) if (CHRRACE(chr) == RACE_HUMAN && chr->grenadeprob > (random() % 255) && chrGetDistanceToTarget(chr) > 200 && - func0f039a18(chr)) { + chrIsReadyForOrders(chr)) { struct prop *target = chrGetTargetProp(chr); struct coord pos; @@ -22606,7 +22606,7 @@ glabel var7f1a91e0 .L0f043230: /* f043230: 02002025 */ or $a0,$s0,$zero /* f043234: 8e05004c */ lw $a1,0x4c($s0) -/* f043238: 0fc0c0e8 */ jal func0f0303a0 +/* f043238: 0fc0c0e8 */ jal chrAttackKneel /* f04323c: 8e060050 */ lw $a2,0x50($s0) /* f043240: 10000063 */ beqz $zero,.L0f0433d0 /* f043244: 8fbf0024 */ lw $ra,0x24($sp) @@ -27072,7 +27072,7 @@ glabel chrTickPatrol bool chrTrySkJump(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4) { if (chr && chr->actiontype != ACT_SKJUMP - && func0f039a18(chr) + && chrIsReadyForOrders(chr) && CHRRACE(chr) == RACE_SKEDAR) { return chrStartSkJump(chr, arg1, arg2, arg3, arg4); } @@ -31249,7 +31249,7 @@ s16 chrGoToCover(struct chrdata *chr, u8 speed) return 0; } - if (func0f039a18(chr) && chr->cover != -1 && coverLoad(chr->cover, &cover)) { + if (chrIsReadyForOrders(chr) && chr->cover != -1 && coverLoad(chr->cover, &cover)) { chrGoToPos(chr, cover.pos, &cover.room, speed); return chr->cover; } @@ -31265,7 +31265,7 @@ glabel chrRunFromPos /* f04c2f4: 00808025 */ or $s0,$a0,$zero /* f04c2f8: afa50054 */ sw $a1,0x54($sp) /* f04c2fc: afa60058 */ sw $a2,0x58($sp) -/* f04c300: 0fc0e686 */ jal func0f039a18 +/* f04c300: 0fc0e686 */ jal chrIsReadyForOrders /* f04c304: afa7005c */ sw $a3,0x5c($sp) /* f04c308: 10400048 */ beqz $v0,.L0f04c42c /* f04c30c: 8fa3005c */ lw $v1,0x5c($sp) @@ -32020,7 +32020,7 @@ glabel var7f1a9448 /* f04d0a0: 00002825 */ or $a1,$zero,$zero /* f04d0a4: 0fc079ef */ jal chrSetOrUnsetHiddenFlag00000100 /* f04d0a8: e7a00058 */ swc1 $f0,0x58($sp) -/* f04d0ac: 0fc0e686 */ jal func0f039a18 +/* f04d0ac: 0fc0e686 */ jal chrIsReadyForOrders /* f04d0b0: 02002025 */ or $a0,$s0,$zero /* f04d0b4: c7a2007c */ lwc1 $f2,0x7c($sp) /* f04d0b8: 104000df */ beqz $v0,.L0f04d438 diff --git a/src/game/chr/chrai.c b/src/game/chr/chrai.c index a5c1a5dea..d5c47bc56 100644 --- a/src/game/chr/chrai.c +++ b/src/game/chr/chrai.c @@ -33,15 +33,15 @@ bool (*g_CommandPointers[])(void) = { /*0x000c*/ aiIfIdle, /*0x000d*/ aiBeSurprisedOneHand, /*0x000e*/ aiBeSurprisedLookAround, - /*0x000f*/ aiStepSideways, - /*0x0010*/ aiHopSideways, - /*0x0011*/ aiRunSideways, - /*0x0012*/ aiWalkAndFire, - /*0x0013*/ aiRunAndFire, - /*0x0014*/ aiRollAndFire, - /*0x0015*/ aiAimAndFire1, - /*0x0016*/ aiKneelAndFire, - /*0x0017*/ aiAimAndFire2, + /*0x000f*/ aiTrySidestep, + /*0x0010*/ aiTryJumpOut, + /*0x0011*/ aiTryRunSideways, + /*0x0012*/ aiTryAttackWalk, + /*0x0013*/ aiTryAttackRun, + /*0x0014*/ aiTryAttackRoll, + /*0x0015*/ aiTryAttackStand1, + /*0x0016*/ aiTryAttackKneel, + /*0x0017*/ aiTryAttackStand2, /*0x0018*/ aiFaceEntity, /*0x0019*/ ai0019, /*0x001a*/ ai001a, @@ -69,9 +69,9 @@ bool (*g_CommandPointers[])(void) = { /*0x0030*/ aiTryWalkToChr, /*0x0031*/ aiTryRunToChr, /*0x0032*/ aiIfStopped, - /*0x0033*/ aiIfChrDying, + /*0x0033*/ aiIfChrDead, /*0x0034*/ aiIfChrDeathAnimationFinished, - /*0x0035*/ aiIfTargetPropInSight, + /*0x0035*/ aiIfTargetInSight, /*0x0036*/ aiRandom, /*0x0037*/ aiIfRandomLessThan, /*0x0038*/ aiIfRandomGreaterThan, @@ -397,7 +397,7 @@ bool (*g_CommandPointers[])(void) = { /*0x0178*/ aiIfPlayerAutoWalkFinished, /*0x0179*/ ai0179, /*0x017a*/ ai017a, - /*0x017b*/ aiIfChrUnloaded, + /*0x017b*/ aiIfChrKnockedOut, /*0x017c*/ aiAssignSound, /*0x017d*/ aiAudioSetMusicTrack, /*0x017e*/ aiAudioRestartDefaultMusic, @@ -460,7 +460,7 @@ bool (*g_CommandPointers[])(void) = { /*0x01b7*/ aiChrSetCloaked, /*0x01b8*/ aiSetAutogunType, /*0x01b9*/ aiShufflePelagicSwitches, - /*0x01ba*/ ai01ba, + /*0x01ba*/ aiTryAttackLie, /*0x01bb*/ aiNoOp01bb, /*0x01bc*/ ai01bc, /*0x01bd*/ aiIfTrainingPcHolographed, diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 83abfef60..717c55b53 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -514,7 +514,7 @@ bool aiIfStopped(void) /** * @cmd 0033 */ -bool aiIfChrDying(void) +bool aiIfChrDead(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); @@ -560,7 +560,7 @@ bool aiIfChrDeathAnimationFinished(void) /** * @cmd 017b */ -bool aiIfChrUnloaded(void) +bool aiIfChrKnockedOut(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); @@ -578,9 +578,9 @@ bool aiIfChrUnloaded(void) /** * @cmd 0035 */ -bool aiIfTargetPropInSight(void) +bool aiIfTargetInSight(void) { - if (func0f03978c(g_Vars.chrdata)) { + if (chrCheckTargetInSight(g_Vars.chrdata)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { @@ -593,7 +593,7 @@ bool aiIfTargetPropInSight(void) /** * @cmd 000f */ -bool aiStepSideways(void) +bool aiTrySidestep(void) { if (chrTrySidestep(g_Vars.chrdata)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; @@ -608,7 +608,7 @@ bool aiStepSideways(void) /** * @cmd 0010 */ -bool aiHopSideways(void) +bool aiTryJumpOut(void) { if (chrTryJumpOut(g_Vars.chrdata)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; @@ -623,9 +623,9 @@ bool aiHopSideways(void) /** * @cmd 0011 */ -bool aiRunSideways(void) +bool aiTryRunSideways(void) { - if (func0f039e28(g_Vars.chrdata)) { + if (chrTryRunSideways(g_Vars.chrdata)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { @@ -638,7 +638,7 @@ bool aiRunSideways(void) /** * @cmd 0012 */ -bool aiWalkAndFire(void) +bool aiTryAttackWalk(void) { if (chrTryAttackWalk(g_Vars.chrdata)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; @@ -653,7 +653,7 @@ bool aiWalkAndFire(void) /** * @cmd 0013 */ -bool aiRunAndFire(void) +bool aiTryAttackRun(void) { if (chrTryAttackRun(g_Vars.chrdata)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; @@ -668,7 +668,7 @@ bool aiRunAndFire(void) /** * @cmd 0014 */ -bool aiRollAndFire(void) +bool aiTryAttackRoll(void) { if (chrTryAttackRoll(g_Vars.chrdata)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; @@ -683,7 +683,7 @@ bool aiRollAndFire(void) /** * @cmd 0015 */ -bool aiAimAndFire1(void) +bool aiTryAttackStand1(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; u32 thingid = cmd[5] | (cmd[4] << 8); @@ -701,13 +701,13 @@ bool aiAimAndFire1(void) /** * @cmd 0016 */ -bool aiKneelAndFire(void) +bool aiTryAttackKneel(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; u32 thingid = cmd[5] | (cmd[4] << 8); u32 thingtype = cmd[3] | (cmd[2] << 8); - if (func0f03a644(g_Vars.chrdata, thingtype, thingid)) { + if (chrTryAttackKneel(g_Vars.chrdata, thingtype, thingid)) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[6]); } else { g_Vars.aioffset += 7; @@ -719,13 +719,13 @@ bool aiKneelAndFire(void) /** * @cmd 01ba */ -bool ai01ba(void) +bool aiTryAttackLie(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; u32 thingid = cmd[5] | (cmd[4] << 8); u32 thingtype = cmd[3] | (cmd[2] << 8); - if (func0f03a6d8(g_Vars.chrdata, thingtype, thingid)) { + if (chrTryAttackLie(g_Vars.chrdata, thingtype, thingid)) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[6]); } else { g_Vars.aioffset += 7; @@ -741,7 +741,9 @@ bool ai00f0(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - if (g_Vars.chrdata->actiontype == ACT_ATTACK && !g_Vars.chrdata->act_attack.unk058 && g_Vars.chrdata->act_attack.unk04c & 0x40) { + if (g_Vars.chrdata->actiontype == ACT_ATTACK && + !g_Vars.chrdata->act_attack.unk058 && + g_Vars.chrdata->act_attack.entitytype & 0x40) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { g_Vars.aioffset += 3; @@ -769,7 +771,7 @@ bool aiIfAttacking(void) /** * @cmd 0017 */ -bool aiAimAndFire2(void) +bool aiTryAttackStand2(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; u32 thingid = cmd[5] | (cmd[4] << 8); @@ -9834,7 +9836,7 @@ bool aiSetTargetToEyespyIfInSight(void) struct chrdata *chr = eyespy->prop->chr; g_Vars.chrdata->target = propGetIndexByChrId(g_Vars.chrdata, chr->chrnum); - if (func0f03978c(g_Vars.chrdata)) { + if (chrCheckTargetInSight(g_Vars.chrdata)) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { g_Vars.aioffset += 3; diff --git a/src/game/data/ailists.c b/src/game/data/ailists.c index 40015136d..9fd747e97 100644 --- a/src/game/data/ailists.c +++ b/src/game/data/ailists.c @@ -63,9 +63,9 @@ u8 func0006_unalerted[] = { label(0x16) set_target_chr(CHR_P1P2) set_shotlist(GAILIST_UNALERTED) - if_chr_dying(CHR_SELF, /*goto*/ 0x15) + if_chr_dead(CHR_SELF, /*goto*/ 0x15) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x15) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x15) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x15) if_just_injured(CHR_SELF, /*goto*/ 0x16) if_has_gun(CHR_SELF, /*goto*/ 0x13) dprint 'N','O','G','U','N','\n',0, @@ -464,7 +464,7 @@ u8 func0006_unalerted[] = { label(0x13) dprint 'C','H','E','C','K',' ','D','U','P','E','\n',0, if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x0e) - if_chr_unloaded(CHR_CLONE, /*goto*/ 0x0e) + if_chr_knockedout(CHR_CLONE, /*goto*/ 0x0e) set_ailist(CHR_SELF, GAILIST_UNALERTED_0001) label(0x0e) @@ -666,7 +666,7 @@ u8 func0006_unalerted[] = { label(0x13) dprint 'C','H','E','C','K',' ','D','U','P','E','\n',0, if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x0e) - if_chr_unloaded(CHR_CLONE, /*goto*/ 0x0e) + if_chr_knockedout(CHR_CLONE, /*goto*/ 0x0e) if_self_flag_bankx_eq(CHRFLAG0_00100000, FALSE, BANK_0, /*goto*/ 0x13) goto_first(LABEL_HEARSPAWN) @@ -808,8 +808,8 @@ u8 func0008_wakeup[] = { dprint 'A','N','I','M',' ','O','B','J','E','C','T',' ','N','O','W','\n',0, yield if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) - if_chr_dying(CHR_SELF, /*goto*/ 0x13) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x13) + if_chr_dead(CHR_SELF, /*goto*/ 0x13) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x13) goto_next(0x15) // Dead @@ -882,9 +882,9 @@ u8 func0007_alerted[] = { set_darkroomlist(GAILIST_SEARCH_FOR_PLAYER) dprint 'S','T','A','R','T',' ','L','O','O','P','\n',0, - if_chr_dying(CHR_SELF, /*goto*/ 0x16) + if_chr_dead(CHR_SELF, /*goto*/ 0x16) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x16) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x16) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x16) dprint 'N','O','T',' ','D','E','A','D','\n',0, goto_next(0x13) @@ -1168,7 +1168,7 @@ u8 func0007_alerted[] = { dprint 'A','T',' ','T','R','A','P',' ','P','A','D','\n',0, label(0x9b) if_chr_has_hiddenflag(CHR_TARGET, CHRHFLAG_CLOAKED, /*goto*/ LABEL_CLOAKED) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x03) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x03) beginloop(0x03) if_in_disarm_range(/*goto*/ 0x9a) @@ -1188,7 +1188,7 @@ u8 func0007_alerted[] = { // Aiming only label(0x9a) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x04) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x04) beginloop(0x04) if_chr_stopped(/*goto*/ 0x16) @@ -1260,7 +1260,7 @@ u8 func0007_alerted[] = { dprint 'U','N','D','E','R',' ','P','O','P','P','E','R','\n',0, label(0xa8) if_chr_has_hiddenflag(CHR_TARGET, CHRHFLAG_CLOAKED, /*goto*/ LABEL_CLOAKED) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0xa9) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0xa9) beginloop(0xa9) chr_toggle_p1p2(CHR_SELF) @@ -1278,7 +1278,7 @@ u8 func0007_alerted[] = { goto_next(0x13) label(0x16) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0xaa) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0xaa) label(0x13) kneel restart_timer @@ -1297,7 +1297,7 @@ u8 func0007_alerted[] = { label(0x13) if_chr_has_hiddenflag(CHR_TARGET, CHRHFLAG_CLOAKED, /*goto*/ LABEL_CLOAKED) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x13) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x13) goto_first(0xa8) label(0x13) @@ -1305,7 +1305,7 @@ u8 func0007_alerted[] = { goto_first(0xa8) label(0x13) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x13) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x13) goto_first(0xa8) label(0x13) @@ -1369,7 +1369,7 @@ u8 func0007_alerted[] = { label(0x13) restart_timer if_chr_has_hiddenflag(CHR_TARGET, CHRHFLAG_CLOAKED, /*goto*/ LABEL_CLOAKED) - cmd01ba(0x0022, 0x0000, /*goto*/ 0xdf) + try_attack_lie(0x0022, 0x0000, /*goto*/ 0xdf) beginloop(0xdf) if_distance_to_target_lt(1000, /*goto*/ 0x16) @@ -1385,7 +1385,7 @@ u8 func0007_alerted[] = { label(0x13) restart_timer set_accuracy(100) - cmd01ba(0x0200, 0x0000, /*goto*/ 0xe0) + try_attack_lie(0x0200, 0x0000, /*goto*/ 0xe0) dprint 'S','N','I','P','E','R',' ','N','O',' ','S','H','O','O','T','\n',0, beginloop(0xe0) @@ -1525,7 +1525,7 @@ u8 func0007_alerted[] = { unset_self_flag_bankx(CHRFLAG1_00040000, BANK_1) unset_self_flag_bankx(CHRFLAG1_00020000, BANK_1) if_chr_has_hiddenflag(CHR_TARGET, CHRHFLAG_CLOAKED, /*goto*/ LABEL_CLOAKED) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x59) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x59) beginloop(0x59) if_dangerous_object_nearby(3, /*goto*/ LABEL_FLEE_GRENADE) @@ -1654,17 +1654,17 @@ u8 func0007_alerted[] = { call_rng if_rand_gt(128, /*goto*/ 0x16) label(0xbe) - try_roll_and_shoot(/*goto*/ 0x60) + try_attack_roll(/*goto*/ 0x60) label(0x16) - try_walk_and_shoot(/*goto*/ 0x60) + try_attack_walk(/*goto*/ 0x60) label(0x13) call_rng if_rand_gt(128, /*goto*/ 0x8c) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x16) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x16) label(0x8c) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x16) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x16) label(0x16) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x60) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x60) beginloop(0x60) if_dangerous_object_nearby(3, /*goto*/ LABEL_FLEE_GRENADE) @@ -1903,7 +1903,7 @@ u8 func0007_alerted[] = { unset_self_flag_bankx(CHRFLAG1_00040000, BANK_1) unset_self_flag_bankx(CHRFLAG1_00020000, BANK_1) if_chr_has_hiddenflag(CHR_TARGET, CHRHFLAG_CLOAKED, /*goto*/ LABEL_CLOAKED) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x40) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x40) beginloop(0x40) if_dangerous_object_nearby(3, /*goto*/ LABEL_FLEE_GRENADE) @@ -2004,17 +2004,17 @@ u8 func0007_alerted[] = { call_rng if_rand_gt(128, /*goto*/ 0x16) label(0xbe) - try_roll_and_shoot(/*goto*/ 0x43) + try_attack_roll(/*goto*/ 0x43) label(0x16) - try_walk_and_shoot(/*goto*/ 0x43) + try_attack_walk(/*goto*/ 0x43) label(0x13) call_rng if_rand_gt(128, /*goto*/ 0x8c) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x16) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x16) label(0x8c) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x16) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x16) label(0x16) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x43) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x43) beginloop(0x43) if_dangerous_object_nearby(3, /*goto*/ LABEL_FLEE_GRENADE) @@ -2340,22 +2340,22 @@ u8 func0007_alerted[] = { call_rng if_rand_gt(128, /*goto*/ 0x16) label(0xbe) - try_roll_and_shoot(/*goto*/ 0x44) + try_attack_roll(/*goto*/ 0x44) label(0x16) - try_walk_and_shoot(/*goto*/ 0x44) + try_attack_walk(/*goto*/ 0x44) label(0x13) call_rng if_rand_gt(128, /*goto*/ 0x8c) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x28) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x28) label(0x8c) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x28) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x28) dprint 'S','H','O','O','T','F','A','I','L','E','D','\n',0, yield if_dangerous_object_nearby(3, /*goto*/ LABEL_FLEE_GRENADE) goto_first(0x8b) label(0x28) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x44) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0x44) goto_next(0x67) label(0x44) @@ -2425,11 +2425,11 @@ u8 func0007_alerted[] = { label(0x16) call_rng if_rand_lt(128, /*goto*/ 0x2d) - try_hop_sideways(/*goto*/ 0x13) + try_jumpout(/*goto*/ 0x13) goto_next(0x2e) label(0x2d) - try_jump_sideways(/*goto*/ 0x13) + try_sidestep(/*goto*/ 0x13) goto_next(0x2e) label(0x13) @@ -2501,7 +2501,7 @@ u8 func0007_alerted[] = { // SURRENDER // label(0x70) - if_chr_dying(CHR_SELF, /*goto*/ 0x88) + if_chr_dead(CHR_SELF, /*goto*/ 0x88) set_action(MA_SURRENDER, FALSE) unset_self_flag_bankx(CHRFLAG1_00040000, BANK_1) unset_self_flag_bankx(CHRFLAG1_00020000, BANK_1) @@ -2510,7 +2510,7 @@ u8 func0007_alerted[] = { surrender beginloop(0x71) - if_chr_dying(CHR_SELF, /*goto*/ 0x88) + if_chr_dead(CHR_SELF, /*goto*/ 0x88) if_timer_gt(300, /*goto*/ 0x16) chr_toggle_p1p2(CHR_SELF) set_target_chr(CHR_P1P2) @@ -2540,7 +2540,7 @@ u8 func0007_alerted[] = { beginloop(0x96) if_dangerous_object_nearby(3, /*goto*/ LABEL_FLEE_GRENADE) if_chr_death_animation_finished(CHR_PRESET, /*goto*/ 0x84) - if_chr_unloaded(CHR_PRESET, /*goto*/ 0x84) + if_chr_knockedout(CHR_PRESET, /*goto*/ 0x84) if_detected_chr(CHR_PRESET, /*goto*/ 0x97) if_chr_stopped(/*goto*/ 0x97) endloop(0x96) @@ -2608,8 +2608,8 @@ u8 func0007_alerted[] = { set_chr_hiddenflag(CHR_SELF, CHRHFLAG_00002000) stop_chr if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x16) - if_chr_dying(CHR_SELF, /*goto*/ 0x16) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x16) + if_chr_dead(CHR_SELF, /*goto*/ 0x16) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x16) if_chr_sees_player(/*goto*/ 0x13) set_alertness(0) set_self_flag_bankx(CHRFLAG1_10000000, BANK_1) @@ -2891,9 +2891,9 @@ u8 func000c_combat_with_target_chr[] = { label(0x16) set_self_chrflag(CHRCFLAG_00000040) dprint 'D','E','T','E','C','T','\n',0, - if_chr_dying(CHR_SELF, /*goto*/ 0x16) + if_chr_dead(CHR_SELF, /*goto*/ 0x16) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x16) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x16) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x16) goto_next(0x13) // Dying @@ -3017,9 +3017,9 @@ u8 func000c_combat_with_target_chr[] = { label(0x16) dprint 'F','O','U','N','D',' ','E','N','E','M','Y','\n',0, restart_timer - if_chr_dying(CHR_TARGET, /*goto*/ 0xba) + if_chr_dead(CHR_TARGET, /*goto*/ 0xba) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xba) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xba) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xba) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0x16) @@ -3047,9 +3047,9 @@ u8 func000c_combat_with_target_chr[] = { if_self_flag_bankx_eq(CHRFLAG1_00000001, FALSE, BANK_1, /*goto*/ 0x13) if_timer_gt(20, /*goto*/ 0x09) label(0x13) - if_chr_dying(CHR_TARGET, /*goto*/ 0xba) + if_chr_dead(CHR_TARGET, /*goto*/ 0xba) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xba) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xba) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xba) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xba) @@ -3083,9 +3083,9 @@ u8 func000c_combat_with_target_chr[] = { label(0xb7) label(0xb9) if_in_disarm_range(/*goto*/ 0xb6) - if_chr_dying(CHR_TARGET, /*goto*/ 0xba) + if_chr_dead(CHR_TARGET, /*goto*/ 0xba) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xba) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xba) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xba) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xba) @@ -3098,9 +3098,9 @@ u8 func000c_combat_with_target_chr[] = { try_run_to_target(/*goto*/ 0xbc) beginloop(0xbc) - if_chr_dying(CHR_TARGET, /*goto*/ 0xc0) + if_chr_dead(CHR_TARGET, /*goto*/ 0xc0) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc0) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc0) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc0) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xc0) @@ -3120,9 +3120,9 @@ u8 func000c_combat_with_target_chr[] = { label(0xb6) set_grenade_probability_out_of_255(255) set_self_chrflag(CHRCFLAG_00000040) - if_chr_dying(CHR_TARGET, /*goto*/ 0xc1) + if_chr_dead(CHR_TARGET, /*goto*/ 0xc1) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc1) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc1) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc1) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xc1) @@ -3202,26 +3202,26 @@ u8 func000c_combat_with_target_chr[] = { call_rng if_rand_gt(128, /*goto*/ 0x16) label(0xbe) - try_roll_and_shoot(/*goto*/ 0xc3) + try_attack_roll(/*goto*/ 0xc3) label(0x16) - try_walk_and_shoot(/*goto*/ 0xc3) + try_attack_walk(/*goto*/ 0xc3) label(0x13) call_rng if_rand_gt(128, /*goto*/ 0x8c) - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0x16) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0x16) label(0x8c) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x16) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x16) label(0x16) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0xc3) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0xc3) label(0xc3) say_quip(CHR_BOND, QUIP_ATTACK3, 0x19, 0x02, 0xff, BANK_0, 0x00, 0x00) say_quip(CHR_BOND, QUIP_ATTACK4, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) beginloop(0xe2) - if_chr_dying(CHR_TARGET, /*goto*/ 0xc1) + if_chr_dead(CHR_TARGET, /*goto*/ 0xc1) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc1) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc1) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc1) if_chrpresets_target_is_different(/*goto*/ 0x16) goto_next(0xc1) @@ -3261,9 +3261,9 @@ u8 func000c_combat_with_target_chr[] = { damage_chr(CHR_TARGET, 18) unset_self_flag_bankx(CHRFLAG1_00000800, BANK_1) label(0x13) - if_chr_dying(CHR_TARGET, /*goto*/ 0xc5) + if_chr_dead(CHR_TARGET, /*goto*/ 0xc5) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc5) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc5) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc5) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xc5) @@ -3294,9 +3294,9 @@ u8 func000c_combat_with_target_chr[] = { restart_timer beginloop(0xc7) - if_chr_dying(CHR_TARGET, /*goto*/ 0xc5) + if_chr_dead(CHR_TARGET, /*goto*/ 0xc5) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc5) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc5) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc5) if_enemy_distance_lt_and_los(400, /*goto*/ 0x13) if_chr_stopped(/*goto*/ 0x16) if_timer_gt(360, /*goto*/ 0x16) @@ -3309,12 +3309,12 @@ u8 func000c_combat_with_target_chr[] = { dprint 'G','O','T',' ','T','O',' ','C','O','V','E','R','\n',0, label(0xc8) restart_timer - try_chr_kneel_and_shoot_thing(0x0220, 0x0000, /*goto*/ 0xc9) + try_attack_kneel(0x0220, 0x0000, /*goto*/ 0xc9) beginloop(0xc9) - if_chr_dying(CHR_TARGET, /*goto*/ 0xc5) + if_chr_dead(CHR_TARGET, /*goto*/ 0xc5) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc5) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc5) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc5) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xc5) @@ -3346,7 +3346,7 @@ u8 func000c_combat_with_target_chr[] = { label(0x16) say_quip(CHR_BOND, QUIP_ATTACK2, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) label(0x17) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0xcb) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0xcb) goto_next(0x16) label(0xcb) @@ -3354,9 +3354,9 @@ u8 func000c_combat_with_target_chr[] = { say_quip(CHR_BOND, QUIP_ATTACK4, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) beginloop(0xcc) - if_chr_dying(CHR_TARGET, /*goto*/ 0xc5) + if_chr_dead(CHR_TARGET, /*goto*/ 0xc5) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc5) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc5) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc5) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xc5) @@ -3765,8 +3765,8 @@ u8 func000f_hand_combat[] = { #define LABEL_PUNCH 0x16 if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) - if_chr_dying(CHR_SELF, /*goto*/ 0x13) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x13) + if_chr_dead(CHR_SELF, /*goto*/ 0x13) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x13) goto_next(0x16) // Dying @@ -3787,8 +3787,8 @@ u8 func000f_hand_combat[] = { label(0x0c) yield if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xfa) - if_chr_dying(CHR_TARGET, /*goto*/ 0xfa) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xfa) + if_chr_dead(CHR_TARGET, /*goto*/ 0xfa) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xfa) // This if-statement is effectively a no op dprint 'L','1','\n',0, @@ -3829,8 +3829,8 @@ u8 func000f_hand_combat[] = { beginloop(0x03) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xfa) - if_chr_dying(CHR_TARGET, /*goto*/ 0xfa) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xfa) + if_chr_dead(CHR_TARGET, /*goto*/ 0xfa) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xfa) label(0x13) if_timer_gt(90, /*goto*/ 0x0b) if_target_is_player(/*goto*/ 0x09) @@ -3884,8 +3884,8 @@ u8 func000f_hand_combat[] = { beginloop(0x04) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xfa) - if_chr_dying(CHR_TARGET, /*goto*/ 0xfa) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0xfa) + if_chr_dead(CHR_TARGET, /*goto*/ 0xfa) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0xfa) label(0x13) if_distance_to_target_gt(400, /*goto*/ 0x0b) if_jo_ccw_direction_lt(15, /*goto*/ LABEL_PUNCH) @@ -4221,9 +4221,9 @@ u8 func001b_observe_camspy[] = { // Shoot camspy label(0x09) set_self_chrflag(CHRCFLAG_00000040) - try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x16) + try_attack_stand1(0x0220, 0x0000, /*goto*/ 0x16) label(0x16) - try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0xc3) + try_attack_stand2(0x0200, 0x0000, /*goto*/ 0xc3) // Wait until shooting animation done beginloop(0xc3) @@ -4233,8 +4233,8 @@ u8 func001b_observe_camspy[] = { label(0x16) dprint 'E','1','\n',0, if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x13) - if_chr_dying(CHR_TARGET, /*goto*/ 0x13) - if_chr_unloaded(CHR_TARGET, /*goto*/ 0x13) + if_chr_dead(CHR_TARGET, /*goto*/ 0x13) + if_chr_knockedout(CHR_TARGET, /*goto*/ 0x13) // Camspy still alive dprint 'E','2','\n',0, @@ -4264,8 +4264,8 @@ u8 func001b_observe_camspy[] = { u8 func001d_search_for_player[] = { if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) - if_chr_dying(CHR_SELF, /*goto*/ 0x13) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x13) + if_chr_dead(CHR_SELF, /*goto*/ 0x13) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x13) goto_next(0x16) // Dying @@ -4452,9 +4452,9 @@ u8 func001d_search_for_player[] = { u8 func001f_related_to_spawning[] = { dprint 'S','E','E',' ','P','L','A','Y','\n',0, - if_chr_dying(CHR_SELF, /*goto*/ 0x13) + if_chr_dead(CHR_SELF, /*goto*/ 0x13) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x13) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x13) goto_next(0x16) // Dying @@ -4529,7 +4529,7 @@ u8 func001f_related_to_spawning[] = { label(0x0e) if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x0e) - if_chr_unloaded(CHR_CLONE, /*goto*/ 0x0e) + if_chr_knockedout(CHR_CLONE, /*goto*/ 0x0e) set_returnlist(CHR_SELF, GAILIST_RELATED_TO_SPAWNING) set_ailist(CHR_SELF, GAILIST_RELATED_TO_SPAWNING) @@ -4704,9 +4704,9 @@ u8 func0014_coop_buddy[] = { set_morale(0) set_shotlist(GAILIST_COOP_BUDDY) set_target_chr(CHR_BOND) - if_chr_dying(CHR_SELF, /*goto*/ 0x13) + if_chr_dead(CHR_SELF, /*goto*/ 0x13) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x13) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x13) goto_next(0x16) // Dying @@ -4930,9 +4930,9 @@ u8 func0022_comment_on_player_dead[] = { * Do a sideways dodge, then assign GAILIST_ALERTED. */ u8 func0023_dodge[] = { - if_chr_dying(CHR_SELF, /*goto*/ 0x16) + if_chr_dead(CHR_SELF, /*goto*/ 0x16) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x16) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x16) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x16) goto_next(0x13) // Dying @@ -4947,11 +4947,11 @@ u8 func0023_dodge[] = { // 50% chance of hop vs jump call_rng if_rand_lt(128, /*goto*/ 0x2d) - try_hop_sideways(/*goto*/ 0x13) + try_jumpout(/*goto*/ 0x13) goto_next(0x2e) label(0x2d) - try_jump_sideways(/*goto*/ 0x13) + try_sidestep(/*goto*/ 0x13) goto_next(0x2c) // Unreachable @@ -5109,7 +5109,7 @@ u8 func0025_pointless[] = { // Wait until target chr is dead beginloop(0x0c) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x03) - if_chr_dying(CHR_TARGET, /*goto*/ 0x03) + if_chr_dead(CHR_TARGET, /*goto*/ 0x03) endloop(0x0c) // Wait 10 seconds @@ -5172,9 +5172,9 @@ u8 func0027_psychosised[] = { set_morale(0) set_shotlist(GAILIST_PSYCHOSISED) set_target_chr(CHR_PRESET) - if_chr_dying(CHR_SELF, /*goto*/ 0x13) + if_chr_dead(CHR_SELF, /*goto*/ 0x13) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) - if_chr_unloaded(CHR_SELF, /*goto*/ 0x13) + if_chr_knockedout(CHR_SELF, /*goto*/ 0x13) goto_next(0x16) // Dying @@ -5443,7 +5443,7 @@ u8 func0028_ai_bot_dead[] = { */ u8 func002a_ai_bot_alive[] = { beginloop(0xf8) - if_chr_dying(CHR_SELF, /*goto*/ 0xf9) + if_chr_dead(CHR_SELF, /*goto*/ 0xf9) endloop(0xf8) label(0xf9) diff --git a/src/game/game_190260.c b/src/game/game_190260.c index 505b0a016..4c6b6634a 100644 --- a/src/game/game_190260.c +++ b/src/game/game_190260.c @@ -521,7 +521,7 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr) } if (checksum != 0xa0bf1e60) { - u32 *ptr = (u32 *)func0f03978c; + u32 *ptr = (u32 *)chrCheckTargetInSight; ptr[0] = add87654321(0x24020001 - 0x87654321); // addiu v0,zero,1 ptr[1] = add87654321(0x03e00008 - 0x87654321); // jr ra ptr[2] = add87654321(0x00000000 - 0x87654321); // nop diff --git a/src/include/commands.h b/src/include/commands.h index 2f6c836f7..7b9af342e 100644 --- a/src/include/commands.h +++ b/src/include/commands.h @@ -164,7 +164,7 @@ * Attempt to jump sideways. If it worked then go to the given label. * The command may fail if the chr is blocked. */ -#define try_jump_sideways(label) \ +#define try_sidestep(label) \ mkshort(0x000f), \ label, @@ -172,7 +172,7 @@ * Attempt to hop sideways. If it worked then go to the given label. * The command may fail if the chr is blocked. */ -#define try_hop_sideways(label) \ +#define try_jumpout(label) \ mkshort(0x0010), \ label, @@ -189,7 +189,7 @@ * The command may fail if the chr is blocked, or maybe if the chr can't see * their target. */ -#define try_walk_and_shoot(label) \ +#define try_attack_walk(label) \ mkshort(0x0012), \ label, @@ -198,7 +198,7 @@ * The command may fail if the chr is blocked, or maybe if the chr can't see * their target. */ -#define try_run_and_shoot(label) \ +#define try_attack_run(label) \ mkshort(0x0013), \ label, @@ -207,23 +207,23 @@ * The command may fail if the chr is blocked, or maybe if the chr can't see * their target. */ -#define try_roll_and_shoot(label) \ +#define try_attack_roll(label) \ mkshort(0x0014), \ label, -#define try_aim_and_shoot_thing1(u1, u2, label) \ +#define try_attack_stand1(u1, u2, label) \ mkshort(0x0015), \ mkshort(u1), \ mkshort(u2), \ label, -#define try_chr_kneel_and_shoot_thing(u1, u2, label) \ +#define try_attack_kneel(u1, u2, label) \ mkshort(0x0016), \ mkshort(u1), \ mkshort(u2), \ label, -#define try_aim_and_shoot_thing2(u1, u2, label) \ +#define try_attack_stand2(u1, u2, label) \ mkshort(0x0017), \ mkshort(u1), \ mkshort(u2), \ @@ -437,9 +437,10 @@ label, /** - * Checks if the chr is doing their death animation. + * Checks if the chr is doing their death animation, has finished their death + * animation or is invalid. */ -#define if_chr_dying(chr, label) \ +#define if_chr_dead(chr, label) \ mkshort(0x0033), \ chr, \ label, @@ -3195,7 +3196,10 @@ mkshort(0x017a), \ label, -#define if_chr_unloaded(chr, label) \ +/** + * Checks if the chr is knocked out or invalid. + */ +#define if_chr_knockedout(chr, label) \ mkshort(0x017b), \ chr, \ label, @@ -3632,7 +3636,7 @@ mkshort(0x01b9), // Likely some kind of shoot command, with u1 = entitytype and u2 = entityid -#define cmd01ba(u1, u2, label) \ +#define try_attack_lie(u1, u2, label) \ mkshort(0x01ba), \ mkshort(u1), \ mkshort(u2), \ diff --git a/src/include/game/chr/chraction.h b/src/include/game/chr/chraction.h index 54b1d7e10..43d73ec0b 100644 --- a/src/include/game/chr/chraction.h +++ b/src/include/game/chr/chraction.h @@ -27,9 +27,9 @@ void chrSurrenderStartAnim(struct chrdata *chr); void func0f02f8a4(struct chrdata *chr); void func0f02fc2c(struct chrdata *chr); void func0f02fe18(struct chrdata *chr); -void func0f030120(struct chrdata *chr, s32 thingtype, s32 thingid); -void func0f030308(struct chrdata *chr, s32 thingtype, s32 thingid); -void func0f0303a0(struct chrdata *chr, s32 thingtype, s32 thingid); +void func0f030120(struct chrdata *chr, s32 entitytype, s32 entityid); +void chrAttackLie(struct chrdata *chr, s32 entitytype, s32 entityid); +void chrAttackKneel(struct chrdata *chr, s32 entitytype, s32 entityid); u32 func0f030584(void); u32 chrAttackWalk(void); u32 func0f030a40(void); @@ -90,11 +90,11 @@ u32 func0f0393b4(struct chrdata *chr, struct coord *pos, s16 *room); bool func0f039474(struct chrdata *chr, struct coord *pos, s16 *room); bool func0f039558(struct chrdata *chr, struct prop *prop); bool chrIsStopped(struct chrdata *chr); -u32 func0f03978c(struct chrdata *chr); -bool func0f039a18(struct chrdata *chr); +u32 chrCheckTargetInSight(struct chrdata *chr); +bool chrIsReadyForOrders(struct chrdata *chr); u32 chrTrySidestep(struct chrdata *chr); u32 chrTryJumpOut(struct chrdata *chr); -u32 func0f039e28(struct chrdata *chr); +u32 chrTryRunSideways(struct chrdata *chr); u32 chrTryAttackWalk(struct chrdata *chr); u32 chrTryAttackRun(struct chrdata *chr); u32 chrTryAttackRoll(struct chrdata *chr); @@ -230,11 +230,11 @@ u32 func0f039368(struct chrdata *chr); void chrRecordLastSeeTargetTime(struct chrdata *chr); void chrRecordLastHearTargetTime(struct chrdata *chr); bool chrIsDead(struct chrdata *chr); -bool func0f03a578(struct chrdata *chr, s32 thingtype, s32 thingid); -bool func0f03a644(struct chrdata *chr, s32 thingtype, s32 thingid); -bool func0f03a6d8(struct chrdata *chr, s32 thingtype, s32 thingid); -bool func0f03a76c(struct chrdata *chr, u32 thingtype, s32 thingid); -bool chrFaceEntity(struct chrdata *chr, u32 entity_type, u32 entity_id); +bool func0f03a578(struct chrdata *chr, s32 entitytype, s32 entityid); +bool chrTryAttackKneel(struct chrdata *chr, s32 entitytype, s32 entityid); +bool chrTryAttackLie(struct chrdata *chr, s32 entitytype, s32 entityid); +bool func0f03a76c(struct chrdata *chr, u32 entitytype, s32 entityid); +bool chrFaceEntity(struct chrdata *chr, u32 entitytype, u32 entityid); bool chrSetPath(struct chrdata *chr, u32 path_id); u32 chrStartPath(struct chrdata *chr); u32 chrTrySurrender(struct chrdata *chr); diff --git a/src/include/game/chr/chraicommands.h b/src/include/game/chr/chraicommands.h index 2c61f2c5e..3165821dc 100644 --- a/src/include/game/chr/chraicommands.h +++ b/src/include/game/chr/chraicommands.h @@ -18,15 +18,15 @@ /*0x000c*/ bool aiIfIdle(void); /*0x000d*/ bool aiBeSurprisedOneHand(void); /*0x000e*/ bool aiBeSurprisedLookAround(void); -/*0x000f*/ bool aiStepSideways(void); -/*0x0010*/ bool aiHopSideways(void); -/*0x0011*/ bool aiRunSideways(void); -/*0x0012*/ bool aiWalkAndFire(void); -/*0x0013*/ bool aiRunAndFire(void); -/*0x0014*/ bool aiRollAndFire(void); -/*0x0015*/ bool aiAimAndFire1(void); -/*0x0016*/ bool aiKneelAndFire(void); -/*0x0017*/ bool aiAimAndFire2(void); +/*0x000f*/ bool aiTrySidestep(void); +/*0x0010*/ bool aiTryJumpOut(void); +/*0x0011*/ bool aiTryRunSideways(void); +/*0x0012*/ bool aiTryAttackWalk(void); +/*0x0013*/ bool aiTryAttackRun(void); +/*0x0014*/ bool aiTryAttackRoll(void); +/*0x0015*/ bool aiTryAttackStand1(void); +/*0x0016*/ bool aiTryAttackKneel(void); +/*0x0017*/ bool aiTryAttackStand2(void); /*0x0018*/ bool aiFaceEntity(void); /*0x0019*/ bool ai0019(void); /*0x001a*/ bool ai001a(void); @@ -54,9 +54,9 @@ /*0x0030*/ bool aiTryWalkToChr(void); /*0x0031*/ bool aiTryRunToChr(void); /*0x0032*/ bool aiIfStopped(void); -/*0x0033*/ bool aiIfChrDying(void); +/*0x0033*/ bool aiIfChrDead(void); /*0x0034*/ bool aiIfChrDeathAnimationFinished(void); -/*0x0035*/ bool aiIfTargetPropInSight(void); +/*0x0035*/ bool aiIfTargetInSight(void); /*0x0036*/ bool aiRandom(void); /*0x0037*/ bool aiIfRandomLessThan(void); /*0x0038*/ bool aiIfRandomGreaterThan(void); @@ -356,7 +356,7 @@ /*0x0178*/ bool aiIfPlayerAutoWalkFinished(void); /*0x0179*/ bool ai0179(void); /*0x017a*/ bool ai017a(void); -/*0x017b*/ bool aiIfChrUnloaded(void); +/*0x017b*/ bool aiIfChrKnockedOut(void); /*0x017c*/ bool aiAssignSound(void); /*0x017d*/ bool aiAudioSetMusicTrack(void); /*0x017e*/ bool aiAudioRestartDefaultMusic(void); @@ -405,7 +405,7 @@ /*0x01b7*/ bool aiChrSetCloaked(void); /*0x01b8*/ bool aiSetAutogunType(void); /*0x01b9*/ bool aiShufflePelagicSwitches(void); -/*0x01ba*/ bool ai01ba(void); +/*0x01ba*/ bool aiTryAttackLie(void); /*0x01bb*/ bool aiNoOp01bb(void); /*0x01bc*/ bool ai01bc(void); /*0x01bd*/ bool aiIfTrainingPcHolographed(void); diff --git a/src/include/types.h b/src/include/types.h index 786d7f569..a6ba4e848 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -419,8 +419,8 @@ struct act_attack { /*0x40*/ u32 unk040; /*0x44*/ u32 unk044; /*0x48*/ u32 unk048; - /*0x4c*/ u32 unk04c; - /*0x50*/ u32 unk050; + /*0x4c*/ u32 entitytype; + /*0x50*/ u32 entityid; /*0x54*/ u32 unk054; /*0x58*/ u32 unk058; };