mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-06-15 06:10:49 -04:00
Decompile chrIsTargetInFov and rename several AI commands relating to FOV direction checks
This commit is contained in:
+20
-20
@@ -696,14 +696,14 @@
|
||||
label,
|
||||
|
||||
/**
|
||||
* Checks if Jo is within a certain angle of the chr's direction.
|
||||
* Value is a percentage of the circle, where 256 is a full circle.
|
||||
* Only ever called with value = decimal 10, which is about 14 degrees.
|
||||
* With value 10, returns true if Jo is roughly within 12-11 o'clock.
|
||||
* Checks if the current chr's target is within a certain angle of the chr's
|
||||
* direction. Angle is a percentage of the circle, where 256 is a full circle.
|
||||
* Only ever called with angle = decimal 10, which is about 14 degrees.
|
||||
* With angle 10, returns true if target is roughly within 12-11 o'clock.
|
||||
*/
|
||||
#define if_jo_ccw_direction_lt(value, label) \
|
||||
#define if_target_in_fov_left(angle, label) \
|
||||
mkshort(0x004d), \
|
||||
value, \
|
||||
angle, \
|
||||
label,
|
||||
|
||||
// Either bool1 or bool2 are set - never none or both
|
||||
@@ -717,32 +717,32 @@
|
||||
label,
|
||||
|
||||
/**
|
||||
* Checks if Jo is outside of a certain angle of the chr's direction.
|
||||
* Value is a percentage of the circle, where 256 is a full circle.
|
||||
* Called with values = -10 and -11, which is about -14 degrees.
|
||||
* With value -10, returns true if Jo is roughly within 12-1 o'clock.
|
||||
* Checks if the current chr's target is outside of a certain angle of the chr's
|
||||
* direction. Angle is a percentage of the circle, where 256 is a full circle.
|
||||
* It is common to call this with angles > 240, which makes it follow the label
|
||||
* if the target is roughly within 12-1 o'clock.
|
||||
*/
|
||||
#define if_jo_ccw_direction_gt(value, label) \
|
||||
#define if_target_out_of_fov_left(angle, label) \
|
||||
mkshort(0x004f), \
|
||||
value, \
|
||||
angle, \
|
||||
label,
|
||||
|
||||
/**
|
||||
* Similar to 004d and 004f, but checks if Jo is within the angle of player's
|
||||
* 12 o'clock (ie. either side).
|
||||
* Similar to 004d and 004f, but checks if the target is within the angle of the
|
||||
* current chr's 12 o'clock (ie. either side).
|
||||
*/
|
||||
#define if_jo_front_direction_lt(value, label) \
|
||||
#define if_target_in_fov(angle, label) \
|
||||
mkshort(0x0050), \
|
||||
value, \
|
||||
angle, \
|
||||
label,
|
||||
|
||||
/**
|
||||
* Similar to 004d and 004f, but checks if Jo is not in front of the current chr
|
||||
* by the given angle.
|
||||
* Similar to 004d and 004f, but checks if the target is not in front of the
|
||||
* current chr by the given angle.
|
||||
*/
|
||||
#define if_jo_front_direction_gt(value, label) \
|
||||
#define if_target_out_of_fov(angle, label) \
|
||||
mkshort(0x0051), \
|
||||
value, \
|
||||
angle, \
|
||||
label,
|
||||
|
||||
/**
|
||||
|
||||
@@ -174,9 +174,9 @@ u32 func0f048b78(void);
|
||||
u32 func0f048cc0(void);
|
||||
f32 func0f048dcc(struct chrdata *chr);
|
||||
bool func0f048e74(struct chrdata *chr, u32 arg1);
|
||||
u32 func0f048f20(struct chrdata *chr, u8 b);
|
||||
u32 func0f048fcc(void);
|
||||
u32 func0f049068(struct chrdata *chr, u32 arg1, u32 arg2);
|
||||
u32 func0f048f20(struct chrdata *chr, u8 arg1);
|
||||
f32 func0f048fcc(struct chrdata *chr, u8 arg1);
|
||||
bool chrIsTargetInFov(struct chrdata *chr, u8 arg1, u8 arg2);
|
||||
bool func0f04911c(struct chrdata *chr, struct coord *pos, u8 arg2);
|
||||
f32 chrGetSameFloorDistanceToPad(struct chrdata *chr, s32 pad_id);
|
||||
void func0f049644(u32 playernum);
|
||||
|
||||
@@ -80,11 +80,11 @@
|
||||
/*0x004a*/ bool ai004a(void);
|
||||
/*0x004b*/ bool aiIfNearMiss(void);
|
||||
/*0x004c*/ bool aiIfSeesSuspiciousItem(void);
|
||||
/*0x004d*/ bool ai004d(void);
|
||||
/*0x004d*/ bool aiIfTargetInFovLeft(void);
|
||||
/*0x004e*/ bool ai004e(void);
|
||||
/*0x004f*/ bool ai004f(void);
|
||||
/*0x0050*/ bool ai0050(void);
|
||||
/*0x0051*/ bool ai0051(void);
|
||||
/*0x004f*/ bool aiIfTargetOutOfFovLeft(void);
|
||||
/*0x0050*/ bool aiIfTargetInFov(void);
|
||||
/*0x0051*/ bool aiIfTargetOutOfFov(void);
|
||||
/*0x0052*/ bool aiIfDistanceToTargetLessThan(void);
|
||||
/*0x0053*/ bool aiIfDistanceToTargetGreaterThan(void);
|
||||
/*0x0054*/ bool aiIfChrDistanceToPadLessThan(void);
|
||||
|
||||
Reference in New Issue
Block a user