include/game/game_flags.h
The game flags' size, and the byte and bit of GameFlagBytes that hold a flag.
Included by game_internal.h.
Macros
| Name | Description | |
|---|---|---|
#define | GAME_FLAG_COUNT 4096 | How many game flags GameFlagBytes holds, eight to a byte. |
#define | GAME_FLAG_BYTE (flag) (((Uint32)(flag) << 20) >> 23) | The byte of GameFlagBytes that holds flag: bits 3 to 11 of its number, isolated by shifting up and back down, which is how the game computes it. |
#define | GAME_FLAG_BIT (flag) (1 << ((flag) & 7)) | The bit of its byte that holds flag: the low three bits of its number. |
Description
The game flags' size, and the byte and bit of GameFlagBytes that hold a flag.
Macros in detail
GAME_FLAG_COUNT
#define GAME_FLAG_COUNT 4096
How many game flags GameFlagBytes holds, eight to a byte.
Referenced by gmMainRoutineStateInitDefaults().
Definition at line 10 of file game_flags.h.
GAME_FLAG_BYTE
#define GAME_FLAG_BYTE(flag) (((Uint32)(flag) << 20) >> 23)
The byte of GameFlagBytes that holds flag: bits 3 to 11 of its number,
isolated by shifting up and back down, which is how the game computes it. A
number past 4,095 wraps onto a lower flag rather than reaching the memory
after GameFlagBytes.
Referenced by gmFlagClear(), gmFlagDecrementByte(), gmFlagGet(), gmFlagGetByte(), gmFlagGetNibble(), gmFlagIncrementByte(), gmFlagSet(), gmFlagSetByte(), gmFlagSetNibble() and gmFlagToggle().
Definition at line 16 of file game_flags.h.
GAME_FLAG_BIT
#define GAME_FLAG_BIT(flag) (1 << ((flag) & 7))
The bit of its byte that holds flag: the low three bits of its number.
Referenced by gmFlagClear(), gmFlagGet(), gmFlagSet() and gmFlagToggle().
Definition at line 19 of file game_flags.h.