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, shop_internal.h and system_flags.c.
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. |
Functions
| Name | Description | |
|---|---|---|
Uint32 | syGameFlagSetByte (Uint32 flag, Uint8 value) | Sets the whole byte flags is in. |
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.
Referenced by gmFlagBitsTest(), syGameFlagClear(), syGameFlagDecrementByte(), syGameFlagGet(), syGameFlagGetByte(), syGameFlagGetNibble(), syGameFlagIncrementByte(), syGameFlagSet(), syGameFlagSetByte(), syGameFlagSetNibble() and syGameFlagToggle().
Definition at line 14 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 syGameFlagClear(), syGameFlagSet() and syGameFlagToggle().
Definition at line 17 of file game_flags.h.