X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=16%2Fdos_gfx.cpp;fp=16%2Fdos_gfx.cpp;h=72e6d535a2643f564a4bb6294ff99c1c073b7ea8;hb=596d24bc5fccf8421c7d37d33d064efdeeecfe04;hp=4542e718ed5963a9840f5a6d2fe2c203e91ddfc9;hpb=240ba660932b53de8912026596031edcc1e3e4b9;p=16.git diff --git a/16/dos_gfx.cpp b/16/dos_gfx.cpp index 4542e718..72e6d535 100644 --- a/16/dos_gfx.cpp +++ b/16/dos_gfx.cpp @@ -18,7 +18,7 @@ byte *vga = (byte *) MK_FP(0xA000, 0); * Comment out the following #define if you don't want the testing main() * to be included. */ -#define TESTING +#define TESTING #define TILE ///////////////////////////////////////////////////////////////////////////// @@ -51,7 +51,7 @@ void setvideo(/*byte mode, */short vq){ mxSetVirtualScreen(VW,(VH+(TILEWH*BUFFMX))); // mxSetVirtualScreen((640-(TILEWH*4)),(480-(TILEWH*4))); mxSetClip(true); - mxSetClipRegion(0, 0, VW, (VH+(TILEWH*BUFFMX))); + mxSetClipRegion(0, 0, VW, (VH+(TILEWH*BUFFMX))); //mxSetClipRegion(0, VH+1, VW, (TILEWH*BUFFMX)); } } @@ -183,30 +183,30 @@ short ding(int q){ yy++; } }else{ - if(!bakax){ - #ifdef TILE - xx-=TILEWH; + if(!bakax){ + #ifdef TILE + xx-=TILEWH; #else - xx--; + xx--; #endif - }else if(bakax>1){ - #ifdef TILE - xx+=TILEWH; + }else if(bakax>1){ + #ifdef TILE + xx+=TILEWH; #else - xx++; + xx++; #endif } - if(!bakay){ + if(!bakay){ #ifdef TILE - yy-=TILEWH; + yy-=TILEWH; #else - yy--; + yy--; #endif - }else if(bakay>1){ + }else if(bakay>1){ #ifdef TILE - yy+=TILEWH; + yy+=TILEWH; #else - yy++; + yy++; #endif } } @@ -229,11 +229,11 @@ short ding(int q){ //printf("%d %d %d %d %d %d\n", xx, yy, tx, ty, TILEWH); // plot the pixel - }else{ + }else{ #ifdef TILE - mxFillBox(xx, yy, TILEWH, TILEWH, coor, OP_SET); + mxFillBox(xx, yy, TILEWH, TILEWH, coor, OP_SET); #else - mxPutPixel(xx, yy, coor); + mxPutPixel(xx, yy, coor); #endif } @@ -301,7 +301,7 @@ int main(void) mxPutPixel(0, y, 15); mxPutPixel(SW-1, y, 15); } - for (int x = 320; x < VW; ++x) + for (int x = 0; x < VW; ++x) { mxPutPixel(x, 0, 15); mxPutPixel(x, VH-1, 15); @@ -312,36 +312,32 @@ int main(void) mxPutPixel(VW-1, y, 15); } - getch(); - //mxFillBox(xx, yy, QUADWH, QUADWH, 1, 16); - //mxFillBox(xx, yy, QUADWH, QUADWH, 2, 16); - //mxFillBox(xx, yy, QUADWH, QUADWH, 3, 16); - //mxFillBox(xx, yy, QUADWH, QUADWH, 4, 16); - mxSetTextColor(8, OP_TRANS); - mxOutText(56, SH-40, "CRAZY!!!!]"); - mxOutText(64, SH-32, "CRAZY!!!!]"); - mxOutText(64, SH-24, "____ CRAZY!!!!]"); - mxOutText(56, SH-16, "___ _ CRAZY!!!!]"); - getch(); + getch(); + mxSetTextColor(8, OP_TRANS); + mxOutText(xpos+(QUADWH*6)+1, ypos+SH-48, "=================================="); + mxOutText(xpos+(QUADWH*6)+1, ypos+SH-40, "CRAZY!!!!]"); + mxOutText(xpos+(QUADWH*6)+1, ypos+SH-32, "CRAZY!!!!]"); + mxOutText(xpos+(QUADWH*6)+1, ypos+SH-24, "____ CRAZY!!!!]"); + mxOutText(xpos+(QUADWH*6)+1, ypos+SH-16, "___ _ CRAZY!!!!]"); + mxOutText(xpos+(QUADWH*6)+1, ypos+SH-8, "=================================="); + getch(); while(!kbhit()){ // hScroll(1); // scrolly(1); // vScroll(1); // delay(100); - //for(int i=0;i(VW-SW-1)) || (xpos<1)){xdir=-xdir;} - if( (ypos>((VH+(TILEWH*13))-SH-1)) || (ypos<1)){ydir=-ydir; delay(1000);} // { Hit a boundry, change + if( (ypos>((VH+(TILEWH*BUFFMX))-SH-1)) || (ypos<1)){ydir=-ydir;} // { Hit a boundry, change // direction! } } ch=getch(); @@ -349,7 +345,8 @@ int main(void) if(ch==0x1b)break; // 'ESC' } setvideo(0); - printf("wwww\nVirtual Resolution: %dx%d\n", VW,VH); + printf("wwww\nVirtual Resolution: %dx%d\n", VW,VH); + printf("Resolution: %dx%d\n", SW,SH); printf("Mode X Library Version: %d\n", mxGetVersion()); //puts("where to next? It's your move! wwww"); printf("bakapi ver. 1.04.09.04\nis made by sparky4i†ƒÖ…j feel free to use it ^^\nLicence: GPL v2\n");