summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/macro.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-01 11:24:15 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-01 11:24:15 +0000
commit0f4b2b185f31ebaf18f9d1bb0de8d8fd364cdaa8 (patch)
tree395e025414af3b23d74ed2b90ef433326c97f19c /crawl-ref/source/macro.cc
parentd758cad3c69be5d4235119153a592018dbedfbd4 (diff)
downloadcrawl-ref-0f4b2b185f31ebaf18f9d1bb0de8d8fd364cdaa8.tar.gz
crawl-ref-0f4b2b185f31ebaf18f9d1bb0de8d8fd364cdaa8.zip
Added DGL_NAMED_MACRO_FILE option to make life easier for dgamelaunch to keep
user macro files distinct (paxed). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1168 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/macro.cc')
-rw-r--r--crawl-ref/source/macro.cc6
1 files changed, 5 insertions, 1 deletions
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)