Decompile chrDetectDangerousObject

This commit is contained in:
Ryan Dwyer
2020-01-17 22:30:39 +10:00
parent 479c253470
commit 402d8cfb7e
12 changed files with 97 additions and 161 deletions
+15 -5
View File
@@ -2670,12 +2670,22 @@
mkshort(0x013c), \
label,
// Value is only ever 3. The function checks bits 0x01 and 0x02 to decide what
// to do, so in all cases it does both paths.
// globals.c only
#define cmd013d_if_grenade_thrown_nearby_maybe(value, label) \
/**
* Checks if there is a live grenade or other dangerous object nearby. If so,
* the position of the object is stored in the chr's runfrompos property and the
* command passes.
*
* The flags argument is a bitfield which specifies what types of objects to
* look for.
*
* Flag 0x1 = check for grenades
* Flag 0x2 = check for prop type 7 (unsure what this is at the moment)
*
* Those are the only supported flags.
*/
#define if_dangerous_object_nearby(flags, label) \
mkshort(0x013d), \
value, \
flags, \
label,
/**
+1
View File
@@ -769,6 +769,7 @@
#define PROPTYPE_WEAPON 4
#define PROPTYPE_EYESPY 5
#define PROPTYPE_PLAYER 6
#define PROPTYPE_7 7
#define RACE_HUMAN 0
#define RACE_SKEDAR 1
+1 -1
View File
@@ -325,7 +325,7 @@ u32 func0f043944(void);
u32 func0f043988(void);
u32 func0f0439c0(void);
u32 func0f0439f8(void);
u32 func0f043da8(struct chrdata *chr, u32 arg1);
bool chrDetectDangerousObject(struct chrdata *chr, u8 flags);
void func0f043f24(s32 arg0);
u32 func0f043f2c(void);
u32 func0f044208(void);
+1 -1
View File
@@ -315,7 +315,7 @@
/*0x013a*/ bool aiSetChrPresetToUnalertedTeammate(void);
/*0x013b*/ bool aiSetSquadron(void);
/*0x013c*/ bool ai013c(void);
/*0x013d*/ bool ai013d(void);
/*0x013d*/ bool aiIfDangerousObjectNearby(void);
/*0x013e*/ bool ai013e(void);
/*0x013f*/ bool aiIfHeliWeaponsArmed(void);
/*0x0140*/ bool aiIfHoverbotNextStep(void);
+1 -1
View File
@@ -525,7 +525,7 @@ extern u32 var8009cadc;
extern u32 var8009cae0;
extern u32 var8009cb08;
extern u32 var8009cbf8;
extern u32 var8009cc00;
extern struct prop *g_DangerousProps[12];
extern u32 var8009cc30;
extern u32 var8009cc40;
extern u32 var8009cc44;
+1 -1
View File
@@ -142,7 +142,7 @@ struct chr2d4 {
/*0x004*/ struct mpsim *simulant;
/*0x008*/ u16 unk008;
/*0x008*/ s16 followingplayernum;
/*0x00c*/ u32 unk00c;
/*0x00c*/ s16 unk00c;
/*0x010*/ struct prop *prop;
/*0x014*/ u32 unk014;
/*0x018*/ u32 unk018;