X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;ds=inline;f=16%2Fdos_gfx.cpp;h=268b99ae5f9393febd76d0e967ba3a385450f477;hb=e26d9f2f0a5705ab73e9b531000f1fad8a1a5466;hp=cbfa2d61702ef04eaa5aeb1dee463d8cdd7a205a;hpb=ea28213f8d38c309e28cd61b2cc9f53a6758f4e2;p=16.git diff --git a/16/dos_gfx.cpp b/16/dos_gfx.cpp index cbfa2d61..268b99ae 100644 --- a/16/dos_gfx.cpp +++ b/16/dos_gfx.cpp @@ -1,7 +1,8 @@ //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" +#include "dos_gfx.h" +//#include "lib\modex16.h" //____ int old_mode; //color ‚Ä‚·‚Æ @@ -9,7 +10,7 @@ short gq = LGQ; //‚Ä‚·‚Æ short bakax = 0, bakay = 0; -syte xx = rand()&0%SW, yy = rand()&0%SH, sx = 0, sy = 0; +word xx = rand()&0%SW, yy = rand()&0%SH, sx = 0, sy = 0; byte coor; byte *vga = (byte *) MK_FP(0xA000, 0); @@ -19,7 +20,7 @@ byte *vga = (byte *) MK_FP(0xA000, 0); * to be included. */ #define TESTING -#define TILE +//#define TILE ///////////////////////////////////////////////////////////////////////////// // // @@ -51,12 +52,24 @@ 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)); } } +void pdump(){ + int mult=(QUADWH)/2; + int palq=(mult)*16; + int palcol=0; + for(int paly=0; paly(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(TILEWH*2, (SH+64+32), SW, SH, TILEWH*2, TILEWH*2); +//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());