From f9be9921e9c345549f7d506262dfde19bcc72088 Mon Sep 17 00:00:00 2001 From: "chirs241097@gmail.com" Date: Fri, 14 Mar 2014 03:33:13 +0000 Subject: Draft another new level. --- CHANGELOG.TXT | 2 ++ levels.h | 48 +++++++++++++++++++++++++++++++++--- main.cpp | 2 ++ 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. diff --git a/levels.h b/levels.h index 14ef2f4..f54dd1f 100644 --- a/levels.h +++ b/levels.h @@ -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;iTimer_GetDelta(); if((AMinute*2-frameleft)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))); +} diff --git a/main.cpp b/main.cpp index 618c8e9..f2dfa4f 100644 --- a/main.cpp +++ b/main.cpp @@ -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;jbulletpos.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;iTimer_GetDelta()*1000*delta; + } +}; -- cgit v1.2.3