|
|
DataMuseum.dkPresents historical artifacts from the history of: ICL Comet 32 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about ICL Comet 32 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 2221 (0x8ad)
Types: TextFile
Notes: UNIX file
Names: »graph.h«
└─⟦26887b7e0⟧ Bits:30009717 Comet 32 harddisk image
└─⟦28c352965⟧ »/a« UNIX Filesystem
└─⟦this⟧ »usr/src/gks/h/graph.h«
/*
* Graphic routines
*/
#include <sys/types.h>
#include <stdio.h>
#include <vfont.h>
#include <sys/devvm.h>
#define PIXEL_SIZE 8
#define ALL 8
#define NNN (u_int *)0
#define LINESIZE 80 /* word size of line */
#define BLKSIZE 256
#define RAMSIZE (256*BLKSIZE) /* word size of whole ram */
#define RAMSTART (8192*RAMSIZE) /* room for up & down scrolls */
#define BIGBLOB 0201 /* gives character box size */
#define GREENCURSOR (1<<0)
#define DISPLAY (1<<4)
#define HIGHSPEED (1<<5)
#define YSIZE 399
#define ALLBITS 0377
#define INF 0377
#define abs(x) (x>=0 ? x : -(x))
#define min(a,b) (a>b ? b:a)
#define elif else if
#define OUTSIDE 0
#define Phys_RAM 0xe00000L /* physical graphics ram */
#define Phys_MPS 0xfff800L /* physical control page */
typedef enum {
BLACK, GREEN, BLUE, CYAN, RED, YELLOW, MAGENTA, WHITE, INVIS
} colour;
typedef struct {
int x,y;
} point;
typedef struct {
point low; /* minimum x,y. Lower left */
point high; /* maximum x,y. Upper rigth */
} rectangle;
typedef struct {
u_int *base; /* pointer to int that include u. left*/
u_int width; /* number of long across scan line */
rectangle rect; /* coordinates of clipping rectangle */
} bitmap;
static int gramstart; /* word offset of current page */
static bitmap display = {(u_int *)GB_VideoRAM, 80, 0, 0, 639, 399};
static u_int *vram;
static colour lcol = {GREEN};
static colour mcol = {GREEN};
static colour tcol = {GREEN};
static colour fcol = {GREEN};
static int cheight = {1};
static u_int color[9][8];
static chardes *finfo; /* character descriptors */
static unsigned char *fbase; /* character bitmaps */
static chardes *blp; /* pointer to BIGBLOB */
static int Fh;
static int tmask[]={
0x01,
0x02,
0x04,
0x08
};
static u_int fmask[]={
0x00000001L,
0x00000002L,
0x00000004L,
0x00000008L,
0x00000010L,
0x00000020L,
0x00000040L,
0x00000080L
};
static u_int gmask[]={
0xfefefefeL,
0xfdfdfdfdL,
0xfbfbfbfbL,
0xf7f7f7f7L,
0xefefefefL,
0xdfdfdfdfL,
0xbfbfbfbfL,
0x7f7f7f7fL,
0x00000000L
};
static u_int fullcol[]={
0x00000000L,
0x0000ff00L,
0x00ff0000L,
0x00ffff00L,
0xff000000L,
0xff00ff00L,
0xffff0000L,
0xffffff00L,
0x000000ffL
};