diff options
Diffstat (limited to 'src/r_main.h')
-rw-r--r-- | src/r_main.h | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/src/r_main.h b/src/r_main.h new file mode 100644 index 0000000..89a36ee --- /dev/null +++ b/src/r_main.h | |||
@@ -0,0 +1,120 @@ | |||
1 | /* Emacs style mode select -*- C++ -*- | ||
2 | *----------------------------------------------------------------------------- | ||
3 | * | ||
4 | * | ||
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom | ||
6 | * based on BOOM, a modified and improved DOOM engine | ||
7 | * Copyright (C) 1999 by | ||
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman | ||
9 | * Copyright (C) 1999-2000 by | ||
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze | ||
11 | * Copyright 2005, 2006 by | ||
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or | ||
15 | * modify it under the terms of the GNU General Public License | ||
16 | * as published by the Free Software Foundation; either version 2 | ||
17 | * of the License, or (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the Free Software | ||
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||
27 | * 02111-1307, USA. | ||
28 | * | ||
29 | * DESCRIPTION: | ||
30 | * Renderer main interface. | ||
31 | * | ||
32 | *-----------------------------------------------------------------------------*/ | ||
33 | |||
34 | #ifndef __R_MAIN__ | ||
35 | #define __R_MAIN__ | ||
36 | |||
37 | #include "d_player.h" | ||
38 | #include "r_data.h" | ||
39 | |||
40 | #ifdef __GNUG__ | ||
41 | #pragma interface | ||
42 | #endif | ||
43 | |||
44 | // | ||
45 | // POV related. | ||
46 | // | ||
47 | |||
48 | extern fixed_t viewcos; | ||
49 | extern fixed_t viewsin; | ||
50 | extern int viewwidth; | ||
51 | extern int viewheight; | ||
52 | extern int viewwindowx; | ||
53 | extern int viewwindowy; | ||
54 | extern int centerx; | ||
55 | extern int centery; | ||
56 | extern fixed_t centerxfrac; | ||
57 | extern fixed_t centeryfrac; | ||
58 | extern fixed_t viewheightfrac; //e6y: for correct clipping of things | ||
59 | extern fixed_t projection; | ||
60 | // proff 11/06/98: Added for high-res | ||
61 | extern fixed_t projectiony; | ||
62 | extern int validcount; | ||
63 | |||
64 | // | ||
65 | // Rendering stats | ||
66 | // | ||
67 | |||
68 | extern int rendered_visplanes, rendered_segs, rendered_vissprites; | ||
69 | extern boolean rendering_stats; | ||
70 | |||
71 | // | ||
72 | // Lighting LUT. | ||
73 | // Used for z-depth cuing per column/row, | ||
74 | // and other lighting effects (sector ambient, flash). | ||
75 | // | ||
76 | |||
77 | // Lighting constants. | ||
78 | |||
79 | #define LIGHTLEVELS 16 | ||
80 | #define LIGHTSEGSHIFT 4 | ||
81 | #define MAXLIGHTSCALE 48 | ||
82 | #define LIGHTSCALESHIFT 12 | ||
83 | #define MAXLIGHTZ 128 | ||
84 | #define LIGHTZSHIFT 20 | ||
85 | |||
86 | // killough 3/20/98: Allow colormaps to be dynamic (e.g. underwater) | ||
87 | extern const lighttable_t *(*zlight)[MAXLIGHTZ]; | ||
88 | extern const lighttable_t *fullcolormap; | ||
89 | extern int numcolormaps; // killough 4/4/98: dynamic number of maps | ||
90 | extern const lighttable_t **colormaps; | ||
91 | // killough 3/20/98, 4/4/98: end dynamic colormaps | ||
92 | |||
93 | extern int extralight; | ||
94 | extern const lighttable_t *fixedcolormap; | ||
95 | |||
96 | // Number of diminishing brightness levels. | ||
97 | // There a 0-31, i.e. 32 LUT in the COLORMAP lump. | ||
98 | |||
99 | #define NUMCOLORMAPS 32 | ||
100 | |||
101 | // | ||
102 | // Utility functions. | ||
103 | // | ||
104 | |||
105 | PUREFUNC int R_PointOnSide(fixed_t x, fixed_t y, const node_t *node); | ||
106 | PUREFUNC int R_PointOnSegSide(fixed_t x, fixed_t y, const seg_t *line); | ||
107 | angle_t R_PointToAngle(fixed_t x, fixed_t y); | ||
108 | angle_t R_PointToAngle2(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2); | ||
109 | subsector_t *R_PointInSubsector(fixed_t x, fixed_t y); | ||
110 | |||
111 | // | ||
112 | // REFRESH - the actual rendering functions. | ||
113 | // | ||
114 | |||
115 | void R_RenderPlayerView(player_t *player); // Called by G_Drawer. | ||
116 | void R_Init(void); // Called by startup code. | ||
117 | void R_SetViewSize(int blocks); // Called by M_Responder. | ||
118 | void R_ExecuteSetViewSize(void); // cph - called by D_Display to complete a view resize | ||
119 | |||
120 | #endif | ||