pokemon_app.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 hex;
  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. #if 0
  28. struct App {
  29. Gui* gui;
  30. ViewDispatcher* view_dispatcher;
  31. SelectPokemon* select_pokemon;
  32. Trade* trade;
  33. uint32_t view_id;
  34. int current_pokemon = 0;
  35. char pokemon_hex_code = ' ';
  36. };
  37. #endif
  38. struct pokemon_fap {
  39. Gui* gui;
  40. ViewDispatcher* view_dispatcher;
  41. /* View ports for each of the application's steps */
  42. View* select_view;
  43. View* trade_view;
  44. /* Table of pokemon data for Gen I */
  45. const PokemonTable* pokemon_table;
  46. /* The currently selected pokemon */
  47. int curr_pokemon;
  48. /* Some state tracking */
  49. /* This, combined with some globals in trade.cpp, can probably be better
  50. * consolidated at some point.
  51. */
  52. bool trading;
  53. bool connected;
  54. render_gameboy_state_t gameboy_status;
  55. /* TODO: Other variables will end up here, like selected level, EV/IV,
  56. * moveset, etc. Likely will want to be another sub struct similar to
  57. * the actual pokemon data structure.
  58. */
  59. };
  60. typedef struct pokemon_fap PokemonFap;
  61. typedef enum {
  62. AppViewSelectPokemon,
  63. AppViewTrade,
  64. AppViewExitConfirm,
  65. } AppView;
  66. #endif /* POKEMON_APP_H */