![]() |
dsekai
World engine for retrocomputers.
|
Identifiers for objects that are unique among ALL TILEMAP objects and persistant between Engine Locking cycles. More...
Files | |
file | gid.h |
Contains macros and typedefs for globally unique identifiers. | |
Macros | |
#define | SPAWN_GID_PLAYER 0xffff |
Special case unique identifier for the spawner of the player-controlled MOBILE. | |
#define | MOBILE_GID_NONE 0 |
#define | MOBILE_GID_PLAYER 0xffffffff |
Special case unique identifier for the player-controlled MOBILE. | |
#define | MOBILE_MAP_GID_ALL 0xffff |
MOBILE::map_gid value indicating mobile is present on all tilemaps. | |
#define | MOBILE_GID_FMT "%04d:%04d" |
Insert into logging format strings when a mobile's Globally Unique Identifiers is needed. | |
#define | mobile_get_gid_fmt(m) |
Insert into the args provided to a format string using MOBILE_GID_FMT. | |
Typedefs | |
typedef uint32_t | MOBILE_GID |
Globally unique identifier for MOBILE objects. | |
typedef uint16_t | SPAWN_GID |
Globally unique identifier for TILEMAP_SPAWN objects. | |
typedef uint16_t | TILEMAP_GID |
Globally unique identifier for TILEMAP objects. | |
Identifiers for objects that are unique among ALL TILEMAP objects and persistant between Engine Locking cycles.
These should be used in cases longer than one unilayer_loop_iter(), as a MEMORY_PTR may be relocated in memory when unlocked and array indexes may change if the array is compacted.
|
Insert into the args provided to a format string using MOBILE_GID_FMT.
m | Locked MEMORY_PTR to the mobile to examine. |
|
MOBILE::map_gid value indicating mobile is present on all tilemaps.
This is generally only used for the player.
#define SPAWN_GID_PLAYER 0xffff |
Special case unique identifier for the spawner of the player-controlled MOBILE.
This should exist only on one tilemap (the first tilemap loaded in a new world).