home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
PRINTING
/
SHOWGL10.ZIP
/
GRAPHIX.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-05-28
|
4KB
|
81 lines
/* constants and structures for graphix.c graphics function library */
/* this header file should be used in the main program or in the file where
the function g_init () is called. All others should use graph.h . Use
hpgraph.h only to compile graphix.c */
/* copyright 1991, Robert C. Becker, Lantern Systems */
enum DFNON__OFF { DFN_OFF, DFN_ON }; /* definition for display fn's ON/OFF */
#include "graph.h" /* function prototypes */
#ifndef VID_PARAM_DEFT
#define IBMBIOS 0 /* use internal BIOS for I/O */
#define IBMPACKED 1 /* CGA, MCGA, VGA 256 color mode, ATT6300, Herc HGC & HCG+ pixel organization */
#define IBMPLANES 2 /* EGA & VGA pixel organization*/
#define VESABIOS 3 /* VESA devices using BIOS I/O */
struct _vid_x_parm_ /* graphix init parameters */
{
unsigned max_xdot; /* horizontal screens pixels - 1 */
unsigned max_ydot; /* vertical screen pixels - 1 */
int max_pen; /* # colors for this mode - 1 */
unsigned char mode; /* BIOS mode # for this mode */
unsigned video_bios; /* 0 -> using bios writes, != 0 -> not using bios for pixel writes */
unsigned base_adr; /* segment adr for video RAM */
unsigned block_size; /* # bytes in one block of video RAM */
unsigned block_per_page; /* # blocks needed to make one graphics screen */
unsigned bytes_per_pixel; /* =1 unless more than 8 bits/pixel */
unsigned bits_per_pixel; /* # bits used for a single pixel */
unsigned pixels_per_byte; /* # pixels/byte (=1 if > 8 bits/pixel) */
};
#define VID_PARAM_DEFT /* video param structure defined */
#endif
#ifndef CHAR_STR_DEFT
struct char___deft
{
char *fontname;
int _far **char_v;
unsigned char _far **char_p;
double ascender;
double descender;
double width;
double base;
double center;
double top;
double x_inc;
double y_inc;
double scale;
};
#define CHAR_STR_DEFT /* char description struct defined */
#endif
struct _vid_x_parm_ hpc_320_200_hp = { 319, 199, 3, 0x04, IBMPACKED, 0xb800, 0x2000, 2, 1, 2, 4 };
/* BIOS CGA 320x200 color */
struct _vid_x_parm_ hpc_640_200_hp = { 639, 199, 1, 0x06, IBMPACKED, 0xb800, 0x2000, 2, 1, 1, 8 };
/* BIOS CGA 640x200 BW */
struct _vid_x_parm_ hpa_640_400_hp = { 639, 399, 1, 0x48, IBMPACKED, 0xb800, 0x2000, 4, 1, 1, 8 };
/* AT&T 640x400 mode, tiny type */
struct _vid_x_parm_ hph_720_348_hp = { 719, 347, 1, 0x00, IBMPACKED, 0xb000, 0x2000, 4, 1, 1, 8 };
/* Hercules 720x348 mode (HGC and HGC+) */
struct _vid_x_parm_ hpe_320_200_hp = { 319, 199, 15, 0x0d, IBMPLANES, 0xa000, 0, 1, 1, 1, 8 };
/* IBM EGA med-res mode (320x200) */
struct _vid_x_parm_ hpe_640_200_hp = { 639, 199, 15, 0x0e, IBMPLANES, 0xa000, 0, 1, 1, 1, 8 };
/* IBM EGA med-res mode (640x200) */
struct _vid_x_parm_ hpem_640_350_hp = { 639, 349, 2, 0x0f, IBMPLANES, 0xa000, 0, 1, 1, 1, 8 };
/* IBM EGA high-res BW mode (640x350) */
struct _vid_x_parm_ hpe_640_350_hp = { 639, 349, 15, 0x10, IBMPLANES, 0xa000, 0, 1, 1, 1, 8 };
/* IBM EGA high-res mode (640x350) */
struct _vid_x_parm_ hpv_640_480_hp = { 639, 479, 15, 0x12, IBMPLANES, 0xa000, 0, 1, 1, 1, 8 };
/* IBM VGA high-res mode (640x480) */
struct _vid_x_parm_ hpv_320_200_hp = { 319, 199, 255, 0x13, IBMPACKED, 0xa000,0, 1, 1, 1, 8 };
/* IBM VGA lo-res mode (320x200) */
struct _vid_x_parm_ hpm_640_480_hp = { 639, 479, 2, 0x11, IBMPACKED, 0xa000, 0, 1, 1, 1, 8 };
/* IBM MCGA 640x480 BW (highest resolution) */
extern double X_mm = 220.0, Y_mm = 160.0; /* screen size in mm */