From 25d2c764443723eb7a3dd5f8bf0b76586c1ff10b Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 5 Apr 2008 10:52:39 +0000 Subject: Makefile.am updates, math::Axis, improved VertexArray, r_arraysize --- src/client/input.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/client/input.cc') 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(); -- cgit v1.2.3