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-21 18:02:59
|
Module: performous
Branch: master
Commit: db8e0e4ab54c3fd063d036dbc8e388d0d4b77980
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jul 7 20:03:20 2010 +0300
Use getters for Menu's current and options + add some helpers.
---
game/instrumentgraph.cc | 15 +++++++++------
game/menu.cc | 28 ++++++++++++++--------------
game/menu.hh | 14 +++++++++++---
game/screen_intro.cc | 10 +++++-----
4 files changed, 39 insertions(+), 28 deletions(-)
diff --git a/game/instrumentgraph.cc b/game/instrumentgraph.cc
index 72b4ebb..b6a71f4 100644
--- a/game/instrumentgraph.cc
+++ b/game/instrumentgraph.cc
@@ -56,13 +56,16 @@ void InstrumentGraph::toggleMenu(bool forceopen) {
void InstrumentGraph::drawMenu(double offsetX) {
- if (m_menu.options.empty()) return;
+ if (m_menu.empty()) return;
float step = 0.075;
- float y = -0.5 * m_menu.options.size() * step;
+ float y = -0.5 * m_menu.getOptions().size() * step;
+ // Some helper vars
ThemeInstrumentMenu& th = *m_menuTheme;
- for (MenuOptions::iterator it = m_menu.options.begin(); it != m_menu.options.end(); ++it) {
+ MenuOptions::const_iterator cur = m_menu.current();
+ // Loop through menu items
+ for (MenuOptions::const_iterator it = m_menu.begin(); it != m_menu.end(); ++it) {
SvgTxtTheme* txt = &th.option;
- if (m_menu.current == it) {
+ if (cur == it) {
//th.back_h.dimensions.middle(0.05 + offsetX).center(y);
//th.back_h.draw();
txt = &th.option_selected;
@@ -72,11 +75,11 @@ void InstrumentGraph::drawMenu(double offsetX) {
y += step;
}
- if (m_menu.current->comment != "") {
+ if (cur->comment != "") {
//th.comment_bg.dimensions.middle().screenBottom(-0.2);
//th.comment_bg.draw();
th.comment.dimensions.middle(-0.1 + offsetX).screenBottom(-0.2);
- th.comment.draw(m_menu.current->comment);
+ th.comment.draw(cur->comment);
}
}
diff --git a/game/menu.cc b/game/menu.cc
index 9d3d625..d01b578 100755
--- a/game/menu.cc
+++ b/game/menu.cc
@@ -53,41 +53,41 @@ MenuOption::MenuOption(const std::string& nm, const std::string& comm, const std
void Menu::add(MenuOption opt) {
root_options.push_back(opt);
- options = root_options; // Set current menu to root
- current = options.begin(); // Reset iterator
+ options = root_options; // Set active menu to root
+ current_it = options.begin(); // Reset iterator
}
void Menu::move(int dir) {
- if (dir > 0 && current != (--options.end())) ++current;
- else if (dir < 0 && current != options.begin()) --current;
+ if (dir > 0 && current_it != (--options.end())) ++current_it;
+ else if (dir < 0 && current_it != options.begin()) --current_it;
}
void Menu::action(int dir) {
- switch (current->type) {
+ switch (current_it->type) {
case MenuOption::OPEN_SUBMENU:
- options = current->options;
- current = options.begin();
+ options = current_it->options;
+ current_it = options.begin();
m_level++;
break;
case MenuOption::CHANGE_VALUE:
- if (current->value) {
- if (dir > 0) ++(*(current->value));
- else if (dir < 0) --(*(current->value));
+ if (current_it->value) {
+ if (dir > 0) ++(*(current_it->value));
+ else if (dir < 0) --(*(current_it->value));
}
break;
case MenuOption::SET_AND_CLOSE:
- if (current->value) *(current->value) = current->newValue;
+ if (current_it->value) *(current_it->value) = current_it->newValue;
// Fall-through to closing
case MenuOption::CLOSE_SUBMENU:
// TODO: Handle more than one level of submenus
if (m_level == 0) close();
else m_level--;
options = root_options;
- current = options.begin();
+ current_it = options.begin();
break;
case MenuOption::ACTIVATE_SCREEN:
ScreenManager* sm = ScreenManager::getSingletonPtr();
- std::string screen = current->newValue.s();
+ std::string screen = current_it->newValue.s();
if (screen.empty()) sm->finished();
else sm->activateScreen(screen);
break;
@@ -97,5 +97,5 @@ void Menu::action(int dir) {
void Menu::clear() {
options.clear();
root_options.clear();
- current = options.end();
+ current_it = options.end();
}
diff --git a/game/menu.hh b/game/menu.hh
index 0df839e..947feef 100755
--- a/game/menu.hh
+++ b/game/menu.hh
@@ -44,7 +44,7 @@ struct MenuOption {
/// Menu for selecting difficulty etc.
struct Menu {
/// constructor
- Menu(): current(options.end()), m_open(true), m_level(0) { }
+ Menu(): current_it(options.end()), m_open(true), m_level(0) { }
/// add a menu option
void add(MenuOption opt);
/// move the selection
@@ -54,16 +54,24 @@ struct Menu {
/// clear items
void clear();
+ bool empty() const { return options.empty(); }
bool isOpen() const { return m_open; }
void open() { m_open = true; }
void close() { m_open = false; }
void toggle() { m_open = !m_open; }
+ void moveToLast() { current_it = --(options.end()); }
+ MenuOptions::iterator& currentRef() { return current_it; }
+ const MenuOptions::const_iterator current() const { return current_it; }
+ const MenuOptions::const_iterator begin() const { return options.begin(); }
+ const MenuOptions::const_iterator end() const { return options.end(); }
+ const MenuOptions getOptions() const { return options; }
+
+ private:
+ MenuOptions::iterator current_it;
MenuOptions options;
MenuOptions root_options;
- MenuOptions::iterator current;
- private:
bool m_open;
int m_level;
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index 5fd406b..9cbff7e 100755
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -38,7 +38,7 @@ void ScreenIntro::manageEvent(SDL_Event event) {
input::NavButton nav(input::getNav(event));
if (nav != input::NONE) {
if (m_dialog) { m_dialog.reset(); return; }
- if (nav == input::CANCEL) m_menu.current = --(m_menu.options.end()); // Move cursor to quit
+ if (nav == input::CANCEL) m_menu.moveToLast(); // Move cursor to quit
else if (nav == input::DOWN || nav == input::RIGHT || nav == input::MOREDOWN) m_menu.move(1);
else if (nav == input::UP || nav == input::LEFT || nav == input::MOREUP) m_menu.move(-1);
else if (nav == input::START) m_menu.action();
@@ -48,8 +48,8 @@ void ScreenIntro::manageEvent(SDL_Event event) {
void ScreenIntro::draw_menu_options() {
int i = 0;
- for (MenuOptions::iterator it = m_menu.options.begin(); it != m_menu.options.end(); ++it, ++i) {
- if (m_menu.current == it) {
+ for (MenuOptions::const_iterator it = m_menu.begin(); it != m_menu.end(); ++it, ++i) {
+ if (m_menu.current() == it) {
theme->back_h.dimensions.left(-0.4).center(-0.097 + i*0.08);
theme->back_h.draw();
theme->option_selected.dimensions.left(-0.35).center(-0.1 + i*0.08);
@@ -63,11 +63,11 @@ void ScreenIntro::draw_menu_options() {
void ScreenIntro::draw() {
theme->bg.draw();
- m_menu.current->image->draw();
+ m_menu.current()->image->draw();
theme->comment_bg.dimensions.center().screenBottom(-0.01);
theme->comment_bg.draw();
theme->comment.dimensions.left(-0.48).screenBottom(-0.028);
- theme->comment.draw(m_menu.current->comment);
+ theme->comment.draw(m_menu.current()->comment);
draw_menu_options();
if (m_dialog) m_dialog->draw();
}
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:02:56
|
Module: performous Branch: master Commit: d709b2079842e00ebd1cd513f6ef363599568125 Author: Tapio Vierros <tap...@gm...> Date: Wed Jul 7 18:43:05 2010 +0300 Add screen changer menu option type and re-implement screen_intro using it. This also allows quitting from songs. --- game/configuration.cc | 8 ++++---- game/instrumentgraph.cc | 2 +- game/menu.cc | 19 +++++++++++++++---- game/menu.hh | 26 ++++++++------------------ game/screen_intro.cc | 43 ++++++++++++++++++++----------------------- game/screen_intro.hh | 3 +-- game/theme.cc | 5 +---- game/theme.hh | 2 +- 8 files changed, 51 insertions(+), 57 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:02:53
|
Module: performous
Branch: master
Commit: 47e8b7b1325537952e7ddbd64d6708173d72c46b
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jul 7 18:02:16 2010 +0300
Implement exit from menu root, enables joining game.
---
game/dancegraph.cc | 7 ++++---
game/guitargraph.cc | 9 +++++----
game/instrumentgraph.cc | 14 ++++++++------
game/instrumentgraph.hh | 6 +++---
game/menu.cc | 10 +++++++++-
game/menu.hh | 14 ++++++++++++--
game/screen_sing.cc | 4 ++--
7 files changed, 43 insertions(+), 21 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index cbf296b..9da8c40 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -188,6 +188,7 @@ void DanceGraph::difficulty(DanceDifficulty level) {
void DanceGraph::engine() {
double time = m_audio.getPosition();
time -= config["audio/controller_delay"].f();
+ doUpdates();
for (Song::Stops::const_iterator it = m_song.stops.begin(), end = m_song.stops.end(); it != end; ++it) {
if (it->first >= time) break;
if (time < it->first + it->second) { time = it->first; break; } // Inside stop
@@ -203,8 +204,8 @@ void DanceGraph::engine() {
break;
}
// Menu keys
- if (m_menuOpen && ev.type == input::Event::PRESS) {
- if (ev.nav == input::CANCEL) toggleMenu();
+ if (menuOpen() && ev.type == input::Event::PRESS) {
+ if (ev.nav == input::CANCEL) m_menu.close();
else if (ev.nav == input::RIGHT || ev.nav == input::START) m_menu.action(1);
else if (ev.nav == input::LEFT) m_menu.action(-1);
else if (ev.nav == input::UP) m_menu.move(-1);
@@ -477,7 +478,7 @@ void DanceGraph::drawNote(DanceNote& note, double time) {
/// Draw popups and other info texts
void DanceGraph::drawInfo(double time, double offsetX, Dimensions dimensions) {
- if (m_menuOpen) {
+ if (menuOpen()) {
// Draw join menu
drawMenu(offsetX);
} else {
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 8edb882..dc38224 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -206,6 +206,7 @@ bool GuitarGraph::difficulty(Difficulty level) {
void GuitarGraph::engine() {
double time = m_audio.getPosition();
time -= config["audio/controller_delay"].f();
+ doUpdates();
// Handle key markers
if (!m_drums) {
for (int i = 0; i < m_pads; ++i) {
@@ -229,8 +230,8 @@ void GuitarGraph::engine() {
break;
}
// Handle Start/Select keypresses
- if (ev.nav == input::CANCEL) toggleMenu();
- if (ev.nav == input::START && !m_menuOpen) ev.button = input::STARPOWER_BUTTON;
+ 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;
@@ -251,7 +252,7 @@ void GuitarGraph::engine() {
if (ev.type == input::Event::PRESS) m_pressed_anim[!m_drums + ev.button].setValue(1.0);
else if (ev.type == input::Event::PICK) m_pressed_anim[0].setValue(1.0);
// Menu keys
- if (m_menuOpen) {
+ if (menuOpen()) {
// Check first regular keys
if (ev.type == input::Event::PRESS && ev.button == 0 + m_drums) m_menu.action(1);
else if (ev.type == input::Event::PRESS && ev.button == 1 + m_drums) m_menu.action(-1);
@@ -1011,7 +1012,7 @@ void GuitarGraph::drawDrumfill(float tBeg, float tEnd) {
/// Draw popups and other info texts
void GuitarGraph::drawInfo(double time, double offsetX, Dimensions dimensions) {
// Draw info
- if (m_menuOpen) {
+ if (menuOpen()) {
drawMenu(offsetX);
} else {
float xcor = 0.35 * dimensions.w();
diff --git a/game/instrumentgraph.cc b/game/instrumentgraph.cc
index c999c24..ee789b6 100644
--- a/game/instrumentgraph.cc
+++ b/game/instrumentgraph.cc
@@ -9,7 +9,6 @@ InstrumentGraph::InstrumentGraph(Audio& audio, Song const& song, input::DevType
m_stream(),
m_cx(0.0, 0.2), m_width(0.5, 0.4),
m_menu(),
- m_menuOpen(true),
m_text(getThemePath("sing_timetxt.svg"), config["graphic/text_lod"].f()),
m_pads(),
m_correctness(0.0, 5.0),
@@ -27,7 +26,6 @@ InstrumentGraph::InstrumentGraph(Audio& audio, Song const& song, input::DevType
m_menuTheme.reset(new ThemeInstrumentMenu());
// Populate joining menu
- // TODO: Replace with option that actually does something
m_menu.add(MenuOption(_("Ready!"), _("Start performing!")));
// Guitar- / dancegraph specific options can be added in their constructors
}
@@ -43,13 +41,17 @@ void InstrumentGraph::setupPauseMenu() {
}
-void InstrumentGraph::toggleMenu(int dontforce) {
- if (dontforce == 0) { m_menuOpen = true; return; }
- if (m_menuOpen && !m_ready) {
+void InstrumentGraph::doUpdates() {
+ if (!menuOpen() && !m_ready) {
m_ready = true;
setupPauseMenu();
}
- m_menuOpen = !m_menuOpen;
+}
+
+
+void InstrumentGraph::toggleMenu(bool forceopen) {
+ if (forceopen) { m_menu.open(); return; }
+ m_menu.toggle();
}
diff --git a/game/instrumentgraph.hh b/game/instrumentgraph.hh
index 931ae07..31b5fe0 100644
--- a/game/instrumentgraph.hh
+++ b/game/instrumentgraph.hh
@@ -74,7 +74,8 @@ class InstrumentGraph {
virtual void changeTrack(int dir = 1) = 0;
virtual void changeDifficulty(int dir = 1) = 0;
- void toggleMenu(int dontforce = 1);
+ void doUpdates();
+ void toggleMenu(bool forceopen = false);
void togglePause(int) { m_audio.togglePause(); }
void restart(int) { /* TODO: Implement */ }
void quit(int) { ScreenManager::getSingletonPtr()->activateScreen("Songs"); }
@@ -82,7 +83,7 @@ class InstrumentGraph {
// General getters
bool ready() const { return m_ready; };
- bool menuOpen() const { return m_menuOpen; }
+ bool menuOpen() const { return m_menu.isOpen(); }
void position(double cx, double width) { m_cx.setTarget(cx); m_width.setTarget(width); }
unsigned stream() const { return m_stream; }
double correctness() const { return m_correctness.get(); }
@@ -110,7 +111,6 @@ class InstrumentGraph {
typedef std::vector<Popup> Popups;
Popups m_popups;
Menu m_menu;
- bool m_menuOpen;
// Shared functions for derived classes
void setupPauseMenu();
diff --git a/game/menu.cc b/game/menu.cc
index 13f0f7c..dde8d3e 100755
--- a/game/menu.cc
+++ b/game/menu.cc
@@ -62,6 +62,7 @@ void Menu::action(int dir) {
case MenuOption::OPEN_SUBMENU:
options = current->options;
current = options.begin();
+ m_level++;
break;
case MenuOption::CHANGE_VALUE:
if (current->value) {
@@ -74,9 +75,16 @@ void Menu::action(int dir) {
// Fall-through to closing
case MenuOption::CLOSE_SUBMENU:
// TODO: Handle more than one level of submenus
- // TODO: Closing root menu should signal that the menu is closing
+ if (m_level == 0) close();
+ else m_level--;
options = root_options;
current = options.begin();
break;
}
}
+
+void Menu::clear() {
+ options.clear();
+ root_options.clear();
+ current = options.end();
+}
diff --git a/game/menu.hh b/game/menu.hh
index ec0160c..ef89280 100755
--- a/game/menu.hh
+++ b/game/menu.hh
@@ -54,7 +54,7 @@ struct MainMenuOption {
/// Menu for selecting difficulty etc.
struct Menu {
/// constructor
- Menu(): current(options.end()) { }
+ Menu(): current(options.end()), m_open(true), m_level(0) { }
/// add a menu option
void add(MenuOption opt);
/// move the selection
@@ -62,9 +62,19 @@ struct Menu {
/// adjust the selected value
void action(int dir = 1);
/// clear items
- void clear() { options.clear(); }
+ void clear();
+
+ bool isOpen() const { return m_open; }
+ void open() { m_open = true; }
+ void close() { m_open = false; }
+ void toggle() { m_open = !m_open; }
MenuOptions options;
MenuOptions root_options;
MenuOptions::iterator current;
+
+ private:
+ bool m_open;
+ int m_level;
+
};
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 63d94f2..75a0e14 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -248,8 +248,8 @@ void ScreenSing::manageEvent(SDL_Event event) {
}
// Esc-key needs special handling, it is global pause
if (event.type == SDL_KEYDOWN && key == SDLK_ESCAPE && !m_audio.isPaused()) {
- for (Instruments::iterator it = m_instruments.begin(); it != m_instruments.end(); ++it) it->toggleMenu(1);
- for (Dancers::iterator it = m_dancers.begin(); it != m_dancers.end(); ++it) it->toggleMenu(1);
+ for (Instruments::iterator it = m_instruments.begin(); it != m_instruments.end(); ++it) it->toggleMenu(true);
+ for (Dancers::iterator it = m_dancers.begin(); it != m_dancers.end(); ++it) it->toggleMenu(true);
}
// Start button has special functions for skipping things (only in singing for now)
if (nav == input::START && m_only_singers_alive && !m_song->vocals.notes.empty() && !m_audio.isPaused()) {
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:02:51
|
Module: performous Branch: master Commit: 0e80e0d08d39bfbede80ac794e4166297b48f745 Author: Tapio Vierros <tap...@gm...> Date: Wed Jul 7 00:34:52 2010 +0300 Rewrite menu system. * Much more generic - No more member function pointers to InstrumentGraph - Use pointers to ConfigItems instead * Introduce submenu concept - Only one additional level for now * Introduce "set specific value and exit submenu" option type * "Change value" option type still available (for numeric ConfigItems) * Theme is outside of Menu structure * Breaks functionality for now - Exiting not root menu not implemented - Proper difficulty/track selection + pause menu population N/A - Some ConfigItems needs to be added to InstrumentGraph --- game/configuration.cc | 10 +++++ game/configuration.hh | 4 ++ game/dancegraph.cc | 19 +++++++--- game/guitargraph.cc | 19 +++++++--- game/instrumentgraph.cc | 29 +++++++++------- game/instrumentgraph.hh | 4 ++- game/menu.cc | 86 +++++++++++++++++++++++++++++++--------------- game/menu.hh | 63 +++++++++++++++++----------------- 8 files changed, 148 insertions(+), 86 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:02:48
|
Module: performous
Branch: master
Commit: 464fd8db834388590beefac936fc1282de6890f1
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jun 23 21:17:06 2010 +0300
Theming support for instrument menu.
* Uses SVGs from main menu for place holders.
- Not very well suited.
* Background images are disabled.
- Waiting for proper pics to tune them with.
---
game/instrumentgraph.cc | 24 +++++++++++++++---------
game/menu.hh | 5 ++++-
game/theme.cc | 4 +---
game/theme.hh | 2 +-
4 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/game/instrumentgraph.cc b/game/instrumentgraph.cc
index 1c31753..470af9c 100644
--- a/game/instrumentgraph.cc
+++ b/game/instrumentgraph.cc
@@ -52,20 +52,26 @@ void InstrumentGraph::toggleMenu(int dontforce) {
void InstrumentGraph::drawMenu(double offsetX) {
if (m_menu.options.empty()) return;
- float step = 0.05;
+ float step = 0.075;
float y = -0.5 * m_menu.options.size() * step;
- m_text.dimensions.screenCenter(0).middle(0);
+ ThemeInstrumentMenu& th = *m_menu.theme;
for (InstrumentMenuOptions::iterator it = m_menu.options.begin(); it != m_menu.options.end(); ++it) {
- // TODO: Use theme
- m_text.dimensions.center(y).middle(-0.09 + offsetX);
- std::string value = it->value;
- if (m_menu.current == it) value = "> " + value + " <";
- m_text.draw(value);
+ if (m_menu.current == it) {
+ //th.back_h.dimensions.middle(0.05 + offsetX).center(y);
+ //th.back_h.draw();
+ th.option_selected.dimensions.middle(-0.1 + offsetX).center(y);
+ th.option_selected.draw(it->value);
+ } else {
+ th.option.dimensions.middle(-0.1 + offsetX).center(y);
+ th.option.draw(it->value);
+ }
y += step;
}
if (m_menu.current->comment != "") {
- m_text.dimensions.center(y+3*step).middle(-0.09 + offsetX);
- m_text.draw(m_menu.current->comment);
+ //th.comment_bg.dimensions.middle().screenBottom(-0.2);
+ //th.comment_bg.draw();
+ th.comment.dimensions.middle(-0.1 + offsetX).screenBottom(-0.2);
+ th.comment.draw(m_menu.current->comment);
}
}
diff --git a/game/menu.hh b/game/menu.hh
index 7afb371..7ebe636 100755
--- a/game/menu.hh
+++ b/game/menu.hh
@@ -2,7 +2,9 @@
#include "opengl_text.hh"
#include "surface.hh"
+#include "theme.hh"
#include <boost/noncopyable.hpp>
+#include <boost/scoped_ptr.hpp>
#include <string>
#include <vector>
@@ -50,7 +52,7 @@ typedef std::vector<InstrumentMenuOption> InstrumentMenuOptions;
/// Menu for selecting difficulty etc.
struct InstrumentMenu {
/// constructor
- InstrumentMenu(InstrumentGraph& ig): owner(ig), current(options.end()) {}
+ InstrumentMenu(InstrumentGraph& ig): owner(ig), current(options.end()) { theme.reset(new ThemeInstrumentMenu()); }
/// add a menu option
void add(InstrumentMenuOption opt);
/// move the selection
@@ -65,4 +67,5 @@ struct InstrumentMenu {
InstrumentGraph& owner;
InstrumentMenuOptions options;
InstrumentMenuOptions::iterator current;
+ boost::scoped_ptr<ThemeInstrumentMenu> theme;
};
diff --git a/game/theme.cc b/game/theme.cc
index e583b1d..24add72 100755
--- a/game/theme.cc
+++ b/game/theme.cc
@@ -63,12 +63,10 @@ ThemeIntro::ThemeIntro():
ThemeInstrumentMenu::ThemeInstrumentMenu():
Theme(getThemePath("warning.svg")),
back_h(getThemePath("menu_back_highlight.svg")),
+ option(getThemePath("menu_option.svg"), config["graphic/text_lod"].f()),
option_selected(getThemePath("menu_option_selected.svg"), config["graphic/text_lod"].f()),
comment(getThemePath("menu_comment.svg"), config["graphic/text_lod"].f()),
comment_bg(getThemePath("menu_comment_bg.svg"))
{
back_h.dimensions.fixedHeight(0.08f);
- option.push_back(new SvgTxtTheme(getThemePath("menu_option.svg"), config["graphic/text_lod"].f()));
- option.push_back(new SvgTxtTheme(getThemePath("menu_option.svg"), config["graphic/text_lod"].f()));
- option.push_back(new SvgTxtTheme(getThemePath("menu_option.svg"), config["graphic/text_lod"].f()));
}
diff --git a/game/theme.hh b/game/theme.hh
index 0e3e042..c1c9ffa 100755
--- a/game/theme.hh
+++ b/game/theme.hh
@@ -97,7 +97,7 @@ struct ThemeInstrumentMenu: Theme {
/// back highlight for selected option
Surface back_h;
/// menu option text
- boost::ptr_vector<SvgTxtTheme> option;
+ SvgTxtTheme option;
/// menu selected option text
SvgTxtTheme option_selected;
/// menu comment text
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:02:46
|
Module: performous Branch: master Commit: 0a988dc055e2e306be14ea5fd031e067af5d7eed Author: Tapio Vierros <tap...@gm...> Date: Tue Jun 22 21:50:59 2010 +0300 Work on instrument menu. * Pause menu. - Game pauses if any menus are open. - Currently only resume and quit actions. * Esc-key invokes global pause (menus for all). * Game doesn't start if players aren't ready. * InstrumentMenuOption doesn't have to have getter func. * Added i18n stuff. * Still looks butt-ugly. * Much cleaning required, with heavy duty chemicals. --- game/dancegraph.cc | 24 +++++++++--------- game/guitargraph.cc | 34 ++++++++++++++++----------- game/instrumentgraph.cc | 54 +++++++++++++++++++++++++++++++++++++++++- game/instrumentgraph.hh | 32 ++++++++++--------------- game/joystick.cc | 5 ++++ game/menu.cc | 32 ++++++++++++++++-------- game/menu.hh | 13 +++++++--- game/screen_sing.cc | 59 ++++++++++++++++++++++++++++++++-------------- 8 files changed, 173 insertions(+), 80 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-21 18:02:46
|
Module: performous Branch: master Commit: e27a92d4d2efa8c5943a11fd4392ad6ffb2f0344 Author: Tapio Vierros <tap...@gm...> Date: Mon Jun 21 22:30:36 2010 +0300 Initial implementation of instrument joining menu. * Currently only two options, track and difficulty. * Visual output is very crude placeholder. * Guitars, drums and dancepads supported. * Theming system is not yet used (although some code exists). * input::Event now holds also translated NavButton enum. * Especially keyboard guitar controls need love. * Much clean-up required and room for guitar/dance unification. * Doesn't yet wait for players' choices. New options are added to the menu by giving description and two pointers to InstrumentGraph member functions: 1. void adjust(int dir) - execute for option change 2. string getValue() - returns the display value --- game/dancegraph.cc | 39 +++++++++++++++++++---------------- game/dancegraph.hh | 4 +- game/guitargraph.cc | 52 +++++++++++++++++++++++++++------------------- game/guitargraph.hh | 2 + game/instrumentgraph.cc | 18 ++++++++++++++++ game/instrumentgraph.hh | 7 ++++++ game/joystick.cc | 34 ++++++++++++++++-------------- game/joystick.hh | 1 + game/menu.cc | 37 +++++++++++++++++++++++++++++--- game/menu.hh | 45 +++++++++++++++++++++++++++++++++++++++- game/screen_intro.cc | 8 +++--- game/screen_intro.hh | 4 +- game/screen_sing.cc | 4 +- game/theme.cc | 13 +++++++++++ game/theme.hh | 15 +++++++++++++ 15 files changed, 212 insertions(+), 71 deletions(-) |
|
From: Arto Seppä <za...@us...> - 2010-08-21 17:23:46
|
Module: performous Branch: master Commit: 1a7670c2e4c4254e1c0125c1755007be7ccd79cd Author: Arto Seppä <za...@us...> Date: Sat Aug 21 20:14:46 2010 +0300 Bumped version number to 0.5.1+ --- osx-utils/resources/Info.plist | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osx-utils/resources/Info.plist b/osx-utils/resources/Info.plist index b1528ca..debdc62 100644 --- a/osx-utils/resources/Info.plist +++ b/osx-utils/resources/Info.plist @@ -19,11 +19,11 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>0.5.0</string> + <string>0.5.1+</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>0.5.0</string> + <string>0.5.1+</string> <key>LSUIElement</key> <false/> <key>NSHumanReadableCopyright</key> |
|
From: Arto Seppä <za...@us...> - 2010-08-21 17:23:44
|
Module: performous Branch: master Commit: 98a815587e6d239c017b3e18912cbd333325921e Author: Arto Seppä <za...@us...> Date: Sat Aug 21 19:28:41 2010 +0300 Modified launch script to circumvent a possible crash bug. --- osx-utils/resources/performous-launcher | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/osx-utils/resources/performous-launcher b/osx-utils/resources/performous-launcher index 102dad7..b2680a0 100755 --- a/osx-utils/resources/performous-launcher +++ b/osx-utils/resources/performous-launcher @@ -3,7 +3,8 @@ dir=$(dirname "$0") export PATH=$PATH:"$dir" export FONTCONFIG_PATH="$dir/../Resources/etc/fonts" -# somehow this doesn't work on a MacBookPro under 10.5.8: -#performous 2>&1 --pdev pa19 --mics pa19 +# Without this line, pixbuf tries to use the config file from macports +# environment. Apparently it works just fine without it too. +export GDK_PIXBUF_MODULE_FILE="" # TODO: might be a good idea to turn-off all console output performous |
|
From: Yoda-JM <yo...@us...> - 2010-08-21 16:17:08
|
Module: performous Branch: master Commit: b4b5685d52925e10e34428c6e5083b15905f1d5e Author: Vincent Le Ligeour <yo...@us...> Date: Sat Aug 21 18:11:56 2010 +0200 Removed unused pattern from theme files --- game/main.cc | 1 - themes/default/band_cover.svg | 14 -------------- themes/default/dance_cover.svg | 32 -------------------------------- themes/default/instrument_cover.svg | 14 -------------- themes/default/instruments.svg | 16 ---------------- themes/default/no_cover.svg | 14 -------------- themes/default/no_player_image.svg | 16 ---------------- 7 files changed, 0 insertions(+), 107 deletions(-) |
|
From: Yoda-JM <yo...@us...> - 2010-08-21 16:12:34
|
Module: performous Branch: joinmenu Commit: ca85963e75ce39e4c9a6b605378a08c682016c74 Author: Vincent Le Ligeour <yo...@us...> Date: Sat Aug 21 18:11:56 2010 +0200 Removed unused pattern from theme files --- game/main.cc | 1 - themes/default/band_cover.svg | 14 -------------- themes/default/dance_cover.svg | 32 -------------------------------- themes/default/instrument_cover.svg | 14 -------------- themes/default/instruments.svg | 16 ---------------- themes/default/no_cover.svg | 14 -------------- themes/default/no_player_image.svg | 16 ---------------- 7 files changed, 0 insertions(+), 107 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-21 15:37:07
|
Module: performous
Branch: master
Commit: 1a84a66b5ebb252c287dca179b0cae0fa014830e
Author: Tapio Vierros <tap...@gm...>
Date: Sat Aug 21 18:34:27 2010 +0300
Update ppa script for the removal of libs-dir and add maverick uploading.
---
tools/ppa/ppa.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/ppa/ppa.sh b/tools/ppa/ppa.sh
index 3f1fa54..7f9ad18 100755
--- a/tools/ppa/ppa.sh
+++ b/tools/ppa/ppa.sh
@@ -18,7 +18,7 @@ export DEBEMAIL="`gpg --list-keys | grep uid | sed 's/ *(.*)//; s/>.*//; s/.*[:<
PKG="performous"
PPAVERSIONNUM="1"
VERSIONCOMMON="+git"`date '+%Y%m%d'`"~ppa${PPAVERSIONNUM}"
-SUITES="lucid karmic"
+SUITES="karmic lucid maverick"
GITURL="git://git.performous.org/gitroot/performous/performous"
DESTINATIONPPA="ppa:performous-team/ppa"
@@ -37,9 +37,9 @@ PPAPATCHDIR="`pwd`"
$COPYCMD "$1/editor" "$2"
$COPYCMD "$1/game" "$2"
$COPYCMD "$1/lang" "$2"
- $COPYCMD "$1/libs" "$2"
$COPYCMD "$1/themes" "$2"
$COPYCMD "$1/tools" "$2"
+ rm -rf "$2"/libs # Old libs dir not used anymore
}
cd "$TEMPDIR"
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 14:26:49
|
Module: performous
Branch: joinmenu
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 14:12:40
|
Module: performous
Branch: master
Commit: ed94641c08123d3725bb34e71eb36ddfbbbe4ab0
Author: Tapio Vierros <tap...@gm...>
Date: Sat Aug 21 17:11:40 2010 +0300
Disable webcam video saving as it is not currently very usable.
---
game/webcam.cc | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/game/webcam.cc b/game/webcam.cc
index 1e5baa3..f1372aa 100644
--- a/game/webcam.cc
+++ b/game/webcam.cc
@@ -9,8 +9,6 @@
#include <cv.h>
#include <highgui.h>
-#define SAVE_WEBCAM_VIDEO
-
#else
// Dummy classes
namespace cv {
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 14:12:38
|
Module: performous
Branch: master
Commit: 0a01e08641b058d8aa0cbd2d49dc55280c2d9513
Author: Tapio Vierros <tap...@gm...>
Date: Sat Aug 21 17:10:24 2010 +0300
Disable "pitch shifter".
---
game/audio.cc | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/game/audio.cc b/game/audio.cc
index d4c2227..374b366 100644
--- a/game/audio.cc
+++ b/game/audio.cc
@@ -170,6 +170,8 @@ public:
Buffer mixbuf(end - begin);
for (Tracks::iterator it = tracks.begin(), itend = tracks.end(); it != itend; ++it) {
Track& t = *it->second;
+// FIXME: Include this code bit once there is a sane pitch shifting algorithm
+#if 0
// if (it->first == "guitar") std::cout << t.pitchFactor << std::endl;
if (t.pitchFactor != 0) { // Pitch shift
Buffer tempbuf(end - begin);
@@ -183,7 +185,9 @@ public:
while (b != tempbuf.end())
*m++ += (*b++);
// Otherwise just get the audio and mix it straight away
- } else if (t.mpeg.audioQueue(&*mixbuf.begin(), &*mixbuf.end(), m_pos, t.fadeLevel)) eof = false;
+ } else
+#endif
+ if (t.mpeg.audioQueue(&*mixbuf.begin(), &*mixbuf.end(), m_pos, t.fadeLevel)) eof = false;
}
m_pos += samples;
for (size_t i = 0, iend = mixbuf.size(); i != iend; ++i) {
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 14:03:32
|
Module: performous Branch: pass-through Commit: d69139dbca9fc2f37cf59fb360c70b50539677b5 Author: Tapio Vierros <tap...@gm...> Date: Fri Aug 20 22:41:34 2010 +0300 Merge branch 'master' into pass-through --- |
|
From: Tapio V. <aa...@us...> - 2010-08-21 14:03:29
|
Module: performous
Branch: pass-through
Commit: 4a3e5511507c0be47d43d01ae5e759dd96268272
Author: Tapio Vierros <tap...@gm...>
Date: Fri Aug 20 00:41:21 2010 +0300
Clean libda headers meta.
---
game/libda/fft.hpp | 18 ++++++------------
game/libda/mixer.hpp | 26 ++++++++++----------------
game/libda/portaudio.hpp | 7 ++++++-
game/libda/sample.hpp | 16 +++++-----------
4 files changed, 27 insertions(+), 40 deletions(-)
diff --git a/game/libda/fft.hpp b/game/libda/fft.hpp
index 700cdb0..55b6013 100644
--- a/game/libda/fft.hpp
+++ b/game/libda/fft.hpp
@@ -1,11 +1,8 @@
-#ifndef AUDIO_FFT_HPP_INCLUDED
-#define AUDIO_FFT_HPP_INCLUDED
+#pragma once
/**
-@file fft.hpp FFT and related facilities.
-
-Header only, no need to link with libda.
-**/
+ * @file fft.hpp FFT and related facilities.
+ */
#include <complex>
#include <cstddef>
@@ -21,7 +18,7 @@ namespace da {
/** Calculate the square of val. **/
static inline double sqr(double val) { return val * val; }
-
+
template <unsigned M, unsigned N, unsigned B, unsigned A> struct SinCosSeries {
static double value() {
return 1 - sqr(A * M_PI / B) / M / (M+1) * SinCosSeries<M + 2, N, B, A>::value();
@@ -38,14 +35,14 @@ namespace da {
template <unsigned A, unsigned B> struct Cos {
static double value() { return SinCosSeries<1, 33, B, A>::value(); }
};
-
+
/** Calculate sin(2 pi A / B). **/
template <unsigned A, unsigned B> double sin() { return Sin<A, B>::value(); }
/** Calculate cos(2 pi A / B). **/
template <unsigned A, unsigned B> double cos() { return Cos<A, B>::value(); }
}
-
+
namespace fourier {
// Based on the description of Volodymyr Myrnyy in
// http://www.dspdesignline.com/showArticle.jhtml?printableArticle=true&articleId=199903272
@@ -106,6 +103,3 @@ namespace da {
}
}
-
-#endif
-
diff --git a/game/libda/mixer.hpp b/game/libda/mixer.hpp
index 29ae38e..cfc820a 100644
--- a/game/libda/mixer.hpp
+++ b/game/libda/mixer.hpp
@@ -1,14 +1,11 @@
-#ifndef LIBDA_MIXER_HPP_INCLUDED
-#define LIBDA_MIXER_HPP_INCLUDED
+#pragma once
/**
-@file mixer.hpp LibDA mixer interface, version 1.
-
-This appears to be too complex and will probably be removed in later release in
-favor of something easier and faster.
-
-Link with libda when you use this.
-**/
+ * @file mixer.hpp LibDA mixer interface, version 1.
+ *
+ * This appears to be too complex and will probably be removed in later release in
+ * favor of something easier and faster. Actually it is not even used currently.
+ */
#include "audio.hpp"
#include <boost/scoped_ptr.hpp>
@@ -39,7 +36,7 @@ namespace da {
return shared_reference_wrapper<T>(ptr);
}
-
+
class chain: boost::noncopyable {
public:
typedef std::vector<callback_t> streams_t;
@@ -173,7 +170,7 @@ namespace da {
public:
template <typename T> scoped_lock(T& obj): boost::recursive_mutex::scoped_lock(obj.m_mutex) {}
};
-
+
class mutex_stream: boost::noncopyable {
public:
mutex_stream(callback_t const& stream): m_stream(stream) {}
@@ -191,7 +188,7 @@ namespace da {
mutable boost::recursive_mutex m_mutex;
friend class scoped_lock;
};
-
+
typedef std::auto_ptr<scoped_lock> lock_holder;
template <typename Key> class select {
@@ -215,7 +212,7 @@ namespace da {
Key m_key;
callback_t m_stream;
};
-
+
class mixer {
public:
mixer(): m_mutex(boost::ref(m_select)) { init(); }
@@ -304,6 +301,3 @@ namespace da {
boost::scoped_ptr<playback> m_playback;
};
}
-
-#endif
-
diff --git a/game/libda/portaudio.hpp b/game/libda/portaudio.hpp
index 4211545..36fb82a 100644
--- a/game/libda/portaudio.hpp
+++ b/game/libda/portaudio.hpp
@@ -1,3 +1,9 @@
+#pragma once
+
+/**
+ * @file portaudio.hpp OOP / RAII wrappers & utilities for PortAudio library.
+ */
+
#include <portaudio.h>
#include <cstdlib>
#include <stdexcept>
@@ -87,4 +93,3 @@ namespace portaudio {
};
}
-
diff --git a/game/libda/sample.hpp b/game/libda/sample.hpp
index 29383e7..f785347 100644
--- a/game/libda/sample.hpp
+++ b/game/libda/sample.hpp
@@ -1,17 +1,14 @@
-#ifndef LIBDA_SAMPLE_HPP_INCLUDED
-#define LIBDA_SAMPLE_HPP_INCLUDED
+#pragma once
/**
-@file sample.hpp Sample format definition and format conversions.
-
-Header-only, no need to link to LibDA.
-**/
+ * @file sample.hpp Sample format definition and format conversions.
+ */
namespace da {
// Implement mathematical rounding (which C++ unfortunately currently lacks)
template <typename T> T round(T val) { return static_cast<T>(static_cast<int>(val + (val >= 0 ? 0.5 : -0.5))); }
-
+
// WARNING: changing this breaks binary compatibility on the library!
typedef float sample_t;
@@ -21,7 +18,7 @@ namespace da {
if (val > max) val = max;
return val;
}
-
+
const sample_t max_s16 = 32767.0f, min_s16 = -max_s16 - 1.0f;
const sample_t max_s24 = 8388607.0f, min_s24 = -max_s24 - 1.0f;
const sample_t max_s32 = 2147483647.0f, min_s32= -max_s32 - 1.0f;
@@ -66,6 +63,3 @@ namespace da {
typedef step_iterator<sample_t> sample_iterator;
typedef step_iterator<sample_t const> sample_const_iterator;
}
-
-#endif
-
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 14:03:27
|
Module: performous
Branch: pass-through
Commit: fbb54f7f5257e4035e47799cc8fd61367ca6aa28
Author: Tapio Vierros <tap...@gm...>
Date: Thu Aug 19 19:52:36 2010 +0300
Fix audio device matching by number.
---
game/audio.cc | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/game/audio.cc b/game/audio.cc
index 9bae54f..1f33b17 100644
--- a/game/audio.cc
+++ b/game/audio.cc
@@ -406,14 +406,16 @@ struct Audio::Impl {
for (int match_partial = 0; match_partial < 2 && !skip_partial; ++match_partial) {
// Loop through the devices and try everything that matches the name
for (int i = -1; i < count && (dev < 0 || i == -1); ++i) {
- if (dev > 0 && i == -1) i = dev;
+ if (dev >= 0 && i == -1) i = dev;
else if (i == -1) continue;
PaDeviceInfo const* info = Pa_GetDeviceInfo(i);
if (!info) continue;
if (info->maxInputChannels < int(params.mics.size())) continue;
if (info->maxOutputChannels < params.out) continue;
- if (!match_partial && info->name != params.dev) continue;
- if (match_partial && std::string(info->name).find(params.dev) == std::string::npos) continue;
+ if (dev < 0) { // Try matching by name
+ if (!match_partial && info->name != params.dev) continue;
+ if (match_partial && std::string(info->name).find(params.dev) == std::string::npos) continue;
+ }
// Match found if we got here
bool device_init_threw = true;
try {
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 14:03:25
|
Module: performous Branch: pass-through Commit: 585f32044b561b4e35acf22eee9abeabe2a5e801 Author: Arto Seppä <za...@us...> Date: Thu Aug 19 09:29:25 2010 +0300 Fixed the bundling script to check for dylibbundler and to create a disk image. --- osx-utils/performous-app-build.sh | 45 ++++++++++++++++++++++++------------ 1 files changed, 30 insertions(+), 15 deletions(-) diff --git a/osx-utils/performous-app-build.sh b/osx-utils/performous-app-build.sh index f775964..6f66224 100755 --- a/osx-utils/performous-app-build.sh +++ b/osx-utils/performous-app-build.sh @@ -1,24 +1,39 @@ +# the very first step is to check that dylibbundler exists, +# without it the bundle would be broken +if which dylibbundler &> /dev/null; then + echo "dylibbundler found!" +else + echo "dylibbundler not found! you need to install it before creating the bundle." + exit +fi + +# first compile performous, build dir shouldn't exist at this stage mkdir build cd build -cmake ../../ -DCMAKE_INSTALL_PREFIX=./Performous.app/Contents +cmake ../../ -DCMAKE_INSTALL_PREFIX=./out/Performous.app/Contents make install -mkdir Performous.app/Contents/MacOS -mkdir Performous.app/Contents/Resources -mkdir Performous.app/Contents/Frameworks +# then create the rest of the app bundle + +mkdir out/Performous.app/Contents/MacOS +mkdir out/Performous.app/Contents/Resources +mkdir out/Performous.app/Contents/Frameworks + +mv out/Performous.app/Contents/bin/* out/Performous.app/Contents/MacOS/ -mv Performous.app/Contents/bin/* Performous.app/Contents/MacOS/ +cp ../resources/performous-launcher out/Performous.app/Contents/MacOS/ +cp ../resources/performous.icns out/Performous.app/Contents/Resources +cp ../resources/Info.plist out/Performous.app/Contents/ +cp -R ../resources/etc out/Performous.app/Contents/Resources -cp ../resources/performous-launcher Performous.app/Contents/MacOS/ -cp ../resources/performous.icns Performous.app/Contents/Resources -cp ../resources/Info.plist Performous.app/Contents/ -cp -R ../resources/etc Performous.app/Contents/Resources +cp -R /Library/Frameworks/SDL.framework out/Performous.app/Contents/Frameworks/SDL.framework -cp -R /Library/Frameworks/SDL.framework Performous.app/Contents/Frameworks/SDL.framework +dylibbundler -od -b -x ./out/Performous.app/Contents/MacOS/performous -d ./out/Performous.app/Contents/libs/ -dylibbundler -od -b -x ./Performous.app/Contents/MacOS/performous -d ./Performous.app/Contents/libs/ -dylibbundler -of -b -x ./Performous.app/Contents/lib/performous/libda-1/libda_audio_dev_jack.so -d ./Performous.app/Contents/libs -dylibbundler -of -b -x ./Performous.app/Contents/lib/performous/libda-1/libda_audio_dev_pa19.so -d ./Performous.app/Contents/libs -dylibbundler -of -b -x ./Performous.app/Contents/lib/performous/libda-1/libda_audio_dev_tone.so -d ./Performous.app/Contents/libs +# then build the disk image +ln -sf /Applications out/Applications +/usr/bin/hdiutil create -srcfolder out -volname Performous -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW RWPerformous.dmg +/usr/bin/hdiutil convert RWPerformous.dmg -format UDZO -imagekey zlib-level=9 -o Performous.dmg +rm -f RWPerformous.dmg -cd .. +cd .. \ No newline at end of file |
|
From: Tapio V. <aa...@us...> - 2010-08-21 14:03:22
|
Module: performous Branch: pass-through Commit: 84be6b91c9f4a19ca47f0ca4f947e1cb2ed19aea Author: Arto Seppä <za...@us...> Date: Wed Aug 18 20:35:03 2010 +0300 Removed some paths from fontconfig. --- osx-utils/resources/etc/fonts/fonts.conf | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/osx-utils/resources/etc/fonts/fonts.conf b/osx-utils/resources/etc/fonts/fonts.conf index 377f3e8..ce5d6fe 100644 --- a/osx-utils/resources/etc/fonts/fonts.conf +++ b/osx-utils/resources/etc/fonts/fonts.conf @@ -24,7 +24,7 @@ <!-- Font directory list --> <dir>/usr/share/fonts</dir> - <dir>/usr/X11R6/lib/X11/fonts</dir> <dir>/Library/Fonts</dir> <dir>/Network/Library/Fonts</dir> <dir>/System/Library/Fonts</dir> <dir>/opt/local/padpadpadpad/share/fonts</dir> + <dir>/usr/X11R6/lib/X11/fonts</dir> <dir>/Library/Fonts</dir> <dir>/Network/Library/Fonts</dir> <dir>/System/Library/Fonts</dir> <dir>~/.fonts</dir> <!-- @@ -70,7 +70,6 @@ <!-- Font cache directory list --> - <cachedir>/opt/local/padpadpadpad/var/cache/fontconfig</cachedir> <cachedir>~/.fontconfig</cachedir> <config> |
|
From: Tapio V. <aa...@us...> - 2010-08-21 14:03:20
|
Module: performous Branch: pass-through Commit: d69e773b065219125eb19580243b320f35109db5 Author: Vincent Le Ligeour <yo...@us...> Date: Thu Aug 19 17:26:41 2010 +0200 Modified documentation according to new stuffs --- docs/Compiling.txt | 11 +++-------- docs/DeveloperReadme.txt | 3 +-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/Compiling.txt b/docs/Compiling.txt index ef02a4b..62237c9 100644 --- a/docs/Compiling.txt +++ b/docs/Compiling.txt @@ -29,17 +29,12 @@ Dependencies: - libxml++ : XML parser, used for themes etc. - - Magick++ : loading images (some internal graphics and song cover/bg) - - - One or more of the following for audio capture and playback - * ALSA - * GStreamer - * JACK - * PortAudio v18 or v19 - * Pulseaudio + - PortAudio v19 : audio capture and playback - PortMidi (optional) for MIDI drum support + - OpenCV (optional) for webcam support + Please refer to http://performous.org/develop.html for packages to install. diff --git a/docs/DeveloperReadme.txt b/docs/DeveloperReadme.txt index f061f32..6ebe040 100644 --- a/docs/DeveloperReadme.txt +++ b/docs/DeveloperReadme.txt @@ -3,7 +3,6 @@ Where to find the files you are looking for: share/ icons and other such binary files themes/ all graphics, menu music, etc game/ the source code of the game -libda/ the source code of libda (the audio I/O library) When adding new data files, you may need to edit the CMakeLists.txt file in that folder to have CMake actually install it. When adding new source code files, @@ -26,7 +25,7 @@ You may currently access ScreenManager by a singleton, but this is discouraged and the singleton is to be removed because singletons are evil (but it is not buggy at the moment, so we are not rushing that). -Notes of the song and TXT file parsing are in song.cc/hh. +Notes of the song and music file parsing are in songparser*.cc/hh. Most other files either implement little helpers for loading and displaying images (surface), playing sound (audio), decoding video/audio (ffmpeg), |
|
From: Tapio V. <aa...@us...> - 2010-08-21 14:03:17
|
Module: performous
Branch: pass-through
Commit: 9cd1bf961dac4b8ec59dd8445eebb05a73655ec3
Author: Tapio Vierros <tap...@gm...>
Date: Thu Aug 19 17:29:07 2010 +0300
Make suggestedLatency configurable.
---
data/schema.xml | 8 ++++++++
game/audio.cc | 3 ++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/data/schema.xml b/data/schema.xml
index 6f7650f..bd0152a 100644
--- a/data/schema.xml
+++ b/data/schema.xml
@@ -161,6 +161,14 @@ to save the current settings to XML.
</entry>
<!-- Audio preferences -->
+ <entry name="audio/latency" type="float" value="0.05">
+ <ui unit=" ms" multiplier="1000" />
+ <limits min="0.0" max="0.25" step="0.005" />
+ <locale name="C">
+ <short>Suggested latency</short>
+ <long>This is a hint for the audio engine about the desired latency. Set this as low as possible while retaining clear audio playback. Requires restart.</long>
+ </locale>
+ </entry>
<entry name="audio/video_delay" type="float" value="0.06">
<ui unit=" ms" multiplier="1000" />
<limits min="-0.5" max="0.5" step="0.01" />
diff --git a/game/audio.cc b/game/audio.cc
index f86e728..9bae54f 100644
--- a/game/audio.cc
+++ b/game/audio.cc
@@ -325,7 +325,8 @@ struct Device {
Device(unsigned int in, unsigned int out, double rate, unsigned int dev):
in(in), out(out), rate(rate), dev(dev),
- stream(*this, in ? portaudio::Params().channelCount(in).device(dev) : (const PaStreamParameters*)NULL, (out ? portaudio::Params().channelCount(out).device(dev) : (const PaStreamParameters*)NULL), rate),
+ stream(*this, in ? portaudio::Params().channelCount(in).device(dev).suggestedLatency(config["audio/latency"].f()): (const PaStreamParameters*)NULL,
+ (out ? portaudio::Params().channelCount(out).device(dev).suggestedLatency(config["audio/latency"].f()) : (const PaStreamParameters*)NULL), rate),
outptr()
{
mics.resize(in);
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 14:03:15
|
Module: performous Branch: pass-through Commit: 9be568cc22e8fe09d4b6bcb7635aa0885d4b19d6 Author: Lasse Karkkainen <tro...@tr...> Date: Thu Aug 19 09:37:10 2010 +0300 Merge branch 'master' of ssh://git.performous.org/gitroot/performous/performous --- |
|
From: Tapio V. <aa...@us...> - 2010-08-21 14:03:12
|
Module: performous
Branch: pass-through
Commit: ee8ce1a3eb50a62438480265549d8299a28c28f0
Author: Lasse Karkkainen <tro...@tr...>
Date: Thu Aug 19 09:10:04 2010 +0300
Fix missing virtual destructor warning in InstrumentGraph.
---
game/instrumentgraph.hh | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/game/instrumentgraph.hh b/game/instrumentgraph.hh
index 7bc6ab8..b1e8bbb 100644
--- a/game/instrumentgraph.hh
+++ b/game/instrumentgraph.hh
@@ -76,7 +76,8 @@ class InstrumentGraph {
{
m_popupText.reset(new SvgTxtThemeSimple(getThemePath("sing_popup_text.svg"), config["graphic/text_lod"].f()));
};
-
+ virtual ~InstrumentGraph() {}
+
// Interface functions
virtual void draw(double time) = 0;
virtual void engine() = 0;
|
|
From: Tapio V. <aa...@us...> - 2010-08-21 14:03:10
|
Module: performous
Branch: joinmenu
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);
|