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-04-25 06:19:36
|
Module: performous
Branch: master
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-04-25 06:19:34
|
Module: performous
Branch: master
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-04-22 18:18:59
|
Module: performous
Branch: master
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: Yoda-JM <yo...@us...> - 2010-04-22 06:28:28
|
Module: performous
Branch: master
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-04-21 09:50:27
|
Module: performous
Branch: master
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-04-21 08:50:53
|
Module: performous
Branch: instrumentgraph
Commit: 77edaf5cfec85b522c753172490210c178f28eee
Author: Tapio Vierros <tap...@gm...>
Date: Wed Apr 21 11:49:42 2010 +0300
Add a 3s countdown to instrument notes start using popups.
---
game/guitargraph.cc | 10 +++++++++-
game/guitargraph.hh | 1 +
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 078969f..d4eabbe 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -74,7 +74,8 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number)
m_drumfillScore(),
m_soloTotal(),
m_soloScore(),
- m_solo()
+ m_solo(),
+ m_countdown(3)
{
// Copy all tracks of supported types (either drums or non-drums) to m_instrumentTracks
for (InstrumentTracks::const_iterator it = m_song.instrumentTracks.begin(); it != m_song.instrumentTracks.end(); ++it) {
@@ -179,6 +180,13 @@ void GuitarGraph::engine() {
if (m_input.pressed(i)) m_hit[i + 1].setValue(1.0);
}
}
+ // Countdown
+ if (time < m_chords.front().begin && time >= m_chords.front().begin - m_countdown - 1) {
+ m_popups.push_back(Popup(m_countdown > 0 ?
+ std::string("- ") +boost::lexical_cast<std::string>(unsigned(m_countdown))+" -" : "Rock On!",
+ glutil::Color(0.0f, 0.0f, 1.0f), 3.0, m_popupText.get()));
+ --m_countdown;
+ }
if (!m_drumfills.empty()) updateDrumFill(time); // Drum Fills / BREs
if (m_starpower.get() > 0.001) m_correctness.setTarget(1.0, true);
if (time < m_jointime) m_dead = 0; // Disable dead counting while joining
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index 650cdeb..59eacad 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -127,5 +127,6 @@ class GuitarGraph: public InstrumentGraph {
double m_soloTotal; /// maximum solo score
double m_soloScore; /// score during solo
bool m_solo; /// are we currently playing a solo
+ int m_countdown; /// countdown counter
};
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2010-04-21 08:50:15
|
Module: performous
Branch: master
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: Lasse Kärkkäi. <tr...@us...> - 2010-04-20 23:26:09
|
Module: performous
Branch: master
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: Yoda-JM <yo...@us...> - 2010-04-20 21:21:00
|
Module: web Branch: master Commit: 1ffa06557f81c38bebd50e7351a9ad0c10120634 Author: Vincent Le Ligeour <yo...@us...> Date: Tue Apr 20 23:20:39 2010 +0200 Added new status update --- htdocs-binary/data/LXF129.hot.pdf | Bin 0 -> 357707 bytes htdocs-source/index.txt | 9 +++++++++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/htdocs-binary/data/LXF129.hot.pdf b/htdocs-binary/data/LXF129.hot.pdf new file mode 100644 index 0000000..29ddfe9 Binary files /dev/null and b/htdocs-binary/data/LXF129.hot.pdf differ diff --git a/htdocs-source/index.txt b/htdocs-source/index.txt index 9741615..8840158 100644 --- a/htdocs-source/index.txt +++ b/htdocs-source/index.txt @@ -1,5 +1,14 @@ Announcements +:h2:2010-04-20 - Status update +Many fixes have been made on the code lately (SingStar ripper enhancements, left-handed support, new highscore, Windows fixes and other bugfixes). We now think that the current code is ready for a release really soon. You can help us to make sure there isn't any regression in the current git version by testing it, or for Windows users by testing the latest <a href="http://wiki.performous.org/index.php/Nightly_Builds">nightly build</a>. + +We are also proud to announce that Performous has been featured in the HotPicks section of <a href="http://www.linuxformat.com">Linux Format</a>, which is the best-selling Linux title in the UK. You can find the article in English <a href="data/LXF129.hot.pdf">here</a> (©Future Publishing). + +Two new videos are also available on YouTube. There is one screencast from cousteau available <a href="http://www.youtube.com/watch?v=0ZQSrt_1LL0">here</a> and one video from Tronic: +:~center:<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/soYIbsVmcyU&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/soYIbsVmcyU&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object> + + :h2:2010-02-04 - Status update Currently we have no easy solution to the Windows audio sync issues that still cause some jerkiness and it appears that most of the audio code will have to be rewritten to really fix the issue properly. Because of this the next release will be delayed further and it is likely to be numbered 0.6 instead of another 0.5 bugfix version as there has been significant work done on improving the graphics and there also are many usability fixes. Part of the problem is that people find implementing new features more interesting than fixing complex bugs, something that I gather to be a very common problem with open-source projects where all the developers are volunteers. |
|
From: Tapio V. <aa...@us...> - 2010-04-20 19:17:51
|
Module: performous
Branch: master
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-04-20 19:17:48
|
Module: performous
Branch: master
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-04-17 12:46:36
|
Module: performous
Branch: master
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-04-17 12:46:32
|
Module: performous
Branch: master
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: Lasse Kärkkäi. <tr...@us...> - 2010-04-15 09:34:00
|
Module: performous Branch: master 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: Lasse Kärkkäi. <tr...@us...> - 2010-04-15 09:33:58
|
Module: performous
Branch: master
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-04-15 07:12:05
|
Module: performous
Branch: master
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: Yoda-JM <yo...@us...> - 2010-04-14 11:46:17
|
Module: performous
Branch: master
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: Yoda-JM <yo...@us...> - 2010-04-14 06:55:09
|
Module: performous Branch: master 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: Yoda-JM <yo...@us...> - 2010-04-13 07:10:16
|
Module: performous Branch: master 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: Yoda-JM <yo...@us...> - 2010-04-13 06:52:26
|
Module: performous
Branch: master
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-04-12 20:04:16
|
Module: performous
Branch: master
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-04-12 18:33:35
|
Module: performous
Branch: instrumentgraph
Commit: 5fed141db16302c3b3d66b448a510b248e1eca21
Author: Tapio Vierros <tap...@gm...>
Date: Mon Apr 12 21:31:03 2010 +0300
Add an accuracy indicator after solos.
---
game/guitargraph.cc | 37 ++++++++++++++++++++++++++-----------
game/guitargraph.hh | 3 +++
2 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 367784b..078969f 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -71,7 +71,10 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number)
m_drumJump(0.0, 12.0),
m_starmeter(),
m_drumfillHits(),
- m_drumfillScore()
+ m_drumfillScore(),
+ m_soloTotal(),
+ m_soloScore(),
+ m_solo()
{
// Copy all tracks of supported types (either drums or non-drums) to m_instrumentTracks
for (InstrumentTracks::const_iterator it = m_song.instrumentTracks.begin(); it != m_song.instrumentTracks.end(); ++it) {
@@ -227,6 +230,15 @@ void GuitarGraph::engine() {
while (m_chordIt != m_chords.end() && m_chordIt->begin + maxTolerance < time) {
if ( (m_drums && m_chordIt->status != m_chordIt->polyphony)
|| (!m_drums && m_chordIt->status == 0) ) endStreak();
+ // Calculate solo total score
+ if (m_solo) m_soloTotal += m_chordIt->polyphony * points(0);
+ // Solo just ended?
+ else if (m_soloTotal > 0) {
+ m_popups.push_back(Popup(boost::lexical_cast<std::string>(unsigned(m_soloScore / m_soloTotal * 100)) + " %",
+ glutil::Color(0.0f, 0.8f, 0.0f), 1.0, m_popupText.get()));
+ m_soloScore = 0;
+ m_soloTotal = 0;
+ }
++m_dead;
++m_chordIt;
}
@@ -268,12 +280,17 @@ void GuitarGraph::engine() {
if (last == ev.dur->end) endHold(fret, time);
}
}
+ // Update solo status
+ m_solo = false;
+ for (Durations::const_iterator it = m_solos.begin(); it != m_solos.end(); ++it) {
+ if (time >= it->begin && time <= it->end) { m_solo = true; break; }
+ }
// Check if a long streak goal has been reached
if (m_streak >= getNextBigStreak(m_bigStreak)) {
m_bigStreak = getNextBigStreak(m_bigStreak);
m_starmeter += streakStarBonus;
m_popups.push_back(Popup(boost::lexical_cast<std::string>(unsigned(m_bigStreak)) + "\nStreak!",
- glutil::Color(1.0f, 0.0, 0.0), 1.0, m_popupText.get()));
+ glutil::Color(1.0f, 0.0f, 0.0f), 1.0, m_popupText.get()));
}
// During GodMode, correctness is full, no matter what
if (m_starpower.get() > 0.01) m_correctness.setTarget(1.0, true);
@@ -498,6 +515,7 @@ void GuitarGraph::guitarPlay(double time, input::Event const& ev) {
m_chordIt->status = 1 + picked;
m_score += score;
m_starmeter += score;
+ if (m_solo) m_soloScore += score;
m_correctness.setTarget(1.0, true); // Instantly go to one
for (int fret = 0; fret < 5; ++fret) {
if (!m_chordIt->fret[fret]) continue;
@@ -536,6 +554,7 @@ glutil::Color const& GuitarGraph::color(int fret) const {
glutil::Color const GuitarGraph::colorize(glutil::Color c, double time) const {
const static glutil::Color godmodeC(0.5f, 0.5f, 1.0f); // Color for full GodMode
const static glutil::Color soloC(0.2f, 0.9f, 0.2f); // Color for solo notes
+ // Solo? (cannot use m_solo, as time can be in future)
for (Durations::const_iterator it = m_solos.begin(); it != m_solos.end(); ++it) {
if (time >= it->begin && time <= it->end) { c = soloC; break; }
}
@@ -876,15 +895,11 @@ void GuitarGraph::drawInfo(double time, double offsetX, Dimensions dimensions) {
if (m_drums && m_dfIt != m_drumfills.end() && time >= m_dfIt->begin && time <= m_dfIt->end)
m_text.draw(" Drum Fill! ", a);
else m_text.draw("God Mode Ready!", a);
- } else {
- // Solo?
- for (Durations::const_iterator it = m_solos.begin(); it != m_solos.end(); ++it) {
- if (time >= it->begin && time <= it->end) {
- float a = std::abs(std::fmod(time, 1.0) - 0.5f) * 2.0f;
- m_text.dimensions.screenBottom(-0.02).middle(-0.03 + offsetX);
- m_text.draw("Solo!", a);
- }
- }
+ } else if (m_solo) {
+ // Solo
+ float a = std::abs(std::fmod(time, 1.0) - 0.5f) * 2.0f;
+ m_text.dimensions.screenBottom(-0.02).middle(-0.03 + offsetX);
+ m_text.draw("Solo!", a);
}
drawPopups(offsetX);
}
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index 3aeb633..650cdeb 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -124,5 +124,8 @@ class GuitarGraph: public InstrumentGraph {
double m_starmeter; /// when this is high enough, GodMode becomes available
double m_drumfillHits; /// keeps track that enough hits are scored
double m_drumfillScore; /// max score for the notes under drum fill
+ double m_soloTotal; /// maximum solo score
+ double m_soloScore; /// score during solo
+ bool m_solo; /// are we currently playing a solo
};
|
|
From: Yoda-JM <yo...@us...> - 2010-04-11 18:23:20
|
Module: performous
Branch: master
Commit: bb463227d2d07e9a55b9b88ae3f0bb22f38e148b
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Apr 11 20:23:02 2010 +0200
Today I learned that fixing code could lead to regressions
---
tools/ss_extract.cpp | 20 +++-----------------
1 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/tools/ss_extract.cpp b/tools/ss_extract.cpp
index 476783d..ec9896a 100644
--- a/tools/ss_extract.cpp
+++ b/tools/ss_extract.cpp
@@ -356,16 +356,6 @@ void saveTxtFile(xmlpp::NodeSet &sentence, const fs::path &path, const Song &son
if (!song.vocals.empty()) txtfile << "#VOCALS:" << filename(song.vocals) << std::endl;
if (!song.vocals.empty()) txtfile << "#VIDEO:" << filename(song.video) << std::endl;
if (!song.cover.empty()) txtfile << "#COVER:" << filename(song.cover) << std::endl;
- /*
- if (video && mkvcompress) {
- txtfile << "#VIDEO:video.m4v" << std::endl;
- } else {
- if(video) {
- txtfile << "#VIDEO:video.mpg" << std::endl;
- }
- }
- txtfile << "#COVER:cover.jpg" << std::endl;
- */
//txtfile << "#BACKGROUND:background.jpg" << std::endl;
txtfile << "#BPM:" << song.tempo << std::endl;
ts = 0;
@@ -548,7 +538,7 @@ struct Process {
}
};
-void get_node(const xmlpp::Node* node, std::string& genre, std::string& year, double& tempo)
+void get_node(const xmlpp::Node* node, std::string& genre, std::string& year)
{
const xmlpp::ContentNode* nodeContent = dynamic_cast<const xmlpp::ContentNode*>(node);
const xmlpp::TextNode* nodeText = dynamic_cast<const xmlpp::TextNode*>(node);
@@ -582,7 +572,7 @@ void get_node(const xmlpp::Node* node, std::string& genre, std::string& year, do
xmlpp::Node::NodeList list = node->get_children();
for(xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter)
{
- get_node(*iter, genre, year, tempo); //recursive
+ get_node(*iter, genre, year); //recursive
}
}
}
@@ -654,11 +644,7 @@ struct FindSongs {
s.artist = elem.get_attribute("PERFORMANCE_NAME")->get_value();
if (!m_search.empty() && m_search != elem.get_attribute("ID")->get_value() && (s.artist + " - " + s.title).find(m_search) == std::string::npos) continue;
xmlpp::Node* node = dynamic_cast<const xmlpp::Node*>((*it));
- get_node(node, s.genre, s.year, s.tempo); // get the values for genre, year and tempo
-
- xmlpp::NodeSet t = elem.find(ns + "TEMPO/@BPM", nsmap);
- if (t.empty()) s.tempo = 0.0; // this will always be 0.0
- else s.tempo = atof(dynamic_cast<xmlpp::Attribute&>(*t[0]).get_value().c_str());
+ get_node(node, s.genre, s.year); // get the values for genre and year
xmlpp::NodeSet fr = elem.find(ns + "VIDEO/@FRAME_RATE", nsmap);
if (fr.empty()) s.pal = true; // PAL if no framerate is found
|
|
From: Yoda-JM <yo...@us...> - 2010-04-11 18:13:49
|
Module: performous
Branch: master
Commit: fb7a20a7fecc67aec01189bf664db52fa6e9cf51
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Apr 11 20:13:27 2010 +0200
Fixed Singstar PAL/NTSC decoding
---
tools/ss_extract.cpp | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/ss_extract.cpp b/tools/ss_extract.cpp
index fe4a043..476783d 100644
--- a/tools/ss_extract.cpp
+++ b/tools/ss_extract.cpp
@@ -139,6 +139,7 @@ struct Song {
fs::path path, music, vocals, video, background, cover;
unsigned samplerate;
double tempo;
+ bool pal;
Song(): samplerate(), tempo() {}
};
@@ -207,7 +208,7 @@ void video_us(Song& song, PakFile const& iavFile, PakFile const& indFile, fs::pa
frame++;
}
- IPUConv(ipudata, (outPath / "video.mpg").string(), false);
+ IPUConv(ipudata, (outPath / "video.mpg").string(), song.pal);
song.video = outPath / "video.mpg";
}
@@ -655,10 +656,14 @@ struct FindSongs {
xmlpp::Node* node = dynamic_cast<const xmlpp::Node*>((*it));
get_node(node, s.genre, s.year, s.tempo); // get the values for genre, year and tempo
- xmlpp::NodeSet t = elem.find("TEMPO/@BPM");
+ xmlpp::NodeSet t = elem.find(ns + "TEMPO/@BPM", nsmap);
if (t.empty()) s.tempo = 0.0; // this will always be 0.0
else s.tempo = atof(dynamic_cast<xmlpp::Attribute&>(*t[0]).get_value().c_str());
+ xmlpp::NodeSet fr = elem.find(ns + "VIDEO/@FRAME_RATE", nsmap);
+ if (fr.empty()) s.pal = true; // PAL if no framerate is found
+ else s.pal = (atof(dynamic_cast<xmlpp::Attribute&>(*fr[0]).get_value().c_str()) == 25.0);
+
s.edition = prettyEdition(edition);
songs[elem.get_attribute("ID")->get_value()] = s;
|
|
From: Yoda-JM <yo...@us...> - 2010-04-11 18:13:47
|
Module: performous
Branch: master
Commit: 848bbdabf2506416c187633a40dd788f8a40f041
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Apr 11 18:25:24 2010 +0200
Fixed segfault in ss_extract on US disks
---
tools/ss_extract.cpp | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/tools/ss_extract.cpp b/tools/ss_extract.cpp
index 21ce01b..fe4a043 100644
--- a/tools/ss_extract.cpp
+++ b/tools/ss_extract.cpp
@@ -186,11 +186,13 @@ void video_us(Song& song, PakFile const& iavFile, PakFile const& indFile, fs::pa
// first 4 bytes are packet length
iavFile.get(data, iav_offset, size);
{
- unsigned int opaque_footer_size = 3 * sizeof(int);
- unsigned int chunk1 = getLE32(&data[0]);
- ipudata.insert(ipudata.end(), data.begin() + 4, data.begin() + chunk1 - opaque_footer_size);
- unsigned int chunk2 = getLE32(&data[chunk1]);
- ipudata.insert(ipudata.end(), data.begin() + chunk1 + 4, data.begin() + chunk1 + chunk2 - opaque_footer_size);
+ unsigned int consumed = 0;
+ while(consumed < size) {
+ unsigned int opaque_footer_size = 3 * sizeof(int);
+ unsigned int chunk = getLE32(&data[consumed]);
+ ipudata.insert(ipudata.end(), data.begin() + 4 + consumed, data.begin() + consumed + chunk - opaque_footer_size);
+ consumed += chunk;
+ }
}
iav_offset += size;
break;
|