dolphin_i.h 504 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <furi.h>
  3. #include <furi-hal.h>
  4. #include "dolphin.h"
  5. #include "helpers/dolphin_state.h"
  6. typedef enum {
  7. DolphinEventTypeDeed,
  8. DolphinEventTypeSave,
  9. DolphinEventTypeTick,
  10. } DolphinEventType;
  11. typedef struct {
  12. DolphinEventType type;
  13. union {
  14. DolphinDeed deed;
  15. };
  16. } DolphinEvent;
  17. struct Dolphin {
  18. // State
  19. DolphinState* state;
  20. // Queue
  21. osMessageQueueId_t event_queue;
  22. };
  23. Dolphin* dolphin_alloc();
  24. void dolphin_free(Dolphin* dolphin);