X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=16%2Fdos_gfx.cpp;fp=16%2Fdos_gfx.cpp;h=195624d063b790566ea74dcdfcd6573ae1fe94b6;hb=9c5abcbc84383ac5669a685ec370b2e7647dc508;hp=e14c5c4930e5c436bf1c2d402f2ad5cda22d8cd0;hpb=0fd6f3d210d87e6b1eb1924bb16f945f1d1bf42e;p=16.git diff --git a/16/dos_gfx.cpp b/16/dos_gfx.cpp index e14c5c49..195624d0 100644 --- a/16/dos_gfx.cpp +++ b/16/dos_gfx.cpp @@ -1,5 +1,5 @@ -//DOS Graphics thingy by sparky4 licence GPL v2 -//a special thanks to everyone to release source code for mode X +//DOS Graphics thingy by sparky4 licence GPL v2 +//a special thanks to everyone to release source code for mode X /*src\lib\*/ #include "dos_gfx.h" @@ -10,8 +10,8 @@ int gq = LGQ; int q = 0; int bakax = 0, bakay = 0; cord xx = rand()&0%320, yy = rand()&0%240, sx = 0, sy = 0; -byte coor; - +byte coor; + byte *vga = (byte *) MK_FP(0xA000, 0); /* @@ -182,18 +182,18 @@ int ding(int q){ } }else{ if(!bakax){ -// xx-=TILEWH; - xx--; + xx-=TILEWH; +// xx--; }else if(bakax>1){ -// xx+=TILEWH; - xx++; + xx+=TILEWH; +// xx++; } if(!bakay){ -// yy-=TILEWH; - yy--; + yy-=TILEWH; +// yy--; }else if(bakay>1){ -// yy+=TILEWH; - yy++; + yy+=TILEWH; +// yy++; } } } @@ -216,8 +216,8 @@ int ding(int q){ // plot the pixel }else{ -// mxFillBox(xx, yy, TILEWH, TILEWH, coor, 0); - mxPutPixel(xx, yy, coor); + mxFillBox(xx, yy, TILEWH, TILEWH, coor, 0); +// mxPutPixel(xx, yy, coor); } if(q==2) mxPutPixel(rand()%SW, rand()%(SH*3), 0); @@ -250,7 +250,7 @@ int main(void) d=1; // switch variable key=4; // default screensaver number xpos=0; - ypos=0; + ypos=0; xdir=1; ydir=1; setvideo(1); @@ -283,9 +283,9 @@ int main(void) { mxPutPixel(0, y, 15); mxPutPixel(SW-1, y, 15); - } + } - getch(); + getch(); for (int x = 320; x < VW; ++x) { mxPutPixel(x, 0, 15); @@ -295,7 +295,12 @@ int main(void) { mxPutPixel(0, y, 15); mxPutPixel(VW-1, y, 15); - } + } + mxSetTextColor(16, OP_TRANS); + mxOutText(64, SH-40, "CRAZY!!!!"); + mxOutText(64, SH-32, "CRAZY!!!!"); + mxOutText(64, SH-24, " _ CRAZY!!!!"); + mxOutText(64, SH-16, " _ _ CRAZY!!!!"); getch(); while(!kbhit()){ // hScroll(1); @@ -304,6 +309,10 @@ int main(void) // delay(100); //for(int i=0;i