|
From: Tapio V. <aa...@us...> - 2009-12-10 21:08:05
|
Module: performous
Branch: dance
Commit: f845b39ec1d27bcde802fd5ad7fb853bc1ea94b8
Author: Tapio Vierros <tap...@gm...>
Date: Thu Dec 10 23:07:03 2009 +0200
Improvements into dance hold note drawing.
---
game/dancegraph.cc | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 482c470..b1eb290 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -334,15 +334,17 @@ void DanceGraph::drawNote(DanceNote& note, double time) {
note.hitAnim.setTarget(1.0, false);
}
double glow = note.hitAnim.get();
+
+ // Modify hold drawing coordinates
+ if (note.isHit && note.releaseTime <= 0) {
+ yBeg = std::max(time2y(0.0), yBeg);
+ yEnd = std::max(time2y(0.0), yEnd);
+ }
+ if (note.releaseTime > 0) yBeg = time2y(note.releaseTime - time);
if (yEnd - yBeg > arrowSize) {
- // Draw holds
- if (note.isHit && note.releaseTime <= 0) {
- yBeg = std::max(time2y(0.0), yBeg);
- yEnd = std::max(time2y(0.0), yEnd);
- }
- if (note.releaseTime > 0) yBeg = time2y(note.releaseTime - time);
- if (yEnd - yBeg > 0) {
+ // Draw hold
+ {
UseTexture tblock(m_arrows_hold);
glutil::Begin block(GL_TRIANGLE_STRIP);
// Draw end
@@ -353,10 +355,6 @@ void DanceGraph::drawNote(DanceNote& note, double time) {
vertexPair(arrow_i, x, yBeg+arrowSize, 1.0f/3.0f);
}
// Draw begin
- if (note.isHit && tEnd < 0.1) {
- glColor4f(1.0f, 1.0f, 1.0f, 1.0 - glow);
- s += glow;
- }
drawArrow(arrow_i, m_arrows_hold, x, yBeg, s, 0.0f, 1.0f/3.0f);
} else {
// Draw short note
|