diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2010-08-24 19:42:27 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2010-08-24 19:42:27 +0200 |
commit | fffea480e84d6b84e820d103d0e802bd31e41beb (patch) | |
tree | ce4c13bfc225766ffaed28c4e680d58aa3a51125 /crawl-ref/source | |
parent | fe0f28858c1b08aa4d2b92a2d6bd83e7c40801da (diff) | |
download | crawl-ref-fffea480e84d6b84e820d103d0e802bd31e41beb.tar.gz crawl-ref-fffea480e84d6b84e820d103d0e802bd31e41beb.zip |
Remove obsolete special unrand code.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/artefact.cc | 26 | ||||
-rw-r--r-- | crawl-ref/source/artefact.h | 11 | ||||
-rw-r--r-- | crawl-ref/source/makeitem.cc | 1 |
3 files changed, 1 insertions, 37 deletions
diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc index fc0b87b8d6..acdc72bf14 100644 --- a/crawl-ref/source/artefact.cc +++ b/crawl-ref/source/artefact.cc @@ -1629,8 +1629,7 @@ static unrandart_entry *_seekunrandart( const item_def &item ) return get_unrand_entry(item.special); } -int find_okay_unrandart(uint8_t aclass, uint8_t atype, - unrand_special_type specialness, bool in_abyss) +int find_okay_unrandart(uint8_t aclass, uint8_t atype, bool in_abyss) { int ret = -1; @@ -1667,12 +1666,6 @@ int find_okay_unrandart(uint8_t aclass, uint8_t atype, continue; } - if (specialness != UNRANDSPEC_EITHER - && specialness != get_unrand_specialness(index)) - { - continue; - } - count++; if (one_chance_in(count)) @@ -1682,23 +1675,6 @@ int find_okay_unrandart(uint8_t aclass, uint8_t atype, return (ret); } -unrand_special_type get_unrand_specialness(int unrand_index) -{ - if (unrand_index < UNRAND_START || unrand_index > UNRAND_LAST) - return (UNRANDSPEC_NORMAL); - - if (unranddata[unrand_index - UNRAND_START].flags & UNRAND_FLAG_SPECIAL) - return (UNRANDSPEC_SPECIAL); - - return (UNRANDSPEC_NORMAL); -} - -unrand_special_type get_unrand_specialness(const item_def &item) -{ - ASSERT(is_unrandom_artefact(item)); - return get_unrand_specialness(item.special); -} - int get_unrandart_num( const char *name ) { std::string quoted = "\""; diff --git a/crawl-ref/source/artefact.h b/crawl-ref/source/artefact.h index 2bfd83db49..721428e8b2 100644 --- a/crawl-ref/source/artefact.h +++ b/crawl-ref/source/artefact.h @@ -24,13 +24,6 @@ struct bolt; #define ARTEFACT_NAME_KEY "artefact_name" #define ARTEFACT_APPEAR_KEY "artefact_appearance" -enum unrand_special_type -{ - UNRANDSPEC_EITHER, - UNRANDSPEC_NORMAL, - UNRANDSPEC_SPECIAL, -}; - enum unrand_flag_type { UNRAND_FLAG_NONE = 0x00, @@ -117,7 +110,6 @@ std::string artefact_name( const item_def &item, bool appearance = false ); const char *unrandart_descrip( int which_descrip, const item_def &item ); int find_okay_unrandart(uint8_t aclass, uint8_t atype = OBJ_RANDOM, - unrand_special_type specialness = UNRANDSPEC_EITHER, bool in_abyss = false); typedef FixedVector< int, ART_PROPERTIES > artefact_properties_t; @@ -156,9 +148,6 @@ int find_unrandart_index(const item_def& artefact); unrandart_entry* get_unrand_entry(int unrand_index); -unrand_special_type get_unrand_specialness(int unrand_index); -unrand_special_type get_unrand_specialness(const item_def &item); - void artefact_set_properties( item_def &item, const artefact_properties_t &proprt ); void artefact_set_property( item_def &item, diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index f30e1e53b1..3016080330 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -924,7 +924,6 @@ static bool _try_make_item_unrand(item_def& item, int force_type) } int idx = find_okay_unrandart(item.base_type, force_type, - UNRANDSPEC_EITHER, you.level_type == LEVEL_ABYSS); if (idx != -1 && make_item_unrandart(item, idx)) |