From 833b3d56704730776e528b89013e9419fd128eba Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 17 Feb 2013 01:56:08 -0500 Subject: Allocate maps & tilesets before their start elems. --- (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index c867f65..0727d5b 100644 --- a/src/main.c +++ b/src/main.c @@ -9,12 +9,16 @@ main(void) { struct map *map; struct image *img; + struct tileset *ts; SDL_Rect imgrect, surfacerect; init(); map = map_get("data/forest1.simple.tmx"); - printf("Map dimensions: %dx%d\n", map->width, map->height); + debug("Map dimensions: %dx%d", map->width, map->height); + for (ts = map->tilesets_head; ts != NULL; ts = ts->next) { + debug("Tilesheet name: %s", ts->name); + } img = img_png_get("../forest-6-layer-test_ground.png"); img_png_free(img); -- cgit v0.9.1