X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fbakapi.c;h=c6ae3ce3b9c93cf196c4ffe90a0bf1f02224ff56;hb=900779b8b2ce8c05c3df897d3ae3fa5d8cb414c6;hp=1b839a21bb0d8b9c7c0aa5d43267746e928d0b15;hpb=3518b6b4a81ba2369bb95c9a9b387e799c1c3692;p=16.git diff --git a/src/bakapi.c b/src/bakapi.c index 1b839a21..c6ae3ce3 100755 --- a/src/bakapi.c +++ b/src/bakapi.c @@ -93,12 +93,10 @@ main(int argc, char *argvar[]) xdir=1; ydir=1; -#ifdef MXLIB - VGAmodeX(vgamodex_mode, &gvar); // TODO: Suggestion: Instead of magic numbers for the first param, might I suggest defining an enum or some #define constants that are easier to remember? --J.C. -#else -# error REMOVED // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in. + VGAmodeX(vgamodex_mode, 1, &gvar); // TODO: Suggestion: Instead of magic numbers for the first param, might I suggest defining an enum or some #define constants that are easier to remember? --J.C. + // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in. // we'll integrate DOSLIB vga into that part of the code instead for less disruption. -- J.C. -#endif + bakapee.xx = rand()&0%gvar.video.page[0].width; bakapee.yy = rand()&0%gvar.video.page[0].height; bakapee.gq = 0; @@ -138,15 +136,22 @@ main(int argc, char *argvar[]) { int c; -# ifndef MXLIB -# error REMOVED // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in. + // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in. // we'll integrate DOSLIB vga into that part of the code instead for less disruption. -- J.C. -# else - VGAmodeX(0, &gvar); -# endif + VGAmodeX(0, 0, &gvar); // user imput switch - fprintf(stderr, "xx=%d yy=%d tile=%d\n", bakapee.xx, bakapee.yy, bakapee.tile); - printf("Enter 1, 2, 3, 4, or 6 to run a screensaver, or enter 0 to quit.\n"); + //fprintf(stderr, "xx=%d yy=%d tile=%d\n", bakapee.xx, bakapee.yy, bakapee.tile); + printf("Tiled mode is "); + switch (bakapee.tile) + { + case 0: + printf("off.\n"); + break; + case 1: + printf("on.\n"); + break; + } + printf("Enter 1, 2, 3, 4, 5, 6, 8, or 9 to run a screensaver, or enter 0 to quit.\n"); c = getch(); switch (c) { @@ -166,22 +171,22 @@ main(int argc, char *argvar[]) } key=0; break; + case '8': + c+=8; case '1': case '2': case '3': case '4': case '5': case '6': + case '9': key = c - '0'; -# ifdef MXLIB gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]); gvar.video.page[0].width += (TILEWH*2); gvar.video.page[0].height += (TILEWH*2); - VGAmodeX(vgamodex_mode, &gvar); -# else -# error REMOVED // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in. + VGAmodeX(vgamodex_mode, 0, &gvar); + // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in. // we'll integrate DOSLIB vga into that part of the code instead for less disruption. -- J.C. -# endif modexShowPage(&gvar.video.page[0]); break; default: @@ -192,6 +197,7 @@ main(int argc, char *argvar[]) } #else // !defined(BOINK) // FIXME: Does not compile. Do you want to remove this? +// TODO: This is a testing sextion for textrendering and panning for project 16 --sparky4 while(1) { // conditions of screen saver while(!kbhit()) @@ -266,6 +272,7 @@ main(int argc, char *argvar[]) } // VGAmodeX(0, &gvar); #endif // defined(BOINK) - printf("bakapi ver. 1.04.13.04\nis made by sparky4i†ƒÖ…j feel free to use it ^^\nLicence: GPL v3\n"); + printf("bakapi ver. 1.04.16.04\nis made by sparky4i†ƒÖ…j feel free to use it ^^\nLicence: GPL v3\n"); + printf("compiled on 2016/04/04\n"); } //pee!