1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
6 // Copyright (C) 1993-1996 by id Software, Inc.
8 // This source is available for distribution and/or modification
9 // only under the terms of the DOOM Source Code License as
10 // published by id Software. All rights reserved.
12 // The source is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
18 // System specific interface stuff.
20 //-----------------------------------------------------------------------------
38 extern fixed_t viewcos;
39 extern fixed_t viewsin;
42 extern int viewheight;
43 extern int viewwindowx;
44 extern int viewwindowy;
51 extern fixed_t centerxfrac;
52 extern fixed_t centeryfrac;
53 extern fixed_t projection;
55 extern int validcount;
63 // Used for z-depth cuing per column/row,
64 // and other lighting effects (sector ambient, flash).
67 // Lighting constants.
68 // Now why not 32 levels here?
69 #define LIGHTLEVELS 16
70 #define LIGHTSEGSHIFT 4
72 #define MAXLIGHTSCALE 48
73 #define LIGHTSCALESHIFT 12
75 #define LIGHTZSHIFT 20
77 extern lighttable_t* scalelight[LIGHTLEVELS][MAXLIGHTSCALE];
78 extern lighttable_t* scalelightfixed[MAXLIGHTSCALE];
79 extern lighttable_t* zlight[LIGHTLEVELS][MAXLIGHTZ];
81 extern int extralight;
82 extern lighttable_t* fixedcolormap;
85 // Number of diminishing brightness levels.
86 // There a 0-31, i.e. 32 LUT in the COLORMAP lump.
87 #define NUMCOLORMAPS 32
90 // Blocky/low detail mode.
93 extern int detailshift;
97 // Function pointers to switch refresh/drawing functions.
98 // Used to select shadow mode etc.
100 extern void (*colfunc) (void);
101 extern void (*basecolfunc) (void);
102 extern void (*fuzzcolfunc) (void);
103 // No shadow effects on floors.
104 extern void (*spanfunc) (void);
108 // Utility functions.
139 fixed_t R_ScaleFromGlobalAngle (angle_t visangle);
155 // REFRESH - the actual rendering functions.
158 // Called by G_Drawer.
159 void R_RenderPlayerView (player_t *player);
161 // Called by startup code.
164 // Called by M_Responder.
165 void R_SetViewSize (int blocks, int detail);
168 //-----------------------------------------------------------------------------
172 //-----------------------------------------------------------------------------