From 3977091362bba66657aa1272081fd644403c6f34 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 12 Nov 2013 03:15:44 -0500 Subject: src/main.c: Demo new map. --- diff --git a/src/main.c b/src/main.c index 764f9b0..219a88f 100644 --- a/src/main.c +++ b/src/main.c @@ -91,9 +91,9 @@ main(void) init(); vp = init_viewport(320, 240, 8); - map = map_get(MAPSDIR "/forest1-8bit.tmx"); + map = map_get(MAPSDIR "/db16-route.tmx"); if (map == NULL) { - map = map_get("data/maps/forest1-8bit.tmx"); + map = map_get("data/maps/db16-route.tmx"); } if (map == NULL) { err(1, "Where's the map, George?"); @@ -123,24 +123,28 @@ main(void) SDL_Palette *pal_start, *pal_end; pal = malloc(sizeof(*pal)); - pal->colors = calloc(59, sizeof(*pal->colors)); - pal->ncolors = 59; + pal->colors = calloc(64, sizeof(*pal->colors)); + pal->ncolors = 64; i = 0; i_max = 720; start = SDL_GetTicks(); - x = 19 * map->tilewidth ; - y = 38 * map->tileheight; - for (; y > 34 * map->tileheight; y -= 1) DEMO(); /* Up */ - for (; x < 23 * map->tilewidth ; x += 1) DEMO(); /* Right */ - for (; y > 16 * map->tileheight; y -= 1) DEMO(); /* Up */ - for (; x > 15 * map->tilewidth ; x -= 1) DEMO(); /* Left */ - for (; y < 25 * map->tileheight; y += 1) DEMO(); /* Down */ - for (; x > 4 * map->tilewidth ; x -= 1) DEMO(); /* Left */ - for (; y > 18 * map->tileheight; y -= 1) DEMO(); /* Up */ - for (; x < 9 * map->tilewidth ; x += 1) DEMO(); /* Right */ + x = 9 * map->tilewidth ; + y = 58 * map->tileheight; + for (; y > 50 * map->tileheight; y -= 1) DEMO(); /* Up */ + for (; x < 12 * map->tilewidth ; x += 1) DEMO(); /* Right */ + for (; y > 43 * map->tileheight; y -= 1) DEMO(); /* Up */ + for (; x > 5 * map->tilewidth ; x -= 1) DEMO(); /* Left */ + for (; y > 32 * map->tileheight; y -= 1) DEMO(); /* Up */ + for (; x < 10 * map->tilewidth ; x += 1) DEMO(); /* Right */ + for (; y > 29 * map->tileheight; y -= 1) DEMO(); /* Up */ + for (; x < 16 * map->tilewidth ; x += 1) DEMO(); /* Right */ + for (; y < 34 * map->tileheight; y += 1) DEMO(); /* Down */ + for (; x < 24 * map->tilewidth ; x += 1) DEMO(); /* Right */ + for (; y > 15 * map->tileheight; y -= 1) DEMO(); /* Up */ + for (; x > 11 * map->tilewidth ; x -= 1) DEMO(); /* Left */ for (; y > 5 * map->tileheight; y -= 1) DEMO(); /* Up */ - for (; x < 15 * map->tilewidth ; x += 1) DEMO(); /* Right */ + for (; x < 17 * map->tilewidth ; x += 1) DEMO(); /* Right */ for (; y > 1 * map->tileheight; y -= 1) DEMO(); /* Up */ end = SDL_GetTicks(); debug("Rendered %d frames in %d milliseconds", i, end - start); -- cgit v0.9.1