game.h 810 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #pragma once
  2. #include <stdint.h>
  3. #include "engine/engine.h" // IWYU pragma: keep
  4. #define SCREEN_WIDTH 128
  5. #define SCREEN_HEIGHT 64
  6. #define GAME_NAME "Quadrastic"
  7. typedef enum
  8. {
  9. DifficultyEasy,
  10. DifficultyNormal,
  11. DifficultyHard,
  12. DifficultyInsane,
  13. DifficultyCount,
  14. } Difficulty;
  15. typedef enum
  16. {
  17. StateOff,
  18. StateOn,
  19. StateCount,
  20. } State;
  21. typedef enum
  22. {
  23. GameEventStopAnimation,
  24. } GameEvent;
  25. typedef struct
  26. {
  27. Level* menu;
  28. Level* game;
  29. Level* game_over;
  30. Level* settings;
  31. Level* about;
  32. } Levels;
  33. typedef struct NotificationApp NotificationApp;
  34. typedef struct
  35. {
  36. NotificationApp* notification;
  37. Levels levels;
  38. Difficulty difficulty;
  39. uint32_t best_score;
  40. uint32_t score;
  41. State sound;
  42. State vibro;
  43. State led;
  44. } GameContext;