CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

WARHEAD.H (4546B)


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