DOOM-3-BFG

DOOM 3 BFG Edition
Log | Files | Refs

r_draw.h (3804B)


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