弾幕を作ってみました。
最初の3つは魔法陣の動きに合わせて(count依存)弾をうちます。
難易度は普通・やさしい・難しいの順になっています。
4つめはボスの左右からレーザー型の弾をうちます。
//弾発射関数
void boss_bullet_on(int way,int knd,int col,double x,double y,double b_angle,double d_angle,double spd,int state,int till,int eff=0,int sflag=1){
int i=0,k;
for(i=0;i<way;i++){
if((k=search_boss_shot())!=-1){
boss_shot.bullet[k].knd = knd;//弾の種類
if(knd==7) boss_shot.bullet[k].kaiten=1;
else boss_shot.bullet[k].kaiten=0;
boss_shot.bullet[k].col = col;//弾の色
boss_shot.bullet[k].flag = 1;
boss_shot.bullet[k].cnt = 0;
boss_shot.bullet[k].x = x;//座標
boss_shot.bullet[k].y = y;
boss_shot.bullet[k].angle = b_angle+d_angle*(i - way/2);//角度:bが基準、dが間隔
boss_shot.bullet[k].spd = spd;//スピード
boss_shot.bullet[k].state = state;//弾の状態
boss_shot.bullet[k].till = till;//弾が画面外に出ても消えない時間
boss_shot.bullet[k].eff = eff;
if(sflag==1)se_flag[0]=1;
}
}
}
void boss_shot_bulletT073(){
int cnt=count;
int t1=boss_shot.cnt,t2=boss_shot.cnt%150;
int i;
int col1[5]={0,4,3,1,5};
int col2[5]={1,2,3,0,6};
double ang1,ang2,ang3;
double length=70*((0.4+0.05*sin(PI2/360*(cnt%360)))*3);
if(t1==0) boss.hp_max=30000,boss.hp=boss.hp_max;
i=t2/30;
ang1=t1*PI2/1200-PI/2;
ang2=-PI/10+PI2/5*i+PI2*(cnt%580)/580;
ang3=atan2(ch.y-(boss.y+length*sin(ang2)),ch.x-(boss.x+length*cos(ang2)))+PI+t2*PI2/30;
boss.x=FMX/2+120*cos(ang1);
boss.y=FMY/2+120*sin(ang1);
boss_bullet_on(1,1,col1,boss.x+length*cos(ang2),boss.y+length*sin(ang2),ang3,0,2,0,0,0,0);
if(t1%60==0){
for(i=0;i<5;i++){
ang2=-PI/10+PI2/5*i+PI2*(cnt%580)/580;
ang3=atan2(ch.y-(boss.y+length*sin(ang2)),ch.x-(boss.x+length*cos(ang2)));
boss_bullet_on(1,7,col2,boss.x+length*cos(ang2),boss.y+length*sin(ang2),ang3,0,3,0,0);
}
}
}
void boss_shot_bulletT074(){
int cnt=count;
int t1=boss_shot.cnt,t2=boss_shot.cnt%150;
int i;
int col1[5]={0,4,3,1,5};
int col2[5]={1,2,3,0,6};
double ang1,ang2,ang3;
double length=70*((0.4+0.05*sin(PI2/360*(cnt%360)))*3);
if(t1==0) boss.hp_max=25000,boss.hp=boss.hp_max;
i=t2/30;
ang1=t1*PI2/1200-PI/2;
ang2=-PI/10+PI2/5*i+PI2*(cnt%580)/580;
ang3=atan2(ch.y-(boss.y+length*sin(ang2)),ch.x-(boss.x+length*cos(ang2)))+PI+t2*PI2/30;
boss.x=FMX/2+120*cos(ang1);
boss.y=FMY/2+120*sin(ang1);
if(t2%3==0) boss_bullet_on(1,1,col1,boss.x+length*cos(ang2),boss.y+length*sin(ang2),ang3,0,2,0,0,0,0);
}
void boss_shot_bulletT075(){
int cnt=count;
int t1=boss_shot.cnt,t2=boss_shot.cnt%150;
int i,j;
int col1[5]={0,4,3,1,5};
int col2[5]={1,2,3,0,6};
double ang1,ang2,ang3;
double length=70*((0.4+0.05*sin(PI2/360*(cnt%360)))*3);
if(t1==0) boss.hp_max=30000,boss.hp=boss.hp_max;
i=t2/30;
ang1=t1*PI2/900-PI/2;
ang2=-PI/10+PI2/5*i+PI2*(cnt%580)/580;
ang3=atan2(ch.y-(boss.y+length*sin(ang2)),ch.x-(boss.x+length*cos(ang2)))+PI+t2*PI2/30;
boss.x=FMX/2+120*cos(ang1);
boss.y=FMY/2+120*sin(ang1);
if(t1%2==1){
boss_bullet_on(1,1,col1,boss.x+length*cos(ang2),boss.y+length*sin(ang2),ang3,0,2,0,0,0,0);
boss_bullet_on(1,1,col1,boss.x+length*cos(ang2),boss.y+length*sin(ang2),ang3,0,2.5,0,0,0,0);
boss_bullet_on(1,1,col1,boss.x+length*cos(ang2),boss.y+length*sin(ang2),ang3,0,3,0,0,0,0);
}
if(t1%30==0){
for(j=0;j<9;j++){
boss_bullet_on(1,7,col2,boss.x+length*cos(ang2),boss.y+length*sin(ang2),ang3+PI*(7.0+rang(1.0))/6,0,2.5+rang(1),0,0);
}
}
}
void boss_shot_bulletT076(){
int t=boss_shot.cnt;
if(t%6==0){
boss_bullet_on(5,2,6,boss.x-150,boss.y,t,PI2/5,5,0,0,1);
boss_bullet_on(5,2,0,boss.x+150,boss.y,PI-t,PI2/5,5,0,0,1);
}
}