* Comment out the following #define if you don't want the testing main()\r
* to be included.\r
*/\r
-#define TESTING
+#define TESTING\r
#define TILE\r
\r
/////////////////////////////////////////////////////////////////////////////\r
mxSetVirtualScreen(VW,(VH+(TILEWH*BUFFMX)));\r
// mxSetVirtualScreen((640-(TILEWH*4)),(480-(TILEWH*4)));\r
mxSetClip(true);\r
- mxSetClipRegion(0, 0, VW, (VH+(TILEWH*BUFFMX)));
+ mxSetClipRegion(0, 0, VW, (VH+(TILEWH*BUFFMX)));\r
//mxSetClipRegion(0, VH+1, VW, (TILEWH*BUFFMX));\r
}\r
}\r
yy++;\r
}\r
}else{\r
- if(!bakax){
- #ifdef TILE
- xx-=TILEWH;
+ if(!bakax){\r
+ #ifdef TILE\r
+ xx-=TILEWH;\r
#else\r
- xx--;
+ xx--;\r
#endif\r
- }else if(bakax>1){
- #ifdef TILE
- xx+=TILEWH;
+ }else if(bakax>1){\r
+ #ifdef TILE\r
+ xx+=TILEWH;\r
#else\r
- xx++;
+ xx++;\r
#endif\r
}\r
- if(!bakay){
+ if(!bakay){\r
#ifdef TILE\r
- yy-=TILEWH;
+ yy-=TILEWH;\r
#else\r
- yy--;
+ yy--;\r
#endif\r
- }else if(bakay>1){
+ }else if(bakay>1){\r
#ifdef TILE\r
- yy+=TILEWH;
+ yy+=TILEWH;\r
#else\r
- yy++;
+ yy++;\r
#endif\r
}\r
}\r
//printf("%d %d %d %d %d %d\n", xx, yy, tx, ty, TILEWH);\r
\r
// plot the pixel\r
- }else{
+ }else{\r
#ifdef TILE\r
- mxFillBox(xx, yy, TILEWH, TILEWH, coor, OP_SET);
+ mxFillBox(xx, yy, TILEWH, TILEWH, coor, OP_SET);\r
#else\r
- mxPutPixel(xx, yy, coor);
+ mxPutPixel(xx, yy, coor);\r
#endif\r
} \r
\r
mxPutPixel(0, y, 15);\r
mxPutPixel(SW-1, y, 15);\r
}\r
- for (int x = 320; x < VW; ++x)\r
+ for (int x = 0; x < VW; ++x)\r
{\r
mxPutPixel(x, 0, 15);\r
mxPutPixel(x, VH-1, 15);\r
mxPutPixel(VW-1, y, 15);\r
}\r
\r
- getch();\r
- //mxFillBox(xx, yy, QUADWH, QUADWH, 1, 16);\r
- //mxFillBox(xx, yy, QUADWH, QUADWH, 2, 16);\r
- //mxFillBox(xx, yy, QUADWH, QUADWH, 3, 16);\r
- //mxFillBox(xx, yy, QUADWH, QUADWH, 4, 16);\r
- mxSetTextColor(8, OP_TRANS);\r
- mxOutText(56, SH-40, "CRAZY!!!!]");\r
- mxOutText(64, SH-32, "CRAZY!!!!]");\r
- mxOutText(64, SH-24, "____ CRAZY!!!!]");\r
- mxOutText(56, SH-16, "___ _ CRAZY!!!!]");\r
- getch();\r
+ getch();\r
+ mxSetTextColor(8, OP_TRANS);
+ mxOutText(xpos+(QUADWH*6)+1, ypos+SH-48, "==================================");
+ mxOutText(xpos+(QUADWH*6)+1, ypos+SH-40, "CRAZY!!!!]");\r
+ mxOutText(xpos+(QUADWH*6)+1, ypos+SH-32, "CRAZY!!!!]");\r
+ mxOutText(xpos+(QUADWH*6)+1, ypos+SH-24, "____ CRAZY!!!!]");\r
+ mxOutText(xpos+(QUADWH*6)+1, ypos+SH-16, "___ _ CRAZY!!!!]");
+ mxOutText(xpos+(QUADWH*6)+1, ypos+SH-8, "==================================");\r
+ getch();\r
while(!kbhit()){\r
// hScroll(1);\r
// scrolly(1);\r
// vScroll(1);\r
// delay(100);\r
- //for(int i=0;i<TILEWH;i++){\r
+ //for(int i=0;i<TILEWH;i++){
+ \r
ding(key);\r
- //mxOutText(64, SH-40, "CRAZY!!!!");\r
- //mxOutText(64, SH-32, "CRAZY!!!!");\r
- //mxOutText(64, SH-24, " _ CRAZY!!!!");\r
- //mxOutText(64, SH-16, " _ _ CRAZY!!!!");\r
mxPan(xpos,ypos);\r
- for(short o = 0; o<TILEWH; o++){\r
+ //for(short o = 0; o<TILEWH; o++){\r
xpos+=xdir;\r
- ypos+=ydir;\r
+ ypos+=ydir;
+ if(ypos==1 || (ypos==((VH+(TILEWH*BUFFMX))-SH-1)))delay(1000);\r
mxWaitRetrace();\r
- }\r
+ //}\r
if( (xpos>(VW-SW-1)) || (xpos<1)){xdir=-xdir;}\r
- if( (ypos>((VH+(TILEWH*13))-SH-1)) || (ypos<1)){ydir=-ydir; delay(1000);} // { Hit a boundry, change\r
+ if( (ypos>((VH+(TILEWH*BUFFMX))-SH-1)) || (ypos<1)){ydir=-ydir;} // { Hit a boundry, change\r
// direction! }\r
}\r
ch=getch();\r
if(ch==0x1b)break; // 'ESC'\r
}\r
setvideo(0);\r
- printf("wwww\nVirtual Resolution: %dx%d\n", VW,VH);\r
+ printf("wwww\nVirtual Resolution: %dx%d\n", VW,VH);
+ printf("Resolution: %dx%d\n", SW,SH);\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