maug
Quick and dirty C mini-augmentation library.
Loading...
Searching...
No Matches
RetroTile API

Functions and structures for working with tilemaps/grids. More...

Collaboration diagram for RetroTile API:

Topics

 RetroTile Tile Definitions
 
 RetroTile Parser
 
 RetroTile Generators
 Tools for procedurally generating tilemaps.
 

Data Structures

struct  RETROTILE_LAYER
 
struct  RETROTILE
 
struct  RETROTILE_DATA_DS
 Internal data structure used by retrotile_gen_diamond_square_iter(). More...
 
struct  RETROTILE_DATA_BORDER
 

Macros

#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)
 

Detailed Description

Functions and structures for working with tilemaps/grids.

Macro Definition Documentation

◆ 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)) + \
sizeof( struct RETROTILE_LAYER )))
Definition retrotil.h:92

◆ retrotile_mstate_name

#define retrotile_mstate_name ( state)
Value:
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)])