doom

a minimalistic implementation of doom
git clone git://ssnf.xyz/doom
Log | Files | Refs

r_main.h (1743B)


      1 
      2 
      3 
      4 
      5 
      6 
      7 
      8 
      9 
     10 
     11 
     12 
     13 
     14 
     15 
     16 
     17 
     18 
     19 
     20 
     21 
     22 
     23 #ifndef __R_MAIN__
     24 #define __R_MAIN__
     25 
     26 #include "d_player.h"
     27 #include "r_data.h"
     28 
     29 
     30 #ifdef __GNUG__
     31 #pragma interface
     32 #endif
     33 
     34 
     35 
     36 
     37 
     38 extern fixed_t		viewcos;
     39 extern fixed_t		viewsin;
     40 
     41 extern int		viewwidth;
     42 extern int		viewheight;
     43 extern int		viewwindowx;
     44 extern int		viewwindowy;
     45 
     46 
     47 
     48 extern int		centerx;
     49 extern int		centery;
     50 
     51 extern fixed_t		centerxfrac;
     52 extern fixed_t		centeryfrac;
     53 extern fixed_t		projection;
     54 
     55 extern int		validcount;
     56 
     57 extern int		linecount;
     58 extern int		loopcount;
     59 
     60 
     61 
     62 
     63 
     64 
     65 
     66 
     67 
     68 
     69 #define LIGHTLEVELS	        16
     70 #define LIGHTSEGSHIFT	         4
     71 
     72 #define MAXLIGHTSCALE		48
     73 #define LIGHTSCALESHIFT		12
     74 #define MAXLIGHTZ	       128
     75 #define LIGHTZSHIFT		20
     76 
     77 extern lighttable_t*	scalelight[LIGHTLEVELS][MAXLIGHTSCALE];
     78 extern lighttable_t*	scalelightfixed[MAXLIGHTSCALE];
     79 extern lighttable_t*	zlight[LIGHTLEVELS][MAXLIGHTZ];
     80 
     81 extern int		extralight;
     82 extern lighttable_t*	fixedcolormap;
     83 
     84 
     85 
     86 
     87 #define NUMCOLORMAPS		32
     88 
     89 
     90 
     91 
     92 
     93 extern	int		detailshift;	
     94 
     95 
     96 
     97 
     98 
     99 
    100 extern void		(*colfunc) (void);
    101 extern void		(*basecolfunc) (void);
    102 extern void		(*fuzzcolfunc) (void);
    103 
    104 extern void		(*spanfunc) (void);
    105 
    106 
    107 
    108 
    109 int
    110 R_PointOnSide
    111 ( fixed_t	x,
    112   fixed_t	y,
    113   node_t*	node );
    114 
    115 int
    116 R_PointOnSegSide
    117 ( fixed_t	x,
    118   fixed_t	y,
    119   seg_t*	line );
    120 
    121 angle_t
    122 R_PointToAngle
    123 ( fixed_t	x,
    124   fixed_t	y );
    125 
    126 angle_t
    127 R_PointToAngle2
    128 ( fixed_t	x1,
    129   fixed_t	y1,
    130   fixed_t	x2,
    131   fixed_t	y2 );
    132 
    133 fixed_t
    134 R_PointToDist
    135 ( fixed_t	x,
    136   fixed_t	y );
    137 
    138 
    139 fixed_t R_ScaleFromGlobalAngle (angle_t visangle);
    140 
    141 subsector_t*
    142 R_PointInSubsector
    143 ( fixed_t	x,
    144   fixed_t	y );
    145 
    146 void
    147 R_AddPointToBox
    148 ( int		x,
    149   int		y,
    150   fixed_t*	box );
    151 
    152 
    153 
    154 
    155 
    156 
    157 
    158 
    159 void R_RenderPlayerView (player_t *player);
    160 
    161 
    162 void R_Init (void);
    163 
    164 
    165 void R_SetViewSize (int blocks, int detail);
    166 
    167 #endif
    168 
    169 
    170 
    171 
    172