| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530 |
- //
- // Copyright 2020 Electronic Arts Inc.
- //
- // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
- // software: you can redistribute it and/or modify it under the terms of
- // the GNU General Public License as published by the Free Software Foundation,
- // either version 3 of the License, or (at your option) any later version.
- // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
- // in the hope that it will be useful, but with permitted additional restrictions
- // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
- // distributed with this program. You should have received a copy of the
- // GNU General Public License along with permitted additional restrictions
- // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
- /* $Header: /CounterStrike/IDATA.CPP 3 3/16/97 10:16p Joe_b $ */
- /***********************************************************************************************
- *** 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 ***
- ***********************************************************************************************
- * *
- * Project Name : Command & Conquer *
- * *
- * File Name : IDATA.CPP *
- * *
- * Programmer : Joe L. Bostic *
- * *
- * Start Date : August 15, 1994 *
- * *
- * Last Update : July 19, 1996 [JLB] *
- * *
- *---------------------------------------------------------------------------------------------*
- * Functions: *
- * InfantryTypeClass::As_Reference -- Fetches a reference to the infantry type specified. *
- * InfantryTypeClass::Create_And_Place -- Creates and places infantry object onto the map. *
- * InfantryTypeClass::Create_One_Of -- Creates an infantry object. *
- * InfantryTypeClass::Display -- Displays a generic infantry object. *
- * InfantryTypeClass::From_Name -- Converts an ASCII name into an infantry type number. *
- * InfantryTypeClass::Full_Name -- Fetches the full name text number. *
- * InfantryTypeClass::Get_Cameo_Data -- Fetches the small cameo shape for sidebar strip. *
- * InfantryTypeClass::InfantryTypeClass -- Constructor for infantry type class objects. *
- * InfantryTypeClass::Init_Heap -- Initialize the infantry type class heap. *
- * InfantryTypeClass::Occupy_List -- Returns with default infantry occupation list. *
- * InfantryTypeClass::One_Time -- Performs any one time processing for infantry system. *
- * InfantryTypeClass::Prep_For_Add -- Prepares the scenario editor for adding of infantry obj*
- * InfantryTypeClass::Read_INI -- Fetches infantry override values from the INI database. *
- * InfantryTypeClass::operator delete -- Frees an infantry type class object. *
- * InfantryTypeClass::operator new -- Allocate an infanty type class object. *
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
- #include "function.h"
- #include "type.h"
- static DoInfoStruct DogDoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {0, 1, 1}, // DO_STAND_GUARD
- {0, 1, 1}, // DO_PRONE // NA
- {8, 6, 6}, // DO_WALK
- {104, 14,14}, // DO_FIRE_WEAPON
- {0, 0, 0}, // DO_LIE_DOWN // NA
- {56, 6, 6}, // DO_CRAWL
- {0, 0, 0}, // DO_GET_UP
- {104, 14,14}, // DO_FIRE_PRONE
- {216, 18,0}, // DO_IDLE1
- {216, 18,0}, // DO_IDLE2
- {235, 7, 0}, // DO_GUN_DEATH
- {242, 9, 0}, // DO_EXPLOSION_DEATH
- {242, 9, 0}, // DO_EXPLOSION2_DEATH
- {242, 9, 0}, // DO_GRENADE_DEATH
- {251, 14,0}, // DO_FIRE_DEATH
- {0, 1, 0}, // DO_GESTURE1
- {0, 1, 0}, // DO_SALUTE1
- {0, 1, 0}, // DO_GESTURE2
- {0, 1, 0}, // DO_SALUTE2
- {106, 12,14}, // DO_DOG_MAUL
- };
- //
- // For the virtual do controls, we are using the TD infantry asset animation frame numbers, take out the -94 frame offsets that were added in RA
- //
- static DoInfoStruct E1DoControlsVirtual[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {8, 1, 1}, // DO_STAND_GUARD
- {192, 1, 8}, // DO_PRONE
- {16, 6, 6}, // DO_WALK
- {64, 8, 8}, // DO_FIRE_WEAPON
- {128, 2, 2}, // DO_LIE_DOWN
- {144, 4, 4}, // DO_CRAWL
- {176, 2, 2}, // DO_GET_UP
- {192, 6, 8}, // DO_FIRE_PRONE
- {256, 16,0}, // DO_IDLE1
- {272, 16,0}, // DO_IDLE2
- {382, 8, 0}, // DO_GUN_DEATH
- {398, 8, 0}, // DO_EXPLOSION_DEATH
- {398, 8, 0}, // DO_EXPLOSION2_DEATH
- {406, 12,0}, // DO_GRENADE_DEATH
- {418, 18,0}, // DO_FIRE_DEATH
- {436, 3, 3}, // DO_GESTURE1
- {460, 3, 3}, // DO_SALUTE1
- {484, 3, 3}, // DO_GESTURE2
- {508, 3, 3}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct E2DoControlsVirtual[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {8, 1, 1}, // DO_STAND_GUARD
- {288, 1, 12}, // DO_PRONE
- {16, 6, 6}, // DO_WALK
- {64, 20,20}, // DO_FIRE_WEAPON
- {224, 2, 2}, // DO_LIE_DOWN
- {240, 4, 4}, // DO_CRAWL
- {272, 2, 2}, // DO_GET_UP
- {288, 8, 12}, // DO_FIRE_PRONE
- {384, 16,0}, // DO_IDLE1
- {400, 16,0}, // DO_IDLE2
- {510, 8, 0}, // DO_GUN_DEATH
- {526, 8, 0}, // DO_EXPLOSION_DEATH
- {526, 8, 0}, // DO_EXPLOSION2_DEATH
- {534, 12,0}, // DO_GRENADE_DEATH
- {546, 18,0}, // DO_FIRE_DEATH
- {564, 3, 3}, // DO_GESTURE1
- {588, 3, 3}, // DO_SALUTE1
- {612, 3, 3}, // DO_GESTURE2
- {636, 3, 3}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct E3DoControlsVirtual[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {8, 1, 1}, // DO_STAND_GUARD
- {192, 1,10}, // DO_PRONE
- {16, 6, 6}, // DO_WALK
- {64, 8, 8}, // DO_FIRE_WEAPON
- {128, 2, 2}, // DO_LIE_DOWN
- {144, 4, 4}, // DO_CRAWL
- {176, 2, 2}, // DO_GET_UP
- {192, 10,10}, // DO_FIRE_PRONE
- {272, 16,0}, // DO_IDLE1
- {288, 16,0}, // DO_IDLE2
- {398, 8, 0}, // DO_GUN_DEATH
- {414, 8, 0}, // DO_EXPLOSION_DEATH
- {414, 8, 0}, // DO_EXPLOSION2_DEATH
- {422, 12,0}, // DO_GRENADE_DEATH
- {434, 18,0}, // DO_FIRE_DEATH
- {452, 3, 3}, // DO_GESTURE1
- {476, 3, 3}, // DO_SALUTE1
- {500, 3, 3}, // DO_GESTURE2
- {524, 3, 3}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct E4DoControlsVirtual[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {8, 1, 1}, // DO_STAND_GUARD
- {256, 1,16}, // DO_PRONE
- {16, 6, 6}, // DO_WALK
- {64, 16,16}, // DO_FIRE_WEAPON
- {192, 2, 2}, // DO_LIE_DOWN
- {208, 4, 4}, // DO_CRAWL
- {240, 2, 2}, // DO_GET_UP
- {256, 16,16}, // DO_FIRE_PRONE
- {384, 16,0}, // DO_IDLE1
- {400, 16,0}, // DO_IDLE2
- {510, 8, 0}, // DO_GUN_DEATH
- {526, 8, 0}, // DO_EXPLOSION_DEATH
- {526, 8, 0}, // DO_EXPLOSION2_DEATH
- {534, 12,0}, // DO_GRENADE_DEATH
- {546, 18,0}, // DO_FIRE_DEATH
- {564, 3, 3}, // DO_GESTURE1
- {588, 3, 3}, // DO_SALUTE1
- {612, 3, 3}, // DO_GESTURE2
- {636, 3, 3}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct E1DoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {8, 1, 1}, // DO_STAND_GUARD
- {192, 1, 8}, // DO_PRONE
- {16, 6, 6}, // DO_WALK
- {64, 8, 8}, // DO_FIRE_WEAPON
- {128, 2, 2}, // DO_LIE_DOWN
- {144, 4, 4}, // DO_CRAWL
- {176, 2, 2}, // DO_GET_UP
- {192, 6, 8}, // DO_FIRE_PRONE
- {256, 16,0}, // DO_IDLE1
- {272, 16,0}, // DO_IDLE2
- {382-94, 8, 0}, // DO_GUN_DEATH
- {398-94, 8, 0}, // DO_EXPLOSION_DEATH
- {398-94, 8, 0}, // DO_EXPLOSION2_DEATH
- {406-94, 12,0}, // DO_GRENADE_DEATH
- {418-94, 18,0}, // DO_FIRE_DEATH
- {436-94, 3, 3}, // DO_GESTURE1
- {460-94, 3, 3}, // DO_SALUTE1
- {484-94, 3, 3}, // DO_GESTURE2
- {508-94, 3, 3}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct E2DoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {8, 1, 1}, // DO_STAND_GUARD
- {288, 1, 12}, // DO_PRONE
- {16, 6, 6}, // DO_WALK
- {64, 20,20}, // DO_FIRE_WEAPON
- {224, 2, 2}, // DO_LIE_DOWN
- {240, 4, 4}, // DO_CRAWL
- {272, 2, 2}, // DO_GET_UP
- {288, 8, 12}, // DO_FIRE_PRONE
- {384, 16,0}, // DO_IDLE1
- {400, 16,0}, // DO_IDLE2
- {510-94, 8, 0}, // DO_GUN_DEATH
- {526-94, 8, 0}, // DO_EXPLOSION_DEATH
- {526-94, 8, 0}, // DO_EXPLOSION2_DEATH
- {534-94, 12,0}, // DO_GRENADE_DEATH
- {546-94, 18,0}, // DO_FIRE_DEATH
- {564-94, 3, 3}, // DO_GESTURE1
- {588-94, 3, 3}, // DO_SALUTE1
- {612-94, 3, 3}, // DO_GESTURE2
- {636-94, 3, 3}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct E3DoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {8, 1, 1}, // DO_STAND_GUARD
- {192, 1,10}, // DO_PRONE
- {16, 6, 6}, // DO_WALK
- {64, 8, 8}, // DO_FIRE_WEAPON
- {128, 2, 2}, // DO_LIE_DOWN
- {144, 4, 4}, // DO_CRAWL
- {176, 2, 2}, // DO_GET_UP
- {192, 10,10}, // DO_FIRE_PRONE
- {272, 16,0}, // DO_IDLE1
- {288, 16,0}, // DO_IDLE2
- {398-94, 8, 0}, // DO_GUN_DEATH
- {414-94, 8, 0}, // DO_EXPLOSION_DEATH
- {414-94, 8, 0}, // DO_EXPLOSION2_DEATH
- {422-94, 12,0}, // DO_GRENADE_DEATH
- {434-94, 18,0}, // DO_FIRE_DEATH
- {452-94, 3, 3}, // DO_GESTURE1
- {476-94, 3, 3}, // DO_SALUTE1
- {500-94, 3, 3}, // DO_GESTURE2
- {524-94, 3, 3}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct E4DoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {8, 1, 1}, // DO_STAND_GUARD
- {256, 1,16}, // DO_PRONE
- {16, 6, 6}, // DO_WALK
- {64, 16,16}, // DO_FIRE_WEAPON
- {192, 2, 2}, // DO_LIE_DOWN
- {208, 4, 4}, // DO_CRAWL
- {240, 2, 2}, // DO_GET_UP
- {256, 16,16}, // DO_FIRE_PRONE
- {384, 16,0}, // DO_IDLE1
- {400, 16,0}, // DO_IDLE2
- {510-94, 8, 0}, // DO_GUN_DEATH
- {526-94, 8, 0}, // DO_EXPLOSION_DEATH
- {526-94, 8, 0}, // DO_EXPLOSION2_DEATH
- {534-94, 12,0}, // DO_GRENADE_DEATH
- {546-94, 18,0}, // DO_FIRE_DEATH
- {564-94, 3, 3}, // DO_GESTURE1
- {588-94, 3, 3}, // DO_SALUTE1
- {612-94, 3, 3}, // DO_GESTURE2
- {636-94, 3, 3}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct E6DoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {8, 1, 1}, // DO_STAND_GUARD
- {82, 1, 4}, // DO_PRONE
- {16, 6, 6}, // DO_WALK
- {0, 0, 0}, // DO_FIRE_WEAPON
- {67, 2, 2}, // DO_LIE_DOWN
- {82, 4, 4}, // DO_CRAWL
- {114, 2, 2}, // DO_GET_UP
- {0, 0, 0}, // DO_FIRE_PRONE
- {130, 16,0}, // DO_IDLE1
- {130, 16,0}, // DO_IDLE2
- {146, 8, 0}, // DO_GUN_DEATH
- {154, 8, 0}, // DO_EXPLOSION_DEATH
- {162, 8, 0}, // DO_EXPLOSION2_DEATH
- {170, 12,0}, // DO_GRENADE_DEATH
- {182, 18,0}, // DO_FIRE_DEATH
- {200, 3, 3}, // DO_GESTURE1
- {224, 3, 3}, // DO_SALUTE1
- {200, 3, 3}, // DO_GESTURE2
- {224, 3, 3}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct E7DoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {0, 1, 1}, // DO_STAND_GUARD
- {128, 1, 4}, // DO_PRONE
- {8, 6, 6}, // DO_WALK
- {56, 7, 7}, // DO_FIRE_WEAPON
- {113, 2, 2}, // DO_LIE_DOWN
- {128, 4, 4}, // DO_CRAWL
- {161, 2, 2}, // DO_GET_UP
- {176, 7, 7}, // DO_FIRE_PRONE
- {232, 17,0}, // DO_IDLE1
- {249, 13,0}, // DO_IDLE2
- {262, 8, 0}, // DO_GUN_DEATH
- {270, 8, 0}, // DO_EXPLOSION_DEATH
- {278, 8, 0}, // DO_EXPLOSION2_DEATH
- {286, 12,0}, // DO_GRENADE_DEATH
- {298, 18,0}, // DO_FIRE_DEATH
- {0, 1, 0}, // DO_GESTURE1
- {0, 1, 0}, // DO_SALUTE1
- {0, 1, 0}, // DO_GESTURE2
- {0, 1, 0}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- //Spy
- static DoInfoStruct SpyDoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {8, 1, 1}, // DO_STAND_GUARD
- {144, 1, 4}, // DO_PRONE
- {16, 6, 6}, // DO_WALK
- {64, 8, 8}, // DO_FIRE_WEAPON
- {128, 2, 2}, // DO_LIE_DOWN
- {144, 4, 4}, // DO_CRAWL
- {176, 2, 2}, // DO_GET_UP
- {192, 8, 8}, // DO_FIRE_PRONE
- {256, 14,0}, // DO_IDLE1
- {270, 18,0}, // DO_IDLE2
- {288, 8, 0}, // DO_GUN_DEATH
- {296, 8, 0}, // DO_EXPLOSION_DEATH
- {304, 8, 0}, // DO_EXPLOSION2_DEATH
- {312, 12,0}, // DO_GRENADE_DEATH
- {324, 18,0}, // DO_FIRE_DEATH
- {0, 1, 0}, // DO_GESTURE1
- {0, 1, 0}, // DO_SALUTE1
- {0, 1, 0}, // DO_GESTURE2
- {0, 1, 0}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct E9DoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {8, 1, 1}, // DO_STAND_GUARD
- {72, 1, 4}, // DO_PRONE
- {8, 6, 6}, // DO_WALK
- {0, 0, 0}, // DO_FIRE_WEAPON
- {56, 2, 2}, // DO_LIE_DOWN
- {72, 4, 4}, // DO_CRAWL
- {108, 2, 2}, // DO_GET_UP
- {0, 0, 0}, // DO_FIRE_PRONE
- {120, 19,0}, // DO_IDLE1
- {120, 19,0}, // DO_IDLE2
- {139, 8, 0}, // DO_GUN_DEATH
- {147, 8, 0}, // DO_EXPLOSION_DEATH
- {155, 8, 0}, // DO_EXPLOSION2_DEATH
- {163, 12,0}, // DO_GRENADE_DEATH
- {175, 18,0}, // DO_FIRE_DEATH
- {0, 1, 0}, // DO_GESTURE1
- {0, 1, 0}, // DO_SALUTE1
- {0, 1, 0}, // DO_GESTURE2
- {0, 1, 0}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct MedicDoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {0, 1, 1}, // DO_STAND_GUARD
- {130, 1, 4}, // DO_PRONE
- {8, 6, 6}, // DO_WALK
- {56, 28,0}, // DO_FIRE_WEAPON
- {114, 2, 2}, // DO_LIE_DOWN
- {130, 4, 4}, // DO_CRAWL
- {162, 2, 2}, // DO_GET_UP
- {56, 28,0}, // DO_FIRE_PRONE
- {178, 15,0}, // DO_IDLE1
- {178, 15,0}, // DO_IDLE2
- {193, 8, 0}, // DO_GUN_DEATH
- {210, 8, 0}, // DO_EXPLOSION_DEATH
- {202, 8, 0}, // DO_EXPLOSION2_DEATH
- {217, 12,0}, // DO_GRENADE_DEATH
- {229, 18,0}, // DO_FIRE_DEATH
- {0, 1, 0}, // DO_GESTURE1
- {0, 1, 0}, // DO_SALUTE1
- {0, 1, 0}, // DO_GESTURE2
- {0, 1, 0}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct GeneralDoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {0, 1, 1}, // DO_STAND_GUARD
- {104, 1, 4}, // DO_PRONE
- {8, 6, 6}, // DO_WALK
- {56, 4, 4}, // DO_FIRE_WEAPON
- {88, 2, 2}, // DO_LIE_DOWN
- {104, 4, 4}, // DO_CRAWL
- {136, 2, 2}, // DO_GET_UP
- {152, 4, 4}, // DO_FIRE_PRONE
- {184, 26,0}, // DO_IDLE1
- {184, 26,0}, // DO_IDLE2
- {210, 8, 0}, // DO_GUN_DEATH
- {226, 8, 0}, // DO_EXPLOSION_DEATH
- {218, 8, 0}, // DO_EXPLOSION2_DEATH
- {234, 12,0}, // DO_GRENADE_DEATH
- {246, 18,0}, // DO_FIRE_DEATH
- {0, 1, 0}, // DO_GESTURE1
- {0, 1, 0}, // DO_SALUTE1
- {0, 1, 0}, // DO_GESTURE2
- {0, 1, 0}, // DO_SALUTE2
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct CivilianDoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {0, 1, 1}, // DO_STAND_GUARD
- {0, 1, 1}, // DO_PRONE // N/A
- {56, 6, 6}, // DO_WALK
- {205-85, 4, 4}, // DO_FIRE_WEAPON
- {0, 1, 1}, // DO_LIE_DOWN // N/A
- {8, 6, 6}, // DO_CRAWL
- {0, 1, 1}, // DO_GET_UP // N/A
- {205-85, 4, 4}, // DO_FIRE_PRONE
- {189-85, 10,0}, // DO_IDLE1
- {199-85, 6, 0}, // DO_IDLE2
- {152, 8, 0}, // DO_GUN_DEATH
- {160, 8, 0}, // DO_EXPLOSION_DEATH
- {160, 8, 0}, // DO_EXPLOSION2_DEATH
- {168, 12,0}, // DO_GRENADE_DEATH
- {180, 18,0}, // DO_FIRE_DEATH
- {0, 1, 0}, // DO_GESTURE1 // N/A
- {0, 1, 0}, // DO_SALUTE1 // N/A
- {0, 1, 0}, // DO_GESTURE2 // N/A
- {0, 1, 0}, // DO_SALUTE2 // N/A
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct CivilianDoControlsVirtual[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {0, 1, 1}, // DO_STAND_GUARD
- {0, 1, 1}, // DO_PRONE // N/A
- {56, 6, 6}, // DO_WALK
- {205, 4, 4}, // DO_FIRE_WEAPON
- {0, 1, 1}, // DO_LIE_DOWN // N/A
- {8, 6, 6}, // DO_CRAWL
- {0, 1, 1}, // DO_GET_UP // N/A
- {205, 4, 4}, // DO_FIRE_PRONE
- {189, 10,0}, // DO_IDLE1
- {199, 6, 0}, // DO_IDLE2
- {329, 8, 0}, // DO_GUN_DEATH
- {337, 8, 0}, // DO_EXPLOSION_DEATH
- {337, 8, 0}, // DO_EXPLOSION2_DEATH
- {345, 12,0}, // DO_GRENADE_DEATH
- {357, 18,0}, // DO_FIRE_DEATH
- {0, 1, 0}, // DO_GESTURE1 // N/A
- {0, 1, 0}, // DO_SALUTE1 // N/A
- {0, 1, 0}, // DO_GESTURE2 // N/A
- {0, 1, 0}, // DO_SALUTE2 // N/A
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- static DoInfoStruct EinsteinDoControls[DO_COUNT] = {
- {0, 1, 1}, // DO_STAND_READY
- {0, 1, 1}, // DO_STAND_GUARD
- {0, 1, 1}, // DO_PRONE // N/A
- {56, 6, 6}, // DO_WALK
- {205-92, 4, 4}, // DO_FIRE_WEAPON
- {0, 1, 1}, // DO_LIE_DOWN // N/A
- {8, 6, 6}, // DO_CRAWL
- {0, 1, 1}, // DO_GET_UP // N/A
- {0, 0, 0}, // DO_FIRE_PRONE
- {104, 16,0}, // DO_IDLE1
- {104, 16,0}, // DO_IDLE2
- {212-92, 8, 0}, // DO_GUN_DEATH
- {220-92, 8, 0}, // DO_EXPLOSION_DEATH
- {228-92, 12,0}, // DO_EXPLOSION2_DEATH
- {228-92, 12,0}, // DO_GRENADE_DEATH
- {240-92, 17,0}, // DO_FIRE_DEATH
- {0, 1, 0}, // DO_GESTURE1 // N/A
- {0, 1, 0}, // DO_SALUTE1 // N/A
- {0, 1, 0}, // DO_GESTURE2 // N/A
- {0, 1, 0}, // DO_SALUTE2 // N/A
- {0, 0, 0}, // DO_DOG_MAUL // N/A
- };
- // Attack dogs
- static InfantryTypeClass const Dog(
- INFANTRY_DOG, // Infantry type number.
- TXT_GUARD_DOG, // Translate name number for infantry type.
- "DOG", // INI name for infantry.
- 0x0015, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_FULL, // Transport pip shape/color to use.
- DogDoControls,
- DogDoControls,
- 1, // Frame of projectile launch.
- 1, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- // Minigunners
- static InfantryTypeClass const E1(
- INFANTRY_E1, // Infantry type number.
- TXT_E1, // Translate name number for infantry type.
- "E1", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- true, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_FULL, // Transport pip shape/color to use.
- E1DoControls,
- E1DoControlsVirtual,
- 2, // Frame of projectile launch.
- 2, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- // Grenadiers
- static InfantryTypeClass const E2(
- INFANTRY_E2, // Infantry type number.
- TXT_E2, // Translate name number for infantry type.
- "E2", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- true, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_FULL, // Transport pip shape/color to use.
- E2DoControls,
- E2DoControlsVirtual,
- 14, // Frame of projectile launch.
- 6, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- // Bazooka
- static InfantryTypeClass const E3(
- INFANTRY_E3, // Infantry type number.
- TXT_E3, // Translate name number for infantry type.
- "E3", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- true, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_FULL, // Transport pip shape/color to use.
- E3DoControls,
- E3DoControlsVirtual,
- 3, // Frame of projectile launch.
- 3, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- // Flamethrower
- static InfantryTypeClass const E4(
- INFANTRY_E4, // Infantry type number.
- TXT_E4, // Translate name number for infantry type.
- "E4", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- true, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_FULL, // Transport pip shape/color to use.
- E4DoControls,
- E4DoControlsVirtual,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- // Renovator
- static InfantryTypeClass const E6(
- INFANTRY_RENOVATOR, // Infantry type number.
- TXT_E6, // Translate name number for infantry type.
- "E6", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_ENGINEER, // Transport pip shape/color to use.
- E6DoControls,
- E6DoControls,
- 3, // Frame of projectile launch.
- 3, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- // Spy
- static InfantryTypeClass const E8(
- INFANTRY_SPY, // Infantry type number.
- TXT_E8, // Translate name number for infantry type.
- "SPY", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_ENGINEER, // Transport pip shape/color to use.
- SpyDoControls,
- SpyDoControls,
- 3, // Frame of projectile launch.
- 3, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- // Thief
- static InfantryTypeClass const E9(
- INFANTRY_THIEF, // Infantry type number.
- TXT_THIEF, // Translate name number for infantry type.
- "THF", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_ENGINEER, // Transport pip shape/color to use.
- E9DoControls,
- E9DoControls,
- 3, // Frame of projectile launch.
- 3, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- // Tanya
- static InfantryTypeClass const E7(
- INFANTRY_TANYA, // Infantry type number.
- TXT_E7, // Translate name number for infantry type.
- "E7", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- true, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_COMMANDO, // Transport pip shape/color to use.
- E7DoControls,
- E7DoControls,
- 2, // Frame of projectile launch.
- 2, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- static InfantryTypeClass const Medic(
- INFANTRY_MEDIC, // Infantry type number.
- TXT_MEDIC, // Translate name number for infantry type.
- "MEDI", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- true, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_ENGINEER, // Transport pip shape/color to use.
- MedicDoControls,
- MedicDoControls,
- 25, // Frame of projectile launch.
- 25, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- static InfantryTypeClass const General(
- INFANTRY_GENERAL, // Infantry type number.
- TXT_GENERAL, // Translate name number for infantry type.
- "GNRL", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- true, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_ENGINEER, // Transport pip shape/color to use.
- GeneralDoControls,
- GeneralDoControls,
- 2, // Frame of projectile launch.
- 2, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- // Civilians
- static InfantryTypeClass const C1(
- INFANTRY_C1, // Infantry type number.
- TXT_C1, // Translate name number for infantry type.
- "C1", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- false, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_CIVILIAN, // Transport pip shape/color to use.
- CivilianDoControls,
- CivilianDoControlsVirtual,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- static InfantryTypeClass const C2(
- INFANTRY_C2, // Infantry type number.
- TXT_C2, // Translate name number for infantry type.
- "C2", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- true, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_CIVILIAN, // Transport pip shape/color to use.
- CivilianDoControls,
- CivilianDoControlsVirtual,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- RemapCiv2 // pointer to override remap table
- );
- static InfantryTypeClass const C3(
- INFANTRY_C3, // Infantry type number.
- TXT_C3, // Translate name number for infantry type.
- "C3", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- true, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- false, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_CIVILIAN, // Transport pip shape/color to use.
- CivilianDoControls,
- CivilianDoControlsVirtual,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- static InfantryTypeClass const C4(
- INFANTRY_C4, // Infantry type number.
- TXT_C4, // Translate name number for infantry type.
- "C4", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- true, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- true, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_CIVILIAN, // Transport pip shape/color to use.
- CivilianDoControls,
- CivilianDoControlsVirtual,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- RemapCiv4 // pointer to override remap table
- );
- static InfantryTypeClass const C5(
- INFANTRY_C5, // Infantry type number.
- TXT_C5, // Translate name number for infantry type.
- "C5", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- true, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_CIVILIAN, // Transport pip shape/color to use.
- CivilianDoControls,
- CivilianDoControlsVirtual,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- RemapCiv5 // pointer to override remap table
- );
- static InfantryTypeClass const C6(
- INFANTRY_C6, // Infantry type number.
- TXT_C6, // Translate name number for infantry type.
- "C6", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- true, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_CIVILIAN, // Transport pip shape/color to use.
- CivilianDoControls,
- CivilianDoControlsVirtual,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- RemapCiv6 // pointer to override remap table
- );
- static InfantryTypeClass const C7(
- INFANTRY_C7, // Infantry type number.
- TXT_C7, // Translate name number for infantry type.
- "C7", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- true, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_CIVILIAN, // Transport pip shape/color to use.
- CivilianDoControls,
- CivilianDoControlsVirtual,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- RemapCiv7 // pointer to override remap table
- );
- static InfantryTypeClass const C8(
- INFANTRY_C8, // Infantry type number.
- TXT_C8, // Translate name number for infantry type.
- "C8", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- true, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_CIVILIAN, // Transport pip shape/color to use.
- CivilianDoControls,
- CivilianDoControlsVirtual,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- RemapCiv8 // pointer to override remap table
- );
- static InfantryTypeClass const C9(
- INFANTRY_C9, // Infantry type number.
- TXT_C9, // Translate name number for infantry type.
- "C9", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- true, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_CIVILIAN, // Transport pip shape/color to use.
- CivilianDoControls,
- CivilianDoControlsVirtual,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- RemapCiv9 // pointer to override remap table
- );
- // Nikoomba
- static InfantryTypeClass const C10(
- INFANTRY_C10, // Infantry type number.
- TXT_C10, // Translate name number for infantry type.
- "C10", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- true, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_ENGINEER, // Transport pip shape/color to use.
- CivilianDoControls,
- CivilianDoControlsVirtual,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- RemapCiv10 // pointer to override remap table
- );
- static InfantryTypeClass const Einstein(
- INFANTRY_EINSTEIN, // Infantry type number.
- TXT_EINSTEIN, // Translate name number for infantry type.
- "EINSTEIN", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- false, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_ENGINEER, // Transport pip shape/color to use.
- EinsteinDoControls,
- EinsteinDoControls,
- 0, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- static InfantryTypeClass const Delphi(
- INFANTRY_DELPHI, // Infantry type number.
- TXT_DELPHI, // Translate name number for infantry type.
- "DELPHI", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- false, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_ENGINEER, // Transport pip shape/color to use.
- CivilianDoControls,
- CivilianDoControlsVirtual,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- static InfantryTypeClass const DrChan(
- INFANTRY_CHAN, // Infantry type number.
- TXT_CHAN, // Translate name number for infantry type.
- "CHAN", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- false, // Has crawling animation frames?
- true, // Is this a civilian?
- false, // Does this unit use the override remap table?
- true, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_ENGINEER, // Transport pip shape/color to use.
- EinsteinDoControls,
- EinsteinDoControls,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- #ifdef FIXIT_CSII // checked - ajw 9/28/98
- // Shock Trooper
- static InfantryTypeClass const ShockTrooper(
- INFANTRY_SHOCK, // Infantry type number.
- TXT_SHOCKTROOPER, // Translate name number for infantry type.
- "SHOK", // INI name for infantry.
- -0x0010, // Vertical offset.
- 0x0038, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- true, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_FULL, // Transport pip shape/color to use.
- E4DoControls,
- E4DoControls,
- 2, // Frame of projectile launch.
- 0, // Frame of projectile launch while prone.
- 0, // pointer to override remap table
- 0x0018 // Horizontal offset.
- );
- static InfantryTypeClass const Mechanic(
- INFANTRY_MECHANIC, // Infantry type number.
- TXT_MECHANIC, // Translate name number for infantry type.
- "MECH", // INI name for infantry.
- 0x0035, // Vertical offset.
- 0x0010, // Primary weapon offset along turret centerline.
- false, // Is this a female type?
- true, // Has crawling animation frames?
- false, // Is this a civilian?
- false, // Does this unit use the override remap table?
- false, // Always use the given name for the infantry?
- false, // Theater specific graphic image?
- PIP_ENGINEER, // Transport pip shape/color to use.
- MedicDoControls,
- MedicDoControls,
- 25, // Frame of projectile launch.
- 25, // Frame of projectile launch while prone.
- 0 // pointer to override remap table
- );
- #endif
- /***********************************************************************************************
- * InfantryTypeClass::InfantryTypeClass -- Constructor for infantry type class objects. *
- * *
- * This routine will construct the infantry type objects. It is use to create the static *
- * infantry types that are used to give each of the infantry objects their characteristics. *
- * *
- * INPUT: see below... *
- * *
- * OUTPUT: none *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 09/24/1994 JLB : Created. *
- * 02/16/1996 JLB : Greatly simplified. *
- *=============================================================================================*/
- InfantryTypeClass::InfantryTypeClass (
- InfantryType type,
- int name,
- char const * ininame,
- int verticaloffset,
- int primaryoffset,
- bool is_female,
- bool is_crawling,
- bool is_civilian,
- bool is_remap_override,
- bool is_nominal,
- bool is_theater,
- PipEnum pip,
- DoInfoStruct const * control,
- DoInfoStruct const * virtual_control,
- int firelaunch,
- int pronelaunch,
- unsigned char const * override_remap,
- int horizontaloffset)
- : TechnoTypeClass(RTTI_INFANTRYTYPE,
- int(type),
- name,
- ininame,
- REMAP_NORMAL,
- verticaloffset,
- primaryoffset,
- 0x0000,
- 0x0000,
- 0x0000,
- is_nominal,
- true,
- true,
- true,
- false,
- false,
- is_theater,
- false,
- true,
- true,
- 8,
- SPEED_FOOT,
- horizontaloffset),
- IsFemale(is_female),
- IsCrawling(is_crawling),
- IsCapture(false),
- IsFraidyCat(false),
- IsCivilian(is_civilian),
- IsBomber(false),
- IsDog(false),
- IsRemapOverride(is_remap_override),
- Type(type),
- Pip(pip),
- DoControls(control),
- DoControlsVirtual(virtual_control),
- FireLaunch(firelaunch),
- ProneLaunch(pronelaunch),
- OverrideRemap(override_remap)
- {
- /*
- ** Forced infantry overrides from the default.
- */
- IsCrushable = true;
- IsScanner = true;
- IsRepairable = false;
- IsCrew = false;
- Speed = SPEED_FOOT;
- }
- /***********************************************************************************************
- * InfantryTypeClass::operator new -- Allocate an infanty type class object. *
- * *
- * This will allocate an infantry type class object from the special memory pool of that *
- * purpose. *
- * *
- * INPUT: none *
- * *
- * OUTPUT: Returns with a pointer to the infantry type class object allocated. If there was *
- * insufficient memory to fulfill the request, then NULL is returned. *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 07/11/1996 JLB : Created. *
- *=============================================================================================*/
- void * InfantryTypeClass::operator new(size_t)
- {
- return(InfantryTypes.Alloc());
- }
- /***********************************************************************************************
- * InfantryTypeClass::operator delete -- Frees an infantry type class object. *
- * *
- * This will return a previously allocated infantry type class object back to the memory *
- * pool from whence it came. *
- * *
- * INPUT: pointer -- The pointer to the infantry type class object to free. *
- * *
- * OUTPUT: none *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 07/11/1996 JLB : Created. *
- *=============================================================================================*/
- void InfantryTypeClass::operator delete(void * pointer)
- {
- InfantryTypes.Free((InfantryTypeClass *)pointer);
- }
- /***********************************************************************************************
- * InfantryTypeClass::Init_Heap -- Initialize the infantry type class heap. *
- * *
- * This will pre-allocate all known infantry types. *
- * *
- * INPUT: none *
- * *
- * OUTPUT: none *
- * *
- * WARNINGS: Call this routine once and before the rules.ini file is processed. *
- * *
- * HISTORY: *
- * 07/11/1996 JLB : Created. *
- *=============================================================================================*/
- void InfantryTypeClass::Init_Heap(void)
- {
- /*
- ** These infantry type class objects must be allocated in the exact order that they
- ** are specified in the InfantryType enumeration. This is necessary because the heap
- ** allocation block index serves double duty as the type number index.
- */
- new InfantryTypeClass(E1);
- new InfantryTypeClass(E2);
- new InfantryTypeClass(E3);
- new InfantryTypeClass(E4);
- new InfantryTypeClass(E6);
- new InfantryTypeClass(E7);
- new InfantryTypeClass(E8);
- new InfantryTypeClass(E9);
- new InfantryTypeClass(Medic);
- new InfantryTypeClass(General);
- new InfantryTypeClass(Dog);
- new InfantryTypeClass(C1);
- new InfantryTypeClass(C2);
- new InfantryTypeClass(C3);
- new InfantryTypeClass(C4);
- new InfantryTypeClass(C5);
- new InfantryTypeClass(C6);
- new InfantryTypeClass(C7);
- new InfantryTypeClass(C8);
- new InfantryTypeClass(C9);
- new InfantryTypeClass(C10);
- new InfantryTypeClass(Einstein);
- new InfantryTypeClass(Delphi);
- new InfantryTypeClass(DrChan);
- #ifdef FIXIT_CSII // checked - ajw 9/28/98
- new InfantryTypeClass(ShockTrooper);
- new InfantryTypeClass(Mechanic);
- #endif
- }
- /***********************************************************************************************
- * InfantryTypeClass::Create_One_Of -- Creates an infantry object. *
- * *
- * This creates an infantry object, but does not attempt to place it on the map. It is *
- * typically used by the scenario editor when an object is needed, but the location has *
- * not yet been specified for where it should appear on the map. *
- * *
- * INPUT: house -- The owner of the infantry object. *
- * *
- * OUTPUT: Returns with a pointer to the created infantry object. If an object could not be *
- * created, then NULL is returned. *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 09/24/1994 JLB : Created. *
- *=============================================================================================*/
- ObjectClass * InfantryTypeClass::Create_One_Of(HouseClass * house) const
- {
- return(new InfantryClass(Type, house->Class->House));
- }
- /***********************************************************************************************
- * InfantryTypeClass::Create_And_Place -- Creates and places infantry object onto the map. *
- * *
- * This routine is used by the scenario editor to create and place an infantry object onto *
- * the map at the location specified. *
- * *
- * INPUT: cell -- The cell location to place the infantry object at. *
- * *
- * house -- The owner of the infantry object. *
- * *
- * OUTPUT: bool; Was the infantry object successfully created and placed at the location *
- * specified? *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 09/24/1994 JLB : Created. *
- *=============================================================================================*/
- bool InfantryTypeClass::Create_And_Place(CELL cell, HousesType house) const
- {
- InfantryClass * i = new InfantryClass(Type, house);
- if (i != NULL) {
- COORDINATE coord = Map[cell].Closest_Free_Spot(Cell_Coord(cell));
- if (coord) {
- return(i->Unlimbo(coord, DIR_E));
- } else {
- delete i;
- }
- }
- return(false);
- }
- /***********************************************************************************************
- * InfantryTypeClass::Occupy_List -- Returns with default infantry occupation list. *
- * *
- * This routine will return with a cell offset occupation list for a generic infantry *
- * object. This is typically just a single cell since infantry are never bigger than one *
- * cell and this routine presumes the infantry is located in the center of the cell. *
- * *
- * INPUT: placement -- Is this for placement legality checking only? The normal condition *
- * is for marking occupation flags. *
- * *
- * OUTPUT: Returns with a cell offset list for the infantry object as if it were located *
- * in the center of a cell. *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 09/24/1994 JLB : Created. *
- *=============================================================================================*/
- short const * InfantryTypeClass::Occupy_List(bool) const
- {
- static short const _list[] = {0, REFRESH_EOL};
- return(&_list[0]);
- }
- #ifdef SCENARIO_EDITOR
- /***********************************************************************************************
- * InfantryTypeClass::Display -- Displays a generic infantry object. *
- * *
- * This routine is used by the scenario editor to display a generic representation of the *
- * infantry object for the scenario editor. It simply draws a single (nice profile) view *
- * of the infantry type. *
- * *
- * INPUT: x,y -- The display coordinates to render the infantry object at. *
- * *
- * window -- The window that the display coordinates are relative to. *
- * *
- * house -- The house colors to use when rendering this infantry object. *
- * *
- * OUTPUT: none *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 09/24/1994 JLB : Created. *
- *=============================================================================================*/
- void InfantryTypeClass::Display(int x, int y, WindowNumberType window, HousesType house) const
- {
- if (house != HOUSE_NONE) {
- int shape = 0;
- void const * ptr = Get_Cameo_Data();
- if (ptr == NULL) {
- ptr = Get_Image_Data();
- shape = 2;
- }
- CC_Draw_Shape(ptr, shape, x, y, window, SHAPE_NORMAL|SHAPE_CENTER|SHAPE_WIN_REL);
- }
- }
- /***********************************************************************************************
- * InfantryTypeClass::Prep_For_Add -- Prepares the scenario editor for adding of infantry object.*
- * *
- * This routine will prepare the scenario editor so that the infantry objects appear on *
- * the object list. *
- * *
- * INPUT: none *
- * *
- * OUTPUT: none *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 09/24/1994 JLB : Created. *
- *=============================================================================================*/
- void InfantryTypeClass::Prep_For_Add(void)
- {
- for (InfantryType index = INFANTRY_FIRST; index < INFANTRY_COUNT; index++) {
- Map.Add_To_List(&As_Reference(index));
- }
- }
- #endif
- /***********************************************************************************************
- * InfantryTypeClass::From_Name -- Converts an ASCII name into an infantry type number. *
- * *
- * This routine is used to convert the infantry ASCII name as specified into an infantry *
- * type number. This is called from the INI reader routine in the process if creating the *
- * infantry objects needed for the scenario. *
- * *
- * INPUT: name -- The ASCII name to convert into an infantry type number. *
- * *
- * OUTPUT: Returns with the infantry type number that corresponds to the infantry ASCII name *
- * specified. If no match could be found, then INFANTRY_NONE is returned. *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 09/24/1994 JLB : Created. *
- *=============================================================================================*/
- InfantryType InfantryTypeClass::From_Name(char const * name)
- {
- if (name != NULL) {
- for (InfantryType classid = INFANTRY_FIRST; classid < INFANTRY_COUNT; classid++) {
- if (stricmp(As_Reference(classid).IniName, name) == 0) {
- return(classid);
- }
- }
- }
- return(INFANTRY_NONE);
- }
- /***********************************************************************************************
- * InfantryTypeClass::One_Time -- Performs any one time processing for infantry system. *
- * *
- * This routine will perform one time processing for the infantry type system. This is *
- * generally restricted to loading of the infantry shape data. *
- * *
- * INPUT: none *
- * *
- * OUTPUT: none *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 09/24/1994 JLB : Created. *
- *=============================================================================================*/
- void InfantryTypeClass::One_Time(void)
- {
- for (InfantryType index = INFANTRY_FIRST; index < INFANTRY_COUNT; index++) {
- char fullname[_MAX_FNAME+_MAX_EXT];
- InfantryTypeClass const * uclass;
- CCFileClass file;
- uclass = &As_Reference(index);
- /*
- ** Generic shape for all houses load method.
- */
- _makepath(fullname, NULL, NULL, uclass->Graphic_Name(), ".SHP");
- #ifndef NDEBUG
- RawFileClass sfile(fullname);
- if (sfile.Is_Available()) {
- ((void const *&)uclass->ImageData) = Load_Alloc_Data(sfile);
- } else {
- ((void const *&)uclass->ImageData) = MFCD::Retrieve(fullname);
- }
- #else
- ((void const *&)uclass->ImageData) = MFCD::Retrieve(fullname);
- #endif
- /*
- ** The small build image icon sized shapes are always generic.
- */
- char buffer[_MAX_FNAME];
- sprintf(buffer, "%.4sICON", uclass->Graphic_Name());
- _makepath(fullname, NULL, NULL, buffer, ".SHP");
- #ifndef NDEBUG
- RawFileClass ifile(fullname);
- if (ifile.Is_Available()) {
- ((void const *&)uclass->CameoData) = Load_Alloc_Data(ifile);
- } else {
- ((void const *&)uclass->CameoData) = MFCD::Retrieve(fullname);
- }
- #else
- ((void const *&)uclass->CameoData) = MFCD::Retrieve(fullname);
- #endif
- }
- }
- /***********************************************************************************************
- * InfantryTypeClass::Full_Name -- Fetches the full name text number. *
- * *
- * This routine will fetch the full name text number for this infantry type. It examines *
- * the special custom name flag to determine whether the custom name or the generic name *
- * is to be used. *
- * *
- * INPUT: none *
- * *
- * OUTPUT: Returns with text number for the name to give this infantry type object. *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 06/29/1995 JLB : Created. *
- *=============================================================================================*/
- int InfantryTypeClass::Full_Name(void) const
- {
- if (Debug_Map || !IsNominal || Rule.IsNamed || Type == INFANTRY_C10 || Type == INFANTRY_DELPHI || Type == INFANTRY_EINSTEIN) {
- return(TechnoTypeClass::Full_Name());
- }
- return(TXT_CIVILIAN);
- }
- /***********************************************************************************************
- * InfantryTypeClass::As_Reference -- Fetches a reference to the infantry type specified. *
- * *
- * Use this routine to convert an infantry type number into a reference to the infantry *
- * type class object it represents. *
- * *
- * INPUT: type -- The infantry type number to convert into a infantry type class object. *
- * *
- * OUTPUT: Returns with a reference to the infantry type class object specified. *
- * *
- * WARNINGS: Be sure that the type parameter is legal, otherwise the results are undefined. *
- * *
- * HISTORY: *
- * 07/11/1996 JLB : Created. *
- *=============================================================================================*/
- InfantryTypeClass & InfantryTypeClass::As_Reference(InfantryType type)
- {
- return(*InfantryTypes.Ptr(type));
- }
- /***********************************************************************************************
- * InfantryTypeClass::Read_INI -- Fetches infantry override values from the INI database. *
- * *
- * This routine will retrieve the override values for this infantry type class object from *
- * the INI database specified. *
- * *
- * INPUT: ini -- Reference to the INI database to retrieve the data from. *
- * *
- * OUTPUT: bool; Was the infantry section for this type found and data retrieved from it? *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 07/19/1996 JLB : Created. *
- *=============================================================================================*/
- bool InfantryTypeClass::Read_INI(CCINIClass & ini)
- {
- if (TechnoTypeClass::Read_INI(ini)) {
- IsFraidyCat = ini.Get_Bool(Name(), "Fraidycat", IsFraidyCat);
- IsCapture = ini.Get_Bool(Name(), "Infiltrate", IsCapture);
- IsBomber = ini.Get_Bool(Name(), "C4", IsBomber);
- IsDog = ini.Get_Bool(Name(), "IsCanine", IsDog);
- if (IsBomber) IsCapture = true;
- if (IsDog) IsLeader = false;
- return(true);
- }
- return(false);
- }
- void InfantryTypeClass::Dimensions(int & width, int & height) const
- {
- #ifdef WIN32
- width = 14;
- height = 20;
- #else
- width = 12;
- height = 16;
- #endif
- }
|