xdir=1;
ydir=1;
+#ifdef MXLIB
VGAmodeX(1, &gvar);
+#else
+ mxSetMode(3);
+#endif
bakapee.xx = rand()&0%gvar.video.page[0].width;
bakapee.yy = rand()&0%gvar.video.page[0].height;
bakapee.gq = 0;
/* setup camera and screen~ */
gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);
- //gvar.video.page[0].width += (TILEWH*2);
- //gvar.video.page[0].height += (TILEWH*2);
+ gvar.video.page[0].width += (TILEWH*2);
+ gvar.video.page[0].height += (TILEWH*2);
textInit();
//modexPalUpdate(bmp.palette); //____
}
else
{
+ #ifndef MXLIB
+ mxChangeMode(0);
+#else
VGAmodeX(0, &gvar);
+#endif
//modexLeave();
// user imput switch
+ fprintf(stderr, "xx=%d yy=%d\n", bakapee.xx, bakapee.yy);
printf("Enter 1, 2, 3, 4, or 6 to run a screensaver, or enter 0 to quit.\n", getch()); // prompt the user
scanf("%d", &key);
//if(key==3){xx=yy=0;} // crazy screen saver wwww
gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);
gvar.video.page[0].width += (TILEWH*2);
gvar.video.page[0].height += (TILEWH*2);
+#ifdef MXLIB
VGAmodeX(1, &gvar);
+#else
+ mxChangeMode(3);
+#endif
modexShowPage(&gvar.video.page[0]);
}
}
void dingpp(page_t *page, bakapee_t *pee)
{
#ifdef TILE
+#ifndef MXLIB
//fill_block(pee->xx, pee->yy, pee->xx+TILEWH, pee->yy+TILEWH, pee->coor);
- //mxFillBox(pee->xx, pee->yy, TILEWH, TILEWH, pee->coor, OP_SET);
+ mxFillBox(pee->xx, pee->yy, TILEWH, TILEWH, pee->coor, OP_SET);
+#else
modexClearRegion(page, pee->xx, pee->yy, TILEWH, TILEWH, pee->coor);
+#endif
#else
modexputPixel(page, pee->xx, pee->yy, pee->coor);
#endif