mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-06-09 20:40:35 -04:00
Decompile chrSetChrPresetToChrNearPos
This commit is contained in:
+24
-7
@@ -2366,24 +2366,41 @@
|
||||
anytarget, \
|
||||
label,
|
||||
|
||||
#define cmd0109(u1, distance, label) \
|
||||
/**
|
||||
* Check all chrs within the given distance of the current chr. If any chr
|
||||
* passes a team check (as given by checktype), set the current chr's chrpreset
|
||||
* to that chr and follow the label.
|
||||
*
|
||||
* Checktype can be COMPARE_FRIENDS, COMPARE_ENEMIES or COMPANY_ANY.
|
||||
*/
|
||||
#define set_chrpreset_to_chr_near_self(checktype, distance, label) \
|
||||
mkshort(0x0109), \
|
||||
u1, \
|
||||
checktype, \
|
||||
mkshort(distance), \
|
||||
label, \
|
||||
|
||||
#define cmd010a(u1, distance, u2, label) \
|
||||
/**
|
||||
* Check all chrs within the given distance of the given pad. If any chr passes
|
||||
* a team check (as given by checktype), set the current chr's chrpreset to that
|
||||
* chr and follow the label.
|
||||
*
|
||||
* Checktype can be COMPARE_FRIENDS, COMPARE_ENEMIES or COMPANY_ANY.
|
||||
*/
|
||||
#define set_chrpreset_to_chr_near_pad(checktype, distance, padnum, label) \
|
||||
mkshort(0x010a), \
|
||||
u1, \
|
||||
checktype, \
|
||||
mkshort(distance / 10), \
|
||||
mkshort(u2), \
|
||||
mkshort(padnum), \
|
||||
label,
|
||||
|
||||
/**
|
||||
* Set the team that the chr is on.
|
||||
*
|
||||
* The values are not well understood yet. Enemies are typically assigned to
|
||||
* team 0x02 and allies to team 0x10, but this varies.
|
||||
* The value is a single byte bitfield. If two chrs have any matching bits then
|
||||
* they will be friends. If no bits match then they will be enemies.
|
||||
*
|
||||
* Team 0x80 is a special case, and is a non-combat team.
|
||||
* Chrs will not engage in combat with anyone who is on this team.
|
||||
*/
|
||||
#define set_chr_team(chr, team) \
|
||||
mkshort(0x010b), \
|
||||
|
||||
@@ -559,6 +559,7 @@
|
||||
#define COLOR_08_RED 0x08
|
||||
#define COLOR_09_BLUE 0x09
|
||||
|
||||
#define COMPARE_ANY 0
|
||||
#define COMPARE_FRIENDS 1
|
||||
#define COMPARE_ENEMIES 2
|
||||
|
||||
|
||||
@@ -189,8 +189,8 @@ bool waypointIsWithin90DegreesOfPosAngle(struct waypoint *waypoint, struct coord
|
||||
s32 chrFindWaypointWithinPosQuadrant(struct coord *pos, s16 *rooms, f32 angle, u8 quadrant);
|
||||
bool func0f04a4ec(struct chrdata *chr, u8 quadrant);
|
||||
bool chrSetPadPresetToWaypointWithinTargetQuadrant(struct chrdata *chr, u8 arg1);
|
||||
bool func0f04a7dc(u32 chrnum, struct chrdata *chr, f32 distance, s32 padnum);
|
||||
bool func0f04a848(u8 chrnum, struct chrdata *chr, f32 distance, struct coord *pos, s16 *room);
|
||||
bool chrSetChrPresetToChrNearPad(u32 checktype, struct chrdata *chr, f32 distance, s32 padnum);
|
||||
bool chrSetChrPresetToChrNearPos(u8 checktype, struct chrdata *chr, f32 distance, struct coord *pos, s16 *room);
|
||||
bool chrSetPadPresetToPadOnRouteToTarget(struct chrdata *chr);
|
||||
u32 func0f04aeb0(void);
|
||||
bool func0f04af84(f32 chrwidth, struct coord *pos, s16 *rooms, f32 angle, bool arg4, bool arg5, bool arg6);
|
||||
@@ -305,8 +305,8 @@ s32 chrGetNumCloseArghs(struct chrdata *chr);
|
||||
void decrementByte(u8 *dst, u8 amount);
|
||||
void incrementByte(u8 *dst, u8 amount);
|
||||
bool chrCanHearAlarm(struct chrdata *chr);
|
||||
bool func0f04a76c(struct chrdata *chr, f32 distance);
|
||||
bool func0f04a79c(u8 chrnum, struct chrdata *chr, f32 distance);
|
||||
bool chrSetChrPresetToAnyChrNearSelf(struct chrdata *chr, f32 distance);
|
||||
bool chrSetChrPresetToChrNearSelf(u8 checktype, struct chrdata *chr, f32 distance);
|
||||
bool chrCompareTeams(struct chrdata *chr1, struct chrdata *chr2, u8 checktype);
|
||||
void chrSetChrPreset(struct chrdata *chr, s32 chrpreset);
|
||||
void chrSetChrPresetByChrnum(struct chrdata *chr, s32 chrnum, s32 chrpreset);
|
||||
|
||||
@@ -265,8 +265,8 @@
|
||||
/*0x0106*/ bool aiSetTarget(void);
|
||||
/*0x0107*/ bool aiIfPresetsTargetIsNotMyTarget(void);
|
||||
/*0x0108*/ bool aiIfChrTarget(void);
|
||||
/*0x0109*/ bool ai0109(void);
|
||||
/*0x010a*/ bool ai010a(void);
|
||||
/*0x0109*/ bool aiSetChrPresetToChrNearSelf(void);
|
||||
/*0x010a*/ bool aiSetChrPresetToChrNearPad(void);
|
||||
/*0x010b*/ bool aiChrSetTeam(void);
|
||||
/*0x010c*/ bool aiIfCompareChrPresetsTeam(void);
|
||||
/*0x010d*/ bool aiNoOp010d(void);
|
||||
|
||||
@@ -42,7 +42,7 @@ void func0f064ce8(void);
|
||||
u32 propDoorGetCdTypes(struct prop *prop);
|
||||
bool propIsOfCdType(struct prop *prop, u32 types);
|
||||
void roomsCopy(s16 *srcrooms, s16 *dstrooms);
|
||||
void func0f0657d8(s16 *newrooms, s16 *rooms, u32 arg2);
|
||||
void roomsAppend(s16 *newrooms, s16 *rooms, u32 arg2);
|
||||
bool arrayIntersects(s16 *a, s16 *b);
|
||||
bool func0f0658e8(s16 arg0, s32 arg1);
|
||||
u32 func0f06593c(void);
|
||||
|
||||
Reference in New Issue
Block a user