diff options
Diffstat (limited to 'apps/plugins/doom/r_main.h')
-rw-r--r-- | apps/plugins/doom/r_main.h | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/apps/plugins/doom/r_main.h b/apps/plugins/doom/r_main.h new file mode 100644 index 0000000000..10978b3e71 --- /dev/null +++ b/apps/plugins/doom/r_main.h | |||
@@ -0,0 +1,125 @@ | |||
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 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||
25 | * 02111-1307, USA. | ||
26 | * | ||
27 | * DESCRIPTION: | ||
28 | * Renderer main interface. | ||
29 | * | ||
30 | *-----------------------------------------------------------------------------*/ | ||
31 | |||
32 | #ifndef __R_MAIN__ | ||
33 | #define __R_MAIN__ | ||
34 | |||
35 | #include "d_player.h" | ||
36 | #include "r_data.h" | ||
37 | |||
38 | #ifdef __GNUG__ | ||
39 | #pragma interface | ||
40 | #endif | ||
41 | |||
42 | // | ||
43 | // POV related. | ||
44 | // | ||
45 | |||
46 | extern fixed_t viewcos; | ||
47 | extern fixed_t viewsin; | ||
48 | extern int viewwidth; | ||
49 | extern int viewheight; | ||
50 | extern int viewwindowx; | ||
51 | extern int viewwindowy; | ||
52 | extern int centerx; | ||
53 | extern int centery; | ||
54 | extern fixed_t centerxfrac; | ||
55 | extern fixed_t centeryfrac; | ||
56 | extern fixed_t projection; | ||
57 | extern int validcount; | ||
58 | extern int linecount; | ||
59 | extern int loopcount; | ||
60 | |||
61 | // | ||
62 | // Rendering stats | ||
63 | // | ||
64 | |||
65 | extern int rendered_visplanes, rendered_segs, rendered_vissprites; | ||
66 | extern boolean rendering_stats; | ||
67 | |||
68 | // | ||
69 | // Lighting LUT. | ||
70 | // Used for z-depth cuing per column/row, | ||
71 | // and other lighting effects (sector ambient, flash). | ||
72 | // | ||
73 | |||
74 | // Lighting constants. | ||
75 | |||
76 | #define LIGHTLEVELS 16 | ||
77 | #define LIGHTSEGSHIFT 4 | ||
78 | #define MAXLIGHTSCALE 48 | ||
79 | #define LIGHTSCALESHIFT 12 | ||
80 | #define MAXLIGHTZ 128 | ||
81 | #define LIGHTZSHIFT 20 | ||
82 | |||
83 | // killough 3/20/98: Allow colormaps to be dynamic (e.g. underwater) | ||
84 | extern lighttable_t *(*scalelight)[MAXLIGHTSCALE]; | ||
85 | extern lighttable_t *(*zlight)[MAXLIGHTZ]; | ||
86 | extern lighttable_t *fullcolormap; | ||
87 | extern int numcolormaps; // killough 4/4/98: dynamic number of maps | ||
88 | extern lighttable_t **colormaps; | ||
89 | // killough 3/20/98, 4/4/98: end dynamic colormaps | ||
90 | |||
91 | extern int extralight; | ||
92 | extern lighttable_t *fixedcolormap; | ||
93 | |||
94 | // Number of diminishing brightness levels. | ||
95 | // There a 0-31, i.e. 32 LUT in the COLORMAP lump. | ||
96 | |||
97 | #define NUMCOLORMAPS 32 | ||
98 | |||
99 | // | ||
100 | // Function pointers to switch refresh/drawing functions. | ||
101 | // Used to select shadow mode etc. | ||
102 | // | ||
103 | |||
104 | extern void (*colfunc)(void); | ||
105 | |||
106 | // | ||
107 | // Utility functions. | ||
108 | // | ||
109 | |||
110 | int R_PointOnSide(fixed_t x, fixed_t y, const node_t *node); | ||
111 | int R_PointOnSegSide(fixed_t x, fixed_t y, const seg_t *line); | ||
112 | angle_t R_PointToAngle(fixed_t x, fixed_t y); | ||
113 | angle_t R_PointToAngle2(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2); | ||
114 | subsector_t *R_PointInSubsector(fixed_t x, fixed_t y); | ||
115 | |||
116 | // | ||
117 | // REFRESH - the actual rendering functions. | ||
118 | // | ||
119 | |||
120 | void R_RenderPlayerView(player_t *player); // Called by G_Drawer. | ||
121 | void R_Init(void); // Called by startup code. | ||
122 | void R_SetViewSize(int blocks); // Called by M_Responder. | ||
123 | void R_ExecuteSetViewSize(void); // cph - called by D_Display to complete a view resize | ||
124 | |||
125 | #endif | ||