# include "tanke.h"
/////////////////////////////////////////////////////主函数程序
void ZhengTiLaoWang(pTanKe ptanke,int (*x_8)[2][3],int (*x_9)[2][3],int (*x_10)[2][3],int (*x_11)[2][3],
bool *exist_laowang,bool *exist1, int*gold, int*d,int*tilelaowang_x,int*tilelaowang_y,
int *tileHong_x1,int *tileHong_y1,int *tileBai_x4,int *tileBai_y4,bool*live9)
{
if(*exist_laowang) LaoWang(&(*tilelaowang_x), &(*tilelaowang_y));//老王
if(*exist_laowang) *exist_laowang = DBoomBig(ptanke[0].d, &(*tilelaowang_x), &(*tilelaowang_y), &(*d));//老王被打爆
if(*exist_laowang) *exist_laowang = DBoomBig(ptanke[1].d, &(*tilelaowang_x), &(*tilelaowang_y), &(*d));//老王被打爆
if(*exist_laowang) *exist_laowang = DBoomBig(ptanke[2].d, &(*tilelaowang_x), &(*tilelaowang_y), &(*d));//老王被打爆
if(*exist_laowang) *exist_laowang = DBoomBig(ptanke[3].d, &(*tilelaowang_x), &(*tilelaowang_y), &(*d));//老王被打爆
if(*exist_laowang) *exist_laowang = DBoomBig(ptanke[4].d, &(*tilelaowang_x), &(*tilelaowang_y), &(*d));//老王被打爆
if(*exist_laowang) *exist_laowang = DBoomBig(ptanke[5].d, &(*tilelaowang_x), &(*tilelaowang_y), &(*d));//老王被打爆
if(*exist_laowang) *exist_laowang = DBoomBig(ptanke[6].d, &(*tilelaowang_x), &(*tilelaowang_y), &(*d));//老王被打爆
if(*exist_laowang) *exist_laowang = DBoomBig(x_8, &(*tilelaowang_x), &(*tilelaowang_y), &(*d));//老王被打爆
if(*exist1) tileHong(&(*tileHong_x1), &(*tileHong_y1));//红色障碍物
if(*exist1) *exist1 = DBoomBig(ptanke[0].d, &(*tileHong_x1), &(*tileHong_y1), &(*d));//红色障碍物被打爆
if(*exist1) *exist1 = DBoomBig(ptanke[1].d, &(*tileHong_x1), &(*tileHong_y1), &(*d));//红色障碍物被打爆
if(*exist1) *exist1 = DBoomBig(ptanke[2].d, &(*tileHong_x1), &(*tileHong_y1), &(*d));//红色障碍物被打爆
if(*exist1) *exist1 = DBoomBig(ptanke[3].d, &(*tileHong_x1), &(*tileHong_y1), &(*d));//红色障碍物被打爆
if(*exist1) *exist1 = DBoomBig(ptanke[4].d, &(*tileHong_x1), &(*tileHong_y1), &(*d));//红色障碍物被打爆
if(*exist1) *exist1 = DBoomBig(ptanke[5].d, &(*tileHong_x1), &(*tileHong_y1), &(*d));//红色障碍物被打爆
if(*exist1) *exist1 = DBoomBig(ptanke[6].d, &(*tileHong_x1), &(*tileHong_y1), &(*d));//红色障碍物被打爆
if(*exist1) *exist1 = DBoomBig(x_8, &(*tileHong_x1), &(*tileHong_y1), &(*d));//红色障碍物被打爆
if(*gold >100 && !(*live9))
{
*tileBai_x4 = 304;
*tileBai_y4 = 416;
tileBai(&*tileBai_x4, &*tileBai_y4);//!!
}
if (!*live9)QZBoom(ptanke[0].d, &(*tileBai_x4), &(*tileBai_y4));//白色障碍物被打
if (!*live9)QZBoom(ptanke[1].d, &(*tileBai_x4), &(*tileBai_y4));//白色障碍物被打
if (!*live9)QZBoom(ptanke[2].d, &(*tileBai_x4), &(*tileBai_y4));//白色障碍物被打
if (!*live9)QZBoom(ptanke[3].d, &(*tileBai_x4), &(*tileBai_y4));//白色障碍物被打
if (!*live9)QZBoom(ptanke[4].d, &(*tileBai_x4), &(*tileBai_y4));//白色障碍物被打
if (!*live9)QZBoom(ptanke[5].d, &(*tileBai_x4), &(*tileBai_y4));//白色障碍物被打
if (!*live9)QZBoom(ptanke[6].d, &(*tileBai_x4), &(*tileBai_y4));//白色障碍物被打
if (!*live9)QZBoom(x_8, &(*tileBai_x4), &(*tileBai_y4));//白色障碍物被打
if (!*live9)QZBoom(x_9, &(*tileBai_x4), &(*tileBai_y4));//白色障碍物被打
if (!*live9)QZBoom(x_10, &(*tileBai_x4), &(*tileBai_y4));//白色障碍物被打
if (!*live9)QZBoom(x_11, &(*tileBai_x4), &(*tileBai_y4));//白色障碍物被打
return;
}
void ZhengTiFangXiang(pTanKe ptanke, pBaiZhuan pbaizhuan, pHongZhuan phongzhuan,int (*x_8)[2][3],
bool *live8,bool *live9,
int*r,int*x8,int*y8,int*x9,int*y9,
int *z8,
int *o,int *ydsd)
{
(*r)++;
if(ptanke[0].live) JFangXiang(ptanke[0].d, &ptanke[0].x,&ptanke[0].y, &ptanke[0].z,pbaizhuan,phongzhuan,&*ydsd);
if(ptanke[1].live) DFangXiang(ptanke[1].d, &ptanke[1].x,&ptanke[1].y, &ptanke[1].z,&*r);
if(ptanke[2].live) DFangXiang(ptanke[2].d, &ptanke[2].x,&ptanke[2].y, &ptanke[2].z,&*r);
if(ptanke[3].live) DFangXiang(ptanke[3].d, &ptanke[3].x,&ptanke[3].y, &ptanke[3].z,&*r);
if(ptanke[4].live) DFangXiang(ptanke[4].d, &ptanke[4].x,&ptanke[4].y, &ptanke[4].z,&*r);
if(ptanke[5].live) DFangXiang(ptanke[5].d, &ptanke[5].x,&ptanke[5].y, &ptanke[5].z,&*r);
if(ptanke[6].live) DFangXiang(ptanke[6].d, &ptanke[6].x,&ptanke[6].y, &ptanke[6].z,&*r);
if(*live8) BossFangXiang(x_8, &*x8, &*y8, &*z8, &*r,&*o);
if(*live9) FeiJiFangXiang(&*x9, &*y9, &*r,&*o);
return;
}
void ZhengTiHongSeZhangAiWu(pTanKe ptanke,int (*x_8)[2][3],int (*x_9)[2][3],
int*d,pHongZhuan phongzhuan)
{
if(phongzhuan[0].exist) tileHong(&phongzhuan[0].x, &phongzhuan[0].y);//红色障碍物
if(phongzhuan[0].exist) phongzhuan[0].exist = DBoomBig(ptanke[0].d, &phongzhuan[0].x, &phongzhuan[0].y, &*d);//红色障碍物被打爆
if(phongzhuan[0].exist) phongzhuan[0].exist = DBoomBig(ptanke[1].d, &phongzhuan[0].x, &phongzhuan[0].y, &*d);//红色障碍物被打爆
if(phongzhuan[0].exist) phongzhuan[0].exist = DBoomBig(ptanke[2].d, &phongzhuan[0].x, &phongzhuan[0].y, &*d);//红色障碍物被打爆
if(phongzhuan[0].exist) phongzhuan[0].exist = DBoomBig(ptanke[3].d, &phongzhuan[0].x, &phongzhuan[0].y, &*d);//红色障碍物被打爆
if(phongzhuan[0].exist) phongzhuan[0].exist = DBoomBig(ptanke[4].d, &phongzhuan[0].x, &phongzhuan[0].y, &*d);//红色障碍物被打爆
if(phongzhuan[0].exist) phongzhuan[0].exist = DBoomBig(ptanke[5].d, &phongzhuan[0].x, &phongzhuan[0].y, &*d);//红色障碍物被打爆
if(phongzhuan[0].exist) phongzhuan[0].exist = DBoomBig(ptanke[6].d, &phongzhuan[0].x, &phongzhuan[0].y, &*d);//红色障碍物被打爆
if(phongzhuan[0].exist) phongzhuan[0].exist = DBoomBig(x_8, &phongzhuan[0].x, &phongzhuan[0].y, &*d);//红色障碍物被打爆
if(phongzhuan[0].exist) phongzhuan[0].exist = DBoomBig(x_9, &phongzhuan[0].x, &phongzhuan[0].y, &*d);//红色障碍物被打爆
if(phongzhuan[1].exist) tileHong(&phongzhuan[1].x, &phongzhuan[1].y);//红色障碍物
if(phongzhuan[1].exist) phongzhuan[1].exist = DBoomBig(ptanke[0].d, &phongzhuan[1].x, &phongzhuan[1].y, &*d);//红色障碍物被打爆
if(phongzhuan[1].exist) phongzhuan[1].exist = DBoomBig(ptanke[1].d, &phongzhuan[1].x, &phongzhuan[1].y, &*d);//红色障碍物被打爆
if(phongzhuan[1].exist) phongzhuan[1].exist = DBoomBig(ptanke[2].d, &phongzhuan[1].x, &phongzhuan[1].y, &*d);//红色障碍物被打爆
if(phongzhuan[1].exist) phongzhuan[1].exist = DBoomBig(ptanke[3].d, &phongzhuan[1].x, &phongzhuan[1].y, &*d);//红色障碍物被打爆
if(phongzhuan[1].exist) phongzhuan[1].exist = DBoomBig(ptanke[4].d, &phongzhuan[1].x, &phongzhuan[1].y, &*d);//红色障碍物被打爆
if(phongzhuan[1].exist) phongzhuan[1].exist = DBoomBig(ptanke[5].d, &phongzhuan[1].x, &phongzhuan[1].y, &*d);//红色障碍物被打爆
if(phongzhuan[1].exist) phongzhuan[1].exist = DBoomBig(ptanke[6].d, &phongzhuan[1].x, &phongzhuan[1].y, &*d);//红色障碍物被打爆
if(phongzhuan[1].exist) phongzhuan[1].exist = DBoomBig(x_8, &phongzhuan[1].x, &phongzhuan[1].y, &*d);//红色障碍物被打爆
if(phongzhuan[1].exist) phongzhuan[1].exist = DBoomBig(x_9, &phongzhuan[1].x, &phongzhuan[1].y, &*d);//红色障碍物被打爆
if(!(phongzhuan[0].exist)) {phongzhuan[0].x = -500;phongzhuan[0].y = -500;}
if(!(phongzhuan[1].exist)) {phongzhuan[1].x = -500;phongzhuan[1].y = -500;}
return;
}
void ZhengTiBaiSeZhangAiWu(pTanKe ptanke,int (*x_8)[2][3],int (*x_9)[2][3],int (*x_10)[2][3],int (*x_11)[2][3],
bool *wexist1,
int*d,pBaiZhuan pbaizhuan)
{
if(*wexist1 || pbaizhuan[0].exist) tileBai(&pbaizhuan[0].x, &pbaizhuan[0].y);//白色砖块;
if(*wexist1 || pbaizhuan[1].exist) tileBai(&pbaizhuan[1].x, &pbaizhuan[1].y);//白色砖块;
if(*wexist1 || pbaizhuan[2].exist) tileBai(&pbaizhuan[2].x, &pbaizhuan[2].y);//白色砖块;
if(pbaizhuan[0].exist) pbaizhuan[0].exist = DBoomBig(ptanke[0].d, &pbaizhuan[0].x, &pbaizhuan[0].y, &*d);//白色障碍物被打
DBoomBig(ptanke[1].d, &pbaizhuan[0].x, &pbaizhuan[0].y, &*d);
DBoomBig(ptanke[2].d, &pbaizhuan[0].x, &pbaizhuan[0].y, &*d);
DBoomBig(ptanke[3].d, &pbaizhuan[0].x, &pbaizhuan[0].y, &*d);
DBoomBig(ptanke[4].d, &pbaizhuan[0].x, &pbaizhuan[0].y, &*d);
DBoomBig(ptanke[5].d, &pbaizhuan[0].x, &pb