diff options
-rw-r--r-- | crawl-ref/source/AppHdr.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/acr.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/macro.cc | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h index e7d4529dbb..3de9c17a70 100644 --- a/crawl-ref/source/AppHdr.h +++ b/crawl-ref/source/AppHdr.h @@ -225,6 +225,8 @@ // Record where players are currently. #define DGL_WHEREIS + // Uses <playername>-macro.txt as the macro file if uncommented. + // #define DGL_NAMED_MACRO_FILE #endif // ========================================================================= diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index d293ea9066..d083f087c8 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -2873,9 +2873,6 @@ static bool initialise(void) cio_init(); - // Load macros - macro_init(); - // system initialisation stuff: textbackground(0); @@ -2891,6 +2888,9 @@ static bool initialise(void) if (!newc) restore_game(); + + // Load macros + macro_init(); game_has_started = true; diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc index 6a4783519f..3a14a0c4ef 100644 --- a/crawl-ref/source/macro.cc +++ b/crawl-ref/source/macro.cc @@ -178,8 +178,12 @@ static std::string get_macro_file() if (dir[dir.length() - 1] != FILE_SEPARATOR) dir += FILE_SEPARATOR; } - + +#ifdef DGL_NAMED_MACRO_FILE + return (dir + strip_filename_unsafe_chars(you.your_name) + "-macro.txt"); +#else return (dir + "macro.txt"); +#endif } static void buf2keyseq(const char *buff, keyseq &k) |