diff options
author | Stijn Buys <ingar@osirion.org> | 2008-04-05 10:52:39 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-04-05 10:52:39 +0000 |
commit | 25d2c764443723eb7a3dd5f8bf0b76586c1ff10b (patch) | |
tree | b9cc681a3ff20900b32ce287505d018e0a7ae35f /src/client/input.cc | |
parent | 49e268d1b4244948e49a11612501a743e311fbaf (diff) |
Makefile.am updates, math::Axis, improved VertexArray, r_arraysize
Diffstat (limited to 'src/client/input.cc')
-rw-r--r-- | src/client/input.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/input.cc b/src/client/input.cc index 1a61424..88d1dd3 100644 --- a/src/client/input.cc +++ b/src/client/input.cc @@ -28,6 +28,10 @@ float local_thrust; // last controlled entity unsigned int last_control = 0; +// mouse cursor position +int mouse_x = 0; +int mouse_y = 0; + void init() { con_print << "Initializing input..." << std::endl; @@ -117,6 +121,11 @@ void frame(float seconds) while (SDL_PollEvent(&event)) { switch (event.type) { + case SDL_MOUSEMOTION: + mouse_x = event.motion.x; + mouse_y = event.motion.y; + break; + case SDL_KEYUP: if (event.key.keysym.sym == SDLK_PRINT) { video::screenshot(); |