From: Christian Heller Date: Wed, 28 Aug 2013 22:17:34 +0000 (+0200) Subject: Moved config files into config/ directory. X-Git-Tag: tce~1012 X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/static/add_task?a=commitdiff_plain;h=e55ff0044903e9af87e24d01a809ce0a0c562633;p=plomrogue Moved config files into config/ directory. --- diff --git a/config/defs b/config/defs new file mode 100644 index 0000000..5761952 --- /dev/null +++ b/config/defs @@ -0,0 +1,5 @@ +1 m a 4 1 ANT +2 m z 5 3 ZOMBIE +3 m S 5 9 SHOGGOTH +4 i # DIRT +5 i % SKELETON diff --git a/config/keybindings b/config/keybindings new file mode 100644 index 0000000..6884e61 --- /dev/null +++ b/config/keybindings @@ -0,0 +1,29 @@ +81 quit +75 save keys +260 scroll pad left +261 scroll pad right +258 keys nav down +259 keys nav up +10 keys mod +265 toggle keys window +266 toggle map window +267 toggle info window +268 toggle log window +62 cycle forwards +60 cycle backwards +121 shift forwards +89 shift backwards +42 grow horizontally +95 shrink horizontally +43 grow vertically +45 shrink vertically +119 map up +120 map down +97 map left +100 map right +115 map center player +87 player up +88 player down +65 player left +68 player right +83 wait / next turn diff --git a/defs b/defs deleted file mode 100644 index 5761952..0000000 --- a/defs +++ /dev/null @@ -1,5 +0,0 @@ -1 m a 4 1 ANT -2 m z 5 3 ZOMBIE -3 m S 5 9 SHOGGOTH -4 i # DIRT -5 i % SKELETON diff --git a/keybindings b/keybindings deleted file mode 100644 index 6884e61..0000000 --- a/keybindings +++ /dev/null @@ -1,29 +0,0 @@ -81 quit -75 save keys -260 scroll pad left -261 scroll pad right -258 keys nav down -259 keys nav up -10 keys mod -265 toggle keys window -266 toggle map window -267 toggle info window -268 toggle log window -62 cycle forwards -60 cycle backwards -121 shift forwards -89 shift backwards -42 grow horizontally -95 shrink horizontally -43 grow vertically -45 shrink vertically -119 map up -120 map down -97 map left -100 map right -115 map center player -87 player up -88 player down -65 player left -68 player right -83 wait / next turn diff --git a/src/keybindings.c b/src/keybindings.c index 6fabea6..c318ec1 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -16,7 +16,7 @@ extern void init_keybindings(struct World * world) { - FILE * file = fopen("keybindings", "r"); + FILE * file = fopen("config/keybindings", "r"); uint16_t lines, linemax; textfile_sizes(file, &linemax, &lines); struct KeyBinding * keybindings = malloc(lines * sizeof(struct KeyBinding)); @@ -49,7 +49,7 @@ extern void save_keybindings(struct World * world) struct KeysWinData * keyswindata = (struct KeysWinData *) world->keyswindata; struct KeyBinding * keybindings = world->keybindings; - FILE * file = fopen("keybindings", "w"); + FILE * file = fopen("config/keybindings", "w"); uint16_t linemax = 0; uint16_t i; for (i = 0; i <= keyswindata->max; i++) diff --git a/src/main.c b/src/main.c index 247ec50..38e67b8 100644 --- a/src/main.c +++ b/src/main.c @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) world.player = &player; world.monster = 0; world.item = 0; - init_map_object_defs(&world, "defs"); + init_map_object_defs(&world, "config/defs"); /* For interactive mode, try to load world state from savefile. */ char * err_o = "Trouble loading game (fopen() in main()) / "