From 0798f65bc3b0d4f87d425b596bfa8bc31b6a64cc Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Fri, 6 Sep 2019 22:31:19 +1000 Subject: [PATCH] Discover more commands using chr struct --- asm/globals.s | 24 ++++++++++++------------ asm/include/commands.inc | 24 ++++++++++++------------ asm/setup/setupame.s | 20 ++++++++++---------- asm/setup/setupark.s | 10 +++++----- asm/setup/setupazt.s | 8 ++++---- asm/setup/setupcave.s | 16 ++++++++-------- asm/setup/setupdam.s | 6 +++--- asm/setup/setupdepo.s | 14 +++++++------- asm/setup/setupear.s | 6 +++--- asm/setup/setupeld.s | 2 +- asm/setup/setupimp.s | 12 ++++++------ asm/setup/setuplip.s | 16 ++++++++-------- asm/setup/setuplue.s | 16 ++++++++-------- asm/setup/setuppam.s | 8 ++++---- asm/setup/setuppete.s | 18 +++++++++--------- asm/setup/setuprit.s | 22 +++++++++++----------- asm/setup/setupsho.s | 4 ++-- asm/setup/setuptra.s | 14 +++++++------- 18 files changed, 120 insertions(+), 120 deletions(-) diff --git a/asm/globals.s b/asm/globals.s index 977f358ad..78d51ae04 100644 --- a/asm/globals.s +++ b/asm/globals.s @@ -227,7 +227,7 @@ func0006_unalerted: if_self_flag_bankx_eq CHRFLAG1_DOINGIDLEANIMATION, TRUE, BANK_1, /*goto*/ 0x13 if_self_flag_bankx_eq CHRFLAG1_DISSPEE, FALSE, BANK_1, /*goto*/ 0x15 dprint "CHECK SOUFI\n" // checks outfit? - if_chr_field0x332_zero CHR_SELF, /*goto*/ 0x28 + if_chr_propsoundcount_zero CHR_SELF, /*goto*/ 0x28 if_timer_gt 60, /*goto*/ 0x28 goto_next 0x15 @@ -313,7 +313,7 @@ func0006_unalerted: goto_next 0x14 label 0x15 - if_chr_field_0x120 600, OPERATOR_GREATER_THAN, /*goto*/ 0x15 + if_chr_soundtimer 600, OPERATOR_GREATER_THAN, /*goto*/ 0x15 goto_next 0xea label 0x14 @@ -869,7 +869,7 @@ func0007_alerted: // is_chr_is_dead_maybe (named wrong) was false label 0x16 set_onshot_function GFUNC_ALERTED - set_chr_field_0x356 35 + set_aishootingatmel 35 set_unknown_function GFUNC_SEARCH_FOR_PLAYER dprint "START LOOP\n" @@ -881,7 +881,7 @@ func0007_alerted: // Dying label 0x16 - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_onshot_function GFUNC_IDLE restart_timer @@ -937,7 +937,7 @@ func0007_alerted: if_has_gun CHR_SELF, /*goto*/ 0x1b dprint "LOST MY GUN\n" label 0xac - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 say_quip CHR_JOANNA, 0x21, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00 // "My gun!" stop_chr restart_timer @@ -2446,8 +2446,8 @@ func0007_alerted: // RETREAT // label LABEL_RETREAT - set_chr_field_0x35e_0x35f 0, 0x00 - set_chr_field_0x35e_0x35f 1, 0x00 + set_chr_dodge_rating 0, 0x00 + set_chr_dodge_rating 1, 0x00 dprint "ROUTED\n" set_action ACTION_RETREAT, FALSE unset_self_flag_bankx CHRFLAG1_00040000, BANK_1 @@ -3713,7 +3713,7 @@ func001a_maybe_unset_disspee: // Wait 1 second, or for some field in the current chr to change. label 0x13 if_timer_lt 60, /*goto*/ 0x15 - if_chr_field0x332_zero CHR_SELF, /*goto*/ 0x28 + if_chr_propsoundcount_zero CHR_SELF, /*goto*/ 0x28 goto_next 0x15 // Field changed @@ -4249,12 +4249,12 @@ func001d_search_for_player: set_chr_special_death_animation CHR_SELF, NULL label 0x13 dprint "SEARCH ROOM\n" - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 label 0x00 set_target_chr FOLLOW_CHR set_self_flag_bankx CHRFLAG1_01000000, BANK_1 if_self_flag_bankx_eq CHRFLAG1_10000000, TRUE, BANK_1, /*goto*/ 0x16 - set_chr_field_0x330 + set_chr_roomtosearch if_chr_distance_gt 1000, /*goto*/ 0x13 try_run_to_target_chr_with_hand_up /*goto*/ 0x03 label 0x13 @@ -4853,7 +4853,7 @@ func002b_do_something_and_wait: * Not used. */ func0022_comment_on_player_dead: - set_chr_field_0x356 0 + set_aishootingatmel 0 dprint "KILL\n" stop_chr @@ -4902,7 +4902,7 @@ func0023_dodge: // Dying label 0x16 - set_chr_field_0x356 0 + set_aishootingatmel 0 set_function CHR_SELF, GFUNC_IDLE label 0x13 diff --git a/asm/include/commands.inc b/asm/include/commands.inc index d48cf6d24..a10f7f6c0 100644 --- a/asm/include/commands.inc +++ b/asm/include/commands.inc @@ -1369,7 +1369,7 @@ .byte \label .endm -// Does some math on chr fields 0x1a0 and 0x290, possibly involving square roots. +// Does some math on chr's bdlist, possibly involving square roots. // If result is > 50, goto label .macro if_distance_to_home_gt_50_maybe label .short 0x012c @@ -1748,7 +1748,8 @@ .byte \label .endm -// Involves a call to the RNG, and zeroing chr props 0x160 through 0x016c +// Involves a call to the RNG, and zeroing chr fields aimendlshoulder, +// aimendrshoulder, aimendback and amendsideback. // // Called with values: // 0x5a64 (23140) @@ -1771,8 +1772,7 @@ .short 0x0185 .endm -// 0258 01 15 -.macro if_chr_field_0x120 value operator label +.macro if_chr_soundtimer value operator label .short 0x0186 .short \value .byte \operator @@ -1864,8 +1864,8 @@ .byte \animation .endm -// Copies a value from the chr's position struct into the chr struct itself -.macro set_chr_field_0x330 +// Copies the room from the chr's position struct into the chr struct itself +.macro set_chr_roomtosearch .short 0x01a1 .endm @@ -1887,7 +1887,7 @@ .short \text .endm -.macro if_chr_field0x332_zero chr label +.macro if_chr_propsoundcount_zero chr label .short 0x01a7 .byte \chr .byte \label @@ -2009,7 +2009,7 @@ .byte \chr .endm -.macro set_chr_field_0x356 value +.macro set_aishootingatmel value .short 0x01c2 .short \value .endm @@ -2028,16 +2028,16 @@ .endm // Sets a field in the chr struct -// If whichprop is 0, set field 0x35e -// If whichprop is 1, set field 0x35f +// If whichprop is 0, set dodgerating +// If whichprop is 1, set maxdodgerating // If whichprop is 2, set both -.macro set_chr_field_0x35e_0x35f value whichprop +.macro set_chr_dodge_rating value whichprop .short 0x01c6 .byte \value .byte \whichprop .endm -.macro set_chr_field0x360 value +.macro set_unarmeddodgerating value .short 0x01c7 .byte \value .endm diff --git a/asm/setup/setupame.s b/asm/setup/setupame.s index 686f664ce..6b8ef7c28 100644 --- a/asm/setup/setupame.s +++ b/asm/setup/setupame.s @@ -1070,8 +1070,8 @@ func0409_start_path30: do_path 30 func040a_start_path31: - set_chr_field_0x35e_0x35f 2, 0x14 - set_chr_field0x360 0 + set_chr_dodge_rating 2, 0x14 + set_unarmeddodgerating 0 set_accuracy 0 set_reaction_speed 0 set_chr_health CHR_SELF, 40 @@ -1085,8 +1085,8 @@ func040a_start_path31: endfunction func040b_start_path32: - set_chr_field_0x35e_0x35f 2, 0x14 - set_chr_field0x360 0 + set_chr_dodge_rating 2, 0x14 + set_unarmeddodgerating 0 set_accuracy 0 set_reaction_speed 0 set_chr_health CHR_SELF, 40 @@ -1099,8 +1099,8 @@ func040b_start_path32: endfunction func040c_start_path33: - set_chr_field_0x35e_0x35f 2, 0x14 - set_chr_field0x360 0 + set_chr_dodge_rating 2, 0x14 + set_unarmeddodgerating 0 set_accuracy 0 set_reaction_speed 0 set_chr_health CHR_SELF, 40 @@ -1113,8 +1113,8 @@ func040c_start_path33: endfunction func040d_start_path34: - set_chr_field_0x35e_0x35f 2, 0x14 - set_chr_field0x360 0 + set_chr_dodge_rating 2, 0x14 + set_unarmeddodgerating 0 set_accuracy 10 set_reaction_speed 0 set_chr_health CHR_SELF, 40 @@ -3212,8 +3212,8 @@ func1012_trigger_x_music: endfunction .macro init_guard accuracy health - set_chr_field_0x35e_0x35f 2, 0x14 - set_chr_field0x360 0 + set_chr_dodge_rating 2, 0x14 + set_unarmeddodgerating 0 set_accuracy \accuracy set_reaction_speed 0 set_chr_health CHR_SELF, \health diff --git a/asm/setup/setupark.s b/asm/setup/setupark.s index 3bedbd9d6..f4f3ab291 100644 --- a/asm/setup/setupark.s +++ b/asm/setup/setupark.s @@ -763,7 +763,7 @@ func0410_init_top_guard: if_difficulty_lt DIFF_SA, /*goto*/ 0x20 // SA and PA - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 80 set_reaction_speed 10 set_chr_health CHR_SELF, 10 @@ -774,7 +774,7 @@ func0410_init_top_guard: // Agent label 0x20 - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 12 set_reaction_speed 10 set_chr_health CHR_SELF, 10 @@ -2565,7 +2565,7 @@ func0412_outro: endfunction func0413_defend_pad: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 12 set_reaction_speed 10 set_chr_health CHR_SELF, 10 @@ -2622,7 +2622,7 @@ func1001_objectives_failed_msg: endfunction func0414_init_shock: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 12 set_reaction_speed 10 set_chr_health CHR_SELF, 40 @@ -2636,7 +2636,7 @@ func0414_init_shock: * @unused */ func0415_init_10hp: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 12 set_reaction_speed 10 set_chr_health CHR_SELF, 10 diff --git a/asm/setup/setupazt.s b/asm/setup/setupazt.s index ed199a071..00a34c329 100644 --- a/asm/setup/setupazt.s +++ b/asm/setup/setupazt.s @@ -732,7 +732,7 @@ func0407_init_blonde: endfunction func0406_init_stripes: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 16 set_reaction_speed 55 set_chr_health CHR_SELF, 60 @@ -791,7 +791,7 @@ func1006_msg_elvisbeable: endfunction .macro init_path pathid function - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 16 set_reaction_speed 55 set_chr_health CHR_SELF, 60 @@ -883,7 +883,7 @@ unregistered_function1: endfunction func0415_unused: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 16 set_reaction_speed 55 set_chr_health CHR_SELF, 60 @@ -965,7 +965,7 @@ func100c_spawn_dd_guards: endfunction func0416_spawned_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 16 set_reaction_speed 55 set_chr_health CHR_SELF, 60 diff --git a/asm/setup/setupcave.s b/asm/setup/setupcave.s index 63ef97722..7575644fc 100644 --- a/asm/setup/setupcave.s +++ b/asm/setup/setupcave.s @@ -1057,7 +1057,7 @@ func1004_guard_activation: endfunction func0405_start_path15: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 12 set_reaction_speed 70 set_chr_health CHR_SELF, 40 @@ -2323,7 +2323,7 @@ func100e_check_alaskans_killed: * @unused */ func0410_unused: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 22 set_reaction_speed 80 set_chr_health CHR_SELF, 40 @@ -2510,7 +2510,7 @@ func040f_nsa: func0412_init_takeover_lackey: set_onshot_function GFUNC_ALERTED set_self_flag_bank3 CHRFLAG3_00000040 - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 60 set_reaction_speed 80 set_chr_health CHR_SELF, 40 @@ -2795,7 +2795,7 @@ func1017_laser5: endfunction func0403_unused: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 12 set_reaction_speed 45 set_chr_health CHR_SELF, 60 @@ -2948,7 +2948,7 @@ func1016_console_noises: endfunction func0426_init_alaskan_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 12 set_reaction_speed 70 set_chr_health CHR_SELF, 40 @@ -2965,7 +2965,7 @@ func0427_init_posttakeover_guard: set_self_flag_bank3 CHRFLAG3_00040000 set_self_flag_bank3 CHRFLAG3_HIDDEN set_chr_alliance CHR_SELF, 0x04 - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 12 set_reaction_speed 45 set_chr_health CHR_SELF, 60 @@ -3015,7 +3015,7 @@ func0428_posttakeover_guard: * @unused */ func0429_unused: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 22 set_reaction_speed 80 set_chr_health CHR_SELF, 40 @@ -3029,7 +3029,7 @@ func0429_unused: * Assigned to two stripes guards in the foyer during takeover. */ func042a_foyer_spawner: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 12 set_reaction_speed 45 set_chr_health CHR_SELF, 60 diff --git a/asm/setup/setupdam.s b/asm/setup/setupdam.s index 2e006f796..28f572df4 100644 --- a/asm/setup/setupdam.s +++ b/asm/setup/setupdam.s @@ -637,7 +637,7 @@ func1400_setup_counterop: func0408_guard_unalerted: set_chr_cloaked CHR_SELF, FALSE, TRUE - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 18 set_reaction_speed 60 set_chr_health CHR_SELF, 70 @@ -1248,7 +1248,7 @@ func100f_check_researchdata_collected: endfunction .macro init_path pathid - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 18 set_reaction_speed 60 set_chr_health CHR_SELF, 70 @@ -2086,7 +2086,7 @@ func1014_moonpool_switch: func0413_guard_alerted: set_chr_cloaked CHR_SELF, FALSE, TRUE - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 18 set_reaction_speed 60 set_chr_health CHR_SELF, 70 diff --git a/asm/setup/setupdepo.s b/asm/setup/setupdepo.s index ae7fc60c3..7636266dc 100644 --- a/asm/setup/setupdepo.s +++ b/asm/setup/setupdepo.s @@ -456,7 +456,7 @@ path03: endpath func0409_start_path00: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 5 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -469,7 +469,7 @@ func0409_start_path00: endfunction func040a_start_path01: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 5 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -482,7 +482,7 @@ func040a_start_path01: endfunction func040b_start_path02: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 5 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -495,7 +495,7 @@ func040b_start_path02: endfunction func040c_start_path03: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 5 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -1011,7 +1011,7 @@ func1009_spawner_during_decode: .macro init_swat set_chr_flag_bank2 CHR_SELF, CHRFLAG2_00400000 set_self_flag_bankx CHRFLAG1_00080000, BANK_1 - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 15 set_reaction_speed 25 set_chr_health CHR_SELF, 40 @@ -2292,7 +2292,7 @@ func0414_init_cloak2_guard: stop_chr set_onshot_function FUNC_CLOAK_GUARD set_self_flag_bank3 CHRFLAG3_INVINCIBLE_TO_GUNFIRE - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 5 set_reaction_speed 25 set_chr_health CHR_SELF, 40 @@ -2495,7 +2495,7 @@ func101d_init_mines: endfunction .macro init_guard accuracy reaction function - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy \accuracy set_reaction_speed \reaction set_chr_health CHR_SELF, 40 diff --git a/asm/setup/setupear.s b/asm/setup/setupear.s index de2d5fadd..9de0cfe81 100644 --- a/asm/setup/setupear.s +++ b/asm/setup/setupear.s @@ -791,7 +791,7 @@ path13: endpath .macro init_path pathid - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 1 set_reaction_speed 20 set_chr_health CHR_SELF, 40 @@ -2931,7 +2931,7 @@ func1016_setup_drcaroll: endfunction func040a_init_basic_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 1 set_reaction_speed 20 set_chr_health CHR_SELF, 40 @@ -2942,7 +2942,7 @@ func040a_init_basic_guard: endfunction func040b_init_shock_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 11 set_reaction_speed 20 set_chr_health CHR_SELF, 40 diff --git a/asm/setup/setupeld.s b/asm/setup/setupeld.s index 7a01f7489..3a0036f5e 100644 --- a/asm/setup/setupeld.s +++ b/asm/setup/setupeld.s @@ -2435,7 +2435,7 @@ func1015_check_computers_destroyed: endfunction .macro init_guard accuracy reaction health recovery - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy \accuracy set_reaction_speed \reaction set_chr_health CHR_SELF, \health diff --git a/asm/setup/setupimp.s b/asm/setup/setupimp.s index d12edbb9b..16a6a1d9a 100644 --- a/asm/setup/setupimp.s +++ b/asm/setup/setupimp.s @@ -589,7 +589,7 @@ func1400_setup_counterop: .endm .macro initclone_logic templatechr clonefunc - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 20 set_reaction_speed 70 set_chr_health CHR_SELF, 40 @@ -1869,7 +1869,7 @@ func0422_taker_holo3: endfunction func0423_init_shock: - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 20 set_reaction_speed 70 set_chr_health CHR_SELF, 40 @@ -2906,7 +2906,7 @@ func1015_firingrange_pc: .endm .macro inittopclone_logic templatechr clonefunc - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 20 set_reaction_speed 70 set_chr_health CHR_SELF, 40 @@ -3247,7 +3247,7 @@ unregistered_function1: endfunction func043b_init_blonde: - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 20 set_reaction_speed 70 set_chr_health CHR_SELF, 40 @@ -3259,7 +3259,7 @@ func043b_init_blonde: endfunction func043c_init_cisolder: - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 20 set_reaction_speed 70 set_chr_health CHR_SELF, 40 @@ -3270,7 +3270,7 @@ func043c_init_cisolder: endfunction func043d_unused: - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 30 set_reaction_speed 70 set_chr_health CHR_SELF, 40 diff --git a/asm/setup/setuplip.s b/asm/setup/setuplip.s index f55638e12..a10603c3d 100644 --- a/asm/setup/setuplip.s +++ b/asm/setup/setuplip.s @@ -1115,7 +1115,7 @@ func1006_check_lab_accessed: endfunction .macro init_path accuracy health recovery pathid - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy \accuracy set_reaction_speed 35 set_chr_health CHR_SELF, \health @@ -2450,7 +2450,7 @@ func041d_unused_041d: * @unused */ func041e_unused_041e: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 10 set_reaction_speed 35 set_chr_health CHR_SELF, 80 @@ -2798,7 +2798,7 @@ func0420_labtech_doors: if_shot_near_chr 0x00, /*goto*/ 0x89 if_saw_death 0x00, /*goto*/ 0x89 dprint "TALK 5\n" - if_chr_field0x332_zero CHR_SELF, /*goto*/ 0x2d + if_chr_propsoundcount_zero CHR_SELF, /*goto*/ 0x2d endloop 0x7b label 0x2d @@ -3757,7 +3757,7 @@ func1025_toggle_guards: endfunction func0429_spawn_while_xraying: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 8 set_reaction_speed 35 set_chr_health CHR_SELF, 50 @@ -3835,7 +3835,7 @@ func042b_xray_clone: endfunction func042c_dragon_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 8 set_reaction_speed 35 set_chr_health CHR_SELF, 50 @@ -3846,7 +3846,7 @@ func042c_dragon_guard: endfunction func042d_superdragon_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 10 set_reaction_speed 35 set_chr_health CHR_SELF, 80 @@ -3857,7 +3857,7 @@ func042d_superdragon_guard: endfunction func042e_biotech_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 18 set_reaction_speed 35 set_chr_health CHR_SELF, 80 @@ -3868,7 +3868,7 @@ func042e_biotech_guard: endfunction func042e_biotech_guard_alerted: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 18 set_reaction_speed 35 set_chr_health CHR_SELF, 80 diff --git a/asm/setup/setuplue.s b/asm/setup/setuplue.s index 6bc563962..b59c2f141 100644 --- a/asm/setup/setuplue.s +++ b/asm/setup/setuplue.s @@ -790,7 +790,7 @@ func0426_8420: endfunction .macro init_path pathid - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 6 set_reaction_speed 50 set_chr_health CHR_SELF, 40 @@ -1283,7 +1283,7 @@ func100b_final_hangar: endfunction func0411_init_hangar_guard1: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 8 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -1304,7 +1304,7 @@ func0411_init_hangar_guard1: endfunction func0412_init_hangar_guard2: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 8 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -1325,7 +1325,7 @@ func0412_init_hangar_guard2: endfunction func0413_init_hangar_guard3: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 8 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -1346,7 +1346,7 @@ func0413_init_hangar_guard3: endfunction func0414_init_hangar_guard4: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 8 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -2506,7 +2506,7 @@ func1018_unhide_guards: endfunction func0419_clone_spawner: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 8 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -2659,12 +2659,12 @@ func040f_spawned_guard: .endm func041d_trooper_unalerted: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a init_guard 6, 50, 0, 0, GFUNC_UNALERTED endfunction func041f_trooper_alerted: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a init_guard 6, 50, 0, 0, GFUNC_ALERTED endfunction diff --git a/asm/setup/setuppam.s b/asm/setup/setuppam.s index da9ef2d05..469cbbbfb 100644 --- a/asm/setup/setuppam.s +++ b/asm/setup/setuppam.s @@ -2135,7 +2135,7 @@ func1002_intro: endfunction func042f_init_pelagic_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 20 set_reaction_speed 65 set_chr_health CHR_SELF, 70 @@ -2214,7 +2214,7 @@ func1008_msg_theresdrcaroll: goto_next 0x0d label 0x2e - if_chr_field0x332_zero CHR_ELVIS, /*goto*/ 0x2e + if_chr_propsoundcount_zero CHR_ELVIS, /*goto*/ 0x2e endloop 0x04 label 0x2e @@ -3954,7 +3954,7 @@ func1021_c6c4: endfunction .macro init_path pathid function - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 20 set_reaction_speed 65 set_chr_health CHR_SELF, 70 @@ -4246,7 +4246,7 @@ func1028_enable_last_3_guards: endfunction func042b_run_to_exit: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 40 set_reaction_speed 65 set_chr_health CHR_SELF, 10 diff --git a/asm/setup/setuppete.s b/asm/setup/setuppete.s index caa91dcd6..0babdc7cc 100644 --- a/asm/setup/setuppete.s +++ b/asm/setup/setuppete.s @@ -1668,7 +1668,7 @@ func0413_bugspotter: endfunction .macro init_patroller pathid - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 4 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -1813,7 +1813,7 @@ func041d_fbi: beginloop 0x0e if_difficulty_lt DIFF_SA, /*goto*/ 0x03 - if_chr_field0x332_zero CHR_SELF, /*goto*/ 0x04 + if_chr_propsoundcount_zero CHR_SELF, /*goto*/ 0x04 label 0x03 if_chr_stopped /*goto*/ 0x04 endloop 0x0e @@ -2010,7 +2010,7 @@ func041a_robot: func041e_sealer1: .set LABEL_ALERTED, 0x18 - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 4 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -2278,7 +2278,7 @@ func100d_spawn_alarm_responders: func041f_alarm_responder: set_self_flag_bankx CHRFLAG1_00080000, BANK_1 set_self_flag_bankx CHRFLAG0_80000000, BANK_0 - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 14 set_reaction_speed 20 set_chr_health CHR_SELF, 40 @@ -2791,7 +2791,7 @@ func1019_setup_topstairs_death_animation: endfunction func040e_6064: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 4 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -2803,7 +2803,7 @@ func040e_6064: func040f_6088: if_difficulty_lt DIFF_SA, /*goto*/ 0x03 - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 20 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -2812,7 +2812,7 @@ func040f_6088: set_shield 0 set_function CHR_SELF, GFUNC_UNALERTED label 0x03 - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 4 set_reaction_speed 30 set_chr_health CHR_SELF, 40 @@ -2823,7 +2823,7 @@ func040f_6088: endfunction func0410_60d0: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 14 set_reaction_speed 20 set_chr_health CHR_SELF, 40 @@ -2835,7 +2835,7 @@ func0410_60d0: func0411_60f4: set_self_flag_bank3 CHRFLAG3_00020000 - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 14 set_reaction_speed 20 set_chr_health CHR_SELF, 40 diff --git a/asm/setup/setuprit.s b/asm/setup/setuprit.s index d4b3fd7b8..8394eb509 100644 --- a/asm/setup/setuprit.s +++ b/asm/setup/setuprit.s @@ -1625,7 +1625,7 @@ func100c_cockpit_stripes: set_chr_alliance CHR_SELF, 0x04 cmd0145_rebuild_groups cmd0146_rebuild_groups - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 14 set_reaction_speed 50 set_chr_health CHR_SELF, 60 @@ -1663,7 +1663,7 @@ func0413_taker1: cmd0145_rebuild_groups cmd0146_rebuild_groups set_self_flag_bank3 CHRFLAG3_00000020 - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_reaction_speed 50 set_chr_health CHR_SELF, 60 set_armor 0 @@ -1678,7 +1678,7 @@ func0413_taker2: cmd0145_rebuild_groups cmd0146_rebuild_groups set_self_flag_bank3 CHRFLAG3_00000020 - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_reaction_speed 50 set_chr_health CHR_SELF, 60 set_armor 0 @@ -1924,7 +1924,7 @@ func0412_sitting_guy: endfunction func0426_start_path00: - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 14 set_reaction_speed 70 set_chr_health CHR_SELF, 40 @@ -1937,7 +1937,7 @@ func0426_start_path00: endfunction func0427_start_path01: - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 14 set_reaction_speed 70 set_chr_health CHR_SELF, 40 @@ -2420,7 +2420,7 @@ func0415_cloner1: endfunction func0416_init_clone1: - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 14 set_reaction_speed 50 set_chr_health CHR_SELF, 60 @@ -2513,7 +2513,7 @@ func0418_cloner2: endfunction func0419_init_clone2: - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 14 set_reaction_speed 50 set_chr_health CHR_SELF, 60 @@ -2602,7 +2602,7 @@ func041b_cloner3: endfunction func041c_init_clone3: - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 14 set_reaction_speed 50 set_chr_health CHR_SELF, 60 @@ -2632,7 +2632,7 @@ func041f_init_blonde: set_chr_alliance CHR_SELF, 0x04 cmd0145_rebuild_groups cmd0146_rebuild_groups - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 24 set_reaction_speed 50 set_chr_health CHR_SELF, 60 @@ -3019,7 +3019,7 @@ func042a_init_neutral: yield yield yield - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 14 set_reaction_speed 70 set_chr_health CHR_SELF, 40 @@ -3032,7 +3032,7 @@ func042a_init_neutral: endfunction func042b_reinit_stripes: - set_chr_field_0x35e_0x35f 2, 0x00 + set_chr_dodge_rating 2, 0x00 set_accuracy 14 set_reaction_speed 50 set_chr_health CHR_SELF, 60 diff --git a/asm/setup/setupsho.s b/asm/setup/setupsho.s index 90ff2de2b..b0ce5a661 100644 --- a/asm/setup/setupsho.s +++ b/asm/setup/setupsho.s @@ -563,7 +563,7 @@ func0402_unarmed_skedar: label 0x09 label 0x0a - if_chr_field0x332_zero CHR_SELF, /*goto*/ 0x2d + if_chr_propsoundcount_zero CHR_SELF, /*goto*/ 0x2d goto_next 0x2d label 0x06 @@ -755,7 +755,7 @@ func0404_miniskedar: restart_timer label 0x09 restart_timer - if_chr_field0x332_zero CHR_SELF, /*goto*/ 0x2d + if_chr_propsoundcount_zero CHR_SELF, /*goto*/ 0x2d goto_next 0x06 label 0x2d diff --git a/asm/setup/setuptra.s b/asm/setup/setuptra.s index 47a85b844..95b65f4b0 100644 --- a/asm/setup/setuptra.s +++ b/asm/setup/setuptra.s @@ -1511,7 +1511,7 @@ func1008_spawngroup1: endfunction func1008_spawngroup1_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 10 set_reaction_speed 40 set_chr_health CHR_SELF, 40 @@ -1584,7 +1584,7 @@ func1013_spawngroup2: endfunction func1013_spawngroup2_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 10 set_reaction_speed 40 set_chr_health CHR_SELF, 40 @@ -1685,7 +1685,7 @@ func1014_spawngroup3: endfunction func1014_spawngroup3_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 10 set_reaction_speed 40 set_chr_health CHR_SELF, 40 @@ -1765,7 +1765,7 @@ func1015_spawngroup4: * @unused */ func1015_spawngroup4_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 10 set_reaction_speed 40 set_chr_health CHR_SELF, 40 @@ -3124,7 +3124,7 @@ func1021_jo_escaping: * time. */ func0416_spawn_during_follow: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 10 set_reaction_speed 40 set_chr_health CHR_SELF, 40 @@ -3192,7 +3192,7 @@ func0418_follower_clone: endfunction func0419_init_biotech: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 20 set_reaction_speed 40 set_chr_health CHR_SELF, 40 @@ -3204,7 +3204,7 @@ func0419_init_biotech: endfunction func041a_init_superdragon_guard: - set_chr_field_0x35e_0x35f 2, 0x0a + set_chr_dodge_rating 2, 0x0a set_accuracy 10 set_reaction_speed 40 set_chr_health CHR_SELF, 40