Decompile chrSawTargetRecently and chrHeardTargetRecently

This commit is contained in:
Ryan Dwyer
2019-12-22 16:45:33 +10:00
parent 550f38ae43
commit f643cd5fe3
10 changed files with 47 additions and 57 deletions
+11 -1
View File
@@ -279,7 +279,17 @@
mkword(value), \
label,
#define if_shot_at_close_range(label) \
/**
* Go to the label if the chr saw their target within the last 10 seconds.
*/
#define if_saw_target_recently(label) \
mkshort(0x0043), \
label,
/**
* Go to the label if the chr heard their target within the last 10 seconds.
*/
#define if_heard_target_recently(label) \
mkshort(0x0044), \
label,
+2 -2
View File
@@ -349,8 +349,8 @@ u32 func0f047934(void);
u32 func0f047c80(void);
u32 func0f0482cc(void);
u32 func0f048398(void);
u32 func0f048a14(struct chrdata *chr);
u32 func0f048a4c(struct chrdata *chr);
bool chrSawTargetRecently(struct chrdata *chr);
bool chrHeardTargetRecently(struct chrdata *chr);
float func0f048a84(struct chrdata *chr, struct coord *coord);
float chrGetAngleToTarget(struct chrdata *chr);
u32 func0f048b78(void);
+2 -2
View File
@@ -70,8 +70,8 @@
/*0x0040*/ bool ai0040(void);
/*0x0041*/ bool ai0041(void);
/*0x0042*/ bool aiIfInLoadedRoom(void);
/*0x0043*/ bool ai0043(void);
/*0x0044*/ bool aiIfShotAtCloseRange(void);
/*0x0043*/ bool aiIfSawTargetRecently(void);
/*0x0044*/ bool aiIfHeardTargetRecently(void);
/*0x0045*/ bool ai0045(void);
/*0x0046*/ bool aiIfNeverBeenOnScreen(void);
/*0x0047*/ bool ai0047(void);
+1 -1
View File
@@ -19,7 +19,7 @@ struct g_vars {
/*000000*/ u32 unk000000;
/*000004*/ u32 unk000004;
/*000008*/ u32 unk000008;
/*000008*/ s32 tickcount;
/*00000c*/ u32 unk00000c;
/*000010*/ u32 unk000010;
/*000014*/ u32 unk000014;
+2 -2
View File
@@ -154,13 +154,13 @@ struct chrdata {
/*0x0d4*/ u32 lastwalk60;
/*0x0d8*/ u32 lastmoveok60;
/*0x0dc*/ float visionrange;
/*0x0e0*/ u32 lastseetarget60;
/*0x0e0*/ s32 lastseetarget60;
/*0x0e4*/ u32 lastvisibletarg;
/*0x0e8*/ void *unk0e8;
/*0x0ec*/ u16 lastshooter;
/*0x0ee*/ u16 timeshooter;
/*0x0f0*/ float hearingscale;
/*0x0f4*/ u32 lastheartarget60;
/*0x0f4*/ s32 lastheartarget60;
/*0x0f8*/ u32 shadecol;
/*0x0fc*/ u32 nextcol;
/*0x100*/ float damage;