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>2007-10-21 23:02:47 +0000
committerStijn Buys <ingar@osirion.org>2007-10-21 23:02:47 +0000
commita237a2d7723b94df6cd3e91401ec28388de6f1a0 (patch)
tree7da376d276d03fced7b94a807c0952fd32bcde08 /src/client/input.cc
parent084c6212afaa6f996091f36d0ff85ac845803a87 (diff)
namespace cleanup
Diffstat (limited to 'src/client/input.cc')
-rw-r--r--src/client/input.cc37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/client/input.cc b/src/client/input.cc
index 8af7414..b231270 100644
--- a/src/client/input.cc
+++ b/src/client/input.cc
@@ -1,50 +1,48 @@
-/* input.cc
+/*
+ input.cc
This file is part of the Osirion project and is distributed under
the terms and conditions of the GNU General Public License version 2
*/
-// SDL headers
-#include <SDL/SDL.h>
-
//project headers
-#include "common/functions.h"
-#include "game/game.h"
-
+#include "input.h"
#include "view.h"
#include "camera.h"
-namespace input
-{
+#include "common/functions.h"
+#include "game/game.h"
-void init()
+namespace client {
+
+void Input::init()
{
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
}
-void shutdown()
+void Input::shutdown()
{
}
-void handle_keydown(SDL_keysym* keysym)
+void Input::handle_keydown(SDL_keysym* keysym)
{
switch( keysym->sym ) {
case SDLK_ESCAPE:
game::shutdown();
break;
case SDLK_SPACE:
- camera::nextmode();
+ Camera::nextmode();
break;
case SDLK_LEFT:
- camera::rotate_left();
+ Camera::rotate_left();
break;
case SDLK_RIGHT:
- camera::rotate_right();
+ Camera::rotate_right();
break;
case SDLK_UP:
- camera::rotate_up();
+ Camera::rotate_up();
break;
case SDLK_DOWN:
- camera::rotate_down();
+ Camera::rotate_down();
break;
case SDLK_KP_PLUS:
game::ship.thrust_increase();
@@ -64,7 +62,7 @@ void handle_keydown(SDL_keysym* keysym)
}
-void process()
+void Input::process()
{
SDL_Event event;
@@ -83,4 +81,5 @@ void process()
}
-} // namespace input
+} // namespace client
+