diff options
-rwxr-xr-x | CHANGELOG.TXT | 2 | ||||
-rw-r--r-- | levels.h | 48 | ||||
-rw-r--r-- | main.cpp | 2 | ||||
-rw-r--r-- | towernbullet.h | 77 |
4 files changed, 124 insertions, 5 deletions
diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 0b3151f..3909f0c 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -7,6 +7,8 @@ Add missing tips. Pre-Released versions: 0.8.0-1_PR (b75) New level Supernova. +New level (still unnamed). +Add some additional tips. Extend libcgh again. Adding operator ^ and method l(). Modify clearrange behaviour in level hyper-threading. Modify the corresponding score bullet. @@ -3197,6 +3197,16 @@ void Levelm1Part13()//"Supernova" ++bgbrk;if (LOWFPS)bgbrk+=16; if (bgbrk<30)return; bgbrk=0;towcnt=0; + DisableAllTower=false; + if (IfShowTip) + { + IfShowTip=false; + FadeTip=false; + Current_Position=2; + ShowTip("Super...\n\ +...nova!!"); + return; + } if (!LOWFPS) DBGColor=ColorTransfer(DBGColor,0xFF000000); else @@ -3204,6 +3214,7 @@ void Levelm1Part13()//"Supernova" if (DBGColor==0xFF000000) { snexTarg.Init(0.001,vector2d(400,300)); + All2pnt(); ++part;avabrk=12.0f;avacurbrk=0;tbrk=0; snexstep=0;snexcnt=10;snexTarg.TargShow(); } @@ -3213,13 +3224,15 @@ void snCircCreator(vector2d p,int cnt,TColors col,bool mode) if(mode) for (int i=0;i<cnt;++i) { - int pnt=CreateBullet2(p.x,p.y,6,acos((vector2d(400,300)-playerpos)^vector2d(1,0))+(i-0.5f)*(2*pi/cnt)); + int pnt=CreateBullet2(p.x,p.y,6,acos((playerpos-vector2d(400,300))^vector2d(1,0))+(i-0.5f)*(2*pi/cnt)); + bullet[pnt].redir(playerpos);bullet[pnt].bulletdir.Rotate((i+0.5f)*(2*pi/cnt)); bullet[pnt].alterColor=col;bullet[pnt].addblend=true; } else for (int i=0;i<cnt;++i) { - int pnt=CreateBullet2(p.x,p.y,2,acos((vector2d(400,300)-playerpos)^vector2d(1,0))+i*(2*pi/cnt)); + int pnt=CreateBullet2(p.x,p.y,2,acos((playerpos-vector2d(400,300))^vector2d(1,0))+i*(2*pi/cnt)); + bullet[pnt].redir(playerpos);bullet[pnt].bulletdir.Rotate(i*(2*pi/cnt)); bullet[pnt].alterColor=col;bullet[pnt].addblend=true; } } @@ -3230,10 +3243,10 @@ void Levelm1Part14() tbrk+=hge->Timer_GetDelta(); if((AMinute*2-frameleft)<TenSeconds) { - if(tbrk>0.016) + if(tbrk>0.016&&(AMinute*2-frameleft)>TenSeconds/5) { tbrk=0; - snCircCreator(vector2d(400,300),60,(TColors)re.NextInt(0,7),true); + snCircCreator(vector2d(400,300),144,(TColors)re.NextInt(0,7),true); } } else @@ -3273,3 +3286,30 @@ void Levelm1Part14() break; } } +yellowGroup fyg[100]; +Spinner fygs; +void Levelm1Part15()//? +{ + frameleft=AMinute+ThirtySeconds; + All2pnt();towcnt=0;memset(fyg,0,sizeof(fyg)); + ++part;avabrk=1;avacurbrk=0.5;fygs.Init(3,20); +} +void Levelm1Part16() +{ + avacurbrk+=hge->Timer_GetDelta(); + if(avacurbrk>avabrk) + { + avacurbrk=0; + for(int i=0;i<100;++i) + if(!fyg[i].isActive()) + { + if(frameleft>AMinute) + fyg[i].Init(12,2.25-1.25*(frameleft/(double)(AMinute+ThirtySeconds))); + else + fyg[i].Init(18,2.25-1.25*(frameleft/(double)(AMinute+ThirtySeconds))); + break; + } + } + for(int i=0;i<100;++i)if(fyg[i].isActive())fyg[i].Update(); + fygs.Update(pi/7200*(0.5+frameleft/(double)(AMinute+ThirtySeconds))); +} @@ -510,6 +510,8 @@ void CallLevels() if (level==-1&&part==12)Levelm1Part12(); if (level==-1&&part==13)Levelm1Part13(); if (level==-1&&part==14)Levelm1Part14(); + if (level==-1&&part==15)Levelm1Part15(); + if (level==-1&&part==16)Levelm1Part16(); if (level==1&&part==5)level=2,part=0; if (level==2&&part==10)level=3,part=0; if (level==3&&part==7)level=4,part=0; diff --git a/towernbullet.h b/towernbullet.h index 51f6d93..7331f9d 100644 --- a/towernbullet.h +++ b/towernbullet.h @@ -112,7 +112,7 @@ void CreateBullet4(double x,double y,double bs,int yelbrk=0,bool eff=false) bullet[i].bulletspeed=bs; bullet[i].yelbrk=yelbrk; bullet[i].scollable=true; - bullet[i].scale=1; + bullet[i].scale=1;bullet[i].lifetime=0; bullet[i].alterColor=yellow;bullet[i].alterColor2=COLOR_COUNT; if (eff)BulletEffect_Attatch(i); } @@ -439,6 +439,7 @@ void ProcessBullet2(int i) void ProcessBullet4(int i) { if (!bullet[i].exist||bullet[i].bullettype!=4)return; + if (Current_Position==1)bullet[i].lifetime+=hge->Timer_GetDelta(); if (!DisablePlayer) { if (LOWFPS) @@ -2587,3 +2588,77 @@ public: for(int i=0;i<500;++i)if(bullets[i].isActive())bullets[i].achromaUpdate(); } }; +class yellowGroup +{ +private: + Bullet *ylw[100]; + bool dirdone[100]; + bool active; +public: + bool isActive(){return active;} + void Init(int _cnt,double _yv) + { + memset(ylw,0,sizeof(ylw));active=true; + memset(dirdone,0,sizeof(dirdone)); + for (int i=0;i<_cnt;++i) + { + int pnt=CreateBullet2(400,300,_yv,frameleft*pi/AMinute+i*(2*pi/_cnt)); + bullet[pnt].alterColor=yellow; + ylw[i]=&bullet[pnt]; + } + } + void Update() + { + bool done=true; + for (int i=0;i<100;++i) + { + if(ylw[i]&&ylw[i]->lifetime>2&&!dirdone[i]) + ylw[i]->redir(playerpos),dirdone[i]=true; + if(ylw[i]&&ylw[i]->lifetime>5) + { + int cc=re.NextInt(0,5); + for(int j=0;j<cc;++j) + { + int pnt=CreateBullet2(ylw[i]->bulletpos.x,ylw[i]->bulletpos.y,0,re.NextDouble(-pi,pi)); + if(!re.NextInt(0,3))bullet[pnt].redir(playerpos); + bullet[pnt].bulletaccel=0.002;bullet[pnt].limv=3; + } + BulletEffect_Death(*ylw[i],ColorToDWORD(yellow)); + ylw[i]->exist=false; + ylw[i]->bullettype=0; + ylw[i]=0; + } + else done=false; + } + if(done)active=false; + } +}; +class Spinner +{ +private: + SimpleBullet abullet[40][100]; + int arms; + double rad,rstep; +public: + void Init(int _arms,double _rstep) + { + memset(abullet,0,sizeof(abullet)); + arms=_arms;rstep=_rstep;rad=0; + for(int i=0;i<arms;++i) + for(int j=0;j*rstep<505;++j) + { + abullet[i][j].aC=blue;abullet[i][j].aC2=COLOR_COUNT; + } + } + void Update(double delta) + { + for(int i=0;i<arms;++i) + for(int j=0;j*rstep<505;++j) + { + double crad=rad+i*(2*pi/arms); + abullet[i][j].bulletpos=vector2d(400+j*rstep*cos(crad),300+j*rstep*sin(crad)); + abullet[i][j].Update_SimpBul(); + } + rad+=hge->Timer_GetDelta()*1000*delta; + } +}; |