summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-02-20 08:06:55 (EST)
committer P. J. McDermott <pjm@nac.net>2013-02-20 08:06:55 (EST)
commit2b13c1516e85060dc9cf4fd68fafa7459eee73fc (patch)
tree5b22bdfef91204b93b7db45f350bb8cfff0724f6 /src
parent4c79651326eeabc2a53534a3b8b1b5aff885dd5a (diff)
downloadoverworld-rpg-2b13c1516e85060dc9cf4fd68fafa7459eee73fc.zip
overworld-rpg-2b13c1516e85060dc9cf4fd68fafa7459eee73fc.tar.gz
overworld-rpg-2b13c1516e85060dc9cf4fd68fafa7459eee73fc.tar.bz2
Define installation directory preprocessor macros.
Diffstat (limited to 'src')
-rw-r--r--src/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 8c5463e..3f20335 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,7 +31,13 @@ main(void)
init();
vp = init_viewport(240, 160, 8);
- map = map_get("data/maps/forest1-8bit.tmx");
+ map = map_get(MAPSDIR "/forest1-8bit.tmx");
+ if (map == NULL) {
+ map = map_get("data/maps/forest1-8bit.tmx");
+ }
+ if (map == NULL) {
+ err(1, "Where's the map, George?");
+ }
a = area_new(map);
for (i = 0; i < 256; ++i) {