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: Markus R. <god...@us...> - 2009-11-12 12:49:21
|
Module: performous
Branch: master
Commit: 767480bc6a747c540c715574588c7073a180c021
Author: Markus Raab <un...@ma...>
Date: Tue Nov 10 10:05:14 2009 +0100
first compiling version
do not expect performous to run
lots of renames highscore ->hiscore
simple design: a single database access ->may redesign later
players (and other parts of database) get their chance for loading
when database reloads
---
game/.gitignore | 9 ++++
game/database.cc | 47 +++++++++++++++++++++
game/database.hh | 32 ++++++++++++++
game/{highscore.cc => hiscore.cc} | 7 +++-
game/{highscore.hh => hiscore.hh} | 6 +++
game/main.cc | 11 +++--
game/players.cc | 51 +++--------------------
game/players.hh | 19 ++++-----
game/{screen_highscore.cc => screen_hiscore.cc} | 5 +-
game/{screen_highscore.hh => screen_hiscore.hh} | 2 +-
game/screen_players.cc | 3 +-
game/screen_players.hh | 2 +-
game/screen_songs.cc | 2 +-
13 files changed, 128 insertions(+), 68 deletions(-)
|
|
From: Yoda-JM <yo...@us...> - 2009-11-12 07:00:36
|
Module: performous Branch: master Commit: f3d8bc7ecfcfa381cd8a27b12eb9fe2b9c6c470c Author: Vincent Le Ligeour <yo...@us...> Date: Thu Nov 12 07:59:34 2009 +0100 Fixed missing include --- tools/cover_conv.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tools/cover_conv.cpp b/tools/cover_conv.cpp index d0bacf2..a0ede50 100644 --- a/tools/cover_conv.cpp +++ b/tools/cover_conv.cpp @@ -1,5 +1,6 @@ #include <boost/lexical_cast.hpp> #include <iostream> +#include <cstdlib> #ifdef __WIN32__ # include <windows.h> #endif |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 21:50:14
|
Module: performous
Branch: master
Commit: b42ad83003f8d0b7cdc0ad8d74be04b8aa3a30f1
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 11 23:49:57 2009 +0200
Testing OSX INSTALL_NAME_DIR to avoid startup script there as well.
---
libs/libda/src/CMakeLists.txt | 1 +
libs/plugin++/CMakeLists.txt | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libs/libda/src/CMakeLists.txt b/libs/libda/src/CMakeLists.txt
index e2bb1b5..60061a0 100644
--- a/libs/libda/src/CMakeLists.txt
+++ b/libs/libda/src/CMakeLists.txt
@@ -7,4 +7,5 @@ find_package(Boost 1.34 REQUIRED COMPONENTS thread filesystem)
include_directories(${Boost_INCLUDE_DIRS})
add_library(da SHARED audio.cpp)
target_link_libraries(da plugin++ ${Boost_LIBRARIES})
+set_target_properties(da PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib)
install(TARGETS da DESTINATION lib${LIB_SUFFIX})
diff --git a/libs/plugin++/CMakeLists.txt b/libs/plugin++/CMakeLists.txt
index 639e139..1378e5a 100644
--- a/libs/plugin++/CMakeLists.txt
+++ b/libs/plugin++/CMakeLists.txt
@@ -19,6 +19,7 @@ if(NOT WIN32)
target_link_libraries(plugin++ dl)
endif()
+set_target_properties(plugin++ PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib)
install(TARGETS plugin++ DESTINATION lib${LIB_SUFFIX})
FILE(GLOB HEADER_FILES "include/plugin++/*")
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 20:15:27
|
Module: performous
Branch: master
Commit: 6c6b7b1529d60ee362fde3141a709130a1298994
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 11 22:14:47 2009 +0200
Update libda to Boost 1.36 (avoiding compile warnings).
Add CMake policy for version 2.6 (to avoid CMake warnings).
---
CMakeLists.txt | 1 +
libs/libda/CMakeLists.txt | 1 +
libs/libda/plugins/CMakeLists.txt | 2 +-
libs/libda/plugins/audio_dev_tone.cpp | 5 ++---
libs/plugin++/CMakeLists.txt | 1 +
5 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ad4d399..e48ac49 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,6 @@
project(Performous CXX)
cmake_minimum_required(VERSION 2.6)
+cmake_policy(VERSION 2.6)
set(PROJECT_VERSION "0.4-pre5")
# Avoid source tree pollution
diff --git a/libs/libda/CMakeLists.txt b/libs/libda/CMakeLists.txt
index 3ecbe27..f10c47c 100644
--- a/libs/libda/CMakeLists.txt
+++ b/libs/libda/CMakeLists.txt
@@ -1,5 +1,6 @@
project(libda)
cmake_minimum_required(VERSION 2.6)
+cmake_policy(VERSION 2.6)
set(LIBDA_PLUGIN_DIR "lib${LIB_SUFFIX}/libda")
diff --git a/libs/libda/plugins/CMakeLists.txt b/libs/libda/plugins/CMakeLists.txt
index fb21655..1c32364 100644
--- a/libs/libda/plugins/CMakeLists.txt
+++ b/libs/libda/plugins/CMakeLists.txt
@@ -98,7 +98,7 @@ endif(LIBDA_PLUGIN_PULSE)
if(LIBDA_PLUGIN_TESTING)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREAD ON)
- find_package(Boost 1.34 REQUIRED COMPONENTS thread date_time)
+ find_package(Boost 1.36 REQUIRED COMPONENTS thread date_time)
if(Boost_FOUND)
set(PLUGIN_TESTING_DESC "enabled")
set(PLUGIN_TESTING true)
diff --git a/libs/libda/plugins/audio_dev_tone.cpp b/libs/libda/plugins/audio_dev_tone.cpp
index b126e8d..b715573 100644
--- a/libs/libda/plugins/audio_dev_tone.cpp
+++ b/libs/libda/plugins/audio_dev_tone.cpp
@@ -2,8 +2,7 @@
#include <boost/scoped_ptr.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
-// Needs at least Boost 1.36 and many systems don't have that: #include <boost/spirit/include/classic_core.hpp>
-#include <boost/spirit/core.hpp>
+#include <boost/spirit/include/classic_core.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/xtime.hpp>
#include <algorithm>
@@ -60,7 +59,7 @@ namespace {
boost::xtime time;
void add(std::string const& tonestr) {
double freq = 440.0, amplitude = 0.1, phase = 0.0;
- using namespace boost::spirit; //::classic;
+ using namespace boost::spirit::classic;
using namespace boost::lambda;
placeholder1_type arg1;
if (!parse(tonestr.c_str(),
diff --git a/libs/plugin++/CMakeLists.txt b/libs/plugin++/CMakeLists.txt
index 76494e7..639e139 100644
--- a/libs/plugin++/CMakeLists.txt
+++ b/libs/plugin++/CMakeLists.txt
@@ -1,5 +1,6 @@
project(Plugin++)
cmake_minimum_required(VERSION 2.4)
+cmake_policy(VERSION 2.6)
include_directories(include)
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 20:15:23
|
Module: performous
Branch: master
Commit: 4eacbaf655b911e71ca949f4ed5b908e9d81ce1d
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 11 22:13:57 2009 +0200
Fix man page generation
---
docs/CMakeLists.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 24da6af..0a4269d 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -7,7 +7,7 @@ if(UNIX)
if(HELP2MAN AND GZIP)
set(MANFILE ${CMAKE_CURRENT_BINARY_DIR}/performous.6.gz)
set(H2MFILE ${CMAKE_CURRENT_SOURCE_DIR}/performous.h2m)
- set(PERFORMOUS_EXEC ${CMAKE_BINARY_DIR}/game/performous.bin)
+ set(PERFORMOUS_EXEC ${CMAKE_BINARY_DIR}/game/performous)
add_custom_command(
OUTPUT ${MANFILE}
COMMAND ${HELP2MAN} ${PERFORMOUS_EXEC} -s 6 -i ${H2MFILE} -N | ${GZIP} > ${MANFILE}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 19:55:50
|
Module: performous
Branch: master
Commit: c3d60a4497c2cef29e2a969a31dc3ed8e096ef0b
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 11 21:56:03 2009 +0200
Remove launcher script, install binary as bin/performous
---
CMakeLists.txt | 9 ---------
game/CMakeLists.txt | 9 +++++----
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index efeac79..ad4d399 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,12 +49,3 @@ if (ENABLE_TOOLS)
add_subdirectory(tools)
endif (ENABLE_TOOLS)
-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_PLUGIN_PATH "${FULL_PREFIX}/lib${LIB_SUFFIX}/libda")
-set(PERFORMOUS_EXECUTABLE "${FULL_PREFIX}/bin/performous.bin")
-configure_file("${PROJECT_SOURCE_DIR}/cmake/performous.sh.cmake" "${PROJECT_BINARY_DIR}/performous" ESCAPE_QUOTES @ONLY)
-install(PROGRAMS "${PROJECT_BINARY_DIR}/performous" DESTINATION bin)
-install(SCRIPT "${PROJECT_SOURCE_DIR}/cmake/performous-launcher.cmake")
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index d105f0d..83168b6 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -35,10 +35,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions("-D__STDC_CONSTANT_MACROS")
endif(CMAKE_COMPILER_IS_GNUCXX)
-add_executable(performous.bin ${SOURCES} ${SDL_SOURCES})
-target_link_libraries(performous.bin da ${LIBS})
+add_executable(performous ${SOURCES} ${SDL_SOURCES})
+target_link_libraries(performous da ${LIBS})
-set_target_properties(performous.bin PROPERTIES
+# Store library paths in executable
+set_target_properties(performous PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
SKIP_BUILD_RPATH FALSE
INSTALL_RPATH \$ORIGIN/../lib
@@ -49,5 +50,5 @@ set_target_properties(performous.bin PROPERTIES
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.cmake.hh" "${CMAKE_CURRENT_BINARY_DIR}/config.hh" @ONLY)
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
-install(TARGETS performous.bin DESTINATION bin)
+install(TARGETS performous DESTINATION bin)
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 19:32:49
|
Module: performous
Branch: master
Commit: b998b79c9901faf4a7a108384495e86dc13e1999
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 11 21:32:52 2009 +0200
CMakeLists.txt fixes, updated Boost version requirement
---
game/CMakeLists.txt | 2 +-
libs/plugin++/CMakeLists.txt | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index 3b191fa..d105f0d 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -7,7 +7,7 @@ set(SOURCES ${SOURCE_FILES} ${HEADER_FILES})
# Libraries
-find_package(Boost 1.34 REQUIRED COMPONENTS thread date_time program_options regex filesystem)
+find_package(Boost 1.36 REQUIRED COMPONENTS thread date_time program_options regex filesystem)
include_directories(${Boost_INCLUDE_DIRS})
set(LIBS ${LIBS} ${Boost_LIBRARIES})
diff --git a/libs/plugin++/CMakeLists.txt b/libs/plugin++/CMakeLists.txt
index 79fc033..76494e7 100644
--- a/libs/plugin++/CMakeLists.txt
+++ b/libs/plugin++/CMakeLists.txt
@@ -10,6 +10,10 @@ endif(CMAKE_COMPILER_IS_GNUCXX)
add_library(plugin++ SHARED src/dll.cc src/execname.cc src/loader.cc)
+find_package(Boost 1.36 REQUIRED COMPONENTS filesystem)
+include_directories(${Boost_INCLUDE_DIRS})
+target_link_libraries(plugin++ ${Boost_LIBRARIES})
+
if(NOT WIN32)
target_link_libraries(plugin++ dl)
endif()
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 19:23:26
|
Module: performous
Branch: master
Commit: 33cbfd782fa162eca8bbb723484524417d747fb7
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 11 21:23:20 2009 +0200
Plugin++ loader using execname to find libs
---
libs/plugin++/CMakeLists.txt | 2 +-
libs/plugin++/include/plugin++/loader.hpp | 40 +----------------
libs/plugin++/src/loader.cc | 66 +++++++++++++++++++++++++++++
3 files changed, 70 insertions(+), 38 deletions(-)
diff --git a/libs/plugin++/CMakeLists.txt b/libs/plugin++/CMakeLists.txt
index 5ade017..79fc033 100644
--- a/libs/plugin++/CMakeLists.txt
+++ b/libs/plugin++/CMakeLists.txt
@@ -8,7 +8,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -Wall -Wextra")
endif(CMAKE_COMPILER_IS_GNUCXX)
-add_library(plugin++ SHARED src/dll.cc src/execname.cc)
+add_library(plugin++ SHARED src/dll.cc src/execname.cc src/loader.cc)
if(NOT WIN32)
target_link_libraries(plugin++ dl)
diff --git a/libs/plugin++/include/plugin++/loader.hpp b/libs/plugin++/include/plugin++/loader.hpp
index 89519e6..5c551a9 100644
--- a/libs/plugin++/include/plugin++/loader.hpp
+++ b/libs/plugin++/include/plugin++/loader.hpp
@@ -1,15 +1,10 @@
#ifndef LOADER_HPP_INCLUDED
#define LOADER_HPP_INCLUDED
-#pragma warning(disable: 4996) // Disable stupid Microsoft warnings about stdlib functions
-
#include "dll.hpp"
-#include <iostream>
#include <set>
-#include <sstream>
#include <boost/filesystem.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
-#include <stdexcept>
namespace plugin {
namespace fs = boost::filesystem;
@@ -17,39 +12,10 @@ namespace plugin {
/** @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;
- } catch (...) {
- std::cerr << "WTF?" << std::endl;
- }
- }
- }
+ void parse(std::set<fs::path>& paths, char const* var, fs::path const& folder = fs::path());
+ void load(fs::path const& path);
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;
- }
+ loader(fs::path const& folder);
};
}
diff --git a/libs/plugin++/src/loader.cc b/libs/plugin++/src/loader.cc
new file mode 100644
index 0000000..199698c
--- /dev/null
+++ b/libs/plugin++/src/loader.cc
@@ -0,0 +1,66 @@
+#include <plugin++/loader.hpp>
+#include <plugin++/execname.hpp>
+#include <iostream>
+#include <sstream>
+#include <stdexcept>
+
+#ifdef _MSC_VER
+#pragma warning(disable: 4996) // Disable stupid Microsoft warnings about stdlib functions
+#endif
+
+using namespace plugin;
+namespace fs = boost::filesystem;
+
+#ifdef _WIN32
+#define PATHSEP ';'
+#else
+#define PATHSEP ':'
+#endif
+
+/// Break var (a delimited path string) into paths (appends folder if supplied).
+void loader::parse(std::set<fs::path>& paths, char const* var, fs::path const& folder) {
+ if (!var) return;
+ std::istringstream iss(var);
+ std::string elem;
+ while (std::getline(iss, elem, PATHSEP)) {
+ 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 loader::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;
+ }
+ }
+}
+
+loader::loader(fs::path const& folder) {
+ std::set<fs::path> paths;
+ // Try PLUGIN_PATH environment setting
+ parse(paths, std::getenv("PLUGIN_PATH"));
+ // Try other options only if folder was given
+ if (!folder.empty()) {
+ // Try relative path from executable
+ fs::path p = execname();
+ p = p.parent_path().parent_path();
+ if (!p.empty()) {
+ p /= "lib" / folder;
+ if (fs::is_directory(p)) paths.insert(p);
+ }
+#ifndef _WIN32
+ // Try UNIX library paths
+ parse(paths, std::getenv("LD_LIBRARY_PATH"), folder);
+ parse(paths, "/usr/lib:/usr/local/lib", folder);
+#endif
+ }
+ // Load the contents of each 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 to the folder with the plugins." << std::endl;
+}
+
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 19:23:18
|
Module: performous Branch: master Commit: 855f8aa11a13ebbd0a07f8cd3973048d232b0ff3 Author: Lasse Karkkainen <tro...@tr...> Date: Wed Nov 11 21:23:29 2009 +0200 Merge branch 'master' of ssh://tronic@git.performous.org/gitroot/performous/performous --- |
|
From: Tapio V. <aa...@us...> - 2009-11-11 17:58:16
|
Module: performous
Branch: master
Commit: 0f84502c418bdd4eb5dbad3acc7e0edb87970995
Author: Tapio Vierros <tap...@gm...>
Date: Wed Nov 11 19:57:23 2009 +0200
Added possibility to texture 3d objects.
---
game/3dobject.cc | 1 -
game/3dobject.hh | 16 ++++++++++------
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/game/3dobject.cc b/game/3dobject.cc
index f4e5a2e..60e9e52 100644
--- a/game/3dobject.cc
+++ b/game/3dobject.cc
@@ -90,7 +90,6 @@ void Object3d::generateDisplayList() {
if (m_displist != 0) glDeleteLists(m_displist, 1);
m_displist = glGenLists(1);
glutil::DisplayList displist(m_displist, GL_COMPILE);
- //UseTexture tex(*m_texture);
std::vector<Face>::const_iterator it;
// Iterate through faces
for (it = m_faces.begin(); it != m_faces.end(); it++) {
diff --git a/game/3dobject.hh b/game/3dobject.hh
index 38ea1fc..585084b 100644
--- a/game/3dobject.hh
+++ b/game/3dobject.hh
@@ -6,6 +6,7 @@
#include <stdexcept>
#include <string>
+#include <boost/scoped_ptr.hpp>
#include <boost/noncopyable.hpp>
#include "surface.hh"
#include "glutil.hh"
@@ -40,7 +41,7 @@ class Object3d: boost::noncopyable {
std::vector<Vertex> m_normals;
std::vector<Face> m_faces;
GLuint m_displist;
- //boost::scoped_ptr<Texture> m_texture;
+ boost::scoped_ptr<Texture> m_texture;
/// load a Wavefront .obj 3d object file
void loadWavefrontObj(std::string filepath, float scale = 1.0);
/// generates a display list for the object
@@ -48,23 +49,26 @@ class Object3d: boost::noncopyable {
public:
/// constructors
Object3d(): m_displist(0) {};
- Object3d(std::string filepath, float scale = 1.0): m_displist(0) {
- load(filepath, scale);
+ Object3d(std::string filepath, std::string texturepath = "", float scale = 1.0): m_displist(0) {
+ load(filepath, texturepath, scale);
}
/// destructor
~Object3d() {
if (m_displist != 0) glDeleteLists(m_displist, 1);
}
/// load a new object file
- void load(std::string filepath, float scale = 1.0) {
- //m_texture.reset(new Texture(getThemePath("button.svg")));
+ void load(std::string filepath, std::string texturepath = "", float scale = 1.0) {
+ if (!texturepath.empty()) m_texture.reset(new Texture(texturepath));
loadWavefrontObj(filepath, scale);
generateDisplayList();
}
/// draws the object
void draw(float x = 0, float y = 0, float z = 0) const {
glTranslatef(x, y, z);
- glCallList(m_displist);
+ if (m_texture) {
+ UseTexture tex(*m_texture);
+ glCallList(m_displist);
+ } else glCallList(m_displist);
glTranslatef(-x, -y, -z);
}
};
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 17:15:48
|
Module: performous
Branch: master
Commit: a7ba20a91ad31c982af182bce2f4105893657db8
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 11 19:12:24 2009 +0200
Rewrite most of the data path code.
Rename getXdgPath to getPath to avoid clutter and confusion.
Make the config file path setting empty by default.
---
data/schema.xml | 4 ---
game/fs.cc | 70 +++++++++++++++++++++++++++++------------------
game/fs.hh | 2 +-
game/guitargraph.cc | 24 ++++++++--------
game/screen_practice.cc | 12 ++++----
5 files changed, 62 insertions(+), 50 deletions(-)
diff --git a/data/schema.xml b/data/schema.xml
index 93a9dde..4275468 100644
--- a/data/schema.xml
+++ b/data/schema.xml
@@ -237,10 +237,6 @@ to save the current settings to XML.
</locale>
</entry>
<entry name="system/path" type="string_list">
- <stringvalue>/usr/local/share/games/performous/</stringvalue>
- <stringvalue>/usr/share/games/performous/</stringvalue>
- <stringvalue>../</stringvalue><!-- For Windows where the program is started in bin/ -->
- <stringvalue>~/.performous/</stringvalue>
<locale name="C">
<short>System folders</short>
<long>Where to look for performous data.</long>
diff --git a/game/fs.cc b/game/fs.cc
index ee54c24..e1ace89 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -4,6 +4,8 @@
#include <plugin++/execname.hpp>
#include <cstdlib>
#include <iostream>
+#include <list>
+#include <sstream>
fs::path getHomeDir() {
static fs::path dir;
@@ -33,52 +35,66 @@ std::string getThemePath(std::string const& filename) {
if (theme.empty()) throw std::runtime_error("Configuration value game/theme is empty");
// Figure out theme folder (if theme name rather than path was given)
if (theme.find('/') == std::string::npos) {
- return getXdgPath(fs::path("themes") / theme / filename);
+ return getPath(fs::path("themes") / theme / filename);
} else {
if (*theme.rbegin() == '/') theme.erase(theme.size() - 1); // Remove trailing slash
return theme + "/" + filename;
}
}
-std::string getXdgPath(fs::path const& filename) {
- static std::vector<fs::path> dir;
+namespace {
+ bool pathNotExist(fs::path const& p) {
+ if (exists(p)) {
+ std::cout << ">>> Using data path \"" << p.string() << "\"" << std::endl;
+ return false;
+ }
+ std::cout << ">>> Not using \"" << p.string() << "\" (does not exist)" << std::endl;
+ return true;
+ }
+}
+
+std::string getPath(fs::path const& filename) {
+ typedef std::list<fs::path> Dirs;
+ static Dirs dirs;
static bool initialized = false;
if (!initialized) {
initialized = true;
- // Adding PERFORMOUS_DATA_DIR (compatibility)
- char const* env_data_dir = getenv("PERFORMOUS_DATA_DIR");
- if (env_data_dir) {
- dir.push_back(env_data_dir);
+ fs::path shortDir = "performous";
+ fs::path shareDir = "share/games" / shortDir;
+#ifdef _WIN32
+ // Add APPLIC~1 (user-specific application data) FIXME: Not tested
+ {
+ char const* appdata = getenv("APPDATA");
+ if (appdata) dirs.push_back(appdata / shortDir);
}
+#else
// Adding XDG_DATA_HOME
- char const* xdg_data_home = getenv("XDG_DATA_HOME");
- if (xdg_data_home) {
- dir.push_back(fs::path(xdg_data_home) / "performous");
- } else {
- dir.push_back(getHomeDir() / ".local" / "share" / "performous" );
+ {
+ char const* xdg_data_home = getenv("XDG_DATA_HOME");
+ // FIXME: Should this use "games" or not?
+ dirs.push_back(xdg_data_home ? xdg_data_home / shortDir : getHomeDir() / ".local" / shareDir);
}
+#endif
// Adding relative path from executable
- dir.push_back(fs::path(plugin::execname()).parent_path() / ".." / "share" / "performous");
+ dirs.push_back(fs::path(plugin::execname()).parent_path().parent_path() / shareDir);
+#ifndef _WIN32
// Adding XDG_DATA_DIRS
- char const* xdg_data_dirs = getenv("XDG_DATA_DIRS");
- if (xdg_data_dirs) {
- // here explode ":"
- } else {
- dir.push_back( "/usr/local/share/performous/" );
- dir.push_back( "/usr/share/performous/" );
+ {
+ char const* xdg_data_dirs = getenv("XDG_DATA_DIRS");
+ std::istringstream iss(xdg_data_dirs ? xdg_data_dirs : "/usr/local/share/:/usr/share/");
+ for (std::string p; std::getline(iss, p, ':'); dirs.push_back(p / shortDir)) {}
}
- // Adding some defaults
+#endif
+ // Adding paths from config file
std::vector<std::string> pathes = config["system/path"].sl();
- std::transform(pathes.begin(), pathes.end(), std::inserter(dir, dir.end()), pathMangle);
- // Some output
- for (std::vector<fs::path>::const_iterator it = dir.begin(); it != dir.end(); ++it) {
- std::cout << ">>> Adding XDG search path \"" << it->string() << "\"" << std::endl;
- }
+ std::transform(pathes.begin(), pathes.end(), std::inserter(dirs, dirs.end()), pathMangle);
+ // Check if they actually exist and print debug
+ dirs.remove_if(pathNotExist);
}
- for (std::vector<fs::path>::const_iterator it = dir.begin(); it != dir.end(); ++it) {
+ for (Dirs::const_iterator it = dirs.begin(); it != dirs.end(); ++it) {
fs::path p = *it;
p /= filename;
if( fs::exists(p) ) return p.string();
}
- throw std::runtime_error("Cannot find file \"" + filename.string() + "\" inside XDG data pathes");
+ throw std::runtime_error("Cannot find file \"" + filename.string() + "\" in any of Performous data folders");
}
diff --git a/game/fs.hh b/game/fs.hh
index 4566149..fd63e86 100644
--- a/game/fs.hh
+++ b/game/fs.hh
@@ -15,4 +15,4 @@ fs::path pathMangle(fs::path const& dir);
std::string getThemePath(std::string const& filename);
/** Get full path to a share file **/
-std::string getXdgPath(fs::path const& filename);
+std::string getPath(fs::path const& filename);
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 9d6c996..fde67e5 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -76,18 +76,18 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, std::string track):
}
unsigned int sr = m_audio.getSR();
if (g_samplesD.empty()) {
- g_samplesD.push_back(Sample(getXdgPath("sounds/drum_bass.ogg"), sr));
- g_samplesD.push_back(Sample(getXdgPath("sounds/drum_snare.ogg"), sr));
- g_samplesD.push_back(Sample(getXdgPath("sounds/drum_hi-hat.ogg"), sr));
- g_samplesD.push_back(Sample(getXdgPath("sounds/drum_tom1.ogg"), sr));
- g_samplesD.push_back(Sample(getXdgPath("sounds/drum_cymbal.ogg"), sr));
- //g_samplesD.push_back(Sample(getXdgPath("sounds/drum_tom2.ogg"), sr));
- g_samplesG.push_back(Sample(getXdgPath("sounds/guitar_fail1.ogg"), sr));
- g_samplesG.push_back(Sample(getXdgPath("sounds/guitar_fail2.ogg"), sr));
- g_samplesG.push_back(Sample(getXdgPath("sounds/guitar_fail3.ogg"), sr));
- g_samplesG.push_back(Sample(getXdgPath("sounds/guitar_fail4.ogg"), sr));
- g_samplesG.push_back(Sample(getXdgPath("sounds/guitar_fail5.ogg"), sr));
- g_samplesG.push_back(Sample(getXdgPath("sounds/guitar_fail6.ogg"), sr));
+ g_samplesD.push_back(Sample(getPath("sounds/drum_bass.ogg"), sr));
+ g_samplesD.push_back(Sample(getPath("sounds/drum_snare.ogg"), sr));
+ g_samplesD.push_back(Sample(getPath("sounds/drum_hi-hat.ogg"), sr));
+ g_samplesD.push_back(Sample(getPath("sounds/drum_tom1.ogg"), sr));
+ g_samplesD.push_back(Sample(getPath("sounds/drum_cymbal.ogg"), sr));
+ //g_samplesD.push_back(Sample(getPath("sounds/drum_tom2.ogg"), sr));
+ g_samplesG.push_back(Sample(getPath("sounds/guitar_fail1.ogg"), sr));
+ g_samplesG.push_back(Sample(getPath("sounds/guitar_fail2.ogg"), sr));
+ g_samplesG.push_back(Sample(getPath("sounds/guitar_fail3.ogg"), sr));
+ g_samplesG.push_back(Sample(getPath("sounds/guitar_fail4.ogg"), sr));
+ g_samplesG.push_back(Sample(getPath("sounds/guitar_fail5.ogg"), sr));
+ g_samplesG.push_back(Sample(getPath("sounds/guitar_fail6.ogg"), sr));
}
unsigned int i = 0;
for (TrackMap::const_iterator it = m_song.track_map.begin(); it != m_song.track_map.end(); ++it,++i) {
diff --git a/game/screen_practice.cc b/game/screen_practice.cc
index 505db7b..1dcb9fa 100644
--- a/game/screen_practice.cc
+++ b/game/screen_practice.cc
@@ -21,12 +21,12 @@ void ScreenPractice::enter() {
drums.reset(new input::InputDev(input::DRUMS));
} catch (std::runtime_error&) {drums.reset();}
unsigned int sr = m_audio.getSR();
- m_samples.push_back(Sample(getXdgPath("sounds/drum_bass.ogg"), sr));
- m_samples.push_back(Sample(getXdgPath("sounds/drum_snare.ogg"), sr));
- m_samples.push_back(Sample(getXdgPath("sounds/drum_hi-hat.ogg"), sr));
- m_samples.push_back(Sample(getXdgPath("sounds/drum_tom1.ogg"), sr));
- m_samples.push_back(Sample(getXdgPath("sounds/drum_cymbal.ogg"), sr));
- //m_samples.push_back(Sample(getXdgPath("sounds/drum_tom2.ogg"), sr));
+ m_samples.push_back(Sample(getPath("sounds/drum_bass.ogg"), sr));
+ m_samples.push_back(Sample(getPath("sounds/drum_snare.ogg"), sr));
+ m_samples.push_back(Sample(getPath("sounds/drum_hi-hat.ogg"), sr));
+ m_samples.push_back(Sample(getPath("sounds/drum_tom1.ogg"), sr));
+ m_samples.push_back(Sample(getPath("sounds/drum_cymbal.ogg"), sr));
+ //m_samples.push_back(Sample(getPath("sounds/drum_tom2.ogg"), sr));
}
void ScreenPractice::exit() {
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 17:15:45
|
Module: performous Branch: master Commit: dd49431362c70c19feb5bd58f35c35d17e7fb068 Author: Lasse Karkkainen <tro...@tr...> Date: Wed Nov 11 19:15:39 2009 +0200 Merge branch 'master' of ssh://tronic@git.performous.org/gitroot/performous/performous --- |
|
From: Yoda-JM <yo...@us...> - 2009-11-11 15:49:15
|
Module: performous
Branch: master
Commit: 3496c8effa9a95c6e65b6e17c4c4892d0cb36194
Author: Vincent Le Ligeour <yo...@us...>
Date: Wed Nov 11 16:48:48 2009 +0100
Fixed Rockband Beattles drumkit detection
---
data/schema.xml | 2 +-
game/joystick.cc | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/data/schema.xml b/data/schema.xml
index 93a9dde..66a2606 100644
--- a/data/schema.xml
+++ b/data/schema.xml
@@ -81,7 +81,7 @@ to save the current settings to XML.
<entry name="game/instruments" type="string_list">
<!-- Should be SDL_ID:{GUITAR_GUITARHERO|GUITAR_ROCKBAND|DRUMS_GUITARHERO|DRUMS_ROCKBAND}
example:
- <stringvalue>0:GUITAR_GH</stringvalue>
+ <stringvalue>0:GUITAR_GUITARHERO</stringvalue>
-->
<locale name="C">
<short>Joystick configuration</short>
diff --git a/game/joystick.cc b/game/joystick.cc
index b54d2a6..3b0e42e 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -118,7 +118,8 @@ void input::SDL::init() {
continue;
}
input::SDL::sdl_devices[i] = joy;
- std::cout << " Axes: " << SDL_JoystickNumAxes(joy);
+ std::cout << " Id: " << i;
+ std::cout << ", Axes: " << SDL_JoystickNumAxes(joy);
std::cout << ", Balls: " << SDL_JoystickNumBalls(joy);
std::cout << ", Buttons: " << SDL_JoystickNumButtons(joy);
std::cout << ", Hats: " << SDL_JoystickNumHats(joy) << std::endl;
@@ -154,6 +155,9 @@ void input::SDL::init() {
} else if( name.find("Harmonix Drum Kit") != std::string::npos ) {
std::cout << " Detected as: RockBand Drums" << std::endl;
input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::DRUMS_RB);
+ } else if( name.find("Harmonix Drum kit") != std::string::npos ) {
+ std::cout << " Detected as: RockBand Drums" << std::endl;
+ input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::DRUMS_RB);
} else {
std::cout << " Detected as: Unknwown (please report the name, assuming Guitar Hero Drums)" << std::endl;
input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::DRUMS_GH);
|
|
From: Tapio V. <aa...@us...> - 2009-11-11 15:43:53
|
Module: performous
Branch: master
Commit: 0d1eeed84d2bd95d272f0d14a297bf9eeb9caa8b
Author: Tapio Vierros <tap...@gm...>
Date: Wed Nov 11 17:42:21 2009 +0200
Tweaks to lyrics rank display.
---
game/layout_singer.cc | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/game/layout_singer.cc b/game/layout_singer.cc
index d648f89..8530a46 100644
--- a/game/layout_singer.cc
+++ b/game/layout_singer.cc
@@ -62,21 +62,19 @@ void LayoutSinger::drawScore(Position position) {
if (p->m_prevLineScore > 0.5 && fact > 0) {
std::string prevLineRank;
float fzoom = 3.0 / (2.0 + fact);
- float rank = 0.0f;
- if (p->m_prevLineScore > 0.95) { prevLineRank = "Perfect"; rank = 1.0f; }
- else if (p->m_prevLineScore > 0.9) { prevLineRank = "Excellent"; rank = 0.8f; }
- else if (p->m_prevLineScore > 0.8) { prevLineRank = "Great"; rank = 0.6f; }
- else if (p->m_prevLineScore > 0.6) { prevLineRank = "Good"; rank = 0.3f; }
- else if (p->m_prevLineScore > 0.4) { prevLineRank = "OK"; rank = 0.0f; }
- float base = 0.2f * (1.0f - rank);
- glColor4f(base + r * rank, base + g * rank, base + b * rank, fact);
+ if (p->m_prevLineScore > 0.95) prevLineRank = "Perfect";
+ else if (p->m_prevLineScore > 0.9) prevLineRank = "Excellent";
+ else if (p->m_prevLineScore > 0.8) prevLineRank = "Great";
+ else if (p->m_prevLineScore > 0.6) prevLineRank = "Good";
+ else if (p->m_prevLineScore > 0.4) prevLineRank = "OK";
+ glColor4f(r, g, b, clamp(fact*2.0f));
m_line_rank_text[i%4]->render(prevLineRank);
switch(position) {
case LayoutSinger::BOTTOM:
m_line_rank_text[i%4]->dimensions().middle(-0.350 + 0.01 + 0.25 * i).fixedHeight(0.055*fzoom).screenTop(0.11);
break;
case LayoutSinger::MIDDLE:
- m_line_rank_text[i%4]->dimensions().right(0.45).fixedHeight(0.04*fzoom).screenTop(0.060 + 0.050 * i);
+ m_line_rank_text[i%4]->dimensions().right(0.30).fixedHeight(0.05*fzoom).screenTop(0.025 + 0.050 * i);
break;
}
m_line_rank_text[i%4]->draw();
|
|
From: Tapio V. <aa...@us...> - 2009-11-11 15:21:01
|
Module: performous
Branch: master
Commit: 537eba3875c25ebc284b2cf66e8e2f0ea195db09
Author: Tapio Vierros <tap...@gm...>
Date: Wed Nov 11 17:18:39 2009 +0200
Modified instrument's track/difficulty selection layout a bit, so that the texts are visible with three instruments on screen.
---
game/guitargraph.cc | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 9d6c996..ea708b7 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -367,10 +367,10 @@ void GuitarGraph::draw(double time) {
double frac = 0.75; // Adjustable: 1.0 means fully separated, 0.0 means fully attached
// Draw scores
if (time < -0.5) {
- std::string txt;
- txt += m_track_index->first + "\n" + diffv[m_level].name;
- m_text.dimensions.screenBottom(-0.05).middle(-0.1 + offsetX);
- m_text.draw(txt);
+ m_text.dimensions.screenBottom(-0.041).middle(-0.09 + offsetX);
+ m_text.draw(diffv[m_level].name);
+ m_text.dimensions.screenBottom(-0.015).middle(-0.09 + offsetX);
+ m_text.draw(m_track_index->first);
} else {
m_text.dimensions.screenBottom(-0.30).middle(0.32 * dimensions.w() + offsetX);
m_text.draw(boost::lexical_cast<std::string>(unsigned(getScore())));
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 15:01:32
|
Module: performous
Branch: master
Commit: 9e2f4eb48dbaa475a959e02ce0e20a0326ee38b4
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 11 17:01:41 2009 +0200
Load data from path relative to executable
---
game/fs.cc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/game/fs.cc b/game/fs.cc
index 30e9b21..ee54c24 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -1,6 +1,7 @@
#include "fs.hh"
#include "configuration.hh"
+#include <plugin++/execname.hpp>
#include <cstdlib>
#include <iostream>
@@ -56,6 +57,8 @@ std::string getXdgPath(fs::path const& filename) {
} else {
dir.push_back(getHomeDir() / ".local" / "share" / "performous" );
}
+ // Adding relative path from executable
+ dir.push_back(fs::path(plugin::execname()).parent_path() / ".." / "share" / "performous");
// Adding XDG_DATA_DIRS
char const* xdg_data_dirs = getenv("XDG_DATA_DIRS");
if (xdg_data_dirs) {
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 14:47:03
|
Module: performous Branch: master Commit: 28bc75a875cd352a6c38c3247dea18646961ded7 Author: Lasse Karkkainen <tro...@tr...> Date: Wed Nov 11 16:47:05 2009 +0200 Merge branch 'master' of ssh://tronic@git.performous.org/gitroot/performous/performous --- |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 14:46:57
|
Module: performous
Branch: master
Commit: 140e287a502a012dcabd1c396818dd82b0c51dfd
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 11 16:46:14 2009 +0200
Fix missing include
---
game/unicode.cc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/game/unicode.cc b/game/unicode.cc
index 8c2c73c..fa31716 100644
--- a/game/unicode.cc
+++ b/game/unicode.cc
@@ -2,6 +2,7 @@
#include <glibmm/ustring.h>
#include <glibmm/convert.h>
+#include <sstream>
void convertToUTF8( std::stringstream &_stream, std::string _filename ) {
try {
|
|
From: Yoda-JM <yo...@us...> - 2009-11-11 14:03:02
|
Module: performous
Branch: master
Commit: b649ab6a24e40649cdc3170c62e2cb68ea23c418
Author: Vincent Le Ligeour <yo...@us...>
Date: Wed Nov 11 15:02:47 2009 +0100
Fixed some midi parsing
---
game/midifile.cc | 2 ++
game/songparser-ini.cc | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/game/midifile.cc b/game/midifile.cc
index 7f5c74b..a762f47 100644
--- a/game/midifile.cc
+++ b/game/midifile.cc
@@ -275,6 +275,8 @@ void MidiFileParser::process_midi_event(Track& track, uint8_t t, uint8_t arg1, u
}
// special management for lyrics
if (track.name == "PART VOCALS") {
+ // Discard note effects
+ if( arg1 < 20 ) return;
if (t == 8 || (t == 9 && arg2 == 0)) {
// end of note (note off or note on with zero velocity)
if( !m_lyric.empty() ) {
diff --git a/game/songparser-ini.cc b/game/songparser-ini.cc
index a55d489..5184e83 100644
--- a/game/songparser-ini.cc
+++ b/game/songparser-ini.cc
@@ -156,6 +156,7 @@ void SongParser::iniParse() {
{
char ch = *syl.rbegin();
if (ch == '-') syl.erase(syl.size() - 1);
+ else if (ch == '=') { *syl.rbegin() = '-'; }
else if (ch != '~') syl += ' ';
}
}
|
|
From: Tapio V. <aa...@us...> - 2009-11-11 13:54:50
|
Module: performous
Branch: dance
Commit: 031f125c6c881dbccf9f8b01acf5b2b4005f094d
Author: Tapio Vierros <tap...@gm...>
Date: Wed Nov 11 15:52:52 2009 +0200
Some initial screen_sing/dancegraph integration.
---
game/screen_sing.cc | 12 +++++++++++-
game/screen_sing.hh | 3 +++
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index f4c85f8..7655716 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -83,6 +83,14 @@ void ScreenSing::enter() {
} catch (std::runtime_error&) { break; }
}
}
+ // Load dance tracks
+ if ( !m_song->danceTracks.empty() ) {
+ while(1) {
+ try {
+ m_dancers.push_back(new DanceGraph(m_audio, *m_song));
+ } catch (std::runtime_error&) { break; }
+ }
+ }
m_audio.playMusic(m_song->music, false, 0.0, m_instruments.empty() ? -1.0 : -8.0); // Startup delay for instruments is longer than for singing only
}
@@ -242,7 +250,9 @@ void ScreenSing::draw() {
theme->bg_top.draw();
}
- if( m_instruments.empty() ) {
+ if( !m_dancers.empty() ) {
+ m_layout_singer->draw(time, LayoutSinger::LEFT);
+ } else if( m_instruments.empty() ) {
m_layout_singer->draw(time, LayoutSinger::BOTTOM);
} else {
instrumentLayout(time);
diff --git a/game/screen_sing.hh b/game/screen_sing.hh
index 98d3fb5..bd31ccd 100644
--- a/game/screen_sing.hh
+++ b/game/screen_sing.hh
@@ -7,6 +7,7 @@
#include "animvalue.hh"
#include "engine.hh"
#include "guitargraph.hh"
+#include "dancegraph.hh"
#include "screen.hh"
#include "backgrounds.hh"
#include "theme.hh"
@@ -79,7 +80,9 @@ class ScreenSing: public Screen {
boost::scoped_ptr<Engine> m_engine;
boost::scoped_ptr<LayoutSinger> m_layout_singer;
typedef boost::ptr_vector<GuitarGraph> Instruments;
+ typedef boost::ptr_vector<DanceGraph> Dancers;
Instruments m_instruments;
+ Dancers m_dancers;
double m_latencyAV; // Latency between audio and video output (do not confuse with latencyAR)
boost::shared_ptr<ThemeSing> theme;
AnimValue m_quitTimer;
|
|
From: Tapio V. <aa...@us...> - 2009-11-11 13:54:43
|
Module: performous
Branch: dance
Commit: 52595438db1563402d2b2b1fdd3fbda0f893118c
Author: Tapio Vierros <tap...@gm...>
Date: Wed Nov 11 15:51:39 2009 +0200
Added some dummy types for dance tracks.
---
game/notes.hh | 17 +++++++++++++++++
game/song.hh | 1 +
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/game/notes.hh b/game/notes.hh
index e5caf5a..a623e5f 100644
--- a/game/notes.hh
+++ b/game/notes.hh
@@ -96,3 +96,20 @@ struct Note {
typedef std::vector<Note> Notes;
+
+
+struct DanceTrack {
+ //TODO
+};
+
+enum DanceDifficulty {
+ BEGINNER,
+ EASY,
+ MEDIUM,
+ HARD,
+ CHALLENGE,
+ DIFFICULTYCOUNT
+};
+
+typedef std::map<DanceDifficulty, DanceTrack> DanceDifficultyMap;
+typedef std::map<std::string, DanceDifficultyMap> DanceTracks;
diff --git a/game/song.hh b/game/song.hh
index d74e483..a35103d 100644
--- a/game/song.hh
+++ b/game/song.hh
@@ -40,6 +40,7 @@ class Song: boost::noncopyable {
int randomIdx; ///< sorting index used for random order
Notes notes; ///< notes for song (only used for singing)
TrackMap track_map; ///< guitar etc. notes for this song
+ DanceTracks danceTracks; ///< dance tracks
// TODO: TEMPORARY TO ALLOW COMPILING
std::vector<std::map<int, Note> > d_notes; ///< dance notes
// ^
|
|
From: Yoda-JM <yo...@us...> - 2009-11-11 11:41:16
|
Module: performous Branch: master Commit: 140bb29d018d7d8e662990ae7976c3804c2b2772 Author: Vincent Le Ligeour <yo...@us...> Date: Wed Nov 11 12:40:57 2009 +0100 Rewrote a large part of the path management --- data/schema.xml | 38 +++++++++++------------------- game/3dobject.hh | 2 +- game/configuration.cc | 10 -------- game/fs.cc | 57 +++++++++++++++++++++++++++++++++++----------- game/fs.hh | 5 +--- game/guitargraph.cc | 36 ++++++++++++++-------------- game/joystick.cc | 15 +++++------ game/main.cc | 5 +-- game/notegraph.cc | 10 ++++---- game/screen_practice.cc | 12 +++++----- game/surface.cc | 4 +-- 11 files changed, 98 insertions(+), 96 deletions(-) |
|
From: Yoda-JM <yo...@us...> - 2009-11-10 21:41:53
|
Module: performous
Branch: master
Commit: d77f87225586462101ca8297b3cd9c536d73694c
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Nov 10 22:41:18 2009 +0100
Updated path search to primarly search inside performous data directory
---
game/configuration.cc | 8 ++++----
game/fs.cc | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/game/configuration.cc b/game/configuration.cc
index 522393d..b19444c 100644
--- a/game/configuration.cc
+++ b/game/configuration.cc
@@ -337,10 +337,10 @@ void readConfig() {
// Adding some default pathes
char const* env_data_dir = getenv("PERFORMOUS_DATA_DIR");
if (env_data_dir) {
- config["system/path_themes"].sl().push_back(std::string(env_data_dir) + "/themes/");
- config["system/path_songs"].sl().push_back(std::string(env_data_dir) + "/songs/");
- config["system/path_pictures"].sl().push_back(std::string(env_data_dir) + "/pictures/");
- config["system/path_backgrounds"].sl().push_back(std::string(env_data_dir) + "/backgrounds/");
+ config["system/path_themes"].sl().insert(config["system/path_themes"].sl().begin(), std::string(env_data_dir) + "/themes/");
+ config["system/path_songs"].sl().insert(config["system/path_songs"].sl().begin(), std::string(env_data_dir) + "/songs/");
+ config["system/path_pictures"].sl().insert(config["system/path_pictures"].sl().begin(), std::string(env_data_dir) + "/pictures/");
+ config["system/path_backgrounds"].sl().insert(config["system/path_backgrounds"].sl().begin(), std::string(env_data_dir) + "/backgrounds/");
}
}
diff --git a/game/fs.cc b/game/fs.cc
index c9a3039..499830f 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -37,7 +37,7 @@ std::string getThemePath(std::string const& filename) {
p /= theme;
if (fs::is_directory(p)) { theme = p.string(); break; }
}
- }
+ }
if (*theme.rbegin() == '/') theme.erase(theme.size() - 1); // Remove trailing slash
return theme + "/" + filename;
}
|
|
From: Tapio V. <aa...@us...> - 2009-11-10 19:19:59
|
Module: performous
Branch: dance
Commit: dfb436890d9189aa7e790a04009b23b92557afad
Author: Tapio Vierros <tap...@gm...>
Date: Tue Nov 10 21:17:49 2009 +0200
Preliminary code for vertically split singer layout.
(Needed in order to utilize full screen height for dance graph.)
---
game/layout_singer.cc | 28 ++++++++++++++++++++--------
game/layout_singer.hh | 2 +-
game/notegraph.cc | 6 ++++++
game/notegraph.hh | 2 +-
4 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/game/layout_singer.cc b/game/layout_singer.cc
index d648f89..bd94458 100644
--- a/game/layout_singer.cc
+++ b/game/layout_singer.cc
@@ -38,24 +38,23 @@ void LayoutSinger::drawScore(Position position) {
float g = p->m_color.g;
float b = p->m_color.b;
glColor4f(r, g, b,act);
+ m_score_text[i%4]->render((boost::format("%04d") % p->getScore()).str());
switch(position) {
case LayoutSinger::BOTTOM:
m_player_icon->dimensions.left(-0.5 + 0.01 + 0.25 * i).fixedWidth(0.075).screenTop(0.055);
+ m_score_text[i%4]->dimensions().middle(-0.350 + 0.01 + 0.25 * i).fixedHeight(0.075).screenTop(0.055);
break;
case LayoutSinger::MIDDLE:
m_player_icon->dimensions.right(0.35).fixedHeight(0.050).screenTop(0.025 + 0.050 * i);
+ m_score_text[i%4]->dimensions().right(0.45).fixedHeight(0.050).screenTop(0.025 + 0.050 * i);
break;
- }
- m_player_icon->draw();
- m_score_text[i%4]->render((boost::format("%04d") % p->getScore()).str());
- switch(position) {
- case LayoutSinger::BOTTOM:
+ case LayoutSinger::LEFT:
+ case LayoutSinger::RIGHT:
+ m_player_icon->dimensions.left(-0.5 + 0.01 + 0.25 * i).fixedWidth(0.075).screenTop(0.055);
m_score_text[i%4]->dimensions().middle(-0.350 + 0.01 + 0.25 * i).fixedHeight(0.075).screenTop(0.055);
break;
- case LayoutSinger::MIDDLE:
- m_score_text[i%4]->dimensions().right(0.45).fixedHeight(0.050).screenTop(0.025 + 0.050 * i);
- break;
}
+ m_player_icon->draw();
m_score_text[i%4]->draw();
// Give some feedback on how well the last lyrics row went
float fact = p->m_feedbackFader.get();
@@ -78,6 +77,10 @@ void LayoutSinger::drawScore(Position position) {
case LayoutSinger::MIDDLE:
m_line_rank_text[i%4]->dimensions().right(0.45).fixedHeight(0.04*fzoom).screenTop(0.060 + 0.050 * i);
break;
+ case LayoutSinger::LEFT:
+ case LayoutSinger::RIGHT:
+ m_line_rank_text[i%4]->dimensions().middle(-0.350 + 0.01 + 0.25 * i).fixedHeight(0.055*fzoom).screenTop(0.11);
+ break;
}
m_line_rank_text[i%4]->draw();
}
@@ -95,6 +98,10 @@ void LayoutSinger::draw(double time, Position position) {
case LayoutSinger::MIDDLE:
m_noteGraph.draw(time, m_players, NoteGraph::TOP);
break;
+ case LayoutSinger::LEFT:
+ case LayoutSinger::RIGHT:
+ m_noteGraph.draw(time, m_players, NoteGraph::LEFT);
+ break;
}
}
@@ -110,6 +117,11 @@ void LayoutSinger::draw(double time, Position position) {
pos.center(-0.05);
linespacing = 0.04;
break;
+ case LayoutSinger::LEFT:
+ case LayoutSinger::RIGHT:
+ pos.screenBottom(-0.1);
+ linespacing = 0.06;
+ break;
}
bool dirty;
do {
diff --git a/game/layout_singer.hh b/game/layout_singer.hh
index d03a341..de9d20c 100644
--- a/game/layout_singer.hh
+++ b/game/layout_singer.hh
@@ -46,7 +46,7 @@ class LyricRow {
class LayoutSinger {
public:
- enum Position {BOTTOM, MIDDLE};
+ enum Position {BOTTOM, MIDDLE, LEFT, RIGHT};
/// ThemeSing is optional if you want to use drawScore only
LayoutSinger(Song &_song, Players & players, boost::shared_ptr<ThemeSing> _theme = boost::shared_ptr<ThemeSing>());
~LayoutSinger();
diff --git a/game/notegraph.cc b/game/notegraph.cc
index 8faca44..893a948 100644
--- a/game/notegraph.cc
+++ b/game/notegraph.cc
@@ -86,6 +86,12 @@ void NoteGraph::draw(double time, Players const& players, Position position) {
case NoteGraph::TOP:
dimensions.stretch(1.0, 0.25).bottom(0.0);
break;
+ case NoteGraph::LEFT:
+ dimensions.stretch(0.50, 0.50).bottom(0.0);
+ break;
+ case NoteGraph::RIGHT:
+ dimensions.stretch(0.50, 0.50).bottom(0.0);
+ break;
}
m_max = m_nlTop.get() + 7.0;
m_min = m_nlBottom.get() - 7.0;
diff --git a/game/notegraph.hh b/game/notegraph.hh
index 64aaae8..d25d81c 100644
--- a/game/notegraph.hh
+++ b/game/notegraph.hh
@@ -10,7 +10,7 @@ class Players;
/// handles drawing of notes and waves
class NoteGraph {
public:
- enum Position {FULLSCREEN, TOP};
+ enum Position {FULLSCREEN, TOP, LEFT, RIGHT};
/// constructor
NoteGraph(Song const& song);
/// resets NoteGraph and Notes
|
|
From: Tapio V. <aa...@us...> - 2009-11-10 19:19:57
|
Module: performous
Branch: dance
Commit: 870eca0953a8b1b2078e27ba4a610308906528d5
Author: Tapio Vierros <tap...@gm...>
Date: Tue Nov 10 21:16:51 2009 +0200
Added some prototypes to allow compilation to pass.
---
game/song.hh | 3 +++
game/songparser.hh | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/game/song.hh b/game/song.hh
index f02bf87..d74e483 100644
--- a/game/song.hh
+++ b/game/song.hh
@@ -40,6 +40,9 @@ class Song: boost::noncopyable {
int randomIdx; ///< sorting index used for random order
Notes notes; ///< notes for song (only used for singing)
TrackMap track_map; ///< guitar etc. notes for this song
+ // TODO: TEMPORARY TO ALLOW COMPILING
+ std::vector<std::map<int, Note> > d_notes; ///< dance notes
+ // ^
typedef std::vector<double> Beats;
Beats beats;
int noteMin, ///< lowest note
diff --git a/game/songparser.hh b/game/songparser.hh
index d17b147..5d1db07 100644
--- a/game/songparser.hh
+++ b/game/songparser.hh
@@ -94,6 +94,10 @@ class SongParser {
bool txtParseNote(std::string line);
bool iniCheck(std::vector<char> const& data);
void iniParse();
+ bool smCheck(std::vector<char> const& data);
+ void smParse();
+ bool smParseField(std::string& line);
+ bool smParseNote(std::string& line);
double m_prevtime;
unsigned int m_prevts;
unsigned int m_relativeShift;
|