#include <string.h>
#include <jansson.h>
#include "log.h"
#include "tileset.h"
#include "tmj.h"
Go to the source code of this file.
◆ unpack_properties()
Property* unpack_properties |
( |
json_t * |
properties | ) |
|
Definition at line 13 of file map.c.
◆ unpack_points()
Point* unpack_points |
( |
json_t * |
points | ) |
|
Unpacks an array of points.
The returned array must be freed by the caller.
Definition at line 155 of file map.c.
◆ unpack_text()
Text* unpack_text |
( |
json_t * |
text | ) |
|
Unpacks a text object.
The returned object must be freed by the caller.
Definition at line 199 of file map.c.
◆ unpack_objects()
Object* unpack_objects |
( |
json_t * |
objects | ) |
|
◆ free_objects()
void free_objects |
( |
Object * |
objects, |
|
|
size_t |
object_count |
|
) |
| |
Helper function to free Objects.
May cause undefined behavior if the objects were modified by the caller of map_load().
Definition at line 423 of file map.c.
◆ unpack_chunks()
Chunk* unpack_chunks |
( |
json_t * |
chunks | ) |
|
◆ free_chunks()
void free_chunks |
( |
Chunk * |
chunks, |
|
|
size_t |
chunk_count |
|
) |
| |
◆ unpack_layers()
Layer* unpack_layers |
( |
json_t * |
layers | ) |
|
Loads map layers recursively.
Definition at line 556 of file map.c.
◆ layers_free()
void layers_free |
( |
Layer * |
layers, |
|
|
size_t |
layer_count |
|
) |
| |
Helper function for freeing layer tree associated with a map.
May result in undefined behavior if the layer objects were modified by the caller of map_load().
Definition at line 874 of file map.c.
◆ map_load_json()
Map* map_load_json |
( |
json_t * |
root, |
|
|
const char * |
path |
|
) |
| |