|
From: Stefano A. <xa...@us...> - 2009-12-18 11:00:31
|
Module: performous
Branch: master
Commit: cb7a55a4ace2467d45c730c2fa65c2d637e34533
Author: Xaldyz <xa...@us...>
Date: Fri Dec 18 12:00:17 2009 +0100
Fixed dance screen problem under Windows
Added arrow key functionality to dance
---
game/joystick.cc | 16 ++++++++--------
game/screen_sing.cc | 6 ++++--
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 92e9005..054e112 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -320,13 +320,13 @@ bool input::SDL::pushEvent(SDL_Event _e) {
joy_id = input::Private::KEYBOARD_ID2;
switch(_e.key.keysym.sym) {
case SDLK_KP9: button = 6; break;
- case SDLK_KP8: button = 2; break;
+ case SDLK_KP8: case SDLK_UP: button = 2; break;
case SDLK_KP7: button = 7; break;
- case SDLK_KP6: button = 3; break;
+ case SDLK_KP6: case SDLK_RIGHT: button = 3; break;
case SDLK_KP5: button = 8; break;
- case SDLK_KP4: button = 0; break;
+ case SDLK_KP4: case SDLK_LEFT: button = 0; break;
case SDLK_KP3: button = 5; break;
- case SDLK_KP2: button = 1; break;
+ case SDLK_KP2: case SDLK_DOWN: button = 1; break;
case SDLK_KP1: button = 4; break;
default: return false;
}
@@ -380,13 +380,13 @@ bool input::SDL::pushEvent(SDL_Event _e) {
joy_id = input::Private::KEYBOARD_ID2;
switch(_e.key.keysym.sym) {
case SDLK_KP9: button = 6; break;
- case SDLK_KP8: button = 2; break;
+ case SDLK_KP8: case SDLK_UP: button = 2; break;
case SDLK_KP7: button = 7; break;
- case SDLK_KP6: button = 3; break;
+ case SDLK_KP6: case SDLK_RIGHT: button = 3; break;
case SDLK_KP5: button = 8; break;
- case SDLK_KP4: button = 0; break;
+ case SDLK_KP4: case SDLK_LEFT: button = 0; break;
case SDLK_KP3: button = 5; break;
- case SDLK_KP2: button = 1; break;
+ case SDLK_KP2: case SDLK_DOWN: button = 1; break;
case SDLK_KP1: button = 4; break;
default: return false;
}
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 8d1f41a..c8f653b 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -159,7 +159,9 @@ void ScreenSing::danceLayout(double time) {
}
if (time < -0.5) {
glColor4f(1.0f, 1.0f, 1.0f, clamp(-1.0 - 2.0 * time));
+ #ifndef _WIN32
m_help->draw();
+ #endif
glColor3f(1.0f, 1.0f, 1.0f);
}
}
@@ -401,9 +403,9 @@ ScoreWindow::ScoreWindow(Instruments& instruments, Database& database, Dancers&
item.track = it->getGameMode() + " - " + it->getDifficultyString();
item.track[0] = toupper(item.track[0]);
if (item.score < 100) { it = dancers.erase(it); continue; }
-
+
item.color = glutil::Color(1.0f, 0.4f, 0.1f);
-
+
m_database.scores.push_back(item);
++it;
}
|