git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10054 c06c8d41-db1a-0410-9941-cceddc491573
XSJFXTHRV2FGAWDXWO2QHNGAECLYTLOD6CKTAWUPZQ74DSWXUUXQC TXVL24IFH5SK7EJAN7JAUHAZJHJV7GB364UU65P745GUBWJS6Q6AC LV5VQHTUP5OPVIV6FGDX5EJTHT6UJYU7MDPNYSEWQRK3GTDIJ6MAC DCZMEKDHQWSQCQYQD6ZXB3XOMWLVLPSPVSBVVMPXMSZF7GO3BVCAC 25CH7HH4LKXFIZ75YNMXS3TSXO6O27DYSOPLOD45K4OCNFWLS4LQC ZQ55TG7UDO6QYKNZGYLETDPGZ7TEWMCCT5S4IU4XMQOLTM6DZYHQC BMF6Y2AW2UKQ4J2KKWZOF4MFRMIU4PJG5DT72D4H6ZUV56MXR7SQC 22ZPAVDZLX4R66AODFVA56HH4T3XU62UUON6LYZG3GGTXCTD3YVAC OCGSM3TA4KYVM4JXHTHPA2SLY7EF6NPSIU4LJDRSQ2PJ6X7BP6CQC NHDY5NMP7SGSOFT6PQS2PN6YPLUEFRTD3LXNLYFHHL5G27QY65FQC WFG3MHLJUHQEHV65SPAIOI74NIZTGM447T4WKWKF7CMUIUNRUQOAC LP5EK64IEM7AHNYQID4GGKOQJQNZLKY4DCCZN47SIUZ6IXAXH5UAC 3SQQ4MM6YO4I37CQ6GIBIX6BXAEVHNVNHPVMR3PPBBNO454D6XWQC HBXWZNXAJ7LUX7FYUIHQYBTRMWVJC6CAQQL3NNZHK5ETLIFEZJ7QC KC7HKOPRUKHHZBJMSUHPELMELYEJ3MW66ZXVZW5S5KUHPMCYEZBAC my %parts;foreach my $artefact (@all_artefacts){next if ($artefact->{NAME} =~ /DUMMY/);if (not(defined $artefact->{TILE_EQ}) || $artefact->{TILE_EQ} eq ""){if ($artefact->{base_type} ne "OBJ_JEWELLERY"){print STDERR "TILE_EQ not defined for '$artefact->{NAME}'\n";}next;}my $part = "BODY";if ($artefact->{base_type} eq "OBJ_WEAPONS"){$part = "HAND1";}elsif ($artefact->{base_type} ne "OBJ_ARMOUR"){next;}elsif ($artefact->{sub_type} =~ /_SHIELD/|| $artefact->{sub_type} =~ /_BUCKLER/){$part = "HAND2";}elsif ($artefact->{sub_type} =~ /_CLOAK/){$part = "CLOAK";}elsif ($artefact->{sub_type} =~ /_CAP/|| $artefact->{sub_type} =~ /_HAT/){$part = "HELM";}elsif ($artefact->{sub_type} =~ /_SHIELD/){$part = "HAND2";}elsif ($artefact->{sub_type} =~ /_BOOTS/){$part = "BOOTS";}elsif ($artefact->{sub_type} =~ /_GLOVES/){$part = "ARM";}
if (defined $parts{$part}){push @{$parts{$part}}, $artefact;}else{$parts{$part} = [$artefact];}}$tilefile = "dc-player.txt";unless (open(TILES, "<$tilefile")){die "Couldn't open '$tilefile' for reading: $!\n";}my $curr_part = "";my $content = <TILES>;my @lines = split "\n", $content;foreach my $line (@lines){if ($line =~ /parts_ctg\s+(\S+)/){$curr_part = $1;next;}next if (not defined $parts{$curr_part});if ($line =~ /^(\S+)\s+(\S+)/){my $name = $1;my $enum = $2;foreach my $art (@{$parts{$curr_part}}){if ($art->{TILE_EQ} eq $name){$art->{TILE_EQ_ENUM} = "TILEP_".$curr_part."_".$enum;# Don't break from the loop in case several artefacts# share the same tile.}}}}close(TILES);
print TILES "int unrandart_to_doll_tile(int unrand)\n{\n";print TILES (" " x 4) . "switch (unrand)\n";print TILES (" " x 4) . "{\n";foreach my $part (sort keys %parts){print TILES (" " x 4) . "// $part\n";foreach my $artefact (@{$parts{$part}}){if (not defined $artefact->{TILE_EQ_ENUM}){print STDERR "Tile '$artefact->{TILE_EQ}' for part '$part' not ". "found in 'dc-player.txt'.\n";next;}my $enum = "UNRAND_$artefact->{_ENUM}";my $t_enum = $artefact->{TILE_EQ_ENUM};print TILES (" " x 4) . "case $enum:". " " x ($longest_enum - length($enum) + 2) . "return $t_enum;\n";}}print TILES (" " x 4) . "default: return -1;\n";print TILES (" " x 4) . "}\n";print TILES "}\n\n";
switch (find_unrandart_index(item)){case UNRAND_SINGING_SWORD: return TILEP_HAND1_SINGING_SWORD;case UNRAND_TROG: return TILEP_HAND1_AXE_TROG;case UNRAND_CURSES: return TILEP_HAND1_FINISHER;case UNRAND_VARIABILITY: return TILEP_HAND1_MACE_OF_VARIABILITY;case UNRAND_PRUNE: return TILEP_HAND1_GLAIVE_OF_PRUNE;case UNRAND_TORMENT: return TILEP_HAND1_MACE_RUBY;case UNRAND_ZONGULDROK: return TILEP_HAND1_ZONGULDROK;case UNRAND_CEREBOV: return TILEP_HAND1_SWORD_TWIST;case UNRAND_DISPATER: return TILEP_HAND1_DISPATER;case UNRAND_ASMODEUS: return TILEP_HAND1_ASMODEUS;case UNRAND_OLGREB: return TILEP_HAND1_OLGREB;case UNRAND_POWER: return TILEP_HAND1_SWORD_OF_POWER;case UNRAND_VAMPIRES_TOOTH: return TILEP_HAND1_VAMPIRES_TOOTH;case UNRAND_WUCAD_MU: return TILEP_HAND1_WUCAD_MU;case UNRAND_BLOODBANE: return TILEP_HAND1_BLOODBANE;case UNRAND_FLAMING_DEATH: return TILEP_HAND1_FLAMING_DEATH;case UNRAND_BRILLIANCE: return TILEP_HAND1_MACE_OF_BRILLIANCE;case UNRAND_LEECH: return TILEP_HAND1_LEECH;case UNRAND_CHILLY_DEATH: return TILEP_HAND1_CHILLY_DEATH;case UNRAND_MORG: return TILEP_HAND1_MORG;case UNRAND_FINISHER: return TILEP_HAND1_FINISHER;case UNRAND_PUNK: return TILEP_HAND1_PUNK;case UNRAND_KRISHNA: return TILEP_HAND1_KRISHNA;case UNRAND_SKULLCRUSHER: return TILEP_HAND1_GIANT_CLUB_SLANT;case UNRAND_GUARD: return TILEP_HAND1_GLAIVE_OF_THE_GUARD;case UNRAND_JIHAD: return TILEP_HAND1_JIHAD;case UNRAND_HELLFIRE: return TILEP_HAND1_FIERY_DEVIL;case UNRAND_DOOM_KNIGHT: return TILEP_HAND1_DOOM_KNIGHT;case UNRAND_EOS: return TILEP_HAND1_EOS;case UNRAND_BOTONO: return TILEP_HAND1_BOTONO;case UNRAND_OCTOPUS_KING: return TILEP_HAND1_TRIDENT_OCTOPUS_KING;case UNRAND_ARGA: return TILEP_HAND1_ARGA;case UNRAND_ELEMENTAL_STAFF: return TILEP_HAND1_ELEMENTAL_STAFF;case UNRAND_SNIPER: return TILEP_HAND1_SNIPER;case UNRAND_PLUTONIUM_SWORD: return TILEP_HAND1_PLUTONIUM_SWORD;case UNRAND_BLOWGUN_ASSASSIN: return TILEP_HAND1_BLOWGUN_ASSASSIN;case UNRAND_WYRMBANE: return TILEP_HAND1_WYRMBANE;case UNRAND_SPRIGGANS_KNIFE: return TILEP_HAND1_SPRIGGANS_KNIFE;case UNRAND_SERPENT_SCOURGE: return TILEP_HAND1_SERPENT_SCOURGE;case UNRAND_ACCURACY: return TILEP_HAND1_KNIFE_OF_ACCURACY;case UNRAND_PIERCER: return TILEP_HAND1_GREAT_BOW;case UNRAND_CRYSTAL_SPEAR: return TILEP_HAND1_CRYSTAL_SPEAR;}
const int tile = unrandart_to_doll_tile(find_unrandart_index(item));if (tile != -1)return tile;
case WPN_FLAIL: return TILEP_HAND1_FRAIL;case WPN_SPIKED_FLAIL: return TILEP_HAND1_SPIKED_FRAIL;case WPN_DIRE_FLAIL: return TILEP_HAND1_GREAT_FRAIL;
case WPN_FLAIL: return TILEP_HAND1_FLAIL;case WPN_SPIKED_FLAIL: return TILEP_HAND1_SPIKED_FLAIL;case WPN_DIRE_FLAIL: return TILEP_HAND1_GREAT_FLAIL;
switch (find_unrandart_index(item)){case UNRAND_AUGMENTATION: return TILEP_BODY_ROBE_WHITE_BLUE;case UNRAND_MISFORTUNE: return TILEP_BODY_ROBE_MISFORTUNE;case UNRAND_LEAR: return TILEP_BODY_LEARS_CHAIN_MAIL;case UNRAND_ZHOR: return TILEP_BODY_ZHOR;case UNRAND_SALAMANDER: return TILEP_BODY_LEATHER_RED;case UNRAND_FOLLY: return TILEP_BODY_ROBE_RED2;case UNRAND_MAXWELL: return TILEP_BODY_MAXWELL;case UNRAND_NIGHT: return TILEP_BODY_ROBE_OF_NIGHT;default: break;}
const int tile = unrandart_to_doll_tile(find_unrandart_index(item));if (tile != -1)return tile;
switch (find_unrandart_index(item)){case UNRAND_IGNORANCE: return TILEP_HAND2_SHIELD_OF_IGNORANCE;case UNRAND_BULLSEYE: return TILEP_HAND2_BULLSEYE;case UNRAND_RESISTANCE: return TILEP_HAND2_SHIELD_OF_RESISTANCE;default: break;}
const int tile = unrandart_to_doll_tile(find_unrandart_index(item));if (tile != -1)return tile;
switch (find_unrandart_index(item)){case UNRAND_RATSKIN_CLOAK: return TILEP_CLOAK_RATSKIN_CLOAK;default: break;}
const int tile = unrandart_to_doll_tile(find_unrandart_index(item));if (tile != -1)return tile;
switch (find_unrandart_index(item)){case UNRAND_DYROVEPREVA: return TILEP_HELM_DYROVEPREVA;case UNRAND_DRAGONMASK: return TILEP_HELM_ART_DRAGONHELM;case UNRAND_ALCHEMIST: return TILEP_HELM_TURBAN_PURPLE;default: break;}
const int tile = unrandart_to_doll_tile(find_unrandart_index(item));if (tile != -1)return tile;
switch (find_unrandart_index(item)){case UNRAND_WAR: return TILEP_ARM_GLOVE_BLACK;case UNRAND_FENCERS_GLOVES: return TILEP_ARM_GLOVE_WHITE;}
const int tile = unrandart_to_doll_tile(find_unrandart_index(item));if (tile != -1)return tile;
switch (find_unrandart_index(item)){case UNRAND_BOOTS_ASSASSIN: return TILEP_BOOTS_MIDDLE_GRAY;default: break;}
const int tile = unrandart_to_doll_tile(find_unrandart_index(item));if (tile != -1)return tile;
default: return -1;}}int unrandart_to_doll_tile(int unrand){switch (unrand){// ARMcase UNRAND_WAR: return TILEP_ARM_GLOVE_BLACK;case UNRAND_FENCERS_GLOVES: return TILEP_ARM_GLOVE_WHITE;// BODYcase UNRAND_AUGMENTATION: return TILEP_BODY_ROBE_WHITE_BLUE;case UNRAND_MISFORTUNE: return TILEP_BODY_ROBE_MISFORTUNE;case UNRAND_LEAR: return TILEP_BODY_LEARS_CHAIN_MAIL;case UNRAND_ZHOR: return TILEP_BODY_ZHOR;case UNRAND_SALAMANDER: return TILEP_BODY_LEATHER_RED;case UNRAND_FOLLY: return TILEP_BODY_ROBE_RED2;case UNRAND_MAXWELL: return TILEP_BODY_MAXWELL;case UNRAND_NIGHT: return TILEP_BODY_ROBE_OF_NIGHT;case UNRAND_DRAGON_KING: return TILEP_BODY_DRAGONARM_GOLD;// BOOTScase UNRAND_BOOTS_ASSASSIN: return TILEP_BOOTS_MIDDLE_GRAY;// CLOAKcase UNRAND_THIEF: return TILEP_CLOAK_BLACK;case UNRAND_FLASH: return TILEP_CLOAK_RED;case UNRAND_STARLIGHT: return TILEP_CLOAK_WHITE;case UNRAND_RATSKIN_CLOAK: return TILEP_CLOAK_RATSKIN_CLOAK;// HAND1case UNRAND_SINGING_SWORD: return TILEP_HAND1_SINGING_SWORD;case UNRAND_TROG: return TILEP_HAND1_AXE_TROG;case UNRAND_VARIABILITY: return TILEP_HAND1_MACE_OF_VARIABILITY;case UNRAND_PRUNE: return TILEP_HAND1_GLAIVE_OF_PRUNE;case UNRAND_POWER: return TILEP_HAND1_SWORD_OF_POWER;case UNRAND_OLGREB: return TILEP_HAND1_OLGREB;case UNRAND_WUCAD_MU: return TILEP_HAND1_WUCAD_MU;case UNRAND_VAMPIRES_TOOTH: return TILEP_HAND1_VAMPIRES_TOOTH;case UNRAND_CURSES: return TILEP_HAND1_FINISHER;case UNRAND_TORMENT: return TILEP_HAND1_MACE_RUBY;case UNRAND_ZONGULDROK: return TILEP_HAND1_ZONGULDROK;case UNRAND_CEREBOV: return TILEP_HAND1_SWORD_TWIST;case UNRAND_DISPATER: return TILEP_HAND1_DISPATER;case UNRAND_ASMODEUS: return TILEP_HAND1_ASMODEUS;case UNRAND_BLOODBANE: return TILEP_HAND1_BLOODBANE;case UNRAND_FLAMING_DEATH: return TILEP_HAND1_FLAMING_DEATH;case UNRAND_BRILLIANCE: return TILEP_HAND1_MACE_OF_BRILLIANCE;case UNRAND_LEECH: return TILEP_HAND1_LEECH;case UNRAND_CHILLY_DEATH: return TILEP_HAND1_CHILLY_DEATH;case UNRAND_MORG: return TILEP_HAND1_MORG;case UNRAND_FINISHER: return TILEP_HAND1_FINISHER;case UNRAND_PUNK: return TILEP_HAND1_PUNK;case UNRAND_KRISHNA: return TILEP_HAND1_KRISHNA;case UNRAND_SKULLCRUSHER: return TILEP_HAND1_GIANT_CLUB_SLANT;case UNRAND_GUARD: return TILEP_HAND1_GLAIVE_OF_THE_GUARD;case UNRAND_JIHAD: return TILEP_HAND1_JIHAD;case UNRAND_HELLFIRE: return TILEP_HAND1_FIERY_DEVIL;case UNRAND_DOOM_KNIGHT: return TILEP_HAND1_DOOM_KNIGHT;case UNRAND_EOS: return TILEP_HAND1_EOS;case UNRAND_BOTONO: return TILEP_HAND1_BOTONO;case UNRAND_OCTOPUS_KING: return TILEP_HAND1_TRIDENT_OCTOPUS_KING;case UNRAND_ARGA: return TILEP_HAND1_ARGA;case UNRAND_ELEMENTAL_STAFF: return TILEP_HAND1_ELEMENTAL_STAFF;case UNRAND_SNIPER: return TILEP_HAND1_SNIPER;case UNRAND_PIERCER: return TILEP_HAND1_GREAT_BOW;case UNRAND_BLOWGUN_ASSASSIN: return TILEP_HAND1_BLOWGUN;case UNRAND_WYRMBANE: return TILEP_HAND1_WYRMBANE;case UNRAND_SPRIGGANS_KNIFE: return TILEP_HAND1_SPRIGGANS_KNIFE;case UNRAND_PLUTONIUM_SWORD: return TILEP_HAND1_PLUTONIUM_SWORD;case UNRAND_UNDEADHUNTER: return TILEP_HAND1_UNDEADHUNTER;case UNRAND_SERPENT_SCOURGE: return TILEP_HAND1_SERPENT_SCOURGE;case UNRAND_ACCURACY: return TILEP_HAND1_KNIFE_OF_ACCURACY;case UNRAND_CRYSTAL_SPEAR: return TILEP_HAND1_CRYSTAL_SPEAR;// HAND2case UNRAND_IGNORANCE: return TILEP_HAND2_SHIELD_OF_IGNORANCE;case UNRAND_BULLSEYE: return TILEP_HAND2_BULLSEYE;case UNRAND_RESISTANCE: return TILEP_HAND2_SHIELD_OF_RESISTANCE;// HELMcase UNRAND_DYROVEPREVA: return TILEP_HELM_DYROVEPREVA;case UNRAND_DRAGONMASK: return TILEP_HELM_ART_DRAGONHELM;case UNRAND_ALCHEMIST: return TILEP_HELM_TURBAN_PURPLE;
frail_stick FRAIL_STICKfrail_ball FRAILfrail_spike SPIKED_FRAILfrail_stick_slant GREAT_FRAILfrail_ball2 FRAIL_BALL2frail_balls FRAIL_BALLSfrail_ball3 FRAIL_BALL3frail_ball4 FRAIL_BALL4
flail_stick FLAIL_STICKflail_ball FLAILflail_spike SPIKED_FLAILflail_stick_slant GREAT_FLAILflail_ball2 FLAIL_BALL2flail_balls FLAIL_BALLSflail_ball3 FLAIL_BALL3flail_ball4 FLAIL_BALL4
# Each unrandart needs two tiles, one item tile and one equipment tile for the# player doll. For the former, you can define the image file within this# file using the keyword TILE. The files are assumed to be png and the syntax# does not include the file type. The artefacts' base type decides where a# tile needs to be placed. These are as follows:
# Each unrandart needs at the very least an item tile, and weapons and armour# also need an equipment tile for the player doll. For the former, you can# define the image file within this file using the keyword TILE. The files are# assumed to be png and the syntax does not include the file type. The# artefacts' base type decides where a tile needs to be placed. These are as# follows:
# player/ subfolder and define it in dc-player.txt. You'll also need to assign# these tiles to the corresponding artefacts in tilepick.cc, using the keyword# "TILEP_" plus the equipment slot (as defined by the most recent "parts_ctg"# in dc-player.txt) plus the actual definition, e.g. TILEP_CLOAK_RATSKIN_CLOAK.# To find the places where you'll need to add your new tile, simply search# tilepick.cc for another artefact of the same base type. If no special tile# has been defined the code will fall through to tiles according to the# base type and colour.
# rltiles/player/ and define it in rltiles/dc-player.txt as well as here, using# the keyword TILE_EQ. Tiles are sorted into folders by equipment slot:# Weapons: rltiles/player/hand1/artefact# Body armour: rltiles/player/body# Boots: rltiles/player/boots# Cloaks: rltiles/player/cloak# Gloves: rltiles/player/gloves# Shields: rltiles/player/hand2# Helms, caps: rltiles/player/head## Rings and amulets are too small to be displayed with the player doll.
# To begin with, placeholders (e.g. the base type tiles) are fine, but they'll# eventually need to be replaced with proper tiles, though this is less of a# problem for the equipment tiles.# No checks are made for whether path or files actually exist. However, if that# is not the case the tile compilation will fail.
NAME: mithril axe "Arga"APPEAR: mithril axeOBJ: OBJ_WEAPONS/WPN_WAR_AXEPLUS: +10/+6COLOUR: WHITETILE: urand_argaBRAND: SPWPN_SPEEDSTR: 2MAGIC: 30DESC: A beautiful mithril axe, probably lost by some dwarven hero.
NAME: mithril axe "Arga"APPEAR: mithril axeOBJ: OBJ_WEAPONS/WPN_WAR_AXEPLUS: +10/+6COLOUR: WHITETILE: urand_argaTILE_EQ: argaBRAND: SPWPN_SPEEDSTR: 2MAGIC: 30DESC: A beautiful mithril axe, probably lost by some dwarven hero.
NAME: gauntlets of WarAPPEAR: thick gauntletsOBJ: OBJ_ARMOUR/ARM_GLOVESPLUS: +3COLOUR: BROWNTILE: urand_warACC: 3DAM: 3
NAME: gauntlets of WarAPPEAR: thick gauntletsOBJ: OBJ_ARMOUR/ARM_GLOVESPLUS: +3COLOUR: BROWNTILE: urand_warTILE_EQ: glove_blackACC: 3DAM: 3
NAME: shield of ResistanceAPPEAR: bronze shieldOBJ: OBJ_ARMOUR/ARM_SHIELDPLUS: +3COLOUR: LIGHTREDTILE: urand_resistanceFIRE: 1COLD: 1MAGIC: 40DESC: A bronze shield.
NAME: shield of ResistanceAPPEAR: bronze shieldOBJ: OBJ_ARMOUR/ARM_SHIELDPLUS: +3COLOUR: LIGHTREDTILE: urand_resistanceTILE_EQ: shield_of_resistanceFIRE: 1COLD: 1MAGIC: 40DESC: A bronze shield.