AADATA.CPP (38388B)
1 // 2 // Copyright 2020 Electronic Arts Inc. 3 // 4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 5 // software: you can redistribute it and/or modify it under the terms of 6 // the GNU General Public License as published by the Free Software Foundation, 7 // either version 3 of the License, or (at your option) any later version. 8 9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 10 // in the hope that it will be useful, but with permitted additional restrictions 11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 12 // distributed with this program. You should have received a copy of the 13 // GNU General Public License along with permitted additional restrictions 14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection 15 16 /* $Header: /CounterStrike/AADATA.CPP 1 3/03/97 10:24a 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 : AADATA.CPP * 24 * * 25 * Programmer : Joe L. Bostic * 26 * * 27 * Start Date : July 22, 1994 * 28 * * 29 * Last Update : July 9, 1996 [JLB] * 30 * * 31 *---------------------------------------------------------------------------------------------* 32 * Functions: * 33 * AircraftTypeClass::AircraftTypeClass -- Constructor for aircraft objects. * 34 * AircraftTypeClass::As_Reference -- Given an aircraft type, find the matching type object. * 35 * AircraftTypeClass::Create_And_Place -- Creates and places aircraft using normal game syste* 36 * AircraftTypeClass::Create_One_Of -- Creates an aircraft object of the appropriate type. * 37 * AircraftTypeClass::Dimensions -- Fetches the graphic dimensions of the aircraft type. * 38 * AircraftTypeClass::Display -- Displays a generic version of the aircraft type. * 39 * AircraftTypeClass::From_Name -- Converts an ASCII name into an aircraft type number. * 40 * AircraftTypeClass::Init_Heap -- Initialize the aircraft type class heap. * 41 * AircraftTypeClass::Max_Pips -- Fetches the maximum number of pips allowed. * 42 * AircraftTypeClass::Occupy_List -- Returns with occupation list for landed aircraft. * 43 * AircraftTypeClass::One_Time -- Performs one time initialization of the aircraft type class* 44 * AircraftTypeClass::Overlap_List -- Determines the overlap list for a landed aircraft. * 45 * AircraftTypeClass::Prep_For_Add -- Prepares the scenario editor for adding an aircraft obj* 46 * AircraftTypeClass::operator delete -- Returns aircraft type to special memory pool. * 47 * AircraftTypeClass::operator new -- Allocates an aircraft type object from special pool. * 48 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 49 50 #include "function.h" 51 52 53 void const * AircraftTypeClass::LRotorData = NULL; 54 void const * AircraftTypeClass::RRotorData = NULL; 55 56 // Badger bomber 57 static AircraftTypeClass const BadgerPlane( 58 AIRCRAFT_BADGER, // What kind of aircraft is this. 59 TXT_BADGER, // Translated text number for aircraft. 60 "BADR", // INI name of aircraft. 61 0x0000, // Vertical offset. 62 0x0000, // Primary weapon offset along turret centerline. 63 0x0000, // Primary weapon lateral offset along turret centerline. 64 true, // Fixed wing aircraft? 65 false, // Equipped with a rotor? 66 false, // Custom rotor sets for each facing? 67 false, // Can this aircraft land on clear terrain? 68 true, // Is it invisible on radar? 69 false, // Can the player select it so as to give it orders? 70 true, // Can it be assigned as a target for attack. 71 false, // Is it insignificant (won't be announced)? 72 false, // Is it immune to normal combat damage? 73 STRUCT_NONE, // Preferred landing building. 74 0xFF, // Landing speed 75 16, // Number of rotation stages. 76 MISSION_HUNT // Default mission for aircraft. 77 ); 78 79 // Photo recon plane. 80 static AircraftTypeClass const U2Plane( 81 AIRCRAFT_U2, // What kind of aircraft is this. 82 TXT_U2, // Translated text number for aircraft. 83 "U2", // INI name of aircraft. 84 0x0000, // Vertical offset. 85 0x0000, // Primary weapon offset along turret centerline. 86 0x0000, // Primary weapon lateral offset along turret centerline. 87 true, // Fixed wing aircraft? 88 false, // Equipped with a rotor? 89 false, // Custom rotor sets for each facing? 90 false, // Can this aircraft land on clear terrain? 91 true, // Is it invisible on radar? 92 false, // Can the player select it so as to give it orders? 93 true, // Can it be assigned as a target for attack. 94 false, // Is it insignificant (won't be announced)? 95 false, // Is it immune to normal combat damage? 96 STRUCT_NONE, // Preferred landing building. 97 0xFF, // Landing speed 98 16, // Number of rotation stages. 99 MISSION_HUNT // Default mission for aircraft. 100 ); 101 102 // Mig attack aircraft. 103 static AircraftTypeClass const MigPlane( 104 AIRCRAFT_MIG, // What kind of aircraft is this. 105 TXT_MIG, // Translated text number for aircraft. 106 "MIG", // INI name of aircraft. 107 0x0000, // Vertical offset. 108 0x0020, // Primary weapon offset along turret centerline. 109 0x0020, // Primary weapon lateral offset along turret centerline. 110 true, // Fixed wing aircraft? 111 false, // Equipped with a rotor? 112 false, // Custom rotor sets for each facing? 113 false, // Can this aircraft land on clear terrain? 114 true, // Is it invisible on radar? 115 true, // Can the player select it so as to give it orders? 116 true, // Can it be assigned as a target for attack. 117 false, // Is it insignificant (won't be announced)? 118 false, // Is it immune to normal combat damage? 119 STRUCT_AIRSTRIP, // Preferred landing building. 120 0xC0, // Landing speed 121 16, // Number of rotation stages. 122 MISSION_HUNT // Default mission for aircraft. 123 ); 124 125 // Yak attack aircraft. 126 static AircraftTypeClass const YakPlane( 127 AIRCRAFT_YAK, // What kind of aircraft is this. 128 TXT_YAK, // Translated text number for aircraft. 129 "YAK", // INI name of aircraft. 130 0x0000, // Vertical offset. 131 0x0020, // Primary weapon offset along turret centerline. 132 0x0020, // Primary weapon lateral offset along turret centerline. 133 true, // Fixed wing aircraft? 134 false, // Equipped with a rotor? 135 false, // Custom rotor sets for each facing? 136 false, // Can this aircraft land on clear terrain? 137 true, // Is it invisible on radar? 138 true, // Can the player select it so as to give it orders? 139 true, // Can it be assigned as a target for attack. 140 false, // Is it insignificant (won't be announced)? 141 false, // Is it immune to normal combat damage? 142 STRUCT_AIRSTRIP, // Preferred landing building. 143 0xFF, // Landing speed 144 16, // Number of rotation stages. 145 MISSION_HUNT // Default mission for aircraft. 146 ); 147 148 // Transport helicopter. 149 static AircraftTypeClass const TransportHeli( 150 AIRCRAFT_TRANSPORT, // What kind of aircraft is this. 151 TXT_TRANS, // Translated text number for aircraft. 152 "TRAN", // INI name of aircraft. 153 0x0000, // Vertical offset. 154 0x0000, // Primary weapon offset along turret centerline. 155 0x0000, // Primary weapon lateral offset along turret centerline. 156 false, // Fixed wing aircraft? 157 true, // Equipped with a rotor? 158 true, // Custom rotor sets for each facing? 159 true, // Can this aircraft land on clear terrain? 160 true, // Is it invisible on radar? 161 true, // Can the player select it so as to give it orders? 162 true, // Can it be assigned as a target for attack. 163 false, // Is it insignificant (won't be announced)? 164 false, // Is it immune to normal combat damage? 165 STRUCT_NONE, // Preferred landing building. 166 0xFF, // Landing speed 167 32, // Number of rotation stages. 168 MISSION_HUNT // Default mission for aircraft. 169 ); 170 171 // Longbow attack helicopter 172 static AircraftTypeClass const AttackHeli( 173 AIRCRAFT_LONGBOW, // What kind of aircraft is this. 174 TXT_HELI, // Translated text number for aircraft. 175 "HELI", // INI name of aircraft. 176 0x0000, // Vertical offset. 177 0x0040, // Primary weapon offset along turret centerline. 178 0x0000, // Primary weapon lateral offset along turret centerline. 179 false, // Fixed wing aircraft? 180 true, // Equipped with a rotor? 181 false, // Custom rotor sets for each facing? 182 false, // Can this aircraft land on clear terrain? 183 true, // Is it invisible on radar? 184 true, // Can the player select it so as to give it orders? 185 true, // Can it be assigned as a target for attack. 186 false, // Is it insignificant (won't be announced)? 187 false, // Is it immune to normal combat damage? 188 STRUCT_HELIPAD, // Preferred landing building. 189 0xFF, // Landing speed 190 32, // Number of rotation stages. 191 MISSION_HUNT // Default mission for aircraft. 192 ); 193 194 195 // Hind 196 static AircraftTypeClass const OrcaHeli( 197 AIRCRAFT_HIND, // What kind of aircraft is this. 198 TXT_ORCA, // Translated text number for aircraft. 199 "HIND", // INI name of aircraft. 200 0x0000, // Vertical offset. 201 0x0040, // Primary weapon offset along turret centerline. 202 0x0000, // Primary weapon lateral offset along turret centerline. 203 false, // Fixed wing aircraft? 204 true, // Equipped with a rotor? 205 false, // Custom rotor sets for each facing? 206 false, // Can this aircraft land on clear terrain? 207 true, // Is it invisible on radar? 208 true, // Can the player select it so as to give it orders? 209 true, // Can it be assigned as a target for attack. 210 false, // Is it insignificant (won't be announced)? 211 false, // Is it immune to normal combat damage? 212 STRUCT_HELIPAD, // Preferred landing building. 213 0xFF, // Landing speed 214 32, // Number of rotation stages. 215 MISSION_HUNT // Default mission for aircraft. 216 ); 217 218 219 /*********************************************************************************************** 220 * AircraftTypeClass::AircraftTypeClass -- Constructor for aircraft objects. * 221 * * 222 * This is the constructor for the aircraft object. * 223 * * 224 * INPUT: see below... * 225 * * 226 * OUTPUT: none * 227 * * 228 * WARNINGS: none * 229 * * 230 * HISTORY: * 231 * 07/26/1994 JLB : Created. * 232 *=============================================================================================*/ 233 AircraftTypeClass::AircraftTypeClass( 234 AircraftType airtype, 235 int name, 236 char const * ininame, 237 int verticaloffset, 238 int primaryoffset, 239 int primarylateral, 240 bool is_fixedwing, 241 bool is_rotorequipped, 242 bool is_rotorcustom, 243 bool is_landable, 244 bool is_stealthy, 245 bool is_selectable, 246 bool is_legal_target, 247 bool is_insignificant, 248 bool is_immune, 249 StructType building, 250 int landingspeed, 251 int rotation, 252 MissionType deforder 253 ) : 254 TechnoTypeClass(RTTI_AIRCRAFTTYPE, 255 int(airtype), 256 name, 257 ininame, 258 REMAP_NORMAL, 259 verticaloffset, 260 primaryoffset, 261 primarylateral, 262 primaryoffset, 263 primarylateral, 264 false, 265 is_stealthy, 266 is_selectable, 267 is_legal_target, 268 is_insignificant, 269 is_immune, 270 false, 271 false, 272 true, 273 true, 274 rotation, 275 SPEED_WINGED), 276 IsFixedWing(is_fixedwing), 277 IsLandable(is_landable), 278 IsRotorEquipped(is_rotorequipped), 279 IsRotorCustom(is_rotorcustom), 280 Type(airtype), 281 Mission(deforder), 282 Building(building), 283 LandingSpeed(landingspeed) 284 { 285 /* 286 ** Forced aircraft overrides from the default. 287 */ 288 Speed = SPEED_WINGED; 289 } 290 291 292 /*********************************************************************************************** 293 * AircraftTypeClass::operator new -- Allocates an aircraft type object from special pool. * 294 * * 295 * This will allocate an aircraft type class object from the memory pool of that purpose. * 296 * * 297 * INPUT: none * 298 * * 299 * OUTPUT: Returns with a pointer to the newly allocated aircraft type class object. If there * 300 * was insufficient memory to fulfill the request, then NULL is returned. * 301 * * 302 * WARNINGS: none * 303 * * 304 * HISTORY: * 305 * 07/09/1996 JLB : Created. * 306 *=============================================================================================*/ 307 void * AircraftTypeClass::operator new(size_t) 308 { 309 return(AircraftTypes.Alloc()); 310 } 311 312 313 /*********************************************************************************************** 314 * AircraftTypeClass::operator delete -- Returns aircraft type to special memory pool. * 315 * * 316 * This will return the aircraft type class object back to the special memory pool that * 317 * it was allocated from. * 318 * * 319 * INPUT: pointer -- Pointer to the aircraft type class object to delete. * 320 * * 321 * OUTPUT: none * 322 * * 323 * WARNINGS: none * 324 * * 325 * HISTORY: * 326 * 07/09/1996 JLB : Created. * 327 *=============================================================================================*/ 328 void AircraftTypeClass::operator delete(void * pointer) 329 { 330 AircraftTypes.Free((AircraftTypeClass *)pointer); 331 } 332 333 334 /*********************************************************************************************** 335 * AircraftTypeClass::Init_Heap -- Initialize the aircraft type class heap. * 336 * * 337 * This will initialize the aircraft type class heap by pre-allocating all known aircraft * 338 * types. It should be called once and before the rules.ini file is processed. * 339 * * 340 * INPUT: none * 341 * * 342 * OUTPUT: none * 343 * * 344 * WARNINGS: none * 345 * * 346 * HISTORY: * 347 * 07/09/1996 JLB : Created. * 348 *=============================================================================================*/ 349 void AircraftTypeClass::Init_Heap(void) 350 { 351 /* 352 ** These aircraft type class objects must be allocated in the exact order that they 353 ** are specified in the AircraftSmen enumeration. This is necessary because the heap 354 ** allocation block index serves double duty as the type number index. 355 */ 356 new AircraftTypeClass(TransportHeli); 357 new AircraftTypeClass(BadgerPlane); 358 new AircraftTypeClass(U2Plane); 359 new AircraftTypeClass(MigPlane); 360 new AircraftTypeClass(YakPlane); 361 new AircraftTypeClass(AttackHeli); 362 new AircraftTypeClass(OrcaHeli); 363 } 364 365 366 /*********************************************************************************************** 367 * AircraftTypeClass::From_Name -- Converts an ASCII name into an aircraft type number. * 368 * * 369 * This routine is used to convert an ASCII representation of an aircraft into the * 370 * matching aircraft type number. This is used by the scenario INI reader code. * 371 * * 372 * INPUT: name -- Pointer to ASCII name to translate. * 373 * * 374 * OUTPUT: Returns the aircraft type number that matches the ASCII name provided. If no * 375 * match could be found, then AIRCRAFT_NONE is returned. * 376 * * 377 * WARNINGS: none * 378 * * 379 * HISTORY: * 380 * 07/26/1994 JLB : Created. * 381 *=============================================================================================*/ 382 AircraftType AircraftTypeClass::From_Name(char const * name) 383 { 384 if (name != NULL) { 385 for (int classid = AIRCRAFT_FIRST; classid < AIRCRAFT_COUNT; classid++) { 386 if (stricmp(As_Reference((AircraftType)classid).IniName, name) == 0) { 387 return(AircraftType)classid; 388 } 389 } 390 } 391 return(AIRCRAFT_NONE); 392 } 393 394 395 /*********************************************************************************************** 396 * AircraftTypeClass::One_Time -- Performs one time initialization of the aircraft type class. * 397 * * 398 * This routine is used to perform the onetime initialization of the aircraft type. This * 399 * includes primarily the shape and other graphic data loading. * 400 * * 401 * INPUT: none * 402 * * 403 * OUTPUT: none * 404 * * 405 * WARNINGS: This goes to disk and also must only be called ONCE. * 406 * * 407 * HISTORY: * 408 * 07/26/1994 JLB : Created. * 409 *=============================================================================================*/ 410 void AircraftTypeClass::One_Time(void) 411 { 412 for (int index = AIRCRAFT_FIRST; index < AIRCRAFT_COUNT; index++) { 413 char fullname[_MAX_FNAME+_MAX_EXT]; 414 AircraftTypeClass const & uclass = As_Reference((AircraftType)index); 415 416 /* 417 ** Fetch the supporting data files for the unit. 418 */ 419 char buffer[_MAX_FNAME]; 420 sprintf(buffer, "%sICON", uclass.Graphic_Name()); 421 _makepath(fullname, NULL, NULL, buffer, ".SHP"); 422 ((void const *&)uclass.CameoData) = MFCD::Retrieve(fullname); 423 424 /* 425 ** Generic shape for all houses load method. 426 */ 427 _makepath(fullname, NULL, NULL, uclass.Graphic_Name(), ".SHP"); 428 ((void const *&)uclass.ImageData) = MFCD::Retrieve(fullname); 429 } 430 431 LRotorData = MFCD::Retrieve("LROTOR.SHP"); 432 RRotorData = MFCD::Retrieve("RROTOR.SHP"); 433 } 434 435 436 /*********************************************************************************************** 437 * AircraftTypeClass::Create_One_Of -- Creates an aircraft object of the appropriate type. * 438 * * 439 * This routine is used to create an aircraft object that matches the aircraft type. It * 440 * serves as a shortcut to creating an object using the "new" operator and "if" checks. * 441 * * 442 * INPUT: house -- The house owner of the aircraft that is to be created. * 443 * * 444 * OUTPUT: Returns with a pointer to the aircraft created. If the aircraft could not be * 445 * created, then a NULL is returned. * 446 * * 447 * WARNINGS: none * 448 * * 449 * HISTORY: * 450 * 07/26/1994 JLB : Created. * 451 *=============================================================================================*/ 452 ObjectClass * AircraftTypeClass::Create_One_Of(HouseClass * house) const 453 { 454 return(new AircraftClass(Type, house->Class->House)); 455 } 456 457 458 #ifdef SCENARIO_EDITOR 459 /*********************************************************************************************** 460 * AircraftTypeClass::Prep_For_Add -- Prepares the scenario editor for adding an aircraft objec* 461 * * 462 * This routine is used by the scenario editor to prepare for the adding operation. It * 463 * builds a list of pointers to object types that can be added. * 464 * * 465 * INPUT: none * 466 * * 467 * OUTPUT: none * 468 * * 469 * WARNINGS: none * 470 * * 471 * HISTORY: * 472 * 07/26/1994 JLB : Created. * 473 *=============================================================================================*/ 474 void AircraftTypeClass::Prep_For_Add(void) 475 { 476 for (AircraftType index = AIRCRAFT_FIRST; index < AIRCRAFT_COUNT; index++) { 477 if (As_Reference(index).Get_Image_Data()) { 478 Map.Add_To_List(&As_Reference(index)); 479 } 480 } 481 } 482 483 484 /*********************************************************************************************** 485 * AircraftTypeClass::Display -- Displays a generic version of the aircraft type. * 486 * * 487 * This routine is used by the scenario editor to display a generic version of the object * 488 * type. This is displayed in the object selection dialog box. * 489 * * 490 * INPUT: x,y -- The coordinates to draw the aircraft at (centered). * 491 * * 492 * window -- The window to base the coordinates upon. * 493 * * 494 * house -- The owner of this generic aircraft. * 495 * * 496 * OUTPUT: none * 497 * * 498 * WARNINGS: none * 499 * * 500 * HISTORY: * 501 * 07/26/1994 JLB : Created. * 502 *=============================================================================================*/ 503 void AircraftTypeClass::Display(int x, int y, WindowNumberType window, HousesType ) const 504 { 505 int shape = 0; 506 void const * ptr = Get_Cameo_Data(); 507 if (ptr == NULL) { 508 ptr = Get_Image_Data(); 509 shape = 5; 510 } 511 CC_Draw_Shape(ptr, shape, x, y, window, SHAPE_CENTER|SHAPE_WIN_REL); 512 } 513 #endif 514 515 516 /*********************************************************************************************** 517 * AircraftTypeClass::Occupy_List -- Returns with occupation list for landed aircraft. * 518 * * 519 * This determines the occupation list for the aircraft (if it was landed). * 520 * * 521 * INPUT: placement -- Is this for placement legality checking only? The normal condition * 522 * is for marking occupation flags. * 523 * * 524 * OUTPUT: Returns with a pointer to a cell offset occupation list for the aircraft. * 525 * * 526 * WARNINGS: This occupation list is only valid if the aircraft is landed. * 527 * * 528 * HISTORY: * 529 * 07/26/1994 JLB : Created. * 530 *=============================================================================================*/ 531 short const * AircraftTypeClass::Occupy_List(bool) const 532 { 533 static short const _list[] = {0, REFRESH_EOL}; 534 return(_list); 535 } 536 537 538 /*********************************************************************************************** 539 * AircraftTypeClass::Overlap_List -- Determines the overlap list for a landed aircraft. * 540 * * 541 * This routine figures out the overlap list for the aircraft as if it were landed. * 542 * * 543 * INPUT: none * 544 * * 545 * OUTPUT: Returns with the cell offset overlap list for the aircraft. * 546 * * 547 * WARNINGS: This overlap list is only valid when the aircraft is landed. * 548 * * 549 * HISTORY: * 550 * 07/26/1994 JLB : Created. * 551 *=============================================================================================*/ 552 short const * AircraftTypeClass::Overlap_List(void) const 553 { 554 static short const _list[] = {-(MAP_CELL_W-1), -MAP_CELL_W, -(MAP_CELL_W+1), -1, 1, (MAP_CELL_W-1), MAP_CELL_W, (MAP_CELL_W+1), REFRESH_EOL}; 555 return(_list); 556 } 557 558 559 /*********************************************************************************************** 560 * AircraftTypeClass::Max_Pips -- Fetches the maximum number of pips allowed. * 561 * * 562 * Use this routine to retrieve the maximum pip count allowed for this aircraft. This is * 563 * the maximum number of passengers. * 564 * * 565 * INPUT: none * 566 * * 567 * OUTPUT: Returns with the maximum number of pips for this aircraft. * 568 * * 569 * WARNINGS: none * 570 * * 571 * HISTORY: * 572 * 06/26/1995 JLB : Created. * 573 *=============================================================================================*/ 574 int AircraftTypeClass::Max_Pips(void) const 575 { 576 if (PrimaryWeapon != NULL) { 577 // Camera weapon (ex. on the Spy plane) doesn't display any pips 578 if (!PrimaryWeapon->IsCamera) { 579 return(5); 580 } 581 } 582 return(Max_Passengers()); 583 } 584 585 586 /*********************************************************************************************** 587 * AircraftTypeClass::Create_And_Place -- Creates and places aircraft using normal game system * 588 * * 589 * This routine is used to create and place an aircraft through the normal game system. * 590 * Since creation of aircraft in this fashion is prohibited, this routine does nothing. * 591 * * 592 * INPUT: na * 593 * * 594 * OUTPUT: Always returns a failure code (false). * 595 * * 596 * WARNINGS: none * 597 * * 598 * HISTORY: * 599 * 08/07/1995 JLB : Created. * 600 *=============================================================================================*/ 601 bool AircraftTypeClass::Create_And_Place(CELL, HousesType) const 602 { 603 return(false); 604 } 605 606 607 /*********************************************************************************************** 608 * AircraftTypeClass::Dimensions -- Fetches the graphic dimensions of the aircraft type. * 609 * * 610 * This routine will fetch the pixel dimensions of this aircraft type. These dimensions * 611 * are used to control map refresh and select box rendering. * 612 * * 613 * INPUT: width -- Reference to variable that will be filled in with aircraft width. * 614 * * 615 * height -- Reference to variable that will be filled in with aircraft height. * 616 * * 617 * OUTPUT: none * 618 * * 619 * WARNINGS: none * 620 * * 621 * HISTORY: * 622 * 08/07/1995 JLB : Created. * 623 *=============================================================================================*/ 624 void AircraftTypeClass::Dimensions(int &width, int &height) const 625 { 626 if (Type == AIRCRAFT_BADGER) { 627 width = 56; 628 height = 56; 629 } else { 630 width = 21; 631 height = 20; 632 } 633 } 634 635 636 /*********************************************************************************************** 637 * AircraftTypeClass::As_Reference -- Given an aircraft type, find the matching type object. * 638 * * 639 * This routine is used to fetch a reference to the aircraft type class object that matches * 640 * the aircraft type specified. * 641 * * 642 * INPUT: aircraft -- The aircraft type to fetch a reference to the type class object of. * 643 * * 644 * OUTPUT: Returns with a reference to the type class object of this aircraft type. * 645 * * 646 * WARNINGS: Be sure that the aircraft type specified is legal. Illegal values will result * 647 * in undefined behavior. * 648 * * 649 * HISTORY: * 650 * 07/09/1996 JLB : Created. * 651 *=============================================================================================*/ 652 AircraftTypeClass & AircraftTypeClass::As_Reference(AircraftType aircraft) 653 { 654 return(*AircraftTypes.Ptr(aircraft)); 655 }