home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
FSGFX.ZIP
/
HERCMOU.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-06
|
30KB
|
1,461 lines
#define REQUEST 0 /* request port */
#define RELEASE 1 /* release port */
#define BPORT 0x03b4 /* beginning port */
#define EPORT 0x03ba /* ending port */
/*
#define INCL_BASE 1
#define INCL_DOSDEVICES 1
*/
#include "os2.h"
#include "stdlib.h"
#define HERCCONTROL 0x03b8
#define HERCSTATUS 0x03bA
#define HERC6845INDEX 0x3b4
#define HERC6845DATA 0x3b5
#define CPAGEMASK 0x80
#define CBLINKMASK 0x10
#define CBLANKMASK 0x08
#define CMODEMASK 0x02
#define SRETRACE 0x80
#define SDOTS 0x08
#define SSYNC 0x01
#define OR 0
#define XOR 1
#define AND 2
unsigned char uchar;
void extern far pascal HC_GFX(PCH);
void extern far pascal HC_TXT(PCH);
void extern far pascal CLR_GFX(PCH);
VIOPHYSBUF viopbBuf;
PCH pchscreen;
USHORT fstatus;
MOUEVENTINFO MouEvent;
SCALEFACT mousc;
unsigned char testit[8][8] =
{ { 0,0,1,1,1,0,0,0 },
{ 0,0,1,1,1,0,0,0 },
{ 0,0,1,1,1,0,0,0 },
{ 0,0,1,1,1,0,0,0 },
{ 0,0,1,1,1,0,0,0 },
{ 0,0,1,1,1,0,0,0 },
{ 0,0,1,1,1,0,0,0 },
{ 0,0,1,1,1,0,0,0 } };
unsigned char alphabet[128][8][8] =
/* */ {
{ { 0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,0,0 } },
/* ! */ { { 0,0,0,1,1,0,0,0 },
{ 0,0,0,1,1,0,0,0 },
{ 0,0,0,1,1,0,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,0,0,0,1,0,0,0 } },
/* y */
{ { 0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,0,0 },
{ 1,0,0,0,1,0,0,0 },
{ 1,0,0,0,1,0,0,0 },
{ 0,1,1,1,1,0,0,0 },
{ 0,0,0,0,1,0,0,0 },
{ 0,0,0,1,0,0,0,0 },
{ 0,1,1,0,0,0,0,0 } },
/* z */
{ { 0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,0,0 },
{ 1,1,1,1,1,1,0,0 },
{ 1,0,0,0,1,0,0,0 },
{ 0,0,0,1,0,0,0,0 },
{ 0,0,1,0,0,0,0,0 },
{ 0,1,0,0,0,1,0,0 },
{ 1,1,1,1,1,1,0,0 } } };
cursor[8][8] =
{ { 1,1,1,1,1,1,1,0 },
{ 1,1,1,1,1,1,0,0 },
{ 1,1,1,1,1,0,0,0 },
{ 1,1,1,1,1,0,0,0 },
{ 1,1,1,1,1,1,0,0 },
{ 1,1,0,0,1,1,1,0 },
{ 1,0,0,0,0,1,1,1 },
{ 0,0,0,0,0,0,1,0 } };
char temp[] =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ";
extern g_puts(int x, int y, char *message);
extern g_gets(int x, int y, char *message);
extern g_utc(int x, int y, char zchar);
extern g_mode(int mode);
int oldx,oldy = 0;
int mode = 0;
char blank[] = " ";
int mousex = 0;
int mousey = 0;
int oldmousex = 0;
int oldmousey = 0;
unsigned MouHandle; /* mouse logical handle */
int mouseminx = 0;
int mouseminy = 0;
int mousemaxx = 719;
int mousemaxy = 347;
/*
msbpress(0, &bstat, &bcount, &x, &y);
msbreles(0, &bstat, &bcount, &x, &y);
*/
extern int main(int argc,char * *argv);
extern int g_puts(int locx,int locy,char *message);
extern int g_gets(int locx,int locy,char *temp);
extern int drawline(int startx,int starty,int endx,int endy);
extern int makedot(int x,int y);
extern int g_mode(int x);
extern int convertuchartobin(unsigned char a,char *temp);
extern int g_utc(int locx,int locy,char zchar);
extern int mycursor(int locx,int locy);
extern int msinitgrph(void );
extern int msshowcur(void );
extern int mshidecur(void );
extern int setgraph(void );
extern int maintaincursor(void );
extern int msvbounds(int vubounds,int vlbounds);
extern int mshbounds(int hlbounds,int hrbounds);
main(int argc, char *argv[])
{
unsigned char a;
int x,y,i,j;
setgraph();
g_mode(OR);
g_puts(0,0,"happy birthday ");
g_puts(-1,-1,"chotist breath ");
msvbounds(100,150);
mshbounds(100,200);
msinitgrph();
msshowcur();
do
{
/* wait for a mouse event */
if(kbhit())
{
if(getche() == 'h')
{
HC_GFX(pchscreen);
msinitgrph();
msshowcur();
}
}
maintaincursor();
/* exit if both buttons down */
} while ((MouEvent.fs & 0x14) != 0x14) ;
MouClose(MouHandle); /* release mouse handle */
mshidecur();
g_puts(-1,-1,"Have a Mice Day!");
getch();
HC_TXT(pchscreen);
DosPortAccess(0, RELEASE, BPORT, EPORT);
DosFreeSeg(viopbBuf.asel[1]);
}
g_puts(locx,locy,message)
int locx;
int locy;
char message[];
{
int i,x,y;
int letter;
char zchar;
unsigned char mask;
i = 0;
if (locx < 0)
locx = oldx;
if (locy < 0)
locy = oldy;
while(message[i] != 0)
{
letter = message[i++] - ' ';
for(y = 0; y<8; y++)
{
for(x = 7; x>=0; x--)
{
if(alphabet[letter][y][x])
makedot(locx+x,locy+y);
}
}
if(locx <= 711)
locx += 8;
else
locx = 0;
}
oldx = locx;
oldy = locy;
}
g_gets(locx,locy,temp)
int locx;
int locy;
char temp[];
{
int i,x,y,stuff;
int letter;
char zchar;
unsigned char mask;
i = 0;
zchar = 0;
letter = 0;
if (locx < 0)
locx = oldx;
if (locy < 0)
locy = oldy;
while(zchar != 0x0D)
{
g_mode(XOR);
g_utc(locx,locy,'_');
while(!kbhit());
g_utc(locx,locy,'_');
g_mode(OR);
zchar = getch();
switch( zchar )
{
case 0x0D: /* final carriage return? */
break;
case 0x00: /* control code? */
getch(); /* eat next char */
break;
case 0x08: /* backspace? */
stuff = mode;
g_mode(AND);
letter = 0;
if(locx >= 8)
locx -= 8;
else
locx = locx;
if(i > 0)
{
temp[--i] = 0;
for(y = 0; y<8; y++)
{
for(x = 7; x>=0; x--)
makedot(locx+x,locy+y);
}
}
g_mode(stuff);
break;
default:
break;
}
if((zchar >= ' ') && (zchar <= 'z'))
{
letter = zchar - ' ';
temp[i++] = zchar;
for(y = 0; y<8; y++)
{
for(x = 7; x>=0; x--)
{
if(alphabet[letter][y][x])
makedot(locx+x,locy+y);
}
}
if(locx <= 711)
locx += 8;
else
locx = 0;
}
}
temp[i] = 0;
oldx = locx;
oldy = locy;
}
drawline(startx, starty, endx, endy)
int startx, starty, endx, endy;
{
register int t, distance;
int xerr=0, yerr=0, delta_x, delta_y;
int incx, incy;
delta_x=endx-startx;
delta_y=endy-starty;
if(delta_x>0) incx=1;
else if(delta_x==0) incx = 0;
else incx = -1;
if (delta_y>0) incy=1;
else if(delta_y == 0) incy = 0;
else incy = -1;
delta_x=abs(delta_x);
delta_y=abs(delta_y);
if(delta_x>delta_y) distance=delta_x;
else distance = delta_y;
for(t=0; t<=distance+1; t++)
{
makedot(startx,starty);
xerr+=delta_x;
yerr+=delta_y;
if(xerr>distance) {
xerr-=distance;
startx+=incx;
}
if(yerr>distance) {
yerr -= distance;
starty += incy;
}
}
}
makedot(x,y)
int x;
int y;
{
int spot;
spot = (0x2000 * (y % 4)) + (90 * (y / 4)) + (x/8);
uchar = 0x80 >> (x % 8 );
if(mode == OR)
*(pchscreen+spot) = *(pchscreen+spot) | uchar;
else if(mode == XOR)
*(pchscreen+spot) = *(pchscreen+spot) ^ uchar;
else if(mode == AND)
*(pchscreen+spot) = *(pchscreen+spot) & uchar;
}
g_mode(x)
int x;
{
mode = x;
}
convertuchartobin(a,temp)
unsigned char a;
char temp[];
{
int i;
unsigned char b;
b = 0x80;
for(i = 0; i<8; i++)
{
if(a & b)
temp[i] = '1';
else
temp[i] = '0';
b = b >> 1;
}
}
g_utc(locx,locy,zchar)
int locx;
int locy;
char zchar;
{
int i,x,y;
int letter;
i = 0;
if (locx < 0)
locx = oldx;
if (locy < 0)
locy = oldy;
if((zchar >= ' ') && (zchar <= 'z'))
{
letter = zchar - ' ';
for(y = 0; y<8; y++)
{
for(x = 7; x>=0; x--)
{
if(alphabet[letter][y][x])
makedot(locx+x,locy+y);
}
}
}
if(locx <= 711)
locx += 8;
oldx = locx;
oldy = locy;
}
mycursor(locx,locy)
int locx;
int locy;
{
int i,x,y;
int letter;
i = 0;
for(y = 0; y<8; y++)
{
for(x = 7; x>=0; x--)
{
if(cursor[y][x])
makedot(locx+x,locy+y);
}
}
}
msinitgrph()
{
unsigned Status; /*returned from API */
int WaitOption = 1; /* 1 = block for event,
0 = do not block */
/* open mouse device */
Status = MouOpen(0L, &MouHandle);
mousex = mouseminx + ((mousemaxx - mouseminx) /2);
mousey = mouseminy + ((mousemaxy - mouseminy) /2);
oldmousex = mousex;
oldmousey = mousey;
if(Status) /* exit if no mouse */
{ printf("\nMouOpen failed.\n");
exit(1);
}
Status = 0;
Status = Status | 0x300;
MouSetDevStatus(&Status, MouHandle);
}
msshowcur()
{
mycursor(mousex,mousey);
}
mshidecur()
{
int temp;
temp = mode;
g_mode(XOR);
mycursor(oldmousex,oldmousey);
g_mode(temp);
}
setgraph()
{
viopbBuf.pBuf = 0xB0000L;
viopbBuf.cb = 0x8000;
VioScrLock(LOCKIO_WAIT, &fstatus, 0);
VioGetPhysBuf(&viopbBuf,0);
VioScrUnLock(0);
pchscreen = MAKEP(viopbBuf.asel[0],0);
if(DosPortAccess(0, REQUEST, BPORT, EPORT))
{
printf("\nDosPortAccess failed.\n");
exit(1);
}
VioGetPhysBuf(&viopbBuf,0);
HC_GFX(pchscreen);
}
maintaincursor()
{
int temp;
int WaitOption = 1; /* 1 = block for event,
0 = do not block */
MouReadEventQue(&MouEvent, &WaitOption, MouHandle);
mousex = mousex + MouEvent.col;
mousey = mousey + MouEvent.row;
if(mousex < mouseminx)
mousex = mouseminx;
if(mousex > mousemaxx)
mousex = mousemaxx;
if(mousey < mouseminy)
mousey = mouseminy;
if (mousey >mousemaxy)
mousey = mousemaxy;
temp = mode;
g_mode(XOR);
mycursor(oldmousex,oldmousey);
mycursor(mousex,mousey);
oldmousex = mousex;
oldmousey = mousey;
g_mode(temp);
}
msvbounds(vubounds,vlbounds)
int vubounds;
int vlbounds;
{
if(vubounds > vlbounds)
vubounds = vlbounds;
if(vlbounds > 347)
vlbounds = 347;
if(vubounds < 0)
vubounds = 0;
mouseminy = vubounds;
mousemaxy = vlbounds;
}
mshbounds(hlbounds,hrbounds)
int hlbounds;
int hrbounds;
{
if(hlbounds > hrbounds)
hlbounds = hrbounds;
if(hrbounds > 719)
hrbounds = 719;
if(hlbounds < 0)
hlbounds = 0;
mouseminx = hlbounds;
mousemaxx = hrbounds;
}
msbpress(button, bstat, bcount, x, y)
int button;
int *bstat;
int *bcount;
int *x;
int *y;
{
}
msbreles(button, bstat, bcount, x, y)
int button;
int *bstat;
int *bcount;
int *x;
int *y;
{
}