characterclasssettings.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  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 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***********************************************************************************************
  19. *** Confidential - Westwood Studios ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Commando *
  23. * *
  24. * $Archive:: /Commando/Code/Combat/characterclasssettings.h $*
  25. * *
  26. * $Author:: Patrick $*
  27. * *
  28. * $Modtime:: 2/12/01 11:20a $*
  29. * *
  30. * $Revision:: 2 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef __CHARACTER_CLASS_SETTINGS_H
  36. #define __CHARACTER_CLASS_SETTINGS_H
  37. #include "always.h"
  38. #include "definition.h"
  39. ///////////////////////////////////////////////////////////////////////////////////////////
  40. //
  41. // CharacterClassSettingsDefClass
  42. //
  43. ///////////////////////////////////////////////////////////////////////////////////////////
  44. class CharacterClassSettingsDefClass : public DefinitionClass
  45. {
  46. public:
  47. //////////////////////////////////////////////////////////////////////////
  48. // Public constants
  49. //////////////////////////////////////////////////////////////////////////
  50. typedef enum
  51. {
  52. CLASS_MINIGUNNER = 0,
  53. CLASS_ROCKET_SOLDIER,
  54. CLASS_GRENADIER,
  55. CLASS_ENGINEER,
  56. CLASS_FLAME_THROWER,
  57. CLASS_MUTANT,
  58. CLASS_COUNT
  59. } CLASS;
  60. typedef enum
  61. {
  62. RANK_ENLISTED = 0,
  63. RANK_OFFICER,
  64. RANK_SPECIAL_FORCES,
  65. RANK_BOSS,
  66. RANK_COUNT
  67. } RANK;
  68. typedef enum
  69. {
  70. TEAM_GDI = 0,
  71. TEAM_NOD,
  72. TEAM_COUNT
  73. } TEAM;
  74. //////////////////////////////////////////////////////////////////////////
  75. // Public constructors/destructors
  76. //////////////////////////////////////////////////////////////////////////
  77. CharacterClassSettingsDefClass (void);
  78. ~CharacterClassSettingsDefClass (void);
  79. //////////////////////////////////////////////////////////////////////////
  80. // Public methods
  81. //////////////////////////////////////////////////////////////////////////
  82. //
  83. // From DefinitionClass
  84. //
  85. virtual uint32 Get_Class_ID (void) const;
  86. virtual PersistClass * Create (void) const ;
  87. virtual bool Save (ChunkSaveClass &csave);
  88. virtual bool Load (ChunkLoadClass &cload);
  89. virtual const PersistFactoryClass & Get_Factory (void) const;
  90. static CharacterClassSettingsDefClass * Get_Instance (void) { return GlobalInstance; }
  91. //
  92. // Accessors
  93. //
  94. int Get_Cost (CLASS char_class, RANK char_rank, TEAM char_team);
  95. int Get_Definition (CLASS char_class, RANK char_rank, TEAM char_team);
  96. //
  97. // Editable support
  98. //
  99. DECLARE_EDITABLE (CharacterClassSettingsDefClass, DefinitionClass);
  100. protected:
  101. //////////////////////////////////////////////////////////////////////////
  102. // Protected member data
  103. //////////////////////////////////////////////////////////////////////////
  104. int CostTable[CLASS_COUNT][RANK_COUNT][TEAM_COUNT];
  105. int DefinitionTable[CLASS_COUNT][RANK_COUNT][TEAM_COUNT];
  106. static CharacterClassSettingsDefClass * GlobalInstance;
  107. };
  108. #endif // __CHARACTER_CLASS_SETTINGS_H