diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-26 11:06:09 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-26 11:06:09 +0000 |
commit | f2a19d9971bb076f4a80a9e41ba601bc862d0fdf (patch) | |
tree | be553fe84132e1f25d5f33fb98f703378096b961 /crawl-ref/source/direct.cc | |
parent | bc1a54904787e2f4779a99f2be1f72f6fd87679b (diff) | |
download | crawl-ref-f2a19d9971bb076f4a80a9e41ba601bc862d0fdf.tar.gz crawl-ref-f2a19d9971bb076f4a80a9e41ba601bc862d0fdf.zip |
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
Diffstat (limited to 'crawl-ref/source/direct.cc')
-rw-r--r-- | crawl-ref/source/direct.cc | 25 |
1 files changed, 20 insertions, 5 deletions
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, |