From b7378d63b79b4953172afe50064a227ce1861907 Mon Sep 17 00:00:00 2001 From: "rodolfo.borges" Date: Thu, 20 Mar 2008 19:43:15 +0000 Subject: [PATCH] added shift and control keys to activate the ship; "PLAY" section on README git-svn-id: https://cave9.googlecode.com/svn/trunk@64 13012bb5-4427-0410-85c5-5d3d33be36bb --- README | 21 +++++++++++++++++++++ src/main.cpp | 10 ++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/README b/README index 9e8f80c..7a52691 100644 --- a/README +++ b/README @@ -1,5 +1,9 @@ cave9 + +ABOUT: +====== + A gravity cave-exploration game by 9Hells. It's a 3D version of the classic SF-Cave game. @@ -7,6 +11,7 @@ http://code.google.com/p/cave9 INSTALL: +======== To compile, just run 'make'. If this don't work, please report to cave9@googlegroups.com @@ -16,3 +21,19 @@ and extract it under the cave9 dir. It containts the font and texture. Use the --help option to check for startup options. + +PLAY: +===== + +Use the two diagnoal thrusts of your ship to keep it from +hitting the cave walls. + +You can use the left-right arrow, shift or control keys +to activate them. + +Space will pause/unpause the game. + +F toggles fullscreen mode. + +Check the startup options with "./cave9 --help" + diff --git a/src/main.cpp b/src/main.cpp index 896d273..adb38e4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -104,8 +104,14 @@ void control(Display* display, Cave* cave, Ship* digger, Ship* player, Input* in void player_control(Ship* player, Input* input) { - player->lefton = input->pressed[SDLK_LEFT]; - player->righton = input->pressed[SDLK_RIGHT]; + player->lefton = + input->pressed[SDLK_LEFT] || + input->pressed[SDLK_LSHIFT] || + input->pressed[SDLK_LCTRL]; + player->righton = + input->pressed[SDLK_RIGHT] || + input->pressed[SDLK_RSHIFT] || + input->pressed[SDLK_RCTRL]; } void args_init(Args* args, int argc, char* argv[]) -- 2.11.4.GIT