1 /*
2 Copyright (C) 1994-1995 Apogee Software, Ltd.
3 
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13 See the GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 
19 */
20 //***************************************************************************
21 //
22 //    RT_VIEW.H
23 //
24 //***************************************************************************
25 #ifndef _rt_view_public
26 #define _rt_view_public
27 
28 #include "modexlib.h"
29 
30 #define HEIGHTFRACTION 6
31 #define MAXVIEWSIZES   11
32 
33 #define FOCALWIDTH 160
34 #define FPFOCALWIDTH 160.0
35 
36 #define NUMGAMMALEVELS 8
37 #define GAMMAENTRIES (64*8)
38 
39 #define GENERALNUMLIGHTS (5)
40 
41 extern int StatusBar;
42 
43 // Kill count
44 #define STATUS_KILLS        0x1
45 // Transparent health bar
46 #define STATUS_PLAYER_STATS 0x2
47 // Bottom status bar
48 #define BOTTOM_STATUS_BAR   0x4
49 // Top status bar
50 #define TOP_STATUS_BAR      0x8
51 
52 #define SHOW_KILLS()             ( StatusBar & STATUS_KILLS )
53 #define SHOW_PLAYER_STATS()      ( StatusBar & STATUS_PLAYER_STATS )
54 #define SHOW_BOTTOM_STATUS_BAR() ( StatusBar & BOTTOM_STATUS_BAR )
55 #define SHOW_TOP_STATUS_BAR()    ( StatusBar & TOP_STATUS_BAR )
56 
57 #define YOURCPUSUCKS_Y      ( 100 + 48 / 2 + 2 )
58 #define YOURCPUSUCKS_HEIGHT 8
59 
60 #define MAXPLAYERCOLORS (11)
61 typedef enum
62    {
63    pc_gray,
64    pc_brown,
65    pc_black,
66    pc_tan,
67    pc_red,
68    pc_olive,
69    pc_blue,
70    pc_white,
71    pc_green,
72    pc_purple,
73    pc_orange
74    } playercolors;
75 
76 extern byte * playermaps[MAXPLAYERCOLORS];
77 extern short  pixelangle[MAXVIEWWIDTH];
78 extern byte   gammatable[GAMMAENTRIES];
79 extern int    gammaindex;
80 extern byte   uniformcolors[MAXPLAYERCOLORS];
81 
82 extern  byte mapmasks1[4][9];                   // Map Mask for post scaling
83 extern  byte mapmasks2[4][9];                   // Map Mask for post scaling
84 extern  byte mapmasks3[4][9];                   // Map Mask for post scaling
85 
86 extern  int normalshade;                        // Normal shading level for stuff
87 extern  int maxshade;                           // max shading level
88 extern  int minshade;                           // min shading level
89 extern  int baseminshade;
90 extern  int basemaxshade;
91 extern  int    viewheight;
92 extern  int    viewwidth;
93 extern  longword heightnumerator;
94 extern  fixed  scale;
95 extern  int    screenofs;
96 extern  int    centerx;
97 extern  int centery;
98 extern  int centeryfrac;
99 extern  int fulllight;
100 extern  byte * colormap;
101 extern  byte * greenmap;
102 extern  byte * redmap;
103 extern  int weaponscale;
104 extern  int viewsize;
105 extern  int focalwidth;
106 extern  int yzangleconverter;
107 extern  int lightninglevel;
108 extern  boolean  lightning;
109 extern  int    darknesslevel;
110 
111 void DrawCPUJape( void );
112 void SetupScreen ( boolean flip );
113 void ResetFocalWidth ( void );
114 void ChangeFocalWidth ( int amount );
115 void SetViewSize ( int size );
116 void LoadColorMap( void );
117 void UpdateLightLevel (int area);
118 void SetIllumination (int level);
119 int  GetIlluminationDelta (void);
120 void UpdateLightning (void);
121 void SetLightLevels ( int darkness );
122 void SetupLightLevels ( void );
123 void SetLightRate ( int rate );
124 int GetLightRate ( void );
125 void SetModemLightLevel ( int type );
126 int GetLightRateTile ( void );
127 int GetLightLevelTile ( void );
128 
129 #endif
130