Functions and structures for working with tilemaps/grids.
More...
|
#define | RETROTILE_NAME_SZ_MAX 10 |
| Maximum number of chars in a RETROTILE::name.
|
|
#define | RETROTILE_TILESET_IMAGE_STR_SZ_MAX 48 |
| Maximum number of chars in a RETROTILE_TILE_DEF::image_path.
|
|
#define | RETROTILE_TILE_SCALE_DEFAULT 1.0f |
| Default value for RETROTILE::tile_scale.
|
|
#define | RETROTILE_TRACE_LVL 0 |
| If defined, bring debug printf statements up to this level.
|
|
#define | RETROTILE_VORONOI_DEFAULT_SPB 8 |
|
#define | RETROTILE_VORONOI_DEFAULT_DRIFT 4 |
|
#define | retrotile_mstate_name(state) |
|
#define | retrotile_get_tile(tilemap, layer, x, y) |
|
#define | retrotile_set_tile(tilemap, layer, x, y, new_val) |
|
#define | retrotile_get_tiles_p(layer) |
|
#define | retrotile_clear_tiles(t, layer) |
|
Functions and structures for working with tilemaps/grids.
◆ retrotile_clear_tiles
#define retrotile_clear_tiles |
( |
| t, |
|
|
| layer ) |
Value: memset( retrotile_get_tiles_p( layer ), -1, \
t->tiles_w * t->tiles_h * sizeof( retroflat_tile_t ) )
◆ retrotile_get_tile
#define retrotile_get_tile |
( |
| tilemap, |
|
|
| layer, |
|
|
| x, |
|
|
| y ) |
Value: (retrotile_get_tiles_p( layer )[((y) * (tilemap)->tiles_w) + (x)])
◆ retrotile_get_tiles_p
#define retrotile_get_tiles_p |
( |
| layer | ) |
|
Value: ((retroflat_tile_t*)(((uint8_t*)(layer)) + \
◆ retrotile_mstate_name
#define retrotile_mstate_name |
( |
| state | ) |
|
◆ retrotile_set_tile
#define retrotile_set_tile |
( |
| tilemap, |
|
|
| layer, |
|
|
| x, |
|
|
| y, |
|
|
| new_val ) |
Value: (retrotile_get_tiles_p( layer )[((y) * (tilemap)->tiles_w) + (x)])