Fix some incorrect commands and identify some no-op ones from GE

This commit is contained in:
Ryan Dwyer 2025-01-21 21:11:34 +10:00
parent 9550c72151
commit d63fd26f9d
13 changed files with 166 additions and 128 deletions

View File

@ -14639,7 +14639,7 @@ s32 chr_find_waypoint_within_pos_quadrant(struct coord *pos, RoomNum *rooms, f32
return -1;
}
bool func0f04a4ec(struct chrdata *chr, u8 quadrant)
bool chr_set_pad_preset_to_waypoint_within_quadrant(struct chrdata *chr, u8 quadrant)
{
if (quadrant == QUADRANT_TOWARDSTARGET || quadrant == QUADRANT_AWAYFROMTARGET) {
struct prop *prop = chr->prop;
@ -14691,7 +14691,7 @@ bool chr_set_pad_preset_to_waypoint_within_target_quadrant(struct chrdata *chr,
struct prop *prop;
if (quadrant == QUADRANT_TOWARDSTARGET || quadrant == QUADRANT_AWAYFROMTARGET) {
return func0f04a4ec(chr, quadrant);
return chr_set_pad_preset_to_waypoint_within_quadrant(chr, quadrant);
}
angle = 0;

View File

@ -122,13 +122,13 @@ bool (*g_CommandPointers[])(void) = {
/*0x006c*/ ai_open_door,
/*0x006d*/ ai_close_door,
/*0x006e*/ ai_if_door_state,
/*0x006f*/ ai_if_object_is_door,
/*0x006f*/ ai_if_door_ever_opened,
/*0x0070*/ ai_lock_door,
/*0x0071*/ ai_unlock_door,
/*0x0072*/ ai_if_door_locked,
/*0x0073*/ ai_if_objective_complete,
/*0x0074*/ ai_if_objective_failed,
/*0x0075*/ ai0075,
/*0x0075*/ ai_set_pad_preset_to_quadrant,
/*0x0076*/ ai_set_pad_preset_to_target_quadrant,
/*0x0077*/ ai_if_difficulty_less_than,
/*0x0078*/ ai_if_difficulty_greater_than,
@ -140,8 +140,8 @@ bool (*g_CommandPointers[])(void) = {
/*0x007e*/ ai_if_num_arghs_greater_than,
/*0x007f*/ ai_if_num_close_arghs_less_than,
/*0x0080*/ ai_if_num_close_arghs_greater_than,
/*0x0081*/ ai_if_chr_health_greater_than,
/*0x0082*/ ai_if_chr_health_less_than,
/*0x0081*/ ai_if_chr_health_lt,
/*0x0082*/ ai_if_chr_health_gt,
/*0x0083*/ ai_if_injured,
/*0x0084*/ ai_set_morale,
/*0x0085*/ ai_add_morale,
@ -227,10 +227,10 @@ bool (*g_CommandPointers[])(void) = {
/*0x00d5*/ ai_hovercar_begin_path,
/*0x00d6*/ ai_set_vehicle_speed,
/*0x00d7*/ ai_set_rotor_speed,
/*0x00d8*/ ai_noop_00d8,
/*0x00d9*/ ai_noop_00d9,
/*0x00d8*/ if_camera_in_ge_intro,
/*0x00d9*/ if_camera_in_ge_swirl,
/*0x00da*/ ai_set_obj_image,
/*0x00db*/ ai_noop_00db,
/*0x00db*/ ai_if_bond_in_tank,
/*0x00dc*/ ai_end_level,
/*0x00dd*/ ai00dd,
/*0x00de*/ ai_move_camera_to_pad,
@ -238,37 +238,37 @@ bool (*g_CommandPointers[])(void) = {
/*0x00e0*/ ai_revoke_control,
/*0x00e1*/ ai_grant_control,
/*0x00e2*/ ai_chr_move_to_pad,
/*0x00e3*/ ai00e3,
/*0x00e4*/ ai00e4,
/*0x00e3*/ ai_screen_fade_out,
/*0x00e4*/ ai_screen_fade_in,
/*0x00e5*/ ai_if_colour_fade_complete,
/*0x00e6*/ NULL,
/*0x00e7*/ NULL,
/*0x00e8*/ ai_set_door_open,
/*0x00e9*/ ai00e9,
/*0x00e9*/ ai_delete_chr_weapon,
/*0x00ea*/ ai_if_num_players_less_than,
/*0x00eb*/ ai_if_chr_ammo_quantity_less_than,
/*0x00ec*/ ai_chr_draw_weapon,
/*0x00ed*/ ai_chr_draw_weapon_in_cutscene,
/*0x00ee*/ ai00ee,
/*0x00ee*/ ai_set_bondforcespeed,
/*0x00ef*/ ai_if_obj_in_room,
/*0x00f0*/ ai00f0,
/*0x00f0*/ ai_if_attacking_with_fixed_aim,
/*0x00f1*/ ai_if_attacking,
/*0x00f2*/ ai_switch_to_alt_sky,
/*0x00f3*/ ai_chr_set_invincible,
/*0x00f4*/ ai_move_camera_to_pos,
/*0x00f5*/ ai00f5,
/*0x00f6*/ ai00f6,
/*0x00f5*/ ai_start_credits,
/*0x00f6*/ ai_if_credits_complete,
/*0x00f7*/ ai_if_all_objectives_complete,
/*0x00f8*/ ai_if_player_is_invincible,
/*0x00f9*/ ai_play_x_track,
/*0x00fa*/ ai_stop_x_track,
/*0x00fb*/ ai_chr_explosions,
/*0x00fc*/ ai_if_kill_count_greater_than,
/*0x00fd*/ ai00fd,
/*0x00fd*/ ai_if_chr_shot,
/*0x00fe*/ ai_kill_bond,
/*0x00ff*/ ai_be_surprised_surrender,
/*0x0100*/ ai_noop_0100,
/*0x0101*/ ai_noop_0101,
/*0x0100*/ ai_release_gas,
/*0x0101*/ ai_launch_rocket,
/*0x0102*/ ai_set_lights,
/*0x0103*/ ai_if_prop_preset_is_blocking_sight_to_target,
/*0x0104*/ ai_remove_object_at_prop_preset,

View File

@ -732,13 +732,13 @@ bool ai_try_attack_lie(void)
/**
* @cmd 00f0
*/
bool ai00f0(void)
bool ai_if_attacking_with_fixed_aim(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
if (g_Vars.chrdata->actiontype == ACT_ATTACK &&
!g_Vars.chrdata->act_attack.reaim &&
g_Vars.chrdata->act_attack.flags & ATTACKFLAG_DONTTURN) {
if (g_Vars.chrdata->actiontype == ACT_ATTACK
&& !g_Vars.chrdata->act_attack.reaim
&& g_Vars.chrdata->act_attack.flags & ATTACKFLAG_DONTTURN) {
g_Vars.aioffset = chrai_go_to_label(g_Vars.ailist, g_Vars.aioffset, cmd[2]);
} else {
g_Vars.aioffset += 3;
@ -921,7 +921,7 @@ bool ai_remove_chr(void)
struct chrdata *chr = chr_find_by_id(g_Vars.chrdata, cmd[2]);
if (chr && chr->prop) {
chr->hidden |= 0x20;
chr->hidden |= CHRHFLAG_DELETING;
}
g_Vars.aioffset += 3;
@ -2459,12 +2459,12 @@ bool ai_if_door_state(void)
/**
* @cmd 006f
*/
bool ai_if_object_is_door(void)
bool ai_if_door_ever_opened(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
struct defaultobj *obj = obj_find_by_tag_id(cmd[2]);
if (obj && obj->prop && obj->type == OBJTYPE_DOOR && (obj->hidden & 0x200)) {
if (obj && obj->prop && obj->type == OBJTYPE_DOOR && (obj->hidden & OBJHFLAG_DOOREVEROPENED)) {
g_Vars.aioffset = chrai_go_to_label(g_Vars.ailist, g_Vars.aioffset, cmd[3]);
} else {
g_Vars.aioffset += 4;
@ -2578,11 +2578,11 @@ bool ai_if_objective_failed(void)
/**
* @cmd 0075
*/
bool ai0075(void)
bool ai_set_pad_preset_to_quadrant(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
if (func0f04a4ec(g_Vars.chrdata, cmd[2])) {
if (chr_set_pad_preset_to_waypoint_within_quadrant(g_Vars.chrdata, cmd[2])) {
g_Vars.aioffset = chrai_go_to_label(g_Vars.ailist, g_Vars.aioffset, cmd[3]);
} else {
g_Vars.aioffset += 4;
@ -2674,20 +2674,20 @@ bool ai_if_num_close_arghs_greater_than(void)
/**
* @cmd 0081
*/
bool ai_if_chr_health_greater_than(void)
bool ai_if_chr_health_lt(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
f32 value = cmd[3] * 0.1f;
f32 target = cmd[3] * 0.1f;
struct chrdata *chr = chr_find_by_id(g_Vars.chrdata, cmd[2]);
u32 pass = false;
bool pass = false;
if (chr && chr->prop) {
if (chr->prop->type == PROPTYPE_PLAYER) {
u32 playernum = playermgr_get_player_num_by_prop(chr->prop);
pass = (value > g_Vars.players[playernum]->bondhealth * 8.0f);
pass = (g_Vars.players[playernum]->bondhealth * 8.0f < target);
} else {
pass = (value > chr->maxdamage - chr->damage);
pass = (chr->maxdamage - chr->damage < target);
}
}
@ -2703,20 +2703,20 @@ bool ai_if_chr_health_greater_than(void)
/**
* @cmd 0082
*/
bool ai_if_chr_health_less_than(void)
bool ai_if_chr_health_gt(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
f32 value = cmd[3] * 0.1f;
f32 target = cmd[3] * 0.1f;
struct chrdata *chr = chr_find_by_id(g_Vars.chrdata, cmd[2]);
u32 pass = false;
bool pass = false;
if (chr && chr->prop) {
if (chr->prop->type == PROPTYPE_PLAYER) {
u32 playernum = playermgr_get_player_num_by_prop(chr->prop);
pass = (value < g_Vars.players[playernum]->bondhealth * 8.0f);
pass = (g_Vars.players[playernum]->bondhealth * 8.0f > target);
} else {
pass = (value < chr->maxdamage - chr->damage);
pass = (chr->maxdamage - chr->damage > target);
}
}
@ -2735,10 +2735,10 @@ bool ai_if_chr_health_less_than(void)
bool ai_if_chr_shield_less_than(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
f32 value = (cmd[4] | (cmd[3] << 8)) * 0.1f;
f32 target = (cmd[4] | (cmd[3] << 8)) * 0.1f;
struct chrdata *chr = chr_find_by_id(g_Vars.chrdata,cmd[2]);
if (chr && chr_get_shield(chr) < value) {
if (chr && chr_get_shield(chr) < target) {
g_Vars.aioffset = chrai_go_to_label(g_Vars.ailist, g_Vars.aioffset, cmd[5]);
} else {
g_Vars.aioffset = g_Vars.aioffset + 6;
@ -4756,7 +4756,7 @@ bool ai_set_rotor_speed(void)
/**
* @cmd 00d8
*/
bool ai_noop_00d8(void)
bool if_camera_in_ge_intro(void)
{
g_Vars.aioffset += 3;
return false;
@ -4765,7 +4765,7 @@ bool ai_noop_00d8(void)
/**
* @cmd 00d9
*/
bool ai_noop_00d9(void)
bool if_camera_in_ge_swirl(void)
{
g_Vars.aioffset += 3;
return false;
@ -4801,7 +4801,7 @@ bool ai_set_obj_image(void)
/**
* @cmd 00db
*/
bool ai_noop_00db(void)
bool ai_if_bond_in_tank(void)
{
g_Vars.aioffset += 3;
return false;
@ -5234,7 +5234,7 @@ bool ai_chr_move_to_pad(void)
/**
* @cmd 00e3
*/
bool ai00e3(void)
bool ai_screen_fade_out(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
struct chrdata *chr = chr_find_by_id(g_Vars.chrdata, cmd[2]);
@ -5260,7 +5260,7 @@ bool ai00e3(void)
/**
* @cmd 00e4
*/
bool ai00e4(void)
bool ai_screen_fade_in(void)
{
s32 playernum;
u32 prevplayernum = g_Vars.currentplayernum;
@ -5333,7 +5333,7 @@ bool ai_set_door_open(void)
/**
* @cmd 00e9
*/
bool ai00e9(void)
bool ai_delete_chr_weapon(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
struct chrdata *chr = chr_find_by_id(g_Vars.chrdata, cmd[2]);
@ -5439,7 +5439,7 @@ bool ai_chr_draw_weapon_in_cutscene(void)
/**
* @cmd 00ee
*/
bool ai00ee(void)
bool ai_set_bondforcespeed(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
struct chrdata *chr = chr_find_by_id(g_Vars.chrdata, cmd[2]);
@ -5536,9 +5536,9 @@ bool ai_move_camera_to_pos(void)
/**
* @cmd 00f5
*/
bool ai00f5(void)
bool ai_start_credits(void)
{
var8007073c = 1;
g_GeCreditsState = 1;
g_Vars.aioffset += 2;
return false;
@ -5547,11 +5547,11 @@ bool ai00f5(void)
/**
* @cmd 00f6
*/
bool ai00f6(void)
bool ai_if_credits_complete(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
if (var8007073c == 2) {
if (g_GeCreditsState == 2) {
g_Vars.aioffset = chrai_go_to_label(g_Vars.ailist, g_Vars.aioffset, cmd[2]);
} else {
g_Vars.aioffset += 3;
@ -5761,7 +5761,7 @@ bool ai_if_num_knocked_out_chrs(void)
/**
* @cmd 00fd
*/
bool ai00fd(void)
bool ai_if_chr_shot(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
struct chrdata *chr = chr_find_by_id(g_Vars.chrdata, cmd[2]);
@ -5801,7 +5801,7 @@ bool ai_be_surprised_surrender(void)
/**
* @cmd 0100
*/
bool ai_noop_0100(void)
bool ai_release_gas(void)
{
g_Vars.aioffset += 3;
return false;
@ -5810,7 +5810,7 @@ bool ai_noop_0100(void)
/**
* @cmd 0101
*/
bool ai_noop_0101(void)
bool ai_launch_rocket(void)
{
g_Vars.aioffset += 3;
return false;

View File

@ -4928,16 +4928,16 @@ u8 func001d_search_for_player[] = {
if_rand_lt(64, /*goto*/ 0x28)
if_rand_lt(128, /*goto*/ 0x29)
if_rand_lt(196, /*goto*/ 0x2a)
try_set_target_pad_to_something(0x08, /*goto*/ 0x13)
try_set_padpreset_to_quadrant(QUADRANT_FRONT, /*goto*/ 0x13)
label(0x28)
try_set_target_pad_to_something(0x02, /*goto*/ 0x13)
try_set_padpreset_to_quadrant(QUADRANT_SIDE1, /*goto*/ 0x13)
label(0x29)
try_set_target_pad_to_something(0x04, /*goto*/ 0x13)
try_set_padpreset_to_quadrant(QUADRANT_SIDE2, /*goto*/ 0x13)
label(0x2a)
try_set_target_pad_to_something(0x08, /*goto*/ 0x13)
try_set_padpreset_to_quadrant(QUADRANT_FRONT, /*goto*/ 0x13)
goto_next(0x04)
label(0x13)

View File

@ -171,7 +171,7 @@ s32 var8007072c = 1;
u32 var80070730 = 0xffffffff;
u32 var80070734 = 0xffffffff;
u32 var80070738 = 0;
u32 var8007073c = 0;
u32 g_GeCreditsState = 0;
struct gecreditsdata *g_CurrentGeCreditsData = NULL;
bool g_PlayerTriggerGeFadeIn = false;
u32 var80070748 = 0;

View File

@ -137,7 +137,7 @@ void player_reset(void)
var8007072c = 1;
var80070738 = 0;
var8007073c = 0;
g_GeCreditsState = 0;
g_CurrentGeCreditsData = NULL;
g_Vars.currentplayer->bondexploding = false;

View File

@ -865,7 +865,10 @@
chr, \
label,
#define cmd0058(distance, label) \
/**
* Not implemented in PD.
*/
#define set_chrpreset_to_any_chr_in_range(distance, label) \
mkshort(0x0058), \
mkshort(distance / 10), \
label,
@ -1001,7 +1004,10 @@
mkshort(0x0066), \
object,
#define cmd0067(object) \
/**
* Not implemented in PD.
*/
#define drop_object(object) \
mkshort(0x0067), \
object,
@ -1067,7 +1073,7 @@
*
* Most likely a debug command, as you'd know what IDs your doors use.
*/
#define if_object_is_door(object, label) \
#define if_door_ever_opened(object, label) \
mkshort(0x006f), \
object, \
label,
@ -1127,14 +1133,21 @@
label,
/**
* This is only ever called in a sequence of 4, with u1 values 8, 2, 4, 8 in
* that order. Believed to be a pad within specific distance of target chr,
* where the higher the number the further the distance.
* If u1 were 0x10 or 0x20, some other logic would be used.
* Attempts to find a waypoint within the given quadrant of the current chr
* then sets the chr's padpreset to the given waypoint's pad number.
*
* If no waypoint is found, the padpreset is left unchanged and the label is not
* followed.
*
* The exact formula for finding the waypoint is:
* 1. Find the closest waypoint to the target regardless of direction
* 2. Check if that waypoint or any of its direct neighbours are in the quadrant
*
* No further checks are done.
*/
#define try_set_target_pad_to_something(u1, label) \
#define try_set_padpreset_to_quadrant(quadrant, label) \
mkshort(0x0075), \
u1, \
quadrant, \
label,
/**
@ -1244,18 +1257,18 @@
label,
/**
* Checks if the chr's health is greater than the given value.
* Checks if the chr's health is less than the given value.
*/
#define if_chr_health_gt(chr, health, label) \
#define if_chr_health_lt(chr, health, label) \
mkshort(0x0081), \
chr, \
health, \
label,
/**
* Checks if the chr's health is less than the given value.
* Checks if the chr's health is greater than the given value.
*/
#define if_chr_health_lt(chr, health, label) \
#define if_chr_health_gt(chr, health, label) \
mkshort(0x0082), \
chr, \
health, \
@ -1730,7 +1743,7 @@
*
* padpreset can be referenced via PAD_PRESET.
*/
#define chr_set_target_pad(chr, pad) \
#define chr_set_padpreset(chr, pad) \
mkshort(0x00b3), \
chr, \
mkshort(pad),
@ -1738,7 +1751,7 @@
/**
* Copies the padpreset from the source chr to the destination chr.
*/
#define chr_copy_target_pad(srcchr, dstchr) \
#define chr_copy_padpreset(srcchr, dstchr) \
mkshort(0x00b4), \
srcchr, \
dstchr,
@ -1793,19 +1806,19 @@
label,
/**
* Checks if the current chr's timer value is greater than the given value.
* Checks if the current chr's timer value is less than the given value.
*/
#define if_timer_gt(value, label) \
mkshort(0x00bd), \
#define if_timer_lt(value, label) \
mkshort(0x00bc), \
0x00, \
mkshort(value), \
label,
/**
* Checks if the current chr's timer value is less than the given value.
* Checks if the current chr's timer value is greater than the given value.
*/
#define if_timer_lt(value, label) \
mkshort(0x00bc), \
#define if_timer_gt(value, label) \
mkshort(0x00bd), \
0x00, \
mkshort(value), \
label,
@ -2048,13 +2061,19 @@
mkshort(speed), \
mkshort(time),
#define noop00d8(u1) \
/**
* Removed in PD: Check if the camera is in the stage intro's first shot.
*/
#define if_camera_in_ge_intro(label) \
mkshort(0x00d8), \
u1,
label,
#define noop00d9(u1) \
/**
* Removed in PD: Check if the camera is in the stage intro's swirl shot.
*/
#define if_camera_in_ge_swirl(label) \
mkshort(0x00d9), \
u1,
label,
/**
* Sets the image for a monitor object.
@ -2068,7 +2087,10 @@
slot, \
image,
#define noop00db(u1) \
/**
* Removed in PD.
*/
#define if_bond_in_tank(label) \
mkshort(0x00db), \
u1,
@ -2131,11 +2153,11 @@
force, \
label,
#define cmd00e3(chr) \
#define screen_fade_out(chr) \
mkshort(0x00e3), \
chr,
#define cmd00e4(u1) \
#define screen_fade_in(u1) \
mkshort(0x00e4), \
u1,
@ -2152,10 +2174,10 @@
mkshort(0x00e8), \
door,
#define cmd00e9(chr, u1) \
#define delete_chr_weapon(chr, handnum) \
mkshort(0x00e9), \
chr, \
u1,
handnum,
/**
* Checks if the number of players is less than the given value.
@ -2193,7 +2215,11 @@
chr, \
weapon,
#define cmd00ee(chr, x, z) \
/**
* Set a forced move speed when control is revoked from the player.
* Used only in GE, on the Dam stage after bungee jumping off the platform.
*/
#define set_bondforcespeed(chr, x, z) \
mkshort(0x00ee), \
x, \
z,
@ -2207,7 +2233,7 @@
mkshort(room), \
label,
#define cmd00f0(label) \
#define if_attacking_with_fixed_aim(label) \
mkshort(0x00f0), \
label,
@ -2243,10 +2269,16 @@
mkshort(height2), \
mkshort(posangle),
#define cmd00f5 \
/**
* GE only.
*/
#define start_credits \
mkshort(0x00f5),
#define cmd00f6(label) \
/**
* GE only.
*/
#define if_credits_complete(label) \
mkshort(0x00f6), \
label,
@ -2319,7 +2351,7 @@
value, \
label,
#define cmd00fd(chr, label) \
#define if_chr_shot(chr, label) \
mkshort(0x00fd), \
chr, \
label,
@ -2342,11 +2374,17 @@
#define be_surprised_surrender \
mkshort(0x00ff),
#define cmd0100_noop(u1) \
/**
* GE only.
*/
#define release_gas(u1) \
mkshort(0x0100), \
u1,
#define cmd0101_noop(u1) \
/**
* GE only.
*/
#define launch_rocket(u1) \
mkshort(0x0101), \
u1,

View File

@ -247,7 +247,7 @@ extern s32 g_ViRes;
extern bool g_HiResEnabled;
extern s32 var8007072c;
extern u32 var80070738;
extern u32 var8007073c;
extern u32 g_GeCreditsState;
extern struct gecreditsdata *g_CurrentGeCreditsData;
extern bool g_PlayerTriggerGeFadeIn;
extern u32 var80070748;

View File

@ -70,7 +70,7 @@ f32 chr_get_timer(struct chrdata *chr);
bool chr_is_target_aiming_at_me(struct chrdata *chr);
bool chr_saw_injury(struct chrdata *chr, u8 arg1);
bool chr_saw_death(struct chrdata *chr, u8 arg1);
bool func0f04a4ec(struct chrdata *chr, u8 quadrant);
bool chr_set_pad_preset_to_waypoint_within_quadrant(struct chrdata *chr, u8 quadrant);
bool chr_set_pad_preset_to_waypoint_within_target_quadrant(struct chrdata *chr, u8 arg1);
bool chr_set_chr_preset_to_chr_near_pad(u32 checktype, struct chrdata *chr, f32 distance, s32 padnum);
bool chr_set_pad_preset_to_pad_on_route_to_target(struct chrdata *chr);

View File

@ -114,13 +114,13 @@
/*0x006c*/ bool ai_open_door(void);
/*0x006d*/ bool ai_close_door(void);
/*0x006e*/ bool ai_if_door_state(void);
/*0x006f*/ bool ai_if_object_is_door(void);
/*0x006f*/ bool ai_if_door_ever_opened(void);
/*0x0070*/ bool ai_lock_door(void);
/*0x0071*/ bool ai_unlock_door(void);
/*0x0072*/ bool ai_if_door_locked(void);
/*0x0073*/ bool ai_if_objective_complete(void);
/*0x0074*/ bool ai_if_objective_failed(void);
/*0x0075*/ bool ai0075(void);
/*0x0075*/ bool ai_set_pad_preset_to_quadrant(void);
/*0x0076*/ bool ai_set_pad_preset_to_target_quadrant(void);
/*0x0077*/ bool ai_if_difficulty_less_than(void);
/*0x0078*/ bool ai_if_difficulty_greater_than(void);
@ -132,8 +132,8 @@
/*0x007e*/ bool ai_if_num_arghs_greater_than(void);
/*0x007f*/ bool ai_if_num_close_arghs_less_than(void);
/*0x0080*/ bool ai_if_num_close_arghs_greater_than(void);
/*0x0081*/ bool ai_if_chr_health_greater_than(void);
/*0x0082*/ bool ai_if_chr_health_less_than(void);
/*0x0081*/ bool ai_if_chr_health_lt(void);
/*0x0082*/ bool ai_if_chr_health_gt(void);
/*0x0083*/ bool ai_if_injured(void);
/*0x0084*/ bool ai_set_morale(void);
/*0x0085*/ bool ai_add_morale(void);
@ -219,10 +219,10 @@
/*0x00d5*/ bool ai_hovercar_begin_path(void);
/*0x00d6*/ bool ai_set_vehicle_speed(void);
/*0x00d7*/ bool ai_set_rotor_speed(void);
/*0x00d8*/ bool ai_noop_00d8(void);
/*0x00d9*/ bool ai_noop_00d9(void);
/*0x00d8*/ bool if_camera_in_ge_intro(void);
/*0x00d9*/ bool if_camera_in_ge_swirl(void);
/*0x00da*/ bool ai_set_obj_image(void);
/*0x00db*/ bool ai_noop_00db(void);
/*0x00db*/ bool ai_if_bond_in_tank(void);
/*0x00dc*/ bool ai_end_level(void);
/*0x00dd*/ bool ai00dd(void);
/*0x00de*/ bool ai_move_camera_to_pad(void);
@ -230,35 +230,35 @@
/*0x00e0*/ bool ai_revoke_control(void);
/*0x00e1*/ bool ai_grant_control(void);
/*0x00e2*/ bool ai_chr_move_to_pad(void);
/*0x00e3*/ bool ai00e3(void);
/*0x00e4*/ bool ai00e4(void);
/*0x00e3*/ bool ai_screen_fade_out(void);
/*0x00e4*/ bool ai_screen_fade_in(void);
/*0x00e5*/ bool ai_if_colour_fade_complete(void);
/*0x00e8*/ bool ai_set_door_open(void);
/*0x00e9*/ bool ai00e9(void);
/*0x00e9*/ bool ai_delete_chr_weapon(void);
/*0x00ea*/ bool ai_if_num_players_less_than(void);
/*0x00eb*/ bool ai_if_chr_ammo_quantity_less_than(void);
/*0x00ec*/ bool ai_chr_draw_weapon(void);
/*0x00ed*/ bool ai_chr_draw_weapon_in_cutscene(void);
/*0x00ee*/ bool ai00ee(void);
/*0x00ee*/ bool ai_set_bondforcespeed(void);
/*0x00ef*/ bool ai_if_obj_in_room(void);
/*0x00f0*/ bool ai00f0(void);
/*0x00f0*/ bool ai_if_attacking_with_fixed_aim(void);
/*0x00f1*/ bool ai_if_attacking(void);
/*0x00f2*/ bool ai_switch_to_alt_sky(void);
/*0x00f3*/ bool ai_chr_set_invincible(void);
/*0x00f4*/ bool ai_move_camera_to_pos(void);
/*0x00f5*/ bool ai00f5(void);
/*0x00f6*/ bool ai00f6(void);
/*0x00f5*/ bool ai_start_credits(void);
/*0x00f6*/ bool ai_if_credits_complete(void);
/*0x00f7*/ bool ai_if_all_objectives_complete(void);
/*0x00f8*/ bool ai_if_player_is_invincible(void);
/*0x00f9*/ bool ai_play_x_track(void);
/*0x00fa*/ bool ai_stop_x_track(void);
/*0x00fb*/ bool ai_chr_explosions(void);
/*0x00fc*/ bool ai_if_kill_count_greater_than(void);
/*0x00fd*/ bool ai00fd(void);
/*0x00fd*/ bool ai_if_chr_shot(void);
/*0x00fe*/ bool ai_kill_bond(void);
/*0x00ff*/ bool ai_be_surprised_surrender(void);
/*0x0100*/ bool ai_noop_0100(void);
/*0x0101*/ bool ai_noop_0101(void);
/*0x0100*/ bool ai_release_gas(void);
/*0x0101*/ bool ai_launch_rocket(void);
/*0x0102*/ bool ai_set_lights(void);
/*0x0103*/ bool ai_if_prop_preset_is_blocking_sight_to_target(void);
/*0x0104*/ bool ai_remove_object_at_prop_preset(void);

View File

@ -3356,13 +3356,13 @@ u8 func0419_ba8c[] = {
if_rand_lt(64, /*goto*/ 0x6e)
if_rand_lt(128, /*goto*/ 0x6f)
if_rand_lt(196, /*goto*/ 0x70)
try_set_target_pad_to_something(0x08, /*goto*/ 0x31)
try_set_padpreset_to_quadrant(QUADRANT_FRONT, /*goto*/ 0x31)
label(0x6e)
try_set_target_pad_to_something(0x02, /*goto*/ 0x31)
try_set_padpreset_to_quadrant(QUADRANT_SIDE1, /*goto*/ 0x31)
label(0x6f)
try_set_target_pad_to_something(0x04, /*goto*/ 0x31)
try_set_padpreset_to_quadrant(QUADRANT_SIDE2, /*goto*/ 0x31)
label(0x70)
try_set_target_pad_to_something(0x08, /*goto*/ 0x31)
try_set_padpreset_to_quadrant(QUADRANT_FRONT, /*goto*/ 0x31)
goto_next(0x72)
label(0x31)
go_to_target_pad(GOPOSFLAG_WALK)

View File

@ -2532,13 +2532,13 @@ u8 func0415_elvis_at_start[] = {
if_rand_lt(64, /*goto*/ 0x44)
if_rand_lt(128, /*goto*/ 0x45)
if_rand_lt(196, /*goto*/ 0x46)
try_set_target_pad_to_something(0x08, /*goto*/ 0x07)
try_set_padpreset_to_quadrant(QUADRANT_FRONT, /*goto*/ 0x07)
label(0x44)
try_set_target_pad_to_something(0x02, /*goto*/ 0x07)
try_set_padpreset_to_quadrant(QUADRANT_SIDE1, /*goto*/ 0x07)
label(0x45)
try_set_target_pad_to_something(0x04, /*goto*/ 0x07)
try_set_padpreset_to_quadrant(QUADRANT_SIDE2, /*goto*/ 0x07)
label(0x46)
try_set_target_pad_to_something(0x08, /*goto*/ 0x07)
try_set_padpreset_to_quadrant(QUADRANT_FRONT, /*goto*/ 0x07)
goto_next(0x4c)
label(0x07)
go_to_target_pad(GOPOSFLAG_WALK)

View File

@ -1380,13 +1380,13 @@ u8 func0412_cia[] = {
if_rand_lt(64, /*goto*/ 0x50)
if_rand_lt(128, /*goto*/ 0x51)
if_rand_lt(196, /*goto*/ 0x52)
try_set_target_pad_to_something(0x08, /*goto*/ 0x03)
try_set_padpreset_to_quadrant(QUADRANT_FRONT, /*goto*/ 0x03)
label(0x50)
try_set_target_pad_to_something(0x02, /*goto*/ 0x03)
try_set_padpreset_to_quadrant(QUADRANT_SIDE1, /*goto*/ 0x03)
label(0x51)
try_set_target_pad_to_something(0x04, /*goto*/ 0x03)
try_set_padpreset_to_quadrant(QUADRANT_SIDE2, /*goto*/ 0x03)
label(0x52)
try_set_target_pad_to_something(0x08, /*goto*/ 0x03)
try_set_padpreset_to_quadrant(QUADRANT_FRONT, /*goto*/ 0x03)
goto_next(0x36)
label(0x03)