Decompile shotCalculateHits

This commit is contained in:
Ryan Dwyer
2021-06-07 12:19:24 +10:00
parent 5ea9349d70
commit 11b7ae7cb1
20 changed files with 676 additions and 1314 deletions
+32
View File
@@ -779,6 +779,7 @@
#define DROPREASON_6 6
#define EXPLOSIONTYPE_0 0
#define EXPLOSIONTYPE_1 1
#define EXPLOSIONTYPE_2 2
#define EXPLOSIONTYPE_3 3
#define EXPLOSIONTYPE_5 5
@@ -788,6 +789,7 @@
#define EXPLOSIONTYPE_13 13
#define EXPLOSIONTYPE_14 14
#define EXPLOSIONTYPE_18 18
#define EXPLOSIONTYPE_22 22
#define EXPLOSIONTYPE_23 23
#define EXPLOSIONTYPE_25 25
@@ -3469,6 +3471,20 @@
#define SOUNDMODE_HEADPHONE 2
#define SOUNDMODE_SURROUND 3
#define SPARKTYPE_00 0x00
#define SPARKTYPE_01 0x01
#define SPARKTYPE_02 0x02
#define SPARKTYPE_03 0x03
#define SPARKTYPE_04 0x04
#define SPARKTYPE_09 0x09
#define SPARKTYPE_0A 0x0a
#define SPARKTYPE_0B 0x0b
#define SPARKTYPE_0F 0x0f
#define SPARKTYPE_16 0x16
#define SPARKTYPE_17 0x17
#define SPARKTYPE_18 0x18
#define SPARKTYPE_19 0x19
#define SPAWNFLAG_FORCESUNGLASSES 0x00000001 // 100% chance of wearing sunglasses if head model supports it
#define SPAWNFLAG_MAYBESUNGLASSES 0x00000002 // 50% chance of wearing sunglasses if head model supports it
#define SPAWNFLAG_INVINCIBLE 0x00000008
@@ -3677,6 +3693,22 @@
#define STAGEINDEX_TEST_MP19 0x3b
#define STAGEINDEX_TEST_MP20 0x3c
#define SURFACETYPE_DEFAULT 0
#define SURFACETYPE_STONE 1
#define SURFACETYPE_WOOD 2
#define SURFACETYPE_METAL 3
#define SURFACETYPE_GLASS 4
#define SURFACETYPE_SHALLOWWATER 5
#define SURFACETYPE_SNOW 6
#define SURFACETYPE_DIRT 7
#define SURFACETYPE_MUD 8
#define SURFACETYPE_TILE 9
#define SURFACETYPE_METALOBJ 10
#define SURFACETYPE_CHR 11
#define SURFACETYPE_GLASSXLU 12
#define SURFACETYPE_NONE 13
#define SURFACETYPE_DEEPWATER 14
#define TEAM_00 0x00
#define TEAM_01 0x01
#define TEAM_ENEMY 0x02
+1 -1
View File
@@ -487,7 +487,7 @@ extern bool g_Jpn;
#if VERSION >= VERSION_PAL_FINAL
extern s32 g_LanguageId;
#endif
extern struct something *somethings[];
extern struct surfacetype *g_SurfaceTypes[15];
extern void *var800844f0;
extern f32 var800845d4;
extern u32 var800845dc;
+1 -1
View File
@@ -70,7 +70,7 @@ u32 func0f15f560(void);
u32 func0f15ffdc(void);
u32 func0f160a38(void);
u32 func0f1612e4(void);
u32 func0f161520(void);
bool func0f161520(struct coord *arg0, struct coord *arg1, s16 room, struct coord *arg3);
s32 func0f161ab4(s32 room);
bool roomContainsCoord(struct coord *pos, s16 roomnum);
bool func0f161c08(struct coord *arg0, s16 roomnum);
+2 -2
View File
@@ -41,8 +41,8 @@ u32 func0f0260c4(void);
u32 func0f0268bc(void);
u32 func0f0270f4(void);
f32 func0f0278a4(struct chrdata *chr);
u32 func0f027994(void);
u32 func0f027e1c(void);
void func0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool arg3);
void func0f027e1c(struct shotdata *shotdata, struct hit *hit);
void func0f028498(bool value);
void func0f028590(f32 arg0);
bool func0f028a50(struct prop *prop, struct coord *arg1, f32 *arg2, f32 *arg3);
+1 -1
View File
@@ -22,7 +22,7 @@ void roomSetDefaults(struct room *room);
Gfx *func0f001138(Gfx *gdl, s16 roomnum);
Gfx *func0f001300(Gfx *gdl);
void roomInitLights(s32 roomnum);
u32 func0f001734(void);
s32 func0f001734(struct coord *arg0, struct coord *arg1, s32 roomnum);
void roomSetLightsFaulty(s32 roomnum, s32 chance);
void roomSetLightBroken(s32 roomnum, s32 lightnum);
void func0f001bdc(void);
+1 -1
View File
@@ -139,7 +139,7 @@ void func0f0a7138(Gfx **gdl);
struct audiohandle **func0f0a7d5c(void);
void gsetPlayPropHitSound(struct gset *gset, struct prop *prop, s32 arg2);
void func0f0a8404(struct coord *pos, s16 *rooms, s32 arg2);
u32 func0f0a84c8(void);
void func0f0a84c8(struct gset *gset, struct coord *arg1, s16 arg2, s16 *arg3);
void handSetTriggerOn(s32 handnum, bool on);
s32 currentPlayerConsiderToggleGunFunction(s32 usedowntime, bool firing, s32 arg2);
void func0f0a8c50(void);
+2 -2
View File
@@ -19,8 +19,8 @@ void propDetach(struct prop *prop);
Gfx *propRender(Gfx *gdl, struct prop *prop, bool withalpha);
Gfx *propsRender(Gfx *gdl, s16 arg1, s32 arg2, s16 *arg3);
void weaponPlayWhooshSound(s32 weaponnum, struct prop *prop);
void func0f060bac(s32 arg0, struct prop *prop);
void func0f060db8(s32 handnum, bool arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4, struct coord *arg5, u32 arg6, f32 arg7, bool arg8);
void func0f060bac(s32 weaponnum, struct prop *prop);
struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struct coord *arg3, struct coord *gunpos, struct coord *dir, u32 arg6, f32 arg7, bool arg8);
struct prop *func0f061d54(s32 handnum, u32 arg1, u32 arg2);
void handCreateBulletRaycast(s32 handnum, bool arg1, bool dorandom, s32 arg3, bool arg4);
u32 func0f061fa8(void);
+2 -2
View File
@@ -236,8 +236,8 @@ bool func0f0851ec(struct defaultobj *obj);
void objTakeGunfire(struct defaultobj *obj, f32 damage, struct coord *pos, s32 weaponnum, s32 playernum);
void objDamage(struct defaultobj *obj, f32 damage, struct coord *pos, s32 weaponnum, s32 playernum);
u32 func0f0859a0(void);
u32 func0f085e00(void);
u32 func0f085eac(void);
void func0f085e00(struct prop *prop, struct shotdata *shotdata);
void func0f085eac(struct shotdata *shotdata, struct hit *hit);
u32 propobjGetCiTagId(struct prop *prop);
bool objIsHealthy(struct defaultobj *obj);
bool objTestForInteract(struct prop *prop);
+1 -1
View File
@@ -6,7 +6,7 @@
u32 func0f12f6c0(void);
void sparkgroupEnsureFreeSparkSlot(struct sparkgroup *group);
void sparksCreate(s32 room, struct prop *prop, struct coord *pos, struct coord *arg3, struct coord *dir, s32 arg5);
void sparksCreate(s32 room, struct prop *prop, struct coord *pos, struct coord *arg3, struct coord *dir, s32 type);
Gfx *sparksRender(Gfx *gdl);
#endif
+1 -1
View File
@@ -13,7 +13,7 @@ void func0f13e640(struct var800a41b0 *thing, u32 arg1);
u32 func0f13e744(void);
u32 func0f13e994(void);
void func0f13eb44(void);
u32 func0f13f3f4(void);
void func0f13f3f4(struct coord *arg0, struct coord *arg1, struct coord *arg2, u32 arg3, u32 arg4, u32 arg5, s32 room, u32 arg7, s32 arg8, u32 arg9, struct chrdata *chr, bool arg11);
u32 func0f13f504(void);
s32 func0f140750(struct coord *coord);
u32 func0f1408a8(void);
+18 -18
View File
@@ -1667,27 +1667,27 @@ enum sfx {
SFX_8073,
SFX_8074,
SFX_8075,
SFX_8076,
SFX_PUNCH_GLASS,
SFX_HIT_CHR,
SFX_HIT_GLASS,
SFX_GLASS_SHATTER,
SFX_HATHIT_8079,
SFX_HIT_METAL_8079,
SFX_807A,
SFX_HATHIT_807B,
SFX_HIT_METAL_807B,
SFX_HATHIT_807C,
SFX_807D,
SFX_807E,
SFX_807F,
SFX_FIREEMPTY_MAIAN,
SFX_8081,
SFX_8082,
SFX_8083,
SFX_8084,
SFX_8085,
SFX_8086,
SFX_8087,
SFX_8088,
SFX_8089,
SFX_808A,
SFX_HIT_SNOW,
SFX_HIT_WOOD_807E,
SFX_HIT_WOOD_807F,
SFX_HIT_WATER,
SFX_HIT_MUD_8081,
SFX_HIT_MUD_8082,
SFX_HIT_MUD_8083,
SFX_HIT_DIRT_8084,
SFX_HIT_DIRT_8085,
SFX_HIT_TILE,
SFX_HIT_STONE_8087,
SFX_HIT_STONE_8088,
SFX_HIT_METALOBJ_8089,
SFX_HIT_METALOBJ_808A,
SFX_808B,
SFX_808C,
SFX_THUD_808D,
+58 -6
View File
@@ -3500,10 +3500,11 @@ struct twowords {
u32 unk04;
};
struct something {
u32 *unk00;
u32 *unk04;
u32 unk08;
struct surfacetype {
u16 *sounds;
u8 *unk04;
s16 numsounds;
s16 num04;
};
union soundnumhack {
@@ -5788,10 +5789,11 @@ struct weatherparticledata {
};
struct texture {
u8 unk00;
u8 unk00_00 : 4;
u8 surfacetype : 4;
u8 unk01;
u16 dataoffset;
u32 unk08;
u32 unk04;
};
struct var800aabb8 {
@@ -7039,4 +7041,54 @@ struct var8009ddec {
/*0x18*/ s32 pad;
};
struct hitthing {
struct coord unk00;
struct coord unk0c;
u32 unk18;
u32 unk1c;
u32 unk20;
u32 unk24;
s16 unk28;
s16 unk2a;
s16 unk2c;
s16 unk2e;
};
struct hit {
/*0x00*/ f32 distance;
/*0x04*/ struct prop *prop;
/*0x08*/ u32 unk08;
/*0x0c*/ u32 unk0c;
/*0x10*/ u32 unk10;
/*0x14*/ u32 unk14;
/*0x18*/ u32 unk18;
/*0x1c*/ u32 unk1c;
/*0x20*/ u32 unk20;
/*0x24*/ u32 unk24;
/*0x28*/ u32 unk28;
/*0x2c*/ u32 unk2c;
/*0x30*/ u32 unk30;
/*0x34*/ u32 unk34;
/*0x38*/ u32 unk38;
/*0x3c*/ u32 unk3c;
/*0x40*/ u32 unk40;
/*0x44*/ u32 unk44;
/*0x48*/ u32 unk48;
/*0x4c*/ s8 unk4c;
/*0x4d*/ s8 unk4d;
/*0x50*/ struct coord pos;
/*0x5c*/ struct coord dir;
};
struct shotdata {
/*0x00*/ struct coord unk00;
/*0x0c*/ struct coord unk0c;
/*0x18*/ struct gset gset;
/*0x1c*/ struct coord gunpos;
/*0x28*/ struct coord dir;
/*0x34*/ f32 unk34;
/*0x38*/ s32 unk38;
/*0x3c*/ struct hit hits[10];
};
#endif