BBDATA.CPP 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  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: F:\projects\c&c\vcs\code\bbdata.cpv 2.17 16 Oct 1995 16:49:46 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 : BBDATA.CPP *
  22. * *
  23. * Programmer : Joe L. Bostic *
  24. * *
  25. * Start Date : May 23, 1994 *
  26. * *
  27. * Last Update : October 17, 1994 [JLB] *
  28. * *
  29. *---------------------------------------------------------------------------------------------*
  30. * Functions: *
  31. * BulletTypeClass::BulletTypeClass -- Constructor for bullet type objects. *
  32. * BulletTypeClass::Load_Shapes -- Load shape data for bullet types. *
  33. * BulletTypeClass::One_Time -- Performs the one time processing for bullets. *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #include "function.h"
  36. /***************************************************************************
  37. ** Detailed information about each class of bullet (projectile) in the game.
  38. */
  39. static BulletTypeClass const ClassSniper(
  40. BULLET_BULLET,
  41. "50cal", // NAME: Text name of this unit type.
  42. false, // Flies over tall walls?
  43. false, // Homes in on target?
  44. false, // Projectile arcs to the target?
  45. false, // Is this a dropping bomb-like object?
  46. true, // Is this projectile invisible?
  47. false, // Will it blow up even if it gets just NEAR to target?
  48. false, // Does it have flickering flame animation?
  49. false, // Can it run out of fuel?
  50. true, // Is there no visual difference between projectile facings?
  51. false, // Is projectile inherently inaccurate?
  52. false, // Translucent colors are used?
  53. false, // Good against aircraft?
  54. 0, // ARMING: Time to arm projectile after launch.
  55. 0, // RANGE: Inherent override range factor.
  56. MPH_LIGHT_SPEED, // SPEED: Miles per hour.
  57. 0, // ROT: Rate of turn (degrees per tick).
  58. WARHEAD_HOLLOW_POINT, // WARHEAD: If fires weapon, warhead type
  59. ANIM_PIFF // Explosion to use upon impact.
  60. );
  61. static BulletTypeClass const ClassBullet(
  62. BULLET_BULLET,
  63. "50cal", // NAME: Text name of this unit type.
  64. false, // Flies over tall walls?
  65. false, // Homes in on target?
  66. false, // Projectile arcs to the target?
  67. false, // Is this a dropping bomb-like object?
  68. true, // Is this projectile invisible?
  69. false, // Will it blow up even if it gets just NEAR to target?
  70. false, // Does it have flickering flame animation?
  71. false, // Can it run out of fuel?
  72. true, // Is there no visual difference between projectile facings?
  73. false, // Is projectile inherently inaccurate?
  74. false, // Translucent colors are used?
  75. false, // Good against aircraft?
  76. 0, // ARMING: Time to arm projectile after launch.
  77. 0, // RANGE: Inherent override range factor.
  78. MPH_LIGHT_SPEED, // SPEED: Miles per hour.
  79. 0, // ROT: Rate of turn (degrees per tick).
  80. WARHEAD_SA, // WARHEAD: If fires weapon, warhead type
  81. ANIM_PIFF // Explosion to use upon impact.
  82. );
  83. static BulletTypeClass const ClassSpreadfire(
  84. BULLET_SPREADFIRE,
  85. "50cal", // NAME: Text name of this unit type.
  86. true, // Flies over tall walls?
  87. false, // Homes in on target?
  88. false, // Projectile arcs to the target?
  89. false, // Is this a dropping bomb-like object?
  90. true, // Is this projectile invisible?
  91. false, // Will it blow up even if it gets just NEAR to target?
  92. false, // Does it have flickering flame animation?
  93. false, // Can it run out of fuel?
  94. true, // Is there no visual difference between projectile facings?
  95. false, // Is projectile inherently inaccurate?
  96. false, // Translucent colors are used?
  97. false, // Good against aircraft?
  98. 0, // ARMING: Time to arm projectile after launch.
  99. 0, // RANGE: Inherent override range factor.
  100. MPH_LIGHT_SPEED, // SPEED: Miles per hour.
  101. 0, // ROT: Rate of turn (degrees per tick).
  102. WARHEAD_HE, // WARHEAD: If fires weapon, warhead type
  103. ANIM_PIFFPIFF // Explosion to use upon impact.
  104. );
  105. static BulletTypeClass const ClassAPDS(
  106. BULLET_APDS,
  107. "120mm", // NAME: Text name of this unit type.
  108. false, // Flies over tall walls?
  109. false, // Homes in on target?
  110. false, // Projectile arcs to the target?
  111. false, // Is this a dropping bomb-like object?
  112. false, // Is this projectile invisible?
  113. false, // Will it blow up even if it gets just NEAR to target?
  114. false, // Does it have flickering flame animation?
  115. false, // Can it run out of fuel?
  116. true, // Is there no visual difference between projectile facings?
  117. false, // Is projectile inherently inaccurate?
  118. false, // Translucent colors are used?
  119. false, // Good against aircraft?
  120. 0, // ARMING: Time to arm projectile after launch.
  121. 0, // RANGE: Inherent override range factor.
  122. MPH_VERY_FAST, // SPEED: Miles per hour.
  123. 0, // ROT: Rate of turn (degrees per tick).
  124. WARHEAD_AP, // WARHEAD: If fires weapon, warhead type
  125. ANIM_VEH_HIT3 // Explosion to use upon impact.
  126. );
  127. static BulletTypeClass const Class120mm(
  128. BULLET_HE,
  129. "120mm", // NAME: Text name of this unit type.
  130. true, // Flies over tall walls?
  131. false, // Homes in on target?
  132. true, // Projectile arcs to the target?
  133. false, // Is this a dropping bomb-like object?
  134. false, // Is this projectile invisible?
  135. false, // Will it blow up even if it gets just NEAR to target?
  136. false, // Does it have flickering flame animation?
  137. false, // Can it run out of fuel?
  138. true, // Is there no visual difference between projectile facings?
  139. true, // Is projectile inherently inaccurate?
  140. false, // Translucent colors are used?
  141. false, // Good against aircraft?
  142. 0, // ARMING: Time to arm projectile after launch.
  143. 0, // RANGE: Inherent override range factor.
  144. MPH_MEDIUM_FAST, // SPEED: Miles per hour.
  145. 0, // ROT: Rate of turn (degrees per tick).
  146. WARHEAD_HE, // WARHEAD: If fires weapon, warhead type
  147. ANIM_ART_EXP1 // Explosion to use upon impact.
  148. );
  149. static BulletTypeClass const ClassMissile(
  150. BULLET_SSM,
  151. "DRAGON", // NAME: Text name of this unit type.
  152. true, // Flies over tall walls?
  153. true, // Homes in on target?
  154. false, // Projectile arcs to the target?
  155. false, // Is this a dropping bomb-like object?
  156. false, // Is this projectile invisible?
  157. true, // Will it blow up even if it gets just NEAR to target?
  158. true, // Does it have flickering flame animation?
  159. true, // Can it run out of fuel?
  160. false, // Is there no visual difference between projectile facings?
  161. true, // Is projectile inherently inaccurate?
  162. true, // Translucent colors are used?
  163. true, // Good against aircraft?
  164. 7, // ARMING: Time to arm projectile after launch.
  165. 0, // RANGE: Inherent override range factor.
  166. MPH_ROCKET, // SPEED: Miles per hour.
  167. 5, // ROT: Rate of turn (degrees per tick).
  168. WARHEAD_HE, // WARHEAD: If fires weapon, warhead type
  169. ANIM_FRAG1 // Explosion to use upon impact.
  170. );
  171. static BulletTypeClass const ClassMissile2(
  172. BULLET_SSM2,
  173. "DRAGON", // NAME: Text name of this unit type.
  174. true, // Flies over tall walls?
  175. true, // Homes in on target?
  176. false, // Projectile arcs to the target?
  177. false, // Is this a dropping bomb-like object?
  178. false, // Is this projectile invisible?
  179. true, // Will it blow up even if it gets just NEAR to target?
  180. true, // Does it have flickering flame animation?
  181. true, // Can it run out of fuel?
  182. false, // Is there no visual difference between projectile facings?
  183. true, // Is projectile inherently inaccurate?
  184. true, // Translucent colors are used?
  185. true, // Good against aircraft?
  186. 9, // ARMING: Time to arm projectile after launch.
  187. 0, // RANGE: Inherent override range factor.
  188. MPH_ROCKET, // SPEED: Miles per hour.
  189. 7, // ROT: Rate of turn (degrees per tick).
  190. WARHEAD_HE, // WARHEAD: If fires weapon, warhead type
  191. ANIM_FRAG1 // Explosion to use upon impact.
  192. );
  193. static BulletTypeClass const ClassPatriot(
  194. BULLET_SAM,
  195. "MISSILE", // NAME: Text name of this unit type.
  196. true, // Flies over tall walls?
  197. true, // Homes in on target?
  198. false, // Projectile arcs to the target?
  199. false, // Is this a dropping bomb-like object?
  200. false, // Is this projectile invisible?
  201. true, // Will it blow up even if it gets just NEAR to target?
  202. true, // Does it have flickering flame animation?
  203. true, // Can it run out of fuel?
  204. false, // Is there no visual difference between projectile facings?
  205. false, // Is projectile inherently inaccurate?
  206. false, // Translucent colors are used?
  207. true, // Good against aircraft?
  208. 0, // ARMING: Time to arm projectile after launch.
  209. 0, // RANGE: Inherent override range factor.
  210. MPH_VERY_FAST, // SPEED: Miles per hour.
  211. 10, // ROT: Rate of turn (degrees per tick).
  212. WARHEAD_AP, // WARHEAD: If fires weapon, warhead type
  213. ANIM_VEH_HIT1 // Explosion to use upon impact.
  214. );
  215. static BulletTypeClass const ClassDragon(
  216. BULLET_TOW,
  217. "DRAGON", // NAME: Text name of this unit type.
  218. true, // Flies over tall walls?
  219. true, // Homes in on target?
  220. false, // Projectile arcs to the target?
  221. false, // Is this a dropping bomb-like object?
  222. false, // Is this projectile invisible?
  223. true, // Will it blow up even if it gets just NEAR to target?
  224. true, // Does it have flickering flame animation?
  225. true, // Can it run out of fuel?
  226. false, // Is there no visual difference between projectile facings?
  227. false, // Is projectile inherently inaccurate?
  228. true, // Translucent colors are used?
  229. true, // Good against aircraft?
  230. 3, // ARMING: Time to arm projectile after launch.
  231. 0, // RANGE: Inherent override range factor.
  232. MPH_ROCKET, // SPEED: Miles per hour.
  233. 5, // ROT: Rate of turn (degrees per tick).
  234. WARHEAD_AP, // WARHEAD: If fires weapon, warhead type
  235. ANIM_VEH_HIT2 // Explosion to use upon impact.
  236. );
  237. static BulletTypeClass const ClassFlame(
  238. BULLET_FLAME,
  239. "FLAME", // NAME: Text name of this unit type.
  240. false, // Flies over tall walls?
  241. false, // Homes in on target?
  242. false, // Projectile arcs to the target?
  243. false, // Is this a dropping bomb-like object?
  244. true, // Is this projectile invisible?
  245. false, // Will it blow up even if it gets just NEAR to target?
  246. false, // Does it have flickering flame animation?
  247. true, // Can it run out of fuel?
  248. false, // Is there no visual difference between projectile facings?
  249. false, // Is projectile inherently inaccurate?
  250. false, // Translucent colors are used?
  251. false, // Good against aircraft?
  252. 12, // ARMING: Time to arm projectile after launch.
  253. 12, // RANGE: Inherent override range factor.
  254. MPH_FAST, // SPEED: Miles per hour.
  255. 0, // ROT: Rate of turn (degrees per tick).
  256. WARHEAD_FIRE, // WARHEAD: If fires weapon, warhead type
  257. ANIM_NONE // Explosion to use upon impact.
  258. );
  259. static BulletTypeClass const ClassChem(
  260. BULLET_CHEMSPRAY,
  261. "FLAME", // NAME: Text name of this unit type.
  262. false, // Flies over tall walls?
  263. false, // Homes in on target?
  264. false, // Projectile arcs to the target?
  265. false, // Is this a dropping bomb-like object?
  266. true, // Is this projectile invisible?
  267. false, // Will it blow up even if it gets just NEAR to target?
  268. false, // Does it have flickering flame animation?
  269. true, // Can it run out of fuel?
  270. false, // Is there no visual difference between projectile facings?
  271. false, // Is projectile inherently inaccurate?
  272. false, // Translucent colors are used?
  273. false, // Good against aircraft?
  274. 12, // ARMING: Time to arm projectile after launch.
  275. 12, // RANGE: Inherent override range factor.
  276. MPH_FAST, // SPEED: Miles per hour.
  277. 0, // ROT: Rate of turn (degrees per tick).
  278. WARHEAD_HE, // WARHEAD: If fires weapon, warhead type
  279. ANIM_NONE // Explosion to use upon impact.
  280. );
  281. static BulletTypeClass const ClassNapalm(
  282. BULLET_NAPALM,
  283. "BOMBLET", // NAME: Text name of this unit type.
  284. true, // Flies over tall walls?
  285. false, // Homes in on target?
  286. false, // Projectile arcs to the target?
  287. true, // Is this a dropping bomb-like object?
  288. false, // Is this projectile invisible?
  289. false, // Will it blow up even if it gets just NEAR to target?
  290. false, // Does it have flickering flame animation?
  291. false, // Can it run out of fuel?
  292. true, // Is there no visual difference between projectile facings?
  293. false, // Is projectile inherently inaccurate?
  294. true, // Translucent colors are used?
  295. false, // Good against aircraft?
  296. 24, // ARMING: Time to arm projectile after launch.
  297. 24, // RANGE: Inherent override range factor.
  298. MPH_MEDIUM_SLOW, // SPEED: Miles per hour.
  299. 0, // ROT: Rate of turn (degrees per tick).
  300. WARHEAD_FIRE, // WARHEAD: If fires weapon, warhead type
  301. ANIM_NAPALM2 // Explosion to use upon impact.
  302. );
  303. static BulletTypeClass const ClassGrenade(
  304. BULLET_GRENADE,
  305. "BOMB", // NAME: Text name of this unit type.
  306. true, // Flies over tall walls?
  307. false, // Homes in on target?
  308. true, // Projectile arcs to the target?
  309. false, // Is this a dropping bomb-like object?
  310. false, // Is this projectile invisible?
  311. false, // Will it blow up even if it gets just NEAR to target?
  312. false, // Does it have flickering flame animation?
  313. false, // Can it run out of fuel?
  314. true, // Is there no visual difference between projectile facings?
  315. true, // Is projectile inherently inaccurate?
  316. true, // Translucent colors are used?
  317. false, // Good against aircraft?
  318. 0, // ARMING: Time to arm projectile after launch.
  319. 0, // RANGE: Inherent override range factor.
  320. MPH_MEDIUM_SLOW, // SPEED: Miles per hour.
  321. 0, // ROT: Rate of turn (degrees per tick).
  322. WARHEAD_HE, // WARHEAD: If fires weapon, warhead type
  323. ANIM_VEH_HIT2 // Explosion to use upon impact.
  324. );
  325. static BulletTypeClass const ClassLaser(
  326. BULLET_LASER,
  327. "Laser", // NAME: Text name of this unit type.
  328. true, // Flies over tall walls?
  329. false, // Homes in on target?
  330. false, // Projectile arcs to the target?
  331. false, // Is this a dropping bomb-like object?
  332. true, // Is this projectile invisible?
  333. false, // Will it blow up even if it gets just NEAR to target?
  334. false, // Does it have flickering flame animation?
  335. false, // Can it run out of fuel?
  336. true, // Is there no visual difference between projectile facings?
  337. false, // Is projectile inherently inaccurate?
  338. false, // Translucent colors are used?
  339. false, // Good against aircraft?
  340. 0, // ARMING: Time to arm projectile after launch.
  341. 0, // RANGE: Inherent override range factor.
  342. MPH_LIGHT_SPEED, // SPEED: Miles per hour.
  343. 0, // ROT: Rate of turn (degrees per tick).
  344. WARHEAD_LASER, // WARHEAD: If fires weapon, warhead type
  345. ANIM_NONE // Explosion to use upon impact.
  346. );
  347. static BulletTypeClass const ClassNukeUp(
  348. BULLET_NUKE_UP,
  349. "ATOMICUP", // NAME: Text name of this unit type.
  350. true, // Flies over tall walls?
  351. false, // Homes in on target?
  352. false, // Projectile arcs to the target?
  353. false, // Is this a dropping bomb-like object?
  354. false, // Is this projectile invisible?
  355. true, // Will it blow up even if it gets just NEAR to target?
  356. false, // Does it have flickering flame animation?
  357. false, // Can it run out of fuel?
  358. true, // Is there no visual difference between projectile facings?
  359. false, // Is projectile inherently inaccurate?
  360. false, // Translucent colors are used?
  361. false, // Good against aircraft?
  362. 0, // ARMING: Time to arm projectile after launch.
  363. 0, // RANGE: Inherent override range factor.
  364. MPH_VERY_FAST, // SPEED: Miles per hour.
  365. 0, // ROT: Rate of turn (degrees per tick).
  366. WARHEAD_HE, // WARHEAD: If fires weapon, warhead type
  367. ANIM_FRAG1 // Explosion to use upon impact.
  368. );
  369. static BulletTypeClass const ClassNukeDown(
  370. BULLET_NUKE_DOWN,
  371. "ATOMICDN", // NAME: Text name of this unit type.
  372. true, // Flies over tall walls?
  373. false, // Homes in on target?
  374. false, // Projectile arcs to the target?
  375. false, // Is this a dropping bomb-like object?
  376. false, // Is this projectile invisible?
  377. true, // Will it blow up even if it gets just NEAR to target?
  378. false, // Does it have flickering flame animation?
  379. false, // Can it run out of fuel?
  380. true, // Is there no visual difference between projectile facings?
  381. false, // Is projectile inherently inaccurate?
  382. false, // Translucent colors are used?
  383. false, // Good against aircraft?
  384. 0, // ARMING: Time to arm projectile after launch.
  385. 0, // RANGE: Inherent override range factor.
  386. MPH_VERY_FAST, // SPEED: Miles per hour.
  387. 0, // ROT: Rate of turn (degrees per tick).
  388. WARHEAD_HE, // WARHEAD: If fires weapon, warhead type
  389. ANIM_ATOM_BLAST // Explosion to use upon impact.
  390. );
  391. static BulletTypeClass const ClassHonestJohn(
  392. BULLET_HONEST_JOHN,
  393. "MISSILE", // NAME: Text name of this unit type.
  394. true, // Flies over tall walls?
  395. false, // Homes in on target?
  396. false, // Projectile arcs to the target?
  397. false, // Is this a dropping bomb-like object?
  398. false, // Is this projectile invisible?
  399. true, // Will it blow up even if it gets just NEAR to target?
  400. true, // Does it have flickering flame animation?
  401. true, // Can it run out of fuel?
  402. false, // Is there no visual difference between projectile facings?
  403. false, // Is projectile inherently inaccurate?
  404. false, // Translucent colors are used?
  405. false, // Good against aircraft?
  406. 10, // ARMING: Time to arm projectile after launch.
  407. 0, // RANGE: Inherent override range factor.
  408. MPH_FAST, // SPEED: Miles per hour.
  409. 10, // ROT: Rate of turn (degrees per tick).
  410. WARHEAD_FIRE, // WARHEAD: If fires weapon, warhead type
  411. ANIM_NAPALM3 // Explosion to use upon impact.
  412. );
  413. static BulletTypeClass const ClassHeadButt(
  414. BULLET_HEADBUTT,
  415. "GORE", // NAME: Text name of this unit type.
  416. false, // Flies over tall walls?
  417. false, // Homes in on target?
  418. false, // Projectile arcs to the target?
  419. false, // Is this a dropping bomb-like object?
  420. true, // Is this projectile invisible?
  421. false, // Will it blow up even if it gets just NEAR to target?
  422. false, // Does it have flickering flame animation?
  423. false, // Can it run out of fuel?
  424. true, // Is there no visual difference between projectile facings?
  425. false, // Is projectile inherently inaccurate?
  426. false, // Translucent colors are used?
  427. false, // Good against aircraft?
  428. 0, // ARMING: Time to arm projectile after launch.
  429. 0, // RANGE: Inherent override range factor.
  430. MPH_LIGHT_SPEED, // SPEED: Miles per hour.
  431. 0, // ROT: Rate of turn (degrees per tick).
  432. WARHEAD_HEADBUTT, // WARHEAD: If fires weapon, warhead type
  433. ANIM_NONE // Explosion to use upon impact.
  434. );
  435. static BulletTypeClass const ClassTRexBite(
  436. BULLET_TREXBITE,
  437. "CHEW", // NAME: Text name of this unit type.
  438. false, // Flies over tall walls?
  439. false, // Homes in on target?
  440. false, // Projectile arcs to the target?
  441. false, // Is this a dropping bomb-like object?
  442. true, // Is this projectile invisible?
  443. false, // Will it blow up even if it gets just NEAR to target?
  444. false, // Does it have flickering flame animation?
  445. false, // Can it run out of fuel?
  446. true, // Is there no visual difference between projectile facings?
  447. false, // Is projectile inherently inaccurate?
  448. false, // Translucent colors are used?
  449. false, // Good against aircraft?
  450. 0, // ARMING: Time to arm projectile after launch.
  451. 0, // RANGE: Inherent override range factor.
  452. MPH_LIGHT_SPEED, // SPEED: Miles per hour.
  453. 0, // ROT: Rate of turn (degrees per tick).
  454. WARHEAD_FEEDME, // WARHEAD: If fires weapon, warhead type
  455. ANIM_NONE // Explosion to use upon impact.
  456. );
  457. #ifdef PETROGLYPH_EXAMPLE_MOD
  458. static BulletTypeClass const NukeLob(
  459. BULLET_NUKE_LOB,
  460. "BOMB", // NAME: Text name of this unit type.
  461. true, // Flies over tall walls?
  462. false, // Homes in on target?
  463. true, // Projectile arcs to the target?
  464. false, // Is this a dropping bomb-like object?
  465. false, // Is this projectile invisible?
  466. false, // Will it blow up even if it gets just NEAR to target?
  467. false, // Does it have flickering flame animation?
  468. false, // Can it run out of fuel?
  469. true, // Is there no visual difference between projectile facings?
  470. true, // Is projectile inherently inaccurate?
  471. false, // Translucent colors are used?
  472. false, // Good against aircraft?
  473. 0, // ARMING: Time to arm projectile after launch.
  474. 0, // RANGE: Inherent override range factor.
  475. MPH_MEDIUM_FAST, // SPEED: Miles per hour.
  476. 0, // ROT: Rate of turn (degrees per tick).
  477. WARHEAD_HE, // WARHEAD: If fires weapon, warhead type
  478. ANIM_ATOM_BLAST // Explosion to use upon impact.
  479. );
  480. #endif //PETROGLYPH_EXAMPLE_MOD
  481. /*
  482. ** This is the array of pointers to the static data associated with
  483. ** each bullet (projectile) type.
  484. */
  485. BulletTypeClass const * const BulletTypeClass::Pointers[BULLET_COUNT] = {
  486. &ClassSniper, // BULLET_SNIPER
  487. &ClassBullet, // BULLET_BULLET
  488. &ClassAPDS, // BULLET_APDS
  489. &Class120mm, // BULLET_HE
  490. &ClassMissile, // BULLET_SSM
  491. &ClassMissile2, // BULLET_SSM2
  492. &ClassPatriot, // BULLET_SAM
  493. &ClassDragon, // BULLET_TOW
  494. &ClassFlame, // BULLET_FLAME
  495. &ClassChem, // BULLET_CHEMSPRAY
  496. &ClassNapalm, // BULLET_NAPALM
  497. &ClassGrenade, // BULLET_GRENADE
  498. &ClassLaser, // BULLET_LASER
  499. &ClassNukeUp, // BULLET_NUKE_UP
  500. &ClassNukeDown, // BULLET_NUKE_DOWN
  501. &ClassHonestJohn, // BULLET_HONEST_JOHN
  502. &ClassSpreadfire, // BULLET_SPREADFIRE
  503. &ClassHeadButt, // BULLET_HEADBUTT
  504. &ClassTRexBite, // BULLET_TREXBITE
  505. #ifdef PETROGLYPH_EXAMPLE_MOD
  506. &NukeLob, // BULLET_NUKE_LOB
  507. #endif //PETROGLYPH_EXAMPLE_MOD
  508. };
  509. /***********************************************************************************************
  510. * BulletTypeClass::BulletTypeClass -- Constructor for bullet type objects. *
  511. * *
  512. * This is basically a constructor for static type objects used by bullets. All bullets *
  513. * are of a type constructed by this routine at game initialization time. *
  514. * *
  515. * INPUT: see below... *
  516. * *
  517. * OUTPUT: none *
  518. * *
  519. * WARNINGS: none *
  520. * *
  521. * HISTORY: *
  522. * 10/17/1994 JLB : Created. *
  523. *=============================================================================================*/
  524. BulletTypeClass::BulletTypeClass(
  525. BulletType type,
  526. char const *ininame,
  527. bool is_high,
  528. bool is_homing,
  529. bool is_arcing,
  530. bool is_dropping,
  531. bool is_invisible,
  532. bool is_proximity_armed,
  533. bool is_flame_equipped,
  534. bool is_fueled,
  535. bool is_faceless,
  536. bool is_inaccurate,
  537. bool is_translucent,
  538. bool is_antiaircraft,
  539. int arming, int range, MPHType maxspeed, unsigned rot,
  540. WarheadType warhead, AnimType explosion) :
  541. ObjectTypeClass(true, false, false, true, false, false, true, true, TXT_NONE, ininame, ARMOR_NONE, 0)
  542. {
  543. Explosion = explosion;
  544. IsHigh = is_high;
  545. IsAntiAircraft = is_antiaircraft;
  546. IsTranslucent = is_translucent;
  547. IsArcing = is_arcing;
  548. IsHoming = is_homing;
  549. IsDropping = is_dropping;
  550. IsInvisible = is_invisible;
  551. IsProximityArmed = is_proximity_armed;
  552. IsFlameEquipped = is_flame_equipped;
  553. IsFueled = is_fueled;
  554. IsFaceless = is_faceless;
  555. IsInaccurate = is_inaccurate;
  556. Type = type;
  557. Warhead = warhead;
  558. MaxSpeed = maxspeed;
  559. ROT = rot;
  560. Arming = arming;
  561. Range = range;
  562. }
  563. /***********************************************************************************************
  564. * BulletTypeClass::One_Time -- Performs the one time processing for bullets. *
  565. * *
  566. * This routine is used to perform any one time processing for the bullet type class. It *
  567. * handles loading of the shape files. *
  568. * *
  569. * INPUT: none *
  570. * *
  571. * OUTPUT: none *
  572. * *
  573. * WARNINGS: This routine must be called before any rendering of bullets occurs and should *
  574. * only be called once. *
  575. * *
  576. * HISTORY: *
  577. * 05/28/1994 JLB : Created. *
  578. *=============================================================================================*/
  579. void BulletTypeClass::One_Time(void)
  580. {
  581. BulletType index;
  582. /*
  583. ** Load the bullet shapes.
  584. */
  585. for (index = BULLET_FIRST; index < BULLET_COUNT; index++) {
  586. BulletTypeClass const & bullet = As_Reference(index);
  587. char fullname[_MAX_FNAME+_MAX_EXT];
  588. if (!bullet.IsInvisible) {
  589. _makepath(fullname, NULL, NULL, bullet.IniName, ".SHP");
  590. RawFileClass file(fullname);
  591. if (file.Is_Available()) {
  592. ((void const *&)bullet.ImageData) = Load_Alloc_Data(file);
  593. } else {
  594. ((void const *&)bullet.ImageData) = MixFileClass::Retrieve(fullname);
  595. }
  596. }
  597. }
  598. }