You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(288) |
Aug
(119) |
Sep
(31) |
Oct
(59) |
Nov
(458) |
Dec
(359) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(268) |
Feb
(26) |
Mar
(36) |
Apr
(48) |
May
(119) |
Jun
(37) |
Jul
(173) |
Aug
(429) |
Sep
(137) |
Oct
(156) |
Nov
(59) |
Dec
(45) |
| 2011 |
Jan
(398) |
Feb
(257) |
Mar
(49) |
Apr
(5) |
May
(34) |
Jun
(11) |
Jul
(38) |
Aug
(12) |
Sep
(1) |
Oct
(49) |
Nov
(5) |
Dec
(10) |
| 2012 |
Jan
(21) |
Feb
(32) |
Mar
(20) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(173) |
Aug
|
Sep
(25) |
Oct
(6) |
Nov
(44) |
Dec
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 21:26:57
|
Module: performous Branch: joinmenu Commit: 6c98be0018b0015fb12bdc9de08912aef9925fb5 Author: Vincent Le Ligeour <yo...@us...> Date: Wed Aug 4 13:05:05 2010 +0200 Removed all detailled instrument type --- game/joystick.cc | 111 +++++++++++++++++++---------------------------- game/joystick.hh | 35 ++++++++------- game/screen_practice.cc | 2 +- 3 files changed, 65 insertions(+), 83 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-12 21:26:54
|
Module: performous Branch: joinmenu Commit: 762fd35cd5161be68dc51c536af8c8fee6e373e1 Author: Vincent Le Ligeour <yo...@us...> Date: Wed Aug 4 11:42:30 2010 +0200 Moved instrument definition inside InputDevPrivate --- game/joystick.cc | 58 +++++++++++++++++++++-------------------------------- game/joystick.hh | 38 ++++++++++++++-------------------- 2 files changed, 39 insertions(+), 57 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-12 21:26:51
|
Module: performous Branch: joinmenu Commit: fb76cabfaadaab0639c11761003e04e11d916d6a Author: Vincent Le Ligeour <yo...@us...> Date: Tue Aug 3 20:23:05 2010 +0200 Removed unneeded default constructor in joystick.hh --- game/joystick.cc | 66 +++++++++++++++++++++++----------------------- game/joystick.hh | 7 +---- game/screen_practice.cc | 4 +- 3 files changed, 36 insertions(+), 41 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-12 21:26:49
|
Module: performous Branch: joinmenu Commit: bfff564635572c25893f21607c1aa0f9c2872fb4 Author: Vincent Le Ligeour <yo...@us...> Date: Sat Jul 31 17:17:37 2010 +0200 Changed half of the internal controller structure (buggy and hacky) --- game/joystick.cc | 199 +++++++++++++++--------------------------------------- 1 files changed, 56 insertions(+), 143 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-12 21:26:47
|
Module: performous
Branch: joinmenu
Commit: 241801fb0807d83816b1be34297531fa52d73c65
Author: Vincent Le Ligeour <yo...@us...>
Date: Mon Jul 26 13:59:10 2010 +0200
Moved default config file searching inside fs.* files
---
game/configuration.cc | 26 ++++++++------------------
game/fs.cc | 14 ++++++++++++++
game/fs.hh | 3 +++
3 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/game/configuration.cc b/game/configuration.cc
index 194c25f..f108d4b 100644
--- a/game/configuration.cc
+++ b/game/configuration.cc
@@ -1,6 +1,5 @@
#include "configuration.hh"
-#include "config.hh"
#include "fs.hh"
#include "util.hh"
#include <boost/filesystem.hpp>
@@ -311,24 +310,15 @@ void readConfigXML(fs::path const& file, int mode) {
void readConfig() {
// Find config schema
- std::string schemafile;
- {
- typedef std::vector<std::string> ConfigList;
- ConfigList config_list;
- char const* root = getenv("PERFORMOUS_ROOT");
- if (root) config_list.push_back(std::string(root) + "/" SHARED_DATA_DIR CONFIG_SCHEMA);
- fs::path exec = plugin::execname();
- if (!exec.empty()) config_list.push_back(exec.parent_path().string() + "/../" SHARED_DATA_DIR CONFIG_SCHEMA);
- ConfigList::const_iterator it = std::find_if(config_list.begin(), config_list.end(), static_cast<bool(&)(fs::path const&)>(fs::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_ROOT\n";
- throw std::runtime_error(oss.str());
- }
- schemafile = *it;
+ fs::path schemafile;
+ try {
+ schemafile = getDefaultConfig(fs::path(CONFIG_SCHEMA));
origin = fs::path(schemafile).parent_path().parent_path(); // Assuming that two times parent from config file = origin
+ } catch(...) {
+ std::ostringstream oss;
+ oss << "No config schema file found.\n";
+ oss << "Install the file or define environment variable PERFORMOUS_ROOT\n";
+ throw std::runtime_error(oss.str());
}
readConfigXML(schemafile, 0); // Read schema and defaults
readConfigXML(systemConfFile, 1); // Update defaults with system config
diff --git a/game/fs.cc b/game/fs.cc
index 79895c2..14dd390 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -178,6 +178,20 @@ Paths const& getPaths(bool refresh) {
return paths;
}
+fs::path getDefaultConfig(fs::path const &configFile) {
+ typedef std::vector<std::string> ConfigList;
+ ConfigList config_list;
+ char const* root = getenv("PERFORMOUS_ROOT");
+ if (root) config_list.push_back(std::string(root) + "/" SHARED_DATA_DIR + configFile.string());
+ fs::path exec = plugin::execname();
+ if (!exec.empty()) config_list.push_back(exec.parent_path().string() + "/../" SHARED_DATA_DIR + configFile.string());
+ ConfigList::const_iterator it = std::find_if(config_list.begin(), config_list.end(), static_cast<bool(&)(fs::path const&)>(fs::exists));
+ if (it == config_list.end()) {
+ throw std::runtime_error("Could not find default config file " + configFile.string());
+ }
+ return *it;
+}
+
Paths getPathsConfig(std::string const& confOption) {
Paths ret;
Paths const& paths = getPaths();
diff --git a/game/fs.hh b/game/fs.hh
index 6d8baa2..d0ae238 100644
--- a/game/fs.hh
+++ b/game/fs.hh
@@ -33,6 +33,9 @@ std::string getThemePath(std::string const& filename);
/** Get full path to a share file **/
std::string getPath(fs::path const& filename);
+/** Get full path to a default conguration file **/
+fs::path getDefaultConfig(fs::path const &configFile);
+
typedef std::vector<fs::path> Paths;
/** Get all shared data paths in preference order **/
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 21:26:44
|
Module: performous Branch: joinmenu Commit: 4100d6c33a736306a58835bf107f146b4b1f972b Author: Vincent Le Ligeour <yo...@us...> Date: Mon Jul 26 13:57:42 2010 +0200 Merge branch 'master' into controllers --- |
|
From: Tapio V. <aa...@us...> - 2010-08-12 21:26:42
|
Module: performous
Branch: joinmenu
Commit: 738cadc9f01b78d2af738d83e2c8cc1624808dcd
Author: Vincent Le Ligeour <yo...@us...>
Date: Mon Jul 26 13:20:15 2010 +0200
Added controllers description configuration file
---
data/CMakeLists.txt | 2 +
data/controllers.xml | 188 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 190 insertions(+), 0 deletions(-)
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index f5bc718..3686029 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1,6 +1,7 @@
set(APPLICATION_FILE "performous.desktop")
set(PIXMAP_FILE "performous.xpm")
set(CONFIG_FILE "schema.xml")
+set(CONTROLLERS_FILE "controllers.xml")
if(UNIX)
install(FILES ${APPLICATION_FILE} DESTINATION "share/applications/")
@@ -8,6 +9,7 @@ if(UNIX)
endif(UNIX)
install(FILES ${CONFIG_FILE} DESTINATION "${SHARE_INSTALL}/config/")
+install(FILES ${CONTROLLERS_FILE} DESTINATION "${SHARE_INSTALL}/config/")
file(GLOB XSL_FILES "*.xsl")
install(FILES ${XSL_FILES} DESTINATION "${SHARE_INSTALL}/xsl/")
diff --git a/data/controllers.xml b/data/controllers.xml
new file mode 100644
index 0000000..7129607
--- /dev/null
+++ b/data/controllers.xml
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<controllers>
+ <guitar name="GUITAR_GH">
+ <match>
+ <description>Guitar Hero 3 guitar</description>
+ <regexp match="Guitar Hero3" />
+ </match>
+ <mapping>
+ <button id="0" value="yellow" />
+ <button id="1" value="green" />
+ <button id="2" value="red" />
+ <button id="3" value="blue" />
+ <button id="4" value="orange" />
+ <button id="5" value="godmode" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ </mapping>
+ </guitar>
+ <guitar name="GUITAR_RB_XBOX360">
+ <match>
+ <description>Guitar Hero X-plorer guitar</description>
+ <regexp match="Guitar Hero X-plorer" />
+ </match>
+ <match>
+ <description>Rock Band guitar Xbox 360</description>
+ <regexp match="Harmonix Guitar .* Xbox" />
+ </match>
+ <mapping>
+ <button id="0" value="green" />
+ <button id="1" value="red" />
+ <button id="2" value="blue" />
+ <button id="3" value="yellow" />
+ <button id="4" value="orange" />
+ <button id="6" value="select" />
+ <button id="7" value="start" />
+ </mapping>
+ </guitar>
+ <guitar name="GUITAR_RB_PS3">
+ <match>
+ <description>Rock Band guitar PS3</description>
+ <regexp match="Harmonix Guitar .* PlayStation" />
+ </match>
+ <mapping>
+ <button id="0" value="blue" />
+ <button id="1" value="green" />
+ <button id="2" value="red" />
+ <button id="3" value="yellow" />
+ <button id="4" value="orange" />
+ <button id="5" value="godmode" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ </mapping>
+ </guitar>
+ <guitar name="GUITAR_HAMA_PS2">
+ <match>
+ <description>Hama Guitar for PS2 with converter</description>
+ <regexp match="PS Converter" />
+ </match>
+ <mapping>
+ <button id="0" value="yellow" />
+ <button id="1" value="red" />
+ <button id="2" value="blue" />
+ <button id="3" value="orange" />
+ <button id="4" value="godmode" />
+ <button id="5" value="green" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ </mapping>
+ </guitar>
+ <drumkit name="DRUMS_GH">
+ <match>
+ <description>Guitar Hero 4 drum kit (guessed, could be a guitar)</description>
+ <regexp match="Guitar Hero4" />
+ </match>
+ <mapping>
+ <button id="0" value="blue" />
+ <button id="1" value="green" />
+ <button id="2" value="red" />
+ <button id="3" value="yellow" />
+ <button id="4" value="kick" />
+ <button id="5" value="green" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ </mapping>
+ </drumkit>
+ <drumkit name="DRUMS_RB_PS3">
+ <match>
+ <description>RockBand Wii drum kit</description>
+ <regexp match="Harmonix Drum Controller for Nintendo Wii" />
+ </match>
+ <match>
+ <description>RockBand PS3 drum kit</description>
+ <regexp match="Harmonix Drum [Kk]it for Playstation" />
+ </match>
+ <mapping>
+ <button id="0" value="blue" />
+ <button id="1" value="green" />
+ <button id="2" value="red" />
+ <button id="3" value="yellow" />
+ <button id="4" value="kick" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ </mapping>
+ </drumkit>
+ <drumkit name="DRUMS_RB_XB360">
+ <match>
+ <description>RockBand XBox drum kit</description>
+ <regexp match="Harmonix Drum [Kk]it for Xbox" />
+ </match>
+ <mapping>
+ <button id="0" value="green" />
+ <button id="1" value="red" />
+ <button id="2" value="blue" />
+ <button id="3" value="yellow" />
+ <button id="4" value="kick" />
+ <button id="6" value="select" />
+ <button id="7" value="start" />
+ </mapping>
+ </drumkit>
+ <dancepad name="DANCEPAD_GENERIC">
+ <match>
+ <description>Generic dancepad</description>
+ <regexp match="Dance mat|RedOctane USB Pad|Redoctane XBOX DDR|Positive Gaming Impact USB pad" />
+ </match>
+ <mapping>
+ <button id="0" value="left" />
+ <button id="1" value="down" />
+ <button id="2" value="up" />
+ <button id="3" value="right" />
+ <button id="4" value="up-left" />
+ <button id="5" value="up-right" />
+ <button id="6" value="down-left" />
+ <button id="7" value="down-right" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ </mapping>
+ </dancepad>
+ <dancepad name="DANCEPAD_TIGERGAME">
+ <match>
+ <description>TigerGame dancepad</description>
+ <regexp match="TigerGame" />
+ </match>
+ <mapping>
+ <button id="0" value="select" />
+ <button id="1" value="start" />
+ <button id="8" value="left" />
+ <button id="9" value="right" />
+ <button id="10" value="down" />
+ <button id="11" value="up" />
+ </mapping>
+ </dancepad>
+ <dancepad name="DANCEPAD_EMS2">
+ <match>
+ <description>EMS PS2/PC dancepad adapter</description>
+ <regexp match="0b43:0003" />
+ </match>
+ <mapping>
+ <button id="0" value="down-left" />
+ <button id="1" value="up-right" />
+ <button id="2" value="up-left" />
+ <button id="3" value="down-right" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ <button id="12" value="up" />
+ <button id="13" value="right" />
+ <button id="14" value="down" />
+ <button id="15" value="left" />
+ </mapping>
+ </dancepad>
+ <dancepad name="DANCEPAD_2TECH">
+ <match>
+ <description>2-tech usb dancepad</description>
+ <regexp match="USB Gamepad" />
+ </match>
+ <mapping>
+ <button id="0" value="left" />
+ <button id="1" value="down" />
+ <button id="2" value="up" />
+ <button id="3" value="right" />
+ <button id="4" value="up-left" />
+ <button id="5" value="up-right" />
+ <button id="6" value="down-left" />
+ <button id="7" value="down-right" />
+ <button id="8" value="start" />
+ <button id="9" value="select" />
+ </mapping>
+ </dancepad>
+</controllers>
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 20:48:54
|
Module: performous
Branch: master
Commit: ffd1a78ff9729bd9400e77b99db74fe09acc396d
Author: Tapio Vierros <tap...@gm...>
Date: Thu Aug 12 23:47:36 2010 +0300
Add OpenCV to cross-compilation.
---
cmake/Modules/FindOpenCV.cmake | 41 +++++++++++++++------------
win32/cross-from-debian/makedeps.sh | 51 +++++++++++++++++++++++++++++++++++
2 files changed, 74 insertions(+), 18 deletions(-)
diff --git a/cmake/Modules/FindOpenCV.cmake b/cmake/Modules/FindOpenCV.cmake
index 3dec6df..6b745f6 100644
--- a/cmake/Modules/FindOpenCV.cmake
+++ b/cmake/Modules/FindOpenCV.cmake
@@ -30,18 +30,23 @@
# --------------------------------
+#TODO: Clean-up all this shit.
+
MACRO(DBG_MSG _MSG)
-# MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}):\n${_MSG}")
+ #MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}):\n${_MSG}")
ENDMACRO(DBG_MSG)
+# Use pkg-config to get hints about paths
+libfind_pkg_check_modules(OpenCV_PKGCONF opencv)
+
# required cv components with header and library if COMPONENTS unspecified
IF (NOT OpenCV_FIND_COMPONENTS)
# default
SET(OpenCV_FIND_REQUIRED_COMPONENTS CV CXCORE HIGHGUI)
IF (WIN32)
-LIST(APPEND OpenCV_FIND_REQUIRED_COMPONENTS CVCAM ) # WIN32 only actually
+#LIST(APPEND OpenCV_FIND_REQUIRED_COMPONENTS CVCAM ) # WIN32 only actually
ENDIF(WIN32)
ENDIF (NOT OpenCV_FIND_COMPONENTS)
@@ -73,7 +78,7 @@ LIST(APPEND OpenCV_POSSIBLE_ROOT_DIRS /opt/net/gcc41/OpenCV )
ENDIF(CXX_COMPILER_VERSION MATCHES ".*4\\.[0-9].*")
ENDIF (${CMAKE_COMPILER_IS_GNUCXX})
-#DBG_MSG("DBG (OpenCV_POSSIBLE_ROOT_DIRS=${OpenCV_POSSIBLE_ROOT_DIRS}")
+DBG_MSG("OpenCV_POSSIBLE_ROOT_DIRS=${OpenCV_POSSIBLE_ROOT_DIRS}")
#
# select exactly ONE OpenCV base directory/tree
@@ -109,7 +114,7 @@ lib
OpenCV/lib
otherlibs/_graphics/lib
)
-#DBG_MSG("OpenCV_LIBDIR_SUFFIXES=${OpenCV_LIBDIR_SUFFIXES}")
+DBG_MSG("OpenCV_LIBDIR_SUFFIXES=${OpenCV_LIBDIR_SUFFIXES}")
#
@@ -117,23 +122,23 @@ otherlibs/_graphics/lib
#
FIND_PATH(OpenCV_CV_INCLUDE_DIR
NAMES cv.h
-PATHS ${OpenCV_ROOT_DIR}
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR}
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
FIND_PATH(OpenCV_CXCORE_INCLUDE_DIR
NAMES cxcore.h
-PATHS ${OpenCV_ROOT_DIR}
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR}
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
FIND_PATH(OpenCV_CVAUX_INCLUDE_DIR
NAMES cvaux.h
-PATHS ${OpenCV_ROOT_DIR}
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR}
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
FIND_PATH(OpenCV_HIGHGUI_INCLUDE_DIR
NAMES highgui.h
-PATHS ${OpenCV_ROOT_DIR}
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR}
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
FIND_PATH(OpenCV_CVCAM_INCLUDE_DIR
NAMES cvcam.h
-PATHS ${OpenCV_ROOT_DIR}
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR}
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
#
@@ -142,32 +147,32 @@ PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
#
FIND_LIBRARY(OpenCV_CV_LIBRARY
NAMES cv opencv
-PATHS ${OpenCV_ROOT_DIR}
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR}
PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_CVAUX_LIBRARY
NAMES cvaux
-PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_CVCAM_LIBRARY
NAMES cvcam
-PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_CVHAARTRAINING_LIBRARY
NAMES cvhaartraining
-PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_CXCORE_LIBRARY
NAMES cxcore
-PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_CXTS_LIBRARY
NAMES cxts
-PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_HIGHGUI_LIBRARY
NAMES highgui
-PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_ML_LIBRARY
NAMES ml
-PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_TRS_LIBRARY
NAMES trs
-PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
+PATHS ${OpenCV_PKGCONF_INCLUDE_DIRS} ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
diff --git a/win32/cross-from-debian/makedeps.sh b/win32/cross-from-debian/makedeps.sh
index bd54f8e..0dc83db 100755
--- a/win32/cross-from-debian/makedeps.sh
+++ b/win32/cross-from-debian/makedeps.sh
@@ -63,6 +63,7 @@ assert_binary_on_path tar
assert_binary_on_path unzip
assert_binary_on_path wget
+SCRIPTDIR="`pwd`"
export PREFIX="`pwd`"/deps
export WINEPREFIX="`pwd`"/wine
mkdir -pv "$PREFIX"/bin "$PREFIX"/lib "$PREFIX"/include "$PREFIX"/lib/pkgconfig "$PREFIX"/build-stamps
@@ -620,3 +621,53 @@ if test ! -f "$PREFIX"/build-stamps/ffmpeg; then
touch "$PREFIX"/build-stamps/ffmpeg
$RM_RF ffmpeg
fi
+
+# VideoInput
+# This is support library for OpenCV to get video input on Windows.
+# This is only needed if you want OpenCV.
+VIDEOINPUT="videoInput0.1995"
+if test ! -f "$PREFIX"/build-stamps/videoinput; then
+ download http://muonics.net/school/spring05/videoInput/files/$VIDEOINPUT.zip
+ unzip -o $VIDEOINPUT.zip
+ # We don't bother compiling this since it has precompiled lib and would
+ # probably be a pain in the ass.
+ cp -v $VIDEOINPUT/compiledLib/compiledByDevCpp/*.a "$PREFIX"/lib
+ cp -v $VIDEOINPUT/compiledLib/compiledByDevCpp/include/*.h "$PREFIX"/include
+ touch "$PREFIX"/build-stamps/videoinput
+ $RM_RF $VIDEOINPUT
+fi
+
+# OpenCV
+# This is optional and is used to enable webcam features.
+OPENCV="OpenCV-2.1.0"
+if test ! -f "$PREFIX"/build-stamps/opencv; then
+ download http://download.sourceforge.net/opencvlibrary/$OPENCV-win.zip
+ unzip -o $OPENCV-win.zip
+ cd $OPENCV
+ ln -s ../deps/include/videoInput.h /src/highgui/videoinput.h
+ mkdir -pv build
+ cd build
+ cmake \
+ -DCMAKE_TOOLCHAIN_FILE="$SCRIPTDIR/Toolchain.cmake" \
+ -DBUILD_NEW_PYTHON_SUPPORT=OFF \
+ -DBUILD_TESTS=OFF \
+ -DWITH_JASPER=OFF -DWITH_JPEG=OFF -DWITH_PNG=OFF -DWITH_TBB=OFF -DWITH_TIFF=OFF \
+ -DCMAKE_INSTALL_PREFIX="$PREFIX" \
+ ..
+ make
+ make install
+ cp -v unix-install/opencv.pc "$PREFIX"/lib/pkgconfig # No auto-install :(
+ pushd .
+ cd "$PREFIX"/lib
+ # Create some symlinks so the cmake scripts detect it correctly
+ ln -svf libcv210.dll.a libcv.dll.a
+ ln -svf libcxcore210.dll.a libcxcore.dll.a
+ ln -svf libcvaux210.dll.a libcvaux.dll.a
+ ln -svf libhighgui210.dll.a libhighgui.dll.a
+ popd
+ cd ../..
+ touch "$PREFIX"/build-stamps/opencv
+ $RM_RF $OPENCV
+fi
+
+echo "All dependencies done."
|
|
From: Yoda-JM <yo...@us...> - 2010-08-12 19:53:02
|
Module: performous
Branch: master
Commit: e6b6831664bab8770a461622014c3eb85883e13b
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Aug 12 21:52:00 2010 +0200
Fixed some of mr_bones comments
---
.../games-arcade/performous/performous-9999.ebuild | 23 +++++++-------------
1 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/portage-overlay/games-arcade/performous/performous-9999.ebuild b/portage-overlay/games-arcade/performous/performous-9999.ebuild
index 5a412f4..05a3313 100644
--- a/portage-overlay/games-arcade/performous/performous-9999.ebuild
+++ b/portage-overlay/games-arcade/performous/performous-9999.ebuild
@@ -2,12 +2,10 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: /cvsroot/ultrastar-ng/UltraStar-ng/portage-overlay/games-arcade/performous/performous-9999.ebuild,v 1.10 2007/09/29 13:04:19 yoda-jm Exp $
+[[ ${PV} = 9999 ]] && GIT="git"
EAPI=2
-inherit games cmake-utils
-[ "$PV" == "9999" ] && inherit git
-
-RESTRICT="nostrip"
+inherit cmake-utils ${GIT} games
SONGS_PN=ultrastar-songs
@@ -34,9 +32,9 @@ LICENSE="GPL-2
CCPL-Attribution-NonCommercial-NoDerivs-2.5
)"
SLOT="0"
-KEYWORDS="~x86 ~amd64 ~ppc ~ppc64"
+KEYWORDS="~amd64 ~x86"
-IUSE="debug alsa portaudio pulseaudio jack songs gstreamer tools editor midi webcam"
+IUSE="alsa debug editor gstreamer jack midi portaudio pulseaudio songs tools webcam"
RDEPEND="gnome-base/librsvg
>=dev-libs/boost-1.39.0
@@ -63,22 +61,17 @@ RDEPEND="gnome-base/librsvg
DEPEND="${RDEPEND}
>=dev-util/cmake-2.6.0"
-S="${WORKDIR}/${MY_P}"
+S=${WORKDIR}/${MY_P}
src_unpack() {
if [ "${PV}" != "9999" ]; then
unpack "${MY_P}.tar.bz2"
else
git_src_unpack
- cd "${S}"
fi
+ cd "${S}"
if use songs; then
- cd "${S}"
- unpack "${SONGS_PN}-jc-1.zip"
- unpack "${SONGS_PN}-libre-3.zip"
- unpack "${SONGS_PN}-restricted-3.zip"
- unpack "${SONGS_PN}-shearer-1.zip"
- cd "${S}"
+ unpack "${SONGS_PN}-jc-1.zip" "${SONGS_PN}-libre-3.zip" "${SONGS_PN}-restricted-3.zip" "${SONGS_PN}-shearer-1.zip"
fi
}
@@ -114,7 +107,7 @@ src_install() {
mv -f "${D}/${GAMES_PREFIX}/share/man" "${D}/usr/share/"
if use songs; then
- insinto "/usr/share/games/ultrastar"
+ insinto "${GAMES_PREFIX}/share/performous"
doins -r "${S}/songs" || die "doins songs failed"
fi
doicon "${S}/data/${PN}.xpm"
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 17:59:52
|
Module: performous Branch: master Commit: 2eba654be384a274a1d5a31d5d98f115f2061075 Author: Tapio Vierros <tap...@gm...> Date: Thu Aug 12 20:58:40 2010 +0300 Make cross-compilation dep versions easier to update. --- win32/cross-from-debian/makedeps.sh | 216 +++++++++++++++++++---------------- 1 files changed, 120 insertions(+), 96 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-12 17:59:50
|
Module: performous Branch: master Commit: c87c53b1ffdf988d5868d68e86284c4805d5fa90 Author: Tapio Vierros <tap...@gm...> Date: Thu Aug 12 20:48:40 2010 +0300 Make stump's deps cross compilation script pass easier. --- win32/cross-from-debian/makedeps.sh | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/win32/cross-from-debian/makedeps.sh b/win32/cross-from-debian/makedeps.sh index 355a4d2..b0c9360 100755 --- a/win32/cross-from-debian/makedeps.sh +++ b/win32/cross-from-debian/makedeps.sh @@ -392,7 +392,7 @@ if test ! -f "$PREFIX"/build-stamps/atk; then download http://ftp.gnome.org/pub/GNOME/sources/atk/1.30/atk-1.30.0.tar.bz2 tar jxvf atk-1.30.0.tar.bz2 cd atk-1.30.0 - ./configure $COMMON_AUTOCONF_FLAGS + ./configure $COMMON_AUTOCONF_FLAGS --disable-glibtest make make install cd .. @@ -410,7 +410,7 @@ if test ! -f "$PREFIX"/build-stamps/gtk; then download http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.20/gtk+-2.20.1.tar.bz2 tar jxvf gtk+-2.20.1.tar.bz2 cd gtk+-2.20.1 - ./configure $COMMON_AUTOCONF_FLAGS --disable-modules --without-libtiff --with-included-loaders=png,jpeg,gif,xpm,xbm + ./configure $COMMON_AUTOCONF_FLAGS --disable-glibtest --disable-modules --without-libtiff --with-included-loaders=png,jpeg,gif,xpm,xbm make -C gdk-pixbuf wine-shwrap gdk-pixbuf/gdk-pixbuf-csource wine-shwrap gdk-pixbuf/gdk-pixbuf-query-loaders @@ -578,7 +578,7 @@ if test ! -f "$PREFIX"/build-stamps/ffmpeg; then svn up ffmpeg fi cd ffmpeg - ./configure --prefix="$PREFIX" --cc="$CROSS_GCC" --nm="$CROSS_NM" --target-os=mingw32 --arch=i386 --disable-static --enable-shared --enable-gpl --enable-postproc --enable-avfilter-lavf --enable-w32threads --enable-runtime-cpudetect --enable-memalign-hack --enable-zlib --enable-libschroedinger --extra-cflags="-I$PREFIX/include" --extra-ldflags="-L$PREFIX/lib" + ./configure --prefix="$PREFIX" --cc="$CROSS_GCC" --nm="$CROSS_NM" --target-os=mingw32 --arch=i386 --disable-static --enable-shared --enable-gpl --enable-postproc --enable-w32threads --enable-runtime-cpudetect --enable-memalign-hack --enable-zlib --enable-libschroedinger --extra-cflags="-I$PREFIX/include" --extra-ldflags="-L$PREFIX/lib" sed -i -e 's/-Werror=[^ ]*//g' config.mak make make install |
|
From: Tapio V. <aa...@us...> - 2010-08-12 17:59:48
|
Module: performous Branch: master Commit: 9e507d679258969734ca842e7096a9242e634b76 Author: Tapio Vierros <tap...@gm...> Date: Thu Aug 12 20:44:38 2010 +0300 Add back the old background image - doesn't hurt to have some variance. --- data/backgrounds/classic_bg.svg | 388 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 388 insertions(+), 0 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-12 17:59:46
|
Module: performous
Branch: master
Commit: 2142fb5f72ae7bb7538fef8985a56380f04a7ac3
Author: Tapio Vierros <tap...@gm...>
Date: Thu Aug 12 20:39:13 2010 +0300
Clog vs. cout
cout: Data paths are useful since people keep asking about them.
cout: Audio devs are useful and they wouldn't show even in pdevhelp/michelp.
clog: Joystick IDs read from xml are debug info.
---
game/fs.cc | 4 ++--
game/joystick.cc | 12 ++++++------
game/main.cc | 2 +-
game/portmidi.hh | 6 +++---
libs/libda/plugins/audio_dev_alsa.cpp | 10 +++++-----
libs/libda/plugins/audio_dev_pa19.cpp | 6 +++---
6 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/game/fs.cc b/game/fs.cc
index 2129583..823f78f 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -135,10 +135,10 @@ bool isThemeResource(fs::path filename){
namespace {
bool pathNotExist(fs::path const& p) {
if (exists(p)) {
- std::clog << ">>> Using data path \"" << p.string() << "\"" << std::endl;
+ std::cout << ">>> Using data path \"" << p.string() << "\"" << std::endl;
return false;
}
- std::clog << ">>> Not using \"" << p.string() << "\" (does not exist)" << std::endl;
+ std::cout << ">>> Not using \"" << p.string() << "\" (does not exist)" << std::endl;
return true;
}
}
diff --git a/game/joystick.cc b/game/joystick.cc
index c16ae45..1128fe1 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -234,10 +234,10 @@ namespace {
void readControllers(input::Instruments &instruments, fs::path const& file) {
if (!fs::exists(file)) {
- std::cout << "Skipping " << file << " (not found)" << std::endl;
+ std::clog << "Skipping " << file << " (not found)" << std::endl;
return;
}
- std::cout << "Parsing " << file << std::endl;
+ std::clog << "Parsing " << file << std::endl;
xmlpp::DomParser domParser(file.string());
try {
xmlpp::NodeSet n = domParser.get_document()->get_root_node()->find("/controllers/controller");
@@ -331,7 +331,7 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
// inserting the instrument
if(instruments.find(name) == instruments.end()) {
- std::cout << " Adding " << type << ": " << name << std::endl;
+ std::clog << " Adding " << type << ": " << name << std::endl;
} else {
std::cout << " Overriding " << type << ": " << name << std::endl;
instruments.erase(name);
@@ -422,9 +422,9 @@ void input::SDL::init() {
// Here we should send an event to have correct state buttons
init_devices();
// Adding keyboard instruments
- std::cout << "Keyboard as guitar controller: " << (config["game/keyboard_guitar"].b() ? "enabled":"disabled") << std::endl;
- std::cout << "Keyboard as drumkit controller: " << (config["game/keyboard_drumkit"].b() ? "enabled":"disabled") << std::endl;
- std::cout << "Keyboard as dance pad controller: " << (config["game/keyboard_dancepad"].b() ? "enabled":"disabled") << std::endl;
+ std::clog << "Keyboard as guitar controller: " << (config["game/keyboard_guitar"].b() ? "enabled":"disabled") << std::endl;
+ std::clog << "Keyboard as drumkit controller: " << (config["game/keyboard_drumkit"].b() ? "enabled":"disabled") << std::endl;
+ std::clog << "Keyboard as dance pad controller: " << (config["game/keyboard_dancepad"].b() ? "enabled":"disabled") << std::endl;
input::SDL::sdl_devices[input::detail::KEYBOARD_ID] = NULL;
input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(input::detail::KEYBOARD_ID, input::detail::InputDevPrivate(g_instruments.find("GUITAR_GUITARHERO")->second)));
input::SDL::sdl_devices[input::detail::KEYBOARD_ID2] = NULL;
diff --git a/game/main.cc b/game/main.cc
index bbc9f4c..242ef2a 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -438,5 +438,5 @@ void outputOptionalFeatureStatus() {
(input::MidiDrums::enabled() ? "Enabled" : "Disabled")
<< std::endl << " Webcam support: " <<
(Webcam::enabled() ? "Enabled" : "Disabled")
- << std::endl;
+ << std::endl << std::endl;
}
diff --git a/game/portmidi.hh b/game/portmidi.hh
index 8e8b1d7..927a31f 100644
--- a/game/portmidi.hh
+++ b/game/portmidi.hh
@@ -12,7 +12,7 @@ namespace pm {
class Stream {
public:
operator PortMidiStream*() { return m_handle; }
-
+
protected:
PortMidiStream* m_handle;
Stream(): m_handle() {}
@@ -27,7 +27,7 @@ namespace pm {
PmDeviceInfo const* info = Pm_GetDeviceInfo(devId);
if (info->input != input) continue;
if (info->opened) continue;
- std::cout << " " << info->name << std::endl;
+ std::cout << " " << info->name << std::endl << std::endl;
}
}
int findDevice(bool input, std::string const& name = "") {
@@ -42,7 +42,7 @@ namespace pm {
throw std::runtime_error("No matching PortMidi device found");
}
}
-
+
class Input: public Stream {
public:
Input(int devId) {
diff --git a/libs/libda/plugins/audio_dev_alsa.cpp b/libs/libda/plugins/audio_dev_alsa.cpp
index b96f7f7..d9d3b47 100644
--- a/libs/libda/plugins/audio_dev_alsa.cpp
+++ b/libs/libda/plugins/audio_dev_alsa.cpp
@@ -29,18 +29,18 @@ namespace {
if (snd_ctl_pcm_info(ctl, pcminfo) < 0) continue;
std::string device = std::string("alsa:hw:") + snd_ctl_card_info_get_id(info) + "," + boost::lexical_cast<std::string>(dev);
std::string desc = std::string(snd_ctl_card_info_get_name(info)) + " (" + snd_pcm_info_get_name(pcminfo) + ")";
- std::clog << " " << device << " " << desc << std::endl;
+ std::cout << " " << device << " " << desc << std::endl;
}
}
}
struct Foo {
Foo() {
- std::clog << "ALSA capture devices:\n";
+ std::cout << "ALSA capture devices:\n";
devices(SND_PCM_STREAM_CAPTURE);
- std::clog << "ALSA playback devices:\n";
+ std::cout << "ALSA playback devices:\n";
devices(SND_PCM_STREAM_PLAYBACK);
- std::clog << std::endl;
+ std::cout << std::endl;
}
} foo;
@@ -95,7 +95,7 @@ namespace {
}
}
*/
-
+
class alsa_record: public record::dev {
settings m_s;
alsa::pcm m_pcm;
diff --git a/libs/libda/plugins/audio_dev_pa19.cpp b/libs/libda/plugins/audio_dev_pa19.cpp
index bf4f6d4..e2b273a 100644
--- a/libs/libda/plugins/audio_dev_pa19.cpp
+++ b/libs/libda/plugins/audio_dev_pa19.cpp
@@ -9,13 +9,13 @@ namespace {
struct Foo {
portaudio::Init init;
Foo() {
- std::clog << "PortAudio devices:\n";
+ std::cout << "PortAudio devices:\n";
for (int i = 0, end = Pa_GetDeviceCount(); i != end; ++i) {
PaDeviceInfo const* info = Pa_GetDeviceInfo(i);
if (!info) continue;
- std::clog << " pa19:" << i << " " << info->name << " (" << info->maxInputChannels << " in, " << info->maxOutputChannels << " out)\n";
+ std::cout << " pa19:" << i << " " << info->name << " (" << info->maxInputChannels << " in, " << info->maxOutputChannels << " out)\n";
}
- std::clog << std::endl;
+ std::cout << std::endl;
}
} foo;
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 17:59:44
|
Module: performous
Branch: master
Commit: f526acceb1c0322c7694c944441d8b169c1d87b0
Author: Tapio Vierros <tap...@gm...>
Date: Thu Aug 12 20:28:12 2010 +0300
Reduce ffmpeg console spam.
---
game/ffmpeg.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/ffmpeg.cc b/game/ffmpeg.cc
index 1f0d80b..5c136f3 100644
--- a/game/ffmpeg.cc
+++ b/game/ffmpeg.cc
@@ -50,7 +50,7 @@ double FFmpeg::duration() const {
void FFmpeg::open() {
boost::mutex::scoped_lock l(s_avcodec_mutex);
av_register_all();
- //av_log_set_level(AV_LOG_DEBUG);
+ av_log_set_level(AV_LOG_ERROR);
if (av_open_input_file(&pFormatCtx, m_filename.c_str(), NULL, 0, NULL)) throw std::runtime_error("Cannot open input file");
if (av_find_stream_info(pFormatCtx) < 0) throw std::runtime_error("Cannot find stream information");
pFormatCtx->flags |= AVFMT_FLAG_GENPTS;
|
|
From: Yoda-JM <yo...@us...> - 2010-08-12 15:57:09
|
Module: performous
Branch: master
Commit: e972792d444fbc33b52565007649b5b4a18d8e60
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Aug 12 17:56:51 2010 +0200
Fixed Gentoo man page directory
---
.../games-arcade/performous/performous-9999.ebuild | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/portage-overlay/games-arcade/performous/performous-9999.ebuild b/portage-overlay/games-arcade/performous/performous-9999.ebuild
index d2a1ad5..5a412f4 100644
--- a/portage-overlay/games-arcade/performous/performous-9999.ebuild
+++ b/portage-overlay/games-arcade/performous/performous-9999.ebuild
@@ -39,7 +39,7 @@ KEYWORDS="~x86 ~amd64 ~ppc ~ppc64"
IUSE="debug alsa portaudio pulseaudio jack songs gstreamer tools editor midi webcam"
RDEPEND="gnome-base/librsvg
- dev-libs/boost
+ >=dev-libs/boost-1.39.0
x11-libs/pango
dev-cpp/libxmlpp
media-libs/glew
@@ -111,6 +111,7 @@ src_compile() {
src_install() {
DOCS="docs/*.txt" cmake-utils_src_install
+ mv -f "${D}/${GAMES_PREFIX}/share/man" "${D}/usr/share/"
if use songs; then
insinto "/usr/share/games/ultrastar"
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 15:40:11
|
Module: performous
Branch: portaudio
Commit: 9bb3628203fba4ed746b9c40bc158391fed70477
Author: Vincent Le Ligeour <yo...@us...>
Date: Wed Aug 11 21:18:54 2010 +0200
Fixed controllers overriding (yes I'll copy 50 times "I'll read the STL documentation when I use it"
---
game/joystick.cc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index d52b85c..c16ae45 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -334,6 +334,7 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
std::cout << " Adding " << type << ": " << name << std::endl;
} else {
std::cout << " Overriding " << type << ": " << name << std::endl;
+ instruments.erase(name);
}
input::Instrument instrument(name, devType, mapping);
instrument.match = regexp;
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 15:40:10
|
Module: performous
Branch: portaudio
Commit: 32ec6f0ee64db2932996f7487a7417d06aeb6bae
Author: Tapio Vierros <tap...@gm...>
Date: Wed Aug 11 20:56:18 2010 +0300
Fix loading of other than theme SVGs.
---
game/fs.cc | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/game/fs.cc b/game/fs.cc
index 3a3dea5..2129583 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -126,7 +126,10 @@ std::string getThemePath(std::string const& filename) {
}
bool isThemeResource(fs::path filename){
- return filename == getThemePath(filename.filename());
+ try {
+ std::string themefile = getThemePath(filename.filename());
+ return themefile == filename;
+ } catch (...) { return false; }
}
namespace {
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 15:40:10
|
Module: performous
Branch: portaudio
Commit: b0fcbc2cd8865d3dfa8e4941be4ad55775fb3138
Author: Tapio Vierros <tap...@gm...>
Date: Wed Aug 11 18:30:33 2010 +0300
Whitespace.
---
game/fs.cc | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/game/fs.cc b/game/fs.cc
index c675e28..3a3dea5 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -49,20 +49,20 @@ fs::path getConfigDir() {
}
#else
{
- //open AppData directory
+ // Open AppData directory
std::string str;
ITEMIDLIST* pidl;
char AppDir[MAX_PATH];
HRESULT hRes = SHGetSpecialFolderLocation( NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE , &pidl );
if (hRes==NOERROR)
{
- SHGetPathFromIDList( pidl, AppDir );
- int i;
- for(i = 0; AppDir[i] != '\0'; i++){
- if(AppDir[i] == '\\') str += '/';
- else str += AppDir[i];
- }
- dir = fs::path(str) / "performous";
+ SHGetPathFromIDList( pidl, AppDir );
+ int i;
+ for (i = 0; AppDir[i] != '\0'; i++) {
+ if (AppDir[i] == '\\') str += '/';
+ else str += AppDir[i];
+ }
+ dir = fs::path(str) / "performous";
}
}
#endif
@@ -72,24 +72,24 @@ fs::path getConfigDir() {
fs::path getDataDir() {
#ifdef _WIN32
- return getConfigDir(); // APPDATA/performous
+ return getConfigDir(); // APPDATA/performous
#else
- fs::path shortDir = "performous";
- fs::path shareDir = SHARED_DATA_DIR;
- char const* xdg_data_home = getenv("XDG_DATA_HOME");
- // FIXME: Should this use "games" or not?
- return (xdg_data_home ? xdg_data_home / shortDir : getHomeDir() / ".local" / shareDir);
+ fs::path shortDir = "performous";
+ fs::path shareDir = SHARED_DATA_DIR;
+ char const* xdg_data_home = getenv("XDG_DATA_HOME");
+ // FIXME: Should this use "games" or not?
+ return (xdg_data_home ? xdg_data_home / shortDir : getHomeDir() / ".local" / shareDir);
#endif
}
fs::path getCacheDir() {
#ifdef _WIN32
- return getConfigDir() / "cache"; // APPDATA/performous
+ return getConfigDir() / "cache"; // APPDATA/performous
#else
- fs::path shortDir = "performous";
- char const* xdg_cache_home = getenv("XDG_CACHE_HOME");
- // FIXME: Should this use "games" or not?
- return (xdg_cache_home ? xdg_cache_home / shortDir : getHomeDir() / ".cache" / shortDir);
+ fs::path shortDir = "performous";
+ char const* xdg_cache_home = getenv("XDG_CACHE_HOME");
+ // FIXME: Should this use "games" or not?
+ return (xdg_cache_home ? xdg_cache_home / shortDir : getHomeDir() / ".cache" / shortDir);
#endif
}
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 15:40:10
|
Module: performous
Branch: portaudio
Commit: 50f43a7b2d262320ca55ae2654e4cc539ee2b0af
Author: Tapio Vierros <tap...@gm...>
Date: Wed Aug 11 19:02:48 2010 +0300
Allow configuring which webcam to use.
---
data/schema.xml | 7 +++++++
game/screen_sing.cc | 4 ++--
game/webcam.cc | 12 +++++++++---
3 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/data/schema.xml b/data/schema.xml
index 1eea68e..2352133 100644
--- a/data/schema.xml
+++ b/data/schema.xml
@@ -124,6 +124,13 @@ to save the current settings to XML.
<long>Performous can try to use webcam as a background video. You can disable it if it annoys you.</long>
</locale>
</entry>
+ <entry name="graphic/webcamid" type="int" value="-1">
+ <limits min="-1" max="9" step="1" />
+ <locale name="C">
+ <short>Webcam id</short>
+ <long>Use -1 to autodetect or a number starting from 0 to choose specific device.</long>
+ </locale>
+ </entry>
<entry name="graphic/3d_notes" type="bool" value="true">
<locale name="C">
<short>3D notes</short>
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index dd822f3..e4ea994 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -59,7 +59,7 @@ void ScreenSing::enter() {
}
// Initialize webcam
if (config["graphic/webcam"].b() && Webcam::enabled()) {
- m_cam.reset(new Webcam());
+ m_cam.reset(new Webcam(config["graphic/webcamid"].i()));
}
// Load video
if (!m_song->video.empty() && config["graphic/video"].b()) {
@@ -253,7 +253,7 @@ void ScreenSing::manageEvent(SDL_Event event) {
if (key == SDLK_w) dispInFlash(++config["game/pitch"]); // Toggle pitch wave
// Toggle webcam
if (key == SDLK_a && Webcam::enabled()) {
- if (!m_cam) m_cam.reset(new Webcam()); // Initialize if we haven't done that already
+ if (!m_cam) m_cam.reset(new Webcam(config["graphic/webcamid"].i())); // Initialize if we haven't done that already
if (m_cam) { dispInFlash(++config["graphic/webcam"]); m_cam->pause(!config["graphic/webcam"].b()); }
}
// Latency settings
diff --git a/game/webcam.cc b/game/webcam.cc
index e29ca66..aff3c8a 100644
--- a/game/webcam.cc
+++ b/game/webcam.cc
@@ -18,8 +18,14 @@ Webcam::Webcam(int cam_id):
// Initialize the capture device
m_capture = cvCaptureFromCAM(cam_id);
if (!m_capture) {
- std::cout << "Could not initialize webcam capturing!" << std::endl;
- return;
+ if (cam_id != -1) {
+ std::cout << "Webcam id " << cam_id << " failed, trying autodetecting...";
+ m_capture = cvCaptureFromCAM(-1);
+ }
+ if (!m_capture) {
+ std::cout << "Could not initialize webcam capturing!" << std::endl;
+ return;
+ }
}
// Initialize the video writer
#ifdef SAVE_WEBCAM_VIDEO
@@ -27,7 +33,7 @@ Webcam::Webcam(int cam_id):
int framew = cvGetCaptureProperty(m_capture, CV_CAP_PROP_FRAME_WIDTH);
int frameh = cvGetCaptureProperty(m_capture, CV_CAP_PROP_FRAME_HEIGHT);
int codec = CV_FOURCC('P','I','M','1'); // MPEG-1
- std::string out_file((getHomeDir() / std::string("/performous-webcam_out.mpg")).string());
+ std::string out_file((getHomeDir() / std::string("performous-webcam_out.mpg")).string());
m_writer = cvCreateVideoWriter(out_file.c_str(), codec, fps > 0 ? fps : 30.0f, cvSize(framew,frameh));
if (!m_writer) std::cout << "Could not initialize webcam video saving!" << std::endl;
#endif
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 15:40:10
|
Module: performous Branch: portaudio Commit: fcd25d5a9b71be47c5f99612ae794e2f51241b47 Author: Tapio Vierros <tap...@gm...> Date: Thu Aug 12 17:17:07 2010 +0300 Merge branch 'master' into portaudio Conflicts: game/audio.cc game/audio.hh game/main.cc game/screen_practice.cc --- |
|
From: Tapio V. <aa...@us...> - 2010-08-12 15:40:01
|
Module: performous
Branch: portaudio
Commit: b3f64eb7d0459bb8f4b1328c70f8934382096aec
Author: Tapio Vierros <tap...@gm...>
Date: Wed Aug 11 17:28:06 2010 +0300
Use cstdlib macros for program exit codes.
---
game/main.cc | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index 508b965..bbc9f4c 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -349,7 +349,7 @@ int main(int argc, char** argv) try {
} catch (std::exception& e) {
std::cout << cmdline << std::endl;
std::cout << "ERROR: " << e.what() << std::endl;
- return 1;
+ return EXIT_FAILURE;
}
po::notify(vm);
@@ -360,11 +360,11 @@ int main(int argc, char** argv) try {
if (vm.count("version")) {
// Already printed the version string in the beginning...
- return 0;
+ return EXIT_SUCCESS;
}
if (vm.count("help")) {
std::cout << cmdline << " any arguments without a switch are interpreted as song folders.\n" << std::endl;
- return 0;
+ return EXIT_SUCCESS;
}
// Initialize audio for pdevhelp, michelp and the rest of the program
da::initialize libda;
@@ -381,7 +381,7 @@ int main(int argc, char** argv) try {
std::cout << boost::format(" %1% %|10t|%2%\n") % it->name() % it->desc();
}
std::cout << std::flush;
- return 0;
+ return EXIT_SUCCESS;
}
if (vm.count("michelp")) {
da::record::devlist_t l = da::record::devices();
@@ -398,7 +398,7 @@ int main(int argc, char** argv) try {
std::cout << boost::format(" %1% %|10t|%2%\n") % it->name() % it->desc();
}
std::cout << std::flush;
- return 0;
+ return EXIT_SUCCESS;
}
#ifdef USE_PORTMIDI
// Dump a list of MIDI input devices
@@ -420,15 +420,15 @@ int main(int argc, char** argv) try {
std::cout << std::endl << "Joystick utility - Touch your joystick to see buttons here" << std::endl
<< "Hit ESC (window focused) to quit" << std::endl << std::endl;
jstestLoop();
- return 0;
+ return EXIT_SUCCESS;
}
// Run the game init and main loop
mainLoop(songlist);
- return 0; // Do not remove. SDL_Main (which this function is called on some platforms) needs return statement.
+ return EXIT_SUCCESS; // Do not remove. SDL_Main (which this function is called on some platforms) needs return statement.
} catch (std::exception& e) {
std::cerr << "FATAL ERROR: " << e.what() << std::endl;
- return 1;
+ return EXIT_FAILURE;
}
void outputOptionalFeatureStatus() {
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 15:39:58
|
Module: performous
Branch: portaudio
Commit: 1999fae70a8a51dd26e29578ff1fc708cecdb1fa
Author: Vincent Le Ligeour <yo...@us...>
Date: Wed Aug 11 11:39:06 2010 +0200
Tried to fix instrument forcing
---
game/joystick.hh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/joystick.hh b/game/joystick.hh
index 31e0f30..bf83133 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -50,7 +50,7 @@ namespace input {
class InputDevPrivate {
public:
- InputDevPrivate(const Instrument &_instrument) : m_assigned(false), m_instrument(_instrument) {
+ InputDevPrivate(const Instrument _instrument) : m_assigned(false), m_instrument(_instrument) {
for(unsigned int i = 0 ; i < BUTTONS ; i++) {
m_pressed[i] = false;
}
@@ -97,7 +97,7 @@ namespace input {
std::deque<Event> m_events;
bool m_assigned;
bool m_pressed[BUTTONS];
- const Instrument &m_instrument;
+ Instrument m_instrument;
};
typedef std::map<unsigned int,InputDevPrivate> InputDevs;
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 15:39:56
|
Module: performous Branch: portaudio Commit: bd194e7f84cb3b97e969b34937e10cd65dc8608b Author: Vincent Le Ligeour <yo...@us...> Date: Tue Aug 10 15:42:17 2010 +0200 Added default GH5/Band Hero controller matching --- data/controllers.xml | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/data/controllers.xml b/data/controllers.xml index ab48239..a3f271e 100644 --- a/data/controllers.xml +++ b/data/controllers.xml @@ -14,6 +14,19 @@ <button id="9" value="start" /> </mapping> </controller> + <controller type="guitar" name="GUITAR_GUITARHERO5"> + <description>Guitar Hero 5/Band Hero guitar</description> + <regexp match="Entertainment Guitar Hero5" /> + <mapping> + <button id="0" value="yellow" /> + <button id="1" value="green" /> + <button id="2" value="red" /> + <button id="3" value="blue" /> + <button id="4" value="orange" /> + <button id="8" value="select" /> + <button id="9" value="start" /> + </mapping> + </controller> <controller type="guitar" name="GUITAR_GUITARHERO_XPLORER"> <description>Guitar Hero X-plorer guitar</description> <regexp match="Guitar Hero X-plorer" /> @@ -82,6 +95,20 @@ <button id="9" value="start" /> </mapping> </controller> + <controller type="drumkit" name="DRUMS_GUITARHERO5"> + <description>Guitar Hero 5/Band Hero drum kit</description> + <regexp match="Drum Guitar Hero5" /> + <mapping> + <button id="0" value="blue" /> + <button id="1" value="green" /> + <button id="2" value="red" /> + <button id="3" value="yellow" /> + <button id="4" value="kick" /> + <button id="5" value="green" /> + <button id="8" value="select" /> + <button id="9" value="start" /> + </mapping> + </controller> <controller type="drumkit" name="DRUMS_ROCKBAND_WII"> <description>RockBand Wii drum kit</description> <regexp match="Harmonix Drum Controller for Nintendo Wii" /> |
|
From: Tapio V. <aa...@us...> - 2010-08-12 15:39:54
|
Module: performous
Branch: portaudio
Commit: 24f7f95e632d8bcb5d0ad2cad03ba1e860155780
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Aug 10 13:46:45 2010 +0200
Fixed instrument forcing
---
game/joystick.cc | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 35955d5..d52b85c 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -350,26 +350,28 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
void input::SDL::init() {
readControllers(g_instruments, getDefaultConfig(fs::path("/config/controllers.xml")));
readControllers(g_instruments, getConfigDir() / "controllers.xml");
- unsigned int sdl_id;
- std::string instrument_type;
std::map<unsigned int, input::Instrument> forced_type;
- std::string regexp_match_force("^[0-9]+:\\(");
+ std::string regexp_match_force("^([0-9]+):(\\(");
for(input::Instruments::iterator it = g_instruments.begin() ; it != g_instruments.end() ; ++it) {
if(it == g_instruments.begin())
regexp_match_force += it->first;
else
regexp_match_force += "|" + it->first;
}
- regexp_match_force += "\\)$";
+ regexp_match_force += "\\))$";
boost::regex match_force(regexp_match_force);
+ boost::match_results<const char*> what;
ConfigItem::StringList const& instruments = config["game/instruments"].sl();
for (ConfigItem::StringList::const_iterator it = instruments.begin(); it != instruments.end(); ++it) {
- if (!regex_search(it->c_str(), match_force)) {
+ if (!regex_search(it->c_str(), what, match_force)) {
std::cerr << "Error \"" << *it << "\" is not a valid instrument forced value" << std::endl;
continue;
} else {
+ unsigned int sdl_id = boost::lexical_cast<unsigned int>(what[1]);
+ std::string instrument_type(what[2]);
+
for(input::Instruments::const_iterator it2 = g_instruments.begin() ; it2 != g_instruments.end() ; ++it2) {
if(instrument_type == it2->first) {
forced_type.insert(std::pair<unsigned int,input::Instrument>(sdl_id, input::Instrument(it2->second)));
|
|
From: Tapio V. <aa...@us...> - 2010-08-12 15:39:51
|
Module: performous
Branch: portaudio
Commit: cef3cd7b668b04579c81ca0b681da81b79403b6f
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Aug 10 12:20:13 2010 +0200
Removed boost::spirit matching by boost::regex for instrument forcing
---
game/joystick.cc | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index ead308d..35955d5 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -216,7 +216,6 @@ void input::SDL::init_devices() {
}
}
-#include <boost/spirit/include/classic_core.hpp>
#include "fs.hh"
#include <libxml++/libxml++.h>
@@ -355,19 +354,19 @@ void input::SDL::init() {
std::string instrument_type;
std::map<unsigned int, input::Instrument> forced_type;
- using namespace boost::spirit::classic;
- rule<> type;
- for(input::Instruments::const_iterator it = g_instruments.begin() ; it != g_instruments.end() ; ++it) {
+ std::string regexp_match_force("^[0-9]+:\\(");
+ for(input::Instruments::iterator it = g_instruments.begin() ; it != g_instruments.end() ; ++it) {
if(it == g_instruments.begin())
- type = str_p(it->first.c_str());
+ regexp_match_force += it->first;
else
- type = type | it->first.c_str();
+ regexp_match_force += "|" + it->first;
}
- rule<> entry = uint_p[assign_a(sdl_id)] >> ":" >> (type)[assign_a(instrument_type)];
+ regexp_match_force += "\\)$";
+ boost::regex match_force(regexp_match_force);
ConfigItem::StringList const& instruments = config["game/instruments"].sl();
for (ConfigItem::StringList::const_iterator it = instruments.begin(); it != instruments.end(); ++it) {
- if (!parse(it->c_str(), entry).full) {
+ if (!regex_search(it->c_str(), match_force)) {
std::cerr << "Error \"" << *it << "\" is not a valid instrument forced value" << std::endl;
continue;
} else {
@@ -403,7 +402,6 @@ void input::SDL::init() {
bool found = false;
for(input::Instruments::const_iterator it = g_instruments.begin() ; it != g_instruments.end() ; ++it) {
boost::regex sdl_name(it->second.match);
- boost::cmatch match;
if (regex_search(name.c_str(), sdl_name)) {
std::cout << " Detected as: " << it->second.description << std::endl;
input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(i, input::detail::InputDevPrivate(it->second)));
|