|
Scarab
A thin, game-agnostic 2D engine host built on the sunlight tile-map engine
|
Namespaces | |
| namespace | Lua |
Classes | |
| class | IRendererProvider |
| Where the Lua bridge gets the renderer from. More... | |
| class | SpritePool |
| Generic, game-agnostic fixed-capacity sprite pool. Sprite types are registered up-front with a fixed capacity (. More... | |
Typedefs | |
| typedef uint32_t | SpriteHandle |
| Opaque handle to a sprite pool slot. Packs a slot index (low 16 bits, 1-based so 0 stays reserved for "invalid") and a generation counter (high 16 bits) that's bumped every time a slot is released, so a stale handle referencing an already-recycled slot fails to resolve instead of silently addressing the wrong sprite. | |
Functions | |
| SpriteHandle | MakeSpriteHandle (uint32_t nIndex, uint16_t nGeneration) |
| int32_t | SpriteHandleIndex (SpriteHandle handle) |
| uint16_t | SpriteHandleGeneration (SpriteHandle handle) |
| void * | PackSpriteHandleAsPtr (SpriteHandle handle) |
| bool | IsPackedSpriteHandle (void *pPtr) |
| SpriteHandle | UnpackSpriteHandleFromPtr (void *pPtr) |
Variables | |
| const SpriteHandle | INVALID_SPRITE_HANDLE = 0 |
| const uintptr_t | SPRITE_HANDLE_PTR_TAG = 0xDEADBEEF00000000ULL |
| typedef uint32_t Scarab::Engine::SpriteHandle |
Opaque handle to a sprite pool slot. Packs a slot index (low 16 bits, 1-based so 0 stays reserved for "invalid") and a generation counter (high 16 bits) that's bumped every time a slot is released, so a stale handle referencing an already-recycled slot fails to resolve instead of silently addressing the wrong sprite.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| const SpriteHandle Scarab::Engine::INVALID_SPRITE_HANDLE = 0 |
| const uintptr_t Scarab::Engine::SPRITE_HANDLE_PTR_TAG = 0xDEADBEEF00000000ULL |