diff --git a/include/akgl/tilemap.h b/include/akgl/tilemap.h index 07ae5e3..79f6535 100644 --- a/include/akgl/tilemap.h +++ b/include/akgl/tilemap.h @@ -70,7 +70,7 @@ #define AKGL_TILEMAP_LAYER_TYPE_IMAGE 3 /** @brief One object placed in a Tiled object layer. */ -typedef struct { +typedef struct akgl_TilemapObject { float32_t x; /**< Position in map pixels, from the Tiled object. Copied onto the actor it spawns. */ float32_t y; /**< Position in map pixels. */ int gid; /**< Global tile id, for a tile object. Not read by the loader. */ @@ -85,7 +85,7 @@ typedef struct { } akgl_TilemapObject; /** @brief One layer of a tilemap: a tile grid, an image, or a group of objects. */ -typedef struct { +typedef struct akgl_TilemapLayer { short type; /**< Which of the `AKGL_TILEMAP_LAYER_TYPE_*` kinds this is; decides which of the members below mean anything. */ float32_t opacity; /**< 0.0 to 1.0, from Tiled. Recorded but not yet applied at draw time. */ bool visible; /**< From Tiled. Recorded but not yet consulted at draw time. */ @@ -100,7 +100,7 @@ typedef struct { } akgl_TilemapLayer; /** @brief One tileset: an image cut into a grid, plus the lookup table that finds a tile in it. */ -typedef struct { +typedef struct akgl_Tileset { int columns; /**< Tiles per row in the image. What turns a linear tile id into a row and column. */ int firstgid; /**< Global id of this tileset's first tile. Subtracting it from a map cell gives the local tile id. */ char imagefilename[AKGL_TILEMAP_MAX_TILESET_FILENAME_SIZE]; /**< Resolved absolute path to the image, from the map file's directory. */ @@ -131,7 +131,7 @@ typedef struct { } akgl_Tileset; /** @brief Represents a complete tilemap and its optional physics backend. */ -typedef struct { +typedef struct akgl_Tilemap { int tilewidth; /**< Width of one map cell in pixels. Tiles from a tileset with a different tile size are not rescaled. */ int tileheight; /**< Height of one map cell in pixels. */ int width; /**< Map width in tiles. */