}\r
}\r
\r
+void dingaso(bakapee_t *pee)\r
+{\r
+ if(pee->gq == BONK) dingu(pee);\r
+ if(!pee->bakax)\r
+ {\r
+ if(pee->tile)\r
+ pee->xx-=TILEWH;\r
+ else pee->xx--;\r
+ }\r
+ else\r
+ {\r
+ if(pee->tile)\r
+ pee->xx+=TILEWH;\r
+ else pee->xx++;\r
+ }\r
+ if(!pee->bakay)\r
+ {\r
+ if(pee->tile)\r
+ pee->yy-=TILEWH;\r
+ else pee->yy--;\r
+ }\r
+ else\r
+ {\r
+ if(pee->tile)\r
+ pee->yy+=TILEWH;\r
+ else pee->yy++;\r
+ }\r
+}\r
+\r
void dingu(bakapee_t *pee)\r
{\r
if(pee->coor < HGQ && pee->coor < LGQ) pee->coor = LGQ;\r
pee->bakax = rand()%3; pee->bakay = rand()%3;\r
}\r
\r
+void dingqo(bakapee_t *pee)\r
+{\r
+ if(pee->gq<BONK)\r
+ {\r
+ pee->gq++;\r
+ pee->bakax = rand()%3; pee->bakay = rand()%3;\r
+ }\r
+ else\r
+ {\r
+ dingu(pee);\r
+ pee->gq = 0;\r
+ }\r
+ //either one will do wwww --4\r
+ pee->bakax = rand()&0x1; pee->bakay = rand()&0x1;\r
+ //pee->bakax = rand()%2; pee->bakay = rand()%2;\r
+}\r
+\r
/*-----------ding-------------*/\r
void ding(page_t *page, bakapee_t *pee, word q)\r
{\r
- word d3y, tx=0,ty=0;\r
+ word tx=0,ty=0;//d3y,\r
\r
//++++ if(q <= 4 && q!=2 && gq == BONK-1) coor = rand()%HGQ;\r
switch(q)\r
{\r
- case 1:\r
+ case 1:/*\r
dingq(pee);\r
if(pee->xx==page->sw){pee->bakax=0;}\r
if(pee->xx==0){pee->bakax=1;}\r
if(pee->yy==page->sh){pee->bakay=0;}\r
- if(pee->yy==0){pee->bakay=1;}\r
+ if(pee->yy==0){pee->bakay=1;}*/\r
+ dingqo(pee);\r
+ dingaso(pee);\r
+ dingo(page, pee);\r
+ dingpp(page, pee); //plot the pixel/tile\r
+ if(pee->tile)\r
+ modexClearRegion(page, (rand()*TILEWH)%page->width, (rand()*TILEWH)%(page->height), TILEWH, TILEWH, 0);\r
+ else\r
+ modexputPixel(page, rand()%page->width, rand()%page->height, 0);\r
break;\r
case 2:\r
dingq(pee);\r
modexputPixel(page, rand()%page->width, rand()%page->height, 0);\r
break;\r
case 3:\r
- dingq(pee);\r
+ /*dingq(pee);\r
if(pee->xx!=page->sw||pee->yy!=page->sh)\r
{\r
if(pee->xx==0){pee->bakax=1;pee->bakay=-1;d3y=1;}\r
{\r
pee->xx++;\r
}\r
+ dingpp(page, pee); //plot the pixel/tile*/\r
+ dingqo(pee);\r
+ dingaso(pee);\r
+ dingo(page, pee);\r
dingpp(page, pee); //plot the pixel/tile\r
break;\r
case 4:\r
void dingpp(page_t *page, bakapee_t *pee);\r
void dingo(page_t *page, bakapee_t *pee);\r
void dingas(bakapee_t *pee);\r
+void dingaso(bakapee_t *pee);\r
void dingu(bakapee_t *pee);\r
void dingq(bakapee_t *pee);\r
+void dingqo(bakapee_t *pee);\r
void ding(page_t *page, bakapee_t *pee, word q);\r
\r
#endif /*__BAKAPEE_H_*/\r