Attempt to decompile weaponTick

This commit is contained in:
Ryan Dwyer
2021-11-24 22:19:57 +10:00
parent 39df08f50d
commit 3ea035e4d4
18 changed files with 628 additions and 209 deletions
+52 -48
View File
@@ -729,7 +729,9 @@
#define EXPLOSIONTYPE_12 12
#define EXPLOSIONTYPE_13 13
#define EXPLOSIONTYPE_14 14
#define EXPLOSIONTYPE_17 17
#define EXPLOSIONTYPE_18 18
#define EXPLOSIONTYPE_21 21
#define EXPLOSIONTYPE_22 22
#define EXPLOSIONTYPE_23 23
#define EXPLOSIONTYPE_25 25
@@ -857,7 +859,7 @@
#define FUNC_PRIMARY 0
#define FUNC_SECONDARY 1
#define FUNC_2 2
#define FUNC_POISON 3 // Internal function for delivering knife poison periodically
#define FUNC_POISON 3 // Internal function for delivering knife poison periodically
#define FUNCFLAG_BURST3 0x00000002
#define FUNCFLAG_BURST50 0x00000020 // automatics only
@@ -2803,51 +2805,53 @@
#define OBJECTIVEFLAG_AUTOCOMPLETE 0x01
// obj->flags
#define OBJFLAG_00000001 0x00000001 // Editor: "Fall to Ground"
#define OBJFLAG_00000002 0x00000002 // Editor: "In Air Rotated 90 Deg Upside-Down"
#define OBJFLAG_00000004 0x00000004 // Editor: "In Air Upside-Down"
#define OBJFLAG_00000008 0x00000008 // Editor: "In Air"
#define OBJFLAG_00000010 0x00000010 // Editor: "Scale to Pad Bounds"
#define OBJFLAG_00000020 0x00000020 // Editor: "X to Pad Bounds"
#define OBJFLAG_00000040 0x00000040 // Editor: "Y to Pad Bounds"
#define OBJFLAG_00000080 0x00000080 // Editor: "Z to Pad Bounds"
#define OBJFLAG_00000100 0x00000100 // G5 mines, Air Base brown door, AF1 grate and escape door, Defense shuttle, Ruins mines, MBR lift door. Editor suggests "Force Collisions" but this seems wrong
#define OBJFLAG_00000200 0x00000200 // Editor: "Special Environment Mapping"
#define OBJFLAG_ILLUMINATED 0x00000400
#define OBJFLAG_00000800 0x00000800 // Editor: "Free Standing Glass"
#define OBJFLAG_00001000 0x00001000 // Editor: "Absolute Position"
#define OBJFLAG_00002000 0x00002000 // AF1 commhubs. Editor suggests "Weapon Not Dropped"
#define OBJFLAG_ASSIGNEDTOCHR 0x00004000
#define OBJFLAG_00008000 0x00008000 // Editor: "Embedded Object"
#define OBJFLAG_00010000 0x00010000 // Not used in scripts
#define OBJFLAG_INVINCIBLE 0x00020000
#define OBJFLAG_COLLECTABLE 0x00040000
#define OBJFLAG_THROWNLAPTOP 0x00080000
#define OBJFLAG_UNCOLLECTABLE 0x00100000
#define OBJFLAG_00200000 0x00200000 // Editor: "Bounce and Destroy If Shot"
#define OBJFLAG_00400000 0x00400000 // Not used in scripts
#define OBJFLAG_00800000 0x00800000 // Not used in scripts
#define OBJFLAG_01000000 0x01000000 // Editor: "Embedded Object"
#define OBJFLAG_CANNOT_ACTIVATE 0x02000000 // Makes it do nothing if player presses B on object. Used mostly for doors.
#define OBJFLAG_04000000 0x04000000 // Editor: "AI Sees Through Door/Object"
#define OBJFLAG_08000000 0x08000000 // Not used in scripts
#define OBJFLAG_DEACTIVATED 0x10000000
#define OBJFLAG_DOOR_HASPORTAL 0x10000000
#define OBJFLAG_WEAPON_LEFTHANDED 0x10000000
#define OBJFLAG_ESCSTEP_ZALIGNED 0x10000000
#define OBJFLAG_20000000 0x20000000 // Editor: "Door Opens Backwards/Special Function/Conceal Weapon"
#define OBJFLAG_CAMERA_DISABLED 0x20000000
#define OBJFLAG_DOOR_OPENTOFRONT 0x20000000
#define OBJFLAG_HOVERCAR_20000000 0x20000000
#define OBJFLAG_WEAPON_AICANNOTUSE 0x20000000
#define OBJFLAG_40000000 0x40000000
#define OBJFLAG_AUTOGUN_ALERTED 0x40000000
#define OBJFLAG_CAMERA_BONDINVIEW 0x40000000
#define OBJFLAG_DOOR_KEEPOPEN 0x40000000 // Editor: "Door open by default/Empty weapon"
#define OBJFLAG_LIFT_TRIGGERDISABLE 0x40000000
#define OBJFLAG_80000000 0x80000000
#define OBJFLAG_DOOR_TWOWAY 0x80000000 // Door swings in both directions
#define OBJFLAG_CHOPPER_INACTIVE 0x80000000 // Or lift disabled, or hovercar something
#define OBJFLAG_00000001 0x00000001 // Editor: "Fall to Ground"
#define OBJFLAG_00000002 0x00000002 // Editor: "In Air Rotated 90 Deg Upside-Down"
#define OBJFLAG_00000004 0x00000004 // Editor: "In Air Upside-Down"
#define OBJFLAG_00000008 0x00000008 // Editor: "In Air"
#define OBJFLAG_00000010 0x00000010 // Editor: "Scale to Pad Bounds"
#define OBJFLAG_00000020 0x00000020 // Editor: "X to Pad Bounds"
#define OBJFLAG_00000040 0x00000040 // Editor: "Y to Pad Bounds"
#define OBJFLAG_00000080 0x00000080 // Editor: "Z to Pad Bounds"
#define OBJFLAG_00000100 0x00000100 // G5 mines, Air Base brown door, AF1 grate and escape door, Defense shuttle, Ruins mines, MBR lift door. Editor suggests "Force Collisions" but this seems wrong
#define OBJFLAG_00000200 0x00000200 // Editor: "Special Environment Mapping"
#define OBJFLAG_ILLUMINATED 0x00000400
#define OBJFLAG_00000800 0x00000800 // Editor: "Free Standing Glass"
#define OBJFLAG_00001000 0x00001000 // Editor: "Absolute Position"
#define OBJFLAG_00002000 0x00002000 // AF1 commhubs. Editor suggests "Weapon Not Dropped"
#define OBJFLAG_ASSIGNEDTOCHR 0x00004000
#define OBJFLAG_00008000 0x00008000 // Editor: "Embedded Object"
#define OBJFLAG_00010000 0x00010000 // Not used in scripts
#define OBJFLAG_INVINCIBLE 0x00020000
#define OBJFLAG_COLLECTABLE 0x00040000
#define OBJFLAG_THROWNLAPTOP 0x00080000
#define OBJFLAG_UNCOLLECTABLE 0x00100000
#define OBJFLAG_00200000 0x00200000 // Editor: "Bounce and Destroy If Shot"
#define OBJFLAG_00400000 0x00400000 // Not used in scripts
#define OBJFLAG_00800000 0x00800000 // Not used in scripts
#define OBJFLAG_01000000 0x01000000 // Editor: "Embedded Object"
#define OBJFLAG_CANNOT_ACTIVATE 0x02000000 // Makes it do nothing if player presses B on object. Used mostly for doors.
#define OBJFLAG_04000000 0x04000000 // Editor: "AI Sees Through Door/Object"
#define OBJFLAG_08000000 0x08000000 // Not used in scripts
#define OBJFLAG_DEACTIVATED 0x10000000
#define OBJFLAG_AMMOCRATE_EXPLODENOW 0x10000000
#define OBJFLAG_DOOR_HASPORTAL 0x10000000
#define OBJFLAG_GLASS_HASPORTAL 0x10000000
#define OBJFLAG_WEAPON_LEFTHANDED 0x10000000
#define OBJFLAG_ESCSTEP_ZALIGNED 0x10000000
#define OBJFLAG_20000000 0x20000000 // Editor: "Door Opens Backwards/Special Function/Conceal Weapon"
#define OBJFLAG_CAMERA_DISABLED 0x20000000
#define OBJFLAG_DOOR_OPENTOFRONT 0x20000000
#define OBJFLAG_HOVERCAR_20000000 0x20000000
#define OBJFLAG_WEAPON_AICANNOTUSE 0x20000000
#define OBJFLAG_40000000 0x40000000
#define OBJFLAG_AUTOGUN_ALERTED 0x40000000
#define OBJFLAG_CAMERA_BONDINVIEW 0x40000000
#define OBJFLAG_DOOR_KEEPOPEN 0x40000000 // Editor: "Door open by default/Empty weapon"
#define OBJFLAG_LIFT_TRIGGERDISABLE 0x40000000
#define OBJFLAG_80000000 0x80000000
#define OBJFLAG_DOOR_TWOWAY 0x80000000 // Door swings in both directions
#define OBJFLAG_CHOPPER_INACTIVE 0x80000000 // Or lift disabled, or hovercar something
// obj->flags2
#define OBJFLAG2_00000001 0x00000001 // Used only in CI Training
@@ -2891,8 +2895,8 @@
#define OBJFLAG3_00000010 0x00000010 // Used heaps
#define OBJFLAG3_AUTOCUTSCENESOUNDS 0x00000020 // For doors and objs - play default open/close noises
#define OBJFLAG3_RTRACKED_YELLOW 0x00000040
#define OBJFLAG3_00000080 0x00000080 // Not used in scripts
#define OBJFLAG3_00000100 0x00000100 // Not used in scripts
#define OBJFLAG3_CANHARDFREE 0x00000080
#define OBJFLAG3_HARDFREEING 0x00000100
#define OBJFLAG3_00000200 0x00000200 // Not used in scripts
#define OBJFLAG3_WALKTHROUGH 0x00000400
#define OBJFLAG3_RTRACKED_BLUE 0x00000800
+1 -1
View File
@@ -207,7 +207,7 @@ extern struct sndstate *g_GasAudioHandle;
extern u32 g_CountdownTimerOff;
extern bool g_CountdownTimerRunning;
extern f32 g_CountdownTimerValue60;
extern u32 var80069910;
extern u32 g_PlayersDetonatingMines;
extern u32 var80069914;
extern u32 var80069918;
extern struct linkliftdoorobj *g_LiftDoors;
+2 -2
View File
@@ -14,7 +14,7 @@ void bgun0f098030(struct hand *hand, struct modelfiledata *arg1);
f32 bgun0f09815c(struct hand *hand);
u32 bgun0f0981e8(void);
bool bgun0f098884(struct guncmd *cmd, struct gset *gset);
void bgun0f0988e0(struct guncmd *cmd, s32 handnum, struct hand *hand);
void bgunStartAnimation(struct guncmd *cmd, s32 handnum, struct hand *hand);
bool bgun0f098a44(struct hand *hand, s32 time);
bool bgunIsAnimBusy(struct hand *hand);
void bgunResetAnim(struct hand *hand);
@@ -116,7 +116,7 @@ bool bgunIsMissionCritical(s32 weaponnum);
void bgunLoseGun(struct prop *attacker);
u32 bgun0f0a2da8(void);
u32 bgun0f0a2e94(void);
void bgunDetonateRemoteMines(s32 playernum);
void bgunStartDetonateAnimation(s32 playernum);
u32 bgun0f0a3160(void);
u32 bgun0f0a3490(void);
u32 bgun0f0a37b4(void);
+1 -1
View File
@@ -16,7 +16,7 @@ void nbombInflictDamage(struct nbomb *nbomb);
void nbombTick(struct nbomb *nbomb);
void nbombsTick(void);
Gfx *nbombsRender(Gfx *gdl);
void nbombCreate(struct coord *pos, struct prop *prop);
void nbombCreateStorm(struct coord *pos, struct prop *prop);
f32 gasGetDoorFrac(s32 tagnum);
Gfx *func0f00a490(Gfx *gdl);
Gfx *gasRender(Gfx *gdl);
+1 -1
View File
@@ -15,7 +15,7 @@ void nbombInflictDamage(struct nbomb *nbomb);
void nbombTick(struct nbomb *nbomb);
void nbombsTick(void);
Gfx *nbombsRender(Gfx *gdl);
void nbombCreate(struct coord *pos, struct prop *prop);
void nbombCreateStorm(struct coord *pos, struct prop *ownerprop);
f32 gasGetDoorFrac(s32 tagnum);
Gfx *func0f00a490(Gfx *gdl);
Gfx *gasRender(Gfx *gdl);
+6 -6
View File
@@ -36,7 +36,7 @@ u32 func0f0667b4(void);
f32 modelBboxGetYMin(struct modelrodata_bbox *bbox);
u32 func0f0667c4(void);
u32 func0f0667cc(void);
u32 func0f0667d4(void);
f32 func0f0667d4(struct modelrodata_bbox *bbox);
u32 func0f0667dc(void);
u32 func0f06680c(void);
u32 func0f06683c(void);
@@ -106,8 +106,8 @@ void func0f06a730(struct defaultobj *obj, struct pad *newpad, Mtxf *matrix, s16
u32 func0f06ab60(void);
void objEndFlight(struct defaultobj *obj);
void func0f06ac90(struct prop *prop);
void objRemove2(struct defaultobj *obj, bool freeprop, bool regen);
void objRemove(struct defaultobj *obj, bool freeprop);
void objFree(struct defaultobj *obj, bool freeprop, bool canregen);
void objFreePermanently(struct defaultobj *obj, bool freeprop);
u32 func0f06b36c(void);
bool func0f06b39c(struct coord *arg0, struct coord *arg1, struct coord *arg2, f32 arg3);
u32 func0f06b488(void);
@@ -128,9 +128,9 @@ u32 func0f06ec20(void);
u32 func0f06ed64(void);
u32 func0f06ef44(void);
u32 func0f06f0a0(void);
void func0f06f314(struct prop *prop, u32 explosiontype);
void func0f06f504(struct prop *ammocrate);
void func0f06f54c(struct prop *weapon);
bool propExplode(struct prop *prop, s32 explosiontype);
void ammocrateTick(struct prop *ammocrate);
void weaponTick(struct prop *weapon);
void func0f07063c(struct prop *prop, bool arg1);
void func0f070698(struct prop *prop, bool arg1);
void func0f0706f8(struct prop *prop, bool arg1);
+7 -7
View File
@@ -192,7 +192,7 @@ struct g_vars {
/*000430*/ struct chopperobj *hovercar;
/*000434*/ u8 *ailist;
/*000438*/ u32 aioffset;
/*00043c*/ u32 unk00043c;
/*00043c*/ s32 hardfreeabletally;
/*000440*/ s32 antiheadnum;
/*000444*/ s32 antibodynum;
/*000448*/ s32 coopradaron;
@@ -1485,9 +1485,9 @@ struct projectile {
/*0x028*/ u32 unk028;
/*0x02c*/ u32 unk02c;
/*0x030*/ u32 unk030;
/*0x034*/ u32 unk034;
/*0x038*/ u32 unk038;
/*0x03c*/ u32 unk03c;
/*0x034*/ f32 unk034;
/*0x038*/ f32 unk038;
/*0x03c*/ f32 unk03c;
/*0x040*/ u32 unk040;
/*0x044*/ struct projectile *unk044;
/*0x048*/ u32 unk048;
@@ -1508,7 +1508,7 @@ struct projectile {
/*0x084*/ u32 unk084;
/*0x088*/ struct prop *ownerprop;
/*0x08c*/ f32 unk08c;
/*0x090*/ u32 unk090;
/*0x090*/ s32 unk090;
/*0x094*/ s32 unk094;
/*0x098*/ f32 unk098;
/*0x09c*/ s32 unk09c;
@@ -1716,7 +1716,7 @@ struct weaponobj { // objtype 0x08
/*0x5d*/ s8 unk5d;
/*0x5e*/ s8 unk5e;
/*0x5f*/ u8 gunfunc;
/*0x60*/ s8 unk60;
/*0x60*/ s8 fadeouttimer60;
/*0x61*/ s8 dualweaponnum;
/**
@@ -6818,7 +6818,7 @@ struct nbomb {
f32 radius;
s16 unk14;
f32 unk18;
struct prop *prop;
struct prop *ownerprop;
struct sndstate *audiohandle20;
struct sndstate *audiohandle24;
};