summaryrefslogtreecommitdiff
path: root/scoresystem.h
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-07-14 02:16:11 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-07-14 02:16:11 +0000
commit4b221a977fcff61db744b422920d203e2773e787 (patch)
tree99933b8fe6ceca0460803349b9249789bdca4f46 /scoresystem.h
parent32a2523dd5c51b31b31f5e43a7cebdb16e7f5e84 (diff)
downloadbullet-lab-remix-4b221a977fcff61db744b422920d203e2773e787.tar.xz
Rev. 99! WTF?
THIS IS THE FINAL RELEASE CANDIDATE!!! Everything is frozen, that means no more new features will be added and no big changes will be made after this revision. Only bug fixes will be provided. //Again, "frozen" is a term borrowed from the Debian project and //is completely unrelated to Cirno! Tweak bullet9, shrink its removal border. Change Multpo texture, add spawning effect. Fix stubbed rankings. Update sprite sheet. Store assessment total elapsed time in the score file. Score files from older revisions shouldn't cause any errors but you may get "Time elapsed 0.00" in highscore details. If you've got any sort of OCD (Obsessive-compulsive disorder), just remove it. Document!!!
Diffstat (limited to 'scoresystem.h')
-rw-r--r--scoresystem.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/scoresystem.h b/scoresystem.h
index ff7e4b7..c8efc79 100644
--- a/scoresystem.h
+++ b/scoresystem.h
@@ -26,7 +26,7 @@ void ProcessMT()
class MultPo
{
private:
- hgeSprite *Mult;
+ hgeSprite *Mult,*SpwnEfx;
double Lifetime,LifeLim,speed;
vector2d position,direction;
int blinkbrk;
@@ -37,7 +37,8 @@ public:
{
Lifetime=0;LifeLim=_lt;speed=_speed;position=_pos;direction=_dir;
Mult=new hgeSprite(SprSheet,0,272,48,48);Active=true;blinkbrk=0;blnkshow=true;
- Mult->SetHotSpot(24,24);followplyr=false;
+ Mult->SetHotSpot(24,24);followplyr=false;SpwnEfx=new hgeSprite(SprSheet,48,272,48,48);
+ SpwnEfx->SetHotSpot(24,24);
}
void Process()
{
@@ -55,8 +56,22 @@ public:
direction=ToUnitCircle(playerpos-position);
speed=0.4;
}else Lifetime+=hge->Timer_GetDelta();
- if(GetDist(playerpos,position)<=9)++mult,NewMT(),Active=false;
- if(Lifetime>LifeLim)return (void)(Active=false);
+ if(GetDist(playerpos,position)<=9)
+ {
+ ++mult,NewMT(),Active=false;
+ delete Mult;delete SpwnEfx;return;
+ }
+ if(Lifetime>LifeLim)
+ {
+ delete Mult;delete SpwnEfx;
+ return (void)(Active=false);
+ }
+ if(Lifetime<LifeLim*0.03)
+ {
+ double siz=(LifeLim*0.03-Lifetime)/(LifeLim*0.03)*3;
+ SpwnEfx->SetColor(SETA(SpwnEfx->GetColor(),Lifetime/(LifeLim*0.03)*255));
+ SpwnEfx->RenderEx(position.x,position.y,0,siz);
+ }
if(Lifetime>LifeLim*0.8)
{
if (!LOWFPS)++blinkbrk;else blinkbrk+=17;