47 行
980 B

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the Do What The Fuck You Want To
  7. // Public License, Version 2, as published by Sam Hocevar. See
  8. // http://www.wtfpl.net/ for more details.
  9. //
  10. //
  11. // The SdlInput class
  12. // ------------------
  13. //
  14. #if !defined __LOL_SDLINPUT_H__
  15. #define __LOL_SDLINPUT_H__
  16. #include "entity.h"
  17. namespace lol
  18. {
  19. class SdlInputData;
  20. class SdlInput : public Entity
  21. {
  22. public:
  23. /** passing the screen resolution (note: not the windowed app resolution!) allows to make the mouse axis resolution-independent */
  24. SdlInput(int app_w, int app_h, int screen_w, int screen_h);
  25. virtual ~SdlInput();
  26. void SetScreenResolution();
  27. protected:
  28. virtual void TickGame(float seconds);
  29. virtual void TickDraw(float seconds);
  30. private:
  31. SdlInputData *m_data;
  32. };
  33. } /* namespace lol */
  34. #endif // __LOL_SDLINPUT_H__