]> 4ch.mooo.com Git - 16.git/commitdiff
BAKAPI WORKS BETTER ^^
authorsparky4 <sparky4@cock.li>
Tue, 17 May 2016 21:31:55 +0000 (16:31 -0500)
committersparky4 <sparky4@cock.li>
Tue, 17 May 2016 21:31:55 +0000 (16:31 -0500)
src/bakapi.c
src/lib/bakapee.c

index 0e04eb22bdfff81c9f30a3e245ae1729e6ebb23c..5378794a8a55a137d43341de6c6c92e17297200c 100755 (executable)
@@ -90,8 +90,8 @@ main(int argc, char *argvar[])
        // main variables values
        d=4; // switch variable
        key=2; // default screensaver number
-       xpos=TILEWH*2;
-       ypos=TILEWH*2;
+       xpos=TILEWHD;
+       ypos=TILEWHD;
        xdir=1;
        ydir=1;
 
@@ -111,8 +111,6 @@ main(int argc, char *argvar[])
 
        /* 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);
        textInit();
 
        //modexPalUpdate(bmp.palette); //____
@@ -200,7 +198,7 @@ main(int argc, char *argvar[])
                        VGAmodeX(0, 0, &gvar);
                        // user imput switch
                        //fprintf(stderr, "xx=%d        yy=%d   tile=%d\n", bakapee.xx, bakapee.yy, bakapee.tile);
-                       fprintf(stderr, "dx=%d  dy=%d   ", gvar.video.page[0].dx, gvar.video.page[0].dy);
+                       //fprintf(stderr, "dx=%d        dy=%d   ", gvar.video.page[0].dx, gvar.video.page[0].dy);
                        printf("Tiled mode is ");
                        switch (bakapee.tile)
                        {
@@ -264,10 +262,8 @@ pee:
                                case '6':
                                case '9':
                                        key = c - '0';
-                                       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, 0, &gvar);
+                                       gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);
                // 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.
                                        modexShowPage(&gvar.video.page[0]);
@@ -311,6 +307,7 @@ pee:
        }
        VGAmodeX(0, 1, &gvar);
 #endif // defined(BOINK)
+//     printf("page.width=%u   ", gvar.video.page[0].width); printf("page.height=%u\n", gvar.video.page[0].height);
        printf("bakapi ver. 1.04.16.04\nis made by sparky4\81i\81\86\83Ö\81\85\81j feel free to use it ^^\nLicence: GPL v3\n");
        printf("compiled on 2016/04/04\n");
 }
index b50c16e184212eb97efeae0c543f9a673abac50d..dfc476816079a86fc09ff77f19f8363fb416810c 100755 (executable)
@@ -266,7 +266,7 @@ void ding(page_t *page, bakapee_t *pee, word q)
                        ty+=pee->yy+TILEWH+4;
                        modexClearRegion(page, tx, ty, 4, 4, pee->coor);
                        if(pee->tile)
-                       modexClearRegion(page, (rand()*TILEWH)%page->width, (rand()*TILEWH)%(page->height), TILEWH, TILEWH, 0);
+                       modexClearRegion(page, (rand()*4)%page->width, (rand()*4)%(page->height), 4, 4, 0);
                        else
                        modexputPixel(page, rand()%page->width, rand()%(page->height), 0);
                        //printf("%d %d %d %d %d %d\n", pee->xx, pee->yy, tx, ty, TILEWH);