r_draw.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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_DRAW__
  21. #define __R_DRAW__
  22. #ifdef __GNUG__
  23. #pragma interface
  24. #endif
  25. extern lighttable_t* dc_colormap;
  26. extern int dc_x;
  27. extern int dc_yl;
  28. extern int dc_yh;
  29. extern fixed_t dc_iscale;
  30. extern fixed_t dc_texturemid;
  31. // first pixel in a column
  32. extern byte* dc_source;
  33. // The span blitting interface.
  34. // Hook in assembler or system specific BLT
  35. // here.
  36. void R_DrawColumn ( lighttable_t * dc_colormap,
  37. byte * dc_source );
  38. void R_DrawColumnLow ( lighttable_t * dc_colormap,
  39. byte * dc_source );
  40. // The Spectre/Invisibility effect.
  41. void R_DrawFuzzColumn ( lighttable_t * dc_colormap,
  42. byte * dc_source );
  43. void R_DrawFuzzColumnLow ( lighttable_t * dc_colormap,
  44. byte * dc_source );
  45. // Draw with color translation tables,
  46. // for player sprite rendering,
  47. // Green/Red/Blue/Indigo shirts.
  48. void R_DrawTranslatedColumn ( lighttable_t * dc_colormap,
  49. byte * dc_source );
  50. void R_DrawTranslatedColumnLow ( lighttable_t * dc_colormap,
  51. byte * dc_source );
  52. void
  53. R_VideoErase
  54. ( unsigned ofs,
  55. int count );
  56. extern int ds_y;
  57. extern int ds_x1;
  58. extern int ds_x2;
  59. extern lighttable_t* ds_colormap;
  60. extern fixed_t ds_xfrac;
  61. extern fixed_t ds_yfrac;
  62. extern fixed_t ds_xstep;
  63. extern fixed_t ds_ystep;
  64. // start of a 64*64 tile image
  65. extern byte* ds_source;
  66. extern byte* translationtables;
  67. extern byte* dc_translation;
  68. // Span blitting for rows, floor/ceiling.
  69. // No Sepctre effect needed.
  70. void R_DrawSpan (
  71. fixed_t xfrac,
  72. fixed_t yfrac,
  73. fixed_t ds_y,
  74. int ds_x1,
  75. int ds_x2,
  76. fixed_t ds_xstep,
  77. fixed_t ds_ystep,
  78. lighttable_t * ds_colormap,
  79. byte * ds_source );
  80. // Low resolution mode, 160x200?
  81. void R_DrawSpanLow ( fixed_t xfrac,
  82. fixed_t yfrac,
  83. fixed_t ds_y,
  84. int ds_x1,
  85. int ds_x2,
  86. fixed_t ds_xstep,
  87. fixed_t ds_ystep,
  88. lighttable_t * ds_colormap,
  89. byte * ds_source );
  90. void
  91. R_InitBuffer
  92. ( int width,
  93. int height );
  94. // Initialize color translation tables,
  95. // for player rendering etc.
  96. void R_InitTranslationTables (void);
  97. // Rendering function.
  98. void R_FillBackScreen (void);
  99. // If the view size is not full screen, draws a border around it.
  100. void R_DrawViewBorder (void);
  101. #endif