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