WARHEAD.H 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. //
  2. // Copyright 2020 Electronic Arts Inc.
  3. //
  4. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
  5. // software: you can redistribute it and/or modify it under the terms of
  6. // the GNU General Public License as published by the Free Software Foundation,
  7. // either version 3 of the License, or (at your option) any later version.
  8. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. /* $Header: /CounterStrike/WARHEAD.H 1 3/03/97 10:26a Joe_bostic $ */
  15. /***********************************************************************************************
  16. *** 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 ***
  17. ***********************************************************************************************
  18. * *
  19. * Project Name : Command & Conquer *
  20. * *
  21. * File Name : WARHEAD.H *
  22. * *
  23. * Programmer : Joe L. Bostic *
  24. * *
  25. * Start Date : 05/17/96 *
  26. * *
  27. * Last Update : May 17, 1996 [JLB] *
  28. * *
  29. *---------------------------------------------------------------------------------------------*
  30. * Functions: *
  31. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  32. #ifndef WARHEAD_H
  33. #define WARHEAD_H
  34. /**********************************************************************
  35. ** Each of the warhead types has specific characteristics. This structure
  36. ** holds these characteristics.
  37. */
  38. class WarheadTypeClass
  39. {
  40. public:
  41. WarheadTypeClass(char const * name);
  42. WarheadTypeClass(NoInitClass const &) {}
  43. void * operator new(size_t);
  44. static void * operator new(size_t , void * ptr) {return(ptr);};
  45. void operator delete(void * pointer);
  46. void Code_Pointers(void) {}
  47. void Decode_Pointers(void) {}
  48. char const * Name(void) const {return(IniName);}
  49. bool Read_INI(CCINIClass & ini);
  50. static WarheadTypeClass * As_Pointer(WarheadType weapon);
  51. /*
  52. ** This is the ID number of the weapon type. It is the weapon
  53. ** type ID enum as well as the index number into the weapon
  54. ** heap.
  55. */
  56. int ID;
  57. /*
  58. ** This is the identifying name of this warhead type.
  59. */
  60. char const * IniName;
  61. /*
  62. ** This value control how damage from this warhead type will reduce
  63. ** over distance. The larger the number, the less the damage is reduced
  64. ** the further the distance from the source of the damage.
  65. */
  66. int SpreadFactor;
  67. /*
  68. ** If this warhead type can destroy walls, then this flag will be true.
  69. */
  70. bool IsWallDestroyer:1;
  71. /*
  72. ** If this warhead can destroy wooden walls, then this flag will be true.
  73. */
  74. bool IsWoodDestroyer:1;
  75. /*
  76. ** Does this warhead damage tiberium?
  77. */
  78. bool IsTiberiumDestroyer:1;
  79. /*
  80. ** Only effective against infantry?
  81. */
  82. bool IsOrganic:1;
  83. /*
  84. ** The warhead damage is reduced depending on the the type of armor the
  85. ** defender has. This table is what gives weapons their "character".
  86. */
  87. fixed Modifier[ARMOR_COUNT];
  88. /*
  89. ** Which explosion set to use for warhead impact.
  90. */
  91. int ExplosionSet;
  92. /*
  93. ** This specifies the infantry death animation to use if the infantry dies as
  94. ** a result of a warhead of this type.
  95. */
  96. int InfantryDeath;
  97. };
  98. #endif