From: sparky4 Date: Tue, 10 Jun 2014 17:23:00 +0000 (-0500) Subject: modified: 16/DOS_GFX.EXE X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=596d24bc5fccf8421c7d37d33d064efdeeecfe04;p=16.git modified: 16/DOS_GFX.EXE modified: 16/DOS_GFX.OBJ modified: 16/dos_gfx.cpp modified: 16/dos_gfx.h --- diff --git a/16/DOS_GFX.EXE b/16/DOS_GFX.EXE index a9f888ea..1425de66 100644 Binary files a/16/DOS_GFX.EXE and b/16/DOS_GFX.EXE differ diff --git a/16/DOS_GFX.OBJ b/16/DOS_GFX.OBJ index 79e5df42..a3c72fd4 100644 Binary files a/16/DOS_GFX.OBJ and b/16/DOS_GFX.OBJ differ 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"); diff --git a/16/dos_gfx.h b/16/dos_gfx.h index 82368d90..b9045057 100644 --- a/16/dos_gfx.h +++ b/16/dos_gfx.h @@ -12,7 +12,7 @@ #define LGQ 32 #define HGQ 56 #define TILEWH 16 -#define QUADWH TILEWH/4 +#define QUADWH TILEWH/2 #define BUFFMX 3 /*byte SIZE = 80; // Size = 40 = 1 across, 4 down // Size = 80 = 2 across, 2 down