Category : C Source Code
Archive   : TCEGA.ZIP
Filename : WORLD.C

 
Output of file : WORLD.C contained in archive : TCEGA.ZIP
/* */
/* EGA Graphic Primitive for Microsoft C 3.00, Version 01MAR86. */
/* (C) 1986 by Kent Cedola, 2015 Meadow Lake Ct., Norfolk, VA, 23518 */
/* */
/* Description: This an example of how graphic primitives can be put */
/* together to form 'HIGH LEVEL' graphic routines. */
/* */

#include

void SetViewport(x1,y1,x2,y2)
int x1,y1,x2,y2;
{
GPVIEWPORT(x1,y1,x2,y2);
}

void SetWindow(x1,y1,x2,y2)
int x1,y1,x2,y2;
{
GPWINDOW(x1,y1,x2,y2);
}

void MovAbs(x,y)
int x,y;
{
GDCURX1 = x;
GDCURY1 = y;
}

void MovRel(x,y)
int x,y;
{
GDCURX1 = GDCURX1 + x;
GDCURY1 = GDCURY1 + y;
}

void LnAbs(x2,y2)
int x2,y2;
{
int x1,y1;

register i;

x1 = GDCURX1;
y1 = GDCURY1;
GDCURX1 = x2;
GDCURY1 = y2;

if (GPCLIP2(&x1,&y1,&x2,&y2) != 2)
{
GPSCALE(&x1,&y1);
GPMOVE(x1,y1);
GPSCALE(&x2,&y2);
GPLINE(x2,y2);
};

}

void LnRel(x,y)
int x,y;
{
LnAbs(GDCURX1 + x, GDCURY1 + y);
}


  3 Responses to “Category : C Source Code
Archive   : TCEGA.ZIP
Filename : WORLD.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/