No Description

pokedex_common.h 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef PDEX_C_H_
  2. #define PDEX_C_H_
  3. #include <pokeagb/pokeagb.h>
  4. #define PDEX_ALOLA_COUNT (18)
  5. #define PDEX_LAST_ENTRY (813 + PDEX_ALOLA_COUNT)
  6. #define PDEX_LAST_SHOWN (813)
  7. #define CPUFSCPY 0
  8. #define CPUFSSET 1
  9. #define CPUModeFS(size, mode) ((size >> 2) | (mode << 24))
  10. #define MAX3_COUNT_DIGITS(n) (n >= 100 ? 3 : (n >= 10 ? 2 : 1))
  11. #define OBJID_HIDE(objid) objects[objid].final_oam.affine_mode = 2
  12. #define OBJID_SHOW(objid) objects[objid].final_oam.affine_mode = 0
  13. #define PDEX_FADEIN_SPD 1
  14. #define FONT_DEX_STD 1
  15. #define TB_STD_LEN 10
  16. #define TB_STD_LEN_PX (TB_STD_LEN * 8)
  17. #define TB_BOT_LEN 9
  18. #define TB_BOT_LEN_PX (TB_BOT_LEN * 8)
  19. #define TB_STD_CENTER(t,w) (((w - t) >> 1) + 2)
  20. #define TB_STD_RIGHT(t,w) ((w - t))
  21. #define DEX_PKMN_TAG_ONE 0x1300
  22. #define DEX_PKMN_TAG_TWO 0x1310
  23. #define DEX_PKMN_TAG_THREE 0x1311
  24. #define DEX_BALL_TAG 0x1301
  25. #define DEX_CURSOR_TAG 0x1302
  26. #define DEX_ARROW_TAG 0x1303
  27. #define DEX_ARROW_TAG_EPAL 0x1304
  28. #define DEX_SCROLL_TAG 0x1305
  29. #define DEX_REGION_SELECT 0x1306
  30. #define DEX_DETAIL_TYPE1 0x130E
  31. #define DEX_DETAIL_TYPE2 0x130F
  32. #define DEX_DETAIL_TYPEPAL 0x130E
  33. #define DEX_REGION_PAL(i) (0x1307 + i)
  34. #define DEX_REGION_ICON(i) (0x1307 + i)
  35. #define MAX_FORMS 7
  36. #define FORM_COUNT 20
  37. struct DexForm
  38. {
  39. u16 index;
  40. struct DexFormEntry forms[MAX_FORMS];
  41. };
  42. void pdex_cb_handler(void);
  43. void pdex_vblank_handler(void);
  44. void pdex_vram_setup(void);
  45. void pdex_vram_free_bgmaps(void);
  46. void pdex_free_memory(void);
  47. void pdex_alloc_memory(void);
  48. struct PdexLookup *pdex_lazy_lookup_entry(u16 dexIndex);
  49. void pdex_load(void);
  50. const u16 pdex_text_pal[16];
  51. const struct BgConfig pdex_bg_config[4];
  52. struct TextColor pdex_text_color;
  53. const struct OamData pdex_oam_pkmn;
  54. struct DexForm pdex_forms[FORM_COUNT];
  55. u8 pstr_lines(const pchar* str);
  56. #endif