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/libutil.cc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'crawl-ref/source/libutil.cc') diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc index e1cca6a43e..845f96b380 100644 --- a/crawl-ref/source/libutil.cc +++ b/crawl-ref/source/libutil.cc @@ -46,6 +46,33 @@ #include #endif +description_level_type description_type_by_name(const char *desc) +{ + if (!desc) + return DESC_PLAIN; + + if (!strcmp("The", desc)) + return DESC_CAP_THE; + else if (!strcmp("the", desc)) + return DESC_NOCAP_THE; + else if (!strcmp("A", desc)) + return DESC_CAP_A; + else if (!strcmp("a", desc)) + return DESC_NOCAP_A; + else if (!strcmp("Your", desc)) + return DESC_CAP_YOUR; + else if (!strcmp("your", desc)) + return DESC_NOCAP_YOUR; + else if (!strcmp("its", desc)) + return DESC_NOCAP_ITS; + else if (!strcmp("worn", desc)) + return DESC_INVENTORY_EQUIP; + else if (!strcmp("inv", desc)) + return DESC_INVENTORY; + + return DESC_PLAIN; +} + // Should return true if the filename contains nothing that // the shell can do damage with. bool shell_safe(const char *file) -- cgit v1.2.3-54-g00ecf