Attempt to decompile chrShoot

This commit is contained in:
Ryan Dwyer
2021-12-25 22:05:08 +10:00
parent 9b6cb2d191
commit 42922df7d2
11 changed files with 841 additions and 214 deletions
+3
View File
@@ -898,6 +898,7 @@
#define FUNCFLAG_10000000 0x10000000 // grenade launchers
#define FUNCFLAG_20000000 0x20000000 // explosives related
#define FUNCFLAG_HOMINGROCKET 0x40000000
#define FUNCFLAG_80000000 0x80000000
#define GAILIST_IDLE 0x0000
#define GAILIST_UNALERTED_0001 0x0001
@@ -3171,11 +3172,13 @@
#define PROJECTILEFLAG_00000001 0x00000001
#define PROJECTILEFLAG_00000002 0x00000002
#define PROJECTILEFLAG_00000004 0x00000004
#define PROJECTILEFLAG_00000010 0x00000010
#define PROJECTILEFLAG_00000080 0x00000080
#define PROJECTILEFLAG_00000800 0x00000800
#define PROJECTILEFLAG_00001000 0x00001000
#define PROJECTILEFLAG_00002000 0x00002000
#define PROJECTILEFLAG_00004000 0x00004000
#define PROJECTILEFLAG_40000000 0x40000000
#define PROJECTILEFLAG_FREE 0x80000000
#define PROPFLAG_01 0x01
+3 -3
View File
@@ -69,8 +69,8 @@ void bgun0f09e4e0(void);
void bgun0f09ea90(void);
bool bgun0f09eae4(void);
s32 bgun0f09ebbc(void);
void bgun0f09ebcc(struct defaultobj *obj, struct coord *coord, s16 *rooms, Mtxf *matrix1, f32 *arg4, Mtxf *matrix2, struct prop *prop, struct coord *pos);
void bgun0f09ed2c(struct defaultobj *obj, struct coord *coord, Mtxf *arg2, f32 *arg3, Mtxf *arg4);
void bgun0f09ebcc(struct defaultobj *obj, struct coord *coord, s16 *rooms, Mtxf *matrix1, struct coord *arg4, Mtxf *matrix2, struct prop *prop, struct coord *pos);
void bgun0f09ed2c(struct defaultobj *obj, struct coord *coord, Mtxf *arg2, struct coord *arg3, Mtxf *arg4);
struct defaultobj *bgun0f09ee18(struct chrdata *chr, struct gset *gset, struct coord *pos, s16 *rooms, Mtxf *arg4, struct coord *arg5);
void bgunCreateThrownProjectile(s32 handnum, struct gset *gset);
void bgun0f09f848(s32 handnum);
@@ -84,7 +84,7 @@ void bgunGetCrossPos(f32 *x, f32 *y);
void bgun0f0a0c08(struct coord *arg0, struct coord *arg1);
void bgun0f0a0c44(s32 handnum, struct coord *arg1, struct coord *arg2);
void bgunCalculateShotSpread(struct coord *arg0, struct coord *arg1, s32 handnum, bool dorandom);
u32 bgun0f0a0fac(void);
void bgun0f0a0fac(struct coord *arg0, s32 weaponnum, s32 funcnum, s32 arg3, s32 crouchpos, bool dual);
void bgunSetLastShootInfo(struct coord *pos, struct coord *dir, s32 handnum);
u32 bgunGetUnk0c30(s32 handnum);
void bgun0f0a134c(s32 handnum);
+2 -2
View File
@@ -143,10 +143,10 @@ bool func0f03e9f4(struct chrdata *chr, struct attackanimconfig *animcfg, s32 arg
void chrCalculateAimEndProperties(struct chrdata *chr, struct attackanimconfig *animcfg, bool hasleftgun, bool hasrightgun, f32 shootrotx);
f32 chrGetAimLimitAngle(f32 sqdist);
void chrCalculateHit(struct chrdata *chr, bool *angleokptr, bool *hit, struct gset *gset);
bool func0f03fde4(struct chrdata *chr, s32 handnum, struct coord *arg2);
bool chrGetGunPos(struct chrdata *chr, s32 handnum, struct coord *gunpos);
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 *frompos, f32 arg1, struct coord *aimpos, struct coord *arg3);
void func0f0404d4(struct chrdata *chr, s32 arg1);
void chrShoot(struct chrdata *chr, s32 handnum);
void func0f041a74(struct chrdata *chr);
bool func0f041c44(struct chrdata *chr);
void chrAttackAmountUpdateAnimation(struct chrdata *chr);
+1 -1
View File
@@ -12,7 +12,7 @@ s32 aibotGetAmmoQuantityByType(struct aibot *aibot, s32 ammotype, bool include_e
s32 aibotTryRemoveAmmoFromReserve(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 qty);
void aibotGiveAmmoByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 qty);
void aibotGiveAmmoByType(struct aibot *aibot, u32 ammotype, s32 quantity);
bool aibotDoFarsightThing(struct chrdata *chr, u32 arg1, struct coord *arg2, struct coord *arg3);
bool aibotShootFarsightThroughWalls(struct chrdata *chr, s32 arg1, struct coord *arg2, struct coord *arg3);
bool func0f19a29c(u32 weaponnum, bool is_secondary);
u32 aibotGetProjectileThrowInterval(u32 weapon);
u32 ammotypeGetWeapon(u32 ammotype);
+10 -10
View File
@@ -213,7 +213,7 @@ struct g_vars {
/*000482*/ u16 unk000482;
/*000484*/ s32 mphilltime;
/*000488*/ s32 totalkills;
/*00048c*/ u32 unk00048c;
/*00048c*/ bool unk00048c;
// 1 when entering game setup
// 2 when entering combat simulator
@@ -923,7 +923,7 @@ struct aibot {
/*0x0d8*/ s32 unk0d8;
/*0x0dc*/ u32 unk0dc;
/*0x0e0*/ s16 unk0e0[2];
/*0x0e4*/ f32 unk0e4[2];
/*0x0e4*/ f32 maulercharge[2];
/*0x0ec*/ u32 unk0ec;
/*0x0f0*/ u32 unk0f0;
/*0x0f4*/ u32 unk0f4;
@@ -937,7 +937,7 @@ struct aibot {
/*0x11c*/ s32 unk11c;
/*0x120*/ s32 unk120;
/*0x124*/ s32 unk124;
/*0x128*/ u32 unk128;
/*0x128*/ s32 unk128;
/*0x12c*/ u32 unk12c;
/*0x130*/ s8 unk130[12];
/*0x13c*/ f32 playerdistances[12];
@@ -1539,7 +1539,7 @@ struct projectile {
/*0x0dc*/ f32 unk0dc;
/*0x0e0*/ f32 unk0e0;
/*0x0e4*/ f32 unk0e4;
/*0x0e8*/ u32 unk0e8;
/*0x0e8*/ struct prop *unk0e8;
/*0x0ec*/ f32 unk0ec;
/*0x0f0*/ f32 unk0f0;
/*0x0f4*/ u32 unk0f4;
@@ -3104,12 +3104,12 @@ struct weaponfunc_shootprojectile {
/*0x40*/ s32 projectilemodelnum;
/*0x44*/ u32 unk44;
/*0x48*/ u32 unk48;
/*0x4c*/ u32 unk4c;
/*0x50*/ u32 unk50;
/*0x54*/ u32 unk54;
/*0x58*/ u32 unk58;
/*0x5c*/ u32 unk5c;
/*0x60*/ u32 unk60;
/*0x4c*/ s32 unk4c;
/*0x50*/ f32 unk50;
/*0x54*/ s32 unk54;
/*0x58*/ s32 timer60;
/*0x5c*/ f32 unk5c;
/*0x60*/ s16 unk60;
};
struct weaponfunc_throw {