From: Alan Cox Date: Sun, 1 Jul 2018 18:47:43 +0000 (+0100) Subject: cave: use full path to database and relocate into games X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=51878ccaaf9cc69da8a8ed4d354e5eedf7625d78;p=FUZIX.git cave: use full path to database and relocate into games --- diff --git a/Applications/cave/advent.h b/Applications/cave/advent.h index 828786c4..c0cf7eac 100644 --- a/Applications/cave/advent.h +++ b/Applications/cave/advent.h @@ -15,6 +15,8 @@ #include #include +#define ADVDB_PATH "/usr/games/lib/advent.db" + #define NUL '\0' #define MAXDIM(a) (sizeof(a) / sizeof(a[0])) diff --git a/Applications/cave/database.c b/Applications/cave/database.c index e095830b..8b97b248 100644 --- a/Applications/cave/database.c +++ b/Applications/cave/database.c @@ -26,7 +26,7 @@ static void dbstring(uint16_t * off) void db_init(void) { - db_fd = open("advent.db", O_RDONLY); + db_fd = open(ADVDB_PATH, O_RDONLY); if (db_fd == -1) { perror("advent.db"); exit(1); diff --git a/Applications/cave/fuzix-cave.pkg b/Applications/cave/fuzix-cave.pkg index ee3dcd5a..a494138b 100644 --- a/Applications/cave/fuzix-cave.pkg +++ b/Applications/cave/fuzix-cave.pkg @@ -1,5 +1,5 @@ package adventure if-file advent -f 0755 /usr/bin/advent advent -f 0644 /usr/bin/advent.db advent.db +f 0755 /usr/games/advent advent +f 0644 /usr/games/advent.db advent.db