home *** CD-ROM | disk | FTP | other *** search
- /* video.h */
-
- #define TRUE 1
- #define FALSE 0
-
- /* bios video interupt signal - use with int86() */
- #define VID_INT 0x10
- #define VIDEO_INT 0x10
-
- /* primary monochrome attributes */
- #define NON_DISPLAY 0x00
- #define UNDERLINE 0x01
- #define NORMAL_DISPLAY 0x07
- #define INVERSE 0x70
-
- /* primary color attributes - foreground or background */
- #define BLACK 0x00
- #define BLUE 0x01
- #define GREEN 0x02
- #define CYAN 0x03
- #define RED 0x04
- #define MAGENTA 0x05
- #define BROWN 0x06
- #define WHITE 0x07
-
- /* highlighted color attributes - not legal background colors */
- #define GREY 0x08
- #define LT_BLUE 0x09
- #define LT_GREEN 0x0A
- #define LT_CYAN 0x0B
- #define LT_RED 0x0C
- #define LT_MAGENTA 0x0D
- #define YELLOW 0x0E
- #define HOTWHITE 0x0F
-
- /* OR these with primary attributes */
- #define HIGHLIGHT 0x08
- #define BLINK 0x80
-
-
- /* video modes (as defined by the Rom BIOS) */
- #define BW40_MODE 0
- #define CO40_MODE 1
- #define BW80_MODE 2
- #define CO80_MODE 3
- #define CO320_MODE 4
- #define BW320_MODE 5
- #define BW640_MODE 6
- #define MONO_MODE 7
- #define E320X200_MODE 0x0D
- #define E640X200_MODE 0x0E
- #define EGA_MONO_MODE 0x0F
- #define EGA_MODE 0x10
-
- /*
- * Rom BIOS function values
- * Put one of these values into inregs.h.ah (defined in dos.h)
- * before calling the VIDEO_IO services with int86().
- */
-
- #define V_SET_MODE 0
- #define V_CUR_TYPE 1
- #define V_SET_CUR 2
- #define V_GET_CUR 3
- #define V_SETPAGE 5
- #define V_SCRLUP 6
- #define V_SCRLDOWN 7
- #define V_GCA 8
- #define V_WCA 9
- #define V_WC 10
- #define V_WTTY 14
- #define V_GET_MODE 15
-
- /*
- * SEGMENT and STATUS PORT definitions used for direct
- * screen writes.
- */
-
- /* screen buffer segments */
- #define MONO_SEG 0xB000
- #define COLOR_SEG 0xB800
-
- /* CRT base values */
- #define MONO_BASE 0x3B0
- #define COLOR_BASE 0x3D0
-
- /* status port addresses - add to appropriate base value above */
- #define CRT_STATUS 0x0A
- #define M6845_INDEX 0x04
- #define M6845_DATA 0x05
- #define CRT_CTRL 0x08
-
- /*
- * Definitions used to determine video adapter type with vcard_type()
- */
- #define MONO_ADAPTER 0
- #define CGA_ADAPTER 1
- #define EGA_ADAPTER 2
-
-
- /*
- * Structure definition used by direct screen writes.
- */
-
- typedef struct scrn
- { unsigned offset; /* screen segment address */
- unsigned segment; /* offset = cursor position */
- unsigned stat_port; /* status port address to check for retrace */
- int attrib; /* attribute used when writing chars */
- int cga_card; /* enables retrace checking if not zero */
- } SCRN, *SCRNPTR;
-
-
- /* enable type checking for functions */
- int vid_state(int *);
- void vid_init(int);
- void vid_page(int);
- void vid_set_cur(int, int);
- void vid_get_cur(int *, int *);
- void vid_cur_right(int);
- void vid_cur_switch(int);
- void vid_up(int, int, int, int, int, int);
- void vid_down(int, int, int, int, int, int);
- int vcard_type(void);
- void scrn_init(SCRN *);
- void scrn_puts(char *, SCRN *);
- void scrn_putca(int, SCRN *);
- int scrn_getca(int *, SCRN *);
- void scrn_save(int, int, int, int, char *, SCRN *);
- void scrn_restore(int, int, int, int, char *, SCRN *);
- void scrn_pos(int, int, SCRN *);
- void scrn_attrib(int, SCRN *);
- void scrn_color(int, int, SCRN *);
- void scrn_set_cga(int, SCRN *);
- void scrn_border(int, int, int, int, int, SCRN *);
- void scrn_hborder(int, int, int, int, SCRN *);
- void scrn_wzoom(int, int, int, int, char *, int, SCRN *);