WARHEAD.H 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /*
  2. ** Command & Conquer Red Alert(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. /* $Header: /CounterStrike/WARHEAD.H 1 3/03/97 10:26a Joe_bostic $ */
  19. /***********************************************************************************************
  20. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  21. ***********************************************************************************************
  22. * *
  23. * Project Name : Command & Conquer *
  24. * *
  25. * File Name : WARHEAD.H *
  26. * *
  27. * Programmer : Joe L. Bostic *
  28. * *
  29. * Start Date : 05/17/96 *
  30. * *
  31. * Last Update : May 17, 1996 [JLB] *
  32. * *
  33. *---------------------------------------------------------------------------------------------*
  34. * Functions: *
  35. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  36. #ifndef WARHEAD_H
  37. #define WARHEAD_H
  38. /**********************************************************************
  39. ** Each of the warhead types has specific characteristics. This structure
  40. ** holds these characteristics.
  41. */
  42. class WarheadTypeClass
  43. {
  44. public:
  45. WarheadTypeClass(char const * name);
  46. WarheadTypeClass(NoInitClass const &) {}
  47. void * operator new(size_t);
  48. static void * operator new(size_t , void * ptr) {return(ptr);};
  49. void operator delete(void * pointer);
  50. void Code_Pointers(void) {}
  51. void Decode_Pointers(void) {}
  52. char const * Name(void) const {return(IniName);}
  53. bool Read_INI(CCINIClass & ini);
  54. static WarheadTypeClass * As_Pointer(WarheadType weapon);
  55. /*
  56. ** This is the ID number of the weapon type. It is the weapon
  57. ** type ID enum as well as the index number into the weapon
  58. ** heap.
  59. */
  60. int ID;
  61. /*
  62. ** This is the identifying name of this warhead type.
  63. */
  64. char const * IniName;
  65. /*
  66. ** This value control how damage from this warhead type will reduce
  67. ** over distance. The larger the number, the less the damage is reduced
  68. ** the further the distance from the source of the damage.
  69. */
  70. int SpreadFactor;
  71. /*
  72. ** If this warhead type can destroy walls, then this flag will be true.
  73. */
  74. bool IsWallDestroyer:1;
  75. /*
  76. ** If this warhead can destroy wooden walls, then this flag will be true.
  77. */
  78. bool IsWoodDestroyer:1;
  79. /*
  80. ** Does this warhead damage tiberium?
  81. */
  82. bool IsTiberiumDestroyer:1;
  83. /*
  84. ** Only effective against infantry?
  85. */
  86. bool IsOrganic:1;
  87. /*
  88. ** The warhead damage is reduced depending on the the type of armor the
  89. ** defender has. This table is what gives weapons their "character".
  90. */
  91. fixed Modifier[ARMOR_COUNT];
  92. /*
  93. ** Which explosion set to use for warhead impact.
  94. */
  95. int ExplosionSet;
  96. /*
  97. ** This specifies the infantry death animation to use if the infantry dies as
  98. ** a result of a warhead of this type.
  99. */
  100. int InfantryDeath;
  101. };
  102. #endif