pokemon_app.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef POKEMON_APP_H
  2. #define POKEMON_APP_H
  3. #pragma once
  4. #include <furi.h>
  5. #include <furi_hal_light.h>
  6. #include <gui/gui.h>
  7. #include <gui/view.h>
  8. #include <gui/view_dispatcher.h>
  9. #include <gui/icon.h>
  10. #include <pokemon_icons.h>
  11. #define TAG "Pokemon"
  12. struct pokemon_data_table {
  13. const char* name;
  14. const Icon* icon;
  15. const uint8_t species;
  16. };
  17. typedef struct pokemon_data_table PokemonTable;
  18. typedef enum {
  19. GAMEBOY_INITIAL,
  20. GAMEBOY_READY,
  21. GAMEBOY_WAITING,
  22. GAMEBOY_TRADE_READY,
  23. GAMEBOY_SEND,
  24. GAMEBOY_PENDING,
  25. GAMEBOY_TRADING
  26. } render_gameboy_state_t;
  27. struct pokemon_fap {
  28. ViewDispatcher* view_dispatcher;
  29. /* View ports for each of the application's steps */
  30. View* select_view;
  31. View* trade_view;
  32. /* Table of pokemon data for Gen I */
  33. const PokemonTable* pokemon_table;
  34. /* The currently selected pokemon */
  35. int curr_pokemon;
  36. /* Some state tracking */
  37. /* This, combined with some globals in trade.cpp, can probably be better
  38. * consolidated at some point.
  39. */
  40. bool trading;
  41. bool connected;
  42. render_gameboy_state_t gameboy_status;
  43. /* TODO: Other variables will end up here, like selected level, EV/IV,
  44. * moveset, etc. Likely will want to be another sub struct similar to
  45. * the actual pokemon data structure.
  46. */
  47. };
  48. typedef struct pokemon_fap PokemonFap;
  49. typedef enum {
  50. AppViewSelectPokemon,
  51. AppViewTrade,
  52. AppViewExitConfirm,
  53. } AppView;
  54. #endif /* POKEMON_APP_H */