You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(288) |
Aug
(119) |
Sep
(31) |
Oct
(59) |
Nov
(458) |
Dec
(359) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(268) |
Feb
(26) |
Mar
(36) |
Apr
(48) |
May
(119) |
Jun
(37) |
Jul
(173) |
Aug
(429) |
Sep
(137) |
Oct
(156) |
Nov
(59) |
Dec
(45) |
| 2011 |
Jan
(398) |
Feb
(257) |
Mar
(49) |
Apr
(5) |
May
(34) |
Jun
(11) |
Jul
(38) |
Aug
(12) |
Sep
(1) |
Oct
(49) |
Nov
(5) |
Dec
(10) |
| 2012 |
Jan
(21) |
Feb
(32) |
Mar
(20) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(173) |
Aug
|
Sep
(25) |
Oct
(6) |
Nov
(44) |
Dec
|
|
From: Tapio V. <aa...@us...> - 2010-08-22 00:11:11
|
Module: performous
Branch: master
Commit: c06c68e9551ec1e5136e1888e18fb41d1e1df4c1
Author: Tapio Vierros <tap...@gm...>
Date: Sun Aug 22 03:09:53 2010 +0300
Fix some bugs in joining menu introduced by recent i18n.
---
game/dancegraph.cc | 4 ++--
game/guitargraph.cc | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index f2f8eaf..867c088 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -115,7 +115,7 @@ void DanceGraph::setupJoinMenu() {
// Add tracks to option list
for (DanceTracks::const_iterator it = m_song.danceTracks.begin(); it != m_song.danceTracks.end(); ++it, ++i) {
ol.push_back(it->first);
- if (m_trackOpt == it->first) cur = i; // Find the index of current track
+ if (m_gamingMode == it->first) cur = i; // Find the index of current track
}
m_selectedTrack = ConfigItem(ol); // Create a ConfigItem from the option list
m_selectedTrack.select(cur); // Set the selection to current level
@@ -284,7 +284,7 @@ void DanceGraph::engine() {
else if (ev.nav == input::DOWN) m_menu.move(1);
difficulty_changed = true;
// See if anything changed
- if (m_selectedTrack.so() != getTrack()) setTrack(m_selectedTrack.so());
+ if (m_selectedTrack.so() != m_gamingMode) setTrack(m_selectedTrack.so());
else if (boost::lexical_cast<int>(m_selectedDifficulty.so()) != m_level)
difficulty(DanceDifficulty(boost::lexical_cast<int>(m_selectedDifficulty.so())));
else if (m_rejoin.b()) { unjoin(); setupJoinMenu(); m_input.addEvent(input::Event()); }
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index ece2397..e44638c 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -143,7 +143,7 @@ void GuitarGraph::setupJoinMenu() {
// Add tracks to option list
for (InstrumentTracksConstPtr::const_iterator it = m_instrumentTracks.begin(); it != m_instrumentTracks.end(); ++it, ++i) {
ol.push_back(it->first);
- if (m_trackOpt == it->first) cur = i; // Find the index of current track
+ if (m_track_index->first == it->first) cur = i; // Find the index of current track
}
m_selectedTrack = ConfigItem(ol); // Create a ConfigItem from the option list
m_selectedTrack.select(cur); // Set the selection to current track
@@ -307,7 +307,7 @@ void GuitarGraph::engine() {
else if (ev.type == input::Event::PICK && ev.button == 1) m_menu.action(-1);
else if (ev.nav == input::START) m_menu.action();
// See if anything changed
- if (!m_drums && m_selectedTrack.so() != getTrack()) setTrack(m_selectedTrack.so());
+ if (!m_drums && m_selectedTrack.so() != m_track_index->first) setTrack(m_selectedTrack.so());
else if (boost::lexical_cast<int>(m_selectedDifficulty.so()) != m_level)
difficulty(Difficulty(boost::lexical_cast<int>(m_selectedDifficulty.so())));
else if (m_rejoin.b()) { unjoin(); setupJoinMenu(); m_input.addEvent(input::Event()); }
|
|
From: Tapio V. <aa...@us...> - 2010-08-22 00:11:08
|
Module: performous
Branch: master
Commit: 70560ac6669b6f5a6f90977e0f4386ec0cc8362c
Author: Tapio Vierros <tap...@gm...>
Date: Sun Aug 22 02:57:03 2010 +0300
Use upper case instrument track names, update FI translation.
---
game/guitargraph.cc | 5 +--
game/i18n.hh | 1 +
game/song.hh | 14 ++++++---
lang/fi.po | 74 ++++++++++++++++++++++++++++----------------------
4 files changed, 53 insertions(+), 41 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 7bf6429..ece2397 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -11,7 +11,6 @@
namespace {
#if 0 // Here is some dummy gettext calls to populate the dictionary
- _("guitar") _("bass") _("drums")
_("Kids") _("Easy") _("Medium") _("Hard") _("Expert")
#endif
struct Diff { std::string name; int basepitch; } diffv[] = {
@@ -173,8 +172,8 @@ void GuitarGraph::setupJoinMenu() {
}
void GuitarGraph::updateJoinMenu() {
- m_trackOpt = _(getTrack().c_str());
- m_difficultyOpt = _(getDifficultyString().c_str());
+ m_trackOpt = getTrack();
+ m_difficultyOpt = getDifficultyString();
std::string s("\n (");
std::string le = m_leftymode.b() ? _("ON") : _("OFF");
m_leftyOpt = _("Toggle lefty-mode") + s + le + ")";
diff --git a/game/i18n.hh b/game/i18n.hh
index 5f7272c..e164d21 100644
--- a/game/i18n.hh
+++ b/game/i18n.hh
@@ -4,6 +4,7 @@
/* Internationalization Dependances */
#include <libintl.h>
#include <locale.h>
+#include "fs.hh"
#define _(x) gettext(x)
#else
#define _(x) (x)
diff --git a/game/song.hh b/game/song.hh
index 37aed1b..d753084 100644
--- a/game/song.hh
+++ b/game/song.hh
@@ -1,6 +1,7 @@
#pragma once
#include "notes.hh"
+#include "i18n.hh"
#include <boost/noncopyable.hpp>
#include <stdexcept>
@@ -20,11 +21,14 @@ struct SongParserException: public std::runtime_error {
class SongParser;
namespace TrackName {
- const std::string GUITAR = "guitar";
- const std::string GUITAR_COOP = "coop guitar";
- const std::string GUITAR_RHYTHM = "rhythm guitar";
- const std::string BASS = "bass";
- const std::string DRUMS = "drums";
+ const std::string GUITAR = "Guitar";
+ const std::string GUITAR_COOP = "Coop guitar";
+ const std::string GUITAR_RHYTHM = "Rhythm guitar";
+ const std::string BASS = "Bass";
+ const std::string DRUMS = "Drums";
+ #if 0 // Here is some dummy gettext calls to populate the dictionary
+ _("Guitar") _("Coop guitar") _("Rhythm guitar") _("Bass") _("Drums")
+ #endif
}
/// class to load and parse songfiles
diff --git a/lang/fi.po b/lang/fi.po
index 475000f..5a4688e 100644
--- a/lang/fi.po
+++ b/lang/fi.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Performous\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-08-22 01:29-0000\n"
+"POT-Creation-Date: 2010-08-22 02:47-0000\n"
"PO-Revision-Date: \n"
"Last-Translator: Tapio Vierros <tap...@gm...>\n"
"Language-Team: \n"
@@ -13,6 +13,26 @@ msgstr ""
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ../game\n"
+#: ../game/song.hh:30
+msgid "Guitar"
+msgstr "Kitara"
+
+#: ../game/song.hh:30
+msgid "Coop guitar"
+msgstr "Soolokitara"
+
+#: ../game/song.hh:30
+msgid "Rhythm guitar"
+msgstr "Rytmikitara"
+
+#: ../game/song.hh:30
+msgid "Bass"
+msgstr "Basso"
+
+#: ../game/song.hh:30
+msgid "Drums"
+msgstr "Rummut"
+
#: ../game/screen_songs.cc:195
msgid "No songs found!"
msgstr "Kappaleita ei löytynyt!"
@@ -61,37 +81,37 @@ msgstr "Vaikea"
msgid "Challenge"
msgstr "Haastavin"
-#: ../game/dancegraph.cc:112
+#: ../game/dancegraph.cc:111
msgid "Ready!"
msgstr "Valmis!"
-#: ../game/dancegraph.cc:112
+#: ../game/dancegraph.cc:111
msgid "Start performing!"
msgstr "Aloita esiintyminen!"
-#: ../game/dancegraph.cc:123
+#: ../game/dancegraph.cc:122
msgid "Select track"
msgstr "Valitse pelimuoto"
-#: ../game/dancegraph.cc:139
+#: ../game/dancegraph.cc:138
msgid "Select difficulty"
msgstr "Valitse vaikeusaste"
-#: ../game/dancegraph.cc:142
+#: ../game/dancegraph.cc:141
#: ../game/screen_sing.cc:116
msgid "Quit"
msgstr "Lopeta"
-#: ../game/dancegraph.cc:142
+#: ../game/dancegraph.cc:141
#: ../game/screen_sing.cc:116
msgid "Exit to song browser"
msgstr "Poistu kappale valintaan"
-#: ../game/dancegraph.cc:261
+#: ../game/dancegraph.cc:260
msgid "STOP!"
msgstr "SEIS!"
-#: ../game/dancegraph.cc:336
+#: ../game/dancegraph.cc:335
msgid "Streak!"
msgstr "Sarja!"
@@ -269,42 +289,30 @@ msgid "Search Text:"
msgstr "Etsi:"
#: ../game/guitargraph.cc:14
-msgid "guitar"
-msgstr "kitara"
-
-#: ../game/guitargraph.cc:14
-msgid "bass"
-msgstr "basso"
-
-#: ../game/guitargraph.cc:14
-msgid "drums"
-msgstr "rummut"
-
-#: ../game/guitargraph.cc:15
msgid "Kids"
msgstr "Lapset"
-#: ../game/guitargraph.cc:15
+#: ../game/guitargraph.cc:14
msgid "Expert"
msgstr "Ekspertti"
-#: ../game/guitargraph.cc:168
+#: ../game/guitargraph.cc:169
msgid "Lefty-mode"
msgstr "Vasuritila"
-#: ../game/guitargraph.cc:177
+#: ../game/guitargraph.cc:178
msgid "ON"
msgstr "Päällä"
-#: ../game/guitargraph.cc:177
+#: ../game/guitargraph.cc:178
msgid "OFF"
msgstr "Pois"
-#: ../game/guitargraph.cc:178
+#: ../game/guitargraph.cc:179
msgid "Toggle lefty-mode"
msgstr "Vasenkätisyystila"
-#: ../game/guitargraph.cc:460
+#: ../game/guitargraph.cc:461
msgid ""
"God Mode\n"
"Activated!"
@@ -312,19 +320,19 @@ msgstr ""
"Jumalmoodi\n"
"Aktivoitu!"
-#: ../game/guitargraph.cc:461
+#: ../game/guitargraph.cc:462
msgid "Mistakes ignored!"
msgstr "Virheitä ei huomioida!"
-#: ../game/guitargraph.cc:1094
+#: ../game/guitargraph.cc:1095
msgid "Drum Fill!"
msgstr "Rumpufilli!"
-#: ../game/guitargraph.cc:1095
+#: ../game/guitargraph.cc:1096
msgid "God Mode Ready!"
msgstr "Jumalmoodi valmis!"
-#: ../game/guitargraph.cc:1100
+#: ../game/guitargraph.cc:1101
msgid "Solo!"
msgstr "Soolo!"
@@ -364,11 +372,11 @@ msgstr ""
"\n"
"Säädä ääniasetuksia ennen pelaamista."
-#: ../game/instrumentgraph.cc:40
+#: ../game/instrumentgraph.cc:41
msgid "Rejoin"
msgstr "Liity uudelleen"
-#: ../game/instrumentgraph.cc:40
+#: ../game/instrumentgraph.cc:41
msgid "Change selections"
msgstr "Vaihda valintoja"
|
|
From: Tapio V. <aa...@us...> - 2010-08-22 00:11:06
|
Module: performous
Branch: master
Commit: 7af171a7819d20b7bb29b70b6b3cbeef99b25906
Author: Tapio Vierros <tap...@gm...>
Date: Sun Aug 22 02:26:00 2010 +0300
Fix some minor style issues from static analysis.
---
game/dancegraph.cc | 3 +--
game/guitargraph.cc | 6 ++++--
game/instrumentgraph.cc | 1 +
game/joystick.hh | 2 +-
game/screen.hh | 2 +-
game/screen_practice.cc | 5 ++---
game/screenmanager.cc | 7 ++++++-
game/surface.cc | 2 +-
8 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 4155f13..f2f8eaf 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -91,9 +91,8 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
m_insideStop()
{
// Initialize some arrays
- for(size_t i = 0; i < max_panels; i++) {
+ for (size_t i = 0; i < max_panels; i++) {
m_activeNotes[i] = m_notes.end();
- m_pressed[i] = false;
m_pressed_anim[i] = AnimValue(0.0, 4.0);
m_arrow_map[i] = -1;
}
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 01f414b..7bf6429 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -118,8 +118,10 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number,
m_samples.push_back("guitar fail5");
m_samples.push_back("guitar fail6");
}
- for (int i = 0; i < 6; ++i) m_pressed_anim[i].setRate(5.0);
- for (int i = 0; i < 5; ++i) m_holds[i] = 0;
+ for (size_t i = 0; i < max_panels; ++i) {
+ m_pressed_anim[i].setRate(5.0);
+ m_holds[i] = 0;
+ }
m_pads = 5;
m_track_index = m_instrumentTracks.begin();
while (number--)
diff --git a/game/instrumentgraph.cc b/game/instrumentgraph.cc
index 0bfed82..10d11ca 100644
--- a/game/instrumentgraph.cc
+++ b/game/instrumentgraph.cc
@@ -31,6 +31,7 @@ InstrumentGraph::InstrumentGraph(Audio& audio, Song const& song, input::DevType
{
m_popupText.reset(new SvgTxtThemeSimple(getThemePath("sing_popup_text.svg"), config["graphic/text_lod"].f()));
m_menuTheme.reset(new ThemeInstrumentMenu());
+ for (size_t i = 0; i < max_panels; ++i) m_pressed[i] = false;
}
diff --git a/game/joystick.hh b/game/joystick.hh
index f821e26..54ba501 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -51,7 +51,7 @@ namespace input {
class InputDevPrivate {
public:
- InputDevPrivate(const Instrument _instrument) : m_assigned(false), m_instrument(_instrument) {
+ InputDevPrivate(const Instrument& _instrument) : m_assigned(false), m_instrument(_instrument) {
for(unsigned int i = 0 ; i < BUTTONS ; i++) {
m_pressed[i] = false;
}
diff --git a/game/screen.hh b/game/screen.hh
index fb853af..839aae8 100644
--- a/game/screen.hh
+++ b/game/screen.hh
@@ -72,8 +72,8 @@ class ScreenManager: public Singleton <ScreenManager> {
float m_timeToFadeIn;
float m_timeToFadeOut;
float m_timeToShow;
+ std::string m_message;
AnimValue m_messagePopup;
SvgTxtTheme m_textMessage;
- std::string m_message;
};
diff --git a/game/screen_practice.cc b/game/screen_practice.cc
index 27d4e80..6d56289 100644
--- a/game/screen_practice.cc
+++ b/game/screen_practice.cc
@@ -16,9 +16,8 @@ void ScreenPractice::enter() {
theme.reset(new ThemePractice());
// draw vu meters
for (unsigned int i = 0, mics = m_audio.analyzers().size(); i < mics; ++i) {
- ProgressBar* b;
- m_vumeters.push_back(b = new ProgressBar(getThemePath("vumeter_bg.svg"), getThemePath("vumeter_fg.svg"), ProgressBar::VERTICAL, 0.136, 0.023));
- b->dimensions.screenBottom().left(-0.4 + i * 0.2).fixedWidth(0.04);
+ m_vumeters.push_back(new ProgressBar(getThemePath("vumeter_bg.svg"), getThemePath("vumeter_fg.svg"), ProgressBar::VERTICAL, 0.136, 0.023));
+ m_vumeters.back().dimensions.screenBottom().left(-0.4 + i * 0.2).fixedWidth(0.04);
}
m_samples.push_back("drum bass");
m_samples.push_back("drum snare");
diff --git a/game/screenmanager.cc b/game/screenmanager.cc
index 8cd9506..8c215cf 100644
--- a/game/screenmanager.cc
+++ b/game/screenmanager.cc
@@ -6,7 +6,12 @@
template<> ScreenManager* Singleton<ScreenManager>::ms_Singleton = NULL;
-ScreenManager::ScreenManager(Window& _window): m_window(_window), m_finished(false), currentScreen(), m_messagePopup(0.0, 1.0), m_textMessage(getThemePath("message_text.svg"), config["graphic/text_lod"].f()) {
+ScreenManager::ScreenManager(Window& _window):
+ m_window(_window), m_finished(false), newScreen(), currentScreen(),
+ m_timeToFadeIn(), m_timeToFadeOut(), m_timeToShow(), m_message(),
+ m_messagePopup(0.0, 1.0), m_textMessage(getThemePath("message_text.svg"), config["graphic/text_lod"].f())
+
+{
m_textMessage.dimensions.middle().screenTop(0.05);
}
diff --git a/game/surface.cc b/game/surface.cc
index 3e2ddcd..d95e0e9 100644
--- a/game/surface.cc
+++ b/game/surface.cc
@@ -52,7 +52,7 @@ Surface::Surface(std::string const& filename) { loader(*this, filename); }
// Stuff for converting pix::Format into OpenGL enum values
namespace {
struct PixFmt {
- PixFmt() {} // Required by std::map
+ PixFmt(): swap() {} // Required by std::map
PixFmt(GLenum f, GLenum t, bool s): format(f), type(t), swap(s) {}
GLenum format;
GLenum type;
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 22:45:57
|
Module: performous
Branch: master
Commit: b8a3acf0ae6bf1ade8bc6f14ee10e8ca0426a66e
Author: Tapio Vierros <tap...@gm...>
Date: Sun Aug 22 01:35:39 2010 +0300
Fix a clang++ warning.
---
game/menu.hh | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/game/menu.hh b/game/menu.hh
index a04a11b..9845969 100644
--- a/game/menu.hh
+++ b/game/menu.hh
@@ -8,13 +8,14 @@
#include <vector>
class Surface;
-struct MenuOption;
+class MenuOption;
typedef std::vector<MenuOption> MenuOptions;
typedef std::vector<MenuOptions*> SubmenuStack;
/// Struct for menu options
-struct MenuOption {
+class MenuOption {
+ public:
enum Type { CLOSE_SUBMENU, OPEN_SUBMENU, CHANGE_VALUE, SET_AND_CLOSE, ACTIVATE_SCREEN } type;
/// Construct a submenu closer
@@ -52,7 +53,8 @@ struct MenuOption {
/// Menu for selecting difficulty etc.
-struct Menu {
+class Menu {
+ public:
/// constructor
Menu();
/// add a menu option
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 22:45:54
|
Module: performous
Branch: master
Commit: 0942d99f84af35b839c95aacd4413e35ce9d9cfe
Author: Tapio Vierros <tap...@gm...>
Date: Sun Aug 22 01:29:50 2010 +0300
Localize game modes and difficulties, update FI.
---
game/dancegraph.cc | 17 +++++++-
game/dancegraph.hh | 3 +-
game/guitargraph.cc | 23 +++++++++--
game/guitargraph.hh | 3 +-
game/instrumentgraph.hh | 1 +
game/screen_sing.cc | 4 +-
lang/fi.po | 94 ++++++++++++++++++++++++++++++++++++++---------
7 files changed, 115 insertions(+), 30 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 710d976..4155f13 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -14,6 +14,9 @@ namespace {
static const int mapping7[max_panels] = {0, 2, 4, 6, 1, 5, 3,-1,-1,-1};
static const int mapping8[max_panels] = {0, 3, 4, 7, 1, 6, 2, 5,-1,-1};
static const int mapping10[max_panels]= {0, 3, 4, 7, 1, 6, 2, 5,-1,-1};
+ #if 0 // Here is some dummy gettext calls to populate the dictionary
+ _("Beginner") _("Easy") _("Medium") _("Hard") _("Challenge")
+ #endif
const std::string diffv[] = { "Beginner", "Easy", "Medium", "Hard", "Challenge" };
const int death_delay = 25; // Delay in notes after which the player is hidden
const float join_delay = 3.0f; // Time after join menu before playing when joining mid-game
@@ -196,11 +199,19 @@ bool DanceGraph::dead() const {
return m_jointime != m_jointime || m_dead >= death_delay;
}
+/// Get the track string
+std::string DanceGraph::getTrack() const {
+ return _(m_gamingMode.c_str());
+}
+
/// Get the difficulty as displayable string
std::string DanceGraph::getDifficultyString() const {
- std::string ret = diffv[m_level];
- if (m_input.isKeyboard()) ret += " (kbd)";
- return ret;
+ return _(diffv[m_level].c_str());
+}
+
+/// Get a string id for track and difficulty
+std::string DanceGraph::getModeId() const {
+ return m_gamingMode + diffv[m_level] + (m_input.isKeyboard() ? " (kbd)" : "");
}
/// Attempt to change the difficulty by a step
diff --git a/game/dancegraph.hh b/game/dancegraph.hh
index 6fdbdd7..c526a5e 100644
--- a/game/dancegraph.hh
+++ b/game/dancegraph.hh
@@ -31,8 +31,9 @@ class DanceGraph: public InstrumentGraph {
void draw(double time);
void engine();
bool dead() const;
- std::string getTrack() const { return m_gamingMode; }
+ std::string getTrack() const;
std::string getDifficultyString() const;
+ std::string getModeId() const;
void changeTrack(int dir = 1);
void changeDifficulty(int dir = 1);
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 18053fc..01f414b 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -10,6 +10,10 @@
#include <boost/format.hpp>
namespace {
+ #if 0 // Here is some dummy gettext calls to populate the dictionary
+ _("guitar") _("bass") _("drums")
+ _("Kids") _("Easy") _("Medium") _("Hard") _("Expert")
+ #endif
struct Diff { std::string name; int basepitch; } diffv[] = {
{ "Kids", 0x3C },
{ "Easy", 0x3C },
@@ -167,8 +171,8 @@ void GuitarGraph::setupJoinMenu() {
}
void GuitarGraph::updateJoinMenu() {
- m_trackOpt = getTrack();
- m_difficultyOpt = getDifficultyString();
+ m_trackOpt = _(getTrack().c_str());
+ m_difficultyOpt = _(getDifficultyString().c_str());
std::string s("\n (");
std::string le = m_leftymode.b() ? _("ON") : _("OFF");
m_leftyOpt = _("Toggle lefty-mode") + s + le + ")";
@@ -204,11 +208,20 @@ void GuitarGraph::setTrack(const std::string& track) {
m_menu.select(1); // Restore selection to the track item
}
+/// Get the trackname string
+std::string GuitarGraph::getTrack() const {
+ return _(m_track_index->first.c_str());
+}
+
/// Get the difficulty as displayable string
std::string GuitarGraph::getDifficultyString() const {
- std::string ret = diffv[m_level].name;
- if (m_drums && m_input.isKeyboard()) ret += " (kbd)";
- return ret;
+ return _(diffv[m_level].name.c_str());
+}
+
+/// Get a string id for track and difficulty
+std::string GuitarGraph::getModeId() const {
+ return m_track_index->first + diffv[m_level].name
+ + (m_drums && m_input.isKeyboard() ? " (kbd)" : "");
}
/// Cycle through difficulties
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index 4e823ee..eec0dec 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -52,8 +52,9 @@ class GuitarGraph: public InstrumentGraph {
void draw(double time);
void engine();
bool dead() const;
- std::string getTrack() const { return m_track_index->first; }
+ std::string getTrack() const;
std::string getDifficultyString() const;
+ std::string getModeId() const;
void changeTrack(int dir = 1);
void changeDifficulty(int dir = 1);
double getWhammy() const { return m_whammy; }
diff --git a/game/instrumentgraph.hh b/game/instrumentgraph.hh
index 7cc7444..7dec18f 100644
--- a/game/instrumentgraph.hh
+++ b/game/instrumentgraph.hh
@@ -71,6 +71,7 @@ class InstrumentGraph {
virtual bool dead() const = 0;
virtual std::string getTrack() const = 0;
virtual std::string getDifficultyString() const = 0;
+ virtual std::string getModeId() const = 0;
virtual void changeTrack(int dir = 1) = 0;
virtual void changeDifficulty(int dir = 1) = 0;
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index f392722..4a4c4eb 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -560,7 +560,7 @@ ScoreWindow::ScoreWindow(Instruments& instruments, Database& database, Dancers&
item.score = it->getScore();
if (item.score < 100) { it = instruments.erase(it); continue; } // Dead
item.track_simple = it->getTrack();
- item.track = it->getTrack() + " - " + it->getDifficultyString();
+ item.track = it->getModeId();
item.track[0] = toupper(item.track[0]); // Capitalize
if (item.track_simple == TrackName::DRUMS) item.color = glutil::Color(0.1f, 0.1f, 0.1f);
else if (item.track_simple == TrackName::BASS) item.color = glutil::Color(0.5f, 0.3f, 0.1f);
@@ -575,7 +575,7 @@ ScoreWindow::ScoreWindow(Instruments& instruments, Database& database, Dancers&
item.score = it->getScore();
if (item.score < 100) { it = dancers.erase(it); continue; } // Dead
item.track_simple = it->getTrack();
- item.track = it->getTrack() + " - " + it->getDifficultyString();
+ item.track = it->getModeId();
item.track[0] = toupper(item.track[0]); // Capitalize
item.color = glutil::Color(1.0f, 0.4f, 0.1f);
diff --git a/lang/fi.po b/lang/fi.po
index 9730757..475000f 100644
--- a/lang/fi.po
+++ b/lang/fi.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Performous\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-08-21 23:32-0000\n"
+"POT-Creation-Date: 2010-08-22 01:29-0000\n"
"PO-Revision-Date: \n"
"Last-Translator: Tapio Vierros <tap...@gm...>\n"
"Language-Team: \n"
@@ -41,37 +41,57 @@ msgstr "<kirjoita etsiäksesi>"
msgid "Hiscore for "
msgstr "Ennätykset kappaleelle "
-#: ../game/dancegraph.cc:109
+#: ../game/dancegraph.cc:18
+msgid "Beginner"
+msgstr "Aloittelija"
+
+#: ../game/dancegraph.cc:18
+msgid "Easy"
+msgstr "Helppo"
+
+#: ../game/dancegraph.cc:18
+msgid "Medium"
+msgstr "Keskitaso"
+
+#: ../game/dancegraph.cc:18
+msgid "Hard"
+msgstr "Vaikea"
+
+#: ../game/dancegraph.cc:18
+msgid "Challenge"
+msgstr "Haastavin"
+
+#: ../game/dancegraph.cc:112
msgid "Ready!"
msgstr "Valmis!"
-#: ../game/dancegraph.cc:109
+#: ../game/dancegraph.cc:112
msgid "Start performing!"
msgstr "Aloita esiintyminen!"
-#: ../game/dancegraph.cc:120
+#: ../game/dancegraph.cc:123
msgid "Select track"
msgstr "Valitse pelimuoto"
-#: ../game/dancegraph.cc:136
+#: ../game/dancegraph.cc:139
msgid "Select difficulty"
msgstr "Valitse vaikeusaste"
-#: ../game/dancegraph.cc:139
+#: ../game/dancegraph.cc:142
#: ../game/screen_sing.cc:116
msgid "Quit"
msgstr "Lopeta"
-#: ../game/dancegraph.cc:139
+#: ../game/dancegraph.cc:142
#: ../game/screen_sing.cc:116
msgid "Exit to song browser"
msgstr "Poistu kappale valintaan"
-#: ../game/dancegraph.cc:250
+#: ../game/dancegraph.cc:261
msgid "STOP!"
msgstr "SEIS!"
-#: ../game/dancegraph.cc:325
+#: ../game/dancegraph.cc:336
msgid "Streak!"
msgstr "Sarja!"
@@ -248,23 +268,43 @@ msgstr "Kirjoita etsiäksesi tai luodaksesi uuden pelaajan."
msgid "Search Text:"
msgstr "Etsi:"
-#: ../game/guitargraph.cc:164
+#: ../game/guitargraph.cc:14
+msgid "guitar"
+msgstr "kitara"
+
+#: ../game/guitargraph.cc:14
+msgid "bass"
+msgstr "basso"
+
+#: ../game/guitargraph.cc:14
+msgid "drums"
+msgstr "rummut"
+
+#: ../game/guitargraph.cc:15
+msgid "Kids"
+msgstr "Lapset"
+
+#: ../game/guitargraph.cc:15
+msgid "Expert"
+msgstr "Ekspertti"
+
+#: ../game/guitargraph.cc:168
msgid "Lefty-mode"
msgstr "Vasuritila"
-#: ../game/guitargraph.cc:173
+#: ../game/guitargraph.cc:177
msgid "ON"
msgstr "Päällä"
-#: ../game/guitargraph.cc:173
+#: ../game/guitargraph.cc:177
msgid "OFF"
msgstr "Pois"
-#: ../game/guitargraph.cc:174
+#: ../game/guitargraph.cc:178
msgid "Toggle lefty-mode"
msgstr "Vasenkätisyystila"
-#: ../game/guitargraph.cc:447
+#: ../game/guitargraph.cc:460
msgid ""
"God Mode\n"
"Activated!"
@@ -272,19 +312,19 @@ msgstr ""
"Jumalmoodi\n"
"Aktivoitu!"
-#: ../game/guitargraph.cc:448
+#: ../game/guitargraph.cc:461
msgid "Mistakes ignored!"
msgstr "Virheitä ei huomioida!"
-#: ../game/guitargraph.cc:1081
+#: ../game/guitargraph.cc:1094
msgid "Drum Fill!"
msgstr "Rumpufilli!"
-#: ../game/guitargraph.cc:1082
+#: ../game/guitargraph.cc:1095
msgid "God Mode Ready!"
msgstr "Jumalmoodi valmis!"
-#: ../game/guitargraph.cc:1087
+#: ../game/guitargraph.cc:1100
msgid "Solo!"
msgstr "Soolo!"
@@ -332,6 +372,24 @@ msgstr "Liity uudelleen"
msgid "Change selections"
msgstr "Vaihda valintoja"
+#~ msgid " (kbd)"
+#~ msgstr "(näp.)"
+
+#~ msgid "Kids (kbd)"
+#~ msgstr "Lapset (näp.)"
+
+#~ msgid "Easy (kbd)"
+#~ msgstr "Helppo (näp.)"
+
+#~ msgid "Medium (kbd)"
+#~ msgstr "Keskitaso (näp.)"
+
+#~ msgid "Hard (kbd)"
+#~ msgstr "Vaikea (näp.)"
+
+#~ msgid "Expert (kbd)"
+#~ msgstr "Ekspertti (näp.)"
+
#~ msgid "No microphones found.\n"
#~ msgstr "Mikrofoneja ei löytynyt.\n"
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 21:25:54
|
Module: performous Branch: master Commit: a943d541b0c9d4bcee84f7edb58143b6c65b924b Author: Tapio Vierros <tap...@gm...> Date: Sat Aug 21 23:42:39 2010 +0300 Update FI translation. --- lang/fi.po | 362 +++++++++++++++++++++++++++++++++++------------------------- 1 files changed, 212 insertions(+), 150 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-21 21:08:08
|
Module: web Branch: master Commit: d97ddc2cb504a6843573565c58a8aca4bb63e8ff Author: Tapio Vierros <tap...@gm...> Date: Sun Aug 22 00:07:22 2010 +0300 Status update for 2010-08-21. --- htdocs-source/index.txt | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/htdocs-source/index.txt b/htdocs-source/index.txt index 1782de9..41b028b 100644 --- a/htdocs-source/index.txt +++ b/htdocs-source/index.txt @@ -1,5 +1,12 @@ Announcements +:h2:2010-08-21 - Status update +Good news everyone, cross-compiling binaries from Linux for Windows is pretty much ready for prime-time. You can check for yourself by downloading a testing installer from the <a href="http://wiki.performous.org/index.php/Nightly_Builds#Windows">wiki</a>. It would be nice if you could tell us how it works for you. The Mac bundle presented previously is broken, but luckily there has been OSX development work done and we have a new one <a href="http://wiki.performous.org/index.php/Nightly_Builds#Mac_OSX">at the usual place</a>. All in all, it seems every platform is now in quite good shape. + +We've now switched to using the new audio code and things seem to work rather well. Also the branch that moves controller configuration to an xml file has been merged. Although it is not yet perfect, it presents users a way to create own mappings and autodetections even though there is not yet a graphical UI for that. + +The new joining menu is also now part of main codebase, but didn't arrive in time to be included in the provided testing builds. Anyway, if no significant issues rise in overall testing, perhaps we might start looking into making that long overdue 0.6 release... + :h2:2010-07-31 - Status update We have progressed to the point where the new audio engine is pretty much on par with the previous one feature-wise. For merging, it would seem we only need some testing and tweaks to the time code calculation. Due to a bug with pause in the current audio system, the joining menu branch might require the new audio code before taken into use. Some visual clean-up is also in order. In addition, there has been initial work to move the controller mappings out of the executable, to make it much easier to add new ones. |
|
From: Tapio V. <aa...@us...> - 2010-08-21 19:54:06
|
Module: performous
Branch: master
Commit: efe23cdc5277f549558781817238c9433b37d7a0
Author: Tapio Vierros <tap...@gm...>
Date: Sat Aug 21 22:53:16 2010 +0300
Skip note rendering if time is NaN.
---
game/dancegraph.cc | 10 +++--
game/guitargraph.cc | 91 ++++++++++++++++++++++++++-------------------------
2 files changed, 52 insertions(+), 49 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 1ed5e18..710d976 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -441,10 +441,12 @@ void DanceGraph::draw(double time) {
}
// Draw the notes
- for (DanceNotes::iterator it = m_notes.begin(); it != m_notes.end(); ++it) {
- if (it->note.end - time < past) continue;
- if (it->note.begin - time > future) continue;
- drawNote(*it, time); // Let's just do all the calculating in the sub, instead of passing them as a long list
+ if (time == time) { // Check that time is not NaN
+ for (DanceNotes::iterator it = m_notes.begin(); it != m_notes.end(); ++it) {
+ if (it->note.end - time < past) continue;
+ if (it->note.begin - time > future) continue;
+ drawNote(*it, time); // Let's just do all the calculating in the sub, instead of passing them as a long list
+ }
}
}
drawInfo(time, offsetX, dimensions); // Go draw some texts and other interface stuff
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 409298e..18053fc 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -812,57 +812,58 @@ void GuitarGraph::draw(double time) {
drawNote(4, c, m_dfIt->end - time, m_dfIt->end - time, 0, false, false, 0, 0);
}
}
- // Iterate chords
- for (Chords::iterator it = m_chords.begin(); it != m_chords.end(); ++it) {
- float tBeg = it->begin - time;
- float tEnd = m_drums ? tBeg : it->end - time;
- if (tBeg > future) break;
- if (tEnd < past) {
- if (it->status < 100) it->status += 100; // Mark as past note for rewinding
- continue;
- }
- // Don't show past chords when rewinding
- if (it->status >= 100 || (tBeg > maxTolerance && it->status > 0)) continue;
- // Handle notes during drum fills / BREs
- if (drumfill && it->begin >= m_dfIt->begin - maxTolerance
- && it->begin <= m_dfIt->end + maxTolerance) {
- if (it->status == 0) {
- it->status = it->polyphony; // Mark as hit so that streak doesn't reset
- m_drumfillScore += it->polyphony * 50.0; // Count points from notes under drum fill
+ if (time == time) { // Check that time is not NaN
+ // Iterate chords
+ for (Chords::iterator it = m_chords.begin(); it != m_chords.end(); ++it) {
+ float tBeg = it->begin - time;
+ float tEnd = m_drums ? tBeg : it->end - time;
+ if (tBeg > future) break;
+ if (tEnd < past) {
+ if (it->status < 100) it->status += 100; // Mark as past note for rewinding
+ continue;
}
- continue;
- }
- // Loop through the frets
- for (int fret = 0; fret < m_pads; ++fret) {
- 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;
- float whammy = 0.0f;
- if (event > 0) {
- glow = m_events[event - 1].glow.get();
- whammy = m_events[event - 1].whammy.get();
+ // Don't show past chords when rewinding
+ if (it->status >= 100 || (tBeg > maxTolerance && it->status > 0)) continue;
+ // Handle notes during drum fills / BREs
+ if (drumfill && it->begin >= m_dfIt->begin - maxTolerance
+ && it->begin <= m_dfIt->end + maxTolerance) {
+ if (it->status == 0) {
+ it->status = it->polyphony; // Mark as hit so that streak doesn't reset
+ m_drumfillScore += it->polyphony * 50.0; // Count points from notes under drum fill
+ }
+ continue;
}
- // Set the default color (disabled state)
- glutil::Color c(0.5f, 0.5f, 0.5f);
- if (!joining(time)) {
- // Get a color for the fret and adjust it if GodMode is on
- c = colorize(color(fret), it->begin);
- if (glow > 0.1f) { ng_r+=c.r; ng_g+=c.g; ng_b+=c.b; ng_ccnt++; } // neck glow
- // Further adjust the color if the note is hit
- c.r += glow * 0.2f;
- c.g += glow * 0.2f;
- c.b += glow * 0.2f;
+ // Loop through the frets
+ for (int fret = 0; fret < m_pads; ++fret) {
+ 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;
+ float whammy = 0.0f;
+ if (event > 0) {
+ glow = m_events[event - 1].glow.get();
+ whammy = m_events[event - 1].whammy.get();
+ }
+ // Set the default color (disabled state)
+ glutil::Color c(0.5f, 0.5f, 0.5f);
+ if (!joining(time)) {
+ // Get a color for the fret and adjust it if GodMode is on
+ c = colorize(color(fret), it->begin);
+ if (glow > 0.1f) { ng_r+=c.r; ng_g+=c.g; ng_b+=c.b; ng_ccnt++; } // neck glow
+ // Further adjust the color if the note is hit
+ c.r += glow * 0.2f;
+ c.g += glow * 0.2f;
+ c.b += glow * 0.2f;
+ }
+ if (glow > 0.5f && tEnd < 0.1f && it->hitAnim[fret].get() == 0.0)
+ it->hitAnim[fret].setTarget(1.0);
+ // Call the actual note drawing function
+ drawNote(fret, c, tBeg, tEnd, whammy, it->tappable, glow > 0.5f, it->hitAnim[fret].get(),
+ it->releaseTimes[fret] > 0.0 ? it->releaseTimes[fret] - time : getNaN());
}
- if (glow > 0.5f && tEnd < 0.1f && it->hitAnim[fret].get() == 0.0)
- it->hitAnim[fret].setTarget(1.0);
- // Call the actual note drawing function
- drawNote(fret, c, tBeg, tEnd, whammy, it->tappable, glow > 0.5f, it->hitAnim[fret].get(),
- it->releaseTimes[fret] > 0.0 ? it->releaseTimes[fret] - time : getNaN());
}
}
} //< disable lighting
-
// Draw flames
for (int fret = 0; fret < m_pads; ++fret) { // Loop through the frets
if (m_drums && fret == 0) { // Skip bass drum
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:59:26
|
Module: performous
Branch: master
Commit: 48dd20b57f9a0a22cafca59a050e1105e49e1940
Author: Tapio Vierros <tap...@gm...>
Date: Sat Aug 21 21:58:45 2010 +0300
Fix graphical artifact in dance hold note tail rendering.
---
game/dancegraph.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index eaf51da..1ed5e18 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -507,7 +507,7 @@ void DanceGraph::drawNote(DanceNote& note, double time) {
float yMid = std::max(yEnd-arrowSize, yBeg+arrowSize);
vertexPair(arrow_i, x, yMid, 2.0f/3.0f, s);
// Draw middle
- vertexPair(arrow_i, x, yBeg+arrowSize, 1.0f/3.0f, s);
+ vertexPair(arrow_i, x, yBeg + 2*arrowSize, 1.0f/3.0f, s);
}
// Draw begin
if (note.isHit && tEnd < 0.1) {
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:24:59
|
Module: performous
Branch: master
Commit: 0274a98f338e73b4f07c7f8667f4e0e4d58a5e9b
Author: Tapio Vierros <tap...@gm...>
Date: Sat Aug 21 21:24:03 2010 +0300
Catch exceptions in webcam frame capturing.
---
game/webcam.cc | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/game/webcam.cc b/game/webcam.cc
index f1372aa..b1e1991 100644
--- a/game/webcam.cc
+++ b/game/webcam.cc
@@ -63,17 +63,19 @@ void Webcam::operator()() {
m_running = true;
while (!m_quit) {
if (m_running) {
- // Get a new frame
- cv::Mat frame;
- *m_capture >> frame;
- if (m_writer) *m_writer << frame;
- boost::mutex::scoped_lock l(m_mutex);
- // Copy the frame to storage
- m_frame.width = frame.cols;
- m_frame.height = frame.rows;
- m_frame.data.assign(frame.data, frame.data + (m_frame.width * m_frame.height * 3));
- // Notify renderer
- m_frameAvailable = true;
+ try {
+ // Get a new frame
+ cv::Mat frame;
+ *m_capture >> frame;
+ if (m_writer) *m_writer << frame;
+ boost::mutex::scoped_lock l(m_mutex);
+ // Copy the frame to storage
+ m_frame.width = frame.cols;
+ m_frame.height = frame.rows;
+ m_frame.data.assign(frame.data, frame.data + (m_frame.width * m_frame.height * 3));
+ // Notify renderer
+ m_frameAvailable = true;
+ } catch (std::exception&) { std::cerr << "Error capturing webcam frame!" << std::endl; }
}
// Sleep a little, much if the cam isn't active
boost::thread::sleep(now() + (m_running ? 0.015 : 0.5));
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:41
|
Module: performous Branch: master Commit: 569d783f50f853cc39e957cf62ed572e1a8f73f0 Author: Tapio Vierros <tap...@gm...> Date: Sat Aug 21 20:56:19 2010 +0300 Merge branch 'joinmenu' --- |
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:38
|
Module: performous
Branch: master
Commit: 21c13ec0aa88e20cfdcc98273caaf3be8b22e913
Author: Tapio Vierros <tap...@gm...>
Date: Sat Aug 21 17:25:59 2010 +0300
Assure the menu is opened when rejoining from pause menu.
---
game/dancegraph.cc | 2 +-
game/guitargraph.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 5702ac1..eaf51da 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -277,7 +277,7 @@ void DanceGraph::engine() {
if (m_selectedTrack.so() != getTrack()) setTrack(m_selectedTrack.so());
else if (boost::lexical_cast<int>(m_selectedDifficulty.so()) != m_level)
difficulty(DanceDifficulty(boost::lexical_cast<int>(m_selectedDifficulty.so())));
- else if (m_rejoin.b()) { unjoin(); setupJoinMenu(); }
+ else if (m_rejoin.b()) { unjoin(); setupJoinMenu(); m_input.addEvent(input::Event()); }
// Sync dynamic stuff
updateJoinMenu();
// Open Menu
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index fe9935c..409298e 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -296,7 +296,7 @@ void GuitarGraph::engine() {
if (!m_drums && m_selectedTrack.so() != getTrack()) setTrack(m_selectedTrack.so());
else if (boost::lexical_cast<int>(m_selectedDifficulty.so()) != m_level)
difficulty(Difficulty(boost::lexical_cast<int>(m_selectedDifficulty.so())));
- else if (m_rejoin.b()) { unjoin(); setupJoinMenu(); }
+ else if (m_rejoin.b()) { unjoin(); setupJoinMenu(); m_input.addEvent(input::Event()); }
// Sync menu items & captions
updateJoinMenu();
break;
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:36
|
Module: performous
Branch: master
Commit: 4c7c17239cfaea986b02f2a16c3e85254f028890
Author: Tapio Vierros <tap...@gm...>
Date: Sat Aug 21 17:01:30 2010 +0300
Implement "rejoin" pause menu action.
---
game/dancegraph.cc | 1 +
game/guitargraph.cc | 1 +
game/instrumentgraph.cc | 33 ++++++++++++++++++++++++---------
game/instrumentgraph.hh | 6 +++---
game/screen_sing.cc | 7 ++++---
5 files changed, 33 insertions(+), 15 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index a104dd6..5702ac1 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -277,6 +277,7 @@ void DanceGraph::engine() {
if (m_selectedTrack.so() != getTrack()) setTrack(m_selectedTrack.so());
else if (boost::lexical_cast<int>(m_selectedDifficulty.so()) != m_level)
difficulty(DanceDifficulty(boost::lexical_cast<int>(m_selectedDifficulty.so())));
+ else if (m_rejoin.b()) { unjoin(); setupJoinMenu(); }
// Sync dynamic stuff
updateJoinMenu();
// Open Menu
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 9b196eb..fe9935c 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -296,6 +296,7 @@ void GuitarGraph::engine() {
if (!m_drums && m_selectedTrack.so() != getTrack()) setTrack(m_selectedTrack.so());
else if (boost::lexical_cast<int>(m_selectedDifficulty.so()) != m_level)
difficulty(Difficulty(boost::lexical_cast<int>(m_selectedDifficulty.so())));
+ else if (m_rejoin.b()) { unjoin(); setupJoinMenu(); }
// Sync menu items & captions
updateJoinMenu();
break;
diff --git a/game/instrumentgraph.cc b/game/instrumentgraph.cc
index 3fc4490..0bfed82 100644
--- a/game/instrumentgraph.cc
+++ b/game/instrumentgraph.cc
@@ -6,14 +6,6 @@
//const unsigned InstrumentGraph::max_panels = 10; // Maximum number of arrow lines / guitar frets
-void InstrumentGraph::setupPauseMenu(Menu& menu) {
- menu.clear();
- menu.add(MenuOption(_("Resume"), _("Back to performing!")));
- menu.add(MenuOption(_("Restart"), _("Start the song\nfrom the beginning"), "Sing"));
- menu.add(MenuOption(_("Quit"), _("Exit to song browser"), "Songs"));
-}
-
-
InstrumentGraph::InstrumentGraph(Audio& audio, Song const& song, input::DevType inp):
m_audio(audio), m_song(song), m_input(input::DevType(inp)),
m_stream(),
@@ -23,6 +15,7 @@ InstrumentGraph::InstrumentGraph(Audio& audio, Song const& song, input::DevType
m_text(getThemePath("sing_timetxt.svg"), config["graphic/text_lod"].f()),
m_selectedTrack(""),
m_selectedDifficulty(0),
+ m_rejoin(false),
m_pads(),
m_correctness(0.0, 5.0),
m_score(),
@@ -41,10 +34,19 @@ InstrumentGraph::InstrumentGraph(Audio& audio, Song const& song, input::DevType
}
+void InstrumentGraph::setupPauseMenu() {
+ m_menu.clear();
+ m_menu.add(MenuOption(_("Resume"), _("Back to performing!")));
+ m_menu.add(MenuOption(_("Rejoin"), _("Change selections"), &m_rejoin));
+ m_menu.add(MenuOption(_("Restart"), _("Start the song\nfrom the beginning"), "Sing"));
+ m_menu.add(MenuOption(_("Quit"), _("Exit to song browser"), "Songs"));
+}
+
+
void InstrumentGraph::doUpdates() {
if (!menuOpen() && !m_ready) {
m_ready = true;
- setupPauseMenu(m_menu);
+ setupPauseMenu();
}
}
@@ -150,3 +152,16 @@ glutil::Color const& InstrumentGraph::color(int fret) const {
}
return fretColors[fret];
}
+
+
+void InstrumentGraph::unjoin() {
+ m_jointime = getNaN();
+ m_rejoin = false;
+ m_score = 0;
+ m_starmeter = 0;
+ m_streak = 0;
+ m_longestStreak = 0;
+ m_bigStreak = 0;
+ m_countdown = 3;
+ m_ready = false;
+}
diff --git a/game/instrumentgraph.hh b/game/instrumentgraph.hh
index b3334b8..7cc7444 100644
--- a/game/instrumentgraph.hh
+++ b/game/instrumentgraph.hh
@@ -60,8 +60,6 @@ class Song;
class InstrumentGraph {
public:
- static void setupPauseMenu(Menu& menu);
-
/// Constructor
InstrumentGraph(Audio& audio, Song const& song, input::DevType inp);
/// Virtual destructor
@@ -77,12 +75,13 @@ class InstrumentGraph {
virtual void changeDifficulty(int dir = 1) = 0;
// General shared functions
+ void setupPauseMenu();
void doUpdates();
void drawMenu();
void toggleMenu(int forcestate = -1); // 0 = close, 1 = open, -1 = auto/toggle
void togglePause(int) { m_audio.togglePause(); }
void quit(int) { ScreenManager::getSingletonPtr()->activateScreen("Songs"); }
- std::string noValue() const { return ""; }
+ void unjoin();
// General getters
bool joining(double time) const { return time < m_jointime; }
@@ -134,6 +133,7 @@ class InstrumentGraph {
// Dynamic stuff for join menu
ConfigItem m_selectedTrack; /// menu modifies this to select track
ConfigItem m_selectedDifficulty; /// menu modifies this to select difficulty
+ ConfigItem m_rejoin; /// menu sets this if we want to re-join
std::string m_trackOpt;
std::string m_difficultyOpt;
std::string m_leftyOpt;
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index b00e32a..f392722 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -110,9 +110,10 @@ void ScreenSing::enter() {
}
}
// Populate the pause menu
- // TODO: Refactor this menu population to static
- // function that instrumentgraph can also use
- InstrumentGraph::setupPauseMenu(m_menu);
+ m_menu.clear();
+ m_menu.add(MenuOption(_("Resume"), _("Back to performing!")));
+ m_menu.add(MenuOption(_("Restart"), _("Start the song\nfrom the beginning"), "Sing"));
+ m_menu.add(MenuOption(_("Quit"), _("Exit to song browser"), "Songs"));
m_menu.close();
// Startup delay for instruments is longer than for singing only
double setup_delay = (m_instruments.empty() && m_dancers.empty() ? -1.0 : -3.0);
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:33
|
Module: performous Branch: master Commit: ffe7f4a2dd256f29f9ce2d84693a3fda967cfce0 Author: Tapio Vierros <tap...@gm...> Date: Sat Aug 21 16:20:54 2010 +0300 Merge branch 'master' into joinmenu Conflicts: game/guitargraph.hh game/instrumentgraph.hh game/screen_sing.cc --- |
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:31
|
Module: performous Branch: master Commit: 5e34cf994d3e2222c8281ce6c5cc66b41677b78a Author: Tapio Vierros <tap...@gm...> Date: Tue Aug 17 20:10:58 2010 +0300 Various fixes & tweaks to joinmenu, incl. removing submenus from dance menu. --- game/configuration.cc | 2 + game/configuration.hh | 1 + game/dancegraph.cc | 64 ++++++++++++++++++++++++++++++------------------ game/guitargraph.cc | 65 ++++++++++++++++++++++++++++++------------------- 4 files changed, 83 insertions(+), 49 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:29
|
Module: performous
Branch: master
Commit: 9b7d0b0910edb18a897393da04a464ad7786855f
Author: Tapio Vierros <tap...@gm...>
Date: Tue Aug 17 18:09:00 2010 +0300
Select is now GodMode and Start opens menu. Keyboard drum menu also work now.
---
game/guitargraph.cc | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index ba883b1..893ddcf 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -266,12 +266,8 @@ void GuitarGraph::engine() {
break;
}
// Handle Start/Select keypresses
- if (ev.nav == input::CANCEL) m_menu.toggle();
- if (ev.nav == input::START && !menuOpen()) ev.button = input::STARPOWER_BUTTON;
- //if (ev.type == input::Event::PRESS && ev.button > input::STARPOWER_BUTTON) {
- //if (ev.button == 9) ev.button = input::STARPOWER_BUTTON; // Start works for GodMode
- //else continue;
- //}
+ if (ev.nav == input::CANCEL && !menuOpen()) ev.button = input::STARPOWER_BUTTON; // Select = GodMode
+ if (ev.nav == input::START && !menuOpen()) { m_menu.open(); continue; }
// Guitar specific actions
if (!m_drums) {
if ((ev.type == input::Event::PRESS || ev.type == input::Event::RELEASE) && ev.button == input::STARPOWER_BUTTON) {
@@ -292,20 +288,15 @@ void GuitarGraph::engine() {
// Check first regular keys
if (ev.type == input::Event::PRESS && ev.button >= 0 && ev.button < m_pads) {
if (m_drums && ev.button == 0) m_menu.action(); // Kick substitutes for strum
- else {
+ else { // Hilight item
int sel = m_drums ? ((ev.button + m_pads - 1) % m_pads) : ev.button;
- std::cout << sel << " " << ev.button << std::endl;
m_menu.select(sel);
}
}
- // Strum (strum of keyboard as guitar doesn't generate nav-events)
+ // Strum (strum of keyboard-as-guitar doesn't generate nav-events)
else if (ev.type == input::Event::PICK && ev.button == 0) m_menu.action(1);
else if (ev.type == input::Event::PICK && ev.button == 1) m_menu.action(-1);
- //else { // Try nav keys (arrows)
- // if (ev.nav == input::START) m_menu.action();
- // else if (ev.nav == input::DOWN || ev.nav == input::RIGHT) m_menu.move(1);
- // else if (ev.nav == input::UP || ev.nav == input::LEFT) m_menu.move(-1);
- //}
+ else if (ev.nav == input::START) m_menu.action();
// See if anything changed
if (!m_drums && m_selectedTrack.so() != getTrack()) setTrack(m_selectedTrack.so());
else if (boost::lexical_cast<int>(m_selectedDifficulty.so()) != m_level)
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:26
|
Module: performous
Branch: master
Commit: 82275f4baa9c25a48b54bcdeeccfe63806d95125
Author: Tapio Vierros <tap...@gm...>
Date: Tue Aug 17 00:52:37 2010 +0300
Guitar/drum joinmenu now uses "2d menu" instead of submenus.
Need to squash some bugs still.
---
game/dancegraph.cc | 8 +++---
game/guitargraph.cc | 70 +++++++++++++++++++++++++----------------------
game/instrumentgraph.hh | 6 ++--
3 files changed, 44 insertions(+), 40 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index a85aaeb..f0a12a0 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -119,16 +119,16 @@ void DanceGraph::setupJoinMenu() {
// Populate root menu
m_menu.add(MenuOption(_("Ready!"), _("Start performing!")));
m_menu.add(MenuOption(_("Track"), "", trackmenu));
- m_menu.back().setDynamicComment(m_trackComment);
+ m_menu.back().setDynamicComment(m_trackOpt);
m_menu.add(MenuOption(_("Difficulty"), "", diffmenu));
- m_menu.back().setDynamicComment(m_difficultyComment);
+ m_menu.back().setDynamicComment(m_difficultyOpt);
m_menu.add(MenuOption(_("Quit"), _("Exit to song browser"), "Songs"));
}
void DanceGraph::updateJoinMenu() {
std::string s("\n (");
- m_trackComment = _("Select track") + s + getTrack() + ")";
- m_difficultyComment = _("Select difficulty") + s + getDifficultyString() + ")";
+ m_trackOpt = _("Select track") + s + getTrack() + ")";
+ m_difficultyOpt = _("Select difficulty") + s + getDifficultyString() + ")";
m_selectedTrack = ConfigItem(getTrack());
m_selectedDifficulty = ConfigItem(m_level);
}
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index b206ac4..ba883b1 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -128,36 +128,41 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, bool drums, int number,
void GuitarGraph::setupJoinMenu() {
m_menu.clear();
updateJoinMenu();
- // Create track menu
- MenuOptions trackmenu;
- for (InstrumentTracksConstPtr::const_iterator it = m_instrumentTracks.begin(); it != m_instrumentTracks.end(); ++it) {
- trackmenu.push_back(MenuOption(it->first, _("Select track to play"), &m_selectedTrack, ConfigItem(it->first)));
- }
- // Create difficulty menu
- MenuOptions diffmenu;
- for (int level = 0; level < DIFFICULTYCOUNT; ++level) {
- if (difficulty(Difficulty(level), true))
- diffmenu.push_back(MenuOption(diffv[level].name, _("Select difficulty level"), &m_selectedDifficulty, ConfigItem(level)));
- }
// Populate root menu
m_menu.add(MenuOption(_("Ready!"), _("Start performing!")));
- m_menu.add(MenuOption(_("Track"), "", trackmenu));
- m_menu.back().setDynamicComment(m_trackComment);
- m_menu.add(MenuOption(_("Difficulty"), "", diffmenu));
- m_menu.back().setDynamicComment(m_difficultyComment);
+ // Create track option only for guitars
+ if (!m_drums) {
+ ConfigItem::OptionList ol;
+ // Add tracks to option list
+ for (InstrumentTracksConstPtr::const_iterator it = m_instrumentTracks.begin(); it != m_instrumentTracks.end(); ++it) {
+ ol.push_back(it->first);
+ }
+ m_selectedTrack = ConfigItem(ol); // Create a ConfigItem from the option list
+ m_menu.add(MenuOption("", _("Track"), &m_selectedTrack)); // MenuOption that cycles the options
+ m_menu.back().setDynamicName(m_trackOpt); // Set the title to be dynamic
+ }
+ { // Create difficulty opt
+ ConfigItem::OptionList ol;
+ // Add difficulties to the option list
+ for (int level = 0; level < DIFFICULTYCOUNT; ++level) {
+ if (difficulty(Difficulty(level), true))
+ ol.push_back(boost::lexical_cast<std::string>(level));
+ }
+ m_selectedDifficulty = ConfigItem(ol); // Create a ConfigItem from the option list
+ m_menu.add(MenuOption("", _("Difficulty"), &m_selectedDifficulty)); // MenuOption that cycles the options
+ m_menu.back().setDynamicName(m_difficultyOpt); // Set the title to be dynamic
+ }
m_menu.add(MenuOption(_("Lefty-mode"), "", &m_leftymode));
- m_menu.back().setDynamicComment(m_leftyComment);
+ m_menu.back().setDynamicComment(m_leftyOpt);
m_menu.add(MenuOption(_("Quit"), _("Exit to song browser"), "Songs"));
}
void GuitarGraph::updateJoinMenu() {
std::string s("\n (");
std::string le = m_leftymode.b() ? _("ON") : _("OFF");
- m_trackComment = _("Select track") + s + getTrack() + ")";
- m_difficultyComment = _("Select difficulty") + s + getDifficultyString() + ")";
- m_leftyComment = _("Toggle lefty-mode") + s + le + ")";
- m_selectedTrack = ConfigItem(getTrack());
- m_selectedDifficulty = ConfigItem(m_level);
+ m_trackOpt = getTrack();
+ m_difficultyOpt = getDifficultyString();
+ m_leftyOpt = _("Toggle lefty-mode") + s + le + ")";
}
/// Load the appropriate neck texture
@@ -176,8 +181,6 @@ void GuitarGraph::changeTrack(int dir) {
else if (m_track_index == (--m_instrumentTracks.end())) m_track_index = (--m_instrumentTracks.end());
difficultyAuto(true);
updateNeck();
- setupJoinMenu();
- m_menu.select(1); // Restore selection to the track menu item
}
/// Set specific track
@@ -186,8 +189,6 @@ void GuitarGraph::setTrack(const std::string& track) {
if (it != m_instrumentTracks.end()) m_track_index = it;
difficultyAuto(true);
updateNeck();
- setupJoinMenu();
- m_menu.select(1); // Restore selection to the track menu item
}
/// Get the difficulty as displayable string
@@ -233,7 +234,6 @@ bool GuitarGraph::difficulty(Difficulty level, bool check_only) {
updateChords();
return false;
}
- updateJoinMenu();
return true;
}
@@ -291,21 +291,25 @@ void GuitarGraph::engine() {
if (menuOpen()) {
// Check first regular keys
if (ev.type == input::Event::PRESS && ev.button >= 0 && ev.button < m_pads) {
- int sel = m_drums ? ((ev.button + m_pads - 1) % m_pads) : ev.button;
- m_menu.select(sel);
- m_menu.action();
+ if (m_drums && ev.button == 0) m_menu.action(); // Kick substitutes for strum
+ else {
+ int sel = m_drums ? ((ev.button + m_pads - 1) % m_pads) : ev.button;
+ std::cout << sel << " " << ev.button << std::endl;
+ m_menu.select(sel);
+ }
}
// Strum (strum of keyboard as guitar doesn't generate nav-events)
- //else if (ev.type == input::Event::PICK && ev.button == 0) m_menu.move(1);
- //else if (ev.type == input::Event::PICK && ev.button == 1) m_menu.move(-1);
+ else if (ev.type == input::Event::PICK && ev.button == 0) m_menu.action(1);
+ else if (ev.type == input::Event::PICK && ev.button == 1) m_menu.action(-1);
//else { // Try nav keys (arrows)
// if (ev.nav == input::START) m_menu.action();
// else if (ev.nav == input::DOWN || ev.nav == input::RIGHT) m_menu.move(1);
// else if (ev.nav == input::UP || ev.nav == input::LEFT) m_menu.move(-1);
//}
// See if anything changed
- if (m_selectedTrack.s() != getTrack()) setTrack(m_selectedTrack.s());
- else if (m_selectedDifficulty.i() != m_level) difficulty(Difficulty(m_selectedDifficulty.i()));
+ if (!m_drums && m_selectedTrack.so() != getTrack()) setTrack(m_selectedTrack.so());
+ else if (boost::lexical_cast<int>(m_selectedDifficulty.so()) != m_level)
+ difficulty(Difficulty(boost::lexical_cast<int>(m_selectedDifficulty.so())));
// Sync menu items & captions
updateJoinMenu();
// Playing
diff --git a/game/instrumentgraph.hh b/game/instrumentgraph.hh
index e4f5dfb..84ca6a4 100644
--- a/game/instrumentgraph.hh
+++ b/game/instrumentgraph.hh
@@ -131,9 +131,9 @@ class InstrumentGraph {
// Dynamic stuff for join menu
ConfigItem m_selectedTrack; /// menu modifies this to select track
ConfigItem m_selectedDifficulty; /// menu modifies this to select difficulty
- std::string m_trackComment;
- std::string m_difficultyComment;
- std::string m_leftyComment;
+ std::string m_trackOpt;
+ std::string m_difficultyOpt;
+ std::string m_leftyOpt;
// Misc counters etc.
int m_pads; /// how many panels the current gaming mode uses
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:24
|
Module: performous
Branch: master
Commit: 1a00a40e755e22b1f8c394957089aff3b7451388
Author: Tapio Vierros <tap...@gm...>
Date: Tue Aug 17 00:50:29 2010 +0300
Implement new "option_list" ConfigItem type.
Does not yet support selection saving/loading to/from xml.
Also, typedef collides with StringList, so both cannot have constructors ATM.
---
game/configuration.cc | 19 ++++++++++++++++++-
game/configuration.hh | 5 +++++
2 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/game/configuration.cc b/game/configuration.cc
index 9d91a53..d6fa8af 100644
--- a/game/configuration.cc
+++ b/game/configuration.cc
@@ -26,6 +26,8 @@ ConfigItem::ConfigItem(float fval): m_type("float"), m_value(fval) { }
ConfigItem::ConfigItem(std::string sval): m_type("string"), m_value(sval) { }
+ConfigItem::ConfigItem(OptionList opts): m_type("option_list"), m_value(opts), m_sel(0) { }
+
ConfigItem& ConfigItem::incdec(int dir) {
if (m_type == "int") {
@@ -39,6 +41,8 @@ ConfigItem& ConfigItem::incdec(int dir) {
} else if (m_type == "bool") {
bool& val = boost::get<bool>(m_value);
val = !val;
+ } else if (m_type == "option_list") {
+ m_sel = clamp<int>(m_sel + dir, 0, boost::get<OptionList>(m_value).size()-1);
}
return *this;
}
@@ -49,6 +53,7 @@ bool ConfigItem::isDefaultImpl(ConfigItem::Value const& defaultValue) const {
if (m_type == "float") return boost::get<double>(m_value) == boost::get<double>(defaultValue);
if (m_type == "string") return boost::get<std::string>(m_value) == boost::get<std::string>(defaultValue);
if (m_type == "string_list") return boost::get<StringList>(m_value) == boost::get<StringList>(defaultValue);
+ if (m_type == "option_list") return boost::get<OptionList>(m_value) == boost::get<OptionList>(defaultValue);
throw std::logic_error("ConfigItem::is_default doesn't know type '" + m_type + "'");
}
@@ -68,6 +73,8 @@ bool& ConfigItem::b() { verifyType("bool"); return boost::get<bool>(m_value); }
double& ConfigItem::f() { verifyType("float"); return boost::get<double>(m_value); }
std::string& ConfigItem::s() { verifyType("string"); return boost::get<std::string>(m_value); }
ConfigItem::StringList& ConfigItem::sl() { verifyType("string_list"); return boost::get<StringList>(m_value); }
+ConfigItem::OptionList& ConfigItem::ol() { verifyType("option_list"); return boost::get<OptionList>(m_value); }
+std::string& ConfigItem::so() { verifyType("option_list"); return boost::get<OptionList>(m_value).at(m_sel); }
namespace {
template <typename T, typename VariantAll, typename VariantNum> std::string numericFormat(VariantAll const& value, VariantNum const& multiplier, VariantNum const& step) {
@@ -94,6 +101,7 @@ std::string ConfigItem::getValue() const {
StringList const& sl = boost::get<StringList>(m_value);
return sl.size() == 1 ? "{" + sl[0] + "}" : (boost::format("%d items") % sl.size()).str();
}
+ if (m_type == "option_list") return boost::get<OptionList>(m_value).at(m_sel);
throw std::logic_error("ConfigItem::getValue doesn't know type '" + m_type + "'");
}
@@ -179,7 +187,8 @@ void ConfigItem::update(xmlpp::Element& elem, int mode) {
value = elem2.get_content();
}
m_value = value;
- } else if (m_type == "string_list") {
+ } else if (m_type == "string_list" || m_type == "option_list") {
+ //TODO: Option list should also update selection (from attribute?)
std::vector<std::string> value;
xmlpp::NodeSet n2 = elem.find("stringvalue/text()");
for (xmlpp::NodeSet::const_iterator it2 = n2.begin(), end2 = n2.end(); it2 != end2; ++it2) {
@@ -236,6 +245,14 @@ void writeConfig(bool system) {
stringvalueNode->add_child_text(*it);
}
}
+ else if (item.get_type() == "option_list") {
+ //TODO: Write selected also (as attribute?)
+ ConfigItem::OptionList const& value = item.ol();
+ for(ConfigItem::OptionList::const_iterator it = value.begin(); it != value.end(); ++it) {
+ xmlpp::Element* stringvalueNode = entryNode->add_child("stringvalue");
+ stringvalueNode->add_child_text(*it);
+ }
+ }
}
fs::path const& conf = system ? systemConfFile : userConfFile;
std::string tmp = conf.string() + "tmp";
diff --git a/game/configuration.hh b/game/configuration.hh
index 33a6055..e0c92c9 100644
--- a/game/configuration.hh
+++ b/game/configuration.hh
@@ -11,11 +11,13 @@ namespace xmlpp { class Element; } // Forward declaration for libxml++ stuff
class ConfigItem {
public:
typedef std::vector<std::string> StringList; ///< a list of strings
+ typedef std::vector<std::string> OptionList; ///< a list of string options
ConfigItem() {}
ConfigItem(bool bval);
ConfigItem(int ival);
ConfigItem(float fval);
ConfigItem(std::string sval);
+ ConfigItem(OptionList opts);
void update(xmlpp::Element& elem, int mode); ///< Load XML config file, elem = Entry, mode = 0 for schema, 1 for system config and 2 for user config
ConfigItem& operator++() { return incdec(1); } ///< increments config value
ConfigItem& operator--() { return incdec(-1); } ///< decrements config value
@@ -27,6 +29,8 @@ class ConfigItem {
double& f(); ///< Access floating-point item
std::string& s(); ///< Access string item
StringList& sl(); ///< Access stringlist item
+ OptionList& ol(); ///< Access optionlist item
+ std::string& so(); ///< Access currently selected string option
void reset(bool factory = false) { m_value = factory ? m_factoryDefaultValue : m_defaultValue; } ///< Reset to default
void makeSystem() { m_defaultValue = m_value; } ///< Make current value the system default (used when saving system config)
std::string getValue() const; ///< Get a human-readable representation of the current value
@@ -49,6 +53,7 @@ class ConfigItem {
boost::variant<int, double> m_step, m_min, m_max;
boost::variant<int, double> m_multiplier;
std::string m_unit;
+ int m_sel;
};
typedef std::map<std::string, ConfigItem> Config;
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:22
|
Module: performous
Branch: master
Commit: 0924083b33d935cc3b9f1862cc263276138353f1
Author: Vincent Le Ligeour <yo...@us...>
Date: Mon Aug 16 22:12:00 2010 +0200
Moved/removed libs/* into game/
---
CMakeLists.txt | 7 -
game/CMakeLists.txt | 4 -
game/audio.cc | 4 +-
game/configuration.cc | 2 +-
{libs/plugin++/src => game}/execname.cc | 2 +-
.../include/plugin++ => game}/execname.hpp | 0
game/ffmpeg.hh | 2 +-
game/fs.cc | 2 +-
{libs/libda/include => game}/libda/fft.hpp | 0
{libs/libda/include => game}/libda/mixer.hpp | 0
{libs/libda/include => game}/libda/portaudio.hpp | 0
{libs/libda/include => game}/libda/sample.hpp | 0
game/pitch.cc | 2 +-
libs/CMakeLists.txt | 7 -
libs/plugin++/CMakeLists.txt | 70 ----
libs/plugin++/cmake/CMakeLists.txt | 11 -
libs/plugin++/cmake/Modules/FindBoost.cmake | 413 --------------------
libs/plugin++/cmake/Modules/FindDL.cmake | 23 --
libs/plugin++/cmake/Modules/LibFindMacros.cmake | 76 ----
libs/plugin++/cmake/Plugin++Config.cmake.in | 10 -
libs/plugin++/cmake/Plugin++ConfigVersion.cmake.in | 13 -
libs/plugin++/cmake/config.h.in | 9 -
libs/plugin++/cmake/plugin++-packaging.cmake | 61 ---
libs/plugin++/include/plugin++/dll.hpp | 40 --
libs/plugin++/include/plugin++/loader.hpp | 24 --
libs/plugin++/include/plugin++/plugin.hpp | 157 --------
libs/plugin++/src/dll.cc | 40 --
libs/plugin++/src/loader.cc | 74 ----
28 files changed, 7 insertions(+), 1046 deletions(-)
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:19
|
Module: performous
Branch: master
Commit: db8ea4dfbc027014e2ee21beb77bbe13a1eb2163
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Aug 15 16:51:02 2010 +0200
Fixed use of new joystick code
---
game/joystick.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 9c4c468..bbe21c6 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -817,7 +817,7 @@ bool input::SDL::pushEvent(SDL_Event _e) {
if (event.nav != input::NONE) {
event.button = 0;
event.type = input::Event::PRESS;
- devices[joy_id].addEvent(event);
+ devices.find(joy_id)->second.addEvent(event);
}
return false;
}
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:17
|
Module: performous Branch: master Commit: a574fa87bd49c6cf2e7d297aef433b6fff82fcf5 Author: Vincent Le Ligeour <yo...@us...> Date: Sun Aug 15 16:50:29 2010 +0200 Merge branch 'master' into joinmenu Conflicts: game/screen_intro.cc --- |
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:15
|
Module: performous Branch: master Commit: 47fe51cbf64ef3da94b871462e4ff335ef25a04e Author: Tapio Vierros <tap...@gm...> Date: Thu Aug 12 23:53:10 2010 +0300 Merge branch 'master' into joinmenu --- |
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:12
|
Module: performous
Branch: master
Commit: d822381614709afffd8483d97a2fd8ac36def4d9
Author: Tapio Vierros <tap...@gm...>
Date: Fri Aug 6 23:21:23 2010 +0300
Join menu size now adapts according to instrument count.
---
game/instrumentgraph.cc | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/game/instrumentgraph.cc b/game/instrumentgraph.cc
index 399f579..3fc4490 100644
--- a/game/instrumentgraph.cc
+++ b/game/instrumentgraph.cc
@@ -1,6 +1,7 @@
#include "instrumentgraph.hh"
#include "i18n.hh"
#include "screen.hh"
+#include "glutil.hh"
//const unsigned InstrumentGraph::max_panels = 10; // Maximum number of arrow lines / guitar frets
@@ -59,12 +60,18 @@ void InstrumentGraph::drawMenu() {
if (m_menu.empty()) return;
Dimensions dimensions(1.0); // FIXME: bogus aspect ratio (is this fixable?)
if (getGraphType() == input::DANCEPAD) dimensions.screenTop().middle(m_cx.get()).stretch(m_width.get(), 1.0);
- else dimensions.screenBottom().middle(m_cx.get()).fixedWidth(std::min(m_width.get(),0.5));
+ else dimensions.screenBottom().middle(m_cx.get()).fixedWidth(std::min(m_width.get(), 0.5));
// Some helper vars
ThemeInstrumentMenu& th = *m_menuTheme;
MenuOptions::const_iterator cur = static_cast<MenuOptions::const_iterator>(&m_menu.current());
+ glutil::PushMatrix pm; // Save scaling state
+ float s = m_width.get();
+ s = (s > 0.49f ? 1.0f : s + 0.3f); // Full scale with 1 or 2 instruments
+ glScalef(s, s, 1.0f);
+ // We need to multiply offset by inverse scale factor to keep it always constant
+ const double offsetX = 0.5f * (dimensions.x1() + dimensions.x2()) / s;
+ // All these vars are ultimately affected by the scaling matrix
double w = m_menu.dimensions.w();
- const double offsetX = 0.5f * (dimensions.x1() + dimensions.x2());
const float txth = th.option.h();
const float button_margin = (getGraphType() == input::DANCEPAD ? 0.0f : 0.05f);
const float step = txth * 0.7f;
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:09
|
Module: performous
Branch: master
Commit: 42ea1b7aea14a9b0ebf6a40b95e4548c7e308a35
Author: Tapio Vierros <tap...@gm...>
Date: Tue Aug 3 17:04:44 2010 +0300
Fix dance menu margins, since it doesn't (yet?) have icons.
---
game/instrumentgraph.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/instrumentgraph.cc b/game/instrumentgraph.cc
index b5afc91..399f579 100644
--- a/game/instrumentgraph.cc
+++ b/game/instrumentgraph.cc
@@ -66,7 +66,7 @@ void InstrumentGraph::drawMenu() {
double w = m_menu.dimensions.w();
const double offsetX = 0.5f * (dimensions.x1() + dimensions.x2());
const float txth = th.option.h();
- const float button_margin = 0.05f;
+ const float button_margin = (getGraphType() == input::DANCEPAD ? 0.0f : 0.05f);
const float step = txth * 0.7f;
const float h = m_menu.getOptions().size() * step + step;
float y = -h * .5f + step;
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:04:07
|
Module: performous Branch: master Commit: 96e9c43548d43dbfa8b40361e30643892c33f304 Author: Tapio Vierros <tap...@gm...> Date: Tue Aug 3 14:33:58 2010 +0300 Merge branch 'master' into joinmenu Conflicts: game/instrumentgraph.hh --- |