CrystalPoint.h 757 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. class WorldHandler;
  3. class SoundSystem;
  4. class Player;
  5. class Cursor;
  6. class Menu;
  7. #include "Vector.h"
  8. #include "SoundSystem.h"
  9. #include "ControllerHandler.h"
  10. class KeyboardState
  11. {
  12. public:
  13. bool keys[256];
  14. bool special[256];
  15. bool control, shift, alt;
  16. KeyboardState();
  17. };
  18. class CrystalPoint
  19. {
  20. public:
  21. void init();
  22. void draw();
  23. void update();
  24. WorldHandler* worldhandler;
  25. Player* player;
  26. ControllerHandler controller;
  27. Cursor* cursor;
  28. Menu* menu;
  29. static int width, height;
  30. KeyboardState keyboardState;
  31. KeyboardState prevKeyboardState;
  32. Vec2f mouseOffset;
  33. Vec2f mousePosition;
  34. float lastFrameTime;
  35. static SoundSystem& GetSoundSystem() { return sound_system; }
  36. private:
  37. static SoundSystem sound_system;
  38. void buildMenu();
  39. };