Attempt to decompile chrSawInjury and improve documentation for related AI commands

This commit is contained in:
Ryan Dwyer
2019-12-22 16:12:57 +10:00
parent 98a62ce308
commit 12ab88c974
18 changed files with 131 additions and 83 deletions
+30 -4
View File
@@ -234,14 +234,40 @@
mkshort(0x003c), \
label,
#define if_shot_near_chr(u1, label) \
/**
* Go to label if the chr has witnessed another chr being injured.
*
* The behaviour of the checktype argument is:
*
* |-----------|-------|-------------------------|
* | Checktype | Teams | Reset "Saw injury" flag |
* |-----------|-------|-------------------------|
* | 0 | Any | Yes |
* | 1 | Same | No |
* | 2+ | Any | Yes |
* |-----------|-------|-------------------------|
*/
#define if_saw_injury(checktype, label) \
mkshort(0x003d), \
u1, \
checktype, \
label,
#define if_saw_death(u1, label) \
/**
* Go to label if the chr has witnessed another chr dying.
*
* The behaviour of the checktype argument is:
*
* |-----------|-------|------------------------|
* | Checktype | Teams | Reset "Saw death" flag |
* |-----------|-------|------------------------|
* | 0 | Any | No |
* | 1 | Same | Yes |
* | 2+ | Any | Yes |
* |-----------|-------|------------------------|
*/
#define if_saw_death(checktype, label) \
mkshort(0x003e), \
u1, \
checktype, \
label,
#define if_chr_sees_player(label) \
+1 -1
View File
@@ -367,7 +367,7 @@ u32 func0f049fcc(struct chrdata *chr);
u32 func0f04a0e4(struct chrdata *chr);
s32 chrGetNumArghs(struct chrdata *chr);
s32 chrGetNumCloseArghs(struct chrdata *chr);
u32 func0f04a110(struct chrdata *chr, u32 arg1);
bool chrSawInjury(struct chrdata *chr, u8 arg1);
bool chrSawDeath(struct chrdata *chr, u8 arg1);
bool func0f04a2b4(struct chrdata *chr);
u32 func0f04a2d4(void);
+1 -1
View File
@@ -64,7 +64,7 @@
/*0x003a*/ bool aiIfAlarmActive(void);
/*0x003b*/ bool aiIfAlarmInactive(void);
/*0x003c*/ bool ai003c(void);
/*0x003d*/ bool ai003d(void);
/*0x003d*/ bool aiIfSawInjury(void);
/*0x003e*/ bool aiIfSawDeath(void);
/*0x003f*/ bool aiIfSeesPlayer(void);
/*0x0040*/ bool ai0040(void);