|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:57
|
Module: performous
Branch: dance
Commit: d0ecd40f969ed90411fc594f5e5c25962fcb9411
Author: Tapio Vierros <tap...@gm...>
Date: Tue Dec 1 17:14:36 2009 +0200
Whammy tweaks.
---
game/guitargraph.cc | 9 ++++-----
game/guitargraph.hh | 2 +-
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index d06b21c..7d0b806 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -198,9 +198,9 @@ void GuitarGraph::engine() {
double last = std::min(time, ev.dur->end);
double t = last - ev.holdTime;
if (t > 0) {
- // Minimal points for long holds unless whammy is used
- double wfactor = (ev.dur->end - ev.dur->begin < 1.5 || ev.whammy.get() > 0.01
- || m_starpower.get() > 0.01) ? 1.0 : 0.2;
+ // No points for long holds unless whammy is used
+ double wfactor = (time - ev.dur->begin < 1.5 || ev.whammy.get() > 0.01
+ || m_starpower.get() > 0.01) ? 1.0 : 0.0;
m_score += t * 50.0 * wfactor;
// Whammy fills starmeter much faster
m_starmeter += t * 50 * ( (ev.whammy.get() > 0.01) ? 2.0 : 1.0 );
@@ -615,8 +615,7 @@ void GuitarGraph::drawNote(int fret, glutil::Color c, float tBeg, float tEnd, fl
if (whammy > 0.1) {
while ((y -= fretWid) > yEnd + fretWid) {
float r = rand() / double(RAND_MAX);
- float r2 = rand() / double(RAND_MAX);
- vertexPair(x+cos(y*whammy)/4.0+(r-0.5)/4.0, y, c, r2*0.30 + 0.20);
+ vertexPair(x+cos(y*whammy)/4.0+(r-0.5)/4.0, y, c, 0.5f);
}
} else {
while ((y -= 10.0) > yEnd + fretWid) vertexPair(x, y, c, 0.5f);
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index f00ab96..e5fa231 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -104,7 +104,7 @@ class GuitarGraph {
int fret;
Duration const* dur;
double holdTime;
- Event(double t, int ty, int f = -1, Duration const* d = NULL): time(t), glow(0.0, 5.0), whammy(0.0, 1.2), type(ty), fret(f), dur(d), holdTime(d ? d->begin : getNaN()) { if (type > 0) glow.setValue(1.0); }
+ Event(double t, int ty, int f = -1, Duration const* d = NULL): time(t), glow(0.0, 5.0), whammy(0.0, 0.5), type(ty), fret(f), dur(d), holdTime(d ? d->begin : getNaN()) { if (type > 0) glow.setValue(1.0); }
};
typedef std::vector<Event> Events;
Events m_events;
|