mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-08-10 10:54:04 -04:00
Rename IBH constants to HITPART
This commit is contained in:
@@ -268,7 +268,7 @@
|
||||
#define damage_chr(chr, weapon) \
|
||||
mkshort(0x0019), \
|
||||
chr, \
|
||||
IBH_HEAD, \
|
||||
HITPART_HEAD, \
|
||||
weapon, \
|
||||
0, \
|
||||
0, \
|
||||
@@ -279,14 +279,14 @@
|
||||
* done, nor is any bullet beam shown and the chrs don't even need line of sight
|
||||
* to each other.
|
||||
*
|
||||
* The ibh value is the body part the victim is shot in.
|
||||
* It's expected to be an IBH constant.
|
||||
* The hitpart value is the body part the victim is shot in.
|
||||
* It's expected to be a HITPART constant.
|
||||
*/
|
||||
#define chr_damage_chr(achr, vchr, ibh) \
|
||||
#define chr_damage_chr(achr, vchr, hitpart) \
|
||||
mkshort(0x001a), \
|
||||
achr, \
|
||||
vchr, \
|
||||
ibh,
|
||||
hitpart,
|
||||
|
||||
/**
|
||||
* Makes the chr consider throwing a grenade, using their grenade probability
|
||||
|
||||
+21
-22
@@ -1072,6 +1072,27 @@
|
||||
#define HEALTHSHOWMODE_CURRENT 4 // full height, showing current amount
|
||||
#define HEALTHSHOWMODE_CLOSING 5 // height collapsing
|
||||
|
||||
#define HITPART_LFOOT 1
|
||||
#define HITPART_LSHIN 2
|
||||
#define HITPART_LTHIGH 3
|
||||
#define HITPART_RFOOT 4
|
||||
#define HITPART_RSHIN 5
|
||||
#define HITPART_RTHIGH 6
|
||||
#define HITPART_PELVIS 7
|
||||
#define HITPART_HEAD 8
|
||||
#define HITPART_LHAND 9
|
||||
#define HITPART_LFOREARM 10
|
||||
#define HITPART_LBICEP 11
|
||||
#define HITPART_RHAND 12
|
||||
#define HITPART_RFOREARM 13
|
||||
#define HITPART_RBICEP 14
|
||||
#define HITPART_TORSO 15
|
||||
#define HITPART_TAIL 16
|
||||
#define HITPART_GUN 100
|
||||
#define HITPART_HAT 110
|
||||
#define HITPART_GENERAL 200
|
||||
#define HITPART_GENERALHALF 201
|
||||
|
||||
#define HUDMSGFLAG_ONLYIFALIVE 0x1
|
||||
#define HUDMSGFLAG_2 0x2
|
||||
#define HUDMSGFLAG_4 0x4
|
||||
@@ -1095,28 +1116,6 @@
|
||||
#define HUDMSGTYPE_TRAINING 10
|
||||
#define HUDMSGTYPE_11 11
|
||||
|
||||
// chr->ivebeenhit values
|
||||
#define IBH_LFOOT 1
|
||||
#define IBH_LSHIN 2
|
||||
#define IBH_LTHIGH 3
|
||||
#define IBH_RFOOT 4
|
||||
#define IBH_RSHIN 5
|
||||
#define IBH_RTHIGH 6
|
||||
#define IBH_PELVIS 7
|
||||
#define IBH_HEAD 8
|
||||
#define IBH_LHAND 9
|
||||
#define IBH_LFOREARM 10
|
||||
#define IBH_LBICEP 11
|
||||
#define IBH_RHAND 12
|
||||
#define IBH_RFOREARM 13
|
||||
#define IBH_RBICEP 14
|
||||
#define IBH_TORSO 15
|
||||
#define IBH_TAIL 16
|
||||
#define IBH_GUN 100
|
||||
#define IBH_HAT 110
|
||||
#define IBH_GENERAL 200
|
||||
#define IBH_GENERALHALF 201
|
||||
|
||||
#define IDLEACTION_STANDING 0x01
|
||||
#define IDLEACTION_SITTING_TYPING 0x02
|
||||
#define IDLEACTION_SITTING_DORMANT 0x03
|
||||
|
||||
@@ -36,7 +36,7 @@ bool func0f024b18(struct model *model, struct modelnode *node);
|
||||
void chrRenderAttachedObject(struct prop *prop, struct modelrenderdata *renderdata, bool withalpha, struct chrdata *chr);
|
||||
void bodyGetBloodColour(s16 bodynum, u8 *colour1, u32 *colour2);
|
||||
Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha);
|
||||
void chrEmitSparks(struct chrdata *chr, struct prop *prop, s32 ibh, struct coord *coord, struct coord *coord2, struct chrdata *chr2);
|
||||
void chrEmitSparks(struct chrdata *chr, struct prop *prop, s32 hitpart, struct coord *coord, struct coord *coord2, struct chrdata *chr2);
|
||||
u32 func0f0260c4(void);
|
||||
u32 func0f0268bc(void);
|
||||
u32 func0f0270f4(void);
|
||||
|
||||
@@ -49,23 +49,23 @@ void chrStartAnim(struct chrdata *chr, s32 animnum, f32 startframe, f32 endframe
|
||||
void func0f031254(struct chrdata *chr);
|
||||
void chrAttack(struct chrdata *chr, struct attackanimgroup **animgroups, bool flip, bool *firing, u32 attackflags, s32 entityid, bool standing);
|
||||
void chrAttackAmount(struct chrdata *chr, u32 attackflags, u32 entityid, u32 maxshots);
|
||||
void chrBeginDeath(struct chrdata *chr, struct coord *dir, f32 relangle, s32 ibh, struct shorthand *hand, bool knockout, s32 aplayernum);
|
||||
void chrBeginArgh(struct chrdata *chr, f32 angle, s32 ibh);
|
||||
void chrReactToDamage(struct chrdata *chr, struct coord *dir, f32 angle, s32 ibh, struct shorthand *hand, s32 playernum);
|
||||
void chrBeginDeath(struct chrdata *chr, struct coord *dir, f32 relangle, s32 hitpart, struct shorthand *hand, bool knockout, s32 aplayernum);
|
||||
void chrBeginArgh(struct chrdata *chr, f32 angle, s32 hitpart);
|
||||
void chrReactToDamage(struct chrdata *chr, struct coord *dir, f32 angle, s32 hitpart, struct shorthand *hand, s32 playernum);
|
||||
void chrYeetFromPos(struct chrdata *chr, struct coord *pos, f32 arg2);
|
||||
s32 handGetBlurAmount(struct shorthand *hand);
|
||||
void chrKnockOut(struct chrdata *chr, f32 angle, s32 ibh, struct shorthand *hand);
|
||||
void chrKnockOut(struct chrdata *chr, f32 angle, s32 hitpart, struct shorthand *hand);
|
||||
bool chrIsAnimPreventingArgh(struct chrdata *chr, f32 *arg1);
|
||||
void chrChoke(struct chrdata *chr, s32 choketype);
|
||||
void chrSetShield(struct chrdata *chr, f32 shield);
|
||||
bool func0f034080(struct chrdata *chr, struct modelnode *node, struct prop *prop, struct model *model, s32 side, s16 *arg5);
|
||||
void chrDamageByMisc(struct chrdata *chr, f32 damage, struct coord *vector, struct shorthand *hand, struct prop *prop);
|
||||
void chrDamageByLaser(struct chrdata *chr, f32 damage, struct coord *vector, struct shorthand *hand, struct prop *prop);
|
||||
void func0f0341dc(struct chrdata *chr, f32 damage, struct coord *vector, struct shorthand *hand, struct prop *prop, u32 ibh, struct prop *prop2, struct modelnode *node, struct model *model, s32 side, s16 *arg10);
|
||||
void func0f0341dc(struct chrdata *chr, f32 damage, struct coord *vector, struct shorthand *hand, struct prop *prop, u32 hitpart, struct prop *prop2, struct modelnode *node, struct model *model, s32 side, s16 *arg10);
|
||||
void chrDamageByImpact(struct chrdata *chr, f32 damage, struct coord *vector, struct shorthand *hand, struct prop *prop, s32 arg5);
|
||||
void chrDamageByExplosion(struct chrdata *chr, f32 damage, struct coord *vector, struct prop *prop, struct coord *explosionpos);
|
||||
void playerUpdateDamageStats(struct prop *attacker, struct prop *victim, f32 damage);
|
||||
void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct shorthand *hand, struct prop *aprop, s32 ibh, bool damageshield, struct prop *prop2, struct modelnode *node, struct model *model, s32 side, s16 *arg11, bool explosion, struct coord *explosionpos);
|
||||
void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct shorthand *hand, struct prop *aprop, s32 hitpart, bool damageshield, struct prop *prop2, struct modelnode *node, struct model *model, s32 side, s16 *arg11, bool explosion, struct coord *explosionpos);
|
||||
u32 func0f03645c(void);
|
||||
bool func0f03654c(struct chrdata *chr, struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, struct coord *vector, f32 arg6, u32 types);
|
||||
bool propchrHasClearLineToPos(struct prop *prop, struct coord *dstpos, struct coord *vector);
|
||||
@@ -144,7 +144,7 @@ u32 func0f03f778(void);
|
||||
f32 chrGetAimLimitAngle(f32 sqdist);
|
||||
void chrCalculateHit(struct chrdata *chr, bool *angleokptr, bool *hit, struct shorthand *hand);
|
||||
bool func0f03fde4(struct chrdata *chr, s32 handnum, struct coord *arg2);
|
||||
void chrCalculateShieldHit(struct chrdata *chr, struct coord *pos, struct coord *vector, struct modelnode **node, s32 *ibh, struct model **model, s32 *side);
|
||||
void chrCalculateShieldHit(struct chrdata *chr, struct coord *pos, struct coord *vector, struct modelnode **node, s32 *hitpart, struct model **model, s32 *side);
|
||||
void func0f04031c(struct coord *coord, f32 arg1, struct coord *coord2, f32 *arg3);
|
||||
u32 func0f0404d4(void);
|
||||
u32 func0f041a74(void);
|
||||
|
||||
+3
-3
@@ -561,7 +561,7 @@ struct modelrodata_reorder { // type 0x09
|
||||
};
|
||||
|
||||
struct modelrodata_bbox { // type 0x0a
|
||||
s32 ibh;
|
||||
s32 hitpart;
|
||||
f32 xmin;
|
||||
f32 xmax;
|
||||
f32 ymin;
|
||||
@@ -1387,7 +1387,7 @@ struct chrdata {
|
||||
/*0x2ec*/ f32 elapseextra;
|
||||
/*0x2f0*/ struct coord extraspeed;
|
||||
/*0x2fc*/ u8 yvisang;
|
||||
/*0x2fd*/ u8 ivebeenhit;
|
||||
/*0x2fd*/ u8 hitpart;
|
||||
/*0x2fe*/ u8 race;
|
||||
/*0x2ff*/ u8 blurnumtimesdied;
|
||||
/*0x300*/ struct prop *gunprop;
|
||||
@@ -5056,7 +5056,7 @@ struct animtablerow {
|
||||
};
|
||||
|
||||
struct animtable {
|
||||
s32 ibh;
|
||||
s32 hitpart;
|
||||
struct animtablerow *deathanims;
|
||||
struct animtablerow *injuryanims;
|
||||
s32 deathanimcount;
|
||||
|
||||
Reference in New Issue
Block a user