summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/output.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-12 09:03:37 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-12 09:03:37 +0000
commit14f96d4f59e4c91915bb15d2f4ca845e6e2e459e (patch)
tree0d4e442574394649b916aaecef060cda9a6c4282 /crawl-ref/source/output.cc
parent42d4567bed5358f70d8205f17f65c380e6ad65f7 (diff)
downloadcrawl-ref-14f96d4f59e4c91915bb15d2f4ca845e6e2e459e.tar.gz
crawl-ref-14f96d4f59e4c91915bb15d2f4ca845e6e2e459e.zip
Remove unneeded methods (including the old resistance screen), rename
debugging functions, and some other clean-up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5757 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r--crawl-ref/source/output.cc271
1 files changed, 0 insertions, 271 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 14dc57e16e..1774818fc4 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -1561,277 +1561,6 @@ static const char* _determine_color_string( int level )
}
}
-// Old overview screen, now only used for dumping.
-std::vector<formatted_string> get_full_detail(bool calc_unid, long sc)
-{
- char buf[1000];
- // 3 columns, splits at columns 32, 52
- column_composer cols(3, 33, 52);
- char god_colour_tag[20];
- god_colour_tag[0] = 0;
- std::string godpowers(god_name(you.religion));
- if ( you.religion != GOD_NO_GOD )
- {
- if ( player_under_penance() )
- strcpy(god_colour_tag, "<red>*");
- else
- {
- snprintf(god_colour_tag, sizeof god_colour_tag, "<%s>",
- colour_to_str(god_colour(you.religion)));
- // piety rankings
- int prank = piety_rank() - 1;
- if ( prank < 0 )
- prank = 0;
- // Careful about overflow. We erase some of the god's name
- // if necessary.
- godpowers = godpowers.substr(0, 17 - prank) +
- std::string(prank, '*');
- }
- }
-
- const std::string score =
- (sc > -1? make_stringf(" (%ld points)", sc) : "");
-
- snprintf(buf, sizeof buf,
- "<yellow>%s the %s</yellow>%s\n\n"
- "Race : %s\n"
- "Class : %s\n"
- "Worship : %s%s\n"
- "Level : %7d\n"
- "Exp : %7lu\n",
- you.your_name,
- player_title().c_str(),
- score.c_str(),
- species_name(you.species,you.experience_level).c_str(),
- you.class_name,
- god_colour_tag,
- godpowers.c_str(),
- you.experience_level,
- you.experience);
- cols.add_formatted(0, buf, false);
-
- if (you.experience_level < 27)
- {
- int xp_needed = (exp_needed(you.experience_level+2)-you.experience)+1;
- snprintf(buf, sizeof buf,
- "Next Level : %7lu\n"
- "Exp Needed : %7d\n",
- exp_needed(you.experience_level + 2) + 1,
- xp_needed);
- cols.add_formatted(0, buf, false);
- }
- else
- cols.add_formatted(0, "\n\n", false);
-
- snprintf(buf, sizeof buf,
- "Spls.Left : %7d\n"
- "Gold : %7d\n",
- player_spell_levels(),
- you.gold);
- cols.add_formatted(0, buf, false);
-
- if (!player_rotted())
- {
- if (you.hp < you.hp_max)
- snprintf(buf, sizeof buf, "HP : %3d/%d",you.hp,you.hp_max);
- else
- snprintf(buf, sizeof buf, "HP : %3d", you.hp);
- }
- else
- {
- snprintf(buf, sizeof buf, "HP : %3d/%d (%d)",
- you.hp, you.hp_max, you.hp_max + player_rotted() );
- }
- cols.add_formatted(0, buf, true);
-
- if (you.magic_points < you.max_magic_points)
- snprintf(buf, sizeof buf, "MP : %3d/%d",
- you.magic_points, you.max_magic_points);
- else
- snprintf(buf, sizeof buf, "MP : %3d", you.magic_points);
- cols.add_formatted(0, buf, false);
-
- if (you.strength == you.max_strength)
- snprintf(buf, sizeof buf, "Str : %3d", you.strength);
- else
- snprintf(buf, sizeof buf, "Str : <yellow>%3d</yellow> (%d)",
- you.strength, you.max_strength);
- cols.add_formatted(0, buf, false);
-
- if (you.intel == you.max_intel)
- snprintf(buf, sizeof buf, "Int : %3d", you.intel);
- else
- snprintf(buf, sizeof buf, "Int : <yellow>%3d</yellow> (%d)",
- you.intel, you.max_intel);
- cols.add_formatted(0, buf, false);
-
- if (you.dex == you.max_dex)
- snprintf(buf, sizeof buf, "Dex : %3d", you.dex);
- else
- snprintf(buf, sizeof buf, "Dex : <yellow>%3d</yellow> (%d)",
- you.dex, you.max_dex);
- cols.add_formatted(0, buf, false);
-
- snprintf(buf, sizeof buf,
- "AC : %3d\n"
- "Evasion : %3d\n"
- "Shield : %3d\n",
- player_AC(),
- player_evasion(),
- player_shield_class());
- cols.add_formatted(0, buf, false);
-
- if (you.real_time != -1)
- {
- const time_t curr = you.real_time + (time(NULL) - you.start_time);
- snprintf(buf, sizeof buf,
- "Play time : %10s\n"
- "Turns : %10ld\n",
- make_time_string(curr, true).c_str(), you.num_turns );
- cols.add_formatted(0, buf, true);
- }
-
- const int rfire = player_res_fire(calc_unid);
- const int rcold = player_res_cold(calc_unid);
- const int rlife = player_prot_life(calc_unid);
- const int rpois = player_res_poison(calc_unid);
- const int relec = player_res_electricity(calc_unid);
-
- snprintf(buf, sizeof buf, "\n\n"
- "%sRes.Fire : %s\n"
- "%sRes.Cold : %s\n"
- "%sLife Prot.: %s\n"
- "%sRes.Poison: %s\n"
- "%sRes.Elec. : %s\n",
- _determine_color_string(rfire), itosym3(rfire),
- _determine_color_string(rcold), itosym3(rcold),
- _determine_color_string(rlife), itosym3(rlife),
- _determine_color_string(rpois), itosym1(rpois),
- _determine_color_string(relec), itosym1(relec));
- cols.add_formatted(1, buf, false);
-
- const int rsust = player_sust_abil(calc_unid);
- const int rmuta = wearing_amulet(AMU_RESIST_MUTATION, calc_unid);
- const int rslow = wearing_amulet(AMU_RESIST_SLOW, calc_unid);
- const int rclar = wearing_amulet(AMU_CLARITY, calc_unid);
-
- snprintf(buf, sizeof buf,
- "%sSust.Abil.: %s\n"
- "%sRes.Mut. : %s\n"
- "%sRes.Slow : %s\n"
- "%sClarity : %s\n \n",
- _determine_color_string(rsust), itosym1(rsust),
- _determine_color_string(rmuta), itosym1(rmuta),
- _determine_color_string(rslow), itosym1(rslow),
- _determine_color_string(rclar), itosym1(rclar));
- cols.add_formatted(1, buf, true);
-
- {
- const int e_order[] =
- {
- EQ_WEAPON, EQ_BODY_ARMOUR, EQ_SHIELD, EQ_HELMET, EQ_CLOAK,
- EQ_GLOVES, EQ_BOOTS, EQ_AMULET, EQ_RIGHT_RING, EQ_LEFT_RING
- };
-
- for (int i = 0; i < NUM_EQUIP; i++)
- {
- int eqslot = e_order[i];
- const char *slot = equip_slot_to_name( eqslot );
-
- if ( you.equip[ e_order[i] ] != -1)
- {
- const item_def& item = you.inv[you.equip[e_order[i]]];
- const char* colname = colour_to_str(item.colour);
- snprintf(buf, sizeof buf, "%-7s: <%s>%s</%s>",
- slot, colname,
- item.name(DESC_PLAIN).substr(0,38).c_str(), colname);
- }
- else
- {
- if (e_order[i] == EQ_WEAPON)
- {
- if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BLADE_HANDS)
- snprintf(buf, sizeof buf, "%-7s: Blade Hands", slot);
- else if (you.skills[SK_UNARMED_COMBAT])
- snprintf(buf, sizeof buf, "%-7s: Unarmed", slot);
- else
- snprintf(buf, sizeof buf, "%-7s:", slot);
- }
- else
- {
- snprintf(buf, sizeof buf, "%-7s:", slot);
- }
- }
- cols.add_formatted(1, buf, false);
- }
- }
-
- const int rinvi = player_see_invis(calc_unid);
- const int rward = (wearing_amulet(AMU_WARDING, calc_unid)
- || you.religion == GOD_VEHUMET && !player_under_penance()
- && you.piety >= piety_breakpoint(2));
- const int rcons = wearing_amulet(AMU_CONSERVATION, calc_unid);
- const int rcorr = wearing_amulet(AMU_RESIST_CORROSION, calc_unid);
-
- snprintf(buf, sizeof buf, "\n\n"
- "%sSee Invis. : %s\n"
- "%sWarding : %s\n"
- "%sConserve : %s\n"
- "%sRes.Corr. : %s\n",
- _determine_color_string(rinvi), itosym1(rinvi),
- _determine_color_string(rward), itosym1(rward),
- _determine_color_string(rcons), itosym1(rcons),
- _determine_color_string(rcorr), itosym1(rcorr));
- cols.add_formatted(2, buf, false);
-
- int saplevel = player_mutation_level(MUT_SAPROVOROUS);
- const char* pregourmand;
- const char* postgourmand;
- if ( wearing_amulet(AMU_THE_GOURMAND, calc_unid) )
- {
- pregourmand = "Gourmand : ";
- postgourmand = itosym1(1);
- saplevel = 1;
- }
- else
- {
- pregourmand = "Saprovore : ";
- postgourmand = itosym3(saplevel);
- }
- snprintf(buf, sizeof buf, "%s%s%s",
- _determine_color_string(saplevel), pregourmand, postgourmand);
- cols.add_formatted(2, buf, false);
-
- cols.add_formatted(2, " \n", false);
-
- if ( scan_randarts(RAP_PREVENT_TELEPORTATION, calc_unid) )
- {
- snprintf(buf, sizeof buf, "%sPrev.Telep.: %s",
- _determine_color_string(-1), itosym1(1));
- }
- else
- {
- const int rrtel = !!player_teleport(calc_unid);
- snprintf(buf, sizeof buf, "%sRnd.Telep. : %s",
- _determine_color_string(rrtel), itosym1(rrtel));
- }
- cols.add_formatted(2, buf, false);
-
- const int rctel = player_control_teleport(calc_unid);
- const int rlevi = player_is_airborne();
- const int rcfli = wearing_amulet(AMU_CONTROLLED_FLIGHT, calc_unid);
- snprintf(buf, sizeof buf,
- "%sCtrl.Telep.: %s\n"
- "%sLevitation : %s\n"
- "%sCtrl.Flight: %s\n",
- _determine_color_string(rctel), itosym1(rctel),
- _determine_color_string(rlevi), itosym1(rlevi),
- _determine_color_string(rcfli), itosym1(rcfli));
- cols.add_formatted(2, buf, false);
-
- return cols.formatted_lines();
-}
-
static std::string _status_mut_abilities(void);
// helper for print_overview_screen