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 #ifndef _rt_vid_public
21 #define _rt_vid_public
22 
23 //***************************************************************************
24 //
25 // Public header for RT_VID.C
26 //
27 //***************************************************************************
28 
29 #include "lumpy.h"
30 
31 //***************************************************************************
32 //
33 // DEFINES
34 //
35 //***************************************************************************
36 
37 #define PORTTILESWIDE      20       // all drawing takes place inside a
38 #define PORTTILESHIGH      13       // non displayed port of this size
39 
40 #define UPDATEWIDE         PORTTILESWIDE
41 #define UPDATEHIGH         PORTTILESHIGH
42 #define UPDATESIZE         (UPDATEWIDE*UPDATEHIGH)
43 
44 
45 //***************************************************************************
46 //
47 // GLOBALS
48 //
49 //***************************************************************************
50 
51 extern byte     *updateptr;
52 extern unsigned mapwidthtable[64];
53 extern unsigned uwidthtable[UPDATEHIGH];
54 extern unsigned blockstarts[UPDATEWIDE*UPDATEHIGH];
55 extern byte     update[UPDATESIZE];
56 extern boolean  screenfaded;
57 
58 
59 //***************************************************************************
60 //
61 // PROTOTYPES
62 //
63 //***************************************************************************
64 
65 void VL_MemToScreen (byte *source, int width, int height, int x, int y);
66 void DrawTiledRegion( int x, int y, int width, int height, int offx, int offy, pic_t *tile );
67 void VWB_DrawPic (int x, int y, pic_t *pic);
68 void VL_Bar (int x, int y, int width, int height, int color);
69 void VWB_Bar (int x, int y, int width, int height, int color);
70 void VWB_Hlin (int x1, int x2, int y, int color);
71 void VWB_Vlin (int y1, int y2, int x, int color);
72 void VWB_THlin (int x1, int x2, int y, boolean up);
73 void VWB_TVlin (int y1, int y2, int x, boolean up);
74 int VW_MarkUpdateBlock (int x1, int y1, int x2, int y2);
75 void VW_UpdateScreen (void);
76 
77 void VL_FadeOut (int start, int end, int red, int green, int blue, int steps);
78 void VL_FadeIn (int start, int end, byte *palette, int steps);
79 void VL_DecompressLBM (lbm_t *lbminfo, boolean flip);
80 void VL_FadeToColor (int time, int red, int green, int blue);
81 void VWB_TBar (int x, int y, int width, int height);
82 
83 void SwitchPalette (byte * newpal, int steps);
84 void SetBorderColor (int color);
85 
86 void VL_DrawPostPic (int lumpnum);
87 void VL_DrawLine (int x1, int y1, int x2, int y2, byte color);
88 
89 #define MenuFadeOut()	VL_FadeOut (0, 255, 0, 0, 0, 10)
90 #define MenuFadeIn()	   VL_FadeIn (0, 255, origpal, 10)
91 
92 void DrawXYPic (int x, int y, int shapenum);
93 
94 #endif
95