summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-02-17 01:56:08 (EST)
committer P. J. McDermott <pjm@nac.net>2013-02-17 01:56:08 (EST)
commit833b3d56704730776e528b89013e9419fd128eba (patch)
tree5d380665ce4f9d9147eeae164f2eec66b96960e4 /src/main.c
parent1a8f91467aad191721d57a9ad772f6700c029e1d (diff)
downloadoverworld-rpg-833b3d56704730776e528b89013e9419fd128eba.zip
overworld-rpg-833b3d56704730776e528b89013e9419fd128eba.tar.gz
overworld-rpg-833b3d56704730776e528b89013e9419fd128eba.tar.bz2
Allocate maps & tilesets before their start elems.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 5 insertions, 1 deletions
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);