Decompile projectileTick

This commit is contained in:
Ryan Dwyer
2022-07-20 21:20:17 +10:00
parent 330ae2a554
commit fef5f17563
26 changed files with 1608 additions and 17851 deletions
+23 -18
View File
@@ -993,11 +993,11 @@
#define FUNCFLAG_PSYCHOSIS 0x00200000
#define FUNCFLAG_00400000 0x00400000 // punch, disarm and pistol whip
#define FUNCFLAG_CALCULATETRAJECTORY 0x00800000 // throwables will land on crosshair
#define FUNCFLAG_08000000 0x08000000 // rockets
#define FUNCFLAG_PROJECTILE_POWERED 0x08000000
#define FUNCFLAG_10000000 0x10000000 // grenade launchers
#define FUNCFLAG_20000000 0x20000000 // explosives related
#define FUNCFLAG_HOMINGROCKET 0x40000000
#define FUNCFLAG_80000000 0x80000000
#define FUNCFLAG_PROJECTILE_LIGHTWEIGHT 0x80000000
#define GAILIST_IDLE 0x0000
#define GAILIST_UNALERTED_0001 0x0001
@@ -3079,8 +3079,8 @@
#define OBJFLAG3_HOVERBEDSHIELD 0x00100000
#define OBJFLAG3_INTERACTSHORTRANGE 0x00200000
#define OBJFLAG3_PLAYERUNDROPPABLE 0x00400000 // Player does not drop item when dead
#define OBJFLAG3_00800000 0x00800000 // Not used in scripts
#define OBJFLAG3_01000000 0x01000000 // Not used in scripts
#define OBJFLAG3_LONGPUSHRANGE 0x00800000 // Not used in scripts
#define OBJFLAG3_PUSHFREELY 0x01000000 // Not used in scripts
#define OBJFLAG3_GEOCYL 0x02000000 // Use cylinder geometry rather than block
#define OBJFLAG3_04000000 0x04000000 // Not used in scripts
#define OBJFLAG3_08000000 0x08000000 // Not used in scripts
@@ -3097,7 +3097,7 @@
#define OBJHFLAG_TAGGED 0x00000010
#define OBJHFLAG_00000020 0x00000020 // thrown knife
#define OBJHFLAG_EMBEDDED 0x00000040 // obj is embedded in a chr or other obj (eg. knife)
#define OBJHFLAG_AIRBORNE 0x00000080
#define OBJHFLAG_PROJECTILE 0x00000080 // obj is airborne, sliding or falling
#define OBJHFLAG_00000100 0x00000100
#define OBJHFLAG_00000200 0x00000200
#define OBJHFLAG_HASTEXTOVERRIDE 0x00000400
@@ -3371,18 +3371,22 @@
#define PROFILE_RDP_START1 0x40001
#define PROFILE_AUDIOFRAME_END 0x60000
#define PROJECTILEFLAG_00000001 0x00000001
#define PROJECTILEFLAG_00000002 0x00000002
#define PROJECTILEFLAG_00000004 0x00000004
#define PROJECTILEFLAG_00000010 0x00000010
#define PROJECTILEFLAG_00000080 0x00000080
#define PROJECTILEFLAG_00000400 0x00000400
#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 PROJECTILEFLAG_AIRBORNE 0x00000001
#define PROJECTILEFLAG_00000002 0x00000002
#define PROJECTILEFLAG_STICKY 0x00000004
#define PROJECTILEFLAG_POWERED 0x00000010 // No gravity
#define PROJECTILEFLAG_00000020 0x00000020
#define PROJECTILEFLAG_LAUNCHING 0x00000080
#define PROJECTILEFLAG_00000100 0x00000100
#define PROJECTILEFLAG_FALLING 0x00000400
#define PROJECTILEFLAG_SLIDING 0x00000800
#define PROJECTILEFLAG_00001000 0x00001000
#define PROJECTILEFLAG_00002000 0x00002000
#define PROJECTILEFLAG_NOTIMELIMIT 0x00004000
#define PROJECTILEFLAG_INROOM 0x00008000
#define PROJECTILEFLAG_00010000 0x00010000
#define PROJECTILEFLAG_LIGHTWEIGHT 0x40000000
#define PROJECTILEFLAG_FREE 0x80000000
#define PROPFLAG_RENDERPOSTBG 0x01
#define PROPFLAG_ONTHISSCREENTHISTICK 0x02
@@ -3686,6 +3690,7 @@
#define SPARKTYPE_0B 0x0b
#define SPARKTYPE_0D 0x0d
#define SPARKTYPE_0F 0x0f
#define SPARKTYPE_10 0x10
#define SPARKTYPE_11 0x11
#define SPARKTYPE_12 0x12
#define SPARKTYPE_13 0x13
@@ -3706,7 +3711,7 @@
#define SPAWNFLAG_IGNORECOLLISION 0x00000100 // For initial chr placement only
#define SPAWNFLAG_00000200 0x00000200
#define SPAWNFLAG_ANTINONINTERACTABLE 0x00000400
#define SPAWNFLAG_DONTSHOOTME 0x00000800
#define SPAWNFLAG_DONTSHOOTME 0x00000800
#define SPAWNFLAG_HIDDEN 0x00001000
#define SPAWNFLAG_NOBLOOD 0x00002000
#define SPAWNFLAG_FIXEDHEIGHT 0x00004000 // By default, chr heights vary slightly. This disables it.
+1 -1
View File
@@ -43,7 +43,7 @@ void chrRenderAttachedObject(struct prop *prop, struct modelrenderdata *renderda
void chrGetBloodColour(s16 bodynum, u8 *colour1, u32 *colour2);
Gfx *chrRender(struct prop *prop, Gfx *gdl, bool xlupass);
void chrEmitSparks(struct chrdata *chr, struct prop *prop, s32 hitpart, struct coord *coord, struct coord *coord2, struct chrdata *chr2);
u32 chr0f0260c4(void);
void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struct coord *arg3);
void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct coord *arg3);
void chrDisfigure(struct chrdata *chr, struct coord *exppos, f32 damageradius);
f32 chr0f0278a4(struct chrdata *chr);
+1 -1
View File
@@ -4,7 +4,7 @@
#include "data.h"
#include "types.h"
void func0f096360(Mtxf *mtx);
void mtxLoadRandomRotation(Mtxf *mtx);
void func0f0964b4(struct coord *arg0, Mtxf *mtx);
void func0f0965e4(f32 *arg0, f32 *arg1, f32 arg2);
void func0f096698(Mtxf *arg0, Mtxf *arg1, s32 count);
+7 -7
View File
@@ -70,7 +70,7 @@ void projectilesUnrefOwner(struct prop *owner);
void projectileReset(struct projectile *projectile);
struct projectile *projectileAllocate(void);
void func0f0685e4(struct prop *prop);
void objSetProjectileFlag4(struct prop *prop);
void projectileSetSticky(struct prop *prop);
void embedmentFree(struct embedment *embedment);
struct embedment *embedmentAllocate(void);
s32 objGetShotsTaken(struct defaultobj *obj);
@@ -103,8 +103,8 @@ void func0f06a580(struct defaultobj *obj, struct coord *pos, Mtxf *matrix, s16 *
f32 func0f06a620(struct defaultobj *obj);
void func0f06a730(struct defaultobj *obj, struct coord *arg1, Mtxf *matrix, s16 *rooms, struct coord *arg4);
void func0f06ab60(struct defaultobj *obj, struct coord *arg1, Mtxf *matrix, s16 *rooms, struct coord *arg4);
void objEndFlight(struct defaultobj *obj);
void func0f06ac90(struct prop *prop);
void objFreeProjectile(struct defaultobj *obj);
void objFreeEmbedmentOrProjectile(struct prop *prop);
void objFree(struct defaultobj *obj, bool freeprop, bool canregen);
void objFreePermanently(struct defaultobj *obj, bool freeprop);
f32 objGetWidth(struct defaultobj *obj);
@@ -114,11 +114,11 @@ bool func0f06b610(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
bool func0f06bea0(struct model *model, struct modelnode *arg1, struct modelnode *arg2, struct coord *arg3, struct coord *arg4, void *arg5, f32 *arg6, struct modelnode **arg7, s32 *hitpart, s32 *arg9, struct modelnode **arg10);
bool func0f06c28c(struct chrdata *chr, struct coord *arg1, struct coord *arg2, struct coord *arg3, f32 arg4, struct coord *arg5, struct coord *arg6, struct coord *arg7, struct coord *arg8, f32 *arg9);
bool projectileFindCollidingProp(struct prop *prop, struct coord *pos, struct coord *arg2, u32 cdtypes, struct coord *arg4, struct coord *arg5, s16 *arg6);
bool func0f06cd00(struct defaultobj *obj, struct coord *pos, struct coord *arg2, struct coord *arg3);
s32 func0f06cd00(struct defaultobj *obj, struct coord *pos, struct coord *arg2, struct coord *arg3);
bool func0f06d37c(struct defaultobj *obj, struct coord *arg1, struct coord *arg2, struct coord *arg3);
void applySpeed(f32 *distdone, f32 maxdist, f32 *speed, f32 accel, f32 decel, f32 maxspeed);
void applyRotation(f32 *angle, f32 maxrot, f32 *speed, f32 accel, f32 decel, f32 maxspeed);
u32 func0f06dbd8(void);
void func0f06dbd8(struct defaultobj *obj, f32 mtx[3][3]);
void knifePlayWooshSound(struct defaultobj *obj);
void func0f06e9cc(struct coord *arg0, Mtxf *arg1);
void objLand2(struct defaultobj *obj, struct coord *arg1, struct coord *arg2);
@@ -156,8 +156,8 @@ f32 objCollide(struct defaultobj *obj, struct coord *arg1, f32 arg2);
void hoverbikeUpdateMovement(struct hoverbikeobj *hoverbike, f32 arg1, f32 arg2, f32 arg3);
void platformDisplaceProps2(struct prop *platform, Mtxf *arg1);
bool rocketTickFbw(struct weaponobj *rocket);
s32 func0f073ae8(struct defaultobj *obj, struct projectile *projectile, struct coord *arg2, struct coord *arg3);
s32 func0f073c6c(struct defaultobj *obj, bool *arg1);
s32 projectileLaunch(struct defaultobj *obj, struct projectile *projectile, struct coord *arg2, struct coord *arg3);
s32 projectileTick(struct defaultobj *obj, bool *embedded);
void doorTick(struct prop *doorprop);
void doorUpdatePortalIfWindowed(struct prop *door, s32 playercount);
void doorInitMatrices(struct prop *door);
+4 -3
View File
@@ -71,13 +71,14 @@ s32 cdFindRoom(struct coord *pos, s16 *nearrooms);
#if VERSION >= VERSION_NTSC_1_0
s16 cd0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr);
s16 cd0002a4d0(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr);
#else
s16 cd0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr);
s16 cd0002a4d0(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr);
#endif
s16 cd0002a4d0(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr);
s32 cd0002a564(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, struct coord *arg4, struct prop **propptr);
s32 cd0002a5e4(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, u16 *arg4, struct coord *arg5);
s16 cd0002a564(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, struct coord *arg4, struct prop **propptr);
s16 cd0002a5e4(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, u16 *arg4, struct coord *arg5);
s32 cdTestVolume(struct coord *pos, f32 radius, s16 *rooms, s32 types, s32 arg4, f32 ymax, f32 ymin);
s32 cd0002a6fc(struct coord *pos, struct coord *pos2, f32 width, s16 *rooms, s32 types, bool arg5, f32 arg6, f32 arg7);
s32 cdTestAToB1(struct coord *origpos, struct coord *dstpos, f32 width, s16 *dstrooms, s32 types, s32 arg5, f32 ymax, f32 ymin);
+19 -18
View File
@@ -1336,29 +1336,23 @@ struct projectile {
/*0x014*/ f32 unk014;
/*0x018*/ f32 unk018;
/*0x01c*/ f32 unk01c;
/*0x020*/ Mtxf unk020;
/*0x020*/ Mtxf mtx;
/*0x060*/ f32 unk060;
/*0x064*/ u32 unk064;
/*0x068*/ u32 unk068;
/*0x06c*/ u32 unk06c;
/*0x070*/ u32 unk070;
/*0x074*/ u32 unk074;
/*0x078*/ u32 unk078;
/*0x07c*/ u32 unk07c;
/*0x080*/ u32 unk080;
/*0x084*/ u32 unk084;
/*0x064*/ f32 unk064;
/*0x068*/ f32 unk068[4];
/*0x078*/ f32 unk078[4];
/*0x088*/ struct prop *ownerprop;
/*0x08c*/ f32 unk08c;
/*0x090*/ s32 unk090;
/*0x094*/ s32 unk094;
/*0x090*/ s32 bouncecount;
/*0x094*/ s32 bounceframe;
/*0x098*/ f32 unk098;
/*0x09c*/ s32 lastwooshframe;
/*0x0a0*/ u32 unk0a0;
/*0x0a0*/ s32 flighttime240;
/*0x0a4*/ s32 unk0a4;
/*0x0a8*/ f32 unk0a8;
/*0x0ac*/ f32 unk0ac;
/*0x0b0*/ s16 droptype;
/*0x0b2*/ s16 unk0b2;
/*0x0b2*/ s16 powerlimit240;
/*0x0b4*/ s32 unk0b4;
/*0x0b8*/ f32 unk0b8;
/*0x0bc*/ f32 unk0bc;
@@ -1555,10 +1549,17 @@ struct ammocrateobj { // objtype 0x07
struct weaponobj { // objtype 0x08
struct defaultobj base;
/*0x5c*/ u8 weaponnum;
/*0x5d*/ s8 unk5d;
/*0x5e*/ s8 unk5e;
/*0x5f*/ u8 gunfunc;
union {
struct gset gset;
struct {
/*0x5c*/ u8 weaponnum;
/*0x5d*/ s8 unk5d;
/*0x5e*/ s8 unk5e;
/*0x5f*/ u8 gunfunc;
};
};
/*0x60*/ s8 fadeouttimer60;
/*0x61*/ s8 dualweaponnum;