home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <dos.h>
-
- struct GCURSOR {
- unsigned char wdh,hgt;
- unsigned colorid;
- unsigned char ptn[256];
- };
-
- extern unsigned char gds_fshift;
-
- int g_gcurform(char xcenter,char ycenter,unsigned width,unsigned height,
- unsigned color,unsigned char *andptn,unsigned char *xorptn)
- {
- union REGS reg;
- struct SREGS seg;
- struct GCURSOR gcs;
- unsigned char *ptr;
- int i;
-
- if((height==0)||(height>32)||(width==0)||((width%8)!=0))
- return -1;
- segread(&seg);
- reg.h.ah=gds_fshift+0x14;
- reg.h.dh=(unsigned char)xcenter;
- reg.h.dl=(unsigned char)ycenter;
- reg.x.di=(unsigned)&gcs;
- seg.ds=seg.ss;
- gcs.wdh=width;
- gcs.hgt=height;
- gcs.colorid=color;
- ptr=&gcs.ptn[0];
- for(i=0;i<((width/8)*height);i++)
- *ptr++ = *andptn++;
- for(i=0;i<((width/8)*height);i++)
- *ptr++ = *xorptn++;
- int86x(0x92,®,®,&seg);
- return (int)reg.h.ah;
- }