Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-03 01:43:03 +0000
committerStijn Buys <ingar@osirion.org>2008-02-03 01:43:03 +0000
commitb4973888aeaea2dde6058bc06c3f6631349e7f3c (patch)
tree010de10692b330d7634ad3090fb94d14c101f484 /src/client/input.cc
parent67f8a7a783e550cab8e6a77d997b31815ee8cd7e (diff)
command buffer handling
engine function parsing buffered client console
Diffstat (limited to 'src/client/input.cc')
-rw-r--r--src/client/input.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/client/input.cc b/src/client/input.cc
index 3e37a19..d30a97e 100644
--- a/src/client/input.cc
+++ b/src/client/input.cc
@@ -5,8 +5,7 @@
*/
//project headers
-#include "client.h"
-#include "game/game.h"
+#include "client/client.h"
namespace client {
@@ -33,6 +32,10 @@ http://docs.mandragor.org/files/Common_libs_documentation/SDL/SDL_Documentation_
void Input::handle_keyreleased(SDL_keysym* keysym)
{
switch( keysym->sym ) {
+ case '`':
+ case '~':
+ console.toggle();
+ break;
case SDLK_SPACE:
camera.nextmode();
break;
@@ -46,7 +49,7 @@ void Input::handle_keypressed(SDL_keysym* keysym)
{
switch( keysym->sym ) {
case SDLK_ESCAPE:
- application.shutdown();
+ client::application.shutdown();
break;
case SDLK_LEFT:
camera.rotate_left();
@@ -61,16 +64,16 @@ void Input::handle_keypressed(SDL_keysym* keysym)
camera.rotate_down();
break;
case SDLK_KP_PLUS:
- game::ship.set_thrust(game::ship.thrust() + 0.08f);
+ game.ship.set_thrust(game.ship.thrust() + 0.08f);
break;
case SDLK_KP_MINUS:
- game::ship.set_thrust(game::ship.thrust() - 0.1f);
+ game.ship.set_thrust(game.ship.thrust() - 0.1f);
break;
case SDLK_KP4:
- game::ship.set_yaw(game::ship.yaw() + 10);
+ game.ship.set_yaw(game.ship.yaw() + 10);
break;
case SDLK_KP6:
- game::ship.set_yaw(game::ship.yaw() - 10);
+ game.ship.set_yaw(game.ship.yaw() - 10);
break;
default:
break;
@@ -91,7 +94,7 @@ void Input::process()
handle_keyreleased( &event.key.keysym );
break;
case SDL_QUIT:
- application.shutdown();
+ client::application.shutdown();
break;
}