#include #include #include #include #include #include void Polygon(int xc, int yc, int r, int Side); void Lineto(int, int, int=0); void Line(int, int, int, int); void DDALine(int, int, int, int); void Circle(int, int, int); void PlotPoints(int, int, int, int); void Ellipse(int, int, int, int); char far *Scr; void SetPixel(unsigned x, unsigned y, unsigned color) { char col; col = Scr[(y << 8) + (y << 6) + ( x / 2 )] ; if(x/2) { asm mov al,col; asm mov cl,4; asm shl al,cl; asm add al,byte ptr color; asm rol al,cl; asm mov col,al; } else { asm mov al,col; asm and al,0xf0; asm add al,byte ptr color; asm mov col,al; } Scr[(y << 8) + (y << 6) + (x / 2)] = col; } template T abs(T x) { if(x < 0) return (-1 * x); else return x; }; unsigned Round(float x) { return ((x * 10 + 5) / 10); } void main() { /* asm mov ah, 0x0; asm mov al, 0x13; asm int 0x10; */ /* int gdriver = DETECT, gmode, errorcode; initgraph(&gdriver, &gmode, "c:\\la\\tc\\bgi"); */ // Scr = (char far *)0xA0000000; // Line(1,1,8,5); clrscr(); cout<