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...> - 2009-07-04 17:47:19
|
Module: performous
Branch: master
Commit: 9ac023452d438bd4fe1009671426b0965193ae9f
Author: Lasse Karkkainen <tro...@tr...>
Date: Sat Jul 4 20:46:36 2009 +0300
Improved detection of non-song files and possibly also improved song loading performance.
---
game/song.cc | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/game/song.cc b/game/song.cc
index 6cc61bf..1ce7cc5 100644
--- a/game/song.cc
+++ b/game/song.cc
@@ -23,13 +23,18 @@ class SongParser {
m_relativeShift(),
m_maxScore()
{
+ // Read the file and do some initial validation checks
{
std::ifstream f((s.path + s.filename).c_str());
if (!f.is_open()) throw SongParserException("Could not open TXT file", 0);
- char ch;
- if (!f.get(ch) || ch != '#') throw SongParserException("Does not begin with '#', ignoring file", 1, true);
- m_ss << ch;
- m_ss << f.rdbuf();
+ f.seekg(0, std::ios::end);
+ size_t size = f.tellg();
+ if (size < 10 || size > 100000) throw SongParserException("Does not look like a song file (wrong size)", 1, true);
+ f.seekg(0);
+ std::vector<char> data(size);
+ if (!f.read(&data[0], size)) throw SongParserException("Unexpected I/O error", 0);
+ if (data[0] != '#' || data[1] < 'A' || data[1] > 'Z') throw SongParserException("Does not look like a song file (wrong header)", 1, true);
+ m_ss.write(&data[0], size);
}
// Character set conversion needed?
try {
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-04 17:24:44
|
Module: performous Branch: master Commit: 4dff79da003b651b3e22ec31d4d2bbc0fa46685c Author: Lasse Karkkainen <tro...@tr...> Date: Sat Jul 4 20:24:10 2009 +0300 Update TODO. --- docs/TODO.txt | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/TODO.txt b/docs/TODO.txt index a6a0404..66f6cd2 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -1,3 +1,6 @@ +This file lists long-time goals that are not fixable quickly. Issues that are easily +fixable should not be recorded here, but should rather be fixed in the code. + Structural: - LibDA as a separate project @@ -5,28 +8,32 @@ Structural: * Mixer and samplerate conversion inside - Get rid of ScreenManager in favor of recursive approach? - Switch to Clanlib? +- Switch to GStreamer? (both the ripper and the game) Big features: - Add compose screen (using features discussed on mailing list) -- Multiplayer duet (needs different song format) -- Ingame Singstar DVD support -- Playing and dancing (using USB guitar, USB drums, USB carpet) to make the game more like RockBand or StepMania +- Multiplayer duet (needs XML song format) +- Recording performances + * Internet highscore +- Ingame Singstar DVD support (integrated ripping + ffmpeg feeding + XML song format) +- Playing and dancing + * Guitar code from Silky Strings project (needs some love, but should be quite usable) + * Drum code from scratch? [currently has testing mode in practice screen] + * Dance code from scratch? - Mic effects (reduce volume for bad singers, perfect pitch, reverb, etc) Features: - Auto-calibration of acoustic roundtrip latency (playback + capture) -- Better audio card configuration ingame (needs libda support for listing cards) -- Difficulty setting for hiding pitch graph (won't affect scoring) +- Better audio card configuration ingame (needs libda support for listing cards) [WIP] - Allow playing a single song given as commandline argument (no menus) - Kiosk/arcade mode Ripper -- Rewrite video code [DONE, but can be done better] -- Compress into Vorbis and H.264 MKV +- Compress into Vorbis Ogg and H.264 MKV |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-03 22:31:50
|
Module: performous
Branch: master
Commit: 910dd541feca2f5cbb08ed04fcc46e88a19a3980
Author: Lasse Karkkainen <tro...@tr...>
Date: Sat Jul 4 01:31:27 2009 +0300
SVG too...
---
themes/default/icon.svg | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/themes/default/icon.svg b/themes/default/icon.svg
index 38d51b1..0647c89 100644
--- a/themes/default/icon.svg
+++ b/themes/default/icon.svg
@@ -20,9 +20,9 @@
sodipodi:docname="icon.svg"
sodipodi:docbase="/root/USNG/trunk/themes/lima"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
- inkscape:export-filename="/home/tronic/performous/themes/default/icon.bmp.png"
- inkscape:export-xdpi="45"
- inkscape:export-ydpi="45">
+ inkscape:export-filename="/home/tronic/performous/themes/default/icon.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
<metadata
id="metadata35">
<rdf:RDF>
@@ -101,10 +101,10 @@
inkscape:collect="always"
xlink:href="#linearGradient3928"
id="radialGradient3940"
- cx="29.759392"
- cy="29.025885"
- fx="29.759392"
- fy="29.025885"
+ cx="29.106733"
+ cy="32.03397"
+ fx="29.106733"
+ fy="32.03397"
r="33.97723"
gradientTransform="matrix(-0.8888687,3.3173007,-3.5172311,-0.9424392,162.12621,-50.628114)"
gradientUnits="userSpaceOnUse" />
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-03 22:29:30
|
Module: performous Branch: master Commit: 31ea33c94226c93435400af45adc3d2eadab9729 Author: Lasse Karkkainen <tro...@tr...> Date: Sat Jul 4 01:27:26 2009 +0300 A bit stronger icon color. --- data/performous.xpm | 352 ++++++++++++++++++++++------------------------- themes/default/icon.bmp | Bin 4150 -> 4150 bytes themes/default/icon.png | Bin 4675 -> 4897 bytes themes/default/icon.svg | 2 +- 4 files changed, 166 insertions(+), 188 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-03 21:31:39
|
Module: performous Branch: master Commit: ee1443005cfad9c467a72b239ee54bf9c1b7be51 Author: Lasse Kärkkäinen <tronic+ndrm at trn.iki.fi> Date: Sat Jul 4 00:26:00 2009 +0300 Very simplified song progress bar graphics. Fixed some progress bar bugs in sliding mode, added drawCropped to surfaces. Updated ReleaseBlockers. --- ReleaseBlockers.txt | 6 --- game/progressbar.cc | 23 ++++++---- game/progressbar.hh | 6 +-- game/screen_sing.cc | 2 +- game/surface.hh | 18 +++++++- themes/default/sing_progressbg.svg | 28 ++++++++---- themes/default/sing_progressfg.svg | 82 ++++++++++++++++++++++++------------ 7 files changed, 105 insertions(+), 60 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-03 03:10:14
|
Module: performous
Branch: master
Commit: 83f66805213e90d6a33aea3b7d17a37919e67bad
Author: Lasse Karkkainen <tro...@tr...>
Date: Fri Jul 3 06:08:21 2009 +0300
Fix stupid bugs..
---
game/main.cc | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index 34efa15..04b0b4c 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -173,15 +173,12 @@ int main(int argc, char** argv) {
std::signal(SIGINT, quit);
std::signal(SIGTERM, quit);
std::ios::sync_with_stdio(false); // We do not use C stdio
+ da::initialize libda;
try {
- da::initialize libda;
readConfig();
} catch (std::exception& e) {
std::cerr << e.what() << std::endl;
return EXIT_FAILURE;
- } catch (...) {
- std::cerr << "Some b0rked internal error, please report this!" << std::endl;
- return EXIT_FAILURE;
}
std::vector<std::string> mics;
std::vector<std::string> pdevs;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-03 03:10:12
|
Module: performous
Branch: master
Commit: 5c9abdaa3ea9aa0cda7a4085c63bd00045a3225d
Author: Lasse Karkkainen <tro...@tr...>
Date: Fri Jul 3 05:51:12 2009 +0300
Re-add LibRSVG due to accidental remove (after debugging on Windows).
---
game/CMakeLists.txt | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index 46ed686..c9584e9 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -18,8 +18,7 @@ include_directories(${Boost_INCLUDE_DIRS})
set(LIBS ${LIBS} ${Boost_LIBRARIES})
# Find all the libs that don't require extra parameters
-# LibRSVG
-foreach(lib SDL PangoCairo LibXML++ Magick++ OpenGL GLEW AVFormat SWScale)
+foreach(lib SDL PangoCairo LibRSVG LibXML++ Magick++ OpenGL GLEW AVFormat SWScale)
find_package(${lib} REQUIRED)
include_directories(${${lib}_INCLUDE_DIRS})
set(LIBS ${LIBS} ${${lib}_LIBRARIES})
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-03 02:43:13
|
Module: performous
Branch: master
Commit: 4bf3b3ed61a5f51b59f473954828ae59bcde31d5
Author: Lasse Karkkainen <tro...@tr...>
Date: Thu Jul 2 05:42:13 2009 +0200
Compatibility changes and fixes...
---
CMakeLists.txt | 2 +-
cmake/Modules/FindBoost.cmake | 6 ------
data/CMakeLists.txt | 3 ++-
game/CMakeLists.txt | 3 ++-
game/configuration.cc | 4 ++--
game/main.cc | 12 ++++++++++--
6 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b1f7d9a..578ee8a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ if(NOT CMAKE_BUILD_TYPE)
endif(NOT CMAKE_BUILD_TYPE)
if(WIN32)
- set(SHARE_INSTALL "" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.")
+ set(SHARE_INSTALL "." CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.")
else(WIN32)
set(SHARE_INSTALL "share/games/performous" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.")
endif(WIN32)
diff --git a/cmake/Modules/FindBoost.cmake b/cmake/Modules/FindBoost.cmake
index b1a5387..9cda27d 100644
--- a/cmake/Modules/FindBoost.cmake
+++ b/cmake/Modules/FindBoost.cmake
@@ -383,12 +383,6 @@ ELSE (_boost_IN_CACHE)
SET(Boost_PROCESS_INCLUDES Boost_INCLUDE_DIR)
FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} )
- if (CMAKE_BUILD_TYPE MATCHES "Deb" AND Boost_${COMPONENT}_LIBRARY_DEBUG)
- set(Boost_${COMPONENT}_LIBRARY ${Boost_${COMPONENT}_LIBRARY_RELEASE})
- endif (CMAKE_BUILD_TYPE MATCHES "Deb" AND Boost_${COMPONENT}_LIBRARY_DEBUG)
- if (NOT CMAKE_BUILD_TYPE MATCHES "Deb" AND Boost_${COMPONENT}_LIBRARY_RELEASE)
- set(Boost_${COMPONENT}_LIBRARY ${Boost_${COMPONENT}_LIBRARY_RELEASE})
- endif (NOT CMAKE_BUILD_TYPE MATCHES "Deb" AND Boost_${COMPONENT}_LIBRARY_RELEASE)
SET(Boost_PROCESS_LIBS ${Boost_PROCESS_LIBS} Boost_${COMPONENT}_LIBRARY)
ENDFOREACH(COMPONENT)
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index ed4dee7..80942d2 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -5,5 +5,6 @@ set(CONFIG_FILE "performous.xml")
if(UNIX)
install(FILES "${APPLICATION_FILE}" DESTINATION "share/applications/")
install(FILES "${PIXMAP_FILE}" DESTINATION "share/pixmaps")
- install(FILES "${CONFIG_FILE}" DESTINATION "${CMAKE_INSTALL_PREFIX}/${SHARE_INSTALL}/config/")
endif(UNIX)
+
+install(FILES "${CONFIG_FILE}" DESTINATION "${CMAKE_INSTALL_PREFIX}/${SHARE_INSTALL}/config/")
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index bda767d..46ed686 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -18,7 +18,8 @@ include_directories(${Boost_INCLUDE_DIRS})
set(LIBS ${LIBS} ${Boost_LIBRARIES})
# Find all the libs that don't require extra parameters
-foreach(lib SDL LibRSVG PangoCairo LibXML++ Magick++ OpenGL GLEW AVFormat SWScale)
+# LibRSVG
+foreach(lib SDL PangoCairo LibXML++ Magick++ OpenGL GLEW AVFormat SWScale)
find_package(${lib} REQUIRED)
include_directories(${${lib}_INCLUDE_DIRS})
set(LIBS ${LIBS} ${${lib}_LIBRARIES})
diff --git a/game/configuration.cc b/game/configuration.cc
index 4b0a17a..7e8aa2f 100644
--- a/game/configuration.cc
+++ b/game/configuration.cc
@@ -287,13 +287,13 @@ void readConfig() {
config_list.push_back("/usr/local/share/performous/config/performous.xml");
config_list.push_back("/usr/share/games/performous/config/performous.xml");
config_list.push_back("/usr/share/performous/config/performous.xml");
- config_list.push_back("../share/performous/config/performous.xml"); // For Windows where program is started in bin/
+ config_list.push_back("../config/performous.xml"); // For Windows where program is started in bin/
ConfigList::const_iterator it = std::find_if(config_list.begin(), config_list.end(), static_cast<bool(&)(boost::filesystem::path const&)>(boost::filesystem::exists));
if (it == config_list.end()) {
std::ostringstream oss;
oss << "No config schema file found. The following locations were tried:\n";
std::copy(config_list.begin(), config_list.end(), std::ostream_iterator<std::string>(oss, "\n"));
- oss << "Install the file or define environment variable PERFORMOUS_DEFAULT_CONFIG_FILE\n";
+ oss << "Install the file or define environment variable PERFORMOUS_CONFIG_SCHEMA\n";
throw std::runtime_error(oss.str());
}
schemafile = *it;
diff --git a/game/main.cc b/game/main.cc
index 906aeef..34efa15 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -173,8 +173,16 @@ int main(int argc, char** argv) {
std::signal(SIGINT, quit);
std::signal(SIGTERM, quit);
std::ios::sync_with_stdio(false); // We do not use C stdio
- da::initialize libda;
- readConfig();
+ try {
+ da::initialize libda;
+ readConfig();
+ } catch (std::exception& e) {
+ std::cerr << e.what() << std::endl;
+ return EXIT_FAILURE;
+ } catch (...) {
+ std::cerr << "Some b0rked internal error, please report this!" << std::endl;
+ return EXIT_FAILURE;
+ }
std::vector<std::string> mics;
std::vector<std::string> pdevs;
std::vector<std::string> songdirs;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-02 23:56:40
|
Module: performous Branch: master Commit: 9302171ec372e72905d9e379e4d132b3379d45f8 Author: Lasse Karkkainen <tro...@tr...> Date: Fri Jul 3 02:54:57 2009 +0300 Icon gradient made milder. --- data/performous.xpm | 750 ++++++++++++----------------------------------- themes/default/icon.bmp | Bin 4150 -> 4150 bytes themes/default/icon.png | Bin 5405 -> 4675 bytes themes/default/icon.svg | 28 +- 4 files changed, 206 insertions(+), 572 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-02 23:34:33
|
Module: performous
Branch: master
Commit: 73be4ee4ecabf08685c7fc3c3024bd3d44ee5217
Author: Lasse Karkkainen <tro...@tr...>
Date: Fri Jul 3 02:33:47 2009 +0300
Fix compile on Linux again.
---
libs/libda/plugins/CMakeLists.txt | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libs/libda/plugins/CMakeLists.txt b/libs/libda/plugins/CMakeLists.txt
index 29e9668..1dd67c2 100644
--- a/libs/libda/plugins/CMakeLists.txt
+++ b/libs/libda/plugins/CMakeLists.txt
@@ -173,6 +173,8 @@ if(PLUGIN_TESTING)
include_directories(${Boost_INCLUDE_DIRS})
add_library(da_audio_dev_tone MODULE audio_dev_tone.cpp)
install(TARGETS da_audio_dev_tone DESTINATION ${LIBDA_PLUGIN_DIR})
- target_link_libraries(da_audio_dev_tone da ${Boost_LIBRARIES})
+ if(APPLE OR WIN32)
+ target_link_libraries(da_audio_dev_tone da ${Boost_LIBRARIES})
+ endif(APPLE OR WIN32)
endif(PLUGIN_TESTING)
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-02 23:32:11
|
Module: performous
Branch: master
Commit: 3c426bf70d82dc466ef8bc581893a8545b9d6cb2
Author: Lasse Karkkainen <tro...@tr...>
Date: Thu Jul 2 18:22:56 2009 -0500
More compatibility fixes...
---
cmake/Modules/FindBoost.cmake | 22 +++++++++++++---------
game/CMakeLists.txt | 4 ++--
libs/libda/CMakeLists.txt | 10 +---------
libs/libda/plugins/CMakeLists.txt | 22 +++++++++++++++-------
libs/libda/src/CMakeLists.txt | 10 ++++++++++
5 files changed, 41 insertions(+), 27 deletions(-)
diff --git a/cmake/Modules/FindBoost.cmake b/cmake/Modules/FindBoost.cmake
index 7ab8394..b1a5387 100644
--- a/cmake/Modules/FindBoost.cmake
+++ b/cmake/Modules/FindBoost.cmake
@@ -76,7 +76,7 @@
# MESSAGE(STATUS "Finding Boost libraries.... ")
-SET( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "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.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")
############################################
#
@@ -277,9 +277,12 @@ ELSE (_boost_IN_CACHE)
IF (MSVC71)
SET (_boost_COMPILER "-vc71")
ENDIF(MSVC71)
- IF (MSVC80)
+ IF (MSVC80)
SET (_boost_COMPILER "-vc80")
ENDIF(MSVC80)
+ IF (MSVC90)
+ SET (_boost_COMPILER "-vc90")
+ ENDIF(MSVC90)
IF (MINGW)
SET (_boost_COMPILER "-mgw")
ENDIF(MINGW)
@@ -380,6 +383,12 @@ ELSE (_boost_IN_CACHE)
SET(Boost_PROCESS_INCLUDES Boost_INCLUDE_DIR)
FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} )
+ if (CMAKE_BUILD_TYPE MATCHES "Deb" AND Boost_${COMPONENT}_LIBRARY_DEBUG)
+ set(Boost_${COMPONENT}_LIBRARY ${Boost_${COMPONENT}_LIBRARY_RELEASE})
+ endif (CMAKE_BUILD_TYPE MATCHES "Deb" AND Boost_${COMPONENT}_LIBRARY_DEBUG)
+ if (NOT CMAKE_BUILD_TYPE MATCHES "Deb" AND Boost_${COMPONENT}_LIBRARY_RELEASE)
+ set(Boost_${COMPONENT}_LIBRARY ${Boost_${COMPONENT}_LIBRARY_RELEASE})
+ endif (NOT CMAKE_BUILD_TYPE MATCHES "Deb" AND Boost_${COMPONENT}_LIBRARY_RELEASE)
SET(Boost_PROCESS_LIBS ${Boost_PROCESS_LIBS} Boost_${COMPONENT}_LIBRARY)
ENDFOREACH(COMPONENT)
@@ -388,13 +397,8 @@ ELSE (_boost_IN_CACHE)
# Check that everything was found correctly and do other processing
libfind_process(Boost)
- # MESSAGE(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
- # MESSAGE(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")
-
- # Under Windows, automatic linking is performed, so no need to specify the libraries.
- IF (WIN32)
- SET(Boost_LIBRARIES "")
- ENDIF(WIN32)
+ MESSAGE(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
+ MESSAGE(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")
ENDIF(_boost_IN_CACHE)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index 3bd9ce9..bda767d 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -13,12 +13,12 @@ set(SOURCES ${SOURCE_FILES} ${HEADER_FILES})
include_directories(${CMAKE_SOURCE_DIR}/libs/libda/include)
-find_package(Boost 1.34 REQUIRED COMPONENTS thread program_options regex filesystem)
+find_package(Boost 1.34 REQUIRED COMPONENTS thread date_time program_options regex filesystem)
include_directories(${Boost_INCLUDE_DIRS})
set(LIBS ${LIBS} ${Boost_LIBRARIES})
# Find all the libs that don't require extra parameters
-foreach(lib SDL LibRSVG PangoCairo LibXML++ Magick++ GLEW AVFormat SWScale)
+foreach(lib SDL LibRSVG PangoCairo LibXML++ Magick++ OpenGL GLEW AVFormat SWScale)
find_package(${lib} REQUIRED)
include_directories(${${lib}_INCLUDE_DIRS})
set(LIBS ${LIBS} ${${lib}_LIBRARIES})
diff --git a/libs/libda/CMakeLists.txt b/libs/libda/CMakeLists.txt
index 39fb37e..d279a05 100644
--- a/libs/libda/CMakeLists.txt
+++ b/libs/libda/CMakeLists.txt
@@ -6,17 +6,9 @@ set(LIBDA_PLUGIN_DIR "lib${LIB_SUFFIX}/libda")
include_directories(include)
include_directories(../plugin++/include)
-set(Boost_USE_STATIC_LIBS ON)
-set(Boost_USE_MULTITHREAD ON)
-find_package(Boost 1.34 REQUIRED COMPONENTS thread filesystem)
-
-include_directories(${Boost_INCLUDE_DIR})
-add_library(da src/audio.cpp)
-target_link_libraries(da plugin++ ${Boost_LIBRARIES})
-install(TARGETS da DESTINATION lib${LIB_SUFFIX})
-
FILE(GLOB HEADER_FILES "include/libda/*")
install(FILES ${HEADER_FILES} DESTINATION include/libda)
+add_subdirectory(src)
add_subdirectory(plugins)
diff --git a/libs/libda/plugins/CMakeLists.txt b/libs/libda/plugins/CMakeLists.txt
index a9ec2cc..29e9668 100644
--- a/libs/libda/plugins/CMakeLists.txt
+++ b/libs/libda/plugins/CMakeLists.txt
@@ -1,5 +1,3 @@
-find_package(Boost 1.34 REQUIRED COMPONENTS thread filesystem)
-
set(ALSA_DEFAULT false)
set(PORTAUDIO_DEFAULT true)
@@ -98,8 +96,19 @@ else(LIBDA_PLUGIN_PULSE)
endif(LIBDA_PLUGIN_PULSE)
if(LIBDA_PLUGIN_TESTING)
- set(PLUGIN_TESTING_DESC "enabled")
- set(PLUGIN_TESTING true)
+ set(Boost_USE_STATIC_LIBS ON)
+ set(Boost_USE_MULTITHREAD ON)
+ find_package(Boost 1.36 REQUIRED COMPONENTS thread date_time)
+ if(Boost_FOUND)
+ set(PLUGIN_TESTING_DESC "enabled")
+ set(PLUGIN_TESTING true)
+ else(Boost_FOUND)
+ if(LIBDA_AUTODETECT_PLUGINS)
+ set(PLUGIN_TESTING_DESC "disabled (autodetect)")
+ else(LIBDA_AUTODETECT_PLUGINS)
+ message(FATAL_ERROR "Could not find Boost, but libda test plugin explicitly required")
+ endif(LIBDA_AUTODETECT_PLUGINS)
+ endif(Boost_FOUND)
else(LIBDA_PLUGIN_TESTING)
set(PLUGIN_TESTING_DESC "disabled")
endif(LIBDA_PLUGIN_TESTING)
@@ -161,10 +170,9 @@ if(PLUGIN_PULSE)
endif(PLUGIN_PULSE)
if(PLUGIN_TESTING)
+ include_directories(${Boost_INCLUDE_DIRS})
add_library(da_audio_dev_tone MODULE audio_dev_tone.cpp)
install(TARGETS da_audio_dev_tone DESTINATION ${LIBDA_PLUGIN_DIR})
- if(APPLE)
- target_link_libraries(da_audio_dev_tone da ${Boost_thread_LIBRARY})
- endif(APPLE)
+ target_link_libraries(da_audio_dev_tone da ${Boost_LIBRARIES})
endif(PLUGIN_TESTING)
diff --git a/libs/libda/src/CMakeLists.txt b/libs/libda/src/CMakeLists.txt
new file mode 100644
index 0000000..cab06e2
--- /dev/null
+++ b/libs/libda/src/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 2.6)
+
+set(Boost_USE_STATIC_LIBS ON)
+set(Boost_USE_MULTITHREAD ON)
+find_package(Boost 1.34 REQUIRED COMPONENTS thread filesystem)
+
+include_directories(${Boost_INCLUDE_DIRS})
+add_library(da audio.cpp)
+target_link_libraries(da plugin++ ${Boost_LIBRARIES})
+install(TARGETS da DESTINATION lib${LIB_SUFFIX})
|
|
From: Yoda-JM <yo...@us...> - 2009-07-02 21:58:28
|
Module: performous Branch: master Commit: 49bc2a0062a3c4a1abd6ea37a3b31e0bbae4fb2f Author: Vincent Le Ligeour <yo...@us...> Date: Thu Jul 2 23:57:35 2009 +0200 Updated performous icons to match new default color theme --- data/performous.xpm | 685 ++++++++++++++++++++++++++++++++++++++--------- themes/default/icon.bmp | Bin 2102 -> 4150 bytes themes/default/icon.png | Bin 1822 -> 5405 bytes themes/default/icon.svg | 43 +++- 4 files changed, 592 insertions(+), 136 deletions(-) |
|
From: Yoda-JM <yo...@us...> - 2009-07-02 21:15:50
|
Module: performous
Branch: master
Commit: 30effa66c57baeeedab1e7b17d87ed7470dc818b
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Jul 2 23:15:24 2009 +0200
Removed ffmpeg warning
---
game/ffmpeg.cc | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/game/ffmpeg.cc b/game/ffmpeg.cc
index 49f745a..ad8df2f 100644
--- a/game/ffmpeg.cc
+++ b/game/ffmpeg.cc
@@ -90,7 +90,12 @@ void FFmpeg::open() {
if (!pAudioCodec) throw std::runtime_error("Cannot find audio codec");
if (avcodec_open(cc, pAudioCodec) < 0) throw std::runtime_error("Cannot open audio codec");
pAudioCodecCtx = cc;
+#if LIBAVCODEC_VERSION_INT > ((52<<16)+(12<<8)+0)
+ pResampleCtx = av_audio_resample_init(AUDIO_CHANNELS, cc->channels, m_rate, cc->sample_rate,
+ SAMPLE_FMT_S16, SAMPLE_FMT_S16, 16, 10, 0, 0.8);
+#else
pResampleCtx = audio_resample_init(AUDIO_CHANNELS, cc->channels, m_rate, cc->sample_rate);
+#endif
if (!pResampleCtx) throw std::runtime_error("Cannot create resampling context");
audioQueue.setSamplesPerSecond(AUDIO_CHANNELS * m_rate);
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-02 21:09:34
|
Module: performous
Branch: master
Commit: 16dc0bceaff393027b78ff2f2bce503556ac97bf
Author: Lasse Karkkainen <tro...@tr...>
Date: Fri Jul 3 00:08:37 2009 +0300
Improved and cleared path config. Do not build launcher script for WIN32.
---
CMakeLists.txt | 29 +++++++++++++++++------------
cmake/performous.sh.cmake | 2 +-
data/performous.xml | 2 ++
game/configuration.cc | 3 ++-
4 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ea8169..b1f7d9a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
project(Performous CXX)
cmake_minimum_required(VERSION 2.4)
-set(PROJECT_VERSION "0.3.0svn")
+set(PROJECT_VERSION "0.3.0+")
# Avoid source tree pollution
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
@@ -21,8 +21,12 @@ if(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif(NOT CMAKE_BUILD_TYPE)
+if(WIN32)
+ set(SHARE_INSTALL "" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.")
+else(WIN32)
+ set(SHARE_INSTALL "share/games/performous" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.")
+endif(WIN32)
-set(SHARE_INSTALL "share/games/performous" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.")
mark_as_advanced(SHARE_INSTALL)
add_subdirectory(libs)
@@ -36,23 +40,24 @@ if (ENABLE_TOOLS)
add_subdirectory(tools)
endif (ENABLE_TOOLS)
-if(NOT "${CMAKE_INSTALL_PREFIX}" MATCHES "^(/usr|/usr/local)$")
- message(STATUS "Non-standard installation prefix. Configuring performous.sh.")
- set(LAUNCHER_SCRIPT TRUE)
-endif(NOT "${CMAKE_INSTALL_PREFIX}" MATCHES "^(/usr|/usr/local)$")
+if(NOT WIN32)
+ if(NOT "${CMAKE_INSTALL_PREFIX}" MATCHES "^(/usr|/usr/local)$")
+ message(STATUS "Non-standard installation prefix. Configuring performous.sh.")
+ set(LAUNCHER_SCRIPT TRUE)
+ endif(NOT "${CMAKE_INSTALL_PREFIX}" MATCHES "^(/usr|/usr/local)$")
-if(NOT "${SHARE_INSTALL}" MATCHES "^(share/performous|share/games/performous)$")
- message(STATUS "Non-standard data file install path. Configuring performous.sh.")
- set(LAUNCHER_SCRIPT TRUE)
-endif(NOT "${SHARE_INSTALL}" MATCHES "^(share/performous|share/games/performous)$")
+ if(NOT "${SHARE_INSTALL}" MATCHES "^(share/performous|share/games/performous)$")
+ message(STATUS "Non-standard data file install path. Configuring performous.sh.")
+ set(LAUNCHER_SCRIPT TRUE)
+ endif(NOT "${SHARE_INSTALL}" MATCHES "^(share/performous|share/games/performous)$")
+endif(NOT WIN32)
if(LAUNCHER_SCRIPT)
set(FULL_PREFIX ${CMAKE_INSTALL_PREFIX})
if(UNIX AND NOT "${FULL_PREFIX}" MATCHES "^/")
set(FULL_PREFIX "${CMAKE_BINARY_DIR}/${FULL_PREFIX}")
endif(UNIX AND NOT "${FULL_PREFIX}" MATCHES "^/")
- set(PERFORMOUS_CONFIG_FILE "${FULL_PREFIX}/${SHARE_INSTALL}/config/performous.xml")
- set(PERFORMOUS_THEME_PATH "${FULL_PREFIX}/${SHARE_INSTALL}/themes")
+ set(PERFORMOUS_CONFIG_SCHEMA "${FULL_PREFIX}/${SHARE_INSTALL}/config/performous.xml")
set(PERFORMOUS_PLUGIN_PATH "${FULL_PREFIX}/lib${LIB_SUFFIX}/libda")
set(PERFORMOUS_EXECUTABLE "${FULL_PREFIX}/bin/performous")
configure_file("${PROJECT_SOURCE_DIR}/cmake/performous.sh.cmake" "${PROJECT_BINARY_DIR}/performous.sh" ESCAPE_QUOTES @ONLY)
diff --git a/cmake/performous.sh.cmake b/cmake/performous.sh.cmake
index d6271d2..f3d30f7 100644
--- a/cmake/performous.sh.cmake
+++ b/cmake/performous.sh.cmake
@@ -1,4 +1,4 @@
#!/bin/sh
-env PERFORMOUS_DEFAULT_CONFIG_FILE=@PERFORMOUS_CONFIG_FILE@ PLUGIN_PATH=@PERFORMOUS_PLUGIN_PATH@ PERFORMOUS_THEME_PATH=@PERFORMOUS_THEME_PATH@ @PERFORMOUS_EXECUTABLE@ "$@"
+env PERFORMOUS_CONFIG_SCHEMA='@PERFORMOUS_CONFIG_SCHEMA@' PLUGIN_PATH='@PERFORMOUS_PLUGIN_PATH@' '@PERFORMOUS_EXECUTABLE@' $@
diff --git a/data/performous.xml b/data/performous.xml
index 59cffc6..c90f84e 100644
--- a/data/performous.xml
+++ b/data/performous.xml
@@ -175,6 +175,7 @@
<entry name="system/path_themes" type="string_list">
<stringvalue>/usr/local/share/games/performous/themes/</stringvalue>
<stringvalue>/usr/share/games/performous/themes/</stringvalue>
+ <stringvalue>../themes/</stringvalue><!-- For Windows where the program is started in bin/ -->
<stringvalue>~/.performous/themes/</stringvalue>
<locale name="C">
<short>Theme folders</short>
@@ -184,6 +185,7 @@
<entry name="system/path_songs" type="string_list">
<stringvalue>/usr/local/share/games/ultrastar/songs/</stringvalue>
<stringvalue>/usr/share/games/ultrastar/songs/</stringvalue>
+ <stringvalue>../songs/</stringvalue><!-- For Windows where the program is started in bin/ -->
<stringvalue>~/.ultrastar/songs/</stringvalue>
<locale name="C">
<short>Song folders</short>
diff --git a/game/configuration.cc b/game/configuration.cc
index 505e98d..4b0a17a 100644
--- a/game/configuration.cc
+++ b/game/configuration.cc
@@ -281,12 +281,13 @@ void readConfig() {
{
typedef std::vector<std::string> ConfigList;
ConfigList config_list;
- char const* env_config = getenv("PERFORMOUS_DEFAULT_CONFIG_FILE");
+ char const* env_config = getenv("PERFORMOUS_CONFIG_SCHEMA");
if (env_config) config_list.push_back(env_config);
config_list.push_back("/usr/local/share/games/performous/config/performous.xml");
config_list.push_back("/usr/local/share/performous/config/performous.xml");
config_list.push_back("/usr/share/games/performous/config/performous.xml");
config_list.push_back("/usr/share/performous/config/performous.xml");
+ config_list.push_back("../share/performous/config/performous.xml"); // For Windows where program is started in bin/
ConfigList::const_iterator it = std::find_if(config_list.begin(), config_list.end(), static_cast<bool(&)(boost::filesystem::path const&)>(boost::filesystem::exists));
if (it == config_list.end()) {
std::ostringstream oss;
|
|
From: Yoda-JM <yo...@us...> - 2009-07-02 17:07:55
|
Module: performous
Branch: master
Commit: a2e1471edf75c123bd4509364e41efd176b009f9
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Jul 2 19:07:11 2009 +0200
Fixed git ebuild songs install directory
---
.../games-arcade/performous/performous-9999.ebuild | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/portage-overlay/games-arcade/performous/performous-9999.ebuild b/portage-overlay/games-arcade/performous/performous-9999.ebuild
index 910ab0a..154165c 100644
--- a/portage-overlay/games-arcade/performous/performous-9999.ebuild
+++ b/portage-overlay/games-arcade/performous/performous-9999.ebuild
@@ -105,7 +105,7 @@ src_install() {
keepdir "/usr/ultrastar/songs"
rm -rf "${D}/usr/share/${PN}"/{applications,pixmaps}
if use songs; then
- insinto "/usr/ultrastar"
+ insinto "/usr/share/games/ultrastar"
doins -r ../songs || die "doins songs failed"
fi
doicon data/${PN}.xpm
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-06-29 03:58:06
|
Module: performous
Branch: master
Commit: 25dedaa423e9028e03ca654bdc81cf94558df853
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jun 29 06:55:53 2009 -0500
Classic spirit...
---
game/main.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index c9c87c4..906aeef 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -10,7 +10,7 @@
#include "xtime.hh"
#include <boost/format.hpp>
#include <boost/program_options.hpp>
-#include <boost/spirit/core.hpp>
+#include <boost/spirit/include/classic_core.hpp>
#include <boost/thread.hpp>
#include <libda/audio.hpp>
#include <csignal>
@@ -76,7 +76,7 @@ static void checkEvents_SDL(ScreenManager& sm, Window& window) {
void audioSetup(Capture& capture, Audio& audio) {
// initialize audio argument parser
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
unsigned channels, rate, frames;
std::string devstr;
// channel ::= "channel=" integer
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-06-29 03:58:06
|
Module: performous Branch: master Commit: 538c699c17720e6787b8a2125d0d2043cda0d603 Author: Lasse Karkkainen <tro...@tr...> Date: Mon Jun 29 06:56:21 2009 -0500 Merge branch 'master' of ssh://tronic@performous.git.sourceforge.net/gitroot/performous --- |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-06-29 03:55:36
|
Module: performous
Branch: master
Commit: f0f4c68a728d0a64d44e751b1d2fd6044ff11e54
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jun 29 06:54:06 2009 +0300
Less spirit (and lambda), more portability...
---
libs/libda/plugins/audio_dev_tone.cpp | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/libs/libda/plugins/audio_dev_tone.cpp b/libs/libda/plugins/audio_dev_tone.cpp
index bdc3266..1f2365e 100644
--- a/libs/libda/plugins/audio_dev_tone.cpp
+++ b/libs/libda/plugins/audio_dev_tone.cpp
@@ -63,13 +63,12 @@ namespace {
using namespace boost::lambda;
placeholder1_type arg1;
if (!parse(tonestr.c_str(),
- !(limit_d(1.0, s.rate() / 2.0)[real_p][assign_a(freq)]) >> *(!ch_p('.') >> (
- str_p("amplitude(") >> (max_limit_d(0.0)[real_p][var(amplitude) = bind(static_cast<double(*)(double, double)>(std::pow), 10.0, arg1 / 20.0)] | real_p[assign_a(amplitude)]) |
- str_p("phase(") >> limit_d(0.0, 1.0)[real_p][assign_a(phase)]
- ) >> ')')
+ !(limit_d(1.0, s.rate() / 2.0)[real_p][assign_a(freq)]) >>
+ *(!ch_p('.') >> (str_p("amplitude(") >> real_p[assign_a(amplitude)] | str_p("phase(") >> limit_d(0.0, 1.0)[real_p][assign_a(phase)]) >> ')')
).full)
throw std::invalid_argument("Invalid parameters for tonegen. See help for more information.");
{
+ if (amplitude <= 0.0) amplitude = std::pow(10.0, amplitude / 20.0); // Convert from dB
std::ostringstream oss;
oss << " " << freq << ".amplitude(" << amplitude << ").phase(" << phase << ")";
s.debug(oss.str());
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-06-29 02:10:24
|
Module: performous
Branch: master
Commit: ee4f006b8b84b1e9ccff9c725fc2d631c81658e1
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jun 29 05:08:54 2009 +0300
Fix the things that were b0rked by the Windows hacking...
SIGQUIT is apparently not needed, so removed (didn't work on Windows).
---
game/main.cc | 1 -
game/surface.hh | 2 +-
libs/libda/plugins/audio_dev_tone.cpp | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index 0e01007..c9c87c4 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -171,7 +171,6 @@ template <typename Container> void confOverride(Container const& c, std::string
int main(int argc, char** argv) {
std::signal(SIGINT, quit);
- // No such thing on Windows: signal(SIGQUIT, quit);
std::signal(SIGTERM, quit);
std::ios::sync_with_stdio(false); // We do not use C stdio
da::initialize libda;
diff --git a/game/surface.hh b/game/surface.hh
index 298af09..cc20103 100644
--- a/game/surface.hh
+++ b/game/surface.hh
@@ -123,7 +123,7 @@ class UseTexture: boost::noncopyable {
};
/** Draw the texture using the specified dimensions and texture coordinates. **/
-template <GLenum Type> void OpenGLTexture<Type>::draw(Dimensions const& dim, TexCoords const& tex = TexCoords()) const {
+template <GLenum Type> void OpenGLTexture<Type>::draw(Dimensions const& dim, TexCoords const& tex) const {
UseTexture texture(*this);
glBegin(GL_QUADS);
glTexCoord2f(tex.x1, tex.y1); glVertex2f(dim.x1(), dim.y1());
diff --git a/libs/libda/plugins/audio_dev_tone.cpp b/libs/libda/plugins/audio_dev_tone.cpp
index b2c307a..bdc3266 100644
--- a/libs/libda/plugins/audio_dev_tone.cpp
+++ b/libs/libda/plugins/audio_dev_tone.cpp
@@ -35,7 +35,7 @@ namespace {
m_phase(2.0 * M_PI * phase), m_step(2.0 * M_PI * freq / rate), m_amplitude(amplitude) {}
sample_t operator()() {
double s = m_amplitude * std::sin(m_phase = fmod(m_phase + m_step, 2.0 * M_PI));
- return return static_cast<sample_t>(s);
+ return static_cast<sample_t>(s);
}
operator sample_t() { return (*this)(); }
};
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-06-29 02:10:22
|
Module: performous
Branch: master
Commit: 92552b56858b2fd7e08fb999ab7ecb1323e70a82
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jun 29 05:08:10 2009 +0300
Remove config menu layout debug print.
---
game/configuration.cc | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/game/configuration.cc b/game/configuration.cc
index a1ba91a..505e98d 100644
--- a/game/configuration.cc
+++ b/game/configuration.cc
@@ -300,12 +300,5 @@ void readConfig() {
readConfigXML(schemafile, 0); // Read schema and defaults
readConfigXML("/etc/xdg/performous/performous.xml", 1); // Update defaults with system config
readConfigXML(userConfFile, 2); // Read user settings
- // DEBUG code follows, remove this after real menu is done
- std::cout << "CONFIG MENU" << std::endl;
- for (ConfigMenu::const_iterator it = configMenu.begin(), end = configMenu.end(); it != end; ++it) {
- std::cout << it->shortDesc << " (" << it->longDesc << ")" << std::endl;
- for (std::vector<std::string>::const_iterator it2 = it->items.begin(), end2 = it->items.end(); it2 < end2; ++it2)
- std::cout << " " << config[*it2].getShortDesc() << std::endl;
- }
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-06-29 02:01:12
|
Module: performous Branch: master Commit: e8554db6aecef0ef81475d46ee39cc539ae3863b Author: Lasse Karkkainen <tro...@tr...> Date: Mon Jun 29 04:58:05 2009 -0500 MSVC compatibility project: it compiles fine now! No longer uses gl/glu. Those had to be replaced with GLEW to make it work on Windows (which has extremely poor OpenGL headers). Corresponding CMake module added. A very large number of static casts and other stupidities to avoid MSVC warnings. Some minor bugs not caught by GCC fixed. SIGQUIT in main temporarily disabled. Signed-off-by: Lasse Karkkainen <tro...@tr...> --- cmake/Modules/FindGLEW.cmake | 29 +++++++++++++++++++++++++++++ game/CMakeLists.txt | 2 +- game/animvalue.hh | 5 ----- game/audio.cc | 9 +++++---- game/audio.hh | 1 + game/configuration.cc | 7 +++---- game/ffmpeg.cc | 15 ++++++++------- game/ffmpeg.hh | 3 +++ game/main.cc | 11 +++++------ game/notes.cc | 6 ++---- game/progressbar.hh | 5 +---- game/screen.hh | 8 +++----- game/surface.cc | 4 +++- game/surface.hh | 9 +++------ game/theme.cc | 4 ++-- game/util.hh | 11 +++++++---- game/video_driver.cc | 12 +++++++----- libs/libda/include/libda/fft.hpp | 4 ++++ libs/libda/include/libda/sample.hpp | 2 +- libs/libda/plugins/audio_dev_tone.cpp | 21 ++++++++++++++------- libs/plugin++/include/plugin++/loader.hpp | 2 ++ libs/plugin++/include/plugin++/plugin.hpp | 7 ++++--- tools/CMakeLists.txt | 6 +++++- tools/pak.h | 2 +- tools/pak_extract.cpp | 5 ++--- 25 files changed, 116 insertions(+), 74 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-06-28 21:56:11
|
Module: performous
Branch: master
Commit: 05936993f34c26ebcc2184121346359f828fa4b6
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jun 28 16:35:08 2009 -0500
Now it actually compiles :)
---
libs/plugin++/src/dll-windows.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/plugin++/src/dll-windows.cpp b/libs/plugin++/src/dll-windows.cpp
index 8a10412..ecbe37b 100644
--- a/libs/plugin++/src/dll-windows.cpp
+++ b/libs/plugin++/src/dll-windows.cpp
@@ -5,11 +5,11 @@
namespace plugin {
dll::dll(std::string const& filename): lib(LoadLibrary(filename.c_str())) {
- if (!lib) throw std::runtime_error(dlerror());
+ if (!lib) throw std::runtime_error("Unable to open " + filename);
}
dll::~dll() {
- FreeLibrary(static_cast<HINSTANCE*>(lib));
+ FreeLibrary(static_cast<HINSTANCE>(lib));
}
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-06-28 21:29:18
|
Module: performous Branch: master Commit: 94ab0fcebab9caf742f41389a599a42168fa331a Author: Lasse Kärkkäinen <tronic+ndrm at trn.iki.fi> Date: Mon Jun 29 00:28:53 2009 +0300 More class vs. struct stuff for MSVC. --- libs/libda/include/libda/audio_dev.hpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/libda/include/libda/audio_dev.hpp b/libs/libda/include/libda/audio_dev.hpp index 1e13d1c..ad8ab00 100644 --- a/libs/libda/include/libda/audio_dev.hpp +++ b/libs/libda/include/libda/audio_dev.hpp @@ -5,10 +5,12 @@ #include <plugin++/plugin.hpp> namespace da { - struct record::dev { + class record::dev { + public: virtual ~dev() {} }; - struct playback::dev { + class playback::dev { + public: virtual ~dev() {} }; typedef plugin::registry<record::dev, settings&, devinfo> record_plugin; |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-06-28 21:22:29
|
Module: performous Branch: master Commit: efe70a24add6e6a4d4f86c0f62726a414c206f74 Author: Lasse Kärkkäinen <tronic+ndrm at trn.iki.fi> Date: Mon Jun 29 00:21:21 2009 +0300 Further library restructuring to avoid plugin++ boost deps (for those who only use plugin::dll). --- libs/libda/src/audio.cpp | 2 +- libs/plugin++/include/plugin++/dll.hpp | 45 +------------------------ libs/plugin++/include/plugin++/loader.hpp | 52 +++++++++++++++++++++++++++++ libs/plugin++/src/dll-posix.cpp | 2 +- libs/plugin++/src/dll-windows.cpp | 2 +- 5 files changed, 56 insertions(+), 47 deletions(-) diff --git a/libs/libda/src/audio.cpp b/libs/libda/src/audio.cpp index 1c01789..bfff922 100644 --- a/libs/libda/src/audio.cpp +++ b/libs/libda/src/audio.cpp @@ -1,5 +1,5 @@ #include <libda/audio_dev.hpp> -#include <plugin++/dll.hpp> +#include <plugin++/loader.hpp> #include <ostream> #include <limits> diff --git a/libs/plugin++/include/plugin++/dll.hpp b/libs/plugin++/include/plugin++/dll.hpp index 62ab4be..19100f5 100644 --- a/libs/plugin++/include/plugin++/dll.hpp +++ b/libs/plugin++/include/plugin++/dll.hpp @@ -1,59 +1,16 @@ #ifndef DLL_HPP_INCLUDED #define DLL_HPP_INCLUDED -#include <iostream> -#include <set> -#include <sstream> #include <string> -#include <boost/filesystem.hpp> -#include <boost/ptr_container/ptr_vector.hpp> namespace plugin { - namespace fs = boost::filesystem; - /** @short RAII wrapper to load and unload dynamic library **/ class dll { void* lib; public: - dll(fs::path const& filename); + dll(std::string const& filename); ~dll(); }; - - /** @short A helper for loading all matching libraries in a folder. **/ - class loader { - boost::ptr_vector<dll> dlls; - void parse(std::set<fs::path>& paths, char const* var, fs::path const& folder = fs::path()) { - if (!var) return; - std::istringstream iss(var); - std::string elem; - while (std::getline(iss, elem, ':')) { - fs::path p = elem; - if (!folder.empty()) p /= folder; - if (fs::is_directory(p)) paths.insert(p); - } - } - /** Try to load all libraries in the given folder. **/ - void load(fs::path const& path) { - for (fs::directory_iterator it(path), end; it != end; ++it) { - try { - dlls.push_back(new dll(*it)); - } catch (std::runtime_error const& e) { - std::cerr << e.what() << std::endl; - } - } - } - public: - loader(fs::path const& folder) { - std::set<fs::path> paths; - parse(paths, std::getenv("PLUGIN_PATH")); - if (!folder.empty()) { - parse(paths, std::getenv("LD_LIBRARY_PATH"), folder); - parse(paths, "/usr/lib:/usr/local/lib", folder); - } - for (std::set<fs::path>::const_iterator it = paths.begin(); it != paths.end(); ++it) load(*it); - if (dlls.empty()) std::cerr << "No plugins found. Try setting PLUGIN_PATH or LD_LIBRARY_PATH." << std::endl; - } - }; } #endif diff --git a/libs/plugin++/include/plugin++/loader.hpp b/libs/plugin++/include/plugin++/loader.hpp new file mode 100644 index 0000000..7977043 --- /dev/null +++ b/libs/plugin++/include/plugin++/loader.hpp @@ -0,0 +1,52 @@ +#ifndef LOADER_HPP_INCLUDED +#define LOADER_HPP_INCLUDED + +#include "dll.hpp" +#include <iostream> +#include <set> +#include <sstream> +#include <boost/filesystem.hpp> +#include <boost/ptr_container/ptr_vector.hpp> + +namespace plugin { + namespace fs = boost::filesystem; + + /** @short A helper for loading all matching libraries in a folder. **/ + class loader { + boost::ptr_vector<dll> dlls; + void parse(std::set<fs::path>& paths, char const* var, fs::path const& folder = fs::path()) { + if (!var) return; + std::istringstream iss(var); + std::string elem; + while (std::getline(iss, elem, ':')) { + fs::path p = elem; + if (!folder.empty()) p /= folder; + if (fs::is_directory(p)) paths.insert(p); + } + } + /** Try to load all libraries in the given folder. **/ + void load(fs::path const& path) { + for (fs::directory_iterator it(path), end; it != end; ++it) { + try { + dlls.push_back(new dll(it->string())); + } catch (std::runtime_error const& e) { + std::cerr << e.what() << std::endl; + } + } + } + public: + loader(fs::path const& folder) { + std::set<fs::path> paths; + parse(paths, std::getenv("PLUGIN_PATH")); + if (!folder.empty()) { + parse(paths, std::getenv("LD_LIBRARY_PATH"), folder); + parse(paths, "/usr/lib:/usr/local/lib", folder); + } + for (std::set<fs::path>::const_iterator it = paths.begin(); it != paths.end(); ++it) load(*it); + if (dlls.empty()) std::cerr << "No plugins found. Try setting PLUGIN_PATH or LD_LIBRARY_PATH." << std::endl; + } + }; +} + +#endif + diff --git a/libs/plugin++/src/dll-posix.cpp b/libs/plugin++/src/dll-posix.cpp index 6dad599..1f71043 100644 --- a/libs/plugin++/src/dll-posix.cpp +++ b/libs/plugin++/src/dll-posix.cpp @@ -4,7 +4,7 @@ #include <stdexcept> namespace plugin { - dll::dll(fs::path const& filename): lib(dlopen(filename.string().c_str(), RTLD_LAZY | RTLD_GLOBAL)) { + dll::dll(std::string const& filename): lib(dlopen(filename.c_str(), RTLD_LAZY | RTLD_GLOBAL)) { if (!lib) throw std::runtime_error(dlerror()); } diff --git a/libs/plugin++/src/dll-windows.cpp b/libs/plugin++/src/dll-windows.cpp index af75c65..8a10412 100644 --- a/libs/plugin++/src/dll-windows.cpp +++ b/libs/plugin++/src/dll-windows.cpp @@ -4,7 +4,7 @@ #include <stdexcept> namespace plugin { - dll::dll(fs::path const& filename): lib(LoadLibrary(filename.string().c_str())) { + dll::dll(std::string const& filename): lib(LoadLibrary(filename.c_str())) { if (!lib) throw std::runtime_error(dlerror()); } |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-06-28 20:57:12
|
Module: performous Branch: master Commit: daa1a9778da45888d3a33477b8911973142d44f1 Author: Lasse Kärkkäinen <tronic+ndrm at trn.iki.fi> Date: Sun Jun 28 23:56:50 2009 +0300 Merge branch 'master' of ssh://tronic@performous.git.sourceforge.net/gitroot/performous --- |