From 47173f1092b4f4f3bdc0da19d6dc4553f62cdee7 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Thu, 6 Dec 2007 09:54:50 +0000 Subject: "?/" can now be used to look up items. A side effect of this is that item descriptions have been moved to dat/descript/items.txt and dat/descript/unident.txt. STL maps are now used to look up exact matches for the names of monsters, features and spells, so that looking them up with "?/" won't get too slow if there's a large descriptions DB and each key has to be tested if its a monster/spell/etc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3009 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/itemname.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crawl-ref/source/itemname.h') diff --git a/crawl-ref/source/itemname.h b/crawl-ref/source/itemname.h index a885693cf5..713189df24 100644 --- a/crawl-ref/source/itemname.h +++ b/crawl-ref/source/itemname.h @@ -16,6 +16,12 @@ #include "externs.h" +struct item_types_pair +{ + object_class_type base_type; + unsigned char sub_type; +}; + enum item_type_id_type { IDTYPE_WANDS = 0, @@ -119,4 +125,9 @@ void set_ident_type( object_class_type basetype, int subtype, * *********************************************************************** */ const std::string menu_colour_item_prefix(const item_def &item); +void init_item_name_cache(); +item_types_pair item_types_by_name(std::string name); + +std::vector item_name_list_for_glyph(unsigned glyph); + #endif -- cgit v1.2.3-54-g00ecf