From 9ae8702bee401953c627f628b23e4586c805e17a Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Tue, 18 Nov 2008 22:30:43 +0000 Subject: [PATCH] Renamed levels.dat to map.dat --- data/{levels.dat => map.dat} | 0 defs.h | 5 +++++ edit.c | 2 +- rc.c | 2 +- shared.c | 8 ++++---- 5 files changed, 11 insertions(+), 6 deletions(-) rename data/{levels.dat => map.dat} (100%) diff --git a/data/levels.dat b/data/map.dat similarity index 100% rename from data/levels.dat rename to data/map.dat diff --git a/defs.h b/defs.h index bff54a1..e6d3bf6 100644 --- a/defs.h +++ b/defs.h @@ -3,6 +3,11 @@ #include + +/* files */ +#define FILE_LEVELMAP "map.dat" + + /* Macros */ //#define OPENGL diff --git a/edit.c b/edit.c index 4079043..0dddcf5 100644 --- a/edit.c +++ b/edit.c @@ -114,7 +114,7 @@ int main (int argc, char **argv) { if (loadlevellist()) { - printf("Error loading level list from levels.dat.\n"); + printf("Error loading level list from %s.\n", FILE_LEVELMAP); return 1; } diff --git a/rc.c b/rc.c index 1480086..b4d2c5a 100644 --- a/rc.c +++ b/rc.c @@ -272,7 +272,7 @@ int main (int argc, char **argv) { } if (loadlevellist()) { - printf("Error loading level list from levels.dat.\n"); + printf("Error loading level list from %s.\n",FILE_LEVELMAP); return 1; } diff --git a/shared.c b/shared.c index 2987fb3..6334e96 100644 --- a/shared.c +++ b/shared.c @@ -2941,10 +2941,10 @@ int savelevellist(void) { char filename[BUFLEN]; FILE *f; int i; - sprintf(filename, "%s/levels.dat",datadir); + sprintf(filename, "%s/%s",datadir,FILE_LEVELMAP); f = fopen(filename,"w"); if (!f) { - printf("error writing to levels.dat\n"); + printf("error writing to %s\n",FILE_LEVELMAP); return B_FALSE; } @@ -2964,10 +2964,10 @@ int loadlevellist(void) { char buf[BUFLEN]; char *p; - sprintf(filename, "%s/levels.dat",datadir); + sprintf(filename, "%s/%s",datadir, FILE_LEVELMAP); f = fopen(filename,"r"); if (!f) { - printf("Error opening levels data file\n"); + printf("Error opening %s\n",FILE_LEVELMAP); exit(1); } // format is: