DEFINES.H 105 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642
  1. //
  2. // Copyright 2020 Electronic Arts Inc.
  3. //
  4. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
  5. // software: you can redistribute it and/or modify it under the terms of
  6. // the GNU General Public License as published by the Free Software Foundation,
  7. // either version 3 of the License, or (at your option) any later version.
  8. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. /* $Header: /CounterStrike/DEFINES.H 4 3/07/97 9:55a Joe_bostic $ */
  15. /***********************************************************************************************
  16. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  17. ***********************************************************************************************
  18. * *
  19. * Project Name : Command & Conquer *
  20. * *
  21. * File Name : DEFINES.H *
  22. * *
  23. * Programmer : Joe L. Bostic *
  24. * *
  25. * Start Date : September 10, 1993 *
  26. * *
  27. * Last Update : September 10, 1993 [JLB] *
  28. * *
  29. *---------------------------------------------------------------------------------------------*
  30. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  31. #ifndef DEFINES_H
  32. #define DEFINES_H
  33. /**********************************************************************
  34. ** Language control: define the desired language for this build.
  35. */
  36. //#define ENGLISH 1
  37. //#define FRENCH 1
  38. //#define GERMAN 1
  39. //#define SPAIN 1 (never used)
  40. // - Language define is now passed in from the makefile. -
  41. /**********************************************************************
  42. ** Controls the nature of the game and its abilities. Only define
  43. ** one of these values.
  44. **
  45. ** Internal version -- complete with scenario editor.
  46. ** Playtest version -- no editor but does have minimal cheat keys.
  47. ** Release version -- no editor or cheat keys -- all debugging info removed.
  48. */
  49. //#define INTERNAL_VERSION
  50. //#define PLAYTEST_VERSION
  51. #define RELEASE_VERSION
  52. /**********************************************************************
  53. ** ColinM
  54. ** Set this to enable dongle protection
  55. */
  56. //#define DONGLE
  57. // Enable 640x400 VQ movie capability in WIN32 mode
  58. #define MOVIE640
  59. //#if (GERMAN | FRENCH)
  60. //#define BOGUSCD
  61. //#endif
  62. #define FIXIT_SCORE_CRASH // Fixes score screen crash
  63. #define FIXIT_MULTI_SAVE // Fixes multiplayer save/load
  64. #define FIXIT_NO_COMP_ALLY // Prevent ally with computer
  65. #define FIXIT_DESTNET // Fixes -destnet parameter in Win95
  66. #define FIXIT_RANDOM_GAME // Fixes random seed at start of multiplayer games
  67. #define FIXIT_FORCE_CD // Forces correct CD load after scenario #1
  68. #define FIXIT_IP_CRASH // Fixes crash if internet game aborts too quickly
  69. #define FIXIT_IP_STATS // Fixes so vessels show up in internet stat info
  70. #define FIXIT_NAME_OVERRIDE // Allows changing of unit names
  71. #define FIXIT_RADAR_JAMMED // Fixes unjamming by merely starting to build a radar facility
  72. #define FIXIT_CAPTURE_BIB // Fixes so that if fake is captured, you still can't build off of it.
  73. #define FIXIT_BASE_ANNOUNCE // Fixes so player controlled buildings count as base when attacked.
  74. #define FIXIT_APTIVA_MODEM // Fixes crash with Aptiva modem.
  75. #define FIXIT_FLAG_CHECK // Disable placing building over a flag.
  76. #define FIXIT_ANTS // Adds Ant Units
  77. #define FIXIT_CSII // Adds Aftermath CounterStrike II units
  78. // ajw 9/28/98 - Note about FIXIT_CSII. Changes seem to have been made for Aftermath ("Counterstrike II") that: a) were
  79. // bug fixes that should never be rolled back, b) change the nature of the game, at least in multi-player. This meant
  80. // that the "Red Alert" executable ( == Counterstrike executable ) could no longer be built. Apparently, at the time,
  81. // this was justified, as it was believed that no further patches to the RA executable would ever be necessary.
  82. // Given that Denzil's DVD changes and my WOLAPI integration are essentially a patch, we've got a problem.
  83. // We've decided to level the field and make sure every who gets or patches to the new version of Red Alert, CS, AM, (and
  84. // their DVD equivalent(s)) will have the same executable. So we're assuming that all of the FIXIT_CSII changes are
  85. // permanent (as, in fact, all prior FIXIT_'s are - makes me wonder why the old non-compiling code has to hang around
  86. // forever), and fixing the code so that the assumption "this is an Aftermath game" is no longer hard-coded, but can
  87. // change at runtime. (Which is what should have been done when Aftermath was created.)
  88. // <This goes for the following three defines as well.>
  89. #define FIXIT_CARRIER // Adds Aftermath aircraft carrier
  90. #define FIXIT_PHASETRANSPORT // Adds Aftermath cloaking APC
  91. // ajw - Discovered that engineer changing fields were specifically left out of aftrmath.ini, thus this has no effect.
  92. // Engineer changes (and other game rule changes) are in mplayer.ini, which was loaded before aftermath-only mplayer games.
  93. #define FIXIT_ENGINEER // Adds Engineer rules.ini overrides
  94. //#define FIXIT_FAST_LOAD // Enables faster INI loading
  95. // These fixes will cause the game to go out of sync.
  96. //#define FIXIT_ENGINEER_CAPTURE // If building not allied, will still capture if engineer not allied with building.
  97. //#define FIXIT_HELI_LANDING // Fixes so new helicopters land at free helipad
  98. //#define FIXIT_MINE_PASSABLE // Fixes units not driving onto mines
  99. /* Turn on these changes for the 1.08 patch */
  100. #define FIXIT_PATCH_108
  101. #ifdef FIXIT_PATCH_108
  102. #define STEVES_LOAD_OVERRIDE // Allows loading of CONQUER.ENG instead of from mix file.
  103. #define FIXIT_DIFFICULTY // Fixes no difficulty level for CStrike missions
  104. #define FIXIT_VERSION // Fixes version playability for 1.04, 1.07 & 1.08
  105. #define FIXIT_MODEM_LOAD_CRASH // Fixes crash after loading a modem game when names are the same
  106. #define FIXIT_PHONELIST_CRASH // Fixes crash when clicking on an empty phonelist
  107. #endif
  108. // Denotes changes made for version 3 - reunification of all existing versions and undoing of Aftermath divergence. - ajw
  109. #define FIXIT_VERSION_3
  110. #define DVD
  111. // Define DVD to turn on RADVD additions/changes - Denzil
  112. #ifdef DVD
  113. //#define INTERNET_OFF
  114. //#define MPEGMOVIE //PG
  115. //#define MCIMPEG
  116. #endif
  117. // Test to see if partial object drawing is any faster.
  118. //#define PARTIAL
  119. #define SORTDRAW
  120. /**********************************************************************
  121. ** If the scenario editor to to be active in this build then uncomment
  122. ** the following #define line.
  123. */
  124. #ifdef INTERNAL_VERSION
  125. #define SCENARIO_EDITOR
  126. #endif
  127. /**********************************************************************
  128. ** This define enables the full set of cheat keys and special
  129. ** command line options.
  130. */
  131. #if defined(INTERNAL_VERSION) || defined(PLAYTEST_VERSION)
  132. #define CHEAT_KEYS
  133. #endif
  134. /**********************************************************************
  135. ** If this is defined, the special Virgin limited cheat keys
  136. ** are enabled. This allows the "cheat" parameter and then only
  137. ** allows the ALT-W to win the mission.
  138. */
  139. #ifdef PLAYTEST_VERSION
  140. #define VIRGIN_CHEAT_KEYS
  141. #endif
  142. /**********************************************************************
  143. ** If this is defined, then the network code will be enabled.
  144. */
  145. #define NETWORK
  146. #define TIMING_FIX 1
  147. /**********************************************************************
  148. ** Define this to 1 to enable MPath-specific code. Do not define
  149. ** TEN at the same time.
  150. */
  151. #define MPATH 0
  152. /**********************************************************************
  153. ** Define this to 1 to enable TEN-specific code. Do not define
  154. ** MPATH at the same time.
  155. */
  156. #define TEN 0
  157. /**********************************************************************
  158. ** If this is defined, the DoList is "mirrored", for memory trasher
  159. ** detection.
  160. */
  161. #ifdef CHEAT_KEYS
  162. //#define MIRROR_QUEUE
  163. #endif
  164. /**********************************************************************
  165. ** This define tells the Version Number class to use the date/time-based
  166. ** version numbering system. If this define is not set, the actual
  167. ** major/minor version numbers will be used.
  168. */
  169. //#define DEV_VERSION
  170. //#define DEV_VER_NAME
  171. /**********************************************************************
  172. ** This define enables a special additional foreign-version-number
  173. ** after the other version number, for display purposes only.
  174. */
  175. #if !defined(ENGLISH)
  176. #define FOREIGN_VERSION
  177. #define FOREIGN_VERSION_NUMBER 7
  178. #endif
  179. /**********************************************************************
  180. ** This is the multiplier factor to convert low resution coordinates
  181. ** into their actual resolution counterparts.
  182. */
  183. #ifdef WIN32
  184. #define RESFACTOR 2
  185. #else
  186. //#undef SCENARIO_EDITOR
  187. #define RESFACTOR 1
  188. #endif
  189. #define SIDEBAR_WID 80
  190. /**********************************************************************
  191. ** Optional parameter control for special options.
  192. */
  193. /*
  194. ** Enable the set of limited cheat key options.
  195. */
  196. #ifdef VIRGIN_CHEAT_KEYS
  197. #define PARM_PLAYTEST 0xF7DDC227 // "PLAYTEST"
  198. #endif
  199. /*
  200. ** Enable the full set of cheat key options.
  201. */
  202. #ifdef CHEAT_KEYS
  203. #ifndef PARM_PLAYTEST
  204. #define PARM_PLAYTEST 0xF7DDC227 // "PLAYTEST"
  205. #endif
  206. #endif
  207. #define PARM_INSTALL 0xD95C68A2 // "FROMINSTALL"
  208. //
  209. // Allow normal game play in the MPath version
  210. //
  211. #if(MPATH)
  212. #define PARM_ALLOW_SOLO 0xc901c9db // AllowSoloPlayOptions
  213. #endif
  214. //
  215. // Allow normal game play in the TEN version
  216. //
  217. #if(TEN)
  218. #define PARM_ALLOW_SOLO 0xc901c9db // AllowSoloPlayOptions
  219. #endif
  220. /**********************************************************************
  221. ** Defines for verifying free disk space
  222. */
  223. #define INIT_FREE_DISK_SPACE 8388608
  224. #define SAVE_GAME_DISK_SPACE (INIT_FREE_DISK_SPACE - (1024*4096))
  225. //#define SAVE_GAME_DISK_SPACE 100000
  226. /**********************************************************************
  227. ** This is the complete list of VQs allowed to be played in the game.
  228. */
  229. typedef enum VQType {
  230. VQ_NONE=-1,
  231. VQ_AAGUN,
  232. VQ_MIG,
  233. VQ_SFROZEN,
  234. VQ_AIRFIELD,
  235. VQ_BATTLE,
  236. VQ_BMAP,
  237. VQ_BOMBRUN,
  238. VQ_DPTHCHRG,
  239. VQ_GRVESTNE,
  240. VQ_MONTPASS,
  241. VQ_MTNKFACT,
  242. VQ_CRONTEST,
  243. VQ_OILDRUM,
  244. VQ_ALLYEND,
  245. VQ_RADRRAID,
  246. VQ_SHIPYARD,
  247. VQ_SHORBOMB,
  248. VQ_SITDUCK,
  249. VQ_SLNTSRVC,
  250. VQ_SNOWBASE,
  251. VQ_EXECUTE,
  252. VQ_TITLE, // Low res.
  253. VQ_NUKESTOK,
  254. VQ_V2ROCKET,
  255. VQ_SEARCH,
  256. VQ_BINOC,
  257. VQ_ELEVATOR,
  258. VQ_FROZEN,
  259. VQ_MCV,
  260. VQ_SHIPSINK,
  261. VQ_SOVMCV,
  262. VQ_TRINITY,
  263. VQ_ALLYMORF,
  264. VQ_APCESCPE,
  265. VQ_BRDGTILT,
  266. VQ_CRONFAIL,
  267. VQ_STRAFE,
  268. VQ_DESTROYR,
  269. VQ_DOUBLE,
  270. VQ_FLARE,
  271. VQ_SNSTRAFE,
  272. VQ_LANDING,
  273. VQ_ONTHPRWL,
  274. VQ_OVERRUN,
  275. VQ_SNOWBOMB,
  276. VQ_SOVCEMET,
  277. VQ_TAKE_OFF,
  278. VQ_TESLA,
  279. VQ_SOVIET8,
  280. VQ_SPOTTER,
  281. VQ_SCENE1,
  282. VQ_SCENE2,
  283. VQ_SCENE4,
  284. VQ_SOVFINAL,
  285. VQ_ASSESS,
  286. VQ_SOVIET10,
  287. VQ_DUD,
  288. VQ_MCV_LAND,
  289. VQ_MCVBRDGE,
  290. VQ_PERISCOP,
  291. VQ_SHORBOM1,
  292. VQ_SHORBOM2,
  293. VQ_SOVBATL,
  294. VQ_SOVTSTAR,
  295. VQ_AFTRMATH,
  296. VQ_SOVIET11,
  297. VQ_MASASSLT,
  298. VQ_REDINTRO, // High res
  299. VQ_SOVIET1,
  300. VQ_SOVIET2,
  301. VQ_SOVIET3,
  302. VQ_SOVIET4,
  303. VQ_SOVIET5,
  304. VQ_SOVIET6,
  305. VQ_SOVIET7,
  306. VQ_INTRO_MOVIE,
  307. VQ_AVERTED,
  308. VQ_COUNTDWN,
  309. VQ_MOVINGIN,
  310. VQ_ALLIED10,
  311. VQ_ALLIED12,
  312. VQ_ALLIED5,
  313. VQ_ALLIED6,
  314. VQ_ALLIED8,
  315. VQ_TANYA1,
  316. VQ_TANYA2,
  317. VQ_ALLY10B,
  318. VQ_ALLY11,
  319. VQ_ALLY14,
  320. VQ_ALLY9,
  321. VQ_SPY,
  322. VQ_TOOFAR,
  323. VQ_SOVIET12,
  324. VQ_SOVIET13,
  325. VQ_SOVIET9,
  326. VQ_BEACHEAD,
  327. VQ_SOVIET14,
  328. VQ_SIZZLE,
  329. VQ_SIZZLE2,
  330. VQ_ANTEND,
  331. VQ_ANTINTRO,
  332. //2019/11/12 JAS - Added for Retaliation movies
  333. VQ_RETALIATION_ALLIED1,
  334. VQ_RETALIATION_ALLIED2,
  335. VQ_RETALIATION_ALLIED3,
  336. VQ_RETALIATION_ALLIED4,
  337. VQ_RETALIATION_ALLIED5,
  338. VQ_RETALIATION_ALLIED6,
  339. VQ_RETALIATION_ALLIED7,
  340. VQ_RETALIATION_ALLIED8,
  341. VQ_RETALIATION_ALLIED9,
  342. VQ_RETALIATION_ALLIED10,
  343. VQ_RETALIATION_SOVIET1,
  344. VQ_RETALIATION_SOVIET2,
  345. VQ_RETALIATION_SOVIET3,
  346. VQ_RETALIATION_SOVIET4,
  347. VQ_RETALIATION_SOVIET5,
  348. VQ_RETALIATION_SOVIET6,
  349. VQ_RETALIATION_SOVIET7,
  350. VQ_RETALIATION_SOVIET8,
  351. VQ_RETALIATION_SOVIET9,
  352. VQ_RETALIATION_SOVIET10,
  353. VQ_RETALIATION_WINA,
  354. VQ_RETALIATION_WINS,
  355. VQ_RETALIATION_ANTS,
  356. VQ_COUNT,
  357. VQ_FIRST=0
  358. } VQType;
  359. /**********************************************************************
  360. ** These enumerations are used to implement RTTI. The target system
  361. ** uses these and thus there can be no more RTTI types than can fit
  362. ** in the exponent of a target value.
  363. */
  364. typedef enum RTTIType : unsigned char {
  365. RTTI_NONE=0,
  366. RTTI_AIRCRAFT,
  367. RTTI_AIRCRAFTTYPE,
  368. RTTI_ANIM,
  369. RTTI_ANIMTYPE,
  370. RTTI_BUILDING,
  371. RTTI_BUILDINGTYPE,
  372. RTTI_BULLET,
  373. RTTI_BULLETTYPE,
  374. RTTI_CELL,
  375. RTTI_FACTORY,
  376. RTTI_HOUSE,
  377. RTTI_HOUSETYPE,
  378. RTTI_INFANTRY,
  379. RTTI_INFANTRYTYPE,
  380. RTTI_OVERLAY,
  381. RTTI_OVERLAYTYPE,
  382. RTTI_SMUDGE,
  383. RTTI_SMUDGETYPE,
  384. RTTI_SPECIAL,
  385. RTTI_TEAM,
  386. RTTI_TEAMTYPE,
  387. RTTI_TEMPLATE,
  388. RTTI_TEMPLATETYPE,
  389. RTTI_TERRAIN,
  390. RTTI_TERRAINTYPE,
  391. RTTI_TRIGGER,
  392. RTTI_TRIGGERTYPE,
  393. RTTI_UNIT,
  394. RTTI_UNITTYPE,
  395. RTTI_VESSEL,
  396. RTTI_VESSELTYPE,
  397. RTTI_COUNT
  398. } RTTIType;
  399. /**********************************************************************
  400. ** These are the difficulty settings of the game.
  401. */
  402. typedef enum DiffType : unsigned char {
  403. DIFF_EASY,
  404. DIFF_NORMAL,
  405. DIFF_HARD,
  406. DIFF_COUNT,
  407. DIFF_FIRST=0
  408. } DiffType;
  409. /**********************************************************************
  410. ** This is the size of the speech buffer. This value should be as large
  411. ** as the largest speech sample, plus a few bytes for overhead
  412. ** (16 bytes is sufficient).
  413. */
  414. #define SPEECH_BUFFER_SIZE 50000L
  415. /**********************************************************************
  416. ** The theater mixfiles are cached into a buffer of this size. Ensure
  417. ** that the size specified is at least as large as the largest
  418. ** theater mixfile data block.
  419. */
  420. #define THEATER_BUFFER_SIZE 1100000L
  421. /**********************************************************************
  422. ** This is the size of the shape buffer. This buffer is used as a staging
  423. ** buffer for the shape drawing technology. It MUST be as big as the
  424. ** largest shape (uncompressed) that will be drawn. If this value is
  425. ** changed, be sure to update the makefile and rebuild all of the shape
  426. ** data files.
  427. */
  428. #define SHAPE_BUFFER_SIZE 131072L
  429. /**********************************************************************
  430. ** Filenames of the data files it can create at run time.
  431. */
  432. #define FAME_FILE_NAME "HALLFAME.DAT"
  433. #define NET_SAVE_FILE_NAME "SAVEGAME.NET"
  434. #define CONFIG_FILE_NAME "REDALERT.INI"
  435. /**********************************************************************
  436. ** Map controls. The map is composed of square elements called 'cells'.
  437. ** All larger elements are build upon these.
  438. */
  439. #define HIGH_COORD_MASK 0x80008000L
  440. // Size of the map in cells.
  441. #define MAP_CELL_W 128
  442. #define MAP_CELL_H 128
  443. #define MAP_CELL_TOTAL (MAP_CELL_W*MAP_CELL_H)
  444. #define REFRESH_EOL 32767 // This number ends a refresh/occupy offset list.
  445. #define REFRESH_SIDEBAR 32766 // This number flags that sidebar needs refreshing.
  446. /****************************************************************************
  447. ** These are custom C&C specific types. The CELL is used for map coordinate
  448. ** with cell resolution. The COORDINATE type is used for map coordinates that
  449. ** have a lepton resolution. CELL is more efficient when indexing into the map
  450. ** and when size is critical. COORDINATE is more efficient when dealing with
  451. ** accuracy and object movement.
  452. */
  453. typedef unsigned short LEPTON;
  454. typedef union {
  455. LEPTON Raw;
  456. struct {
  457. #ifdef BIG_ENDIAN
  458. unsigned char Cell;
  459. unsigned char Lepton;
  460. #else
  461. unsigned char Lepton;
  462. unsigned char Cell;
  463. #endif
  464. } Sub;
  465. } LEPTON_COMPOSITE;
  466. typedef unsigned long COORDINATE;
  467. typedef union {
  468. COORDINATE Coord;
  469. struct {
  470. #ifdef BIG_ENDIAN
  471. LEPTON_COMPOSITE Y;
  472. LEPTON_COMPOSITE X;
  473. #else
  474. LEPTON_COMPOSITE X;
  475. LEPTON_COMPOSITE Y;
  476. #endif
  477. } Sub;
  478. } COORD_COMPOSITE;
  479. typedef signed short CELL;
  480. #define SLUFF_BITS (sizeof(CELL)*CHAR_BIT)-(14)
  481. typedef union {
  482. CELL Cell;
  483. struct {
  484. #ifdef BIG_ENDIAN
  485. #if SLUFF_BITS
  486. /*
  487. ** Unused upper bits will cause problems on a big-endian machine unless they
  488. ** are deliberately accounted for.
  489. */
  490. unsigned sluff:SLUF_BITS;
  491. #endif
  492. unsigned Y:7;
  493. unsigned X:7;
  494. #else
  495. unsigned X:7;
  496. unsigned Y:7;
  497. #endif
  498. } Sub;
  499. } CELL_COMPOSITE;
  500. typedef int WAYPOINT;
  501. /**********************************************************************
  502. ** This is the target composit information. Notice that with an RTTI_NONE
  503. ** and an index value of 0, the target value returned is identical with
  504. ** TARGET_NONE. This is by design and is necessary.
  505. */
  506. typedef long TARGET;
  507. #define TARGET_MANTISSA 24 // Bits of value precision.
  508. #define TARGET_EXPONENT 8
  509. typedef union {
  510. TARGET Target;
  511. struct {
  512. #ifdef BIG_ENDIAN
  513. unsigned Exponent:TARGET_EXPONENT;
  514. unsigned Mantissa:TARGET_MANTISSA;
  515. #else
  516. unsigned Mantissa:TARGET_MANTISSA;
  517. unsigned Exponent:TARGET_EXPONENT;
  518. #endif
  519. } Sub;
  520. } TARGET_COMPOSITE;
  521. inline TARGET Build_Target(RTTIType kind, int value)
  522. {
  523. TARGET_COMPOSITE target;
  524. target.Target = 0;
  525. target.Sub.Exponent = kind;
  526. target.Sub.Mantissa = value;
  527. return(target.Target);
  528. }
  529. #define TARGET_NONE ((TARGET)0)
  530. /*
  531. ** The map is broken down into regions of this specified dimensions.
  532. */
  533. #define REGION_WIDTH 4
  534. #define REGION_HEIGHT 4
  535. #define MAP_REGION_WIDTH (((MAP_CELL_W + (REGION_WIDTH -1)) / REGION_WIDTH)+2)
  536. #define MAP_REGION_HEIGHT (((MAP_CELL_H + (REGION_WIDTH -1)) / REGION_HEIGHT)+2)
  537. #define MAP_TOTAL_REGIONS (MAP_REGION_WIDTH * MAP_REGION_HEIGHT)
  538. /**********************************************************************
  539. ** This enumerates the various known fear states for infantry units.
  540. ** At these stages, certain events or recovery actions are performed.
  541. */
  542. typedef enum FearType : unsigned char {
  543. FEAR_NONE=0, // No fear at all (default state).
  544. FEAR_ANXIOUS=10, // Something makes them scared.
  545. FEAR_SCARED=100, // Scared enough to take cover.
  546. FEAR_PANIC=200, // Run away! Run away!
  547. FEAR_MAXIMUM=255 // Scared to death.
  548. } FearType;
  549. /**********************************************************************
  550. ** When a moving object moves, the Per_Cell_Process function is called
  551. ** at various times during the move. Certain operations must be
  552. ** performed at different stages of the move. This enum specifies the
  553. ** different conditions under which the Per_Cell_Process function is
  554. ** called.
  555. */
  556. typedef enum PCPType : unsigned char {
  557. PCP_ROTATION, // When sitting in place and performing rotations.
  558. PCP_DURING, // While moving between two cells.
  559. PCP_END, // When the 'center' of a cell is reached during movement.
  560. } PCPType;
  561. /**********************************************************************
  562. ** A base is broken up into several zones. This type enumerates the
  563. ** various zones.
  564. */
  565. typedef enum ZoneType : char {
  566. ZONE_CORE, // Center of base.
  567. ZONE_NORTH, // North section.
  568. ZONE_EAST, // East section.
  569. ZONE_SOUTH, // South section.
  570. ZONE_WEST, // West section.
  571. ZONE_COUNT,
  572. ZONE_FIRST=0,
  573. ZONE_NONE=-1
  574. } ZoneType;
  575. /**********************************************************************
  576. ** The map is prescanned to mark of movement zones according to certain
  577. ** movement characteristics. This enum specifies those characteristics
  578. ** and movement zones kept track of.
  579. */
  580. typedef enum MZoneType : unsigned char {
  581. MZONE_NORMAL, // Normal terrestrial objects (can't crush walls).
  582. MZONE_CRUSHER, // Can crush crushable wall types.
  583. MZONE_DESTROYER, // Can destroy walls.
  584. MZONE_WATER, // Water based objects.
  585. MZONE_COUNT,
  586. MZONE_FIRST=0
  587. } MZoneType;
  588. #define MZONEF_NORMAL (1<<MZONE_NORMAL)
  589. #define MZONEF_CRUSHER (1<<MZONE_CRUSHER)
  590. #define MZONEF_DESTROYER (1<<MZONE_DESTROYER)
  591. #define MZONEF_WATER (1<<MZONE_WATER)
  592. #define MZONEF_ALL (MZONEF_NORMAL|MZONEF_CRUSHER|MZONEF_DESTROYER|MZONEF_WATER)
  593. /**********************************************************************
  594. ** This records the current state of the computer controlled base. The
  595. ** AI will respond according to this state in order to control
  596. ** production and unit orders.
  597. */
  598. typedef enum StateType : unsigned char {
  599. STATE_BUILDUP, // Base is building up (defensive buildup stage).
  600. STATE_BROKE, // Low on money, need cash or income source.
  601. STATE_THREATENED, // Enemy units are designated to move close by.
  602. STATE_ATTACKED, // Base is under direct attack.
  603. STATE_ENDGAME // Resistance is futile.
  604. } StateType;
  605. /**********************************************************************
  606. ** Urgency rating used to determine what action to perform. The greater
  607. ** the urgency the more likely the corresponding action will be chosen.
  608. ** These values are assigned to each potential desired action the house
  609. ** is to perform.
  610. */
  611. typedef enum UrgencyType : unsigned char {
  612. URGENCY_NONE, // No action on this matter is needed or desired.
  613. URGENCY_LOW, // Minimal attention requested.
  614. URGENCY_MEDIUM, // Normal attention requested.
  615. URGENCY_HIGH, // High attention requested.
  616. URGENCY_CRITICAL, // This matter must be addressed immediately.
  617. URGENCY_COUNT,
  618. URGENCY_FIRST=URGENCY_CRITICAL
  619. } UrgencyType;
  620. /**********************************************************************
  621. ** These are the various actions a house may perform. These actions refer
  622. ** to global events that encompass selling and production. Low level house
  623. ** specific actions of choosing targets is handled elsewhere.
  624. */
  625. typedef enum StrategyType : unsigned char {
  626. STRATEGY_BUILD_POWER, // Power is low, build more.
  627. STRATEGY_BUILD_DEFENSE, // Defense needs boosting.
  628. STRATEGY_BUILD_INCOME, // Income is low or in jeopardy, raise it.
  629. STRATEGY_FIRE_SALE, // Situation hopeless, sell and attack.
  630. STRATEGY_BUILD_ENGINEER, // An engineer is needed.
  631. STRATEGY_BUILD_OFFENSE, // Offensive weapons are needed.
  632. STRATEGY_RAISE_MONEY, // Money is low, emergency raise cash.
  633. STRATEGY_RAISE_POWER, // Money is low, raise power by selling.
  634. STRATEGY_LOWER_POWER, // Too much power, sell power plants.
  635. STRATEGY_ATTACK, // General charge the enemy attack logic.
  636. STRATEGY_COUNT,
  637. STRATEGY_FIRST=STRATEGY_BUILD_POWER
  638. } StrategyType;
  639. /**********************************************************************
  640. ** These are the various return conditions that production may
  641. ** produce.
  642. */
  643. typedef enum ProdFailType : unsigned char {
  644. PROD_OK, // Production request successful.
  645. PROD_LIMIT, // Failed with production capacity limit reached.
  646. PROD_ILLEGAL, // Failed because of illegal request.
  647. PROD_CANT // Failed because unable to comply (busy or occupied).
  648. } ProdFailType;
  649. /**********************************************************************
  650. ** When performing a landing operation, the aircraft must pass through
  651. ** navigation checkpoints. These enumerations specify the check points.
  652. */
  653. typedef enum CheckPointType : unsigned char {
  654. CHECK_STACK, // Holding area far away from airfield.
  655. CHECK_DOWNWIND, // Downwind leg of approach.
  656. CHECK_CROSSWIND // Crosswind leg of approach.
  657. } CheckPointType;
  658. /**********************************************************************
  659. ** These enumerate the various crate powerups that are available.
  660. */
  661. typedef enum CrateType : unsigned char {
  662. CRATE_MONEY,
  663. CRATE_UNIT,
  664. CRATE_PARA_BOMB,
  665. CRATE_HEAL_BASE,
  666. CRATE_CLOAK,
  667. CRATE_EXPLOSION,
  668. CRATE_NAPALM,
  669. CRATE_SQUAD,
  670. CRATE_DARKNESS,
  671. CRATE_REVEAL,
  672. CRATE_SONAR,
  673. CRATE_ARMOR,
  674. CRATE_SPEED,
  675. CRATE_FIREPOWER,
  676. CRATE_ICBM,
  677. CRATE_TIMEQUAKE,
  678. CRATE_INVULN,
  679. CRATE_VORTEX,
  680. CRATE_COUNT,
  681. CRATE_FIRST=0
  682. } CrateType;
  683. /**********************************************************************
  684. ** These are the special weapons that can be used in the game. The common thread
  685. ** with these weapons is that they are controlled through the sidebar
  686. ** mechanism.
  687. */
  688. typedef enum SpecialWeaponType : char {
  689. SPC_NONE=-1,
  690. SPC_SONAR_PULSE, // Momentarily reveals submarines.
  691. SPC_NUCLEAR_BOMB, // Tactical nuclear weapon.
  692. SPC_CHRONOSPHERE, // Paradox device, for teleportation
  693. SPC_PARA_BOMB, // Parachute bomb delivery.
  694. SPC_PARA_INFANTRY, // Parachute reinforcement delivery.
  695. SPC_SPY_MISSION, // Spy plane to take photo recon mission.
  696. SPC_IRON_CURTAIN, // Bestow invulnerability on a unit/building
  697. SPC_GPS, // give allies free unjammable radar.
  698. SPC_COUNT,
  699. SPC_FIRST=0,
  700. SPC_ANY=1
  701. } SpecialWeaponType;
  702. #define SPC_CHRONO2 (SPC_COUNT)
  703. /**********************************************************************
  704. ** The computer AI is categorized by the following enumerations. If
  705. ** the player is controlling a house, then the IQ rating is zero. When
  706. ** the IQ rating is at maximum, then the computer has complete control
  707. ** of the house.
  708. */
  709. //typedef enum IQType {
  710. // IQ_DEAD=0x0000, // Player controlled (computer does nothing).
  711. // IQ_IDIOT=0x0040,
  712. // IQ_IMBECILE=0x0080,
  713. // IQ_MORON=0x00C0,
  714. // IQ_MENSA=0x0100 // Complete computer control -- look out!
  715. //} IQType;
  716. /**********************************************************************
  717. ** These are the response values when checking to see if an object
  718. ** can enter or exist at a specified location. By examining this
  719. ** return value, appropriate action may be chosen.
  720. ** NOTE: If this changes, update the static array in Find_Path module.
  721. */
  722. typedef enum MoveType : unsigned char {
  723. MOVE_OK, // No blockage.
  724. MOVE_CLOAK, // A cloaked blocking enemy object.
  725. MOVE_MOVING_BLOCK, // Blocked, but only temporarily.
  726. MOVE_DESTROYABLE, // Enemy unit or building is blocking.
  727. MOVE_TEMP, // Blocked by friendly unit.
  728. MOVE_NO, // Strictly prohibited terrain.
  729. MOVE_COUNT
  730. } MoveType;
  731. /**********************************************************************
  732. ** These are the themes that the game can play. They must be in exact
  733. ** same order as specified in the CONQUER.TXT file as well as the filename
  734. ** list located in the ThemeClass.
  735. */
  736. typedef enum ThemeType : char {
  737. THEME_QUIET=-3,
  738. THEME_PICK_ANOTHER=-2,
  739. THEME_NONE=-1,
  740. THEME_BIGF,
  741. THEME_CRUS,
  742. THEME_FAC1,
  743. THEME_FAC2,
  744. THEME_HELL,
  745. THEME_RUN1,
  746. THEME_SMSH,
  747. THEME_TREN,
  748. THEME_WORK,
  749. THEME_AWAIT,
  750. THEME_DENSE_R,
  751. THEME_FOGGER1A,
  752. THEME_MUD1A,
  753. THEME_RADIO2,
  754. THEME_ROLLOUT,
  755. THEME_SNAKE,
  756. THEME_TERMINAT,
  757. THEME_TWIN,
  758. THEME_VECTOR1A,
  759. THEME_MAP,
  760. THEME_SCORE,
  761. THEME_INTRO,
  762. THEME_CREDITS,
  763. THEME_2ND_HAND,
  764. THEME_ARAZOID,
  765. THEME_BACKSTAB,
  766. THEME_CHAOS2,
  767. THEME_SHUT_IT,
  768. THEME_TWINMIX1,
  769. THEME_UNDER3,
  770. THEME_VR2,
  771. #ifdef FIXIT_CSII // checked - ajw 9/28/98
  772. THEME_BOG,
  773. THEME_FLOAT_V2,
  774. THEME_GLOOM,
  775. THEME_GRNDWIRE,
  776. THEME_RPT,
  777. THEME_SEARCH,
  778. THEME_TRACTION,
  779. THEME_WASTELND,
  780. #endif
  781. THEME_COUNT,
  782. THEME_LAST=(int)THEME_COUNT-1,
  783. THEME_FIRST=0
  784. } ThemeType;
  785. //PG inline ThemeType operator++(ThemeType &, int);
  786. /**********************************************************************
  787. ** This is the various threat scan methods that can be used when looking
  788. ** for targets.
  789. */
  790. typedef enum ThreatType : unsigned short {
  791. THREAT_NORMAL=0x0000, // Any distance threat scan?
  792. THREAT_RANGE=0x0001, // Limit scan to weapon range?
  793. THREAT_AREA=0x0002, // Limit scan to general area (twice weapon range)?
  794. THREAT_AIR=0x0004, // Scan for air units?
  795. THREAT_INFANTRY=0x0008, // Scan for infantry units?
  796. THREAT_VEHICLES=0x0010, // Scan for vehicles?
  797. THREAT_BUILDINGS=0x0020, // Scan for buildings?
  798. THREAT_TIBERIUM=0x0040, // Limit scan to Tiberium processing objects?
  799. THREAT_BOATS=0x0080, // Scan for gunboats?
  800. THREAT_CIVILIANS=0x0100, // Consider civilians to be primary target?
  801. THREAT_CAPTURE=0x0200, // Consider capturable buildings only?
  802. THREAT_FAKES=0x0400, // Consider fake buildings a greater target?
  803. THREAT_POWER=0x0800, // Consider power generating facilities a greater target?
  804. THREAT_FACTORIES=0x1000, // Consider factories a greater target?
  805. THREAT_BASE_DEFENSE=0x2000, // Consider base defense buildings a greater target?
  806. } ThreatType;
  807. //PG
  808. //inline ThreatType operator |(ThreatType, ThreatType);
  809. //inline ThreatType operator &(ThreatType, ThreatType);
  810. //inline ThreatType operator ~(ThreatType);
  811. inline ThreatType operator|(ThreatType a, ThreatType b)
  812. {return static_cast<ThreatType>(static_cast<int>(a) | static_cast<int>(b));}
  813. inline ThreatType operator&(ThreatType a, ThreatType b)
  814. {return static_cast<ThreatType>(static_cast<int>(a) & static_cast<int>(b));}
  815. inline ThreatType operator~(ThreatType a)
  816. {return static_cast<ThreatType>(~static_cast<int>(a));}
  817. #define THREAT_GROUND (THREAT_VEHICLES|THREAT_BUILDINGS|THREAT_INFANTRY)
  818. /**********************************************************************
  819. ** These return values are used when determine if firing is legal.
  820. ** By examining this value it can be determined what should be done
  821. ** to fix the reason why firing wasn't allowed.
  822. */
  823. typedef enum FireErrorType : unsigned char{
  824. FIRE_OK, // Weapon is allowed to fire.
  825. FIRE_AMMO, // No ammo available to fire?
  826. FIRE_FACING, // Not correctly facing target?
  827. FIRE_REARM, // It is busy rearming?
  828. FIRE_ROTATING, // Is it in process of rotating?
  829. FIRE_ILLEGAL, // Is it targeting something illegal?
  830. FIRE_CANT, // Is this unit one that cannot fire anything?
  831. FIRE_MOVING, // Is it moving and not allowed to fire while moving?
  832. FIRE_RANGE, // Is the target out of range?
  833. FIRE_CLOAKED, // Is the shooter currently cloaked?
  834. FIRE_BUSY // Is shooter currently doing something else?
  835. } FireErrorType;
  836. /**********************************************************************
  837. ** If an object can cloak, then it will be in one of these states.
  838. ** For objects that cannot cloak, they will always be in the
  839. ** UNCLOAKED state. This state controls how the object transitions between
  840. ** cloaked and uncloaked conditions.
  841. */
  842. typedef enum CloakType : unsigned char {
  843. UNCLOAKED, // Completely visible (normal state).
  844. CLOAKING, // In process of cloaking.
  845. CLOAKED, // Completely cloaked (invisible).
  846. UNCLOAKING // In process of uncloaking.
  847. } CloakType;
  848. /**********************************************************************
  849. ** For units that are cloaking, these value specify the visual character
  850. ** of the object.
  851. */
  852. typedef enum VisualType : unsigned char{
  853. VISUAL_NORMAL, // Completely visible -- normal.
  854. VISUAL_INDISTINCT, // The edges shimmer and become indistinct.
  855. VISUAL_DARKEN, // Color and texture is muted along with shimmering.
  856. VISUAL_SHADOWY, // Body is translucent in addition to shimmering.
  857. VISUAL_RIPPLE, // Just a ripple (true predator effect).
  858. VISUAL_HIDDEN // Nothing at all is visible.
  859. } VisualType;
  860. /**********************************************************************
  861. ** These missions enumerate the various state machines that can apply to
  862. ** a game object. Only one of these state machines is active at any one
  863. ** time.
  864. */
  865. typedef enum MissionType : char {
  866. MISSION_NONE=-1,
  867. MISSION_SLEEP, // Do nothing whatsoever.
  868. MISSION_ATTACK, // Attack nearest enemy.
  869. MISSION_MOVE, // Guard location or unit.
  870. MISSION_QMOVE, // A queue list movement mission.
  871. MISSION_RETREAT, // Return home for R & R.
  872. MISSION_GUARD, // Stay still.
  873. MISSION_STICKY, // Stay still -- never recruit.
  874. MISSION_ENTER, // Move into object cooperatively.
  875. MISSION_CAPTURE, // Move into in order to capture.
  876. MISSION_HARVEST, // Hunt for and collect nearby Tiberium.
  877. MISSION_GUARD_AREA, // Active guard of area.
  878. MISSION_RETURN, // Head back to refinery.
  879. MISSION_STOP, // Sit still.
  880. MISSION_AMBUSH, // Wait until discovered.
  881. MISSION_HUNT, // Active search and destroy.
  882. MISSION_UNLOAD, // Search for and deliver cargo.
  883. MISSION_SABOTAGE, // Move into in order to destroy.
  884. MISSION_CONSTRUCTION, // Building buildup operation.
  885. MISSION_DECONSTRUCTION, // Building builddown operation.
  886. MISSION_REPAIR, // Repair process mission.
  887. MISSION_RESCUE,
  888. MISSION_MISSILE,
  889. MISSION_HARMLESS, // Sit around and don't appear like a threat.
  890. MISSION_COUNT,
  891. MISSION_FIRST=0
  892. } MissionType;
  893. /**********************************************************************
  894. ** These are the enumerated animation sequences that a building may
  895. ** be processing. These serve to control the way that a building
  896. ** appears.
  897. */
  898. typedef enum BStateType : char {
  899. BSTATE_NONE=-1,
  900. BSTATE_CONSTRUCTION, // Construction animation.
  901. BSTATE_IDLE, // Idle animation.
  902. BSTATE_ACTIVE, // Animation when building is "doing its thing".
  903. BSTATE_FULL, // Special alternate active state.
  904. BSTATE_AUX1, // Auxiliary animation.
  905. BSTATE_AUX2, // Auxiliary animation.
  906. BSTATE_COUNT
  907. } BStateType;
  908. /**********************************************************************
  909. ** Whenever a unit is selected and a click occurs over another object
  910. ** or terrain element, there is some action to initiate. This specifies
  911. ** the different types of actions possible. This also controls how the
  912. ** mouse cursor looks when "hovering" over the spot that clicking would
  913. ** occur at.
  914. */
  915. typedef enum ActionType : unsigned char {
  916. ACTION_NONE, // Either undefined action or "do nothing".
  917. ACTION_MOVE, // Can move there or at least try to.
  918. ACTION_NOMOVE, // Special case for movable object, but illegal mouse position.
  919. ACTION_ENTER, // Special case for infantry->APC or vehicle->Repair facility.
  920. ACTION_SELF, // Self select special case.
  921. ACTION_ATTACK, // Can attack or fire upon it in some fashion.
  922. ACTION_HARVEST, // Special harvest mode.
  923. ACTION_SELECT, // Would change selection to specified object.
  924. ACTION_TOGGLE_SELECT,// Toggles select state of the object.
  925. ACTION_CAPTURE, // The unit will try to capture the object.
  926. ACTION_REPAIR, // The target object should be repaired.
  927. ACTION_SELL, // The target building should be sold back.
  928. ACTION_SELL_UNIT, // The target unit should be sold back.
  929. ACTION_NO_SELL, // No sell or no repair.
  930. ACTION_NO_REPAIR, // No sell or no repair.
  931. ACTION_SABOTAGE, // The unit will try to sabotage/destroy the object.
  932. ACTION_PARA_BOMB, // Parachute bomb strike.
  933. ACTION_PARA_INFANTRY,// Parachute infantry strike.
  934. ACTION_PARA_SABOTEUR,// Parachute saboteur strike.
  935. ACTION_NUKE_BOMB, // That target object should be blasted.
  936. ACTION_AIR_STRIKE, // That target object should be blasted.
  937. ACTION_CHRONOSPHERE, // That target object should be teleported.
  938. ACTION_CHRONO2, // Teleport it to the given coordinates now.
  939. ACTION_IRON_CURTAIN, // That target object should be invulnerable.
  940. ACTION_SPY_MISSION, // Photo recon mission.
  941. ACTION_GUARD_AREA, // Guard the area/object clicked on.
  942. ACTION_HEAL, // Heal the infantryman clicked on.
  943. ACTION_DAMAGE, // Enter and damage building.
  944. ACTION_GREPAIR, // Enter and complete repair building.
  945. ACTION_NO_DEPLOY,
  946. ACTION_NO_ENTER,
  947. ACTION_NO_GREPAIR,
  948. ACTION_TOGGLE_PRIMARY, // Toggle the primary status of the factory.
  949. ACTION_COUNT
  950. } ActionType;
  951. /**********************************************************************
  952. ** When a unit gets damaged, the result of the damage is returned as
  953. ** this type. It can range from no damage taken to complete destruction.
  954. */
  955. typedef enum ResultType : unsigned char {
  956. RESULT_NONE, // No damage was taken by the target.
  957. RESULT_LIGHT, // Some damage was taken, but no state change occurred.
  958. RESULT_HALF, // Damaged to below half strength (only returned on transition).
  959. RESULT_MAJOR, // Damaged down to 1 hit point.
  960. RESULT_DESTROYED // Damaged to complete destruction.
  961. } ResultType;
  962. #ifdef OBSOLETE
  963. /**********************************************************************
  964. ** These are the special concrete control defines. They enumerate the
  965. ** sequence order of the concrete icons in the concrete art file.
  966. */
  967. // DEBUG === convert this to be zero based so that a nulled cell is the
  968. // default cell.
  969. enum ConcreteEnum {
  970. C_NONE=-1,
  971. C_LEFT=0,
  972. C_RIGHT=1,
  973. C_RIGHT_UPDOWN=2,
  974. C_LEFT_UPDOWN=3,
  975. C_UP_RIGHT=4,
  976. C_UP_LEFT=5,
  977. C_DOWN_RIGHT=6,
  978. C_DOWN_LEFT=7,
  979. C_RIGHT_DOWN=8,
  980. C_LEFT_DOWN=9,
  981. C_RIGHT_UP=10,
  982. C_LEFT_UP=11,
  983. C_UPDOWN_RIGHT=12,
  984. C_UPDOWN_LEFT=13
  985. };
  986. #endif
  987. /**********************************************************************
  988. ** Units that move can move at different speeds. These enumerate the
  989. ** different speeds that a unit can move.
  990. */
  991. typedef enum MPHType : unsigned char {
  992. MPH_IMMOBILE=0,
  993. MPH_VERY_SLOW=5, // 2
  994. MPH_KINDA_SLOW=6, // 3
  995. MPH_SLOW=8, // 4
  996. MPH_SLOW_ISH=10, // 5
  997. MPH_MEDIUM_SLOW=12, // 6
  998. MPH_MEDIUM=18, // 9
  999. MPH_MEDIUM_FAST=30, // 12
  1000. MPH_MEDIUM_FASTER=35, // 14
  1001. MPH_FAST=40, // 16
  1002. MPH_ROCKET=60, // 24
  1003. MPH_VERY_FAST=100, // 40
  1004. MPH_LIGHT_SPEED=255 // 100
  1005. } MPHType;
  1006. /**********************************************************************
  1007. ** The houses that can be played are listed here. Each has their own
  1008. ** personality and strengths.
  1009. */
  1010. typedef enum HousesType : char {
  1011. HOUSE_NONE=-1,
  1012. HOUSE_SPAIN, // Gold (unremapped)
  1013. HOUSE_GREECE, // LtBlue
  1014. HOUSE_USSR, // Red
  1015. HOUSE_ENGLAND, // Green
  1016. HOUSE_UKRAINE, // Orange
  1017. HOUSE_GERMANY, // Grey
  1018. HOUSE_FRANCE, // Blue
  1019. HOUSE_TURKEY, // Brown
  1020. HOUSE_GOOD, // Global Defense Initiative
  1021. HOUSE_BAD, // Brotherhood of Nod
  1022. HOUSE_NEUTRAL, // Civilians
  1023. HOUSE_JP, // Disaster Containment Team
  1024. HOUSE_MULTI1, // Multi-Player house #1
  1025. HOUSE_MULTI2, // Multi-Player house #2
  1026. HOUSE_MULTI3, // Multi-Player house #3
  1027. HOUSE_MULTI4, // Multi-Player house #4
  1028. HOUSE_MULTI5, // Multi-Player house #5
  1029. HOUSE_MULTI6, // Multi-Player house #6
  1030. HOUSE_MULTI7, // Multi-Player house #7
  1031. HOUSE_MULTI8, // Multi-Player house #8
  1032. HOUSE_COUNT,
  1033. HOUSE_FIRST=0
  1034. } HousesType;
  1035. //inline HousesType operator++(HousesType &, int) {return (HousesType)(int;
  1036. inline HousesType operator++(HousesType &ht) { ht = (HousesType)(((int)ht)+1); return ht; }
  1037. #define HOUSEF_ALLIES (HOUSEF_ENGLAND|HOUSEF_SPAIN|HOUSEF_GREECE|HOUSEF_GERMANY|HOUSEF_FRANCE|HOUSEF_TURKEY|HOUSEF_GOOD)
  1038. #define HOUSEF_SOVIET (HOUSEF_USSR|HOUSEF_UKRAINE|HOUSEF_BAD)
  1039. #define HOUSEF_OTHERS (HOUSEF_NEUTRAL|HOUSEF_JP|HOUSEF_MULTI1|HOUSEF_MULTI2|HOUSEF_MULTI3|HOUSEF_MULTI4|HOUSEF_MULTI5|HOUSEF_MULTI6|HOUSEF_MULTI7|HOUSEF_MULTI8)
  1040. #define HOUSEF_NONE 0
  1041. #define HOUSEF_ENGLAND (1L<<HOUSE_ENGLAND)
  1042. #define HOUSEF_SPAIN (1L<<HOUSE_SPAIN)
  1043. #define HOUSEF_GREECE (1L<<HOUSE_GREECE)
  1044. #define HOUSEF_USSR (1L<<HOUSE_USSR)
  1045. #define HOUSEF_UKRAINE (1L<<HOUSE_UKRAINE)
  1046. #define HOUSEF_GERMANY (1L<<HOUSE_GERMANY)
  1047. #define HOUSEF_FRANCE (1L<<HOUSE_FRANCE)
  1048. #define HOUSEF_TURKEY (1L<<HOUSE_TURKEY)
  1049. #define HOUSEF_GOOD (1L<<HOUSE_GOOD)
  1050. #define HOUSEF_BAD (1L<<HOUSE_BAD)
  1051. #define HOUSEF_NEUTRAL (1L<<HOUSE_NEUTRAL)
  1052. #define HOUSEF_JP (1L<<HOUSE_JP)
  1053. #define HOUSEF_MULTI1 (1L<<HOUSE_MULTI1)
  1054. #define HOUSEF_MULTI2 (1L<<HOUSE_MULTI2)
  1055. #define HOUSEF_MULTI3 (1L<<HOUSE_MULTI3)
  1056. #define HOUSEF_MULTI4 (1L<<HOUSE_MULTI4)
  1057. #define HOUSEF_MULTI5 (1L<<HOUSE_MULTI5)
  1058. #define HOUSEF_MULTI6 (1L<<HOUSE_MULTI6)
  1059. #define HOUSEF_MULTI7 (1L<<HOUSE_MULTI7)
  1060. #define HOUSEF_MULTI8 (1L<<HOUSE_MULTI8)
  1061. typedef enum PlayerColorType : char {
  1062. PCOLOR_NONE = -1,
  1063. PCOLOR_GOLD,
  1064. PCOLOR_LTBLUE,
  1065. PCOLOR_RED,
  1066. PCOLOR_GREEN,
  1067. PCOLOR_ORANGE,
  1068. PCOLOR_BLUE, //This is actually the red scheme used in the dialogs
  1069. PCOLOR_GREY,
  1070. PCOLOR_BROWN,
  1071. PCOLOR_TYPE,
  1072. PCOLOR_REALLY_BLUE,
  1073. PCOLOR_DIALOG_BLUE,
  1074. PCOLOR_COUNT,
  1075. PCOLOR_FIRST=0,
  1076. PCOLOR_LAST=PCOLOR_COUNT-1
  1077. } PlayerColorType;
  1078. /**********************************************************************
  1079. ** This enumerates the remap logic to be applied to an object type when
  1080. ** it appears in the construction sidebar.
  1081. */
  1082. typedef enum RemapType : unsigned char {
  1083. REMAP_NONE,
  1084. REMAP_NORMAL,
  1085. REMAP_ALTERNATE
  1086. } RemapType;
  1087. /**********************************************************************
  1088. ** These are the types of games that can be played. GDI & NOD are the
  1089. ** usual human-vs-computer games; 2-Player games are network or modem,
  1090. ** with 2 players; multi-player games are network with > 2 players.
  1091. */
  1092. typedef enum ScenarioPlayerEnum : char
  1093. {
  1094. SCEN_PLAYER_NONE = -1,
  1095. SCEN_PLAYER_SPAIN,
  1096. SCEN_PLAYER_GREECE,
  1097. SCEN_PLAYER_USSR,
  1098. SCEN_PLAYER_JP,
  1099. SCEN_PLAYER_2PLAYER,
  1100. SCEN_PLAYER_MPLAYER,
  1101. SCEN_PLAYER_COUNT,
  1102. SCEN_PLAYER_FIRST = 0
  1103. } ScenarioPlayerType;
  1104. inline ScenarioPlayerType operator++(ScenarioPlayerType &, int);
  1105. /**********************************************************************
  1106. ** These are the directional parameters for a scenario.
  1107. */
  1108. typedef enum ScenarioDirEnum : char
  1109. {
  1110. SCEN_DIR_NONE = -1,
  1111. SCEN_DIR_EAST,
  1112. SCEN_DIR_WEST,
  1113. SCEN_DIR_COUNT,
  1114. SCEN_DIR_FIRST = 0
  1115. } ScenarioDirType;
  1116. inline ScenarioDirType operator++(ScenarioDirType &, int);
  1117. /**********************************************************************
  1118. ** These are the random variations of a scenario.
  1119. */
  1120. typedef enum ScenarioVarEnum : char
  1121. {
  1122. SCEN_VAR_NONE = -1,
  1123. SCEN_VAR_A,
  1124. SCEN_VAR_B,
  1125. SCEN_VAR_C,
  1126. SCEN_VAR_D,
  1127. SCEN_VAR_COUNT, // comes before the Lose value!
  1128. SCEN_VAR_LOSE,
  1129. SCEN_VAR_FIRST = 0
  1130. } ScenarioVarType;
  1131. //inline ScenarioVarType operator++(ScenarioVarType &, int);
  1132. inline ScenarioVarType operator++(ScenarioVarType &n) { n = (ScenarioVarType)(((int)n) + 1); return n; }
  1133. /**********************************************************************
  1134. ** The objects to be drawn on the map are grouped into layers. These
  1135. ** enumerated values specify those layers. The ground layer is sorted
  1136. ** from back to front.
  1137. */
  1138. typedef enum LayerType : char {
  1139. LAYER_NONE=-1,
  1140. LAYER_SURFACE, // Flat on the ground (no sorting or apparent vertical height).
  1141. LAYER_GROUND, // Touching the ground type object (units & buildings).
  1142. LAYER_AIR, // Flying above the ground (explosions & flames).
  1143. LAYER_TOP, // Topmost layer (aircraft & bullets).
  1144. LAYER_COUNT,
  1145. LAYER_FIRST=0
  1146. } LayerType;
  1147. //PG inline LayerType operator++(LayerType &, int);
  1148. inline LayerType operator++(LayerType &n) { n = (LayerType)(((int)n) + 1); return n; }
  1149. /**********************************************************************
  1150. ** This enumerates the various bullet types. These types specify bullet's
  1151. ** visual and explosive characteristics.
  1152. */
  1153. typedef enum BulletType : char {
  1154. BULLET_NONE=-1,
  1155. BULLET_INVISIBLE,
  1156. BULLET_CANNON,
  1157. BULLET_ACK,
  1158. BULLET_TORPEDO,
  1159. BULLET_FROG,
  1160. BULLET_HEAT_SEEKER,
  1161. BULLET_LASER_GUIDED,
  1162. BULLET_LOBBED,
  1163. BULLET_BOMBLET,
  1164. BULLET_BALLISTIC,
  1165. BULLET_PARACHUTE,
  1166. BULLET_FIREBALL,
  1167. BULLET_DOG,
  1168. BULLET_CATAPULT,
  1169. BULLET_AAMISSILE,
  1170. BULLET_GPS_SATELLITE,
  1171. BULLET_NUKE_UP,
  1172. BULLET_NUKE_DOWN,
  1173. BULLET_COUNT,
  1174. BULLET_FIRST=0
  1175. } BulletType;
  1176. //PG inline BulletType operator++(BulletType &, int);
  1177. inline BulletType operator++(BulletType &n) { n = (BulletType)(((int)n) + 1); return n; }
  1178. /**********************************************************************
  1179. ** All game buildings (structures) are enumerated here. This includes
  1180. ** civilian structures as well.
  1181. */
  1182. typedef enum StructType : char {
  1183. STRUCT_NONE=-1,
  1184. STRUCT_ADVANCED_TECH,
  1185. STRUCT_IRON_CURTAIN,
  1186. STRUCT_WEAP,
  1187. STRUCT_CHRONOSPHERE,
  1188. STRUCT_PILLBOX,
  1189. STRUCT_CAMOPILLBOX,
  1190. STRUCT_RADAR,
  1191. STRUCT_GAP,
  1192. STRUCT_TURRET,
  1193. STRUCT_AAGUN,
  1194. STRUCT_FLAME_TURRET,
  1195. STRUCT_CONST,
  1196. STRUCT_REFINERY,
  1197. STRUCT_STORAGE,
  1198. STRUCT_HELIPAD,
  1199. STRUCT_SAM,
  1200. STRUCT_AIRSTRIP,
  1201. STRUCT_POWER,
  1202. STRUCT_ADVANCED_POWER,
  1203. STRUCT_SOVIET_TECH,
  1204. STRUCT_HOSPITAL,
  1205. STRUCT_BARRACKS,
  1206. STRUCT_TENT,
  1207. STRUCT_KENNEL,
  1208. STRUCT_REPAIR,
  1209. STRUCT_BIO_LAB,
  1210. STRUCT_MISSION,
  1211. STRUCT_SHIP_YARD,
  1212. STRUCT_SUB_PEN,
  1213. STRUCT_MSLO,
  1214. STRUCT_FORWARD_COM,
  1215. STRUCT_TESLA,
  1216. /*
  1217. ** All buildings that are never used as a prerequisite
  1218. ** for construction, follow this point. Typically, this is
  1219. ** limited to civilian structures. Also, the following
  1220. ** buildings are NEVER used in the availability bit field
  1221. ** record that each house maintains. i.e., STRUCTF_????
  1222. ** bit checking will never occur with the following
  1223. ** building types.
  1224. */
  1225. STRUCT_FAKEWEAP,
  1226. STRUCT_FAKECONST,
  1227. STRUCT_FAKE_YARD,
  1228. STRUCT_FAKE_PEN,
  1229. STRUCT_FAKE_RADAR,
  1230. STRUCT_SANDBAG_WALL,
  1231. STRUCT_CYCLONE_WALL,
  1232. STRUCT_BRICK_WALL,
  1233. STRUCT_BARBWIRE_WALL,
  1234. STRUCT_WOOD_WALL,
  1235. STRUCT_FENCE,
  1236. STRUCT_AVMINE,
  1237. STRUCT_APMINE,
  1238. STRUCT_V01,
  1239. STRUCT_V02,
  1240. STRUCT_V03,
  1241. STRUCT_V04,
  1242. STRUCT_V05,
  1243. STRUCT_V06,
  1244. STRUCT_V07,
  1245. STRUCT_V08,
  1246. STRUCT_V09,
  1247. STRUCT_V10,
  1248. STRUCT_V11,
  1249. STRUCT_V12,
  1250. STRUCT_V13,
  1251. STRUCT_V14,
  1252. STRUCT_V15,
  1253. STRUCT_V16,
  1254. STRUCT_V17,
  1255. STRUCT_V18,
  1256. STRUCT_PUMP,
  1257. STRUCT_V20,
  1258. STRUCT_V21,
  1259. STRUCT_V22,
  1260. STRUCT_V23,
  1261. STRUCT_V24,
  1262. STRUCT_V25,
  1263. STRUCT_V26,
  1264. STRUCT_V27,
  1265. STRUCT_V28,
  1266. STRUCT_V29,
  1267. STRUCT_V30,
  1268. STRUCT_V31,
  1269. STRUCT_V32,
  1270. STRUCT_V33,
  1271. STRUCT_V34,
  1272. STRUCT_V35,
  1273. STRUCT_V36,
  1274. STRUCT_V37,
  1275. STRUCT_BARREL,
  1276. STRUCT_BARREL3,
  1277. #ifdef FIXIT_ANTS
  1278. STRUCT_QUEEN,
  1279. STRUCT_LARVA1,
  1280. STRUCT_LARVA2,
  1281. #endif
  1282. STRUCT_COUNT,
  1283. STRUCT_FIRST=0
  1284. } StructType;
  1285. //PG inline StructType operator++(StructType &, int);
  1286. inline StructType operator++(StructType &n) { n = (StructType)(((int)n) + 1); return n; }
  1287. #define STRUCTF_NONE 0L
  1288. #define STRUCTF_ADVANCED_TECH (1L << STRUCT_ADVANCED_TECH)
  1289. #define STRUCTF_IRON_CURTAIN (1L << STRUCT_IRON_CURTAIN)
  1290. #define STRUCTF_WEAP (1L << STRUCT_WEAP)
  1291. #define STRUCTF_CHRONOSPHERE (1L << STRUCT_CHRONOSPHERE)
  1292. #define STRUCTF_PILLBOX (1L << STRUCT_PILLBOX)
  1293. #define STRUCTF_CAMOPILLBOX (1L << STRUCT_CAMOPILLBOX)
  1294. #define STRUCTF_RADAR (1L << STRUCT_RADAR)
  1295. #define STRUCTF_GAP (1L << STRUCT_GAP)
  1296. #define STRUCTF_TURRET (1L << STRUCT_TURRET)
  1297. #define STRUCTF_AAGUN (1L << STRUCT_AAGUN)
  1298. #define STRUCTF_FLAME_TURRET (1L << STRUCT_FLAME_TURRET)
  1299. #define STRUCTF_CONST (1L << STRUCT_CONST)
  1300. #define STRUCTF_REFINERY (1L << STRUCT_REFINERY)
  1301. #define STRUCTF_STORAGE (1L << STRUCT_STORAGE)
  1302. #define STRUCTF_HELIPAD (1L << STRUCT_HELIPAD)
  1303. #define STRUCTF_SAM (1L << STRUCT_SAM)
  1304. #define STRUCTF_AIRSTRIP (1L << STRUCT_AIRSTRIP)
  1305. #define STRUCTF_POWER (1L << STRUCT_POWER)
  1306. #define STRUCTF_ADVANCED_POWER (1L << STRUCT_ADVANCED_POWER)
  1307. #define STRUCTF_SOVIET_TECH (1L << STRUCT_SOVIET_TECH)
  1308. #define STRUCTF_HOSPITAL (1L << STRUCT_HOSPITAL)
  1309. #define STRUCTF_BARRACKS (1L << STRUCT_BARRACKS)
  1310. #define STRUCTF_TENT (1L << STRUCT_TENT)
  1311. #define STRUCTF_KENNEL (1L << STRUCT_KENNEL)
  1312. #define STRUCTF_REPAIR (1L << STRUCT_REPAIR)
  1313. #define STRUCTF_BIO_LAB (1L << STRUCT_BIO_LAB)
  1314. #define STRUCTF_MISSION (1L << STRUCT_MISSION)
  1315. #define STRUCTF_SHIP_YARD (1L << STRUCT_SHIP_YARD)
  1316. #define STRUCTF_SUB_PEN (1L << STRUCT_SUB_PEN)
  1317. #define STRUCTF_MSLO (1L << STRUCT_MSLO)
  1318. #define STRUCTF_FAKECONST (1L << STRUCT_FAKECONST)
  1319. #define STRUCTF_FAKEWEAP (1L << STRUCT_FAKEWEAP)
  1320. /**********************************************************************
  1321. ** The overlays are enumerated here. An overlay functions similarly to
  1322. ** a transparent icon. It is placed over the terrain but usually falls
  1323. ** "under" buildings, trees, and units.
  1324. */
  1325. typedef enum OverlayType : char {
  1326. OVERLAY_NONE=-1,
  1327. OVERLAY_SANDBAG_WALL, // Piled sandbags.
  1328. OVERLAY_CYCLONE_WALL, // Chain-link fence.
  1329. OVERLAY_BRICK_WALL, // Solid concrete wall.
  1330. OVERLAY_BARBWIRE_WALL, // Barbed-wire wall.
  1331. OVERLAY_WOOD_WALL, // Wooden fence.
  1332. OVERLAY_GOLD1,
  1333. OVERLAY_GOLD2,
  1334. OVERLAY_GOLD3,
  1335. OVERLAY_GOLD4,
  1336. OVERLAY_GEMS1,
  1337. OVERLAY_GEMS2,
  1338. OVERLAY_GEMS3,
  1339. OVERLAY_GEMS4,
  1340. OVERLAY_V12, // Haystacks
  1341. OVERLAY_V13, // Haystack
  1342. OVERLAY_V14, // Wheat field
  1343. OVERLAY_V15, // Fallow field
  1344. OVERLAY_V16, // Corn field
  1345. OVERLAY_V17, // Celery field
  1346. OVERLAY_V18, // Potato field
  1347. OVERLAY_FLAG_SPOT, // Flag start location.
  1348. OVERLAY_WOOD_CRATE, // Wooden goodie crate.
  1349. OVERLAY_STEEL_CRATE, // Steel goodie crate.
  1350. OVERLAY_FENCE, // New fangled fence.
  1351. OVERLAY_WATER_CRATE, // Water goodie crate.
  1352. OVERLAY_COUNT,
  1353. OVERLAY_FIRST=0
  1354. } OverlayType;
  1355. //PG inline OverlayType operator++(OverlayType &, int);
  1356. /**********************************************************************
  1357. ** This specifies the infantry in the game. The "E" designation is
  1358. ** similar to the army classification of enlisted soldiers.
  1359. */
  1360. typedef enum InfantryType : char {
  1361. INFANTRY_NONE=-1,
  1362. INFANTRY_E1, // Mini-gun armed.
  1363. INFANTRY_E2, // Grenade thrower.
  1364. INFANTRY_E3, // Rocket launcher.
  1365. INFANTRY_E4, // Flame thrower equipped.
  1366. INFANTRY_RENOVATOR, // Engineer.
  1367. INFANTRY_TANYA, // Saboteur.
  1368. INFANTRY_SPY, // Spy.
  1369. INFANTRY_THIEF, // Thief.
  1370. INFANTRY_MEDIC, // Field Medic.
  1371. INFANTRY_GENERAL, // Field Marshal.
  1372. INFANTRY_DOG, // Soviet attack dog
  1373. INFANTRY_C1, // Civilian
  1374. INFANTRY_C2, // Civilian
  1375. INFANTRY_C3, // Civilian
  1376. INFANTRY_C4, // Civilian
  1377. INFANTRY_C5, // Civilian
  1378. INFANTRY_C6, // Civilian
  1379. INFANTRY_C7, // Civilian
  1380. INFANTRY_C8, // Civilian
  1381. INFANTRY_C9, // Civilian
  1382. INFANTRY_C10, // Nikumba
  1383. INFANTRY_EINSTEIN, // Einstein
  1384. INFANTRY_DELPHI, // Agent "Delphi"
  1385. INFANTRY_CHAN, // Dr. Chan
  1386. #ifdef FIXIT_CSII // checked - ajw 9/28/98
  1387. // CounterStrike II only!
  1388. INFANTRY_SHOCK, // Shock Trooper
  1389. INFANTRY_MECHANIC,
  1390. #endif
  1391. INFANTRY_COUNT,
  1392. INFANTRY_FIRST=0
  1393. #ifdef FIXIT_CSII // checked - ajw 9/28/98
  1394. ,
  1395. INFANTRY_RA_COUNT = INFANTRY_SHOCK
  1396. #endif
  1397. } InfantryType;
  1398. #define INFANTRYF_DOG (1L << INFANTRY_DOG)
  1399. //PG inline InfantryType operator++(InfantryType &, int);
  1400. /**********************************************************************
  1401. ** The game units are enumerated here. These include not only traditional
  1402. ** vehicles, but also hovercraft and gunboats.
  1403. */
  1404. typedef enum UnitType : char {
  1405. UNIT_NONE=-1,
  1406. UNIT_HTANK, // Mammoth tank.
  1407. UNIT_MTANK, // Heavy tank.
  1408. UNIT_MTANK2, // Medium tank.
  1409. UNIT_LTANK, // Light tank ('Bradly').
  1410. UNIT_APC, // APC.
  1411. UNIT_MINELAYER, // Mine-laying vehicle.
  1412. UNIT_JEEP, // 4x4 jeep replacement.
  1413. UNIT_HARVESTER, // Resource gathering vehicle.
  1414. UNIT_ARTY, // Artillery unit.
  1415. UNIT_MRJ, // Mobile Radar Jammer.
  1416. UNIT_MGG, // Mobile Gap Generator
  1417. UNIT_MCV, // Mobile construction vehicle.
  1418. UNIT_V2_LAUNCHER, // V2 rocket launcher.
  1419. UNIT_TRUCK, // Convoy truck
  1420. #ifdef FIXIT_ANTS
  1421. UNIT_ANT1, // Warrior ant.
  1422. UNIT_ANT2, // Warrior ant.
  1423. UNIT_ANT3, // Warrior ant.
  1424. #endif
  1425. #ifdef FIXIT_CSII // checked - ajw 9/28/98
  1426. // CS II ONLY!
  1427. UNIT_CHRONOTANK, // Chrono-shifting tank
  1428. UNIT_TESLATANK, // Tesla-equipped tank
  1429. UNIT_MAD, // Timequake tank
  1430. UNIT_DEMOTRUCK, // Jihad truck
  1431. #ifdef FIXIT_PHASETRANSPORT // checked - ajw 9/28/98
  1432. UNIT_PHASE, // cloaking APC for special missions
  1433. #endif
  1434. #endif
  1435. UNIT_COUNT,
  1436. UNIT_FIRST=0
  1437. #ifdef FIXIT_CSII // checked - ajw 9/28/98
  1438. ,
  1439. UNIT_RA_COUNT = UNIT_CHRONOTANK
  1440. #endif
  1441. } UnitType;
  1442. //PG inline UnitType operator++(UnitType &, int);
  1443. #define UNITF_HTANK (1L<<UNIT_HTANK)
  1444. #define UNITF_MTANK (1L<<UNIT_MTANK)
  1445. #define UNITF_MTANK2 (1L<<UNIT_MTANK2)
  1446. #define UNITF_LTANK (1L<<UNIT_LTANK)
  1447. #define UNITF_STANK (1L<<UNIT_STANK)
  1448. #define UNITF_APC (1L<<UNIT_APC)
  1449. #define UNITF_MLRS (1L<<UNIT_MLRS)
  1450. #define UNITF_JEEP (1L<<UNIT_JEEP)
  1451. #define UNITF_HARVESTER (1L<<UNIT_HARVESTER)
  1452. #define UNITF_ARTY (1L<<UNIT_ARTY)
  1453. #define UNITF_MCV (1L<<UNIT_MCV)
  1454. /**********************************************************************
  1455. ** The naval vessels are enumerated below.
  1456. */
  1457. typedef enum VesselType : char {
  1458. VESSEL_NONE=-1,
  1459. VESSEL_SS, // Submarine
  1460. VESSEL_DD, // Medium weapon patrol craft
  1461. VESSEL_CA, // Heavy weapon patrol craft
  1462. VESSEL_TRANSPORT, // Unit transporter
  1463. VESSEL_PT, // Light weapon patrol craft
  1464. #ifdef FIXIT_CSII // checked - ajw 9/28/98
  1465. // CS II ONLY
  1466. VESSEL_MISSILESUB, // Missile-equipped submarine
  1467. #endif
  1468. #ifdef FIXIT_CARRIER // checked - ajw 9/28/98
  1469. VESSEL_CARRIER,
  1470. #endif
  1471. VESSEL_COUNT,
  1472. VESSEL_FIRST=0
  1473. #ifdef FIXIT_CSII // checked - ajw 9/28/98
  1474. ,
  1475. VESSEL_RA_COUNT = VESSEL_MISSILESUB
  1476. #endif
  1477. } VesselType;
  1478. //inline VesselType operator++(VesselType &, int);
  1479. #define VESSELF_SS (1L<<VESSEL_SS)
  1480. #define VESSELF_DD (1L<<VESSEL_DD)
  1481. #define VESSELF_CA (1L<<VESSEL_CA)
  1482. #define VESSELF_TRANSPORT (1L<<VESSEL_TRANSPORT)
  1483. #define VESSELF_PT (1L<<VESSEL_PT)
  1484. /**********************************************************************
  1485. ** The various aircraft types are enumerated here. These include helicopters
  1486. ** as well as traditional aircraft.
  1487. */
  1488. typedef enum AircraftType : char {
  1489. AIRCRAFT_TRANSPORT, // Transport helicopter.
  1490. AIRCRAFT_BADGER, // Badger bomber.
  1491. AIRCRAFT_U2, // Photo recon plane.
  1492. AIRCRAFT_MIG, // Mig attack plane.
  1493. AIRCRAFT_YAK, // Yak attack plane.
  1494. AIRCRAFT_LONGBOW, // Apache gunship.
  1495. AIRCRAFT_HIND, // Soviet attach helicopter.
  1496. AIRCRAFT_COUNT,
  1497. AIRCRAFT_NONE=-1,
  1498. AIRCRAFT_FIRST=0
  1499. } AircraftType;
  1500. #define AIRCRAFTF_TRANSPORT (1L << AIRCRAFT_TRANSPORT)
  1501. #define AIRCRAFTF_BADGER (1L << AIRCRAFT_BADGER)
  1502. #define AIRCRAFTF_U2 (1L << AIRCRAFT_U2)
  1503. #define AIRCRAFTF_MIG (1L << AIRCRAFT_MIG)
  1504. #define AIRCRAFTF_YAK (1L << AIRCRAFT_YAK)
  1505. #define AIRCRAFTF_LONGBOW (1L << AIRCRAFT_LONGBOW)
  1506. #define AIRCRAFTF_HIND (1L << AIRCRAFT_HIND)
  1507. //PG inline AircraftType operator++(AircraftType &, int);
  1508. /**********************************************************************
  1509. ** The game templates are enumerated here. These are the underlying
  1510. ** terrain art. This includes everything from water to cliffs. If the
  1511. ** terrain is broken up into icons, is not transparent, and is drawn
  1512. ** as the bottom most layer, then it is a template.
  1513. */
  1514. typedef enum TemplateType : unsigned short {
  1515. TEMPLATE_CLEAR1,
  1516. TEMPLATE_WATER, // This must be the first non-clear template.
  1517. TEMPLATE_WATER2,
  1518. TEMPLATE_SHORE01,
  1519. TEMPLATE_SHORE02,
  1520. TEMPLATE_SHORE03,
  1521. TEMPLATE_SHORE04,
  1522. TEMPLATE_SHORE05,
  1523. TEMPLATE_SHORE06,
  1524. TEMPLATE_SHORE07,
  1525. TEMPLATE_SHORE08,
  1526. TEMPLATE_SHORE09,
  1527. TEMPLATE_SHORE10,
  1528. TEMPLATE_SHORE11,
  1529. TEMPLATE_SHORE12,
  1530. TEMPLATE_SHORE13,
  1531. TEMPLATE_SHORE14,
  1532. TEMPLATE_SHORE15,
  1533. TEMPLATE_SHORE16,
  1534. TEMPLATE_SHORE17,
  1535. TEMPLATE_SHORE18,
  1536. TEMPLATE_SHORE19,
  1537. TEMPLATE_SHORE20,
  1538. TEMPLATE_SHORE21,
  1539. TEMPLATE_SHORE22,
  1540. TEMPLATE_SHORE23,
  1541. TEMPLATE_SHORE24,
  1542. TEMPLATE_SHORE25,
  1543. TEMPLATE_SHORE26,
  1544. TEMPLATE_SHORE27,
  1545. TEMPLATE_SHORE28,
  1546. TEMPLATE_SHORE29,
  1547. TEMPLATE_SHORE30,
  1548. TEMPLATE_SHORE31,
  1549. TEMPLATE_SHORE32,
  1550. TEMPLATE_SHORE33,
  1551. TEMPLATE_SHORE34,
  1552. TEMPLATE_SHORE35,
  1553. TEMPLATE_SHORE36,
  1554. TEMPLATE_SHORE37,
  1555. TEMPLATE_SHORE38,
  1556. TEMPLATE_SHORE39,
  1557. TEMPLATE_SHORE40,
  1558. TEMPLATE_SHORE41,
  1559. TEMPLATE_SHORE42,
  1560. TEMPLATE_SHORE43,
  1561. TEMPLATE_SHORE44,
  1562. TEMPLATE_SHORE45,
  1563. TEMPLATE_SHORE46,
  1564. TEMPLATE_SHORE47,
  1565. TEMPLATE_SHORE48,
  1566. TEMPLATE_SHORE49,
  1567. TEMPLATE_SHORE50,
  1568. TEMPLATE_SHORE51,
  1569. TEMPLATE_SHORE52,
  1570. TEMPLATE_SHORE53,
  1571. TEMPLATE_SHORE54,
  1572. TEMPLATE_SHORE55,
  1573. TEMPLATE_SHORE56,
  1574. TEMPLATE_SHORECLIFF01,
  1575. TEMPLATE_SHORECLIFF02,
  1576. TEMPLATE_SHORECLIFF03,
  1577. TEMPLATE_SHORECLIFF04,
  1578. TEMPLATE_SHORECLIFF05,
  1579. TEMPLATE_SHORECLIFF06,
  1580. TEMPLATE_SHORECLIFF07,
  1581. TEMPLATE_SHORECLIFF08,
  1582. TEMPLATE_SHORECLIFF09,
  1583. TEMPLATE_SHORECLIFF10,
  1584. TEMPLATE_SHORECLIFF11,
  1585. TEMPLATE_SHORECLIFF12,
  1586. TEMPLATE_SHORECLIFF13,
  1587. TEMPLATE_SHORECLIFF14,
  1588. TEMPLATE_SHORECLIFF15,
  1589. TEMPLATE_SHORECLIFF16,
  1590. TEMPLATE_SHORECLIFF17,
  1591. TEMPLATE_SHORECLIFF18,
  1592. TEMPLATE_SHORECLIFF19,
  1593. TEMPLATE_SHORECLIFF20,
  1594. TEMPLATE_SHORECLIFF21,
  1595. TEMPLATE_SHORECLIFF22,
  1596. TEMPLATE_SHORECLIFF23,
  1597. TEMPLATE_SHORECLIFF24,
  1598. TEMPLATE_SHORECLIFF25,
  1599. TEMPLATE_SHORECLIFF26,
  1600. TEMPLATE_SHORECLIFF27,
  1601. TEMPLATE_SHORECLIFF28,
  1602. TEMPLATE_SHORECLIFF29,
  1603. TEMPLATE_SHORECLIFF30,
  1604. TEMPLATE_SHORECLIFF31,
  1605. TEMPLATE_SHORECLIFF32,
  1606. TEMPLATE_SHORECLIFF33,
  1607. TEMPLATE_SHORECLIFF34,
  1608. TEMPLATE_SHORECLIFF35,
  1609. TEMPLATE_SHORECLIFF36,
  1610. TEMPLATE_SHORECLIFF37,
  1611. TEMPLATE_SHORECLIFF38,
  1612. TEMPLATE_BOULDER1,
  1613. TEMPLATE_BOULDER2,
  1614. TEMPLATE_BOULDER3,
  1615. TEMPLATE_BOULDER4,
  1616. TEMPLATE_BOULDER5,
  1617. TEMPLATE_BOULDER6,
  1618. TEMPLATE_PATCH01,
  1619. TEMPLATE_PATCH02,
  1620. TEMPLATE_PATCH03,
  1621. TEMPLATE_PATCH04,
  1622. TEMPLATE_PATCH07,
  1623. TEMPLATE_PATCH08,
  1624. TEMPLATE_PATCH13,
  1625. TEMPLATE_PATCH14,
  1626. TEMPLATE_PATCH15,
  1627. TEMPLATE_RIVER01,
  1628. TEMPLATE_RIVER02,
  1629. TEMPLATE_RIVER03,
  1630. TEMPLATE_RIVER04,
  1631. TEMPLATE_RIVER05,
  1632. TEMPLATE_RIVER06,
  1633. TEMPLATE_RIVER07,
  1634. TEMPLATE_RIVER08,
  1635. TEMPLATE_RIVER09,
  1636. TEMPLATE_RIVER10,
  1637. TEMPLATE_RIVER11,
  1638. TEMPLATE_RIVER12,
  1639. TEMPLATE_RIVER13,
  1640. TEMPLATE_FALLS1,
  1641. TEMPLATE_FALLS1A,
  1642. TEMPLATE_FALLS2,
  1643. TEMPLATE_FALLS2A,
  1644. TEMPLATE_FORD1,
  1645. TEMPLATE_FORD2,
  1646. TEMPLATE_BRIDGE1,
  1647. TEMPLATE_BRIDGE1D,
  1648. TEMPLATE_BRIDGE2,
  1649. TEMPLATE_BRIDGE2D,
  1650. TEMPLATE_SLOPE01,
  1651. TEMPLATE_SLOPE02,
  1652. TEMPLATE_SLOPE03,
  1653. TEMPLATE_SLOPE04,
  1654. TEMPLATE_SLOPE05,
  1655. TEMPLATE_SLOPE06,
  1656. TEMPLATE_SLOPE07,
  1657. TEMPLATE_SLOPE08,
  1658. TEMPLATE_SLOPE09,
  1659. TEMPLATE_SLOPE10,
  1660. TEMPLATE_SLOPE11,
  1661. TEMPLATE_SLOPE12,
  1662. TEMPLATE_SLOPE13,
  1663. TEMPLATE_SLOPE14,
  1664. TEMPLATE_SLOPE15,
  1665. TEMPLATE_SLOPE16,
  1666. TEMPLATE_SLOPE17,
  1667. TEMPLATE_SLOPE18,
  1668. TEMPLATE_SLOPE19,
  1669. TEMPLATE_SLOPE20,
  1670. TEMPLATE_SLOPE21,
  1671. TEMPLATE_SLOPE22,
  1672. TEMPLATE_SLOPE23,
  1673. TEMPLATE_SLOPE24,
  1674. TEMPLATE_SLOPE25,
  1675. TEMPLATE_SLOPE26,
  1676. TEMPLATE_SLOPE27,
  1677. TEMPLATE_SLOPE28,
  1678. TEMPLATE_SLOPE29,
  1679. TEMPLATE_SLOPE30,
  1680. TEMPLATE_SLOPE31,
  1681. TEMPLATE_SLOPE32,
  1682. TEMPLATE_SLOPE33,
  1683. TEMPLATE_SLOPE34,
  1684. TEMPLATE_SLOPE35,
  1685. TEMPLATE_SLOPE36,
  1686. TEMPLATE_SLOPE37,
  1687. TEMPLATE_SLOPE38,
  1688. TEMPLATE_ROAD01,
  1689. TEMPLATE_ROAD02,
  1690. TEMPLATE_ROAD03,
  1691. TEMPLATE_ROAD04,
  1692. TEMPLATE_ROAD05,
  1693. TEMPLATE_ROAD06,
  1694. TEMPLATE_ROAD07,
  1695. TEMPLATE_ROAD08,
  1696. TEMPLATE_ROAD09,
  1697. TEMPLATE_ROAD10,
  1698. TEMPLATE_ROAD11,
  1699. TEMPLATE_ROAD12,
  1700. TEMPLATE_ROAD13,
  1701. TEMPLATE_ROAD14,
  1702. TEMPLATE_ROAD15,
  1703. TEMPLATE_ROAD16,
  1704. TEMPLATE_ROAD17,
  1705. TEMPLATE_ROAD18,
  1706. TEMPLATE_ROAD19,
  1707. TEMPLATE_ROAD20,
  1708. TEMPLATE_ROAD21,
  1709. TEMPLATE_ROAD22,
  1710. TEMPLATE_ROAD23,
  1711. TEMPLATE_ROAD24,
  1712. TEMPLATE_ROAD25,
  1713. TEMPLATE_ROAD26,
  1714. TEMPLATE_ROAD27,
  1715. TEMPLATE_ROAD28,
  1716. TEMPLATE_ROAD29,
  1717. TEMPLATE_ROAD30,
  1718. TEMPLATE_ROAD31,
  1719. TEMPLATE_ROAD32,
  1720. TEMPLATE_ROAD33,
  1721. TEMPLATE_ROAD34,
  1722. TEMPLATE_ROAD35,
  1723. TEMPLATE_ROAD36,
  1724. TEMPLATE_ROAD37,
  1725. TEMPLATE_ROAD38,
  1726. TEMPLATE_ROAD39,
  1727. TEMPLATE_ROAD40,
  1728. TEMPLATE_ROAD41,
  1729. TEMPLATE_ROAD42,
  1730. TEMPLATE_ROAD43,
  1731. TEMPLATE_ROUGH01,
  1732. TEMPLATE_ROUGH02,
  1733. TEMPLATE_ROUGH03,
  1734. TEMPLATE_ROUGH04,
  1735. TEMPLATE_ROUGH05,
  1736. TEMPLATE_ROUGH06,
  1737. TEMPLATE_ROUGH07,
  1738. TEMPLATE_ROUGH08,
  1739. TEMPLATE_ROUGH09,
  1740. TEMPLATE_ROUGH10,
  1741. TEMPLATE_ROUGH11,
  1742. TEMPLATE_ROAD44,
  1743. TEMPLATE_ROAD45,
  1744. TEMPLATE_RIVER14,
  1745. TEMPLATE_RIVER15,
  1746. TEMPLATE_RIVERCLIFF01,
  1747. TEMPLATE_RIVERCLIFF02,
  1748. TEMPLATE_RIVERCLIFF03,
  1749. TEMPLATE_RIVERCLIFF04,
  1750. TEMPLATE_BRIDGE_1A,
  1751. TEMPLATE_BRIDGE_1B,
  1752. TEMPLATE_BRIDGE_1C,
  1753. TEMPLATE_BRIDGE_2A,
  1754. TEMPLATE_BRIDGE_2B,
  1755. TEMPLATE_BRIDGE_2C,
  1756. TEMPLATE_BRIDGE_3A,
  1757. TEMPLATE_BRIDGE_3B,
  1758. TEMPLATE_BRIDGE_3C,
  1759. TEMPLATE_BRIDGE_3D,
  1760. TEMPLATE_BRIDGE_3E,
  1761. TEMPLATE_BRIDGE_3F,
  1762. TEMPLATE_F01,
  1763. TEMPLATE_F02,
  1764. TEMPLATE_F03,
  1765. TEMPLATE_F04,
  1766. TEMPLATE_F05,
  1767. TEMPLATE_F06,
  1768. // Custom interior pieces.
  1769. TEMPLATE_ARRO0001,
  1770. TEMPLATE_ARRO0002,
  1771. TEMPLATE_ARRO0003,
  1772. TEMPLATE_ARRO0004,
  1773. TEMPLATE_ARRO0005,
  1774. TEMPLATE_ARRO0006,
  1775. TEMPLATE_ARRO0007,
  1776. TEMPLATE_ARRO0008,
  1777. TEMPLATE_ARRO0009,
  1778. TEMPLATE_ARRO0010,
  1779. TEMPLATE_ARRO0011,
  1780. TEMPLATE_ARRO0012,
  1781. TEMPLATE_ARRO0013,
  1782. TEMPLATE_ARRO0014,
  1783. TEMPLATE_ARRO0015,
  1784. TEMPLATE_FLOR0001,
  1785. TEMPLATE_FLOR0002,
  1786. TEMPLATE_FLOR0003,
  1787. TEMPLATE_FLOR0004,
  1788. TEMPLATE_FLOR0005,
  1789. TEMPLATE_FLOR0006,
  1790. TEMPLATE_FLOR0007,
  1791. TEMPLATE_GFLR0001,
  1792. TEMPLATE_GFLR0002,
  1793. TEMPLATE_GFLR0003,
  1794. TEMPLATE_GFLR0004,
  1795. TEMPLATE_GFLR0005,
  1796. TEMPLATE_GSTR0001,
  1797. TEMPLATE_GSTR0002,
  1798. TEMPLATE_GSTR0003,
  1799. TEMPLATE_GSTR0004,
  1800. TEMPLATE_GSTR0005,
  1801. TEMPLATE_GSTR0006,
  1802. TEMPLATE_GSTR0007,
  1803. TEMPLATE_GSTR0008,
  1804. TEMPLATE_GSTR0009,
  1805. TEMPLATE_GSTR0010,
  1806. TEMPLATE_GSTR0011,
  1807. TEMPLATE_LWAL0001,
  1808. TEMPLATE_LWAL0002,
  1809. TEMPLATE_LWAL0003,
  1810. TEMPLATE_LWAL0004,
  1811. TEMPLATE_LWAL0005,
  1812. TEMPLATE_LWAL0006,
  1813. TEMPLATE_LWAL0007,
  1814. TEMPLATE_LWAL0008,
  1815. TEMPLATE_LWAL0009,
  1816. TEMPLATE_LWAL0010,
  1817. TEMPLATE_LWAL0011,
  1818. TEMPLATE_LWAL0012,
  1819. TEMPLATE_LWAL0013,
  1820. TEMPLATE_LWAL0014,
  1821. TEMPLATE_LWAL0015,
  1822. TEMPLATE_LWAL0016,
  1823. TEMPLATE_LWAL0017,
  1824. TEMPLATE_LWAL0018,
  1825. TEMPLATE_LWAL0019,
  1826. TEMPLATE_LWAL0020,
  1827. TEMPLATE_LWAL0021,
  1828. TEMPLATE_LWAL0022,
  1829. TEMPLATE_LWAL0023,
  1830. TEMPLATE_LWAL0024,
  1831. TEMPLATE_LWAL0025,
  1832. TEMPLATE_LWAL0026,
  1833. TEMPLATE_LWAL0027,
  1834. TEMPLATE_STRP0001,
  1835. TEMPLATE_STRP0002,
  1836. TEMPLATE_STRP0003,
  1837. TEMPLATE_STRP0004,
  1838. TEMPLATE_STRP0005,
  1839. TEMPLATE_STRP0006,
  1840. TEMPLATE_STRP0007,
  1841. TEMPLATE_STRP0008,
  1842. TEMPLATE_STRP0009,
  1843. TEMPLATE_STRP0010,
  1844. TEMPLATE_STRP0011,
  1845. TEMPLATE_WALL0001,
  1846. TEMPLATE_WALL0002,
  1847. TEMPLATE_WALL0003,
  1848. TEMPLATE_WALL0004,
  1849. TEMPLATE_WALL0005,
  1850. TEMPLATE_WALL0006,
  1851. TEMPLATE_WALL0007,
  1852. TEMPLATE_WALL0008,
  1853. TEMPLATE_WALL0009,
  1854. TEMPLATE_WALL0010,
  1855. TEMPLATE_WALL0011,
  1856. TEMPLATE_WALL0012,
  1857. TEMPLATE_WALL0013,
  1858. TEMPLATE_WALL0014,
  1859. TEMPLATE_WALL0015,
  1860. TEMPLATE_WALL0016,
  1861. TEMPLATE_WALL0017,
  1862. TEMPLATE_WALL0018,
  1863. TEMPLATE_WALL0019,
  1864. TEMPLATE_WALL0020,
  1865. TEMPLATE_WALL0021,
  1866. TEMPLATE_WALL0022,
  1867. TEMPLATE_WALL0023,
  1868. TEMPLATE_WALL0024,
  1869. TEMPLATE_WALL0025,
  1870. TEMPLATE_WALL0026,
  1871. TEMPLATE_WALL0027,
  1872. TEMPLATE_WALL0028,
  1873. TEMPLATE_WALL0029,
  1874. TEMPLATE_WALL0030,
  1875. TEMPLATE_WALL0031,
  1876. TEMPLATE_WALL0032,
  1877. TEMPLATE_WALL0033,
  1878. TEMPLATE_WALL0034,
  1879. TEMPLATE_WALL0035,
  1880. TEMPLATE_WALL0036,
  1881. TEMPLATE_WALL0037,
  1882. TEMPLATE_WALL0038,
  1883. TEMPLATE_WALL0039,
  1884. TEMPLATE_WALL0040,
  1885. TEMPLATE_WALL0041,
  1886. TEMPLATE_WALL0042,
  1887. TEMPLATE_WALL0043,
  1888. TEMPLATE_WALL0044,
  1889. TEMPLATE_WALL0045,
  1890. TEMPLATE_WALL0046,
  1891. TEMPLATE_WALL0047,
  1892. TEMPLATE_WALL0048,
  1893. TEMPLATE_WALL0049,
  1894. TEMPLATE_BRIDGE1H,
  1895. TEMPLATE_BRIDGE2H,
  1896. TEMPLATE_BRIDGE_1AX,
  1897. TEMPLATE_BRIDGE_2AX,
  1898. TEMPLATE_BRIDGE1X,
  1899. TEMPLATE_BRIDGE2X,
  1900. TEMPLATE_XTRA0001,
  1901. TEMPLATE_XTRA0002,
  1902. TEMPLATE_XTRA0003,
  1903. TEMPLATE_XTRA0004,
  1904. TEMPLATE_XTRA0005,
  1905. TEMPLATE_XTRA0006,
  1906. TEMPLATE_XTRA0007,
  1907. TEMPLATE_XTRA0008,
  1908. TEMPLATE_XTRA0009,
  1909. TEMPLATE_XTRA0010,
  1910. TEMPLATE_XTRA0011,
  1911. TEMPLATE_XTRA0012,
  1912. TEMPLATE_XTRA0013,
  1913. TEMPLATE_XTRA0014,
  1914. TEMPLATE_XTRA0015,
  1915. TEMPLATE_XTRA0016,
  1916. #ifdef FIXIT_ANTS
  1917. TEMPLATE_HILL01,
  1918. #endif
  1919. TEMPLATE_COUNT,
  1920. TEMPLATE_NONE=65535,
  1921. TEMPLATE_FIRST=0
  1922. } TemplateType;
  1923. //PG inline TemplateType operator++(TemplateType &, int);
  1924. inline TemplateType operator++(TemplateType &n) { n = (TemplateType)(((int)n) + 1); return n; }
  1925. /**********************************************************************
  1926. ** The three dimensional terrain objects are enumerated here. These
  1927. ** objects function similar to buildings in that they can be driven
  1928. ** behind and can take damage on an individual basis.
  1929. */
  1930. typedef enum TerrainType : char {
  1931. TERRAIN_NONE=-1,
  1932. TERRAIN_TREE1,
  1933. TERRAIN_TREE2,
  1934. TERRAIN_TREE3,
  1935. TERRAIN_TREE5,
  1936. TERRAIN_TREE6,
  1937. TERRAIN_TREE7,
  1938. TERRAIN_TREE8,
  1939. TERRAIN_TREE10,
  1940. TERRAIN_TREE11,
  1941. TERRAIN_TREE12,
  1942. TERRAIN_TREE13,
  1943. TERRAIN_TREE14,
  1944. TERRAIN_TREE15,
  1945. TERRAIN_TREE16,
  1946. TERRAIN_TREE17,
  1947. TERRAIN_CLUMP1,
  1948. TERRAIN_CLUMP2,
  1949. TERRAIN_CLUMP3,
  1950. TERRAIN_CLUMP4,
  1951. TERRAIN_CLUMP5,
  1952. TERRAIN_ICE01,
  1953. TERRAIN_ICE02,
  1954. TERRAIN_ICE03,
  1955. TERRAIN_ICE04,
  1956. TERRAIN_ICE05,
  1957. TERRAIN_BOXES01,
  1958. TERRAIN_BOXES02,
  1959. TERRAIN_BOXES03,
  1960. TERRAIN_BOXES04,
  1961. TERRAIN_BOXES05,
  1962. TERRAIN_BOXES06,
  1963. TERRAIN_BOXES07,
  1964. TERRAIN_BOXES08,
  1965. TERRAIN_BOXES09,
  1966. TERRAIN_MINE,
  1967. TERRAIN_COUNT,
  1968. TERRAIN_FIRST=0
  1969. } TerrainType;
  1970. //PG inline TerrainType operator++(TerrainType &, int);
  1971. /**********************************************************************
  1972. ** Smudges are enumerated here. Smudges are transparent icons that are
  1973. ** drawn over the underlying terrain in order to give the effect of
  1974. ** alterations to the terrain. Craters are a good example of this.
  1975. */
  1976. typedef enum SmudgeType : char {
  1977. SMUDGE_NONE=-1,
  1978. SMUDGE_CRATER1,
  1979. SMUDGE_CRATER2,
  1980. SMUDGE_CRATER3,
  1981. SMUDGE_CRATER4,
  1982. SMUDGE_CRATER5,
  1983. SMUDGE_CRATER6,
  1984. SMUDGE_SCORCH1,
  1985. SMUDGE_SCORCH2,
  1986. SMUDGE_SCORCH3,
  1987. SMUDGE_SCORCH4,
  1988. SMUDGE_SCORCH5,
  1989. SMUDGE_SCORCH6,
  1990. SMUDGE_BIB1,
  1991. SMUDGE_BIB2,
  1992. SMUDGE_BIB3,
  1993. SMUDGE_COUNT,
  1994. SMUDGE_FIRST=0
  1995. } SmudgeType;
  1996. //PG inline SmudgeType operator++(SmudgeType &, int);
  1997. /**********************************************************************
  1998. ** Animations are enumerated here. Animations are the high speed and
  1999. ** short lived effects that occur with explosions and fire.
  2000. */
  2001. typedef enum AnimType : char {
  2002. ANIM_NONE=-1,
  2003. ANIM_FBALL1, // Large fireball explosion (bulges rightward).
  2004. ANIM_FBALL_FADE, // Fading fireball puff.
  2005. ANIM_FRAG1, // Medium fragment throwing explosion -- short decay.
  2006. ANIM_VEH_HIT1, // Small fireball explosion (bulges rightward).
  2007. ANIM_VEH_HIT2, // Small fragment throwing explosion -- pop & sparkles.
  2008. ANIM_VEH_HIT3, // Small fragment throwing explosion -- burn/exp mix.
  2009. ANIM_ART_EXP1, // Large fragment throwing explosion -- many sparkles.
  2010. ANIM_NAPALM1, // Small napalm burn.
  2011. ANIM_NAPALM2, // Medium napalm burn.
  2012. ANIM_NAPALM3, // Large napalm burn.
  2013. ANIM_SMOKE_PUFF, // Small rocket smoke trail puff.
  2014. ANIM_PIFF, // Machine gun impact piffs.
  2015. ANIM_PIFFPIFF, // Chaingun impact piffs.
  2016. ANIM_FIRE_SMALL, // Small flame animation.
  2017. ANIM_FIRE_MED, // Medium flame animation.
  2018. ANIM_FIRE_MED2, // Medium flame animation (oranger).
  2019. ANIM_FIRE_TINY, // Very tiny flames.
  2020. ANIM_MUZZLE_FLASH, // Big cannon flash (with translucency).
  2021. ANIM_SMOKE_M, // Smoke rising from ground.
  2022. ANIM_BURN_SMALL, // Small combustible fire effect (with trail off).
  2023. ANIM_BURN_MED, // Medium combustible fire effect (with trail off).
  2024. ANIM_BURN_BIG, // Large combustible fire effect (with trail off).
  2025. ANIM_ON_FIRE_SMALL, // Burning effect for buildings.
  2026. ANIM_ON_FIRE_MED, // Burning effect for buildings.
  2027. ANIM_ON_FIRE_BIG, // Burning effect for buildings.
  2028. ANIM_SAM_N,
  2029. ANIM_SAM_NE,
  2030. ANIM_SAM_E,
  2031. ANIM_SAM_SE,
  2032. ANIM_SAM_S,
  2033. ANIM_SAM_SW,
  2034. ANIM_SAM_W,
  2035. ANIM_SAM_NW,
  2036. ANIM_GUN_N,
  2037. ANIM_GUN_NE,
  2038. ANIM_GUN_E,
  2039. ANIM_GUN_SE,
  2040. ANIM_GUN_S,
  2041. ANIM_GUN_SW,
  2042. ANIM_GUN_W,
  2043. ANIM_GUN_NW,
  2044. ANIM_LZ_SMOKE,
  2045. ANIM_CRATE_DEVIATOR, // Red finned missile.
  2046. ANIM_CRATE_DOLLAR, // Dollar sign.
  2047. ANIM_CRATE_EARTH, // Cracked Earth.
  2048. ANIM_CRATE_EMPULSE, // Plasma ball.
  2049. ANIM_CRATE_INVUN, // Orange sphere with green rings.
  2050. ANIM_CRATE_MINE, // Spiked mine.
  2051. ANIM_CRATE_RAPID, // Red skull.
  2052. ANIM_CRATE_STEALTH, // Cloaking sphere.
  2053. ANIM_CRATE_MISSILE, // Green finned missile.
  2054. ANIM_MOVE_FLASH,
  2055. ANIM_OILFIELD_BURN,
  2056. ANIM_ELECT_DIE, // Electrocution infantryman death from Tesla coil
  2057. ANIM_PARACHUTE, // Parachute (designed to be attached to object).
  2058. ANIM_DOG_ELECT_DIE, // Electrocution dog death from Tesla coil
  2059. ANIM_CORPSE1,
  2060. ANIM_CORPSE2,
  2061. ANIM_CORPSE3,
  2062. ANIM_SPUTDOOR,
  2063. ANIM_ATOM_BLAST,
  2064. ANIM_CHRONO_BOX,
  2065. ANIM_GPS_BOX,
  2066. ANIM_INVUL_BOX,
  2067. ANIM_PARA_BOX,
  2068. ANIM_SONAR_BOX,
  2069. ANIM_TWINKLE1,
  2070. ANIM_TWINKLE2,
  2071. ANIM_TWINKLE3,
  2072. ANIM_FLAK,
  2073. ANIM_WATER_EXP1,
  2074. ANIM_WATER_EXP2,
  2075. ANIM_WATER_EXP3,
  2076. ANIM_CRATE_ARMOR,
  2077. ANIM_CRATE_SPEED,
  2078. ANIM_CRATE_FPOWER,
  2079. ANIM_CRATE_TQUAKE,
  2080. ANIM_PARA_BOMB,
  2081. ANIM_MINE_EXP1,
  2082. ANIM_FLAG,
  2083. ANIM_BEACON,
  2084. #ifdef FIXIT_ANTS
  2085. ANIM_ANT1_DEATH,
  2086. ANIM_ANT2_DEATH,
  2087. ANIM_ANT3_DEATH,
  2088. #endif
  2089. ANIM_FIRE_SMALL_VIRTUAL, // Small flame animation.
  2090. ANIM_FIRE_MED_VIRTUAL, // Medium flame animation.
  2091. ANIM_FIRE_MED2_VIRTUAL, // Medium flame animation (oranger).
  2092. ANIM_FIRE_TINY_VIRTUAL, // Very tiny flames.
  2093. ANIM_BEACON_VIRTUAL, // Beacon (virtual).
  2094. ANIM_COUNT,
  2095. ANIM_FIRST=0
  2096. } AnimType;
  2097. inline AnimType operator++(AnimType &, int);
  2098. /****************************************************************************
  2099. ** Infantry can be performing various activities. These can range from simple
  2100. ** idle animations to physical hand to hand combat.
  2101. */
  2102. typedef enum DoType : char {
  2103. DO_NOTHING=-1, // Not performing any choreographed sequence.
  2104. DO_STAND_READY=0,
  2105. DO_STAND_GUARD,
  2106. DO_PRONE,
  2107. DO_WALK,
  2108. DO_FIRE_WEAPON,
  2109. DO_LIE_DOWN,
  2110. DO_CRAWL,
  2111. DO_GET_UP,
  2112. DO_FIRE_PRONE,
  2113. DO_IDLE1,
  2114. DO_IDLE2,
  2115. DO_GUN_DEATH,
  2116. DO_EXPLOSION_DEATH,
  2117. DO_EXPLOSION2_DEATH,
  2118. DO_GRENADE_DEATH,
  2119. DO_FIRE_DEATH,
  2120. DO_GESTURE1,
  2121. DO_SALUTE1,
  2122. DO_GESTURE2,
  2123. DO_SALUTE2,
  2124. DO_DOG_MAUL,
  2125. DO_COUNT,
  2126. DO_FIRST=0
  2127. } DoType;
  2128. inline DoType operator++(DoType &, int);
  2129. /*
  2130. ** This structure is associated with each maneuver type. It tells whether the
  2131. ** maneuver can be interrupted and the frame rate.
  2132. */
  2133. typedef struct {
  2134. unsigned Interrupt:1; // Can it be interrupted?
  2135. unsigned IsMobile:1; // Can it move while doing this?
  2136. unsigned RandomStart:1; // Should animation be "randomized"?
  2137. unsigned char Rate; // Frame rate.
  2138. } DoStruct;
  2139. typedef struct {
  2140. int Frame; // Starting frame of the animation.
  2141. unsigned char Count; // Number of frames of animation.
  2142. unsigned char Jump; // Frames to jump between facings.
  2143. } DoInfoStruct;
  2144. /****************************************************************************
  2145. ** These are the various radio message that can be transmitted between
  2146. ** units and buildings. Some of these require a response from the receiver
  2147. ** and some don't.
  2148. */
  2149. typedef enum RadioMessageType : unsigned char {
  2150. RADIO_STATIC, // "hisssss" -- non-message
  2151. RADIO_ROGER, // "Roger."
  2152. RADIO_HELLO, // "Come in. I wish to talk."
  2153. RADIO_OVER_OUT, // "Something came up, bye."
  2154. RADIO_PICK_UP, // "Please pick me up."
  2155. RADIO_ATTACH, // "Attach to transport."
  2156. RADIO_DELIVERY, // "I've got a delivery for you."
  2157. RADIO_HOLD_STILL, // "I'm performing load/unload maneuver. Be careful."
  2158. RADIO_UNLOADED, // "I'm clear."
  2159. RADIO_UNLOAD, // "You are clear to unload. Please start driving off now."
  2160. RADIO_NEGATIVE, // "Am unable to comply."
  2161. RADIO_BUILDING, // "I'm starting construction now... act busy."
  2162. RADIO_COMPLETE, // "I've finished construction. You are free."
  2163. RADIO_REDRAW, // "Oops, sorry. I might have bumped you a little."
  2164. RADIO_DOCKING, // "I'm trying to load up now."
  2165. RADIO_CAN_LOAD, // "May I become a passenger?"
  2166. RADIO_ARE_REFINERY, // "Are you a refinery ready to take shipment?"
  2167. RADIO_TRYING_TO_LOAD, // "Are you trying to become a passenger?"
  2168. RADIO_MOVE_HERE, // "Move to location X."
  2169. RADIO_NEED_TO_MOVE, // "Do you need to move somewhere?"
  2170. RADIO_YEA_NOW_WHAT, // "All right already. Now what?"
  2171. RADIO_IM_IN, // "I'm a passenger now."
  2172. RADIO_BACKUP_NOW, // "Begin backup into refinery now."
  2173. RADIO_RUN_AWAY, // "Run away! Run away!"
  2174. RADIO_TETHER, // "Establish tether contact."
  2175. RADIO_UNTETHER, // "Break tether contact."
  2176. RADIO_REPAIR, // "Repair one step."
  2177. RADIO_PREPARED, // "Are you prepared to fight?"
  2178. RADIO_ATTACK_THIS, // "Attack this target please."
  2179. RADIO_RELOAD, // "Reload one step please."
  2180. RADIO_CANT, // "Circumstances prevent success."
  2181. RADIO_ALL_DONE, // "I have completed the task."
  2182. RADIO_NEED_REPAIR, // "Are you in need of service depot work?"
  2183. RADIO_ON_DEPOT, // "Are you sitting on a service depot?"
  2184. RADIO_COUNT
  2185. } RadioMessageType;
  2186. /****************************************************************************
  2187. ** Various trigger events and actions require additional data. This enumeration is
  2188. ** used to indicate what kind of additional data is required. This is also used
  2189. ** for team mission types that might need additional data.
  2190. */
  2191. typedef enum NeedType : unsigned char {
  2192. NEED_NONE, // No additional data is required.
  2193. NEED_THEME, // Need a musical theme.
  2194. NEED_MOVIE, // Need a movie to play.
  2195. NEED_SOUND, // Sound effect.
  2196. NEED_SPEECH, // Speech from EVA.
  2197. NEED_INFANTRY, // Infantry type class.
  2198. NEED_UNIT, // Unit type class.
  2199. NEED_AIRCRAFT, // Aircraft type class.
  2200. NEED_STRUCTURE, // Structure type class.
  2201. NEED_WAYPOINT, // Waypoint letter.
  2202. NEED_NUMBER, // General number.
  2203. NEED_TRIGGER, // Trigger object reference.
  2204. NEED_TEAM, // Team type class.
  2205. NEED_HOUSE, // House type number.
  2206. NEED_TIME, // Time delay value required.
  2207. NEED_QUARRY, // Quarry type is needed.
  2208. NEED_FORMATION, // A formation type is needed.
  2209. NEED_BOOL, // Boolean value is needed.
  2210. NEED_SPECIAL, // Special weapon ability.
  2211. NEED_MISSION, // General unit mission type.
  2212. NEED_HEX_NUMBER // General number.
  2213. } NeedType;
  2214. /****************************************************************************
  2215. ** There are various target types that teams and special weapons can be
  2216. ** assigned to attack. These are general target categories since the actual
  2217. ** disposition of potential targets cannot be precisely predicted -- thus these
  2218. ** serve as guidelines for the computer AI.
  2219. */
  2220. typedef enum QuarryType : unsigned char {
  2221. QUARRY_NONE,
  2222. QUARRY_ANYTHING, // Attack any enemy (same as "hunt").
  2223. QUARRY_BUILDINGS, // Attack buildings (in general).
  2224. QUARRY_HARVESTERS, // Attack harvesters or refineries.
  2225. QUARRY_INFANTRY, // Attack infantry.
  2226. QUARRY_VEHICLES, // Attack combat vehicles.
  2227. QUARRY_VESSELS, // Attach ships.
  2228. QUARRY_FACTORIES, // Attack factories (all types).
  2229. QUARRY_DEFENSE, // Attack base defense buildings.
  2230. QUARRY_THREAT, // Attack enemies near friendly base.
  2231. QUARRY_POWER, // Attack power facilities.
  2232. QUARRY_FAKES, // Prefer to attack fake buildings.
  2233. QUARRY_COUNT,
  2234. QUARRY_FIRST=0
  2235. } QuarryType;
  2236. /****************************************************************************
  2237. ** Teams can be assigned formations. This specifies the various formations that
  2238. ** a team can be composed into.
  2239. */
  2240. typedef enum FormationType : unsigned char {
  2241. FORMATION_NONE,
  2242. FORMATION_TIGHT, // Tight grouping (vulnerable units in center).
  2243. FORMATION_LOOSE, // Loose grouping (one cell separation between units).
  2244. FORMATION_WEDGE_N, // Wedge shape.
  2245. FORMATION_WEDGE_E, // Wedge shape.
  2246. FORMATION_WEDGE_S, // Wedge shape.
  2247. FORMATION_WEDGE_W, // Wedge shape.
  2248. FORMATION_LINE_NS, // Column formation.
  2249. FORMATION_LINE_EW, // Line formation.
  2250. FORMATION_COUNT,
  2251. FORMATION_FIRST=0
  2252. } FormationType;
  2253. /****************************************************************************
  2254. ** Selected units have a special selected unit box around them. These are the
  2255. ** defines for the two types of selected unit boxes. One is for infantry and
  2256. ** the other is for regular units.
  2257. */
  2258. typedef enum SelectEnum : char {
  2259. SELECT_NONE=-1,
  2260. SELECT_INFANTRY, // Small infantry selection box.
  2261. SELECT_UNIT, // Big unit selection box.
  2262. SELECT_BUILDING=SELECT_UNIT, // Custom box for buildings.
  2263. SELECT_TERRAIN=SELECT_UNIT, // Custom box for terrain objects.
  2264. SELECT_WRENCH, // A building is repairing overlay graphic.
  2265. SELECT_COUNT
  2266. } SelectEnum;
  2267. /****************************************************************************
  2268. ** The pip shapes and text shapes are enumerated according to the following
  2269. ** type. These special shapes are drawn over special objects or in other places
  2270. ** where shape technology is needed.
  2271. */
  2272. typedef enum PipEnum : unsigned char
  2273. {
  2274. PIP_EMPTY, // Empty pip spot.
  2275. PIP_FULL, // Full pip spot.
  2276. PIP_PRIMARY, // "Primary" building marker.
  2277. PIP_READY, // "Ready" construction information tag.
  2278. PIP_HOLDING, // "Hold"ing construction information tag.
  2279. PIP_ENGINEER, // Full pip with engineer coloring.
  2280. PIP_CIVILIAN, // Full pip with civilian coloring.
  2281. PIP_COMMANDO, // Full pip with commando coloring.
  2282. PIP_NUMBERS, // digit 0
  2283. PIP_NUMBER1, // digit 1
  2284. PIP_NUMBER2, // digit 2
  2285. PIP_NUMBER3, // digit 3
  2286. PIP_NUMBER4, // digit 4
  2287. PIP_NUMBER5, // digit 5
  2288. PIP_NUMBER6, // digit 6
  2289. PIP_NUMBER7, // digit 7
  2290. PIP_NUMBER8, // digit 8
  2291. PIP_NUMBER9, // digit 9
  2292. PIP_DECOY, // word "Decoy" for fake buildings
  2293. PIP_LETTERF, // letter 'F' for signifying in-formation
  2294. PIP_MEDIC, // Little medic red cross.
  2295. PIP_PRI // Abbreviated "Primary" for kennel
  2296. } PipEnum;
  2297. /****************************************************************************
  2298. ** The radar map can be in one of several states depending on the presense of
  2299. ** certain structures and power levels.
  2300. */
  2301. typedef enum RadarEnum : unsigned char
  2302. {
  2303. RADAR_NONE, // Radar map doesn't exist at all
  2304. RADAR_OFF, // Radar map is present, but displayed as off and non-interactive
  2305. RADAR_ON // Radar map is present, visible, and fully interactive
  2306. } RadarEnum;
  2307. /****************************************************************************
  2308. ** The mouse cursor can be in different states. These states are listed
  2309. ** below. Some of these represent animating mouse cursors. The mouse
  2310. ** is controlled by passing one of these values to the appropriate
  2311. ** MouseClass member function.
  2312. */
  2313. typedef enum MouseType : unsigned char
  2314. {
  2315. MOUSE_NORMAL,
  2316. MOUSE_N,
  2317. MOUSE_NE,
  2318. MOUSE_E,
  2319. MOUSE_SE,
  2320. MOUSE_S,
  2321. MOUSE_SW,
  2322. MOUSE_W,
  2323. MOUSE_NW,
  2324. MOUSE_NO_N,
  2325. MOUSE_NO_NE,
  2326. MOUSE_NO_E,
  2327. MOUSE_NO_SE,
  2328. MOUSE_NO_S,
  2329. MOUSE_NO_SW,
  2330. MOUSE_NO_W,
  2331. MOUSE_NO_NW,
  2332. MOUSE_NO_MOVE,
  2333. MOUSE_CAN_MOVE,
  2334. MOUSE_ENTER,
  2335. MOUSE_DEPLOY,
  2336. MOUSE_CAN_SELECT,
  2337. MOUSE_CAN_ATTACK,
  2338. MOUSE_SELL_BACK,
  2339. MOUSE_SELL_UNIT,
  2340. MOUSE_REPAIR,
  2341. MOUSE_NO_REPAIR,
  2342. MOUSE_NO_SELL_BACK,
  2343. MOUSE_RADAR_CURSOR,
  2344. MOUSE_NUCLEAR_BOMB,
  2345. MOUSE_AIR_STRIKE,
  2346. MOUSE_DEMOLITIONS,
  2347. MOUSE_AREA_GUARD,
  2348. MOUSE_HEAL,
  2349. MOUSE_DAMAGE, // Engineer entering building to damage it.
  2350. MOUSE_GREPAIR, // Engineer entering friendly building to heal it.
  2351. MOUSE_STAY_ATTACK,
  2352. MOUSE_NO_DEPLOY,
  2353. MOUSE_NO_ENTER,
  2354. MOUSE_NO_GREPAIR,
  2355. MOUSE_CHRONO_SELECT,
  2356. MOUSE_CHRONO_DEST,
  2357. MOUSE_COUNT
  2358. } MouseType;
  2359. /**********************************************************************
  2360. ** This structure is used to control the box relief style drawn by
  2361. ** the Draw_Box() function.
  2362. */
  2363. typedef struct {
  2364. int Filler; // Center box fill color.
  2365. int Shadow; // Shadow color (darker).
  2366. int Highlight; // Highlight color (lighter).
  2367. int Corner; // Corner color (transition).
  2368. } BoxStyleType;
  2369. typedef enum BoxStyleEnum : unsigned char {
  2370. BOXSTYLE_DOWN, // Typical depressed edge border.
  2371. BOXSTYLE_RAISED, // Typical raised edge border.
  2372. BOXSTYLE_DIS_DOWN, // Disabled but depressed.
  2373. BOXSTYLE_DIS_RAISED, // Disabled but raised.
  2374. BOXSTYLE_BOX, // list box.
  2375. BOXSTYLE_BORDER, // main dialog box.
  2376. BOXSTYLE_COUNT
  2377. } BoxStyleEnum;
  2378. /**********************************************************************
  2379. ** Damage, as inflicted by projectiles, has different characteristics.
  2380. ** These are the different "warhead" types that can be assigned to the
  2381. ** various projectiles in the game.
  2382. */
  2383. typedef enum WarheadType : char {
  2384. WARHEAD_NONE=-1,
  2385. WARHEAD_SA, // Small arms -- good against infantry.
  2386. WARHEAD_HE, // High explosive -- good against buildings & infantry.
  2387. WARHEAD_AP, // Armor piercing -- good against armor.
  2388. WARHEAD_FIRE, // Incendiary -- Good against flammables.
  2389. WARHEAD_HOLLOW_POINT, // Sniper bullet type.
  2390. WARHEAD_TESLA, // Electrocution warhead for infantrymen
  2391. WARHEAD_DOG, // Slavering attack beast mauling infantryman
  2392. WARHEAD_NUKE, // Nuclear missile
  2393. #ifdef FIXIT_CSII // checked - ajw 9/28/98
  2394. WARHEAD_MECHANICAL, // repair weapon for vehicles
  2395. #endif
  2396. WARHEAD_COUNT,
  2397. WARHEAD_FIRST=0
  2398. } WarheadType;
  2399. /**********************************************************************
  2400. ** This enumerates the various weapon types. The weapon is characterized
  2401. ** by the projectile it launches, the damage it does, and the rate of
  2402. ** fire.
  2403. */
  2404. typedef enum WeaponType : char {
  2405. WEAPON_NONE=-1,
  2406. WEAPON_COLT45,
  2407. WEAPON_ACK_ACK,
  2408. WEAPON_VULCAN,
  2409. WEAPON_MAVERICK,
  2410. WEAPON_CAMERA,
  2411. WEAPON_FIREBALL,
  2412. WEAPON_RIFLE,
  2413. WEAPON_CHAIN_GUN,
  2414. WEAPON_PISTOL,
  2415. WEAPON_M16,
  2416. WEAPON_DRAGON,
  2417. WEAPON_HELLFIRE,
  2418. WEAPON_GRENADE,
  2419. WEAPON_75MM,
  2420. WEAPON_90MM,
  2421. WEAPON_105MM,
  2422. WEAPON_120MM,
  2423. WEAPON_TURRET_GUN,
  2424. WEAPON_MAMMOTH_TUSK,
  2425. WEAPON_155MM,
  2426. WEAPON_M60MG,
  2427. WEAPON_NAPALM,
  2428. WEAPON_TESLA_ZAP,
  2429. WEAPON_NIKE,
  2430. WEAPON_8INCH,
  2431. WEAPON_STINGER,
  2432. WEAPON_TORPEDO,
  2433. WEAPON_2INCH,
  2434. WEAPON_DEPTH_CHARGE,
  2435. WEAPON_PARA_BOMB,
  2436. WEAPON_DOGJAW,
  2437. WEAPON_HEAL,
  2438. WEAPON_SCUD,
  2439. WEAPON_FLAMER,
  2440. WEAPON_REDEYE,
  2441. #ifdef FIXIT_ANTS
  2442. WEAPON_MANDIBLE,
  2443. #endif
  2444. #ifdef FIXIT_CSII // checked - ajw 9/28/98
  2445. WEAPON_PORTATESLA,
  2446. WEAPON_GOODWRENCH,
  2447. WEAPON_SUBSCUD,
  2448. WEAPON_TTANKZAP,
  2449. WEAPON_APTUSK,
  2450. WEAPON_DEMOCHARGE,
  2451. #endif
  2452. #ifdef FIXIT_CARRIER // checked - ajw 9/28/98
  2453. WEAPON_CARRIER,
  2454. #endif
  2455. WEAPON_COUNT,
  2456. WEAPON_FIRST=0
  2457. } WeaponType;
  2458. /**********************************************************************
  2459. ** The various armor types are best suited to defend against a limited
  2460. ** kind of warheads. The game strategy revolves around proper
  2461. ** combination of armor and weaponry. Each vehicle or building has armor
  2462. ** rated according to one of the following types.
  2463. */
  2464. typedef enum ArmorType : unsigned char {
  2465. ARMOR_NONE, // Vulnerable to SA and HE.
  2466. ARMOR_WOOD, // Vulnerable to HE and Fire.
  2467. ARMOR_ALUMINUM, // Vulnerable to AP and SA.
  2468. ARMOR_STEEL, // Vulnerable to AP.
  2469. ARMOR_CONCRETE, // Vulnerable to HE and AP.
  2470. ARMOR_COUNT,
  2471. ARMOR_FIRST=0
  2472. } ArmorType;
  2473. /**********************************************************************
  2474. ** These are the identifiers for the various monochrome debug screens.
  2475. */
  2476. typedef enum DMonoType : unsigned char {
  2477. DMONO_OBJECT,
  2478. DMONO_HOUSE,
  2479. DMONO_STRESS,
  2480. DMONO_EVENTS,
  2481. DMONO_COUNT,
  2482. DMONO_FIRST=0
  2483. } DMonoType;
  2484. /*
  2485. ** Performance benchmark tracking identifiers.
  2486. */
  2487. typedef enum BenchType : unsigned char {
  2488. BENCH_GAME_FRAME, // Whole game frame (used for normalizing).
  2489. BENCH_FINDPATH, // Find path calls.
  2490. BENCH_GREATEST_THREAT, // Greatest threat calculation.
  2491. BENCH_AI, // Object AI calls.
  2492. BENCH_CELL, // Cell draw it function.
  2493. BENCH_SIDEBAR, // Sidebar (just cameo section) drawing.
  2494. BENCH_RADAR, // Radar map drawing.
  2495. BENCH_TACTICAL, // Whole tactical map.
  2496. BENCH_PCP, // Per cell process.
  2497. BENCH_EVAL_OBJECT, // Evaluate object as potential target.
  2498. BENCH_EVAL_CELL, // Evaluate entire cell for potential targets.
  2499. BENCH_EVAL_WALL, // Evaluate wall in cell as potential target.
  2500. BENCH_POWER, // Power bar drawing.
  2501. BENCH_TABS, // Tab section (top) drawing.
  2502. BENCH_SHROUD, // Shroud layer drawing.
  2503. BENCH_ANIMS, // Animations drawing.
  2504. BENCH_OBJECTS, // All game object drawing.
  2505. BENCH_PALETTE, // Color cycling palette adjustments.
  2506. BENCH_GSCREEN_RENDER, // Rendering of the whole map layered system (with blits).
  2507. BENCH_BLIT_DISPLAY, // DirectX or shadow blit of hidpage to seenpage.
  2508. BENCH_MISSION, // Mission list processing.
  2509. BENCH_RULES, // Processing of the rules.ini file.
  2510. BENCH_SCENARIO, // Processing of the scenario.ini file.
  2511. BENCH_COUNT,
  2512. BENCH_FIRST=0
  2513. } BenchType;
  2514. #ifdef CHEAT_KEYS
  2515. #define BStart(a) if (Benches != NULL) Benches[a].Begin()
  2516. #define BEnd(a) if (Benches != NULL) Benches[a].End()
  2517. #else
  2518. #define BStart(a)
  2519. #define BEnd(a)
  2520. #endif
  2521. /**********************************************************************
  2522. ** Working MCGA colors that give a pleasing effect for beveled edges and
  2523. ** other purposes.
  2524. */
  2525. #define MAGIC_COL_COUNT 13 // Translucent color count.
  2526. #define SHADOW_COL_COUNT 4 // Terrain shroud translucent color count.
  2527. #define USHADOW_COL_COUNT 1 // Unit shadow special ghost colors.
  2528. /**********************************************************************
  2529. ** Color cycling range that is used for water effects.
  2530. */
  2531. #define CYCLE_COLOR_START (6*16)
  2532. #define CYCLE_COLOR_COUNT 7
  2533. /**********************************************************************
  2534. ** Magic color fading pulsing effect limits -- color gun value.
  2535. */
  2536. #define CC_PULSE_COLOR 255
  2537. #define CC_EMBER_COLOR (CYCLE_COLOR_START+CYCLE_COLOR_COUNT)
  2538. /**********************************************************************
  2539. ** These are the control flags for Fancy_Text_Print function.
  2540. */
  2541. typedef enum TextPrintType : unsigned short {
  2542. TPF_LASTPOINT =0x0000, // Use previous font point value.
  2543. TPF_6POINT =0x0001, // Use 6 point font.
  2544. TPF_8POINT =0x0002, // Use 8 point font.
  2545. TPF_3POINT =0x0003, // Use 3 point font.
  2546. TPF_LED =0x0004, // Use LED font.
  2547. TPF_VCR =0x0005, // Use VCR font.
  2548. TPF_6PT_GRAD =0x0006, // Use 6 point gradient font.
  2549. TPF_MAP =0x0007, // Font used for popup help text.
  2550. TPF_METAL12 =0x0008, // Use 12 point tab font
  2551. TPF_EFNT =0x0009, // Use scenario editor font.
  2552. TPF_TYPE =0x000A, // Use teletype font
  2553. TPF_SCORE =0x000B, // Use score screen font.
  2554. TPF_LASTSHADOW =0x0000, // Use previous font palette.
  2555. TPF_NOSHADOW =0x0010, // Don't have any shadow.
  2556. TPF_DROPSHADOW =0x0020, // Use a simple drop shadow.
  2557. TPF_FULLSHADOW =0x0040, // Use a full outline shadow.
  2558. TPF_LIGHTSHADOW =0x0080, // Use engraved drop 'shadow' color.
  2559. TPF_CENTER =0x0100, // Center about the X axis.
  2560. TPF_RIGHT =0x0200, // Right justify text.
  2561. TPF_MEDIUM_COLOR =0x1000, // Use medium color for all text gradient
  2562. TPF_BRIGHT_COLOR =0x2000, // Use bright color for all text gradient
  2563. TPF_USE_GRAD_PAL =0x4000 // Use a gradient palette based on fore color
  2564. } TextPrintType;
  2565. //PG
  2566. //inline TextPrintType operator |(TextPrintType, TextPrintType);
  2567. //inline TextPrintType operator &(TextPrintType, TextPrintType);
  2568. //inline TextPrintType operator ~(TextPrintType);
  2569. inline TextPrintType operator|(TextPrintType a, TextPrintType b)
  2570. {return static_cast<TextPrintType>(static_cast<int>(a) | static_cast<int>(b));}
  2571. inline TextPrintType operator&(TextPrintType a, TextPrintType b)
  2572. {return static_cast<TextPrintType>(static_cast<int>(a) & static_cast<int>(b));}
  2573. inline TextPrintType operator~(TextPrintType a)
  2574. {return static_cast<TextPrintType>(~static_cast<int>(a));}
  2575. // Standard button text print flags.
  2576. #define TPF_BUTTON (TPF_CENTER|TPF_6PT_GRAD|TPF_NOSHADOW)
  2577. #define TPF_EBUTTON (TPF_CENTER|TPF_EFNT|TPF_NOSHADOW)
  2578. #define TPF_TEXT (TPF_6PT_GRAD|TPF_NOSHADOW)
  2579. /**********************************************************************
  2580. ** These control the maximum number of objects in the game. Make sure that these
  2581. ** maximums never exceed the maximum value for the "ID" element in the
  2582. ** object class.
  2583. */
  2584. #define BUILDING_MAX 500 // Lasts for hours.
  2585. #define HOUSE_MAX (HOUSE_COUNT+1) // Lasts entire scenario.
  2586. #define INFANTRY_MAX 500 // Lasts for minutes.
  2587. #define UNIT_MAX 500 // Lasts for minutes.
  2588. #define VESSEL_MAX 100 // Lasts for minutes.
  2589. #define TEAMTYPE_MAX 60 // Lasts forever.
  2590. // Save filename description.
  2591. #define DESCRIP_MAX 44 // 40 chars + CR + LF + CTRL-Z + NULL
  2592. #define CONQUER_PATH_MAX 12 // Number of cells to look ahead for movement.
  2593. #define EACH_INFANTRY_MAX (INFANTRY_MAX/5) // Default maximum any one player can have.
  2594. #define EACH_UNIT_MAX (UNIT_MAX/5) // Default maximum any one player can have.
  2595. #define EACH_BUILDING_MAX (BUILDING_MAX/5) // Default maximum any one player can build.
  2596. #define EACH_VESSEL_MAX (VESSEL_MAX/5) // Default maximum any one player can build.
  2597. /**********************************************************************
  2598. ** Terrain can be of these different classes. At any point in the game
  2599. ** a particular piece of ground must fall under one of these classifications.
  2600. ** This is true, even if it is undergoing a temporary transition.
  2601. */
  2602. typedef enum LandType : char {
  2603. LAND_CLEAR, // "Clear" terrain.
  2604. LAND_ROAD, // Road terrain.
  2605. LAND_WATER, // Water.
  2606. LAND_ROCK, // Impassable rock.
  2607. LAND_WALL, // Wall (blocks movement).
  2608. LAND_TIBERIUM, // Tiberium field.
  2609. LAND_BEACH, // Beach terrain.
  2610. LAND_ROUGH, // Rocky terrain.
  2611. LAND_RIVER, // Rocky riverbed.
  2612. LAND_COUNT,
  2613. LAND_NONE=-1,
  2614. LAND_FIRST=0
  2615. } LandType;
  2616. /**********************************************************************
  2617. ** The theaters of operation are as follows.
  2618. */
  2619. typedef enum TheaterType : char {
  2620. THEATER_NONE=-1,
  2621. THEATER_TEMPERATE,
  2622. THEATER_SNOW,
  2623. THEATER_INTERIOR,
  2624. THEATER_COUNT,
  2625. THEATER_FIRST=0
  2626. } TheaterType;
  2627. //inline TheaterType operator++(TheaterType &, int);
  2628. inline TheaterType operator++(TheaterType &n) { n = (TheaterType)(((int)n)+1); return n; }
  2629. #define THEATERF_TEMPERATE (1<<THEATER_TEMPERATE)
  2630. #define THEATERF_SNOW (1<<THEATER_SNOW)
  2631. #define THEATERF_INTERIOR (1<<THEATER_INTERIOR)
  2632. typedef struct {
  2633. char Name[16];
  2634. char Root[10];
  2635. char Suffix[4];
  2636. } TheaterDataType;
  2637. /**********************************************************************
  2638. ** Each building has a predetermined size. These are the size numbers.
  2639. ** The trailing number is this define is the width and height (respectively)
  2640. ** of the building in cells.
  2641. */
  2642. typedef enum BSizeType : char {
  2643. BSIZE_NONE=-1,
  2644. BSIZE_11=0,
  2645. BSIZE_21,
  2646. BSIZE_12,
  2647. BSIZE_22,
  2648. BSIZE_23,
  2649. BSIZE_32,
  2650. BSIZE_33,
  2651. BSIZE_42,
  2652. BSIZE_55,
  2653. BSIZE_COUNT
  2654. } BSizeType;
  2655. inline BSizeType operator++(BSizeType &, int);
  2656. /**********************************************************************
  2657. ** When objects are manipulated on the map that are marked as being
  2658. ** removed (up), placed down (down), or just to be redrawn (change);
  2659. ** or when an object's rendering (not logical) size changes, due to
  2660. ** its being selected or having an animation attached (overlap up/down).
  2661. */
  2662. typedef enum MarkType : unsigned char {
  2663. MARK_UP, // Removed from the map.
  2664. MARK_DOWN, // Placed on the map.
  2665. MARK_CHANGE, // Altered in place on the map.
  2666. MARK_CHANGE_REDRAW, // Redraw because of animation change.
  2667. MARK_OVERLAP_DOWN, // Mark overlap cells on the map
  2668. MARK_OVERLAP_UP // Clear overlap cells on the map
  2669. } MarkType;
  2670. /****************************************************************************
  2671. ** Window number definition list. Each window should be referred to by
  2672. ** the value given in this list.
  2673. */
  2674. // Allow window number enums to be passed to library functions.
  2675. typedef enum WindowNumberType : unsigned char {
  2676. WINDOW_MAIN, // Full screen window.
  2677. WINDOW_ERROR, // Library error window.
  2678. WINDOW_TACTICAL, // Tactical map window.
  2679. WINDOW_MENU, // Main selection menu.
  2680. WINDOW_SIDEBAR, // Sidebar (buildable list) window.
  2681. WINDOW_EDITOR, // Scenario editor window.
  2682. WINDOW_PARTIAL, // Partial object draw sub-window.
  2683. WINDOW_CUSTOM, // Window that can be altered depending on circumstances
  2684. WINDOW_VIRTUAL // Window that is used when we want to capture rendering information without actually rendering. ST - 1/15/2019 3:03PM
  2685. } WindowNumberType;
  2686. /****************************************************************************
  2687. ** For every cell there are 8 adjacent cells. Use these direction numbers
  2688. ** when referring to adjacent cells. This comes into play when moving
  2689. ** between cells and in the Desired_Facing() algorithm.
  2690. */
  2691. typedef enum FacingType : char {
  2692. FACING_NONE=-1,
  2693. FACING_N, // North
  2694. FACING_NE, // North-East
  2695. FACING_E, // East
  2696. FACING_SE, // South-East
  2697. FACING_S, // South
  2698. FACING_SW, // South-West
  2699. FACING_W, // West
  2700. FACING_NW, // North-West
  2701. FACING_COUNT, // Total of 8 directions (0..7).
  2702. FACING_FIRST=0
  2703. } FacingType;
  2704. //inline FacingType operator++(FacingType &, int);
  2705. inline FacingType operator + (FacingType f1, FacingType f2)
  2706. {
  2707. return (FacingType)(((int)f1 + (int)f2) & 0x07);
  2708. }
  2709. inline FacingType operator + (FacingType f1, int f2)
  2710. {
  2711. return (FacingType)(((int)f1 + (int)f2) & 0x07);
  2712. }
  2713. inline FacingType operator - (FacingType f1, FacingType f2)
  2714. {
  2715. return (FacingType)(((int)f1 - (int)f2) & 0x07);
  2716. }
  2717. inline FacingType operator - (FacingType f1, int f2)
  2718. {
  2719. return (FacingType)(((int)f1 - (int)f2) & 0x07);
  2720. }
  2721. inline FacingType operator += (FacingType & f1, FacingType f2)
  2722. {
  2723. f1 = (FacingType)(((int)f1 + (int)f2) & 0x07);
  2724. return(f1);
  2725. }
  2726. inline FacingType operator += (FacingType & f1, int f2)
  2727. {
  2728. f1 = (FacingType)(((int)f1 + (int)f2) & 0x07);
  2729. return(f1);
  2730. }
  2731. inline int operator * (FacingType f1, FacingType f2)
  2732. {
  2733. return((int)f1 * (int)f2);
  2734. }
  2735. #ifdef NEVER
  2736. typedef enum DirType {
  2737. DIR_MIN=0,
  2738. DIR_N=0,
  2739. DIR_NE=1<<5,
  2740. DIR_E=2<<5,
  2741. DIR_SE=3<<5,
  2742. DIR_S=4<<5,
  2743. DIR_SW=5<<5,
  2744. DIR_SW_X1=(5<<5)-8, // Direction of harvester while unloading.
  2745. DIR_SW_X2=(5<<5)-16, // Direction of harvester while unloading.
  2746. DIR_W=6<<5,
  2747. DIR_NW=7<<5,
  2748. DIR_MAX=255
  2749. } DirType;
  2750. inline DirType operator + (DirType f1, DirType f2)
  2751. {
  2752. return (DirType)(((int)f1 + (int)f2) & 0x00FF);
  2753. }
  2754. inline DirType operator + (DirType f1, int f2)
  2755. {
  2756. return (DirType)(((int)f1 + (int)f2) & 0x00FF);
  2757. }
  2758. #endif
  2759. #define DIR_SW_X1 DirType((5<<5)-8)
  2760. #define DIR_SW_X2 DirType((5<<5)-16)
  2761. /****************************************************************************
  2762. ** Timer constants. These are used when setting the countdown timer.
  2763. ** Note that this is based upon a timer that ticks every 60th of a second.
  2764. */
  2765. #define TIMER_SECOND 60
  2766. #define TIMER_MINUTE (TIMER_SECOND*60)
  2767. #define FADE_PALETTE_FAST (TIMER_SECOND/8)
  2768. #define FADE_PALETTE_MEDIUM (TIMER_SECOND/4)
  2769. #define FADE_PALETTE_SLOW (TIMER_SECOND/2)
  2770. #define TICKS_PER_SECOND 15
  2771. #define TICKS_PER_MINUTE (TICKS_PER_SECOND * 60)
  2772. #define TICKS_PER_HOUR (TICKS_PER_MINUTE * 60)
  2773. #define GRAYFADETIME (1 * TICKS_PER_SECOND)
  2774. /****************************************************************************
  2775. ** Each vehicle is give a speed rating. This is a combination of not only
  2776. ** its physical speed, but the means by which it travels (wheels, tracks,
  2777. ** wings, etc). This is used to determine the movement table.
  2778. */
  2779. typedef enum SpeedType : char {
  2780. SPEED_NONE=-1,
  2781. SPEED_FOOT, // Bipedal.
  2782. SPEED_TRACK, // Tracked locomotion.
  2783. SPEED_WHEEL, // Balloon tires.
  2784. SPEED_WINGED, // Lifter's, 'thopters, and rockets.
  2785. SPEED_FLOAT, // Ships.
  2786. SPEED_COUNT,
  2787. SPEED_FIRST=SPEED_FOOT
  2788. } SpeedType;
  2789. /**********************************************************************
  2790. ** These are the sound effect digitized sample file names.
  2791. */
  2792. typedef enum VocType : short {
  2793. VOC_NONE=-1,
  2794. VOC_GIRL_OKAY, // "okay"
  2795. VOC_GIRL_YEAH, // "yeah?"
  2796. VOC_GUY_OKAY, // "okay"
  2797. VOC_GUY_YEAH, // "yeah?"
  2798. VOC_MINELAY1, // mine layer sound
  2799. VOC_ACKNOWL, // "acknowledged"
  2800. VOC_AFFIRM, // "affirmative"
  2801. VOC_AWAIT, // "awaiting orders"
  2802. VOC_ENG_AFFIRM, // Engineer: "affirmative"
  2803. VOC_ENG_ENG, // Engineer: "engineering"
  2804. VOC_NO_PROB, // "not a problem"
  2805. VOC_READY, // "ready and waiting"
  2806. VOC_REPORT, // "reporting"
  2807. VOC_RIGHT_AWAY, // "right away sir"
  2808. VOC_ROGER, // "roger"
  2809. VOC_UGOTIT, // "you got it"
  2810. VOC_VEHIC, // "vehicle reporting"
  2811. VOC_YESSIR, // "yes sir"
  2812. VOC_SCREAM1, // short infantry scream
  2813. VOC_SCREAM3, // short infantry scream
  2814. VOC_SCREAM4, // short infantry scream
  2815. VOC_SCREAM5, // short infantry scream
  2816. VOC_SCREAM6, // short infantry scream
  2817. VOC_SCREAM7, // short infantry scream
  2818. VOC_SCREAM10, // short infantry scream
  2819. VOC_SCREAM11, // short infantry scream
  2820. VOC_YELL1, // long infantry scream
  2821. VOC_CHRONO, // Chronosphere sound.
  2822. VOC_CANNON1, // Cannon sound (medium).
  2823. VOC_CANNON2, // Cannon sound (short).
  2824. VOC_IRON1,
  2825. VOC_ENG_MOVEOUT, // Engineer: "movin' out"
  2826. VOC_SONAR, // sonar pulse
  2827. VOC_SANDBAG, // sand bag crunch
  2828. VOC_MINEBLOW,
  2829. VOC_CHUTE1, // wind swoosh sound
  2830. VOC_DOG_BARK, // dog bark
  2831. VOC_DOG_WHINE, // dog whine
  2832. VOC_DOG_GROWL2, // strong dog growl
  2833. VOC_FIRE_LAUNCH, // fireball launch sound
  2834. VOC_FIRE_EXPLODE, // fireball explode sound
  2835. VOC_GRENADE_TOSS, // grenade toss
  2836. VOC_GUN_5, // 5 round gun burst (slow).
  2837. VOC_GUN_7, // 7 round gun burst (fast).
  2838. VOC_ENG_YES, // Engineer: "yes sir"
  2839. VOC_GUN_RIFLE, // Rifle shot.
  2840. VOC_HEAL, // Healing effect.
  2841. VOC_DOOR, // Hyrdrolic door.
  2842. VOC_INVULNERABLE, // Invulnerability effect.
  2843. VOC_KABOOM1, // Long explosion (muffled).
  2844. VOC_KABOOM12, // Very long explosion (muffled).
  2845. VOC_KABOOM15, // Very long explosion (muffled).
  2846. VOC_SPLASH, // Water splash
  2847. VOC_KABOOM22, // Long explosion (sharp).
  2848. VOC_AACANON3, // AA-Cannon
  2849. VOC_TANYA_DIE, // Tanya: scream
  2850. VOC_GUN_5F, // 5 round gun burst (fast).
  2851. VOC_MISSILE_1, // Missile with high tech effect.
  2852. VOC_MISSILE_2, // Long missile launch.
  2853. VOC_MISSILE_3, // Short missile launch.
  2854. VOC_x6,
  2855. VOC_GUN_5R, // 5 round gun burst (rattles).
  2856. VOC_BEEP, // Generic beep sound.
  2857. VOC_CLICK, // Generic click sound.
  2858. VOC_SILENCER, // Silencer.
  2859. VOC_CANNON6, // Long muffled cannon shot.
  2860. VOC_CANNON7, // Sharp mechanical cannon fire.
  2861. VOC_TORPEDO, // Torpedo launch.
  2862. VOC_CANNON8, // Sharp cannon fire.
  2863. VOC_TESLA_POWER_UP, // Hum charge up.
  2864. VOC_TESLA_ZAP, // Tesla zap effect.
  2865. VOC_SQUISH, // Squish effect.
  2866. VOC_SCOLD, // Scold bleep.
  2867. VOC_RADAR_ON, // Powering up electronics.
  2868. VOC_RADAR_OFF, // B movie power down effect.
  2869. VOC_PLACE_BUILDING_DOWN, // Building slam down sound.
  2870. VOC_KABOOM30, // Short explosion (HE).
  2871. VOC_KABOOM25, // Short growling explosion.
  2872. VOC_x7,
  2873. VOC_DOG_HURT, // Dog whine.
  2874. VOC_DOG_YES, // Dog 'yes sir'.
  2875. VOC_CRUMBLE, // Building crumble.
  2876. VOC_MONEY_UP, // Rising money tick.
  2877. VOC_MONEY_DOWN, // Falling money tick.
  2878. VOC_CONSTRUCTION, // Building construction sound.
  2879. VOC_GAME_CLOSED, // Long bleep.
  2880. VOC_INCOMING_MESSAGE, // Soft happy warble.
  2881. VOC_SYS_ERROR, // Sharp soft warble.
  2882. VOC_OPTIONS_CHANGED, // Mid range soft warble.
  2883. VOC_GAME_FORMING, // Long warble.
  2884. VOC_PLAYER_LEFT, // Chirp sequence.
  2885. VOC_PLAYER_JOINED, // Reverse chirp sequence.
  2886. VOC_DEPTH_CHARGE, // Distant explosion sound.
  2887. VOC_CASHTURN, // Airbrake.
  2888. VOC_TANYA_CHEW, // Tanya: "Chew on this"
  2889. VOC_TANYA_ROCK, // Tanya: "Let's rock"
  2890. VOC_TANYA_LAUGH, // Tanya: "ha ha ha"
  2891. VOC_TANYA_SHAKE, // Tanya: "Shake it baby"
  2892. VOC_TANYA_CHING, // Tanya: "Cha Ching"
  2893. VOC_TANYA_GOT, // Tanya: "That's all you got"
  2894. VOC_TANYA_KISS, // Tanya: "Kiss it bye bye"
  2895. VOC_TANYA_THERE, // Tanya: "I'm there"
  2896. VOC_TANYA_GIVE, // Tanya: "Give it to me"
  2897. VOC_TANYA_YEA, // Tanya: "Yea?"
  2898. VOC_TANYA_YES, // Tanya: "Yes sir?"
  2899. VOC_TANYA_WHATS, // Tanya: "What's up."
  2900. VOC_WALLKILL2, // Crushing wall sound.
  2901. VOC_x8,
  2902. VOC_TRIPLE_SHOT, // Three quick shots in succession.
  2903. VOC_SUBSHOW, // Submarine surfacing.
  2904. VOC_E_AH, // Einstein "ah"
  2905. VOC_E_OK, // Einstein "ok"
  2906. VOC_E_YES, // Einstein "yes"
  2907. VOC_TRIP_MINE, // mine explosion sound
  2908. VOC_SPY_COMMANDER, // Spy: "commander?"
  2909. VOC_SPY_YESSIR, // Spy: "yes sir"
  2910. VOC_SPY_INDEED, // Spy: "indeed"
  2911. VOC_SPY_ONWAY, // Spy: "on my way"
  2912. VOC_SPY_KING, // Spy: "for king and country"
  2913. VOC_MED_REPORTING, // Medic: "reporting"
  2914. VOC_MED_YESSIR, // Medic: "yes sir"
  2915. VOC_MED_AFFIRM, // Medic: "affirmative"
  2916. VOC_MED_MOVEOUT, // Medic: "movin' out"
  2917. VOC_BEEP_SELECT, // map selection beep
  2918. VOC_THIEF_YEA, // Thief: "yea?"
  2919. #ifdef FIXIT_ANTS
  2920. VOC_ANTDIE,
  2921. VOC_ANTBITE,
  2922. #else
  2923. VOC_x9,
  2924. VOC_x10,
  2925. #endif
  2926. VOC_THIEF_MOVEOUT, // Thief: "movin' out"
  2927. VOC_THIEF_OKAY, // Thief: "ok"
  2928. VOC_x11,
  2929. VOC_THIEF_WHAT, // Thief: "what"
  2930. VOC_THIEF_AFFIRM, // Thief: "affirmative"
  2931. VOC_STAVCMDR,
  2932. VOC_STAVCRSE,
  2933. VOC_STAVYES,
  2934. VOC_STAVMOV,
  2935. VOC_BUZZY1,
  2936. VOC_RAMBO1,
  2937. VOC_RAMBO2,
  2938. VOC_RAMBO3,
  2939. #ifdef FIXIT_CSII // checked - ajw 9/28/98
  2940. VOC_MECHYES1,
  2941. VOC_MECHHOWDY1,
  2942. VOC_MECHRISE1,
  2943. VOC_MECHHUH1,
  2944. VOC_MECHHEAR1,
  2945. VOC_MECHLAFF1,
  2946. VOC_MECHBOSS1,
  2947. VOC_MECHYEEHAW1,
  2948. VOC_MECHHOTDIG1,
  2949. VOC_MECHWRENCH1,
  2950. VOC_STBURN1,
  2951. VOC_STCHRGE1,
  2952. VOC_STCRISP1,
  2953. VOC_STDANCE1,
  2954. VOC_STJUICE1,
  2955. VOC_STJUMP1,
  2956. VOC_STLIGHT1,
  2957. VOC_STPOWER1,
  2958. VOC_STSHOCK1,
  2959. VOC_STYES1,
  2960. VOC_CHRONOTANK1,
  2961. VOC_MECH_FIXIT1,
  2962. VOC_MAD_CHARGE,
  2963. VOC_MAD_EXPLODE,
  2964. VOC_SHOCK_TROOP1,
  2965. VOC_BEACON,
  2966. #endif
  2967. VOC_COUNT,
  2968. VOC_FIRST=0
  2969. } VocType;
  2970. /*
  2971. ** EVA voices are specified by these identifiers.
  2972. */
  2973. typedef enum VoxType : char {
  2974. VOX_NONE=-1,
  2975. VOX_ACCOMPLISHED, // mission accomplished
  2976. VOX_FAIL, // your mission has failed
  2977. VOX_NO_FACTORY, // unable to comply, building in progress
  2978. VOX_CONSTRUCTION, // construction complete
  2979. VOX_UNIT_READY, // unit ready
  2980. VOX_NEW_CONSTRUCT, // new construction options
  2981. VOX_DEPLOY, // cannot deploy here
  2982. VOX_STRUCTURE_DESTROYED, // structure destroyed
  2983. VOX_INSUFFICIENT_POWER, // insufficient power
  2984. VOX_NO_CASH, // insufficient funds
  2985. VOX_CONTROL_EXIT, // battle control terminated
  2986. VOX_REINFORCEMENTS, // reinforcements have arrived
  2987. VOX_CANCELED, // canceled
  2988. VOX_BUILDING, // building
  2989. VOX_LOW_POWER, // low power
  2990. VOX_NEED_MO_MONEY, // need more funds
  2991. VOX_BASE_UNDER_ATTACK, // our base is under attack
  2992. VOX_UNABLE_TO_BUILD, // unable to build more
  2993. VOX_PRIMARY_SELECTED, // primary building selected
  2994. #ifdef ENGLISH
  2995. VOX_MADTANK_DEPLOYED, // M.A.D. Tank Deployed
  2996. #else
  2997. VOX_none3,
  2998. #endif
  2999. VOX_none4,
  3000. VOX_UNIT_LOST, // unit lost
  3001. VOX_SELECT_TARGET, // select target
  3002. VOX_PREPARE, // enemy approaching
  3003. VOX_NEED_MO_CAPACITY, // silos needed
  3004. VOX_SUSPENDED, // on hold
  3005. VOX_REPAIRING, // repairing
  3006. VOX_none5,
  3007. VOX_none6,
  3008. VOX_AIRCRAFT_LOST,
  3009. VOX_none7,
  3010. VOX_ALLIED_FORCES_APPROACHING,
  3011. VOX_ALLIED_APPROACHING,
  3012. VOX_none8,
  3013. VOX_none9,
  3014. VOX_BUILDING_INFILTRATED,
  3015. VOX_CHRONO_CHARGING,
  3016. VOX_CHRONO_READY,
  3017. VOX_CHRONO_TEST,
  3018. VOX_HQ_UNDER_ATTACK,
  3019. VOX_CENTER_DEACTIVATED,
  3020. VOX_CONVOY_APPROACHING,
  3021. VOX_CONVOY_UNIT_LOST,
  3022. VOX_EXPLOSIVE_PLACED,
  3023. VOX_MONEY_STOLEN,
  3024. VOX_SHIP_LOST,
  3025. VOX_SATALITE_LAUNCHED,
  3026. VOX_SONAR_AVAILABLE,
  3027. VOX_none10,
  3028. VOX_SOVIET_FORCES_APPROACHING,
  3029. VOX_SOVIET_REINFORCEMENTS,
  3030. VOX_TRAINING,
  3031. VOX_ABOMB_READY,
  3032. VOX_ABOMB_LAUNCH,
  3033. VOX_ALLIES_N,
  3034. VOX_ALLIES_S,
  3035. VOX_ALLIES_E,
  3036. VOX_ALLIES_W,
  3037. VOX_OBJECTIVE1,
  3038. VOX_OBJECTIVE2,
  3039. VOX_OBJECTIVE3,
  3040. VOX_IRON_CHARGING,
  3041. VOX_IRON_READY,
  3042. VOX_RESCUED,
  3043. VOX_OBJECTIVE_NOT,
  3044. VOX_SIGNAL_N,
  3045. VOX_SIGNAL_S,
  3046. VOX_SIGNAL_E,
  3047. VOX_SIGNAL_W,
  3048. VOX_SPY_PLANE,
  3049. VOX_FREED,
  3050. VOX_UPGRADE_ARMOR,
  3051. VOX_UPGRADE_FIREPOWER,
  3052. VOX_UPGRADE_SPEED,
  3053. VOX_MISSION_TIMER,
  3054. VOX_UNIT_FULL,
  3055. VOX_UNIT_REPAIRED,
  3056. VOX_TIME_40,
  3057. VOX_TIME_30,
  3058. VOX_TIME_20,
  3059. VOX_TIME_10,
  3060. VOX_TIME_5,
  3061. VOX_TIME_4,
  3062. VOX_TIME_3,
  3063. VOX_TIME_2,
  3064. VOX_TIME_1,
  3065. VOX_TIME_STOP,
  3066. VOX_UNIT_SOLD,
  3067. VOX_TIMER_STARTED,
  3068. VOX_TARGET_RESCUED,
  3069. VOX_TARGET_FREED,
  3070. VOX_TANYA_RESCUED,
  3071. VOX_STRUCTURE_SOLD,
  3072. VOX_SOVIET_FORCES_FALLEN,
  3073. VOX_SOVIET_SELECTED,
  3074. VOX_SOVIET_EMPIRE_FALLEN,
  3075. VOX_OPERATION_TERMINATED,
  3076. VOX_OBJECTIVE_REACHED,
  3077. VOX_OBJECTIVE_NOT_REACHED,
  3078. VOX_OBJECTIVE_MET,
  3079. VOX_MERCENARY_RESCUED,
  3080. VOX_MERCENARY_FREED,
  3081. VOX_KOSOYGEN_FREED,
  3082. VOX_FLARE_DETECTED,
  3083. VOX_COMMANDO_RESCUED,
  3084. VOX_COMMANDO_FREED,
  3085. VOX_BUILDING_IN_PROGRESS,
  3086. VOX_ATOM_PREPPING,
  3087. VOX_ALLIED_SELECTED,
  3088. VOX_ABOMB_PREPPING,
  3089. VOX_ATOM_LAUNCHED,
  3090. VOX_ALLIED_FORCES_FALLEN,
  3091. VOX_ABOMB_AVAILABLE,
  3092. VOX_ALLIED_REINFORCEMENTS,
  3093. VOX_SAVE1,
  3094. VOX_LOAD1,
  3095. VOX_COUNT,
  3096. VOX_FIRST=0
  3097. } VoxType;
  3098. /****************************************************************************
  3099. ** Game reinforcements are each controlled by the following structure. The
  3100. ** data originates in the scenario INI file but is then carried throughout
  3101. ** any saved games.
  3102. */
  3103. typedef enum SourceType : char {
  3104. SOURCE_NONE=-1, // No defined source (error condition).
  3105. SOURCE_NORTH, // From north edge.
  3106. SOURCE_EAST, // From east edge.
  3107. SOURCE_SOUTH, // From south edge.
  3108. SOURCE_WEST, // From west edge.
  3109. SOURCE_AIR, // Dropped by air (someplace).
  3110. SOURCE_COUNT,
  3111. SOURCE_FIRST=0
  3112. } SourceType;
  3113. /****************************************************************************
  3114. ** This entry defines a complete color scheme, with the player's remap table,
  3115. ** the font remap table, and a color scheme for dialog boxes and buttons.
  3116. */
  3117. typedef struct RemapControlType
  3118. {
  3119. unsigned char BrightColor; // Highlight (bright) color index.
  3120. unsigned char Color; // Normal color index.
  3121. unsigned char RemapTable[256]; // Actual remap table.
  3122. unsigned char FontRemap[16]; // Remap table for gradient font.
  3123. unsigned char Shadow; // Color of shadowed edge of a raised button.
  3124. unsigned char Background; // Background fill color for buttons.
  3125. unsigned char Corners; // Transition color between shadow and highlight.
  3126. unsigned char Highlight; // Bright edge of raised button.
  3127. unsigned char Box; // Color for dialog box border.
  3128. unsigned char Bright; // Color used for highlighted text.
  3129. unsigned char Underline; // Color for underlining dialog box titles.
  3130. unsigned char Bar; // Selected entry list box background color.
  3131. } RemapControlType;
  3132. /****************************************************************************
  3133. ** Each type of terrain has certain characteristics. These are indicated
  3134. ** by the structure below. For every element of terrain there is a
  3135. ** corresponding GroundType structure.
  3136. */
  3137. typedef struct {
  3138. fixed Cost[SPEED_COUNT]; // Terrain effect cost (normal).
  3139. bool Build; // Can build on this terrain?
  3140. } GroundType;
  3141. /**************************************************************************
  3142. ** Find_Path returns with a pointer to this structure.
  3143. */
  3144. typedef struct {
  3145. CELL Start; // Starting cell number.
  3146. int Cost; // Accumulated terrain cost.
  3147. int Length; // Command string length.
  3148. FacingType *Command; // Pointer to command string.
  3149. unsigned long *Overlap; // Pointer to overlap list
  3150. CELL LastOverlap; // stores position of last overlap
  3151. CELL LastFixup; // stores position of last overlap
  3152. } PathType;
  3153. /**********************************************************************
  3154. ** These are special indices into the Waypoint array; slots 0-25 are
  3155. ** reserved for letter-designated Waypoints, the others are special.
  3156. */
  3157. typedef enum WaypointEnum : unsigned char
  3158. {
  3159. WAYPT_HOME = 98, // Home-cell for this scenario
  3160. WAYPT_REINF, // cell where reinforcements arrive
  3161. WAYPT_SPECIAL, // Used by special airdrop reinforcements.
  3162. WAYPT_COUNT
  3163. } WaypointType;
  3164. /****************************************************************************
  3165. ** This is the max number of events supported on one frame.
  3166. */
  3167. #define MAX_EVENTS 256
  3168. typedef enum : unsigned char {
  3169. KF_NUMBER = 0x08,
  3170. KF_LCW = 0x10,
  3171. KF_DELTA = 0x20,
  3172. KF_KEYDELTA = 0x40,
  3173. KF_KEYFRAME = 0x80,
  3174. KF_MASK = 0xF0
  3175. } KeyFrameType;
  3176. /*
  3177. ** New Config structure for .CFG files
  3178. */
  3179. typedef struct {
  3180. unsigned DigitCard; // SoundCardType.
  3181. unsigned Port; // SoundCardType.
  3182. unsigned IRQ; // SoundCardType.
  3183. unsigned DMA; // SoundCardType.
  3184. unsigned BitsPerSample; // bits per sound sample
  3185. unsigned Channels; // stereo/mono sound card
  3186. unsigned Speed; // stereo/mono sound card
  3187. bool Reverse; // Reverse left/right speakers
  3188. char Language[4];
  3189. } NewConfigType;
  3190. /****************************************************************************
  3191. ** These are the types of dialogs that can pop up outside of the main loop,
  3192. ** an call the game in the background.
  3193. */
  3194. typedef enum : unsigned char {
  3195. SDLG_NONE,
  3196. SDLG_OPTIONS,
  3197. SDLG_SURRENDER,
  3198. SDLG_SPECIAL
  3199. } SpecialDialogType;
  3200. typedef enum : unsigned char {
  3201. CC_MOUSE_COLOR=16
  3202. } CCPaletteType;
  3203. /****************************************************************************
  3204. ** These specify the shape numbers in the OPTIONS.SHP file. These shapes
  3205. ** are used to dress up the dialog boxes. Many of these shapes come in pairs.
  3206. ** For dialog box shapes, they are left image / right image paired. For buttons,
  3207. ** they are up / down paired.
  3208. */
  3209. typedef enum OptionControlType : char {
  3210. OPTION_NONE=-1, // No fancy shmancy shape.
  3211. OPTION_DIALOG=0, // Small dialog boxes.
  3212. OPTION_CONTROLS=2, // Large dialog boxes, game controls.
  3213. OPTION_DELETE=4, // Delete,Load,Save game.
  3214. OPTION_SERIAL=6, // Serial dialog.
  3215. OPTION_PHONE=8, // Phone dialog.
  3216. OPTION_VISUAL=10, // Visual dialog.
  3217. OPTION_NETWORK=12, // Network dialog.
  3218. OPTION_JOIN_NETWORK=14, // Join network dialog.
  3219. OPTION_SOUND=16, // Sound controls.
  3220. OPTION_COUNT
  3221. } OptionControlType;
  3222. /****************************************************************************
  3223. ** Used to store firing data for a unit.
  3224. */
  3225. typedef struct {
  3226. COORDINATE Center;
  3227. int Distance;
  3228. } FireDataType;
  3229. #define size_of(typ,id) sizeof(((typ*)0)->id)
  3230. #define MAX_LOG_LEVEL 10
  3231. // Maximum number of multi players possible.
  3232. #define MAX_PLAYERS 8 // max # of players we can have
  3233. // Maximum number of teams
  3234. #define MAX_TEAMS 10
  3235. #endif