From a237a2d7723b94df6cd3e91401ec28388de6f1a0 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 21 Oct 2007 23:02:47 +0000 Subject: namespace cleanup --- src/client/input.cc | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'src/client/input.cc') 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 - //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 + -- cgit v1.2.3