Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/input.cc')
-rw-r--r--src/client/input.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/client/input.cc b/src/client/input.cc
index d594dbf..f75cbb9 100644
--- a/src/client/input.cc
+++ b/src/client/input.cc
@@ -9,9 +9,9 @@
#include "client/input.h"
#include "client/chat.h"
#include "client/console.h"
-#include "client/camera.h"
#include "client/keyboard.h"
#include "client/video.h"
+#include "render/camera.h"
#include "math/functions.h"
#include "render/text.h"
@@ -68,20 +68,20 @@ void keyreleased(const SDL_keysym &keysym)
{
switch (keysym.sym) {
case SDLK_LEFT:
- camera::set_direction(0.0f);
+ render::Camera::set_direction(0.0f);
break;
case SDLK_RIGHT:
- camera::set_direction(0.0f);
+ render::Camera::set_direction(0.0f);
break;
case SDLK_UP:
- camera::set_pitch(0.0f);
+ render::Camera::set_pitch(0.0f);
break;
case SDLK_DOWN:
- camera::set_pitch(0.0f);
+ render::Camera::set_pitch(0.0f);
break;
case SDLK_SPACE:
- camera::next_mode();
+ render::Camera::next_mode();
local_roll = 0;
local_pitch = 0;
local_direction = 0;
@@ -123,16 +123,16 @@ void keypressed(const SDL_keysym &keysym)
{
switch (keysym.sym) {
case SDLK_LEFT:
- camera::set_direction(1.0f);
+ render::Camera::set_direction(1.0f);
break;
case SDLK_RIGHT:
- camera::set_direction(-1.0f);
+ render::Camera::set_direction(-1.0f);
break;
case SDLK_UP:
- camera::set_pitch(1.0f);
+ render::Camera::set_pitch(1.0f);
break;
case SDLK_DOWN:
- camera::set_pitch(-1.0f);
+ render::Camera::set_pitch(-1.0f);
break;
case SDLK_KP_PLUS:
@@ -208,7 +208,7 @@ void frame(float seconds)
mouse_direction = 0.0f;
mouse_x = video::width / 2;
mouse_y = video::height / 2;
- camera::reset();
+ render::Camera::reset();
}
SDL_Event event;
@@ -303,13 +303,13 @@ void frame(float seconds)
mouse_deadzone = false;
}
- if ((camera::mode == camera::Track) || (camera::mode == camera::Cockpit)) {
+ if ((render::Camera::mode() == render::Camera::Track) || (render::Camera::mode() == render::Camera::Cockpit)) {
local_direction = mouse_direction * math::absf(mouse_direction);
local_pitch = mouse_pitch * math::absf(mouse_pitch);
- } else if (camera::mode == camera::Free) {
+ } else if (render::Camera::mode() == render::Camera::Free) {
// squared values to smoothen camera movement
- camera::set_direction( -mouse_direction * math::absf(mouse_direction));
- camera::set_pitch(-mouse_pitch * math::absf(mouse_pitch));
+ render::Camera::set_direction( -mouse_direction * math::absf(mouse_direction));
+ render::Camera::set_pitch(-mouse_pitch * math::absf(mouse_pitch));
}
} else {
@@ -324,7 +324,7 @@ void frame(float seconds)
core::localcontrol()->set_thrust(local_thrust);
core::localcontrol()->set_direction(local_direction);
- core::localcontrol()->set_pitch(local_pitch / video::aspect );
+ core::localcontrol()->set_pitch(local_pitch / render::Camera::aspect() );
core::localcontrol()->set_roll(local_roll);
}
}