X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=16%2Fdos_gfx.cpp;h=52e259db4066d21dfad93766a8770d85208b968c;hb=b50a0eb714c64dee65050539243e02ef2aa308b5;hp=72e6d535a2643f564a4bb6294ff99c1c073b7ea8;hpb=596d24bc5fccf8421c7d37d33d064efdeeecfe04;p=16.git diff --git a/16/dos_gfx.cpp b/16/dos_gfx.cpp index 72e6d535..52e259db 100644 --- a/16/dos_gfx.cpp +++ b/16/dos_gfx.cpp @@ -19,7 +19,7 @@ byte *vga = (byte *) MK_FP(0xA000, 0); * to be included. */ #define TESTING -#define TILE +//#define TILE ///////////////////////////////////////////////////////////////////////////// // // @@ -48,10 +48,11 @@ void setvideo(/*byte mode, */short vq){ mxSetMode( MX_320x240 ); // mxSetVirtualScreen(SW+(SW/4), SH+(SH/4)); // mxSetVirtualScreen(SW*2, SH*2); - mxSetVirtualScreen(VW,(VH+(TILEWH*BUFFMX))); + mxSetVirtualScreen(VW,BH); // mxSetVirtualScreen((640-(TILEWH*4)),(480-(TILEWH*4))); mxSetClip(true); - mxSetClipRegion(0, 0, VW, (VH+(TILEWH*BUFFMX))); + mxSetClipRegion(0, 0, VW, BH); + mxPan(TILEWH*2,TILEWH*2); //mxSetClipRegion(0, VH+1, VW, (TILEWH*BUFFMX)); } } @@ -63,7 +64,7 @@ void setvideo(/*byte mode, */short vq){ // // ///////////////////////////////////////////////////////////////////////////// void cls(byte color, byte *Where){ - _fmemset(Where, color, VW*(VH*1.5)); + _fmemset(Where, color, VW*(VH*2)); } //color ‚Ä‚·‚Æ @@ -213,10 +214,17 @@ short ding(int q){ } // fixer if(q!=16){ - if(xx<0) xx=(VW/*-TILEWH*/); - if(yy<0) yy=(VH/*-TILEWH*/); - if(xx>(VW/*-TILEWH*/)) xx=0; - if(yy>(VH+(TILEWH*BUFFMX))) yy=0; + #ifdef TILE + if(xx<0) xx=(VW-TILEWH); + if(yy<0) yy=(VH-TILEWH); + if(xx>(VW-TILEWH)) xx=0; + if(yy>(VH-TILEWH)/*+(TILEWH*BUFFMX)*/) yy=0; + #else + if(xx<0) xx=VW; + if(yy<0) yy=VH; + if(xx>VW) xx=0; + if(yy>VH) yy=0; + #endif } //interesting effects @@ -265,8 +273,8 @@ int main(void) // main variables d=4; // switch variable key=4; // default screensaver number - xpos=0; - ypos=0; + xpos=TILEWH*2; + ypos=TILEWH*2; xdir=1; ydir=1; setvideo(1); @@ -313,31 +321,40 @@ int main(void) } 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, "=================================="); + //text box + mxSetTextColor(10, OP_TRANS); //set font + mxBitBlt(xpos, ypos+(TILEWH*12), 320, TILEWH*BUFFMX, 0, BS); //copy background + mxFillBox(xpos, ypos+(TILEWH*12), 320, TILEWH*BUFFMX, 0, OP_SET); // background for text box + //+(QUADWH*6) + mxOutText(xpos+1, ypos+SH-48, "========================================"); + mxOutText(xpos+1, ypos+SH-40, "| |Chikyuu:$line1"); + mxOutText(xpos+1, ypos+SH-32, "| |$line2"); + mxOutText(xpos+1, ypos+SH-24, "| |$line3"); + mxOutText(xpos+1, ypos+SH-16, "| |$line4"); + mxOutText(xpos+1, ypos+SH-8, "========================================"); + mxFillBox(xpos+QUADWH, ypos+QUADWH+(TILEWH*12), TILEWH*2, TILEWH*2, 9, OP_SET); //portriat~ + getch(); + mxBitBlt(0, BS, 320, 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(); //} if( (xpos>(VW-SW-1)) || (xpos<1)){xdir=-xdir;} - if( (ypos>((VH+(TILEWH*BUFFMX))-SH-1)) || (ypos<1)){ydir=-ydir;} // { Hit a boundry, change + if( (ypos>(BH-SH-1)) || (ypos<1)){ydir=-ydir;} // { Hit a boundry, change // direction! } } ch=getch(); @@ -345,10 +362,10 @@ int main(void) if(ch==0x1b)break; // 'ESC' } setvideo(0); - printf("wwww\nVirtual Resolution: %dx%d\n", VW,VH); + 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()); - //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"); return 0; }