暫無描述

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef MAP_H_
  2. #define MAP_H_
  3. #include <types.h>
  4. enum map_type {
  5. UNK_00,
  6. VILLAGE,
  7. CITY,
  8. ROUTE,
  9. CELLAR,
  10. UNDERWATER,
  11. UNK_07,
  12. UNK_08,
  13. INSIDE,
  14. SECRET_BASE
  15. };
  16. struct blockset {
  17. u8 is_compressed;
  18. u8 is_secondary;
  19. u16 padding;
  20. void* tiles;
  21. void* palette;
  22. void* block_tiles;
  23. void* funcptr;
  24. void* behavior;
  25. };
  26. struct mapdata_header {
  27. u32 width;
  28. u32 height;
  29. void* border;
  30. void* data;
  31. struct blockset* blockset_one;
  32. struct blockset* blockset_two;
  33. u8 border_width;
  34. u8 border_height;
  35. u16 unknown;
  36. };
  37. struct mapheader {
  38. struct mapdata_header* data_header;
  39. void* events;
  40. void* scripts;
  41. void* connections;
  42. u16 music;
  43. u16 mapindex;
  44. u8 name;
  45. u8 cave;
  46. u8 weather;
  47. enum map_type maptype;
  48. u8 field18;
  49. u8 escape_rope;
  50. u8 showname;
  51. u8 battletype;
  52. };
  53. extern struct mapheader current_mapheader;
  54. u16 current_map_block_id_at(u16 x, u16 y);
  55. void player_get_pos_to(u16* x, u16* y);
  56. #endif //MAP_H_