Improve documentation for CHR_P1P2 features

This commit is contained in:
Ryan Dwyer
2019-12-17 17:12:22 +10:00
parent 452d86aec3
commit 9fbd4a8732
27 changed files with 427 additions and 413 deletions
+13 -1
View File
@@ -1770,7 +1770,14 @@
mkshort(0x01b2), \
value,
#define consider_coop_for_p1p2_chr(chr) \
/**
* Toggle which player (Bond or Coop) is referenced by the chr's CHR_P1P2
* identifier. This should be called inside a loop to give the illusion of
* referencing both players.
*
* This is safe to use in solo mode; it will not set it to coop if they don't exist.
*/
#define chr_toggle_p1p2(chr) \
mkshort(0x01b3), \
chr,
@@ -1778,6 +1785,11 @@
mkshort(0x01b4), \
label,
#define chr_set_p1p2(chr, p1p2_chr) \
mkshort(0x01b5), \
chr, \
p1p2_chr,
#define enable_snow(bool) \
mkshort(0x01b6), \
bool,
+12 -10
View File
@@ -82,16 +82,18 @@
#define CHANNEL_9 9
#define CHANNEL_10 10
#define CHR_P1P2 0xf2
#define CHR_F3 0xf3
#define CHR_ANTI 0xf4
#define CHR_COOP 0xf5
#define CHR_TARGET 0xf6
#define CHR_BOND 0xf8
#define CHR_CLONE 0xf9
#define CHR_SEEDIE 0xfb
#define CHR_PRESET 0xfc
#define CHR_SELF 0xfd
#define CHR_P1P2_OPPOSITE 0xf1
#define CHR_P1P2 0xf2
#define CHR_ANY 0xf3 // Only supported by if_chr_activated_object command
#define CHR_ANTI 0xf4
#define CHR_COOP 0xf5
#define CHR_TARGET 0xf6
#define CHR_BOND 0xf8
#define CHR_CLONE 0xf9
#define CHR_SEESHOT 0xfa
#define CHR_SEEDIE 0xfb
#define CHR_PRESET 0xfc
#define CHR_SELF 0xfd
// Character flags - bank 0 (chr struct offset 0x114 - chr->flags)
#define CHRFLAG0_CANT_ALERT_GROUP 0x00000001 // Don't set group alertness when becoming aware
+1 -1
View File
@@ -400,7 +400,7 @@
/*0x01b2*/ bool ai01b2(void);
/*0x01b3*/ bool aiToggleP1P2(void);
/*0x01b4*/ bool ai01b4(void);
/*0x01b5*/ bool ai01b5(void);
/*0x01b5*/ bool aiChrSetP1P2(void);
/*0x01b6*/ bool aiConfigureSnow(void);
/*0x01b7*/ bool aiChrSetCloaked(void);
/*0x01b8*/ bool aiSetAutogunType(void);