|
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)) {
|