-
Notifications
You must be signed in to change notification settings - Fork 3
darnit_map.h
slaeshjag edited this page Mar 24, 2013
·
16 revisions
This type points to an array of key-value propery pairs.
- const char *d_map_prop(DARNIT_MAP_REF, const char *key);
typedef struct {
unsigned int x;
unsigned int y;
unsigned int l;
DARNIT_MAP_REF *ref;
} DARNIT_MAP_OBJECT;- x - The X-coordinate for the object in tiles
- y - The Y-coordinate for the object in tiles
- l - Index of the layer to place the object on
- ref - The list of properties for the object (see DARNIT_MAP_REF).
typedef struct {
DARNIT_TILEMAP *tilemap;
DARNIT_TILESHEET *ts;
DARNIT_MAP_REF *ref;
unsigned int offset_x;
unsigned int offset_y;
unsigned int tile_w;
unsigned int tile_h;
} DARNIT_MAP_LAYER;- DARNIT_TILEMAP tilemap - The tilemap for this layer
- DARNIT_TILESHEET ts - The tilesheet used to draw the tilemap for this layer
- DARNIT_MAP_REF ref - The list of properties for this layer
- offset_x - For othogonal maps, this is the amount to offset the rendering of the map with, on the X axis.
- offset_y - For orthogonal maps, this is the amount to offset the rendering of the map with, on the Y axis.
- tile_w - The width of a tile
- tile_h - The height of a tile
typedef struct {
DARNIT_MAP_LAYER *layer;
const unsigned int layers;
DARNIT_MAP_OBJECT *object;
const unsigned int objects;
DARNIT_MAP_REF *prop;
DARNIT_MAP_STRINGDATA *stringdata;
DARNIT_MAP_REF *stringrefs;
const int cam_x;
const int cam_y;
unsigned int isometric;
} DARNIT_MAP;