* Comment out the following #define if you don't want the testing main()\r
* to be included.\r
*/\r
-#define TESTING\r
+#define TESTING
+#define TILE\r
\r
/////////////////////////////////////////////////////////////////////////////\r
// //\r
mxSetMode( MX_320x240 );\r
// mxSetVirtualScreen(SW+(SW/4), SH+(SH/4));\r
// mxSetVirtualScreen(SW*2, SH*2);\r
- mxSetVirtualScreen(VW,VH);\r
+ mxSetVirtualScreen(VW,(VH+(TILEWH*BUFFMX)));\r
// mxSetVirtualScreen((640-(TILEWH*4)),(480-(TILEWH*4)));\r
- mxSetClip(0);\r
- //mxSetClipRegion(0, 0, SW, SH);\r
+ mxSetClip(true);\r
+ mxSetClipRegion(0, 0, VW, (VH+(TILEWH*BUFFMX)));
+ //mxSetClipRegion(0, VH+1, VW, (TILEWH*BUFFMX));\r
}\r
}\r
\r
// //\r
/////////////////////////////////////////////////////////////////////////////\r
void cls(byte color, byte *Where){\r
- _fmemset(Where, color, VW*(VH));\r
+ _fmemset(Where, color, VW*(VH*1.5));\r
}\r
\r
//color \82Ä\82·\82Æ\r
}\r
}\r
\r
- if(q==8){ colorz(); return gq; mxOutText(SW/2, SH/2, "\83o\83J\83s"); }else\r
+ if(q==8){ colorz(); return gq; mxOutText(SW/2, SH/2, "bakapi"); }else\r
if(q==10){ ssd(q); /*printf("%d\n", coor);*/ }else\r
if(q==5){ colortest(); return gq; }else\r
if(q==11){ colorz(); delay(100); return gq; }\r
yy++;\r
}\r
}else{\r
- if(!bakax){\r
-// xx-=TILEWH;\r
- xx--;\r
- }else if(bakax>1){\r
-// xx+=TILEWH;\r
- xx++;\r
+ if(!bakax){
+ #ifdef TILE
+ xx-=TILEWH;
+ #else\r
+ xx--;
+ #endif\r
+ }else if(bakax>1){
+ #ifdef TILE
+ xx+=TILEWH;
+ #else\r
+ xx++;
+ #endif\r
}\r
- if(!bakay){\r
-// yy-=TILEWH;\r
- yy--;\r
- }else if(bakay>1){\r
-// yy+=TILEWH;\r
- yy++;\r
+ if(!bakay){
+ #ifdef TILE\r
+ yy-=TILEWH;
+ #else\r
+ yy--;
+ #endif\r
+ }else if(bakay>1){
+ #ifdef TILE\r
+ yy+=TILEWH;
+ #else\r
+ yy++;
+ #endif\r
}\r
}\r
}\r
if(xx<0) xx=(VW/*-TILEWH*/);\r
if(yy<0) yy=(VH/*-TILEWH*/);\r
if(xx>(VW/*-TILEWH*/)) xx=0;\r
- if(yy>(VH/*-TILEWH*/)) yy=0;\r
+ if(yy>(VH+(TILEWH*BUFFMX))) yy=0;\r
}\r
\r
//interesting effects\r
//printf("%d %d %d %d %d %d\n", xx, yy, tx, ty, TILEWH);\r
\r
// plot the pixel\r
- }else{\r
-// mxFillBox(xx, yy, TILEWH, TILEWH, coor, 16);\r
- mxPutPixel(xx, yy, coor);\r
+ }else{
+ #ifdef TILE\r
+ mxFillBox(xx, yy, TILEWH, TILEWH, coor, OP_SET);
+ #else\r
+ mxPutPixel(xx, yy, coor);
+ #endif\r
} \r
\r
if(q==2) mxPutPixel(rand()%VW, rand()%(VH), 0);\r
int ch=0x0;\r
// main variables\r
d=4; // switch variable\r
- key=3; // default screensaver number\r
+ key=4; // default screensaver number\r
xpos=0;\r
ypos=0;\r
xdir=1;\r
for(short o = 0; o<TILEWH; o++){\r
xpos+=xdir;\r
ypos+=ydir;\r
- //mxWaitRetrace();\r
+ mxWaitRetrace();\r
}\r
if( (xpos>(VW-SW-1)) || (xpos<1)){xdir=-xdir;}\r
- if( (ypos>(VH-SH-1)) || (ypos<1)){ydir=-ydir;} // { Hit a boundry, change\r
+ if( (ypos>((VH+(TILEWH*13))-SH-1)) || (ypos<1)){ydir=-ydir; delay(1000);} // { Hit a boundry, change\r
// direction! }\r
}\r
ch=getch();\r
if(ch==0x1b)break; // 'ESC'\r
}\r
setvideo(0);\r
- printf("wwww\nResolution: %dx%d\n", SW,SH);\r
+ printf("wwww\nVirtual Resolution: %dx%d\n", VW,VH);\r
printf("Mode X Library Version: %d\n", mxGetVersion());\r
//puts("where to next? It's your move! wwww");\r
printf("bakapi ver. 1.04.09.04\nis made by sparky4\81i\81\86\83Ö\81\85\81j feel free to use it ^^\nLicence: GPL v2\n");\r