You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(288) |
Aug
(119) |
Sep
(31) |
Oct
(59) |
Nov
(458) |
Dec
(359) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(268) |
Feb
(26) |
Mar
(36) |
Apr
(48) |
May
(119) |
Jun
(37) |
Jul
(173) |
Aug
(429) |
Sep
(137) |
Oct
(156) |
Nov
(59) |
Dec
(45) |
| 2011 |
Jan
(398) |
Feb
(257) |
Mar
(49) |
Apr
(5) |
May
(34) |
Jun
(11) |
Jul
(38) |
Aug
(12) |
Sep
(1) |
Oct
(49) |
Nov
(5) |
Dec
(10) |
| 2012 |
Jan
(21) |
Feb
(32) |
Mar
(20) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(173) |
Aug
|
Sep
(25) |
Oct
(6) |
Nov
(44) |
Dec
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:35:34
|
Author: Lasse Karkkainen <tro...@tr...> Date: Wed May 25 04:35:05 2011 +0300 Fix shaders to comply with OpenGL 2.1 (GLSL #version 120). --- data/shaders/core.frag | 6 +++--- data/shaders/core.vert | 8 ++++---- data/shaders/dancenote.vert | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/data/shaders/core.frag b/data/shaders/core.frag index f7c7e28..9f5d966 100644 --- a/data/shaders/core.frag +++ b/data/shaders/core.frag @@ -9,11 +9,11 @@ uniform mat4 colorMatrix; in float bogus; // Workaround for http://www.nvnews.net/vbulletin/showthread.php?p=2401097 #endif -in vec3 normal; -in vec4 color; +varying vec3 normal; +varying vec4 color; #ifdef ENABLE_TEXTURING -in vec4 texCoord; +varying vec4 texCoord; #if ENABLE_TEXTURING == 1 uniform sampler2DRect tex; #define TEXFUNC texture2DRect(tex, texCoord.st) diff --git a/data/shaders/core.vert b/data/shaders/core.vert index ee16a3d..926ca9b 100644 --- a/data/shaders/core.vert +++ b/data/shaders/core.vert @@ -5,10 +5,10 @@ uniform mat4 positionMatrix; uniform mat3 normalMatrix; -in vec4 vertPos; -in vec4 vertTexCoord; -in vec3 vertNormal; -in vec4 vertColor; +attribute vec4 vertPos; +attribute vec4 vertTexCoord; +attribute vec3 vertNormal; +attribute vec4 vertColor; varying vec4 texCoord; varying vec4 vTexCoord; diff --git a/data/shaders/dancenote.vert b/data/shaders/dancenote.vert index 6d7df82..c9b9c92 100644 --- a/data/shaders/dancenote.vert +++ b/data/shaders/dancenote.vert @@ -8,10 +8,10 @@ uniform float clock; uniform float scale; uniform vec2 position; -in vec4 vertPos; -in vec4 vertTexCoord; -in vec3 vertNormal; -in vec4 vertColor; +attribute vec4 vertPos; +attribute vec4 vertTexCoord; +attribute vec3 vertNormal; +attribute vec4 vertColor; // Per-vextex for fragment shader (if no geometry shader) varying vec4 texCoord; |
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:35:27
|
Author: Vincent Le Ligeour <yo...@us...>
Date: Mon May 23 17:59:45 2011 +0200
Converted to boost::filesystem3
---
cmake/Modules/FindBoost.cmake | 2 +-
game/backgrounds.cc | 5 +++++
game/cache.cc | 4 ++++
game/filemagic.hh | 4 ++++
game/fs.cc | 4 ++++
game/songparser-ini.cc | 4 ++++
game/songparser.cc | 4 ++++
game/songs.cc | 5 +++++
tools/ss_helpers.hh | 4 ++++
9 files changed, 35 insertions(+), 1 deletions(-)
diff --git a/cmake/Modules/FindBoost.cmake b/cmake/Modules/FindBoost.cmake
index 3fd02f7..4acd243 100644
--- a/cmake/Modules/FindBoost.cmake
+++ b/cmake/Modules/FindBoost.cmake
@@ -90,7 +90,7 @@ if (Boost_FOUND)
else()
# MESSAGE(STATUS "Finding Boost libraries.... ")
- SET( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "1.45" "1.44" "1.43" "1.42" "1.41" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" "1.36.0" "1.36" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33")
+ SET( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "1.46" "1.45" "1.44" "1.43" "1.42" "1.41" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" "1.36.0" "1.36" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33")
############################################
#
diff --git a/game/backgrounds.cc b/game/backgrounds.cc
index 7fd3cd0..cdedefb 100644
--- a/game/backgrounds.cc
+++ b/game/backgrounds.cc
@@ -55,8 +55,13 @@ void Backgrounds::reload_internal(fs::path const& parent) {
for (fs::directory_iterator dirIt(parent), dirEnd; m_loading && dirIt != dirEnd; ++dirIt) {
fs::path p = dirIt->path();
if (fs::is_directory(p)) { reload_internal(p); continue; }
+#if BOOST_FILESYSTEM_VERSION < 3
std::string name = p.leaf(); // File basename
std::string path = p.directory_string(); // Path without filename
+#else
+ std::string name = p.filename().string(); // File basename
+ std::string path = p.string(); // Path without filename
+#endif
path.erase(path.size() - name.size());
if (!regex_match(name.c_str(), match, expression)) continue;
{
diff --git a/game/cache.cc b/game/cache.cc
index 69974e2..0f1edd0 100644
--- a/game/cache.cc
+++ b/game/cache.cc
@@ -9,7 +9,11 @@ namespace cache {
fs::path constructSVGCacheFileName(fs::path const& svgfilename, double factor){
fs::path cache_filename;
std::string const lod = (boost::format("%.2f") % factor).str();
+#if BOOST_FILESYSTEM_VERSION < 3
std::string const cache_basename = svgfilename.filename() + ".cache_" + lod + ".png";
+#else
+ std::string const cache_basename = svgfilename.filename().string() + ".cache_" + lod + ".png";
+#endif
if (isThemeResource(svgfilename)) {
std::string const theme_name = (config["game/theme"].s().empty() ? "default" : config["game/theme"].s());
diff --git a/game/filemagic.hh b/game/filemagic.hh
index bf87ded..29e81fe 100644
--- a/game/filemagic.hh
+++ b/game/filemagic.hh
@@ -71,7 +71,11 @@ namespace filemagic {
// For now, just check the extension an assume it's not lying.
// Get file extension in lower case
+#if BOOST_FILESYSTEM_VERSION < 3
std::string ext = filename.extension();
+#else
+ std::string ext = filename.extension().string();
+#endif
// somehow this does not convert the extension to lower case:
//std::for_each(ext.begin(), ext.end(), static_cast<int(*)(int)>(std::tolower));
std::transform(ext.begin(), ext.end(), ext.begin(), ::tolower );
diff --git a/game/fs.cc b/game/fs.cc
index e34a784..767a7ab 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -128,7 +128,11 @@ std::string getThemePath(std::string const& filename) {
bool isThemeResource(fs::path filename){
try {
+#if BOOST_FILESYSTEM_VERSION < 3
std::string themefile = getThemePath(filename.filename());
+#else
+ std::string themefile = getThemePath(filename.filename().string());
+#endif
return themefile == filename;
} catch (...) { return false; }
}
diff --git a/game/songparser-ini.cc b/game/songparser-ini.cc
index 38e163b..db15d79 100644
--- a/game/songparser-ini.cc
+++ b/game/songparser-ini.cc
@@ -104,7 +104,11 @@ void SongParser::iniParseHeader() {
// Search the dir for the music files
for (boost::filesystem::directory_iterator dirIt(s.path), dirEnd; dirIt != dirEnd; ++dirIt) {
boost::filesystem::path p = dirIt->path();
+#if BOOST_FILESYSTEM_VERSION < 3
std::string name = p.leaf(); // File basename (notes.txt)
+#else
+ std::string name = p.filename().string(); // File basename (notes.txt)
+#endif
if (regex_match(name.c_str(), match, midifile)) {
s.midifilename = name;
} else if (regex_match(name.c_str(), match, audiofile_background)) {
diff --git a/game/songparser.cc b/game/songparser.cc
index 2b7b9b4..ac9f3f6 100644
--- a/game/songparser.cc
+++ b/game/songparser.cc
@@ -100,7 +100,11 @@ SongParser::SongParser(Song& s):
for (boost::filesystem::directory_iterator dirIt(s.path), dirEnd; dirIt != dirEnd; ++dirIt) {
boost::filesystem::path p = dirIt->path();
+#if BOOST_FILESYSTEM_VERSION < 3
std::string name = p.leaf(); // File basename
+#else
+ std::string name = p.filename().string(); // File basename
+#endif
if (m_song.cover.empty() && regex_match(name.c_str(), match, coverfile)) {
m_song.cover = name;
} else if (m_song.background.empty() && regex_match(name.c_str(), match, backgroundfile)) {
diff --git a/game/songs.cc b/game/songs.cc
index 62ab26d..afab383 100644
--- a/game/songs.cc
+++ b/game/songs.cc
@@ -67,8 +67,13 @@ void Songs::reload_internal(fs::path const& parent) {
for (fs::directory_iterator dirIt(parent), dirEnd; m_loading && dirIt != dirEnd; ++dirIt) {
fs::path p = dirIt->path();
if (fs::is_directory(p)) { reload_internal(p); continue; }
+#if BOOST_FILESYSTEM_VERSION < 3
std::string name = p.leaf(); // File basename (notes.txt)
std::string path = p.directory_string(); // Path without filename
+#else
+ std::string name = p.filename().string(); // File basename (notes.txt)
+ std::string path = p.string(); // Path without filename
+#endif
path.erase(path.size() - name.size());
if (!regex_match(name.c_str(), match, expression)) continue;
try {
diff --git a/tools/ss_helpers.hh b/tools/ss_helpers.hh
index 58e19dc..8895d94 100644
--- a/tools/ss_helpers.hh
+++ b/tools/ss_helpers.hh
@@ -10,7 +10,11 @@ extern "C" void xmlLogger(void* logger, char const* msg, ...) { if (logger) *(st
void enableXMLLogger(std::ostream& os = std::cerr) { xmlSetGenericErrorFunc(&os, xmlLogger); }
void disableXMLLogger() { xmlSetGenericErrorFunc(NULL, xmlLogger); }
+#if BOOST_FILESYSTEM_VERSION < 3
std::string filename(boost::filesystem::path const& p) { return *--p.end(); }
+#else
+std::string filename(boost::filesystem::path const& p) { return p.filename().string(); }
+#endif
/** Fix Singstar's b0rked XML **/
std::string xmlFix(std::vector<char> const& data) {
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:35:20
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed May 18 18:52:13 2011 +0300
More precise timecode handling and more tolerance before seeking (workaround for infinite seekloops).
---
game/ffmpeg.cc | 5 +++--
game/ffmpeg.hh | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/game/ffmpeg.cc b/game/ffmpeg.cc
index 1be7d7f..e565a04 100644
--- a/game/ffmpeg.cc
+++ b/game/ffmpeg.cc
@@ -280,11 +280,12 @@ void FFmpeg::decodeNextFrame() {
std::vector<int16_t> resampled(AVCODEC_MAX_AUDIO_FRAME_SIZE);
int frames = audio_resample(pResampleCtx, &resampled[0], audioFrames, outsize);
resampled.resize(frames * AUDIO_CHANNELS);
- // Calculate new positions
+ // Use timecode from packet if available
if (packet.time() == packet.time()) m_position = packet.time();
- else m_position += double(resampled.size())/double(audioQueue.getSamplesPerSecond());
// Push to output queue (may block)
audioQueue.push(resampled, m_position);
+ // Increment current time
+ m_position += double(resampled.size())/double(audioQueue.getSamplesPerSecond());
}
// Audio frames are always finished
frameFinished = 1;
diff --git a/game/ffmpeg.hh b/game/ffmpeg.hh
index 8006df8..a94a8b0 100644
--- a/game/ffmpeg.hh
+++ b/game/ffmpeg.hh
@@ -162,7 +162,7 @@ class AudioBuffer {
void setDuration(double seconds) { m_duration = seconds; }
bool wantSeek() {
size_t oldest = m_pos - m_data.size();
- return oldest > 0 && m_posReq < int64_t(oldest);
+ return m_posReq + int64_t(m_sps) * 2.0 /* seconds tolerance */ < int64_t(oldest);
}
private:
bool wantMore() { return int64_t(m_pos) - int64_t(m_data.capacity() / 2) < m_posReq; }
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:35:13
|
Author: Tapio Vierros <tap...@gm...>
Date: Tue Mar 1 23:54:51 2011 +0200
Add quite a few missing const-qualifiers.
---
game/database.hh | 2 +-
game/ffmpeg.cc | 2 +-
game/ffmpeg.hh | 2 +-
game/joystick.hh | 14 +++++++-------
game/layout_singer.cc | 2 +-
game/layout_singer.hh | 2 +-
game/midifile.cc | 2 +-
game/opengl_text.hh | 8 ++++----
game/songparser-ini.cc | 2 +-
game/songparser-sm.cc | 2 +-
game/songparser-txt.cc | 2 +-
game/songparser.hh | 6 +++---
game/video_driver.cc | 2 +-
game/video_driver.hh | 2 +-
game/webcam.hh | 2 +-
15 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/game/database.hh b/game/database.hh
index 44f30fa..819f7ff 100644
--- a/game/database.hh
+++ b/game/database.hh
@@ -15,7 +15,7 @@ struct ScoreItem {
std::string track; // includes difficulty
std::string track_simple; // no difficulty
Color color;
- bool operator < (ScoreItem const& other) { return score < other.score; }
+ bool operator < (ScoreItem const& other) const { return score < other.score; }
};
/**Access to a database for performous which holds
diff --git a/game/ffmpeg.cc b/game/ffmpeg.cc
index 7e1d129..1be7d7f 100644
--- a/game/ffmpeg.cc
+++ b/game/ffmpeg.cc
@@ -18,7 +18,7 @@ extern "C" {
/*static*/ boost::mutex FFmpeg::s_avcodec_mutex;
FFmpeg::FFmpeg(bool _decodeVideo, bool _decodeAudio, std::string const& _filename, unsigned int rate):
- m_filename(_filename), m_rate(rate), m_quit(), m_running(), m_eof(), m_seekTarget(getNaN()),
+ width(), height(), m_filename(_filename), m_rate(rate), m_quit(), m_running(), m_eof(), m_seekTarget(getNaN()),
pFormatCtx(), pResampleCtx(), img_convert_ctx(), pVideoCodecCtx(), pAudioCodecCtx(), pVideoCodec(), pAudioCodec(),
videoStream(-1), audioStream(-1), decodeVideo(_decodeVideo), decodeAudio(_decodeAudio), m_position(),
m_thread(new boost::thread(boost::ref(*this)))
diff --git a/game/ffmpeg.hh b/game/ffmpeg.hh
index a3b4388..8006df8 100644
--- a/game/ffmpeg.hh
+++ b/game/ffmpeg.hh
@@ -125,7 +125,7 @@ class AudioBuffer {
/// set samples per second
void setSamplesPerSecond(unsigned sps) { m_sps = sps; }
/// get samples per second
- unsigned getSamplesPerSecond() { return m_sps; }
+ unsigned getSamplesPerSecond() const { return m_sps; }
void push(std::vector<int16_t> const& data, double timestamp) {
boost::mutex::scoped_lock l(m_mutex);
while (!condition()) m_cond.wait(l);
diff --git a/game/joystick.hh b/game/joystick.hh
index 83623ee..44f82b8 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -113,13 +113,13 @@ namespace input {
m_pressed[i] = _event.pressed[i];
}
};
- void clearEvents() {m_events.clear();};
- void assign() {m_assigned = true;};
- void unassign() {m_assigned = false; clearEvents();};
- bool assigned() {return m_assigned;};
- bool pressed(int _button) {return m_pressed[_button];};
- std::string name() {return m_instrument.name;};
- bool type_match(DevType _type) {
+ void clearEvents() { m_events.clear(); }
+ void assign() { m_assigned = true; }
+ void unassign() { m_assigned = false; clearEvents(); }
+ bool assigned() const { return m_assigned; }
+ bool pressed(int _button) const { return m_pressed[_button]; }
+ std::string name() const { return m_instrument.name; }
+ bool type_match(DevType _type) const {
return _type == m_instrument.type;
};
int buttonFromSDL(unsigned int sdl_button) {
diff --git a/game/layout_singer.cc b/game/layout_singer.cc
index 625a824..09eac21 100644
--- a/game/layout_singer.cc
+++ b/game/layout_singer.cc
@@ -151,6 +151,6 @@ void LayoutSinger::draw(double time, Position position) {
if (!config["game/karaoke_mode"].b() ) drawScore(position); // draw score if not in karaoke mode
}
-double LayoutSinger::lyrics_begin() {
+double LayoutSinger::lyrics_begin() const {
return m_lyricit->begin;
}
diff --git a/game/layout_singer.hh b/game/layout_singer.hh
index b4f1b8f..1529aea 100644
--- a/game/layout_singer.hh
+++ b/game/layout_singer.hh
@@ -56,7 +56,7 @@ class LayoutSinger {
void reset();
void draw(double time, Position position = LayoutSinger::BOTTOM);
void drawScore(Position position);
- double lyrics_begin();
+ double lyrics_begin() const;
void hideLyrics(bool hide = true) { m_hideLyrics = hide; };
private:
VocalTrack& m_vocal;
diff --git a/game/midifile.cc b/game/midifile.cc
index 5272165..cb1c735 100644
--- a/game/midifile.cc
+++ b/game/midifile.cc
@@ -45,7 +45,7 @@ class MidiStream {
size_t offset;
Riff(MidiStream& ms);
~Riff();
- bool has_more_data() { return offset < size; }
+ bool has_more_data() const { return offset < size; }
uint8_t read_uint8() { consume(1); return ms.f.get(); }
uint16_t read_uint16() { consume(2); return ms.read_uint16(); }
uint32_t read_uint32() { consume(4); return ms.read_uint32(); }
diff --git a/game/opengl_text.hh b/game/opengl_text.hh
index 01847d7..9d96f93 100644
--- a/game/opengl_text.hh
+++ b/game/opengl_text.hh
@@ -49,13 +49,13 @@ class OpenGLText {
/// draws full texture
void draw();
/// @return x
- double x() {return m_x;};
+ double x() const { return m_x; }
/// @return y
- double y() {return m_y;};
+ double y() const { return m_y; }
/// @return x_advance
- double x_advance() {return m_x_advance;};
+ double x_advance() const { return m_x_advance; }
/// @return y_advance
- double y_advance() {return m_y_advance;};
+ double y_advance() const { return m_y_advance; }
/// @returns dimension of texture
Dimensions& dimensions() { return m_surface.dimensions; }
diff --git a/game/songparser-ini.cc b/game/songparser-ini.cc
index 36e724b..38e163b 100644
--- a/game/songparser-ini.cc
+++ b/game/songparser-ini.cc
@@ -12,7 +12,7 @@
using namespace SongParserUtil;
/// 'Magick' to check if this file looks like correct format
-bool SongParser::iniCheck(std::vector<char> const& data) {
+bool SongParser::iniCheck(std::vector<char> const& data) const {
static const std::string header = "[song]";
return std::equal(header.begin(), header.end(), data.begin());
}
diff --git a/game/songparser-sm.cc b/game/songparser-sm.cc
index cb84732..a006b60 100644
--- a/game/songparser-sm.cc
+++ b/game/songparser-sm.cc
@@ -12,7 +12,7 @@
using namespace SongParserUtil;
/// 'Magick' to check if this file looks like correct format
-bool SongParser::smCheck(std::vector<char> const& data) {
+bool SongParser::smCheck(std::vector<char> const& data) const {
if (data[0] != '#' || data[1] < 'A' || data[1] > 'Z') return false;
for (std::vector<char>::const_iterator it = data.begin(); it != data.end(); ++it){
if (*it == '\n') return false;
diff --git a/game/songparser-txt.cc b/game/songparser-txt.cc
index 856ff9f..06221b3 100644
--- a/game/songparser-txt.cc
+++ b/game/songparser-txt.cc
@@ -11,7 +11,7 @@
using namespace SongParserUtil;
/// 'Magick' to check if this file looks like correct format
-bool SongParser::txtCheck(std::vector<char> const& data) {
+bool SongParser::txtCheck(std::vector<char> const& data) const {
return data[0] == '#' && data[1] >= 'A' && data[1] <= 'Z';
}
diff --git a/game/songparser.hh b/game/songparser.hh
index 601fbce..4232731 100644
--- a/game/songparser.hh
+++ b/game/songparser.hh
@@ -32,15 +32,15 @@ class SongParser {
double m_gap;
double m_bpm;
- bool txtCheck(std::vector<char> const& data);
+ bool txtCheck(std::vector<char> const& data) const;
void txtParseHeader();
void txtParse();
bool txtParseField(std::string const& line);
bool txtParseNote(std::string line, VocalTrack &vocal);
- bool iniCheck(std::vector<char> const& data);
+ bool iniCheck(std::vector<char> const& data) const;
void iniParseHeader();
void iniParse();
- bool smCheck(std::vector<char> const& data);
+ bool smCheck(std::vector<char> const& data) const;
void smParseHeader();
void smParse();
bool smParseField(std::string line);
diff --git a/game/video_driver.cc b/game/video_driver.cc
index 4471648..21ed9ff 100644
--- a/game/video_driver.cc
+++ b/game/video_driver.cc
@@ -267,7 +267,7 @@ void Window::setFullscreen(bool _fs) {
resize();
}
-bool Window::getFullscreen() {
+bool Window::getFullscreen() const {
return m_fullscreen;
}
diff --git a/game/video_driver.hh b/game/video_driver.hh
index 3b5bd2d..c85cd8e 100644
--- a/game/video_driver.hh
+++ b/game/video_driver.hh
@@ -68,7 +68,7 @@ public:
*/
void setFullscreen(bool _fs);
/// gets fullscreen state
- bool getFullscreen();
+ bool getFullscreen() const;
/// take a screenshot
void screenshot();
diff --git a/game/webcam.hh b/game/webcam.hh
index 9566f2e..33e4358 100644
--- a/game/webcam.hh
+++ b/game/webcam.hh
@@ -30,7 +30,7 @@ class Webcam {
void operator()();
/// Is good?
- bool is_good() { return m_capture != 0 && m_running; }
+ bool is_good() const { return m_capture != 0 && m_running; }
/// When paused, does not get or render frames
void pause(bool do_pause = true);
/// Display frame
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:35:06
|
Author: Vincent Le Ligeour <yo...@us...>
Date: Fri May 6 22:28:08 2011 +0200
Fixed ss_extract command line flag parsing
---
tools/ss_extract.cpp | 54 ++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 42 insertions(+), 12 deletions(-)
diff --git a/tools/ss_extract.cpp b/tools/ss_extract.cpp
index 4a89125..9bf9ef5 100644
--- a/tools/ss_extract.cpp
+++ b/tools/ss_extract.cpp
@@ -36,9 +36,10 @@ std::string dvdPath;
std::ofstream txtfile;
int ts = 0;
int sleepts = -1;
-const bool video = true;
-const bool mkvcompress = false;
-const bool oggcompress = true;
+bool g_video = true;
+bool g_audio = true;
+bool g_mkvcompress = true;
+bool g_oggcompress = true;
void parseNote(xmlpp::Node* node) {
xmlpp::Element& elem = dynamic_cast<xmlpp::Element&>(*node);
@@ -157,11 +158,13 @@ struct Process {
remove = path;
dom.get_document()->write_to_file((path / "notes.xml").string(), "UTF-8");
Pak dataPak(song.dataPakName);
- std::cerr << ">>> Extracting and decoding music" << std::endl;
- try {
- music(song, dataPak[id + "/music.mib"], pak["export/" + id + "/music.mih"], path);
- } catch (...) {
- music_us(song, dataPak[id + "/mus+vid.iav"], dataPak[id + "/mus+vid.ind"], path);
+ if (g_audio) {
+ std::cerr << ">>> Extracting and decoding music" << std::endl;
+ try {
+ music(song, dataPak[id + "/music.mib"], pak["export/" + id + "/music.mih"], path);
+ } catch (...) {
+ music_us(song, dataPak[id + "/mus+vid.iav"], dataPak[id + "/mus+vid.ind"], path);
+ }
}
std::cerr << ">>> Extracting cover image" << std::endl;
try {
@@ -171,7 +174,7 @@ struct Process {
} catch (...) {}
remove = "";
// FIXME: use some library (preferrably ffmpeg):
- if (oggcompress) {
+ if (g_oggcompress) {
if( !song.music.empty() ) {
std::cerr << ">>> Compressing audio into music.ogg" << std::endl;
std::string cmd = "oggenc \"" + song.music.string() + "\"";
@@ -191,7 +194,7 @@ struct Process {
}
}
}
- if (video) {
+ if (g_video) {
std::cerr << ">>> Extracting video" << std::endl;
try {
std::vector<char> ipudata;
@@ -208,7 +211,7 @@ struct Process {
song.video = "";
}
}
- if (mkvcompress) {
+ if (g_mkvcompress) {
std::cerr << ">>> Compressing video and audio into music.mkv" << std::endl;
std::string cmd = "ffmpeg -i \"" + (path / "video.mpg").string() + "\" -vcodec libx264 -vpre hq -crf 25 -threads 0 -metadata album=\"" + song.edition + "\" -metadata author=\"" + song.artist + "\" -metadata comment=\"" + song.genre + "\" -metadata title=\"" + song.title + "\" \"" + (path / "video.m4v\"").string();
std::cerr << cmd << std::endl;
@@ -365,7 +368,34 @@ int main( int argc, char **argv) {
po::store(po::command_line_parser(argc, argv).options(opt).positional(pos).run(), vm);
po::notify(vm);
if (dvdPath.empty()) throw std::runtime_error("No Singstar DVD path specified. Enter a path to a folder with pack_ee.pak in it.");
- // TODO: process audio and video options and throw if they have incorrect values
+ // Process video flag
+ if (video == "none") {
+ g_video = false;
+ g_mkvcompress = false;
+ } else if (video == "mkv") {
+ g_video = true;
+ g_mkvcompress = true;
+ } else if (video == "mpeg2") {
+ g_video = true;
+ g_mkvcompress = false;
+ } else {
+ throw std::runtime_error("Invalid video flag. Value must be {none, mkv, mpeg2}");
+ }
+ std::cerr << ">>> Using video flag: \"" << video << "\"" << std::endl;
+ // Process audio flag
+ if (audio == "none") {
+ g_audio = false;
+ g_oggcompress = false;
+ } else if (audio == "ogg") {
+ g_audio = true;
+ g_oggcompress = true;
+ } else if (audio == "wav") {
+ g_audio = true;
+ g_oggcompress = false;
+ } else {
+ throw std::runtime_error("Invalid audio flag. Value must be {none, ogg, wav}");
+ }
+ std::cerr << ">>> Using audio flag: \"" << audio << "\"" << std::endl;
} catch (std::exception& e) {
std::cout << cmdline << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:34:59
|
Author: Vincent Le Ligeour <yo...@us...>
Date: Sat May 7 17:00:22 2011 +0200
Fixed instrument gameplay
---
game/joystick.cc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index a5c52a9..29432ed 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -756,6 +756,9 @@ bool input::SDL::pushEvent(SDL_Event _e) {
if(!dev.assigned()) return false;
if (dev.name() != "GUITAR_GUITARHERO_XPLORER" && (_e.jaxis.axis == 5 || _e.jaxis.axis == 6 || _e.jaxis.axis == 1)) {
event.type = input::Event::PICK;
+ for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
+ event.pressed[i] = dev.pressed(i);
+ }
// Direction
if(_e.jaxis.value > 0 ) {
// down
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:34:51
|
Author: Vincent Le Ligeour <yo...@us...> Date: Fri May 6 21:35:02 2011 +0200 Added void pro guitar detection --- data/controllers.xml | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/data/controllers.xml b/data/controllers.xml index 23fbca1..4f99bce 100644 --- a/data/controllers.xml +++ b/data/controllers.xml @@ -96,6 +96,14 @@ <button id="9" value="start" /> </mapping> </controller> + <!-- Not managed + <controller type="guitar" name="GUITAR_PRO_PS3"> + <description>Rock Band Pro Guitar for PS3</description> + <regexp match="Licensed by Sony Computer Entertainment America Harmonix RB3 Mustang Guitar for PlayStation" /> + <mapping> + </mapping> + </controller> + --> <controller type="drumkit" name="DRUMS_GUITARHERO"> <description>Guitar Hero 4 drum kit (guessed, could be a guitar)</description> <regexp match="Guitar Hero4" /> |
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:34:44
|
Author: Vincent Le Ligeour <yo...@us...>
Date: Fri May 6 21:33:51 2011 +0200
Added stereo mandatory extension check
---
game/video_driver.cc | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/game/video_driver.cc b/game/video_driver.cc
index 45933a5..4471648 100644
--- a/game/video_driver.cc
+++ b/game/video_driver.cc
@@ -77,6 +77,8 @@ Window::Window(unsigned int width, unsigned int height, bool fs): m_windowW(widt
if (!GLEW_VERSION_2_1) throw std::runtime_error("OpenGL 2.1 is required but not available");
+ if (!GLEW_ARB_viewport_array && config["graphic/stereo3d"].b()) throw std::runtime_error("OpenGL extension ARB_viewport_array is required but not available when using stereo mode");
+
input::SDL::init(); // Joysticks etc.
if (GLEW_VERSION_3_3) {
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:34:37
|
Author: Vincent Le Ligeour <yo...@us...>
Date: Mon Apr 11 00:59:55 2011 +0200
Fixed regression in for old SingStar DVD cover decoding
---
tools/ss_cover.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/tools/ss_cover.cpp b/tools/ss_cover.cpp
index 8019eb1..3b85420 100644
--- a/tools/ss_cover.cpp
+++ b/tools/ss_cover.cpp
@@ -88,7 +88,12 @@ SingstarCover::SingstarCover(const std::string pak_file, unsigned int track_id)
std::string tmp( buf.begin(), buf.end() );
dom.parse_memory(tmp);
xmlpp::NodeSet n = dom.get_document()->get_root_node()->find(xpath, nsmap);
- if (n.empty()) throw std::runtime_error("Unable to find cover informations");
+ if (n.empty()) {
+ std::string xpath_old = std::string("/TPAGE_BIT_SET/TPAGE_BIT[@NAME='") + id + "']";
+ n = dom.get_document()->get_root_node()->find(xpath_old, nsmap);
+ if (n.empty())
+ throw std::runtime_error("Unable to find cover informations");
+ }
xmlpp::Element& e = dynamic_cast<xmlpp::Element&>(*n[0]);
m_u = boost::lexical_cast<unsigned int>(e.get_attribute("U")->get_value());
m_v = boost::lexical_cast<unsigned int>(e.get_attribute("V")->get_value());
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:34:31
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Tue Mar 29 00:43:59 2011 +0200
Less copypasta, more beef.
---
game/configuration.cc | 36 ++++++++----------------------------
1 files changed, 8 insertions(+), 28 deletions(-)
diff --git a/game/configuration.cc b/game/configuration.cc
index 9d383ff..3f6144d 100644
--- a/game/configuration.cc
+++ b/game/configuration.cc
@@ -171,6 +171,9 @@ void ConfigItem::update(xmlpp::Element& elem, int mode) try {
if (mode == 0) {
m_type = getAttribute(elem, "type");
if (m_type.empty()) throw std::runtime_error("Entry type attribute is missing");
+ // Menu text
+ m_shortDesc = getText(elem, "short");
+ m_longDesc = getText(elem, "long");
} else {
std::string type = getAttribute(elem, "type");
if (!type.empty() && type != m_type) throw std::runtime_error("Entry type mismatch: " + getAttribute(elem, "name") + ": schema type = " + m_type + ", config type = " + type);
@@ -191,7 +194,7 @@ void ConfigItem::update(xmlpp::Element& elem, int mode) try {
if (!n2.empty()) {
for (xmlpp::NodeSet::const_iterator it2 = n2.begin(), end2 = n2.end(); it2 != end2; ++it2) {
xmlpp::Element& elem2 = dynamic_cast<xmlpp::Element&>(**it2);
- m_enums.push_back(elem2.get_child_text()->get_content());
+ m_enums.push_back(getText(elem2));
}
m_min = 0;
m_max = int(m_enums.size() - 1);
@@ -204,40 +207,17 @@ void ConfigItem::update(xmlpp::Element& elem, int mode) try {
if (!value_string.empty()) m_value = boost::lexical_cast<double>(value_string);
updateNumeric<double>(elem, mode);
} else if (m_type == "string") {
- xmlpp::NodeSet n2 = elem.find("stringvalue/text()");
- // FIXME: WTF does this loop do? Does find actually return many elements and why?
- std::string value;
- for (xmlpp::NodeSet::const_iterator it2 = n2.begin(), end2 = n2.end(); it2 != end2; ++it2) {
- xmlpp::TextNode& elem2 = dynamic_cast<xmlpp::TextNode&>(**it2);
- value = elem2.get_content();
- }
- m_value = value;
+ m_value = getText(elem, "stringvalue");
} else if (m_type == "string_list" || m_type == "option_list") {
//TODO: Option list should also update selection (from attribute?)
std::vector<std::string> value;
- xmlpp::NodeSet n2 = elem.find("stringvalue/text()");
+ xmlpp::NodeSet n2 = elem.find("stringvalue");
for (xmlpp::NodeSet::const_iterator it2 = n2.begin(), end2 = n2.end(); it2 != end2; ++it2) {
- xmlpp::TextNode& elem2 = dynamic_cast<xmlpp::TextNode&>(**it2);
- value.push_back(elem2.get_content());
+ value.push_back(getText(dynamic_cast<xmlpp::Element const&>(**it2)));
}
m_value = value;
} else if (!m_type.empty()) throw std::runtime_error("Invalid value type in config schema: " + m_type);
- {
- // Update short description
- xmlpp::NodeSet n2 = elem.find("short/text()");
- for (xmlpp::NodeSet::const_iterator it2 = n2.begin(), end2 = n2.end(); it2 != end2; ++it2) {
- xmlpp::TextNode& elem2 = dynamic_cast<xmlpp::TextNode&>(**it2);
- m_shortDesc = elem2.get_content();
- }
- }
- {
- // Update long description
- xmlpp::NodeSet n2 = elem.find("long/text()");
- for (xmlpp::NodeSet::const_iterator it2 = n2.begin(), end2 = n2.end(); it2 != end2; ++it2) {
- xmlpp::TextNode& elem2 = dynamic_cast<xmlpp::TextNode&>(**it2);
- m_longDesc = elem2.get_content();
- }
- }
+ // Schema sets all defaults, system config sets the system default
if (mode < 1) m_factoryDefaultValue = m_defaultValue = m_value;
if (mode < 2) m_defaultValue = m_value;
} catch (std::exception& e) {
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:34:24
|
Author: Lasse Karkkainen <tro...@tr...> Date: Tue Mar 29 00:21:54 2011 +0200 Remove locales from config schema. --- data/schema.xml | 216 ++++++++++++++++-------------------------------- game/configuration.cc | 28 +++--- 2 files changed, 86 insertions(+), 158 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:34:17
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Mar 28 23:54:42 2011 +0200
Enum values for config options and improved config parser diagnostics & error checking.
---
data/schema.xml | 8 ++++++--
game/configuration.cc | 45 +++++++++++++++++++++++++++++++++++----------
game/configuration.hh | 1 +
3 files changed, 42 insertions(+), 12 deletions(-)
diff --git a/data/schema.xml b/data/schema.xml
index 3219b2f..4c1ee9e 100644
--- a/data/schema.xml
+++ b/data/schema.xml
@@ -132,10 +132,14 @@ to save the current settings to XML.
</locale>
</entry>
<entry name="graphic/stereo3dtype" type="int" value="0">
- <limits min="0" max="2" step="1" />
+ <limits>
+ <enum>Red/Cyan</enum>
+ <enum>Green/Magenta</enum>
+ <enum>Over/Under</enum>
+ </limits>
<locale name="C">
<short>Stereo3D type</short>
- <long>Some modes may only be activated in fullscreen mode. 0 = red/cyan, 1 = green/magenta, 2 = over/under.</long>
+ <long>Some modes may only get activated in fullscreen mode.</long>
</locale>
</entry>
<entry name="graphic/stereo3dseparation" type="float" value="50">
diff --git a/game/configuration.cc b/game/configuration.cc
index fdc1bcd..571a0f1 100644
--- a/game/configuration.cc
+++ b/game/configuration.cc
@@ -97,7 +97,11 @@ namespace {
}
std::string ConfigItem::getValue() const {
- if (m_type == "int") return numericFormat<int>(m_value, m_multiplier, m_step) + m_unit;
+ if (m_type == "int") {
+ int val = boost::get<int>(m_value);
+ if (val >= 0 && val < m_enums.size()) return m_enums[val];
+ return numericFormat<int>(m_value, m_multiplier, m_step) + m_unit;
+ }
if (m_type == "float") return numericFormat<double>(m_value, m_multiplier, m_step) + m_unit;
if (m_type == "bool") return boost::get<bool>(m_value) ? _("Enabled") : _("Disabled");
if (m_type == "string") return boost::get<std::string>(m_value);
@@ -131,12 +135,12 @@ namespace {
}
template <typename T, typename V> void setLimits(xmlpp::Element& e, V& min, V& max, V& step) {
- std::string value = getAttribute(e, "min");
- if (!value.empty()) min = boost::lexical_cast<T>(value);
- value = getAttribute(e, "max");
- if (!value.empty()) max = boost::lexical_cast<T>(value);
- value = getAttribute(e, "step");
- if (!value.empty()) step = boost::lexical_cast<T>(value);
+ xmlpp::Attribute* a = e.get_attribute("min");
+ if (a) min = boost::lexical_cast<T>(a->get_value());
+ a = e.get_attribute("max");
+ if (a) max = boost::lexical_cast<T>(a->get_value());
+ a = e.get_attribute("step");
+ if (a) step = boost::lexical_cast<T>(a->get_value());
}
}
@@ -162,10 +166,14 @@ template <typename T> void ConfigItem::updateNumeric(xmlpp::Element& elem, int m
}
}
-void ConfigItem::update(xmlpp::Element& elem, int mode) {
+
+void ConfigItem::update(xmlpp::Element& elem, int mode) try {
if (mode == 0) {
m_type = getAttribute(elem, "type");
if (m_type.empty()) throw std::runtime_error("Entry type attribute is missing");
+ } else {
+ std::string type = getAttribute(elem, "type");
+ if (!type.empty() && type != m_type) throw std::runtime_error("Entry type mismatch: " + getAttribute(elem, "name") + ": schema type = " + m_type + ", config type = " + type);
}
if (m_type == "bool") {
std::string value_string = getAttribute(elem, "value");
@@ -177,6 +185,19 @@ void ConfigItem::update(xmlpp::Element& elem, int mode) {
} else if (m_type == "int") {
std::string value_string = getAttribute(elem, "value");
if (!value_string.empty()) m_value = boost::lexical_cast<int>(value_string);
+ // Enum handling
+ if (mode == 0) {
+ xmlpp::NodeSet n2 = elem.find("limits/enum");
+ if (!n2.empty()) {
+ for (xmlpp::NodeSet::const_iterator it2 = n2.begin(), end2 = n2.end(); it2 != end2; ++it2) {
+ xmlpp::Element& elem2 = dynamic_cast<xmlpp::Element&>(**it2);
+ m_enums.push_back(elem2.get_child_text()->get_content());
+ }
+ m_min = 0;
+ m_max = int(m_enums.size() - 1);
+ m_step = 1;
+ }
+ }
updateNumeric<int>(elem, mode);
} else if (m_type == "float") {
std::string value_string = getAttribute(elem, "value");
@@ -200,8 +221,7 @@ void ConfigItem::update(xmlpp::Element& elem, int mode) {
value.push_back(elem2.get_content());
}
m_value = value;
- }
-
+ } else if (!m_type.empty()) throw std::runtime_error("Invalid value type in config schema: " + m_type);
{
// Update short description
xmlpp::NodeSet n2 = elem.find("locale/short/text()");
@@ -220,6 +240,9 @@ void ConfigItem::update(xmlpp::Element& elem, int mode) {
}
if (mode < 1) m_factoryDefaultValue = m_defaultValue = m_value;
if (mode < 2) m_defaultValue = m_value;
+} catch (std::exception& e) {
+ int line = elem.get_line();
+ throw std::runtime_error(boost::lexical_cast<std::string>(line) + ": Error while reading entry: " + e.what());
}
fs::path systemConfFile = "/etc/xdg/performous/config.xml";
@@ -334,6 +357,8 @@ void readConfigXML(fs::path const& file, int mode) {
int line = e.elem.get_line();
std::string name = e.elem.get_name();
throw std::runtime_error(file.string() + ":" + boost::lexical_cast<std::string>(line) + " element " + name + " " + e.message);
+ } catch (std::exception& e) {
+ throw std::runtime_error(file.string() + ":" + e.what());
}
}
diff --git a/game/configuration.hh b/game/configuration.hh
index 6699afd..82f2e6e 100644
--- a/game/configuration.hh
+++ b/game/configuration.hh
@@ -51,6 +51,7 @@ class ConfigItem {
Value m_value; ///< The current value
Value m_factoryDefaultValue; ///< The value from config schema
Value m_defaultValue; ///< The value from config schema or system config
+ std::vector<std::string> m_enums; ///< Enum value titles
boost::variant<int, double> m_step, m_min, m_max;
boost::variant<int, double> m_multiplier;
std::string m_unit;
|
|
From: Tapio V. <aa...@us...> - 2011-07-02 15:52:38
|
Author: Tapio Vierros <tap...@gm...> Date: Sat Jul 2 18:45:30 2011 +0300 Fixed audio devices screen background image. --- themes/default/audiodevices_bg.svg | 196 ++---------------------------------- 1 files changed, 8 insertions(+), 188 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2011-07-02 15:46:20
|
Author: Tapio Vierros <tap...@gm...> Date: Sat Jul 2 18:45:30 2011 +0300 Fixed audio devices screen background image. --- themes/default/audiodevices_bg.svg | 196 ++---------------------------------- 1 files changed, 8 insertions(+), 188 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-06-27 21:28:29
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Tue Jun 28 00:27:17 2011 +0300
Someone used 1-based array indices but in C they begin at zero. Needs
testing.
---
tools/pak.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/pak.cpp b/tools/pak.cpp
index 6d1c79b..198577c 100644
--- a/tools/pak.cpp
+++ b/tools/pak.cpp
@@ -64,8 +64,8 @@ Pak::Pak(std::string const& filename) {
name += std::string(tmp, string_length - 1);
unsigned ext_idx = readLE<1>(f);
char toto[2];
- toto[1] = '0' + ext.size();
- toto[2] = '\0';
+ toto[0] = '0' + ext.size();
+ toto[1] = '\0';
if (ext_idx) name += std::string(".") + (ext_idx <= ext.size() ? ext[ext_idx-1] : std::string(toto));
std::replace(name.begin(), name.end(), '\\', '/');
m_files.insert(std::make_pair(name, file));
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-06-27 21:28:23
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Tue Jun 28 00:26:31 2011 +0300
Shader fixes for Radeon on Windows (Performous wouldn't start).
---
data/shaders/stereo3d.geom | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/data/shaders/stereo3d.geom b/data/shaders/stereo3d.geom
index 0c316cb..c94adb1 100644
--- a/data/shaders/stereo3d.geom
+++ b/data/shaders/stereo3d.geom
@@ -26,12 +26,12 @@ void passthru() {
}
// Process all the vertices, applying code to them before emitting (do-while to convince Nvidia of the code getting executed)
-#define PROCESS(code) i = 0; do { passthru(); code; EmitVertex(); } while (++i < gl_in.length); EndPrimitive();
+#define PROCESS(code) i = 0; do { passthru(); code; EmitVertex(); } while (++i < 3); EndPrimitive();
void main() {
bogus = 0.0;
if (sepFactor == 0.0) {
- gl_ViewportIndex = 0; PROCESS(); // No stereo
+ gl_ViewportIndex = 0; PROCESS(;); // No stereo
} else {
gl_ViewportIndex = 1; PROCESS(gl_Position.x -= sepFactor * (gl_Position.z - z0)); // Left eye
gl_ViewportIndex = 2; PROCESS(gl_Position.x += sepFactor * (gl_Position.z - z0)); // Right eye
|
|
From: Yoda-JM <yo...@us...> - 2011-06-21 23:41:10
|
Author: Vincent Le Ligeour <yo...@us...>
Date: Wed Jun 22 01:39:54 2011 +0200
Fixed compile failure on newest ffmpeg version (once again)
---
game/ffmpeg.cc | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/game/ffmpeg.cc b/game/ffmpeg.cc
index e565a04..61138cf 100644
--- a/game/ffmpeg.cc
+++ b/game/ffmpeg.cc
@@ -47,6 +47,12 @@ double FFmpeg::duration() const {
return d >= 0.0 ? d : getInf();
}
+// FFMPEG has fluctuating API
+#if LIBAVCODEC_VERSION_INT < ((52<<16)+(64<<8)+0)
+#define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO
+#define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO
+#endif
+
void FFmpeg::open() {
boost::mutex::scoped_lock l(s_avcodec_mutex);
av_register_all();
@@ -60,8 +66,8 @@ void FFmpeg::open() {
for (unsigned int i=0; i<pFormatCtx->nb_streams; i++) {
AVCodecContext* cc = pFormatCtx->streams[i]->codec;
cc->workaround_bugs = FF_BUG_AUTODETECT;
- if (videoStream == -1 && cc->codec_type==CODEC_TYPE_VIDEO) videoStream = i;
- if (audioStream == -1 && cc->codec_type==CODEC_TYPE_AUDIO) audioStream = i;
+ if (videoStream == -1 && cc->codec_type==AVMEDIA_TYPE_VIDEO) videoStream = i;
+ if (audioStream == -1 && cc->codec_type==AVMEDIA_TYPE_AUDIO) audioStream = i;
}
if (videoStream == -1 && decodeVideo) throw std::runtime_error("No video stream found");
if (audioStream == -1 && decodeAudio) throw std::runtime_error("No audio stream found");
|
|
From: Yoda-JM <yo...@us...> - 2011-06-21 23:41:03
|
Author: Vincent Le Ligeour <yo...@us...>
Date: Wed Jun 22 01:39:54 2011 +0200
Fixed compile failure on newest ffmpeg version (once again)
---
game/ffmpeg.cc | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/game/ffmpeg.cc b/game/ffmpeg.cc
index e565a04..61138cf 100644
--- a/game/ffmpeg.cc
+++ b/game/ffmpeg.cc
@@ -47,6 +47,12 @@ double FFmpeg::duration() const {
return d >= 0.0 ? d : getInf();
}
+// FFMPEG has fluctuating API
+#if LIBAVCODEC_VERSION_INT < ((52<<16)+(64<<8)+0)
+#define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO
+#define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO
+#endif
+
void FFmpeg::open() {
boost::mutex::scoped_lock l(s_avcodec_mutex);
av_register_all();
@@ -60,8 +66,8 @@ void FFmpeg::open() {
for (unsigned int i=0; i<pFormatCtx->nb_streams; i++) {
AVCodecContext* cc = pFormatCtx->streams[i]->codec;
cc->workaround_bugs = FF_BUG_AUTODETECT;
- if (videoStream == -1 && cc->codec_type==CODEC_TYPE_VIDEO) videoStream = i;
- if (audioStream == -1 && cc->codec_type==CODEC_TYPE_AUDIO) audioStream = i;
+ if (videoStream == -1 && cc->codec_type==AVMEDIA_TYPE_VIDEO) videoStream = i;
+ if (audioStream == -1 && cc->codec_type==AVMEDIA_TYPE_AUDIO) audioStream = i;
}
if (videoStream == -1 && decodeVideo) throw std::runtime_error("No video stream found");
if (audioStream == -1 && decodeAudio) throw std::runtime_error("No audio stream found");
|
|
From: Yoda-JM <yo...@us...> - 2011-06-17 15:32:52
|
Author: Tapio Vierros <tap...@gm...> Date: Mon Apr 11 18:58:40 2011 +0300 Added a PO template for tinkering with Launchpad translations. --- lang/performous.pot | 553 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 553 insertions(+), 0 deletions(-) |
|
From: Yoda-JM <yo...@us...> - 2011-06-17 15:32:47
|
Author: Miguel Sánchez de León Peque <miguel@vostro1520.(none)>
Date: Wed May 25 20:48:24 2011 +0200
Added a border to the icon
---
themes/default/icon.bmp | Bin 4150 -> 4150 bytes
themes/default/icon.png | Bin 6692 -> 7198 bytes
themes/default/icon.svg | 42 +++++++++++++++++++++++++++++++++++++-----
win32/performous.ico | Bin 264520 -> 152126 bytes
4 files changed, 37 insertions(+), 5 deletions(-)
diff --git a/themes/default/icon.bmp b/themes/default/icon.bmp
index 94f6509..0ad4fce 100644
Binary files a/themes/default/icon.bmp and b/themes/default/icon.bmp differ
diff --git a/themes/default/icon.png b/themes/default/icon.png
index cd3b35f..cf18c84 100644
Binary files a/themes/default/icon.png and b/themes/default/icon.png differ
diff --git a/themes/default/icon.svg b/themes/default/icon.svg
index fe95e1e..bd762f7 100644
--- a/themes/default/icon.svg
+++ b/themes/default/icon.svg
@@ -74,6 +74,28 @@
stdDeviation="10.689196"
id="feGaussianBlur4104" />
</filter>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3629-3-2"
+ id="radialGradient3049-9"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.07511259,-0.14640373,0.31280336,0.16048423,-266.7139,1057.1493)"
+ cx="727.25122"
+ cy="757.60583"
+ fx="727.25122"
+ fy="757.60583"
+ r="500" />
+ <linearGradient
+ id="linearGradient3629-3-2">
+ <stop
+ style="stop-color:#00cbff;stop-opacity:0;"
+ offset="0"
+ id="stop3631-1-6" />
+ <stop
+ style="stop-color:#0000ce;stop-opacity:1;"
+ offset="1"
+ id="stop3633-4-6" />
+ </linearGradient>
</defs>
<sodipodi:namedview
id="base"
@@ -83,15 +105,15 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6"
- inkscape:cx="36.286565"
- inkscape:cy="32.592771"
+ inkscape:cx="7.5884659"
+ inkscape:cy="34.870974"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1280"
- inkscape:window-height="725"
+ inkscape:window-height="739"
inkscape:window-x="0"
- inkscape:window-y="25"
+ inkscape:window-y="26"
inkscape:window-maximized="1" />
<metadata
id="metadata3053">
@@ -101,7 +123,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
+ <dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@@ -150,5 +172,15 @@
id="rect2855-9"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csscc" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:0.17699116;stroke-dasharray:none"
+ d="m 14.578146,988.86204 c -7.7993597,0 -14.07826626,6.27896 -14.07826626,14.07836 l 0,34.8436 c 0,7.7994 6.27890656,14.0783 14.07826626,14.0783 l 34.843709,0 c 7.799365,0 14.078265,-6.2789 14.078265,-14.0783 l 0,-34.8436 c 0,-7.79939 -6.2789,-14.07835 -14.078265,-14.07835 l -34.843709,0 z"
+ id="rect2855-4"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#ffffff;stroke-width:0.99999189000000011;stroke-miterlimit:4;stroke-opacity:0.40789473;stroke-dasharray:none"
+ d="m 15.131283,989.86217 c -7.5517331,0 -13.631287,6.07961 -13.631287,13.63133 l 0,33.7373 c 0,7.5519 6.0795539,13.6314 13.631287,13.6314 l 33.737435,0 c 7.551739,0 13.631286,-6.0795 13.631286,-13.6314 l 0,-33.7373 c 0,-7.55171 -6.079547,-13.63132 -13.631286,-13.63132 l -33.737435,0 z"
+ id="rect2855-4-8"
+ inkscape:connector-curvature="0" />
</g>
</svg>
diff --git a/win32/performous.ico b/win32/performous.ico
index 2f52ed6..efe4bf8 100644
Binary files a/win32/performous.ico and b/win32/performous.ico differ
|
|
From: Yoda-JM <yo...@us...> - 2011-06-17 15:32:38
|
Author: Miguel Sánchez de León Peque <msd...@gm...> Date: Wed May 25 20:55:14 2011 +0200 Forgot to update /data/performou.xpm --- data/performous.xpm | 4181 +++++++++++++++++++++++++++------------------------ 1 files changed, 2213 insertions(+), 1968 deletions(-) |
|
From: Yoda-JM <yo...@us...> - 2011-06-17 15:32:31
|
Author: Miguel Sánchez de León Peque <msd...@gm...> Date: Sat May 21 22:26:35 2011 +0200 New icon --- data/performous.xpm | 3379 +++++++++++++++++++++++++++-------------------- themes/default/icon.bmp | Bin 3126 -> 4150 bytes themes/default/icon.png | Bin 6108 -> 6692 bytes themes/default/icon.svg | 316 ++--- 4 files changed, 2077 insertions(+), 1618 deletions(-) |
|
From: Yoda-JM <yo...@us...> - 2011-06-17 15:32:24
|
Author: Juan Montoya <th3...@gm...> Date: Wed May 25 12:23:42 2011 -0500 Added two backgrounds: guitar_bg.svg and singer_bg.svg --- data/backgrounds/guitar_bg.svg | 331 ++++++++++++++++++ data/backgrounds/singer_bg.svg | 730 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1061 insertions(+), 0 deletions(-) |
|
From: Yoda-JM <yo...@us...> - 2011-06-17 15:32:16
|
Author: Miguel Sánchez de León Peque <msd...@gm...>
Date: Sun May 29 07:29:23 2011 +0200
Fedora 15 supported for packaging
---
cmake/performous-packaging.cmake | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cmake/performous-packaging.cmake b/cmake/performous-packaging.cmake
index 18f65e3..1cbb865 100644
--- a/cmake/performous-packaging.cmake
+++ b/cmake/performous-packaging.cmake
@@ -98,6 +98,9 @@ if(UNIX)
set(CPACK_PACKAGE_ARCHITECTURE amd64)
endif("${CPACK_PACKAGE_ARCHITECTURE}" MATCHES "x86_64")
# Set the dependencies based on the distro version
+ if("${LSB_DISTRIB}" MATCHES "Fedora15")
+ set(CPACK_RPM_PACKAGE_REQUIRES "gettext, gtk2, cairo, librsvg2, libsigc++20, glibmm24, libxml++, ImageMagick-c++, boost, SDL, glew, ffmpeg, pulseaudio-libs, portaudio, opencv, portmidi")
+ endif("${LSB_DISTRIB}" MATCHES "Fedora15")
if("${LSB_DISTRIB}" MATCHES "Fedora14")
set(CPACK_RPM_PACKAGE_REQUIRES "gettext, gtk2, cairo, librsvg2, libsigc++20, glibmm24, libxml++, ImageMagick-c++, boost, SDL, glew, ffmpeg, pulseaudio-libs, portaudio, opencv, portmidi")
endif("${LSB_DISTRIB}" MATCHES "Fedora14")
|
|
From: Yoda-JM <yo...@us...> - 2011-06-07 16:05:11
|
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Jun 7 18:04:40 2011 +0200
Fixed theme not being set before loading singer layout
---
game/screen_sing.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index a64505e..92b460c 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -54,6 +54,7 @@ void ScreenSing::enter() {
m_video.reset(new Video(m_song->path + m_song->video, m_song->videoGap));
}
boost::ptr_vector<Analyzer>& analyzers = m_audio.analyzers();
+ reloadGL();
m_layout_singer.reset(new LayoutSinger(m_song->getVocalTrack(m_selectedTrack), m_database, theme));
// Load instrument and dance tracks
sm->loading(_("Loading instruments..."), 0.8);
@@ -110,7 +111,6 @@ void ScreenSing::enter() {
if (m_song->b0rkedTracks) ScreenManager::getSingletonPtr()->dialog(_("Song contains broken tracks!"));
sm->showLogo(false);
sm->loading(_("Loading graphics..."), 0.9);
- reloadGL();
sm->loading(_("Loading complete"), 1.0);
}
|