From f2a19d9971bb076f4a80a9e41ba601bc862d0fdf Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 26 Jul 2007 11:06:09 +0000 Subject: Replaced timed markers with Lua markers. Breaks save compatibility. KFEAT: feature names are now as in the dungeon_feature_type enum. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1930 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/direct.cc | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/direct.cc') diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc index 21ffebe163..675e214549 100644 --- a/crawl-ref/source/direct.cc +++ b/crawl-ref/source/direct.cc @@ -1211,7 +1211,20 @@ std::string feature_description(dungeon_feature_type grid, if (add_stop) desc += "."; if (dtype == DESC_PLAIN || (!grid_is_trap(grid) && isupper(desc[0]))) + { + if (isupper(desc[0])) + { + switch (dtype) + { + case DESC_PLAIN: case DESC_NOCAP_THE: case DESC_NOCAP_A: + desc[0] = tolower(desc[0]); + break; + default: + break; + } + } return (desc); + } switch (dtype) { @@ -1465,10 +1478,7 @@ std::string feature_description(int mx, int my, description_level_type dtype, case DNGN_ENTER_SHOP: return (shop_name(mx, my, add_stop)); default: - return (feature_description( - grid, NUM_TRAPS, - env_find_marker(coord_def(mx, my), MAT_TIMED_FEATURE), - dtype, add_stop)); + return (feature_description(grid, NUM_TRAPS, false, dtype, add_stop)); } } @@ -1703,7 +1713,12 @@ static void describe_cell(int mx, int my) #ifdef DEBUG_DIAGNOSTICS std::string marker; if (map_marker *mark = env_find_marker(coord_def(mx, my), MAT_ANY)) - marker = " (" + mark->describe() + ")"; + { + std::string desc = mark->describe(); + if (desc.empty()) + desc = "?"; + marker = " (" + desc + ")"; + } const std::string traveldest = stair_destination_description(coord_def(mx, my)); mprf("(%d,%d): %s - %s%s%s", mx, my, -- cgit v1.2.3-54-g00ecf