#define a (1LL << 0)
#define b (1LL << 1)
#define c (1LL << 2)
typedef uint64_t bitset_t;
/* or */
typedef unsigned long long bitset_t;
struct {
dark : 1;
damp: 1;
deep: 1;
depressing: 1;
/* Add 712 more down here */
} room_bits;
/* helper macros */
#define BIT_INDEX(b) ((b) / 8)
#define BIT_REMAINDER(b) (1 << ((b) % 8))
/* declare a new bit array; c is max number of bits, n is name of array */
#define BIT_ARRAY(c, n) char n[BIT_INDEX(c - 1)] + 1]
/* check or change bits in a bit array; a is bit array to use, b is bit number to check */
#define IS_BIT(a, b) ((a)[BIT_INDEX(b)] & BIT_REMAINDER(b))
#define SET_BIT(a, b) ((a)[BIT_INDEX(b)] |= BIT_REMAINDER(b))
#define CLEAR_BIT(a, b) ((a)[BIT_INDEX(b)] &= ~BIT_REMAINDER(b))
I'm using Rom2.4b6 and as a small fix to add one more available bit, I added ff by doubling ee and marking it unsigned
but that only gives me one more usable bit….so are there any better methods known or available to have more usable bits?
I know I could probably add a new set of variable defines for trigs and give them another line in the area files, which I'm thinking I may have to do but just curious if anyone knows of any other quicker/efficient methods?