|
LibTMJ 2.0.0
A library for loading JSON Tiled maps
|
The libtmj API. More...
#include <stdbool.h>#include <stdint.h>#include <jansson.h>

Go to the source code of this file.
Enumerations | |
| enum | TMJ_LOG_PRIORITY { TMJ_LOG_DEBUG , TMJ_LOG_INFO , TMJ_LOG_WARNING , TMJ_LOG_ERR , TMJ_LOG_CRIT } |
Functions | |
| Map * | tmj_map_loadf (const char *path, bool check_extension) |
| Loads the Tiled map from the file at the given path. | |
| Map * | tmj_map_load (const char *map, const char *name) |
| Loads the Tiled map from the given JSON object string. | |
| Tileset * | tmj_tileset_loadf (const char *path, bool check_extension) |
| Loads the Tiled tileset at the given path. | |
| Tileset * | tmj_tileset_load (const char *tileset) |
| Loads the Tiled tileset from the given JSON object string. | |
| void | tmj_map_free (Map *map) |
| Frees the memory associated with the given map. | |
| void | tmj_tileset_free (Tileset *tileset) |
| Frees the memory associated with the given tileset. | |
| void | tmj_log_regcb (bool debug, void(*callback)(tmj_log_priority, const char *)) |
| Registers a callback function to handle logging events. | |
| uint32_t * | tmj_decode_layer (const char *data, const char *encoding, const char *compression, size_t *size) |
| Decodes layer data from a Tiled map layer. | |
Variables | |
| const unsigned int | TMJ_VERSION_MAJOR |
| The library major version. | |
| const unsigned int | TMJ_VERSION_MINOR |
| The library minor version. | |
| const unsigned int | TMJ_VERSION_PATCH |
| The library patch version. | |
| const char *const | TMJ_VERSION |
| The full library version. | |
The libtmj API.
The structures returned by the functions defined in this interface are not meant to be modified by the user. Use only the provided functions to do so.
Definition in file tmj.h.
| typedef struct Property Property |
| typedef struct Chunk Chunk |
| typedef struct Point Point |
| typedef struct Text Text |
| typedef struct Object Object |
| typedef struct Layer Layer |
| typedef struct Transformations Transformations |
| typedef struct Terrain Terrain |
| typedef struct Frame Frame |
| typedef struct Tile Tile |
| typedef struct WangTile WangTile |
| typedef struct WangColor WangColor |
| typedef struct WangSet WangSet |
| typedef struct Grid Grid |
| typedef struct TileOffset TileOffset |
| typedef struct Tileset Tileset |
https://doc.mapeditor.org/en/stable/reference/json-map-format/#tileset
Note that for sheets, tiles are numbered left-to-right, top-to-bottom
| typedef struct Map Map |
| typedef struct ObjectTemplate ObjectTemplate |