Nav apraksta

npc.h 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /****************************************************************************
  2. * Copyright (C) 2015-2017 by the SotS Team *
  3. * *
  4. * This file is part of Sovereign of the Skies. *
  5. * *
  6. * Sovereign of the Skies is free software: you can redistribute it *
  7. * and/or modify it *
  8. * under the terms of the GNU Lesser General Public License as published *
  9. * by the Free Software Foundation, either version 3 of the License, or *
  10. * (at your option) any later version provided you include a copy of the *
  11. * licence and this header. *
  12. * *
  13. * Sovereign of the Skies is distributed in the hope that it will be *
  14. * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of *
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  16. * GNU Lesser General Public License for more details. *
  17. * *
  18. * You should have received a copy of the GNU Lesser General Public *
  19. * License along with Sovereign of the Skies. *
  20. * If not, see <http://www.gnu.org/licenses/>. *
  21. ****************************************************************************/
  22. /*
  23. * File: npc.h
  24. * Author: Sturmvogel
  25. *
  26. * Created on May 2, 2017
  27. * @brief Provides structures for NPC access
  28. */
  29. #ifndef NPC_H
  30. #define NPC_H
  31. #include <types.h>
  32. /* === STRUCTURES === */
  33. struct coords_16 {
  34. u16 x;
  35. u16 y;
  36. };
  37. struct npc_state
  38. {
  39. u8 bitfield;
  40. u8 field_1;
  41. u8 field_2;
  42. u8 field_3;
  43. u8 oam_id;
  44. u8 type_id;
  45. u8 running_behavior;
  46. u8 is_trainer;
  47. u8 local_id;
  48. u8 local_mapnumber;
  49. u8 local_mapbank;
  50. u8 height;
  51. struct coords_16 stay_around;
  52. struct coords_16 to;
  53. struct coords_16 from;
  54. u8 direction;
  55. u8 movement_area;
  56. u8 field_1A;
  57. u8 oamid2;
  58. u8 an_index;
  59. u8 sight_distance;
  60. u8 tile_to;
  61. u8 tile_from;
  62. u8 unknown_1;
  63. u8 unknown_2;
  64. u8 field_22;
  65. u8 field_23;
  66. };
  67. struct npc_type {
  68. u16 tiles_tag;
  69. u16 pal_num;
  70. u16 pal_tag_2;
  71. u16 field_6;
  72. struct coords_16 pos_neg_center;
  73. u8 pal_slot_unk;
  74. u8 field_D;
  75. u16 pal_table;
  76. u32 oam;
  77. u32 field_14;
  78. u32 image_anims;
  79. u32 gfx_table;
  80. u32 rot_scale_anims;
  81. };
  82. #endif /* NPC_H */