|
From: knittl <kn...@us...> - 2009-08-03 08:39:35
|
Module: performous
Branch: master
Commit: f2898c5e6ed13a80377043d161c2a7ba7c4f2be8
Author: Lasse Karkkainen <tro...@tr...>
Date: Fri Jul 31 07:49:25 2009 +0300
Increase GF compatibility.
---
game/guitargraph.cc | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index fe172b9..8d32158 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -17,7 +17,10 @@ namespace {
const float texCoordStep = -0.5f; // Two beat lines per neck texture => 0.5 tex units per beat
// Note: t is difference from playback time so it must be in range [past, future]
float time2y(float t) { return -timescale * (t - past) / (future - past); }
- float time2a(float t) { return 1.0f - t / future; } // Note: we want 1.0 alpha already at zero t.
+ float time2a(float t) {
+ float a = clamp(1.0 - t / future); // Note: we want 1.0 alpha already at zero t.
+ return std::pow(a, 0.8); // Nicer curve
+ }
bool fretPressed[5] = {};
bool fretHit[5] = {};
bool picked = false;
|