summaryrefslogtreecommitdiff
path: root/towernbullet.h
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-04-23 11:21:28 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-04-23 11:21:28 +0000
commitf71472046334287457a34a6ff19bf53d3aaf557a (patch)
treeeeb7db6c4220bf4f05f2b730fc892cb0c2ec54ee /towernbullet.h
parentf1f7b9177e2b2b693b9aa805c6aa6bf9bab5ab17 (diff)
downloadbullet-lab-remix-f71472046334287457a34a6ff19bf53d3aaf557a.tar.xz
Disable screenshot when you're entering your honourable name. It's
not tested so we could only hope that will work... Add crappy sounds to (part of) the menus. Replace a level in assessment mode. The original one was meanless.. The menu sounds are too crappy... remove them temporarily. However, let's complete the code base so that we won't waste time writing it...
Diffstat (limited to 'towernbullet.h')
-rw-r--r--towernbullet.h68
1 files changed, 67 insertions, 1 deletions
diff --git a/towernbullet.h b/towernbullet.h
index 4b8a4f4..3b0ef9c 100644
--- a/towernbullet.h
+++ b/towernbullet.h
@@ -2855,7 +2855,7 @@ public:
{
vector2d dir=a-b;dir.ToUnitCircle();dir=dis*dir;
vector2d x=b;
- while(x.x<=-25||x.x>=825||x.y<=-25||x.y>=625)
+ while(!(x.x<=-25||x.x>=825||x.y<=-25||x.y>=625))
{
CreateBullet255(x.x,x.y,10);
x=x+dir;
@@ -2870,3 +2870,69 @@ public:
int stp;
double brk;
};
+class SELineLaser
+{
+private:
+ LineLaser lsr;
+ bool active,h;
+ double brk,x;
+public:
+ bool isActive(){return active;}
+ void Init(int _x,bool _h)
+ {
+ x=_x;h=_h;
+ if(h)
+ lsr.InitLine(vector2d(0,x),vector2d(800,x),0,SETA(ColorToDWORD(blue),0x80));
+ else
+ lsr.InitLine(vector2d(x,0),vector2d(x,600),0,SETA(ColorToDWORD(blue),0x80));
+ active=true;brk=0.05;
+ }
+ void Update()
+ {
+ lsr.Process();
+ brk-=hge->Timer_GetDelta();
+ if(brk<0)
+ {
+ brk=0.05;
+ lsr.SetWidth(lsr.GetWidth()+0.2);
+ if(lsr.GetWidth()>1)lsr.SetColl(true);
+ if(lsr.GetWidth()>6)
+ {
+ int t=0;
+ if(!re.NextInt(0,2))
+ {
+ if(h?playerpos.y>x:playerpos.x>x)t=1;
+ vector2d px;
+ vector2d dir=h?vector2d(-1,0):vector2d(0,-1);dir=18*dir;
+ for(int c=0,tt=t;c<2;++c,dir=-1*dir,tt=t^1)
+ {
+ px=h?vector2d(playerpos.x,x):vector2d(x,playerpos.y);
+ if(c)px=px+dir;
+ while(!(px.x<=-25||px.x>=825||px.y<=-25||px.y>=625))
+ {
+ tt^=1;
+ int pnt=CreateBullet2(px.x,px.y,0,0);
+ bullet[pnt].bulletdir=(tt?1:-1)*(h?vector2d(0,1):vector2d(1,0));
+ bullet[pnt].limv=3;bullet[pnt].bulletaccel=0.001;
+ px=px+dir;
+ }
+ }
+ }
+ else
+ {
+ vector2d dir=h?vector2d(-1,0):vector2d(0,-1);dir=18*dir;
+ vector2d px=h?vector2d(800+re.NextInt(-18,0),x):vector2d(x,600+re.NextInt(-18,0));
+ while(!(px.x<=-25||px.x>=825||px.y<=-25||px.y>=625))
+ {
+ t^=1;
+ int pnt=CreateBullet2(px.x,px.y,0,0);
+ bullet[pnt].bulletdir=(t?1:-1)*(h?vector2d(0,1):vector2d(1,0));
+ bullet[pnt].limv=3;bullet[pnt].bulletaccel=0.001;
+ px=px+dir;
+ }
+ }
+ active=false;
+ }
+ }
+ }
+};