mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-07-27 22:59:11 -04:00
Decompile chrCalculateShieldHit
This commit is contained in:
@@ -18,8 +18,9 @@
|
||||
|
||||
#define osSyncPrintf
|
||||
|
||||
#define S32_MAX 2147483647
|
||||
#define U32_MAX 4294967295
|
||||
#define S32_MAX 2147483647
|
||||
#define U32_MAX 4294967295
|
||||
#define MAXFLOAT ((float)3.40282346638528860e+38)
|
||||
|
||||
#define ABS(val) ((val) > 0 ? (val) : -(val))
|
||||
#define ALIGN2(val) (((val) | 1) ^ 0x1)
|
||||
@@ -1764,6 +1765,7 @@
|
||||
#define MODELNODETYPE_05 0x05
|
||||
#define MODELNODETYPE_NEARFAR 0x08
|
||||
#define MODELNODETYPE_HAT 0x09
|
||||
#define MODELNODETYPE_BBOX 0x0a
|
||||
#define MODELNODETYPE_0B 0x0b
|
||||
#define MODELNODETYPE_GUNFIRE 0x0c
|
||||
#define MODELNODETYPE_PARTID 0x12
|
||||
|
||||
@@ -36,7 +36,7 @@ u32 func0f024b18(void);
|
||||
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 arg2, struct coord *coord, struct coord *coord2, struct chrdata *chr2);
|
||||
void chrEmitSparks(struct chrdata *chr, struct prop *prop, s32 ibh, struct coord *coord, struct coord *coord2, struct chrdata *chr2);
|
||||
u32 func0f0260c4(void);
|
||||
u32 func0f0268bc(void);
|
||||
u32 func0f0270f4(void);
|
||||
@@ -49,7 +49,7 @@ u32 func0f028a50(void);
|
||||
u32 func0f028d50(void);
|
||||
u32 func0f028e18(void);
|
||||
u32 func0f028e6c(void);
|
||||
void func0f028f7c(struct prop *prop, f32 shield, struct prop *arg2, u16 *arg3, s32 arg4, s32 arg5, s32 arg6);
|
||||
void func0f028f7c(struct prop *prop, f32 shield, struct prop *arg2, struct modelnode *node, struct model *model, s32 side, s32 arg6);
|
||||
void func0f0291d4(struct var80062a8c *thing);
|
||||
void func0f0292bc(struct prop *prop);
|
||||
s32 func0f02932c(struct prop *prop, s32 arg1);
|
||||
|
||||
@@ -58,14 +58,14 @@ void chrKnockOut(struct chrdata *chr, f32 angle, s32 ibh, 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, u16 *arg1, struct prop *prop, s32 arg3, s32 arg4, s32 arg5);
|
||||
bool func0f034080(struct chrdata *chr, struct modelnode *node, struct prop *prop, struct model *model, s32 side, s32 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 arg5, struct prop *prop2, u16 *arg7, s32 arg8, s32 arg9, u32 arg10);
|
||||
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, u32 arg10);
|
||||
void func0f034330(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, u16 *arg8, s32 arg9, s32 arg10, s32 arg11, bool explosion, struct coord *explosionpos);
|
||||
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, s32 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);
|
||||
u32 func0f03fa10(void);
|
||||
u32 func0f03fab0(void);
|
||||
u32 func0f03fde4(void);
|
||||
void func0f03ff2c(struct chrdata *chr, struct coord *pos, struct coord *vector, u16 **arg3, s32 *ibh, s32 *arg5, s32 *arg6);
|
||||
void chrCalculateShieldHit(struct chrdata *chr, struct coord *pos, struct coord *vector, struct modelnode **node, s32 *ibh, struct model **model, s32 *side);
|
||||
void func0f04031c(struct coord *coord, f32 arg1, struct coord *coord2, f32 *arg3);
|
||||
u32 func0f0404d4(void);
|
||||
u32 func0f041a74(void);
|
||||
|
||||
@@ -25,7 +25,7 @@ void *currentPlayerGetUnk1750(void);
|
||||
void currentPlayerSetUnk1758(Mtx *matrix);
|
||||
Mtx *currentPlayerGetUnk1758(void);
|
||||
void currentPlayerSetMatrix1740(Mtxf *value);
|
||||
u32 func0f0b5050(void);
|
||||
Mtxf *func0f0b5050(Mtxf *matrix);
|
||||
u32 func0f0b53a4(void);
|
||||
Mtxf *currentPlayerGetMatrix1740(void);
|
||||
void currentPlayerSetUnk1754(Mtxf *matrix);
|
||||
|
||||
@@ -20,7 +20,7 @@ u32 func00016710(void);
|
||||
void func00016748(f32 arg0);
|
||||
u32 func00016760(void);
|
||||
u32 func00016784(void);
|
||||
u32 func00016798(void);
|
||||
void func00016798(Mtxf *arg0, Mtxf *arg1);
|
||||
void func00016820(Mtx *arg0, Mtx *arg1);
|
||||
void func00016874(Mtxf *matrix, f32 posx, f32 posy, f32 posz, f32 lookx, f32 looky, f32 lookz, f32 upx, f32 upy, f32 upz);
|
||||
void func00016ae4(Mtxf *matrix, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, f32 arg9);
|
||||
|
||||
@@ -549,6 +549,16 @@ struct modelnode_hat { // type 0x09
|
||||
u16 index;
|
||||
};
|
||||
|
||||
struct modelnode_bbox { // type 0x0a
|
||||
s32 ibh;
|
||||
f32 xmin;
|
||||
f32 xmax;
|
||||
f32 ymin;
|
||||
f32 ymax;
|
||||
f32 zmin;
|
||||
f32 zmax;
|
||||
};
|
||||
|
||||
struct modelnode_0b { // type 0x0b
|
||||
u32 unk00;
|
||||
u32 unk04;
|
||||
@@ -607,6 +617,7 @@ union modelnode_data {
|
||||
struct modelnode_position position;
|
||||
struct modelnode_nearfar nearfar;
|
||||
struct modelnode_hat hat;
|
||||
struct modelnode_bbox bbox;
|
||||
struct modelnode_0b unk0b;
|
||||
struct modelnode_gunfire gunfire;
|
||||
struct modelnode_partid partid;
|
||||
|
||||
Reference in New Issue
Block a user