]> icculus.org git repositories - btb/d2x.git/blob - unused/vga/vga.h
use new GET_INTEL_* macros
[btb/d2x.git] / unused / vga / vga.h
1 /*
2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13
14
15
16 #ifndef _VGA_H
17 #define _VGA_H
18
19 #include "pstypes.h"
20
21 typedef unsigned short uword;
22
23 #define SM_ORIGINAL             -1
24 #define SM_320x200C     0
25 #define SM_320x200U     1
26 #define SM_320x240U     2
27 #define SM_360x200U     3
28 #define SM_360x240U     4
29 #define SM_376x282U     5
30 #define SM_320x400U     6
31 #define SM_320x480U     7
32 #define SM_360x400U     8
33 #define SM_360x480U     9
34 #define SM_360x360U     10
35 #define SM_376x308U     11
36 #define SM_376x564U     12
37 #define SM_640x400V     13
38 #define SM_640x480V     14
39 #define SM_800x600V     15
40 #define SM_1024x768V    16
41 #define SM_640x480V15   17
42 #define SM_800x600V15   18
43 #define SM_1280x1024V   19
44 #define SM_320x400_3DMAX        22              //special mode in 3dMax bios
45
46 void vga_set_cellheight( ubyte height );
47 void vga_set_linear(void);
48 void vga_16_to_256(void);
49 void vga_turn_screen_off(void);
50 void vga_turn_screen_on(void);
51 void vga_set_misc_mode( uword mode );
52 void vga_set_text_25(void);
53 void vga_set_text_43(void);
54 void vga_set_text_50(void);
55 ubyte is_graphics_mode(void);
56 int vga_save_mode(void);
57 int isvga(void);
58 void vga_set_cursor_type( uword ctype );
59 void vga_enable_default_palette_loading(void);
60 void vga_disable_default_palette_loading(void);
61 void vga_set_cursor_position( uword position );
62 void vga_restore_mode(void);
63 short vga_close(void);
64 int vga_vesa_setmode( short mode );
65 short vga_set_mode(short mode);
66 short vga_init(void);
67 short vga_mode13_checkmode(void);
68
69 //  0=Mode set OK
70 //  1=No VGA adapter installed
71 //  2=Program doesn't support this VESA granularity
72 //  3=Monitor doesn't support that VESA mode.:
73 //  4=Video card doesn't support that VESA mode.
74 //  5=No VESA driver found.
75 //  6=Bad Status after VESA call/
76 //  7=Not enough DOS memory to call VESA functions.
77 //  8=Error using DPMI.
78 //  9=Error setting logical line width.
79 // 10=Error allocating selector for A0000h
80 // 11=Not a valid mode support by gr.lib
81
82 short vga_check_mode(short mode);
83
84 //the current mode the adapter is in, one of the SM_ values above
85 extern int VGA_current_mode;
86
87 #endif