diff options
author | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-20 15:55:02 +0000 |
---|---|---|
committer | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-20 15:55:02 +0000 |
commit | 7349f13b440e1a5b00a5ffff01880d130ae34c1d (patch) | |
tree | e8ac9a63b7232214880fe451d05cee02e565bc2e /crawl-ref/source/output.cc | |
parent | 63c41258742464e2591a0e33a088303fe428f7b5 (diff) | |
download | crawl-ref-7349f13b440e1a5b00a5ffff01880d130ae34c1d.tar.gz crawl-ref-7349f13b440e1a5b00a5ffff01880d130ae34c1d.zip |
Fixing tiles slowdowns while resting.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7886 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r-- | crawl-ref/source/output.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 76058d803b..eb0e98043a 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -784,6 +784,20 @@ static void _print_status_lights(int y) } } +static bool _need_stats_printed() +{ + return you.redraw_hit_points + || you.redraw_magic_points + || you.redraw_armour_class + || you.redraw_evasion + || you.redraw_strength + || you.redraw_intelligence + || you.redraw_dexterity + || you.redraw_experience + || you.wield_change + || you.redraw_quiver; +} + void print_stats(void) { textcolor(LIGHTGREY); @@ -797,6 +811,10 @@ void print_stats(void) if (MP_Bar.wants_redraw()) you.redraw_magic_points = true; +#ifdef USE_TILE + bool has_changed = _need_stats_printed(); +#endif + if (you.redraw_hit_points) { you.redraw_hit_points = false; _print_stats_hp ( 1, 3); } if (you.redraw_magic_points) { you.redraw_magic_points = false; _print_stats_mp ( 1, 4); } if (you.redraw_armour_class) { you.redraw_armour_class = false; _print_stats_ac ( 1, 5); } @@ -862,7 +880,12 @@ void print_stats(void) } textcolor(LIGHTGREY); +#ifdef USE_TILE + if (has_changed) + update_screen(); +#else update_screen(); +#endif } static std::string _level_description_string_hud() |