diff options
Diffstat (limited to 'apps/plugins/sdl/progs/wolf3d/id_vh.h')
-rw-r--r-- | apps/plugins/sdl/progs/wolf3d/id_vh.h | 99 |
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 | |||
17 | typedef struct | ||
18 | { | ||
19 | int16_t width,height; | ||
20 | } pictabletype; | ||
21 | |||
22 | |||
23 | typedef struct | ||
24 | { | ||
25 | int16_t height; | ||
26 | int16_t location[256]; | ||
27 | int8_t width[256]; | ||
28 | } fontstruct; | ||
29 | |||
30 | |||
31 | //=========================================================================== | ||
32 | |||
33 | |||
34 | extern pictabletype *pictable; | ||
35 | extern pictabletype *picmtable; | ||
36 | |||
37 | extern byte fontcolor,backcolor; | ||
38 | extern int fontnumber; | ||
39 | extern 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 | |||
49 | void VWB_DrawPropString (const char *string); | ||
50 | |||
51 | void VWB_DrawTile8 (int x, int y, int tile); | ||
52 | void VWB_DrawTile8M (int x, int y, int tile); | ||
53 | void VWB_DrawTile16 (int x, int y, int tile); | ||
54 | void VWB_DrawTile16M (int x, int y, int tile); | ||
55 | void VWB_DrawPic (int x, int y, int chunknum); | ||
56 | void VWB_DrawPicScaledCoord (int x, int y, int chunknum); | ||
57 | void VWB_DrawMPic(int x, int y, int chunknum); | ||
58 | void VWB_Bar (int x, int y, int width, int height, int color); | ||
59 | #define VWB_BarScaledCoord VL_BarScaledCoord | ||
60 | void VWB_Plot (int x, int y, int color); | ||
61 | #define VWB_PlotScaledCoord VW_Plot | ||
62 | void VWB_Hlin (int x1, int x2, int y, int color); | ||
63 | void VWB_Vlin (int y1, int y2, int x, int color); | ||
64 | #define VWB_HlinScaledCoord VW_Hlin | ||
65 | #define VWB_VlinScaledCoord VW_Vlin | ||
66 | |||
67 | void 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 | ||
85 | void 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 | |||
90 | void LatchDrawPic (unsigned x, unsigned y, unsigned picnum); | ||
91 | void LatchDrawPicScaledCoord (unsigned scx, unsigned scy, unsigned picnum); | ||
92 | void LoadLatchMem (void); | ||
93 | |||
94 | void VH_Startup(); | ||
95 | boolean FizzleFade (SDL_Surface *source, int x1, int y1, | ||
96 | unsigned width, unsigned height, unsigned frames, boolean abortable); | ||
97 | |||
98 | #define NUMLATCHPICS 100 | ||
99 | extern SDL_Surface *latchpics[NUMLATCHPICS]; | ||