LibTMJ
1.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. More... | |
Map * | tmj_map_load (const char *map, const char *name) |
Loads the Tiled map from the given JSON object string. More... | |
Tileset * | tmj_tileset_loadf (const char *path, bool check_extension) |
Loads the Tiled tileset at the given path. More... | |
Tileset * | tmj_tileset_load (const char *tileset) |
Loads the Tiled tileset from the given JSON object string. More... | |
void | tmj_map_free (Map *map) |
Frees the memory associated with the given map. More... | |
void | tmj_tileset_free (Tileset *tileset) |
Frees the memory associated with the given tileset. More... | |
void | tmj_log_regcb (bool debug, void(*callback)(tmj_log_priority, const char *)) |
Registers a callback function to handle logging events. More... | |
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. More... | |
Variables | |
const unsigned int | TMJ_VERSION_MAJOR |
** More... | |
const unsigned int | TMJ_VERSION_MINOR |
The library minor version. More... | |
const unsigned int | TMJ_VERSION_PATCH |
The library patch version. More... | |
const char *const | TMJ_VERSION |
The full library version. More... | |
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 Transformations Transformations |
typedef struct TileOffset TileOffset |
https://doc.mapeditor.org/en/stable/reference/json-map-format/#tileset
Note that for sheets, tiles are numbered left-to-right, top-to-bottom