Clone of Bael'Zharon's Respite @ https://github.com/boardwalk/bzr

AnimationHook.h 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /*
  2. * Bael'Zharon's Respite
  3. * Copyright (C) 2014 Daniel Skorupski
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  17. */
  18. #ifndef BZR_ANIMATIONHOOK_H
  19. #define BZR_ANIMATIONHOOK_H
  20. class BinReader;
  21. struct AnimationHook
  22. {
  23. virtual ~AnimationHook() {}
  24. uint32_t hookDir;
  25. };
  26. // AC: SoundHook
  27. struct SoundHook : public AnimationHook
  28. {
  29. uint32_t soundId;
  30. };
  31. // AC: SoundTableHook
  32. struct SoundTableHook : public AnimationHook
  33. {
  34. uint32_t soundType;
  35. };
  36. // AC: AttackHook
  37. // AC: AttackCone
  38. struct AttackHook : public AnimationHook
  39. {
  40. uint32_t partIndex;
  41. float leftX;
  42. float leftY;
  43. float rightX;
  44. float rightY;
  45. float radius;
  46. float height;
  47. };
  48. // AC: ReplaceObjectHook
  49. // AC: AnimPartChange
  50. struct ReplaceObjectHook : public AnimationHook
  51. {
  52. uint16_t partIndex;
  53. uint16_t partId;
  54. };
  55. // AC: EtherealHook
  56. struct EtherealHook : public AnimationHook
  57. {
  58. bool ethereal;
  59. };
  60. // AC: TransparentPartHook
  61. struct TransparentPartHook : public AnimationHook
  62. {
  63. uint32_t partIndex;
  64. float start;
  65. float end;
  66. float time;
  67. };
  68. // AC: ScaleHook
  69. struct ScaleHook : public AnimationHook
  70. {
  71. float end;
  72. float time;
  73. };
  74. // AC: CreateParticleHook
  75. struct CreateParticleHook : public AnimationHook
  76. {
  77. uint32_t emitterInfoId;
  78. uint32_t partIndex;
  79. glm::vec3 position;
  80. glm::quat rotation;
  81. uint32_t emitterId;
  82. };
  83. // AC: DestroyParticleHook
  84. struct DestroyParticleHook : public AnimationHook
  85. {
  86. uint32_t emitterId;
  87. };
  88. // AC: StopParticleHook
  89. struct StopParticleHook : public AnimationHook
  90. {
  91. uint32_t emitterId;
  92. };
  93. // AC: NoDrawHook
  94. struct NoDrawHook : public AnimationHook
  95. {
  96. bool noDraw;
  97. };
  98. // AC: DefaultScriptHook
  99. struct DefaultScriptHook : public AnimationHook
  100. {
  101. };
  102. // AC: CellPESHook
  103. struct CallPESHook : public AnimationHook
  104. {
  105. uint32_t pesId;
  106. float pause;
  107. };
  108. // AC: TransparentHook
  109. struct TransparentHook : public AnimationHook
  110. {
  111. float start;
  112. float end;
  113. float time;
  114. };
  115. // AC: SoundTweakedHook
  116. struct SoundTweakedHook : public AnimationHook
  117. {
  118. uint32_t soundId;
  119. float priority;
  120. float probability;
  121. float volume;
  122. };
  123. // AC: SetOmegaHook
  124. struct SetOmegaHook : public AnimationHook
  125. {
  126. glm::vec3 axis;
  127. };
  128. // AC: TextureVelocityHook
  129. struct TextureVelocityHook : public AnimationHook
  130. {
  131. float uSpeed;
  132. float vSpeed;
  133. };
  134. // AC: SetLightHook
  135. struct SetLightHook : public AnimationHook
  136. {
  137. bool lightsOn;
  138. };
  139. // AC: CreateBlockingParticleHook
  140. struct CreateBlockingParticleHook : public AnimationHook
  141. {
  142. uint32_t emitterInfoId;
  143. uint32_t partIndex;
  144. glm::vec3 position;
  145. glm::quat rotation;
  146. uint32_t emitterId;
  147. };
  148. void read(BinReader& reader, unique_ptr<AnimationHook>& hook);
  149. #endif