Add an (easily commented-out) _print_stats_line4_monsters(), that dumps JPEG's monster list to the screen. Lots of polish needed; see the comments
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3847 c06c8d41-db1a-0410-9941-cceddc491573
3VWSZUGYL36SO5AOZRASGK3VHFCFZUGGCGRT3R7BZB36IZPN7OSQC
RFWBCOV6W3HUILU4D5QI4KOF3XXEXQH7I4OQMYRL432HAA6VYKBAC
GYHTPT7ZDQD646I5MIVVWVLIIOR7DILHFMWWUMXE63GYSDLYUT3QC
O4DT3BQQ3XYPL6PQ72G6VPBAVHXZMEOLONFXNHXFMBXBVOYMB6VQC
6PNVX6Q45HH733TZDXYBA6BYPJKDMND5BA4N2MP6HA3QVNCEPN2QC
ENOQQ6DEA6ECRNTBGYYNK7G3DFEILMKQBNKP4SUQIZW2L6HWVR7QC
XX62GOJVDP352L4BH7MELNYXHMZNA6VAGF7B6RWWOSULX7VJR5YAC
YIIILIV4ZPRIPWWT4GL7YWSJCUVH6RJJLXV4XIHY6SF3H7Y3EAYAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
25CH7HH4LKXFIZ75YNMXS3TSXO6O27DYSOPLOD45K4OCNFWLS4LQC
EOMCPVNQLX3IMLC46EAO67DPBH5KEG2FQTPBLGU62HIRWA3UQ7XQC
74LQ7JXVLAFSHLI7LCBKFX47CNTYSKGUQSXNX5FCIUIGCC2JTR3QC
DCBP5ZRHDECNNIN5JB57IOHNJTM3TFQTM3LRC46DUNQALKXYQKNQC
YWYXUCZKGNIAWAUKUESIPFCAL5HZOKOEWHUEUW7X4DMAX2HG2FSAC
LIBWXPN6HLJAIGEFJYLOL4HLIUD236U3WM5QPHIZ3DSB4CCUJERAC
IHOKNI4O7EEW4UBMKHP6XOZNEIQSW4AYOT4O3JXUIXNNR553IQAQC
QSJECU2LZOQ5K5QUQDQOPQ4J3GAZEE5ZWIIM4DVBXYLVVX5DYLWQC
PS2BPOBKMUTQPFSQX4MTQ3A7B6MQGLWKTRAGUZED47KCWF5DPCJAC
I2B33Z7NZGC33AMDSSK446AZZYWKPHWLAGULVHKKZU4MVB4BNJOAC
KKEPQAZMWQFWPQ4P4KT5PWG2YFPG7H4JHL5K7USVHQ3Y6L4NWURQC
SCNVGV5WCDZK5OAJBYCAGSINHGIDANF3WXQCM5JVITL2I6RWMLMAC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
22RFWMSJGG26Z2MQEEXGKVTFSTLREHQIG46WYOTMDRKI5YVMRNVAC
GSPHLNMEIUY5KSOV2LPKQLGJVBPGHXZENIXSJELA6ZBT74F5ZGRQC
CH7JECYYH35H4TRHRNRTRJCQTQLZ2WRH62TKV72SUIU2RTK5OH7AC
CIPVRZGLOZHCERK6YPOBV3P2E4IAB4H6D5EHLRQE2O5E4P4VCBUAC
3D6NWJ44UYHLZMD3BOQIWXJUEGITAVCHK6Z2WWDQONVQC4HSBRXQC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
RR2J4VLJCZSAKY3HNS334KI4YUAPOMSETO2HGCGEEIUCUJAYAGSQC
NQIXUYGUIQTKZUB2IQDII7BBDMZ4VN4NUUTGT2ARQBZTDJUMPKRQC
RPGERJQMO2J4ZDYTRHJCLZMXDVSTUOOJURSZ7FPWOUFHTXIV5VIAC
FVT2J6IVMSQZYKQGUHQVGT4ADYM7AWUQ4U7766GBRRFMSR2WBMLAC
5S3CAGZSAQC3CYFPM5TQFPHW5IE2OZRVFJMICQZXHBZRGKFMNPRQC
ZKOL5BF2RJV7K53YGYSBTUUBLYHQZVJWCFP7JR72ETZV2I7DZNKAC
YMC3RKF4Z7DOHZNGG7INC343SXCTWOPK7ISD42I3WA3AZZNVBGIAC
RM2JXW3ATVYRYHF3NMG5ALGI64OJ7IP2F3MDUDPUT5TBKSSN4KVQC
6RJVKSL7RVZIZIZIC4TWIYJQ24RUSB346ODS3NYGDHUIRTC4Z5FQC
3YBQGKQ22WFXA5RXDSKLFWMABLJ6KHBVWEIA3WIDHWM25OECNTYAC
36SHRKVELEOW7PUDHUS2ONWI6OEHUTP6NBFGOT4GR6ZS3QZRTK5AC
XUCCWGMXKPIR34BBCCOI67YHI3RST4STDWSDUZTN4B2CJWXQLQ7AC
LJK4ZQATLSB4MKZG3ARZX5V6RFGTN3NLCN6GTCUGJQKU26SOXMUAC
QDTVLBRGHDTRUVT7I3O72K6TMOYAUSAJBZUHGOEFU2RKJNUPWZSQC
X76YXE6RFL7QY5WL6MSSS44WHVA5FQMDQY3XTYP2UL6UZB4E6XMQC
RGY2525RQH7SSGM6ZVI7CZL4WMNFZK2WRABOSIWRKQYYOU2RWN4QC
6GT5JAWOIIL4SQ5MWIID6ZVO3KKQFWDQDZNVFHZ6DNK5QCBXJ4UAC
int mp_percent;
if ( you.max_magic_points )
mp_percent = (you.magic_points * 100) / you.max_magic_points;
else
mp_percent = 100;
for ( unsigned int i = 0; i < Options.mp_colour.size(); ++i )
{
if ( i+1 == Options.mp_colour.size() ||
mp_percent > Options.mp_colour[i+1].first )
{
textcolor(Options.mp_colour[i].second);
break;
}
}
cgotoxy(8, 4, GOTO_STAT);
cprintf( "%d", you.magic_points);
if (you.redraw_armour_class || you.wield_change)
TilePlayerRefresh();
int col = count_digits(you.magic_points) +
count_digits(you.max_magic_points) + 1;
for (int i = 12-col; i > 0; i--)
cprintf(" ");
draw_mp_bar(you.magic_points, you.max_magic_points);
#else
clear_to_end_of_line();
// Displayed evasion is now tied to dex.
if (you.redraw_dexterity)
you.redraw_evasion = true;
// Helper for print_stats
static void _print_stats_hp()
{
const int max_max_hp = you.hp_max + player_rotted();
int hp_percent;
if ( max_max_hp )
hp_percent = (you.hp * 100) / max_max_hp;
else
hp_percent = 100;
const int max_max_hp = you.hp_max + player_rotted();
int hp_percent;
if ( max_max_hp )
hp_percent = (you.hp * 100) / max_max_hp;
else
hp_percent = 100;
for ( unsigned int i = 0; i < Options.hp_colour.size(); ++i )
if ( i+1 == Options.hp_colour.size() ||
hp_percent > Options.hp_colour[i+1].first )
int col = count_digits(you.hp)+count_digits(you.hp_max) + 1;
if (max_max_hp != you.hp_max)
col += count_digits(max_max_hp) + 3;
for (int i = 15-col; i > 0; i--)
cprintf(" ");
draw_hp_bar(you.hp, you.hp_max);
int col = count_digits(you.hp)+count_digits(you.hp_max) + 1;
if (max_max_hp != you.hp_max)
col += count_digits(max_max_hp) + 3;
for (int i = 15-col; i > 0; i--)
cprintf(" ");
draw_hp_bar(you.hp, you.hp_max);
if (you.redraw_magic_points)
{
int mp_percent;
if ( you.max_magic_points )
mp_percent = (you.magic_points * 100) / you.max_magic_points;
else
mp_percent = 100;
for ( unsigned int i = 0; i < Options.mp_colour.size(); ++i )
{
if ( i+1 == Options.mp_colour.size() ||
mp_percent > Options.mp_colour[i+1].first )
{
textcolor(Options.mp_colour[i].second);
break;
}
}
cgotoxy(8, 4, GOTO_STAT);
static void _print_stats_str()
{
if (you.strength < 0)
you.strength = 0;
else if (you.strength > 72)
you.strength = 72;
if (you.max_strength > 72)
you.max_strength = 72;
#ifdef USE_TILE
int col = count_digits(you.magic_points) +
count_digits(you.max_magic_points) + 1;
for (int i = 12-col; i > 0; i--)
cprintf(" ");
draw_mp_bar(you.magic_points, you.max_magic_points);
#else
clear_to_end_of_line();
#endif
}
if (you.strength != you.max_strength)
cprintf( " (%d) ", you.max_strength );
else
cprintf( " " );
if (you.duration[DUR_MIGHT])
textcolor(LIGHTBLUE); // no end of effect warning
else if (you.strength < you.max_strength)
textcolor(YELLOW);
cgotoxy(6, 8, GOTO_STAT);
if (you.strength != you.max_strength)
cprintf( " (%d) ", you.max_strength );
else
cprintf( " " );
cprintf( "%d", you.intel );
textcolor(LIGHTGREY);
if (you.intel != you.max_intel)
cprintf( " (%d) ", you.max_intel );
else
cprintf( " " );
static void _print_stats_ac()
{
cgotoxy(5, 5, GOTO_STAT);
you.redraw_intelligence = 0;
if (you.duration[DUR_STONEMAIL])
dur_colour( BLUE, (you.duration[DUR_STONEMAIL] <= 6) );
else if (you.duration[DUR_ICY_ARMOUR] || you.duration[DUR_STONESKIN])
textcolor( LIGHTBLUE ); // no end of effect warning
cprintf( "%d ", player_AC() );
textcolor( LIGHTGREY );
cgotoxy(11, 5, GOTO_STAT);
if (you.duration[DUR_CONDENSATION_SHIELD]
|| you.duration[DUR_DIVINE_SHIELD])
{
textcolor( LIGHTBLUE ); // no end of effect warning
cgotoxy(6, 9, GOTO_STAT);
cprintf("%s",
wpn.name(DESC_INVENTORY, true)
.substr(0, crawl_view.hudsz.x - 5).c_str());
textcolor(LIGHTGREY);
}
else
{
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BLADE_HANDS)
{
textcolor(RED);
cprintf("Blade Hands");
textcolor(LIGHTGREY);
}
else
{
textcolor(LIGHTGREY);
cprintf("Nothing wielded");
}
}
clear_to_end_of_line();
}
if (you.dex != you.max_dex)
cprintf( " (%d) ", you.max_dex );
else
cprintf( " " );
const std::string prefix = menu_colour_item_prefix(quiver);
const int prefcol =
menu_colour(quiver.name(DESC_INVENTORY), prefix);
if (prefcol != -1)
textcolor(prefcol);
if (you.redraw_armour_class)
// The colour scheme for these flags is currently:
//
// - yellow, "orange", red for bad conditions
// - light grey, white for god based conditions
// - green, light green for good conditions
// - blue, light blue for good enchantments
// - magenta, light magenta for "better" enchantments (deflect, fly)
static void _print_stats_line1()
{
cgotoxy(1, 15, GOTO_STAT);
clear_to_end_of_line();
cgotoxy(1, 15, GOTO_STAT);
switch (you.burden_state)
if (you.duration[DUR_STONEMAIL])
dur_colour( BLUE, (you.duration[DUR_STONEMAIL] <= 6) );
else if (you.duration[DUR_ICY_ARMOUR] || you.duration[DUR_STONESKIN])
textcolor( LIGHTBLUE ); // no end of effect warning
case BS_ENCUMBERED:
textcolor( LIGHTRED );
cprintf( "Encumbered " );
break;
case BS_UNENCUMBERED:
break;
}
if (you.duration[DUR_CONDENSATION_SHIELD]
|| you.duration[DUR_DIVINE_SHIELD])
{
textcolor( LIGHTBLUE ); // no end of effect warning
}
cprintf( "(%d) ", player_shield_class() );
textcolor( LIGHTGREY );
case HS_HUNGRY:
case HS_VERY_HUNGRY:
case HS_NEAR_STARVING:
textcolor( YELLOW );
break;
cprintf( "%d ", player_evasion() );
textcolor(LIGHTGREY);
// For colors, see comment at _print_stats_line1
static void _print_stats_line2()
{
cgotoxy(1, 16, GOTO_STAT);
clear_to_end_of_line();
cgotoxy(1, 16, GOTO_STAT);
// Max length of this line = 8 * 5 - 1 = 39
if (you.duration[DUR_PRAYER])
{
textcolor( WHITE ); // no end of effect warning
cprintf( "Pray " );
}
cgotoxy(7, 10, GOTO_STAT);
cprintf( "%-8d", you.gold );
you.redraw_gold = 0;
textcolor( LIGHTBLUE );
cprintf( "Tele " );
#if DEBUG_DIAGNOSTICS
cprintf( "%d/%lu (%d/%d)",
you.experience_level, you.experience,
you.skill_cost_level, you.exp_available );
#else
cprintf( "%d/%lu (%d)",
you.experience_level, you.experience, you.exp_available );
#endif
dur_colour( MAGENTA, (you.duration[DUR_DEFLECT_MISSILES] <= 6) );
cprintf( "DMsl " );
}
else if (you.duration[DUR_REPEL_MISSILES])
{
dur_colour( BLUE, (you.duration[DUR_REPEL_MISSILES] <= 6) );
cprintf( "RMsl " );
}
cgotoxy(1, 13, GOTO_STAT);
textcolor(Options.status_caption_colour);
cprintf("Wp: ");
if (you.weapon())
{
const item_def& wpn = *you.weapon();
textcolor(wpn.colour);
dur_colour( BLUE, (you.duration[DUR_INSULATION] <= 6) );
cprintf( "Ins " );
}
const std::string prefix = menu_colour_item_prefix(wpn);
const int prefcol = menu_colour(wpn.name(DESC_INVENTORY), prefix);
if (prefcol != -1)
textcolor(prefcol);
if (player_is_airborne())
{
const bool perm = you.permanent_flight();
cprintf("%s",
wpn.name(DESC_INVENTORY, true)
.substr(0, crawl_view.hudsz.x - 5).c_str());
textcolor(LIGHTGREY);
if (wearing_amulet( AMU_CONTROLLED_FLIGHT ))
{
dur_colour( you.light_flight()? BLUE : MAGENTA,
(you.duration[DUR_LEVITATION] <= 10 && !perm) );
cprintf( "Fly " );
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BLADE_HANDS)
{
textcolor(RED);
cprintf("Blade Hands");
textcolor(LIGHTGREY);
}
else
{
textcolor(LIGHTGREY);
cprintf("Nothing wielded");
}
dur_colour(BLUE, (you.duration[DUR_LEVITATION] <= 10 && !perm));
cprintf( "Lev " );
cgotoxy(1, 14, GOTO_STAT);
textcolor(Options.status_caption_colour);
cprintf("Qv: ");
int q = you.quiver[get_quiver_type()] = get_current_fire_item();
dur_colour( BLUE, (you.duration[DUR_INVIS] <= 6) );
cprintf( "Invis " );
}
if (q != ENDOFPACK)
{
const item_def& quiver = you.inv[q];
textcolor(quiver.colour);
if (you.duration[DUR_SILENCE])
{
dur_colour( BLUE, (you.duration[DUR_SILENCE] <= 5) );
cprintf( "Sil " );
}
const std::string prefix = menu_colour_item_prefix(quiver);
const int prefcol =
menu_colour(quiver.name(DESC_INVENTORY), prefix);
if (prefcol != -1)
textcolor(prefcol);
cprintf("%s",
quiver.name(DESC_INVENTORY, true)
.substr(0, crawl_view.hudsz.x - 5)
.c_str());
textcolor(LIGHTGREY);
}
else
textcolor(LIGHTGREY);
clear_to_end_of_line();
you.quiver_change = false;
// Perhaps this should be reversed to show when it can be used?
// In that case, it should be probably be GREEN, and we'd have
// to check to see if the player does have a breath weapon. -- bwr
if (you.duration[DUR_BREATH_WEAPON] &&
wherex() < get_number_of_cols() - 5)
{
textcolor( YELLOW ); // no warning
cprintf( "BWpn " );
}
if (you.duration[DUR_BARGAIN] && wherex() < get_number_of_cols() - 5)
{
dur_colour( BLUE, (you.duration[DUR_BARGAIN] <= 15) );
cprintf( "Brgn " );
// The colour scheme for these flags is currently:
//
// - yellow, "orange", red for bad conditions
// - light grey, white for god based conditions
// - green, light green for good conditions
// - blue, light blue for good enchantments
// - magenta, light magenta for "better" enchantments (deflect, fly)
cgotoxy(1, 15, GOTO_STAT);
clear_to_end_of_line();
cgotoxy(1, 15, GOTO_STAT);
dur_colour( BLUE, (you.duration[DUR_SAGE] <= 15) );
cprintf( "Sage " );
}
case BS_ENCUMBERED:
textcolor( LIGHTRED );
cprintf( "Encumbered " );
break;
// For colors, see comment at _print_stats_line1
static void _print_stats_line3()
{
cgotoxy(1, 17, GOTO_STAT);
clear_to_end_of_line();
cgotoxy(1, 17, GOTO_STAT);
// Max length of this line = 7 * 5 + 3 - 1 = 37
case BS_UNENCUMBERED:
break;
}
// Note the usage of bad_ench_colour() correspond to levels that
// can be found in player.cc, ie those that the player can tell by
// using the '@' command. Things like confusion and sticky flame
// hide their amounts and are thus always the same colour (so
// we're not really exposing any new information). --bwr
if (you.duration[DUR_CONF])
{
textcolor( RED ); // no different levels
cprintf( "Conf " );
}
if (you.duration[DUR_BEHELD])
{
textcolor( RED ); // no different levels
cprintf( "Bhld " );
}
switch (you.hunger_state)
{
case HS_ENGORGED:
textcolor( LIGHTGREEN );
break;
if (you.duration[DUR_LIQUID_FLAMES])
{
textcolor( RED ); // no different levels
cprintf( "Fire " );
}
case HS_VERY_FULL:
case HS_FULL:
case HS_SATIATED:
textcolor( GREEN );
break;
if (you.duration[DUR_POISONING])
{
// We skip marking "quite" poisoned and instead mark the
// levels where the rules for dealing poison damage change
// significantly. See acr.cc for that code. -- bwr
textcolor( bad_ench_colour( you.duration[DUR_POISONING], 5, 10 ) );
cprintf( "Pois " );
}
case HS_HUNGRY:
case HS_VERY_HUNGRY:
case HS_NEAR_STARVING:
textcolor( YELLOW );
break;
if (you.disease)
{
textcolor( bad_ench_colour( you.disease, 40, 120 ) );
cprintf( "Sick " );
}
case HS_STARVING:
textcolor( RED );
break;
}
const std::string state = describe_hunger();
if (!state.empty())
cprintf(state.c_str());
if (you.rotting)
{
textcolor( bad_ench_colour( you.rotting, 4, 8 ) );
cprintf( "Rot " );
}
#if DEBUG_DIAGNOSTICS
// debug mode hunger-o-meter
cprintf( " (%d:%d) ", you.hunger - you.old_hunger, you.hunger );
#endif
if (you.backlit())
{
textcolor(
you.magic_contamination > 5 ?
bad_ench_colour( you.magic_contamination, 15, 25 )
: LIGHTBLUE );
cprintf( "Glow " );
cgotoxy(1, 16, GOTO_STAT);
clear_to_end_of_line();
cgotoxy(1, 16, GOTO_STAT);
// Max length of this line = 8 * 5 - 1 = 39
dur_colour( BLUE, (you.duration[DUR_SWIFTNESS] <= 6) );
cprintf( "Swift " );
}
if (you.duration[DUR_PRAYER])
{
textcolor( WHITE ); // no end of effect warning
cprintf( "Pray " );
}
if (you.duration[DUR_SLOW] && !you.duration[DUR_HASTE])
{
textcolor( RED ); // no end of effect warning
cprintf( "Slow" );
}
else if (you.duration[DUR_HASTE] && !you.duration[DUR_SLOW])
{
dur_colour( BLUE, (you.duration[DUR_HASTE] <= 6) );
cprintf( "Fast" );
}
if (you.duration[DUR_TELEPORT])
{
textcolor( LIGHTBLUE );
cprintf( "Tele " );
}
static void _print_stats_line4_monsters(int start_row)
{
// TODO:
// - print monster glyph, in proper color
// - get health and friendliness in there (using color and/or text)
// - don't squeeze down into the message area
extern void get_visible_monsters(std::vector<std::string>& );
std::vector<std::string> describe;
get_visible_monsters(describe);
if (you.duration[DUR_DEFLECT_MISSILES])
{
const int max_print = get_number_of_lines()-start_row;
const int num_print = MIN(max_print, int(describe.size()));
// Print the visible monsters
for (int i=0; i<num_print; i++)
{
cgotoxy(1, start_row+i, GOTO_STAT);
clear_to_end_of_line();
cgotoxy(1, start_row+i, GOTO_STAT);
cprintf(describe[i].c_str());
}
dur_colour( MAGENTA, (you.duration[DUR_DEFLECT_MISSILES] <= 6) );
cprintf( "DMsl " );
}
else if (you.duration[DUR_REPEL_MISSILES])
{
dur_colour( BLUE, (you.duration[DUR_REPEL_MISSILES] <= 6) );
cprintf( "RMsl " );
}
if (you.duration[DUR_REGENERATION])
{
dur_colour( BLUE, (you.duration[DUR_REGENERATION] <= 6) );
cprintf( "Regen " );
}
if (you.duration[DUR_INSULATION])
{
dur_colour( BLUE, (you.duration[DUR_INSULATION] <= 6) );
cprintf( "Ins " );
}
if (player_is_airborne())
{
const bool perm = you.permanent_flight();
if (wearing_amulet( AMU_CONTROLLED_FLIGHT ))
{
dur_colour( you.light_flight()? BLUE : MAGENTA,
(you.duration[DUR_LEVITATION] <= 10 && !perm) );
cprintf( "Fly " );
}
else
{
dur_colour(BLUE, (you.duration[DUR_LEVITATION] <= 10 && !perm));
cprintf( "Lev " );
}
}
// Clear out the rest
for (int i=num_print; i<max_print; i++)
{
cgotoxy(1, start_row+i, GOTO_STAT);
clear_to_end_of_line();
}
}
if (you.duration[DUR_INVIS])
{
dur_colour( BLUE, (you.duration[DUR_INVIS] <= 6) );
cprintf( "Invis " );
}
void print_stats(void)
{
textcolor(LIGHTGREY);
// Perhaps this should be reversed to show when it can be used?
// In that case, it should be probably be GREEN, and we'd have
// to check to see if the player does have a breath weapon. -- bwr
if (you.duration[DUR_BREATH_WEAPON] &&
wherex() < get_number_of_cols() - 5)
{
textcolor( YELLOW ); // no warning
cprintf( "BWpn " );
}
if (you.duration[DUR_BARGAIN] && wherex() < get_number_of_cols() - 5)
{
dur_colour( BLUE, (you.duration[DUR_BARGAIN] <= 15) );
cprintf( "Brgn " );
}
// Displayed evasion is now tied to dex.
if (you.redraw_dexterity)
you.redraw_evasion = true;
if (you.duration[DUR_SAGE] && wherex() < get_number_of_cols() - 5)
{
dur_colour( BLUE, (you.duration[DUR_SAGE] <= 15) );
cprintf( "Sage " );
}
if (you.redraw_hit_points) { you.redraw_hit_points = false; _print_stats_hp(); }
if (you.redraw_magic_points) { you.redraw_magic_points = false; _print_stats_mp(); }
if (you.redraw_strength) { you.redraw_strength = false; _print_stats_str(); }
if (you.redraw_intelligence) { you.redraw_intelligence = false; _print_stats_int(); }
if (you.redraw_dexterity) { you.redraw_dexterity = false; _print_stats_dex(); }
if (you.redraw_armour_class) { you.redraw_armour_class = false; _print_stats_ac(); }
cgotoxy(1, 17, GOTO_STAT);
clear_to_end_of_line();
cgotoxy(1, 17, GOTO_STAT);
// Max length of this line = 7 * 5 + 3 - 1 = 37
cgotoxy(7, 10, GOTO_STAT);
cprintf( "%-8d", you.gold );
you.redraw_gold = 0;
}
// Note the usage of bad_ench_colour() correspond to levels that
// can be found in player.cc, ie those that the player can tell by
// using the '@' command. Things like confusion and sticky flame
// hide their amounts and are thus always the same colour (so
// we're not really exposing any new information). --bwr
if (you.duration[DUR_CONF])
{
textcolor( RED ); // no different levels
cprintf( "Conf " );
}
if (you.duration[DUR_BEHELD])
{
textcolor( RED ); // no different levels
cprintf( "Bhld " );
}
if (you.duration[DUR_LIQUID_FLAMES])
{
textcolor( RED ); // no different levels
cprintf( "Fire " );
}
if (you.duration[DUR_POISONING])
{
// We skip marking "quite" poisoned and instead mark the
// levels where the rules for dealing poison damage change
// significantly. See acr.cc for that code. -- bwr
textcolor( bad_ench_colour( you.duration[DUR_POISONING], 5, 10 ) );
cprintf( "Pois " );
}
if (you.redraw_experience)
{
cgotoxy(13, 11, GOTO_STAT);
if (you.disease)
{
textcolor( bad_ench_colour( you.disease, 40, 120 ) );
cprintf( "Sick " );
}
#if DEBUG_DIAGNOSTICS
cprintf( "%d/%lu (%d/%d)",
you.experience_level, you.experience,
you.skill_cost_level, you.exp_available );
#else
cprintf( "%d/%lu (%d)",
you.experience_level, you.experience, you.exp_available );
#endif
if (you.attribute[ATTR_HELD])
{
textcolor( RED );
cprintf( "Held " );
}
if (you.wield_change) { you.wield_change = false; _print_stats_wp(); }
if (you.quiver_change) { you.quiver_change = false; _print_stats_qv(); }
if (you.backlit())
{
textcolor(
you.magic_contamination > 5 ?
bad_ench_colour( you.magic_contamination, 15, 25 )
: LIGHTBLUE );
cprintf( "Glow " );
}
if (you.redraw_status_flags & REDRAW_LINE_1_MASK)
_print_stats_line1();
if (you.duration[DUR_SLOW] && !you.duration[DUR_HASTE])
{
textcolor( RED ); // no end of effect warning
cprintf( "Slow" );
}
else if (you.duration[DUR_HASTE] && !you.duration[DUR_SLOW])
{
dur_colour( BLUE, (you.duration[DUR_HASTE] <= 6) );
cprintf( "Fast" );
}
if (you.redraw_status_flags & REDRAW_LINE_3_MASK)
_print_stats_line3();