tama.h 749 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #pragma once
  2. #include <input/input.h>
  3. #include <tamalib.h>
  4. #define TAG "TamaP1"
  5. #define TAMA_ROM_PATH EXT_PATH("tama_p1/rom.bin")
  6. #define TAMA_SCREEN_SCALE_FACTOR 2
  7. #define TAMA_LCD_ICON_SIZE 14
  8. #define TAMA_LCD_ICON_MARGIN 1
  9. typedef struct {
  10. FuriThread* thread;
  11. hal_t hal;
  12. uint8_t* rom;
  13. // 32x16 screen, perfectly represented through uint32_t
  14. uint32_t framebuffer[16];
  15. uint8_t icons;
  16. bool halted;
  17. bool fast_forward_done;
  18. bool buzzer_on;
  19. float frequency;
  20. } TamaApp;
  21. typedef enum {
  22. EventTypeInput,
  23. EventTypeTick,
  24. } EventType;
  25. typedef struct {
  26. EventType type;
  27. InputEvent input;
  28. } TamaEvent;
  29. extern TamaApp* g_ctx;
  30. extern FuriMutex* g_state_mutex;
  31. void tamagotchi_p1_hal_init(hal_t* hal);