r_state.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. #ifndef __R_STATE__
  21. #define __R_STATE__
  22. // Need data structure definitions.
  23. #include "d_player.h"
  24. #include "r_data.h"
  25. #ifdef __GNUG__
  26. #pragma interface
  27. #endif
  28. //
  29. // Refresh internal data structures,
  30. // for rendering.
  31. //
  32. // needed for texture pegging
  33. // needed for pre rendering (fracs)
  34. extern fixed_t* spritewidth;
  35. extern fixed_t* spriteoffset;
  36. extern fixed_t* spritetopoffset;
  37. extern lighttable_t* colormaps;
  38. extern int viewwidth;
  39. extern int scaledviewwidth;
  40. extern int viewheight;
  41. extern int firstflat;
  42. // for global animation
  43. extern int* flattranslation;
  44. extern int* texturetranslation;
  45. // Sprite....
  46. extern int firstspritelump;
  47. extern int lastspritelump;
  48. extern int numspritelumps;
  49. //
  50. // Lookup tables for map data.
  51. //
  52. extern int numsprites;
  53. extern spritedef_t* sprites;
  54. extern int numvertexes;
  55. extern vertex_t* vertexes;
  56. extern int numsegs;
  57. extern seg_t* segs;
  58. extern int numsectors;
  59. extern sector_t* sectors;
  60. extern int numsubsectors;
  61. extern subsector_t* subsectors;
  62. extern int numnodes;
  63. extern node_t* nodes;
  64. extern int numlines;
  65. extern line_t* lines;
  66. extern int numsides;
  67. extern side_t* sides;
  68. //
  69. // POV data.
  70. //
  71. extern fixed_t viewx;
  72. extern fixed_t viewy;
  73. extern fixed_t viewz;
  74. extern angle_t viewangle;
  75. extern player_t* viewplayer;
  76. // ?
  77. extern angle_t clipangle;
  78. extern int viewangletox[FINEANGLES/2];
  79. extern angle_t xtoviewangle[SCREENWIDTH+1];
  80. //extern fixed_t finetangent[FINEANGLES/2];
  81. extern fixed_t rw_distance;
  82. extern angle_t rw_normalangle;
  83. // angle to line origin
  84. extern int rw_angle1;
  85. // Segs count?
  86. extern int sscount;
  87. #endif