Decompile aiRetreat

This commit is contained in:
Ryan Dwyer
2020-02-12 17:19:02 +10:00
parent 89f66348b1
commit 819216b65c
13 changed files with 45 additions and 87 deletions
+13 -6
View File
@@ -2641,13 +2641,20 @@
mkshort(0x0135), \
label,
// u1 can theoretically be any value but in practice is only ever 2.
// u2 can be either 0, 1 or 2 and determines what the command does,
// but in practice is only ever 1 or 2.
#define retreat(u1, u2) \
/**
* If operation is 0, looks like the chr runs from their runfrompos property.
* The distance they run is controlled by bit 0x10 in speed. If set then the run
* distance will be 400 units. If unset it will be 10,000.
*
* If operation is 1, the chr tries to run 10,000 units away from their target.
*
* If operation is anything else, looks like it tries to find a cover point
* within 2314 units then runs to it.
*/
#define retreat(speed, operation) \
mkshort(0x0136), \
u1, \
u2,
speed, \
operation,
#define if_chr_in_squadron_doing_action(action, label) \
mkshort(0x0137), \
+1 -1
View File
@@ -308,7 +308,7 @@
/*0x0133*/ bool ai0133(void);
/*0x0134*/ bool aiIfOrders(void);
/*0x0135*/ bool aiIfHasOrders(void);
/*0x0136*/ bool ai0136(void);
/*0x0136*/ bool aiRetreat(void);
/*0x0137*/ bool aiIfChrInSquadronDoingAction(void);
/*0x0138*/ bool aiIfChannelIdle(void);
/*0x0139*/ bool ai0139(void);
+2 -2
View File
@@ -206,9 +206,9 @@ bool chrSpawnAtCoord(s32 body, s32 head, struct coord *pos, s16 *room, f32 arg4,
u32 func0f04b658(struct chrdata *chr);
bool chrMoveToPos(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3, u32 allowonscreen);
u32 func0f04b950(struct chrdata *chr, u32 cover, u32 arg2);
u32 func0f04ba34(struct chrdata *chr, u16 arg1, u32 arg2);
s32 func0f04ba34(struct chrdata *chr, u16 arg1, u32 arg2);
u32 func0f04bffc(struct chrdata *chr, u32 arg1, u32 arg2);
u32 func0f04c2e8(void);
void chrRunFromPos(struct chrdata *chr, u32 speed, f32 distance, struct coord *pos);
u32 func0f04c784(void);
void func0f04c874(struct chrdata *chr, u32 flags, struct coord *pos, s32 arg3, s32 arg4);
u32 rebuildTeams(void);