You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(288) |
Aug
(119) |
Sep
(31) |
Oct
(59) |
Nov
(458) |
Dec
(359) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(268) |
Feb
(26) |
Mar
(36) |
Apr
(48) |
May
(119) |
Jun
(37) |
Jul
(173) |
Aug
(429) |
Sep
(137) |
Oct
(156) |
Nov
(59) |
Dec
(45) |
| 2011 |
Jan
(398) |
Feb
(257) |
Mar
(49) |
Apr
(5) |
May
(34) |
Jun
(11) |
Jul
(38) |
Aug
(12) |
Sep
(1) |
Oct
(49) |
Nov
(5) |
Dec
(10) |
| 2012 |
Jan
(21) |
Feb
(32) |
Mar
(20) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(173) |
Aug
|
Sep
(25) |
Oct
(6) |
Nov
(44) |
Dec
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:30:43
|
Module: performous
Branch: instrumentgraph
Commit: cf97cf631b2b650e57eef46a69462fc17e11698a
Author: Tapio Vierros <tap...@gm...>
Date: Sun Apr 25 09:18:18 2010 +0300
Document lefty mode in instrument selection screen.
---
themes/default/instrumenthelp.svg | 51 ++++++++++++++++++++++++++++++++++--
1 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/themes/default/instrumenthelp.svg b/themes/default/instrumenthelp.svg
index 01690c1..de5d706 100644
--- a/themes/default/instrumenthelp.svg
+++ b/themes/default/instrumenthelp.svg
@@ -49,6 +49,20 @@
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2902"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2935"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
inkscape:window-height="791"
@@ -65,9 +79,9 @@
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
- inkscape:zoom="0.5"
- inkscape:cx="287.72345"
- inkscape:cy="261.06756"
+ inkscape:zoom="1.4142136"
+ inkscape:cx="525.81157"
+ inkscape:cy="402.48892"
inkscape:window-x="58"
inkscape:window-y="13"
inkscape:current-layer="svg5215"
@@ -463,4 +477,35 @@
x="297.83939"
y="495.83029"
style="text-align:center;text-anchor:start;stroke-width:1.01400006;stroke-miterlimit:4;stroke-dasharray:none">TO JOIN THE GAME</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:28px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;opacity:0.95;fill:#ffffff;fill-opacity:0.95;fill-rule:nonzero;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;font-family:Verdana;-inkscape-font-specification:Verdana"
+ x="695.70026"
+ y="310.90945"
+ id="text3241-6"><tspan
+ sodipodi:role="line"
+ x="695.70026"
+ y="310.90945"
+ id="tspan3245-4"
+ style="fill-rule:nonzero;stroke-width:0.89999998;stroke-miterlimit:4;stroke-dasharray:none">+ Lefty mode</tspan></text>
+ <path
+ sodipodi:type="arc"
+ style="fill:#ffff00;fill-opacity:0.87058824;fill-rule:nonzero;stroke:none"
+ id="path2925"
+ sodipodi:cx="152.38152"
+ sodipodi:cy="418.5715"
+ sodipodi:rx="38.537319"
+ sodipodi:ry="14.849242"
+ d="m 190.91883,418.5715 a 38.537319,14.849242 0 1 1 -77.07463,0 38.537319,14.849242 0 1 1 77.07463,0 z"
+ transform="matrix(0.41518197,0,0,1.0774961,606.80752,-150.6452)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#0000ff;fill-opacity:0.87058824;fill-rule:nonzero;stroke:none"
+ id="path2925-8"
+ sodipodi:cx="152.38152"
+ sodipodi:cy="418.5715"
+ sodipodi:rx="38.537319"
+ sodipodi:ry="14.849242"
+ d="m 190.91883,418.5715 a 38.537319,14.849242 0 1 1 -77.07463,0 38.537319,14.849242 0 1 1 77.07463,0 z"
+ transform="matrix(0.41518197,0,0,1.0774961,678.48896,-150.6452)" />
</svg>
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:30:39
|
Module: performous
Branch: instrumentgraph
Commit: afed70b8e9cd330abc58c20927b16f12cbd7ea7c
Author: Tapio Vierros <tap...@gm...>
Date: Sun Apr 25 09:16:13 2010 +0300
Lefty mode switch changed to yellow + blue for easier documenting and less accidental activations.
---
game/guitargraph.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 804f237..6005156 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -240,7 +240,7 @@ void GuitarGraph::engine() {
difficulty_changed = true;
}
// Lefty-mode switch
- if (ev.type == input::Event::PRESS && ev.pressed[1] && ev.pressed[(m_drums ? 2 : 0)])
+ if (ev.type == input::Event::PRESS && ev.pressed[2] && ev.pressed[3])
m_leftymode = !m_leftymode;
// Playing
} else if (m_drums) {
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:30:37
|
Module: performous
Branch: instrumentgraph
Commit: 6f98d85edd83005606d29653ef771ee69f8e43a7
Author: Tapio Vierros <tap...@gm...>
Date: Thu Apr 22 21:18:17 2010 +0300
Fix broken guitar lefty-mode switch.
---
game/guitargraph.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index e29b2fd..804f237 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -240,7 +240,7 @@ void GuitarGraph::engine() {
difficulty_changed = true;
}
// Lefty-mode switch
- if (ev.type == input::Event::PRESS && ev.pressed[1] && ev.pressed[(m_drums ? 2 : 1)])
+ if (ev.type == input::Event::PRESS && ev.pressed[1] && ev.pressed[(m_drums ? 2 : 0)])
m_leftymode = !m_leftymode;
// Playing
} else if (m_drums) {
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:30:36
|
Module: performous
Branch: instrumentgraph
Commit: 5e00aa00ca9951cae25421cc2bb2f7334a04d9d3
Author: Tapio Vierros <tap...@gm...>
Date: Wed Apr 21 12:49:59 2010 +0300
Lefty-mode for drums.
---
game/guitargraph.cc | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 1255692..e29b2fd 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -222,6 +222,9 @@ void GuitarGraph::engine() {
}
if (ev.type == input::Event::RELEASE) endHold(ev.button, time);
if (ev.type == input::Event::WHAMMY) whammy = (1.0 + ev.button + 2.0*(rand()/double(RAND_MAX))) / 4.0;
+ } else {
+ // Handle drum lefty-mode
+ if (m_leftymode && ev.button > 0) ev.button = 5 - ev.button;
}
// Keypress anims
if (ev.type == input::Event::PRESS) m_hit[!m_drums + ev.button].setValue(1.0);
@@ -237,7 +240,7 @@ void GuitarGraph::engine() {
difficulty_changed = true;
}
// Lefty-mode switch
- if (!m_drums && ev.type == input::Event::PRESS && ev.pressed[0] && ev.pressed[1])
+ if (ev.type == input::Event::PRESS && ev.pressed[1] && ev.pressed[(m_drums ? 2 : 1)])
m_leftymode = !m_leftymode;
// Playing
} else if (m_drums) {
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:30:35
|
Module: performous
Branch: instrumentgraph
Commit: ee397fce2972382fa00978d9e6e0e11d93d113f7
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Apr 22 08:27:48 2010 +0200
Added 2 ini files entries (creator and genre)
---
game/songparser-ini.cc | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/game/songparser-ini.cc b/game/songparser-ini.cc
index 679f991..04dcb63 100644
--- a/game/songparser-ini.cc
+++ b/game/songparser-ini.cc
@@ -71,6 +71,8 @@ void SongParser::iniParseHeader() {
else if (key == "cover") s.cover = value;
else if (key == "background") s.background = value;
else if (key == "video") s.video = value;
+ else if (key == "genre") s.genre = value;
+ else if (key == "frets") s.creator = value;
else if (key == "delay") { assign(s.start, value); s.start/=1000.0; }
else if (key == "video_start_time") { assign(s.videoGap, value); s.videoGap/=1000.0; }
else if (key == "preview_start_time") { assign(s.preview_start, value); s.preview_start/=1000.0; }
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:30:31
|
Module: performous
Branch: instrumentgraph
Commit: 03cf8629a9971732a456fda6e49e196ba69447e8
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Apr 21 11:34:43 2010 +0300
Midifile cleanup of previous patch
---
game/midifile.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/midifile.cc b/game/midifile.cc
index 054707d..0e05589 100644
--- a/game/midifile.cc
+++ b/game/midifile.cc
@@ -225,7 +225,7 @@ MidiFileParser::Track MidiFileParser::read_track(MidiStream& stream) {
case 0xC: case 0xD: break; // These only take one argument
default: throw std::runtime_error("Unknown MIDI event"); // Quite possibly this is impossible, but I am too tired to prove it.
}
- process_midi_event(track, event >> 4, arg1, arg2, miditime);
+ process_midi_event(track, ev, arg1, arg2, miditime);
}
}
if (miditime > ts_last) ts_last = miditime;
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:30:29
|
Module: performous
Branch: instrumentgraph
Commit: e87fb7d5e5c73908a2951a34be02657b0185cf3c
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Apr 21 02:25:52 2010 +0300
Fix MIDI parser handling of events 0xC and 0xD that would b0rk parsing until now
---
game/midifile.cc | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/game/midifile.cc b/game/midifile.cc
index f70465c..054707d 100644
--- a/game/midifile.cc
+++ b/game/midifile.cc
@@ -218,7 +218,13 @@ MidiFileParser::Track MidiFileParser::read_track(MidiStream& stream) {
} else {
// Midi event
uint8_t arg1 = riff.read_uint8();
- uint8_t arg2 = riff.read_uint8();
+ uint8_t arg2 = 0;
+ uint8_t ev = event >> 4;
+ switch (ev) {
+ case 0x8: case 0x9: case 0xA: case 0xB: case 0xE: arg2 = riff.read_uint8(); break;
+ case 0xC: case 0xD: break; // These only take one argument
+ default: throw std::runtime_error("Unknown MIDI event"); // Quite possibly this is impossible, but I am too tired to prove it.
+ }
process_midi_event(track, event >> 4, arg1, arg2, miditime);
}
}
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:30:24
|
Module: performous
Branch: instrumentgraph
Commit: d054237f3662abf9067b12ad9cd39bec58c1128a
Author: Tapio Vierros <tap...@gm...>
Date: Tue Apr 20 22:17:02 2010 +0300
Try hit accuracy indicator in Z-direction.
---
game/guitargraph.cc | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 6fc7d64..1255692 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -748,29 +748,30 @@ void GuitarGraph::draw(double time) {
}
}
{ // Accuracy indicator
- float maxsize = 1.0f;
- float thickness = 0.1f;
- float y = time2y(past / 3.0f);
+ float maxsize = 1.5f;
+ float thickness = 0.12f;
+ float x = -2.5 - thickness;
+ float y = time2y(0.0);
float alpha = m_errorMeterFade.get();
float bgcol = m_errorMeterFlash.get();
glColor4f(bgcol, bgcol, bgcol, 0.6f * alpha);
{ // Indicator background
glutil::Begin block(GL_TRIANGLE_STRIP);
- glVertex3f(-maxsize, y, thickness);
- glVertex3f( maxsize, y, thickness);
- glVertex3f(-maxsize, y, 0.0f);
- glVertex3f( maxsize, y, 0.0f);
+ glVertex2f(x - thickness, y + maxsize);
+ glVertex2f(x, y + maxsize);
+ glVertex2f(x - thickness, y - maxsize);
+ glVertex2f(x, y - maxsize);
}
float error = m_errorMeter.get();
if (error != 0) {
- float x1 = 0, x2 = 0;
- if (error > 0) { glColor4f(0.0f, 1.0f, 0.0f, alpha); x2 = -maxsize * error; }
- else { glColor4f(1.0f, 0.0f, 0.0f, alpha); x1 = -maxsize * error; }
+ float y1 = 0, y2 = 0;
+ if (error > 0) { glColor4f(0.0f, 1.0f, 0.0f, alpha); y2 = -maxsize * error; }
+ else { glColor4f(1.0f, 0.0f, 0.0f, alpha); y1 = -maxsize * error; }
glutil::Begin block(GL_TRIANGLE_STRIP);
- glVertex3f(x1, y, 0.0f);
- glVertex3f(x2, y, 0.0f);
- glVertex3f(x1, y, thickness);
- glVertex3f(x2, y, thickness);
+ glVertex2f(x - thickness, y1 + y);
+ glVertex2f(x, y1 + y);
+ glVertex2f(x - thickness, y2 + y);
+ glVertex2f(x, y2 + y);
if (m_errorMeter.get() == m_errorMeter.getTarget())
m_errorMeter.setTarget(0.0);
}
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:30:17
|
Module: performous
Branch: instrumentgraph
Commit: 684754eb3e90cc1a985c1c9beb6c0b2fd94aebdc
Author: Tapio Vierros <tap...@gm...>
Date: Tue Apr 20 21:47:31 2010 +0300
Revert "Test vertical instrument error indicator instead of horizontal."
Reason: Horizontal is better.
This reverts commit 5fa954ab274fd268f4394ed3d66232d9a45a9b20.
---
game/guitargraph.cc | 34 +++++++++++-----------------------
1 files changed, 11 insertions(+), 23 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 2e119bc..6fc7d64 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -749,40 +749,28 @@ void GuitarGraph::draw(double time) {
}
{ // Accuracy indicator
float maxsize = 1.0f;
- float thickness = 0.05f;
- float x = 0.0;
+ float thickness = 0.1f;
float y = time2y(past / 3.0f);
- float w = maxsize;
- float h = thickness;
float alpha = m_errorMeterFade.get();
float bgcol = m_errorMeterFlash.get();
- // Vertical bar?
- bool VERTICALMETER = true;
- if (VERTICALMETER) {
- std::swap(w, h);
- x = -2.5 - thickness;
- y = time2y(0.0);
- }
glColor4f(bgcol, bgcol, bgcol, 0.6f * alpha);
{ // Indicator background
glutil::Begin block(GL_TRIANGLE_STRIP);
- glVertex3f(x-w, y, -h);
- glVertex3f(x+w, y, -h);
- glVertex3f(x-w, y, h);
- glVertex3f(x+w, y, h);
+ glVertex3f(-maxsize, y, thickness);
+ glVertex3f( maxsize, y, thickness);
+ glVertex3f(-maxsize, y, 0.0f);
+ glVertex3f( maxsize, y, 0.0f);
}
float error = m_errorMeter.get();
if (error != 0) {
float x1 = 0, x2 = 0;
- float h1 = -thickness, h2 = thickness;
- if (error > 0) { glColor4f(0.0f, 1.0f, 0.0f, alpha); x2 -= maxsize * error; }
- else { glColor4f(1.0f, 0.0f, 0.0f, alpha); x1 -= maxsize * error; }
- if (VERTICALMETER) { std::swap(x1, h1); std::swap(x2,h2); }
+ if (error > 0) { glColor4f(0.0f, 1.0f, 0.0f, alpha); x2 = -maxsize * error; }
+ else { glColor4f(1.0f, 0.0f, 0.0f, alpha); x1 = -maxsize * error; }
glutil::Begin block(GL_TRIANGLE_STRIP);
- glVertex3f(x1+x, y, h1);
- glVertex3f(x2+x, y, h1);
- glVertex3f(x1+x, y, h2);
- glVertex3f(x2+x, y, h2);
+ glVertex3f(x1, y, 0.0f);
+ glVertex3f(x2, y, 0.0f);
+ glVertex3f(x1, y, thickness);
+ glVertex3f(x2, y, thickness);
if (m_errorMeter.get() == m_errorMeter.getTarget())
m_errorMeter.setTarget(0.0);
}
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:30:13
|
Module: performous
Branch: instrumentgraph
Commit: 5fa954ab274fd268f4394ed3d66232d9a45a9b20
Author: Tapio Vierros <tap...@gm...>
Date: Sat Apr 17 12:57:31 2010 +0300
Test vertical instrument error indicator instead of horizontal.
Switch around guitargraph.cc:760
---
game/guitargraph.cc | 34 +++++++++++++++++++++++-----------
1 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 6fc7d64..2e119bc 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -749,28 +749,40 @@ void GuitarGraph::draw(double time) {
}
{ // Accuracy indicator
float maxsize = 1.0f;
- float thickness = 0.1f;
+ float thickness = 0.05f;
+ float x = 0.0;
float y = time2y(past / 3.0f);
+ float w = maxsize;
+ float h = thickness;
float alpha = m_errorMeterFade.get();
float bgcol = m_errorMeterFlash.get();
+ // Vertical bar?
+ bool VERTICALMETER = true;
+ if (VERTICALMETER) {
+ std::swap(w, h);
+ x = -2.5 - thickness;
+ y = time2y(0.0);
+ }
glColor4f(bgcol, bgcol, bgcol, 0.6f * alpha);
{ // Indicator background
glutil::Begin block(GL_TRIANGLE_STRIP);
- glVertex3f(-maxsize, y, thickness);
- glVertex3f( maxsize, y, thickness);
- glVertex3f(-maxsize, y, 0.0f);
- glVertex3f( maxsize, y, 0.0f);
+ glVertex3f(x-w, y, -h);
+ glVertex3f(x+w, y, -h);
+ glVertex3f(x-w, y, h);
+ glVertex3f(x+w, y, h);
}
float error = m_errorMeter.get();
if (error != 0) {
float x1 = 0, x2 = 0;
- if (error > 0) { glColor4f(0.0f, 1.0f, 0.0f, alpha); x2 = -maxsize * error; }
- else { glColor4f(1.0f, 0.0f, 0.0f, alpha); x1 = -maxsize * error; }
+ float h1 = -thickness, h2 = thickness;
+ if (error > 0) { glColor4f(0.0f, 1.0f, 0.0f, alpha); x2 -= maxsize * error; }
+ else { glColor4f(1.0f, 0.0f, 0.0f, alpha); x1 -= maxsize * error; }
+ if (VERTICALMETER) { std::swap(x1, h1); std::swap(x2,h2); }
glutil::Begin block(GL_TRIANGLE_STRIP);
- glVertex3f(x1, y, 0.0f);
- glVertex3f(x2, y, 0.0f);
- glVertex3f(x1, y, thickness);
- glVertex3f(x2, y, thickness);
+ glVertex3f(x1+x, y, h1);
+ glVertex3f(x2+x, y, h1);
+ glVertex3f(x1+x, y, h2);
+ glVertex3f(x2+x, y, h2);
if (m_errorMeter.get() == m_errorMeter.getTarget())
m_errorMeter.setTarget(0.0);
}
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:30:00
|
Module: performous
Branch: instrumentgraph
Commit: 088022b8b38816955345a305bb99001952d86530
Author: Tapio Vierros <tap...@gm...>
Date: Sat Apr 17 12:21:43 2010 +0300
Instrument hit indicator flashes with perfect hit and fades away when not used.
---
game/guitargraph.cc | 22 +++++++++++++++++-----
game/guitargraph.hh | 3 +++
2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 57b2d3f..6fc7d64 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -77,6 +77,8 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number)
m_text(getThemePath("sing_timetxt.svg"), config["graphic/text_lod"].f()),
m_correctness(0.0, 5.0),
m_errorMeter(0.0, 2.0),
+ m_errorMeterFlash(0.0, 4.0),
+ m_errorMeterFade(0.0, 0.333),
m_drumJump(0.0, 12.0),
m_streakPopup(0.0, 1.0),
m_godmodePopup(0.0, 0.666),
@@ -314,6 +316,14 @@ void GuitarGraph::activateStarpower() {
}
}
+/// New hit for the error indicator
+void GuitarGraph::errorMeter(float error) {
+ error /= maxTolerance;
+ m_errorMeter.setTarget(error, true);
+ m_errorMeterFade.setValue(1.0);
+ if (std::abs(error) < 0.10) m_errorMeterFlash.setValue(1.0);
+}
+
/// Mark the holding of a note as ended
void GuitarGraph::endHold(int fret, double time) {
if (fret >= 5 || !m_holds[fret]) return;
@@ -448,7 +458,7 @@ void GuitarGraph::drumHit(double time, int fret) {
// Handle Big Rock Ending scoring
if (m_drumfillHits > 0 && *best == m_chords.back()) endBRE();
// ErrorMeter
- m_errorMeter.setTarget(signed_error / maxTolerance, true);
+ errorMeter(signed_error);
}
m_correctness.setTarget(double(m_chordIt->status) / m_chordIt->polyphony, true);
}
@@ -524,8 +534,8 @@ void GuitarGraph::guitarPlay(double time, input::Event const& ev) {
m_chordIt->status = 1 + picked;
m_score += score;
m_starmeter += score;
- m_errorMeter.setTarget(signed_error / maxTolerance, true);
m_correctness.setTarget(1.0, true); // Instantly go to one
+ errorMeter(signed_error);
for (int fret = 0; fret < 5; ++fret) {
if (!m_chordIt->fret[fret]) continue;
Duration const* dur = m_chordIt->dur[fret];
@@ -741,7 +751,9 @@ void GuitarGraph::draw(double time) {
float maxsize = 1.0f;
float thickness = 0.1f;
float y = time2y(past / 3.0f);
- glColor4f(0.0f, 0.0f, 0.0f, 0.6f);
+ float alpha = m_errorMeterFade.get();
+ float bgcol = m_errorMeterFlash.get();
+ glColor4f(bgcol, bgcol, bgcol, 0.6f * alpha);
{ // Indicator background
glutil::Begin block(GL_TRIANGLE_STRIP);
glVertex3f(-maxsize, y, thickness);
@@ -752,8 +764,8 @@ void GuitarGraph::draw(double time) {
float error = m_errorMeter.get();
if (error != 0) {
float x1 = 0, x2 = 0;
- if (error > 0) { glColor4f(0.0f, 1.0f, 0.0f, 1.0f); x2 = -maxsize * error; }
- else { glColor4f(1.0f, 0.0f, 0.0f, 1.0f); x1 = -maxsize * error; }
+ if (error > 0) { glColor4f(0.0f, 1.0f, 0.0f, alpha); x2 = -maxsize * error; }
+ else { glColor4f(1.0f, 0.0f, 0.0f, alpha); x1 = -maxsize * error; }
glutil::Begin block(GL_TRIANGLE_STRIP);
glVertex3f(x1, y, 0.0f);
glVertex3f(x2, y, 0.0f);
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index 816786d..320a83f 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -69,6 +69,7 @@ class GuitarGraph {
private:
bool canActivateStarpower() { return (m_starmeter > 6000); }
void activateStarpower();
+ void errorMeter(float error);
void fail(double time, int fret);
void endHold(int fret, double time = 0.0);
void endBRE();
@@ -147,6 +148,8 @@ class GuitarGraph {
NoteStatus m_notes;
AnimValue m_correctness;
AnimValue m_errorMeter;
+ AnimValue m_errorMeterFlash;
+ AnimValue m_errorMeterFade;
AnimValue m_drumJump;
AnimValue m_streakPopup; /// for animating the popup
AnimValue m_godmodePopup; /// for animating the popup
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:29:58
|
Module: performous Branch: instrumentgraph Commit: 977439fa1d089fc349874e52ee724c29c8b22a27 Author: Lasse Karkkainen <tro...@tr...> Date: Thu Apr 15 12:33:42 2010 +0300 Merge branch 'master' of ssh://git.performous.org/gitroot/performous/performous --- |
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:29:56
|
Module: performous
Branch: instrumentgraph
Commit: 7114b259e15774461e8b416511fac9c47c1ef924
Author: Lasse Karkkainen <tro...@tr...>
Date: Thu Apr 15 12:32:46 2010 +0300
Added support for Redoctane XBOX DDR dance pad
---
game/joystick.cc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 3725763..9d3a75a 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -322,6 +322,9 @@ void input::SDL::init() {
} else if( name.find("TigerGame") != std::string::npos ) {
std::cout << " Detected as: TigerGame Dance Pad" << std::endl;
input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::DANCEPAD_TIGERGAME);
+ } else if( name.find("Redoctane XBOX DDR") != std::string::npos ) {
+ std::cout << " Detected as: Generic Dance Pad" << std::endl;
+ input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::DANCEPAD_GENERIC);
} else if( name.find("Dance mat") != std::string::npos ) {
std::cout << " Detected as: Generic Dance Pad" << std::endl;
input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::DANCEPAD_GENERIC);
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:29:53
|
Module: performous
Branch: instrumentgraph
Commit: 82968bf14af96fc0878abfc91e57fbe4baeb937c
Author: Tapio Vierros <tap...@gm...>
Date: Thu Apr 15 10:10:26 2010 +0300
Lefty-mode for guitars. Activated by pressing green+red.
---
game/guitargraph.cc | 11 +++++++----
game/guitargraph.hh | 2 ++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 8ae617c..57b2d3f 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -66,6 +66,7 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number)
m_neckglowColor(),
m_drums(drums),
m_use3d(config["graphic/3d_notes"].b()),
+ m_leftymode(false),
m_starpower(0.0, 0.1),
m_cx(0.0, 0.2),
m_width(0.5, 0.4),
@@ -233,6 +234,9 @@ void GuitarGraph::engine() {
else if (ev.pressed[3 + m_drums]) difficulty(DIFFICULTY_AMAZING);
difficulty_changed = true;
}
+ // Lefty-mode switch
+ if (!m_drums && ev.type == input::Event::PRESS && ev.pressed[0] && ev.pressed[1])
+ m_leftymode = !m_leftymode;
// Playing
} else if (m_drums) {
if (ev.type == input::Event::PRESS) drumHit(time, ev.button);
@@ -635,7 +639,7 @@ void GuitarGraph::draw(double time) {
drawBar(0.0, 0.01f);
// Fret buttons on cursor
for (int fret = m_drums; fret < 5; ++fret) {
- float x = -2.0f + fret - 0.5f * m_drums;
+ float x = getFretX(fret);
float l = m_hit[fret + !m_drums].get();
// Get a color for the fret and adjust it if GodMode is on
glColor4fv(colorize(color(fret), time));
@@ -714,7 +718,7 @@ void GuitarGraph::draw(double time) {
}
Texture* ftex = &m_flame;
if (m_starpower.get() > 0.01) ftex = &m_flame_godmode;
- float x = -2.0f + fret - 0.5f * m_drums;
+ float x = getFretX(fret);
for (std::vector<AnimValue>::iterator it = m_flames[fret].begin(); it != m_flames[fret].end();) {
float flameAnim = it->get();
if (flameAnim < 1.0f) {
@@ -789,8 +793,7 @@ void GuitarGraph::draw(double time) {
/// Draws a single note
/// The times passed are normalized to [past, future]
void GuitarGraph::drawNote(int fret, glutil::Color c, float tBeg, float tEnd, float whammy, bool tappable, bool hit, double hitAnim, double releaseTime) {
- float x = -2.0f + fret;
- if (m_drums) x -= 0.5f;
+ float x = getFretX(fret);
if (m_drums && fret == 0) { // Bass drum? That's easy
if (hit || hitAnim > 0) return; // Hide it if it's hit
c.a = time2a(tBeg); glColor4fv(c);
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index 97ecec7..816786d 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -92,6 +92,7 @@ class GuitarGraph {
boost::scoped_ptr<Texture> m_neck; /// necks
bool m_drums; /// are we using drums?
bool m_use3d; /// are we using 3d?
+ bool m_leftymode; /// switch guitar notes to right-to-left direction
AnimValue m_starpower; /// how long the GodMode lasts (also used in fading the effect)
AnimValue m_cx, m_width; /// controls horizontal position and width smoothly
std::size_t m_stream;
@@ -133,6 +134,7 @@ class GuitarGraph {
void nextTrack(bool fast = false);
void difficultyAuto(bool tryKeepCurrent = false);
bool difficulty(Difficulty level);
+ float getFretX(int fret) const { return (-2.0f + fret- (m_drums ? 0.5 : 0)) * (m_leftymode ? -1 : 1); }
SvgTxtTheme m_text;
boost::scoped_ptr<SvgTxtThemeSimple> m_scoreText;
boost::scoped_ptr<SvgTxtThemeSimple> m_streakText;
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:29:51
|
Module: performous
Branch: instrumentgraph
Commit: a2c6b1b5a20760ca3d64b1ddb145fd09b2f2ae3e
Author: Vincent Le Ligeour <yo...@us...>
Date: Wed Apr 14 13:45:56 2010 +0200
Fixed compilation error (boost::filesystem::path::clear() has been added in 1.40)
---
tools/ss_extract.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/ss_extract.cpp b/tools/ss_extract.cpp
index 81102d3..eda8362 100644
--- a/tools/ss_extract.cpp
+++ b/tools/ss_extract.cpp
@@ -495,7 +495,7 @@ struct Process {
video_us(song, dataPak[id + "/mus+vid.iav"], dataPak[id + "/mus+vid.ind"], path);
} catch (std::exception& e) {
std::cerr << "!!! Unable to extract video: " << e.what() << std::endl;
- song.video.clear();
+ song.video = "";
}
}
if (mkvcompress) {
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:29:49
|
Module: performous Branch: instrumentgraph Commit: 7e7275656424427603489aaf1ab3182c1fde1f17 Author: Vincent Le Ligeour <yo...@us...> Date: Wed Apr 14 08:54:45 2010 +0200 Fixed buggy copy/paste in ss extract tool --- tools/ss_extract.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/ss_extract.cpp b/tools/ss_extract.cpp index ec9896a..81102d3 100644 --- a/tools/ss_extract.cpp +++ b/tools/ss_extract.cpp @@ -354,7 +354,7 @@ void saveTxtFile(xmlpp::NodeSet &sentence, const fs::path &path, const Song &son //txtfile << "#LANGUAGE:English" << std::endl; // Detect instead of hardcoding? if (!song.music.empty()) txtfile << "#MP3:" << filename(song.music) << std::endl; if (!song.vocals.empty()) txtfile << "#VOCALS:" << filename(song.vocals) << std::endl; - if (!song.vocals.empty()) txtfile << "#VIDEO:" << filename(song.video) << std::endl; + if (!song.video.empty()) txtfile << "#VIDEO:" << filename(song.video) << std::endl; if (!song.cover.empty()) txtfile << "#COVER:" << filename(song.cover) << std::endl; //txtfile << "#BACKGROUND:background.jpg" << std::endl; txtfile << "#BPM:" << song.tempo << std::endl; |
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:29:46
|
Module: performous Branch: instrumentgraph Commit: 2efa9d0ca236ffcbff9eb4f5a81247845fc2acf7 Author: Vincent Le Ligeour <yo...@us...> Date: Tue Apr 13 09:09:44 2010 +0200 Moved song out of LayoutSinger and NoteGraph class (we only need a vocal track here) --- game/layout_singer.cc | 10 +++++----- game/layout_singer.hh | 4 ++-- game/notegraph.cc | 43 +++++++++++++++++++++---------------------- game/notegraph.hh | 4 ++-- game/screen_players.cc | 2 +- game/screen_sing.cc | 2 +- 6 files changed, 32 insertions(+), 33 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:29:44
|
Module: performous
Branch: instrumentgraph
Commit: 568299eef43ca91ef2684f4139a334a77b0313f2
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Apr 13 08:51:27 2010 +0200
Moved song out of Player and Engine class (we only need a vocal track here)
---
game/engine.hh | 16 ++++++++--------
game/player.cc | 20 ++++++++++----------
game/player.hh | 6 +++---
game/screen_sing.cc | 2 +-
4 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/game/engine.hh b/game/engine.hh
index 9295aaa..f1c7882 100644
--- a/game/engine.hh
+++ b/game/engine.hh
@@ -24,7 +24,7 @@ namespace {
/// performous engine
class Engine {
Audio& m_audio;
- Song& m_song;
+ VocalTrack& m_vocals;
size_t m_time;
volatile bool m_quit;
Database& m_database;
@@ -38,19 +38,19 @@ class Engine {
* @param audio A reference will be stored in order to monitor playback time.
* @param anBegin Analyzers to use (beginning iterator)
* @param anEnd Analyzers to use (ending iterator)
- * @param song Song to play
+ * @param vocals Song to play
**/
- template <typename FwdIt> Engine(Audio& audio, Song& song, FwdIt anBegin, FwdIt anEnd, Database& database):
- m_audio(audio), m_song(song), m_time(), m_quit(), m_database(database)
+ template <typename FwdIt> Engine(Audio& audio, VocalTrack& vocals, FwdIt anBegin, FwdIt anEnd, Database& database):
+ m_audio(audio), m_vocals(vocals), m_time(), m_quit(), m_database(database)
{
// clear old player information
m_database.cur.clear();
m_database.scores.clear();
// Only add players if the vocal track has sensible length (not NaN or extremely long)
- if (song.vocals.endTime < 10000.0) {
+ if (vocals.endTime < 10000.0) {
// Calculate the space required for pitch frames
- size_t frames = song.vocals.endTime / Engine::TIMESTEP;
- while (anBegin != anEnd) m_database.cur.push_back(Player(song, *anBegin++, frames));
+ size_t frames = vocals.endTime / Engine::TIMESTEP;
+ while (anBegin != anEnd) m_database.cur.push_back(Player(vocals, *anBegin++, frames));
size_t player = 0;
for (std::list<Player>::iterator it = m_database.cur.begin(); it != m_database.cur.end(); ++it, ++player) it->m_color = playerColors[player % playerColorsSize];
}
@@ -66,7 +66,7 @@ class Engine {
double t = m_audio.getPosition() - config["audio/round-trip"].f();
double timeLeft = m_time * TIMESTEP - t;
if (timeLeft > 0.0) { boost::thread::sleep(now() + std::min(TIMESTEP, timeLeft)); continue; }
- for (Notes::const_iterator it = m_song.vocals.notes.begin(); it != m_song.vocals.notes.end(); ++it) it->power = 0.0f;
+ for (Notes::const_iterator it = m_vocals.notes.begin(); it != m_vocals.notes.end(); ++it) it->power = 0.0f;
std::for_each(m_database.cur.begin(), m_database.cur.end(), boost::bind(&Player::update, _1));
++m_time;
}
diff --git a/game/player.cc b/game/player.cc
index 85f8a8b..2b862ad 100644
--- a/game/player.cc
+++ b/game/player.cc
@@ -3,11 +3,11 @@
#include "engine.hh" // just for Engine::TIMESTEP
-Player::Player(Song& song, Analyzer& analyzer, size_t frames):
- m_song(song), m_analyzer(analyzer), m_pitch(frames, std::make_pair(getNaN(),
+Player::Player(VocalTrack& vocals, Analyzer& analyzer, size_t frames):
+ m_vocals(vocals), m_analyzer(analyzer), m_pitch(frames, std::make_pair(getNaN(),
-getInf())), m_pos(), m_score(), m_noteScore(), m_lineScore(), m_maxLineScore(),
m_prevLineScore(-1), m_feedbackFader(0.0, 2.0), m_activitytimer(),
- m_scoreIt(m_song.vocals.notes.begin())
+ m_scoreIt(m_vocals.notes.begin())
{ }
void Player::update() {
@@ -24,13 +24,13 @@ void Player::update() {
}
double endTime = Engine::TIMESTEP * m_pos;
// Iterate over all the notes that are considered for this timestep
- while (m_scoreIt != m_song.vocals.notes.end()) {
+ while (m_scoreIt != m_vocals.notes.end()) {
if (endTime < m_scoreIt->begin) break; // The note begins later than on this timestep
// If tone was detected, calculate score
if (t) {
- double note = m_song.vocals.scale.getNote(t->freq);
+ double note = m_vocals.scale.getNote(t->freq);
// Add score
- double score_addition = m_song.vocals.m_scoreFactor * m_scoreIt->score(note, beginTime, endTime);
+ double score_addition = m_vocals.m_scoreFactor * m_scoreIt->score(note, beginTime, endTime);
m_score += score_addition;
m_noteScore += score_addition;
m_lineScore += score_addition;
@@ -45,11 +45,11 @@ void Player::update() {
}
if (endTime < m_scoreIt->end) break; // The note continues past this timestep
// Set accuracy
- m_scoreIt->accuracy = std::max(m_scoreIt->accuracy, m_noteScore / m_song.vocals.m_scoreFactor / m_scoreIt->maxScore());
+ m_scoreIt->accuracy = std::max(m_scoreIt->accuracy, m_noteScore / m_vocals.m_scoreFactor / m_scoreIt->maxScore());
m_noteScore = 0; // Reset noteScore as we are moving on to the next one
++m_scoreIt;
}
- if (m_scoreIt == m_song.vocals.notes.end()) calcRowRank();
+ if (m_scoreIt == m_vocals.notes.end()) calcRowRank();
m_score = clamp(m_score, 0.0, 1.0);
}
@@ -60,8 +60,8 @@ void Player::calcRowRank() {
Notes::const_reverse_iterator maxScoreIt(m_scoreIt);
// FIXME: MacOSX needs the following cast to compile correctly
// it is related to the fact that OSX default compiler is 4.0.1 that is buggy when not casting
- while ((maxScoreIt != static_cast<Notes::const_reverse_iterator>(m_song.vocals.notes.rend())) && (maxScoreIt->type != Note::SLEEP)) {
- m_maxLineScore += m_song.vocals.m_scoreFactor * maxScoreIt->maxScore();
+ while ((maxScoreIt != static_cast<Notes::const_reverse_iterator>(m_vocals.notes.rend())) && (maxScoreIt->type != Note::SLEEP)) {
+ m_maxLineScore += m_vocals.m_scoreFactor * maxScoreIt->maxScore();
maxScoreIt++;
}
if (m_maxLineScore > 0) {
diff --git a/game/player.hh b/game/player.hh
index d313827..2d7ef01 100644
--- a/game/player.hh
+++ b/game/player.hh
@@ -13,8 +13,8 @@ class Song;
/// player class
struct Player {
- /// currently playing song
- Song& m_song;
+ /// currently playing vocals track
+ VocalTrack& m_vocals;
/// sound analyzer
Analyzer& m_analyzer;
/// player color for bars, waves, scores
@@ -42,7 +42,7 @@ struct Player {
/// score iterator
Notes::const_iterator m_scoreIt;
/// constructor
- Player(Song& song, Analyzer& analyzer, size_t frames);
+ Player(VocalTrack& vocals, Analyzer& analyzer, size_t frames);
/// prepares analyzer
void prepare() { m_analyzer.process(); }
/// updates player stats
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 9bbb3dd..5527cae 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -102,7 +102,7 @@ void ScreenSing::enter() {
// Startup delay for instruments is longer than for singing only
double setup_delay = (m_instruments.empty() && m_dancers.empty() ? -1.0 : -8.0);
m_audio.playMusic(m_song->music, false, 0.0, setup_delay);
- m_engine.reset(new Engine(m_audio, *m_song, analyzers.begin(), analyzers.end(), m_database));
+ m_engine.reset(new Engine(m_audio, m_song->vocals, analyzers.begin(), analyzers.end(), m_database));
}
/// Manages the instrument drawing
|
|
From: Tapio V. <aa...@us...> - 2010-05-16 16:29:42
|
Module: performous
Branch: instrumentgraph
Commit: b8b432a84c323c445569dd56e8bd768077c4f3c4
Author: Tapio Vierros <tap...@gm...>
Date: Mon Apr 12 23:02:18 2010 +0300
Primitive VU meter to prototype instrument hitting accuracy indicator.
---
game/guitargraph.cc | 35 +++++++++++++++++++++++++++++++++++
game/guitargraph.hh | 1 +
2 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 9cddead..8ae617c 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -75,6 +75,7 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number)
m_level(),
m_text(getThemePath("sing_timetxt.svg"), config["graphic/text_lod"].f()),
m_correctness(0.0, 5.0),
+ m_errorMeter(0.0, 2.0),
m_drumJump(0.0, 12.0),
m_streakPopup(0.0, 1.0),
m_godmodePopup(0.0, 0.666),
@@ -406,6 +407,7 @@ void GuitarGraph::drumHit(double time, int fret) {
}
// Find any suitable note within the tolerance
double tolerance = maxTolerance;
+ double signed_error = maxTolerance;
Chords::iterator best = m_chords.end();
for (Chords::iterator it = m_chordIt; it != m_chords.end() && it->begin <= time + tolerance; ++it) {
if (m_notes[it->dur[fret]]) continue; // Already played
@@ -413,6 +415,7 @@ void GuitarGraph::drumHit(double time, int fret) {
if (error < tolerance) {
best = it;
tolerance = error;
+ signed_error = it->begin - time;
}
}
if (best == m_chords.end()) fail(time, fret);
@@ -440,6 +443,8 @@ void GuitarGraph::drumHit(double time, int fret) {
if (m_streak > m_longestStreak) m_longestStreak = m_streak;
// Handle Big Rock Ending scoring
if (m_drumfillHits > 0 && *best == m_chords.back()) endBRE();
+ // ErrorMeter
+ m_errorMeter.setTarget(signed_error / maxTolerance, true);
}
m_correctness.setTarget(double(m_chordIt->status) / m_chordIt->polyphony, true);
}
@@ -482,6 +487,7 @@ void GuitarGraph::guitarPlay(double time, input::Event const& ev) {
}
// Find any suitable note within the tolerance
double tolerance = maxTolerance;
+ double signed_error = maxTolerance;
Chords::iterator best = m_chords.end();
for (Chords::iterator it = m_chordIt; it != m_chords.end() && it->begin <= time + tolerance; ++it) {
if (it->status > 1) continue; // Already picked, can't play again
@@ -497,6 +503,7 @@ void GuitarGraph::guitarPlay(double time, input::Event const& ev) {
if (error < tolerance) {
best = it;
tolerance = error;
+ signed_error = it->begin - time;
}
}
if (best == m_chords.end()) fail(time, picked ? -1 : -2);
@@ -513,6 +520,7 @@ void GuitarGraph::guitarPlay(double time, input::Event const& ev) {
m_chordIt->status = 1 + picked;
m_score += score;
m_starmeter += score;
+ m_errorMeter.setTarget(signed_error / maxTolerance, true);
m_correctness.setTarget(1.0, true); // Instantly go to one
for (int fret = 0; fret < 5; ++fret) {
if (!m_chordIt->fret[fret]) continue;
@@ -725,6 +733,32 @@ void GuitarGraph::draw(double time) {
++it;
}
}
+ { // Accuracy indicator
+ float maxsize = 1.0f;
+ float thickness = 0.1f;
+ float y = time2y(past / 3.0f);
+ glColor4f(0.0f, 0.0f, 0.0f, 0.6f);
+ { // Indicator background
+ glutil::Begin block(GL_TRIANGLE_STRIP);
+ glVertex3f(-maxsize, y, thickness);
+ glVertex3f( maxsize, y, thickness);
+ glVertex3f(-maxsize, y, 0.0f);
+ glVertex3f( maxsize, y, 0.0f);
+ }
+ float error = m_errorMeter.get();
+ if (error != 0) {
+ float x1 = 0, x2 = 0;
+ if (error > 0) { glColor4f(0.0f, 1.0f, 0.0f, 1.0f); x2 = -maxsize * error; }
+ else { glColor4f(1.0f, 0.0f, 0.0f, 1.0f); x1 = -maxsize * error; }
+ glutil::Begin block(GL_TRIANGLE_STRIP);
+ glVertex3f(x1, y, 0.0f);
+ glVertex3f(x2, y, 0.0f);
+ glVertex3f(x1, y, thickness);
+ glVertex3f(x2, y, thickness);
+ if (m_errorMeter.get() == m_errorMeter.getTarget())
+ m_errorMeter.setTarget(0.0);
+ }
+ }
}
// Bottom neck glow
@@ -747,6 +781,7 @@ void GuitarGraph::draw(double time) {
m_neckglow.dimensions.screenBottom(0.0).middle(offsetX).fixedWidth(dimensions.w());
m_neckglow.draw();
}
+
drawInfo(time, offsetX, dimensions); // Go draw some texts and other interface stuff
glColor3f(1.0f, 1.0f, 1.0f);
}
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index 1d30bda..97ecec7 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -144,6 +144,7 @@ class GuitarGraph {
typedef std::map<Duration const*, unsigned> NoteStatus; // Note in song to m_events[unsigned - 1] or 0 for not played
NoteStatus m_notes;
AnimValue m_correctness;
+ AnimValue m_errorMeter;
AnimValue m_drumJump;
AnimValue m_streakPopup; /// for animating the popup
AnimValue m_godmodePopup; /// for animating the popup
|
|
From: Tapio V. <aa...@us...> - 2010-05-12 18:04:26
|
Module: performous
Branch: master
Commit: 085b849f444709fa0c3ccba90b82ec4e9932e689
Author: Tapio Vierros <tap...@gm...>
Date: Wed May 12 21:03:30 2010 +0300
Fix crash when trying to enable pre-disabled webcam.
---
game/screen_sing.cc | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 2252fb1..07b0cb3 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -255,7 +255,10 @@ void ScreenSing::manageEvent(SDL_Event event) {
if (key == SDLK_w) dispInFlash(++config["game/pitch"]); // Toggle pitch wave
#ifdef USE_OPENCV
// Toggle webcam
- if (key == SDLK_a) { dispInFlash(++config["graphic/webcam"]); m_cam->pause(!config["graphic/webcam"].b()); }
+ if (key == SDLK_a) {
+ if (!m_cam) m_cam.reset(new Webcam());
+ if (m_cam) { dispInFlash(++config["graphic/webcam"]); m_cam->pause(!config["graphic/webcam"].b()); }
+ }
#endif
// Latency settings
if (key == SDLK_F1) dispInFlash(--config["audio/video_delay"]);
|
|
From: Stefano A. <xa...@us...> - 2010-05-12 17:18:58
|
Module: performous
Branch: master
Commit: ae34964527610b8007ad0743244ff43a8599348f
Author: Xaldyz <xa...@us...>
Date: Wed May 12 19:18:46 2010 +0200
Fixed linking problem when library OpenCV not set
---
game/screen_sing.cc | 14 +++++++++++++-
game/screen_sing.hh | 6 ++++++
2 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index dcde072..2252fb1 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -56,9 +56,13 @@ void ScreenSing::enter() {
std::cerr << e.what() << std::endl;
}
}
+
+#ifdef USE_OPENCV
if (config["graphic/webcam"].b()) { // Initialize webcam
m_cam.reset(new Webcam());
}
+#endif
+
if (!m_song->video.empty() && config["graphic/video"].b()) { // Load video
m_video.reset(new Video(m_song->path + m_song->video, m_song->videoGap));
}
@@ -178,7 +182,9 @@ void ScreenSing::exit() {
m_engine.reset();
m_help.reset();
m_pause_icon.reset();
+#ifdef USE_OPENCV
m_cam.reset();
+#endif
m_video.reset();
m_background.reset();
m_song->dropNotes();
@@ -307,9 +313,15 @@ void ScreenSing::draw() {
m_background->draw();
} else fillBG();
// Video
- if (m_video && (!m_cam || !m_cam->is_good())) { m_video->render(time); double tmp = m_video->dimensions().ar(); if (tmp > 0.0) ar = tmp; }
+ if (m_video
+ #ifdef USE_OPENCV
+ && (!m_cam || !m_cam->is_good())
+ #endif
+ ) { m_video->render(time); double tmp = m_video->dimensions().ar(); if (tmp > 0.0) ar = tmp; }
+#ifdef USE_OPENCV
// Webcam
if (m_cam && config["graphic/webcam"].b()) m_cam->render();
+#endif
// Top/bottom borders
ar = clamp(ar, arMin, arMax);
double offset = 0.5 / ar + 0.2;
diff --git a/game/screen_sing.hh b/game/screen_sing.hh
index e73eb17..3b56aec 100644
--- a/game/screen_sing.hh
+++ b/game/screen_sing.hh
@@ -15,7 +15,11 @@
#include "opengl_text.hh"
#include "progressbar.hh"
#include "guitargraph.hh"
+
+#ifdef USE_OPENCV
#include "webcam.hh"
+#endif
+
#include "screen_players.hh"
class Players;
@@ -81,7 +85,9 @@ class ScreenSing: public Screen {
boost::scoped_ptr<ProgressBar> m_progress;
boost::scoped_ptr<Surface> m_background;
boost::scoped_ptr<Video> m_video;
+#ifdef USE_OPENCV
boost::scoped_ptr<Webcam> m_cam;
+#endif
boost::scoped_ptr<Surface> m_pause_icon;
boost::scoped_ptr<Surface> m_help;
boost::scoped_ptr<Engine> m_engine;
|
|
From: Tapio V. <aa...@us...> - 2010-05-12 14:21:01
|
Module: performous
Branch: master
Commit: 4aaebcb3cd0365fe2308ac96022f4a77e2a52f71
Author: Tapio Vierros <tap...@gm...>
Date: Wed May 12 17:17:16 2010 +0300
Some mingw32 build tweaks.
---
game/CMakeLists.txt | 6 +++++-
libs/libda/CMakeLists.txt | 4 ++--
libs/plugin++/CMakeLists.txt | 5 ++++-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index a68b2af..17a11e7 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -121,7 +121,11 @@ endif()
if(CMAKE_COMPILER_IS_GNUCXX)
message(STATUS "GCC detected, adding compile flags")
# -pedantic cannot be used because ffmpeg headers are b0rked
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++98 -Wall -Wextra -Wno-missing-field-initializers")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-missing-field-initializers")
+ # -pthread is unrecognized on Windows and ansi standard causes errors
+ if(NOT WIN32)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -pthread")
+ endif(NOT WIN32)
# Needed for ffmpeg.cc to compile cleanly on OSX (it's a (unsigned long) long story)
add_definitions("-D__STDC_CONSTANT_MACROS")
endif(CMAKE_COMPILER_IS_GNUCXX)
diff --git a/libs/libda/CMakeLists.txt b/libs/libda/CMakeLists.txt
index e6ea492..04997aa 100644
--- a/libs/libda/CMakeLists.txt
+++ b/libs/libda/CMakeLists.txt
@@ -48,9 +48,9 @@ endif()
if(CMAKE_COMPILER_IS_GNUCXX)
message(STATUS "GCC detected, adding compile flags")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -Wall -Wextra")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
if(NOT WIN32)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -pthread")
endif(NOT WIN32)
endif(CMAKE_COMPILER_IS_GNUCXX)
diff --git a/libs/plugin++/CMakeLists.txt b/libs/plugin++/CMakeLists.txt
index 3821706..4dcf031 100644
--- a/libs/plugin++/CMakeLists.txt
+++ b/libs/plugin++/CMakeLists.txt
@@ -25,7 +25,10 @@ set(LIB_SUFFIX "" CACHE STRING "Optional suffix to use on lib folders (e.g. 64 f
if(CMAKE_COMPILER_IS_GNUCXX)
message(STATUS "GCC detected, adding compile flags")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -Wall -Wextra")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
+ if(NOT WIN32)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
+ endif(NOT WIN32)
endif()
add_library(plugin++ STATIC src/dll.cc src/execname.cc src/loader.cc)
|
|
From: Tapio V. <aa...@us...> - 2010-05-12 09:46:09
|
Module: performous
Branch: master
Commit: 1c34970719f359b35a3b0acb8cfe9b957cd45a13
Author: Tapio Vierros <tap...@gm...>
Date: Wed May 12 12:44:04 2010 +0300
Dance arrow size is determined by number of arrows.
---
game/dancegraph.cc | 24 ++++++++++++------------
game/dancegraph.hh | 3 ++-
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 52cfe65..d84c13a 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -296,10 +296,10 @@ namespace {
const float one_arrow_tex_w = 1.0 / 8.0; // Width of a single arrow in texture coordinates
/// Create a symmetric vertex pair for arrow drawing
- void vertexPair(int arrow_i, float x, float y, float ty) {
+ void vertexPair(int arrow_i, float x, float y, float ty, float scale = 1.0f) {
if (arrow_i < 0) return;
- glTexCoord2f(arrow_i * one_arrow_tex_w, ty); glVertex2f(x - arrowSize, y);
- glTexCoord2f((arrow_i+1) * one_arrow_tex_w, ty); glVertex2f(x + arrowSize, y);
+ glTexCoord2f(arrow_i * one_arrow_tex_w, ty); glVertex2f(x - arrowSize * scale, y);
+ glTexCoord2f((arrow_i+1) * one_arrow_tex_w, ty); glVertex2f(x + arrowSize * scale, y);
}
glutil::Color& colorGlow(glutil::Color& c, double glow) {
@@ -365,7 +365,7 @@ void DanceGraph::draw(double time) {
float x = panel2x(arrow_i);
float y = time2y(0.0);
float l = m_pressed_anim[arrow_i].get();
- float s = (5.0 - l) / 5.0;
+ float s = getScale() * (5.0 - l) / 5.0;
drawArrow(arrow_i, m_arrows_cursor, x, y, s);
}
@@ -385,7 +385,7 @@ void DanceGraph::drawBeats(double time) {
glutil::Begin block(GL_TRIANGLE_STRIP);
float texCoord = 0.0f;
float tBeg = 0.0f, tEnd;
- float w = 0.5 * m_pads;
+ float w = 0.5 * m_pads * getScale();
for (Song::Beats::const_iterator it = m_song.beats.begin(); it != m_song.beats.end() && tBeg < future; ++it, texCoord += texCoordStep, tBeg = tEnd) {
tEnd = *it - time;
//if (tEnd < past) continue;
@@ -407,7 +407,7 @@ void DanceGraph::drawNote(DanceNote& note, double time) {
int arrow_i = note.note.note;
bool mine = note.note.type == Note::MINE;
float x = panel2x(arrow_i);
- float s = 1.0;
+ float s = getScale();
float yBeg = time2y(tBeg);
float yEnd = time2y(tEnd);
glutil::Color c(1.0f, 1.0f, 1.0f);
@@ -432,11 +432,11 @@ void DanceGraph::drawNote(DanceNote& note, double time) {
UseTexture tblock(m_arrows_hold);
glutil::Begin block(GL_TRIANGLE_STRIP);
// Draw end
- vertexPair(arrow_i, x, yEnd, 1.0f);
+ vertexPair(arrow_i, x, yEnd, 1.0f, s);
float yMid = std::max(yEnd-arrowSize, yBeg+arrowSize);
- vertexPair(arrow_i, x, yMid, 2.0f/3.0f);
+ vertexPair(arrow_i, x, yMid, 2.0f/3.0f, s);
// Draw middle
- vertexPair(arrow_i, x, yBeg+arrowSize, 1.0f/3.0f);
+ vertexPair(arrow_i, x, yBeg+arrowSize, 1.0f/3.0f, s);
}
// Draw begin
if (note.isHit && tEnd < 0.1) {
@@ -448,7 +448,7 @@ void DanceGraph::drawNote(DanceNote& note, double time) {
// Draw short note
if (mine) { // Mines need special handling
c.a = 1.0 - glow; glColor4fv(c);
- s = 0.8f + glow * 0.5f;
+ s = getScale() * 0.8f + glow * 0.5f;
float rot = int(time*360 * (note.isHit ? 2.0 : 1.0) ) % 360; // They rotate!
if (note.isHit) yBeg = time2y(0.0);
drawMine(x, yBeg, rot, s);
@@ -469,9 +469,9 @@ void DanceGraph::drawNote(DanceNote& note, double time) {
}
if (!text.empty()) {
glColor3f(1.0f, 1.0f, 1.0f);
- double s = 1.2 * arrowSize * (1.0 + glow);
+ double sc = getScale() * 1.2 * arrowSize * (1.0 + glow);
m_popupText->render(text);
- m_popupText->dimensions().middle(x).center(time2y(0.0)).stretch(s,s/2.0);
+ m_popupText->dimensions().middle(x).center(time2y(0.0)).stretch(sc, sc/2.0);
m_popupText->draw();
}
}
diff --git a/game/dancegraph.hh b/game/dancegraph.hh
index 3ba3fbd..4d84772 100644
--- a/game/dancegraph.hh
+++ b/game/dancegraph.hh
@@ -56,7 +56,8 @@ class DanceGraph {
void drawInfo(double time, double offsetX, Dimensions dimensions);
void drawArrow(int arrow_i, Texture& tex, float x, float y, float scale = 1.0, float ty1 = 0.0, float ty2 = 1.0);
void drawMine(float x, float y, float rot = 0.0, float scale = 1.0);
- float panel2x(int i) { return -(m_pads * 0.5f) + m_arrow_map[i] + 0.5f; } /// Get x for an arrow line
+ float panel2x(int i) { return getScale() * (-(m_pads * 0.5f) + m_arrow_map[i] + 0.5f); } /// Get x for an arrow line
+ float getScale() { return 1.0f / m_pads * 8.0f; }
Audio& m_audio;
Song const& m_song;
input::InputDev m_input; /// input device (keyboard/dance pad)
|
|
From: Felix B. <fbe...@us...> - 2010-05-12 05:19:16
|
Module: performous
Branch: master
Commit: 86b176060de04577bbfe1d27eaef8c9103c509c3
Author: Felix Bertram <fl...@be...>
Date: Tue May 11 22:17:30 2010 -0700
More MIDI Drum notes
added some more MIDI drum notes to accommodate most real-life mappings
might need some more tweaking and testing with other gear.
---
game/joystick.cc | 85 ++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 66 insertions(+), 19 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 7792d7b..adcb4a0 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -10,24 +10,67 @@ input::MidiDrums::MidiDrums(): stream(pm::findDevice(true, config["system/midi_i
event.type = Event::PRESS;
for (unsigned int i = 0; i < BUTTONS; ++i) event.pressed[i] = false;
#if 1
- // this config tested with Alesis DM5 Pro Kit/ RockBand 2 songs from FoFiX
- //--- kick (orange): drum 0
- map[36] = 0; // Bass Drum
- //--- red: drum 1
- map[38] = 1; // Snare
- // 57 // LiveStick
- //--- yellow: drum 2
- map[48] = 2; // Tom high
- map[46] = 2; // Hi-Hat open
- // 44 // Hi-Hat closing
- // 42 // Hi-Hat closed
- //--- blue
- map[45] = 3; // Tom mid
- map[51] = 3; // Ride Cymbal
- //--- green
- map[41] = 4; // Tom low
- map[49] = 4; // Crash Cymbal
+ // these are considered "safe" notes that should work with 95% of all modules
+ // notes below 35 and above 81 are non standardized
+
+ // *) these mappings have been verified with an Alesis DM5 Pro Kit and RockBand 2 songs
+ // the remaining mappings have been guessed...
+
+ static const int DRUM0_ORANGE = 0; // kick drum
+ static const int DRUM1_RED = 1; // snare drum
+ static const int DRUM2_YELLOW = 2; // hi-hat/ hi-mid tom
+ static const int DRUM3_BLUE = 3; // low tom/ ride cymbal
+ static const int DRUM4_GREEN = 4; // low floor tom/ crash cymbal
+
+ map[35] = DRUM0_ORANGE; // 35 - Acoustic Bass Drum
+ map[36] = DRUM0_ORANGE; // 36 - Bass Drum 1 *)
+ map[37] = DRUM1_RED; // 37 - Side Stick
+ map[38] = DRUM1_RED; // 38 - Acoustic Snare *)
+ // 39 - Hand Clap
+ map[40] = DRUM1_RED; // 40 - Electric Snare
+ map[41] = DRUM4_GREEN; // 41 - Low Floor Tom *)
+ map[42] = DRUM2_YELLOW; // 42 - Closed Hi-Hat
+ // 43 - High Floor Tom
+ map[44] = DRUM2_YELLOW; // 44 - Pedal Hi-Hat
+ map[45] = DRUM3_BLUE; // 45 - Low Tom *)
+ map[46] = DRUM2_YELLOW; // 46 - Open Hi-Hat *)
+ // 47 - Low-Mid Tom
+ map[48] = DRUM2_YELLOW; // 48 - Hi-Mid Tom *)
+ map[49] = DRUM4_GREEN; // 49 - Crash Cymbal 1 *)
+ // 50 - High Tom
+ map[51] = DRUM3_BLUE; // 51 - Ride Cymbal 1 *)
+ // 52 - Chinese Cymbal
+ // 53 - Ride Bell
+ // 54 - Tambourine
+ // 55 - Splash Cymbal
+ // 56 - Cowbell
+ map[57] = DRUM4_GREEN; // 57 - Crash Cymbal 2
+ // 58 - Vibraslap
+ map[59] = DRUM3_BLUE; // 59 - Ride Cymbal 2
+ // 60 - Hi Bongo
+ // 61 - Low Bongo
+ // 62 - Mute Hi Conga
+ // 63 - Open Hi Conga
+ // 64 - Low Conga
+ // 65 - High Timbale
+ // 66 - Low Timbale
+ // 67 - High Agogo
+ // 68 - Low Agogo
+ // 69 - Cabasa
+ // 70 - Maracas
+ // 71 - Short Whistle
+ // 72 - Long Whistle
+ // 73 - Short Guiro
+ // 74 - Long Guiro
+ // 75 - Claves
+ // 76 - Hi Wood Block
+ // 77 - Low Wood Block
+ // 78 - Mute Cuica
+ // 79 - Open Cuica
+ // 80 - Mute Triangle
+ // 81 - Open Triangle
#else
+ // this is the original mapping from Performous 0.5.1
map[35] = map[36] = 0; // Bass drum 1/2
map[38] = map[40] = 1; // Snare 1/2
map[42] = map[46] = 2; // Hi-hat closed/open
@@ -45,11 +88,15 @@ void input::MidiDrums::process() {
PmEvent ev;
while (Pm_Read(stream, &ev, 1) == 1) {
unsigned char evnt = ev.message & 0xF0;
- unsigned char chan = ev.message & 0x0F;
unsigned char note = ev.message >> 8;
unsigned char vel = ev.message >> 16;
+#if 0
+ // it is IMHO not a good idea to filter on the channel.
+ // code snippet left here for visibility
+ unsigned char chan = ev.message & 0x0F;
+ if (chan != 0x09) continue; // only accept channel 10 (percussion)
+#endif
if (evnt != 0x90) continue; // 0x90 = any channel note-on
- //if (chan != 0x09) continue; // only accept channel 10 (percussion)
if (vel == 0x00) continue; // velocity 0 is often used instead of note-off
Map::const_iterator it = map.find(note);
if (it == map.end()) {
|
|
From: Felix B. <fbe...@us...> - 2010-05-12 05:19:14
|
Module: performous
Branch: master
Commit: 42828c6feb68201d5222edf79038e9314b8caec8
Author: Felix Bertram <fl...@be...>
Date: Tue May 11 22:16:22 2010 -0700
image type detection
The image type detection from the file extension was broken,
the extension was not properly converted to lower case.
---
game/surface.cc | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/game/surface.cc b/game/surface.cc
index fa4a2b5..e8c1edc 100644
--- a/game/surface.cc
+++ b/game/surface.cc
@@ -24,12 +24,15 @@ float Dimensions::screenY() const {
throw std::logic_error("Dimensions::screenY(): unknown m_screenAnchor value");
}
+
template <typename T> void loader(T& target, fs::path name) {
std::string const filename = name.string();
if (!fs::exists(name)) throw std::runtime_error("File not found: " + filename);
// Get file extension in lower case
std::string ext = name.extension();
- std::for_each(ext.begin(), ext.end(), static_cast<int(*)(int)>(std::tolower));
+ // somehow this does not convert the extension to lower case:
+ //std::for_each(ext.begin(), ext.end(), static_cast<int(*)(int)>(std::tolower));
+ std::transform(ext.begin(), ext.end(), ext.begin(), ::tolower );
if (ext == ".svg") loadSVG(target, filename);
else if (ext == ".png") {
|