X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;ds=inline;f=16%2Fdos_gfx.cpp;h=5928b6f571316f6535d6dfb9385aa0279c345bab;hb=7208080604e6f5d4568deaa064f590c9df5f3f42;hp=cbfa2d61702ef04eaa5aeb1dee463d8cdd7a205a;hpb=ea28213f8d38c309e28cd61b2cc9f53a6758f4e2;p=16.git diff --git a/16/dos_gfx.cpp b/16/dos_gfx.cpp index cbfa2d61..5928b6f5 100644 --- a/16/dos_gfx.cpp +++ b/16/dos_gfx.cpp @@ -51,7 +51,7 @@ void setvideo(/*byte mode, */short vq){ mxSetVirtualScreen(VW,BH); // mxSetVirtualScreen((640-(TILEWH*4)),(480-(TILEWH*4))); mxSetClip(true); - mxSetClipRegion(0, 0, VW, BH); + mxSetClipRegion(0, 0, VW, BH); mxPan(TILEWH*2,TILEWH*2); //mxSetClipRegion(0, VH+1, VW, (TILEWH*BUFFMX)); } @@ -245,11 +245,11 @@ short ding(int q){ #endif } - if(q==2) - #ifdef TILE - mxFillBox((rand()*TILEWH)%VW, (rand()*TILEWH)%(VH), TILEWH, TILEWH, 0, OP_SET); - #else - mxPutPixel(rand()%VW, rand()%(VH), 0); + if(q==2) + #ifdef TILE + mxFillBox((rand()*TILEWH)%VW, (rand()*TILEWH)%(VH), TILEWH, TILEWH, 0, OP_SET); + #else + mxPutPixel(rand()%VW, rand()%(VH), 0); #endif if(q==16) mxPutPixel(rand()%VW, rand()%(VH), 0); if(q==2||q==4||q==16){ bakax = rand()%3; bakay = rand()%3; } //random 3 switch @@ -298,6 +298,7 @@ int main(void) setvideo(1); } }*/ // else off + mxFillBox(0, 0, VW, BH, 10, OP_SET); while(1){ // conditions of screen saver while(!kbhit()){ ding(key); @@ -324,8 +325,8 @@ int main(void) mxPutPixel(0, y, 15); mxPutPixel(VW-1, y, 15); } - - getch();*/ + */ + getch(); //text box mxSetTextColor(10, OP_TRANS); //set font mxBitBlt(xpos, ypos+(TILEWH*12), SW, TILEWH*BUFFMX, 0, BS); //copy background @@ -340,38 +341,38 @@ int main(void) mxFillBox(xpos+QUADWH, ypos+QUADWH+(TILEWH*12), TILEWH*2, TILEWH*2, 9, OP_SET); //portriat~ getch(); mxBitBlt(0, BS, SW, TILEWH*BUFFMX, xpos, ypos+(TILEWH*12)); //copy background - //mxBitBlt(0, (TILEWH*12)+1, 320, TILEWH*3, 0, 0); getch(); while(!kbhit()){ -// hScroll(1); -// scrolly(1); -// vScroll(1); -// delay(100); //for(int i=0;i(VW-SW-1)) || (xpos<1))delay(500); - //mxWaitRetrace(); - mxPan(TILEWH*2,TILEWH*2); - mxBitBlt(0, SH, SW, SH, xpos, ypos); + //mxWaitRetrace(); +//mxBitBlt(32, (SH+32), SW, SH, xpos, ypos); +//mxBitBlt(32, (SH+64+32), SW, SH, 32, 32); +//xpos=ypos=TILEWH*2; +mxPan(32,32); //} if( (xpos>(VW-SW-1)) || (xpos<1)){xdir=-xdir;} if( (ypos>(BH-SH-1)) || (ypos<1)){ydir=-ydir;} // { Hit a boundry, change - // direction! } - + // direction! } +//mxBitBlt(32, (SH+64+32), SW, SH, xpos, ypos); +mxBitBlt(TILEWH*2, (SH+64+32), SW, SH, TILEWH*2, TILEWH*2); } ch=getch(); if(ch==0x71)break; // 'q' if(ch==0x1b)break; // 'ESC' } setvideo(0); - printf("wwww\nFull Buffer Virtual Resolution: %dx%d\n", VW,BH); + printf("wwww\nFull Buffer Virtual Resolution: %dx%d\n", VW,BH); printf("Virtual Resolution: %dx%d\n", VW,VH); printf("Resolution: %dx%d\n", SW,SH); printf("Mode X Library Version: %d\n", mxGetVersion());