DOOM-3-BFG

DOOM 3 BFG Edition
Log | Files | Refs

v_video.h (2734B)


      1 /*
      2 ===========================================================================
      3 
      4 Doom 3 BFG Edition GPL Source Code
      5 Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. 
      6 
      7 This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").  
      8 
      9 Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
     10 it under the terms of the GNU General Public License as published by
     11 the Free Software Foundation, either version 3 of the License, or
     12 (at your option) any later version.
     13 
     14 Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
     15 but WITHOUT ANY WARRANTY; without even the implied warranty of
     16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     17 GNU General Public License for more details.
     18 
     19 You should have received a copy of the GNU General Public License
     20 along with Doom 3 BFG Edition Source Code.  If not, see <http://www.gnu.org/licenses/>.
     21 
     22 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.
     23 
     24 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.
     25 
     26 ===========================================================================
     27 */
     28 
     29 #ifndef __V_VIDEO__
     30 #define __V_VIDEO__
     31 
     32 #include "doomtype.h"
     33 
     34 #include "doomdef.h"
     35 
     36 // Needed because we are refering to patches.
     37 #include "r_data.h"
     38 
     39 //
     40 // VIDEO
     41 //
     42 
     43 #define CENTERY			(SCREENHEIGHT/2)
     44 
     45 
     46 // Screen 0 is the screen updated by I_Update screen.
     47 // Screen 1 is an extra buffer.
     48 
     49 
     50 
     51 extern	byte*		screens[5];
     52 
     53 extern  int	dirtybox[4];
     54 
     55 const extern	byte	gammatable[5][256];
     56 extern	int	usegamma;
     57 
     58 
     59 
     60 // Allocates buffer screens, call before R_Init.
     61 void V_Init (void);
     62 
     63 
     64 void
     65 V_CopyRect
     66 ( int		srcx,
     67   int		srcy,
     68   int		srcscrn,
     69   int		width,
     70   int		height,
     71   int		destx,
     72   int		desty,
     73   int		destscrn );
     74 
     75 void
     76 V_DrawPatch
     77 ( int		x,
     78   int		y,
     79   int		scrn,
     80   patch_t*	patch);
     81 
     82 void
     83 V_DrawPatchDirect
     84 ( int		x,
     85   int		y,
     86   int		scrn,
     87   patch_t*	patch );
     88 
     89 
     90 // Draw a linear block of pixels into the view buffer.
     91 void
     92 V_DrawBlock
     93 ( int		x,
     94   int		y,
     95   int		scrn,
     96   int		width,
     97   int		height,
     98   byte*		src );
     99 
    100 // Reads a linear block of pixels into the view buffer.
    101 void
    102 V_GetBlock
    103 ( int		x,
    104   int		y,
    105   int		scrn,
    106   int		width,
    107   int		height,
    108   byte*		dest );
    109 
    110 
    111 void
    112 V_MarkRect
    113 ( int		x,
    114   int		y,
    115   int		width,
    116   int		height );
    117 
    118 #endif
    119