From: sparky4 Date: Tue, 28 Jul 2015 16:00:34 +0000 (-0500) Subject: polished bakapi X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=52fd1fdde47d0ff2f8728c44294f34c76357d102;p=16.git polished bakapi modified: bakapi.exe modified: src/bakapi.c modified: src/lib/bakapee.c modified: src/lib/bakapee.h --- diff --git a/bakapi.exe b/bakapi.exe index 11b904ac..a2c69021 100644 Binary files a/bakapi.exe and b/bakapi.exe differ diff --git a/src/bakapi.c b/src/bakapi.c index 073ff676..fb7d79a2 100644 --- a/src/bakapi.c +++ b/src/bakapi.c @@ -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; diff --git a/src/lib/bakapee.c b/src/lib/bakapee.c index 2a6d3eef..252f8b5b 100644 --- a/src/lib/bakapee.c +++ b/src/lib/bakapee.c @@ -51,21 +51,21 @@ void cls(page_t *page, byte color, byte *Where) //color ‚Ä‚·‚Æ 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 ‚Ä‚·‚Æ 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->qqgqqq++; + 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);*/ diff --git a/src/lib/bakapee.h b/src/lib/bakapee.h index 3de86f30..18ba2c8a 100644 --- a/src/lib/bakapee.h +++ b/src/lib/bakapee.h @@ -36,7 +36,6 @@ typedef struct { word gq; - word qq; sword bakax, bakay; sword xx, yy, sx, sy; byte coor;