#include <cute_tiled.h>
#include <stdio.h>

int main() {
    cute_tiled_tileset_t *tileset = cute_tiled_load_external_tileset("test.json", NULL);

    cute_tiled_tile_descriptor_t *tile = tileset->tiles;

    printf("Tileset name: %p %s\n", tileset->name.ptr, tileset->name.ptr);
    while (tile) {
        cute_tiled_layer_t *layer = tile->objectgroup;
        cute_tiled_object_t *object = layer->objects;

        while (object) {
            printf("[%p]: ellipse:%d x:%2.f y:%2.f w:%2.f h:%2.f\n",
                   object->name.ptr, object->ellipse,
                   object->x, object->y, object->width, object->height);

            object = object->next;
        }

        tile = tile->next;
    }

    cute_tiled_free_external_tileset(tileset);
}