summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/progs/wolf3d/id_vh.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sdl/progs/wolf3d/id_vh.h')
-rw-r--r--apps/plugins/sdl/progs/wolf3d/id_vh.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/apps/plugins/sdl/progs/wolf3d/id_vh.h b/apps/plugins/sdl/progs/wolf3d/id_vh.h
new file mode 100644
index 0000000000..814e28d49c
--- /dev/null
+++ b/apps/plugins/sdl/progs/wolf3d/id_vh.h
@@ -0,0 +1,99 @@
1// ID_VH.H
2
3
4#define WHITE 15 // graphics mode independant colors
5#define BLACK 0
6#define FIRSTCOLOR 1
7#define SECONDCOLOR 12
8#define F_WHITE 15
9#define F_BLACK 0
10#define F_FIRSTCOLOR 1
11#define F_SECONDCOLOR 12
12
13//===========================================================================
14
15#define MAXSHIFTS 1
16
17typedef struct
18{
19 int16_t width,height;
20} pictabletype;
21
22
23typedef struct
24{
25 int16_t height;
26 int16_t location[256];
27 int8_t width[256];
28} fontstruct;
29
30
31//===========================================================================
32
33
34extern pictabletype *pictable;
35extern pictabletype *picmtable;
36
37extern byte fontcolor,backcolor;
38extern int fontnumber;
39extern int px,py;
40
41#define SETFONTCOLOR(f,b) fontcolor=f;backcolor=b;
42
43//
44// mode independant routines
45// coordinates in pixels, rounded to best screen res
46// regions marked in double buffer
47//
48
49void VWB_DrawPropString (const char *string);
50
51void VWB_DrawTile8 (int x, int y, int tile);
52void VWB_DrawTile8M (int x, int y, int tile);
53void VWB_DrawTile16 (int x, int y, int tile);
54void VWB_DrawTile16M (int x, int y, int tile);
55void VWB_DrawPic (int x, int y, int chunknum);
56void VWB_DrawPicScaledCoord (int x, int y, int chunknum);
57void VWB_DrawMPic(int x, int y, int chunknum);
58void VWB_Bar (int x, int y, int width, int height, int color);
59#define VWB_BarScaledCoord VL_BarScaledCoord
60void VWB_Plot (int x, int y, int color);
61#define VWB_PlotScaledCoord VW_Plot
62void VWB_Hlin (int x1, int x2, int y, int color);
63void VWB_Vlin (int y1, int y2, int x, int color);
64#define VWB_HlinScaledCoord VW_Hlin
65#define VWB_VlinScaledCoord VW_Vlin
66
67void VH_UpdateScreen();
68#define VW_UpdateScreen VH_UpdateScreen
69
70//
71// wolfenstein EGA compatability stuff
72//
73
74
75#define VW_Shutdown VL_Shutdown
76#define VW_Bar VL_Bar
77#define VW_Plot VL_Plot
78#define VW_Hlin(x,z,y,c) VL_Hlin(x,y,(z)-(x)+1,c)
79#define VW_Vlin(y,z,x,c) VL_Vlin(x,y,(z)-(y)+1,c)
80#define VW_DrawPic VH_DrawPic
81#define VW_WaitVBL VL_WaitVBL
82#define VW_FadeIn() VL_FadeIn(0,255,gamepal,30);
83#define VW_FadeOut() VL_FadeOut(0,255,0,0,0,30);
84#define VW_ScreenToScreen VL_ScreenToScreen
85void VW_MeasurePropString (const char *string, word *width, word *height);
86
87#define LatchDrawChar(x,y,p) VL_LatchToScreen(latchpics[0],((p)&7)*8,((p)>>3)*8*64,8,8,x,y)
88#define LatchDrawTile(x,y,p) VL_LatchToScreen(latchpics[1],(p)*64,0,16,16,x,y)
89
90void LatchDrawPic (unsigned x, unsigned y, unsigned picnum);
91void LatchDrawPicScaledCoord (unsigned scx, unsigned scy, unsigned picnum);
92void LoadLatchMem (void);
93
94void VH_Startup();
95boolean FizzleFade (SDL_Surface *source, int x1, int y1,
96 unsigned width, unsigned height, unsigned frames, boolean abortable);
97
98#define NUMLATCHPICS 100
99extern SDL_Surface *latchpics[NUMLATCHPICS];