developmentigc.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. ** Copyright (C) 1996, 1997 Microsoft Corporation. All Rights Reserved.
  3. **
  4. ** File: developmentIGC.h
  5. **
  6. ** Author:
  7. **
  8. ** Description:
  9. ** Header for the CdevelopmentIGC class. This file was initially created by
  10. ** the ATL wizard.
  11. **
  12. ** History:
  13. */
  14. // developmentIGC.h : Declaration of the CdevelopmentIGC
  15. #ifndef __DEVELOPMENTIGC_H_
  16. #define __DEVELOPMENTIGC_H_
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CdevelopmentIGC
  19. class CdevelopmentIGC : public IdevelopmentIGC
  20. {
  21. public:
  22. CdevelopmentIGC(void)
  23. {
  24. }
  25. ~CdevelopmentIGC(void)
  26. {
  27. }
  28. public:
  29. // IbaseIGC
  30. virtual HRESULT Initialize(ImissionIGC* pMission, Time now, const void* data, int dataSize);
  31. virtual void Terminate(void);
  32. virtual int Export(void* data) const;
  33. virtual ObjectType GetObjectType(void) const
  34. {
  35. return OT_development;
  36. }
  37. virtual ObjectID GetObjectID(void) const
  38. {
  39. return m_data.developmentID;
  40. }
  41. // ItypeIGC
  42. virtual const void* GetData(void) const
  43. {
  44. return &m_data;
  45. }
  46. // IbuyableIGC
  47. virtual const char* GetModelName(void) const
  48. {
  49. return m_data.modelName;
  50. }
  51. virtual const char* GetIconName(void) const
  52. {
  53. return m_data.iconName;
  54. }
  55. virtual const char* GetName(void) const
  56. {
  57. return m_data.name;
  58. }
  59. virtual const char* GetDescription(void) const
  60. {
  61. return m_data.description;
  62. }
  63. virtual Money GetPrice(void) const
  64. {
  65. return m_data.price;
  66. }
  67. virtual BuyableGroupID GetGroupID(void) const
  68. {
  69. return m_data.groupID;
  70. };
  71. virtual const TechTreeBitMask& GetRequiredTechs(void) const
  72. {
  73. return m_data.ttbmRequired;
  74. }
  75. virtual const TechTreeBitMask& GetEffectTechs(void) const
  76. {
  77. return m_data.ttbmEffects;
  78. }
  79. virtual DWORD GetTimeToBuild(void) const
  80. {
  81. return m_data.timeToBuild;
  82. }
  83. // IdevelopmentIGC
  84. virtual const GlobalAttributeSet& GetGlobalAttributeSet(void) const
  85. {
  86. return m_data.gas;
  87. }
  88. virtual bool GetTechOnly(void) const
  89. {
  90. return m_techOnly;
  91. }
  92. virtual bool IsObsolete(const TechTreeBitMask& ttbm) const
  93. {
  94. return m_techOnly && (m_data.ttbmEffects <= ttbm);
  95. }
  96. virtual SoundID GetCompletionSound() const
  97. {
  98. return m_data.completionSound;
  99. }
  100. private:
  101. ImissionIGC* m_pMission;
  102. DataDevelopmentIGC m_data;
  103. bool m_techOnly;
  104. };
  105. #endif //__DEVELOPMENTIGC_H_