No Description

dns_core.h 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #ifndef DNS_CORE_H
  2. #define DNS_CORE_H
  3. #include <types.h>
  4. #include <lcd.h>
  5. #include <objects.h>
  6. #include <fade.h>
  7. enum dns_rtc_time_type {
  8. DAY,
  9. NIGHT,
  10. EVENING,
  11. MORNING
  12. };
  13. enum map_type {
  14. UNK_00,
  15. VILLAGE,
  16. CITY,
  17. ROUTE,
  18. CELLAR,
  19. UNDERWATER,
  20. UNK_07,
  21. UNK_08,
  22. INSIDE,
  23. SECRET_BASE
  24. };
  25. struct mapdata_header {
  26. u32 width;
  27. u32 height;
  28. void* border;
  29. void* data;
  30. struct blockset* blockset_one;
  31. struct blockset* blockset_two;
  32. u8 border_width;
  33. u8 border_height;
  34. u16 unknown;
  35. };
  36. struct mapheader {
  37. struct mapdata_header* data_header;
  38. void* events;
  39. void* scripts;
  40. void* connections;
  41. u16 music;
  42. u16 mapindex;
  43. u8 name;
  44. u8 cave;
  45. u8 weather;
  46. enum map_type maptype;
  47. u8 field18;
  48. u8 escape_rope;
  49. u8 showname;
  50. u8 battletype;
  51. };
  52. extern struct mapheader current_mapheader;
  53. struct color_shade {
  54. struct color color;
  55. u8 alpha;
  56. };
  57. struct npc_palette {
  58. struct color* palette;
  59. u16 tag;
  60. u16 fill;
  61. };
  62. struct pal_replace {
  63. void* blockset;
  64. u8 pal;
  65. u8 index;
  66. struct color color;
  67. };
  68. struct blockset {
  69. u8 is_compressed;
  70. u8 is_secondary;
  71. u16 padding;
  72. void* tiles;
  73. void* palette;
  74. void* block_tiles;
  75. void* funcptr;
  76. void* behavior;
  77. };
  78. struct dynamic_pal {
  79. u8 type;
  80. u8 count;
  81. u16 tag;
  82. };
  83. #define dynamic_palettes ((struct dynamic_pal*) 0x0203FF00)
  84. extern struct npc_palette* npc_palettes;
  85. extern volatile u8 tint_filter;
  86. extern void blockset_load_palette_to_gpu(void* blockset, u16 start, u16 len);
  87. extern void load_palette_3(u16 start, u16 len);
  88. extern void tint_palette(u8 pal_slot);
  89. extern u8 gpu_pal_tags_index_of(u16 pal_tag);
  90. extern void lz77u_wram(void* src, void* dst);
  91. extern void* oe_read_word(void* oe_script_pointer);
  92. extern void some_weather_func(u8 pal_index);
  93. //care, this has to be manually patched to be u16
  94. extern u16 npc_pal_idx_for_given_tag(u16 tag);
  95. struct color_shade dns_get_shade_from_time(enum dns_rtc_time_type current_time);
  96. enum dns_rtc_time_type dns_get_time_of_day();
  97. void dns_update_palettes();
  98. extern void mapdata_load_palettes_to_gpu(struct mapdata_header* data_header);
  99. extern void script_something();
  100. extern void camera_update();
  101. extern void foo_115798();
  102. extern void foo_5ae28();
  103. extern void foo_6ffbc();
  104. extern void tilemaps_sync();
  105. #endif /* DNS_CORE_H */