r_state.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. // Emacs style mode select -*- C++ -*-
  2. //-----------------------------------------------------------------------------
  3. //
  4. // $Id:$
  5. //
  6. // Copyright (C) 1993-1996 by id Software, Inc.
  7. //
  8. // This source is available for distribution and/or modification
  9. // only under the terms of the DOOM Source Code License as
  10. // published by id Software. All rights reserved.
  11. //
  12. // The source is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
  15. // for more details.
  16. //
  17. // DESCRIPTION:
  18. // Refresh/render internal state variables (global).
  19. //
  20. //-----------------------------------------------------------------------------
  21. #ifndef __R_STATE__
  22. #define __R_STATE__
  23. // Need data structure definitions.
  24. #include "d_player.h"
  25. #include "r_data.h"
  26. #ifdef __GNUG__
  27. #pragma interface
  28. #endif
  29. //
  30. // Refresh internal data structures,
  31. // for rendering.
  32. //
  33. // needed for texture pegging
  34. extern fixed_t* textureheight;
  35. // needed for pre rendering (fracs)
  36. extern fixed_t* spritewidth;
  37. extern fixed_t* spriteoffset;
  38. extern fixed_t* spritetopoffset;
  39. extern lighttable_t* colormaps;
  40. extern int viewwidth;
  41. extern int scaledviewwidth;
  42. extern int viewheight;
  43. extern int firstflat;
  44. // for global animation
  45. extern int* flattranslation;
  46. extern int* texturetranslation;
  47. // Sprite....
  48. extern int firstspritelump;
  49. extern int lastspritelump;
  50. extern int numspritelumps;
  51. //
  52. // Lookup tables for map data.
  53. //
  54. extern int numsprites;
  55. extern spritedef_t* sprites;
  56. extern int numvertexes;
  57. extern vertex_t* vertexes;
  58. extern int numsegs;
  59. extern seg_t* segs;
  60. extern int numsectors;
  61. extern sector_t* sectors;
  62. extern int numsubsectors;
  63. extern subsector_t* subsectors;
  64. extern int numnodes;
  65. extern node_t* nodes;
  66. extern int numlines;
  67. extern line_t* lines;
  68. extern int numsides;
  69. extern side_t* sides;
  70. //
  71. // POV data.
  72. //
  73. extern fixed_t viewx;
  74. extern fixed_t viewy;
  75. extern fixed_t viewz;
  76. extern angle_t viewangle;
  77. extern player_t* viewplayer;
  78. // ?
  79. extern angle_t clipangle;
  80. extern int viewangletox[FINEANGLES/2];
  81. extern angle_t xtoviewangle[SCREENWIDTH+1];
  82. //extern fixed_t finetangent[FINEANGLES/2];
  83. extern fixed_t rw_distance;
  84. extern angle_t rw_normalangle;
  85. // angle to line origin
  86. extern int rw_angle1;
  87. // Segs count?
  88. extern int sscount;
  89. extern visplane_t* floorplane;
  90. extern visplane_t* ceilingplane;
  91. #endif
  92. //-----------------------------------------------------------------------------
  93. //
  94. // $Log:$
  95. //
  96. //-----------------------------------------------------------------------------