]> 4ch.mooo.com Git - 16.git/commitdiff
polished bakapi
authorsparky4 <sparky4@cock.li>
Tue, 28 Jul 2015 16:00:34 +0000 (11:00 -0500)
committersparky4 <sparky4@cock.li>
Tue, 28 Jul 2015 16:00:34 +0000 (11:00 -0500)
modified:   bakapi.exe
modified:   src/bakapi.c
modified:   src/lib/bakapee.c
modified:   src/lib/bakapee.h

bakapi.exe
src/bakapi.c
src/lib/bakapee.c
src/lib/bakapee.h

index 11b904ac6adcc84ddbb7b903e7dff0ed046a6515..a2c6902134a76b069dae2e432f901896be99b540 100644 (file)
Binary files a/bakapi.exe and b/bakapi.exe differ
index 073ff6765d5b783b087f7b473e202acbd38d7e3b..fb7d79a25e1df88cc708ec7a6a93738f6572fc30 100644 (file)
@@ -41,7 +41,6 @@ main(int argc, char *argv[])
        ydir=1;
        bakapee.xx = rand()&0%SCREEN_WIDTH;
        bakapee.yy = rand()&0%SCREEN_HEIGHT;
-       bakapee.qq = 0;
        bakapee.gq = 0;
        bakapee.sx=0;
        bakapee.sy=0;
index 2a6d3eefd245ff44f3c7b0323f23f98d8a48d884..252f8b5b53f7d4676e20d3f4c1903e9e6a43263c 100644 (file)
@@ -51,21 +51,21 @@ void cls(page_t *page, byte color, byte *Where)
 //color \82Ä\82·\82Æ
 void colortest(page_t *page, bakapee_t *pee)
 {
-       if(pee->gq < 256)
+       if(pee->coor < 256)
        {
-               cls(page, pee->gq, VGA);
-               pee->gq++;
-       }else pee->gq = 0;
+               cls(page, pee->coor, VGA);
+               pee->coor++;
+       }else pee->coor = 0;
 }
 
 //color \82Ä\82·\82Æ
 void colorz(page_t *page, bakapee_t *pee)
 {
-       if(pee->gq <= HGQ)
+       if(pee->coor <= HGQ)
        {
-               cls(page, pee->gq, VGA);
-               pee->gq++;
-       }else pee->gq = LGQ;
+               cls(page, pee->coor, VGA);
+               pee->coor++;
+       }else pee->coor = LGQ;
 }
 
 //slow spectrum down
@@ -76,7 +76,8 @@ void ssd(page_t *page, bakapee_t *pee, word svq)
                if(pee->sx < SCREEN_WIDTH+1)
                {
                        //mxPutPixel(sx, sy, coor);
-                       printf("%d %d %d %d\n", pee->sx, pee->sy, svq, pee->coor);
+                       //printf("%d %d %d %d\n", pee->sx, pee->sy, svq, pee->coor);
+                       dingpp(page, pee);
                        pee->sx++;
                }else pee->sx = 0;
                if(pee->sx == SCREEN_WIDTH)
@@ -114,7 +115,7 @@ void dingo(bakapee_t *pee)
 
 void dingas(bakapee_t *pee)
 {
-       if(pee->qq == BONK) dingu(pee);
+       if(pee->gq == BONK) dingu(pee);
        if(!pee->bakax)
        {
                #ifdef TILE
@@ -162,14 +163,14 @@ void dingu(bakapee_t *pee)
 
 void dingq(bakapee_t *pee)
 {
-       if(pee->qq<BONK)
+       if(pee->gq<BONK)
        {
-               pee->qq++;
+               pee->gq++;
        }
        else
        {
                dingu(pee);
-               pee->qq = 0;
+               pee->gq = 0;
        }
        pee->bakax = rand()%3; pee->bakay = rand()%3;
 }
@@ -246,22 +247,22 @@ void ding(page_t *page, bakapee_t *pee, word q)
                        cls(page, pee->coor, VGA);
                break;
                case 7:
-                       if(pee->gq <= HGQ)
+                       if(pee->coor <= HGQ)
                        {
                                ssd(page, pee, q);
-                               pee->gq++;
-                       }else pee->gq = LGQ;
+                               pee->coor++;
+                       }else pee->coor = LGQ;
                break;
                case 8:
                        colorz(page, pee);
                        modexprint(page, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, 1, 47, 0, "bakapi");
                break;
                case 9:
-                       if(pee->gq <= HGQ)
+                       if(pee->coor <= HGQ)
                        {
-                               ssd(page, pee, q); pee->coor++;
-                               pee->gq++;
-                       }else pee->gq = LGQ;
+                               ssd(page, pee, q);
+                               pee->coor++;
+                       }else pee->coor = LGQ;
                break;
                case 10:
                        ssd(page, pee, q); /*printf("%d\n", pee->coor);*/
index 3de86f30e1d77faccf5b584f98b2ef770e905a0d..18ba2c8aed3873f59c28a718b67a3ee05f342eeb 100644 (file)
@@ -36,7 +36,6 @@
 
 typedef struct {\r
        word gq;
-       word qq;\r
        sword bakax, bakay;\r
        sword xx, yy, sx, sy;\r
        byte coor;