TYPE.H 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057
  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/TYPE.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 : TYPE.H *
  22. * *
  23. * Programmer : Joe L. Bostic *
  24. * *
  25. * Start Date : April 14, 1994 *
  26. * *
  27. * Last Update : April 14, 1994 [JLB] *
  28. * *
  29. *---------------------------------------------------------------------------------------------*
  30. * Functions: *
  31. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  32. #ifndef TYPE_H
  33. #define TYPE_H
  34. #include "mission.h"
  35. #include "target.h"
  36. class MapEditClass;
  37. class HouseClass;
  38. class WeaponTypeClass;
  39. /***************************************************************************
  40. ** This is the abstract type class. It holds information common to all
  41. ** objects that might exist. This contains the name of the object type.
  42. */
  43. class AbstractTypeClass
  44. {
  45. public:
  46. /*
  47. ** This serves to identify the object class. The ID corresponds to the
  48. ** variation number (e.g., UNIT_TANK1, UNIT_TANK2, etc.).
  49. */
  50. RTTIType RTTI;
  51. int ID;
  52. /*
  53. ** This is the internal control name of the object. This name does
  54. ** not change regardless of language specified. This is the name
  55. ** used in scenario control files and for other text based unique
  56. ** identification purposes.
  57. */
  58. char IniName[24];
  59. /*
  60. ** The translated (language specific) text name number of this object.
  61. ** This number is used to fetch the object's name from the language
  62. ** text file. Whenever the name of the object needs to be displayed,
  63. ** this is used to determine the text string.
  64. */
  65. int FullName;
  66. AbstractTypeClass(RTTIType rtti, int id, int name, char const * ini);
  67. AbstractTypeClass(NoInitClass const & ) {};
  68. ~AbstractTypeClass(void) {};
  69. RTTIType What_Am_I(void) const {return(RTTI);};
  70. TARGET As_Target(void) const {return(Build_Target(RTTI, ID));};
  71. virtual COORDINATE Coord_Fixup(COORDINATE coord) const;
  72. virtual int Full_Name(void) const;
  73. char const * Name(void) const {return(IniName);}
  74. void Set_Name(char const * buf) const {
  75. strncpy((char *)IniName, buf, sizeof(IniName));
  76. ((char &)IniName[sizeof(IniName)-1]) = '\0';
  77. };
  78. virtual int Get_Ownable(void) const;
  79. void Code_Pointers(void) {}
  80. void Decode_Pointers(void) {}
  81. };
  82. /**********************************************************************
  83. ** Each house has certain unalienable characteristics. This structure
  84. ** elaborates these.
  85. */
  86. class HouseTypeClass : public AbstractTypeClass
  87. {
  88. public:
  89. /*
  90. ** This is the house number (enum). This is a unique identification
  91. ** number for the house.
  92. */
  93. HousesType House;
  94. /*
  95. ** This is the filename suffix to use when creating a house specific
  96. ** file name. It is three characters long.
  97. */
  98. char Suffix[_MAX_EXT];
  99. /*
  100. ** This is the "lemon percentage" to use when determining if a particular
  101. ** object owned by this house is to be flagged as a "lemon". Objects so
  102. ** flagged have a greater break-down chance. The percentage is expressed
  103. ** as a fixed point number with 0x000 meaning 0% and 0x100 meaning 100%.
  104. */
  105. unsigned Lemon;
  106. /*
  107. ** This points to the default remap table for this house.
  108. */
  109. PlayerColorType RemapColor;
  110. /*
  111. ** This is a unique ASCII character used when constructing filenames. It
  112. ** serves a similar purpose as the "Suffix" element, but is only one
  113. ** character long.
  114. */
  115. char Prefix;
  116. /*
  117. ** This controls the various general adjustments to the house owned
  118. ** unit and building ratings. The default value for these ratings is
  119. ** a fixed point number of 1.0.
  120. */
  121. fixed FirepowerBias;
  122. fixed GroundspeedBias;
  123. fixed AirspeedBias;
  124. fixed ArmorBias;
  125. fixed ROFBias;
  126. fixed CostBias;
  127. fixed BuildSpeedBias;
  128. //------------------------------------------------------------------------
  129. HouseTypeClass(NoInitClass const & x) : AbstractTypeClass(x) {}
  130. HouseTypeClass(HousesType house,
  131. char const * ini,
  132. int fullname,
  133. char const * ext,
  134. int lemon,
  135. PlayerColorType remapcolor,
  136. char prefix);
  137. unsigned char const * Remap_Table(void) const;
  138. static void * operator new(size_t);
  139. static void * operator new(size_t , void * ptr) {return(ptr);};
  140. static void operator delete(void * ptr);
  141. static HousesType From_Name(char const * name);
  142. static HouseTypeClass & As_Reference(HousesType house);
  143. static void One_Time(void);
  144. static void Init_Heap(void);
  145. virtual bool Read_INI(CCINIClass & ini);
  146. };
  147. /***************************************************************************
  148. ** This the the common base class of game objects. Since these values
  149. ** represent the unchanging object TYPES, this data is initialized at game
  150. ** start and not changed during play. It is "const" data.
  151. */
  152. class ObjectTypeClass : public AbstractTypeClass
  153. {
  154. public:
  155. /*
  156. ** This is the base name of the graphic data associated with this object
  157. ** type. If the graphic name is a null string, then there is no graphic
  158. ** associated with this object type.
  159. */
  160. char GraphicName[_MAX_FNAME];
  161. /*
  162. ** Is this object squashable by heavy vehicles? If it is, then the vehicle
  163. ** can travel over this object and destroy it in the process.
  164. */
  165. unsigned IsCrushable:1;
  166. /*
  167. ** Does this object type NOT show up on radar scans? If true, then in any
  168. ** radar display, only the underlying ground will be show, not this object.
  169. ** Most terrain falls into this category, but only a few special real units/buildings
  170. ** do.
  171. */
  172. unsigned IsStealthy:1;
  173. /*
  174. ** It is legal to "select" some objects in the game. If it is legal to select this
  175. ** object type then this flag will be true. Selected game objects typically display
  176. ** a floating health bar and allows special user I/O control.
  177. */
  178. unsigned IsSelectable:1;
  179. /*
  180. ** Can this object be the target of an attack or move command? Typically, only objects
  181. ** that take damage or can be destroyed are allowed to be a target.
  182. */
  183. unsigned IsLegalTarget:1;
  184. /*
  185. ** "Insignificant" objects will not be announced when they are destroyed or when they
  186. ** appear. Terrain elements and some lesser vehicles have this characteristic.
  187. */
  188. unsigned IsInsignificant:1;
  189. /*
  190. ** Is this object immune to normal combat damage? Rocks and other inert type terrain
  191. ** object are typically of this type.
  192. */
  193. unsigned IsImmune:1;
  194. /*
  195. ** "Sentient" objects are ones that have logic AI processing performed on them. All
  196. ** vehicles, buildings, infantry, and aircraft are so flagged. Terrain elements also
  197. ** fall under this category, but only because certain animation effects require this.
  198. */
  199. unsigned IsSentient:1;
  200. /*
  201. ** If this object type affects the occupation and collision logic associated with
  202. ** cells, then this flag will be true. Typically, this characteristic is limited
  203. ** to buildings, units, terrain objects, and landed aircraft.
  204. */
  205. unsigned IsFootprint:1;
  206. /*
  207. ** The defense of this object is greatly affected by the type of armor
  208. ** it possesses. This value specifies the type of armor.
  209. */
  210. ArmorType Armor;
  211. /*
  212. ** This is the maximum strength of this object type.
  213. */
  214. unsigned short MaxStrength;
  215. /*
  216. ** These point to the shape imagery for this object type. Since the shape imagery
  217. ** exists in a separate file, the data is filled in after this object is constructed.
  218. ** The "mutable" keyword allows easy modification to this otherwise const object.
  219. */
  220. void const * ImageData;
  221. /*
  222. ** Points to the dimension data for each shape in the image list. By using this
  223. ** data, the minimum number of cells will be redrawn when the object changes shape.
  224. */
  225. Rect * DimensionData;
  226. /*
  227. ** This points to the radar imagery for this object.
  228. */
  229. void const * RadarIcon;
  230. //--------------------------------------------------------------------
  231. ObjectTypeClass(NoInitClass const & x) : AbstractTypeClass(x) {}
  232. ObjectTypeClass( RTTIType rtti,
  233. int id,
  234. bool is_sentient,
  235. bool is_stealthy,
  236. bool is_selectable,
  237. bool is_legal_target,
  238. bool is_insignificant,
  239. bool is_immune,
  240. bool is_footprint,
  241. int fullname,
  242. char const * name
  243. );
  244. static void One_Time(void);
  245. bool Is_Foot(void) const {return(RTTI == RTTI_INFANTRYTYPE || RTTI == RTTI_UNITTYPE || RTTI == RTTI_VESSELTYPE || RTTI == RTTI_AIRCRAFTTYPE);};
  246. char const * Graphic_Name(void) const {if (GraphicName[0] != '\0') return(GraphicName); return(Name());}
  247. virtual int Max_Pips(void) const;
  248. virtual void Dimensions(int &width, int &height) const;
  249. virtual bool Create_And_Place(CELL , HousesType =HOUSE_NONE) const = 0;
  250. virtual int Cost_Of(void) const;
  251. virtual int Time_To_Build(HousesType house) const;
  252. virtual ObjectClass * Create_One_Of(HouseClass *) const = 0;
  253. virtual short const * Occupy_List(bool placement=false) const;
  254. virtual short const * Overlap_List(void) const;
  255. virtual BuildingClass * Who_Can_Build_Me(bool intheory, bool legal, HousesType house) const;
  256. virtual void const * Get_Cameo_Data(void) const;
  257. void const * Get_Image_Data(void) const {return ImageData;};
  258. void const * Get_Radar_Data(void) const {return RadarIcon;};
  259. #ifdef SCENARIO_EDITOR
  260. virtual void Display(int, int, WindowNumberType, HousesType) const {};
  261. #endif
  262. static void const * SelectShapes;
  263. static void const * PipShapes;
  264. };
  265. /***************************************************************************
  266. ** This class is the common data for all objects that can be owned, produced,
  267. ** or delivered as reinforcements. These are objects that typically contain
  268. ** crews and weapons -- the fighting objects of the game.
  269. */
  270. class TechnoTypeClass : public ObjectTypeClass
  271. {
  272. public:
  273. /*
  274. ** This controls how this object type is remapped when it is displayed
  275. ** in the sidebar.
  276. */
  277. RemapType Remap;
  278. /*
  279. ** Is this object ownable by all sides in a multiplayer game? There are some
  280. ** special case objects that need this override ability.
  281. */
  282. unsigned IsDoubleOwned:1;
  283. /*
  284. ** If this object should be completely and always invisible to the enemy, then
  285. ** this flag will be true.
  286. */
  287. unsigned IsInvisible:1;
  288. /*
  289. ** If this object can serve as a good leader for a group selected
  290. ** series of objects, then this flag will be true. Unarmed or
  291. ** ability challenged units do not make good leaders. This flag is
  292. ** also used to indicate the primary factory when dealing with
  293. ** buildings.
  294. */
  295. unsigned IsLeader:1;
  296. /*
  297. ** Does this object have the ability to detect the presence of a nearby
  298. ** cloaked object?
  299. */
  300. unsigned IsScanner:1;
  301. /*
  302. ** If this object is always given its proper name rather than a generic
  303. ** name, then this flag will be true. Typically, civilians and Dr. Moebius
  304. ** fall under this category.
  305. */
  306. unsigned IsNominal:1;
  307. /*
  308. ** If the artwork for this object (only for generics) is theater specific, then
  309. ** this flag will be true. Civilian buildings are a good example of this.
  310. */
  311. unsigned IsTheater:1;
  312. /*
  313. ** Does this object type contain a rotating turret? Gun emplacements, SAM launchers,
  314. ** and many vehicles contain a turret. If a turret is present, special rendering and
  315. ** combat logic must be performed.
  316. */
  317. unsigned IsTurretEquipped:1;
  318. /*
  319. ** Certain objects can be repaired. For buildings, they repair "in place". For units,
  320. ** they must travel to a repair center to be repaired. If this flag is true, then
  321. ** allow the player or computer AI to repair the object.
  322. */
  323. unsigned IsRepairable:1;
  324. /*
  325. ** Does this object contain a crew? If it does, then when the object is destroyed, there
  326. ** is a distinct possibility that infantry will "pop out". Only units with crews can
  327. ** become "heros".
  328. */
  329. unsigned IsCrew:1;
  330. /*
  331. ** This tells whether this unit should EVER be remapped when it is displayed
  332. ** on the tactical map. Normally, the unit is remapped, but for certain civilian
  333. ** object, remapping is not to be performed, regardless of owner.
  334. */
  335. unsigned IsRemappable:1;
  336. /*
  337. ** Is the unit capable of cloaking? Only Stealth Tank can do so now.
  338. */
  339. unsigned IsCloakable:1;
  340. /*
  341. ** Can this object self heal up to half strength? Mammoth tanks from C&C had this
  342. ** feature.
  343. */
  344. unsigned IsSelfHealing:1;
  345. /*
  346. ** If this object explodes violently when destroyed, then this flag will be true.
  347. ** The type of explosion is based on the warhead type and the damage generated
  348. ** corresponds to the full strength of the object.
  349. */
  350. unsigned IsExploding:1;
  351. /*
  352. ** This specifies the zone that an object of this type should recognize. Zones
  353. ** of this type or lower will be considered "possible to travel to".
  354. */
  355. MZoneType MZone;
  356. /*
  357. ** When determining threat, the range can be overridden to be the value
  358. ** specified here. Otherwise, the range for enemy scan is equal to the
  359. ** longest weapon range the object has. If the value is zero, then the
  360. ** weapon range is used.
  361. */
  362. LEPTON ThreatRange;
  363. /*
  364. ** If this is a transporter object (e.g., hovercraft, chinook, APC), then this
  365. ** value specifies the maximum number of passengers it may carry.
  366. */
  367. int MaxPassengers;
  368. /*
  369. ** Most objects have the ability to reveal the terrain around themselves.
  370. ** This sight range (expressed in cell distance) is specified here. If
  371. ** this value is 0, then this unit never reveals terrain. Bullets are
  372. ** typically of this nature.
  373. */
  374. int SightRange;
  375. /*
  376. ** This is the credit cost to produce this object (presuming production is
  377. ** allowed).
  378. */
  379. int Cost;
  380. /*
  381. ** The tech level that this object can be produced at.
  382. */
  383. unsigned Level;
  384. /*
  385. ** This specifies the building prerequisites required before an object
  386. ** of this type can be produced.
  387. */
  388. long Prerequisite;
  389. /*
  390. ** The risk and reward values are used to determine targets and paths
  391. ** toward targets. When heading toward a target, a path of least
  392. ** risk will be followed. When picking a target, the object of
  393. ** greatest reward will be selected. The values assigned are
  394. ** arbitrary.
  395. */
  396. int Risk,Reward;
  397. /*
  398. ** This value indicates the maximum speed that this object can achieve.
  399. */
  400. MPHType MaxSpeed;
  401. /*
  402. ** This indicates the speed (locomotion) type for this unit. Through this
  403. ** value the movement capabilities are deduced.
  404. */
  405. SpeedType Speed;
  406. /*
  407. ** This is the maximum number of ammo shots this object can hold. If
  408. ** this number is -1, then this indicates unlimited ammo.
  409. */
  410. int MaxAmmo;
  411. /*
  412. ** This is a bit field representing the houses that are allowed to
  413. ** own (by normal means) this particular object type. This value is
  414. ** typically used in production contexts. It is possible for a side
  415. ** to take possession of an object type otherwise not normally allowed.
  416. ** This event usually occurs as a result of capture.
  417. */
  418. long Ownable;
  419. /*
  420. ** This is the small icon image that is used to display the object in
  421. ** the sidebar for construction selection purposes.
  422. */
  423. void const * CameoData;
  424. /*
  425. ** The number of animation frames allotted to rotation is specified here.
  426. ** For an object that has no rotation, this value will be 1. For normal
  427. ** vehicles this value will be 32. There are some special case units that
  428. ** have intermediate rotation frames.
  429. */
  430. int Rotation;
  431. /*
  432. ** This is the rotational speed of the object. This value represents the
  433. ** turret or body rotation speed expresses as 360/256ths rotation steps per
  434. ** game tick.
  435. */
  436. int ROT;
  437. /*
  438. ** These are the weapons that this techno object is armed with.
  439. */
  440. WeaponTypeClass const * PrimaryWeapon;
  441. WeaponTypeClass const * SecondaryWeapon;
  442. /*
  443. ** These specify the lepton offsets to locate the exact coordinate of the
  444. ** 'tip of the barrel' for the weapon. This is used for generating the bullet
  445. ** at the proper location.
  446. */
  447. int HorizontalOffset; // Distance to move east (compensates for offsets in animation from center coordinate).
  448. int VerticalOffset; // Distance to move north (compensates for perspective).
  449. int PrimaryOffset; // Offset along turret centerline and facing.
  450. int PrimaryLateral; // Sideways offset from turret centerline and facing.
  451. int SecondaryOffset;
  452. int SecondaryLateral;
  453. /*
  454. ** Points you're awarded for destroying an object of this type, and
  455. ** points you lose if you lose an object of this type.
  456. */
  457. int Points;
  458. //--------------------------------------------------------------------
  459. TechnoTypeClass(NoInitClass const & x) : ObjectTypeClass(x) {}
  460. TechnoTypeClass(
  461. RTTIType rtti,
  462. int id,
  463. int name,
  464. char const * ininame,
  465. RemapType remap,
  466. int verticaloffset,
  467. int primaryoffset,
  468. int primarylateral,
  469. int secondaryoffset,
  470. int secondarylateral,
  471. bool is_nominal,
  472. bool is_stealthy,
  473. bool is_selectable,
  474. bool is_legal_target,
  475. bool is_insignificant,
  476. bool is_immune,
  477. bool is_theater,
  478. bool is_turret_equipped,
  479. bool is_remappable,
  480. bool is_footprint,
  481. int rotation,
  482. SpeedType speed,
  483. int horizontaloffset=0
  484. );
  485. bool Is_Two_Shooter(void) const;
  486. int Legal_Placement(CELL pos) const;
  487. virtual int Raw_Cost(void) const;
  488. virtual int Max_Passengers(void) const {return(MaxPassengers);}
  489. virtual int Repair_Cost(void) const;
  490. virtual int Repair_Step(void) const;
  491. virtual void const * Get_Cameo_Data(void) const;
  492. virtual int Cost_Of(void) const;
  493. virtual int Time_To_Build(HousesType house) const;
  494. virtual int Get_Ownable(void) const;
  495. virtual bool Read_INI(CCINIClass & ini);
  496. /*
  497. ** This is a pointer to the wake shape (as needed by the gunboat).
  498. */
  499. static void const * WakeShapes;
  500. static void const * TurretShapes;
  501. static void const * SamShapes;
  502. static void const * MGunShapes;
  503. };
  504. /***************************************************************************
  505. ** Building types need some special information custom to buildings. This
  506. ** is a derived class that elaborates these additional data elements.
  507. */
  508. class BuildingTypeClass : public TechnoTypeClass {
  509. public:
  510. /*
  511. ** Is this building allowed to be considered for building adjacency
  512. ** checking? If false, then building off of (or adjacent to) this building
  513. ** is not considered.
  514. */
  515. unsigned IsBase:1;
  516. /*
  517. ** If this building is a fake, this flag will be set.
  518. */
  519. unsigned IsFake:1;
  520. /*
  521. ** This flag controls whether the building is equiped with a dirt
  522. ** bib or not. A building with a bib has a dirt patch automatically
  523. ** attached to the structure when it is placed.
  524. */
  525. unsigned IsBibbed:1;
  526. /*
  527. ** If this building is a special wall type, such that it exists as a building
  528. ** for purposes of construction but transforms into an overlay wall object when
  529. ** it is placed on the map, then this flag will be true.
  530. */
  531. unsigned IsWall:1;
  532. /*
  533. ** Buildings can have either simple or complex damage stages. If simple,
  534. ** then the second to the last frame is the half damage stage, and the last
  535. ** frame is the complete damage stage. For non-simple damage, buildings
  536. ** have a complete animation set for damaged as well as undamaged condition.
  537. ** Turrets, oil pumps, and repair facilities are a few examples.
  538. */
  539. unsigned IsSimpleDamage:1;
  540. /*
  541. ** Certain building types can be captures by enemy infantry. For those
  542. ** building types, this flag will be true. Typically, military or hardened
  543. ** structures such as turrets cannot be captured.
  544. */
  545. unsigned IsCaptureable:1;
  546. /*
  547. ** If this building really only has cosmetic idle animation, then this flag will be
  548. ** true if this animation should run at a relatively constant rate regardless of game
  549. ** speed setting.
  550. */
  551. unsigned IsRegulated:1;
  552. /*
  553. ** Does this building require power to function? Usually, this isn't the case. The building
  554. ** normally either has no effect by power level or is gradually reduced in effectiveness. This
  555. ** flag is for those buildings that completely cease to function when the power drops below
  556. ** full.
  557. */
  558. unsigned IsPowered:1;
  559. /*
  560. ** If this flag is true, then the building cannot be sold even if it could have been built. This
  561. ** is especially useful for mines which can be built but cannot be sold.
  562. */
  563. unsigned IsUnsellable:1;
  564. /*
  565. ** This is the direction (from the center cell) of the building in order to find a
  566. ** legitimate foundation square. This location will be used for targeting and capture
  567. ** move destination purposes.
  568. */
  569. FacingType FoundationFace;
  570. /*
  571. ** Adjacent distance for building next to.
  572. */
  573. int Adjacent;
  574. /*
  575. ** This flag specifies the type of object this factory building can "produce". For non
  576. ** factory buildings, this value will be RTTI_NONE.
  577. */
  578. RTTIType ToBuild;
  579. /*
  580. ** For building that produce ground units (infantry and vehicles), there is a default
  581. ** exit point defined. This point is where the object is first placed on the map.
  582. ** Typically, this is located next to a door. The unit will then travel on to a clear
  583. ** terrain area and enter normal game processing.
  584. */
  585. COORDINATE ExitCoordinate;
  586. /*
  587. ** When determine which cell to head toward when exiting a building, use the
  588. ** list elaborated by this variable. There are directions of exit that are
  589. ** more suitable than others. This list is here to inform the system which
  590. ** directions those are.
  591. */
  592. short const * ExitList;
  593. /*
  594. ** This is the structure type identifier. It can serve as a unique
  595. ** identification number for building types.
  596. */
  597. StructType Type;
  598. /*
  599. ** This is the starting facing to give this building when it first
  600. ** gets constructed. The facing matches the final stage of the
  601. ** construction animation.
  602. */
  603. DirType StartFace;
  604. /*
  605. ** This is the Tiberium storage capacity of the building. The sum of all
  606. ** building's storage capacity is used to determine how much Tiberium can
  607. ** be accumulated.
  608. */
  609. int Capacity;
  610. /*
  611. ** Each building type produces and consumes power. These values tell how
  612. ** much.
  613. */
  614. int Power;
  615. int Drain;
  616. /*
  617. ** This is the size of the building. This size value is a rough indication
  618. ** of the building's "footprint".
  619. */
  620. BSizeType Size;
  621. /**********************************************************************
  622. ** For each stage that a building may be in, its animation is controlled
  623. ** by this structure. It dictates the starting and length of the animation
  624. ** frames needed for the specified state. In addition it specifies how long
  625. ** to delay between changes in animation. With this data it is possible to
  626. ** control the appearance of all normal buildings. Turrets and SAM sites are
  627. ** an exception since their animation is not merely cosmetic.
  628. */
  629. typedef struct {
  630. int Start; // Starting frame of animation.
  631. int Count; // Number of frames in this animation.
  632. int Rate; // Number of ticks to delay between each frame.
  633. } AnimControlType;
  634. AnimControlType Anims[BSTATE_COUNT];
  635. /*---------------------------------------------------------------------------
  636. ** This is the building type explicit constructor.
  637. */
  638. BuildingTypeClass(NoInitClass const & x) : TechnoTypeClass(x) {}
  639. BuildingTypeClass (
  640. StructType type,
  641. int name,
  642. char const * ininame,
  643. FacingType foundation,
  644. COORDINATE exitpoint,
  645. RemapType remap,
  646. int verticaloffset,
  647. int primaryoffset,
  648. int primarylateral,
  649. bool is_fake,
  650. bool is_regulated,
  651. bool is_nominal,
  652. bool is_wall,
  653. bool is_simpledamage,
  654. bool is_stealthy,
  655. bool is_selectable,
  656. bool is_legal_target,
  657. bool is_insignificant,
  658. bool is_theater,
  659. bool is_turret_equipped,
  660. bool is_remappable,
  661. RTTIType tobuild,
  662. DirType sframe,
  663. BSizeType size,
  664. short const * exitlist,
  665. short const * sizelist,
  666. short const * overlap
  667. );
  668. operator StructType(void) const {return(Type);};
  669. static void * operator new(size_t);
  670. static void * operator new(size_t , void * ptr) {return(ptr);};
  671. static void operator delete(void * ptr);
  672. static void Init_Heap(void);
  673. static BuildingTypeClass & As_Reference(StructType type);
  674. static StructType From_Name(char const * name);
  675. static void Init(TheaterType theater);
  676. static void One_Time(void);
  677. static void Prep_For_Add(void);
  678. int Width(void) const;
  679. int Height(bool bib=false) const;
  680. virtual int Full_Name(void) const;
  681. virtual bool Read_INI(CCINIClass & ini);
  682. bool Flush_For_Placement(CELL cell, HouseClass * house) const;
  683. virtual int Cost_Of(void) const;
  684. virtual COORDINATE Coord_Fixup(COORDINATE coord) const;
  685. virtual int Max_Pips(void) const;
  686. virtual void Dimensions(int &width, int &height) const;
  687. virtual bool Create_And_Place(CELL cell, HousesType house) const;
  688. virtual ObjectClass * Create_One_Of(HouseClass * house) const;
  689. virtual short const * Occupy_List(bool placement=false) const;
  690. virtual short const * Overlap_List(void) const;
  691. virtual void const * Get_Buildup_Data(void) const {return(BuildupData);};
  692. bool Is_Factory(void) const {return(ToBuild != RTTI_NONE);}
  693. virtual int Raw_Cost(void) const;
  694. bool Bib_And_Offset(SmudgeType & bib, CELL & cell) const;
  695. #ifdef SCENARIO_EDITOR
  696. virtual void Display(int x, int y, WindowNumberType window, HousesType house) const;
  697. #endif
  698. /*
  699. ** Special overlay for the weapons factory.
  700. */
  701. static void const * WarFactoryOverlay;
  702. private:
  703. /*
  704. ** This is a pointer to a list of offsets (from the upper left corner) that
  705. ** are used to indicate the building's "footprint". This footprint is used
  706. ** to determine building placement legality and terrain passibility.
  707. */
  708. short const * OccupyList;
  709. /*
  710. ** Buildings can often times overlap a cell but not actually "occupy" it for
  711. ** purposes of movement. This points to a list of offsets that indicate which
  712. ** cells the building has visual overlap but does not occupy.
  713. */
  714. short const * OverlapList;
  715. /*
  716. ** The construction animation graphic data pointer is
  717. ** pointed to by this element.
  718. */
  719. void const * BuildupData;
  720. void Init_Anim(BStateType state, int start, int count, int rate) const;
  721. };
  722. /***************************************************************************
  723. ** The various unit types need specific data that is unique to units as
  724. ** opposed to buildings. This derived class elaborates these additional
  725. ** data types.
  726. */
  727. class UnitTypeClass : public TechnoTypeClass
  728. {
  729. public:
  730. /*
  731. ** If this unit can appear out of a crate, then this flag will be true.
  732. */
  733. unsigned IsCrateGoodie:1;
  734. /*
  735. ** Can this unit squash infantry? If it can then if the player selects
  736. ** an (enemy) infantry unit as the movement target, it will ride over and
  737. ** squish the infantry unit.
  738. */
  739. unsigned IsCrusher:1;
  740. /*
  741. ** Does this unit go into harvesting mode when it stops on a tiberium
  742. ** field? Typically, only one unit does this and that is the harvester.
  743. */
  744. unsigned IsToHarvest:1;
  745. /*
  746. ** Some units are equipped with a rotating radar dish. These units have special
  747. ** animation processing. The rotating radar dish is similar to a turret, but
  748. ** always rotates and does not affect combat.
  749. */
  750. unsigned IsRadarEquipped:1;
  751. /*
  752. ** If this unit has a firing animation, this flag is true. Infantry and some special
  753. ** vehicles are the ones with firing animations.
  754. */
  755. unsigned IsFireAnim:1;
  756. /*
  757. ** Many vehicles have a turret with restricted motion. These vehicles must move the
  758. ** turret into a locked down position while travelling. Rocket launchers and artillery
  759. ** are good examples of this kind of unit.
  760. */
  761. unsigned IsLockTurret:1;
  762. /*
  763. ** Is this unit of the humongous size? Harvesters and mobile construction vehicles are
  764. ** of this size. If the vehicle is greater than 24 x 24 but less than 48 x 48, it is
  765. ** considered "Gigundo".
  766. */
  767. unsigned IsGigundo:1;
  768. /*
  769. ** Does this unit have a constant animation (like Visceroid?)
  770. */
  771. unsigned IsAnimating:1;
  772. /*
  773. ** Does this unit have the ability to jam radar facilities?
  774. */
  775. unsigned IsJammer:1;
  776. /*
  777. ** Is this unit a mobile gap generator?
  778. */
  779. unsigned IsGapper:1;
  780. /*
  781. ** If this unit cannot fire while moving, then this flag will be
  782. ** true. Such a unit must stop and stabilize for a bit before it
  783. ** can fire.
  784. */
  785. unsigned IsNoFireWhileMoving:1;
  786. /*
  787. ** This value represents the unit class. It can serve as a unique
  788. ** identification number for this unit class.
  789. */
  790. UnitType Type;
  791. /*
  792. ** This is the distance along the centerline heading in the direction the body
  793. ** is facing used to reach the center point of the turret. This distance is
  794. ** in leptons.
  795. */
  796. signed char TurretOffset;
  797. /*
  798. ** This value is used to provide the unit with a default mission order when
  799. ** first created. Usually, this is a resting or idle type of order.
  800. */
  801. MissionType Mission;
  802. /*
  803. ** This is the default explosion to use when this vehicle is destroyed.
  804. */
  805. AnimType Explosion;
  806. /*
  807. ** The width or height of the largest dimension for this unit.
  808. */
  809. int MaxSize;
  810. /*
  811. ** This is the explicit unit class constructor.
  812. */
  813. UnitTypeClass(NoInitClass const & x) : TechnoTypeClass(x) {}
  814. UnitTypeClass (
  815. UnitType type,
  816. int name,
  817. char const * ininame,
  818. AnimType exp,
  819. RemapType remap,
  820. int verticaloffset,
  821. int primaryoffset,
  822. int primarylateral,
  823. int secondaryoffset,
  824. int secondarylateral,
  825. bool is_goodie,
  826. bool is_nominal,
  827. bool is_crusher,
  828. bool is_harvest,
  829. bool is_stealthy,
  830. bool is_insignificant,
  831. bool is_turret_equipped,
  832. bool is_radar_equipped,
  833. bool is_fire_anim,
  834. bool is_lock_turret,
  835. bool is_gigundo,
  836. bool is_animating,
  837. bool is_jammer,
  838. bool is_gapper,
  839. int rotation,
  840. int toffset,
  841. MissionType order
  842. );
  843. static void * operator new(size_t);
  844. static void * operator new(size_t , void * ptr) {return(ptr);};
  845. static void operator delete(void * ptr);
  846. static void Init_Heap(void);
  847. static UnitType From_Name(char const * name);
  848. static UnitTypeClass & As_Reference(UnitType type);
  849. static void Init(TheaterType ) {};
  850. static void One_Time(void);
  851. static void Prep_For_Add(void);
  852. virtual bool Read_INI(CCINIClass & ini);
  853. virtual void Dimensions(int &width, int &height) const;
  854. virtual bool Create_And_Place(CELL cell, HousesType house) const;
  855. virtual ObjectClass * Create_One_Of(HouseClass * house) const;
  856. virtual int Max_Pips(void) const;
  857. void Turret_Adjust(DirType dir, int & x, int & y) const;
  858. #ifdef SCENARIO_EDITOR
  859. virtual void Display(int x, int y, WindowNumberType window, HousesType house) const;
  860. #endif
  861. /*
  862. ** The animation stage list for harvester dumping into the refinery.
  863. */
  864. static const int Harvester_Dump_List[22];
  865. /*
  866. ** The animatino stage list for harvester loading up on ore.
  867. */
  868. static const int Harvester_Load_List[9];
  869. /*
  870. ** The number of animation stages when the harvester is loading
  871. ** up on ore in the field.
  872. */
  873. static const int Harvester_Load_Count;
  874. };
  875. /***************************************************************************
  876. ** This specifies the constant attribute data associated with naval
  877. ** vessels.
  878. */
  879. class VesselTypeClass : public TechnoTypeClass
  880. {
  881. public:
  882. /*
  883. ** Does this unit have only 8 facings? Special test units have limited
  884. ** facings.
  885. */
  886. unsigned IsPieceOfEight:1;
  887. /*
  888. ** This value represents the unit class. It can serve as a unique
  889. ** identification number for this unit class.
  890. */
  891. VesselType Type;
  892. /*
  893. ** This is the distance along the centerline heading in the direction the body
  894. ** is facing used to reach the center point of the turret. This distance is
  895. ** in leptons.
  896. */
  897. signed char TurretOffset;
  898. /*
  899. ** This value is used to provide the unit with a default mission order when
  900. ** first created. Usually, this is a resting or idle type of order.
  901. */
  902. MissionType Mission;
  903. /*
  904. ** This is the default explosion to use when this vehicle is destroyed.
  905. */
  906. AnimType Explosion;
  907. /*
  908. ** The width or height of the largest dimension for this unit.
  909. */
  910. int MaxSize;
  911. /*
  912. ** This is the explicit unit class constructor.
  913. */
  914. VesselTypeClass(NoInitClass const & x) : TechnoTypeClass(x) {}
  915. VesselTypeClass (
  916. VesselType type,
  917. int name,
  918. char const * ininame,
  919. AnimType exp,
  920. int verticaloffset,
  921. int primaryoffset,
  922. int primarylateral,
  923. int secondaryoffset,
  924. int secondarylateral,
  925. bool is_eight,
  926. bool is_nominal,
  927. bool is_turret_equipped,
  928. int rotation,
  929. int toffset
  930. );
  931. static void * operator new(size_t);
  932. static void * operator new(size_t , void * ptr) {return(ptr);};
  933. static void operator delete(void * ptr);
  934. static void Init_Heap(void);
  935. static VesselType From_Name(char const * name);
  936. static VesselTypeClass & As_Reference(VesselType type);
  937. static void Init(TheaterType ) {};
  938. static void One_Time(void);
  939. static void Prep_For_Add(void);
  940. virtual void Dimensions(int &width, int &height) const;
  941. virtual bool Create_And_Place(CELL cell, HousesType house) const;
  942. virtual ObjectClass * Create_One_Of(HouseClass * house) const;
  943. virtual int Max_Pips(void) const;
  944. virtual short const * Overlap_List(void) const;
  945. void Turret_Adjust(DirType dir, int & x, int & y) const;
  946. #ifdef SCENARIO_EDITOR
  947. virtual void Display(int x, int y, WindowNumberType window, HousesType house) const;
  948. #endif
  949. };
  950. /***************************************************************************
  951. ** The various unit types need specific data that is unique to units as
  952. ** opposed to buildings. This derived class elaborates these additional
  953. ** data types.
  954. */
  955. class InfantryTypeClass : public TechnoTypeClass
  956. {
  957. public:
  958. /*
  959. ** If this civilian infantry type is female, then this flag
  960. ** will be true. This information is used to get the correct
  961. ** voice response.
  962. */
  963. unsigned IsFemale:1;
  964. /*
  965. ** Does this infantry unit have crawling animation? If not, then this
  966. ** means that the "crawling" frames are actually running animation frames.
  967. */
  968. unsigned IsCrawling:1;
  969. /*
  970. ** For those infantry types that can capture buildings, this flag
  971. ** will be set to true. Typically, this is the engineer.
  972. */
  973. unsigned IsCapture:1;
  974. /*
  975. ** For infantry types that will run away from any damage causing
  976. ** events, this flag will be true. Typically, this is so for all
  977. ** civilians as well as the flame thrower guys.
  978. */
  979. unsigned IsFraidyCat:1;
  980. /*
  981. ** This flags whether this infantry is actually a civilian. A
  982. ** civilian uses different voice responses, has less ammunition,
  983. ** and runs from danger more often.
  984. */
  985. unsigned IsCivilian:1;
  986. /*
  987. ** If the infantry unit is equipped with C4 explosives, then this
  988. ** flag will be true. Such infantry can enter and destroy enemy
  989. ** buildings.
  990. */
  991. unsigned IsBomber:1;
  992. /*
  993. ** This flags whether this infantry is actually a dog. A dog
  994. ** uses different voice responses, has no ammo, and runs instead
  995. ** of walks to attack.
  996. */
  997. unsigned IsDog:1;
  998. /*
  999. ** This flag specifies whether this infantry type should use the
  1000. ** override remap table, instead of the house remap table. This is
  1001. ** used to turn the two civilian animations into a veritable smorgasbord
  1002. ** of civilian types, for example.
  1003. */
  1004. unsigned IsRemapOverride:1;
  1005. /*
  1006. ** This value represents the unit class. It can serve as a unique
  1007. ** identification number for this unit class.
  1008. */
  1009. InfantryType Type;
  1010. /*
  1011. ** When this infantry unit is loaded onto a transport, then this
  1012. ** is the pip shape to use. Primarily, this is a color control.
  1013. */
  1014. PipEnum Pip;
  1015. /*
  1016. ** This is an array of the various animation frame data for the actions that
  1017. ** the infantry may perform.
  1018. */
  1019. DoInfoStruct const * DoControls;
  1020. /*
  1021. ** Alternate animation info for the 'virtual' window which gets rendered on the GlyphX client.
  1022. ** The infantry frames here map to the original TD infantry frames, so a different set is needed depending on whether
  1023. ** we are rendering in legacy mode or on the GlyphX client. ST - 9/5/2019 12:17PM
  1024. */
  1025. DoInfoStruct const * DoControlsVirtual;
  1026. /*
  1027. ** There are certain units with special animation sequences built into the
  1028. ** shape file. These values tell how many frames are used for the firing animation.
  1029. */
  1030. char FireLaunch;
  1031. char ProneLaunch;
  1032. /*
  1033. ** This is a pointer to the special override remap table, which is
  1034. ** used only in conjunction with the IsRemapOverride flag, and is
  1035. ** primarily used for the civilians.
  1036. */
  1037. unsigned char const * OverrideRemap;
  1038. /*
  1039. ** This is the explicit unit class constructor.
  1040. */
  1041. InfantryTypeClass(NoInitClass const & x) : TechnoTypeClass(x) {}
  1042. InfantryTypeClass (
  1043. InfantryType type,
  1044. int name,
  1045. char const * ininame,
  1046. int verticaloffset,
  1047. int primaryoffset,
  1048. bool is_female,
  1049. bool is_crawling,
  1050. bool is_civilian,
  1051. bool is_remap_override,
  1052. bool is_nominal,
  1053. bool is_theater,
  1054. PipEnum pip,
  1055. DoInfoStruct const * controls,
  1056. DoInfoStruct const * virtual_controls,
  1057. int firelaunch,
  1058. int pronelaunch,
  1059. unsigned char const * override_remap,
  1060. int horizontaloffset=0);
  1061. static void * operator new(size_t);
  1062. static void * operator new(size_t , void * ptr) {return(ptr);};
  1063. static void operator delete(void * ptr);
  1064. static void Init_Heap(void);
  1065. static InfantryType From_Name(char const * name);
  1066. static InfantryTypeClass & As_Reference(InfantryType type);
  1067. static void Init(TheaterType ) {};
  1068. static void One_Time(void);
  1069. static void Prep_For_Add(void);
  1070. virtual bool Read_INI(CCINIClass & ini);
  1071. virtual void Dimensions(int & width, int & height) const;
  1072. virtual bool Create_And_Place(CELL cell, HousesType house) const;
  1073. virtual ObjectClass * Create_One_Of(HouseClass * house) const;
  1074. virtual short const * Occupy_List(bool placement=false) const;
  1075. virtual int Full_Name(void) const;
  1076. #ifdef SCENARIO_EDITOR
  1077. virtual void Display(int x, int y, WindowNumberType window, HousesType house) const;
  1078. #endif
  1079. };
  1080. /****************************************************************************
  1081. ** The various aircraft types are controlled by object types of
  1082. ** this class.
  1083. */
  1084. class AircraftTypeClass : public TechnoTypeClass
  1085. {
  1086. public:
  1087. /*
  1088. ** Fixed wing aircraft (ones that cannot hover) have this flag set to true.
  1089. ** Such aircraft will not vary speed while it is flying.
  1090. */
  1091. unsigned IsFixedWing:1;
  1092. /*
  1093. ** Can this aircraft land? If it can land it is presumed to be controllable by the player.
  1094. */
  1095. unsigned IsLandable:1;
  1096. /*
  1097. ** Does this aircraft have a rotor blade (helicopter) type propulsion?
  1098. */
  1099. unsigned IsRotorEquipped:1; // Is a rotor attached?
  1100. /*
  1101. ** Is there a custom rotor animation stage set for each facing of the aircraft?
  1102. */
  1103. unsigned IsRotorCustom:1; // Custom rotor sets for each facing?
  1104. /*
  1105. ** This is the kind of aircraft identifier number.
  1106. */
  1107. AircraftType Type;
  1108. /*
  1109. ** This specifies the default mission order for this aircraft. Some aircraft default
  1110. ** to guard mode (e.g., helicopters) while some default to attack mode (e.g., bombers).
  1111. */
  1112. MissionType Mission;
  1113. /*
  1114. ** This is the preferred landing building. The aircraft will try to land at the
  1115. ** building of this type.
  1116. */
  1117. StructType Building;
  1118. /*
  1119. ** This is the final approach speed of this aircraft type for landing
  1120. ** at an airfield. Most aircraft hit it at full speed, but the MIG is
  1121. ** an example of a plane that needs a slower approach speed to hit the
  1122. ** airfield.
  1123. */
  1124. int LandingSpeed;
  1125. AircraftTypeClass(NoInitClass const & x) : TechnoTypeClass(x) {}
  1126. AircraftTypeClass(
  1127. AircraftType airtype,
  1128. int name,
  1129. char const * ininame,
  1130. int verticaloffset,
  1131. int primaryoffset,
  1132. int primarylateral,
  1133. bool is_fixedwing,
  1134. bool is_rotorequipped,
  1135. bool is_rotorcustom,
  1136. bool is_landable,
  1137. bool is_stealthy,
  1138. bool is_selectable,
  1139. bool is_legal_target,
  1140. bool is_insignificant,
  1141. bool is_immune,
  1142. StructType building,
  1143. int landingspeed,
  1144. int rotation,
  1145. MissionType deforder);
  1146. static void * operator new(size_t);
  1147. static void * operator new(size_t , void * ptr) {return(ptr);};
  1148. static void operator delete(void * ptr);
  1149. static void Init_Heap(void);
  1150. static AircraftType From_Name(char const * name);
  1151. static AircraftTypeClass & As_Reference(AircraftType a);
  1152. static void Init(TheaterType ) {};
  1153. static void One_Time(void);
  1154. static void Prep_For_Add(void);
  1155. virtual void Dimensions(int &width, int &height) const;
  1156. virtual bool Create_And_Place(CELL, HousesType) const;
  1157. virtual ObjectClass * Create_One_Of(HouseClass * house) const;
  1158. virtual short const * Occupy_List(bool placement=false) const;
  1159. virtual short const * Overlap_List(void) const;
  1160. virtual int Max_Pips(void) const;
  1161. #ifdef SCENARIO_EDITOR
  1162. virtual void Display(int x, int y, WindowNumberType window, HousesType house) const;
  1163. #endif
  1164. static void const * LRotorData;
  1165. static void const * RRotorData;
  1166. };
  1167. /***************************************************************************
  1168. ** Bullets and other projectiles need some specific information according
  1169. ** to their type.
  1170. */
  1171. class BulletTypeClass : public ObjectTypeClass
  1172. {
  1173. public:
  1174. /*
  1175. ** Does this bullet type fly over walls?
  1176. */
  1177. unsigned IsHigh:1;
  1178. /*
  1179. ** Does this bullet need a shadow drawn under it? Shadowed bullets
  1180. ** use the Height value to offset their Y position.
  1181. */
  1182. unsigned IsShadow:1;
  1183. /*
  1184. ** If this projectile is one that ballistically arcs from ground level, up into the air and
  1185. ** then back to the ground, where it explodes. Typical uses of this are for grenades and
  1186. ** artillery shells.
  1187. */
  1188. unsigned IsArcing:1;
  1189. /*
  1190. ** Certain projectiles do not travel horizontally, but rather, vertically -- they drop
  1191. ** from a height. Bombs fall into this category and will have this value set to
  1192. ** true. Dropping projectiles do not calculate collision with terrain (such as walls).
  1193. */
  1194. unsigned IsDropping:1;
  1195. /*
  1196. ** Is this projectile invisible? Some bullets and weapon effects are not directly
  1197. ** rendered. Small caliber bullets and flame thrower flames are treated like
  1198. ** normal projectiles for damage purposes, but are displayed using custom
  1199. ** rules.
  1200. */
  1201. unsigned IsInvisible:1;
  1202. /*
  1203. ** Does this bullet explode when near the target? Some bullets only explode if
  1204. ** it actually hits the target. Some explode even if nearby.
  1205. */
  1206. unsigned IsProximityArmed:1;
  1207. /*
  1208. ** Does this projectile spew puffs of smoke out its tail while it
  1209. ** travels? Missiles are prime examples of this projectile type.
  1210. */
  1211. unsigned IsFlameEquipped:1;
  1212. /*
  1213. ** Should fuel consumption be tracked for this projectile? Rockets are the primary
  1214. ** projectile with this characteristic, but even for bullets it should be checked so that
  1215. ** bullets don't travel too far.
  1216. */
  1217. unsigned IsFueled:1;
  1218. /*
  1219. ** Is this projectile without different facing visuals? Most plain bullets do not change
  1220. ** visual imagery if their facing changes. Rockets, on the other hand, are equipped with
  1221. ** the full 32 facing imagery.
  1222. */
  1223. unsigned IsFaceless:1;
  1224. /*
  1225. ** If this is a typically inaccurate projectile, then this flag will be true. Artillery
  1226. ** is a prime example of this type.
  1227. */
  1228. unsigned IsInaccurate:1;
  1229. /*
  1230. ** If the bullet contains translucent pixels, then this flag will be true. These
  1231. ** translucent pixels really are "shadow" pixels in the same style as the shadow
  1232. ** cast by regular ground units.
  1233. */
  1234. unsigned IsTranslucent:1;
  1235. /*
  1236. ** If this bullet can be fired on aircraft, then this flag will be true.
  1237. */
  1238. unsigned IsAntiAircraft:1;
  1239. /*
  1240. ** If this bullet can fire upon ground targets, then this flag will be true.
  1241. */
  1242. unsigned IsAntiGround:1;
  1243. /*
  1244. ** If this bullet can be fired upon submarines (that are submerged), then
  1245. ** this flag will be true.
  1246. */
  1247. unsigned IsAntiSub:1;
  1248. /*
  1249. ** If this bullet should lose strength as it travels toward the target, then
  1250. ** this flag will be true.
  1251. */
  1252. unsigned IsDegenerate:1;
  1253. /*
  1254. ** Does this projectile travel under the water? If so, then its imagery will be modified
  1255. ** to look like it is doing so.
  1256. */
  1257. unsigned IsSubSurface:1;
  1258. /*
  1259. ** If this projectile is equipped with a parachute, then this flag will be set. Parachute
  1260. ** bombs are usually the only one with this flag set.
  1261. */
  1262. unsigned IsParachuted:1;
  1263. /*
  1264. ** Is this unit of the humongous size? Certain very large projectiles have
  1265. ** this flag set. Typically, they require a special offset list so that the cells
  1266. ** they overlap will be properly redrawn.
  1267. */
  1268. unsigned IsGigundo:1;
  1269. /*
  1270. ** This element is a unique identification number for the bullet
  1271. ** type.
  1272. */
  1273. BulletType Type;
  1274. /*
  1275. ** This is the rotation speed of the bullet. It only has practical value
  1276. ** for those projectiles that performing homing action during flight -- such
  1277. ** as with rockets. If the ROT is zero, then no homing is performed. Otherwise
  1278. ** the projectile is considered to be a homing type.
  1279. */
  1280. unsigned char ROT;
  1281. /*
  1282. ** Some projectiles have a built in arming distance that must elapse before the
  1283. ** projectile may explode. If this value is non-zero, then this override is
  1284. ** applied.
  1285. */
  1286. int Arming;
  1287. /*
  1288. ** If this bullet is of the tumbling type, then this is the modulo to factor
  1289. ** into the game frame when determining what shape number to use for the
  1290. ** imagery.
  1291. */
  1292. int Tumble;
  1293. //---------------------------------------------------------------------
  1294. BulletTypeClass(NoInitClass const & x) : ObjectTypeClass(x) {}
  1295. BulletTypeClass(char const * name);
  1296. static void * operator new(size_t);
  1297. static void * operator new(size_t , void * ptr) {return(ptr);};
  1298. static void operator delete(void * ptr);
  1299. static void Init_Heap(void);
  1300. static BulletTypeClass & As_Reference(BulletType type);
  1301. static void Init(TheaterType ) {};
  1302. static void One_Time(void);
  1303. virtual bool Read_INI(CCINIClass & ini);
  1304. virtual bool Create_And_Place(CELL , HousesType =HOUSE_NONE) const {return false;};
  1305. virtual ObjectClass * Create_One_Of(HouseClass *) const {return 0;};
  1306. };
  1307. /****************************************************************************
  1308. ** These are the different TYPES of terrain objects. Every terrain object must
  1309. ** be one of these types.
  1310. */
  1311. class TerrainTypeClass : public ObjectTypeClass
  1312. {
  1313. public:
  1314. /*
  1315. ** Which terrain object does this class type represent.
  1316. */
  1317. TerrainType Type;
  1318. /*
  1319. ** This is the coordinate offset (from upper left) of where the center base
  1320. ** position of the terrain object lies. For trees, this would be the base of
  1321. ** the trunk. This is used for sorting purposes.
  1322. */
  1323. COORDINATE CenterBase;
  1324. /*
  1325. ** This is the bitfield control that tells which theater this terrain object is
  1326. ** valid for. If the bit (1 << TheaterType) is true, then this terrain object
  1327. ** is allowed.
  1328. */
  1329. int Theater;
  1330. /*
  1331. ** Does this terrain object get placed on the water instead of the ground?
  1332. */
  1333. unsigned IsWaterBased:1;
  1334. //----------------------------------------------------------------
  1335. TerrainTypeClass(NoInitClass const & x) : ObjectTypeClass(x) {}
  1336. TerrainTypeClass(
  1337. TerrainType terrain,
  1338. int theater,
  1339. COORDINATE centerbase,
  1340. bool is_immune,
  1341. bool is_water,
  1342. char const * ininame,
  1343. int fullname,
  1344. short const * occupy,
  1345. short const * overlap);
  1346. static void * operator new(size_t);
  1347. static void * operator new(size_t , void * ptr) {return(ptr);};
  1348. static void operator delete(void * ptr);
  1349. static void Init_Heap(void);
  1350. static TerrainType From_Name(char const * name);
  1351. static TerrainTypeClass & As_Reference(TerrainType type);
  1352. static void Init(TheaterType theater = THEATER_TEMPERATE);
  1353. static void One_Time(void);
  1354. static void Prep_For_Add(void);
  1355. virtual COORDINATE Coord_Fixup(COORDINATE coord) const;
  1356. virtual bool Create_And_Place(CELL cell, HousesType house) const;
  1357. virtual ObjectClass * Create_One_Of(HouseClass *) const;
  1358. virtual short const * Occupy_List(bool placement=false) const;
  1359. virtual short const * Overlap_List(void) const;
  1360. #ifdef SCENARIO_EDITOR
  1361. virtual void Display(int x, int y, WindowNumberType window, HousesType house=HOUSE_NONE) const;
  1362. #endif
  1363. private:
  1364. short const * Occupy;
  1365. short const * Overlap;
  1366. };
  1367. /****************************************************************************
  1368. ** The tile type objects are controlled by this class. It specifies the form
  1369. ** of the tile set for the specified object as well as other related datum.
  1370. ** It is derived from the ObjectTypeClass solely for the purpose of scenario
  1371. ** editing and creation.
  1372. */
  1373. class TemplateTypeClass: public ObjectTypeClass
  1374. {
  1375. public:
  1376. /*
  1377. ** What template is this.
  1378. */
  1379. TemplateType Type;
  1380. /*
  1381. ** A bitfield container that indicates which theaters this template is allowed
  1382. ** in. A bit set in the (1<<TheaterType) position indicates the template is legal
  1383. ** in that particular theater.
  1384. */
  1385. unsigned char Theater;
  1386. /*
  1387. ** Raw dimensions of this template (in icons).
  1388. */
  1389. unsigned char Width,Height;
  1390. //----------------------------------------------------------
  1391. TemplateTypeClass(NoInitClass const & x) : ObjectTypeClass(x) {};
  1392. TemplateTypeClass(
  1393. TemplateType iconset,
  1394. int theater,
  1395. char const * ininame,
  1396. int fullname);
  1397. static void * operator new(size_t);
  1398. static void * operator new(size_t , void * ptr) {return(ptr);};
  1399. static void operator delete(void * ptr);
  1400. static void Init_Heap(void);
  1401. static TemplateType From_Name(char const * name);
  1402. static TemplateTypeClass & As_Reference(TemplateType type);
  1403. static void Init(TheaterType theater);
  1404. static void One_Time(void);
  1405. static void Prep_For_Add(void);
  1406. virtual COORDINATE Coord_Fixup(COORDINATE coord) const;
  1407. virtual bool Create_And_Place(CELL cell, HousesType house=HOUSE_NONE) const;
  1408. virtual ObjectClass * Create_One_Of(HouseClass *) const;
  1409. virtual short const * Occupy_List(bool placement=false) const;
  1410. LandType Land_Type(int icon) const;
  1411. #ifdef SCENARIO_EDITOR
  1412. virtual void Display(int x, int y, WindowNumberType window, HousesType house=HOUSE_NONE) const;
  1413. #endif
  1414. };
  1415. /****************************************************************************
  1416. ** All the animation objects are controlled by this class. It holds the static
  1417. ** data associated with each animation type.
  1418. */
  1419. class AnimTypeClass : public ObjectTypeClass
  1420. {
  1421. public:
  1422. /*
  1423. ** If this animation should run at a constant apparent rate regardless
  1424. ** of game speed setting, then this flag will be set to true.
  1425. */
  1426. unsigned IsNormalized:1;
  1427. /*
  1428. ** If this animation should be rendered and sorted with the other ground
  1429. ** units, then this flag is true. Typical of this would be fire and other
  1430. ** low altitude animation effects.
  1431. */
  1432. unsigned IsGroundLayer:1;
  1433. /*
  1434. ** If this animation should be rendered in a translucent fashion, this flag
  1435. ** will be true. Translucent colors are some of the reds and some of the
  1436. ** greys. Typically, smoke and some fire effects have this flag set.
  1437. */
  1438. unsigned IsTranslucent:1;
  1439. /*
  1440. ** If this animation uses the white translucent table, then this flag
  1441. ** will be true.
  1442. */
  1443. unsigned IsWhiteTrans:1;
  1444. /*
  1445. ** If this is the special flame thrower animation, then custom affects
  1446. ** occur as it is playing. Specifically, scorch marks and little fire
  1447. ** pieces appear as the flame jets forth.
  1448. */
  1449. unsigned IsFlameThrower:1;
  1450. /*
  1451. ** Some animations leave a scorch mark behind. Napalm and other flame
  1452. ** type explosions are typical of this type.
  1453. */
  1454. unsigned IsScorcher:1;
  1455. /*
  1456. ** Some explosions are of such violence that they leave craters behind.
  1457. ** This flag will be true for those types.
  1458. */
  1459. unsigned IsCraterForming:1;
  1460. /*
  1461. ** If this animation should attach itself to any unit that is in the same
  1462. ** location as itself, then this flag will be true. Most vehicle impact
  1463. ** explosions are of this type.
  1464. */
  1465. unsigned IsSticky:1;
  1466. /*
  1467. ** If this animation is theater specific, then this flag will be
  1468. ** set to true. Most animations are not theater specific.
  1469. */
  1470. unsigned IsTheater:1;
  1471. /*
  1472. ** This is the type number for this animation kind. It can be used as
  1473. ** a unique identifier for animation types.
  1474. */
  1475. AnimType Type;
  1476. /*
  1477. ** This specified the maximum dimension of the shape (edge to edge). This dimension
  1478. ** is used to build the appropriate cell refresh list. Keep this value as small
  1479. ** as possible to ensure maximum performance. This is especially critical, since
  1480. ** animations always cause the cells under them to be redrawn every frame.
  1481. */
  1482. int Size;
  1483. /*
  1484. ** This is the frame that the animation is biggest. The biggest frame of animation
  1485. ** will hide any changes to underlying ground (e.g., craters) that the animation
  1486. ** causes, so these effects are delayed until this frame is reached. The end result
  1487. ** is to prevent the player from seeing craters "pop" into existence.
  1488. */
  1489. int Biggest;
  1490. /*
  1491. ** Some animations (when attached to another object) damage the object it
  1492. ** is in contact with. Fire is a good example of this. This value is a
  1493. ** fixed point number of the damage that is applied to the attached object
  1494. ** every game tick. The damage is expressed as damage points per game frame.
  1495. ** Because it is a fixed point fraction, the damage can be very slight.
  1496. */
  1497. fixed Damage;
  1498. /*
  1499. ** Simple animation delay value between advancing of frames. This can
  1500. ** be overridden by the control list.
  1501. */
  1502. int Delay;
  1503. /*
  1504. ** The starting frame number for each animation sequence. Usually this is
  1505. ** zero, but can sometimes be different if this animation is a sub sequence
  1506. ** of a larger animation file.
  1507. */
  1508. int Start;
  1509. /*
  1510. ** Looping animations might start at a different frame than the initial one.
  1511. ** This is true for smoke effects that have a startup sequence followed by a
  1512. ** continuous looping sequence.
  1513. */
  1514. int LoopStart;
  1515. /*
  1516. ** For looping animations, this is the frame that will end all the middle loops
  1517. ** of the animation. The last loop of the animation will proceed until the Stages
  1518. ** has been fully completed.
  1519. */
  1520. int LoopEnd;
  1521. /*
  1522. ** The number of stages that this animation sequence will progress through
  1523. ** before it loops or ends.
  1524. */
  1525. int Stages;
  1526. /*
  1527. ** This is the normal loop count for this animation. Usually this is one, but
  1528. ** for some animations, it may be larger.
  1529. */
  1530. int Loops;
  1531. /*
  1532. ** This is the sound effect to play when this animation starts. Usually, this
  1533. ** applies to explosion animations.
  1534. */
  1535. VocType Sound;
  1536. /*
  1537. ** If the animation is to launch into another animation, then
  1538. ** the secondary animation will be defined here.
  1539. */
  1540. AnimType ChainTo;
  1541. /*
  1542. ** The number of virtual animation stages. Keeps the animation alive longer for the purpose
  1543. ** of 4K rendering, but is ignored by legacy rendering.
  1544. */
  1545. int VirtualStages;
  1546. /*
  1547. ** The scale of the virtual animation. Allows for higher-resolution art to appear larger.
  1548. */
  1549. int VirtualScale;
  1550. /*
  1551. ** The shape name to used for 4K virtual rendering, overrides the INI name
  1552. */
  1553. char const * VirtualName;
  1554. /*
  1555. ** Animation data to use specifically for virtual rendering (implies this animation only for legacy).
  1556. */
  1557. AnimType VirtualAnim;
  1558. //---------------------------------------------------------------------------
  1559. AnimTypeClass(NoInitClass const & x) : ObjectTypeClass(x) {}
  1560. AnimTypeClass(AnimType anim,
  1561. char const * name,
  1562. int size,
  1563. int biggest,
  1564. bool istheater,
  1565. bool isnormal,
  1566. bool iswhite,
  1567. bool isscorcher,
  1568. bool iscrater,
  1569. bool issticky,
  1570. bool ground,
  1571. bool istrans,
  1572. bool isflame,
  1573. fixed damage,
  1574. int delaytime,
  1575. int start,
  1576. int loopstart,
  1577. int loopend,
  1578. int stages,
  1579. int loops,
  1580. VocType sound,
  1581. AnimType chainto,
  1582. int virtualstages=-1,
  1583. int virtualscale=0x100,
  1584. char const * virtualname=NULL,
  1585. AnimType virtualanim=ANIM_NONE);
  1586. static void Init_Heap(void);
  1587. static void * operator new(size_t);
  1588. static void * operator new(size_t , void * ptr) {return(ptr);};
  1589. static void operator delete(void * ptr);
  1590. static AnimTypeClass & As_Reference(AnimType type);
  1591. static void Init(TheaterType theater);
  1592. static void One_Time(void);
  1593. virtual bool Create_And_Place(CELL , HousesType =HOUSE_NONE) const {return false;};
  1594. virtual ObjectClass * Create_One_Of(HouseClass *) const {return 0;};
  1595. };
  1596. /****************************************************************************
  1597. ** This controls the overlay object types. These object types include walls
  1598. ** and concrete. They are always considered to be one icon in size and
  1599. ** are processed on an icon by icon basis. This is different from normal
  1600. ** templates which can be an arbitrary size. Other than this they are
  1601. ** mostly similar to normal templates but with some characteristics of
  1602. ** structures (they can be destroyed).
  1603. */
  1604. class OverlayTypeClass: public ObjectTypeClass
  1605. {
  1606. public:
  1607. /*
  1608. ** What overlay is this.
  1609. */
  1610. OverlayType Type;
  1611. /*
  1612. ** What type of ground does this make the cell it occupies?
  1613. */
  1614. LandType Land;
  1615. /*
  1616. ** If this overlay is a wall, how many stages of destruction are there
  1617. ** for this wall type? i.e. sandbags = 2, concrete = 4, etc.
  1618. */
  1619. int DamageLevels;
  1620. /*
  1621. ** If this overlay is a wall, what amount of damage is necessary
  1622. ** before the wall takes damage?
  1623. */
  1624. int DamagePoints;
  1625. /*
  1626. ** Is this overlay graphic theater specific. This means that if there is
  1627. ** custom art for this overlay that varies between different theaters, then
  1628. ** this flag will be true.
  1629. */
  1630. unsigned IsTheater:1;
  1631. /*
  1632. ** Is this a wall type overlay? Wall types change their shape
  1633. ** depending on the existence of adjacent walls of the same type.
  1634. */
  1635. unsigned IsWall:1;
  1636. /*
  1637. ** If this overlay is actually a wall and this wall type is tall enough that
  1638. ** normal ground based straight line weapons will be blocked by it, then this
  1639. ** flag will be true. Brick fences are typical of this type.
  1640. */
  1641. unsigned IsHigh:1;
  1642. /*
  1643. ** If this overlay represents harvestable tiberium, then this flag
  1644. ** will be true.
  1645. */
  1646. unsigned IsTiberium:1;
  1647. /*
  1648. ** If this is a wall that is made of wood, then this flag will be
  1649. ** true. Such walls are affected by fire damage.
  1650. */
  1651. unsigned IsWooden:1;
  1652. /*
  1653. ** Is this a crate? If it is, then goodies may come out of it.
  1654. */
  1655. unsigned IsCrate:1;
  1656. /*
  1657. ** If this is true, then the overlay will not show up on the radar map.
  1658. */
  1659. unsigned IsRadarVisible:1;
  1660. //----------------------------------------------------------
  1661. OverlayTypeClass(NoInitClass const & x) : ObjectTypeClass(x) {}
  1662. OverlayTypeClass(
  1663. OverlayType iconset,
  1664. char const * ininame,
  1665. int fullname,
  1666. LandType ground,
  1667. int damagelevels,
  1668. int damagepoints,
  1669. bool isradarinvisible,
  1670. bool iswooden,
  1671. bool istarget,
  1672. bool iscrushable,
  1673. bool istiberium,
  1674. bool high,
  1675. bool theater,
  1676. bool iswall,
  1677. bool iscrate);
  1678. static void * operator new(size_t);
  1679. static void * operator new(size_t , void * ptr) {return(ptr);};
  1680. static void operator delete(void * ptr);
  1681. static void Init_Heap(void);
  1682. static OverlayType From_Name(char const * name);
  1683. static OverlayTypeClass & As_Reference(OverlayType type);
  1684. static void Init(TheaterType);
  1685. static void One_Time(void);
  1686. static void Prep_For_Add(void);
  1687. virtual COORDINATE Coord_Fixup(COORDINATE coord) const;
  1688. virtual bool Create_And_Place(CELL cell, HousesType house=HOUSE_NONE) const;
  1689. virtual ObjectClass * Create_One_Of(HouseClass *) const;
  1690. virtual short const * Occupy_List(bool placement=false) const;
  1691. virtual void Draw_It(int x, int y, int data) const;
  1692. virtual unsigned char * Radar_Icon(int data) const;
  1693. #ifdef SCENARIO_EDITOR
  1694. virtual void Display(int x, int y, WindowNumberType window, HousesType house=HOUSE_NONE) const;
  1695. #endif
  1696. };
  1697. /****************************************************************************
  1698. ** This type elaborates the various "smudge" effects that can occur. Smudges are
  1699. ** those elements which are on top off all the ground icons, but below anything
  1700. ** that is "above" it. This includes scorch marks, craters, and infantry bodies.
  1701. ** Smudges, be definition, contain transparency. The are modifiers to underlying
  1702. ** terrain imagery.
  1703. */
  1704. class SmudgeTypeClass : public ObjectTypeClass
  1705. {
  1706. public:
  1707. /*
  1708. ** What overlay is this.
  1709. */
  1710. SmudgeType Type;
  1711. /*
  1712. ** Some smudges are larger than one cell. If this is the case, then
  1713. ** these dimensions specify the number of cells wide and tall the
  1714. ** smudge is.
  1715. */
  1716. int Width;
  1717. int Height;
  1718. /*
  1719. ** Is this smudge a crater type? If so, then a second crater can be added to
  1720. ** this smudge so that a more cratered landscape results.
  1721. */
  1722. unsigned IsCrater:1;
  1723. /*
  1724. ** Is this overlay used as the attached road piece for buildings (bib)?
  1725. */
  1726. unsigned IsBib:1;
  1727. //----------------------------------------------------------
  1728. SmudgeTypeClass(NoInitClass const & x) : ObjectTypeClass(x) {}
  1729. SmudgeTypeClass(
  1730. SmudgeType smudge,
  1731. char const * ininame,
  1732. int fullname,
  1733. int width,
  1734. int height,
  1735. bool isbib,
  1736. bool iscrater
  1737. );
  1738. static void * operator new(size_t);
  1739. static void * operator new(size_t , void * ptr) {return(ptr);};
  1740. static void operator delete(void * ptr);
  1741. static void Init_Heap(void);
  1742. static SmudgeType From_Name(char const * name);
  1743. static SmudgeTypeClass & As_Reference(SmudgeType type);
  1744. static void Init(TheaterType);
  1745. static void One_Time(void);
  1746. static void Prep_For_Add(void);
  1747. virtual bool Create_And_Place(CELL cell, HousesType house=HOUSE_NONE) const;
  1748. virtual ObjectClass * Create_One_Of(HouseClass *) const;
  1749. virtual short const * Occupy_List(bool placement=false) const;
  1750. virtual short const * Overlap_List(void) const {return Occupy_List();};
  1751. virtual void Draw_It(int x, int y, int data) const ;
  1752. #ifdef SCENARIO_EDITOR
  1753. virtual void Display(int x, int y, WindowNumberType window, HousesType house=HOUSE_NONE) const;
  1754. #endif
  1755. };
  1756. #endif