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: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:07:54
|
Module: performous
Branch: stereo3d
Commit: 56bf3d66d16bff9e8ddbf41a780eae4252fbea43
Author: Vincent Le Ligeour <yo...@us...>
Date: Sat Jan 22 15:34:41 2011 +0100
Added pro bass track detection
---
game/songparser-ini.cc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/game/songparser-ini.cc b/game/songparser-ini.cc
index ca64598..c46f476 100644
--- a/game/songparser-ini.cc
+++ b/game/songparser-ini.cc
@@ -53,6 +53,7 @@ namespace {
else if (name == "REAL_KEYS_H") return false; // TODO: RB3 pro keyboard hard track
else if (name == "REAL_KEYS_M") return false; // TODO: RB3 pro keyboard medium track
else if (name == "REAL_KEYS_E") return false; // TODO: RB3 pro keyboard easy track
+ else if (name == "REAL_BASS") return false; // TODO: RB3 pro bass track
else if (name == "REAL_GUITAR") return false; // TODO: RB3 pro guitar 17 frets (Mustang) track
else if (name == "REAL_GUITAR_22") return false; // TODO: RB3 pro guitar 22 frets (Squier) track
else return false;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:07:51
|
Module: performous
Branch: stereo3d
Commit: d921dabc269a5bd9b4b1e3c500e4f9ca32ab2cd8
Author: Vincent Le Ligeour <yo...@us...>
Date: Sat Jan 22 15:31:46 2011 +0100
Added pro guitar and pro keyboard hard/medium/easy tracks
---
game/songparser-ini.cc | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/game/songparser-ini.cc b/game/songparser-ini.cc
index 6d353d5..ca64598 100644
--- a/game/songparser-ini.cc
+++ b/game/songparser-ini.cc
@@ -43,12 +43,18 @@ namespace {
else if (name == "DRUMS") name = TrackName::DRUMS;
else if (name == "BASS") name = TrackName::BASS;
else if (name == "KEYS") return false; // TODO: RB3 5 lane keyboard track
- else if (name == "REAL_KEYS_X") return false; // TODO: RB3 pro keyboard track
else if (name == "GUITAR") name = TrackName::GUITAR;
else if (name == "VOCALS") name = TrackName::LEAD_VOCAL;
else if (name == "HARM1") name = TrackName::HARMONIC_1;
else if (name == "HARM2") name = TrackName::HARMONIC_2;
else if (name == "HARM3") name = TrackName::HARMONIC_3;
+ // expert stuffs
+ else if (name == "REAL_KEYS_X") return false; // TODO: RB3 pro keyboard expert track
+ else if (name == "REAL_KEYS_H") return false; // TODO: RB3 pro keyboard hard track
+ else if (name == "REAL_KEYS_M") return false; // TODO: RB3 pro keyboard medium track
+ else if (name == "REAL_KEYS_E") return false; // TODO: RB3 pro keyboard easy track
+ else if (name == "REAL_GUITAR") return false; // TODO: RB3 pro guitar 17 frets (Mustang) track
+ else if (name == "REAL_GUITAR_22") return false; // TODO: RB3 pro guitar 22 frets (Squier) track
else return false;
return true;
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:07:48
|
Module: performous Branch: stereo3d Commit: 98bc4473cb9488482f36d2703889186c663cda50 Author: Vincent Le Ligeour <yo...@us...> Date: Sat Jan 22 13:36:07 2011 +0100 Added keyboard and pro-keyboard track names according to http://creators.rockband.com/docs/Authoring --- 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 398b092..6d353d5 100644 --- a/game/songparser-ini.cc +++ b/game/songparser-ini.cc @@ -42,6 +42,8 @@ namespace { else if (name == "DRUM") name = TrackName::DRUMS; else if (name == "DRUMS") name = TrackName::DRUMS; else if (name == "BASS") name = TrackName::BASS; + else if (name == "KEYS") return false; // TODO: RB3 5 lane keyboard track + else if (name == "REAL_KEYS_X") return false; // TODO: RB3 pro keyboard track else if (name == "GUITAR") name = TrackName::GUITAR; else if (name == "VOCALS") name = TrackName::LEAD_VOCAL; else if (name == "HARM1") name = TrackName::HARMONIC_1; |
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:07:46
|
Module: performous Branch: stereo3d Commit: 1dc4d1f81e7a17e1049a3e04c387b9b499a84a66 Author: Xaldyz <xa...@us...> Date: Tue Jan 11 15:51:15 2011 +0100 cmake/Modules/FindBoost.cmake Fixed latest Boost detection (1.45) cmake/Modules/FindOpenGL.cmake Fixed auto-detection of OpenGL using MSVC lang/it.po Updated italian translation tools/scripts/xml_gettext.sh Fixed to get it running under MSYS --- cmake/Modules/FindBoost.cmake | 5 +- cmake/Modules/FindOpenGL.cmake | 25 +- lang/it.po | 944 ++++++++++++++++++++-------------------- tools/scripts/xml_gettext.sh | 2 +- 4 files changed, 497 insertions(+), 479 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:07:42
|
Module: performous
Branch: stereo3d
Commit: a3128ff112b0a99435c02b457d0325cccb3d70ea
Author: Tapio Vierros <tap...@gm...>
Date: Mon Jan 3 18:32:26 2011 +0200
Add some hacks to make GH xplorer guitar more usable.
---
game/joystick.cc | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 0e846ae..ce8eb3c 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -733,10 +733,12 @@ bool input::SDL::pushEvent(SDL_Event _e) {
}
case SDL_JOYAXISMOTION:
{
+ //FIXME: XML axis config is really needed so that these horrible
+ // quirks for RB XBOX360 and GH XPLORER guitars can be removed
joy_id = _e.jaxis.which;
InputDevPrivate& dev = devices.find(joy_id)->second;
if(!dev.assigned()) return false;
- if (_e.jaxis.axis == 5 || _e.jaxis.axis == 6 || _e.jaxis.axis == 1) {
+ if (dev.name() != "GUITAR_GUITARHERO_XPLORER" && (_e.jaxis.axis == 5 || _e.jaxis.axis == 6 || _e.jaxis.axis == 1)) {
event.type = input::Event::PICK;
// Direction
if(_e.jaxis.value > 0 ) {
@@ -749,7 +751,8 @@ bool input::SDL::pushEvent(SDL_Event _e) {
dev.addEvent(event);
}
break;
- } else if (_e.jaxis.axis == 2 || (dev.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 4)) {
+ } else if ((dev.name() != "GUITAR_GUITARHERO_XPLORER" && _e.jaxis.axis == 2 )
+ || (dev.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 4)) {
// Whammy bar (special case for XBox RB guitar
for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
event.pressed[i] = dev.pressed(i);
@@ -764,8 +767,9 @@ bool input::SDL::pushEvent(SDL_Event _e) {
}
dev.addEvent(event);
break;
- } else if (dev.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 3) {
- // XBox RB guitar's Tilt sensor
+ } else if ((dev.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 3)
+ || (dev.name() == "GUITAR_GUITARHERO_XPLORER" && _e.jaxis.axis == 2)) {
+ // Tilt sensor as an axis on some guitars
for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
event.pressed[i] = dev.pressed(i);
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:07:40
|
Module: performous
Branch: stereo3d
Commit: 2bb0dde5c5fee07528c203447150a742c29c9a0e
Author: Tapio Vierros <tap...@gm...>
Date: Mon Jan 3 18:16:11 2011 +0200
Whammy and tilt won't bring the join menu back at start anymore.
---
game/guitargraph.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index f7055ce..d3422d7 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -327,7 +327,8 @@ void GuitarGraph::engine() {
break;
// If the songs hasn't yet started, we want key presses to bring join menu back (not pause menu)
- } else if (time < -2 && ev.type == input::Event::PRESS) {
+ } else if (time < -2 && ev.type == input::Event::PRESS
+ && ev.button != input::WHAMMY_BUTTON && ev.button != input::GODMODE_BUTTON) {
setupJoinMenu();
m_menu.open();
break;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:07:37
|
Module: performous
Branch: stereo3d
Commit: 4add8c98d582a3746f20c7c227264c877e3941ba
Author: Tapio Vierros <tap...@gm...>
Date: Mon Jan 3 18:12:17 2011 +0200
Reduced some map::find calls.
---
game/joystick.cc | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index c132f99..0e846ae 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -732,25 +732,27 @@ bool input::SDL::pushEvent(SDL_Event _e) {
}
}
case SDL_JOYAXISMOTION:
+ {
joy_id = _e.jaxis.which;
- if(!devices.find(joy_id)->second.assigned()) return false;
+ InputDevPrivate& dev = devices.find(joy_id)->second;
+ if(!dev.assigned()) return false;
if (_e.jaxis.axis == 5 || _e.jaxis.axis == 6 || _e.jaxis.axis == 1) {
event.type = input::Event::PICK;
// Direction
if(_e.jaxis.value > 0 ) {
// down
event.button = 0;
- devices.find(joy_id)->second.addEvent(event);
+ dev.addEvent(event);
} else if(_e.jaxis.value < 0 ) {
// up
event.button = 1;
- devices.find(joy_id)->second.addEvent(event);
+ dev.addEvent(event);
}
break;
- } else if (_e.jaxis.axis == 2 || (devices.find(joy_id)->second.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 4)) {
+ } else if (_e.jaxis.axis == 2 || (dev.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 4)) {
// Whammy bar (special case for XBox RB guitar
for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
- event.pressed[i] = devices.find(joy_id)->second.pressed(i);
+ event.pressed[i] = dev.pressed(i);
}
event.button = input::WHAMMY_BUTTON;
if (_e.jaxis.value > 0) {
@@ -760,12 +762,12 @@ bool input::SDL::pushEvent(SDL_Event _e) {
event.type = input::Event::RELEASE;
event.pressed[event.button] = false;
}
- devices.find(joy_id)->second.addEvent(event);
+ dev.addEvent(event);
break;
- } else if (devices.find(joy_id)->second.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 3) {
+ } else if (dev.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 3) {
// XBox RB guitar's Tilt sensor
for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
- event.pressed[i] = devices.find(joy_id)->second.pressed(i);
+ event.pressed[i] = dev.pressed(i);
}
event.button = input::GODMODE_BUTTON;
if (_e.jaxis.value < -2) {
@@ -775,13 +777,14 @@ bool input::SDL::pushEvent(SDL_Event _e) {
event.type = input::Event::RELEASE;
event.pressed[event.button] = false;
}
- devices.find(joy_id)->second.addEvent(event);
+ dev.addEvent(event);
break;
} else {
return false;
}
// we should never be there
break;
+ }
case SDL_JOYHATMOTION:
joy_id = _e.jhat.which;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:03:13
|
Module: performous Branch: opengl2 Commit: 40bea45633758c4a9b526fd629e6c15c985fda21 Author: Lasse Karkkainen <tro...@tr...> Date: Thu Jan 27 00:02:14 2011 +0100 Merge branch 'master' into opengl2 Conflicts: game/guitargraph.cc game/screen_songs.cc --- |
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:03:10
|
Module: performous
Branch: opengl2
Commit: 87b23cdd5bca9ee2fd9feca033f35f28b1a9ecdf
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Jan 26 23:43:52 2011 +0100
Do not parse forced instruments with regex
---
game/joystick.cc | 29 +++++++++++------------------
1 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index af75206..663c12c 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -334,32 +334,25 @@ void input::SDL::init() {
readControllers(g_instruments, getConfigDir() / "controllers.xml");
std::map<unsigned int, input::Instrument> forced_type;
- std::string regexp_match_force("^([0-9]+):(\\(");
- for(input::Instruments::iterator it = g_instruments.begin() ; it != g_instruments.end() ; ++it) {
- if(it == g_instruments.begin())
- regexp_match_force += it->first;
- else
- regexp_match_force += "|" + it->first;
- }
- regexp_match_force += "\\))$";
- boost::regex match_force(regexp_match_force);
- boost::match_results<const char*> what;
-
ConfigItem::StringList const& instruments = config["game/instruments"].sl();
for (ConfigItem::StringList::const_iterator it = instruments.begin(); it != instruments.end(); ++it) {
- if (!regex_search(it->c_str(), what, match_force)) {
- std::clog << "controllers/error: " << *it << "\" is not a valid instrument forced value" << std::endl;
+ std::istringstream iss(*it);
+ unsigned sdl_id;
+ char ch;
+ std::string type;
+ if (!(iss >> sdl_id >> ch >> type) || ch != ':') {
+ std::clog << "controllers/error: \"" << *it << "\" invalid syntax, should be SDL_ID:CONTROLLER_TYPE" << std::endl;
continue;
} else {
- unsigned int sdl_id = boost::lexical_cast<unsigned int>(what[1]);
- std::string instrument_type(what[2]);
-
- for(input::Instruments::const_iterator it2 = g_instruments.begin() ; it2 != g_instruments.end() ; ++it2) {
- if(instrument_type == it2->first) {
+ bool found = false;
+ for (input::Instruments::const_iterator it2 = g_instruments.begin(); it2 != g_instruments.end(); ++it2) {
+ if (type == it2->first) {
forced_type.insert(std::pair<unsigned int,input::Instrument>(sdl_id, input::Instrument(it2->second)));
+ found = true;
break;
}
}
+ if (!found) std::clog << "controllers/error: Controller type \"" << type << "\" unknown" << std::endl;
}
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:03:08
|
Module: performous
Branch: opengl2
Commit: f340c6f12b095347966dc535a612f8cbfba4f1d7
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jan 23 14:37:59 2011 +0100
Reverted manually bf2c4bdf (practice drum mode not used at all) to simplify guitargraph
---
game/guitargraph.cc | 42 +++++-------------------------------------
game/guitargraph.hh | 4 +---
game/screen_sing.cc | 12 +++---------
game/screen_sing.hh | 4 +---
4 files changed, 10 insertions(+), 52 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 61cb1b0..51cd3d2 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -93,7 +93,7 @@ void GuitarGraph::initDrums() {
//m_samples.push_back("drum tom2");
}
-GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number, bool practmode):
+GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number):
InstrumentGraph(audio, song, drums ? input::DRUMS : input::GUITAR),
m_tail(getThemePath("tail.svg")),
m_tail_glow(getThemePath("tail_glow.svg")),
@@ -105,7 +105,6 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number,
m_neckglowColor(),
m_drums(drums),
m_use3d(config["graphic/3d_notes"].b()),
- m_practmode(practmode),
m_level(),
m_track_index(m_instrumentTracks.end()),
m_dfIt(m_drumfills.end()),
@@ -120,7 +119,6 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number,
m_soloTotal(),
m_soloScore(),
m_solo(),
- m_practHold(false),
m_hasTomTrack(false),
m_whammy(0)
{
@@ -413,31 +411,14 @@ void GuitarGraph::engine() {
// Countdown to start
handleCountdown(time, time < getNotesBeginTime() ? getNotesBeginTime() : m_jointime+1);
- // FIXME: this is a band aid to release m_practHold
- // this may happen in conjunction with the regular pause feature
- if (m_practHold && !m_audio.isPaused()) m_practHold = false;
-
// Skip missed notes
// we hold the note a litle bit *before* they go out of the tolerance window
// this is important in order for the hit-detection to still accept the notes
// FIXME: need to confirm that this timing is reliable,
// if a note gets marked as 'past' completing the chord does not re-start the song
- double past = time - maxTolerance + (m_practmode ? 0.05 : 0.0);
- while (!m_practHold && m_chordIt != m_chords.end() && m_chordIt->begin < past) {
+ 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();
- if (m_practmode && !dead()) {
- // in practice mode hold the chord here
- // m_chordIt must not change until finishing the chord
- m_audio.seekPos(m_chordIt->begin);
- m_audio.pause(true);
- m_practHold = true;
- endStreak();
- std::cout << "practice: hold chord at " << m_chordIt->begin << ", status = "<< m_chordIt->status << std::endl;
- break;
- }
- }
+ || (!m_drums && m_chordIt->status == 0) ) endStreak();
// Calculate solo total score
if (m_solo) { m_soloScore += m_chordIt->score; m_soloTotal += m_chordIt->polyphony * points(0);
// Solo just ended?
@@ -451,17 +432,6 @@ void GuitarGraph::engine() {
++m_chordIt;
}
- // just finished a chord in practice mode
- if (m_practHold &&
- ( (m_drums && m_chordIt->status == m_chordIt->polyphony)
- || (!m_drums && m_chordIt->status != 0) ) ) {
- // now we have completed the chord
- // m_chordIt must not change from holding the chord until we get here
- if (m_audio.isPaused()) m_audio.togglePause();
- m_practHold = false;
- std::cout << "practice: finish chord at " << m_chordIt->begin << std::endl;
- }
-
if (difficulty_changed) m_dead = 0; // if difficulty is changed, m_dead would get incorrect
// Adjust the correctness value
if (!m_events.empty() && m_events.back().type == 0) m_correctness.setTarget(0.0, true);
@@ -649,18 +619,16 @@ void GuitarGraph::drumHit(double time, int fret) {
// in kiddy mode we don't care about the correct pad
// all that matters is that there is still a missing note in that chord
if (m_chordIt->status == m_chordIt->polyphony) continue;
- } else if ((!it->dur[fret]) || (m_notes[it->dur[fret]])) continue; // invalid fret/hit or already played
+ } else if (m_notes[it->dur[fret]]) continue; // invalid fret/hit or already played
double error = std::abs(it->begin - time);
if (error < tolerance) {
best = it;
tolerance = error;
signed_error = it->begin - time;
- if (m_practHold) break; // during practice hold the chord will always be m_chordIt
}
}
- if ((best == m_chords.end())
- || (m_practHold && best != m_chordIt)) fail(time, fret); // None found
+ if (best == m_chords.end()) fail(time, fret); // None found
else {
// Skip all chords earlier than the best fit chord
for (; best != m_chordIt; ++m_chordIt) {
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index f0dc946..313b744 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -46,7 +46,7 @@ static inline bool operator==(Chord const& a, Chord const& b) {
class GuitarGraph: public InstrumentGraph {
public:
/// constructor
- GuitarGraph(Audio& audio, Song const& song, bool drums, int number, bool practmode=false);
+ GuitarGraph(Audio& audio, Song const& song, bool drums, int number);
/** draws GuitarGraph
* @param time at which time to draw
*/
@@ -99,7 +99,6 @@ class GuitarGraph: public InstrumentGraph {
// Flags
bool m_drums; /// are we using drums?
bool m_use3d; /// are we using 3d?
- bool m_practmode; /// switch to enable practice mode
// Track stuff
enum Difficulty {
@@ -154,7 +153,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
- bool m_practHold; /// true if holding a chord during practice
bool m_hasTomTrack; /// true if the track has at least one tom track
double m_whammy; /// whammy value for pitch shift
};
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 525f035..8febec1 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -30,7 +30,6 @@ namespace {
}
void ScreenSing::enter() {
- //m_practmode = true; // un-comment this line to play with practice mode. temporary, of course!
ScreenManager* sm = ScreenManager::getSingletonPtr();
sm->loading(_("Loading theme..."), 0.0);
theme.reset(new ThemeSing());
@@ -104,7 +103,7 @@ void ScreenSing::enter() {
if (type == 3) break;
}
if (type == 0) m_dancers.push_back(new DanceGraph(m_audio, *m_song));
- else m_instruments.push_back(new GuitarGraph(m_audio, *m_song, type == 2, idx, m_practmode));
+ else m_instruments.push_back(new GuitarGraph(m_audio, *m_song, type == 2, idx));
++idx;
} catch (input::NoDevError&) {
++type;
@@ -508,13 +507,8 @@ void ScreenSing::draw() {
}
if (m_audio.isPaused()) {
- if (!m_practmode) {
- //m_pause_icon->dimensions.middle().center().fixedWidth(.32);
- //m_pause_icon->draw();
- } else {
- // we get here when the song is on hold during practice
- // TODO: display some (small) info screen here
- }
+ //m_pause_icon->dimensions.middle().center().fixedWidth(.32);
+ //m_pause_icon->draw();
}
// Menus on top of everything
diff --git a/game/screen_sing.hh b/game/screen_sing.hh
index 5df5af6..0b63066 100644
--- a/game/screen_sing.hh
+++ b/game/screen_sing.hh
@@ -49,8 +49,7 @@ class ScreenSing: public Screen {
public:
/// constructor
ScreenSing(std::string const& name, Audio& audio, Database& database, Backgrounds& bgs):
- Screen(name), m_audio(audio), m_database(database), m_backgrounds(bgs), m_latencyAV(), m_only_singers_alive(true), m_practmode(false),
- m_selectedTrack(TrackName::LEAD_VOCAL)
+ Screen(name), m_audio(audio), m_database(database), m_backgrounds(bgs), m_latencyAV(), m_only_singers_alive(true), m_selectedTrack(TrackName::LEAD_VOCAL)
{}
void enter();
void exit();
@@ -94,7 +93,6 @@ class ScreenSing: public Screen {
boost::shared_ptr<ThemeSing> theme;
AnimValue m_quitTimer;
bool m_only_singers_alive;
- bool m_practmode;
std::string m_selectedTrack;
std::string m_selectedTrackLocalized;
ConfigItem m_vocalTrackOpts;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:03:05
|
Module: performous
Branch: opengl2
Commit: a8c99571148d20f31272095a4fbea7d01b271bf0
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jan 23 13:25:28 2011 +0100
Started some simple guitargraph regactoring
---
game/guitargraph.cc | 133 +++++++++++++++++++++++++++++++-------------------
game/guitargraph.hh | 8 +++-
2 files changed, 89 insertions(+), 52 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index d3422d7..61cb1b0 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -59,6 +59,40 @@ namespace {
inline float blend(float a, float b, float f) { return a*f + b*(1.0f-f); }
}
+void GuitarGraph::initGuitar() {
+ // Copy all tracks of guitar types (not DRUMS and not KEYBOARD) to m_instrumentTracks
+ for (InstrumentTracks::const_iterator it = m_song.instrumentTracks.begin(); it != m_song.instrumentTracks.end(); ++it) {
+ std::string index = it->first;
+ if (index != TrackName::DRUMS && index != TrackName::KEYBOARD) m_instrumentTracks[index] = &it->second;
+ }
+ if (m_instrumentTracks.empty()) throw std::logic_error("No guitar tracks found");
+
+ // Adding fail samples
+ m_samples.push_back("guitar fail1");
+ m_samples.push_back("guitar fail2");
+ m_samples.push_back("guitar fail3");
+ m_samples.push_back("guitar fail4");
+ m_samples.push_back("guitar fail5");
+ m_samples.push_back("guitar fail6");
+}
+
+void GuitarGraph::initDrums() {
+ // Copy all tracks of drum type to m_instrumentTracks
+ for (InstrumentTracks::const_iterator it = m_song.instrumentTracks.begin(); it != m_song.instrumentTracks.end(); ++it) {
+ std::string index = it->first;
+ if (index == TrackName::DRUMS) m_instrumentTracks[index] = &it->second;
+ }
+ if (m_instrumentTracks.empty()) throw std::logic_error("No drum tracks found");
+
+ // Adding fail samples
+ m_samples.push_back("drum bass");
+ m_samples.push_back("drum snare");
+ m_samples.push_back("drum hi-hat");
+ m_samples.push_back("drum tom1");
+ m_samples.push_back("drum cymbal");
+ //m_samples.push_back("drum tom2");
+}
+
GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number, bool practmode):
InstrumentGraph(audio, song, drums ? input::DRUMS : input::GUITAR),
m_tail(getThemePath("tail.svg")),
@@ -90,33 +124,17 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number,
m_hasTomTrack(false),
m_whammy(0)
{
- // 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) {
- std::string index = it->first;
- if (m_drums == (index == TrackName::DRUMS)) m_instrumentTracks[index] = &it->second;
+ if(m_drums) {
+ initDrums();
+ } else {
+ initGuitar();
}
- if (m_instrumentTracks.empty()) throw std::logic_error(m_drums ? "No drum tracks found" : "No guitar tracks found");
// Load 3D fret objects
m_fretObj.load(getThemePath("fret.obj"));
m_tappableObj.load(getThemePath("fret_tap.obj"));
// Score calculator (TODO a better one)
m_scoreText.reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
m_streakText.reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
- if (m_drums) {
- m_samples.push_back("drum bass");
- m_samples.push_back("drum snare");
- m_samples.push_back("drum hi-hat");
- m_samples.push_back("drum tom1");
- m_samples.push_back("drum cymbal");
- //m_samples.push_back("drum tom2");
- } else {
- m_samples.push_back("guitar fail1");
- m_samples.push_back("guitar fail2");
- m_samples.push_back("guitar fail3");
- m_samples.push_back("guitar fail4");
- m_samples.push_back("guitar fail5");
- m_samples.push_back("guitar fail6");
- }
for (size_t i = 0; i < max_panels; ++i) {
m_pressed_anim[i].setRate(5.0);
m_holds[i] = 0;
@@ -135,43 +153,55 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number,
setupJoinMenu();
}
+void GuitarGraph::setupJoinMenuDifficulty() {
+ ConfigItem::OptionList ol;
+ int cur = 0;
+ // Add difficulties to the option list
+ for (int level = 0; level < DIFFICULTYCOUNT; ++level) {
+ if (difficulty(Difficulty(level), true)) {
+ ol.push_back(boost::lexical_cast<std::string>(level));
+ if (Difficulty(level) == m_level) cur = ol.size()-1;
+ }
+ }
+ m_selectedDifficulty = ConfigItem(ol); // Create a ConfigItem from the option list
+ m_selectedDifficulty.select(cur); // Set the selection to current level
+ m_menu.add(MenuOption("", _("Select difficulty"), &m_selectedDifficulty)); // MenuOption that cycles the options
+ m_menu.back().setDynamicName(m_difficultyOpt); // Set the title to be dynamic
+}
+
+void GuitarGraph::setupJoinMenuDrums() {
+ setupJoinMenuDifficulty();
+ m_menu.add(MenuOption(_("Lefty-mode"), "", &m_leftymode));
+ m_menu.back().setDynamicComment(m_leftyOpt);
+}
+
+void GuitarGraph::setupJoinMenuGuitar() {
+ ConfigItem::OptionList ol;
+ int cur = 0;
+ // Add tracks to option list
+ for (InstrumentTracksConstPtr::const_iterator it = m_instrumentTracks.begin(); it != m_instrumentTracks.end(); ++it) {
+ ol.push_back(it->first);
+ if (m_track_index->first == it->first) cur = ol.size()-1; // Find the index of current track
+ }
+ m_selectedTrack = ConfigItem(ol); // Create a ConfigItem from the option list
+ m_selectedTrack.select(cur); // Set the selection to current track
+ m_menu.add(MenuOption("", _("Select track"), &m_selectedTrack)); // MenuOption that cycles the options
+ m_menu.back().setDynamicName(m_trackOpt); // Set the title to be dynamic
+ setupJoinMenuDifficulty();
+ m_menu.add(MenuOption(_("Lefty-mode"), "", &m_leftymode));
+ m_menu.back().setDynamicComment(m_leftyOpt);
+}
void GuitarGraph::setupJoinMenu() {
m_menu.clear();
updateJoinMenu();
// Populate root menu
m_menu.add(MenuOption(_("Ready!"), _("Start performing!")));
- // Create track option only for guitars
- if (!m_drums) {
- ConfigItem::OptionList ol;
- int cur = 0;
- // Add tracks to option list
- for (InstrumentTracksConstPtr::const_iterator it = m_instrumentTracks.begin(); it != m_instrumentTracks.end(); ++it) {
- ol.push_back(it->first);
- if (m_track_index->first == it->first) cur = ol.size()-1; // Find the index of current track
- }
- m_selectedTrack = ConfigItem(ol); // Create a ConfigItem from the option list
- m_selectedTrack.select(cur); // Set the selection to current track
- m_menu.add(MenuOption("", _("Select track"), &m_selectedTrack)); // MenuOption that cycles the options
- m_menu.back().setDynamicName(m_trackOpt); // Set the title to be dynamic
- }
- { // Create difficulty opt
- ConfigItem::OptionList ol;
- int cur = 0;
- // Add difficulties to the option list
- for (int level = 0; level < DIFFICULTYCOUNT; ++level) {
- if (difficulty(Difficulty(level), true)) {
- ol.push_back(boost::lexical_cast<std::string>(level));
- if (Difficulty(level) == m_level) cur = ol.size()-1;
- }
- }
- m_selectedDifficulty = ConfigItem(ol); // Create a ConfigItem from the option list
- m_selectedDifficulty.select(cur); // Set the selection to current level
- m_menu.add(MenuOption("", _("Select difficulty"), &m_selectedDifficulty)); // MenuOption that cycles the options
- m_menu.back().setDynamicName(m_difficultyOpt); // Set the title to be dynamic
+ if(m_drums) {
+ setupJoinMenuDrums();
+ } else {
+ setupJoinMenuGuitar();
}
- m_menu.add(MenuOption(_("Lefty-mode"), "", &m_leftymode));
- m_menu.back().setDynamicComment(m_leftyOpt);
m_menu.add(MenuOption(_("Quit"), _("Exit to song browser"), "Songs"));
}
@@ -188,6 +218,7 @@ void GuitarGraph::updateNeck() {
// TODO: Optimize with texture cache
std::string index = m_track_index->first;
if (index == TrackName::DRUMS) m_neck.reset(new Texture(getThemePath("drumneck.svg")));
+ else if (index == TrackName::KEYBOARD) m_neck.reset(new Texture(getThemePath("guitarneck.svg")));
else if (index == TrackName::BASS) m_neck.reset(new Texture(getThemePath("bassneck.svg")));
else m_neck.reset(new Texture(getThemePath("guitarneck.svg")));
}
@@ -226,7 +257,7 @@ std::string GuitarGraph::getDifficultyString() const {
/// Get a string id for track and difficulty
std::string GuitarGraph::getModeId() const {
return m_track_index->first + " - " + diffv[m_level].name
- + (m_drums && m_input.isKeyboard() ? " (kbd)" : "");
+ + (m_input.isKeyboard() ? " (kbd)" : "");
}
/// Cycle through difficulties
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index a1ab5cf..f0dc946 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -50,7 +50,6 @@ class GuitarGraph: public InstrumentGraph {
/** draws GuitarGraph
* @param time at which time to draw
*/
- void updateNeck();
void draw(double time);
void engine();
bool dead() const;
@@ -62,7 +61,14 @@ class GuitarGraph: public InstrumentGraph {
double getWhammy() const { return m_whammy; }
private:
+ // refactoring methods
+ void initDrums();
+ void initGuitar();
+ void setupJoinMenuDifficulty();
+ void setupJoinMenuDrums();
+ void setupJoinMenuGuitar();
// Engine / scoring utils
+ void updateNeck();
bool canActivateStarpower() { return (m_starmeter > 6000); }
void activateStarpower();
void errorMeter(float error);
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:03:02
|
Module: performous Branch: opengl2 Commit: 53a912fa44275ffdd9c9b6bb1eb57458a0be85d8 Author: Vincent Le Ligeour <yo...@us...> Date: Sat Jan 22 16:52:29 2011 +0100 Made mididrums mapping configurable Conflicts: game/main.cc --- data/CMakeLists.txt | 2 + data/mididrums.xml | 75 +++++++++++++++++++++++++++ game/joystick.cc | 139 +++++++++++++++++++-------------------------------- game/joystick.hh | 3 +- game/main.cc | 4 +- 5 files changed, 134 insertions(+), 89 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:02:59
|
Module: performous Branch: opengl2 Commit: dcdb3a646267e66aa51dc9c86e6d2b7a418ba25d Author: Vincent Le Ligeour <yo...@us...> Date: Sat Jan 22 16:48:06 2011 +0100 Added some more keyboard management --- data/controllers.xml | 12 +++++++ data/schema.xml | 6 ++++ game/joystick.cc | 66 +++++++++++++++++++++++++++++++++++++-- game/joystick.hh | 16 ++++++++-- game/screen_songs.cc | 24 ++++++++++++-- game/song.hh | 3 +- game/songs.cc | 1 + themes/default/instruments.svg | 30 +++++++++++++++--- 8 files changed, 141 insertions(+), 17 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:02:56
|
Module: performous
Branch: opengl2
Commit: 2d8629551ef3548ef0cb35d0ff47aa6762c1fac9
Author: Vincent Le Ligeour <yo...@us...>
Date: Sat Jan 22 15:41:09 2011 +0100
Added keyboard track name
---
game/song.hh | 1 +
game/songparser-ini.cc | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/game/song.hh b/game/song.hh
index 3250442..87b3d76 100644
--- a/game/song.hh
+++ b/game/song.hh
@@ -26,6 +26,7 @@ namespace TrackName {
const std::string GUITAR_COOP = "Coop guitar";
const std::string GUITAR_RHYTHM = "Rhythm guitar";
const std::string BASS = "Bass";
+ const std::string KEYBOARD = "Keyboard";
const std::string DRUMS = "Drums";
const std::string LEAD_VOCAL = "Vocals";
const std::string HARMONIC_1 = "Harmonic 1";
diff --git a/game/songparser-ini.cc b/game/songparser-ini.cc
index c46f476..8548f15 100644
--- a/game/songparser-ini.cc
+++ b/game/songparser-ini.cc
@@ -96,6 +96,7 @@ void SongParser::iniParseHeader() {
boost::regex audiofile_guitar("(guitar\\.ogg)$", boost::regex_constants::icase);
boost::regex audiofile_drums("(drums\\.ogg)$", boost::regex_constants::icase);
boost::regex audiofile_bass("(rhythm\\.ogg)$", boost::regex_constants::icase);
+ boost::regex audiofile_keyboard("(keyboard\\.ogg)$", boost::regex_constants::icase);
boost::regex audiofile_vocals("(vocals\\.ogg)$", boost::regex_constants::icase);
boost::regex audiofile_other("(.*\\.ogg)$", boost::regex_constants::icase);
boost::cmatch match;
@@ -112,6 +113,8 @@ void SongParser::iniParseHeader() {
testAndAdd(s, TrackName::GUITAR, name);
} else if (regex_match(name.c_str(), match, audiofile_bass)) {
testAndAdd(s, TrackName::BASS, name);
+ } else if (regex_match(name.c_str(), match, audiofile_keyboard)) {
+ testAndAdd(s, TrackName::KEYBOARD, name);
} else if (regex_match(name.c_str(), match, audiofile_drums)) {
testAndAdd(s, TrackName::DRUMS, name);
} else if (regex_match(name.c_str(), match, audiofile_vocals)) {
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:02:53
|
Module: performous
Branch: opengl2
Commit: 56bf3d66d16bff9e8ddbf41a780eae4252fbea43
Author: Vincent Le Ligeour <yo...@us...>
Date: Sat Jan 22 15:34:41 2011 +0100
Added pro bass track detection
---
game/songparser-ini.cc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/game/songparser-ini.cc b/game/songparser-ini.cc
index ca64598..c46f476 100644
--- a/game/songparser-ini.cc
+++ b/game/songparser-ini.cc
@@ -53,6 +53,7 @@ namespace {
else if (name == "REAL_KEYS_H") return false; // TODO: RB3 pro keyboard hard track
else if (name == "REAL_KEYS_M") return false; // TODO: RB3 pro keyboard medium track
else if (name == "REAL_KEYS_E") return false; // TODO: RB3 pro keyboard easy track
+ else if (name == "REAL_BASS") return false; // TODO: RB3 pro bass track
else if (name == "REAL_GUITAR") return false; // TODO: RB3 pro guitar 17 frets (Mustang) track
else if (name == "REAL_GUITAR_22") return false; // TODO: RB3 pro guitar 22 frets (Squier) track
else return false;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:02:51
|
Module: performous
Branch: opengl2
Commit: d921dabc269a5bd9b4b1e3c500e4f9ca32ab2cd8
Author: Vincent Le Ligeour <yo...@us...>
Date: Sat Jan 22 15:31:46 2011 +0100
Added pro guitar and pro keyboard hard/medium/easy tracks
---
game/songparser-ini.cc | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/game/songparser-ini.cc b/game/songparser-ini.cc
index 6d353d5..ca64598 100644
--- a/game/songparser-ini.cc
+++ b/game/songparser-ini.cc
@@ -43,12 +43,18 @@ namespace {
else if (name == "DRUMS") name = TrackName::DRUMS;
else if (name == "BASS") name = TrackName::BASS;
else if (name == "KEYS") return false; // TODO: RB3 5 lane keyboard track
- else if (name == "REAL_KEYS_X") return false; // TODO: RB3 pro keyboard track
else if (name == "GUITAR") name = TrackName::GUITAR;
else if (name == "VOCALS") name = TrackName::LEAD_VOCAL;
else if (name == "HARM1") name = TrackName::HARMONIC_1;
else if (name == "HARM2") name = TrackName::HARMONIC_2;
else if (name == "HARM3") name = TrackName::HARMONIC_3;
+ // expert stuffs
+ else if (name == "REAL_KEYS_X") return false; // TODO: RB3 pro keyboard expert track
+ else if (name == "REAL_KEYS_H") return false; // TODO: RB3 pro keyboard hard track
+ else if (name == "REAL_KEYS_M") return false; // TODO: RB3 pro keyboard medium track
+ else if (name == "REAL_KEYS_E") return false; // TODO: RB3 pro keyboard easy track
+ else if (name == "REAL_GUITAR") return false; // TODO: RB3 pro guitar 17 frets (Mustang) track
+ else if (name == "REAL_GUITAR_22") return false; // TODO: RB3 pro guitar 22 frets (Squier) track
else return false;
return true;
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:02:48
|
Module: performous Branch: opengl2 Commit: 98bc4473cb9488482f36d2703889186c663cda50 Author: Vincent Le Ligeour <yo...@us...> Date: Sat Jan 22 13:36:07 2011 +0100 Added keyboard and pro-keyboard track names according to http://creators.rockband.com/docs/Authoring --- 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 398b092..6d353d5 100644 --- a/game/songparser-ini.cc +++ b/game/songparser-ini.cc @@ -42,6 +42,8 @@ namespace { else if (name == "DRUM") name = TrackName::DRUMS; else if (name == "DRUMS") name = TrackName::DRUMS; else if (name == "BASS") name = TrackName::BASS; + else if (name == "KEYS") return false; // TODO: RB3 5 lane keyboard track + else if (name == "REAL_KEYS_X") return false; // TODO: RB3 pro keyboard track else if (name == "GUITAR") name = TrackName::GUITAR; else if (name == "VOCALS") name = TrackName::LEAD_VOCAL; else if (name == "HARM1") name = TrackName::HARMONIC_1; |
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:02:45
|
Module: performous Branch: opengl2 Commit: 1dc4d1f81e7a17e1049a3e04c387b9b499a84a66 Author: Xaldyz <xa...@us...> Date: Tue Jan 11 15:51:15 2011 +0100 cmake/Modules/FindBoost.cmake Fixed latest Boost detection (1.45) cmake/Modules/FindOpenGL.cmake Fixed auto-detection of OpenGL using MSVC lang/it.po Updated italian translation tools/scripts/xml_gettext.sh Fixed to get it running under MSYS --- cmake/Modules/FindBoost.cmake | 5 +- cmake/Modules/FindOpenGL.cmake | 25 +- lang/it.po | 944 ++++++++++++++++++++-------------------- tools/scripts/xml_gettext.sh | 2 +- 4 files changed, 497 insertions(+), 479 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:02:42
|
Module: performous
Branch: opengl2
Commit: a3128ff112b0a99435c02b457d0325cccb3d70ea
Author: Tapio Vierros <tap...@gm...>
Date: Mon Jan 3 18:32:26 2011 +0200
Add some hacks to make GH xplorer guitar more usable.
---
game/joystick.cc | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 0e846ae..ce8eb3c 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -733,10 +733,12 @@ bool input::SDL::pushEvent(SDL_Event _e) {
}
case SDL_JOYAXISMOTION:
{
+ //FIXME: XML axis config is really needed so that these horrible
+ // quirks for RB XBOX360 and GH XPLORER guitars can be removed
joy_id = _e.jaxis.which;
InputDevPrivate& dev = devices.find(joy_id)->second;
if(!dev.assigned()) return false;
- if (_e.jaxis.axis == 5 || _e.jaxis.axis == 6 || _e.jaxis.axis == 1) {
+ if (dev.name() != "GUITAR_GUITARHERO_XPLORER" && (_e.jaxis.axis == 5 || _e.jaxis.axis == 6 || _e.jaxis.axis == 1)) {
event.type = input::Event::PICK;
// Direction
if(_e.jaxis.value > 0 ) {
@@ -749,7 +751,8 @@ bool input::SDL::pushEvent(SDL_Event _e) {
dev.addEvent(event);
}
break;
- } else if (_e.jaxis.axis == 2 || (dev.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 4)) {
+ } else if ((dev.name() != "GUITAR_GUITARHERO_XPLORER" && _e.jaxis.axis == 2 )
+ || (dev.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 4)) {
// Whammy bar (special case for XBox RB guitar
for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
event.pressed[i] = dev.pressed(i);
@@ -764,8 +767,9 @@ bool input::SDL::pushEvent(SDL_Event _e) {
}
dev.addEvent(event);
break;
- } else if (dev.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 3) {
- // XBox RB guitar's Tilt sensor
+ } else if ((dev.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 3)
+ || (dev.name() == "GUITAR_GUITARHERO_XPLORER" && _e.jaxis.axis == 2)) {
+ // Tilt sensor as an axis on some guitars
for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
event.pressed[i] = dev.pressed(i);
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:02:40
|
Module: performous
Branch: opengl2
Commit: 2bb0dde5c5fee07528c203447150a742c29c9a0e
Author: Tapio Vierros <tap...@gm...>
Date: Mon Jan 3 18:16:11 2011 +0200
Whammy and tilt won't bring the join menu back at start anymore.
---
game/guitargraph.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index f7055ce..d3422d7 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -327,7 +327,8 @@ void GuitarGraph::engine() {
break;
// If the songs hasn't yet started, we want key presses to bring join menu back (not pause menu)
- } else if (time < -2 && ev.type == input::Event::PRESS) {
+ } else if (time < -2 && ev.type == input::Event::PRESS
+ && ev.button != input::WHAMMY_BUTTON && ev.button != input::GODMODE_BUTTON) {
setupJoinMenu();
m_menu.open();
break;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 23:02:37
|
Module: performous
Branch: opengl2
Commit: 4add8c98d582a3746f20c7c227264c877e3941ba
Author: Tapio Vierros <tap...@gm...>
Date: Mon Jan 3 18:12:17 2011 +0200
Reduced some map::find calls.
---
game/joystick.cc | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index c132f99..0e846ae 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -732,25 +732,27 @@ bool input::SDL::pushEvent(SDL_Event _e) {
}
}
case SDL_JOYAXISMOTION:
+ {
joy_id = _e.jaxis.which;
- if(!devices.find(joy_id)->second.assigned()) return false;
+ InputDevPrivate& dev = devices.find(joy_id)->second;
+ if(!dev.assigned()) return false;
if (_e.jaxis.axis == 5 || _e.jaxis.axis == 6 || _e.jaxis.axis == 1) {
event.type = input::Event::PICK;
// Direction
if(_e.jaxis.value > 0 ) {
// down
event.button = 0;
- devices.find(joy_id)->second.addEvent(event);
+ dev.addEvent(event);
} else if(_e.jaxis.value < 0 ) {
// up
event.button = 1;
- devices.find(joy_id)->second.addEvent(event);
+ dev.addEvent(event);
}
break;
- } else if (_e.jaxis.axis == 2 || (devices.find(joy_id)->second.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 4)) {
+ } else if (_e.jaxis.axis == 2 || (dev.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 4)) {
// Whammy bar (special case for XBox RB guitar
for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
- event.pressed[i] = devices.find(joy_id)->second.pressed(i);
+ event.pressed[i] = dev.pressed(i);
}
event.button = input::WHAMMY_BUTTON;
if (_e.jaxis.value > 0) {
@@ -760,12 +762,12 @@ bool input::SDL::pushEvent(SDL_Event _e) {
event.type = input::Event::RELEASE;
event.pressed[event.button] = false;
}
- devices.find(joy_id)->second.addEvent(event);
+ dev.addEvent(event);
break;
- } else if (devices.find(joy_id)->second.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 3) {
+ } else if (dev.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 3) {
// XBox RB guitar's Tilt sensor
for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
- event.pressed[i] = devices.find(joy_id)->second.pressed(i);
+ event.pressed[i] = dev.pressed(i);
}
event.button = input::GODMODE_BUTTON;
if (_e.jaxis.value < -2) {
@@ -775,13 +777,14 @@ bool input::SDL::pushEvent(SDL_Event _e) {
event.type = input::Event::RELEASE;
event.pressed[event.button] = false;
}
- devices.find(joy_id)->second.addEvent(event);
+ dev.addEvent(event);
break;
} else {
return false;
}
// we should never be there
break;
+ }
case SDL_JOYHATMOTION:
joy_id = _e.jhat.which;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 22:44:09
|
Module: performous
Branch: stereo3d
Commit: 8bf1a0e1b3494f789cbf03669c838bdabedd7d85
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Jan 26 23:41:45 2011 +0100
A lousy attempt to make guitar score calculator 3d and better positioned.
---
game/guitargraph.cc | 26 ++++++++++++--------------
game/guitargraph.hh | 2 +-
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 55ba0f7..986293b 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -799,6 +799,7 @@ void GuitarGraph::draw(double time) {
glTranslatef(frac * offsetX, 0.0f, 0.0f);
glutil::PushMatrixMode pmb(GL_MODELVIEW);
glTranslatef((1.0 - frac) * offsetX, dimensions.y2(), 0.0f);
+ drawInfo(time); // Go draw some texts and other interface stuff
// Do some jumping for drums
if (m_drums) {
float jumpanim = m_drumJump.get();
@@ -1028,7 +1029,6 @@ void GuitarGraph::draw(double time) {
m_neckglow.draw();
}
- drawInfo(time, offsetX, dimensions); // Go draw some texts and other interface stuff
}
/// Draws a single note
@@ -1159,21 +1159,19 @@ void GuitarGraph::drawDrumfill(float tBeg, float tEnd) {
}
/// Draw popups and other info texts
-void GuitarGraph::drawInfo(double time, double offsetX, Dimensions dimensions) {
+void GuitarGraph::drawInfo(double time) {
// Draw info
if (!menuOpen()) {
- float xcor = 0.35 * dimensions.w();
- float h = 0.075 * 2.0 * dimensions.w();
- // Hack to show the scores better when there is more space (1 instrument)
- if (m_width.get() > 0.99) {
- xcor += 0.15;
- h *= 1.2;
- }
+ float ycor = -0.05;
+ float xcor = 0.50;
+ float h = 0.075 * 2.0;
+ glutil::PushMatrix pm;
+ glTranslatef(0.0f, 0.0f, -2.5f);
// Draw scores
{
glutil::Color c(Color(0.1f, 0.3f, 1.0f, 0.90f));
m_scoreText->render((boost::format("%04d") % getScore()).str());
- m_scoreText->dimensions().middle(-xcor + offsetX).fixedHeight(h).screenBottom(-0.24);
+ m_scoreText->dimensions().middle(-xcor).fixedHeight(h).bottom(ycor);
m_scoreText->draw();
}
// Draw streak counter
@@ -1181,24 +1179,24 @@ void GuitarGraph::drawInfo(double time, double offsetX, Dimensions dimensions) {
glutil::Color c(Color(0.6f, 0.6f, 0.7f, 0.95f));
m_streakText->render(boost::lexical_cast<std::string>(unsigned(m_streak)) + "/"
+ boost::lexical_cast<std::string>(unsigned(m_longestStreak)));
- m_streakText->dimensions().middle(-xcor + offsetX).fixedHeight(h*0.75).screenBottom(-0.20);
+ m_streakText->dimensions().middle(-xcor).fixedHeight(h*0.75).bottom(ycor);
m_streakText->draw();
}
}
// Is Starpower ready?
if (canActivateStarpower()) {
float a = std::abs(std::fmod(time, 1.0) - 0.5f) * 2.0f;
- m_text.dimensions.screenBottom(-0.02).middle(-0.12 + offsetX);
+ m_text.dimensions.screenBottom(-0.02).middle(-0.12);
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 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.dimensions.screenBottom(-0.02).middle(-0.03);
m_text.draw(_("Solo!"), a);
}
- drawPopups(offsetX);
+ drawPopups(0.0f);
}
/// Draw a bar for drum bass pedal/note
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index a1ab5cf..cd561ee 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -119,7 +119,7 @@ class GuitarGraph: public InstrumentGraph {
void drawBar(double time, float h);
void drawNote(int fret, Color, float tBeg, float tEnd, float whammy = 0, bool tappable = false, bool hit = false, double hitAnim = 0.0, double releaseTime = 0.0);
void drawDrumfill(float tBeg, float tEnd);
- void drawInfo(double time, double offsetX, Dimensions dimensions);
+ void drawInfo(double time);
float getFretX(int fret) { return (-2.0f + fret- (m_drums ? 0.5 : 0)) * (m_leftymode.b() ? -1 : 1); }
// Chords & notes
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 22:44:06
|
Module: performous
Branch: master
Commit: 87b23cdd5bca9ee2fd9feca033f35f28b1a9ecdf
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Jan 26 23:43:52 2011 +0100
Do not parse forced instruments with regex
---
game/joystick.cc | 29 +++++++++++------------------
1 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index af75206..663c12c 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -334,32 +334,25 @@ void input::SDL::init() {
readControllers(g_instruments, getConfigDir() / "controllers.xml");
std::map<unsigned int, input::Instrument> forced_type;
- std::string regexp_match_force("^([0-9]+):(\\(");
- for(input::Instruments::iterator it = g_instruments.begin() ; it != g_instruments.end() ; ++it) {
- if(it == g_instruments.begin())
- regexp_match_force += it->first;
- else
- regexp_match_force += "|" + it->first;
- }
- regexp_match_force += "\\))$";
- boost::regex match_force(regexp_match_force);
- boost::match_results<const char*> what;
-
ConfigItem::StringList const& instruments = config["game/instruments"].sl();
for (ConfigItem::StringList::const_iterator it = instruments.begin(); it != instruments.end(); ++it) {
- if (!regex_search(it->c_str(), what, match_force)) {
- std::clog << "controllers/error: " << *it << "\" is not a valid instrument forced value" << std::endl;
+ std::istringstream iss(*it);
+ unsigned sdl_id;
+ char ch;
+ std::string type;
+ if (!(iss >> sdl_id >> ch >> type) || ch != ':') {
+ std::clog << "controllers/error: \"" << *it << "\" invalid syntax, should be SDL_ID:CONTROLLER_TYPE" << std::endl;
continue;
} else {
- unsigned int sdl_id = boost::lexical_cast<unsigned int>(what[1]);
- std::string instrument_type(what[2]);
-
- for(input::Instruments::const_iterator it2 = g_instruments.begin() ; it2 != g_instruments.end() ; ++it2) {
- if(instrument_type == it2->first) {
+ bool found = false;
+ for (input::Instruments::const_iterator it2 = g_instruments.begin(); it2 != g_instruments.end(); ++it2) {
+ if (type == it2->first) {
forced_type.insert(std::pair<unsigned int,input::Instrument>(sdl_id, input::Instrument(it2->second)));
+ found = true;
break;
}
}
+ if (!found) std::clog << "controllers/error: Controller type \"" << type << "\" unknown" << std::endl;
}
}
|
|
From: Tapio V. <aa...@us...> - 2011-01-26 22:37:38
|
Module: editor
Branch: master
Commit: c8b396d8fdbc38dfa72d8c2223c1d36490018e14
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jan 26 22:16:19 2011 +0200
Introduce QSettings: window size/pos is restored on app re-launch.
---
editorapp.cc | 27 +++++++++++++++++++++++++--
editorapp.hh | 2 ++
ffmpeg.cc | 1 -
main.cc | 2 ++
4 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/editorapp.cc b/editorapp.cc
index 857c4a6..a017c6b 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -7,6 +7,7 @@
#include <QWhatsThis>
#include <QUrl>
#include <QCloseEvent>
+#include <QSettings>
#include <phonon/AudioOutput>
#include <iostream>
#include "config.hh"
@@ -24,8 +25,8 @@ namespace {
EditorApp::EditorApp(QWidget *parent): QMainWindow(parent), projectFileName(), hasUnsavedChanges()
{
- showMaximized();
ui.setupUi(this);
+ readSettings();
noteGraph = new NoteGraphWidget(NULL);
ui.noteGraphScroller->setWidget(noteGraph);
@@ -598,7 +599,29 @@ void EditorApp::closeEvent(QCloseEvent *event)
{
if (promptSaving()) event->accept();
else event->ignore();
-}
+ writeSettings();
+}
+
+void EditorApp::readSettings()
+ {
+ QSettings settings; // Default QSettings parameters given in main()
+ // Read values
+ QPoint pos = settings.value("pos", QPoint()).toPoint();
+ QSize size = settings.value("size", QSize(800, 600)).toSize();
+ bool maximized = settings.value("maximized", false).toBool();
+ // Apply them
+ if (!pos.isNull()) move(pos);
+ resize(size);
+ if (maximized) showMaximized();
+ }
+
+void EditorApp::writeSettings()
+ {
+ QSettings settings; // Default QSettings parameters given in main()
+ settings.setValue("pos", pos());
+ settings.setValue("size", size());
+ settings.setValue("maximized", isMaximized());
+ }
AboutDialog::AboutDialog(QWidget* parent)
diff --git a/editorapp.hh b/editorapp.hh
index 5332042..a6baa25 100644
--- a/editorapp.hh
+++ b/editorapp.hh
@@ -39,6 +39,8 @@ private:
void saveProject(QString fileName);
void doOpStack();
void playButton();
+ void readSettings();
+ void writeSettings();
public slots:
void operationDone(const Operation &op);
diff --git a/ffmpeg.cc b/ffmpeg.cc
index 32031df..1858e4e 100644
--- a/ffmpeg.cc
+++ b/ffmpeg.cc
@@ -1,5 +1,4 @@
#include "ffmpeg.hh"
-
#include "config.hh"
#include "util.hh"
#include <iostream>
diff --git a/main.cc b/main.cc
index c155354..43438b8 100644
--- a/main.cc
+++ b/main.cc
@@ -9,6 +9,8 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
app.setApplicationName(PACKAGE);
app.setApplicationVersion(VERSION);
+ app.setOrganizationName("Performous Team");
+ app.setOrganizationDomain("performous.org");
EditorApp window;
window.show();
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-26 22:37:15
|
Module: editor Branch: master Commit: 4a693c674e19627ad34bfea0c9268e0fe1a4fe5f Author: Lasse Karkkainen <tro...@tr...> Date: Wed Jan 26 21:45:24 2011 +0100 QPainterPath rendering instead of giant bitmap, a lot of cleanup, some NULL pointer segfault fixes, ... --- notegraphwidget.cc | 49 ++++++++++++++++++++++-------------- notegraphwidget.hh | 1 + pitchvis.cc | 71 ++++++++++++++------------------------------------- pitchvis.hh | 29 +++++++++++--------- 4 files changed, 67 insertions(+), 83 deletions(-) |