You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(288) |
Aug
(119) |
Sep
(31) |
Oct
(59) |
Nov
(458) |
Dec
(359) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(268) |
Feb
(26) |
Mar
(36) |
Apr
(48) |
May
(119) |
Jun
(37) |
Jul
(173) |
Aug
(429) |
Sep
(137) |
Oct
(156) |
Nov
(59) |
Dec
(45) |
| 2011 |
Jan
(398) |
Feb
(257) |
Mar
(49) |
Apr
(5) |
May
(34) |
Jun
(11) |
Jul
(38) |
Aug
(12) |
Sep
(1) |
Oct
(49) |
Nov
(5) |
Dec
(10) |
| 2012 |
Jan
(21) |
Feb
(32) |
Mar
(20) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(173) |
Aug
|
Sep
(25) |
Oct
(6) |
Nov
(44) |
Dec
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-25 16:11:53
|
Module: performous Branch: menu Commit: c5e691481909f64fee3f052ddf7b73c42c965484 Author: Lasse Karkkainen <tro...@tr...> Date: Wed Nov 25 17:59:01 2009 +0200 Bump version number to 0.4.0 --- CMakeLists.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbc0d1c..35002bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ project(Performous CXX) cmake_minimum_required(VERSION 2.6) cmake_policy(VERSION 2.6) -set(PROJECT_VERSION "0.4-pre5") +set(PROJECT_VERSION "0.4.0") # Avoid source tree pollution if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-25 15:59:13
|
Module: performous Branch: master Commit: c5e691481909f64fee3f052ddf7b73c42c965484 Author: Lasse Karkkainen <tro...@tr...> Date: Wed Nov 25 17:59:01 2009 +0200 Bump version number to 0.4.0 --- CMakeLists.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbc0d1c..35002bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ project(Performous CXX) cmake_minimum_required(VERSION 2.6) cmake_policy(VERSION 2.6) -set(PROJECT_VERSION "0.4-pre5") +set(PROJECT_VERSION "0.4.0") # Avoid source tree pollution if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-24 22:47:09
|
Module: performous
Branch: master
Commit: 68c99e93bf197a4ef720ac773445e12bfc78c808
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 25 00:46:12 2009 +0200
Workaround for CMake target forwarding problem. Works for Performous but plugin++/libda don't work properly stand-alone now.
---
game/CMakeLists.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index 846eb1a..66b61da 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -12,7 +12,7 @@ include_directories(${Boost_INCLUDE_DIRS})
set(LIBS ${LIBS} ${Boost_LIBRARIES})
# Find all the libs that don't require extra parameters
-foreach(lib LibDA SDL PangoCairo LibRSVG LibXML++ Magick++ GLEW AVFormat SWScale OpenGL)
+foreach(lib Plugin++ LibDA SDL PangoCairo LibRSVG LibXML++ Magick++ GLEW AVFormat SWScale OpenGL)
find_package(${lib} REQUIRED)
include_directories(${${lib}_INCLUDE_DIRS})
set(LIBS ${LIBS} ${${lib}_LIBRARIES})
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-24 22:47:07
|
Module: performous
Branch: master
Commit: 66f947dfbd49825bffacba3b4e0dee929ec5b2dd
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 25 00:46:10 2009 +0200
Add extra plugin++ from libda
---
libs/libda/src/CMakeLists.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libs/libda/src/CMakeLists.txt b/libs/libda/src/CMakeLists.txt
index e0b76e6..ba22301 100644
--- a/libs/libda/src/CMakeLists.txt
+++ b/libs/libda/src/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.6)
add_library(da SHARED audio.cpp)
-target_link_libraries(da plugin++ ${Boost_LIBRARIES} ${Plugin++_LIBRARIES})
+target_link_libraries(da ${Boost_LIBRARIES} ${Plugin++_LIBRARIES})
set_target_properties(da PROPERTIES
INSTALL_NAME_DIR @rpath
|
|
From: Yoda-JM <yo...@us...> - 2009-11-24 18:32:19
|
Module: performous
Branch: master
Commit: 872af913b0e50541ac11ebe006ba19a4b0869c06
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Nov 24 19:31:45 2009 +0100
Added plugin++ dependency to libda plugins
---
libs/libda/CMakeLists.txt | 4 ++++
libs/libda/src/CMakeLists.txt | 3 ---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libs/libda/CMakeLists.txt b/libs/libda/CMakeLists.txt
index 1a5df73..c856b95 100644
--- a/libs/libda/CMakeLists.txt
+++ b/libs/libda/CMakeLists.txt
@@ -41,6 +41,10 @@ set(Boost_USE_MULTITHREAD ON)
find_package(Boost 1.36 REQUIRED COMPONENTS thread date_time)
include_directories(${Boost_INCLUDE_DIRS})
+find_package(Plugin++ REQUIRED)
+message(plugin++ ${Plugin++_INCLUDE_DIRS})
+include_directories(${Plugin++_INCLUDE_DIRS})
+
add_subdirectory(src)
add_subdirectory(plugins)
add_subdirectory(cmake)
diff --git a/libs/libda/src/CMakeLists.txt b/libs/libda/src/CMakeLists.txt
index 3f6dd16..e0b76e6 100644
--- a/libs/libda/src/CMakeLists.txt
+++ b/libs/libda/src/CMakeLists.txt
@@ -1,8 +1,5 @@
cmake_minimum_required(VERSION 2.6)
-find_package(Plugin++ REQUIRED)
-include_directories(${Plugin++_INCLUDE_DIRS})
-
add_library(da SHARED audio.cpp)
target_link_libraries(da plugin++ ${Boost_LIBRARIES} ${Plugin++_LIBRARIES})
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-24 13:06:12
|
Module: performous
Branch: master
Commit: 5e0d5cce3c3cc805d8da3aa99eae1a01f5dd7bde
Author: Lasse Karkkainen <tro...@tr...>
Date: Tue Nov 24 14:16:50 2009 +0200
Use LibDA external target
---
game/CMakeLists.txt | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index c04125d..846eb1a 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -12,7 +12,7 @@ include_directories(${Boost_INCLUDE_DIRS})
set(LIBS ${LIBS} ${Boost_LIBRARIES})
# Find all the libs that don't require extra parameters
-foreach(lib SDL PangoCairo LibRSVG LibXML++ Magick++ GLEW AVFormat SWScale OpenGL)
+foreach(lib LibDA SDL PangoCairo LibRSVG LibXML++ Magick++ GLEW AVFormat SWScale OpenGL)
find_package(${lib} REQUIRED)
include_directories(${${lib}_INCLUDE_DIRS})
set(LIBS ${LIBS} ${${lib}_LIBRARIES})
@@ -36,13 +36,13 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif(CMAKE_COMPILER_IS_GNUCXX)
add_executable(performous ${SOURCES} ${SDL_SOURCES})
-target_link_libraries(performous da ${LIBS})
+target_link_libraries(performous ${LIBS})
# Store library paths in executable
if(APPLE)
- set_target_properties(performous PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE INSTALL_RPATH @loader_path/../lib${LIB_SUFFIX})
+ set_target_properties(performous PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE INSTALL_RPATH "@loader_path/../lib${LIB_SUFFIX}:@loader_path/../../lib${LIB_SUFFIX}")
else()
- set_target_properties(performous PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE INSTALL_RPATH \$ORIGIN/../lib${LIB_SUFFIX})
+ set_target_properties(performous PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE INSTALL_RPATH "\$ORIGIN/../lib${LIB_SUFFIX}:\$ORIGIN/../../lib${LIB_SUFFIX}")
endif()
# Generate config.hh
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-24 13:00:18
|
Module: performous
Branch: master
Commit: 716c793bdc67abbecfac9b59daab85d668714e15
Author: Lasse Karkkainen <tro...@tr...>
Date: Tue Nov 24 14:19:57 2009 +0200
Proper soversioning for plugin++
---
libs/plugin++/CMakeLists.txt | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/libs/plugin++/CMakeLists.txt b/libs/plugin++/CMakeLists.txt
index 4b716d2..fca339f 100644
--- a/libs/plugin++/CMakeLists.txt
+++ b/libs/plugin++/CMakeLists.txt
@@ -1,6 +1,9 @@
project(Plugin++)
cmake_minimum_required(VERSION 2.6)
-set(Plugin++_VERSION 1)
+
+set(Plugin++_VERSION_MAJOR 1)
+set(Plugin++_VERSION_MINOR 0)
+set(Plugin++_VERSION "${Plugin++_VERSION_MAJOR}.${Plugin++_VERSION_MINOR}")
# Avoid source tree pollution
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
@@ -40,11 +43,12 @@ add_definitions("-DLIB_SUFFIX=\"${LIB_SUFFIX}\"")
set_target_properties(plugin++ PROPERTIES
INSTALL_NAME_DIR @rpath
VERSION "${Plugin++_VERSION}"
+ SOVERSION "${Plugin++_VERSION_MAJOR}"
DEBUG_POSTFIX -d
+ INSTALL_RPATH_USE_LINK_PATH TRUE
)
install(TARGETS plugin++ EXPORT Plugin++ DESTINATION lib${LIB_SUFFIX})
-get_target_property(type plugin++ TYPE)
FILE(GLOB HEADER_FILES "include/plugin++/*")
install(FILES ${HEADER_FILES} DESTINATION include/plugin++)
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-24 13:00:17
|
Module: performous
Branch: master
Commit: 82a61dab50766e0a11eb440b66941847d15fc69e
Author: Lasse Karkkainen <tro...@tr...>
Date: Tue Nov 24 14:18:44 2009 +0200
Plugin++ exported include dir fixes
---
libs/plugin++/cmake/Plugin++Config.cmake.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/plugin++/cmake/Plugin++Config.cmake.in b/libs/plugin++/cmake/Plugin++Config.cmake.in
index 851227b..8b539c8 100644
--- a/libs/plugin++/cmake/Plugin++Config.cmake.in
+++ b/libs/plugin++/cmake/Plugin++Config.cmake.in
@@ -1,8 +1,8 @@
if(NOT Plugin++_FOUND)
set(Plugin++_FOUND TRUE)
set(Plugin++_VERSION "@Plugin++_VERSION@")
- set(Plugin++_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/@BOOST_INCLUDE_INSTALL_DIR@" CACHE FILEPATH "Plugin++ include directory")
- set(Plugin++_INCLUDE_DIRS "${Plugin++_INCLUDE_DIR}")
+ set(Plugin++_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include" CACHE FILEPATH "Plugin++ include directory")
+ set(Plugin++_INCLUDE_DIRS ${Plugin++_INCLUDE_DIR} "@Boost_INCLUDE_DIRS@")
include("@CMAKE_INSTALL_PREFIX@/@Plugin++_CMAKE_DIR@/Plugin++.cmake")
set(Plugin++_LIBRARIES "plugin++")
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-24 12:27:33
|
Module: performous Branch: master Commit: 9ecc49ca96ce87aa7ccde89ab2b8f03369c63149 Author: Lasse Karkkainen <tro...@tr...> Date: Tue Nov 24 14:25:06 2009 +0200 LibDA changes: - Add soversioning - Add CMake config system - Rename LIBDA -> LibDA in CMake - Move Boost detection to main level --- libs/libda/CMakeLists.txt | 22 ++++++- libs/libda/plugins/CMakeLists.txt | 116 ++++++++++++++++-------------------- libs/libda/src/CMakeLists.txt | 16 +++-- 3 files changed, 80 insertions(+), 74 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-24 12:27:28
|
Module: performous Branch: master Commit: ec09fea9f1f6e2c951ca88650bb4d064d14cd923 Author: Lasse Karkkainen <tro...@tr...> Date: Tue Nov 24 14:23:21 2009 +0200 Add CMake modules to plugin++ and libda, add CMake config files to libda --- libs/libda/cmake/CMakeLists.txt | 11 + libs/libda/cmake/LibDAConfig.cmake.in | 10 + libs/libda/cmake/LibDAConfigVersion.cmake.in | 13 + libs/libda/cmake/Modules/FindALSA.cmake | 34 ++ libs/libda/cmake/Modules/FindAVCodec.cmake | 48 +++ libs/libda/cmake/Modules/FindAVFormat.cmake | 46 +++ libs/libda/cmake/Modules/FindAVUtil.cmake | 44 +++ libs/libda/cmake/Modules/FindAtk.cmake | 34 ++ libs/libda/cmake/Modules/FindAtkmm.cmake | 35 ++ libs/libda/cmake/Modules/FindBoost.cmake | 413 +++++++++++++++++++++ libs/libda/cmake/Modules/FindCairo.cmake | 34 ++ libs/libda/cmake/Modules/FindCairomm.cmake | 34 ++ libs/libda/cmake/Modules/FindClanLib.cmake | 48 +++ libs/libda/cmake/Modules/FindDL.cmake | 23 ++ libs/libda/cmake/Modules/FindFAAC.cmake | 24 ++ libs/libda/cmake/Modules/FindFreetype.cmake | 31 ++ libs/libda/cmake/Modules/FindGDK-PixBuf.cmake | 32 ++ libs/libda/cmake/Modules/FindGDK.cmake | 43 +++ libs/libda/cmake/Modules/FindGDKmm.cmake | 44 +++ libs/libda/cmake/Modules/FindGIO.cmake | 27 ++ libs/libda/cmake/Modules/FindGIOmm.cmake | 35 ++ libs/libda/cmake/Modules/FindGLEW.cmake | 29 ++ libs/libda/cmake/Modules/FindGLFW.cmake | 38 ++ libs/libda/cmake/Modules/FindGObject.cmake | 31 ++ libs/libda/cmake/Modules/FindGStreamer.cmake | 33 ++ libs/libda/cmake/Modules/FindGTK.cmake | 38 ++ libs/libda/cmake/Modules/FindGTKmm.cmake | 46 +++ libs/libda/cmake/Modules/FindGlib.cmake | 39 ++ libs/libda/cmake/Modules/FindGlibmm.cmake | 42 ++ libs/libda/cmake/Modules/FindJack.cmake | 28 ++ libs/libda/cmake/Modules/FindJpeg.cmake | 28 ++ libs/libda/cmake/Modules/FindLibPulse.cmake | 28 ++ libs/libda/cmake/Modules/FindLibPulseSimple.cmake | 28 ++ libs/libda/cmake/Modules/FindLibRSVG.cmake | 35 ++ libs/libda/cmake/Modules/FindLibXML++.cmake | 42 ++ libs/libda/cmake/Modules/FindLibXML2.cmake | 29 ++ libs/libda/cmake/Modules/FindMagick++.cmake | 33 ++ libs/libda/cmake/Modules/FindMagick.cmake | 38 ++ libs/libda/cmake/Modules/FindOpenGL.cmake | 35 ++ libs/libda/cmake/Modules/FindPThread.cmake | 21 + libs/libda/cmake/Modules/FindPango.cmake | 36 ++ libs/libda/cmake/Modules/FindPangoCairo.cmake | 35 ++ libs/libda/cmake/Modules/FindPangomm.cmake | 36 ++ libs/libda/cmake/Modules/FindPng.cmake | 28 ++ libs/libda/cmake/Modules/FindPortMidi.cmake | 21 + libs/libda/cmake/Modules/FindPortaudio.cmake | 35 ++ libs/libda/cmake/Modules/FindProjectM.cmake | 30 ++ libs/libda/cmake/Modules/FindSDL.cmake | 59 +++ libs/libda/cmake/Modules/FindSDL_mixer.cmake | 32 ++ libs/libda/cmake/Modules/FindSWScale.cmake | 46 +++ libs/libda/cmake/Modules/FindSigC++.cmake | 38 ++ libs/libda/cmake/Modules/FindTiff.cmake | 28 ++ libs/libda/cmake/Modules/FindZ.cmake | 28 ++ libs/libda/cmake/Modules/LibFindMacros.cmake | 76 ++++ libs/plugin++/cmake/Modules/FindBoost.cmake | 413 +++++++++++++++++++++ 55 files changed, 2645 insertions(+), 0 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-24 12:27:21
|
Module: performous Branch: master Commit: 5b1889dd441ade3b07c8eb0d0e824208077ebfce Author: Lasse Karkkainen <tro...@tr...> Date: Tue Nov 24 14:14:34 2009 +0200 Removed libda from Performous build --- CMakeLists.txt | 1 - libs/CMakeLists.txt | 4 ---- 2 files changed, 0 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d2b391d..fbc0d1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,6 @@ mark_as_advanced(SHARE_INSTALL) include_directories(libs/plugin++/include) include_directories(libs/libda/include) -add_subdirectory(libs) add_subdirectory(themes) add_subdirectory(data) add_subdirectory(game) diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt deleted file mode 100644 index a9fe660..0000000 --- a/libs/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -cmake_minimum_required(VERSION 2.4) - -add_subdirectory(libda) - |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-24 12:27:21
|
Module: performous
Branch: master
Commit: 6f90701c7d5a9657f3b847596f8d4af8cedf5f43
Author: Lasse Karkkainen <tro...@tr...>
Date: Tue Nov 24 14:16:09 2009 +0200
Improved status printout.
---
cmake/Modules/FindBoost.cmake | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/cmake/Modules/FindBoost.cmake b/cmake/Modules/FindBoost.cmake
index 96b6509..58c0fe0 100644
--- a/cmake/Modules/FindBoost.cmake
+++ b/cmake/Modules/FindBoost.cmake
@@ -68,6 +68,7 @@
# Copyright (c) 2007 Wengo
# Copyright (c) 2007 Mike Jackson
# Copyright (c) 2008 Andreas Pakulat <ap...@gm...>
+# Copyright (c) 2009 Lasse Kärkkäinen
#
# Redistribution AND use is allowed according to the terms of the New
# BSD license.
@@ -77,12 +78,15 @@
# Force proper redetection (to allow e.g. changed COMPONENTS)
set(Boost_FOUND false)
-find_package(Boost COMPONENTS ${Boost_FIND_COMPONENTS} NO_MODULE)
+find_package(Boost QUIET COMPONENTS ${Boost_FIND_COMPONENTS} NO_MODULE)
if (Boost_FOUND)
- message(STATUS "Found Boost ${Boost_VERSION}")
- message("${Boost_LIBRARIES}")
- message("${Boost_INCLUDE_DIRS}")
+ if (Boost_FIND_COMPONENTS)
+ set(_boost_COMP " (${Boost_FIND_COMPONENTS})")
+ else()
+ set(_boost_COMP " (using headers only)")
+ endif()
+ message(STATUS "Found Boost ${Boost_VERSION}${_boost_COMP}")
else()
# MESSAGE(STATUS "Finding Boost libraries.... ")
|
|
From: Tapio V. <aa...@us...> - 2009-11-23 20:19:45
|
Module: performous
Branch: dance
Commit: 877e10969f6a0d3dca76b29d9dc59b9704547d71
Author: Tapio Vierros <tap...@gm...>
Date: Mon Nov 23 22:17:23 2009 +0200
Initial graphics side support for long hold notes.
---
game/dancegraph.cc | 56 ++++++++++---
game/dancegraph.hh | 1 +
themes/default/arrow_hold.svg | 178 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 221 insertions(+), 14 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 269e066..c3fa6bf 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -2,6 +2,7 @@
#include "fs.hh"
#include "notes.hh"
+#include "surface.hh"
#include <boost/lexical_cast.hpp>
#include <stdexcept>
@@ -39,6 +40,7 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
m_song(song),
m_input(input::GUITAR), // TODO: to be replaced by DANCEPAD
m_arrow(getThemePath("arrow.svg")),
+ m_arrow_hold(getThemePath("arrow_hold.svg")),
m_cx(0.0, 0.2),
m_width(0.5, 0.4),
m_stream(),
@@ -141,9 +143,14 @@ glutil::Color const& DanceGraph::color(int arrow_i) const {
}
namespace {
+ const float arrowScale = 0.6f;
const float arrowRotations[4] = { 270.0f, 180.0f, 0.0f, 90.0f };
-
-
+ const float holdWidth = 0.3;
+
+ void vertexPair(float x, float y, float ty) {
+ glTexCoord2f(0.0f, ty); glVertex2f(x - holdWidth, y);
+ glTexCoord2f(1.0f, ty); glVertex2f(x + holdWidth, y);
+ }
}
void DanceGraph::drawArrow(int arrow_i, float x, float y, float scale) {
@@ -190,36 +197,57 @@ void DanceGraph::draw(double time) {
glutil::Color c = color(arrow_i);
c.r += l; c.g += l; c.b +=l;
glColor4fv(c);
- drawArrow(arrow_i, x, time2y(0.0), 0.6 * s);
+ drawArrow(arrow_i, x, time2y(0.0), arrowScale * s);
}
// Draw the notes
- float tBeg, tEnd = 0.0f;
for (DanceNotes::iterator it = m_notes.begin(); it != m_notes.end(); ++it) {
- tBeg = it->note.begin - time;
- tEnd = it->note.end - time;
+ float tBeg = it->note.begin - time;
+ float tEnd = it->note.end - time;
+
+ // TODO: Remove me (temporary hack to test hold note drawing)
+ //tEnd += 0.6;
+
if (tEnd < past) continue;
if (tBeg > future) break;
-
+
int arrow_i = it->note.note;
float x = -1.5f + arrow_i;
- float s = 0.6f;
+ float s = arrowScale;
float yBeg = time2y(tBeg);
float yEnd = time2y(tEnd);
glutil::Color c = color(arrow_i);
double glow = it->hitAnim.get();
//c.a = std::sqrt(1.0 - glow);
- c.a = 1.0 - glow;
c.r += glow *.5;
c.g += glow *.5;
c.b += glow *.5;
- s += glow;
-
- glColor4fv(c);
- drawArrow(arrow_i, x, yBeg, s);
- //drawNote(it->note.note, c, tBeg, tEnd);
+ if (tEnd - tBeg > 0.1) {
+ // Draw holds
+ glColor4fv(c);
+ if (it->isHit) {
+ // TODO: What if hold is ended prematurely?
+ yBeg = std::max(time2y(0.0), yBeg);
+ yEnd = std::max(time2y(0.0), yEnd);
+ glColor3f(1.0f, 1.0f, 1.0f);
+ }
+ {
+ UseTexture tblock(m_arrow_hold);
+ glutil::Begin block(GL_TRIANGLE_STRIP);
+ vertexPair(x, yEnd, 1.0f);
+ vertexPair(x, yBeg, 0.0f);
+ }
+ // Draw begin
+ drawArrow(arrow_i, x, yBeg, s);
+ } else {
+ // Draw short note
+ c.a = 1.0 - glow;
+ s = arrowScale + glow;
+ glColor4fv(c);
+ drawArrow(arrow_i, x, yBeg, s);
+ }
}
// To test arrow coordinate positioning
diff --git a/game/dancegraph.hh b/game/dancegraph.hh
index 83095d1..c8866b3 100644
--- a/game/dancegraph.hh
+++ b/game/dancegraph.hh
@@ -60,6 +60,7 @@ class DanceGraph {
DanceNotes m_notes;
DanceNotes::iterator m_notesIt;
Surface m_arrow;
+ Texture m_arrow_hold;
AnimValue m_cx, m_width;
std::size_t m_stream;
struct Event {
diff --git a/themes/default/arrow_hold.svg b/themes/default/arrow_hold.svg
new file mode 100644
index 0000000..27249d5
--- /dev/null
+++ b/themes/default/arrow_hold.svg
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64"
+ height="64"
+ id="svg2463"
+ sodipodi:version="0.32"
+ inkscape:version="0.47pre4 r22446"
+ version="1.0"
+ sodipodi:docname="arrow_hold.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs2465">
+ <linearGradient
+ id="linearGradient3789">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.25098041;"
+ offset="0"
+ id="stop3791" />
+ <stop
+ id="stop3797"
+ offset="0.5"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.25098041;"
+ offset="1"
+ id="stop3793" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3767">
+ <stop
+ style="stop-color:#800000;stop-opacity:1;"
+ offset="0"
+ id="stop3769" />
+ <stop
+ id="stop3779"
+ offset="0.5"
+ style="stop-color:#800000;stop-opacity:0.49803922;" />
+ <stop
+ style="stop-color:#800000;stop-opacity:0;"
+ offset="1"
+ id="stop3771" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3262">
+ <stop
+ style="stop-color:#f5f5f5;stop-opacity:0.22680412;"
+ offset="0"
+ id="stop3264" />
+ <stop
+ style="stop-color:#f5f5f5;stop-opacity:0.96078432;"
+ offset="1"
+ id="stop3266" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3751"
+ inkscape:collect="always">
+ <stop
+ id="stop3753"
+ offset="0"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ id="stop3755"
+ offset="1"
+ style="stop-color:black;stop-opacity:0;" />
+ </linearGradient>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective2471" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3751"
+ id="linearGradient3272"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.3868046,0,0,0.3868046,40.335717,481.59837)"
+ x1="665.12128"
+ y1="684.16162"
+ x2="381.28015"
+ y2="449.80624" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3751"
+ id="linearGradient2406"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.3868046,0,0,0.3868046,43.114888,485.8841)"
+ x1="665.12128"
+ y1="684.16162"
+ x2="381.28015"
+ y2="449.80624" />
+ <inkscape:perspective
+ id="perspective2838"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3735"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3789"
+ id="linearGradient3795"
+ x1="111.10967"
+ y1="803.5119"
+ x2="173.60966"
+ y2="803.5119"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#f5f5f5"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.6"
+ inkscape:cx="30.50978"
+ inkscape:cy="36.330452"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1021"
+ inkscape:window-height="720"
+ inkscape:window-x="377"
+ inkscape:window-y="55"
+ inkscape:snap-grids="true"
+ inkscape:snap-page="true"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata2468">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-110.35967,-771.51188)">
+ <rect
+ style="fill:url(#linearGradient3795);fill-opacity:1.0;fill-rule:nonzero;stroke:none;stroke-width:1.50000000000000000;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3749"
+ width="62.5"
+ height="62.5"
+ x="111.10967"
+ y="772.2619" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 142.39167,772.01188 0,63 -0.032,0"
+ id="path2834" />
+ </g>
+</svg>
|
|
From: Matti K. <mpk...@us...> - 2009-11-23 18:37:12
|
Module: performous
Branch: dance
Commit: 2738d057e167443f5edb2c2105b94eeeee876ac5
Author: Matti Kemppainen <mpk...@us...>
Date: Mon Nov 23 20:36:55 2009 +0200
Showpoints on the screen, initial scorefactor.
---
game/dancegraph.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 4787728..269e066 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -47,7 +47,7 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
m_correctness(0.0, 5.0),
m_flow_direction(1),
m_score(),
- m_scoreFactor(),
+ m_scoreFactor(1),
m_streak(),
m_longestStreak(),
m_gamingMode("dance-single")
@@ -118,7 +118,7 @@ void DanceGraph::engine() {
/// Handles scoring and such
void DanceGraph::dance(double time, input::Event const& ev) {
for (DanceNotes::iterator& it = m_notesIt; it != m_notes.end() && it->note.begin <= time + maxTolerance; ++it) {
- if(!it->isHit) {
+ if(!it->isHit && ev.button == it->note.note) {
it->isHit = true;
double p = points(it->note.begin - time);
it->score = p;
|
|
From: Tapio V. <aa...@us...> - 2009-11-23 18:23:20
|
Module: performous
Branch: dance
Commit: df271ac829bd9d261d48eb0089ebbdcc4647bd94
Author: Tapio Vierros <tap...@gm...>
Date: Mon Nov 23 20:22:08 2009 +0200
Enabled note hitting animation.
---
game/dancegraph.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 99e489c..4787728 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -104,7 +104,7 @@ void DanceGraph::engine() {
}
if (ev.type == input::Event::RELEASE) {
m_pressed[ev.button].setTarget(0.0, false);
- }
+ }
else if (ev.type == input::Event::PRESS) {
dance(time, ev);
m_pressed[ev.button].setTarget(1.0, true);
@@ -123,6 +123,7 @@ void DanceGraph::dance(double time, input::Event const& ev) {
double p = points(it->note.begin - time);
it->score = p;
m_score += p;
+ it->hitAnim.setTarget(1.0, false);
}
}
}
|
|
From: Matti K. <mpk...@us...> - 2009-11-23 18:06:38
|
Module: performous
Branch: dance
Commit: 814db5c8acf71bdcc03025c2c6a97fe92a347196
Author: Matti Kemppainen <mpk...@us...>
Date: Mon Nov 23 20:06:16 2009 +0200
Added simple score counting.
---
game/dancegraph.cc | 40 ++++++++++++++++++++++------------------
game/dancegraph.hh | 5 +++--
2 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 0c5dfe2..99e489c 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -21,11 +21,12 @@ namespace {
// TODO: Use this or something else?
double points(double error) {
+ error = (error < 0.0) ? -error : error;
double score = 0.0;
if (error < maxTolerance) score += 15;
- if (error < 0.1) score += 15;
- if (error < 0.05) score += 15;
- if (error < 0.03) score += 5;
+ if (error < maxTolerance / 2) score += 15;
+ if (error < maxTolerance / 4) score += 15;
+ if (error < maxTolerance / 6) score += 5;
return score;
}
}
@@ -55,10 +56,6 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
for(size_t i = 0; i < 4; i++) m_pressed[i] = AnimValue(0.0, 8.0);
- /**
- * TODO: Skype 17.11.
- * - trackien etsintä
- **/
DanceTracks::const_iterator it = m_song.danceTracks.find(m_gamingMode);
if(it == m_song.danceTracks.end())
throw std::runtime_error("Could not find any dance tracks.");
@@ -84,7 +81,8 @@ void DanceGraph::difficulty(DanceDifficulty level) {
DanceTrack const& track = m_song.danceTracks.find(m_gamingMode)->second.find(level)->second;
for(Notes::const_iterator it = track.notes.begin(); it != track.notes.end(); it++)
m_notes.push_back(DanceNote(*it));
- std::cout << "Difficulty set to: " << level << std::endl;
+ m_notesIt = m_notes.begin();
+// std::cout << "Difficulty set to: " << level << std::endl;
m_level = level;
}
@@ -104,8 +102,13 @@ void DanceGraph::engine() {
else if (ev.pressed[STEP_DOWN]) difficultyDelta(-1);
}
}
- if (ev.type == input::Event::RELEASE) m_pressed[ev.button].setTarget(0.0, false);
- else if (ev.type == input::Event::PRESS) m_pressed[ev.button].setTarget(1.0, true);
+ if (ev.type == input::Event::RELEASE) {
+ m_pressed[ev.button].setTarget(0.0, false);
+ }
+ else if (ev.type == input::Event::PRESS) {
+ dance(time, ev);
+ m_pressed[ev.button].setTarget(1.0, true);
+ }
}
@@ -114,8 +117,14 @@ void DanceGraph::engine() {
/// Handles scoring and such
void DanceGraph::dance(double time, input::Event const& ev) {
- //TODO - Kemppi
-
+ for (DanceNotes::iterator& it = m_notesIt; it != m_notes.end() && it->note.begin <= time + maxTolerance; ++it) {
+ if(!it->isHit) {
+ it->isHit = true;
+ double p = points(it->note.begin - time);
+ it->score = p;
+ m_score += p;
+ }
+ }
}
@@ -190,12 +199,7 @@ void DanceGraph::draw(double time) {
tEnd = it->note.end - time;
if (tEnd < past) continue;
if (tBeg > future) break;
-
- // TODO: Remove me (temporary hack to test hitAnim)
- if (tBeg <= 0.0 && !it->isHit) {
- it->isHit = true; it->hitAnim.setTarget(1.0, false);
- }
-
+
int arrow_i = it->note.note;
float x = -1.5f + arrow_i;
float s = 0.6f;
diff --git a/game/dancegraph.hh b/game/dancegraph.hh
index 2b90517..83095d1 100644
--- a/game/dancegraph.hh
+++ b/game/dancegraph.hh
@@ -15,11 +15,11 @@ class Song;
struct DanceNote {
DanceNote(Note note) :
- note(note), isHit(false), hitAnim(0.0, 5.0), score(0) {}
+ note(note), hitAnim(0.0, 5.0), score(0), isHit(false) {}
Note note;
- bool isHit;
AnimValue hitAnim;
int score;
+ bool isHit;
};
@@ -58,6 +58,7 @@ class DanceGraph {
Song const& m_song;
input::InputDev m_input;
DanceNotes m_notes;
+ DanceNotes::iterator m_notesIt;
Surface m_arrow;
AnimValue m_cx, m_width;
std::size_t m_stream;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-23 04:04:57
|
Module: performous Branch: dance Commit: 0727e25ee94bd79c3b1857428eaf75b796fd66c1 Author: Lasse Karkkainen <tro...@tr...> Date: Sun Nov 22 22:07:17 2009 +0200 Make FindBoost.cmake prefer BoostConfig.cmake when available --- cmake/Modules/FindBoost.cmake | 613 +++++++++++++++++++++-------------------- 1 files changed, 312 insertions(+), 301 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-23 03:28:31
|
Module: performous Branch: master Commit: 90d70910693cc4655a9da1f684c0a5ad18e63e06 Author: Lasse Karkkainen <tro...@tr...> Date: Mon Nov 23 05:26:17 2009 +0200 - Separated plugin++ from Performous build (must now build and install it first) - Added CMake config system to plugin++ - Added proper find module for libdl - CMakeLists.txt improvements --- cmake/Modules/FindDL.cmake | 23 ++++++ libs/CMakeLists.txt | 1 - libs/libda/CMakeLists.txt | 8 ++- libs/libda/src/CMakeLists.txt | 13 +++- libs/plugin++/CMakeLists.txt | 39 ++++++++-- libs/plugin++/cmake/CMakeLists.txt | 11 +++ libs/plugin++/cmake/Modules/FindDL.cmake | 23 ++++++ libs/plugin++/cmake/Modules/LibFindMacros.cmake | 76 ++++++++++++++++++++ libs/plugin++/cmake/Plugin++Config.cmake.in | 10 +++ libs/plugin++/cmake/Plugin++ConfigVersion.cmake.in | 13 ++++ 10 files changed, 203 insertions(+), 14 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-22 20:08:17
|
Module: performous
Branch: master
Commit: 36ee18ef0a4be1fac5c572ca58513270247a54f6
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Nov 22 22:07:57 2009 +0200
Avoid some warnings from Boost headers
---
game/CMakeLists.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index 462e0ce..c04125d 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -30,7 +30,7 @@ endif(PortMidi_FOUND)
if(CMAKE_COMPILER_IS_GNUCXX)
message(STATUS "GCC detected, adding compile flags")
# -pedantic cannot be used because ffmpeg headers are b0rked
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++98 -Wall -Wextra")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++98 -Wall -Wextra -Wno-missing-field-initializers")
# Needed for ffmpeg.cc to compile cleanly on OSX (it's a (unsigned long) long story)
add_definitions("-D__STDC_CONSTANT_MACROS")
endif(CMAKE_COMPILER_IS_GNUCXX)
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-22 20:08:16
|
Module: performous Branch: master Commit: dd4cffce1db16aa1f7140a8173019e222444cc58 Author: Lasse Karkkainen <tro...@tr...> Date: Sun Nov 22 22:07:17 2009 +0200 Make FindBoost.cmake prefer BoostConfig.cmake when available --- cmake/Modules/FindBoost.cmake | 613 +++++++++++++++++++++-------------------- 1 files changed, 312 insertions(+), 301 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-22 20:08:13
|
Module: performous
Branch: master
Commit: 71d8103ebcecfac6e5c412b1905f7b1c1eae1cc0
Author: Lasse Karkkainen <tro...@tr...>
Date: Fri Nov 20 05:46:15 2009 +0200
libda too
---
libs/libda/CMakeLists.txt | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libs/libda/CMakeLists.txt b/libs/libda/CMakeLists.txt
index f10c47c..d852257 100644
--- a/libs/libda/CMakeLists.txt
+++ b/libs/libda/CMakeLists.txt
@@ -2,6 +2,8 @@ project(libda)
cmake_minimum_required(VERSION 2.6)
cmake_policy(VERSION 2.6)
+set(LIB_SUFFIX "" CACHE STRING "Optional suffix to use on lib folders (e.g. 64 for lib64)")
+
set(LIBDA_PLUGIN_DIR "lib${LIB_SUFFIX}/libda")
include_directories(include)
|
|
From: Tapio V. <aa...@us...> - 2009-11-21 13:09:59
|
Module: performous
Branch: dance
Commit: 1af66decb7b5471ec36284ef95df83e193faaa86
Author: Tapio Vierros <tap...@gm...>
Date: Sat Nov 21 14:20:21 2009 +0200
Cursor tweaking and effect for hitting notes.
---
game/dancegraph.cc | 75 ++++++++++++++++++++++++++++++++--------------------
game/dancegraph.hh | 8 +++--
2 files changed, 51 insertions(+), 32 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 2c30638..f344c3f 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -8,10 +8,10 @@
namespace {
const float past = -0.2f;
const float future = 1.8f;
- const float offset = 0.5f; // TODO: more clever way to do this?
- const float timescale = 10.0f;
+ const float offsetY = 1.8f; // TODO: more clever way to do this?
+ const float timescale = 6.0f;
// Note: t is difference from playback time so it must be in range [past, future]
- float time2y(float t) { return offset + timescale * (t - past) / (future - past); }
+ float time2y(float t) { return offsetY + timescale * (t - past) / (future - past); }
float time2a(float t) {
float a = clamp(1.0 - t / future); // Note: we want 1.0 alpha already at zero t.
return std::pow(a, 0.8f); // Nicer curve
@@ -53,7 +53,7 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
{
m_arrow.dimensions.middle().center();
- for(size_t i=0; i < 4; i++) m_pressed[i] = 0;
+ for(size_t i = 0; i < 4; i++) m_pressed[i] = AnimValue(0.0, 8.0);
/**
* TODO: Skype 17.11.
@@ -104,8 +104,8 @@ void DanceGraph::engine() {
else if (ev.pressed[STEP_DOWN]) difficultyDelta(-1);
}
}
- if (ev.type == input::Event::RELEASE) m_pressed[ev.button] = false;
- else if (ev.type == input::Event::PRESS) m_pressed[ev.button] = true;
+ if (ev.type == input::Event::RELEASE) m_pressed[ev.button].setTarget(0.0, false);
+ else if (ev.type == input::Event::PRESS) m_pressed[ev.button].setTarget(1.0, true);
}
@@ -169,42 +169,59 @@ void DanceGraph::draw(double time) {
glTranslatef((1.0 - frac) * offsetX, dimensions.y1(), 0.0f);
//glTranslatef((1.0 - frac) * offsetX, 0.0f, 0.0f);
{ float s = dimensions.w() / 5.0f; glScalef(s, s, s); }
+
+ // Arrows on cursor
+ // TODO: suitable effect for pressing the arrows?
+ // TODO: effect possibilities: zooming, whitening, external glow
+ for (int arrow_i = 0; arrow_i < 4; ++arrow_i) {
+ float x = -1.5f + arrow_i;
+ float l = m_pressed[arrow_i].get();
+ float s = (5.0 - l) / 5.0;
+ glutil::Color c = color(arrow_i);
+ c.r += l; c.g += l; c.b +=l;
+ glColor4fv(c);
+ drawArrow(arrow_i, x, time2y(0.0), 0.6 * s);
+ }
+
// Draw the notes
- // TODO: iteration needs rewrite to the dancenotes structure
float tBeg, tEnd = 0.0f;
-
- for (DanceNotes::const_iterator it = m_notes.begin(); it != m_notes.end(); ++it) {
+ for (DanceNotes::iterator it = m_notes.begin(); it != m_notes.end(); ++it) {
tBeg = it->note.begin - time;
tEnd = it->note.end - time;
if (tEnd < past) continue;
if (tBeg > future) break;
-
- glutil::Color c = color(it->note.note);
- //c.r += glow;
- //c.g += glow;
- //c.b += glow;
- drawNote(it->note.note, c, tBeg, tEnd);
+
+ int arrow_i = it->note.note;
+ float x = -1.5f + arrow_i;
+ float s = 0.6f;
+ float yBeg = time2y(tBeg);
+ float yEnd = time2y(tEnd);
+ glutil::Color c = color(arrow_i);
+
+ double glow = it->hitAnim.get();
+ //c.a = std::sqrt(1.0 - glow);
+ c.a = 1.0 - glow;
+ c.r += glow *.5;
+ c.g += glow *.5;
+ c.b += glow *.5;
+ s += glow;
+
+ glColor4fv(c);
+ drawArrow(arrow_i, x, yBeg, s);
+
+ //drawNote(it->note.note, c, tBeg, tEnd);
}
// To test arrow coordinate positioning
- //for (int i = 0; i < 10; ++i) {
- //std::cout << time2y(i*0.1f) << std::endl;
- //drawArrow(1, 0, time2y(i*0.1f), 0.6);
- //}
+// for (float i = past; i < future; i+=0.2) {
+// std::cout << time2y(i) << std::endl;
+// drawArrow(1, 0, time2y(i), 0.6);
+// }
- // Arrows on cursor
- // TODO: suitable effect for pressing the arrows?
- // TODO: effect possibilities: zooming, whitening, external glow
- for (int arrow_i = 0; arrow_i < 4; ++arrow_i) {
- float x = -1.5f + arrow_i;
- glColor4fv(color(arrow_i));
- if (m_pressed[arrow_i]) glColor3f(1.0f, 1.0f, 1.0f);
- drawArrow(arrow_i, x, time2y(0.0), 0.6);
- }
glColor3f(1.0f, 1.0f, 1.0f);
}
-
+// TODO: See if this is needed at all
/// Draws a single note (or hold)
void DanceGraph::drawNote(int arrow_i, glutil::Color c, float tBeg, float tEnd) {
float x = -1.5f + arrow_i;
diff --git a/game/dancegraph.hh b/game/dancegraph.hh
index 614cbad..2b90517 100644
--- a/game/dancegraph.hh
+++ b/game/dancegraph.hh
@@ -14,9 +14,11 @@
class Song;
struct DanceNote {
- DanceNote(struct Note note) : note(note), isHit(false), score(0) {}
- struct Note note;
+ DanceNote(Note note) :
+ note(note), isHit(false), hitAnim(0.0, 5.0), score(0) {}
+ Note note;
bool isHit;
+ AnimValue hitAnim;
int score;
};
@@ -70,7 +72,7 @@ class DanceGraph {
};
typedef std::vector<Event> Events;
Events m_events;
- bool m_pressed[4];
+ AnimValue m_pressed[4];
int m_dead;
SvgTxtTheme m_text;
AnimValue m_correctness;
|
|
From: Tapio V. <aa...@us...> - 2009-11-21 12:23:25
|
Module: performous
Branch: dance
Commit: 4bac03e47d9debb33a87968c827c32e0e95e4629
Author: Tapio Vierros <tap...@gm...>
Date: Sat Nov 21 14:22:21 2009 +0200
Temporary hack for testing note hitting effect.
---
game/dancegraph.cc | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index f344c3f..0c5dfe2 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -191,6 +191,11 @@ void DanceGraph::draw(double time) {
if (tEnd < past) continue;
if (tBeg > future) break;
+ // TODO: Remove me (temporary hack to test hitAnim)
+ if (tBeg <= 0.0 && !it->isHit) {
+ it->isHit = true; it->hitAnim.setTarget(1.0, false);
+ }
+
int arrow_i = it->note.note;
float x = -1.5f + arrow_i;
float s = 0.6f;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-20 03:40:51
|
Module: performous
Branch: master
Commit: 20e1891ced34a83b3c57154b299b3a135eaa5a14
Author: Lasse Karkkainen <tro...@tr...>
Date: Fri Nov 20 05:40:35 2009 +0200
LIB_SUFFIX improvements
---
CMakeLists.txt | 2 ++
libs/plugin++/CMakeLists.txt | 2 ++
libs/plugin++/src/loader.cc | 6 +++++-
3 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e48ac49..d2b391d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,8 @@ add_subdirectory(data)
add_subdirectory(game)
add_subdirectory(docs)
+set(LIB_SUFFIX "" CACHE STRING "Optional suffix to use on lib folders (e.g. 64 for lib64)")
+
option(ENABLE_EDITOR "Enable experimental song editor (doesn't work)" OFF)
if (ENABLE_EDITOR)
diff --git a/libs/plugin++/CMakeLists.txt b/libs/plugin++/CMakeLists.txt
index b92b983..4817fae 100644
--- a/libs/plugin++/CMakeLists.txt
+++ b/libs/plugin++/CMakeLists.txt
@@ -4,6 +4,8 @@ cmake_policy(VERSION 2.6)
include_directories(include)
+set(LIB_SUFFIX "" CACHE STRING "Optional suffix to use on lib folders (e.g. 64 for lib64)")
+
if(CMAKE_COMPILER_IS_GNUCXX)
message(STATUS "GCC detected, adding compile flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -Wall -Wextra")
diff --git a/libs/plugin++/src/loader.cc b/libs/plugin++/src/loader.cc
index b39c8eb..c7bdb4c 100644
--- a/libs/plugin++/src/loader.cc
+++ b/libs/plugin++/src/loader.cc
@@ -15,6 +15,10 @@ namespace fs = boost::filesystem;
#define PATHSEP ';'
#else
#define PATHSEP ':'
+#ifndef LIB_SUFFIX
+#define LIB_SUFFIX ""
+#endif
+#define UNIX_LIBPATH "/usr/lib" LIB_SUFFIX ":/usr/local/lib" LIB_SUFFIX
#endif
/// Break var (a delimited path string) into paths (appends folder if supplied).
@@ -56,7 +60,7 @@ loader::loader(fs::path const& folder) {
#ifndef _WIN32
// Try UNIX library paths
parse(paths, std::getenv("LD_LIBRARY_PATH"), folder);
- parse(paths, "/usr/lib" LIB_SUFFIX ":/usr/local/lib" LIB_SUFFIX, folder);
+ parse(paths, UNIX_LIBPATH, folder);
#endif
}
// Load the contents of each folder
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-19 01:45:28
|
Module: performous
Branch: master
Commit: abd07672ce3718a01f68cdd59744e1c92b792a26
Author: Lasse Karkkainen <tro...@tr...>
Date: Thu Nov 19 03:45:09 2009 +0200
Make execname return fs::path + other fixes to it
---
game/fs.cc | 2 +-
libs/plugin++/include/plugin++/execname.hpp | 4 +-
libs/plugin++/src/execname.cc | 38 +++++++++++++++-----------
3 files changed, 25 insertions(+), 19 deletions(-)
diff --git a/game/fs.cc b/game/fs.cc
index 0bd60b0..852529a 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -89,7 +89,7 @@ std::string getPath(fs::path const& filename) {
}
#endif
// Adding relative path from executable
- dirs.push_back(fs::path(plugin::execname()).parent_path().parent_path() / shareDir);
+ dirs.push_back(plugin::execname().parent_path().parent_path() / shareDir);
#ifndef _WIN32
// Adding XDG_DATA_DIRS
{
diff --git a/libs/plugin++/include/plugin++/execname.hpp b/libs/plugin++/include/plugin++/execname.hpp
index 03b7fe0..4c53315 100644
--- a/libs/plugin++/include/plugin++/execname.hpp
+++ b/libs/plugin++/include/plugin++/execname.hpp
@@ -1,9 +1,9 @@
#pragma once
-#include <string>
+#include <boost/filesystem.hpp>
namespace plugin {
/// Get the current executable name with path. Returns empty path if the name
/// cannot be found. May return absolute or relative paths.
- std::string execname();
+ boost::filesystem::path execname();
}
diff --git a/libs/plugin++/src/execname.cc b/libs/plugin++/src/execname.cc
index d647f26..6844d74 100644
--- a/libs/plugin++/src/execname.cc
+++ b/libs/plugin++/src/execname.cc
@@ -1,52 +1,58 @@
#include <plugin++/execname.hpp>
+namespace fs = boost::filesystem;
+
#if defined(_WIN32)
#include <windows.h>
-std::string plugin::execname() {
+fs::path plugin::execname() {
char buf[1024];
DWORD ret = GetModuleFileName(NULL, buf, sizeof(buf));
if (ret == 0 || ret == sizeof(buf)) return std::string();
return buf;
}
-#elif defined(__APPLE__) // Not tested
+#elif defined(__APPLE__)
#include <mach-o/dyld.h>
-std::string plugin::execname() {
+fs::path plugin::execname() {
char buf[1024];
uint32_t size = sizeof(buf);
int ret = _NSGetExecutablePath(buf, &size);
- if (ret != 0) return std::string();
+ if (ret != 0) return fs::path();
return buf;
}
#elif defined(sun) || defined(__sun)
#include <stdlib.h>
-std::string plugin::execname() {
- return getplugin::execname();
+fs::path plugin::execname() {
+ return getexecname();
}
#elif defined(__FreeBSD__)
#include <sys/sysctl.h>
-std::string plugin::execname() {
+fs::path plugin::execname() {
int mib[4];
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
mib[2] = KERN_PROC_PATHNAME;
mib[3] = -1;
char buf[1024];
- size_t size = sizeof(buf);
+ size_t maxchars = sizeof(buf) - 1;
+ size_t size = maxchars;
sysctl(mib, 4, buf, &size, NULL, 0);
- if (size == 0 || size == sizeof(buf)) return std::string();
- return std::string(buf, size);
+ if (size == 0 || size >= maxchars) return fs::path();
+ buf[size] = '\0';
+ return buf;
}
#elif defined(__linux__)
#include <unistd.h>
-std::string plugin::execname() {
+fs::path plugin::execname() {
char buf[1024];
- ssize_t ret = readlink("/proc/self/exe", buf, sizeof(buf));
- if (ret == 0 || ret == sizeof(buf)) return std::string();
- return std::string(buf, ret);
+ ssize_t maxchars = sizeof(buf) - 1;
+ ssize_t size = readlink("/proc/self/exe", buf, sizeof(buf));
+ if (size <= 0 || size >= maxchars) return fs::path();
+ buf[size] = '\0';
+ return buf;
}
#else
-std::string plugin::execname() {
- return std::string();
+fs::path plugin::execname() {
+ return fs::path();
}
#endif
|