Attempt to decompile liftTick

This commit is contained in:
Ryan Dwyer
2020-06-27 21:48:43 +10:00
parent 85cd1a1103
commit ce9c56ec7f
14 changed files with 284 additions and 139 deletions
+33 -32
View File
@@ -1909,38 +1909,39 @@
#define NUM_WEAPONS 94
// 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_00004000 0x00004000 // Editor: "Assigned to Actor"
#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_00080000 0x00080000 // Thrown laptop?
#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_20000000 0x20000000 // Editor: "Door Opens Backwards/Special Function/Conceal Weapon"
#define OBJFLAG_DOORKEEPOPEN 0x40000000 // Editor: "Door open by default/Empty weapon"
#define OBJFLAG_CHOPPER_INACTIVE 0x80000000 // Or lift disabled
#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_00004000 0x00004000 // Editor: "Assigned to Actor"
#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_00080000 0x00080000 // Thrown laptop?
#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_20000000 0x20000000 // Editor: "Door Opens Backwards/Special Function/Conceal Weapon"
#define OBJFLAG_DOOR_KEEPOPEN 0x40000000 // Editor: "Door open by default/Empty weapon"
#define OBJFLAG_LIFT_TRIGGERDISABLE 0x40000000
#define OBJFLAG_CHOPPER_INACTIVE 0x80000000 // Or lift disabled
// obj->flags2
#define OBJFLAG2_00000001 0x00000001 // Used only in CI Training
+2 -2
View File
@@ -129,7 +129,7 @@ u32 func0f070ca0(void);
void liftActivate(struct prop *prop, u8 liftnum);
struct prop *liftFindByPad(s16 padnum);
u32 func0f070eac(void);
void func0f070f08(struct liftobj *lift, u32 arg0);
void func0f070f08(struct liftobj *lift, bool arg0);
void liftGoToStop(struct liftobj *lift, s32 stopnum);
u32 func0f071360(void);
void func0f0713e4(struct defaultobj *obj, struct hov *hov, struct coord *coord, s16 *rooms, f32 *matrix);
@@ -150,7 +150,7 @@ u32 func0f073c6c(struct defaultobj *obj, bool *arg1);
void doorTick(struct prop *doorprop);
void func0f07731c(struct prop *door, s32 playercount);
u32 func0f077448(void);
u32 func0f07766c(void);
void platformDisplaceProps(struct prop *platform, s16 *propnums, struct coord *prevpos, struct coord *newpos);
void liftTick(struct prop *lift);
void escalatorTick(struct prop *escalator);
void cameraTick(struct prop *camera);
+1 -1
View File
@@ -57,7 +57,7 @@ u32 func000263e4(void);
u32 func00026520(void);
u32 func00026654(void);
u32 func000266a4(void);
u32 func0002671c(void);
void platformGetRidingProps(struct prop *platform, s16 *propnums, u32 len);
u32 func00026a04(void);
u32 func00026e7c(void);
u32 func0002709c(void);
+3 -3
View File
@@ -1196,9 +1196,9 @@ struct liftobj { // objtype 30
/*0x64*/ struct doorobj *doors[4];
/*0x74*/ f32 dist;
/*0x78*/ f32 speed;
/*0x7c*/ u32 accel;
/*0x80*/ u32 maxspeed;
/*0x84*/ u8 soundtype;
/*0x7c*/ f32 accel;
/*0x80*/ f32 maxspeed;
/*0x84*/ s8 soundtype;
/*0x85*/ s8 levelcur;
/*0x86*/ s8 levelaim;
/*0x88*/ struct coord prevpos;