aboutsummaryrefslogtreecommitdiff
path: root/global.h
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-03 08:52:12 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-03 08:52:12 +0000
commita404f537e1f260040063b65461213800c896e15c (patch)
tree82ca588fb7694d20e34732000dd3f0beb2b12c9c /global.h
parenteaa6a19cd0537c0bb8d57d743f894f58c62d378a (diff)
downloadbullet-lab-remix-a404f537e1f260040063b65461213800c896e15c.tar.xz
New levels and laser rewrite. Bring back a level and remove all commented levels.
Diffstat (limited to 'global.h')
-rw-r--r--global.h51
1 files changed, 17 insertions, 34 deletions
diff --git a/global.h b/global.h
index 109c81a..393b3bd 100644
--- a/global.h
+++ b/global.h
@@ -73,9 +73,9 @@ bool DisableAllTower=false;
bool DisablePlayer=false;
bool LOWFPS=false,diffkey=false;
inline double GetDist(vector2d,vector2d);
-struct Bullet
+class Bullet
{
- //hgeSprite *bulletspr;//This shit will be deprecated.
+public:
vector2d bulletpos;
vector2d bulletdir;
double dist;
@@ -404,38 +404,6 @@ void ClearAll(bool cbullet=true)
memset(tower,0,sizeof(tower));
if (cbullet)All2pnt();
}
- /*if (cbullet)
- {
- none=true;
- for (int i=1;i<=bulcnt;++i)
- {
- if (LOWFPS)
- {
- if (bullet[i].bulletspr->GetColor()>>24>=0x08)
- {
- bullet[i].bulletspr->SetColor(bullet[i].bulletspr->GetColor()-0x8000000);
- none=false;
- }
- }
- else
- {
- if (bullet[i].bulletspr->GetColor()>>24>=0x01)
- {
- bullet[i].bulletspr->SetColor(bullet[i].bulletspr->GetColor()-0x1000000);
- none=false;
- }
- }
- }
- if (none)
- {
- bulcnt=0;
- memset(bullet,0,sizeof(bullet));
- }
- none=true;
- for (int i=1;i<=bulcnt;++i)if (bullet[i].bulletspr->GetColor()>>24>=0x3F){none=false;break;}
- if (none)
- bulcnt=0,memset(bullet,0,sizeof(bullet));
- }*/
}
void SaySomethingAndBye(char *text)
{
@@ -510,3 +478,18 @@ TextureRect GetTextureRect(int type,TColors color)
}
return TextureRect(0,0,0,0);
}
+DWORD ColorToDWORD(TColors a)
+{
+ switch(a)
+ {
+ case green:return 0xCCFF00;
+ case blue:return 0x33CCFF;
+ case yellow:return 0xFFFF00;
+ case purple:return 0x9966FF;
+ case red:return 0xFFFF3333;
+ case white:return 0xFFFEFEFE;
+ case dblue:return 0xFF0000FF;
+ case orange:return 0xFFFF8800;
+ default:return 0xFF000000;
+ }
+}