missiletypeigc.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. /*
  2. ** Copyright (C) 1996, 1997 Microsoft Corporation. All Rights Reserved.
  3. **
  4. ** File: missileTypeIGC.h
  5. **
  6. ** Author:
  7. **
  8. ** Description:
  9. ** Header for the CmissileTypeIGC class. This file was initially created by
  10. ** the ATL wizard.
  11. **
  12. ** History:
  13. */
  14. // missileTypeIGC.h : Declaration of the CmissileTypeIGC
  15. #ifndef __MISSILETYPEIGC_H_
  16. #define __MISSILETYPEIGC_H_
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CmissileTypeIGC
  19. class CmissileTypeIGC : public ImissileTypeIGC
  20. {
  21. public:
  22. CmissileTypeIGC(void)
  23. {
  24. }
  25. // IbaseIGC
  26. virtual HRESULT Initialize(ImissionIGC* pMission, Time now, const void* data, int dataSize);
  27. virtual void Terminate(void)
  28. {
  29. m_pMission->DeleteExpendableType(this);
  30. }
  31. virtual void Update(Time now)
  32. {
  33. }
  34. virtual int Export(void* data) const;
  35. virtual ObjectType GetObjectType(void) const
  36. {
  37. return OT_missileType;
  38. }
  39. virtual ObjectID GetObjectID(void) const
  40. {
  41. return m_data.expendabletypeID;
  42. }
  43. // ItypeIGC
  44. virtual const void* GetData(void) const
  45. {
  46. return &m_data;
  47. }
  48. // IexpendableTypeIGC
  49. virtual const LauncherDef* GetLauncherDef(void) const
  50. {
  51. return &(m_data.launcherDef);
  52. }
  53. virtual EquipmentType GetEquipmentType(void) const
  54. {
  55. return ET_Magazine;
  56. }
  57. virtual float GetLoadTime(void) const
  58. {
  59. return m_data.loadTime;
  60. }
  61. virtual float GetMass(void) const
  62. {
  63. return m_data.launcherDef.mass;
  64. }
  65. virtual float GetLifespan(void) const
  66. {
  67. return m_data.lifespan;
  68. }
  69. virtual float GetSignature(void) const
  70. {
  71. return m_data.signature;
  72. }
  73. virtual HitPoints GetHitPoints(void) const
  74. {
  75. return m_data.hitPoints;
  76. }
  77. virtual DefenseTypeID GetDefenseType(void) const
  78. {
  79. return m_data.defenseType;
  80. }
  81. virtual char const* GetName(void) const
  82. {
  83. return m_data.launcherDef.name;
  84. }
  85. virtual char const* GetModelName(void) const
  86. {
  87. return m_data.modelName;
  88. }
  89. virtual char const* GetModelTexture(void) const
  90. {
  91. return m_data.textureName;
  92. }
  93. virtual float GetRadius(void) const
  94. {
  95. return m_data.radius;
  96. }
  97. virtual ExpendableAbilityBitMask GetCapabilities(void) const
  98. {
  99. return m_data.eabmCapabilities;
  100. }
  101. virtual bool HasCapability(ExpendableAbilityBitMask eabm) const
  102. {
  103. return (m_data.eabmCapabilities & eabm) != 0;
  104. }
  105. // ImissileTypeIGC
  106. virtual float GetAcceleration(void) const
  107. {
  108. return m_data.acceleration;
  109. }
  110. virtual float GetTurnRate(void) const
  111. {
  112. return m_data.turnRate;
  113. }
  114. virtual float GetInitialSpeed(void) const
  115. {
  116. return m_data.initialSpeed;
  117. }
  118. //virtual float GetArmTime(void) const
  119. //{
  120. //return m_data.armTime;
  121. //}
  122. virtual float GetMaxLock(void) const
  123. {
  124. return m_data.maxLock;
  125. }
  126. virtual float GetChaffResistance(void) const
  127. {
  128. return m_data.chaffResistance;
  129. }
  130. virtual float GetLockTime(void) const
  131. {
  132. return m_data.lockTime;
  133. }
  134. virtual float GetReadyTime(void) const
  135. {
  136. return m_data.readyTime;
  137. }
  138. virtual float GetDispersion(void) const
  139. {
  140. return m_data.dispersion;
  141. }
  142. virtual float GetLockAngle(void) const
  143. {
  144. return m_data.lockAngle;
  145. }
  146. virtual float GetPower(void) const
  147. {
  148. return m_data.power;
  149. }
  150. virtual float GetBlastPower(void) const
  151. {
  152. return m_data.blastPower;
  153. }
  154. virtual float GetBlastRadius(void) const
  155. {
  156. return m_data.blastRadius;
  157. }
  158. virtual DamageTypeID GetDamageType(void) const
  159. {
  160. return m_data.damageType;
  161. }
  162. virtual SoundID GetLaunchSound(void) const
  163. {
  164. return m_data.launchSound;
  165. }
  166. virtual SoundID GetAmbientSound(void) const
  167. {
  168. return m_data.ambientSound;
  169. }
  170. private:
  171. ImissionIGC* m_pMission;
  172. DataMissileTypeIGC m_data;
  173. };
  174. #endif //__MISSILETYPEIGC_H_