vars.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910
  1. /*
  2. ===========================================================================
  3. Doom 3 BFG Edition GPL Source Code
  4. Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
  5. This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
  6. Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
  16. In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
  17. If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
  18. ===========================================================================
  19. */
  20. // the all-important zone //
  21. memzone_t* mainzone;
  22. idFile * wadFileHandles[MAXWADFILES];
  23. int numWadFiles;
  24. // am_map.vars begin //
  25. int cheating ;
  26. int grid ;
  27. int leveljuststarted ;
  28. qboolean automapactive ;
  29. int finit_width ;
  30. int finit_height ;
  31. int f_x;
  32. int f_y;
  33. int f_w;
  34. int f_h;
  35. int lightlev; // used for funky strobing effect
  36. byte* fb; // pseudo-frame buffer
  37. int amclock;
  38. mpoint_t m_paninc; // how far the window pans each tic (map coords)
  39. fixed_t mtof_zoommul; // how far the window zooms in each tic (map coords)
  40. fixed_t ftom_zoommul; // how far the window zooms in each tic (fb coords)
  41. fixed_t m_x, m_y; // LL x,y where the window is on the map (map coords)
  42. fixed_t m_x2, m_y2; // UR x,y where the window is on the map (map coords)
  43. fixed_t m_w;
  44. fixed_t m_h;
  45. fixed_t min_x;
  46. fixed_t min_y;
  47. fixed_t max_x;
  48. fixed_t max_y;
  49. fixed_t max_w; // max_x-min_x,
  50. fixed_t max_h; // max_y-min_y
  51. fixed_t min_w;
  52. fixed_t min_h;
  53. fixed_t min_scale_mtof; // used to tell when to stop zooming out
  54. fixed_t max_scale_mtof; // used to tell when to stop zooming in
  55. fixed_t old_m_w, old_m_h;
  56. fixed_t old_m_x, old_m_y;
  57. mpoint_t f_oldloc;
  58. fixed_t scale_mtof ;
  59. fixed_t scale_ftom;
  60. player_t *amap_plr; // the player represented by an arrow
  61. patch_t *marknums[10]; // numbers used for marking by the automap
  62. mpoint_t markpoints[AM_NUMMARKPOINTS]; // where the points are
  63. int markpointnum ;
  64. int followplayer ;
  65. qboolean stopped ;
  66. int lastlevel ;
  67. int lastepisode ;
  68. int cheatstate;
  69. int bigstate;
  70. char buffer[20];
  71. int nexttic ;
  72. int litelevelscnt ;
  73. // am_map.vars end //
  74. // doomlib.vars begin //
  75. fixed_t realoffset;
  76. fixed_t viewxoffset;
  77. fixed_t viewyoffset;
  78. // doomlib.vars end //
  79. // doomstat.vars begin //
  80. GameMode_t gamemode ;
  81. int gamemission ;
  82. Language_t language ;
  83. qboolean modifiedgame;
  84. // doomstat.vars end //
  85. // d_main.vars begin //
  86. qboolean devparm; // started game with -devparm
  87. qboolean nomonsters; // checkparm of -nomonsters
  88. qboolean respawnparm; // checkparm of -respawn
  89. qboolean fastparm; // checkparm of -fast
  90. qboolean drone;
  91. qboolean singletics ;
  92. skill_t startskill;
  93. int startepisode;
  94. int startmap;
  95. qboolean autostart;
  96. FILE* debugfile;
  97. qboolean advancedemo;
  98. char wadfile[1024]; // primary wad file
  99. char mapdir[1024]; // directory of development maps
  100. char basedefault[1024]; // default file
  101. event_t events[MAXEVENTS];
  102. int eventhead;
  103. int eventtail;
  104. gamestate_t wipegamestate ;
  105. qboolean viewactivestate ;
  106. qboolean menuactivestate ;
  107. qboolean inhelpscreensstate ;
  108. qboolean fullscreen ;
  109. int borderdrawcount;
  110. qboolean wipe ;
  111. int wipestart;
  112. qboolean wipedone;
  113. int demosequence;
  114. int pagetic;
  115. char *pagename;
  116. char title[128];
  117. // d_main.vars end //
  118. // d_net.vars begin //
  119. doomcom_t doomcom;
  120. doomdata_t* netbuffer; // points inside doomcom
  121. ticcmd_t localcmds[BACKUPTICS];
  122. ticcmd_t netcmds[MAXPLAYERS][BACKUPTICS];
  123. int nettics[MAXNETNODES];
  124. qboolean nodeingame[MAXNETNODES]; // set false as nodes leave game
  125. qboolean remoteresend[MAXNETNODES]; // set when local needs tics
  126. int resendto[MAXNETNODES]; // set when remote needs tics
  127. int resendcount[MAXNETNODES];
  128. int nodeforplayer[MAXPLAYERS];
  129. int maketic;
  130. int lastnettic;
  131. int skiptics;
  132. int ticdup;
  133. int maxsend; // BACKUPTICS/(2*ticdup)-1
  134. qboolean reboundpacket;
  135. doomdata_t reboundstore;
  136. char exitmsg[80];
  137. int gametime;
  138. qboolean gotinfo[MAXNETNODES];
  139. int frametics[4];
  140. int frameon;
  141. int frameskip[4];
  142. int oldnettics;
  143. int oldtrt_entertics;
  144. int trt_phase ;
  145. int trt_lowtic;
  146. int trt_entertic;
  147. int trt_realtics;
  148. int trt_availabletics;
  149. int trt_counts;
  150. int trt_numplaying;
  151. // d_net.vars end //
  152. // f_finale.vars begin //
  153. int finalestage;
  154. int finalecount;
  155. int castnum;
  156. int casttics;
  157. state_t* caststate;
  158. qboolean castdeath;
  159. int castframes;
  160. int castonmelee;
  161. int caststartmenu;
  162. qboolean castattacking;
  163. int laststage;
  164. // f_finale.vars end //
  165. // f_wipe.vars begin //
  166. qboolean go ;
  167. byte* wipe_scr_start;
  168. byte* wipe_scr_end;
  169. byte* wipe_scr;
  170. void *g_tempPointer;
  171. int* wipe_y;
  172. // f_wipe.vars end //
  173. // g_game.vars begin //
  174. gameaction_t gameaction;
  175. gamestate_t gamestate;
  176. gamestate_t oldgamestate;
  177. skill_t gameskill;
  178. qboolean respawnmonsters;
  179. int gameepisode;
  180. int gamemap;
  181. qboolean paused;
  182. qboolean sendpause; // send a pause event next tic
  183. qboolean sendsave; // send a save event next tic
  184. qboolean usergame; // ok to save / end game
  185. qboolean timingdemo; // if true, exit with report on completion
  186. qboolean nodrawers; // for comparative timing purposes
  187. qboolean noblit; // for comparative timing purposes
  188. int starttime; // for comparative timing purposes
  189. qboolean viewactive;
  190. qboolean deathmatch; // only if started as net death
  191. qboolean netgame; // only true if packets are broadcast
  192. qboolean playeringame[MAXPLAYERS];
  193. player_t players[MAXPLAYERS];
  194. int consoleplayer; // player taking events and displaying
  195. int displayplayer; // view being displayed
  196. int gametic;
  197. int levelstarttic; // gametic at level start
  198. int totalkills, totalitems, totalsecret; // for intermission
  199. char demoname[32];
  200. qboolean demoplayback;
  201. qboolean demorecording;
  202. qboolean netdemo;
  203. byte* demobuffer;
  204. byte* demo_p;
  205. byte* demoend;
  206. qboolean singledemo; // quit after playing a demo from cmdline
  207. qboolean precache ;
  208. wbstartstruct_t wminfo; // parms for world map / intermission
  209. short consistancy[MAXPLAYERS][BACKUPTICS];
  210. byte* savebuffer;
  211. int savebufferSize;
  212. int key_right;
  213. int key_left;
  214. int key_up;
  215. int key_down;
  216. int key_strafeleft;
  217. int key_straferight;
  218. int key_fire;
  219. int key_use;
  220. int key_strafe;
  221. int key_speed;
  222. int mousebfire;
  223. int mousebstrafe;
  224. int mousebforward;
  225. int joybfire;
  226. int joybstrafe;
  227. int joybuse;
  228. int joybspeed;
  229. fixed_t forwardmove[2];
  230. fixed_t sidemove[2];
  231. fixed_t angleturn[3];
  232. qboolean gamekeydown[NUMKEYS];
  233. int turnheld; // for accelerative turning
  234. qboolean mousearray[4];
  235. qboolean* mousebuttons ;
  236. int mousex;
  237. int mousey;
  238. int dclicktime;
  239. int dclickstate;
  240. int dclicks;
  241. int dclicktime2;
  242. int dclickstate2;
  243. int dclicks2;
  244. int joyxmove;
  245. int joyymove;
  246. qboolean joyarray[5];
  247. qboolean* joybuttons ;
  248. int savegameslot;
  249. char savedescription[32];
  250. mobj_t* bodyque[BODYQUESIZE];
  251. int bodyqueslot;
  252. char turbomessage[80];
  253. qboolean secretexit;
  254. char savename[256];
  255. skill_t d_skill;
  256. int d_episode;
  257. int d_map;
  258. int d_mission;
  259. char* defdemoname;
  260. // g_game.vars end //
  261. // hu_lib.vars begin //
  262. qboolean lastautomapactive ;
  263. // hu_lib.vars end //
  264. // hu_stuff.vars begin //
  265. char chat_char; // remove later.
  266. player_t* plr;
  267. patch_t* hu_font[HU_FONTSIZE];
  268. hu_textline_t w_title;
  269. qboolean chat_on;
  270. hu_itext_t w_chat;
  271. qboolean always_off ;
  272. char chat_dest[MAXPLAYERS];
  273. hu_itext_t w_inputbuffer[MAXPLAYERS];
  274. qboolean message_on;
  275. qboolean message_dontfuckwithme;
  276. qboolean message_nottobefuckedwith;
  277. hu_stext_t w_message;
  278. int message_counter;
  279. qboolean headsupactive ;
  280. char chatchars[QUEUESIZE];
  281. int head ;
  282. int tail ;
  283. char lastmessage[HU_MAXLINELENGTH+1];
  284. qboolean shiftdown ;
  285. qboolean altdown ;
  286. int num_nobrainers ;
  287. // hu_stuff.vars end //
  288. // i_input.vars begin //
  289. InputEvent mouseEvents[2];
  290. InputEvent joyEvents[18];
  291. // i_input.vars end //
  292. // i_net_xbox.vars begin //
  293. int sendsocket;
  294. int insocket;
  295. struct sockaddr_in sendaddress[MAXNETNODES];
  296. // i_net_xbox.vars end //
  297. // i_system.vars begin //
  298. int mb_used ;
  299. ticcmd_t emptycmd;
  300. int current_time ;
  301. // i_system.vars end //
  302. // i_video_xbox.vars begin //
  303. unsigned int XColorMap[256];
  304. unsigned int *ImageBuff;
  305. unsigned int *ImageBuffs[2];
  306. // i_video_xbox.vars end //
  307. // m_argv.vars begin //
  308. int myargc;
  309. char** myargv;
  310. // m_argv.vars end //
  311. // m_cheat.vars begin //
  312. int firsttime ;
  313. unsigned char cheat_xlate_table[256];
  314. unsigned char cheatbuffer[256];
  315. int usedcheatbuffer ;
  316. // m_cheat.vars end //
  317. // m_menu.vars begin //
  318. int mouseSensitivity; // has default
  319. int showMessages;
  320. int detailLevel;
  321. int screenblocks; // has default
  322. int screenSize;
  323. int quickSaveSlot;
  324. int messageToPrint;
  325. char* messageString;
  326. int messx;
  327. int messy;
  328. int messageLastMenuActive;
  329. qboolean messageNeedsInput;
  330. messageRoutine_t messageRoutine;
  331. int saveStringEnter;
  332. int saveSlot; // which slot to save in
  333. int saveCharIndex; // which char we're editing
  334. char saveOldString[SAVESTRINGSIZE];
  335. qboolean inhelpscreens;
  336. qboolean menuactive;
  337. char savegamestrings[10][SAVESTRINGSIZE];
  338. char savegamepaths[10][MAX_PATH];
  339. char endstring[160];
  340. short itemOn; // menu item skull is on
  341. short skullAnimCounter; // skull animation counter
  342. short whichSkull; // which skull to draw
  343. menu_t* currentMenu;
  344. menuitem_t MainMenu[5];
  345. menu_t QuitDef;
  346. menuitem_t QuitMenu[3];
  347. menu_t MainDef;
  348. menuitem_t EpisodeMenu[4];
  349. menu_t EpiDef;
  350. menuitem_t ExpansionMenu[2];
  351. menu_t ExpDef;
  352. menuitem_t NewGameMenu[5];
  353. menu_t NewDef;
  354. menuitem_t OptionsMenu[8];
  355. menu_t OptionsDef;
  356. menuitem_t SoundMenu[4];
  357. menu_t SoundDef;
  358. menuitem_t LoadMenu[6];
  359. menu_t LoadDef;
  360. menuitem_t LoadExpMenu[2];
  361. menu_t LoadExpDef;
  362. menuitem_t SaveMenu[6];
  363. menu_t SaveDef;
  364. char tempstring[80];
  365. int epi;
  366. int exp;
  367. int quitsounds[8];
  368. int quitsounds2[8];
  369. int joywait ;
  370. int mousewait ;
  371. int mmenu_mousey ;
  372. int lasty ;
  373. int mmenu_mousex ;
  374. int lastx ;
  375. short md_x;
  376. short md_y;
  377. // m_menu.vars end //
  378. // m_misc.vars begin //
  379. const char * g_pszSaveFile ;
  380. const char * g_pszImagePath ;
  381. const char * g_pszImageMeta ;
  382. int usemouse;
  383. int usejoystick;
  384. char* mousetype;
  385. char* mousedev;
  386. default_t defaults[35];
  387. int numdefaults;
  388. const char* defaultfile;
  389. // m_misc.vars end //
  390. // m_random.vars begin //
  391. int rndindex ;
  392. int prndindex ;
  393. // m_random.vars end //
  394. // p_ceilng.vars begin //
  395. ceiling_t* activeceilings[MAXCEILINGS];
  396. // p_ceilng.vars end //
  397. // p_enemy.vars begin //
  398. mobj_t* soundtarget;
  399. int TRACEANGLE ;
  400. mobj_t* corpsehit;
  401. mobj_t* vileobj;
  402. fixed_t viletryx;
  403. fixed_t viletryy;
  404. mobj_t* braintargets[32];
  405. int numbraintargets;
  406. int braintargeton;
  407. int easy ;
  408. // p_enemy.vars end //
  409. // p_map.vars begin //
  410. fixed_t tmbbox[4];
  411. mobj_t* tmthing;
  412. int tmflags;
  413. fixed_t tmx;
  414. fixed_t tmy;
  415. qboolean floatok;
  416. fixed_t tmfloorz;
  417. fixed_t tmceilingz;
  418. fixed_t tmdropoffz;
  419. line_t* ceilingline;
  420. line_t* spechit[MAXSPECIALCROSS];
  421. int numspechit;
  422. fixed_t bestslidefrac;
  423. fixed_t secondslidefrac;
  424. line_t* bestslideline;
  425. line_t* secondslideline;
  426. mobj_t* slidemo;
  427. fixed_t tmxmove;
  428. fixed_t tmymove;
  429. mobj_t* linetarget; // who got hit (or NULL)
  430. mobj_t* shootthing;
  431. fixed_t shootz;
  432. int la_damage;
  433. fixed_t attackrange;
  434. fixed_t aimslope;
  435. mobj_t* usething;
  436. mobj_t* bombsource;
  437. mobj_t* bombspot;
  438. int bombdamage;
  439. qboolean crushchange;
  440. qboolean nofit;
  441. // p_map.vars end //
  442. // p_maputl.vars begin //
  443. fixed_t opentop;
  444. fixed_t openbottom;
  445. fixed_t openrange;
  446. fixed_t lowfloor;
  447. intercept_t intercepts[MAXINTERCEPTS];
  448. intercept_t* intercept_p;
  449. divline_t trace;
  450. qboolean earlyout;
  451. int ptflags;
  452. // p_maputl.vars end //
  453. // p_mobj.vars begin //
  454. int test;
  455. mapthing_t itemrespawnque[ITEMQUESIZE];
  456. int itemrespawntime[ITEMQUESIZE];
  457. int iquehead;
  458. int iquetail;
  459. // p_mobj.vars end //
  460. // p_plats.vars begin //
  461. plat_t* activeplats[MAXPLATS];
  462. // p_plats.vars end //
  463. // p_pspr.vars begin //
  464. fixed_t swingx;
  465. fixed_t swingy;
  466. fixed_t bulletslope;
  467. // p_pspr.vars end //
  468. // p_saveg.vars begin //
  469. byte* save_p;
  470. // p_saveg.vars end //
  471. // p_setup.vars begin //
  472. int numvertexes;
  473. vertex_t* vertexes;
  474. int numsegs;
  475. seg_t* segs;
  476. int numsectors;
  477. sector_t* sectors;
  478. int numsubsectors;
  479. subsector_t* subsectors;
  480. int numnodes;
  481. node_t* nodes;
  482. int numlines;
  483. line_t* lines;
  484. int numsides;
  485. side_t* sides;
  486. int bmapwidth;
  487. int bmapheight; // size in mapblocks
  488. short* blockmap; // int for larger maps
  489. short* blockmaplump;
  490. fixed_t bmaporgx;
  491. fixed_t bmaporgy;
  492. mobj_t** blocklinks;
  493. mapthing_t deathmatchstarts[MAX_DEATHMATCH_STARTS];
  494. mapthing_t* deathmatch_p;
  495. mapthing_t playerstarts[MAXPLAYERS];
  496. // p_setup.vars end //
  497. // p_sight.vars begin //
  498. fixed_t sightzstart; // eye z of looker
  499. fixed_t topslope;
  500. fixed_t bottomslope; // slopes to top and bottom of target
  501. divline_t strace; // from t1 to t2
  502. fixed_t t2x;
  503. fixed_t t2y;
  504. int sightcounts[2];
  505. // p_sight.vars end //
  506. // p_spec.vars begin //
  507. anim_t2 anims[MAXANIMS];
  508. anim_t2* lastanim;
  509. qboolean levelTimer;
  510. int levelTimeCount;
  511. int levelFragCount;
  512. short numlinespecials;
  513. line_t* linespeciallist[MAXLINEANIMS];
  514. // p_spec.vars end //
  515. // p_switch.vars begin //
  516. int switchlist[MAXSWITCHES * 2];
  517. int numswitches;
  518. button_t buttonlist[MAXBUTTONS];
  519. // p_switch.vars end //
  520. // p_tick.vars begin //
  521. int leveltime;
  522. thinker_t thinkercap;
  523. // p_tick.vars end //
  524. // p_user.vars begin //
  525. qboolean onground;
  526. // p_user.vars end //
  527. // r_bsp.vars begin //
  528. seg_t* curline;
  529. side_t* sidedef;
  530. line_t* linedef;
  531. sector_t* frontsector;
  532. sector_t* backsector;
  533. drawseg_t drawsegs[MAXDRAWSEGS];
  534. drawseg_t* ds_p;
  535. cliprange_t* newend;
  536. cliprange_t solidsegs[MAXSEGS];
  537. int checkcoord[12][4];
  538. // r_bsp.vars end //
  539. // r_data.vars begin //
  540. int firstflat;
  541. int lastflat;
  542. int numflats;
  543. int firstpatch;
  544. int lastpatch;
  545. int numpatches;
  546. int firstspritelump;
  547. int lastspritelump;
  548. int numspritelumps;
  549. int* flattranslation;
  550. int* texturetranslation;
  551. fixed_t* spritewidth;
  552. fixed_t* spriteoffset;
  553. fixed_t* spritetopoffset;
  554. lighttable_t *colormaps;
  555. int flatmemory;
  556. int texturememory;
  557. int spritememory;
  558. // r_data.vars end //
  559. // r_draw.vars begin //
  560. byte* viewimage;
  561. int viewwidth;
  562. int scaledviewwidth;
  563. int viewheight;
  564. int viewwindowx;
  565. int viewwindowy;
  566. byte* ylookup[MAXHEIGHT];
  567. int columnofs[MAXWIDTH];
  568. byte translations[3][256];
  569. lighttable_t* dc_colormap;
  570. int dc_x;
  571. int dc_yl;
  572. int dc_yh;
  573. fixed_t dc_iscale;
  574. fixed_t dc_texturemid;
  575. byte* dc_source;
  576. int dccount;
  577. int fuzzoffset[FUZZTABLE];
  578. int fuzzpos ;
  579. byte* dc_translation;
  580. byte* translationtables;
  581. int ds_y;
  582. int ds_x1;
  583. int ds_x2;
  584. lighttable_t* ds_colormap;
  585. fixed_t ds_xfrac;
  586. fixed_t ds_yfrac;
  587. fixed_t ds_xstep;
  588. fixed_t ds_ystep;
  589. byte* ds_source;
  590. int dscount;
  591. // r_draw.vars end //
  592. // r_main.vars begin //
  593. int viewangleoffset;
  594. int validcount ;
  595. lighttable_t* fixedcolormap;
  596. int centerx;
  597. int centery;
  598. fixed_t centerxfrac;
  599. fixed_t centeryfrac;
  600. fixed_t projection;
  601. int framecount;
  602. int sscount;
  603. int linecount;
  604. int loopcount;
  605. fixed_t viewx;
  606. fixed_t viewy;
  607. fixed_t viewz;
  608. angle_t viewangle;
  609. fixed_t viewcos;
  610. fixed_t viewsin;
  611. player_t* viewplayer;
  612. int detailshift;
  613. angle_t clipangle;
  614. int viewangletox[FINEANGLES/2];
  615. angle_t xtoviewangle[SCREENWIDTH+1];
  616. lighttable_t* scalelight[LIGHTLEVELS][MAXLIGHTSCALE];
  617. lighttable_t* scalelightfixed[MAXLIGHTSCALE];
  618. lighttable_t* zlight[LIGHTLEVELS][MAXLIGHTZ];
  619. int extralight;
  620. qboolean setsizeneeded;
  621. int setblocks;
  622. int setdetail;
  623. // r_main.vars end //
  624. // r_plane.vars begin //
  625. planefunction_t floorfunc;
  626. planefunction_t ceilingfunc;
  627. short openings[MAXOPENINGS];
  628. short* lastopening;
  629. short floorclip[SCREENWIDTH];
  630. short ceilingclip[SCREENWIDTH];
  631. int spanstart[SCREENHEIGHT];
  632. int spanstop[SCREENHEIGHT];
  633. lighttable_t** planezlight;
  634. fixed_t planeheight;
  635. fixed_t yslope[SCREENHEIGHT];
  636. fixed_t distscale[SCREENWIDTH];
  637. fixed_t basexscale;
  638. fixed_t baseyscale;
  639. fixed_t cachedheight[SCREENHEIGHT];
  640. fixed_t cacheddistance[SCREENHEIGHT];
  641. fixed_t cachedxstep[SCREENHEIGHT];
  642. fixed_t cachedystep[SCREENHEIGHT];
  643. // r_plane.vars end //
  644. // r_segs.vars begin //
  645. qboolean segtextured;
  646. qboolean markfloor;
  647. qboolean markceiling;
  648. qboolean maskedtexture;
  649. int toptexture;
  650. int bottomtexture;
  651. int midtexture;
  652. angle_t rw_normalangle;
  653. int rw_angle1;
  654. int rw_x;
  655. int rw_stopx;
  656. angle_t rw_centerangle;
  657. fixed_t rw_offset;
  658. fixed_t rw_distance;
  659. fixed_t rw_scale;
  660. fixed_t rw_scalestep;
  661. fixed_t rw_midtexturemid;
  662. fixed_t rw_toptexturemid;
  663. fixed_t rw_bottomtexturemid;
  664. int worldtop;
  665. int worldbottom;
  666. int worldhigh;
  667. int worldlow;
  668. fixed_t pixhigh;
  669. fixed_t pixlow;
  670. fixed_t pixhighstep;
  671. fixed_t pixlowstep;
  672. fixed_t topfrac;
  673. fixed_t topstep;
  674. fixed_t bottomfrac;
  675. fixed_t bottomstep;
  676. lighttable_t** walllights;
  677. short* maskedtexturecol;
  678. // r_segs.vars end //
  679. // r_sky.vars begin //
  680. int skyflatnum;
  681. int skytexture;
  682. int skytexturemid;
  683. // r_sky.vars end //
  684. // r_things.vars begin //
  685. fixed_t pspritescale;
  686. fixed_t pspriteiscale;
  687. lighttable_t** spritelights;
  688. short negonearray[SCREENWIDTH];
  689. short screenheightarray[SCREENWIDTH];
  690. spritedef_t* sprites;
  691. int numsprites;
  692. spriteframe_t sprtemp[29];
  693. int maxframe;
  694. vissprite_t vissprites[MAXVISSPRITES];
  695. vissprite_t* vissprite_p;
  696. int newvissprite;
  697. vissprite_t overflowsprite;
  698. short* mfloorclip;
  699. short* mceilingclip;
  700. fixed_t spryscale;
  701. fixed_t sprtopscreen;
  702. vissprite_t vsprsortedhead;
  703. // r_things.vars end //
  704. // sounds.vars begin //
  705. musicinfo_t S_music[80];
  706. // sounds.vars end //
  707. // st_lib.vars begin //
  708. patch_t* sttminus;
  709. // st_lib.vars end //
  710. // st_stuff.vars begin //
  711. player_t* plyr;
  712. qboolean st_firsttime;
  713. int veryfirsttime ;
  714. int lu_palette;
  715. unsigned int st_clock;
  716. int st_msgcounter;
  717. st_chatstateenum_t st_chatstate;
  718. st_stateenum_t st_gamestate;
  719. qboolean st_statusbaron;
  720. qboolean st_chat;
  721. qboolean st_oldchat;
  722. qboolean st_cursoron;
  723. qboolean st_notdeathmatch;
  724. qboolean st_armson;
  725. qboolean st_fragson;
  726. patch_t* sbar; // AffLANHACK IGNORE
  727. patch_t* tallnum[10]; // AffLANHACK IGNORE
  728. patch_t* tallpercent; // AffLANHACK IGNORE
  729. patch_t* shortnum[10]; // AffLANHACK IGNORE
  730. patch_t* keys[NUMCARDS]; // AffLANHACK IGNORE
  731. patch_t* faces[ST_NUMFACES]; // AffLANHACK IGNORE
  732. patch_t* faceback; // AffLANHACK IGNORE
  733. patch_t* armsbg; // AffLANHACK IGNORE
  734. patch_t* arms[6][2]; // AffLANHACK IGNORE
  735. st_number_t w_ready;
  736. st_number_t w_frags;
  737. st_percent_t w_health;
  738. st_binicon_t w_armsbg;
  739. st_multicon_t w_arms[6];
  740. st_multicon_t w_faces;
  741. st_multicon_t w_keyboxes[3];
  742. st_percent_t w_armor;
  743. st_number_t w_ammo[4];
  744. st_number_t w_maxammo[4];
  745. int st_fragscount;
  746. int st_oldhealth ;
  747. qboolean oldweaponsowned[NUMWEAPONS];
  748. int st_facecount ;
  749. int st_faceindex ;
  750. int keyboxes[3];
  751. int st_randomnumber;
  752. cheatseq_t cheat_powerup[7];
  753. int lastcalc;
  754. int oldhealth ;
  755. int lastattackdown ;
  756. int priority ;
  757. int largeammo ;
  758. int st_palette ;
  759. qboolean st_stopped ;
  760. // st_stuff.vars end //
  761. // s_sound.vars begin //
  762. channel_t* channels;
  763. qboolean mus_paused;
  764. qboolean mus_looping;
  765. musicinfo_t* mus_playing;
  766. int numChannels;
  767. int nextcleanup;
  768. // s_sound.vars end //
  769. // v_video.vars begin //
  770. byte* screens[5];
  771. int dirtybox[4];
  772. int usegamma;
  773. // v_video.vars end //
  774. // wi_stuff.vars begin //
  775. anim_t epsd0animinfo[10];
  776. anim_t epsd1animinfo[9];
  777. anim_t epsd2animinfo[6];
  778. anim_t* wi_stuff_anims[NUMEPISODES];
  779. int NUMANIMS[NUMEPISODES];
  780. const char* chat_macros[10];
  781. int acceleratestage;
  782. int me;
  783. stateenum_t state;
  784. wbstartstruct_t* wbs;
  785. int cnt;
  786. int bcnt;
  787. int firstrefresh;
  788. int cnt_kills[MAXPLAYERS];
  789. int cnt_items[MAXPLAYERS];
  790. int cnt_secret[MAXPLAYERS];
  791. int cnt_time;
  792. int cnt_par;
  793. int cnt_pause;
  794. int NUMCMAPS;
  795. patch_t* colon;
  796. qboolean snl_pointeron ;
  797. int dm_state;
  798. int dm_frags[MAXPLAYERS][MAXPLAYERS];
  799. int dm_totals[MAXPLAYERS];
  800. int cnt_frags[MAXPLAYERS];
  801. int dofrags;
  802. int ng_state;
  803. int sp_state;
  804. // wi_stuff.vars end //
  805. // w_wad.vars begin //
  806. int reloadlump;
  807. // w_wad.vars end //
  808. // z_zone.vars begin //
  809. int sizes[NUM_ZONES+1];
  810. memzone_t* zones[NUM_ZONES] ;
  811. int NumAlloc ;
  812. // z_zone.vars end //
  813. // info vars begin //
  814. state_t states[NUMSTATES];
  815. // info vars end //
  816. // p_local begin //
  817. byte* rejectmatrix;
  818. // p_local end //
  819. // r_data begin //
  820. int s_numtextures;
  821. texture_t** s_textures;
  822. int* s_texturewidthmask;
  823. // needed for texture pegging
  824. fixed_t* s_textureheight;
  825. short** s_texturecolumnlump;
  826. unsigned short** s_texturecolumnofs;
  827. byte** s_texturecomposite;
  828. int* s_texturecompositesize;
  829. // r_data end //
  830. // r_plane begin //
  831. visplane_t visplanes[MAXVISPLANES];
  832. visplane_t* lastvisplane;
  833. visplane_t* floorplane;
  834. visplane_t* ceilingplane;
  835. // r_plane end //
  836. // wi_stuff
  837. // background (map of levels).
  838. patch_t* bg;
  839. // You Are Here graphic
  840. patch_t* yah[2];
  841. // splat
  842. patch_t* splat;
  843. // %, : graphics
  844. patch_t* percent;
  845. // 0-9 graphic
  846. patch_t* num[10];
  847. // minus sign
  848. patch_t* wiminus;
  849. // "Finished!" graphics
  850. patch_t* finished;
  851. // "Entering" graphic
  852. patch_t* entering;
  853. // "secret"
  854. patch_t* sp_secret;
  855. // "Kills", "Scrt", "Items", "Frags"
  856. patch_t* kills;
  857. patch_t* secret;
  858. patch_t* items;
  859. patch_t* wistuff_frags;
  860. // Time sucks.
  861. patch_t* time;
  862. patch_t* par;
  863. patch_t* sucks;
  864. // "killers", "victims"
  865. patch_t* killers;
  866. patch_t* victims;
  867. // "Total", your face, your dead face
  868. patch_t* total;
  869. patch_t* star;
  870. patch_t* bstar;
  871. // "red P[1..MAXPLAYERS]"
  872. patch_t* wistuff_p[MAXPLAYERS];
  873. // "gray P[1..MAXPLAYERS]"
  874. patch_t* wistuff_bp[MAXPLAYERS];
  875. // Name graphics of each level (centered)
  876. patch_t** lnames;
  877. const char* spritename;