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: Yoda-JM <yo...@us...> - 2012-11-06 00:39:21
|
Author: Vincent Le Ligeour <yo...@us...> Date: Tue Nov 6 01:02:16 2012 +0100 fix: use controllers.hh after master merge --- game/screen_downloads.cc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/game/screen_downloads.cc b/game/screen_downloads.cc index 4a9ab76..45585b5 100644 --- a/game/screen_downloads.cc +++ b/game/screen_downloads.cc @@ -3,7 +3,7 @@ #include "audio.hh" #include "configuration.hh" #include "downloader.hh" -#include "joystick.hh" +#include "controllers.hh" #include "theme.hh" #include "i18n.hh" #include <boost/assign.hpp> |
|
From: Yoda-JM <yo...@us...> - 2012-11-06 00:39:18
|
Author: Vincent Le Ligeour <yo...@us...> Date: Tue Nov 6 00:33:22 2012 +0100 Merge remote-tracking branch 'origin/master' into torrent --- |
|
From: Yoda-JM <yo...@us...> - 2012-11-06 00:39:15
|
Author: Lasse Karkkainen <tro...@tr...> Date: Mon Nov 5 09:52:49 2012 +0200 Merge branch 'inputcleanup' Conflicts: game/controllers.cc --- |
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Nov 5 09:40:09 2012 +0200
C++11 compatibility. Do not give template parameters to std::make_pair. If you want to specify types, call std::pair constructor directly; make_pair is a helper function for automatically determining the types.
---
game/joystick.cc | 16 ++++++++--------
game/song.hh | 2 +-
game/songparser-xml.cc | 14 +++++++-------
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 21285e1..7da7aff 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -60,7 +60,7 @@ input::MidiDrums::MidiDrums(): stream(pm::findDevice(true, config["game/midi_inp
readConfig(map, getConfigDir() / "mididrums.xml");
while (detail::devices.find(devnum) != detail::devices.end()) ++devnum;
- detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(devnum, detail::InputDevPrivate(g_instruments.find("DRUMS_GUITARHERO")->second)));
+ detail::devices.insert(std::make_pair(devnum, detail::InputDevPrivate(g_instruments.find("DRUMS_GUITARHERO")->second)));
event.type = Event::PRESS;
for (unsigned int i = 0; i < BUTTONS; ++i) event.pressed[i] = false;
}
@@ -320,7 +320,7 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
input::Instrument instrument(name, devType, mapping);
instrument.match = regexp;
instrument.description = description;
- instruments.insert(std::make_pair<std::string, input::Instrument>(name, instrument));
+ instruments.insert(std::make_pair(name, instrument));
}
} catch (XMLError& e) {
int line = e.elem.get_line();
@@ -395,14 +395,14 @@ void input::SDL::init() {
std::cout << ", Hats: " << SDL_JoystickNumHats(joy) << std::endl;
if( forced_type.find(i) != forced_type.end() ) {
std::cout << " Detected as: " << forced_type.find(i)->second.description << " (forced)" << std::endl;
- input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(i, input::detail::InputDevPrivate(forced_type.find(i)->second)));
+ input::detail::devices.insert(std::make_pair(i, input::detail::InputDevPrivate(forced_type.find(i)->second)));
} else {
bool found = false;
for(input::Instruments::const_iterator it = g_instruments.begin() ; it != g_instruments.end() ; ++it) {
boost::regex sdl_name(it->second.match);
if (regex_search(name.c_str(), sdl_name)) {
std::cout << " Detected as: " << it->second.description << std::endl;
- input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(i, input::detail::InputDevPrivate(it->second)));
+ input::detail::devices.insert(std::make_pair(i, input::detail::InputDevPrivate(it->second)));
found = true;
break;
}
@@ -422,13 +422,13 @@ void input::SDL::init() {
std::clog << "controllers/info: Keyboard as dance pad controller: " << (config["game/keyboard_dancepad"].b() ? "enabled":"disabled") << std::endl;
std::clog << "controllers/info: Keyboard as keyboard controller: " << (config["game/keyboard_keyboard"].b() ? "enabled":"disabled") << std::endl;
input::SDL::sdl_devices[input::detail::KEYBOARD_ID] = NULL;
- input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(input::detail::KEYBOARD_ID, input::detail::InputDevPrivate(g_instruments.find("GUITAR_GUITARHERO")->second)));
+ input::detail::devices.insert(std::make_pair(input::detail::KEYBOARD_ID, input::detail::InputDevPrivate(g_instruments.find("GUITAR_GUITARHERO")->second)));
input::SDL::sdl_devices[input::detail::KEYBOARD_ID2] = NULL;
- input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(input::detail::KEYBOARD_ID2, input::detail::InputDevPrivate(g_instruments.find("DRUMS_GUITARHERO")->second)));
+ input::detail::devices.insert(std::make_pair(input::detail::KEYBOARD_ID2, input::detail::InputDevPrivate(g_instruments.find("DRUMS_GUITARHERO")->second)));
input::SDL::sdl_devices[input::detail::KEYBOARD_ID3] = NULL;
- input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(input::detail::KEYBOARD_ID3, input::detail::InputDevPrivate(g_instruments.find("DANCEPAD_GENERIC")->second)));
+ input::detail::devices.insert(std::make_pair(input::detail::KEYBOARD_ID3, input::detail::InputDevPrivate(g_instruments.find("DANCEPAD_GENERIC")->second)));
input::SDL::sdl_devices[input::detail::KEYBOARD_ID4] = NULL;
- input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(input::detail::KEYBOARD_ID4, input::detail::InputDevPrivate(g_instruments.find("KEYBOARD_GENERIC")->second)));
+ input::detail::devices.insert(std::make_pair(input::detail::KEYBOARD_ID4, input::detail::InputDevPrivate(g_instruments.find("KEYBOARD_GENERIC")->second)));
}
bool input::SDL::pushEvent(SDL_Event _e) {
diff --git a/game/song.hh b/game/song.hh
index a2b1b73..f219412 100644
--- a/game/song.hh
+++ b/game/song.hh
@@ -61,7 +61,7 @@ class Song: boost::noncopyable {
int randomIdx; ///< sorting index used for random order
void insertVocalTrack(std::string vocalTrack, VocalTrack track) {
eraseVocalTrack(vocalTrack);
- vocalTracks.insert(std::make_pair<std::string, VocalTrack>(vocalTrack, track));
+ vocalTracks.insert(std::make_pair(vocalTrack, track));
}
void eraseVocalTrack(std::string vocalTrack = TrackName::LEAD_VOCAL) {
vocalTracks.erase(vocalTrack);
diff --git a/game/songparser-xml.cc b/game/songparser-xml.cc
index 3237011..ab4580d 100644
--- a/game/songparser-xml.cc
+++ b/game/songparser-xml.cc
@@ -184,9 +184,9 @@ void SongParser::xmlParse() {
std::string artist = name;
if(trackNode.get_attribute("Artist")) artist = trackNode.get_attribute("Artist")->get_value();
if(name == "Player1") {
- singerList.insert(std::make_pair<std::string, std::string>("Solo 1", artist));
+ singerList.insert(std::make_pair("Solo 1", artist));
} else if(name == "Player2") {
- singerList.insert(std::make_pair<std::string, std::string>("Solo 2", artist));
+ singerList.insert(std::make_pair("Solo 2", artist));
} else {
std::cout << "Unknown track name: " << name << std::endl;
}
@@ -209,7 +209,7 @@ void SongParser::xmlParse() {
singers += " & " + it->second;
}
}
- sentencesList.insert(std::make_pair<std::string, xmlpp::NodeSet>(singers, sentences));
+ sentencesList.insert(std::make_pair(singers, sentences));
} else {
xmlpp::NodeSet tracks;
if (!dom.find("/ss:MELODY/ss:TRACK", tracks)) throw std::runtime_error("Unable to find any sentences in melody XML");
@@ -217,7 +217,7 @@ void SongParser::xmlParse() {
xmlpp::Element& trackNode = dynamic_cast<xmlpp::Element&>(**it);
std::string singer = trackNode.get_attribute("Artist")->get_value();
dom.find(trackNode, "ss:SENTENCE", sentences);
- sentencesList.insert(std::make_pair<std::string, xmlpp::NodeSet>(singer, sentences));
+ sentencesList.insert(std::make_pair(singer, sentences));
}
}
}
@@ -228,18 +228,18 @@ void SongParser::xmlParse() {
// Add group track
std::string trackSinger = sentencesList.begin()->first;
VocalTrack vocalBoth(trackSinger);
- vocalTracks.insert(std::make_pair<std::string, VocalTrack>(trackSinger, vocalBoth));
+ vocalTracks.insert(std::make_pair(trackSinger, vocalBoth));
// add each singer track
for(std::map<std::string, std::string>::const_iterator it = singerList.begin() ; it != singerList.end() ; ++it) {
trackSinger = it->second;
VocalTrack vocal(trackSinger);
- vocalTracks.insert(std::make_pair<std::string, VocalTrack>(trackSinger, vocal));
+ vocalTracks.insert(std::make_pair(trackSinger, vocal));
}
} else {
for(std::map<std::string, xmlpp::NodeSet>::const_iterator it = sentencesList.begin() ; it != sentencesList.end() ; ++it) {
std::string trackSinger = it->first;
VocalTrack vocal(trackSinger);
- vocalTracks.insert(std::make_pair<std::string, VocalTrack>(trackSinger, vocal));
+ vocalTracks.insert(std::make_pair(trackSinger, vocal));
}
}
|
|
From: Yoda-JM <yo...@us...> - 2012-11-06 00:39:08
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Nov 5 09:32:44 2012 +0200
Cleanup.
---
game/screen_sing.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 2274ac3..93f6c00 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -308,7 +308,7 @@ void ScreenSing::manageEvent(SDL_Event event) {
else if (nav == input::UP) { m_menu.move(-1); return; }
}
// Start button has special functions for skipping things (only in singing for now)
- if (nav == input::START && m_only_singers_alive && !m_song->getVocalTrack(m_selectedTrack).notes.empty() && !m_audio.isPaused()) {
+ if (nav == input::START && m_only_singers_alive && !m_layout_singer.empty() && !m_audio.isPaused()) {
// Open score dialog early
if (status == Song::FINISHED) {
m_engine->kill(); // Kill the engine thread
@@ -486,7 +486,7 @@ void ScreenSing::draw() {
statustxt = (boost::format("%02u:%02u - %s") % (t / 60) % (t % 60) % section.name).str();
} else statustxt = (boost::format("%02u:%02u") % (t / 60) % (t % 60)).str();
- if (!m_score_window.get() && m_only_singers_alive && !m_song->getVocalTrack(m_selectedTrack).notes.empty()) {
+ if (!m_score_window.get() && m_only_singers_alive && !m_layout_singer.empty()) {
if (status == Song::INSTRUMENTAL_BREAK) statustxt += _(" ENTER to skip instrumental break");
if (status == Song::FINISHED && !config["game/karaoke_mode"].b()) statustxt += _(" Remember to wait for grading!");
}
|
|
From: Yoda-JM <yo...@us...> - 2012-11-06 00:39:04
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Nov 5 09:30:37 2012 +0200
Fix skipping over instrumental breaks in duet.
---
game/screen_sing.cc | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index cc09f77..2274ac3 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -318,8 +318,12 @@ void ScreenSing::manageEvent(SDL_Event event) {
else if (status == Song::INSTRUMENTAL_BREAK) {
if (time < 0) m_audio.seek(0.0);
else {
- // FIXME: Should check for all layout singers
- double diff = m_layout_singer[0].lyrics_begin() - 3.0 - time;
+ // TODO: Instead of calculating here, calculate instrumental breaks right after song loading and store in Song data structures
+ double diff = getNaN();
+ for (size_t i = 0; i < m_layout_singer.size(); ++i) {
+ double d = m_layout_singer[i].lyrics_begin() - 3.0 - time;
+ if (!(d > diff)) diff = d; // Store smallest d in diff (notice NaN handling)
+ }
if (diff > 0.0) m_audio.seek(diff);
}
}
|
|
From: Yoda-JM <yo...@us...> - 2012-11-06 00:39:00
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Nov 5 04:02:41 2012 +0200
Remove dead code (caught by Clang static analyzer).
---
game/screen_sing.cc | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 2a6bbd3..cc09f77 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -97,10 +97,10 @@ void ScreenSing::enter() {
{ // Vocal tracks
ConfigItem::OptionList opts;
std::vector<std::string> voctracks = m_song->getVocalTrackNames();
- int cur = 0;
+ //int cur = 0;
// Add vocal tracks to option list
for (std::vector<std::string>::const_iterator it = voctracks.begin(); it != voctracks.end(); ++it) {
- if (m_selectedTrack == *it) cur = opts.size(); // Find the index of current track
+ //if (m_selectedTrack == *it) cur = opts.size(); // Find the index of current track
opts.push_back(*it);
}
m_vocalTrackOpts = ConfigItem(opts); // Create a ConfigItem from the option list
@@ -127,7 +127,6 @@ void ScreenSing::enter() {
}
void ScreenSing::reloadGL() {
- ScreenManager* sm = ScreenManager::getSingletonPtr();
// Load UI graphics
theme.reset(new ThemeSing());
m_menuTheme.reset(new ThemeInstrumentMenu());
|
|
From: Yoda-JM <yo...@us...> - 2012-11-06 00:38:57
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Sat Nov 3 09:00:39 2012 +0200
Rename joystick.hh/cc to controllers.hh/cc.
---
game/{joystick.cc => controllers.cc} | 2 +-
game/{joystick.hh => controllers.hh} | 0
game/instrumentgraph.hh | 2 +-
game/main.cc | 2 +-
game/screen_audiodevices.cc | 2 +-
game/screen_intro.cc | 2 +-
game/screen_paths.cc | 2 +-
game/screen_players.cc | 2 +-
game/screen_practice.cc | 2 +-
game/screen_practice.hh | 2 +-
game/screen_songs.hh | 2 +-
game/video_driver.cc | 2 +-
12 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/game/joystick.cc b/game/controllers.cc
similarity index 99%
rename from game/joystick.cc
rename to game/controllers.cc
index d1c9d26..c870c0f 100644
--- a/game/joystick.cc
+++ b/game/controllers.cc
@@ -1,4 +1,4 @@
-#include "joystick.hh"
+#include "controllers.hh"
#include <boost/lexical_cast.hpp>
#include <boost/regex.hpp>
diff --git a/game/joystick.hh b/game/controllers.hh
similarity index 100%
rename from game/joystick.hh
rename to game/controllers.hh
diff --git a/game/instrumentgraph.hh b/game/instrumentgraph.hh
index c8006b7..233c8a1 100644
--- a/game/instrumentgraph.hh
+++ b/game/instrumentgraph.hh
@@ -5,7 +5,7 @@
#include "animvalue.hh"
#include "notes.hh"
#include "audio.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "surface.hh"
#include "opengl_text.hh"
#include "glutil.hh"
diff --git a/game/main.cc b/game/main.cc
index cb3308b..7b3cf03 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -1,7 +1,7 @@
#include "config.hh"
#include "fs.hh"
#include "screen.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "profiler.hh"
#include "songs.hh"
#include "backgrounds.hh"
diff --git a/game/screen_audiodevices.cc b/game/screen_audiodevices.cc
index 3cc97d6..75a7e5f 100644
--- a/game/screen_audiodevices.cc
+++ b/game/screen_audiodevices.cc
@@ -1,7 +1,7 @@
#include "screen_audiodevices.hh"
#include "configuration.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "theme.hh"
#include "audio.hh"
#include "i18n.hh"
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index 906df55..bcedaf8 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -4,7 +4,7 @@
#include "glmath.hh"
#include "audio.hh"
#include "i18n.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "theme.hh"
#include "menu.hh"
#include "xtime.hh"
diff --git a/game/screen_paths.cc b/game/screen_paths.cc
index 9169e44..46310ef 100644
--- a/game/screen_paths.cc
+++ b/game/screen_paths.cc
@@ -1,7 +1,7 @@
#include "screen_paths.hh"
#include "configuration.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "theme.hh"
#include "audio.hh"
#include "i18n.hh"
diff --git a/game/screen_players.cc b/game/screen_players.cc
index 9f49b6d..0190150 100644
--- a/game/screen_players.cc
+++ b/game/screen_players.cc
@@ -9,7 +9,7 @@
#include "theme.hh"
#include "video.hh"
#include "i18n.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include <iostream>
#include <sstream>
diff --git a/game/screen_practice.cc b/game/screen_practice.cc
index 28f8197..3da1dea 100644
--- a/game/screen_practice.cc
+++ b/game/screen_practice.cc
@@ -3,7 +3,7 @@
#include "audio.hh"
#include "util.hh"
#include "fs.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "theme.hh"
#include "progressbar.hh"
diff --git a/game/screen_practice.hh b/game/screen_practice.hh
index bb0ae1e..0fb3f8d 100644
--- a/game/screen_practice.hh
+++ b/game/screen_practice.hh
@@ -2,7 +2,7 @@
#include <boost/scoped_ptr.hpp>
#include "screen.hh"
-#include "joystick.hh"
+#include "controllers.hh"
class Audio;
class Sample;
diff --git a/game/screen_songs.hh b/game/screen_songs.hh
index e8314cd..7e1f93d 100644
--- a/game/screen_songs.hh
+++ b/game/screen_songs.hh
@@ -9,7 +9,7 @@
#include "textinput.hh"
#include "theme.hh"
#include "video.hh"
-#include "joystick.hh"
+#include "controllers.hh"
class Song;
class Audio;
diff --git a/game/video_driver.cc b/game/video_driver.cc
index 51f02b6..dbe31bf 100644
--- a/game/video_driver.cc
+++ b/game/video_driver.cc
@@ -6,7 +6,7 @@
#include "glmath.hh"
#include "image.hh"
#include "util.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "screen.hh"
#include <boost/date_time.hpp>
#include <fstream>
|
|
From: Yoda-JM <yo...@us...> - 2012-11-06 00:38:52
|
Author: Lasse Karkkainen <tro...@tr...> Date: Sat Nov 3 06:59:38 2012 +0200 Major input system cleanup. - Renamed KEYBOARD_IDx with more descriptive names. - Removed several hundred lines of copypasta. - Removed key repetition quirks (repetition is disabled in SDL). - Removed a lot of other oddities in favor of cleaner, more generic code. - now() is no longer called in input code, instead mainloop is responsible for keeping time. --- game/joystick.cc | 526 ++++++++++++++---------------------------------------- game/joystick.hh | 22 ++-- game/main.cc | 3 +- 3 files changed, 143 insertions(+), 408 deletions(-) |
|
From: Yoda-JM <yo...@us...> - 2012-11-06 00:38:49
|
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Nov 6 01:38:06 2012 +0100
fix: update ebuild to new api and new dependencies
---
.../performous/files/performous-gentoopaths.patch | 8 ++--
.../games-arcade/performous/performous-9999.ebuild | 32 ++++++++++----------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/portage-overlay/games-arcade/performous/files/performous-gentoopaths.patch b/portage-overlay/games-arcade/performous/files/performous-gentoopaths.patch
index a62bef8..e3023de 100644
--- a/portage-overlay/games-arcade/performous/files/performous-gentoopaths.patch
+++ b/portage-overlay/games-arcade/performous/files/performous-gentoopaths.patch
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c887394..941369e 100644
+index d7bb77c..a6c173c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,6 +24,9 @@ else(WIN32)
@@ -25,10 +25,10 @@ index 300ba05..83b38d2 100644
// FFMPEG libraries use changing include file names... Get them from CMake.
#define AVCODEC_INCLUDE <@AVCodec_INCLUDE@>
diff --git a/game/fs.cc b/game/fs.cc
-index 5e74c77..faa96f9 100644
+index 718d630..2604256 100644
--- a/game/fs.cc
+++ b/game/fs.cc
-@@ -165,6 +165,9 @@ Paths const& getPaths(bool refresh) {
+@@ -197,6 +197,9 @@ Paths const& getPaths(bool refresh) {
// Adding users data dir
dirs.push_back(getDataDir());
@@ -38,7 +38,7 @@ index 5e74c77..faa96f9 100644
// Adding relative path from executable
dirs.push_back(plugin::execname().parent_path().parent_path() / shareDir);
#ifndef _WIN32
-@@ -192,7 +195,9 @@ fs::path getDefaultConfig(fs::path const &configFile) {
+@@ -223,7 +226,9 @@ fs::path getDefaultConfig(fs::path const &configFile) {
typedef std::vector<std::string> ConfigList;
ConfigList config_list;
char const* root = getenv("PERFORMOUS_ROOT");
diff --git a/portage-overlay/games-arcade/performous/performous-9999.ebuild b/portage-overlay/games-arcade/performous/performous-9999.ebuild
index 7eb426c..63edd5f 100644
--- a/portage-overlay/games-arcade/performous/performous-9999.ebuild
+++ b/portage-overlay/games-arcade/performous/performous-9999.ebuild
@@ -1,9 +1,10 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /cvsroot/ultrastar-ng/UltraStar-ng/portage-overlay/games-arcade/performous/performous-9999.ebuild,v 1.10 2007/09/29 13:04:19 yoda-jm Exp $
+# $Header: $
-[[ ${PV} = 9999 ]] && GIT="git"
-EAPI=2
+EAPI=4
+
+[[ ${PV} = 9999 ]] && GIT="git-2"
inherit cmake-utils ${GIT} games
@@ -19,13 +20,14 @@ SRC_URI="songs? (
)"
if [ "$PV" != "9999" ]; then
- MY_PN=Performous
- MY_P=${MY_PN}-${PV}-Source
SRC_URI=" mirror://sourceforge/${PN}/${MY_P}.tar.bz2
$SRC_URI"
else
EGIT_REPO_URI="git://performous.git.sourceforge.net/gitroot/performous/performous"
- EGIT_BRANCH="master"
+ # git-2 default branch is master
+ #EGIT_BRANCH="master"
+ # use performous_LIVE_BRANCH env var to install another branch (for example
+ # legacy or torrent)
fi
LICENSE="GPL-2
@@ -36,7 +38,7 @@ LICENSE="GPL-2
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="debug midi songs tools webcam"
+IUSE="debug bittorrent midi songs tools webcam"
RDEPEND="gnome-base/librsvg
>=dev-libs/boost-1.39.0
@@ -45,16 +47,15 @@ RDEPEND="gnome-base/librsvg
media-libs/glew
media-libs/libsdl[joystick,opengl]
media-libs/libpng
- media-libs/jpeg
+ virtual/jpeg
tools? ( media-gfx/imagemagick[png] )
+ midi? ( media-libs/portmidi )
webcam? ( media-libs/opencv[v4l] )
+ bittorrent? ( >=net-libs/rb_libtorrent-0.16.3 )
>=media-video/ffmpeg-0.4.9_p20070616-r20
media-libs/portaudio
sys-apps/help2man
!games-arcade/ultrastar-ng"
-# Waiting for portmidi to enter portage (#90614)
-#RDEPEND="${RDEPEND}
-# midi? ( media-libs/portmidi )"
DEPEND="${RDEPEND}
>=dev-util/cmake-2.6.0"
@@ -64,7 +65,7 @@ src_unpack() {
if [ "${PV}" != "9999" ]; then
unpack "${MY_P}.tar.bz2"
else
- git_src_unpack
+ git-2_src_unpack
fi
cd "${S}"
if use songs; then
@@ -80,13 +81,12 @@ src_configure() {
local mycmakeargs="
$(cmake-utils_use_enable tools TOOLS)
$(cmake-utils_use_no webcam WEBCAM)
+ $(cmake-utils_use_no bittorrent TORRENT)
+ $(cmake-utils_use_no midi PORTMIDI)
-DCMAKE_INSTALL_PREFIX=${GAMES_PREFIX}
-DGENTOO_DATA_DIR=${GAMES_DATADIR}/${PN}
-DLOCALE_DIR=/usr/share
-DCMAKE_BUILD_TYPE=Release"
-# local mycmakeargs="
-# $(cmake-utils_use_no midi MIDI)
-# ${mycmakeargs}"
cmake-utils_src_configure
}
|
|
From: Yoda-JM <yo...@us...> - 2012-11-06 00:38:46
|
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Sep 23 00:19:58 2012 +0200
fix 3dobject include
---
game/3dobject.cc | 19 +++++++++++++++++--
game/3dobject.hh | 21 ++++-----------------
game/theme.hh | 4 ----
3 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/game/3dobject.cc b/game/3dobject.cc
index f17a14b..a1aac49 100644
--- a/game/3dobject.cc
+++ b/game/3dobject.cc
@@ -1,15 +1,15 @@
#include "3dobject.hh"
+#include "surface.hh"
+
#include <sstream>
#include <fstream>
#include <stdexcept>
-#include <cmath>
#include <boost/lexical_cast.hpp>
// TODO: test & fix faces that doesn't have texcoords in the file
// TODO: group handling for loader
-
namespace {
static const int HAS_TEXCOORDS = 1;
static const int HAS_NORMALS = 2;
@@ -101,8 +101,23 @@ void Object3d::loadWavefrontObj(std::string filepath, float scale) {
}
+void Object3d::load(std::string filepath, std::string texturepath, float scale) {
+ if (!texturepath.empty()) m_texture.reset(new Texture(texturepath));
+ loadWavefrontObj(filepath, scale);
+}
+
void Object3d::drawVBO() {
UseShader us(getShader("3dobject"));
m_va.Draw(GL_TRIANGLES);
}
+void Object3d::draw(float x, float y, float z, float s) {
+ using namespace glmath;
+ Transform trans(translate(vec3(x, y, z)) * scale(s)); // Move to position and scale
+ if (m_texture) {
+ UseTexture tex(*m_texture);
+ drawVBO();
+ } else {
+ drawVBO();
+ }
+}
diff --git a/game/3dobject.hh b/game/3dobject.hh
index 5ce33f5..c9c8beb 100644
--- a/game/3dobject.hh
+++ b/game/3dobject.hh
@@ -1,16 +1,15 @@
#pragma once
-#include <vector>
#include <string>
#include <boost/scoped_ptr.hpp>
#include <boost/noncopyable.hpp>
-#include "surface.hh"
#include "glshader.hh"
-#include "glutil.hh"
// TODO: Exception handling
// TODO: Texture loading
+class Texture;
+
/// A class representing 3d object
/// Non-copyable because of display lists getting messed up
class Object3d: boost::noncopyable {
@@ -26,20 +25,8 @@ class Object3d: boost::noncopyable {
load(filepath, texturepath, scale);
}
/// load a new object file
- void load(std::string filepath, std::string texturepath = "", float scale = 1.0) {
- if (!texturepath.empty()) m_texture.reset(new Texture(texturepath));
- loadWavefrontObj(filepath, scale);
- }
+ void load(std::string filepath, std::string texturepath = "", float scale = 1.0);
void drawVBO();
/// draws the object
- void draw(float x = 0, float y = 0, float z = 0, float s = 1.0) {
- using namespace glmath;
- Transform trans(translate(vec3(x, y, z)) * scale(s)); // Move to position and scale
- if (m_texture) {
- UseTexture tex(*m_texture);
- drawVBO();
- } else {
- drawVBO();
- }
- }
+ void draw(float x = 0, float y = 0, float z = 0, float s = 1.0);
};
diff --git a/game/theme.hh b/game/theme.hh
index ead5d83..8b77f32 100644
--- a/game/theme.hh
+++ b/game/theme.hh
@@ -4,12 +4,8 @@
#include "surface.hh"
#include "cachemap.hh"
#include <boost/noncopyable.hpp>
-#include <boost/scoped_ptr.hpp>
#include <string>
-
-class Shader;
-
/// abstract theme class
class Theme: boost::noncopyable {
protected:
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-11-05 07:54:43
|
Author: Lasse Karkkainen <tro...@tr...> Date: Mon Nov 5 09:52:49 2012 +0200 Merge branch 'inputcleanup' Conflicts: game/controllers.cc --- |
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-11-05 07:54:41
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Sat Nov 3 09:00:39 2012 +0200
Rename joystick.hh/cc to controllers.hh/cc.
---
game/{joystick.cc => controllers.cc} | 2 +-
game/{joystick.hh => controllers.hh} | 0
game/instrumentgraph.hh | 2 +-
game/main.cc | 2 +-
game/screen_audiodevices.cc | 2 +-
game/screen_intro.cc | 2 +-
game/screen_paths.cc | 2 +-
game/screen_players.cc | 2 +-
game/screen_practice.cc | 2 +-
game/screen_practice.hh | 2 +-
game/screen_songs.hh | 2 +-
game/video_driver.cc | 2 +-
12 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/game/joystick.cc b/game/controllers.cc
similarity index 99%
rename from game/joystick.cc
rename to game/controllers.cc
index d1c9d26..c870c0f 100644
--- a/game/joystick.cc
+++ b/game/controllers.cc
@@ -1,4 +1,4 @@
-#include "joystick.hh"
+#include "controllers.hh"
#include <boost/lexical_cast.hpp>
#include <boost/regex.hpp>
diff --git a/game/joystick.hh b/game/controllers.hh
similarity index 100%
rename from game/joystick.hh
rename to game/controllers.hh
diff --git a/game/instrumentgraph.hh b/game/instrumentgraph.hh
index c8006b7..233c8a1 100644
--- a/game/instrumentgraph.hh
+++ b/game/instrumentgraph.hh
@@ -5,7 +5,7 @@
#include "animvalue.hh"
#include "notes.hh"
#include "audio.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "surface.hh"
#include "opengl_text.hh"
#include "glutil.hh"
diff --git a/game/main.cc b/game/main.cc
index cb3308b..7b3cf03 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -1,7 +1,7 @@
#include "config.hh"
#include "fs.hh"
#include "screen.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "profiler.hh"
#include "songs.hh"
#include "backgrounds.hh"
diff --git a/game/screen_audiodevices.cc b/game/screen_audiodevices.cc
index 3cc97d6..75a7e5f 100644
--- a/game/screen_audiodevices.cc
+++ b/game/screen_audiodevices.cc
@@ -1,7 +1,7 @@
#include "screen_audiodevices.hh"
#include "configuration.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "theme.hh"
#include "audio.hh"
#include "i18n.hh"
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index 906df55..bcedaf8 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -4,7 +4,7 @@
#include "glmath.hh"
#include "audio.hh"
#include "i18n.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "theme.hh"
#include "menu.hh"
#include "xtime.hh"
diff --git a/game/screen_paths.cc b/game/screen_paths.cc
index 9169e44..46310ef 100644
--- a/game/screen_paths.cc
+++ b/game/screen_paths.cc
@@ -1,7 +1,7 @@
#include "screen_paths.hh"
#include "configuration.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "theme.hh"
#include "audio.hh"
#include "i18n.hh"
diff --git a/game/screen_players.cc b/game/screen_players.cc
index 9f49b6d..0190150 100644
--- a/game/screen_players.cc
+++ b/game/screen_players.cc
@@ -9,7 +9,7 @@
#include "theme.hh"
#include "video.hh"
#include "i18n.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include <iostream>
#include <sstream>
diff --git a/game/screen_practice.cc b/game/screen_practice.cc
index 28f8197..3da1dea 100644
--- a/game/screen_practice.cc
+++ b/game/screen_practice.cc
@@ -3,7 +3,7 @@
#include "audio.hh"
#include "util.hh"
#include "fs.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "theme.hh"
#include "progressbar.hh"
diff --git a/game/screen_practice.hh b/game/screen_practice.hh
index bb0ae1e..0fb3f8d 100644
--- a/game/screen_practice.hh
+++ b/game/screen_practice.hh
@@ -2,7 +2,7 @@
#include <boost/scoped_ptr.hpp>
#include "screen.hh"
-#include "joystick.hh"
+#include "controllers.hh"
class Audio;
class Sample;
diff --git a/game/screen_songs.hh b/game/screen_songs.hh
index e8314cd..7e1f93d 100644
--- a/game/screen_songs.hh
+++ b/game/screen_songs.hh
@@ -9,7 +9,7 @@
#include "textinput.hh"
#include "theme.hh"
#include "video.hh"
-#include "joystick.hh"
+#include "controllers.hh"
class Song;
class Audio;
diff --git a/game/video_driver.cc b/game/video_driver.cc
index 51f02b6..dbe31bf 100644
--- a/game/video_driver.cc
+++ b/game/video_driver.cc
@@ -6,7 +6,7 @@
#include "glmath.hh"
#include "image.hh"
#include "util.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "screen.hh"
#include <boost/date_time.hpp>
#include <fstream>
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-11-05 07:54:36
|
Author: Lasse Karkkainen <tro...@tr...> Date: Sat Nov 3 06:59:38 2012 +0200 Major input system cleanup. - Renamed KEYBOARD_IDx with more descriptive names. - Removed several hundred lines of copypasta. - Removed key repetition quirks (repetition is disabled in SDL). - Removed a lot of other oddities in favor of cleaner, more generic code. - now() is no longer called in input code, instead mainloop is responsible for keeping time. --- game/joystick.cc | 526 ++++++++++++++---------------------------------------- game/joystick.hh | 22 ++-- game/main.cc | 3 +- 3 files changed, 143 insertions(+), 408 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-11-05 07:40:53
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Nov 5 09:40:09 2012 +0200
C++11 compatibility. Do not give template parameters to std::make_pair. If you want to specify types, call std::pair constructor directly; make_pair is a helper function for automatically determining the types.
---
game/joystick.cc | 16 ++++++++--------
game/song.hh | 2 +-
game/songparser-xml.cc | 14 +++++++-------
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 21285e1..7da7aff 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -60,7 +60,7 @@ input::MidiDrums::MidiDrums(): stream(pm::findDevice(true, config["game/midi_inp
readConfig(map, getConfigDir() / "mididrums.xml");
while (detail::devices.find(devnum) != detail::devices.end()) ++devnum;
- detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(devnum, detail::InputDevPrivate(g_instruments.find("DRUMS_GUITARHERO")->second)));
+ detail::devices.insert(std::make_pair(devnum, detail::InputDevPrivate(g_instruments.find("DRUMS_GUITARHERO")->second)));
event.type = Event::PRESS;
for (unsigned int i = 0; i < BUTTONS; ++i) event.pressed[i] = false;
}
@@ -320,7 +320,7 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
input::Instrument instrument(name, devType, mapping);
instrument.match = regexp;
instrument.description = description;
- instruments.insert(std::make_pair<std::string, input::Instrument>(name, instrument));
+ instruments.insert(std::make_pair(name, instrument));
}
} catch (XMLError& e) {
int line = e.elem.get_line();
@@ -395,14 +395,14 @@ void input::SDL::init() {
std::cout << ", Hats: " << SDL_JoystickNumHats(joy) << std::endl;
if( forced_type.find(i) != forced_type.end() ) {
std::cout << " Detected as: " << forced_type.find(i)->second.description << " (forced)" << std::endl;
- input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(i, input::detail::InputDevPrivate(forced_type.find(i)->second)));
+ input::detail::devices.insert(std::make_pair(i, input::detail::InputDevPrivate(forced_type.find(i)->second)));
} else {
bool found = false;
for(input::Instruments::const_iterator it = g_instruments.begin() ; it != g_instruments.end() ; ++it) {
boost::regex sdl_name(it->second.match);
if (regex_search(name.c_str(), sdl_name)) {
std::cout << " Detected as: " << it->second.description << std::endl;
- input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(i, input::detail::InputDevPrivate(it->second)));
+ input::detail::devices.insert(std::make_pair(i, input::detail::InputDevPrivate(it->second)));
found = true;
break;
}
@@ -422,13 +422,13 @@ void input::SDL::init() {
std::clog << "controllers/info: Keyboard as dance pad controller: " << (config["game/keyboard_dancepad"].b() ? "enabled":"disabled") << std::endl;
std::clog << "controllers/info: Keyboard as keyboard controller: " << (config["game/keyboard_keyboard"].b() ? "enabled":"disabled") << std::endl;
input::SDL::sdl_devices[input::detail::KEYBOARD_ID] = NULL;
- input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(input::detail::KEYBOARD_ID, input::detail::InputDevPrivate(g_instruments.find("GUITAR_GUITARHERO")->second)));
+ input::detail::devices.insert(std::make_pair(input::detail::KEYBOARD_ID, input::detail::InputDevPrivate(g_instruments.find("GUITAR_GUITARHERO")->second)));
input::SDL::sdl_devices[input::detail::KEYBOARD_ID2] = NULL;
- input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(input::detail::KEYBOARD_ID2, input::detail::InputDevPrivate(g_instruments.find("DRUMS_GUITARHERO")->second)));
+ input::detail::devices.insert(std::make_pair(input::detail::KEYBOARD_ID2, input::detail::InputDevPrivate(g_instruments.find("DRUMS_GUITARHERO")->second)));
input::SDL::sdl_devices[input::detail::KEYBOARD_ID3] = NULL;
- input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(input::detail::KEYBOARD_ID3, input::detail::InputDevPrivate(g_instruments.find("DANCEPAD_GENERIC")->second)));
+ input::detail::devices.insert(std::make_pair(input::detail::KEYBOARD_ID3, input::detail::InputDevPrivate(g_instruments.find("DANCEPAD_GENERIC")->second)));
input::SDL::sdl_devices[input::detail::KEYBOARD_ID4] = NULL;
- input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(input::detail::KEYBOARD_ID4, input::detail::InputDevPrivate(g_instruments.find("KEYBOARD_GENERIC")->second)));
+ input::detail::devices.insert(std::make_pair(input::detail::KEYBOARD_ID4, input::detail::InputDevPrivate(g_instruments.find("KEYBOARD_GENERIC")->second)));
}
bool input::SDL::pushEvent(SDL_Event _e) {
diff --git a/game/song.hh b/game/song.hh
index a2b1b73..f219412 100644
--- a/game/song.hh
+++ b/game/song.hh
@@ -61,7 +61,7 @@ class Song: boost::noncopyable {
int randomIdx; ///< sorting index used for random order
void insertVocalTrack(std::string vocalTrack, VocalTrack track) {
eraseVocalTrack(vocalTrack);
- vocalTracks.insert(std::make_pair<std::string, VocalTrack>(vocalTrack, track));
+ vocalTracks.insert(std::make_pair(vocalTrack, track));
}
void eraseVocalTrack(std::string vocalTrack = TrackName::LEAD_VOCAL) {
vocalTracks.erase(vocalTrack);
diff --git a/game/songparser-xml.cc b/game/songparser-xml.cc
index 3237011..ab4580d 100644
--- a/game/songparser-xml.cc
+++ b/game/songparser-xml.cc
@@ -184,9 +184,9 @@ void SongParser::xmlParse() {
std::string artist = name;
if(trackNode.get_attribute("Artist")) artist = trackNode.get_attribute("Artist")->get_value();
if(name == "Player1") {
- singerList.insert(std::make_pair<std::string, std::string>("Solo 1", artist));
+ singerList.insert(std::make_pair("Solo 1", artist));
} else if(name == "Player2") {
- singerList.insert(std::make_pair<std::string, std::string>("Solo 2", artist));
+ singerList.insert(std::make_pair("Solo 2", artist));
} else {
std::cout << "Unknown track name: " << name << std::endl;
}
@@ -209,7 +209,7 @@ void SongParser::xmlParse() {
singers += " & " + it->second;
}
}
- sentencesList.insert(std::make_pair<std::string, xmlpp::NodeSet>(singers, sentences));
+ sentencesList.insert(std::make_pair(singers, sentences));
} else {
xmlpp::NodeSet tracks;
if (!dom.find("/ss:MELODY/ss:TRACK", tracks)) throw std::runtime_error("Unable to find any sentences in melody XML");
@@ -217,7 +217,7 @@ void SongParser::xmlParse() {
xmlpp::Element& trackNode = dynamic_cast<xmlpp::Element&>(**it);
std::string singer = trackNode.get_attribute("Artist")->get_value();
dom.find(trackNode, "ss:SENTENCE", sentences);
- sentencesList.insert(std::make_pair<std::string, xmlpp::NodeSet>(singer, sentences));
+ sentencesList.insert(std::make_pair(singer, sentences));
}
}
}
@@ -228,18 +228,18 @@ void SongParser::xmlParse() {
// Add group track
std::string trackSinger = sentencesList.begin()->first;
VocalTrack vocalBoth(trackSinger);
- vocalTracks.insert(std::make_pair<std::string, VocalTrack>(trackSinger, vocalBoth));
+ vocalTracks.insert(std::make_pair(trackSinger, vocalBoth));
// add each singer track
for(std::map<std::string, std::string>::const_iterator it = singerList.begin() ; it != singerList.end() ; ++it) {
trackSinger = it->second;
VocalTrack vocal(trackSinger);
- vocalTracks.insert(std::make_pair<std::string, VocalTrack>(trackSinger, vocal));
+ vocalTracks.insert(std::make_pair(trackSinger, vocal));
}
} else {
for(std::map<std::string, xmlpp::NodeSet>::const_iterator it = sentencesList.begin() ; it != sentencesList.end() ; ++it) {
std::string trackSinger = it->first;
VocalTrack vocal(trackSinger);
- vocalTracks.insert(std::make_pair<std::string, VocalTrack>(trackSinger, vocal));
+ vocalTracks.insert(std::make_pair(trackSinger, vocal));
}
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-11-05 07:40:50
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Nov 5 09:32:44 2012 +0200
Cleanup.
---
game/screen_sing.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 2274ac3..93f6c00 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -308,7 +308,7 @@ void ScreenSing::manageEvent(SDL_Event event) {
else if (nav == input::UP) { m_menu.move(-1); return; }
}
// Start button has special functions for skipping things (only in singing for now)
- if (nav == input::START && m_only_singers_alive && !m_song->getVocalTrack(m_selectedTrack).notes.empty() && !m_audio.isPaused()) {
+ if (nav == input::START && m_only_singers_alive && !m_layout_singer.empty() && !m_audio.isPaused()) {
// Open score dialog early
if (status == Song::FINISHED) {
m_engine->kill(); // Kill the engine thread
@@ -486,7 +486,7 @@ void ScreenSing::draw() {
statustxt = (boost::format("%02u:%02u - %s") % (t / 60) % (t % 60) % section.name).str();
} else statustxt = (boost::format("%02u:%02u") % (t / 60) % (t % 60)).str();
- if (!m_score_window.get() && m_only_singers_alive && !m_song->getVocalTrack(m_selectedTrack).notes.empty()) {
+ if (!m_score_window.get() && m_only_singers_alive && !m_layout_singer.empty()) {
if (status == Song::INSTRUMENTAL_BREAK) statustxt += _(" ENTER to skip instrumental break");
if (status == Song::FINISHED && !config["game/karaoke_mode"].b()) statustxt += _(" Remember to wait for grading!");
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-11-05 07:40:47
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Nov 5 09:30:37 2012 +0200
Fix skipping over instrumental breaks in duet.
---
game/screen_sing.cc | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index cc09f77..2274ac3 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -318,8 +318,12 @@ void ScreenSing::manageEvent(SDL_Event event) {
else if (status == Song::INSTRUMENTAL_BREAK) {
if (time < 0) m_audio.seek(0.0);
else {
- // FIXME: Should check for all layout singers
- double diff = m_layout_singer[0].lyrics_begin() - 3.0 - time;
+ // TODO: Instead of calculating here, calculate instrumental breaks right after song loading and store in Song data structures
+ double diff = getNaN();
+ for (size_t i = 0; i < m_layout_singer.size(); ++i) {
+ double d = m_layout_singer[i].lyrics_begin() - 3.0 - time;
+ if (!(d > diff)) diff = d; // Store smallest d in diff (notice NaN handling)
+ }
if (diff > 0.0) m_audio.seek(diff);
}
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-11-05 07:40:45
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Nov 5 04:02:41 2012 +0200
Remove dead code (caught by Clang static analyzer).
---
game/screen_sing.cc | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 2a6bbd3..cc09f77 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -97,10 +97,10 @@ void ScreenSing::enter() {
{ // Vocal tracks
ConfigItem::OptionList opts;
std::vector<std::string> voctracks = m_song->getVocalTrackNames();
- int cur = 0;
+ //int cur = 0;
// Add vocal tracks to option list
for (std::vector<std::string>::const_iterator it = voctracks.begin(); it != voctracks.end(); ++it) {
- if (m_selectedTrack == *it) cur = opts.size(); // Find the index of current track
+ //if (m_selectedTrack == *it) cur = opts.size(); // Find the index of current track
opts.push_back(*it);
}
m_vocalTrackOpts = ConfigItem(opts); // Create a ConfigItem from the option list
@@ -127,7 +127,6 @@ void ScreenSing::enter() {
}
void ScreenSing::reloadGL() {
- ScreenManager* sm = ScreenManager::getSingletonPtr();
// Load UI graphics
theme.reset(new ThemeSing());
m_menuTheme.reset(new ThemeInstrumentMenu());
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-11-03 07:03:03
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Sat Nov 3 09:00:39 2012 +0200
Rename joystick.hh/cc to controllers.hh/cc.
---
game/{joystick.cc => controllers.cc} | 2 +-
game/{joystick.hh => controllers.hh} | 0
game/instrumentgraph.hh | 2 +-
game/main.cc | 2 +-
game/screen_audiodevices.cc | 2 +-
game/screen_intro.cc | 2 +-
game/screen_paths.cc | 2 +-
game/screen_players.cc | 2 +-
game/screen_practice.cc | 2 +-
game/screen_practice.hh | 2 +-
game/screen_songs.hh | 2 +-
game/video_driver.cc | 2 +-
12 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/game/joystick.cc b/game/controllers.cc
similarity index 99%
rename from game/joystick.cc
rename to game/controllers.cc
index d1c9d26..c870c0f 100644
--- a/game/joystick.cc
+++ b/game/controllers.cc
@@ -1,4 +1,4 @@
-#include "joystick.hh"
+#include "controllers.hh"
#include <boost/lexical_cast.hpp>
#include <boost/regex.hpp>
diff --git a/game/joystick.hh b/game/controllers.hh
similarity index 100%
rename from game/joystick.hh
rename to game/controllers.hh
diff --git a/game/instrumentgraph.hh b/game/instrumentgraph.hh
index c8006b7..233c8a1 100644
--- a/game/instrumentgraph.hh
+++ b/game/instrumentgraph.hh
@@ -5,7 +5,7 @@
#include "animvalue.hh"
#include "notes.hh"
#include "audio.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "surface.hh"
#include "opengl_text.hh"
#include "glutil.hh"
diff --git a/game/main.cc b/game/main.cc
index cb3308b..7b3cf03 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -1,7 +1,7 @@
#include "config.hh"
#include "fs.hh"
#include "screen.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "profiler.hh"
#include "songs.hh"
#include "backgrounds.hh"
diff --git a/game/screen_audiodevices.cc b/game/screen_audiodevices.cc
index 3cc97d6..75a7e5f 100644
--- a/game/screen_audiodevices.cc
+++ b/game/screen_audiodevices.cc
@@ -1,7 +1,7 @@
#include "screen_audiodevices.hh"
#include "configuration.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "theme.hh"
#include "audio.hh"
#include "i18n.hh"
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index 906df55..bcedaf8 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -4,7 +4,7 @@
#include "glmath.hh"
#include "audio.hh"
#include "i18n.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "theme.hh"
#include "menu.hh"
#include "xtime.hh"
diff --git a/game/screen_paths.cc b/game/screen_paths.cc
index 9169e44..46310ef 100644
--- a/game/screen_paths.cc
+++ b/game/screen_paths.cc
@@ -1,7 +1,7 @@
#include "screen_paths.hh"
#include "configuration.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "theme.hh"
#include "audio.hh"
#include "i18n.hh"
diff --git a/game/screen_players.cc b/game/screen_players.cc
index 9f49b6d..0190150 100644
--- a/game/screen_players.cc
+++ b/game/screen_players.cc
@@ -9,7 +9,7 @@
#include "theme.hh"
#include "video.hh"
#include "i18n.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include <iostream>
#include <sstream>
diff --git a/game/screen_practice.cc b/game/screen_practice.cc
index 28f8197..3da1dea 100644
--- a/game/screen_practice.cc
+++ b/game/screen_practice.cc
@@ -3,7 +3,7 @@
#include "audio.hh"
#include "util.hh"
#include "fs.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "theme.hh"
#include "progressbar.hh"
diff --git a/game/screen_practice.hh b/game/screen_practice.hh
index bb0ae1e..0fb3f8d 100644
--- a/game/screen_practice.hh
+++ b/game/screen_practice.hh
@@ -2,7 +2,7 @@
#include <boost/scoped_ptr.hpp>
#include "screen.hh"
-#include "joystick.hh"
+#include "controllers.hh"
class Audio;
class Sample;
diff --git a/game/screen_songs.hh b/game/screen_songs.hh
index e8314cd..7e1f93d 100644
--- a/game/screen_songs.hh
+++ b/game/screen_songs.hh
@@ -9,7 +9,7 @@
#include "textinput.hh"
#include "theme.hh"
#include "video.hh"
-#include "joystick.hh"
+#include "controllers.hh"
class Song;
class Audio;
diff --git a/game/video_driver.cc b/game/video_driver.cc
index 51f02b6..dbe31bf 100644
--- a/game/video_driver.cc
+++ b/game/video_driver.cc
@@ -6,7 +6,7 @@
#include "glmath.hh"
#include "image.hh"
#include "util.hh"
-#include "joystick.hh"
+#include "controllers.hh"
#include "screen.hh"
#include <boost/date_time.hpp>
#include <fstream>
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-10-11 07:02:31
|
Author: Lasse Karkkainen <tro...@tr...> Date: Thu Oct 11 09:54:00 2012 +0300 BOOST_ASIO_DYN_LINK is defined from command line via CMake and should not be defined in code. --- game/downloader.cc | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/game/downloader.cc b/game/downloader.cc index 8f31dcf..79f51d3 100644 --- a/game/downloader.cc +++ b/game/downloader.cc @@ -1,7 +1,5 @@ #include "downloader.hh" -#define BOOST_ASIO_DYN_LINK - #include "fs.hh" #include "config.hh" #include "configuration.hh" |
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-10-11 07:02:28
|
Author: Lasse Karkkainen <tro...@tr...> Date: Wed Oct 10 20:56:40 2012 +0300 Merge branch 'master' into torrent --- |
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-10-11 07:02:25
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Oct 10 20:54:34 2012 +0300
Fix a C string comparison bug caught by Clang in Shader::dumpInfoLog. Cleanup.
---
game/glshader.cc | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/game/glshader.cc b/game/glshader.cc
index f17803b..b2f2635 100644
--- a/game/glshader.cc
+++ b/game/glshader.cc
@@ -24,21 +24,22 @@ namespace {
/// Dumps Shader/Program InfoLog
void Shader::dumpInfoLog(GLuint id) {
- int infologLength = 0;
int maxLength;
if (glIsShader(id)) glGetShaderiv(id, GL_INFO_LOG_LENGTH, &maxLength);
else glGetProgramiv(id, GL_INFO_LOG_LENGTH, &maxLength);
char infoLog[maxLength];
+ int infoLogLength = 0;
- if (glIsShader(id)) glGetShaderInfoLog(id, maxLength, &infologLength, infoLog);
- else glGetProgramInfoLog(id, maxLength, &infologLength, infoLog);
+ if (glIsShader(id)) glGetShaderInfoLog(id, maxLength, &infoLogLength, infoLog);
+ else glGetProgramInfoLog(id, maxLength, &infoLogLength, infoLog);
- if (infologLength > 0 && infoLog != "Vertex shader(s) linked, fragment shader(s) linked, geometry shader(s) linked." /* What the Radeon drivers always say */) {
- // FIXME: The logging facility probably won't handle this right, especially when infoLog contains many lines.
- std::clog << "opengl/error: Shader " << name << ": " << infoLog << std::endl;
- }
+ // Ignore success messages that the Radeon driver always seems to give
+ if (std::equal(infoLog, infoLog + infoLogLength, "Vertex shader(s) linked, fragment shader(s) linked, geometry shader(s) linked.")) return;
+
+ // FIXME: The logging facility probably won't handle this right, especially when infoLog contains many lines.
+ std::clog << "opengl/error: Shader " << name << ": " << infoLog << std::endl;
}
Shader::Shader(std::string const& name): name(name), program(0) {}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-10-11 07:02:18
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Oct 10 20:47:30 2012 +0300
Fix a typo caught by Clang: '==' used for assignment in GuitarGraph::endBRE. Needs testing.
---
game/guitargraph.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 5279fbd..0b726c4 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -557,7 +557,7 @@ void GuitarGraph::endBRE() {
}
m_drumfillHits = 0;
m_drumfillScore = 0;
- m_dfIt == m_drumfills.end();
+ m_dfIt = m_drumfills.end();
}
/// Calculates the start and end times for the next/current drum fill
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-10-10 17:55:08
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Oct 10 20:54:34 2012 +0300
Fix a C string comparison bug caught by Clang in Shader::dumpInfoLog. Cleanup.
---
game/glshader.cc | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/game/glshader.cc b/game/glshader.cc
index f17803b..b2f2635 100644
--- a/game/glshader.cc
+++ b/game/glshader.cc
@@ -24,21 +24,22 @@ namespace {
/// Dumps Shader/Program InfoLog
void Shader::dumpInfoLog(GLuint id) {
- int infologLength = 0;
int maxLength;
if (glIsShader(id)) glGetShaderiv(id, GL_INFO_LOG_LENGTH, &maxLength);
else glGetProgramiv(id, GL_INFO_LOG_LENGTH, &maxLength);
char infoLog[maxLength];
+ int infoLogLength = 0;
- if (glIsShader(id)) glGetShaderInfoLog(id, maxLength, &infologLength, infoLog);
- else glGetProgramInfoLog(id, maxLength, &infologLength, infoLog);
+ if (glIsShader(id)) glGetShaderInfoLog(id, maxLength, &infoLogLength, infoLog);
+ else glGetProgramInfoLog(id, maxLength, &infoLogLength, infoLog);
- if (infologLength > 0 && infoLog != "Vertex shader(s) linked, fragment shader(s) linked, geometry shader(s) linked." /* What the Radeon drivers always say */) {
- // FIXME: The logging facility probably won't handle this right, especially when infoLog contains many lines.
- std::clog << "opengl/error: Shader " << name << ": " << infoLog << std::endl;
- }
+ // Ignore success messages that the Radeon driver always seems to give
+ if (std::equal(infoLog, infoLog + infoLogLength, "Vertex shader(s) linked, fragment shader(s) linked, geometry shader(s) linked.")) return;
+
+ // FIXME: The logging facility probably won't handle this right, especially when infoLog contains many lines.
+ std::clog << "opengl/error: Shader " << name << ": " << infoLog << std::endl;
}
Shader::Shader(std::string const& name): name(name), program(0) {}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2012-10-10 17:55:02
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Oct 10 20:47:30 2012 +0300
Fix a typo caught by Clang: '==' used for assignment in GuitarGraph::endBRE. Needs testing.
---
game/guitargraph.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 5279fbd..0b726c4 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -557,7 +557,7 @@ void GuitarGraph::endBRE() {
}
m_drumfillHits = 0;
m_drumfillScore = 0;
- m_dfIt == m_drumfills.end();
+ m_dfIt = m_drumfills.end();
}
/// Calculates the start and end times for the next/current drum fill
|