X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain.c;h=f2409758bf13183103d73686575b5868a77729d6;hb=951248dddace9f7cadcf30700a3c3e6ad7ae2888;hp=247ec507173c9af85e02d6549926f08e3d5b6db4;hpb=24a8edd8a9f5393cf67c1d9a86923f388e43e104;p=plomrogue diff --git a/src/main.c b/src/main.c index 247ec50..f240975 100644 --- a/src/main.c +++ b/src/main.c @@ -27,6 +27,7 @@ #include "rrand.h" /* for rrand(), rrand_seed() */ #include "rexit.h" /* for exit_game() */ #include "control.h" /* for meta_control() */ +#include "command_db.h" /* for init_command_db() */ @@ -34,6 +35,9 @@ int main(int argc, char *argv[]) { struct World world; + init_command_db(&world); + set_cleanup_flag(CLEANUP_COMMAND_DB); + /* Check for corrupted savefile / recordfile savings. */ char * recordfile = "record"; char * savefile = "savefile"; @@ -99,7 +103,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()) / " @@ -244,7 +248,7 @@ int main(int argc, char *argv[]) draw_all_wins(&win_meta); key = getch(); if ( EOF != action - && key == get_action_key(world.keybindings, "wait / next turn")) + && key == get_action_key(world.keybindings, "wait")) { action = getc(file); if (EOF != action)