1 // Emacs style mode select   -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // $Id: r_sky.h 1558 2020-11-17 23:36:10Z wesleyjohnson $
5 //
6 // Copyright (C) 1993-1996 by id Software, Inc.
7 // Portions Copyright (C) 1998-2000 by DooM Legacy Team.
8 //
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License
11 // as published by the Free Software Foundation; either version 2
12 // of the License, or (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 // GNU General Public License for more details.
18 //
19 //
20 // $Log: r_sky.h,v $
21 // Revision 1.4  2001/03/21 18:24:39  stroggonmeth
22 //
23 // Revision 1.3  2001/03/13 22:14:20  stroggonmeth
24 // Long time no commit. 3D floors, FraggleScript, portals, ect.
25 //
26 // Revision 1.2  2000/02/27 00:42:11  hurdler
27 // Revision 1.1.1.1  2000/02/22 20:32:32  hurdler
28 // Initial import into CVS (v1.29 pr3)
29 //
30 //
31 // DESCRIPTION:
32 //      Sky rendering.
33 //
34 //-----------------------------------------------------------------------------
35 
36 #ifndef R_SKY_H
37 #define R_SKY_H
38 
39 #include "m_fixed.h"
40 #include "r_defs.h"
41   // patch_t
42 
43 #ifdef __GNUG__
44 #pragma interface
45 #endif
46 
47 // SKY, store the number for name.
48 #define SKYFLATNAME  "F_SKY1"
49 
50 // The sky map is 256*128*4 maps.
51 #define ANGLETOSKYSHIFT         22
52 
53 #define SKY_FLAT_HEIGHT  16
54 #define SKY_FLAT_WIDTH   64
55 
56 extern byte skytop_flat[SKY_FLAT_WIDTH][SKY_FLAT_HEIGHT];  // above sky
57 extern byte ground_flat[SKY_FLAT_WIDTH][SKY_FLAT_HEIGHT];  // below sky
58 
59 extern byte *  sky_pict;
60 extern int     sky_texture;
61 extern int     sky_texturemid;
62 extern int     sky_height;
63 extern int     sky_yl_min_oc, sky_yh_max_oc;
64 extern fixed_t sky_scale;
65 extern uint32_t sky_widthmask;
66 extern byte    sky_240;  // 0=std 128 sky, 1=240 high sky
67                                   // see SCR_SetMode
68 
69 // Needed to store the number of the dummy sky flat.
70 // Used for rendering, as well as tracking projectiles etc.
71 extern int     sky_flatnum;
72 
73 //added:12-02-98: declare the asm routine which draws the sky columns
74 void R_DrawSkyColumn (void);
75 
76 // Called once at startup.
77 void R_Init_SkyMap (void);
78 
79 // call after skytexture is set to adapt for old/new skies
80 void R_Setup_SkyDraw (void);
81 
82 #if 0
83 void R_StorePortalRange(void);
84 void R_Init_Portals(void);
85 void R_Clear_Portals(void);
86 void R_Draw_Portals(void);
87 #endif
88 
89 void R_Set_Sky_Scale (void);
90 
91 #endif
92