You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(288) |
Aug
(119) |
Sep
(31) |
Oct
(59) |
Nov
(458) |
Dec
(359) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(268) |
Feb
(26) |
Mar
(36) |
Apr
(48) |
May
(119) |
Jun
(37) |
Jul
(173) |
Aug
(429) |
Sep
(137) |
Oct
(156) |
Nov
(59) |
Dec
(45) |
| 2011 |
Jan
(398) |
Feb
(257) |
Mar
(49) |
Apr
(5) |
May
(34) |
Jun
(11) |
Jul
(38) |
Aug
(12) |
Sep
(1) |
Oct
(49) |
Nov
(5) |
Dec
(10) |
| 2012 |
Jan
(21) |
Feb
(32) |
Mar
(20) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(173) |
Aug
|
Sep
(25) |
Oct
(6) |
Nov
(44) |
Dec
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:44:21
|
Module: performous Branch: dance Commit: f60a372a9feeeec83550869cf1e4758658564298 Author: Lasse Karkkainen <tro...@tr...> Date: Wed Dec 2 03:11:16 2009 +0200 Fix indent of plugin.hpp and add init hack to the registry, perhaps allowing this to work on Windows... --- libs/libda/include/libda/audio_dev.hpp | 4 + libs/plugin++/include/plugin++/plugin.hpp | 235 +++++++++++++++-------------- 2 files changed, 126 insertions(+), 113 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:44:19
|
Module: performous
Branch: dance
Commit: 4c630be35e72e75e98fd33e992f0662431e15739
Author: Miguel Sánchez de León Peque <msd...@gm...>
Date: Wed Dec 2 02:10:11 2009 +0100
OptionMenu struct created in menu.cc/hh; applied to Main Menu.
---
game/menu.cc | 9 +++++++
game/menu.hh | 16 +++++++++++++
game/screen_intro.cc | 37 ++++++++-----------------------
game/screen_intro.hh | 2 +
game/theme.cc | 4 ---
game/theme.hh | 8 -------
themes/default/configuration_value.svg | 17 +++++++-------
7 files changed, 46 insertions(+), 47 deletions(-)
diff --git a/game/menu.cc b/game/menu.cc
new file mode 100755
index 0000000..63eac83
--- /dev/null
+++ b/game/menu.cc
@@ -0,0 +1,9 @@
+#include "menu.hh"
+
+#include "fs.hh"
+#include "configuration.hh"
+
+MenuOption::MenuOption()
+{}
+MenuOption::MenuOption(const std::string scrn, const std::string img) : screen(scrn), image(getThemePath(img))
+{}
diff --git a/game/menu.hh b/game/menu.hh
new file mode 100755
index 0000000..a1ae00b
--- /dev/null
+++ b/game/menu.hh
@@ -0,0 +1,16 @@
+#pragma once
+
+#include "opengl_text.hh"
+#include "surface.hh"
+#include <boost/noncopyable.hpp>
+#include <string>
+
+/// struct for menu options
+struct MenuOption {
+ MenuOption();
+ MenuOption(const std::string scrn, const std::string img);
+ /// screen to activate when option is pressed
+ std::string screen;
+ /// image to show when option is selected
+ Surface image;
+};
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
old mode 100644
new mode 100755
index 885912c..5fdadd0
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -4,7 +4,12 @@
#include "audio.hh"
#include "record.hh"
-ScreenIntro::ScreenIntro(std::string const& name, Audio& audio, Capture& capture): Screen(name), m_audio(audio), m_capture(capture), selected() {}
+ScreenIntro::ScreenIntro(std::string const& name, Audio& audio, Capture& capture): Screen(name), m_audio(audio), m_capture(capture), selected() {
+ m_menuOptions.push_back(new MenuOption("Songs", "intro_sing.svg"));
+ m_menuOptions.push_back(new MenuOption("Practice", "intro_practice.svg"));
+ m_menuOptions.push_back(new MenuOption("Configuration", "intro_configure.svg"));
+ m_menuOptions.push_back(new MenuOption("", "intro_quit.svg"));
+}
void ScreenIntro::enter() {
m_audio.playMusic(getThemePath("menu.ogg"), true);
@@ -20,20 +25,6 @@ void ScreenIntro::exit() {
m_dialog.reset();
}
-/*
-Tronic's note on making the menu more generic:
-
-struct MenuOption {
- std::string screen;
- Surface image;
-};
-
-In ScreenIntro:
-std::vector<MenuOption> m_menuOptions;
-
-This should avoid all if-elses for testing selected == 1, ...
-*/
-
void ScreenIntro::manageEvent(SDL_Event event) {
ScreenManager* sm = ScreenManager::getSingletonPtr();
if (event.type == SDL_KEYDOWN) {
@@ -47,14 +38,9 @@ void ScreenIntro::manageEvent(SDL_Event event) {
if (selected > 0) selected--;
else selected = 3;
} else if (key == SDLK_RETURN) {
- if (selected == 0) sm->activateScreen("Songs");
- else if (selected == 1) sm->activateScreen("Practice");
- else if (selected == 2) sm->activateScreen("Configuration");
- else if (selected == 3) sm->finished();
- } else if (key == SDLK_s) sm->activateScreen("Songs");
- else if (key == SDLK_c) sm->activateScreen("Configuration");
- else if (key == SDLK_p) sm->activateScreen("Practice");
- else if (key == SDLK_SPACE || key == SDLK_PAUSE) m_audio.togglePause();
+ if (selected != 3) sm->activateScreen(m_menuOptions[selected].screen);
+ else sm->finished();
+ } else if (key == SDLK_SPACE || key == SDLK_PAUSE) m_audio.togglePause();
} else if (event.type == SDL_JOYBUTTONDOWN) {
int button = event.jbutton.button;
if (button == 9) sm->activateScreen("Songs");
@@ -64,10 +50,7 @@ void ScreenIntro::manageEvent(SDL_Event event) {
void ScreenIntro::draw() {
theme->bg.draw();
- if (selected == 0) theme->sing.draw();
- else if (selected == 1) theme->practice.draw();
- else if (selected == 2) theme->configure.draw();
- else if (selected == 3) theme->quit.draw();
+ m_menuOptions[selected].image.draw();
theme->top.draw();
if (m_dialog) m_dialog->draw();
}
diff --git a/game/screen_intro.hh b/game/screen_intro.hh
old mode 100644
new mode 100755
index c67ec33..7906f14
--- a/game/screen_intro.hh
+++ b/game/screen_intro.hh
@@ -3,6 +3,7 @@
#include "dialog.hh"
#include "screen.hh"
#include "theme.hh"
+#include "menu.hh"
#include <boost/scoped_ptr.hpp>
class Audio;
@@ -22,6 +23,7 @@ class ScreenIntro : public Screen {
Audio& m_audio;
Capture& m_capture;
boost::scoped_ptr<ThemeIntro> theme;
+ boost::ptr_vector<MenuOption> m_menuOptions;
boost::scoped_ptr<Dialog> m_dialog;
unsigned int selected;
};
diff --git a/game/theme.cc b/game/theme.cc
index 4ce64a7..026f8e6 100644
--- a/game/theme.cc
+++ b/game/theme.cc
@@ -42,9 +42,5 @@ ThemeConfiguration::ThemeConfiguration():
ThemeIntro::ThemeIntro():
Theme(getThemePath("intro_bg.svg")),
- sing(getThemePath("intro_sing.svg")),
- practice(getThemePath("intro_practice.svg")),
- configure(getThemePath("intro_configure.svg")),
- quit(getThemePath("intro_quit.svg")),
top(getThemePath("intro_top.svg"))
{}
diff --git a/game/theme.hh b/game/theme.hh
index 225162a..dbb49bd 100644
--- a/game/theme.hh
+++ b/game/theme.hh
@@ -62,14 +62,6 @@ struct ThemeConfiguration: Theme {
/// theme for intro screen
struct ThemeIntro: Theme {
ThemeIntro();
- /// sing option
- Surface sing;
- /// practice option
- Surface practice;
- /// configuration option
- Surface configure;
- /// quit option
- Surface quit;
/// top layer
Surface top;
};
diff --git a/themes/default/configuration_value.svg b/themes/default/configuration_value.svg
index fbdd01c..9c28453 100644
--- a/themes/default/configuration_value.svg
+++ b/themes/default/configuration_value.svg
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
+
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
@@ -15,9 +16,8 @@
height="600.000000"
id="svg559"
sodipodi:version="0.32"
- inkscape:version="0.46"
+ inkscape:version="0.47pre4 r22446"
sodipodi:docname="configuration_value.svg"
- sodipodi:docbase="/home/yoda/UltraStar/sf/UltraStar-ng/themes/lima"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs2522">
@@ -41,7 +41,7 @@
</rdf:RDF>
</metadata>
<sodipodi:namedview
- inkscape:window-height="797"
+ inkscape:window-height="724"
inkscape:window-width="1081"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
@@ -52,13 +52,14 @@
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
- inkscape:zoom="0.63"
- inkscape:cx="382.28027"
- inkscape:cy="304.78209"
+ inkscape:zoom="2.52"
+ inkscape:cx="395.84082"
+ inkscape:cy="267.82124"
inkscape:window-x="5"
- inkscape:window-y="73"
+ inkscape:window-y="25"
inkscape:current-layer="svg559"
- showgrid="false" />
+ showgrid="false"
+ inkscape:window-maximized="0" />
<text
x="400"
y="330"
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:44:18
|
Module: performous
Branch: dance
Commit: 92cac693dc33e725e35833ff98670be8acf40c94
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Dec 2 02:53:28 2009 +0200
Removed dllhelper, libda and plugin++ can only compile as static on Windows, libda plugins should get proper DLL declarations
---
libs/libda/include/libda/audio.hpp | 13 +++++++------
libs/libda/include/libda/audio_dev.hpp | 4 ++++
libs/libda/plugins/CMakeLists.txt | 5 +----
libs/libda/src/audio.cpp | 4 +---
libs/plugin++/include/plugin++/dll.hpp | 5 +++--
libs/plugin++/include/plugin++/dllhelper.hpp | 24 ------------------------
libs/plugin++/include/plugin++/plugin.hpp | 21 +++++++++++++++++++--
libs/plugin++/src/dll.cc | 2 --
8 files changed, 35 insertions(+), 43 deletions(-)
diff --git a/libs/libda/include/libda/audio.hpp b/libs/libda/include/libda/audio.hpp
index 4626f36..e2828f8 100644
--- a/libs/libda/include/libda/audio.hpp
+++ b/libs/libda/include/libda/audio.hpp
@@ -14,7 +14,6 @@ future versions (which hopefully will bring API and ABI compatibility).
#include "sample.hpp"
#include <boost/function.hpp>
#include <boost/scoped_ptr.hpp>
-#include <plugin++/dllhelper.hpp>
#include <cmath>
#include <cstddef>
#include <iosfwd>
@@ -22,6 +21,8 @@ future versions (which hopefully will bring API and ABI compatibility).
#include <string>
#include <vector>
+#define LIBDA_API
+
namespace da {
class init_impl;
@@ -31,7 +32,7 @@ namespace da {
* so that you can create multiple da::initialize objects.
* Do not, however, destroy the object while audio devices are still in use!
**/
- class DLL_PUBLIC initialize {
+ class LIBDA_API initialize {
init_impl* m_impl;
public:
initialize();
@@ -73,8 +74,8 @@ namespace da {
typedef boost::function<bool (pcm_data& it)> callback_t;
struct settings {
- DLL_PUBLIC static const std::size_t low;
- DLL_PUBLIC static const std::size_t high;
+ LIBDA_API static const std::size_t low;
+ LIBDA_API static const std::size_t high;
settings(std::string const& devstr = ""):
m_channels(high),
m_channels_near(true),
@@ -143,7 +144,7 @@ namespace da {
bool special() const { return !m_name.empty() && m_name[0] == '~'; }
};
- class DLL_PUBLIC record {
+ class LIBDA_API record {
public:
typedef std::vector<devinfo> devlist_t;
static devlist_t devices();
@@ -154,7 +155,7 @@ namespace da {
dev* m_handle;
};
- class DLL_PUBLIC playback {
+ class LIBDA_API playback {
public:
typedef std::vector<devinfo> devlist_t;
static devlist_t devices();
diff --git a/libs/libda/include/libda/audio_dev.hpp b/libs/libda/include/libda/audio_dev.hpp
index 10970f2..b27412f 100644
--- a/libs/libda/include/libda/audio_dev.hpp
+++ b/libs/libda/include/libda/audio_dev.hpp
@@ -8,6 +8,10 @@ This requires linking with libda and the ABI is not stable yet. The API might
also change.
**/
+#ifdef BUILDING_DA
+#define PLUGIN_MASTER
+#endif
+
#include <libda/audio.hpp>
#include <plugin++/plugin.hpp>
diff --git a/libs/libda/plugins/CMakeLists.txt b/libs/libda/plugins/CMakeLists.txt
index 0686be3..4606599 100644
--- a/libs/libda/plugins/CMakeLists.txt
+++ b/libs/libda/plugins/CMakeLists.txt
@@ -165,10 +165,7 @@ if(PLUGIN_TESTING)
add_library(da_audio_dev_tone MODULE audio_dev_tone.cpp)
install(TARGETS da_audio_dev_tone DESTINATION ${LibDA_PLUGIN_DIR})
if(APPLE OR WIN32)
- target_link_libraries(da_audio_dev_tone da)
- if(WIN32)
- target_link_libraries(da_audio_dev_tone plugin++)
- endif(WIN32)
+ target_link_libraries(da_audio_dev_tone da plugin++)
endif(APPLE OR WIN32)
endif(PLUGIN_TESTING)
diff --git a/libs/libda/src/audio.cpp b/libs/libda/src/audio.cpp
index 5dfb894..e1a8ecc 100644
--- a/libs/libda/src/audio.cpp
+++ b/libs/libda/src/audio.cpp
@@ -1,7 +1,5 @@
-#define BUILDING_DLL // So that we get dllexports everywhere instead of dllimports (this is some Windows crap)
+#define BUILDING_DA
#include <libda/audio_dev.hpp>
-#undef BUILDING_DLL
-
#include <libda/config.h>
#include <plugin++/loader.hpp>
#include <ostream>
diff --git a/libs/plugin++/include/plugin++/dll.hpp b/libs/plugin++/include/plugin++/dll.hpp
index 39aa091..51de65e 100644
--- a/libs/plugin++/include/plugin++/dll.hpp
+++ b/libs/plugin++/include/plugin++/dll.hpp
@@ -2,10 +2,11 @@
#ifndef DLL_HPP_INCLUDED
#define DLL_HPP_INCLUDED
-#include "dllhelper.hpp"
#include <stdexcept>
#include <string>
+#define Plugin_API
+
namespace plugin {
/// \brief Exception class for signaling runtime errors from class dll
@@ -15,7 +16,7 @@ namespace plugin {
};
/// \brief Dynamic library loader
- class DLL_PUBLIC dll {
+ class Plugin_API dll {
void* lib;
public:
/// Open a dynamic library
diff --git a/libs/plugin++/include/plugin++/dllhelper.hpp b/libs/plugin++/include/plugin++/dllhelper.hpp
deleted file mode 100644
index 612ab08..0000000
--- a/libs/plugin++/include/plugin++/dllhelper.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#undef DLL_PUBLIC
-
-#if defined _WIN32 || defined __CYGWIN__
-
-// A hack to allow static library build (for now) -Tronic
-#define DLL_PUBLIC
-#if 0
-#ifdef BUILDING_DLL
-#define DLL_PUBLIC __declspec(dllexport)
-#else
-#define DLL_PUBLIC __declspec(dllimport)
-#endif
-#endif
-
-#else
-
-#if __GNUC__ >= 4
-#define DLL_PUBLIC __attribute__ ((visibility("default")))
-#else
-#define DLL_PUBLIC
-#endif
-
-#endif
-
diff --git a/libs/plugin++/include/plugin++/plugin.hpp b/libs/plugin++/include/plugin++/plugin.hpp
index 3222e79..6c635c6 100644
--- a/libs/plugin++/include/plugin++/plugin.hpp
+++ b/libs/plugin++/include/plugin++/plugin.hpp
@@ -2,11 +2,28 @@
#ifndef PLUGIN_HPP_INCLUDED
#define PLUGIN_HPP_INCLUDED
-#include "dllhelper.hpp"
#include <map>
#include <stdexcept>
#include <string>
+#if defined _WIN32 || defined __CYGWIN__
+
+#ifdef PLUGIN_MASTER
+#define PLUGIN_REGISTRY_API __declspec(dllexport)
+#else
+#define PLUGIN_REGISTRY_API __declspec(dllimport)
+#endif
+
+#else
+
+#if __GNUC__ >= 4
+#define PLUGIN_REGISTRY_API __attribute__ ((visibility("default")))
+#else
+#define PLUGIN_REGISTRY_API
+#endif
+
+#endif
+
namespace plugin {
/**
@@ -25,7 +42,7 @@ namespace plugin {
template <typename Base,
typename Arg = std::string const&,
typename Key = std::string>
- class DLL_PUBLIC registry {
+ class PLUGIN_REGISTRY_API registry {
public:
typedef Base base_type;
typedef Arg arg_type;
diff --git a/libs/plugin++/src/dll.cc b/libs/plugin++/src/dll.cc
index e6dcef8..21e69b8 100644
--- a/libs/plugin++/src/dll.cc
+++ b/libs/plugin++/src/dll.cc
@@ -1,6 +1,4 @@
-#define BUILDING_DLL
#include <plugin++/dll.hpp>
-#undef BUILDING_DLL
#include <stdexcept>
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:44:17
|
Module: performous
Branch: dance
Commit: c7e7d586beeac8fd187c348b5377b73e8320ca43
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Dec 2 02:17:03 2009 +0200
config.h for plugin++
---
libs/plugin++/CMakeLists.txt | 9 +++++++--
libs/plugin++/cmake/config.h.in | 9 +++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/libs/plugin++/CMakeLists.txt b/libs/plugin++/CMakeLists.txt
index d311340..3821706 100644
--- a/libs/plugin++/CMakeLists.txt
+++ b/libs/plugin++/CMakeLists.txt
@@ -48,14 +48,19 @@ set_target_properties(plugin++ PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
)
+# Store version data in config.h
+set(CONFIG_H ${CMAKE_CURRENT_BINARY_DIR}/plugin++/config.h)
+configure_file(cmake/config.h.in ${CONFIG_H} ESCAPE_QUOTES @ONLY)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
if(NOT SLAVE_LIB)
include(cmake/plugin++-packaging.cmake)
install(TARGETS plugin++ EXPORT Plugin++ DESTINATION lib${LIB_SUFFIX})
FILE(GLOB HEADER_FILES "include/plugin++/*")
- install(FILES ${HEADER_FILES} DESTINATION include/plugin++)
-
+ install(FILES ${HEADER_FILES} ${CONFIG_H} DESTINATION include/plugin++)
+
# Install/generate CMake files for finding Plugin++
add_subdirectory(cmake)
endif()
diff --git a/libs/plugin++/cmake/config.h.in b/libs/plugin++/cmake/config.h.in
new file mode 100644
index 0000000..27e42cd
--- /dev/null
+++ b/libs/plugin++/cmake/config.h.in
@@ -0,0 +1,9 @@
+#ifndef PLUGIN_CONFIG_H
+#define PLUGIN_CONFIG_H
+
+#define PLUGIN_VERSION "@Plugin++_VERSION@"
+#define PLUGIN_VERSION_MAJOR @Plugin++_VERSION_MAJOR@
+#define PLUGIN_VERSION_MINOR @Plugin++_VERSION_MINOR@
+
+#endif
+
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:44:13
|
Module: performous Branch: dance Commit: 77bb4c3177e18a6cef5eba0e4d9b966959898128 Author: Xaldyz <xa...@us...> Date: Wed Dec 2 00:41:01 2009 +0100 Added Win32 HOWTO compile (draft) --- win32/README | 40 ++++ win32/gettext-0.17-variables.patch | 12 ++ win32/install.sh | 349 +++++++++++++++++++++++++++++++++ win32/mingw-cwchar.patch | 21 ++ win32/mingw-libstdc++.patch | 15 ++ win32/pkg-config.exe | Bin 0 -> 1387520 bytes win32/portaudio - Copia.patch | 380 ++++++++++++++++++++++++++++++++++++ win32/portaudio.patch | 175 +++++++++++++++++ win32/wget.exe | Bin 0 -> 162816 bytes 9 files changed, 992 insertions(+), 0 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:44:11
|
Module: performous
Branch: dance
Commit: 3714d473e1b11f1b30ae23dd6450b8e0c562a352
Author: Xaldyz <xa...@us...>
Date: Wed Dec 2 00:04:02 2009 +0100
Fixed library detection (under Windows) if DLLs are in PATH
---
cmake/Modules/FindAVCodec.cmake | 2 +-
cmake/Modules/FindAVFormat.cmake | 2 +-
cmake/Modules/FindAVUtil.cmake | 2 +-
cmake/Modules/FindSWScale.cmake | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmake/Modules/FindAVCodec.cmake b/cmake/Modules/FindAVCodec.cmake
index cdd8f69..400ac58 100644
--- a/cmake/Modules/FindAVCodec.cmake
+++ b/cmake/Modules/FindAVCodec.cmake
@@ -38,7 +38,7 @@ if(AVCodec_INCLUDE_DIR)
endif(AVCodec_INCLUDE_DIR)
find_library(AVCodec_LIBRARY
- NAMES avcodec
+ NAMES libavcodec.dll.a avcodec
PATHS ${AVCodec_PKGCONF_LIBRARY_DIRS}
)
diff --git a/cmake/Modules/FindAVFormat.cmake b/cmake/Modules/FindAVFormat.cmake
index 7c04c60..b02d2a6 100644
--- a/cmake/Modules/FindAVFormat.cmake
+++ b/cmake/Modules/FindAVFormat.cmake
@@ -36,7 +36,7 @@ if(AVFormat_INCLUDE_DIR)
endif(AVFormat_INCLUDE_DIR)
find_library(AVFormat_LIBRARY
- NAMES avformat
+ NAMES libavformat.dll.a avformat
PATHS ${AVFormat_PKGCONF_LIBRARY_DIRS}
)
diff --git a/cmake/Modules/FindAVUtil.cmake b/cmake/Modules/FindAVUtil.cmake
index 8d4fb4e..99bfbfb 100644
--- a/cmake/Modules/FindAVUtil.cmake
+++ b/cmake/Modules/FindAVUtil.cmake
@@ -34,7 +34,7 @@ if(AVUtil_INCLUDE_DIR)
endif(AVUtil_INCLUDE_DIR)
find_library(AVUtil_LIBRARY
- NAMES avutil
+ NAMES libavutil.dll.a avutil
PATHS ${AVUtil_PKGCONF_LIBRARY_DIRS}
)
diff --git a/cmake/Modules/FindSWScale.cmake b/cmake/Modules/FindSWScale.cmake
index ecd8da0..e675a51 100644
--- a/cmake/Modules/FindSWScale.cmake
+++ b/cmake/Modules/FindSWScale.cmake
@@ -36,7 +36,7 @@ if(SWScale_INCLUDE_DIR)
endif(SWScale_INCLUDE_DIR)
find_library(SWScale_LIBRARY
- NAMES swscale
+ NAMES libswscale.dll.a swscale
PATHS ${SWScale_PKGCONF_LIBRARY_DIRS}
)
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:44:08
|
Module: performous
Branch: dance
Commit: cf5cfe82618c8ecaf5193ead411fb3c57acb4c99
Author: Xaldyz <xa...@us...>
Date: Tue Dec 1 22:31:03 2009 +0100
libs/libda/plugins/CMakeLists.txt: fixed dll linkage problems
---
libs/libda/plugins/CMakeLists.txt | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libs/libda/plugins/CMakeLists.txt b/libs/libda/plugins/CMakeLists.txt
index 9dbd2f6..0686be3 100644
--- a/libs/libda/plugins/CMakeLists.txt
+++ b/libs/libda/plugins/CMakeLists.txt
@@ -166,6 +166,9 @@ if(PLUGIN_TESTING)
install(TARGETS da_audio_dev_tone DESTINATION ${LibDA_PLUGIN_DIR})
if(APPLE OR WIN32)
target_link_libraries(da_audio_dev_tone da)
+ if(WIN32)
+ target_link_libraries(da_audio_dev_tone plugin++)
+ endif(WIN32)
endif(APPLE OR WIN32)
endif(PLUGIN_TESTING)
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:44:06
|
Module: performous
Branch: dance
Commit: e9b5f8122e10c885d3ab84582804631457e52bb9
Author: Lasse Karkkainen <tro...@tr...>
Date: Tue Dec 1 23:07:45 2009 +0200
Fix libtiff detection
---
cmake/Modules/FindTiff.cmake | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cmake/Modules/FindTiff.cmake b/cmake/Modules/FindTiff.cmake
index dcc7988..bc4f92d 100644
--- a/cmake/Modules/FindTiff.cmake
+++ b/cmake/Modules/FindTiff.cmake
@@ -18,7 +18,7 @@ find_path(Tiff_INCLUDE_DIR
)
find_library(Tiff_LIBRARY
- NAMES libtiff
+ NAMES tiff
PATHS ${Tiff_PKGCONF_LIBRARY_DIRS}
)
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:44:03
|
Module: performous Branch: dance Commit: 1c2bb6d2f15ea46e0cc597dfd19293202634f8ed Author: unknown <Alde@.(none)> Date: Tue Dec 1 21:54:48 2009 +0100 Merge branch 'master' of ssh://git.performous.org/gitroot/performous/performous --- |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:59
|
Module: performous
Branch: dance
Commit: 5bbc7b330e828975e27c4a6a9ef39c2b1a70c1d6
Author: unknown <Alde@.(none)>
Date: Tue Dec 1 21:26:46 2009 +0100
Fixed GLEW to detect under MinGW
Fixed OpenGL to detect under MinGW
Updated CMakeLists.txt in game folder to build correct dependencies under Windows
Updated lib/libda/CMakeLists.txt to link with Boost system and filesystem (fix for Windows)
Updated CMakeLists.txt in lib/libda/plugins/CMakeLists.txt to link with libplugin++.a
Fixed libs/libda/plugins/audio_dev_pa19.cpp with #include<stdint.h>
Fixed tools/CMakeLists.txt to add correct dependencies under Windows
---
cmake/Modules/FindGLEW.cmake | 5 +++--
cmake/Modules/FindOpenGL.cmake | 4 ++--
game/CMakeLists.txt | 2 +-
libs/libda/CMakeLists.txt | 2 +-
libs/libda/plugins/CMakeLists.txt | 3 +++
libs/libda/plugins/audio_dev_pa19.cpp | 1 +
tools/CMakeLists.txt | 6 +++---
7 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/cmake/Modules/FindGLEW.cmake b/cmake/Modules/FindGLEW.cmake
index 7fb93a1..8040c33 100644
--- a/cmake/Modules/FindGLEW.cmake
+++ b/cmake/Modules/FindGLEW.cmake
@@ -14,12 +14,13 @@ include(LibFindMacros)
libfind_pkg_check_modules(OpenGL_PKGCONF gl)
find_path(GLEW_INCLUDE_DIR
- NAMES GL/glew.h
+ NAMES glew.h
PATHS ${OpenGL_INCLUDE_DIRS}
+ PATH_SUFFIXES GL
)
find_library(GLEW_LIBRARY
- NAMES GLEW GLEW32
+ NAMES GLEW GLEW32.a GLEW32
PATHS ${OpenGL_PKGCONF_LIBRARY_DIRS}
)
diff --git a/cmake/Modules/FindOpenGL.cmake b/cmake/Modules/FindOpenGL.cmake
index c37c380..7ac1128 100644
--- a/cmake/Modules/FindOpenGL.cmake
+++ b/cmake/Modules/FindOpenGL.cmake
@@ -20,12 +20,12 @@ find_path(OpenGL_INCLUDE_DIR
)
find_library(OpenGL_GL_LIBRARY
- NAMES GL OpenGL32
+ NAMES GL libOpenGL32.a OpenGL32
PATHS ${OpenGL_PKGCONF_LIBRARY_DIRS}
)
find_library(OpenGL_GLU_LIBRARY
- NAMES GLU GLU32
+ NAMES GLU libGLU32.a GLU32
PATHS ${OpenGL_PKGCONF_LIBRARY_DIRS}
)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index b2c5dd8..4e48a6c 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -20,7 +20,7 @@ else()
endif()
# Find all the libs that don't require extra parameters
-foreach(lib ${OUR_LIBS} SDL PangoCairo LibRSVG LibXML++ Magick++ GLEW AVFormat SWScale OpenGL)
+foreach(lib ${OUR_LIBS} SDL PangoCairo LibRSVG LibXML++ Magick++ GLEW AVFormat SWScale OpenGL Z Jpeg Tiff Png)
find_package(${lib} REQUIRED)
include_directories(${${lib}_INCLUDE_DIRS})
list(APPEND LIBS ${${lib}_LIBRARIES})
diff --git a/libs/libda/CMakeLists.txt b/libs/libda/CMakeLists.txt
index 76fe7eb..e6ea492 100644
--- a/libs/libda/CMakeLists.txt
+++ b/libs/libda/CMakeLists.txt
@@ -56,7 +56,7 @@ endif(CMAKE_COMPILER_IS_GNUCXX)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREAD ON)
-find_package(Boost 1.36 REQUIRED COMPONENTS thread date_time)
+find_package(Boost 1.36 REQUIRED COMPONENTS thread date_time system filesystem)
include_directories(${Boost_INCLUDE_DIRS})
if(SLAVE_LIB)
diff --git a/libs/libda/plugins/CMakeLists.txt b/libs/libda/plugins/CMakeLists.txt
index 3abb7ff..9dbd2f6 100644
--- a/libs/libda/plugins/CMakeLists.txt
+++ b/libs/libda/plugins/CMakeLists.txt
@@ -148,6 +148,9 @@ if(PLUGIN_PORTAUDIO)
install(TARGETS da_audio_dev_pa${Portaudio_VERSION} DESTINATION ${LibDA_PLUGIN_DIR})
if(APPLE OR WIN32)
target_link_libraries(da_audio_dev_pa${Portaudio_VERSION} da)
+ if(WIN32)
+ target_link_libraries(da_audio_dev_pa${Portaudio_VERSION} plugin++)
+ endif(WIN32)
endif(APPLE OR WIN32)
endif(PLUGIN_PORTAUDIO)
diff --git a/libs/libda/plugins/audio_dev_pa19.cpp b/libs/libda/plugins/audio_dev_pa19.cpp
index 2383c13..cdebacd 100644
--- a/libs/libda/plugins/audio_dev_pa19.cpp
+++ b/libs/libda/plugins/audio_dev_pa19.cpp
@@ -1,4 +1,5 @@
#include <libda/audio_dev.hpp>
+#include <stdint.h>
#include <portaudio.h>
#include <ostream>
#include <sstream>
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 5798c96..16c32ee 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -6,7 +6,7 @@ find_package(Boost 1.34 REQUIRED COMPONENTS filesystem program_options)
include_directories(${Boost_INCLUDE_DIRS})
# Find all the libs that don't require extra parameters
-foreach(lib LibXML++ Magick++)
+foreach(lib LibXML++ Magick++ Z Jpeg Tiff Png Freetype)
find_package(${lib})
if (${lib}_FOUND)
include_directories(${${lib}_INCLUDE_DIRS})
@@ -25,7 +25,7 @@ if (LibXML++_FOUND)
if (Boost_FOUND)
if (Magick++_FOUND)
add_executable(ss_extract ss_extract.cpp pak.cpp ipu_conv.cpp ss_cover.cpp)
- target_link_libraries(ss_extract ${LibXML++_LIBRARIES} ${Boost_LIBRARIES} ${Magick++_LIBRARIES})
+ target_link_libraries(ss_extract ${LibXML++_LIBRARIES} ${Boost_LIBRARIES} ${Magick++_LIBRARIES} ${Z_LIBRARIES} ${Jpeg_LIBRARIES} ${Tiff_LIBRARIES} ${Png_LIBRARIES} ${Freetype_LIBRARY} ${Magick++_LIBRARIES})
set(targets ${targets} ss_extract)
else (Magick++_FOUND)
message("No Magick++ found, not building ss_extract")
@@ -36,7 +36,7 @@ if (LibXML++_FOUND)
if (Magick++_FOUND)
add_executable(ss_cover_conv cover_conv.cpp pak.cpp ss_cover.cpp)
- target_link_libraries(ss_cover_conv ${Magick++_LIBRARIES} ${LibXML++_LIBRARIES})
+ target_link_libraries(ss_cover_conv ${Magick++_LIBRARIES} ${LibXML++_LIBRARIES} ${Z_LIBRARIES} ${Jpeg_LIBRARIES} ${Tiff_LIBRARIES} ${Png_LIBRARIES} ${Freetype_LIBRARY} ${Magick++_LIBRARIES})
set(targets ${targets} ss_cover_conv)
else (Magick++_FOUND)
message("No Magick++ found, not building ss_cover_conv")
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:57
|
Module: performous
Branch: dance
Commit: d0ecd40f969ed90411fc594f5e5c25962fcb9411
Author: Tapio Vierros <tap...@gm...>
Date: Tue Dec 1 17:14:36 2009 +0200
Whammy tweaks.
---
game/guitargraph.cc | 9 ++++-----
game/guitargraph.hh | 2 +-
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index d06b21c..7d0b806 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -198,9 +198,9 @@ void GuitarGraph::engine() {
double last = std::min(time, ev.dur->end);
double t = last - ev.holdTime;
if (t > 0) {
- // Minimal points for long holds unless whammy is used
- double wfactor = (ev.dur->end - ev.dur->begin < 1.5 || ev.whammy.get() > 0.01
- || m_starpower.get() > 0.01) ? 1.0 : 0.2;
+ // No points for long holds unless whammy is used
+ double wfactor = (time - ev.dur->begin < 1.5 || ev.whammy.get() > 0.01
+ || m_starpower.get() > 0.01) ? 1.0 : 0.0;
m_score += t * 50.0 * wfactor;
// Whammy fills starmeter much faster
m_starmeter += t * 50 * ( (ev.whammy.get() > 0.01) ? 2.0 : 1.0 );
@@ -615,8 +615,7 @@ void GuitarGraph::drawNote(int fret, glutil::Color c, float tBeg, float tEnd, fl
if (whammy > 0.1) {
while ((y -= fretWid) > yEnd + fretWid) {
float r = rand() / double(RAND_MAX);
- float r2 = rand() / double(RAND_MAX);
- vertexPair(x+cos(y*whammy)/4.0+(r-0.5)/4.0, y, c, r2*0.30 + 0.20);
+ vertexPair(x+cos(y*whammy)/4.0+(r-0.5)/4.0, y, c, 0.5f);
}
} else {
while ((y -= 10.0) > yEnd + fretWid) vertexPair(x, y, c, 0.5f);
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index f00ab96..e5fa231 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -104,7 +104,7 @@ class GuitarGraph {
int fret;
Duration const* dur;
double holdTime;
- Event(double t, int ty, int f = -1, Duration const* d = NULL): time(t), glow(0.0, 5.0), whammy(0.0, 1.2), type(ty), fret(f), dur(d), holdTime(d ? d->begin : getNaN()) { if (type > 0) glow.setValue(1.0); }
+ Event(double t, int ty, int f = -1, Duration const* d = NULL): time(t), glow(0.0, 5.0), whammy(0.0, 0.5), type(ty), fret(f), dur(d), holdTime(d ? d->begin : getNaN()) { if (type > 0) glow.setValue(1.0); }
};
typedef std::vector<Event> Events;
Events m_events;
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:56
|
Module: performous
Branch: dance
Commit: 7818f90de440932fb53d1a016405321f1660b76c
Author: Tapio Vierros <tap...@gm...>
Date: Tue Dec 1 16:08:57 2009 +0200
Moved some stuff away from the huge GuitarGraph::draw()
---
game/guitargraph.cc | 7 ++++++-
game/guitargraph.hh | 1 +
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 9103b9e..d06b21c 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -531,6 +531,12 @@ void GuitarGraph::draw(double time) {
m_neckglow.dimensions.screenBottom(0.0).middle(offsetX).fixedWidth(m_width.get());
m_neckglow.draw();
}
+ drawInfo(time, offsetX);
+ glColor3f(1.0f, 1.0f, 1.0f);
+}
+
+/// Draw popups and other info texts
+void GuitarGraph::drawInfo(double time, double offsetX) {
// Is Starpower ready?
if (canActivateStarpower(m_starmeter)) {
float a = (int(time * 1000.0) % 1000) / 1000.0;
@@ -563,7 +569,6 @@ void GuitarGraph::draw(double time) {
m_popupText->draw();
if (godAnim > 0.999) m_godmodePopup.setTarget(0.0, true);
}
- glColor3f(1.0f, 1.0f, 1.0f);
}
namespace {
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index 7f73b28..f00ab96 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -113,6 +113,7 @@ class GuitarGraph {
glutil::Color const& color(int fret) const;
void drawBar(double time, float h);
void drawNote(int fret, glutil::Color, float tBeg, float tEnd, float whammy = 0, bool tappable = false);
+ void drawInfo(double time, double offsetX);
void nextTrack();
void difficultyAuto(bool tryKeepCurrent = false);
bool difficulty(Difficulty level);
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:53
|
Module: performous
Branch: dance
Commit: ce033407f950b6665a2242d23fd757f9a24eeab3
Author: Tapio Vierros <tap...@gm...>
Date: Tue Dec 1 15:44:46 2009 +0200
More subtle lower neck glow.
---
themes/default/neck_glow.svg | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/themes/default/neck_glow.svg b/themes/default/neck_glow.svg
index f5510fa..7575eda 100644
--- a/themes/default/neck_glow.svg
+++ b/themes/default/neck_glow.svg
@@ -12,7 +12,7 @@
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="256"
- height="256"
+ height="128"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.47 r22583"
@@ -39,9 +39,9 @@
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
- inkscape:zoom="2.5115781"
- inkscape:cx="7.4039701"
- inkscape:cy="152.62316"
+ inkscape:zoom="1.7759539"
+ inkscape:cx="9.4369493"
+ inkscape:cy="44.237484"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:current-layer="svg2"
@@ -64,7 +64,7 @@
<linearGradient
id="linearGradient3655">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ style="stop-color:#ffffff;stop-opacity:0.627451;"
offset="0"
id="stop3657" />
<stop
@@ -282,12 +282,12 @@
</defs>
<path
sodipodi:type="arc"
- style="fill:url(#radialGradient3661);fill-opacity:1.0;fill-rule:nonzero;stroke:none;stroke-width:1.10901402999999998;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ style="fill:url(#radialGradient3661);fill-opacity:1.0;fill-rule:nonzero;stroke:none"
id="path2879"
sodipodi:cx="162.5"
sodipodi:cy="256"
sodipodi:rx="157.5"
sodipodi:ry="35"
d="m 320,256 a 157.5,35 0 1 1 -315,0 157.5,35 0 1 1 315,0 z"
- transform="matrix(0.80793651,0,0,2.2642857,-3.2896825,-323.65714)" />
+ transform="matrix(0.81269841,0,0,1.8285714,-4.063492,-340.11428)" />
</svg>
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:51
|
Module: performous
Branch: dance
Commit: 7b977546c2edd9fc9322c044d4f9d66c5a1bd3a4
Author: Tapio Vierros <tap...@gm...>
Date: Tue Dec 1 15:31:07 2009 +0200
ScoreWindow no longer appears too early for instruments.
---
game/screen_sing.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 35595b5..3933b23 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -299,7 +299,8 @@ void ScreenSing::draw() {
m_score_window->draw();
}
}
- else if (!m_audio.isPlaying() || (status == Song::FINISHED && m_audio.getLength() - time < 3.0)) {
+ else if (!m_audio.isPlaying() || (status == Song::FINISHED
+ && m_audio.getLength() - time <= (m_song->track_map.empty() ? 3.0 : 0.2) )) {
// Time to create the score window
m_quitTimer.setValue(QUIT_TIMEOUT);
m_engine->kill(); // kill the engine thread (to avoid consuming memory)
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:49
|
Module: performous
Branch: dance
Commit: d00b0c59bdaf9a6dd6e2d8a218ba41efa9a0e1b4
Author: Tapio Vierros <tap...@gm...>
Date: Tue Dec 1 15:22:26 2009 +0200
Introducing God Mode.
---
game/guitargraph.cc | 52 +++++++++++++++++++++++++++++++++++++-------------
game/guitargraph.hh | 3 +-
2 files changed, 40 insertions(+), 15 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index b95092d..9103b9e 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -78,6 +78,7 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, std::string track):
m_text(getThemePath("sing_timetxt.svg"), config["graphic/text_lod"].f()),
m_correctness(0.0, 5.0),
m_streakPopup(0.0, 1.0),
+ m_godmodePopup(0.0, 0.666),
m_score(),
m_scoreFactor(),
m_starmeter(),
@@ -92,7 +93,7 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, std::string track):
std::cout << e.what() << std::endl;
m_use3d = false;
}
- m_streakPopupText.reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
+ m_popupText.reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
unsigned int sr = m_audio.getSR();
if (m_drums) {
m_samples.push_back(Sample(getPath("sounds/drum_bass.ogg"), sr));
@@ -140,6 +141,7 @@ void GuitarGraph::engine() {
if (m_input.pressed(i)) m_hit[i + 1].setValue(1.0);
}
}
+ if (m_starpower.get() > 0.001) m_correctness.setTarget(1.0, true);
double whammy = 0;
// Handle all events
for (input::Event ev; m_input.tryPoll(ev);) {
@@ -212,10 +214,15 @@ void GuitarGraph::engine() {
m_streakPopup.setTarget(1.0);
m_bigStreak = getNextBigStreak(m_bigStreak);
}
+ if (m_starpower.get() > 0.01) m_correctness.setTarget(1.0, true);
}
void GuitarGraph::activateStarpower() {
- if (canActivateStarpower(m_starmeter)) { m_starmeter = 0; m_starpower.setValue(1.0); }
+ if (canActivateStarpower(m_starmeter)) {
+ m_starmeter = 0;
+ m_starpower.setValue(1.0);
+ m_godmodePopup.setTarget(1.0);
+ }
}
void GuitarGraph::endHold(int fret) {
@@ -292,7 +299,7 @@ void GuitarGraph::guitarPlay(double time, input::Event const& ev) {
endHold(fret);
}
} else {
- if (m_correctness.get() < 0.5) return; // Hammering not possible at the moment
+ if (m_correctness.get() < 0.5 && m_starpower.get() < 0.001) return; // Hammering not possible at the moment
for (int fret = ev.button + 1; fret < 5; ++fret) {
if (ev.pressed[fret]) return; // Extra buttons on right side
}
@@ -317,7 +324,8 @@ void GuitarGraph::guitarPlay(double time, input::Event const& ev) {
if (it->status > 0) continue; // Already tapped, can't tap again
if (!it->tappable) continue; // Cannot tap
Chords::iterator tmp = it;
- if (tmp == m_chords.begin() || (--tmp)->status == 0) continue; // The previous note not played
+ if ( (tmp == m_chords.begin() || (--tmp)->status == 0) &&
+ m_starpower.get() < 0.001) continue; // The previous note not played
}
if (!it->matches(frets)) continue;
double error = std::abs(it->begin - time);
@@ -499,12 +507,12 @@ void GuitarGraph::draw(double time) {
drawNote(fret, c, tBeg, tEnd, whammy, it->tappable);
}
}
- } // reverse scale sc1
- } // reverse rot rot1
- } // reverse trans tr2
- } // reverse push pmb
- } // reverse trans tr1
- } // reverse push pmm
+ } //< reverse scale sc1
+ } //< reverse rot rot1
+ } //< reverse trans tr2
+ } //< reverse push pmb
+ } //< reverse trans tr1
+ } //< reverse push pmm
// Bottom neck glow
if (ng_ccnt > 0) {
if (m_neckglowColor.r > 0 || m_neckglowColor.g > 0 || m_neckglowColor.b > 0) {
@@ -527,18 +535,34 @@ void GuitarGraph::draw(double time) {
if (canActivateStarpower(m_starmeter)) {
float a = (int(time * 1000.0) % 1000) / 1000.0;
m_text.dimensions.screenBottom(-0.02).middle(-0.12 + offsetX);
- m_text.draw("Starpower Ready!", a);
+ m_text.draw("God Mode Ready!", a);
}
// Draw streak pop-up for long streak intervals
double streakAnim = m_streakPopup.get();
if (streakAnim > 0.0) {
double s = 0.2 * (1.0 + streakAnim);
glColor4f(1.0f, 0.0f, 0.0f, 1.0 - streakAnim);
- m_streakPopupText->render(boost::lexical_cast<std::string>(unsigned(m_bigStreak)) + "\nStreak!");
- m_streakPopupText->dimensions().center(0.1).middle(0.0).stretch(s,s);
- m_streakPopupText->draw();
+ m_popupText->render(boost::lexical_cast<std::string>(unsigned(m_bigStreak)) + "\nStreak!");
+ m_popupText->dimensions().center(0.1).middle(0.0).stretch(s,s);
+ m_popupText->draw();
if (streakAnim > 0.999) m_streakPopup.setTarget(0.0, true);
}
+ // Draw godmode activation pop-up
+ double godAnim = m_godmodePopup.get();
+ if (godAnim > 0.0) {
+ float a = 1.0 - godAnim;
+ float s = 0.2 * (1.0 + godAnim);
+ glColor4f(0.3f, 0.0f, 1.0f, a);
+ m_popupText->render("God Mode\nActivated!");
+ m_popupText->dimensions().center(0.1).middle(0.0).stretch(s,s);
+ m_popupText->draw();
+ s = 0.12 * (1.0 + godAnim);
+ glColor4f(0.8f, 0.8f, 1.0f, a);
+ m_popupText->render("Mistakes ignored");
+ m_popupText->dimensions().center(0.26).middle(0.0).stretch(s, s/5.0);
+ m_popupText->draw();
+ if (godAnim > 0.999) m_godmodePopup.setTarget(0.0, true);
+ }
glColor3f(1.0f, 1.0f, 1.0f);
}
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index e00fa19..7f73b28 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -117,7 +117,7 @@ class GuitarGraph {
void difficultyAuto(bool tryKeepCurrent = false);
bool difficulty(Difficulty level);
SvgTxtTheme m_text;
- boost::scoped_ptr<SvgTxtThemeSimple> m_streakPopupText;
+ boost::scoped_ptr<SvgTxtThemeSimple> m_popupText;
void updateChords();
typedef std::vector<Chord> Chords;
Chords m_chords;
@@ -126,6 +126,7 @@ class GuitarGraph {
NoteStatus m_notes;
AnimValue m_correctness;
AnimValue m_streakPopup;
+ AnimValue m_godmodePopup;
double m_score;
double m_scoreFactor;
double m_starmeter;
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:47
|
Module: performous
Branch: dance
Commit: a3d822fb5a6e2f634babf8d4623a6fb388810bbe
Author: Tapio Vierros <tap...@gm...>
Date: Tue Dec 1 14:11:19 2009 +0200
Some new glutils.
---
game/glutil.hh | 27 +++++++++++++++++++++++++++
game/guitargraph.cc | 26 +++++++++++++-------------
2 files changed, 40 insertions(+), 13 deletions(-)
diff --git a/game/glutil.hh b/game/glutil.hh
index ad7f309..2d20d83 100644
--- a/game/glutil.hh
+++ b/game/glutil.hh
@@ -56,6 +56,33 @@ namespace glutil {
}
};
+ /// auto-reversing translation
+ struct Translation {
+ Translation(float _x, float _y, float _z = 0.0f): m_x(_x), m_y(_y), m_z(_z)
+ { glTranslatef(m_x, m_y, m_z); }
+ ~Translation() { glTranslatef(-m_x, -m_y, -m_z); }
+ private:
+ float m_x, m_y, m_z;
+ };
+
+ /// auto-reversing rotation
+ struct Rotation {
+ Rotation(float _a, float _x, float _y, float _z): m_a(_a), m_x(_x), m_y(_y), m_z(_z)
+ { glRotatef(m_a, m_x, m_y, m_z); }
+ ~Rotation() { glRotatef(-m_a, m_x, m_y, m_z); }
+ private:
+ float m_a, m_x, m_y, m_z;
+ };
+
+ /// auto-reversing scaling
+ struct Scale {
+ Scale(float _x, float _y, float _z): m_x(_x), m_y(_y), m_z(_z)
+ { glScalef(m_x, m_y, m_z); }
+ ~Scale() { glScalef(1.0/m_x, 1.0/m_y, 1.0/m_z); }
+ private:
+ float m_x, m_y, m_z;
+ };
+
/// struct to store color information
struct Color {
float r, ///< red component
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 663d3c8..b95092d 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -428,13 +428,13 @@ void GuitarGraph::draw(double time) {
float ng_r = 0, ng_g = 0, ng_b = 0; // neck glow color components
int ng_ccnt = 0; // neck glow color count
{
- glutil::PushMatrixMode pmm(GL_PROJECTION);
- glTranslatef(frac * 2.0 * offsetX, 0.0f, 0.0f);
- {
- glutil::PushMatrixMode pmb(GL_MODELVIEW);
- glTranslatef((1.0 - frac) * offsetX, dimensions.y2(), 0.0f);
- glRotatef(g_angle, 1.0f, 0.0f, 0.0f);
- { float s = dimensions.w() / 5.0f; glScalef(s, s, s); }
+ glutil::PushMatrixMode pmm(GL_PROJECTION); {
+ glutil::Translation tr1(frac * 2.0 * offsetX, 0.0f, 0.0f); {
+ glutil::PushMatrixMode pmb(GL_MODELVIEW); {
+ glutil::Translation tr2((1.0 - frac) * offsetX, dimensions.y2(), 0.0f); {
+ glutil::Rotation rot1(g_angle, 1.0f, 0.0f, 0.0f); {
+ float temp_s = dimensions.w() / 5.0f;
+ glutil::Scale sc1(temp_s, temp_s, temp_s);
// Draw the neck
{
UseTexture tex(*m_neck);
@@ -499,12 +499,12 @@ void GuitarGraph::draw(double time) {
drawNote(fret, c, tBeg, tEnd, whammy, it->tappable);
}
}
- glRotatef(-g_angle, 1.0f, 0.0f, 0.0f);
- glTranslatef(-(1.0 - frac) * offsetX, -dimensions.y2(), 0.0f);
- glScalef(5.0f, 5.0f, 5.0f);
- }
- glTranslatef(-frac * 2.0 * offsetX, 0.0f, 0.0f);
- }
+ } // reverse scale sc1
+ } // reverse rot rot1
+ } // reverse trans tr2
+ } // reverse push pmb
+ } // reverse trans tr1
+ } // reverse push pmm
// Bottom neck glow
if (ng_ccnt > 0) {
if (m_neckglowColor.r > 0 || m_neckglowColor.g > 0 || m_neckglowColor.b > 0) {
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:46
|
Module: performous Branch: dance Commit: 702579048155dc8d2f7b33b418b56daaaa61e5aa Author: Tapio Vierros <tap...@gm...> Date: Mon Nov 30 22:55:28 2009 +0200 Improved hammer note 3d object normals (better shading). --- themes/default/fret_tap.obj | 273 ++++++++++++++++++++++++++++++------------- 1 files changed, 189 insertions(+), 84 deletions(-) diff --git a/themes/default/fret_tap.obj b/themes/default/fret_tap.obj index 5f09083..668f822 100644 --- a/themes/default/fret_tap.obj +++ b/themes/default/fret_tap.obj @@ -1,89 +1,194 @@ -v -0.000000 -0.149998 0.152645 -v -0.106066 -0.106064 0.152645 -v -0.150000 0.000002 0.152645 -v -0.106066 0.106068 0.152645 -v 0.000000 0.150002 0.152645 -v 0.106066 0.106068 0.152645 -v 0.150000 0.000002 0.152645 -v 0.106066 -0.106064 0.152645 -v -0.000000 -0.106064 0.258711 -v -0.075000 -0.074998 0.258711 -v -0.106066 0.000002 0.258711 -v -0.075000 0.075002 0.258711 -v 0.000000 0.106068 0.258711 -v 0.075000 0.075002 0.258711 -v 0.106066 0.000002 0.258711 -v 0.075000 -0.074998 0.258711 -v 0.000000 0.000002 0.302645 +# Fret_tap object -vt 0.125000 0.500000 -vt 0.000000 0.500000 -vt 0.125000 0.250000 -vt 0.000000 0.250000 -vt 0.250000 0.250000 -vt 0.250000 0.500000 -vt 0.375000 0.250000 -vt 0.375000 0.500000 -vt 0.500000 0.250000 -vt 0.500000 0.500000 -vt 0.625000 0.250000 -vt 0.625000 0.500000 -vt 0.750000 0.250000 -vt 0.750000 0.500000 -vt 0.875000 0.250000 -vt 0.875000 0.500000 -vt 1.000000 0.250000 -vt 1.000000 0.500000 -vt 0.000000 0.000000 -vt 0.125000 0.000000 -vt 0.250000 0.000000 -vt 0.375000 0.000000 -vt 0.500000 0.000000 -vt 0.625000 0.000000 -vt 0.750000 0.000000 -vt 0.875000 0.000000 +v -0.0000000066 -0.1499983668 0.1526451111 +v -0.1060660183 -0.1060643867 0.1526451111 +v -0.1499999911 0.0000016412 0.1526451111 +v -0.1060659960 0.1060676649 0.1526451260 +v 0.0000000018 0.1500016153 0.1526451260 +v 0.1060659960 0.1060676649 0.1526451260 +v 0.1499999911 0.0000016734 0.1526451111 +v 0.1060660630 -0.1060643345 0.1526451111 +v -0.0000000046 -0.1060643941 0.2587111294 +v -0.0749999955 -0.0749983713 0.2587111294 +v -0.1060660183 0.0000016281 0.2587111294 +v -0.0749999806 0.0750016347 0.2587111294 +v 0.0000000013 0.1060676426 0.2587111294 +v 0.0749999881 0.0750016347 0.2587111294 +v 0.1060660183 0.0000016508 0.2587111294 +v 0.0750000328 -0.0749983415 0.2587111294 +v 0.0000000000 0.0000016149 0.3026450872 +v 0.0000000000 0.0000016323 0.1034809500 +v 0.0000000000 0.1181867570 0.1019213125 +v -0.0452275090 0.1091904789 0.1019213125 +v -0.0835694894 0.0835712776 0.1019213051 +v -0.1091888398 0.0452292934 0.1019213051 +v -0.1181851178 0.0000016325 0.1019213125 +v -0.1091888398 -0.0452257246 0.1019213051 +v -0.0835696384 -0.0835676938 0.1019213125 +v -0.0452275090 -0.1091872007 0.1019213051 +v 0.0000000000 -0.1181834787 0.1019213051 +v 0.0452275090 -0.1091872007 0.1019213051 +v 0.0835696384 -0.0835676938 0.1019213125 +v 0.1091888398 -0.0452257246 0.1019213051 +v 0.1181851178 0.0000016325 0.1019213125 +v 0.1091888398 0.0452292934 0.1019213051 +v 0.0835694894 0.0835712776 0.1019213051 +v 0.0452273563 0.1091904789 0.1019213125 +# 34 vertices -vn -0.357407 -0.862856 0.357407 -vn -0.862856 -0.357407 0.357407 -vn -0.862856 0.357407 0.357407 -vn -0.357407 0.862856 0.357407 -vn 0.357406 0.862856 0.357407 -vn 0.357407 0.862856 0.357407 -vn 0.862856 0.357407 0.357407 -vn 0.862856 -0.357406 0.357407 -vn 0.357407 -0.862856 0.357407 -vn -0.156558 -0.377964 0.912487 -vn -0.377964 -0.156558 0.912487 -vn -0.377964 0.156558 0.912487 -vn -0.156558 0.377964 0.912487 -vn 0.156558 0.377964 0.912487 -vn 0.377964 0.156558 0.912487 -vn 0.377964 -0.156558 0.912487 -vn 0.156558 -0.377964 0.912487 +vt 0.0000000000 0.5000000000 0.0000000000 +vt 0.1250000000 0.5000000000 0.0000000000 +vt 0.2500000000 0.5000000000 0.0000000000 +vt 0.3750000000 0.5000000000 0.0000000000 +vt 0.5000000000 0.5000000000 0.0000000000 +vt 0.6250000000 0.5000000000 0.0000000000 +vt 0.7500000000 0.5000000000 0.0000000000 +vt 0.8749999404 0.5000000000 0.0000000000 +vt 0.9999999404 0.5000000000 0.0000000000 +vt 0.0000000000 0.2500000000 0.0000000000 +vt 0.1250000000 0.2500000000 0.0000000000 +vt 0.2500000000 0.2500000000 0.0000000000 +vt 0.3750000000 0.2500000000 0.0000000000 +vt 0.5000000000 0.2500000000 0.0000000000 +vt 0.6250000000 0.2500000000 0.0000000000 +vt 0.7500000000 0.2500000000 0.0000000000 +vt 0.8749999404 0.2500000000 0.0000000000 +vt 0.9999999404 0.2500000000 0.0000000000 +vt 0.0000000000 0.0000000000 0.0000000000 +vt 0.1250000000 0.0000000000 0.0000000000 +vt 0.2500000000 0.0000000000 0.0000000000 +vt 0.3750000000 0.0000000000 0.0000000000 +vt 0.5000000000 0.0000000000 0.0000000000 +vt 0.6250000000 0.0000000000 0.0000000000 +vt 0.7500000000 0.0000000000 0.0000000000 +vt 0.8749999404 0.0000000000 0.0000000000 +vt 0.0000000000 1.0000000000 0.0000000000 +vt 0.0625000000 1.0000000000 0.0000000000 +vt 0.1250000000 1.0000000000 0.0000000000 +vt 0.1875000000 1.0000000000 0.0000000000 +vt 0.2500000000 1.0000000000 0.0000000000 +vt 0.3125000000 1.0000000000 0.0000000000 +vt 0.3750000000 1.0000000000 0.0000000000 +vt 0.4374999702 1.0000000000 0.0000000000 +vt 0.4999999702 1.0000000000 0.0000000000 +vt 0.5624999404 1.0000000000 0.0000000000 +vt 0.6249999404 1.0000000000 0.0000000000 +vt 0.6874999404 1.0000000000 0.0000000000 +vt 0.7500000000 1.0000000000 0.0000000000 +vt 0.8125000000 1.0000000000 0.0000000000 +vt 0.8750000000 1.0000000000 0.0000000000 +vt 0.9375000596 1.0000000000 0.0000000000 +vt 0.0000000000 0.9227918386 0.0000000000 +vt 0.9761041403 0.9227918386 0.0000000000 +vt 0.0386040956 0.9227918386 0.0000000000 +vt 0.0625000000 0.9227918386 0.0000000000 +vt 0.1011040956 0.9227918386 0.0000000000 +vt 0.1250000000 0.9227918386 0.0000000000 +vt 0.1636040956 0.9227918386 0.0000000000 +vt 0.1875000000 0.9227918386 0.0000000000 +vt 0.2261041105 0.9227918386 0.0000000000 +vt 0.2500000000 0.9227918386 0.0000000000 +vt 0.2886041105 0.9227918386 0.0000000000 +vt 0.3125000000 0.9227918386 0.0000000000 +vt 0.3511041105 0.9227918386 0.0000000000 +vt 0.3750000000 0.9227918386 0.0000000000 +vt 0.4136040807 0.9227918386 0.0000000000 +vt 0.4375000000 0.9227918386 0.0000000000 +vt 0.4761040807 0.9227918386 0.0000000000 +vt 0.4999999702 0.9227918386 0.0000000000 +vt 0.5386040211 0.9227918386 0.0000000000 +vt 0.5624999404 0.9227918386 0.0000000000 +vt 0.6011040807 0.9227918386 0.0000000000 +vt 0.6250000000 0.9227918386 0.0000000000 +vt 0.6636040211 0.9227918386 0.0000000000 +vt 0.6874999404 0.9227918386 0.0000000000 +vt 0.7261040807 0.9227918386 0.0000000000 +vt 0.7500000000 0.9227918386 0.0000000000 +vt 0.7886041403 0.9227918386 0.0000000000 +vt 0.8125000000 0.9227918386 0.0000000000 +vt 0.8511041403 0.9227918386 0.0000000000 +vt 0.8750000596 0.9227918386 0.0000000000 +vt 0.9136041403 0.9227918386 0.0000000000 +vt 0.9375000596 0.9227918386 0.0000000000 +# 74 texture vertices + +vn -0.0006326789 -0.0045822668 0.0018980372 +vn -0.0036875238 -0.0027927805 0.0018980370 +vn -0.0045822668 0.0006326793 0.0018980372 +vn -0.0027927801 0.0036875235 0.0018980375 +vn 0.0006326789 0.0045822668 0.0018980376 +vn 0.0036875233 0.0027927808 0.0018980375 +vn 0.0045822673 -0.0006326777 0.0018980372 +vn 0.0027927812 -0.0036875231 0.0018980368 +vn 0.0004025514 -0.0037669437 0.0032631406 +vn -0.0023789846 -0.0029482779 0.0032631408 +vn -0.0037669435 -0.0004025510 0.0032631408 +vn -0.0029482776 0.0023789846 0.0032631413 +vn -0.0004025509 0.0037669432 0.0032631410 +vn 0.0023789844 0.0029482779 0.0032631410 +vn 0.0037669435 0.0004025517 0.0032631408 +vn 0.0029482783 -0.0023789839 0.0032631406 +vn 0.0000000000 -0.0000000002 0.0049999999 +vn -0.0000000000 0.0000000001 0.0049999999 +vn 0.0000000000 0.0000659771 0.0049995645 +vn -0.0000252484 0.0000609549 0.0049995645 +vn -0.0000466531 0.0000466528 0.0049995645 +vn -0.0000609551 0.0000252485 0.0049995645 +vn -0.0000659771 0.0000000000 0.0049995645 +vn -0.0000609552 -0.0000252483 0.0049995645 +vn -0.0000466531 -0.0000466526 0.0049995645 +vn -0.0000252482 -0.0000609550 0.0049995645 +vn -0.0000000000 -0.0000659772 0.0049995645 +vn 0.0000252482 -0.0000609550 0.0049995645 +vn 0.0000466531 -0.0000466526 0.0049995645 +vn 0.0000609552 -0.0000252483 0.0049995645 +vn 0.0000659771 0.0000000000 0.0049995645 +vn 0.0000609551 0.0000252485 0.0049995645 +vn 0.0000466530 0.0000466528 0.0049995645 +vn 0.0000252484 0.0000609549 0.0049995645 +# 34 vertex normals g Fret_tap -f 2/1/1 1/2/1 10/3/1 -f 1/2/1 9/4/1 10/3/1 -f 11/5/2 3/6/2 2/1/2 -f 2/1/2 10/3/2 11/5/2 -f 12/7/3 4/8/3 3/6/3 -f 3/6/3 11/5/3 12/7/3 -f 13/9/4 5/10/4 4/8/4 -f 4/8/4 12/7/4 13/9/4 -f 14/11/5 6/12/5 5/10/5 -f 5/10/6 13/9/6 14/11/6 -f 15/13/7 7/14/7 6/12/7 -f 6/12/7 14/11/7 15/13/7 -f 16/15/8 8/16/8 7/14/8 -f 7/14/8 15/13/8 16/15/8 -f 9/17/9 1/18/9 8/16/9 -f 8/16/9 16/15/9 9/17/9 -f 17/19/10 10/3/10 9/4/10 -f 17/20/11 11/5/11 10/3/11 -f 17/21/12 12/7/12 11/5/12 -f 17/22/13 13/9/13 12/7/13 -f 17/23/14 14/11/14 13/9/14 -f 17/24/15 15/13/15 14/11/15 -f 17/25/16 16/15/16 15/13/16 -f 17/26/17 9/17/17 16/15/17 +f 10/11/10 2/2/2 1/1/1 +f 1/1/1 9/10/9 10/11/10 +f 11/12/11 3/3/3 2/2/2 +f 2/2/2 10/11/10 11/12/11 +f 12/13/12 4/4/4 3/3/3 +f 3/3/3 11/12/11 12/13/12 +f 13/14/13 5/5/5 4/4/4 +f 4/4/4 12/13/12 13/14/13 +f 14/15/14 6/6/6 5/5/5 +f 5/5/5 13/14/13 14/15/14 +f 15/16/15 7/7/7 6/6/6 +f 6/6/6 14/15/14 15/16/15 +f 16/17/16 8/8/8 7/7/7 +f 7/7/7 15/16/15 16/17/16 +f 9/18/9 1/9/1 8/8/8 +f 8/8/8 16/17/16 9/18/9 +f 17/19/17 10/11/10 9/10/9 +f 17/20/17 11/12/11 10/11/10 +f 17/21/17 12/13/12 11/12/11 +f 17/22/17 13/14/13 12/13/12 +f 17/23/17 14/15/14 13/14/13 +f 17/24/17 15/16/15 14/15/14 +f 17/25/17 16/17/16 15/16/15 +f 17/26/17 9/18/9 16/17/16 +f 18/27/18 19/43/19 20/45/20 +f 18/28/18 20/46/20 21/47/21 +f 18/29/18 21/48/21 22/49/22 +f 18/30/18 22/50/22 23/51/23 +f 18/31/18 23/52/23 24/53/24 +f 18/32/18 24/54/24 25/55/25 +f 18/33/18 25/56/25 26/57/26 +f 18/34/18 26/58/26 27/59/27 +f 18/35/18 27/60/27 28/61/28 +f 18/36/18 28/62/28 29/63/29 +f 18/37/18 29/64/29 30/65/30 +f 18/38/18 30/66/30 31/67/31 +f 18/39/18 31/68/31 32/69/32 +f 18/40/18 32/70/32 33/71/33 +f 18/41/18 33/72/33 34/73/34 +f 18/42/18 34/74/34 19/44/19 +# 40 faces +g |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:43
|
Module: performous Branch: dance Commit: ea955dbc1dd1e42c84567c9ba3e2cddf88fcbf02 Author: unknown <Alde@.(none)> Date: Mon Nov 30 21:47:17 2009 +0100 Merge branch 'master' of ssh://git.performous.org/gitroot/performous/performous --- |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:41
|
Module: performous Branch: dance Commit: 2ab964f0f9d8c0c8629dafb2b184d47c06dbf2b4 Author: Lasse Karkkainen <tro...@tr...> Date: Mon Nov 30 22:44:59 2009 +0200 Hack for Windows build --- libs/plugin++/include/plugin++/dllhelper.hpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/libs/plugin++/include/plugin++/dllhelper.hpp b/libs/plugin++/include/plugin++/dllhelper.hpp index bcb5593..612ab08 100644 --- a/libs/plugin++/include/plugin++/dllhelper.hpp +++ b/libs/plugin++/include/plugin++/dllhelper.hpp @@ -2,11 +2,15 @@ #if defined _WIN32 || defined __CYGWIN__ +// A hack to allow static library build (for now) -Tronic +#define DLL_PUBLIC +#if 0 #ifdef BUILDING_DLL #define DLL_PUBLIC __declspec(dllexport) #else #define DLL_PUBLIC __declspec(dllimport) #endif +#endif #else |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:39
|
Module: performous
Branch: dance
Commit: b89f9d6634daf6150009e967f00bbf186e7112e0
Author: Markus Raab <un...@ma...>
Date: Mon Nov 30 21:36:07 2009 +0100
Quick hack to show scores in players menu
---
game/database.cc | 2 +-
game/screen_players.cc | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/game/database.cc b/game/database.cc
index c53a57d..5b06dda 100644
--- a/game/database.cc
+++ b/game/database.cc
@@ -120,7 +120,7 @@ void Database::queryPerSongHiscore (std::ostream & os, boost::shared_ptr<Song> s
void Database::queryPerPlayerHiscore (std::ostream & os, std::string const& track) const {
int playerid = m_players.lookup(m_players.current().name);
- std::vector<HiscoreItem> hi = m_hiscores.queryHiscore(10, playerid, -1, track);
+ std::vector<HiscoreItem> hi = m_hiscores.queryHiscore(3, playerid, -1, track);
for (size_t i=0; i<hi.size(); ++i)
{
os << i+1 << ".\t"
diff --git a/game/screen_players.cc b/game/screen_players.cc
index 8caa6ba..ec4cd2c 100644
--- a/game/screen_players.cc
+++ b/game/screen_players.cc
@@ -102,7 +102,7 @@ void ScreenPlayers::draw() {
std::string music, songbg, video;
double videoGap = 0.0;
std::ostringstream oss_song, oss_order;
- // Test if there are no songs
+ // Test if there are no players currently selected
if (m_players.empty()) {
// Format the song information text
if (m_search.text.empty()) {
@@ -118,8 +118,9 @@ void ScreenPlayers::draw() {
oss_song << m_database.scores.front().track << "\n";
oss_song << "You reached " << m_database.scores.front().score << " points!";
oss_order << "Please enter your Name!\n"
- << "Name: " << m_players.current().name << '\n'
- << "Search Text: "
+ << "Name: " << m_players.current().name << '\n';
+ m_database.queryPerPlayerHiscore(oss_order);
+ oss_order << "\nSearch Text: "
<< (m_search.text.empty() ? std::string("please enter") : m_search.text)
<< '\n';
double spos = m_players.currentPosition(); // This needs to be polled to run the animation
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:38
|
Module: performous Branch: dance Commit: b2aebfe58408378155d17df368e5fc42a18719d7 Author: Miguel Sánchez de León Peque <msd...@gm...> Date: Mon Nov 30 21:35:55 2009 +0100 Merge branch 'menu' of ssh://mslp@git.performous.org/gitroot/performous/performous into menu --- |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:35
|
Module: performous Branch: dance Commit: 81c35b5159236a337400fcc7805e71e0e3e3af74 Author: Tapio Vierros <tap...@gm...> Date: Mon Nov 30 21:30:18 2009 +0200 Initial implementation of glow effect from bottom of instrument necks when playing correctly. --- game/guitargraph.cc | 23 ++++ game/guitargraph.hh | 3 + themes/default/neck_glow.svg | 293 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 319 insertions(+), 0 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:33
|
Module: performous Branch: dance Commit: b0c68405e1313114d9f765f3105d75cdf965ed53 Author: Lasse Karkkainen <tro...@tr...> Date: Mon Nov 30 20:24:47 2009 +0200 Extra guitar docs --- docs/instruments.txt | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/docs/instruments.txt b/docs/instruments.txt index e76a195..7afcd50 100644 --- a/docs/instruments.txt +++ b/docs/instruments.txt @@ -16,6 +16,8 @@ Ex: A5- => SDL axis 4 with negative value START: B10 SELECT: B9 PS3: B13 + STAR POWER: N/A? + MIC SWITCH: N/A? DOWN: A6+ UP: A6- LEFT: A5- @@ -60,6 +62,8 @@ Ex: A5- => SDL axis 4 with negative value START: B10 SELECT: B9 PS3: B13 + STAR POWER: B5 + MIC SWITCH: A4 DOWN: A6+ UP: A6- LEFT: A5- |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:31
|
Module: performous
Branch: dance
Commit: 0687af67c912dd72102915d9cc0c3acd0002e0d9
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Nov 30 19:48:15 2009 +0200
Making STARPOWER appear as a button instead of separate event type (simplifies joystick.cc greatly) and fixing related bug (all frets getting pressed status when activated). Some cleanup on guitargraph.cc as well.
---
game/guitargraph.cc | 12 +++++++-----
game/joystick.cc | 38 ++++++++++----------------------------
game/joystick.hh | 3 ++-
3 files changed, 19 insertions(+), 34 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 6dfee01..7bd4f37 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -142,12 +142,14 @@ void GuitarGraph::engine() {
// Handle all events
for (input::Event ev; m_input.tryPoll(ev);) {
m_dead = false;
- if (!m_drums && ev.type == input::Event::RELEASE) {
- endHold(ev.button);
+ if (!m_drums) {
+ if ((ev.type == input::Event::PRESS || ev.type == input::Event::RELEASE) && ev.button == input::STARPOWER_BUTTON) {
+ if (ev.type == input::Event::PRESS) activateStarpower();
+ continue;
+ }
+ if (ev.type == input::Event::RELEASE) endHold(ev.button);
+ if (ev.type == input::Event::WHAMMY) whammy = (1.0 + ev.button + 2.0*(rand()/double(RAND_MAX))) / 4.0;
}
- if (!m_drums && ev.type == input::Event::WHAMMY)
- whammy = (1.0 + ev.button + 2.0*(rand()/double(RAND_MAX))) / 4.0;
- if (!m_drums && ev.type == input::Event::STARPOWER) activateStarpower();
if (ev.type == input::Event::PRESS) m_hit[!m_drums + ev.button].setValue(1.0);
else if (ev.type == input::Event::PICK) m_hit[0].setValue(1.0);
if (time < -0.5) {
diff --git a/game/joystick.cc b/game/joystick.cc
index 30eeaba..1627416 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -215,14 +215,8 @@ bool input::SDL::pushEvent(SDL_Event _e) {
}
devices[joy_id].addEvent(event);
return true;
- case SDLK_F6:
- event.type = input::Event::STARPOWER;
- event.button = 1;
- for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
- event.pressed[i] = devices[joy_id].pressed(i);
- }
- devices[joy_id].addEvent(event);
- return true;
+ case SDLK_F6: case SDLK_6:
+ button++;
case SDLK_F5: case SDLK_5:
button++;
case SDLK_F4: case SDLK_4:
@@ -262,14 +256,8 @@ bool input::SDL::pushEvent(SDL_Event _e) {
}
devices[joy_id].addEvent(event);
return true;
- case SDLK_F6:
- event.type = input::Event::STARPOWER;
- event.button = 0;
- for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
- event.pressed[i] = devices[joy_id].pressed(i);
- }
- devices[joy_id].addEvent(event);
- return true;
+ case SDLK_F6: case SDLK_6:
+ button++;
case SDLK_F5: case SDLK_5:
button++;
case SDLK_F4: case SDLK_4:
@@ -334,14 +322,10 @@ bool input::SDL::pushEvent(SDL_Event _e) {
if(!devices[joy_id].assigned()) return false;
button = buttonFromSDL(devices[joy_id].type(),_e.jbutton.button);
if( button == -1 ) return false;
- if( button == 5) {
- event.type = input::Event::STARPOWER;
- } else {
- for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
- event.pressed[i] = devices[joy_id].pressed(i);
- }
- event.type = input::Event::PRESS;
+ for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
+ event.pressed[i] = devices[joy_id].pressed(i);
}
+ event.type = input::Event::PRESS;
event.button = button;
event.pressed[button] = true;
devices[joy_id].addEvent(event);
@@ -351,12 +335,10 @@ bool input::SDL::pushEvent(SDL_Event _e) {
if(!devices[joy_id].assigned()) return false;
button = buttonFromSDL(devices[joy_id].type(),_e.jbutton.button);
if( button == -1 ) return false;
- if( button != 5) {
- for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
- event.pressed[i] = devices[joy_id].pressed(i);
- }
- event.type = input::Event::RELEASE;
+ for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
+ event.pressed[i] = devices[joy_id].pressed(i);
}
+ event.type = input::Event::RELEASE;
event.button = button;
event.pressed[button] = false;
devices[joy_id].addEvent(event);
diff --git a/game/joystick.hh b/game/joystick.hh
index 23f5da4..f476212 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -19,9 +19,10 @@ namespace input {
enum DevType { GUITAR, DRUMS };
static const std::size_t BUTTONS = 6;
+ static const std::size_t STARPOWER_BUTTON = BUTTONS - 1;
struct Event {
- enum Type { PRESS, RELEASE, PICK, WHAMMY, STARPOWER };
+ enum Type { PRESS, RELEASE, PICK, WHAMMY };
Type type;
int button; // Translated button number for press/release events. 0 for pick down, 1 for pick up (NOTE: these are NOT pick press/release events but rather different directions)
bool pressed[BUTTONS]; // All events tell the button state right after the event happened
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:29
|
Module: performous
Branch: dance
Commit: abb36a2a99c7a197d6e2477bad0a2b62564b5341
Author: Tapio Vierros <tap...@gm...>
Date: Mon Nov 30 15:59:12 2009 +0200
Starpower gameplay tweaks.
---
game/guitargraph.cc | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 512552f..6dfee01 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -193,7 +193,8 @@ void GuitarGraph::engine() {
double t = last - ev.holdTime;
if (t > 0) {
// Minimal points for long holds unless whammy is used
- double wfactor = (ev.dur->end - ev.dur->begin < 1.5 || ev.whammy.get() > 0.01) ? 1.0 : 0.2;
+ double wfactor = (ev.dur->end - ev.dur->begin < 1.5 || ev.whammy.get() > 0.01
+ || m_starpower.get() > 0.01) ? 1.0 : 0.2;
m_score += t * 50.0 * wfactor;
// Whammy fills starmeter much faster
m_starmeter += t * 50 * ( (ev.whammy.get() > 0.01) ? 2.0 : 1.0 );
@@ -228,10 +229,12 @@ void GuitarGraph::endStreak() {
void GuitarGraph::fail(double time, int fret) {
std::cout << "MISS" << std::endl;
if (fret == -2) return; // Tapped note
- m_events.push_back(Event(time, 0, fret));
- if (fret < 0) fret = std::rand();
- m_audio.play(m_samples[unsigned(fret) % m_samples.size()], "audio/fail_volume");
- if (m_starpower.get() < 0.01) m_score -= 50;
+ if (m_starpower.get() < 0.01) {
+ m_events.push_back(Event(time, 0, fret));
+ if (fret < 0) fret = std::rand();
+ m_audio.play(m_samples[unsigned(fret) % m_samples.size()], "audio/fail_volume");
+ m_score -= 50;
+ }
endStreak();
}
|