|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:56
|
Module: performous
Branch: dance
Commit: 7818f90de440932fb53d1a016405321f1660b76c
Author: Tapio Vierros <tap...@gm...>
Date: Tue Dec 1 16:08:57 2009 +0200
Moved some stuff away from the huge GuitarGraph::draw()
---
game/guitargraph.cc | 7 ++++++-
game/guitargraph.hh | 1 +
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 9103b9e..d06b21c 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -531,6 +531,12 @@ void GuitarGraph::draw(double time) {
m_neckglow.dimensions.screenBottom(0.0).middle(offsetX).fixedWidth(m_width.get());
m_neckglow.draw();
}
+ drawInfo(time, offsetX);
+ glColor3f(1.0f, 1.0f, 1.0f);
+}
+
+/// Draw popups and other info texts
+void GuitarGraph::drawInfo(double time, double offsetX) {
// Is Starpower ready?
if (canActivateStarpower(m_starmeter)) {
float a = (int(time * 1000.0) % 1000) / 1000.0;
@@ -563,7 +569,6 @@ void GuitarGraph::draw(double time) {
m_popupText->draw();
if (godAnim > 0.999) m_godmodePopup.setTarget(0.0, true);
}
- glColor3f(1.0f, 1.0f, 1.0f);
}
namespace {
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index 7f73b28..f00ab96 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -113,6 +113,7 @@ class GuitarGraph {
glutil::Color const& color(int fret) const;
void drawBar(double time, float h);
void drawNote(int fret, glutil::Color, float tBeg, float tEnd, float whammy = 0, bool tappable = false);
+ void drawInfo(double time, double offsetX);
void nextTrack();
void difficultyAuto(bool tryKeepCurrent = false);
bool difficulty(Difficulty level);
|