diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 34 |
1 files changed, 19 insertions, 15 deletions
@@ -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); |