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>2015-01-03 16:54:18 +0000
committerStijn Buys <ingar@osirion.org>2015-01-03 16:54:18 +0000
commit85671408eed36060f5ff4799f2ee153d66e16282 (patch)
treef76d052c751507953996cf32f578b6d15ca172f5 /src/client/input.cc
parent87db4deac81853737d7fb7c44a4e5eaecc3bc2bd (diff)
Minor cleanup of client::Action and client::Keyboard code,
added Action::FreeLook defintions.
Diffstat (limited to 'src/client/input.cc')
-rw-r--r--src/client/input.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/client/input.cc b/src/client/input.cc
index fed76c9..ab0c847 100644
--- a/src/client/input.cc
+++ b/src/client/input.cc
@@ -434,6 +434,9 @@ void action_press(Key *key)
case Action::ZoomOut:
render::Camera::set_zoom(+0.1f);
break;
+ case Action::FreeLook:
+ // TODO freelook
+ break;
/* -- fire control -------------------------------- */
@@ -537,6 +540,10 @@ void action_release(Key *key)
break;
case Action::ZoomOut:
break;
+ case Action::FreeLook:
+ // TODO freelook
+ break;
+
/* -- fire control -------------------------------- */
@@ -716,14 +723,7 @@ void reset()
mouse_control_override_time = 0;
targets::reset();
- for (Keyboard::iterator it = keyboard->begin(); it != keyboard->end(); it++) {
- Key *key = (*it).second;
- if (key) {
- key->key_pressed = 0;
- key->key_lastpressed = 0;
- key->key_waspressed = 0;
- }
- }
+ keyboard->reset();
last_key = 0;
mouse_lastmoved = 0;
@@ -852,7 +852,7 @@ void frame()
repeat /= 1000.0f;
delay /= 1000.0f;
- for (Keyboard::iterator it = keyboard->begin(); it != keyboard->end(); it++) {
+ for (Keyboard::Keys::iterator it = keyboard->keys().begin(); it != keyboard->keys().end(); it++) {
key = (*it).second;
if (key && (key->sym() < 512) && key->pressed()) {
if ((key->pressed() + delay < core::application()->time()) && (key->lastpressed() + repeat < core::application()->time())) {