diff options
author | chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> | 2014-03-17 13:53:11 +0000 |
---|---|---|
committer | chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> | 2014-03-17 13:53:11 +0000 |
commit | 63f8d56df059a3783f42889033549b524af829cf (patch) | |
tree | 6025ec9fe030dd4fc21983f841c0e08596f9692a | |
parent | fd7ea15571b43dcacc7a88cf720fb7e103f19042 (diff) | |
download | bullet-lab-remix-63f8d56df059a3783f42889033549b524af829cf.tar.xz |
Draft a new level.
-rwxr-xr-x | CHANGELOG.TXT | 4 | ||||
-rwxr-xr-x | VERSION.TXT | 2 | ||||
-rw-r--r-- | levels.h | 64 | ||||
-rw-r--r-- | main.cpp | 2 | ||||
-rw-r--r-- | towernbullet.h | 10 |
5 files changed, 79 insertions, 3 deletions
diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index bc2892b..b1a6a2c 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -5,6 +5,10 @@ New levels... Add missing tips. Pre-Released versions: +0.8.1-0_PR (b76) +New level "Sink" (temporary name). +Allow bullets to pause before being accelerated. + 0.8.0-1_PR (b75) New level Supernova. New level (still unnamed). diff --git a/VERSION.TXT b/VERSION.TXT index a5a2d64..f5a179d 100755 --- a/VERSION.TXT +++ b/VERSION.TXT @@ -1 +1 @@ -0.8.0-1_PR (b75)
\ No newline at end of file +0.8.1-0_PR (b76)
\ No newline at end of file @@ -3313,3 +3313,67 @@ void Levelm1Part16() for(int i=0;i<100;++i)if(fyg[i].isActive())fyg[i].Update(); fygs.Update(pi/7200*(0.5+frameleft/(double)(AMinute+ThirtySeconds))); } +Bullet* m17lead[4]; +void Levelm1Part17() +{ + frameleft=AMinute+ThirtySeconds;towcnt=0; + All2pnt();memset(m17lead,0,sizeof(m17lead)); + ++part; + m17lead[0]=&bullet[CreateBullet2(10,10,4,0)];m17lead[0]->redir(vector2d(790,10));m17lead[0]->alterColor=red; + m17lead[1]=&bullet[CreateBullet2(780,10,4,0)];m17lead[1]->redir(vector2d(780,580));m17lead[1]->alterColor=green; + m17lead[2]=&bullet[CreateBullet2(780,580,4,0)];m17lead[2]->redir(vector2d(10,580));m17lead[2]->alterColor=dblue; + m17lead[3]=&bullet[CreateBullet2(10,580,4,0)];m17lead[3]->redir(vector2d(10,10));m17lead[3]->alterColor=white; + for(int i=0;i<4;++i)m17lead[i]->inv=true;snexTarg.Init(0.001,vector2d(400,300)); + snexstep=0;snexTarg.TargShow();avabrk=5.0f;avacurbrk=0;tbrk=0; +} +void Levelm1Part18() +{ + snexTarg.TargRender();avacurbrk+=hge->Timer_GetDelta(); + tbrk+=hge->Timer_GetDelta(); + switch (snexstep) + { + case 0: + if(avacurbrk>avabrk)snexstep=1,snextarg=playerpos; + break; + case 1: + snexTarg.TargGoto(snextarg); + if(GetDist(snexTarg.targpos,snextarg)<0.01) + { + snexstep=0; + avabrk=(frameleft/(double)(AMinute*2))*3+2; + avacurbrk=0; + } + break; + } + if(m17lead[0]->bulletpos.x>780.01f)m17lead[0]->bulletpos=vector2d(780,10),m17lead[0]->redir(vector2d(780,580)); + if(m17lead[0]->bulletpos.y>580.01f)m17lead[0]->bulletpos=vector2d(780,580),m17lead[0]->redir(vector2d(10,580)); + if(m17lead[0]->bulletpos.x<9.99f)m17lead[0]->bulletpos=vector2d(10,580),m17lead[0]->redir(vector2d(10,10)); + if(m17lead[0]->bulletpos.y<9.99f)m17lead[0]->bulletpos=vector2d(10,10),m17lead[0]->redir(vector2d(780,10)); + + if(m17lead[1]->bulletpos.x>780.01)m17lead[1]->bulletpos=vector2d(780,10),m17lead[1]->redir(vector2d(780,580)); + if(m17lead[1]->bulletpos.y>580.01f)m17lead[1]->bulletpos=vector2d(780,580),m17lead[1]->redir(vector2d(10,580)); + if(m17lead[1]->bulletpos.x<9.99f)m17lead[1]->bulletpos=vector2d(10,580),m17lead[1]->redir(vector2d(10,10)); + if(m17lead[1]->bulletpos.y<9.99f)m17lead[1]->bulletpos=vector2d(10,10),m17lead[1]->redir(vector2d(780,10)); + + if(m17lead[2]->bulletpos.x>780.01f)m17lead[2]->bulletpos=vector2d(780,10),m17lead[2]->redir(vector2d(780,580)); + if(m17lead[2]->bulletpos.y>580.01f)m17lead[2]->bulletpos=vector2d(780,580),m17lead[2]->redir(vector2d(10,580)); + if(m17lead[2]->bulletpos.x<9.99f)m17lead[2]->bulletpos=vector2d(10,580),m17lead[2]->redir(vector2d(10,10)); + if(m17lead[2]->bulletpos.y<9.99f)m17lead[2]->bulletpos=vector2d(10,10),m17lead[2]->redir(vector2d(780,10)); + + if(m17lead[3]->bulletpos.x>780.01f)m17lead[3]->bulletpos=vector2d(780,10),m17lead[3]->redir(vector2d(780,580)); + if(m17lead[3]->bulletpos.y>580.01f)m17lead[3]->bulletpos=vector2d(780,580),m17lead[3]->redir(vector2d(10,580)); + if(m17lead[3]->bulletpos.x<9.99f)m17lead[3]->bulletpos=vector2d(10,580),m17lead[3]->redir(vector2d(10,10)); + if(m17lead[3]->bulletpos.y<9.99f)m17lead[3]->bulletpos=vector2d(10,10),m17lead[3]->redir(vector2d(780,10)); + if(tbrk>0.02+(frameleft/(double)(AMinute+ThirtySeconds))*0.08) + { + for(int i=0;i<4;++i) + { + int pnt=CreateBullet2(m17lead[i]->bulletpos.x,m17lead[i]->bulletpos.y,0,0,true); + bullet[pnt].redir(snexTarg.targpos); + bullet[pnt].bulletaccel=0.002;bullet[pnt].limv=3; + bullet[pnt].whirem=500+(frameleft/(double)(AMinute+ThirtySeconds))*750; + bullet[pnt].alterColor=i==0?red:i==1?green:i==2?dblue:white; + } + tbrk=0; + } +} @@ -512,6 +512,8 @@ void CallLevels() if (level==-1&&part==14)Levelm1Part14(); if (level==-1&&part==15)Levelm1Part15(); if (level==-1&&part==16)Levelm1Part16(); + if (level==-1&&part==17)Levelm1Part17(); + if (level==-1&&part==18)Levelm1Part18(); 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 5bf3226..f5fd77a 100644 --- a/towernbullet.h +++ b/towernbullet.h @@ -77,6 +77,7 @@ int CreateBullet2(double x,double y,double bs,double rad,bool eff=false,bool inv bullet[i].alterColor=blue; bullet[i].alterColor2=COLOR_COUNT; bullet[i].lifetime=0; + bullet[i].whirem=0; bullet[i].scollable=true; bullet[i].collable=true; bullet[i].bulletaccel=bullet[i].limv=0; @@ -347,8 +348,13 @@ void ProcessBullet2(int i) if (!DisablePlayer) { //experimental new coor processing code, FPS independent - if (bullet[i].bulletaccel>0&&bullet[i].bulletspeed<bullet[i].limv)bullet[i].bulletspeed+=bullet[i].bulletaccel*(1000.0f/hge->Timer_GetFPS()); - if (bullet[i].bulletaccel<0&&bullet[i].bulletspeed>bullet[i].limv)bullet[i].bulletspeed+=bullet[i].bulletaccel*(1000.0f/hge->Timer_GetFPS()); + if (bullet[i].whirem<=0) + { + if (bullet[i].bulletaccel>0&&bullet[i].bulletspeed<bullet[i].limv)bullet[i].bulletspeed+=bullet[i].bulletaccel*(1000.0f/hge->Timer_GetFPS()); + if (bullet[i].bulletaccel<0&&bullet[i].bulletspeed>bullet[i].limv)bullet[i].bulletspeed+=bullet[i].bulletaccel*(1000.0f/hge->Timer_GetFPS()); + } + else + bullet[i].whirem-=1000.0f/hge->Timer_GetFPS(); bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x)/20*(1000.0f/hge->Timer_GetFPS()); bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y)/20*(1000.0f/hge->Timer_GetFPS()); } |