chafftypeigc.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*
  2. ** Copyright (C) 1996, 1997 Microsoft Corporation. All Rights Reserved.
  3. **
  4. ** File: chaffTypeIGC.h
  5. **
  6. ** Author:
  7. **
  8. ** Description:
  9. ** Header for the CchaffTypeIGC class. This file was initially created by
  10. ** the ATL wizard.
  11. **
  12. ** History:
  13. */
  14. // chaffTypeIGC.h : Declaration of the CchaffTypeIGC
  15. #ifndef __CHAFFTYPEIGC_H_
  16. #define __CHAFFTYPEIGC_H_
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CchaffTypeIGC
  19. class CchaffTypeIGC : public IchaffTypeIGC
  20. {
  21. public:
  22. CchaffTypeIGC(void)
  23. {
  24. }
  25. ~CchaffTypeIGC(void)
  26. {
  27. }
  28. // IbaseIGC
  29. virtual HRESULT Initialize(ImissionIGC* pMission, Time now, const void* data, int dataSize);
  30. virtual void Terminate(void)
  31. {
  32. m_pMission->DeleteExpendableType(this);
  33. }
  34. virtual void Update(Time now)
  35. {
  36. }
  37. virtual int Export(void* data) const;
  38. virtual ObjectType GetObjectType(void) const
  39. {
  40. return OT_chaffType;
  41. }
  42. virtual ObjectID GetObjectID(void) const
  43. {
  44. return m_data.expendabletypeID;
  45. }
  46. // ItypeIGC
  47. virtual const void* GetData(void) const
  48. {
  49. return &m_data;
  50. }
  51. // IexpendableTypeIGC
  52. virtual const LauncherDef* GetLauncherDef(void) const
  53. {
  54. return &(m_data.launcherDef);
  55. }
  56. virtual EquipmentType GetEquipmentType(void) const
  57. {
  58. return ET_ChaffLauncher;
  59. }
  60. virtual float GetLoadTime(void) const
  61. {
  62. return m_data.loadTime;
  63. }
  64. virtual float GetMass(void) const
  65. {
  66. return m_data.launcherDef.mass;
  67. }
  68. virtual float GetLifespan(void) const
  69. {
  70. return m_data.lifespan;
  71. }
  72. virtual float GetSignature(void) const
  73. {
  74. return m_data.signature;
  75. }
  76. virtual HitPoints GetHitPoints(void) const
  77. {
  78. return m_data.hitPoints;
  79. }
  80. virtual DefenseTypeID GetDefenseType(void) const
  81. {
  82. return m_data.defenseType;
  83. }
  84. virtual char const* GetName(void) const
  85. {
  86. return m_data.launcherDef.name;
  87. }
  88. virtual char const* GetModelName(void) const
  89. {
  90. return m_data.modelName;
  91. }
  92. virtual char const* GetModelTexture(void) const
  93. {
  94. return m_data.textureName;
  95. }
  96. virtual float GetRadius(void) const
  97. {
  98. return m_data.radius;
  99. }
  100. virtual ExpendableAbilityBitMask GetCapabilities(void) const
  101. {
  102. return m_data.eabmCapabilities;
  103. }
  104. virtual bool HasCapability(ExpendableAbilityBitMask eabm) const
  105. {
  106. return (m_data.eabmCapabilities & eabm) != 0;
  107. }
  108. // IchaffTypeIGC
  109. virtual float GetChaffStrength(void) const
  110. {
  111. return m_data.chaffStrength;
  112. }
  113. private:
  114. ImissionIGC* m_pMission;
  115. DataChaffTypeIGC m_data;
  116. };
  117. #endif //__CHAFFTYPEIGC_H_