summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-25 10:43:02 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-25 10:43:02 +0000
commita0d48b01861f3745455c731078bc2b15187b1050 (patch)
tree2f94da2a304d427bd2859f740ee170c1f1945c00 /crawl-ref/source/files.cc
parentbe875338f295eb1a2c97e33e6444907f3b492e7d (diff)
downloadcrawl-ref-a0d48b01861f3745455c731078bc2b15187b1050.tar.gz
crawl-ref-a0d48b01861f3745455c731078bc2b15187b1050.zip
Removed USE_NEW_RANDOM, USE_MACROS.
Removed DOS_TERM, PLAIN_TERM special casery - all platforms get PLAIN_TERM. Better end-of-greedy-explore reporting for items on traps (Erik). Cleaned up find_travel_pos - moved guts of travel pathfinding to travel_pathfind class. Miscellaneous other stuff. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@882 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 5c79274aae..21ce1e7122 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -351,7 +351,7 @@ static bool create_dirs(const std::string &dir)
return (true);
}
-std::string datafile_path(const std::string &basename)
+std::string datafile_path(const std::string &basename, bool croak_on_fail)
{
std::string cdir = SysEnv.crawl_dir? SysEnv.crawl_dir : "";
@@ -400,8 +400,9 @@ std::string datafile_path(const std::string &basename)
}
// Die horribly.
- end(1, false, "Cannot find data file '%s' anywhere, aborting\n",
- basename.c_str());
+ if (croak_on_fail)
+ end(1, false, "Cannot find data file '%s' anywhere, aborting\n",
+ basename.c_str());
return ("");
}
@@ -629,10 +630,6 @@ void load( unsigned char stair_taken, int load_mode, bool was_a_labyrinth,
bool just_created_level = false;
-#ifdef DOS_TERM
- window(1, 1, 80, 25);
-#endif
-
std::string cha_fil = make_filename( you.your_name, you.your_level,
you.where_are_you,
you.level_type != LEVEL_DUNGEON,
@@ -1222,10 +1219,6 @@ void save_game(bool leave_game)
save_level(you.your_level, (you.level_type != LEVEL_DUNGEON),
you.where_are_you);
-#ifdef DOS_TERM
- window(1, 1, 80, 25);
-#endif
-
clrscr();
#ifdef SAVE_PACKAGE_CMD