Document eventChkInf usage of freed carpenters flags (#1210)

* Document `eventChkInf` usage of freed carpenters flags

* +`()`
This commit is contained in:
Dragorn421
2022-05-20 19:54:47 +02:00
committed by GitHub
parent 0e51a51fb1
commit d7bbe43ba7
9 changed files with 36 additions and 53 deletions
+12 -13
View File
@@ -338,19 +338,18 @@ typedef enum {
#define EVENTCHKINF_8F 0x8F
// 0x90-0x93
#define EVENTCHKINF_90_91_92_93_INDEX 9
#define EVENTCHKINF_90_SHIFT 0
#define EVENTCHKINF_91_SHIFT 1
#define EVENTCHKINF_92_SHIFT 2
#define EVENTCHKINF_93_SHIFT 3
#define EVENTCHKINF_90_MASK (1 << EVENTCHKINF_90_SHIFT)
#define EVENTCHKINF_91_MASK (1 << EVENTCHKINF_91_SHIFT)
#define EVENTCHKINF_92_MASK (1 << EVENTCHKINF_92_SHIFT)
#define EVENTCHKINF_93_MASK (1 << EVENTCHKINF_93_SHIFT)
#define EVENTCHKINF_90 ((EVENTCHKINF_90_91_92_93_INDEX << 4) | EVENTCHKINF_90_SHIFT)
#define EVENTCHKINF_91 ((EVENTCHKINF_90_91_92_93_INDEX << 4) | EVENTCHKINF_91_SHIFT)
#define EVENTCHKINF_92 ((EVENTCHKINF_90_91_92_93_INDEX << 4) | EVENTCHKINF_92_SHIFT)
#define EVENTCHKINF_93 ((EVENTCHKINF_90_91_92_93_INDEX << 4) | EVENTCHKINF_93_SHIFT)
// carpenters freed from the gerudo
#define EVENTCHKINF_CARPENTERS_FREE_INDEX 9
#define EVENTCHKINF_CARPENTERS_FREE_SHIFT(n) (0 + (n))
#define EVENTCHKINF_CARPENTERS_FREE_MASK(n) (1 << EVENTCHKINF_CARPENTERS_FREE_SHIFT(n))
#define EVENTCHKINF_CARPENTERS_FREE(n) ((EVENTCHKINF_CARPENTERS_FREE_INDEX << 4) | EVENTCHKINF_CARPENTERS_FREE_SHIFT(n))
#define EVENTCHKINF_CARPENTERS_FREE_MASK_ALL (\
EVENTCHKINF_CARPENTERS_FREE_MASK(0) \
| EVENTCHKINF_CARPENTERS_FREE_MASK(1) \
| EVENTCHKINF_CARPENTERS_FREE_MASK(2) \
| EVENTCHKINF_CARPENTERS_FREE_MASK(3) )
#define GET_EVENTCHKINF_CARPENTERS_FREE_ALL() \
CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX], EVENTCHKINF_CARPENTERS_FREE_MASK_ALL)
#define EVENTCHKINF_94 0x94
#define EVENTCHKINF_95 0x95