v_video.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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 __V_VIDEO__
  21. #define __V_VIDEO__
  22. #include "doomtype.h"
  23. #include "doomdef.h"
  24. // Needed because we are refering to patches.
  25. #include "r_data.h"
  26. //
  27. // VIDEO
  28. //
  29. #define CENTERY (SCREENHEIGHT/2)
  30. // Screen 0 is the screen updated by I_Update screen.
  31. // Screen 1 is an extra buffer.
  32. extern byte* screens[5];
  33. extern int dirtybox[4];
  34. const extern byte gammatable[5][256];
  35. extern int usegamma;
  36. // Allocates buffer screens, call before R_Init.
  37. void V_Init (void);
  38. void
  39. V_CopyRect
  40. ( int srcx,
  41. int srcy,
  42. int srcscrn,
  43. int width,
  44. int height,
  45. int destx,
  46. int desty,
  47. int destscrn );
  48. void
  49. V_DrawPatch
  50. ( int x,
  51. int y,
  52. int scrn,
  53. patch_t* patch);
  54. void
  55. V_DrawPatchDirect
  56. ( int x,
  57. int y,
  58. int scrn,
  59. patch_t* patch );
  60. // Draw a linear block of pixels into the view buffer.
  61. void
  62. V_DrawBlock
  63. ( int x,
  64. int y,
  65. int scrn,
  66. int width,
  67. int height,
  68. byte* src );
  69. // Reads a linear block of pixels into the view buffer.
  70. void
  71. V_GetBlock
  72. ( int x,
  73. int y,
  74. int scrn,
  75. int width,
  76. int height,
  77. byte* dest );
  78. void
  79. V_MarkRect
  80. ( int x,
  81. int y,
  82. int width,
  83. int height );
  84. #endif