You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(288) |
Aug
(119) |
Sep
(31) |
Oct
(59) |
Nov
(458) |
Dec
(359) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(268) |
Feb
(26) |
Mar
(36) |
Apr
(48) |
May
(119) |
Jun
(37) |
Jul
(173) |
Aug
(429) |
Sep
(137) |
Oct
(156) |
Nov
(59) |
Dec
(45) |
| 2011 |
Jan
(398) |
Feb
(257) |
Mar
(49) |
Apr
(5) |
May
(34) |
Jun
(11) |
Jul
(38) |
Aug
(12) |
Sep
(1) |
Oct
(49) |
Nov
(5) |
Dec
(10) |
| 2012 |
Jan
(21) |
Feb
(32) |
Mar
(20) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(173) |
Aug
|
Sep
(25) |
Oct
(6) |
Nov
(44) |
Dec
|
|
From: Tapio V. <aa...@us...> - 2010-10-31 15:49:46
|
Module: performous Branch: master Commit: 704a0e00c7783a29e9258c417882071286445d75 Author: Tapio Vierros <tap...@gm...> Date: Sun Oct 31 17:49:09 2010 +0200 Bump version to 0.6.1 --- CMakeLists.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dc1921d..03f0872 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ project(Performous CXX C) cmake_minimum_required(VERSION 2.6) cmake_policy(VERSION 2.6) -set(PROJECT_VERSION "0.6.0+") +set(PROJECT_VERSION "0.6.1") # Avoid source tree pollution if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) |
|
From: Tapio V. <aa...@us...> - 2010-10-31 15:49:44
|
Module: performous
Branch: master
Commit: 64aa74f044e6ef3a5f0107dd3728cad6affd27fc
Author: Tapio Vierros <tap...@gm...>
Date: Sun Oct 31 17:48:35 2010 +0200
Make Windows installer songdir shortcut work.
---
win32/cross-from-debian/makepackage.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/win32/cross-from-debian/makepackage.py b/win32/cross-from-debian/makepackage.py
index ead4213..2277820 100755
--- a/win32/cross-from-debian/makepackage.py
+++ b/win32/cross-from-debian/makepackage.py
@@ -85,12 +85,12 @@ for root, dirs, files in os.walk('.'):
makensis.stdin.write(r''' WriteRegStr HKLM "Software\Performous" "" "$INSTDIR"
WriteUninstaller "$INSTDIR\uninst.exe"
- CreateDirectory "$APPDATA\performous\songs"
SetShellVarContext all
+ CreateDirectory "$INSTDIR\songs"
CreateDirectory "$SMPROGRAMS\Performous"
CreateShortcut "$SMPROGRAMS\Performous\Performous.lnk" "$INSTDIR\bin\performous.exe"
CreateShortCut "$SMPROGRAMS\Performous\ConfigureSongDirectory.lnk" "$INSTDIR\bin\ConfigureSongDirectory.bat"
- CreateShortCut "$SMPROGRAMS\Performous\Songs.lnk" "$APPDATA\performous\songs"
+ CreateShortCut "$SMPROGRAMS\Performous\Songs.lnk" "$INSTDIR\songs"
CreateShortcut "$SMPROGRAMS\Performous\Uninstall.lnk" "$INSTDIR\uninst.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Performous" "DisplayName" "Performous"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Performous" "UninstallString" "$\"$INSTDIR\uninst.exe$\""
|
|
From: Tapio V. <aa...@us...> - 2010-10-31 10:06:15
|
Module: web Branch: master Commit: 5658e1cc01a204e0b3caf0830458929be6f21ed3 Author: Tapio Vierros <tap...@gm...> Date: Sun Oct 31 12:05:33 2010 +0200 Draft 0.6.1 release announcement. --- htdocs-source/index.txt | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/htdocs-source/index.txt b/htdocs-source/index.txt index 986986d..449f3ce 100644 --- a/htdocs-source/index.txt +++ b/htdocs-source/index.txt @@ -1,5 +1,15 @@ Announcements +:h2:2010-10-31 - 0.6.1 released + +This is a small but important bugfix release most notably fixing issues with non-UTF-8 device names under localized Windows. The full list of changes can be read below. We provide Windows installer and the Ubuntu ppa is updated. + + Fix character encoding bug in device names + Windows installer improvements + Joinmenu usability tweaks + Menu performance optimizations + Spanish translation updated + :h2:2010-10-24 - 0.6.0 released The long overdue 0.6.0 release is now here. This release brings many technological improvements as well as a lot of new gameplay features. Thanks for all the new (and old) contributors. |
|
From: Tapio V. <aa...@us...> - 2010-10-31 10:06:12
|
Module: web Branch: master Commit: 1995e04407145fd97e7350c09df42448e28edced Author: Tapio Vierros <tap...@gm...> Date: Sun Oct 31 11:57:58 2010 +0200 Add a profile for me. --- deploy.sh | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/deploy.sh b/deploy.sh index a948868..7b76c42 100644 --- a/deploy.sh +++ b/deploy.sh @@ -21,6 +21,11 @@ case $1 in GITPATH=~/git/performous/web SITEPATH=yoda-jm,per...@we...:htdocs/ ;; + aave) + # deploying on performous.org + GITPATH=~/src/performous-web + SITEPATH=performous.org:/wwwhome/performous/ + ;; aave000) # deploying on performous.sf.net (backup) GITPATH=~/src/performous-web |
|
From: Tapio V. <aa...@us...> - 2010-10-31 09:54:35
|
Module: web Branch: master Commit: c3b32821b458f0fe09f85c39cf16381598c6c4ec Author: Tapio Vierros <tap...@gm...> Date: Sun Oct 31 11:53:48 2010 +0200 Uploaded new joinmenu screenshot for 0.6.1 --- htdocs-binary/screenshots/0.6.0/joinmenu.jpg | Bin 39194 -> 38181 bytes 1 files changed, 0 insertions(+), 0 deletions(-) diff --git a/htdocs-binary/screenshots/0.6.0/joinmenu.jpg b/htdocs-binary/screenshots/0.6.0/joinmenu.jpg index dbeab88..ad28162 100644 Binary files a/htdocs-binary/screenshots/0.6.0/joinmenu.jpg and b/htdocs-binary/screenshots/0.6.0/joinmenu.jpg differ |
|
From: Tapio V. <aa...@us...> - 2010-10-29 11:08:35
|
Module: performous
Branch: opengl2
Commit: 38af1e04f1d64e0a9b6b4fe1d28f213b10821f70
Author: Tapio Vierros <tap...@gm...>
Date: Fri Oct 29 14:06:15 2010 +0300
Shader refactoring.
* New RAII Shader class to replace previous functions.
* The core shader is a static member of Window-class.
---
game/glshader.cc | 72 ++++++++++++++-----------------------------------
game/glshader.hh | 21 ++++++++------
game/surface.hh | 18 +++++-------
game/video_driver.cc | 39 +++++++++++++++++++++++++--
game/video_driver.hh | 4 +++
5 files changed, 81 insertions(+), 73 deletions(-)
diff --git a/game/glshader.cc b/game/glshader.cc
index 6c9c971..e0e0bd9 100644
--- a/game/glshader.cc
+++ b/game/glshader.cc
@@ -1,62 +1,32 @@
+#include "glshader.hh"
#include "glutil.hh"
-namespace {
- const char *vertex_glsl =
- "void main()"
- "{"
- " gl_FrontColor = gl_Color;"
- " gl_BackColor = gl_Color;"
- " gl_TexCoord[0] = gl_MultiTexCoord0;"
- " gl_Position = ftransform();"
- "}\000";
-
- const char *fragment_glsl =
- "uniform int texMode;"
- "uniform sampler2D tex;"
- "uniform sampler2DRect texrect;"
- "void main()"
- "{"
- " vec4 texel;"
- " vec4 color;"
- " if (texMode == 1) {"
- " texel = texture2D(tex,gl_TexCoord[0].st).rgba;"
- " } else if (texMode == 2) {"
- " texel = texture(texrect,gl_TexCoord[0].st).rgba;"
- " } else if (texMode == 0) {"
- " texel = gl_Color;"
- " } else {"
- " texel = vec4(1.0,0.0,0.0,1.0);"
- " }"
- " gl_FragColor = vec4(texel.rgb*gl_Color.rgb,texel.a*gl_Color.a);"
- "}\000";
-}
-
-void glshader::newShader(struct glshader::Shader *s) {
- s->vert_shader = glCreateShader(GL_VERTEX_SHADER);
- s->frag_shader = glCreateShader(GL_FRAGMENT_SHADER);
+Shader::Shader(const char* vertex_shader, const char* fragment_shader) {
+ vert_shader = glCreateShader(GL_VERTEX_SHADER);
+ frag_shader = glCreateShader(GL_FRAGMENT_SHADER);
- glShaderSource(s->vert_shader, 1, &vertex_glsl, NULL);
- glShaderSource(s->frag_shader, 1, &fragment_glsl, NULL);
+ glShaderSource(vert_shader, 1, &vertex_shader, NULL);
+ glShaderSource(frag_shader, 1, &fragment_shader, NULL);
- glCompileShader(s->vert_shader);
- glGetShaderiv(s->vert_shader,GL_COMPILE_STATUS,&(s->gl_response));
- if (s->gl_response != GL_TRUE) std::cerr << "Something went wrong compiling the vertex shader." << std::endl;
+ glCompileShader(vert_shader);
+ glGetShaderiv(vert_shader,GL_COMPILE_STATUS, &gl_response);
+ if (gl_response != GL_TRUE) std::cerr << "Something went wrong compiling the vertex shader." << std::endl;
- glCompileShader(s->frag_shader);
- glGetShaderiv(s->frag_shader,GL_COMPILE_STATUS,&(s->gl_response));
- if (s->gl_response != GL_TRUE) std::cerr << "Something went wrong compiling the fragment shader." << std::endl;
+ glCompileShader(frag_shader);
+ glGetShaderiv(frag_shader, GL_COMPILE_STATUS, &gl_response);
+ if (gl_response != GL_TRUE) std::cerr << "Something went wrong compiling the fragment shader." << std::endl;
- s->program = glCreateProgram();
+ program = glCreateProgram();
- glAttachShader(s->program,s->vert_shader);
- glAttachShader(s->program,s->frag_shader);
+ glAttachShader(program, vert_shader);
+ glAttachShader(program, frag_shader);
- glLinkProgram(s->program);
- glUseProgram(s->program);
+ glLinkProgram(program);
+ glUseProgram(program);
}
-void glshader::deleteShader(struct glshader::Shader *s) {
- glDeleteProgram(s->program);
- glDeleteShader(s->vert_shader);
- glDeleteShader(s->frag_shader);
+Shader::~Shader() {
+ glDeleteProgram(program);
+ glDeleteShader(vert_shader);
+ glDeleteShader(frag_shader);
}
diff --git a/game/glshader.hh b/game/glshader.hh
index 073d6d2..24b2668 100644
--- a/game/glshader.hh
+++ b/game/glshader.hh
@@ -1,11 +1,14 @@
#pragma once
-namespace glshader {
- struct Shader {
- GLuint program, vert_shader, frag_shader;
- int gl_response;
- };
-
- void newShader(struct Shader *s);
- void deleteShader(struct Shader *s);
-}
+#include <string>
+#include <GL/glew.h>
+
+struct Shader {
+ Shader(const char* vertex_shader, const char* fragment_shader);
+ Shader() {};
+ ~Shader();
+
+ GLuint program, vert_shader, frag_shader;
+ int gl_response;
+};
+
diff --git a/game/surface.hh b/game/surface.hh
index ad63b2c..44f187c 100644
--- a/game/surface.hh
+++ b/game/surface.hh
@@ -1,14 +1,13 @@
#pragma once
#include "glutil.hh"
+#include "video_driver.hh"
#include <stdexcept>
#include <string>
#include <boost/noncopyable.hpp>
#include <cairo.h>
#include <vector>
-extern struct glshader::Shader shader;
-
/// class for geometry stuff
class Dimensions {
public:
@@ -122,9 +121,9 @@ class UseTexture: boost::noncopyable {
public:
/// constructor
template <GLenum Type> UseTexture(OpenGLTexture<Type> const& s): m_type(s.type()) {
- GLint texmodeloc = glGetUniformLocation(shader.program, "texMode");
- GLint texloc = glGetUniformLocation(shader.program, "tex");
- GLint texrectloc = glGetUniformLocation(shader.program, "texrect");
+ GLint texmodeloc = glGetUniformLocation(Window::shader.program, "texMode");
+ GLint texloc = glGetUniformLocation(Window::shader.program, "tex");
+ GLint texrectloc = glGetUniformLocation(Window::shader.program, "texrect");
glUniform1i(texloc, 0);
glUniform1i(texrectloc, 1);
@@ -132,16 +131,15 @@ class UseTexture: boost::noncopyable {
glEnable(m_type);
switch (Type) {
- case GL_TEXTURE_2D: glActiveTexture(GL_TEXTURE0); glUniform1i(texmodeloc, 1); break;
- case GL_TEXTURE_RECTANGLE_ARB: glActiveTexture(GL_TEXTURE0+1); glUniform1i(texmodeloc, 2); break;
- default: glUniform1i(texmodeloc, 3); break;
+ case GL_TEXTURE_2D: glActiveTexture(GL_TEXTURE0); glUniform1i(texmodeloc, 1); break;
+ case GL_TEXTURE_RECTANGLE_ARB: glActiveTexture(GL_TEXTURE0+1); glUniform1i(texmodeloc, 2); break;
+ default: glUniform1i(texmodeloc, 3); break;
}
glBindTexture(m_type, s.id());
}
~UseTexture() {
- GLint texmodeloc = glGetUniformLocation(shader.program, "texMode");
-
+ GLint texmodeloc = glGetUniformLocation(Window::shader.program, "texMode");
glDisable(m_type);
glUniform1i(texmodeloc, 0);
}
diff --git a/game/video_driver.cc b/game/video_driver.cc
index 81b091e..b6a837a 100644
--- a/game/video_driver.cc
+++ b/game/video_driver.cc
@@ -10,7 +10,6 @@
#include <fstream>
#include <SDL.h>
-struct glshader::Shader shader;
namespace {
unsigned s_width;
@@ -31,11 +30,45 @@ namespace {
SDL_GLattr m_attr;
int m_value;
};
+
+ // FIXME: In general, shaders should be loaded from theme files.
+ // Does that apply to these core shaders too?
+
+ const char *vertex_glsl =
+ "void main()"
+ "{"
+ " gl_FrontColor = gl_Color;"
+ " gl_BackColor = gl_Color;"
+ " gl_TexCoord[0] = gl_MultiTexCoord0;"
+ " gl_Position = ftransform();"
+ "}\000";
+
+ const char *fragment_glsl =
+ "uniform int texMode;"
+ "uniform sampler2D tex;"
+ "uniform sampler2DRect texrect;"
+ "void main()"
+ "{"
+ " vec4 texel;"
+ " vec4 color;"
+ " if (texMode == 1) {"
+ " texel = texture2D(tex,gl_TexCoord[0].st).rgba;"
+ " } else if (texMode == 2) {"
+ " texel = texture(texrect,gl_TexCoord[0].st).rgba;"
+ " } else if (texMode == 0) {"
+ " texel = gl_Color;"
+ " } else {"
+ " texel = vec4(1.0,0.0,0.0,1.0);"
+ " }"
+ " gl_FragColor = vec4(texel.rgb*gl_Color.rgb,texel.a*gl_Color.a);"
+ "}\000";
}
unsigned int screenW() { return s_width; }
unsigned int screenH() { return s_height; }
+Shader Window::shader;
+
Window::Window(unsigned int width, unsigned int height, bool fs): m_windowW(width), m_windowH(height), m_fullscreen(fs) {
std::atexit(SDL_Quit);
if( SDL_Init(SDL_INIT_VIDEO|SDL_INIT_JOYSTICK) == -1 ) throw std::runtime_error("SDL_Init failed");
@@ -54,10 +87,10 @@ Window::Window(unsigned int width, unsigned int height, bool fs): m_windowW(widt
SDL_EnableUNICODE(SDL_ENABLE);
if (glewInit() != GLEW_OK) throw std::runtime_error("Initializing GLEW failed (is your OpenGL broken?)");
input::SDL::init();
- glshader::newShader(&shader);
+ shader = Shader(vertex_glsl, fragment_glsl);
}
-Window::~Window() { glshader::deleteShader(&shader); }
+Window::~Window() { }
void Window::blank() {
glClear(GL_COLOR_BUFFER_BIT);
diff --git a/game/video_driver.hh b/game/video_driver.hh
index c865815..2580e4c 100644
--- a/game/video_driver.hh
+++ b/game/video_driver.hh
@@ -1,5 +1,7 @@
#pragma once
+#include "glshader.hh"
+
unsigned int screenW();
unsigned int screenH();
static inline float virtH() { return float(screenH()) / screenW(); }
@@ -36,6 +38,8 @@ class Window {
/// take a screenshot
void screenshot();
+ static Shader shader; // Core shader program for general drawing
+
private:
SDL_Surface* screen;
unsigned int m_windowW, m_windowH;
|
|
From: Yoda-JM <yo...@us...> - 2010-10-29 09:11:45
|
Module: performous Branch: master Commit: 3be1edfb5ba87a355f33319bcd91837da6362e26 Author: Vincent Le Ligeour <yo...@us...> Date: Fri Oct 29 11:12:02 2010 +0200 Removed unneeded include --- game/instrumentgraph.cc | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/game/instrumentgraph.cc b/game/instrumentgraph.cc index c657636..d8a5580 100644 --- a/game/instrumentgraph.cc +++ b/game/instrumentgraph.cc @@ -1,6 +1,5 @@ #include "instrumentgraph.hh" #include "i18n.hh" -#include "screen.hh" #include "glutil.hh" //const unsigned InstrumentGraph::max_panels = 10; // Maximum number of arrow lines / guitar frets |
|
From: Johnny O. <js...@us...> - 2010-10-29 00:43:41
|
Module: performous Branch: opengl2 Commit: f5d14d3dfce51225f18ec5f3ee47ed1eb7150d93 Author: Johnny Oskarsson <js...@us...> Date: Fri Oct 29 02:36:12 2010 +0200 Merge remote branch 'origin/opengl2' into opengl2 --- |
|
From: Johnny O. <js...@us...> - 2010-10-29 00:43:39
|
Module: performous Branch: opengl2 Commit: d8221d9d5935be615da54d463d49787ab3d9b711 Author: Johnny Oskarsson <js...@us...> Date: Fri Oct 29 02:05:10 2010 +0200 Removed the last instances of glBegin(). Added a class for vertex arrays, which cleaned up a bit of code and made it very easy to wrap the code to use vertex arrays. --- game/dancegraph.cc | 29 ++++++----- game/glutil.hh | 133 ++++++++++++++++++++++++++++++++++++------------- game/guitargraph.cc | 90 ++++++++++++++++++---------------- game/notegraph.cc | 33 ++++++------ game/screen_sing.cc | 11 ++-- game/screen_songs.cc | 55 +++++++++++--------- game/surface.hh | 14 ++--- 7 files changed, 218 insertions(+), 147 deletions(-) |
|
From: Johnny O. <js...@us...> - 2010-10-29 00:43:36
|
Module: performous Branch: opengl2 Commit: dcaa5e4909fce9ee7637d2983ceb954fe927f944 Author: Tapio Vierros <tap...@gm...> Date: Fri Oct 29 00:38:22 2010 +0300 Add forgotten device_selector.svg --- themes/default/device_selector.svg | 69 ++++++++++++++++++++++++++++++++++++ 1 files changed, 69 insertions(+), 0 deletions(-) diff --git a/themes/default/device_selector.svg b/themes/default/device_selector.svg new file mode 100644 index 0000000..0ed0a8a --- /dev/null +++ b/themes/default/device_selector.svg @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<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" + xml:space="preserve" + version="1.0" + id="layer1" + width="256" + height="256" + viewBox="0 0 38.4 38.4" + inkscape:version="0.48.0 r9654" + sodipodi:docname="device_selector.svg"><defs + id="defs19"><linearGradient + id="linearGradient3762"><stop + style="stop-color:#00266f;stop-opacity:1;" + offset="0" + id="stop3764" /><stop + style="stop-color:#49338a;stop-opacity:1;" + offset="1" + id="stop3766" /></linearGradient><linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3762" + id="linearGradient3768" + x1="33.130413" + y1="32.795361" + x2="6.3005142" + y2="6.3778343" + gradientUnits="userSpaceOnUse" /><filter + inkscape:collect="always" + id="filter3754"><feGaussianBlur + inkscape:collect="always" + stdDeviation="0.15" + id="feGaussianBlur3756" /></filter></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1057" + inkscape:window-height="784" + id="namedview17" + showgrid="false" + inkscape:zoom="2.328" + inkscape:cx="47.60517" + inkscape:cy="129.72509" + inkscape:window-x="165" + inkscape:window-y="112" + inkscape:window-maximized="0" + inkscape:current-layer="layer1" /><metadata + id="metadata1"><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> +<rect + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3768);stroke-width:2.39999999999999991;stroke-miterlimit:4;stroke-dasharray:none;opacity:1;stroke-linecap:butt;filter:url(#filter3754)" + id="rect2992" + width="30" + height="30" + x="4.1999998" + y="4.1999998" + ry="6.210372" /></svg> \ No newline at end of file |
|
From: Tapio V. <aa...@us...> - 2010-10-28 21:40:15
|
Module: performous Branch: master Commit: fd2d6df37b703ebb576715c8748c90d31a4c1748 Author: Tapio Vierros <tap...@gm...> Date: Fri Oct 29 00:38:22 2010 +0300 Add forgotten device_selector.svg --- themes/default/device_selector.svg | 69 ++++++++++++++++++++++++++++++++++++ 1 files changed, 69 insertions(+), 0 deletions(-) diff --git a/themes/default/device_selector.svg b/themes/default/device_selector.svg new file mode 100644 index 0000000..0ed0a8a --- /dev/null +++ b/themes/default/device_selector.svg @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<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" + xml:space="preserve" + version="1.0" + id="layer1" + width="256" + height="256" + viewBox="0 0 38.4 38.4" + inkscape:version="0.48.0 r9654" + sodipodi:docname="device_selector.svg"><defs + id="defs19"><linearGradient + id="linearGradient3762"><stop + style="stop-color:#00266f;stop-opacity:1;" + offset="0" + id="stop3764" /><stop + style="stop-color:#49338a;stop-opacity:1;" + offset="1" + id="stop3766" /></linearGradient><linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3762" + id="linearGradient3768" + x1="33.130413" + y1="32.795361" + x2="6.3005142" + y2="6.3778343" + gradientUnits="userSpaceOnUse" /><filter + inkscape:collect="always" + id="filter3754"><feGaussianBlur + inkscape:collect="always" + stdDeviation="0.15" + id="feGaussianBlur3756" /></filter></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1057" + inkscape:window-height="784" + id="namedview17" + showgrid="false" + inkscape:zoom="2.328" + inkscape:cx="47.60517" + inkscape:cy="129.72509" + inkscape:window-x="165" + inkscape:window-y="112" + inkscape:window-maximized="0" + inkscape:current-layer="layer1" /><metadata + id="metadata1"><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> +<rect + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3768);stroke-width:2.39999999999999991;stroke-miterlimit:4;stroke-dasharray:none;opacity:1;stroke-linecap:butt;filter:url(#filter3754)" + id="rect2992" + width="30" + height="30" + x="4.1999998" + y="4.1999998" + ry="6.210372" /></svg> \ No newline at end of file |
|
From: Tapio V. <aa...@us...> - 2010-10-28 21:39:37
|
Module: performous Branch: opengl2 Commit: dc94d02f3517671d20d985f3731fa15034e5664e Author: Tapio Vierros <tap...@gm...> Date: Fri Oct 29 00:38:47 2010 +0300 Merge branch 'master' into opengl2 --- |
|
From: Tapio V. <aa...@us...> - 2010-10-28 21:39:32
|
Module: performous Branch: opengl2 Commit: fd2d6df37b703ebb576715c8748c90d31a4c1748 Author: Tapio Vierros <tap...@gm...> Date: Fri Oct 29 00:38:22 2010 +0300 Add forgotten device_selector.svg --- themes/default/device_selector.svg | 69 ++++++++++++++++++++++++++++++++++++ 1 files changed, 69 insertions(+), 0 deletions(-) diff --git a/themes/default/device_selector.svg b/themes/default/device_selector.svg new file mode 100644 index 0000000..0ed0a8a --- /dev/null +++ b/themes/default/device_selector.svg @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<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" + xml:space="preserve" + version="1.0" + id="layer1" + width="256" + height="256" + viewBox="0 0 38.4 38.4" + inkscape:version="0.48.0 r9654" + sodipodi:docname="device_selector.svg"><defs + id="defs19"><linearGradient + id="linearGradient3762"><stop + style="stop-color:#00266f;stop-opacity:1;" + offset="0" + id="stop3764" /><stop + style="stop-color:#49338a;stop-opacity:1;" + offset="1" + id="stop3766" /></linearGradient><linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3762" + id="linearGradient3768" + x1="33.130413" + y1="32.795361" + x2="6.3005142" + y2="6.3778343" + gradientUnits="userSpaceOnUse" /><filter + inkscape:collect="always" + id="filter3754"><feGaussianBlur + inkscape:collect="always" + stdDeviation="0.15" + id="feGaussianBlur3756" /></filter></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1057" + inkscape:window-height="784" + id="namedview17" + showgrid="false" + inkscape:zoom="2.328" + inkscape:cx="47.60517" + inkscape:cy="129.72509" + inkscape:window-x="165" + inkscape:window-y="112" + inkscape:window-maximized="0" + inkscape:current-layer="layer1" /><metadata + id="metadata1"><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> +<rect + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3768);stroke-width:2.39999999999999991;stroke-miterlimit:4;stroke-dasharray:none;opacity:1;stroke-linecap:butt;filter:url(#filter3754)" + id="rect2992" + width="30" + height="30" + x="4.1999998" + y="4.1999998" + ry="6.210372" /></svg> \ No newline at end of file |
|
From: Johnny O. <js...@us...> - 2010-10-28 21:13:11
|
Module: performous
Branch: opengl2
Commit: a07ece3977b5f0be0b3da768a28240a85c7ef4c7
Author: Johnny Oskarsson <js...@us...>
Date: Thu Oct 28 23:11:24 2010 +0200
Fix VBO texture bug.
---
game/3dobject.hh | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/game/3dobject.hh b/game/3dobject.hh
index 5e5536c..144f9db 100644
--- a/game/3dobject.hh
+++ b/game/3dobject.hh
@@ -74,7 +74,11 @@ class Object3d: boost::noncopyable {
glutil::PushMatrix pm;
glTranslatef(x, y, z); // Move to position
if (s != 1.0) glScalef(s,s,s); // Scale if needed
- if (m_texture) UseTexture tex(*m_texture);
- drawVBO();
+ if (m_texture) {
+ UseTexture tex(*m_texture);
+ drawVBO();
+ } else {
+ drawVBO();
+ }
}
};
|
|
From: Johnny O. <js...@us...> - 2010-10-28 21:13:09
|
Module: performous Branch: opengl2 Commit: 6a67c4acf5948ff9edd89d37e7fbada26071be4a Author: Johnny Oskarsson <js...@us...> Date: Thu Oct 28 22:54:24 2010 +0200 Merge branch 'master' into opengl2 --- |
|
From: Johnny O. <js...@us...> - 2010-10-28 21:13:06
|
Module: performous
Branch: opengl2
Commit: 65c4e3a911817f9b76fa2d3b1f0a39cbce54f81c
Author: Tapio Vierros <tap...@gm...>
Date: Thu Oct 28 18:14:38 2010 +0300
Use Cachemap for join and pause menu option texts.
---
game/instrumentgraph.cc | 51 ++++++++++++++++++++++++++++++----------------
game/screen_sing.cc | 10 ++++----
game/theme.cc | 7 +++++-
game/theme.hh | 6 +++-
4 files changed, 48 insertions(+), 26 deletions(-)
diff --git a/game/instrumentgraph.cc b/game/instrumentgraph.cc
index 8044c2e..c657636 100644
--- a/game/instrumentgraph.cc
+++ b/game/instrumentgraph.cc
@@ -83,7 +83,7 @@ void InstrumentGraph::drawMenu() {
// We need to multiply offset by inverse scale factor to keep it always constant
// All these vars are ultimately affected by the scaling matrix
const double offsetX = 0.5f * (dimensions.x1() + dimensions.x2()) / s;
- const float txth = th.option.h();
+ const float txth = th.option_selected.h();
const float button_margin = m_arrow_up.dimensions.w()
* (m_input.isKeyboard() && getGraphType() != input::DANCEPAD ? 2.0f : 1.0f);
const float step = txth * 0.7f;
@@ -98,9 +98,14 @@ void InstrumentGraph::drawMenu() {
w = 0;
unsigned i = 0;
for (MenuOptions::const_iterator it = m_menu.begin(); it != m_menu.end(); ++it, ++i) {
- SvgTxtTheme* txt = &th.option;
- // Selected item?
- if (cur == it) {
+ std::string menutext = it->getName();
+ SvgTxtTheme* txt = &th.option_selected; // Default: font for selected menu item
+
+ if (cur != it) { // Unselected menuoption
+ txt = &(th.getCachedOption(menutext));
+
+ // Selected item
+ } else {
// Left/right Icons
if (getGraphType() == input::DRUMS) {
// Drum colors are mirrored
@@ -129,27 +134,37 @@ void InstrumentGraph::drawMenu() {
if (m_input.isKeyboard() && getGraphType() != input::DANCEPAD) {
float leftx = x - button_margin*0.75f;
float rightx = xx + button_margin*0.25f;
- txt->dimensions.left(leftx).center(y);
- txt->draw(getGraphType() == input::GUITAR ? (m_leftymode.b() ? "Z" : "1") : "U");
- txt->dimensions.right(rightx).center(y);
- txt->draw(getGraphType() == input::GUITAR ? (m_leftymode.b() ? "X" : "2") : "P");
+ {
+ std::string hintletter = (getGraphType() == input::GUITAR ? (m_leftymode.b() ? "Z" : "1") : "U");
+ SvgTxtTheme& hintfont = th.getCachedOption(hintletter);
+ hintfont.dimensions.left(leftx).center(y);
+ hintfont.draw(hintletter);
+ }{
+ std::string hintletter = (getGraphType() == input::GUITAR ? (m_leftymode.b() ? "X" : "2") : "P");
+ SvgTxtTheme& hintfont = th.getCachedOption(hintletter);
+ hintfont.dimensions.right(rightx).center(y);
+ hintfont.draw(hintletter);
+ }
// Only drums has up/down
if (getGraphType() == input::DRUMS) {
- txt->dimensions.left(leftx).center(y - step);
- if (i > 0) txt->draw("I"); // Up
- txt->dimensions.left(leftx).center(y + step);
- if (m_menu.getOptions().size()-1) txt->draw("O"); // Down
+ if (i > 0) { // Up
+ SvgTxtTheme& hintfont = th.getCachedOption("I");
+ hintfont.dimensions.left(leftx).center(y - step);
+ hintfont.draw("I");
+ }
+ if (m_menu.getOptions().size()-1) { // Down
+ SvgTxtTheme& hintfont = th.getCachedOption("O");
+ hintfont.dimensions.left(leftx).center(y + step);
+ hintfont.draw("O");
+ }
}
}
- //th.back_h.dimensions.middle(0.05 + offsetX).center(y);
- //th.back_h.draw();
- // Switch to the "selected" font
- txt = &th.option_selected;
}
+ // Finally we are at the actual menu item text drawing
txt->dimensions.middle(x).center(y);
- txt->draw(it->getName(), it->isActive() ? 1.0f : 0.5f);
+ txt->draw(menutext, it->isActive() ? 1.0f : 0.5f);
w = std::max(w, txt->w() + 2 * step + button_margin * 2); // Calculate the widest entry
- y += step;
+ y += step; // Move draw position down for the next option
}
// Draw comment text
if (cur->getComment() != "") {
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 6b8c35c..525f035 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -532,7 +532,7 @@ void ScreenSing::drawMenu() {
ThemeInstrumentMenu& th = *m_menuTheme;
MenuOptions::const_iterator cur = static_cast<MenuOptions::const_iterator>(&m_menu.current());
double w = m_menu.dimensions.w();
- const float txth = th.option.h();
+ const float txth = th.option_selected.h();
const float step = txth * 0.85f;
const float h = m_menu.getOptions().size() * step + step;
float y = -h * .5f + step;
@@ -543,10 +543,10 @@ void ScreenSing::drawMenu() {
// Loop through menu items
w = 0;
for (MenuOptions::const_iterator it = m_menu.begin(); it != m_menu.end(); ++it) {
- SvgTxtTheme* txt = &th.option;
- if (cur == it) {
- txt = &th.option_selected;
- }
+ // Pick the font object
+ SvgTxtTheme* txt = &th.option_selected;
+ if (cur != it) txt = &(th.getCachedOption(it->getName()));
+ // Set dimensions and draw
txt->dimensions.middle(x).center(y);
txt->draw(it->getName());
w = std::max(w, txt->w() + 2 * step); // Calculate the widest entry
diff --git a/game/theme.cc b/game/theme.cc
index ef02ae1..dbaab57 100644
--- a/game/theme.cc
+++ b/game/theme.cc
@@ -60,7 +60,7 @@ ThemeIntro::ThemeIntro():
ThemeInstrumentMenu::ThemeInstrumentMenu():
Theme(getThemePath("instrumentmenu_bg.svg")),
back_h(getThemePath("instrumentmenu_back_highlight.svg")),
- option(getThemePath("instrumentmenu_option.svg"), config["graphic/text_lod"].f()),
+ options(30),
option_selected(getThemePath("instrumentmenu_option_selected.svg"), config["graphic/text_lod"].f()),
comment(getThemePath("instrumentmenu_comment.svg"), config["graphic/text_lod"].f())
//comment_bg(getThemePath("menu_comment_bg.svg"))
@@ -68,3 +68,8 @@ ThemeInstrumentMenu::ThemeInstrumentMenu():
back_h.dimensions.fixedHeight(0.08f);
comment.setAlign(SvgTxtTheme::CENTER);
}
+
+SvgTxtTheme& ThemeInstrumentMenu::getCachedOption(const std::string& text) {
+ if (options.contains(text)) return options[text];
+ return *options.insert(text, new SvgTxtTheme(getThemePath("instrumentmenu_option.svg"), config["graphic/text_lod"].f()))->second;
+}
diff --git a/game/theme.hh b/game/theme.hh
index 285b023..8b77f32 100644
--- a/game/theme.hh
+++ b/game/theme.hh
@@ -97,12 +97,14 @@ struct ThemeInstrumentMenu: Theme {
ThemeInstrumentMenu();
/// back highlight for selected option
Surface back_h;
- /// menu option text
- SvgTxtTheme option;
+ /// menu option texts
+ Cachemap<std::string, SvgTxtTheme> options;
/// menu selected option text
SvgTxtTheme option_selected;
/// menu comment text
SvgTxtTheme comment;
/// menu comment background
//Surface comment_bg;
+ /// get a cached option test
+ SvgTxtTheme& getCachedOption(const std::string& text);
};
|
|
From: Johnny O. <js...@us...> - 2010-10-28 21:13:01
|
Module: performous
Branch: opengl2
Commit: 9a007703791d23c4ce5fd74d26671f13424a0a06
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Oct 28 11:14:54 2010 +0200
Updated TODO
---
docs/TODO.txt | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/docs/TODO.txt b/docs/TODO.txt
index aca4375..a04a9e1 100644
--- a/docs/TODO.txt
+++ b/docs/TODO.txt
@@ -29,6 +29,7 @@ Features:
* Audio/video by playing visually without audio? (needs controller/audio calibrated)
- Allow playing a single song given as commandline argument (no menus)
- Kiosk/arcade mode (disable exiting game and limit other functions)
+- Expert+ track, drum pro mode (using tom switch in midi)
Dance features:
@@ -54,7 +55,3 @@ SS Ripper:
Bugs:
- Segfault when browsing songs in song browser while loading (segfaults before loading finishes), quite rare
-- sample are not always played when a user fail (for example drums). it could
- be nice that playing a sample reset the privious fail sample (test case :
- drums rolling)
-
|
|
From: Johnny O. <js...@us...> - 2010-10-28 21:12:59
|
Module: performous Branch: opengl2 Commit: dbe148c737e63084e324d9b56e9e529ba75aa84c Author: Tapio Vierros <tap...@gm...> Date: Wed Oct 27 20:39:41 2010 +0300 Update ppa script. --- tools/ppa/ppa.sh | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/ppa/ppa.sh b/tools/ppa/ppa.sh index 0f322e2..21d2c4d 100755 --- a/tools/ppa/ppa.sh +++ b/tools/ppa/ppa.sh @@ -16,7 +16,7 @@ export DEBEMAIL="`gpg --list-keys | grep uid | sed 's/ *(.*)//; s/>.*//; s/.*[:< # Config PKG="performous" -VERSIONCOMMON="0.5.1-9+git"`date '+%Y%m%d'`"~ppa1" +VERSIONCOMMON="0.6.0-99+git"`date '+%Y%m%d'`"~ppa1" SUITES="lucid maverick" GITURL="git://git.performous.org/gitroot/performous/performous" DESTINATIONPPA="ppa:performous-team/ppa" @@ -33,12 +33,12 @@ PPAPATCHDIR="`pwd`" $COPYCMD "$1/cmake" "$2" $COPYCMD "$1/data" "$2" $COPYCMD "$1/docs" "$2" - $COPYCMD "$1/editor" "$2" $COPYCMD "$1/game" "$2" $COPYCMD "$1/lang" "$2" $COPYCMD "$1/themes" "$2" $COPYCMD "$1/tools" "$2" rm -rf "$2"/libs # Old libs dir not used anymore + rm -rf "$2/editor" # Editor removed } cd "$TEMPDIR" @@ -81,6 +81,10 @@ for suite in $SUITES ; do patch -p0 < *.patch rm *.patch + # Hack hack + echo "// Dummy" > game/screen_configuration.hh + echo "// Dummy" > game/screen_configuration.cc + # Do changelog # Dch complains about unknown suites yes '' | dch -b -v $newversion -D $suite "Upload development version from Git $headcommit to Ubuntu PPA for $suite." |
|
From: Johnny O. <js...@us...> - 2010-10-28 21:12:56
|
Module: performous
Branch: opengl2
Commit: 477b575fdb0acf645f7b8eed33846f38c42e5f5e
Author: Tapio Vierros <tap...@gm...>
Date: Wed Oct 27 20:27:49 2010 +0300
Use an SVG for the device selection indicator.
---
game/screen_audiodevices.cc | 14 +++++++++-----
game/screen_audiodevices.hh | 1 +
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/game/screen_audiodevices.cc b/game/screen_audiodevices.cc
index 4bf0afd..74055e3 100644
--- a/game/screen_audiodevices.cc
+++ b/game/screen_audiodevices.cc
@@ -20,6 +20,7 @@ namespace {
}
ScreenAudioDevices::ScreenAudioDevices(std::string const& name, Audio& audio): Screen(name), m_audio(audio) {
+ m_selector.reset(new Surface(getThemePath("device_selector.svg")));
m_mic_icon.reset(new Surface(getThemePath("sing_pbox.svg")));
m_pdev_icon.reset(new Surface(getThemePath("icon_pdev.svg")));
m_colorMap["blue"] = Color(0.2, 0.5, 0.7);
@@ -96,6 +97,7 @@ void ScreenAudioDevices::draw() {
const float ystep = yoff*2 / m_devs.size();
// Device text & bg
m_theme->device_bg.dimensions.stretch(std::abs(xoff*2), m_mic_icon->dimensions.h()*0.9).middle();
+ m_selector->dimensions.stretch(m_mic_icon->dimensions.w() * 1.75, m_mic_icon->dimensions.h() * 1.75);
for (size_t i = 0; i <= m_devs.size(); ++i) {
const float y = -yoff + i*ystep;
float alpha = 1.0f;
@@ -110,14 +112,16 @@ void ScreenAudioDevices::draw() {
// Icons
for (size_t i = 0; i < m_mics.size(); ++i) {
Surface& srf = (i < m_mics.size()-1) ? *m_mic_icon : *m_pdev_icon;
- glutil::Color c(m_colorMap[m_mics[i].name]);
- srf.dimensions.middle(-xoff + xstep*0.5 + i*xstep).center(-yoff+m_mics[i].dev*ystep);
- srf.draw();
+ {
+ glutil::Color c(m_colorMap[m_mics[i].name]);
+ srf.dimensions.middle(-xoff + xstep*0.5 + i*xstep).center(-yoff+m_mics[i].dev*ystep);
+ srf.draw();
+ }
// Selection indicator
- // TODO: Some nice arrow icons would be nice, in any case, current square is temporary
if (m_selected_column == i)
- glutil::Square sq(srf.dimensions.xc(), srf.dimensions.yc(), m_mic_icon->dimensions.w()*0.75);
+ m_selector->dimensions.middle(srf.dimensions.xc()).center(srf.dimensions.yc());
}
+ m_selector->draw(); // Position already set in the loop
}
// Key help
m_theme->comment_bg.dimensions.stretch(1.0, 0.025).middle().screenBottom(-0.054);
diff --git a/game/screen_audiodevices.hh b/game/screen_audiodevices.hh
index d833252..10509d0 100644
--- a/game/screen_audiodevices.hh
+++ b/game/screen_audiodevices.hh
@@ -35,6 +35,7 @@ class ScreenAudioDevices: public Screen {
portaudio::DeviceInfos m_devs;
std::vector<Mic> m_mics;
std::map<std::string, Color> m_colorMap;
+ boost::scoped_ptr<Surface> m_selector;
boost::scoped_ptr<Surface> m_mic_icon;
boost::scoped_ptr<Surface> m_pdev_icon;
};
|
|
From: Johnny O. <js...@us...> - 2010-10-28 21:12:54
|
Module: performous Branch: opengl2 Commit: 3875fafd26248ee7babcca1c110f23191ed778f0 Author: Tapio Vierros <tap...@gm...> Date: Wed Oct 27 18:42:32 2010 +0300 Dance arrow colors are now consistent with joinmenu icons + a tiny bugfix. --- game/instrumentgraph.cc | 3 +- themes/default/arrows.svg | 133 +++++--------------------------------- themes/default/arrows_cursor.svg | 26 ++++---- themes/default/arrows_hold.svg | 20 +++--- 4 files changed, 41 insertions(+), 141 deletions(-) |
|
From: Johnny O. <js...@us...> - 2010-10-28 21:12:52
|
Module: performous Branch: opengl2 Commit: 34e38fcb168ef3cda6b7428ad6599d991d42dd5b Author: Tapio Vierros <tap...@gm...> Date: Wed Oct 27 18:29:25 2010 +0300 Add forgotten new theme files for joinmenu arrow icons. --- themes/default/arrow_button_down.svg | 910 ++++++++++++++++++++++++++++++++ themes/default/arrow_button_left.svg | 911 +++++++++++++++++++++++++++++++++ themes/default/arrow_button_right.svg | 909 ++++++++++++++++++++++++++++++++ themes/default/arrow_button_up.svg | 910 ++++++++++++++++++++++++++++++++ 4 files changed, 3640 insertions(+), 0 deletions(-) |
|
From: Johnny O. <js...@us...> - 2010-10-28 21:12:49
|
Module: performous
Branch: opengl2
Commit: 084fdf475cb1cab535c24d938a766dd02b7b093b
Author: Tapio Vierros <tap...@gm...>
Date: Wed Oct 27 18:28:24 2010 +0300
Joinmenu icons are now also visible with keyboard instruments.
---
game/instrumentgraph.cc | 64 ++++++++++++++++++++++++----------------------
1 files changed, 33 insertions(+), 31 deletions(-)
diff --git a/game/instrumentgraph.cc b/game/instrumentgraph.cc
index b608b08..18061eb 100644
--- a/game/instrumentgraph.cc
+++ b/game/instrumentgraph.cc
@@ -84,7 +84,7 @@ void InstrumentGraph::drawMenu() {
// All these vars are ultimately affected by the scaling matrix
const double offsetX = 0.5f * (dimensions.x1() + dimensions.x2()) / s;
const float txth = th.option.h();
- const float button_margin = m_arrow_up.dimensions.w();
+ const float button_margin = m_arrow_up.dimensions.w() * (m_input.isKeyboard() ? 2.0f : 1.0f);
const float step = txth * 0.7f;
const float h = m_menu.getOptions().size() * step + step;
float y = -h * .5f + step;
@@ -100,44 +100,46 @@ void InstrumentGraph::drawMenu() {
SvgTxtTheme* txt = &th.option;
// Selected item?
if (cur == it) {
- // Draw the key hints
- if (m_input.isKeyboard() && getGraphType() != input::DANCEPAD) { // Key letters for keyboard
- txt->dimensions.middle(x - button_margin - button_margin*0.5f).center(y);
- txt->draw(getGraphType() == input::GUITAR ? (m_leftymode.b() ? "Z" : "1") : "U");
- txt->dimensions.middle(xx + button_margin - button_margin*0.5f).center(y);
- txt->draw(getGraphType() == input::GUITAR ? (m_leftymode.b() ? "X" : "2") : "P");
- } else { // Colored icons for real instruments
- if (getGraphType() == input::DRUMS) {
- // Drum colors are mirrored
- m_arrow_left.dimensions.middle(xx + button_margin).center(y);
- m_arrow_right.dimensions.middle(x - button_margin).center(y);
- } else {
- m_arrow_left.dimensions.middle(x - button_margin).center(y);
- m_arrow_right.dimensions.middle(xx + button_margin).center(y);
- }
- m_arrow_left.draw();
- m_arrow_right.draw();
+ // Left/right Icons
+ if (getGraphType() == input::DRUMS) {
+ // Drum colors are mirrored
+ m_arrow_left.dimensions.middle(xx + button_margin).center(y);
+ m_arrow_right.dimensions.middle(x - button_margin).center(y);
+ } else {
+ m_arrow_left.dimensions.middle(x - button_margin).center(y);
+ m_arrow_right.dimensions.middle(xx + button_margin).center(y);
}
- // Up hint
- if (getGraphType() != input::GUITAR && i > 0) {
- if (m_input.isKeyboard() && getGraphType() == input::DRUMS) { // Key letters for keyboard drums
- txt->dimensions.middle(x - button_margin - button_margin*0.5f).center(y - step);
- txt->draw("I");
- } else { // Colored icons for real instruments
+ m_arrow_left.draw();
+ m_arrow_right.draw();
+
+ // Up/down icons
+ if (getGraphType() != input::GUITAR) {
+ if (i > 0) { // Up
m_arrow_up.dimensions.middle(x - button_margin).center(y - step);
m_arrow_up.draw();
}
- }
- // Drum down hint
- if (getGraphType() != input::GUITAR && i < m_menu.getOptions().size()-1) {
- if (m_input.isKeyboard() && getGraphType() == input::DRUMS) { // Key letters for keyboard drums
- txt->dimensions.middle(x - button_margin - button_margin*0.5f).center(y + step);
- txt->draw("O");
- } else { // Colored icons for real instruments
+ if (i < m_menu.getOptions().size()-1) { // Down
m_arrow_down.dimensions.middle(x - button_margin).center(y + step);
m_arrow_down.draw();
}
}
+
+ // Draw the key letters for keyboard (not for dancepad)
+ if (m_input.isKeyboard() && getGraphType() != input::DANCEPAD) {
+ float leftx = x - button_margin*0.75f;
+ float rightx = xx + button_margin*0.25f;
+ txt->dimensions.left(leftx).center(y);
+ txt->draw(getGraphType() == input::GUITAR ? (m_leftymode.b() ? "Z" : "1") : "U");
+ txt->dimensions.right(rightx).center(y);
+ txt->draw(getGraphType() == input::GUITAR ? (m_leftymode.b() ? "X" : "2") : "P");
+ // Only drums has up/down
+ if (getGraphType() == input::DRUMS) {
+ txt->dimensions.left(leftx).center(y - step);
+ if (i > 0) txt->draw("I"); // Up
+ txt->dimensions.left(leftx).center(y + step);
+ if (m_menu.getOptions().size()-1) txt->draw("O"); // Down
+ }
+ }
//th.back_h.dimensions.middle(0.05 + offsetX).center(y);
//th.back_h.draw();
// Switch to the "selected" font
|
|
From: Johnny O. <js...@us...> - 2010-10-28 21:12:47
|
Module: performous
Branch: opengl2
Commit: 12622095c6ff10d7d13bbe8feb72fca3a7cec1e8
Author: Tapio Vierros <tap...@gm...>
Date: Wed Oct 27 17:59:10 2010 +0300
Arrow icon hints for instrument & dance joinmenu.
---
game/instrumentgraph.cc | 71 ++++++++++++++++++++++++-----------------------
game/instrumentgraph.hh | 4 ++
2 files changed, 40 insertions(+), 35 deletions(-)
diff --git a/game/instrumentgraph.cc b/game/instrumentgraph.cc
index 607843a..b608b08 100644
--- a/game/instrumentgraph.cc
+++ b/game/instrumentgraph.cc
@@ -12,6 +12,10 @@ InstrumentGraph::InstrumentGraph(Audio& audio, Song const& song, input::DevType
m_cx(0.0, 0.2), m_width(0.5, 0.4),
m_menu(),
m_button(getThemePath("button.svg")),
+ m_arrow_up(getThemePath("arrow_button_up.svg")),
+ m_arrow_down(getThemePath("arrow_button_down.svg")),
+ m_arrow_left(getThemePath("arrow_button_left.svg")),
+ m_arrow_right(getThemePath("arrow_button_right.svg")),
m_text(getThemePath("sing_timetxt.svg"), config["graphic/text_lod"].f()),
m_selectedTrack(""),
m_selectedDifficulty(0),
@@ -33,6 +37,10 @@ InstrumentGraph::InstrumentGraph(Audio& audio, Song const& song, input::DevType
m_popupText.reset(new SvgTxtThemeSimple(getThemePath("sing_popup_text.svg"), config["graphic/text_lod"].f()));
m_menuTheme.reset(new ThemeInstrumentMenu());
for (size_t i = 0; i < max_panels; ++i) m_pressed[i] = false;
+ m_arrow_up.dimensions.stretch(0.05, 0.05);
+ m_arrow_down.dimensions.stretch(0.05, 0.05);
+ m_arrow_left.dimensions.stretch(0.05, 0.05);
+ m_arrow_right.dimensions.stretch(0.05, 0.05);
}
@@ -76,7 +84,7 @@ void InstrumentGraph::drawMenu() {
// All these vars are ultimately affected by the scaling matrix
const double offsetX = 0.5f * (dimensions.x1() + dimensions.x2()) / s;
const float txth = th.option.h();
- const float button_margin = (getGraphType() == input::DANCEPAD ? 0.0f : 0.05f);
+ const float button_margin = m_arrow_up.dimensions.w();
const float step = txth * 0.7f;
const float h = m_menu.getOptions().size() * step + step;
float y = -h * .5f + step;
@@ -88,51 +96,46 @@ void InstrumentGraph::drawMenu() {
// Loop through menu items
w = 0;
unsigned i = 0;
- m_button.dimensions.stretch(0.05, 0.05);
for (MenuOptions::const_iterator it = m_menu.begin(); it != m_menu.end(); ++it, ++i) {
SvgTxtTheme* txt = &th.option;
// Selected item?
if (cur == it) {
// Draw the key hints
- if (getGraphType() != input::DANCEPAD) {
- if (m_input.isKeyboard()) { // Key letters for keyboard
- txt->dimensions.middle(x - button_margin - m_button.dimensions.w()*0.5f).center(y);
- txt->draw(getGraphType() == input::GUITAR ? (m_leftymode.b() ? "Z" : "1") : "U");
- txt->dimensions.middle(xx + button_margin - m_button.dimensions.w()*0.5f).center(y);
- txt->draw(getGraphType() == input::GUITAR ? (m_leftymode.b() ? "X" : "2") : "P");
- } else { // Colored icons for real instruments
- {
- glutil::Color c(color(getGraphType() == input::GUITAR ? 0 : 1));
- m_button.dimensions.middle(x - button_margin).center(y);
- m_button.draw();
- }
- {
- glutil::Color c(color(getGraphType() == input::GUITAR ? 1 : 4));
- m_button.dimensions.middle(xx + button_margin);
- m_button.draw();
- }
+ if (m_input.isKeyboard() && getGraphType() != input::DANCEPAD) { // Key letters for keyboard
+ txt->dimensions.middle(x - button_margin - button_margin*0.5f).center(y);
+ txt->draw(getGraphType() == input::GUITAR ? (m_leftymode.b() ? "Z" : "1") : "U");
+ txt->dimensions.middle(xx + button_margin - button_margin*0.5f).center(y);
+ txt->draw(getGraphType() == input::GUITAR ? (m_leftymode.b() ? "X" : "2") : "P");
+ } else { // Colored icons for real instruments
+ if (getGraphType() == input::DRUMS) {
+ // Drum colors are mirrored
+ m_arrow_left.dimensions.middle(xx + button_margin).center(y);
+ m_arrow_right.dimensions.middle(x - button_margin).center(y);
+ } else {
+ m_arrow_left.dimensions.middle(x - button_margin).center(y);
+ m_arrow_right.dimensions.middle(xx + button_margin).center(y);
}
+ m_arrow_left.draw();
+ m_arrow_right.draw();
}
- // Drum up hint
- if (getGraphType() == input::DRUMS && i > 0) {
- if (m_input.isKeyboard()) { // Key letters for keyboard
- txt->dimensions.middle(x - button_margin - m_button.dimensions.w()*0.5f).center(y - step);
+ // Up hint
+ if (getGraphType() != input::GUITAR && i > 0) {
+ if (m_input.isKeyboard() && getGraphType() == input::DRUMS) { // Key letters for keyboard drums
+ txt->dimensions.middle(x - button_margin - button_margin*0.5f).center(y - step);
txt->draw("I");
} else { // Colored icons for real instruments
- glutil::Color c(color(2));
- m_button.dimensions.middle(x - button_margin).center(y - step);
- m_button.draw();
+ m_arrow_up.dimensions.middle(x - button_margin).center(y - step);
+ m_arrow_up.draw();
}
}
// Drum down hint
- if (getGraphType() == input::DRUMS && i < m_menu.getOptions().size()-1) {
- if (m_input.isKeyboard()) {
- txt->dimensions.middle(x - button_margin - m_button.dimensions.w()*0.5f).center(y + step);
+ if (getGraphType() != input::GUITAR && i < m_menu.getOptions().size()-1) {
+ if (m_input.isKeyboard() && getGraphType() == input::DRUMS) { // Key letters for keyboard drums
+ txt->dimensions.middle(x - button_margin - button_margin*0.5f).center(y + step);
txt->draw("O");
- } else {
- glutil::Color c(color(3));
- m_button.dimensions.middle(x - button_margin).center(y + step);
- m_button.draw();
+ } else { // Colored icons for real instruments
+ m_arrow_down.dimensions.middle(x - button_margin).center(y + step);
+ m_arrow_down.draw();
}
}
//th.back_h.dimensions.middle(0.05 + offsetX).center(y);
@@ -152,8 +155,6 @@ void InstrumentGraph::drawMenu() {
th.comment.dimensions.middle(offsetX).screenBottom(-0.12);
th.comment.draw(cur->getComment());
}
- // Reset button size
- m_button.dimensions.stretch(1.0, 1.0);
// Save the calculated menu dimensions
m_menu.dimensions.stretch(w, h);
}
diff --git a/game/instrumentgraph.hh b/game/instrumentgraph.hh
index 72661ab..7b6fd77 100644
--- a/game/instrumentgraph.hh
+++ b/game/instrumentgraph.hh
@@ -127,6 +127,10 @@ class InstrumentGraph {
// Media
Surface m_button;
+ Surface m_arrow_up;
+ Surface m_arrow_down;
+ Surface m_arrow_left;
+ Surface m_arrow_right;
SvgTxtTheme m_text;
boost::scoped_ptr<SvgTxtThemeSimple> m_popupText;
boost::scoped_ptr<ThemeInstrumentMenu> m_menuTheme;
|
|
From: Johnny O. <js...@us...> - 2010-10-28 21:12:45
|
Module: performous
Branch: opengl2
Commit: 2a243727590c39c5459e04ac74703dc61b5362de
Author: Tapio Vierros <tap...@gm...>
Date: Wed Oct 27 16:48:29 2010 +0300
Start button now closes the joinmenu.
---
game/dancegraph.cc | 4 ++--
game/guitargraph.cc | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 7246d9b..cd35c33 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -277,8 +277,8 @@ void DanceGraph::engine() {
}
// Menu keys
if (menuOpen() && ev.type == input::Event::PRESS) {
- if (ev.nav == input::CANCEL) m_menu.close();
- else if (ev.nav == input::RIGHT || ev.nav == input::START) m_menu.action(1);
+ if (ev.nav == input::START || ev.nav == input::CANCEL) m_menu.close();
+ else if (ev.nav == input::RIGHT) m_menu.action(1);
else if (ev.nav == input::LEFT) m_menu.action(-1);
else if (ev.nav == input::UP) m_menu.move(-1);
else if (ev.nav == input::DOWN) m_menu.move(1);
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 5ec2f93..538c5ed 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -315,7 +315,7 @@ void GuitarGraph::engine() {
// Strum (strum of keyboard-as-guitar doesn't generate nav-events)
else if (ev.type == input::Event::PICK && ev.button == 0) m_menu.move(1);
else if (ev.type == input::Event::PICK && ev.button == 1) m_menu.move(-1);
- else if (ev.nav == input::START) m_menu.action();
+ else if (ev.nav == input::START || ev.nav == input::CANCEL) m_menu.close();
// See if anything changed
if (!m_drums && m_selectedTrack.so() != m_track_index->first) setTrack(m_selectedTrack.so());
else if (boost::lexical_cast<int>(m_selectedDifficulty.so()) != m_level)
|
|
From: Johnny O. <js...@us...> - 2010-10-28 21:12:42
|
Module: performous Branch: opengl2 Commit: 51bbbc002fe776e518d203f19df482e309adf1af Author: Vincent Le Ligeour <yo...@us...> Date: Wed Oct 27 11:38:46 2010 +0200 Moved include to the right place --- tools/ss_extract.cpp | 1 - tools/ss_helpers.hh | 1 + 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/ss_extract.cpp b/tools/ss_extract.cpp index dd5162b..4a89125 100644 --- a/tools/ss_extract.cpp +++ b/tools/ss_extract.cpp @@ -6,7 +6,6 @@ #include <sys/stat.h> #include <sys/types.h> -#include <glibmm/convert.h> #include <libxml/parser.h> #include <libxml/tree.h> diff --git a/tools/ss_helpers.hh b/tools/ss_helpers.hh index df447db..58e19dc 100644 --- a/tools/ss_helpers.hh +++ b/tools/ss_helpers.hh @@ -2,6 +2,7 @@ #include <boost/algorithm/string.hpp> #include <libxml++/libxml++.h> +#include <glibmm/convert.h> #include "pak.h" // LibXML2 logging facility |