summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.c34
1 files changed, 19 insertions, 15 deletions
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);