summaryrefslogtreecommitdiff
path: root/global.h
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-11 03:37:24 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-11 03:37:24 +0000
commit285f4f3379a68db34eec86cdc5c8d6f3c5597f5e (patch)
tree477fd32c99b6132abf1754edfe6201c9c4af1976 /global.h
parentdb6933143f3b9bb423faeaf823485672ec803000 (diff)
downloadbullet-lab-remix-285f4f3379a68db34eec86cdc5c8d6f3c5597f5e.tar.xz
Additive blending bullets, supernova level first draft.
Diffstat (limited to 'global.h')
-rw-r--r--global.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/global.h b/global.h
index 01a9d12..07e54d8 100644
--- a/global.h
+++ b/global.h
@@ -74,20 +74,17 @@ inline double GetDist(vector2d,vector2d);
class Bullet
{
public:
- vector2d bulletpos;
- vector2d bulletdir;
+ vector2d bulletpos,bulletdir;
double dist;
- int bullettype;
- int redexplo,redattrib,oriexplo,whicnt;
+ int bullettype,redexplo,redattrib,oriexplo,whicnt;
DWORD sccolor;
/*In Orange bullets
//redattrib also serves as oraattrib to determine if they will explode or change direction
//redexplo also serves as orange explo
//yelbrk serves as direction-change timer
//whicnt describes how much one will explode into (into an exactly circle)*/
- double bulletspeed;
- double bulletaccel,limv;
- bool exist,inv;
+ double bulletspeed,bulletaccel,limv;
+ bool exist,inv,addblend;
int whirem,whiskp,yelbrk;
int exp1,exp2;
double lifetime,rot;
@@ -190,7 +187,7 @@ struct Target//An annoying circle
void TargFollowPlayer()
{
double curspd=0.01f;
- if (GetDist(playerpos,targpos)>1)curspd=0.02f;
+ if (GetDist(playerpos,targpos)>1)curspd=0.02f;else targpos=playerpos;
if (GetDist(playerpos,targpos)>2)curspd=0.1f;
if (GetDist(playerpos,targpos)>5)curspd=0.5f;
if (GetDist(playerpos,targpos)>10)curspd=0.75f;
@@ -212,7 +209,7 @@ struct Target//An annoying circle
void TargGoto(vector2d pos)
{
double curspd=0.01f;
- if (GetDist(pos,targpos)>1)curspd=0.02f;
+ if (GetDist(pos,targpos)>1)curspd=0.02f;else targpos=pos;
if (GetDist(pos,targpos)>2)curspd=0.1f;
if (GetDist(pos,targpos)>5)curspd=0.5f;
if (GetDist(pos,targpos)>10)curspd=0.75f;