git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1292 c06c8d41-db1a-0410-9941-cceddc491573
KAL42YT6OQXFPMKKKHE2NQM47W5KMLSRI6KWFRTJFAO4WKP4MMLAC * called from: itemname* *********************************************************************** */void standard_name_armour( const item_def &item, char glorg[ITEMNAME_SIZE] );/* ***********************************************************************
void standard_name_armour( const item_def &item, char glorg[ITEMNAME_SIZE] ){short helm_type;glorg[0] = 0;switch (item.sub_type){case ARM_ROBE:strcat(glorg, "robe");break;case ARM_LEATHER_ARMOUR:strcat(glorg, "leather armour");break;case ARM_RING_MAIL:strcat(glorg, "ring mail");break;case ARM_SCALE_MAIL:strcat(glorg, "scale mail");break;case ARM_CHAIN_MAIL:strcat(glorg, "chain mail");break;case ARM_SPLINT_MAIL:strcat(glorg, "splint mail");break;case ARM_BANDED_MAIL:strcat(glorg, "banded mail");break;case ARM_PLATE_MAIL:strcat(glorg, "plate mail");break;case ARM_SHIELD:strcat(glorg, "shield");break;case ARM_CLOAK:strcat(glorg, "cloak");break;case ARM_HELMET:if (get_helmet_type(item) == THELM_HELM|| get_helmet_type(item) == THELM_HELMET){short dhelm = get_helmet_desc( item );if (dhelm != THELM_DESC_PLAIN){strcat( glorg,(dhelm == THELM_DESC_WINGED) ? "winged " :(dhelm == THELM_DESC_HORNED) ? "horned " :(dhelm == THELM_DESC_CRESTED) ? "crested " :(dhelm == THELM_DESC_PLUMED) ? "plumed " :(dhelm == THELM_DESC_SPIKED) ? "spiked " :(dhelm == THELM_DESC_VISORED) ? "visored " :(dhelm == THELM_DESC_JEWELLED) ? "jeweled ": "buggy " );}}helm_type = get_helmet_type( item );if (helm_type == THELM_HELM)strcat(glorg, "helm");else if (helm_type == THELM_CAP)strcat(glorg, "cap");else if (helm_type == THELM_WIZARD_HAT)strcat(glorg, "wizard's hat");elsestrcat(glorg, "helmet");break;case ARM_GLOVES:strcat(glorg, "gloves");break;case ARM_NAGA_BARDING:strcat(glorg, "naga barding");break;case ARM_CENTAUR_BARDING:strcat(glorg, "centaur barding");break;case ARM_BOOTS:strcat(glorg, "boots");break;case ARM_BUCKLER:strcat(glorg, "buckler");break;case ARM_LARGE_SHIELD:strcat(glorg, "large shield");break;case ARM_DRAGON_HIDE:strcat(glorg, "dragon hide");break;case ARM_TROLL_HIDE:strcat(glorg, "troll hide");break;case ARM_CRYSTAL_PLATE_MAIL:strcat(glorg, "crystal plate mail");break;case ARM_DRAGON_ARMOUR:strcat(glorg, "dragon armour");break;case ARM_TROLL_LEATHER_ARMOUR:strcat(glorg, "troll leather armour");break;case ARM_ICE_DRAGON_HIDE:strcat(glorg, "ice dragon hide");break;case ARM_ICE_DRAGON_ARMOUR:strcat(glorg, "ice dragon armour");break;case ARM_STEAM_DRAGON_HIDE:strcat(glorg, "steam dragon hide");break;case ARM_STEAM_DRAGON_ARMOUR:strcat(glorg, "steam dragon armour");break;case ARM_MOTTLED_DRAGON_HIDE:strcat(glorg, "mottled dragon hide");break;case ARM_MOTTLED_DRAGON_ARMOUR:strcat(glorg, "mottled dragon armour");break;case ARM_STORM_DRAGON_HIDE:strcat(glorg, "storm dragon hide");break;case ARM_STORM_DRAGON_ARMOUR:strcat(glorg, "storm dragon armour");break;case ARM_GOLD_DRAGON_HIDE:strcat(glorg, "gold dragon hide");break;case ARM_GOLD_DRAGON_ARMOUR:strcat(glorg, "gold dragon armour");break;case ARM_ANIMAL_SKIN:strcat(glorg, "animal skin");break;case ARM_SWAMP_DRAGON_HIDE:strcat(glorg, "swamp dragon hide");break;case ARM_SWAMP_DRAGON_ARMOUR:strcat(glorg, "swamp dragon armour");break;}} // end standard_name_armour()
return item_base_name(static_cast<object_class_type>(item.base_type),item.sub_type);}const char* item_base_name(object_class_type basetype, unsigned char subtype){switch (basetype)
switch ( item.base_type )
return Armour_prop[Armour_index[subtype]].name;case OBJ_MISSILES:return Missile_prop[Missile_index[subtype]].name;
if ( item.sub_type != ARM_HELMET ){return Armour_prop[Armour_index[item.sub_type]].name;}else{std::string result;if (get_helmet_type(item) == THELM_HELM ||get_helmet_type(item) == THELM_HELMET){const short dhelm = get_helmet_desc( item );result +=(dhelm == THELM_DESC_PLAIN) ? "" :(dhelm == THELM_DESC_WINGED) ? "winged " :(dhelm == THELM_DESC_HORNED) ? "horned " :(dhelm == THELM_DESC_CRESTED) ? "crested " :(dhelm == THELM_DESC_PLUMED) ? "plumed " :(dhelm == THELM_DESC_SPIKED) ? "spiked " :(dhelm == THELM_DESC_VISORED) ? "visored " :(dhelm == THELM_DESC_JEWELLED) ? "jeweled ": "buggy ";}const short helm_type = get_helmet_type( item );if (helm_type == THELM_HELM)result += "helm";else if (helm_type == THELM_CAP)result += "cap";else if (helm_type == THELM_WIZARD_HAT)result += "wizard's hat";elseresult += "helmet";return result;}
const char* weapon_base_name(unsigned char subtype){return Weapon_prop[Weapon_index[subtype]].name;}