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...> - 2010-01-01 11:59:02
|
Module: performous
Branch: master
Commit: 05584da9d67cead5b9c12e48af4529ce5c16ccd0
Author: Niina Nylund <niina@niina-desktop.(none)>
Date: Fri Jan 1 13:57:25 2010 +0200
Fix SM offset setting, this should fix some sync issues (needs testing).
---
game/songparser-sm.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/songparser-sm.cc b/game/songparser-sm.cc
index e7c6eba..0b1fc53 100644
--- a/game/songparser-sm.cc
+++ b/game/songparser-sm.cc
@@ -137,7 +137,7 @@ bool SongParser::smParseField(std::string line) {
else if (key == "BANNER") m_song.cover = value;
else if (key == "MUSIC") m_song.music["background"] = m_song.path + value;
else if (key == "BACKGROUND") m_song.background = value;
- else if (key == "OFFSET") assign(m_song.start, value);
+ else if (key == "OFFSET") { assign(m_gap, value); m_gap *= -1; }
//Bpm values are only read into a container in class SongParser, but not used (except the first value).
else if (key == "BPMS"){
std::istringstream iss(value);
|
|
From: Tapio V. <aa...@us...> - 2009-12-31 13:07:12
|
Module: performous
Branch: master
Commit: 550cc559a9c9a1e7099fd17c616803cbd822a9da
Author: Tapio Vierros <tap...@gm...>
Date: Thu Dec 31 14:36:36 2009 +0200
Enable TGA screenshot and map §-key for use (print-screen doesn't work in Gnome).
---
game/main.cc | 2 +-
game/video_driver.cc | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index 204b032..d34d9e6 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -71,7 +71,7 @@ static void checkEvents_SDL(ScreenManager& sm, Window& window) {
config["graphic/fullscreen"].b() = !config["graphic/fullscreen"].b();
continue; // Already handled here...
}
- if (keypressed == SDLK_PRINT ) {
+ if (keypressed == SDLK_PRINT || keypressed == SDLK_WORLD_7) { // WORLD_7 = section sign (next to 1)
g_take_screenshot = true;
}
if (keypressed == SDLK_F4 && modifier & KMOD_ALT) {
diff --git a/game/video_driver.cc b/game/video_driver.cc
index 5bd2c44..19b6b90 100644
--- a/game/video_driver.cc
+++ b/game/video_driver.cc
@@ -5,7 +5,7 @@
#include "fs.hh"
#include "util.hh"
#include "joystick.hh"
-
+#include <fstream>
#include <SDL.h>
#ifdef _WIN32
@@ -76,8 +76,8 @@ void Window::screenshot() {
fnstr << "/tmp/";
#endif
fnstr << "performous_screenshot_" << count;
-#if 0 // TODO: implement with libpng
-#ifdef USE_SDL_IMAGE
+#if 1 // TODO: implement with libpng?
+//#ifdef USE_SDL_IMAGE
/* Write the image out as an uncompressed tga. */
fnstr << ".tga";
std::ofstream tgaout(fnstr.str().c_str(), std::ios::binary);
@@ -114,7 +114,6 @@ void Window::screenshot() {
image.flip();
image.write(fnstr.str().c_str());
#endif
-#endif
count++;
}
|
|
From: Tapio V. <aa...@us...> - 2009-12-31 12:05:15
|
Module: performous
Branch: master
Commit: 1f569d491ac022d1735f9749918b8a8025f94fe1
Author: Tapio Vierros <tap...@gm...>
Date: Thu Dec 31 12:37:30 2009 +0200
Don't add flames to bass drum.
---
game/guitargraph.cc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 756240e..66d484d 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -587,6 +587,9 @@ void GuitarGraph::draw(double time) {
// Draw flames
for (int fret = 0; fret < 5; ++fret) { // Loop through the frets
+ if (m_drums && fret == 0) { // Skip bass drum
+ m_flames[fret].clear(); continue;
+ }
float x = -2.0f + fret - 0.5f * m_drums;
for (std::vector<AnimValue>::iterator it = m_flames[fret].begin(); it != m_flames[fret].end();) {
float flameAnim = it->get();
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-12-31 11:43:43
|
Module: performous
Branch: master
Commit: f3083c2dfd7c50b22c232438ce88bbaa67e09687
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Dec 30 09:11:49 2009 +0200
RAII wrap rsvg_init/term to prevent leaks
---
game/surface.cc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/game/surface.cc b/game/surface.cc
index f6f5a55..9e773c3 100644
--- a/game/surface.cc
+++ b/game/surface.cc
@@ -66,7 +66,10 @@ bool checkExtension(std::string const& extension) {
template <typename T> void loader(T& target, std::string filename, bool autocrop) {
if (!std::ifstream(filename.c_str(), std::ios::binary).is_open()) throw std::runtime_error("File not found: " + filename);
if (filename.size() > 4 && filename.substr(filename.size() - 4) == ".svg") {
- rsvg_init();
+ struct RSVGInit {
+ RSVGInit() { rsvg_init(); }
+ ~RSVGInit() { rsvg_term(); }
+ } rsvgInit;
GError* pError = NULL;
// Find SVG dimensions (in pixels)
RsvgHandle* svgHandle = rsvg_handle_new_from_file(filename.c_str(), &pError);
@@ -88,7 +91,6 @@ template <typename T> void loader(T& target, std::string filename, bool autocrop
}
target.load(w, h, pix::CHAR_RGBA, gdk_pixbuf_get_pixels(pb), float(svgDimension.width)/svgDimension.height);
gdk_pixbuf_unref(pb);
- rsvg_term();
} else {
#ifdef USE_SDL_IMAGE
SDL_Surface* imgsurf = IMG_Load(filename.c_str());
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-12-31 11:43:42
|
Module: performous Branch: master Commit: da3d7ae6a4c89085e202f89480da2bf5b17dc166 Author: Lasse Karkkainen <tro...@tr...> Date: Thu Dec 31 13:41:04 2009 +0200 Remove SDL_image and Magick++. Add libpng and libjpeg. Removed autocrop feature (used for song bg images for better UltraStar compatibility). Removed screenshot saving until rewritten with libpng. Moved stuff from surface.cc to util.hh and image.hh to make the file more readable. --- game/CMakeLists.txt | 21 +------- game/image.hh | 105 ++++++++++++++++++++++++++++++++++++++ game/screen_sing.cc | 4 +- game/surface.cc | 137 +++++--------------------------------------------- game/surface.hh | 2 +- game/util.hh | 18 +++++++ game/video_driver.cc | 12 ++--- 7 files changed, 144 insertions(+), 155 deletions(-) |
|
From: Stefano A. <xa...@us...> - 2009-12-31 00:10:59
|
Module: performous Branch: master Commit: 8a61ecbd70d285d5e15719cdbf684aed583e75df Author: Xaldyz <xa...@us...> Date: Thu Dec 31 01:10:30 2009 +0100 Update italian translation --- lang/it.po | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 81 insertions(+), 4 deletions(-) diff --git a/lang/it.po b/lang/it.po index c7783da..6cdaa0b 100644 --- a/lang/it.po +++ b/lang/it.po @@ -2,15 +2,15 @@ msgid "" msgstr "" "Project-Id-Version: Performous\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-07 01:56+0100\n" +"POT-Creation-Date: 2009-12-30 22:52+0100\n" "PO-Revision-Date: \n" +"Last-Translator: Xaldyz <xa...@us...>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-KeywordsList: _\n" "X-Poedit-Basepath: .\n" -"Last-Translator: Xaldyz <xa...@us...>\n" "X-Poedit-SearchPath-0: ../game\n" #: ../game/screen_hiscore.cc:104 @@ -18,46 +18,57 @@ msgid "Hiscore for " msgstr "Punteggi per " #: ../game/screen_intro.cc:9 +#: ../game/screen_intro.cc:10 msgid "Perform" -msgstr "Perform" +msgstr "Gioca" #: ../game/screen_intro.cc:9 +#: ../game/screen_intro.cc:10 msgid "Start performing!" -msgstr "Start perform! (Comincia a cantare)" +msgstr "Comincia a cantare" #: ../game/screen_intro.cc:10 +#: ../game/screen_intro.cc:11 msgid "Practice" msgstr "Pratica" #: ../game/screen_intro.cc:10 +#: ../game/screen_intro.cc:11 msgid "Check your skills or test the microphones" msgstr "Controlla la tua bravura! / Test microfono" #: ../game/screen_intro.cc:11 +#: ../game/screen_intro.cc:12 msgid "Configure" msgstr "Configura" #: ../game/screen_intro.cc:11 +#: ../game/screen_intro.cc:12 msgid "Configure game options" msgstr "Opzioni di configurazione gioco" #: ../game/screen_intro.cc:12 +#: ../game/screen_intro.cc:13 msgid "Quit" msgstr "Esci" #: ../game/screen_intro.cc:12 +#: ../game/screen_intro.cc:13 msgid "Leave the game" msgstr "Lascia il gioco" #: ../game/screen_intro.cc:19 +#: ../game/screen_intro.cc:21 msgid "No playback devices could be used.\n" msgstr "Nessun dispositivo di riproduzione può essere usato.\n" #: ../game/screen_intro.cc:20 +#: ../game/screen_intro.cc:22 msgid "No microphones found.\n" msgstr "Nessun microfono trovato.\n" #: ../game/screen_intro.cc:21 +#: ../game/screen_intro.cc:23 msgid "" "\n" "Please configure some before playing." @@ -66,22 +77,27 @@ msgstr "" "Per favore entra in configurazione prima di giocare" #: ../game/screen_players.cc:110 +#: ../game/screen_players.cc:111 msgid "No players found!" msgstr "Nessun giocatore trovato!" #: ../game/screen_players.cc:111 +#: ../game/screen_players.cc:112 msgid "Enter a name to create a new player." msgstr "Inserisci un nome per creare un nuovo giocatore." #: ../game/screen_players.cc:113 +#: ../game/screen_players.cc:114 msgid "Press enter to create player!" msgstr "Premi invio per creare il giocatore!" #: ../game/screen_songs.cc:209 +#: ../game/screen_songs.cc:178 msgid "No songs found!" msgstr "Nessuna canzone trovata!" #: ../game/screen_songs.cc:210 +#: ../game/screen_songs.cc:179 msgid "" "Visit performous.org\n" "for free songs" @@ -90,6 +106,67 @@ msgstr "" "per canzoni gratis" #: ../game/screen_songs.cc:212 +#: ../game/screen_songs.cc:181 msgid "no songs match search" msgstr "nessuna canzone trovata" +#: ../game/screen_songs.cc:188 +msgid "filter: " +msgstr "filtro:" + +#: ../game/screen_songs.cc:188 +msgid "none" +msgstr "niente" + +#: ../game/screen_players.cc:121 +msgid "You reached" +msgstr "Hai fatto" + +#: ../game/screen_players.cc:121 +msgid "points!" +msgstr "punti!" + +#: ../game/screen_players.cc:122 +msgid "Change player with arrow keys." +msgstr "Cambia il giocatore con le frecce." + +#: ../game/screen_players.cc:123 +msgid "Name:" +msgstr "Nome:" + +#: ../game/screen_players.cc:126 +msgid "Type text to filter or create a new player." +msgstr "Inserisci un nome per selezionare un giocatore o crearne uno nuovo." + +#: ../game/screen_players.cc:126 +msgid "Search Text:" +msgstr "Testo di ricerca" + +#: ../game/songs.cc:204 +msgid "random order" +msgstr "ordine casuale" + +#: ../game/songs.cc:205 +msgid "sorted by song" +msgstr "ordinato per canzone" + +#: ../game/songs.cc:206 +msgid "sorted by artist" +msgstr "ordinato per artista" + +#: ../game/songs.cc:207 +msgid "sorted by edition" +msgstr "ordinato per edizione" + +#: ../game/songs.cc:208 +msgid "sorted by genre" +msgstr "ordinato per genere" + +#: ../game/songs.cc:209 +msgid "sorted by path" +msgstr "ordinato per percorso" + +#: ../game/songs.cc:210 +msgid "sorted by language" +msgstr "ordinato per lingua" + |
|
From: Tapio V. <aa...@us...> - 2009-12-30 22:51:38
|
Module: performous
Branch: master
Commit: da483dc081847ce70d6b059c30bc7ba1c0b90348
Author: Tapio Vierros <tap...@gm...>
Date: Thu Dec 31 00:49:40 2009 +0200
Quick hack to prevent crashing when exiting song with Select and to allow pause with Start.
---
game/guitargraph.cc | 54 ++++++++++++++++++++++++++++----------------------
game/screen_sing.cc | 31 ++++++++++++++++++++--------
2 files changed, 52 insertions(+), 33 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 18850c1..756240e 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -155,32 +155,38 @@ void GuitarGraph::engine() {
for (input::Event ev; m_input.tryPoll(ev);) {
m_dead = 0; // Keep alive
if (m_jointime == not_joined) m_jointime = (time < 0.0 ? -join_delay : time); // Handle joining
- // Guitar specific actions
- if (!m_drums) {
- if ((ev.type == input::Event::PRESS || ev.type == input::Event::RELEASE) && ev.button == input::STARPOWER_BUTTON) {
- if (ev.type == input::Event::PRESS) activateStarpower();
- continue;
+ if (ev.type == input::Event::PRESS && ev.button > input::STARPOWER_BUTTON) {
+ // This hack signals Screen_sing about Start/Select presses by throwing exceptions
+ if (ev.button == 8) throw std::runtime_error("select");
+ else if (ev.button == 9) throw std::runtime_error("start");
+ } else {
+ // Guitar specific actions
+ if (!m_drums) {
+ if ((ev.type == input::Event::PRESS || ev.type == input::Event::RELEASE) && ev.button == input::STARPOWER_BUTTON) {
+ if (ev.type == input::Event::PRESS) activateStarpower();
+ continue;
+ }
+ 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;
}
- 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;
- }
- // Keypress anims
- if (ev.type == input::Event::PRESS) m_hit[!m_drums + ev.button].setValue(1.0);
- else if (ev.type == input::Event::PICK) m_hit[0].setValue(1.0);
- // Difficulty and track selection
- if (time < m_jointime + join_delay) {
- if (ev.type == input::Event::PICK || ev.type == input::Event::PRESS) {
- if (!m_drums && ev.pressed[4]) nextTrack();
- if (ev.pressed[0 + m_drums]) difficulty(DIFFICULTY_SUPAEASY);
- else if (ev.pressed[1 + m_drums]) difficulty(DIFFICULTY_EASY);
- else if (ev.pressed[2 + m_drums]) difficulty(DIFFICULTY_MEDIUM);
- else if (ev.pressed[3 + m_drums]) difficulty(DIFFICULTY_AMAZING);
+ // Keypress anims
+ if (ev.type == input::Event::PRESS) m_hit[!m_drums + ev.button].setValue(1.0);
+ else if (ev.type == input::Event::PICK) m_hit[0].setValue(1.0);
+ // Difficulty and track selection
+ if (time < m_jointime + join_delay) {
+ if (ev.type == input::Event::PICK || ev.type == input::Event::PRESS) {
+ if (!m_drums && ev.pressed[4]) nextTrack();
+ if (ev.pressed[0 + m_drums]) difficulty(DIFFICULTY_SUPAEASY);
+ else if (ev.pressed[1 + m_drums]) difficulty(DIFFICULTY_EASY);
+ else if (ev.pressed[2 + m_drums]) difficulty(DIFFICULTY_MEDIUM);
+ else if (ev.pressed[3 + m_drums]) difficulty(DIFFICULTY_AMAZING);
+ }
+ // Playing
+ } else if (m_drums) {
+ if (ev.type == input::Event::PRESS) drumHit(time, ev.button);
+ } else {
+ guitarPlay(time, ev);
}
- // Playing
- } else if (m_drums) {
- if (ev.type == input::Event::PRESS) drumHit(time, ev.button);
- } else {
- guitarPlay(time, ev);
}
if (m_score < 0) m_score = 0;
}
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index e99ba0b..c88a867 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -108,7 +108,14 @@ bool ScreenSing::instrumentLayout(double time) {
typedef std::pair<unsigned, double> CountSum;
std::map<std::string, CountSum> volume; // Stream id to (count, sum)
for (Instruments::iterator it = m_instruments.begin(); it != m_instruments.end(); ++it) {
- it->engine(); // Run engine even when dead so that joining is possible
+ try {
+ it->engine(); // Run engine even when dead so that joining is possible
+ } catch (std::runtime_error& e) { // Receive Start/Select key presses
+ std::string what(e.what());
+ if (what == "start") m_audio.togglePause();
+ // We cannot quit from here (crash) so let's throw it further
+ else if (what == "select") throw std::runtime_error("exit");
+ }
if (!it->dead()) {
it->position((0.5 + i - 0.5 * count) * iw, iw); // Do layout stuff
CountSum& cs = volume[it->getTrackIndex()];
@@ -250,13 +257,13 @@ void ScreenSing::manageEvent(SDL_Event event) {
if (seekback) {
m_layout_singer->reset();
}
- } else if (event.type == SDL_JOYBUTTONDOWN) {
- int button = event.jbutton.button;
- if (button == 9 /* START */) m_audio.togglePause();
- if (button == 8 /* SELECT */) {
- ScreenManager::getSingletonPtr()->activateScreen("Songs");
- return;
- }
+ //} else if (event.type == SDL_JOYBUTTONDOWN) {
+ //int button = event.jbutton.button;
+ //if (button == 9 /* START */) m_audio.togglePause();
+ //if (button == 8 /* SELECT */) {
+ //ScreenManager::getSingletonPtr()->activateScreen("Songs");
+ //return;
+ //}
}
}
@@ -307,7 +314,13 @@ void ScreenSing::draw() {
} else if( m_instruments.empty() ) {
m_layout_singer->draw(time, LayoutSinger::BOTTOM);
} else {
- bool some_alive = instrumentLayout(time);
+ bool some_alive;
+ try {
+ some_alive = instrumentLayout(time);
+ } catch (std::runtime_error& e) { // Did we catch an quit signal?
+ ScreenManager::getSingletonPtr()->activateScreen("Songs");
+ return;
+ }
m_layout_singer->draw(time, some_alive ? LayoutSinger::MIDDLE : LayoutSinger::BOTTOM);
}
|
|
From: Yoda-JM <yo...@us...> - 2009-12-30 22:30:29
|
Module: performous Branch: master Commit: 6d736aa7d96ff752383b2caac6a57e4732c71434 Author: Vincent Le Ligeour <yo...@us...> Date: Wed Dec 30 23:29:52 2009 +0100 Updated translation files - lang/performous.pot with "find ../game/ -name "*cc" > /tmp/A && xgettext --language=c++ --boost -k_ -j -f /tmp/A -o ../lang/performous.pot" - lang/fr.po with msgmerge --- lang/fr.po | 98 ++++++++++++++++++++++++++++++++++++--------- lang/performous.pot | 111 ++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 166 insertions(+), 43 deletions(-) diff --git a/lang/fr.po b/lang/fr.po index 64cf78f..8c5e3d9 100644 --- a/lang/fr.po +++ b/lang/fr.po @@ -2,62 +2,62 @@ msgid "" msgstr "" "Project-Id-Version: Performous\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-07 01:56+0100\n" +"POT-Creation-Date: 2009-12-30 22:52+0100\n" "PO-Revision-Date: \n" +"Last-Translator: Yoda-JM <yo...@us...>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-KeywordsList: _\n" "X-Poedit-Basepath: .\n" -"Last-Translator: Yoda-JM <yo...@us...>\n" "X-Poedit-SearchPath-0: ../game\n" #: ../game/screen_hiscore.cc:104 msgid "Hiscore for " msgstr "Records pour " -#: ../game/screen_intro.cc:9 +#: ../game/screen_intro.cc:9 ../game/screen_intro.cc:10 msgid "Perform" msgstr "Jouer" -#: ../game/screen_intro.cc:9 +#: ../game/screen_intro.cc:9 ../game/screen_intro.cc:10 msgid "Start performing!" msgstr "Commencer une partie!" -#: ../game/screen_intro.cc:10 +#: ../game/screen_intro.cc:10 ../game/screen_intro.cc:11 msgid "Practice" msgstr "Entrainement" -#: ../game/screen_intro.cc:10 +#: ../game/screen_intro.cc:10 ../game/screen_intro.cc:11 msgid "Check your skills or test the microphones" msgstr "Chauffer votre voix et tester les micros" -#: ../game/screen_intro.cc:11 +#: ../game/screen_intro.cc:11 ../game/screen_intro.cc:12 msgid "Configure" msgstr "Configuration" -#: ../game/screen_intro.cc:11 +#: ../game/screen_intro.cc:11 ../game/screen_intro.cc:12 msgid "Configure game options" msgstr "Configurer les options de jeu" -#: ../game/screen_intro.cc:12 +#: ../game/screen_intro.cc:12 ../game/screen_intro.cc:13 msgid "Quit" msgstr "Quitter" -#: ../game/screen_intro.cc:12 +#: ../game/screen_intro.cc:12 ../game/screen_intro.cc:13 msgid "Leave the game" msgstr "Sortir du jeu" -#: ../game/screen_intro.cc:19 +#: ../game/screen_intro.cc:19 ../game/screen_intro.cc:21 msgid "No playback devices could be used.\n" msgstr "Aucun périférique audio de sortie n'est utilisable.\n" -#: ../game/screen_intro.cc:20 +#: ../game/screen_intro.cc:20 ../game/screen_intro.cc:22 msgid "No microphones found.\n" msgstr "Aucun micro n'a été trouvé.\n" -#: ../game/screen_intro.cc:21 +#: ../game/screen_intro.cc:21 ../game/screen_intro.cc:23 msgid "" "\n" "Please configure some before playing." @@ -65,23 +65,23 @@ msgstr "" "\n" "Veuillez en configurer certains avant de jouer." -#: ../game/screen_players.cc:110 +#: ../game/screen_players.cc:110 ../game/screen_players.cc:111 msgid "No players found!" msgstr "Aucun joueur n'a été trouvé!" -#: ../game/screen_players.cc:111 +#: ../game/screen_players.cc:111 ../game/screen_players.cc:112 msgid "Enter a name to create a new player." msgstr "Entrez un nom pour créer un nouveau joueur." -#: ../game/screen_players.cc:113 +#: ../game/screen_players.cc:113 ../game/screen_players.cc:114 msgid "Press enter to create player!" msgstr "Pressez Entrer pour créer un nouveau joueur!" -#: ../game/screen_songs.cc:209 +#: ../game/screen_songs.cc:209 ../game/screen_songs.cc:178 msgid "No songs found!" msgstr "Aucun morceau trouvé!" -#: ../game/screen_songs.cc:210 +#: ../game/screen_songs.cc:210 ../game/screen_songs.cc:179 msgid "" "Visit performous.org\n" "for free songs" @@ -89,7 +89,67 @@ msgstr "" "Visitez performous.org\n" "pour des morceaux gratuits" -#: ../game/screen_songs.cc:212 +#: ../game/screen_songs.cc:212 ../game/screen_songs.cc:181 msgid "no songs match search" msgstr "aucun morceau ne satisfait la recherche" +#: ../game/screen_songs.cc:188 +msgid "filter: " +msgstr "filtre: " + +#: ../game/screen_songs.cc:188 +msgid "none" +msgstr "aucun" + +#: ../game/screen_players.cc:121 +msgid "You reached" +msgstr "" + +#: ../game/screen_players.cc:121 +msgid "points!" +msgstr "points!" + +#: ../game/screen_players.cc:122 +msgid "Change player with arrow keys." +msgstr "Changez de joueur avec les flèches" + +#: ../game/screen_players.cc:123 +msgid "Name:" +msgstr "Nom:" + +#: ../game/screen_players.cc:126 +#, fuzzy +msgid "Type text to filter or create a new player." +msgstr "Entrez un nom pour créer un nouveau joueur." + +#: ../game/screen_players.cc:126 +msgid "Search Text:" +msgstr "Recherche:" + +#: ../game/songs.cc:204 +msgid "random order" +msgstr "ordre aléatoire" + +#: ../game/songs.cc:205 +msgid "sorted by song" +msgstr "classement par chanson" + +#: ../game/songs.cc:206 +msgid "sorted by artist" +msgstr "classement par artiste" + +#: ../game/songs.cc:207 +msgid "sorted by edition" +msgstr "classement par édition" + +#: ../game/songs.cc:208 +msgid "sorted by genre" +msgstr "classement par genre" + +#: ../game/songs.cc:209 +msgid "sorted by path" +msgstr "classement par chemin" + +#: ../game/songs.cc:210 +msgid "sorted by language" +msgstr "classement par langue" diff --git a/lang/performous.pot b/lang/performous.pot index 8a48f37..fd76518 100644 --- a/lang/performous.pot +++ b/lang/performous.pot @@ -1,90 +1,153 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: Performous\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-07 01:56+0100\n" -"PO-Revision-Date: \n" -"Language-Team: \n" +"POT-Creation-Date: 2009-12-30 22:52+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: _\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: ../game\n" #: ../game/screen_hiscore.cc:104 msgid "Hiscore for " msgstr "" -#: ../game/screen_intro.cc:9 +#: ../game/screen_intro.cc:9 ../game/screen_intro.cc:10 msgid "Perform" msgstr "" -#: ../game/screen_intro.cc:9 +#: ../game/screen_intro.cc:9 ../game/screen_intro.cc:10 msgid "Start performing!" msgstr "" -#: ../game/screen_intro.cc:10 +#: ../game/screen_intro.cc:10 ../game/screen_intro.cc:11 msgid "Practice" msgstr "" -#: ../game/screen_intro.cc:10 +#: ../game/screen_intro.cc:10 ../game/screen_intro.cc:11 msgid "Check your skills or test the microphones" msgstr "" -#: ../game/screen_intro.cc:11 +#: ../game/screen_intro.cc:11 ../game/screen_intro.cc:12 msgid "Configure" msgstr "" -#: ../game/screen_intro.cc:11 +#: ../game/screen_intro.cc:11 ../game/screen_intro.cc:12 msgid "Configure game options" msgstr "" -#: ../game/screen_intro.cc:12 +#: ../game/screen_intro.cc:12 ../game/screen_intro.cc:13 msgid "Quit" msgstr "" -#: ../game/screen_intro.cc:12 +#: ../game/screen_intro.cc:12 ../game/screen_intro.cc:13 msgid "Leave the game" msgstr "" -#: ../game/screen_intro.cc:19 +#: ../game/screen_intro.cc:19 ../game/screen_intro.cc:21 msgid "No playback devices could be used.\n" msgstr "" -#: ../game/screen_intro.cc:20 +#: ../game/screen_intro.cc:20 ../game/screen_intro.cc:22 msgid "No microphones found.\n" msgstr "" -#: ../game/screen_intro.cc:21 +#: ../game/screen_intro.cc:21 ../game/screen_intro.cc:23 msgid "" "\n" "Please configure some before playing." msgstr "" -#: ../game/screen_players.cc:110 +#: ../game/screen_players.cc:110 ../game/screen_players.cc:111 msgid "No players found!" msgstr "" -#: ../game/screen_players.cc:111 +#: ../game/screen_players.cc:111 ../game/screen_players.cc:112 msgid "Enter a name to create a new player." msgstr "" -#: ../game/screen_players.cc:113 +#: ../game/screen_players.cc:113 ../game/screen_players.cc:114 msgid "Press enter to create player!" msgstr "" -#: ../game/screen_songs.cc:209 +#: ../game/screen_songs.cc:209 ../game/screen_songs.cc:178 msgid "No songs found!" msgstr "" -#: ../game/screen_songs.cc:210 +#: ../game/screen_songs.cc:210 ../game/screen_songs.cc:179 msgid "" "Visit performous.org\n" "for free songs" msgstr "" -#: ../game/screen_songs.cc:212 +#: ../game/screen_songs.cc:212 ../game/screen_songs.cc:181 msgid "no songs match search" msgstr "" +#: ../game/screen_songs.cc:188 +msgid "filter: " +msgstr "" + +#: ../game/screen_songs.cc:188 +msgid "none" +msgstr "" + +#: ../game/screen_players.cc:121 +msgid "You reached" +msgstr "" + +#: ../game/screen_players.cc:121 +msgid "points!" +msgstr "" + +#: ../game/screen_players.cc:122 +msgid "Change player with arrow keys." +msgstr "" + +#: ../game/screen_players.cc:123 +msgid "Name:" +msgstr "" + +#: ../game/screen_players.cc:126 +msgid "Type text to filter or create a new player." +msgstr "" + +#: ../game/screen_players.cc:126 +msgid "Search Text:" +msgstr "" + +#: ../game/songs.cc:204 +msgid "random order" +msgstr "" + +#: ../game/songs.cc:205 +msgid "sorted by song" +msgstr "" + +#: ../game/songs.cc:206 +msgid "sorted by artist" +msgstr "" + +#: ../game/songs.cc:207 +msgid "sorted by edition" +msgstr "" + +#: ../game/songs.cc:208 +msgid "sorted by genre" +msgstr "" + +#: ../game/songs.cc:209 +msgid "sorted by path" +msgstr "" + +#: ../game/songs.cc:210 +msgid "sorted by language" +msgstr "" |
|
From: Tapio V. <aa...@us...> - 2009-12-30 21:40:20
|
Module: performous Branch: master Commit: cec35b074e9d2af5e325cfe9bbd31b2abd8ad916 Author: Tapio Vierros <tap...@gm...> Date: Wed Dec 30 23:39:19 2009 +0200 Updated Finnish translation. --- lang/fi.po | 118 +++++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 89 insertions(+), 29 deletions(-) diff --git a/lang/fi.po b/lang/fi.po index 5888570..1af417b 100644 --- a/lang/fi.po +++ b/lang/fi.po @@ -2,62 +2,58 @@ msgid "" msgstr "" "Project-Id-Version: Performous\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-07 01:56+0100\n" +"POT-Creation-Date: 2009-12-30 23:29+0200\n" "PO-Revision-Date: \n" +"Last-Translator: Tapio Vierros <tap...@gm...>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-KeywordsList: _\n" "X-Poedit-Basepath: .\n" -"Last-Translator: Tapio Vierros <tap...@gm...>\n" "X-Poedit-SearchPath-0: ../game\n" -#: ../game/screen_hiscore.cc:104 -msgid "Hiscore for " -msgstr "Ennätykset kappaleelle " - -#: ../game/screen_intro.cc:9 +#: ../game/screen_intro.cc:10 msgid "Perform" msgstr "Esiinny" -#: ../game/screen_intro.cc:9 +#: ../game/screen_intro.cc:10 msgid "Start performing!" msgstr "Aloita esiintyminen!" -#: ../game/screen_intro.cc:10 +#: ../game/screen_intro.cc:11 msgid "Practice" msgstr "Harjoittele" -#: ../game/screen_intro.cc:10 +#: ../game/screen_intro.cc:11 msgid "Check your skills or test the microphones" msgstr "Tarkista taitosi tai testaa mikrofonit" -#: ../game/screen_intro.cc:11 +#: ../game/screen_intro.cc:12 msgid "Configure" msgstr "Asetukset" -#: ../game/screen_intro.cc:11 +#: ../game/screen_intro.cc:12 msgid "Configure game options" msgstr "Muokkaa pelin asetuksia" -#: ../game/screen_intro.cc:12 +#: ../game/screen_intro.cc:13 msgid "Quit" msgstr "Lopeta" -#: ../game/screen_intro.cc:12 +#: ../game/screen_intro.cc:13 msgid "Leave the game" msgstr "Poistu pelistä" -#: ../game/screen_intro.cc:19 +#: ../game/screen_intro.cc:21 msgid "No playback devices could be used.\n" msgstr "Ãänen ulostulolaitteita ei löytynyt.\n" -#: ../game/screen_intro.cc:20 +#: ../game/screen_intro.cc:22 msgid "No microphones found.\n" msgstr "Mikrofoneja ei löytynyt.\n" -#: ../game/screen_intro.cc:21 +#: ../game/screen_intro.cc:23 msgid "" "\n" "Please configure some before playing." @@ -65,23 +61,39 @@ msgstr "" "\n" "Säädä laitteet ennen pelaamista." -#: ../game/screen_players.cc:110 -msgid "No players found!" -msgstr "Pelaajia ei löytynyt!" +#: ../game/songs.cc:204 +msgid "random order" +msgstr "satunnainen järjestys" -#: ../game/screen_players.cc:111 -msgid "Enter a name to create a new player." -msgstr "Syötä nimi luodaksesi uuden pelaajan." +#: ../game/songs.cc:205 +msgid "sorted by song" +msgstr "järjestetty kappaleen mukaan" -#: ../game/screen_players.cc:113 -msgid "Press enter to create player!" -msgstr "Paina Enter luodaksesi pelaajan!" +#: ../game/songs.cc:206 +msgid "sorted by artist" +msgstr "järjestetty esittäjän mukaan" -#: ../game/screen_songs.cc:209 +#: ../game/songs.cc:207 +msgid "sorted by edition" +msgstr "järjestetty julkaisun mukaan" + +#: ../game/songs.cc:208 +msgid "sorted by genre" +msgstr "järjestetty lajityypin mukaan" + +#: ../game/songs.cc:209 +msgid "sorted by path" +msgstr "järjestetty polun mukaan" + +#: ../game/songs.cc:210 +msgid "sorted by language" +msgstr "järjestetty kielen mukaan" + +#: ../game/screen_songs.cc:178 msgid "No songs found!" msgstr "Kappaleita ei löytynyt!" -#: ../game/screen_songs.cc:210 +#: ../game/screen_songs.cc:179 msgid "" "Visit performous.org\n" "for free songs" @@ -89,7 +101,55 @@ msgstr "" "Vieraile osoitteessa performous.org\n" "ladataksesi ilmaista musiikkia." -#: ../game/screen_songs.cc:212 +#: ../game/screen_songs.cc:181 msgid "no songs match search" msgstr "yksikään kappale ei vastannut hakuasi" +#: ../game/screen_songs.cc:188 +msgid "filter: " +msgstr "soudatin: " + +#: ../game/screen_songs.cc:188 +msgid "none" +msgstr "tyhjä" + +#: ../game/screen_players.cc:111 +msgid "No players found!" +msgstr "Pelaajia ei löytynyt!" + +#: ../game/screen_players.cc:112 +msgid "Enter a name to create a new player." +msgstr "Syötä nimi luodaksesi uuden pelaajan." + +#: ../game/screen_players.cc:114 +msgid "Press enter to create player!" +msgstr "Paina Enter luodaksesi pelaajan!" + +#: ../game/screen_players.cc:121 +msgid "You reached" +msgstr "Sait" + +#: ../game/screen_players.cc:121 +msgid "points!" +msgstr "pistettä!" + +#: ../game/screen_players.cc:122 +msgid "Change player with arrow keys." +msgstr "Valitse pelaaja nuolinäppäimillä." + +#: ../game/screen_players.cc:123 +msgid "Name:" +msgstr "Nimi:" + +#: ../game/screen_players.cc:126 +msgid "Type text to filter or create a new player." +msgstr "Syötä nimi etsiäksesi tai luodaksesi uuden pelaajan." + +#: ../game/screen_players.cc:126 +msgid "Search Text:" +msgstr "Etsi:" + +#: ../game/screen_hiscore.cc:104 +msgid "Hiscore for " +msgstr "Ennätykset kappaleelle " + |
|
From: Tapio V. <aa...@us...> - 2009-12-30 21:40:16
|
Module: performous
Branch: master
Commit: 076380f97c4de037cb18e46ac6b291f5fe447acd
Author: Tapio Vierros <tap...@gm...>
Date: Wed Dec 30 23:26:21 2009 +0200
I18n for song browser filter.
---
game/screen_songs.cc | 2 +-
game/songs.cc | 54 +++++++++++++++++++++++++-------------------------
2 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/game/screen_songs.cc b/game/screen_songs.cc
index e7a05c1..e8a3adc 100644
--- a/game/screen_songs.cc
+++ b/game/screen_songs.cc
@@ -185,7 +185,7 @@ void ScreenSongs::draw() {
Song& song = m_songs.current();
// Format the song information text
oss_song << song.title << '\n' << song.artist;
- oss_order << "filter: " << (m_search.text.empty() ? "none" : m_search.text) << '\n';
+ oss_order << _("filter: ") << (m_search.text.empty() ? _("none") : m_search.text) << '\n';
oss_order << m_songs.sortDesc() << '\n';
oss_order << "(" << m_songs.currentId() + 1 << "/" << m_songs.size() << ")";
double spos = m_songs.currentPosition(); // This needs to be polled to run the animation
diff --git a/game/songs.cc b/game/songs.cc
index 78609b9..7313356 100644
--- a/game/songs.cc
+++ b/game/songs.cc
@@ -4,6 +4,7 @@
#include "fs.hh"
#include "song.hh"
#include "database.hh"
+#include "i18n.hh"
#include <boost/bind.hpp>
#include <boost/format.hpp>
@@ -166,21 +167,21 @@ void Songs::filter_internal() {
namespace {
- /// A functor that compares songs based on a selected member field of them.
- template<typename Field> class CmpByField {
- Field Song::* m_field;
- public:
- /** @param field a pointer to the field to use (pointer to member) **/
- CmpByField(Field Song::* field): m_field(field) {}
- /// Compare left < right
- bool operator()(Song const& left , Song const& right) {
+ /// A functor that compares songs based on a selected member field of them.
+ template<typename Field> class CmpByField {
+ Field Song::* m_field;
+ public:
+ /** @param field a pointer to the field to use (pointer to member) **/
+ CmpByField(Field Song::* field): m_field(field) {}
+ /// Compare left < right
+ bool operator()(Song const& left , Song const& right) {
return left.*m_field < right.*m_field;
- }
- /// Compare *left < *right
- bool operator()(boost::shared_ptr<Song> const& left, boost::shared_ptr<Song> const& right) {
- return operator()(*left, *right);
- }
- };
+ }
+ /// Compare *left < *right
+ bool operator()(boost::shared_ptr<Song> const& left, boost::shared_ptr<Song> const& right) {
+ return operator()(*left, *right);
+ }
+ };
/// A helper for easily constructing CmpByField objects
template <typename T> CmpByField<T> comparator(T Song::*field) { return CmpByField<T>(field); }
@@ -193,23 +194,22 @@ namespace {
return path.substr(pos, path.size() - pos - 1);
}
-
- static char const* order[] = {
- "random order",
- "sorted by song",
- "sorted by artist",
- "sorted by edition",
- "sorted by genre",
- "sorted by path",
- "sorted by language"
- };
-
- static const int orders = sizeof(order) / sizeof(*order);
+ static const int orders = 7;
}
std::string Songs::sortDesc() const {
- std::string str = order[m_order];
+ std::string str = "";
+ switch (m_order) {
+ case 0: str = _("random order"); break;
+ case 1: str = _("sorted by song"); break;
+ case 2: str = _("sorted by artist"); break;
+ case 3: str = _("sorted by edition"); break;
+ case 4: str = _("sorted by genre"); break;
+ case 5: str = _("sorted by path"); break;
+ case 6: str = _("sorted by language"); break;
+ default: throw std::logic_error("Internal error: unknown sort order in Songs::sortDesc");
+ }
if (!empty()) {
if (m_order == 3) str += " (" + current().edition + ")";
if (m_order == 4) str += " (" + current().genre + ")";
|
|
From: Tapio V. <aa...@us...> - 2009-12-30 19:35:16
|
Module: performous Branch: master Commit: 42cf9971f283c87644ec004805e7b1fe4750afe9 Author: Tapio Vierros <tap...@gm...> Date: Wed Dec 30 21:34:32 2009 +0200 Fixed a couple of typos in xsl transformation instructions. --- data/songlist-to-tex.xsl | 2 +- data/songlist-to-xhtml.xsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/songlist-to-tex.xsl b/data/songlist-to-tex.xsl index 2b64042..ac1c808 100644 --- a/data/songlist-to-tex.xsl +++ b/data/songlist-to-tex.xsl @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<!-- Use xmlstarlet tr songlist-to-xhtml.xml songlist.xml > songlist.tex --> +<!-- Use xmlstarlet tr songlist-to-tex.xsl songlist.xml > songlist.tex --> <!-- Then compile the tex into pdf with pdflatex songlist.tex --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> diff --git a/data/songlist-to-xhtml.xsl b/data/songlist-to-xhtml.xsl index 175b95c..945f922 100644 --- a/data/songlist-to-xhtml.xsl +++ b/data/songlist-to-xhtml.xsl @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<!-- Use xmlstarlet tr songlist-to-xhtml.xml songlist.xml > songlist.xhtml --> +<!-- Use xmlstarlet tr songlist-to-xhtml.xsl songlist.xml > songlist.xhtml --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> |
|
From: Tapio V. <aa...@us...> - 2009-12-30 17:06:54
|
Module: performous
Branch: master
Commit: 9cf904b0457180685f9dae02d76cd87fd2d03c14
Author: Tapio Vierros <tap...@gm...>
Date: Wed Dec 30 19:05:32 2009 +0200
Fix: Remember to construct new notes when changing dance track.
---
game/dancegraph.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 8b065a0..90da7fd 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -82,8 +82,6 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
throw std::runtime_error("Could not find any dance tracks.");
gameMode(0);
- difficultyDelta(0); // hack to get initial level
-
}
/// Attempt to select next/previous game mode
@@ -122,6 +120,8 @@ void DanceGraph::gameMode(int direction) {
else if (gm == "ex2-real") { m_pads = 7; std::copy(mapping7, mapping7+max_panels, m_arrow_map); }
else if (gm == "para-single") { m_pads = 5; std::copy(mapping5, mapping5+max_panels, m_arrow_map); }
else throw std::runtime_error("Unknown track " + gm);
+
+ difficultyDelta(0); // Construct new notes
}
/// Are we alive?
|
|
From: Tapio V. <aa...@us...> - 2009-12-30 09:15:10
|
Module: performous
Branch: master
Commit: f5d641b17bc84b345bac436562a8daf6848e2015
Author: Tapio Vierros <tap...@gm...>
Date: Wed Dec 30 11:04:39 2009 +0200
Dying is again based on passed notes rather than time.
---
game/dancegraph.cc | 16 ++++++++--------
game/dancegraph.hh | 4 ++--
game/guitargraph.cc | 14 +++++++-------
game/guitargraph.hh | 4 ++--
game/screen_sing.cc | 8 ++++----
5 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 2113887..8b065a0 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -9,7 +9,7 @@
namespace {
const std::string diffv[] = { "Beginner", "Easy", "Medium", "Hard", "Challenge" };
- const float death_delay = 20.0f; // Delay in seconds after which the player is hidden
+ const int death_delay = 25; // Delay in notes after which the player is hidden
const float not_joined = -100; // A value that indicates player hasn't joined
const float join_delay = 7.0f; // Time to select track/difficulty when joining mid-game
const float past = -0.4f;
@@ -66,7 +66,7 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
m_longestStreak(),
m_bigStreak(),
m_jointime(not_joined),
- m_acttime()
+ m_dead()
{
m_popupText.reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
@@ -125,8 +125,8 @@ void DanceGraph::gameMode(int direction) {
}
/// Are we alive?
-bool DanceGraph::dead(double time) const {
- return m_jointime == not_joined || time > (m_acttime + death_delay);
+bool DanceGraph::dead() const {
+ return m_jointime == not_joined || m_dead >= death_delay;
}
/// Get the difficulty as displayable string
@@ -180,6 +180,7 @@ void DanceGraph::engine() {
}
if(!it->releaseTime) it->releaseTime = time;
}
+ ++m_dead;
}
// Holding button when mine comes?
@@ -194,12 +195,11 @@ void DanceGraph::engine() {
// Handle all events
for (input::Event ev; m_input.tryPoll(ev);) {
- // Handle joining and keeping alive
- if (m_jointime == not_joined) {
- m_jointime = (time < 0.0 ? -join_delay : time); // join
+ m_dead = 0; // Keep alive
+ if (m_jointime == not_joined) { // Handle joining
+ m_jointime = (time < 0.0 ? -join_delay : time);
break;
}
- m_acttime = time;
// Difficulty / mode selection
if (time < m_jointime + join_delay) {
if (ev.type == input::Event::PRESS) {
diff --git a/game/dancegraph.hh b/game/dancegraph.hh
index e196fce..f5c901c 100644
--- a/game/dancegraph.hh
+++ b/game/dancegraph.hh
@@ -39,7 +39,7 @@ class DanceGraph {
void engine();
void position(double cx, double width) { m_cx.setTarget(cx); m_width.setTarget(width); }
unsigned stream() const { return m_stream; }
- bool dead(double time) const;
+ bool dead() const;
double correctness() const { return m_correctness.get(); }
int getScore() const { return (m_score > 0 ? m_score : 0) * m_scoreFactor; }
std::string getGameMode() const { return m_gamingMode; }
@@ -96,6 +96,6 @@ class DanceGraph {
std::string m_gamingMode;
DanceTracks::const_iterator m_curTrackIt;
double m_jointime;
- double m_acttime;
+ int m_dead;
};
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 6b78e2a..18850c1 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -17,7 +17,7 @@ namespace {
{ "Expert", 0x60 }
};
const size_t diffsz = sizeof(diffv) / sizeof(*diffv);
- const float death_delay = 20.0f; // Delay in seconds after which the player is hidden
+ const int death_delay = 25; // Delay in notes after which the player is hidden
const float not_joined = -100; // A value that indicates player hasn't joined
const float join_delay = 6.0f; // Time to select track/difficulty when joining mid-game
const float g_angle = 80.0f;
@@ -90,7 +90,7 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, std::string track):
m_longestStreak(),
m_bigStreak(),
m_jointime(not_joined),
- m_acttime()
+ m_dead()
{
try {
m_fretObj.load(getThemePath("fret.obj"));
@@ -153,9 +153,8 @@ void GuitarGraph::engine() {
double whammy = 0;
// Handle all events
for (input::Event ev; m_input.tryPoll(ev);) {
- // Handle joining and keeping alive
- if (m_jointime == not_joined) m_jointime = (time < 0.0 ? -join_delay : time); // join
- m_acttime = time;
+ m_dead = 0; // Keep alive
+ if (m_jointime == not_joined) m_jointime = (time < 0.0 ? -join_delay : time); // Handle joining
// Guitar specific actions
if (!m_drums) {
if ((ev.type == input::Event::PRESS || ev.type == input::Event::RELEASE) && ev.button == input::STARPOWER_BUTTON) {
@@ -189,6 +188,7 @@ 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();
+ ++m_dead;
++m_chordIt;
}
// Adjust the correctness value
@@ -239,8 +239,8 @@ void GuitarGraph::engine() {
}
/// Are we alive?
-bool GuitarGraph::dead(double time) const {
- return m_jointime == not_joined || time > (m_acttime + death_delay);
+bool GuitarGraph::dead() const {
+ return m_jointime == not_joined || m_dead >= death_delay;
}
/// Attempt to activate GodMode
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index d22820b..e383e9f 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -60,7 +60,7 @@ class GuitarGraph {
void engine();
void position(double cx, double width) { m_cx.setTarget(cx); m_width.setTarget(width); }
unsigned stream() const { return m_stream; }
- bool dead(double time) const;
+ bool dead() const;
double correctness() const { return m_correctness.get(); }
std::string getTrackIndex() const { return m_track_index->first; }
int getScore() const { return m_score * m_scoreFactor; }
@@ -140,6 +140,6 @@ class GuitarGraph {
int m_longestStreak;
int m_bigStreak;
double m_jointime;
- double m_acttime;
+ int m_dead;
};
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 7104127..e99ba0b 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -103,13 +103,13 @@ bool ScreenSing::instrumentLayout(double time) {
int count = 0, i = 0;
// Count active instruments
for (Instruments::iterator it = m_instruments.begin(); it != m_instruments.end(); ++it)
- if (!it->dead(time)) count++;
+ if (!it->dead()) count++;
double iw = std::min(0.5, 1.0 / count);
typedef std::pair<unsigned, double> CountSum;
std::map<std::string, CountSum> volume; // Stream id to (count, sum)
for (Instruments::iterator it = m_instruments.begin(); it != m_instruments.end(); ++it) {
it->engine(); // Run engine even when dead so that joining is possible
- if (!it->dead(time)) {
+ if (!it->dead()) {
it->position((0.5 + i - 0.5 * count) * iw, iw); // Do layout stuff
CountSum& cs = volume[it->getTrackIndex()];
cs.first++;
@@ -144,11 +144,11 @@ void ScreenSing::danceLayout(double time) {
int count = 0, i = 0;
// Count active dancers
for (Dancers::iterator it = m_dancers.begin(); it != m_dancers.end(); ++it)
- if (!it->dead(time)) count++;
+ if (!it->dead()) count++;
double iw = std::min(0.5, 1.0 / m_dancers.size());
for (Dancers::iterator it = m_dancers.begin(); it != m_dancers.end(); ++it) {
it->engine(); // Run engine even when dead so that joining is possible
- if (!it->dead(time)) {
+ if (!it->dead()) {
it->position((0.5 + i - 0.5 * count) * iw, iw); // Do layout stuff
it->draw(time);
++i;
|
|
From: Tapio V. <aa...@us...> - 2009-12-30 09:15:04
|
Module: performous
Branch: master
Commit: 0326b8f4ed8c57d20aa34acfe5978b305b4a5463
Author: Tapio Vierros <tap...@gm...>
Date: Wed Dec 30 10:46:30 2009 +0200
Longer selection time for dancing and prefer dance-single.
---
game/dancegraph.cc | 11 ++++++++---
game/screen_sing.cc | 5 +++--
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index bbf125a..2113887 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -11,7 +11,7 @@ namespace {
const std::string diffv[] = { "Beginner", "Easy", "Medium", "Hard", "Challenge" };
const float death_delay = 20.0f; // Delay in seconds after which the player is hidden
const float not_joined = -100; // A value that indicates player hasn't joined
- const float join_delay = 5.0f; // Time to select track/difficulty when joining mid-game
+ const float join_delay = 7.0f; // Time to select track/difficulty when joining mid-game
const float past = -0.4f;
const float future = 2.0f;
const float timescale = 7.0f;
@@ -97,7 +97,9 @@ void DanceGraph::gameMode(int direction) {
static int mapping10[max_panels]= {0, 3, 4, 7, 1, 6, 2, 5,-1,-1};
// Cycling
if (direction == 0) {
- m_curTrackIt = m_song.danceTracks.begin();
+ m_curTrackIt = m_song.danceTracks.find("dance-single");
+ if (m_curTrackIt == m_song.danceTracks.end())
+ m_curTrackIt = m_song.danceTracks.begin();
} else if (direction > 0) {
m_curTrackIt++;
if (m_curTrackIt == m_song.danceTracks.end()) m_curTrackIt = m_song.danceTracks.begin();
@@ -193,7 +195,10 @@ void DanceGraph::engine() {
// Handle all events
for (input::Event ev; m_input.tryPoll(ev);) {
// Handle joining and keeping alive
- if (m_jointime == not_joined) m_jointime = (time < 0.0 ? -join_delay : time); // join
+ if (m_jointime == not_joined) {
+ m_jointime = (time < 0.0 ? -join_delay : time); // join
+ break;
+ }
m_acttime = time;
// Difficulty / mode selection
if (time < m_jointime + join_delay) {
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 7ed89a1..7104127 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -91,8 +91,9 @@ void ScreenSing::enter() {
} catch (std::runtime_error&) { break; }
}
}
- double setup_delay = m_dancers.size() != 0 ? -5.0 : (m_instruments.empty() ? -1.0 : -8.0);
- m_audio.playMusic(m_song->music, false, 0.0, setup_delay); // Startup delay for instruments is longer than for singing only
+ // 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));
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-12-30 07:02:32
|
Module: performous
Branch: master
Commit: f8e2f52818d0f431b0d7ca31c93b7791a08183b4
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Dec 30 09:02:14 2009 +0200
Add songdir config back, modified so that it uses data dirs
---
data/schema.xml | 12 ++++++++++++
game/fs.cc | 34 ++++++++++++++++++++++++++++------
game/fs.hh | 2 ++
game/main.cc | 12 +++++++++++-
game/songs.cc | 3 +--
5 files changed, 54 insertions(+), 9 deletions(-)
diff --git a/data/schema.xml b/data/schema.xml
index 3a8189b..e3099df 100644
--- a/data/schema.xml
+++ b/data/schema.xml
@@ -217,6 +217,18 @@ to save the current settings to XML.
</entry>
<!-- System preferences -->
+ <entry name="system/path_songs" type="string_list">
+ <stringvalue>DATADIR/songs/</stringvalue>
+ <stringvalue>/usr/local/share/games/ultrastar/songs/</stringvalue>
+ <stringvalue>/usr/local/share/games/fretsonfire/data/songs/</stringvalue>
+ <stringvalue>/usr/share/games/ultrastar/songs/</stringvalue>
+ <stringvalue>/usr/share/games/fretsonfire/data/songs/</stringvalue>
+ <stringvalue>~/.ultrastar/songs/</stringvalue>
+ <locale name="C">
+ <short>Song folders</short>
+ <long>Where to recursively look for songs. DATADIR at the beginning means all Performous data folders.</long>
+ </locale>
+ </entry>
<entry name="system/path" type="string_list">
<locale name="C">
<short>Base folders for data</short>
diff --git a/game/fs.cc b/game/fs.cc
index 6b4e015..9e4f665 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -72,13 +72,14 @@ fs::path pathMangle(fs::path const& dir) {
std::string getThemePath(std::string const& filename) {
std::string theme = config["game/theme"].s();
- if (theme.empty()) throw std::runtime_error("Configuration value game/theme is empty");
- // Figure out theme folder (if theme name rather than path was given)
- if (theme.find('/') == std::string::npos) {
+ static const std::string defaultTheme = "default";
+ if (theme.empty()) theme = defaultTheme;
+ // Try current theme and if that fails, try default theme.
+ try {
return getPath(fs::path("themes") / theme / filename);
- } else {
- if (*theme.rbegin() == '/') theme.erase(theme.size() - 1); // Remove trailing slash
- return theme + "/" + filename;
+ } catch (std::runtime_error&) {
+ if (theme == defaultTheme) throw;
+ return getPath(fs::path("themes") / defaultTheme / filename);
}
}
@@ -146,3 +147,24 @@ Paths const& getPaths(bool refresh) {
return paths;
}
+Paths getPathsConfig(std::string const& confOption) {
+ Paths ret;
+ Paths const& paths = getPaths();
+ ConfigItem::StringList const& sl = config[confOption].sl();
+ for (ConfigItem::StringList::const_iterator it = sl.begin(), end = sl.end(); it != end; ++it) {
+ fs::path p = pathMangle(*it);
+ if (p.empty()) continue; // Ignore empty paths
+ if (*p.begin() == "DATADIR") {
+ // Remove first element
+ p = p.string().substr(7);
+ // Add all data paths with p appended to them
+ for (Paths::const_iterator it2 = paths.begin(), end2 = paths.end(); it2 != end2; ++it2) {
+ ret.push_back(*it2 / p);
+ }
+ continue;
+ }
+ ret.push_back(p);
+ }
+ return ret;
+}
+
diff --git a/game/fs.hh b/game/fs.hh
index cbf03f8..1377f7c 100644
--- a/game/fs.hh
+++ b/game/fs.hh
@@ -26,3 +26,5 @@ typedef std::vector<fs::path> Paths;
/** Get all shared data paths in preference order **/
Paths const& getPaths(bool refresh = false);
+/** Get all paths listed in a config option **/
+Paths getPathsConfig(std::string const& confOption);
diff --git a/game/main.cc b/game/main.cc
index cfcc02b..204b032 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -223,6 +223,7 @@ int main(int argc, char** argv) {
// Parse commandline options
std::vector<std::string> mics;
std::vector<std::string> pdevs;
+ std::vector<std::string> songdirs;
namespace po = boost::program_options;
po::options_description opt1("Generic options");
std::string songlist;
@@ -237,12 +238,20 @@ int main(int argc, char** argv) {
("michelp", "detailed help and device list for --mics")
("pdevhelp", "detailed help and device list for --pdev")
("theme", po::value<std::string>(), "set theme (name or absolute path)");
+ po::options_description opt3("Hidden options");
+ opt3.add_options()
+ ("songdir", po::value<std::vector<std::string> >(&songdirs)->composing(), "");
+ // Process flagless options as songdirs
+ po::positional_options_description p;
+ p.add("songdir", -1);
po::options_description cmdline;
cmdline.add(opt1).add(opt2);
po::variables_map vm;
// Load the arguments
try {
- po::store(po::command_line_parser(argc, argv).options(cmdline).run(), vm);
+ po::options_description allopts(cmdline);
+ allopts.add(opt3);
+ po::store(po::command_line_parser(argc, argv).options(allopts).positional(p).run(), vm);
} catch (std::exception& e) {
std::cout << cmdline << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
@@ -299,6 +308,7 @@ int main(int argc, char** argv) {
return EXIT_FAILURE;
}
// Override XML config for options that were specified from commandline or performous.conf
+ confOverride(songdirs, "system/path_songs");
confOverride(mics, "audio/capture");
confOverride(pdevs, "audio/playback");
// Run the game init and main loop
diff --git a/game/songs.cc b/game/songs.cc
index e942796..78609b9 100644
--- a/game/songs.cc
+++ b/game/songs.cc
@@ -39,9 +39,8 @@ void Songs::reload_internal() {
m_songs.clear();
m_dirty = true;
}
- Paths paths = getPaths();
+ Paths paths = getPathsConfig("system/path_songs");
for (Paths::iterator it = paths.begin(); m_loading && it != paths.end(); ++it) {
- *it /= "songs";
if (!fs::is_directory(*it)) { std::cout << ">>> Not scanning: " << *it << " (no such directory)" << std::endl; continue; }
std::cout << ">>> Scanning " << *it << std::endl;
size_t count = m_songs.size();
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-12-30 06:20:50
|
Module: performous
Branch: master
Commit: 703a87327c9ed03c7a8f3d726403b92b825bf191
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Dec 30 08:19:50 2009 +0200
Simplified data folder configuration. This removes some features such as being able to specify songdirs from command line.
---
data/schema.xml | 24 ------------------------
game/backgrounds.cc | 8 +++-----
game/backgrounds.hh | 2 --
game/fs.cc | 32 +++++++++++++++++++-------------
game/fs.hh | 7 +++++++
game/main.cc | 12 +-----------
game/songs.cc | 8 +++-----
game/songs.hh | 2 --
8 files changed, 33 insertions(+), 62 deletions(-)
diff --git a/data/schema.xml b/data/schema.xml
index 47ad73d..3a8189b 100644
--- a/data/schema.xml
+++ b/data/schema.xml
@@ -217,30 +217,6 @@ to save the current settings to XML.
</entry>
<!-- System preferences -->
- <entry name="system/path_songs" type="string_list">
- <stringvalue>/usr/local/share/games/ultrastar/songs/</stringvalue>
- <stringvalue>/usr/local/share/games/fretsonfire/data/songs/</stringvalue>
- <stringvalue>/usr/share/games/ultrastar/songs/</stringvalue>
- <stringvalue>/usr/share/games/fretsonfire/data/songs/</stringvalue>
- <stringvalue>../songs/</stringvalue><!-- For Windows where the program is started in bin/ -->
- <stringvalue>~/.local/share/games/performous/songs/</stringvalue>
- <stringvalue>~/.ultrastar/songs/</stringvalue>
- <stringvalue>~/.fretsonfire/songs/</stringvalue>
- <locale name="C">
- <short>Song folders</short>
- <long>Where to recursively look for songs.</long>
- </locale>
- </entry>
- <entry name="system/path_backgrounds" type="string_list">
- <stringvalue>/usr/local/share/games/performous/backgrounds/</stringvalue>
- <stringvalue>/usr/share/games/performous/backgrounds/</stringvalue>
- <stringvalue>../backgrounds/</stringvalue><!-- For Windows where the program is started in bin/ -->
- <stringvalue>~/.local/share/games/performous/backgrounds/</stringvalue>
- <locale name="C">
- <short>Background folders</short>
- <long>Where to look for backgrounds.</long>
- </locale>
- </entry>
<entry name="system/path" type="string_list">
<locale name="C">
<short>Base folders for data</short>
diff --git a/game/backgrounds.cc b/game/backgrounds.cc
index 22a3e99..4aaf895 100644
--- a/game/backgrounds.cc
+++ b/game/backgrounds.cc
@@ -15,10 +15,6 @@
void Backgrounds::reload() {
if (m_loading) return;
- // Copy backgrounddirs from config into m_bgdirs
- ConfigItem::StringList sd = config["system/path_backgrounds"].sl();
- m_bgs.clear();
- std::transform(sd.begin(), sd.end(), std::inserter(m_bgdirs, m_bgdirs.end()), pathMangle);
// Run loading thread
m_loading = true;
m_thread.reset(new boost::thread(boost::bind(&Backgrounds::reload_internal, boost::ref(*this))));
@@ -30,7 +26,9 @@ void Backgrounds::reload_internal() {
m_bgs.clear();
m_dirty = true;
}
- for (BGDirs::const_iterator it = m_bgdirs.begin(); m_loading && it != m_bgdirs.end(); ++it) {
+ Paths paths = getPaths();
+ for (Paths::iterator it = paths.begin(); m_loading && it != paths.end(); ++it) {
+ *it /= "backgrounds";
if (!fs::is_directory(*it)) { std::cout << ">>> Not scanning for backgrounds: " << *it << " (no such directory)" << std::endl; continue; }
std::cout << ">>> Scanning " << *it << " (for backgrounds)" << std::endl;
size_t count = m_bgs.size();
diff --git a/game/backgrounds.hh b/game/backgrounds.hh
index f25e2aa..b687dc4 100644
--- a/game/backgrounds.hh
+++ b/game/backgrounds.hh
@@ -34,9 +34,7 @@ class Backgrounds: boost::noncopyable {
std::string getRandom();
private:
- typedef std::set<fs::path> BGDirs;
typedef std::vector<std::string> BGVector;
- BGDirs m_bgdirs;
BGVector m_bgs;
int m_bgiter;
void reload_internal();
diff --git a/game/fs.cc b/game/fs.cc
index 89e1f9f..6b4e015 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -5,7 +5,6 @@
#include <plugin++/execname.hpp>
#include <cstdlib>
#include <iostream>
-#include <list>
#include <sstream>
#ifdef _WIN32
@@ -95,13 +94,23 @@ namespace {
}
std::string getPath(fs::path const& filename) {
- typedef std::list<fs::path> Dirs;
- static Dirs dirs;
+ Paths const& paths = getPaths();
+ for (Paths::const_iterator it = paths.begin(); it != paths.end(); ++it) {
+ fs::path p = *it;
+ p /= filename;
+ if( fs::exists(p) ) return p.string();
+ }
+ throw std::runtime_error("Cannot find file \"" + filename.string() + "\" in any of Performous data folders");
+}
+
+Paths const& getPaths(bool refresh) {
+ static Paths paths;
static bool initialized = false;
- if (!initialized) {
+ if (!initialized || refresh) {
initialized = true;
fs::path shortDir = "performous";
fs::path shareDir = SHARED_DATA_DIR;
+ Paths dirs;
#ifdef _WIN32
// Add APPLIC~1 (user-specific application data) FIXME: Not tested
{
@@ -128,15 +137,12 @@ std::string getPath(fs::path const& filename) {
}
#endif
// Adding paths from config file
- std::vector<std::string> pathes = config["system/path"].sl();
- std::transform(pathes.begin(), pathes.end(), std::inserter(dirs, dirs.end()), pathMangle);
+ std::vector<std::string> const& confPaths = config["system/path"].sl();
+ std::transform(confPaths.begin(), confPaths.end(), std::inserter(dirs, dirs.end()), pathMangle);
// Check if they actually exist and print debug
- dirs.remove_if(pathNotExist);
+ paths.clear();
+ std::remove_copy_if(dirs.begin(), dirs.end(), std::inserter(paths, paths.end()), pathNotExist);
}
- for (Dirs::const_iterator it = dirs.begin(); it != dirs.end(); ++it) {
- fs::path p = *it;
- p /= filename;
- if( fs::exists(p) ) return p.string();
- }
- throw std::runtime_error("Cannot find file \"" + filename.string() + "\" in any of Performous data folders");
+ return paths;
}
+
diff --git a/game/fs.hh b/game/fs.hh
index 2756e8d..cbf03f8 100644
--- a/game/fs.hh
+++ b/game/fs.hh
@@ -1,6 +1,7 @@
#pragma once
#include <boost/filesystem.hpp>
+#include <vector>
// Define this useful alias for the overlong namespace name (yes, for everyone who includes this header)
namespace fs = boost::filesystem;
@@ -19,3 +20,9 @@ std::string getThemePath(std::string const& filename);
/** Get full path to a share file **/
std::string getPath(fs::path const& filename);
+
+typedef std::vector<fs::path> Paths;
+
+/** Get all shared data paths in preference order **/
+Paths const& getPaths(bool refresh = false);
+
diff --git a/game/main.cc b/game/main.cc
index 204b032..cfcc02b 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -223,7 +223,6 @@ int main(int argc, char** argv) {
// Parse commandline options
std::vector<std::string> mics;
std::vector<std::string> pdevs;
- std::vector<std::string> songdirs;
namespace po = boost::program_options;
po::options_description opt1("Generic options");
std::string songlist;
@@ -238,20 +237,12 @@ int main(int argc, char** argv) {
("michelp", "detailed help and device list for --mics")
("pdevhelp", "detailed help and device list for --pdev")
("theme", po::value<std::string>(), "set theme (name or absolute path)");
- po::options_description opt3("Hidden options");
- opt3.add_options()
- ("songdir", po::value<std::vector<std::string> >(&songdirs)->composing(), "");
- // Process flagless options as songdirs
- po::positional_options_description p;
- p.add("songdir", -1);
po::options_description cmdline;
cmdline.add(opt1).add(opt2);
po::variables_map vm;
// Load the arguments
try {
- po::options_description allopts(cmdline);
- allopts.add(opt3);
- po::store(po::command_line_parser(argc, argv).options(allopts).positional(p).run(), vm);
+ po::store(po::command_line_parser(argc, argv).options(cmdline).run(), vm);
} catch (std::exception& e) {
std::cout << cmdline << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
@@ -308,7 +299,6 @@ int main(int argc, char** argv) {
return EXIT_FAILURE;
}
// Override XML config for options that were specified from commandline or performous.conf
- confOverride(songdirs, "system/path_songs");
confOverride(mics, "audio/capture");
confOverride(pdevs, "audio/playback");
// Run the game init and main loop
diff --git a/game/songs.cc b/game/songs.cc
index e0c3732..e942796 100644
--- a/game/songs.cc
+++ b/game/songs.cc
@@ -27,10 +27,6 @@ Songs::~Songs() {
void Songs::reload() {
if (m_loading) return;
- // Copy songdirs from config into m_songdirs
- ConfigItem::StringList const& sd = config["system/path_songs"].sl();
- m_songdirs.clear();
- std::transform(sd.begin(), sd.end(), std::inserter(m_songdirs, m_songdirs.end()), pathMangle);
// Run loading thread
m_needShuffle = false;
m_loading = true;
@@ -43,7 +39,9 @@ void Songs::reload_internal() {
m_songs.clear();
m_dirty = true;
}
- for (SongDirs::const_iterator it = m_songdirs.begin(); m_loading && it != m_songdirs.end(); ++it) {
+ Paths paths = getPaths();
+ for (Paths::iterator it = paths.begin(); m_loading && it != paths.end(); ++it) {
+ *it /= "songs";
if (!fs::is_directory(*it)) { std::cout << ">>> Not scanning: " << *it << " (no such directory)" << std::endl; continue; }
std::cout << ">>> Scanning " << *it << std::endl;
size_t count = m_songs.size();
diff --git a/game/songs.hh b/game/songs.hh
index 7ae1545..849709d 100644
--- a/game/songs.hh
+++ b/game/songs.hh
@@ -66,8 +66,6 @@ class Songs: boost::noncopyable {
private:
class RestoreSel;
typedef std::vector<boost::shared_ptr<Song> > SongVector;
- typedef std::set<fs::path> SongDirs;
- SongDirs m_songdirs;
std::string m_songlist;
SongVector m_songs, m_filtered;
AnimAcceleration math_cover;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-12-30 05:37:07
|
Module: performous Branch: master Commit: 19b464fb93c180f6e8a43c5135397e1029e449fe Author: Lasse Karkkainen <tro...@tr...> Date: Wed Dec 30 07:36:07 2009 +0200 Fixing controller_delay description. Changing songs/backgrounds to ~/.local/share/games/performous instead of ~/.performous --- data/schema.xml | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/schema.xml b/data/schema.xml index 6445976..47ad73d 100644 --- a/data/schema.xml +++ b/data/schema.xml @@ -158,10 +158,10 @@ to save the current settings to XML. </entry> <entry name="audio/controller_delay" type="float" value="0.00"> <ui unit=" ms" multiplier="1000" /> - <limits min="-0.5" max="0.5" step="0.02" /> + <limits min="0.0" max="0.5" step="0.02" /> <locale name="C"> <short>Audio/controller latency</short> - <long>Use negative value if your controller lag is greater than the sound card output latency, positive values in the opposite case and zero if they are equal.</long> + <long>The total of USB (guitar or dance pad) latency combined with audio output latency.</long> </locale> </entry> <entry name="audio/round-trip" type="float" value="0.08"> @@ -223,7 +223,7 @@ to save the current settings to XML. <stringvalue>/usr/share/games/ultrastar/songs/</stringvalue> <stringvalue>/usr/share/games/fretsonfire/data/songs/</stringvalue> <stringvalue>../songs/</stringvalue><!-- For Windows where the program is started in bin/ --> - <stringvalue>~/.performous/songs/</stringvalue> + <stringvalue>~/.local/share/games/performous/songs/</stringvalue> <stringvalue>~/.ultrastar/songs/</stringvalue> <stringvalue>~/.fretsonfire/songs/</stringvalue> <locale name="C"> @@ -235,7 +235,7 @@ to save the current settings to XML. <stringvalue>/usr/local/share/games/performous/backgrounds/</stringvalue> <stringvalue>/usr/share/games/performous/backgrounds/</stringvalue> <stringvalue>../backgrounds/</stringvalue><!-- For Windows where the program is started in bin/ --> - <stringvalue>~/.performous/backgrounds/</stringvalue> + <stringvalue>~/.local/share/games/performous/backgrounds/</stringvalue> <locale name="C"> <short>Background folders</short> <long>Where to look for backgrounds.</long> @@ -243,8 +243,8 @@ to save the current settings to XML. </entry> <entry name="system/path" type="string_list"> <locale name="C"> - <short>System folders</short> - <long>Where to look for performous data.</long> + <short>Base folders for data</short> + <long>System defaults are included automatically. Additional paths can be added here.</long> </locale> </entry> </performous> |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-12-30 05:37:04
|
Module: performous
Branch: master
Commit: 66931c955b45a3680c461660b04bc38fa31b913e
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Dec 30 04:57:02 2009 +0200
Add support for PS2 to USB converters, often used with dance pads
---
game/joystick.cc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index f6acdd0..139d18a 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -257,6 +257,9 @@ void input::SDL::init() {
} else if( name.find("Positive Gaming Impact USB pad") != std::string::npos ) {
std::cout << " Detected as: Generic Dance Pad" << std::endl;
input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::DANCEPAD_GENERIC);
+ } else if( name.find("Joypad to USB converter") != std::string::npos ) {
+ std::cout << " Detected as: Generic Dance Pad (guessed)" << std::endl;
+ input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::DANCEPAD_GENERIC);
} else {
std::cout << " Detected as: Unknwown (please report the name, assuming Guitar Hero Drums)" << std::endl;
input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::DRUMS_GH);
|
|
From: Stefano A. <xa...@us...> - 2009-12-29 22:53:52
|
Module: performous Branch: master Commit: d204aa28be882c0dbfd98f614f50ccc9d244cc1e Author: Xaldyz <xa...@us...> Date: Tue Dec 29 23:53:39 2009 +0100 Added italian comment to performous.desktop --- data/performous.desktop | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/data/performous.desktop b/data/performous.desktop index 191edc2..522cb02 100644 --- a/data/performous.desktop +++ b/data/performous.desktop @@ -6,6 +6,7 @@ Comment[de]=Ein Karaoke Spiel Comment[es]=Un juego de karaoke Comment[fi]=Karaokepeli Comment[fr]=Un jeu de Karaoké +Comment[it]=Un gioco di karaoke Comment[ro]=Un joc de tip karaoke Comment[se]=Ett karaoke-spel Exec=performous |
|
From: Tapio V. <aa...@us...> - 2009-12-29 22:18:30
|
Module: performous Branch: master Commit: 9effd3dfe24a9348835e245a32bf5d6f0af9fe9c Author: Tapio Vierros <tap...@gm...> Date: Wed Dec 30 00:13:55 2009 +0200 Added flame effect for hitting instrument notes. --- game/guitargraph.cc | 120 ++++++++++++++++++++++++------------- game/guitargraph.hh | 2 + themes/default/flame.svg | 149 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 228 insertions(+), 43 deletions(-) |
|
From: Peque <ms...@us...> - 2009-12-29 14:21:28
|
Module: performous Branch: master Commit: ba22ad00f8197f511ed2f985d3537f5953f02846 Author: Miguel Sánchez de León Peque <peq...@ho...> Date: Tue Dec 29 15:20:59 2009 +0100 Spanish traduction updated. --- data/performous.desktop | 5 +++-- lang/es.po | 20 ++++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/data/performous.desktop b/data/performous.desktop index 91f9990..191edc2 100644 --- a/data/performous.desktop +++ b/data/performous.desktop @@ -3,9 +3,10 @@ Encoding=UTF-8 Name=Performous Comment=A karaoke game Comment[de]=Ein Karaoke Spiel -Comment[ro]=Un joc de tip karaoke -Comment[fr]=Un jeu de Karaoké +Comment[es]=Un juego de karaoke Comment[fi]=Karaokepeli +Comment[fr]=Un jeu de Karaoké +Comment[ro]=Un joc de tip karaoke Comment[se]=Ett karaoke-spel Exec=performous Icon=performous.xpm diff --git a/lang/es.po b/lang/es.po index ebeadc8..ab492cd 100644 --- a/lang/es.po +++ b/lang/es.po @@ -6,11 +6,13 @@ msgstr "" "PO-Revision-Date: \n" "Language-Team: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-KeywordsList: _\n" "X-Poedit-Basepath: .\n" "Last-Translator: Miguel Sánchez de León Peque <msd...@gm...>\n" +"X-Poedit-Language: Spanish\n" +"X-Poedit-Country: SPAIN\n" "X-Poedit-SearchPath-0: ../game\n" #: ../game/screen_hiscore.cc:104 @@ -19,11 +21,11 @@ msgstr "Puntuaciones para" #: ../game/screen_intro.cc:9 msgid "Perform" -msgstr "Perform" +msgstr "Jugar" #: ../game/screen_intro.cc:9 msgid "Start performing!" -msgstr "Comienza una partida!" +msgstr "¡Comienza una partida!" #: ../game/screen_intro.cc:10 msgid "Practice" @@ -35,7 +37,7 @@ msgstr "Revisa los micrófonos y comprueba tus habilidades" #: ../game/screen_intro.cc:11 msgid "Configure" -msgstr "Configuración" +msgstr "Opciones" #: ../game/screen_intro.cc:11 msgid "Configure game options" @@ -51,7 +53,9 @@ msgstr "Sal del juego" #: ../game/screen_intro.cc:19 msgid "No playback devices could be used.\n" -msgstr "Ningún dispositivo de reproducción de audio pudo ser configurado.\n" +msgstr "" +"No se pudo configurar ningún dispositivo\n" +"de reproducción.\n" #: ../game/screen_intro.cc:20 msgid "No microphones found.\n" @@ -67,7 +71,7 @@ msgstr "" #: ../game/screen_players.cc:110 msgid "No players found!" -msgstr "No se han encontrado jugadores!" +msgstr "¡No se han encontrado jugadores!" #: ../game/screen_players.cc:111 msgid "Enter a name to create a new player." @@ -75,11 +79,11 @@ msgstr "Introduce un nombre para crear un nuevo jugador." #: ../game/screen_players.cc:113 msgid "Press enter to create player!" -msgstr "Presiona \"enter\" para crear el jugador!" +msgstr "Presiona \"enter\" para crear el nuevo jugador:" #: ../game/screen_songs.cc:209 msgid "No songs found!" -msgstr "No se encontraron canciones!" +msgstr "¡No se encontraron canciones!" #: ../game/screen_songs.cc:210 msgid "" |
|
From: Yoda-JM <yo...@us...> - 2009-12-29 13:48:30
|
Module: performous
Branch: master
Commit: 2d5b47a4dd01792bb1c25165933e04bea89fdd70
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Dec 29 14:47:40 2009 +0100
Fixed UTF-8 translations
---
game/main.cc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index 03b47f4..204b032 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -212,6 +212,7 @@ int main(int argc, char** argv) {
setlocale (LC_MESSAGES, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ bind_textdomain_codeset (PACKAGE, "UTF-8");
#endif
std::cout << PACKAGE " " VERSION << std::endl;
|
|
From: Tapio V. <aa...@us...> - 2009-12-29 12:52:24
|
Module: performous
Branch: master
Commit: a77497d5914462801333fc897aedeb5feff4a3f4
Author: Tapio Vierros <tap...@gm...>
Date: Tue Dec 29 14:47:46 2009 +0200
Navigation tweaks.
* 'Select' acts now as Cancel/Quit
* PGUP/PGDN are abstracted (and also mapped to dancepad diagonal arrows)
* Players screen navigation abstraction
---
game/joystick.cc | 12 +++++--
game/joystick.hh | 2 +-
game/screen_intro.cc | 9 +++--
game/screen_players.cc | 80 ++++++++++++++++++++++++------------------------
game/screen_songs.cc | 11 ++----
5 files changed, 59 insertions(+), 55 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index aa67b08..f6acdd0 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -45,8 +45,8 @@ int input::buttonFromSDL(input::Private::Type _type, unsigned int _sdl_button) {
//K R Y B G O // for drums
{ 3, 4, 1, 2, 0, 4, -1, -1, 8, 9 }, // Guitar Hero drums
{ 3, 4, 1, 2, 0,-1, -1, -1, 8, 9 }, // Rock Band drums
- // Left Down Up Right UpL UpR DownL DownR Start Select
- { 0, 1, 2, 3, 6, 7, 4, 5, 9, 8 } // generic dance pad
+ // Left Down Up Right DownL DownR UpL UpR Start Select
+ { 0, 1, 2, 3, 6, 7, 4, 5, 9, 8 } // generic dance pad
};
if( _sdl_button >= SDL_BUTTONS ) return -1;
switch(_type) {
@@ -81,6 +81,8 @@ input::NavButton input::getNav(SDL_Event const &e) {
else if (k == SDLK_RIGHT) return input::RIGHT;
else if (k == SDLK_RETURN) return input::START;
else if (k == SDLK_ESCAPE || k == SDLK_q) return input::CANCEL;
+ else if (k == SDLK_PAGEUP) return input::MOREUP;
+ else if (k == SDLK_PAGEDOWN) return input::MOREDOWN;
else if (k == SDLK_PAUSE || (k == SDLK_p && mod & KMOD_CTRL))
return input::PAUSE;
} else if (e.type == SDL_JOYBUTTONDOWN) {
@@ -89,7 +91,7 @@ input::NavButton input::getNav(SDL_Event const &e) {
input::Private::InputDevPrivate devt = input::Private::devices[joy_id];
int b = buttonFromSDL(devt.type(), e.jbutton.button);
if (b == -1) return input::NONE;
- else if (b == 8) return input::SELECT;
+ else if (b == 8) return input::CANCEL;
else if (b == 9) return input::START;
// Totally different device types need their own custom mappings
if (devt.type_match(input::DANCEPAD)) {
@@ -98,7 +100,9 @@ input::NavButton input::getNav(SDL_Event const &e) {
else if (b == 1) return input::DOWN;
else if (b == 2) return input::UP;
else if (b == 3) return input::RIGHT;
- else return input::CANCEL;
+ else if (b == 5) return input::MOREUP;
+ else if (b == 6) return input::MOREDOWN;
+ else return input::NONE;
} else if (devt.type_match(input::DRUMS)) {
// Drums can be used for navigation
if (b == 0) return input::START;
diff --git a/game/joystick.hh b/game/joystick.hh
index 529c6b4..f985981 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -17,7 +17,7 @@
namespace input {
enum DevType { GUITAR, DRUMS, DANCEPAD };
- enum NavButton { NONE, UP, DOWN, LEFT, RIGHT, START, SELECT, CANCEL, PAUSE };
+ enum NavButton { NONE, UP, DOWN, LEFT, RIGHT, START, SELECT, CANCEL, PAUSE, MOREUP, MOREDOWN };
static const std::size_t BUTTONS = 10;
static const int STARPOWER_BUTTON = 5;
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index f4d7e0d..77ad140 100755
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -37,9 +37,12 @@ void ScreenIntro::manageEvent(SDL_Event event) {
input::NavButton nav(input::getNav(event));
if (nav != input::NONE) {
if (m_dialog) { m_dialog.reset(); return; }
- if (nav == input::CANCEL) sm->finished();
- else if (nav == input::DOWN || nav == input::RIGHT) ++selected;
- else if (nav == input::UP || nav == input::LEFT) --selected;
+ if (nav == input::CANCEL) {
+ if (selected == m_menuOptions.size()-1) sm->finished();
+ else selected = m_menuOptions.size()-1;
+ }
+ else if (nav == input::DOWN || nav == input::RIGHT || nav == input::MOREDOWN) ++selected;
+ else if (nav == input::UP || nav == input::LEFT || nav == input::MOREUP) --selected;
else if (nav == input::START) {
std::string screen = m_menuOptions[selected].screen;
if (screen.empty()) sm->finished(); else sm->activateScreen(screen);
diff --git a/game/screen_players.cc b/game/screen_players.cc
index b8e8951..6842dec 100644
--- a/game/screen_players.cc
+++ b/game/screen_players.cc
@@ -9,6 +9,7 @@
#include "theme.hh"
#include "video.hh"
#include "i18n.hh"
+#include "joystick.hh"
#include <iostream>
#include <sstream>
@@ -48,50 +49,49 @@ void ScreenPlayers::exit() {
void ScreenPlayers::manageEvent(SDL_Event event) {
ScreenManager* sm = ScreenManager::getSingletonPtr();
- if (event.type != SDL_KEYDOWN) return;
- SDL_keysym keysym = event.key.keysym;
- int key = keysym.sym;
- SDLMod mod = event.key.keysym.mod;
-
- //TODO: reload -- needs database reload
- // if (key == SDLK_r && mod & KMOD_CTRL) { m_players.reload(); m_players.setFilter(m_search.text); }
- if (m_search.process(keysym)) m_players.setFilter(m_search.text);
- else if (key == SDLK_ESCAPE) {
- if (m_search.text.empty()) { sm->activateScreen("Songs"); return; }
- else { m_search.text.clear(); m_players.setFilter(m_search.text); }
- }
- else if (key == SDLK_RETURN)
- {
- if (m_players.empty())
- {
- m_players.addPlayer(m_search.text);
- m_players.setFilter(m_search.text);
- m_players.update();
- // the current player is the new created one
- }
- m_database.addHiscore(m_song);
- m_database.scores.pop_front();
-
- if (m_database.scores.empty()
- || !m_database.reachedHiscore(m_song))
- {
- // no more highscore, we are now finished
- sm->activateScreen("Songs");
- } else {
- m_search.text.clear();
- m_players.setFilter("");
- // add all players which reach highscore because if score is very near or same it might be
- // frustrating for second one that he cannot enter, so better go for next one...
+ input::NavButton nav(input::getNav(event));
+ if (nav != input::NONE) {
+ if (nav == input::CANCEL) {
+ if (m_search.text.empty()) { sm->activateScreen("Songs"); return; }
+ else { m_search.text.clear(); m_players.setFilter(m_search.text); }
+ } else if (nav == input::START) {
+ if (m_players.empty()) {
+ m_players.addPlayer(m_search.text);
+ m_players.setFilter(m_search.text);
+ m_players.update();
+ // the current player is the new created one
+ }
+ m_database.addHiscore(m_song);
+ m_database.scores.pop_front();
+
+ if (m_database.scores.empty() || !m_database.reachedHiscore(m_song)) {
+ // no more highscore, we are now finished
+ sm->activateScreen("Songs");
+ } else {
+ m_search.text.clear();
+ m_players.setFilter("");
+ // add all players which reach highscore because if score is very near or same it might be
+ // frustrating for second one that he cannot enter, so better go for next one...
+ }
}
+ else if (m_players.empty()) return;
+ else if (nav == input::PAUSE) m_audio.togglePause();
+ else if (nav == input::LEFT) m_players.advance(-1);
+ else if (nav == input::RIGHT) m_players.advance(1);
+ else if (nav == input::UP) m_players.advance(-1);
+ else if (nav == input::DOWN) m_players.advance(1);
+ else if (nav == input::MOREUP) m_players.advance(-10);
+ else if (nav == input::MOREDOWN) m_players.advance(10);
+ }
+ else if (event.type == SDL_KEYDOWN) { // Process keyboard-only keys
+ SDL_keysym keysym = event.key.keysym;
+ //int key = keysym.sym;
+ //SDLMod mod = event.key.keysym.mod;
+
+ //TODO: reload -- needs database reload
+ // if (key == SDLK_r && mod & KMOD_CTRL) { m_players.reload(); m_players.setFilter(m_search.text); }
+ if (m_search.process(keysym)) m_players.setFilter(m_search.text);
}
- else if (m_players.empty()) return;
- else if (key == SDLK_SPACE || (key == SDLK_PAUSE || (key == SDLK_p && mod & KMOD_CTRL))) m_audio.togglePause();
- else if (key == SDLK_LEFT) m_players.advance(-1);
- else if (key == SDLK_RIGHT) m_players.advance(1);
- else if (key == SDLK_UP) m_players.advance(-1);
- else if (key == SDLK_DOWN) m_players.advance(1);
- else if (key == SDLK_PAGEUP) m_players.advance(-10);
- else if (key == SDLK_PAGEDOWN) m_players.advance(10);
}
void ScreenPlayers::draw() {
diff --git a/game/screen_songs.cc b/game/screen_songs.cc
index 1a271f9..e7a05c1 100644
--- a/game/screen_songs.cc
+++ b/game/screen_songs.cc
@@ -69,6 +69,8 @@ void ScreenSongs::manageEvent(SDL_Event event) {
if (nav == input::CANCEL || m_songs.empty()) m_jukebox = false;
else if (nav == input::UP) m_audio.seek(5);
else if (nav == input::DOWN) m_audio.seek(-5);
+ else if (nav == input::MOREUP) m_audio.seek(-30);
+ else if (nav == input::MOREDOWN) m_audio.seek(30);
else manageSharedKey(nav);
return;
} else if (nav == input::CANCEL) {
@@ -79,23 +81,18 @@ void ScreenSongs::manageEvent(SDL_Event event) {
else if (m_songs.empty()) return;
else if (nav == input::UP) m_songs.sortChange(-1);
else if (nav == input::DOWN) m_songs.sortChange(1);
+ else if (nav == input::MOREUP) m_songs.advance(-10);
+ else if (nav == input::MOREDOWN) m_songs.advance(10);
else manageSharedKey(nav);
// Handle less common, keyboard only keys
} else if (event.type == SDL_KEYDOWN) {
SDL_keysym keysym = event.key.keysym;
int key = keysym.sym;
SDLMod mod = event.key.keysym.mod;
- if (m_jukebox) {
- if (key == SDLK_PAGEUP) m_audio.seek(-30);
- else if (key == SDLK_PAGEDOWN) m_audio.seek(30);
- return;
- }
if (key == SDLK_r && mod & KMOD_CTRL) { m_songs.reload(); m_songs.setFilter(m_search.text); }
if (!m_jukebox && m_search.process(keysym)) m_songs.setFilter(m_search.text);
// The rest are only available when there are songs available
else if (m_songs.empty()) return;
- else if (key == SDLK_PAGEUP) m_songs.advance(-10);
- else if (key == SDLK_PAGEDOWN) m_songs.advance(10);
else if (key == SDLK_F11) --config["audio/preview_volume"];
else if (key == SDLK_F12) ++config["audio/preview_volume"];
else if (!m_jukebox && key == SDLK_F4) m_jukebox = true;
|
|
From: Tapio V. <aa...@us...> - 2009-12-29 12:43:48
|
Module: performous
Branch: master
Commit: ecf26eeb4a65d85df65556e12ae5e5bc2a17fe2a
Author: Tapio Vierros <tap...@gm...>
Date: Tue Dec 29 13:41:17 2009 +0200
Fix most graphical bugs in instrument rewinding by not showing past notes.
Some remain in holds.
---
game/guitargraph.cc | 11 +++++++++--
game/guitargraph.hh | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 790121c..c1220dd 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -261,6 +261,8 @@ void GuitarGraph::endHold(int fret, double time) {
for (Chords::iterator it = m_chords.begin(); it != m_chords.end(); ++it) {
if (time >= it->begin && time <= it->end) {
it->releaseTimes[fret] = time;
+ if (it->status < 100 && time >= it->end - maxTolerance)
+ it->status += 100; // Mark as past note for rewinding
break;
}
}
@@ -522,10 +524,15 @@ void GuitarGraph::draw(double time) {
for (Chords::iterator it = m_chords.begin(); it != m_chords.end(); ++it) {
float tBeg = it->begin - time;
float tEnd = it->end - time;
- if (tEnd < past) continue;
if (tBeg > future) break;
+ if (tEnd < past) {
+ if (it->status < 100) it->status += 100; // Mark as past note for rewinding
+ continue;
+ }
+ if (it->status >= 100 || (tBeg > maxTolerance
+ && it->status > 0)) continue; // Don't show past chords when rewinding
for (int fret = 0; fret < 5; ++fret) { // Loop through the frets
- if (!it->fret[fret]) continue;
+ if (!it->fret[fret] || (tBeg > maxTolerance && it->releaseTimes[fret] > 0)) continue;
if (tEnd > future) tEnd = future;
unsigned event = m_notes[it->dur[fret]];
float glow = 0.0f;
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index 30209f6..1e3ebee 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -20,7 +20,7 @@ struct Chord {
Duration const* dur[5];
int polyphony;
bool tappable;
- int status; // Guitar: 0 = not played, 10 = tapped, 20 = picked, 30 = released, drums: number of pads hit
+ int status; // Guitar: 0 = not played, 10 = tapped, 20 = picked, 30 = released, drums: number of pads hit, all: >100 = past
int score;
AnimValue hitAnim[5];
double releaseTimes[5];
|
|
From: Tapio V. <aa...@us...> - 2009-12-29 12:43:48
|
Module: performous Branch: master Commit: f6c4b5e9c440b90c1229d737bb3e182131eda548 Author: Tapio Vierros <tap...@gm...> Date: Tue Dec 29 14:02:21 2009 +0200 Added Finnish translation. --- lang/fi.po | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 95 insertions(+), 0 deletions(-) diff --git a/lang/fi.po b/lang/fi.po new file mode 100644 index 0000000..5888570 --- /dev/null +++ b/lang/fi.po @@ -0,0 +1,95 @@ +msgid "" +msgstr "" +"Project-Id-Version: Performous\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-07 01:56+0100\n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: _\n" +"X-Poedit-Basepath: .\n" +"Last-Translator: Tapio Vierros <tap...@gm...>\n" +"X-Poedit-SearchPath-0: ../game\n" + +#: ../game/screen_hiscore.cc:104 +msgid "Hiscore for " +msgstr "Ennätykset kappaleelle " + +#: ../game/screen_intro.cc:9 +msgid "Perform" +msgstr "Esiinny" + +#: ../game/screen_intro.cc:9 +msgid "Start performing!" +msgstr "Aloita esiintyminen!" + +#: ../game/screen_intro.cc:10 +msgid "Practice" +msgstr "Harjoittele" + +#: ../game/screen_intro.cc:10 +msgid "Check your skills or test the microphones" +msgstr "Tarkista taitosi tai testaa mikrofonit" + +#: ../game/screen_intro.cc:11 +msgid "Configure" +msgstr "Asetukset" + +#: ../game/screen_intro.cc:11 +msgid "Configure game options" +msgstr "Muokkaa pelin asetuksia" + +#: ../game/screen_intro.cc:12 +msgid "Quit" +msgstr "Lopeta" + +#: ../game/screen_intro.cc:12 +msgid "Leave the game" +msgstr "Poistu pelistä" + +#: ../game/screen_intro.cc:19 +msgid "No playback devices could be used.\n" +msgstr "Ãänen ulostulolaitteita ei löytynyt.\n" + +#: ../game/screen_intro.cc:20 +msgid "No microphones found.\n" +msgstr "Mikrofoneja ei löytynyt.\n" + +#: ../game/screen_intro.cc:21 +msgid "" +"\n" +"Please configure some before playing." +msgstr "" +"\n" +"Säädä laitteet ennen pelaamista." + +#: ../game/screen_players.cc:110 +msgid "No players found!" +msgstr "Pelaajia ei löytynyt!" + +#: ../game/screen_players.cc:111 +msgid "Enter a name to create a new player." +msgstr "Syötä nimi luodaksesi uuden pelaajan." + +#: ../game/screen_players.cc:113 +msgid "Press enter to create player!" +msgstr "Paina Enter luodaksesi pelaajan!" + +#: ../game/screen_songs.cc:209 +msgid "No songs found!" +msgstr "Kappaleita ei löytynyt!" + +#: ../game/screen_songs.cc:210 +msgid "" +"Visit performous.org\n" +"for free songs" +msgstr "" +"Vieraile osoitteessa performous.org\n" +"ladataksesi ilmaista musiikkia." + +#: ../game/screen_songs.cc:212 +msgid "no songs match search" +msgstr "yksikään kappale ei vastannut hakuasi" + |