summaryrefslogtreecommitdiff
authorandyq <andyq>2003-02-28 23:56:03 (UTC)
committer andyq <andyq>2003-02-28 23:56:03 (UTC)
commit7dd36872a3eb63eb1c3c7a17549f3eeba92f1b32 (patch) (side-by-side diff)
treeb0628e9a3c75129d24301e30c44c55a23f03d963
parent64423f1852a13178f23365f2bba995ef2c355b3b (diff)
downloadopie-7dd36872a3eb63eb1c3c7a17549f3eeba92f1b32.zip
opie-7dd36872a3eb63eb1c3c7a17549f3eeba92f1b32.tar.gz
opie-7dd36872a3eb63eb1c3c7a17549f3eeba92f1b32.tar.bz2
Changed keyboard handling to accept UP, ENTER and RETURN for moving ship
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/sfcave-sdl/game.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/games/sfcave-sdl/game.cpp b/noncore/games/sfcave-sdl/game.cpp
index e41e510..1ee0230 100644
--- a/noncore/games/sfcave-sdl/game.cpp
+++ b/noncore/games/sfcave-sdl/game.cpp
@@ -66,13 +66,17 @@ void Game :: init()
terrain->initTerrain();
player->init();
}
void Game :: handleKeys( SDL_KeyboardEvent &key )
{
- if ( !replay && key.keysym.sym == SDLK_SPACE )
+ if ( !replay &&
+ (key.keysym.sym == SDLK_SPACE ||
+ key.keysym.sym == SDLK_KP_ENTER ||
+ key.keysym.sym == SDLK_RETURN ||
+ key.keysym.sym == SDLK_UP) )
{
if ( key.type == SDL_KEYDOWN )
{
if ( !press )
replayList.push_back( nrFrames );
press = true;