Improve documentation for chr_move_to_pad

This commit is contained in:
Ryan Dwyer
2020-02-09 23:40:03 +10:00
parent d4e1e6ddbf
commit 3342d28a66
6 changed files with 20 additions and 14 deletions
+14 -7
View File
@@ -1975,19 +1975,26 @@
/**
* Attempt to move the chr to the given pad. The chr is moved immediately.
* If successful, the label will be followed.
*
* For an immersive gameplay experience, do not do this while the chr is on
* screen.
* If the pad is occupied then a reasonable attempt will be made to place the
* chr near it. This attempt may fail if the pad is occupied by several chrs.
*
* If 88 is passed as the unknown argument then the pad number will be
* interpreted as a chr number and the chr will be moved to the other chr
* instead. This is likely a temporary hack used for debug purposes.
* If allowonscreen is FALSE, the chr will not be moved if the pad is on screen.
*
* If allowonscreen is TRUE, the chr will be moved even if the pad is on screen.
* This may cause them to appear out of nowhere.
*
* If allowonscreen is 88 then the pad number will be interpreted as a chr
* number and the chr will be moved to the other chr instead. This is likely a
* hack used for debugging purposes. When using this value, the chr will not be
* moved if the destination chr is on screen.
*/
#define chr_move_to_pad(chr, pad, unknown, label) \
#define chr_move_to_pad(chr, pad, allowonscreen, label) \
mkshort(0x00e2), \
chr, \
mkshort(pad), \
unknown, \
allowonscreen, \
label,
#define cmd00e3(chr) \
+1 -1
View File
@@ -389,7 +389,7 @@ bool chrSpawnAtCoord(s32 body, s32 head, struct coord *pos, s16 *room, f32 arg4,
bool chrSpawnAtPad(struct chrdata *chr, s32 body, s32 head, s32 pad, u8 *ailist, u32 flags);
bool chrSpawnAtChr(struct chrdata *basechr, s32 body, s32 head, u32 chrnum, u8 *ailist, u32 flags);
u32 func0f04b658(struct chrdata *chr);
s32 func0f04b748(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3, s32 arg4);
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);
u32 func0f04bffc(struct chrdata *chr, u32 arg1, u32 arg2);