summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/initfile.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-12 19:53:45 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-12 19:53:45 +0000
commit4c1860113f640efeb503505542393f3dccdd5060 (patch)
treee28485e52508608a7823fa389f2354b44d717a06 /crawl-ref/source/initfile.cc
parent170c1de4d2bc1b996f11cffdec0fc49cfe71c388 (diff)
downloadcrawl-ref-4c1860113f640efeb503505542393f3dccdd5060.tar.gz
crawl-ref-4c1860113f640efeb503505542393f3dccdd5060.zip
Tweaked stash-tracker so that greedy explore works in Pandemonium.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@621 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r--crawl-ref/source/initfile.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 86225d4ffc..56e86060ab 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -204,7 +204,7 @@ static int str_to_weapon( const std::string &str )
return (WPN_UNKNOWN);
}
-static std::string weapon_to_str( int weapon )
+std::string weapon_to_str( int weapon )
{
switch (weapon)
{
@@ -889,6 +889,7 @@ std::string read_init_file(bool runscript)
static void read_startup_prefs()
{
+#ifndef DISABLE_STICKY_STARTUP_OPTIONS
std::string fn = get_prefs_filename();
FILE *f = fopen(fn.c_str(), "r");
if (!f)
@@ -908,8 +909,10 @@ static void read_startup_prefs()
Options.prev_race = temp.race;
Options.prev_book = temp.book;
Options.prev_name = temp.player_name;
+#endif // !DISABLE_STICKY_STARTUP_OPTIONS
}
+#ifndef DISABLE_STICKY_STARTUP_OPTIONS
static void write_newgame_options(FILE *f)
{
// Write current player name
@@ -958,19 +961,23 @@ static void write_newgame_options(FILE *f)
"random");
}
}
+#endif // !DISABLE_STICKY_STARTUP_OPTIONS
void write_newgame_options_file()
{
+#ifndef DISABLE_STICKY_STARTUP_OPTIONS
std::string fn = get_prefs_filename();
FILE *f = fopen(fn.c_str(), "w");
if (!f)
return;
write_newgame_options(f);
fclose(f);
+#endif // !DISABLE_STICKY_STARTUP_OPTIONS
}
void save_player_name()
{
+#ifndef DISABLE_STICKY_STARTUP_OPTIONS
if (!Options.remember_name)
return ;
@@ -979,6 +986,7 @@ void save_player_name()
// And save
write_newgame_options_file();
+#endif // !DISABLE_STICKY_STARTUP_OPTIONS
}
void read_options(FILE *f, bool runscript)