summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-11-12 03:15:44 (EST)
committer P. J. McDermott <pjm@nac.net>2013-11-12 03:15:44 (EST)
commit3977091362bba66657aa1272081fd644403c6f34 (patch)
tree0fc4b055fe192a080b5ee3fc99101eb8ade8605e
parente9faad15e9c32eaa789c4a360710231b064223ec (diff)
downloadoverworld-rpg-3977091362bba66657aa1272081fd644403c6f34.zip
overworld-rpg-3977091362bba66657aa1272081fd644403c6f34.tar.gz
overworld-rpg-3977091362bba66657aa1272081fd644403c6f34.tar.bz2
src/main.c: Demo new map.
-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);