どうしても解決できないので聞きたいことがあります。
たくさんあるかもしれませんがよろしくお願いします。
ひとつは
http://dixq.net/s/17.html
for(j=0;j < ENEMY_TOTAL_NUM ;j++)//発射されていない弾を探す。 if(EnemyShot[j].flag==0)//あったらそこでiを保持してブレイク break;とはどういう意味ですか?
もうひとつは
#include "DxLib.h" #include "Extern.h" #include <math.h> #define PI 3.1415926535897932384626433832795 #define PI2 PI*2 void Enemy_shot_pat1(int i){ for(int j=0;j<98;j++){ if(e_shot.count==0){ e_shot.bullet[j].flag=1; e_shot.bullet[j].x=e_shot.ex; e_shot.bullet[j].y=e_shot.ey; e_shot.bullet[j].angle=atan2(e_shot.py-e_shot.bullet[j].y,e_shot.px-e_shot[i].bullet[j].x)+PI2/98*j; e_shot[i].bullet[j].spd=2.0f; e_shot[i].bullet[j].img=3; e_shot[i].bullet[j].col=2; e_shot[i].bullet[j].turn=0; PlaySoundMem( sound_effect[2] , DX_PLAYTYPE_BACK ) ; } } for(int j=0;j<200;j++){ e_shot[i].bullet[j].x+=e_shot[i].bullet[j].spd*cos(e_shot[i].bullet[j].angle); e_shot[i].bullet[j].y+=e_shot[i].bullet[j].spd*sin(e_shot[i].bullet[j].angle); } } void Enemy_shot_Control(){ int i; for(i=0;i<Enemy_max;i++){ if(e_shot[i].flag==1){ if(e_shot[i].pat==1) Enemy_shot_pat1(i); *すいませんここはなにもないです。 } } } void Enemy_shot_graph(){ for(int i=0;i<Enemy_max;i++){ if(e_shot[i].flag==1){ e_shot[i].count++; for(int j=0;j<Enemy_shot_max;j++){ if(e_shot[i].bullet[j].flag==1){ if(e_shot[i].bullet[j].turn==1) DrawRotaGraph( (int)e_shot[i].bullet[j].x , (int)e_shot[i].bullet[j].y , 1.0f , PI*((double)count*0.1) , enemy_shot_img[e_shot[i].bullet[j].img][e_shot[i].bullet[j].co[/url] , TRUE ) ; if(e_shot[i].bullet[j].turn==0){ e_shot[i].bullet[j].d_angle=e_shot[i].bullet[j].angle+PI/2; DrawRotaGraph( (int)e_shot[i].bullet[j].x , (int)e_shot[i].bullet[j].y , 1.0f , e_shot[i].bullet[j].d_angle ,enemy_shot_img[e_shot[i].bullet[j].img][e_shot[i].bullet[j].co[/url] , TRUE ) ; } if(e_shot[i].bullet[j].x<-35 || e_shot[i].bullet[j].x>450 || e_shot[i].bullet[j].y<-50 || e_shot[i].bullet[j].y>480) e_shot[i].bullet[j].flag=0; } } } } for(int i=0;i<Enemy_max;i++){ if(e_shot[i].flag==1){ for(int j=0;j<Enemy_shot_max;j++){ if(e_shot[i].bullet[j].flag==1){ return; } } e_shot[i].flag=0; } } }
で問題はないのでしょうか?
(EnemyShot[i].EnemyShots[j].はe_shot[i].bullet[j].にかわってます)
ほかにも変わっていますが。。。
かなりかえたのでこれでいいのか不安で・・・