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-23 20:35:26 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-23 20:35:26 +0000
commit7ace26d7f10f5eaefbe12f454183c88dbcb09b73 (patch)
tree2ebb22fede59d48e68a8fe4ba2fe976eae2f22ac /crawl-ref/source/output.cc
parent5ab24723edffd09f81cbfb6634fa1b175ed9d054 (diff)
downloadcrawl-ref-7ace26d7f10f5eaefbe12f454183c88dbcb09b73.tar.gz
crawl-ref-7ace26d7f10f5eaefbe12f454183c88dbcb09b73.zip
Finally remove the code that was preventing the coloured bars from
updating while resting in Tiles. With the overhaul of the drawing routines (already one or two months old) it's not needed anymore, and I really should have reacted to the new circumstances sooner. :P git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6088 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r--crawl-ref/source/output.cc21
1 files changed, 6 insertions, 15 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index fa1b681c57..c44a882701 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -77,12 +77,13 @@ class colour_bar
m_old_disp(-1),
m_request_redraw_after(0)
{
- // m_old_disp < 0 means it's invalid and needs to be initialized
+ // m_old_disp < 0 means it's invalid and needs to be initialized.
}
bool wants_redraw() const
{
- return (m_request_redraw_after && you.num_turns >= m_request_redraw_after);
+ return (m_request_redraw_after
+ && you.num_turns >= m_request_redraw_after);
}
void draw(int ox, int oy, int val, int max_val)
@@ -94,16 +95,6 @@ class colour_bar
return;
}
-#ifdef USE_TILE
- // Don't redraw colour bars while resting
- // *unless* we'll stop doing so right after that
- if (you.running >= 2 && is_resting() && val != max_val)
- {
- m_old_disp = -1;
- return;
- }
-#endif
-
const int width = crawl_view.hudsz.x - (ox-1);
const int disp = width * val / max_val;
const int old_disp = (m_old_disp < 0) ? disp : m_old_disp;
@@ -115,7 +106,7 @@ class colour_bar
for (int cx = 0; cx < width; cx++)
{
#ifdef USE_TILE
- // maybe this should use textbackground too?
+ // Maybe this should use textbackground too?
textcolor(BLACK + m_empty * 16);
if (cx < disp)
@@ -129,12 +120,12 @@ class colour_bar
textcolor(m_default);
putch('=');
}
- else if (/* old_disp <= cx && */ cx < disp)
+ else if (cx < disp)
{
textcolor(m_change_pos);
putch('=');
}
- else if (/* disp <= cx && */ cx < old_disp)
+ else if (cx < old_disp)
{
textcolor(m_change_neg);
putch('-');