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: Anders J. <aj...@us...> - 2010-09-21 20:59:14
|
Module: performous Branch: master Commit: 53bef298d8cd0d5ce8d9ed65c8ace35adcdb59c3 Author: Anders Jenbo <an...@je...> Date: Tue Sep 21 22:55:12 2010 +0200 Update translations to latest POT to help translators that dosn't set up xml paring or update (credits retained) --- lang/de.po | 579 ++++++++++++++++++++++++++++++++++------------------- lang/es.po | 570 +++++++++++++++++++++++++++++++++------------------- lang/fr.po | 653 +++++++++++++++++++++++++++++++----------------------------- lang/hu.po | 557 +++++++++++++++++++++++++++++++++------------------- lang/it.po | 568 +++++++++++++++++++++++++++++++++------------------- lang/nl.po | 557 +++++++++++++++++++++++++++++++++------------------- lang/sv.po | 476 +++++++++++++++++++++++--------------------- 7 files changed, 2399 insertions(+), 1561 deletions(-) |
|
From: Anders J. <aj...@us...> - 2010-09-21 20:44:12
|
Module: performous Branch: master Commit: bb90e854f0bc85eda40913a8f0850c2f139a1594 Author: Anders Jenbo <an...@je...> Date: Tue Sep 21 22:43:34 2010 +0200 Merge branch 'master' of git.performous.org:/gitroot/performous/performous --- |
|
From: Anders J. <aj...@us...> - 2010-09-21 20:44:09
|
Module: performous Branch: master Commit: 26e788cceafa69510f0de6e148d0014edd0bae5c Author: Anders Jenbo <an...@je...> Date: Tue Sep 21 22:33:36 2010 +0200 Added initial Danish translation --- lang/da.po | 828 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 828 insertions(+), 0 deletions(-) |
|
From: Anders J. <aj...@us...> - 2010-09-21 20:44:09
|
Module: performous Branch: master Commit: fc14d16207943535fbc118e900ed0cb1a16d0892 Author: Anders Jenbo <an...@je...> Date: Tue Sep 21 22:32:29 2010 +0200 make mktemp command compatible with older versions --- tools/scripts/xml_gettext.sh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/scripts/xml_gettext.sh b/tools/scripts/xml_gettext.sh index 012ac8a..dc8b678 100755 --- a/tools/scripts/xml_gettext.sh +++ b/tools/scripts/xml_gettext.sh @@ -98,7 +98,7 @@ shift shift # create the temporary file securely. -TEMP_SRC=$(mktemp --tmpdir xml2gettext.XXXXXXXXXX.c) +TEMP_SRC=$(mktemp --tmpdir xml2gettext.XXXXXXXXXX).c append_temp_src "/* This is a automatically generated temp file, it's safe to remove*/" # Start the dirty work @@ -113,4 +113,4 @@ RV=$? # clean up rm "$TEMP_SRC" -exit $RV \ No newline at end of file +exit $RV |
|
From: Tapio V. <aa...@us...> - 2010-09-21 20:23:38
|
Module: performous
Branch: master
Commit: e451ba3c7d6a18114699c5c36486bbe14b9c6842
Author: Tapio Vierros <tap...@gm...>
Date: Tue Sep 21 23:20:34 2010 +0300
Pressing any key after 'ready' but before t=0 brings back instrument join menu.
This is to make it easy to recover from accidental 'readiness'.
---
game/guitargraph.cc | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index bb77221..cf88be0 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -323,11 +323,19 @@ void GuitarGraph::engine() {
// Sync menu items & captions
updateJoinMenu();
break;
+
+ // If the songs hasn't yet started, we want key presses to bring join menu back (not pause menu)
+ } else if (time < 0 && ev.type == input::Event::PRESS) {
+ setupJoinMenu();
+ m_menu.open();
+ break;
+
} else if (!m_input.isKeyboard()) {
// Handle Start/Select keypresses
if (ev.nav == input::CANCEL) ev.button = input::GODMODE_BUTTON; // Select = GodMode
if (ev.nav == input::START) { m_menu.open(); continue; }
}
+
// Guitar specific actions
if (!m_drums) {
if ((ev.type == input::Event::PRESS || ev.type == input::Event::RELEASE) && ev.button == input::GODMODE_BUTTON) {
|
|
From: Tapio V. <aa...@us...> - 2010-09-21 20:10:35
|
Module: performous
Branch: master
Commit: 457e6e91c7a376caa72e0e744967968f89d53a9c
Author: Tapio Vierros <tap...@gm...>
Date: Tue Sep 21 23:07:44 2010 +0300
Short comment bg in config menu now has adaptive width (was wrong with i18n).
---
game/screen_intro.cc | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index d4f46ae..bbf919c 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -59,6 +59,7 @@ void ScreenIntro::manageEvent(SDL_Event event) {
}
void ScreenIntro::draw_menu_options() {
+ // Variables used for positioning and other stuff
double wcounter = 0;
const size_t showopts = 4; // Show at most 4 options simultaneously
const float x = -0.35;
@@ -71,9 +72,13 @@ void ScreenIntro::draw_menu_options() {
int start_i = std::min((int)m_menu.curIndex() - 1, (int)opts.size() - (int)showopts
+ (m_menu.getSubmenuLevel() == 2 ? 1 : 0)); // Hack to counter side-effects from displaying the value inside the menu
if (start_i < 0 || opts.size() == showopts) start_i = 0;
+
+ // Loop the currently visible options
for (size_t i = start_i, ii = 0; ii < showopts && i < opts.size(); ++i, ++ii) {
MenuOption const& opt = opts[i];
- if (i == m_menu.curIndex()) { // Selection
+
+ // Selection
+ if (i == m_menu.curIndex()) {
// Animate selection higlight moving
double selanim = m_selAnim.get() - start_i;
if (selanim < 0) selanim = 0;
@@ -89,7 +94,9 @@ void ScreenIntro::draw_menu_options() {
theme->option_selected.dimensions.left(x + sel_margin).center(-0.1 + (selanim+1)*0.08);
theme->option_selected.draw("< " + opt.value->getValue() + " >", submenuanim);
}
- } else { // Regular option (not selected)
+
+ // Regular option (not selected)
+ } else {
theme->option.dimensions.left(x).center(start_y + ii*0.08);
theme->option.draw(opt.getName(), submenuanim * (opt.isActive() ? 1.0f : 0.5f));
wcounter = std::max(wcounter, theme->option.w() + 2 * sel_margin); // Calculate the widest entry
@@ -108,8 +115,8 @@ void ScreenIntro::draw() {
theme->comment.draw(m_menu.current().getComment());
// Key help for config
if (m_menu.getSubmenuLevel() > 0) {
- theme->short_comment_bg.dimensions.fixedHeight(0.025);
- theme->short_comment_bg.dimensions.right(-0.04).screenBottom(-0.054);
+ theme->short_comment_bg.dimensions.stretch(theme->short_comment.w() + 0.08, 0.025);
+ theme->short_comment_bg.dimensions.left(-0.54).screenBottom(-0.054);
theme->short_comment_bg.draw();
theme->short_comment.dimensions.left(-0.48).screenBottom(-0.067);
theme->short_comment.draw(_("Ctrl + S to save, Ctrl + R to reset defaults"));
@@ -128,7 +135,7 @@ void ScreenIntro::populateMenu() {
MenuOptions audiomenu;
MenuOptions gfxmenu;
MenuOptions gamemenu;
- MenuOptions pathsmenu; // Dummy
+ MenuOptions pathsmenu; // FIXME: Dummy (just to get a gray option to the menu)
// Populate the submenus
for (Config::iterator it = config.begin(); it != config.end(); ++it) {
// Skip items that are configured elsewhere
@@ -146,6 +153,7 @@ void ScreenIntro::populateMenu() {
configmain.push_back(MenuOption(_("Audio"), _("Configure general audio settings"), audiomenu, "intro_configure.svg"));
configmain.push_back(MenuOption(_("Graphics"), _("Configure rendering and video settings"), gfxmenu, "intro_configure.svg"));
configmain.push_back(MenuOption(_("Game"), _("Gameplay related options"), gamemenu, "intro_configure.svg"));
+ // FIXME: 'Paths' should open a screen
configmain.push_back(MenuOption(_("Paths"), _("Setup song and data paths"), pathsmenu, "intro_configure.svg"));
configmain.back().image.reset(new Surface(getThemePath("intro_quit.svg")));
// Add to root menu
|
|
From: Yoda-JM <yo...@us...> - 2010-09-20 22:42:40
|
Module: performous Branch: master Commit: c51de888fbae6fba84d969a6237644b937ac476c Author: Vincent Le Ligeour <yo...@us...> Date: Tue Sep 21 00:41:56 2010 +0200 Started French translation update --- lang/fr.po | 709 +++++++++++++++++++++++++++++++++++------------------------- 1 files changed, 418 insertions(+), 291 deletions(-) |
|
From: Fredrik K. <sci...@us...> - 2010-09-20 20:36:35
|
Module: performous Branch: master Commit: 477a2663e090bd7b858013b4ccda5b31de6680e6 Author: Fredrik Klasson <sci...@gm...> Date: Mon Sep 20 22:35:52 2010 +0200 [ ] Basically finishing the swedish trans. 98% done (only 2 strings not translated) --- lang/sv.po | 199 ++++++++++++++++++++++++++++++++---------------------------- 1 files changed, 107 insertions(+), 92 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2010-09-19 14:47:38
|
Module: performous
Branch: ssxml
Commit: 2b9ffe4f05a7fad479e2a77e6472e8d10fe518a8
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Sep 19 17:47:12 2010 +0300
Fix mixup with music/vocals filenames.
---
tools/ss_extract.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/ss_extract.cpp b/tools/ss_extract.cpp
index 6fb5ae7..dd5162b 100644
--- a/tools/ss_extract.cpp
+++ b/tools/ss_extract.cpp
@@ -188,7 +188,7 @@ struct Process {
std::cerr << cmd << std::endl;
if (std::system(cmd.c_str()) == 0) { // FIXME: std::system return value is not portable
fs::remove(song.vocals);
- song.music = path / ("vocals.ogg");
+ song.vocals = path / ("vocals.ogg");
}
}
}
|
|
From: Tapio V. <aa...@us...> - 2010-09-19 11:12:09
|
Module: performous Branch: master Commit: b9911fefd2d7c7e9be212ede37bf4d277326eb08 Author: Tapio Vierros <tap...@gm...> Date: Sun Sep 19 14:11:25 2010 +0300 Add a match string to XBox360 drumkit. --- data/controllers.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/data/controllers.xml b/data/controllers.xml index e5e54d8..2ab5258 100644 --- a/data/controllers.xml +++ b/data/controllers.xml @@ -137,7 +137,7 @@ </controller> <controller type="drumkit" name="DRUMS_ROCKBAND_XBOX360"> <description>RockBand XBox drum kit</description> - <regexp match="Harmonix Drum [Kk]it for Xbox" /> + <regexp match="Harmonix Drum [Kk]it for Xbox|Harmonix Rock Band Drumkit" /> <mapping> <button id="0" value="green" /> <button id="1" value="red" /> |
|
From: Lasse Kärkkäi. <tr...@us...> - 2010-09-19 10:49:52
|
Module: performous Branch: ssxml Commit: 6d971bd257f6f8161a2812862042bc9d6b9910dc Author: Lasse Karkkainen <tro...@tr...> Date: Sun Sep 19 08:49:44 2010 +0300 Massive ss_extract cleanup. --- tools/ss_extract.cpp | 172 +++++++++++++++++-------------------------------- tools/ss_helpers.hh | 68 ++++++++++++++++---- 2 files changed, 115 insertions(+), 125 deletions(-) |
|
From: Philipp F. <pr...@us...> - 2010-09-19 10:47:28
|
Module: performous Branch: master Commit: 5f3be64b28a46640f17ef885eba9d1c18bea2a9e Author: Philipp Funk <phi...@wh...> Date: Sun Sep 19 12:42:39 2010 +0200 Updated German translation --- lang/de.po | 223 ++++++++++++++++++++++++++++++------------------------------ 1 files changed, 112 insertions(+), 111 deletions(-) |
|
From: Fredrik K. <sci...@us...> - 2010-09-18 11:14:48
|
Module: performous Branch: master Commit: 5a59f2b26d5e01a240b03b96d2d9837e878456b4 Author: Fredrik Klasson <sci...@gm...> Date: Sat Sep 18 13:14:00 2010 +0200 [ ] Small updates to the swedish translations. --- lang/sv.po | 32 +++++++++++++++++++------------- 1 files changed, 19 insertions(+), 13 deletions(-) diff --git a/lang/sv.po b/lang/sv.po index 1b80e0e..3c4689f 100644 --- a/lang/sv.po +++ b/lang/sv.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: Performous\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-09-17 16:03+0100\n" -"PO-Revision-Date: 2010-09-17 16:58+0100\n" +"PO-Revision-Date: 2010-09-18 13:13+0100\n" "Last-Translator: Fredrik Klasson <sci...@gm...>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -61,7 +61,7 @@ msgid "" "Please configure some before playing." msgstr "" "\n" -"Vänligen konfigurera något för spel." +"Var god och konfigurera något innan du spelar." # add "ESC returns" to it? #: ../game/screen_intro.cc:115 @@ -151,11 +151,11 @@ msgstr "Laddar tema..." #: ../game/screen_sing.cc:39 msgid "Loading song..." -msgstr "Laddar låt/sång..." +msgstr "Laddar låt..." #: ../game/screen_sing.cc:45 msgid "Song is broken!" -msgstr "Låten/Sången år trasig!" +msgstr "Låten år trasig!" #: ../game/screen_sing.cc:50 msgid "Loading background..." @@ -198,11 +198,14 @@ msgstr "Tillbaks till uppträdande" msgid "Restart" msgstr "Börja om" +# start <-> restart? #: ../game/screen_sing.cc:120 msgid "" "Start the song\n" "from the beginning" msgstr "" +"Börja låten\n" +"från början" # låt/sång #: ../game/screen_sing.cc:121 @@ -215,12 +218,13 @@ msgstr "Slutför..." #: ../game/screen_sing.cc:130 msgid "Song contains broken tracks!" -msgstr "Låten/Sången innehåller trasiga spår!" +msgstr "Låten innehåller trasiga spår!" -# ... +# skippa/hoppa över +# ... instrumentalt mellanspel ... #: ../game/screen_sing.cc:459 msgid " ENTER to skip instrumental break" -msgstr " tryck ENTER för att skippa/hoppa över instrumentaliskt mellanspel" +msgstr " tryck ENTER för att skippa instrumentalt mellanspel" # gradering eller betygsättning? #: ../game/screen_sing.cc:460 @@ -278,9 +282,10 @@ msgstr "Virtuos" msgid "Rocker" msgstr "Rockare" +# items -> players? #: ../game/database.cc:107 msgid "No Items up to now." -msgstr "" +msgstr "Inga spelare ännu." #: ../game/database.cc:108 msgid "Be the first to be listed here!" @@ -292,7 +297,7 @@ msgstr "slumpmässig ordning" #: ../game/songs.cc:200 msgid "sorted by song" -msgstr "sorterat efter låt/sång" +msgstr "sorterat efter låt" #: ../game/songs.cc:201 msgid "sorted by artist" @@ -460,20 +465,21 @@ msgstr "Sök text:" #: ../game/screen_songs.cc:196 msgid "No songs found!" -msgstr "Inga låtar/sånger funna" +msgstr "Inga låtar funna" # gratis eller fria? +# (tysk översättning ger freie) #: ../game/screen_songs.cc:197 msgid "" "Visit performous.org\n" "for free songs" msgstr "" "Besök performous,org\n" -"för gratis/fria låtar/sånger" +"för fria låtar" #: ../game/screen_songs.cc:199 msgid "no songs match search" -msgstr "inga låtar/sånger matchar sökningen" +msgstr "inga låtar matchar sökningen" # ... #: ../game/screen_songs.cc:207 @@ -655,7 +661,7 @@ msgstr "Webkamera bakgrund" #: /tmp/.private/frekla/xml2gettext.p052kkZhHw.c:35 msgid "Performous can try to use webcam as a background video. You can disable it if it annoys you." -msgstr "" +msgstr "Performous kan försöka använda web-kameran som bakgrundsvideo. Du kan stänga av detta om det stör dig." #: /tmp/.private/frekla/xml2gettext.p052kkZhHw.c:36 msgid "Webcam id" |
|
From: Fredrik K. <sci...@us...> - 2010-09-17 14:59:24
|
Module: performous Branch: master Commit: 89028ade1d573ed7cc1c26316cfa38bb237b0795 Author: Fredrik Klasson <sci...@gm...> Date: Fri Sep 17 16:58:39 2010 +0200 [ ] Updating swedish translations. --- lang/sv.po | 440 +++++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 286 insertions(+), 154 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-09-17 13:05:24
|
Module: performous
Branch: master
Commit: b2365e0ed66f1b38d7a924522f18b789f1e88fb7
Author: Tapio Vierros <tap...@gm...>
Date: Fri Sep 17 16:03:25 2010 +0300
Fix a bug preventing XB360 RB guitar tilt & whammy from working.
---
game/joystick.cc | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 494e700..d93df3e 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -736,9 +736,9 @@ bool input::SDL::pushEvent(SDL_Event _e) {
if(!devices.find(joy_id)->second.assigned()) return false;
if (_e.jaxis.axis == 5 || _e.jaxis.axis == 6 || _e.jaxis.axis == 1) {
event.type = input::Event::PICK;
- } else if (_e.jaxis.axis == 2 || (devices.find(joy_id)->second.name() == "GUITAR_ROCKBAND_XB360" && _e.jaxis.axis == 4)) {
+ } else if (_e.jaxis.axis == 2 || (devices.find(joy_id)->second.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 4)) {
// nothing to do here
- } else if (devices.find(joy_id)->second.name() == "DRUMS_ROCKBAND_XB360" && _e.jaxis.axis == 3) { // <= WTF HERE !!!
+ } else if (devices.find(joy_id)->second.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 3) { // <= WTF HERE !!!
// nothing to do here
} else {
return false;
@@ -747,7 +747,7 @@ bool input::SDL::pushEvent(SDL_Event _e) {
event.pressed[i] = devices.find(joy_id)->second.pressed(i);
}
// XBox RB guitar's Tilt sensor
- if (devices.find(joy_id)->second.name() == "DRUMS_ROCKBAND_XB360" && _e.jaxis.axis == 3) {
+ if (devices.find(joy_id)->second.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 3) {
event.button = input::GODMODE_BUTTON;
if (_e.jaxis.value < -2) {
event.type = input::Event::PRESS;
@@ -758,7 +758,7 @@ bool input::SDL::pushEvent(SDL_Event _e) {
}
devices.find(joy_id)->second.addEvent(event);
break;
- } else if (_e.jaxis.axis == 2 || (devices.find(joy_id)->second.name() == "GUITAR_ROCKBAND_XB360" && _e.jaxis.axis == 4)) {
+ } else if (_e.jaxis.axis == 2 || (devices.find(joy_id)->second.name() == "GUITAR_ROCKBAND_XBOX360" && _e.jaxis.axis == 4)) {
event.button = input::WHAMMY_BUTTON;
if (_e.jaxis.value > 0) {
event.type = input::Event::PRESS;
|
|
From: Tapio V. <aa...@us...> - 2010-09-17 11:05:21
|
Module: performous Branch: master Commit: 01e877d755661803d2e09f8b69906e6a984f4522 Author: Tapio Vierros <tap...@gm...> Date: Fri Sep 17 14:04:39 2010 +0300 Update, refactor & improve the translation guide. --- lang/README | 64 ++++++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 44 insertions(+), 20 deletions(-) diff --git a/lang/README b/lang/README index 7916afc..205ac9c 100644 --- a/lang/README +++ b/lang/README @@ -1,27 +1,27 @@ -To add new languages: +Translation guide +================= -Download POEdit (http://www.poedit.net/) +We recommend using POEdit (http://www.poedit.net/) +For Windows, download it from the website. +Most Linux distros have it in their repositories. -Creating the catalog --------------------- - 1. Start POEdit - 2. Click File -> New Catalog - 3. Enter a project name (performous) - 4. Click the Paths tab at the top - 5. Click the New Item icon (second one, looks like a little square) - 6. Enter the path to the directory containing your plug-in file ("." tells POEdit to scan the directory that you will save the file to, usually only need to include ../game and ../data), press enter - 7. Click the Keywords tab at the top - 8. Click the New Item icon - 9. Enter _ (that's underscore), press enter - 12. Click Okay - 13. Choose a name for your .po file (performous) +NOTE: Don't generate the binary .mo files - they are + compiled (and installed) with Performous build -REMEMBER TO SAVE WITH YOU LOCALE NAME +Updating existing translations +------------------------------ + 1. Open the .po file in POEdit. + 2. Hit the Synchronize to source button in the toolbar. + 3. Start translating. + 4. Remember to save. -Example for English: -en.po +NOTES: + * Setup your name and email in POEdit preferences if you haven't used it before + * Also setup the Performous XML parser as instructed below + * POEdit C/C++ parser might not recognize .hh extension by default, so add that: + Edit -> Preferences -> Parsers -> C/C++ -> Edit -> List of extensions -Configuring the performous XML parser +Configuring the Performous XML parser ------------------------------------- These steps enable translation of the XML locate bits. 1. Click Edit -> Preferences @@ -36,6 +36,30 @@ These steps enable translation of the XML locate bits. Where $SOURCE_ROOT is the path to the performous sources root. 4. Click Okay +Creating a new catalog +---------------------- +These are the steps to create a new catalog, but easiest +is probably just copy one of the existing ones and start +from there (in which case you can skip these steps.) + + 1. Start POEdit + 2. Click File -> New Catalog + 3. Enter a project name (performous) + 4. Click the Paths tab at the top + 5. Click the New Item icon (second one, looks like a little square) + 6. Enter the path to the directory containing your plug-in file ("." tells POEdit to scan the directory that you will save the file to, usually only need to include ../game and ../data), press enter + 7. Click the Keywords tab at the top + 8. Click the New Item icon + 9. Enter _ (that's underscore), press enter + 12. Click Okay + 13. Choose a name for your .po file (performous) + 14. Follow the instructions above to enable XML translation + +REMEMBER TO SAVE WITH YOU LOCALE NAME + +Example for English: +en.po + Acknowledgements --------------- +---------------- Thanks to guide at http://codex.wordpress.org/User:Skippy/Creating_POT_Files |
|
From: Lasse Kärkkäi. <tr...@us...> - 2010-09-16 12:27:44
|
Module: performous
Branch: menuvideo
Commit: bdf30de234139d847d4584d6687ef6706a236468
Author: Lasse Karkkainen <tro...@tr...>
Date: Thu Sep 16 15:26:05 2010 +0300
Menu background video file and looping playback code. Removed original menu background.
---
game/screen_intro.cc | 3 +++
game/screen_intro.hh | 2 ++
game/video.cc | 11 ++++++++++-
game/video.hh | 5 ++++-
themes/CMakeLists.txt | 2 +-
themes/default/intro_bg.svg | 22 ++++------------------
themes/default/menu.mkv | Bin 0 -> 4850720 bytes
7 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index b327a75..f05f82e 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -16,6 +16,7 @@ void ScreenIntro::enter() {
m_selAnim = AnimValue(0.0, 10.0);
m_submenuAnim = AnimValue(0.0, 3.0);
theme.reset(new ThemeIntro());
+ m_video.reset(new Video(getThemePath("menu.mkv")));
populateMenu();
if( m_first ) {
std::string msg;
@@ -27,6 +28,7 @@ void ScreenIntro::enter() {
void ScreenIntro::exit() {
m_menu.clear();
+ m_video.reset();
theme.reset();
}
@@ -99,6 +101,7 @@ void ScreenIntro::draw_menu_options() {
}
void ScreenIntro::draw() {
+ m_video->renderLoop();
theme->bg.draw();
if (m_menu.current().image) m_menu.current().image->draw();
// Comment
diff --git a/game/screen_intro.hh b/game/screen_intro.hh
index 917e602..ad2e48c 100644
--- a/game/screen_intro.hh
+++ b/game/screen_intro.hh
@@ -3,6 +3,7 @@
#include <boost/scoped_ptr.hpp>
#include "screen.hh"
#include "menu.hh"
+#include "video.hh"
#include "animvalue.hh"
class Audio;
@@ -27,6 +28,7 @@ class ScreenIntro : public Screen {
Audio& m_audio;
boost::scoped_ptr<ThemeIntro> theme;
+ boost::scoped_ptr<Video> m_video;
Menu m_menu;
bool m_first;
AnimValue m_selAnim;
diff --git a/game/video.cc b/game/video.cc
index 64dbc2c..6e5af03 100644
--- a/game/video.cc
+++ b/game/video.cc
@@ -4,7 +4,16 @@
#include <cmath>
-Video::Video(std::string const& _videoFile, double videoGap): m_mpeg(true, false, _videoFile), m_videoGap(videoGap), m_surfaceTime(), m_lastTime(), m_alpha(-0.5, 1.5) {}
+Video::Video(std::string const& _videoFile, double videoGap):
+ m_mpeg(true, false, _videoFile), m_videoGap(videoGap), m_surfaceTime(), m_lastTime(), m_alpha(-0.5, 1.5)
+{
+ m_loopTimer.setTarget(getInf());
+}
+
+void Video::renderLoop() {
+ if (m_videoFrame.data.empty()) m_loopTimer.setValue(1.0);
+ render(m_loopTimer.get());
+}
void Video::render(double time) {
time += m_videoGap;
diff --git a/game/video.hh b/game/video.hh
index c1ed3ea..dbff46b 100644
--- a/game/video.hh
+++ b/game/video.hh
@@ -10,8 +10,10 @@ class Video {
public:
/// opens given video file
Video(std::string const& videoFile, double videoGap = 0.0);
- /// renders video
+ /// Draw a video frame (at time)
void render(double time);
+ /// Render video using an internal clock and loop once the end is reached
+ void renderLoop();
/// returns Dimensions of video clip
Dimensions& dimensions() { return m_surface.dimensions; }
/// returns Dimensions of video clip
@@ -25,5 +27,6 @@ class Video {
double m_surfaceTime;
double m_lastTime;
AnimValue m_alpha;
+ AnimValue m_loopTimer;
};
diff --git a/themes/CMakeLists.txt b/themes/CMakeLists.txt
index 5636f21..8718e4d 100644
--- a/themes/CMakeLists.txt
+++ b/themes/CMakeLists.txt
@@ -1,4 +1,4 @@
-FILE(GLOB THEME_FILES "default/*.ogg" "default/*.svg" "default/*.png" "default/*.bmp" "default/*.obj")
+FILE(GLOB THEME_FILES "default/*.ogg" "default/*.svg" "default/*.png" "default/*.bmp" "default/*.mkv" "default/*.obj")
install( FILES ${THEME_FILES} DESTINATION ${SHARE_INSTALL}/themes/default/)
diff --git a/themes/default/intro_bg.svg b/themes/default/intro_bg.svg
index c80a9b5..3e506f2 100644
--- a/themes/default/intro_bg.svg
+++ b/themes/default/intro_bg.svg
@@ -17,7 +17,7 @@
height="800"
id="svg559"
sodipodi:version="0.32"
- inkscape:version="0.47pre4 r22446"
+ inkscape:version="0.47 r22583"
sodipodi:docname="intro_bg.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<metadata
@@ -33,8 +33,8 @@
</rdf:RDF>
</metadata>
<sodipodi:namedview
- inkscape:window-height="726"
- inkscape:window-width="1280"
+ inkscape:window-height="992"
+ inkscape:window-width="1920"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
guidetolerance="10.0"
@@ -48,7 +48,7 @@
inkscape:cx="619.55102"
inkscape:cy="354.60886"
inkscape:window-x="0"
- inkscape:window-y="25"
+ inkscape:window-y="29"
inkscape:current-layer="svg559"
showgrid="false"
showguides="true"
@@ -565,20 +565,6 @@
id="stop3633-4-5" />
</linearGradient>
</defs>
- <rect
- style="fill:#ffffff;fill-opacity:1;stroke:none"
- id="rect2855-6"
- width="1000"
- height="800"
- x="0"
- y="0" />
- <rect
- style="fill:url(#radialGradient3750);fill-opacity:1;stroke:none"
- id="rect2855"
- width="1000"
- height="800"
- x="0"
- y="0" />
<text
xml:space="preserve"
style="font-size:24.89476013px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
diff --git a/themes/default/menu.mkv b/themes/default/menu.mkv
new file mode 100644
index 0000000..317ca75
Binary files /dev/null and b/themes/default/menu.mkv differ
|
|
From: Tapio V. <aa...@us...> - 2010-09-16 12:13:02
|
Module: performous
Branch: master
Commit: 647e50208f75916fcc6c9260cbd3ff9a988be573
Author: Tapio Vierros <tap...@gm...>
Date: Thu Sep 16 15:12:22 2010 +0300
Tweak main menu.
---
game/screen_intro.cc | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index b327a75..d4f46ae 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -68,13 +68,13 @@ void ScreenIntro::draw_menu_options() {
double submenuanim = 1.0 - std::min(1.0, std::abs(m_submenuAnim.get()-m_menu.getSubmenuLevel()));
theme->back_h.dimensions.stretch(m_menu.dimensions.w(), theme->back_h.dimensions.h());
// Determine from which item to start
- int start_i = std::min((int)m_menu.curIndex(), (int)opts.size() - (int)showopts
+ int start_i = std::min((int)m_menu.curIndex() - 1, (int)opts.size() - (int)showopts
+ (m_menu.getSubmenuLevel() == 2 ? 1 : 0)); // Hack to counter side-effects from displaying the value inside the menu
if (start_i < 0 || opts.size() == showopts) start_i = 0;
for (size_t i = start_i, ii = 0; ii < showopts && i < opts.size(); ++i, ++ii) {
MenuOption const& opt = opts[i];
if (i == m_menu.curIndex()) { // Selection
- // Animate highlight moving
+ // Animate selection higlight moving
double selanim = m_selAnim.get() - start_i;
if (selanim < 0) selanim = 0;
theme->back_h.dimensions.left(x - sel_margin).center(start_y+0.003 + selanim*0.08);
@@ -86,8 +86,8 @@ void ScreenIntro::draw_menu_options() {
// If this is a config item, show the value below
if (opt.type == MenuOption::CHANGE_VALUE) {
++ii; // Use a slot for the value
- theme->option_selected.dimensions.left(x + sel_margin).center(-0.1 + ii*0.08);
- theme->option_selected.draw(opt.value->getValue(), submenuanim);
+ theme->option_selected.dimensions.left(x + sel_margin).center(-0.1 + (selanim+1)*0.08);
+ theme->option_selected.draw("< " + opt.value->getValue() + " >", submenuanim);
}
} else { // Regular option (not selected)
theme->option.dimensions.left(x).center(start_y + ii*0.08);
|
|
From: Tapio V. <aa...@us...> - 2010-09-16 11:19:19
|
Module: performous
Branch: master
Commit: 5e0dc2a36b157d1a7e5ca7111674ba1a933b985d
Author: Tapio Vierros <tap...@gm...>
Date: Thu Sep 16 14:18:37 2010 +0300
Loading bar for loading.
---
game/glutil.hh | 4 ++--
game/screenmanager.cc | 9 +++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/game/glutil.hh b/game/glutil.hh
index c30c6ee..4c2551b 100644
--- a/game/glutil.hh
+++ b/game/glutil.hh
@@ -84,8 +84,8 @@ namespace glutil {
/// easy square
struct Square {
- Square(float cx, float cy, float r) {
- Begin line(GL_LINE_LOOP);
+ Square(float cx, float cy, float r, bool filled = false) {
+ Begin line(filled ? GL_QUADS : GL_LINE_LOOP);
glVertex2f(cx-r,cy+r);
glVertex2f(cx-r,cy-r);
glVertex2f(cx+r,cy-r);
diff --git a/game/screenmanager.cc b/game/screenmanager.cc
index 27e4b77..f7bcb51 100644
--- a/game/screenmanager.cc
+++ b/game/screenmanager.cc
@@ -1,6 +1,7 @@
#include "screen.hh"
#include "fs.hh"
#include "configuration.hh"
+#include "glutil.hh"
#include <boost/thread.hpp>
#include <boost/lexical_cast.hpp>
@@ -44,6 +45,14 @@ void ScreenManager::loading(std::string const& message, float progress) {
flashMessage(message + " " + boost::lexical_cast<std::string>(progress*100) + "%", 0.0f, 1.0f, 1.0f);
m_window.blank();
drawNotifications();
+ const int maxi = 20;
+ const float x = 0.3;
+ const float spacing = 0.01;
+ const float sq_size = (2*x - (maxi-1)*spacing) / maxi;
+ for (int i = 0; i <= progress * maxi; ++i) {
+ glColor4f(0.2f, 0.7f, 0.7f, (progress + 1)*0.5f);
+ glutil::Square(-x + i * (sq_size + spacing), 0, sq_size/2, true);
+ }
m_window.swap();
}
|
|
From: Tapio V. <aa...@us...> - 2010-09-16 11:02:25
|
Module: performous
Branch: master
Commit: fde45fa1e9f65e854b0d588254c3aba86b94575d
Author: Tapio Vierros <tap...@gm...>
Date: Thu Sep 16 14:01:24 2010 +0300
Simple fade-in effect for submenu changing in screen_intro.
---
game/screen_intro.cc | 10 +++++++---
game/screen_intro.hh | 1 +
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index 23755f2..b327a75 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -14,6 +14,7 @@ ScreenIntro::ScreenIntro(std::string const& name, Audio& audio): Screen(name), m
void ScreenIntro::enter() {
m_audio.playMusic(getThemePath("menu.ogg"), true);
m_selAnim = AnimValue(0.0, 10.0);
+ m_submenuAnim = AnimValue(0.0, 3.0);
theme.reset(new ThemeIntro());
populateMenu();
if( m_first ) {
@@ -52,7 +53,9 @@ void ScreenIntro::manageEvent(SDL_Event event) {
m_menu.current().value->reset(modifier & KMOD_ALT);
else if (key == SDLK_s && modifier & KMOD_CTRL) writeConfig(modifier & KMOD_ALT);
}
+ // Animation targets
m_selAnim.setTarget(m_menu.curIndex());
+ m_submenuAnim.setTarget(m_menu.getSubmenuLevel());
}
void ScreenIntro::draw_menu_options() {
@@ -62,6 +65,7 @@ void ScreenIntro::draw_menu_options() {
const float start_y = -0.1;
const float sel_margin = 0.05;
const MenuOptions opts = m_menu.getOptions();
+ double submenuanim = 1.0 - std::min(1.0, std::abs(m_submenuAnim.get()-m_menu.getSubmenuLevel()));
theme->back_h.dimensions.stretch(m_menu.dimensions.w(), theme->back_h.dimensions.h());
// Determine from which item to start
int start_i = std::min((int)m_menu.curIndex(), (int)opts.size() - (int)showopts
@@ -77,17 +81,17 @@ void ScreenIntro::draw_menu_options() {
theme->back_h.draw();
// Draw the text, dim if option not available
theme->option_selected.dimensions.left(x).center(start_y + ii*0.08);
- theme->option_selected.draw(opt.getName(), opt.isActive() ? 1.0f : 0.5f);
+ theme->option_selected.draw(opt.getName(), submenuanim * (opt.isActive() ? 1.0f : 0.5f));
wcounter = std::max(wcounter, theme->option_selected.w() + 2 * sel_margin); // Calculate the widest entry
// If this is a config item, show the value below
if (opt.type == MenuOption::CHANGE_VALUE) {
++ii; // Use a slot for the value
theme->option_selected.dimensions.left(x + sel_margin).center(-0.1 + ii*0.08);
- theme->option_selected.draw(opt.value->getValue());
+ theme->option_selected.draw(opt.value->getValue(), submenuanim);
}
} else { // Regular option (not selected)
theme->option.dimensions.left(x).center(start_y + ii*0.08);
- theme->option.draw(opt.getName(), opt.isActive() ? 1.0f : 0.5f);
+ theme->option.draw(opt.getName(), submenuanim * (opt.isActive() ? 1.0f : 0.5f));
wcounter = std::max(wcounter, theme->option.w() + 2 * sel_margin); // Calculate the widest entry
}
}
diff --git a/game/screen_intro.hh b/game/screen_intro.hh
index db66fe6..917e602 100644
--- a/game/screen_intro.hh
+++ b/game/screen_intro.hh
@@ -30,4 +30,5 @@ class ScreenIntro : public Screen {
Menu m_menu;
bool m_first;
AnimValue m_selAnim;
+ AnimValue m_submenuAnim;
};
|
|
From: Tapio V. <aa...@us...> - 2010-09-16 10:31:30
|
Module: performous
Branch: master
Commit: 553e453d3afddb7f8e28f1b84c8ce6ed93a592af
Author: Tapio Vierros <tap...@gm...>
Date: Thu Sep 16 13:30:43 2010 +0300
Some animation to main menu selection moving.
---
game/screen_intro.cc | 8 +++++++-
game/screen_intro.hh | 2 ++
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index 5941660..23755f2 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -13,6 +13,7 @@ ScreenIntro::ScreenIntro(std::string const& name, Audio& audio): Screen(name), m
void ScreenIntro::enter() {
m_audio.playMusic(getThemePath("menu.ogg"), true);
+ m_selAnim = AnimValue(0.0, 10.0);
theme.reset(new ThemeIntro());
populateMenu();
if( m_first ) {
@@ -51,6 +52,7 @@ void ScreenIntro::manageEvent(SDL_Event event) {
m_menu.current().value->reset(modifier & KMOD_ALT);
else if (key == SDLK_s && modifier & KMOD_CTRL) writeConfig(modifier & KMOD_ALT);
}
+ m_selAnim.setTarget(m_menu.curIndex());
}
void ScreenIntro::draw_menu_options() {
@@ -68,8 +70,12 @@ void ScreenIntro::draw_menu_options() {
for (size_t i = start_i, ii = 0; ii < showopts && i < opts.size(); ++i, ++ii) {
MenuOption const& opt = opts[i];
if (i == m_menu.curIndex()) { // Selection
- theme->back_h.dimensions.left(x - sel_margin).center(start_y+0.003 + ii*0.08);
+ // Animate highlight moving
+ double selanim = m_selAnim.get() - start_i;
+ if (selanim < 0) selanim = 0;
+ theme->back_h.dimensions.left(x - sel_margin).center(start_y+0.003 + selanim*0.08);
theme->back_h.draw();
+ // Draw the text, dim if option not available
theme->option_selected.dimensions.left(x).center(start_y + ii*0.08);
theme->option_selected.draw(opt.getName(), opt.isActive() ? 1.0f : 0.5f);
wcounter = std::max(wcounter, theme->option_selected.w() + 2 * sel_margin); // Calculate the widest entry
diff --git a/game/screen_intro.hh b/game/screen_intro.hh
index ffc8e87..db66fe6 100644
--- a/game/screen_intro.hh
+++ b/game/screen_intro.hh
@@ -3,6 +3,7 @@
#include <boost/scoped_ptr.hpp>
#include "screen.hh"
#include "menu.hh"
+#include "animvalue.hh"
class Audio;
class ThemeIntro;
@@ -28,4 +29,5 @@ class ScreenIntro : public Screen {
boost::scoped_ptr<ThemeIntro> theme;
Menu m_menu;
bool m_first;
+ AnimValue m_selAnim;
};
|
|
From: Tapio V. <aa...@us...> - 2010-09-16 10:12:48
|
Module: performous
Branch: master
Commit: 7b06c9e65743069503928505496771a4ff940a42
Author: Tapio Vierros <tap...@gm...>
Date: Thu Sep 16 13:07:01 2010 +0300
Print audio devices to console only when in verbose or --audiohelp.
---
game/libda/portaudio.hpp | 20 ++++++++------------
game/main.cc | 8 ++++++++
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/game/libda/portaudio.hpp b/game/libda/portaudio.hpp
index 16c7b83..a298173 100644
--- a/game/libda/portaudio.hpp
+++ b/game/libda/portaudio.hpp
@@ -55,24 +55,20 @@ namespace portaudio {
else devices.push_back(DeviceInfo(info->name, info->maxInputChannels, info->maxOutputChannels));
}
}
- /// Print the devices
- void dump() {
- std::cout << "PortAudio devices:" << std::endl;
+ /// Get a printable dump of the devices
+ std::string dump() {
+ std::ostringstream oss;
+ oss << "PortAudio devices:" << std::endl;
for (unsigned i = 0; i < devices.size(); ++i)
- std::cout << " " << i << " " << devices[i].name << " (" << devices[i].in << " in, " << devices[i].out << " out)" << std::endl;
- std::cout << std::endl;
+ oss << " " << i << " " << devices[i].name << " (" << devices[i].in << " in, " << devices[i].out << " out)" << std::endl;
+ oss << std::endl;
+ return oss.str();
}
DeviceInfos devices;
};
struct Init {
- Init()
- {
- PORTAUDIO_CHECKED(Pa_Initialize, ());
- // Print the devices
- AudioDevices ads;
- ads.dump();
- }
+ Init() { PORTAUDIO_CHECKED(Pa_Initialize, ()); }
~Init() { std::cout << "Pa_Terminate..."; std::cout.flush(); Pa_Terminate(); std::cout << "ok" << std::endl; }
};
diff --git a/game/main.cc b/game/main.cc
index 62bd620..9ac9117 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -115,6 +115,10 @@ void mainLoop(std::string const& songlist) {
ScreenManager sm(window);
sm.loading(_("Audio..."), 0.1);
Audio audio;
+ { // Print the devices
+ portaudio::AudioDevices ads;
+ std::clog << "audio/info:\n" << ads.dump();
+ }
try {
sm.loading(_("Launching background loaders..."), 0.4);
Backgrounds backgrounds;
@@ -334,6 +338,10 @@ int main(int argc, char** argv) try {
}
if (vm.count("audiohelp")) {
Audio audio;
+ // Print the devices
+ portaudio::AudioDevices ads;
+ std::cout << ads.dump();
+ // Some examples
std::cout << "Example --audio parameters" << std::endl;
std::cout << " --audio \"out=2\" # Pick first working two-channel playback device" << std::endl;
std::cout << " --audio \"dev=1 out=2\" # Pick device id 1 and assign stereo playback" << std::endl;
|
|
From: Tapio V. <aa...@us...> - 2010-09-16 10:12:48
|
Module: performous
Branch: master
Commit: 2d0fa43d73528f2d27b3c224079df238dc737255
Author: Tapio Vierros <tap...@gm...>
Date: Thu Sep 16 13:11:12 2010 +0300
AntiAudioHang Technology (tm) to --audiohelp too.
---
game/main.cc | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index 9ac9117..c5879a4 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -347,6 +347,10 @@ int main(int argc, char** argv) try {
std::cout << " --audio \"dev=1 out=2\" # Pick device id 1 and assign stereo playback" << std::endl;
std::cout << " --audio 'dev=\"HDA Intel\" mics=blue,red' # HDA Intel with two mics" << std::endl;
std::cout << " --audio 'dev=pulse out=2 mics=blue' # PulseAudio with input and output" << std::endl;
+ // Give audio a little time to shutdown but then just quit
+ boost::thread audiokiller(boost::bind(&Audio::close, boost::ref(audio)));
+ if (!audiokiller.timed_join(boost::posix_time::milliseconds(2000)))
+ std::cout << "Audio hung." << std::endl;
return EXIT_SUCCESS;
}
// Override XML config for options that were specified from commandline or performous.conf
|
|
From: Tapio V. <aa...@us...> - 2010-09-16 09:52:04
|
Module: performous
Branch: master
Commit: a66d2d477432b8888ec6819f0a5990979d11d7ef
Author: Tapio Vierros <tap...@gm...>
Date: Thu Sep 16 12:51:11 2010 +0300
Notify user about audio hang in audio devices screen.
---
game/main.cc | 3 +++
game/screen.hh | 2 ++
game/screen_audiodevices.cc | 8 ++------
game/screenmanager.cc | 12 ++++++++++++
4 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index 9266422..62bd620 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -193,6 +193,9 @@ void mainLoop(std::string const& songlist) {
}
}
} catch (std::exception& e) {
+ // This should use ScreenManager fatalError, but it cannot
+ // yet split the message to multiple lines automatically, so
+ // better use flashMessage, which zooms to fit.
std::cerr << "FATAL ERROR: " << e.what() << std::endl;
sm.flashMessage(std::string("FATAL ERROR: ") + e.what(), 0.0f); // No fade-in to get it to show
window.blank();
diff --git a/game/screen.hh b/game/screen.hh
index a5e5371..91b663c 100644
--- a/game/screen.hh
+++ b/game/screen.hh
@@ -55,6 +55,8 @@ class ScreenManager: public Singleton <ScreenManager> {
/// Draw a loading progress indication
void loading(std::string const& message, float progress);
+ /// Draw an error notification and quit
+ void fatalError(std::string const& message);
/// Set a message to flash in current screen
void flashMessage(std::string const& message, float fadeIn=0.5f, float hold=1.5f, float fadeOut=1.0f);
/// Create a new dialog message
diff --git a/game/screen_audiodevices.cc b/game/screen_audiodevices.cc
index 4e22204..1ac0e71 100644
--- a/game/screen_audiodevices.cc
+++ b/game/screen_audiodevices.cc
@@ -5,7 +5,6 @@
#include "theme.hh"
#include "audio.hh"
#include "i18n.hh"
-#include <cstdlib>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
@@ -179,11 +178,8 @@ bool ScreenAudioDevices::save(bool skip_ui_config) {
size_t unassigned_id = m_devs.size();
// Give audio a little time to shutdown but then just quit
boost::thread audiokiller(boost::bind(&Audio::close, boost::ref(m_audio)));
- if (!audiokiller.timed_join(boost::posix_time::milliseconds(4000))) {
- // FIXME: Notify user
- std::cout << "Audio hung. Please restart Performous" << std::endl;
- std::exit(EXIT_FAILURE);
- }
+ if (!audiokiller.timed_join(boost::posix_time::milliseconds(4000)))
+ ScreenManager::getSingletonPtr()->fatalError("Audio hung for some reason.\nPlease restart Performous.");
m_audio.restart(); // Reload audio to take the new settings into use
m_audio.playMusic(getThemePath("menu.ogg"), true); // Start music again
// Check that all went well
diff --git a/game/screenmanager.cc b/game/screenmanager.cc
index 82b7c4d..27e4b77 100644
--- a/game/screenmanager.cc
+++ b/game/screenmanager.cc
@@ -2,8 +2,10 @@
#include "fs.hh"
#include "configuration.hh"
+#include <boost/thread.hpp>
#include <boost/lexical_cast.hpp>
#include <stdexcept>
+#include <cstdlib>
template<> ScreenManager* Singleton<ScreenManager>::ms_Singleton = NULL;
@@ -45,6 +47,16 @@ void ScreenManager::loading(std::string const& message, float progress) {
m_window.swap();
}
+void ScreenManager::fatalError(std::string const& message) {
+ std::cerr << "FATAL ERROR: " << message << std::endl;
+ dialog(message);
+ m_window.blank();
+ drawNotifications();
+ m_window.swap();
+ boost::thread::sleep(now() + 4.0);
+ std::exit(EXIT_FAILURE);
+}
+
void ScreenManager::flashMessage(std::string const& message, float fadeIn, float hold, float fadeOut) {
m_message = message;
m_timeToFadeIn = fadeIn;
|
|
From: Tapio V. <aa...@us...> - 2010-09-16 09:25:50
|
Module: performous Branch: master Commit: 02fca64eb917450f67003681de087709bdef88aa Author: Tapio Vierros <tap...@gm...> Date: Thu Sep 16 12:23:46 2010 +0300 New configuration menus implemented inside main menu as submenus. --- data/schema.xml | 23 ++-- game/fs.cc | 2 +- game/joystick.cc | 2 +- game/main.cc | 4 +- game/menu.cc | 18 ++- game/menu.hh | 6 +- game/screen_configuration.cc | 67 ----------- game/screen_configuration.hh | 25 ---- game/screen_intro.cc | 116 ++++++++++++++----- game/screen_intro.hh | 2 + game/songs.cc | 2 +- game/theme.cc | 14 +-- game/theme.hh | 24 +--- lang/fi.po | 265 ++++++++++++++++++++++-------------------- 14 files changed, 271 insertions(+), 299 deletions(-) |