From 644b823dc14f38b03cdc37f3ee87c2405c9b96dd Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 17 Aug 2024 23:17:19 +1000 Subject: [PATCH] Discover AI command 01bc (if_pouncebits_eq) --- src/game/chraction.c | 6 +++--- src/game/chrai.c | 2 +- src/game/chraicommands.c | 2 +- src/include/commands.h | 7 +++++-- src/include/game/chraction.h | 4 ++-- src/include/game/chraicommands.h | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/game/chraction.c b/src/game/chraction.c index b60f78e91..c8199e8e4 100644 --- a/src/game/chraction.c +++ b/src/game/chraction.c @@ -13096,18 +13096,18 @@ void chr_tick_patrol(struct chrdata *chr) } } -bool chr_try_sk_jump(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4) +bool chr_try_sk_jump(struct chrdata *chr, u8 pouncebits, u8 arg2, s32 arg3, u8 arg4) { if (chr && chr->actiontype != ACT_SKJUMP && chr_is_ready_for_orders(chr) && CHRRACE(chr) == RACE_SKEDAR) { - return chr_start_sk_jump(chr, arg1, arg2, arg3, arg4); + return chr_start_sk_jump(chr, pouncebits, arg2, arg3, arg4); } return false; } -bool chr_start_sk_jump(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4) +bool chr_start_sk_jump(struct chrdata *chr, u8 pouncebits, u8 arg2, s32 arg3, u8 arg4) { f32 radius; f32 ymax; diff --git a/src/game/chrai.c b/src/game/chrai.c index bc387cb08..982ed3fb2 100644 --- a/src/game/chrai.c +++ b/src/game/chrai.c @@ -459,7 +459,7 @@ bool (*g_CommandPointers[])(void) = { /*0x01b9*/ ai_shuffle_pelagic_switches, /*0x01ba*/ ai_try_attack_lie, /*0x01bb*/ ai_noop_01bb, - /*0x01bc*/ ai01bc, + /*0x01bc*/ ai_if_pouncebits_eq, /*0x01bd*/ ai_if_training_pc_holographed, /*0x01be*/ ai_if_player_using_device, /*0x01bf*/ ai_chr_begin_or_end_teleport, diff --git a/src/game/chraicommands.c b/src/game/chraicommands.c index b35ea401a..c006b027b 100644 --- a/src/game/chraicommands.c +++ b/src/game/chraicommands.c @@ -9168,7 +9168,7 @@ bool ai_noop_01bb(void) /** * @cmd 01bc */ -bool ai01bc(void) +bool ai_if_pouncebits_eq(void) { struct bytelist *cmd = (struct bytelist *)(g_Vars.ailist + g_Vars.aioffset); diff --git a/src/include/commands.h b/src/include/commands.h index 496dd8db6..97dc68187 100644 --- a/src/include/commands.h +++ b/src/include/commands.h @@ -3944,9 +3944,12 @@ mkshort(0x01bb), \ mkshort(0), -#define cmd01bc(u1, label) \ +/** + * Pouncebits are unused, and this command is not called. + */ +#define if_pouncebits_eq(pouncebits, label) \ mkshort(0x01bc), \ - u1, \ + pouncebits, \ label, /** diff --git a/src/include/game/chraction.h b/src/include/game/chraction.h index c4e015e32..949e67c7e 100644 --- a/src/include/game/chraction.h +++ b/src/include/game/chraction.h @@ -165,7 +165,7 @@ bool chr_go_pos_update_lift_action(struct chrdata *chr, u32 curpadflags, bool ar s16 chr_go_pos_get_next_pad_num(struct chrdata *chr); void chr_tick_go_pos(struct chrdata *chr); void chr_tick_patrol(struct chrdata *chr); -bool chr_start_sk_jump(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4); +bool chr_start_sk_jump(struct chrdata *chr, u8 pouncebits, u8 arg2, s32 arg3, u8 arg4); void chr_tick_sk_jump(struct chrdata *chr); void chra_tick(struct chrdata *chr); void cutscene_start(u32 ailistid); @@ -274,7 +274,7 @@ void prop_set_dangerous(struct prop *prop); bool chr_detect_dangerous_object(struct chrdata *chr, u8 flags); void chr_tick_bond_die(struct chrdata *chr); s32 chr_is_using_lift(struct chrdata *chr); -bool chr_try_sk_jump(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4); +bool chr_try_sk_jump(struct chrdata *chr, u8 pouncebits, u8 arg2, s32 arg3, u8 arg4); bool chr_saw_target_recently(struct chrdata *chr); bool chr_heard_target_recently(struct chrdata *chr); f32 chr_get_angle_to_target(struct chrdata *chr); diff --git a/src/include/game/chraicommands.h b/src/include/game/chraicommands.h index 6dad3a05a..ced41a38a 100644 --- a/src/include/game/chraicommands.h +++ b/src/include/game/chraicommands.h @@ -408,7 +408,7 @@ /*0x01b9*/ bool ai_shuffle_pelagic_switches(void); /*0x01ba*/ bool ai_try_attack_lie(void); /*0x01bb*/ bool ai_noop_01bb(void); -/*0x01bc*/ bool ai01bc(void); +/*0x01bc*/ bool ai_if_pouncebits_eq(void); /*0x01bd*/ bool ai_if_training_pc_holographed(void); /*0x01be*/ bool ai_if_player_using_device(void); /*0x01bf*/ bool ai_chr_begin_or_end_teleport(void);