mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-08-04 08:58:50 -04:00
Discover and document more entity types and related functions
This commit is contained in:
+41
-18
@@ -211,32 +211,50 @@
|
||||
mkshort(0x0014), \
|
||||
label,
|
||||
|
||||
#define try_attack_stand1(u1, u2, label) \
|
||||
/**
|
||||
* Makes the chr attempt to do a standing attack.
|
||||
*
|
||||
* entity_type is expected to be an ENTITYTYPE constant. It can be bitwise ORed
|
||||
* with ENTITYTYPE_AIMONLY to make the chr only aim at the entity.
|
||||
*/
|
||||
#define try_attack_stand(entity_type, entity_id, label) \
|
||||
mkshort(0x0015), \
|
||||
mkshort(u1), \
|
||||
mkshort(u2), \
|
||||
mkshort(entity_type), \
|
||||
mkshort(entity_id), \
|
||||
label,
|
||||
|
||||
#define try_attack_kneel(u1, u2, label) \
|
||||
/**
|
||||
* Makes the chr attempt to do a kneeling attack.
|
||||
*
|
||||
* entity_type is expected to be an ENTITYTYPE constant. It can be bitwise ORed
|
||||
* with ENTITYTYPE_AIMONLY to make the chr only aim at the entity.
|
||||
*/
|
||||
#define try_attack_kneel(entity_type, entity_id, label) \
|
||||
mkshort(0x0016), \
|
||||
mkshort(u1), \
|
||||
mkshort(u2), \
|
||||
mkshort(entity_type), \
|
||||
mkshort(entity_id), \
|
||||
label,
|
||||
|
||||
#define try_attack_stand2(u1, u2, label) \
|
||||
/**
|
||||
* Modifies the target entity and the aim-only/shoot flag.
|
||||
*
|
||||
* This command can only be used after try_attack_stand, try_attack_kneel,
|
||||
* try_attack_lie or try_face_entity. A common pattern is to use one of those
|
||||
* commands with the ENTITYTYPE_AIMONLY flag to point the gun at the entity, and
|
||||
* if the label was followed then call try_modify_attack to remove the
|
||||
* ENTITYTYPE_AIMONLY flag, causing the chr to shoot.
|
||||
*/
|
||||
#define try_modify_attack(entity_type, entity_id, label) \
|
||||
mkshort(0x0017), \
|
||||
mkshort(u1), \
|
||||
mkshort(u2), \
|
||||
mkshort(entity_type), \
|
||||
mkshort(entity_id), \
|
||||
label,
|
||||
|
||||
/**
|
||||
* Makes the chr begin facing the given entity. They will continue to face it
|
||||
* until stop_chr is used or significantly different action is given to them.
|
||||
* until stop_chr is used or a significantly different action is given to them.
|
||||
*
|
||||
* Type 0x0004 is not known
|
||||
* Type 0x0008 is pad
|
||||
* Type 0x0010 is a compass direction (use 0x0000, 0x4000, 0x8000 and 0xc000)
|
||||
* Type 0x0200 is the player
|
||||
* entity_type is expected to be an ENTITYTYPE constant.
|
||||
*/
|
||||
#define try_face_entity(entity_type, entity_id, label) \
|
||||
mkshort(0x0018), \
|
||||
@@ -3635,11 +3653,16 @@
|
||||
#define shuffle_pelagic_switches \
|
||||
mkshort(0x01b9),
|
||||
|
||||
// Likely some kind of shoot command, with u1 = entitytype and u2 = entityid
|
||||
#define try_attack_lie(u1, u2, label) \
|
||||
/**
|
||||
* Makes the chr attempt to do a lying down attack.
|
||||
*
|
||||
* entity_type is expected to be an ENTITYTYPE constant. It can be bitwise ORed
|
||||
* with ENTITYTYPE_AIMONLY to make the chr only aim at the entity.
|
||||
*/
|
||||
#define try_attack_lie(entity_type, entity_id, label) \
|
||||
mkshort(0x01ba), \
|
||||
mkshort(u1), \
|
||||
mkshort(u2), \
|
||||
mkshort(entity_type), \
|
||||
mkshort(entity_id), \
|
||||
label,
|
||||
|
||||
#define noop01bb \
|
||||
|
||||
@@ -542,9 +542,12 @@
|
||||
#define DRCAROLLIMAGE_RANDOM25 7
|
||||
#define DRCAROLLIMAGE_RANDOM 8
|
||||
|
||||
#define ENTITYTYPE_BOND 0x0001
|
||||
#define ENTITYTYPE_FORWARD 0x0002
|
||||
#define ENTITYTYPE_CHR 0x0004
|
||||
#define ENTITYTYPE_PAD 0x0008
|
||||
#define ENTITYTYPE_DIRECTION 0x0010
|
||||
#define ENTITYTYPE_AIMONLY 0x0020
|
||||
#define ENTITYTYPE_TARGET 0x0200
|
||||
|
||||
#define EYESPYMODE_CAMSPY 0
|
||||
|
||||
@@ -27,7 +27,7 @@ void chrSurrenderStartAnim(struct chrdata *chr);
|
||||
void func0f02f8a4(struct chrdata *chr);
|
||||
void func0f02fc2c(struct chrdata *chr);
|
||||
void func0f02fe18(struct chrdata *chr);
|
||||
void func0f030120(struct chrdata *chr, s32 entitytype, s32 entityid);
|
||||
void chrAttackStand(struct chrdata *chr, s32 entitytype, s32 entityid);
|
||||
void chrAttackLie(struct chrdata *chr, s32 entitytype, s32 entityid);
|
||||
void chrAttackKneel(struct chrdata *chr, s32 entitytype, s32 entityid);
|
||||
u32 func0f030584(void);
|
||||
@@ -142,7 +142,7 @@ u32 func0f041d38(void);
|
||||
u32 func0f041e48(void);
|
||||
void chrTickAttackAmount(struct chrdata *chr);
|
||||
void func0f04279c(struct chrdata *chr, bool arg1, bool arg2);
|
||||
void func0f042808(struct chrdata *chr);
|
||||
void robotAttack(struct chrdata *chr);
|
||||
void chrTickRobotAttack(struct chrdata *chr);
|
||||
void chrTickAttack(struct chrdata *chr);
|
||||
void chrTickAttackRoll(struct chrdata *chr);
|
||||
@@ -230,10 +230,10 @@ bool func0f039368(struct chrdata *chr);
|
||||
void chrRecordLastSeeTargetTime(struct chrdata *chr);
|
||||
void chrRecordLastHearTargetTime(struct chrdata *chr);
|
||||
bool chrIsDead(struct chrdata *chr);
|
||||
bool func0f03a578(struct chrdata *chr, s32 entitytype, s32 entityid);
|
||||
bool chrTryAttackStand(struct chrdata *chr, s32 entitytype, s32 entityid);
|
||||
bool chrTryAttackKneel(struct chrdata *chr, s32 entitytype, s32 entityid);
|
||||
bool chrTryAttackLie(struct chrdata *chr, s32 entitytype, s32 entityid);
|
||||
bool func0f03a76c(struct chrdata *chr, u32 entitytype, s32 entityid);
|
||||
bool chrTryModifyAttack(struct chrdata *chr, u32 entitytype, s32 entityid);
|
||||
bool chrFaceEntity(struct chrdata *chr, u32 entitytype, u32 entityid);
|
||||
bool chrSetPath(struct chrdata *chr, u32 path_id);
|
||||
u32 chrStartPath(struct chrdata *chr);
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
/*0x0012*/ bool aiTryAttackWalk(void);
|
||||
/*0x0013*/ bool aiTryAttackRun(void);
|
||||
/*0x0014*/ bool aiTryAttackRoll(void);
|
||||
/*0x0015*/ bool aiTryAttackStand1(void);
|
||||
/*0x0015*/ bool aiTryAttackStand(void);
|
||||
/*0x0016*/ bool aiTryAttackKneel(void);
|
||||
/*0x0017*/ bool aiTryAttackStand2(void);
|
||||
/*0x0017*/ bool aiTryModifyAttack(void);
|
||||
/*0x0018*/ bool aiFaceEntity(void);
|
||||
/*0x0019*/ bool ai0019(void);
|
||||
/*0x001a*/ bool ai001a(void);
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#ifndef _IN_UTIL_H
|
||||
#define _IN_UTIL_H
|
||||
|
||||
#define mkshort(val) (val >> 8) & 0xff, val & 0xff
|
||||
#define mkword(val) (val >> 24) & 0xff, (val >> 16) & 0xff, (val >> 8) & 0xff, val & 0xff
|
||||
#define mkshort(val) ((val) >> 8) & 0xff, (val) & 0xff
|
||||
#define mkword(val) ((val) >> 24) & 0xff, ((val) >> 16) & 0xff, ((val) >> 8) & 0xff, (val) & 0xff
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user