aboutsummaryrefslogtreecommitdiff
path: root/effects.h
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-11 09:44:43 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-11 09:44:43 +0000
commitf4832349efdf06d8a1a410c636045f505efb52f1 (patch)
treef2958f0e6194a46aa890cfe03a09c737a8afdc20 /effects.h
parent285f4f3379a68db34eec86cdc5c8d6f3c5597f5e (diff)
downloadbullet-lab-remix-f4832349efdf06d8a1a410c636045f505efb52f1.tar.xz
Complete and fix Supernova, add several interfaces.
Diffstat (limited to 'effects.h')
-rw-r--r--effects.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/effects.h b/effects.h
index 1b3c246..02f0daa 100644
--- a/effects.h
+++ b/effects.h
@@ -32,39 +32,39 @@ void SCEffect_Attatch(vector2d Target=vector2d(-100,-100))
}
void SCEffect_Process(int i)
{
- if (!bullet[i].exist||bullet[i].bullettype!=254)return;
- if (!DisablePlayer)
- {
- if (LOWFPS)
- {
- bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20*17;
- bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20*17;
- ++effskp;
- if (effskp==7)
- bullet[i].sccolor=bullet[i].sccolor-0x1F000000,effskp=0;
- }
- else
- {
- bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;
- bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;
- ++effskp;
- if (effskp==7)
- bullet[i].sccolor=bullet[i].sccolor-0x1000000,effskp=0;
- }
- }
- if (GETA(bullet[i].sccolor)<=0x0A||bullet[i].bulletpos.x<=-10||bullet[i].bulletpos.x>=800||bullet[i].bulletpos.y<=-10||bullet[i].bulletpos.y>=600)
+ if (!bullet[i].exist||bullet[i].bullettype!=254)return;
+ if (!DisablePlayer)
+ {
+ if (LOWFPS)
{
- bullet[i].exist=false;
- bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
- bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
- bullet[i].dist=0;
- bullet[i].bullettype=0;
+ bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20*17;
+ bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20*17;
+ ++effskp;
+ if (effskp==7)
+ bullet[i].sccolor=bullet[i].sccolor-0x1F000000,effskp=0;
}
else
{
- bulletspr[grey]->SetColor(bullet[i].sccolor);
- bulletspr[grey]->RenderEx(bullet[i].bulletpos.x+2.4,bullet[i].bulletpos.y+2.4,0,0.2,0);
+ bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;
+ bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;
+ ++effskp;
+ if (effskp==7)
+ bullet[i].sccolor=bullet[i].sccolor-0x1000000,effskp=0;
}
+ }
+ if (GETA(bullet[i].sccolor)<=0x0A||bullet[i].bulletpos.x<=-10||bullet[i].bulletpos.x>=800||bullet[i].bulletpos.y<=-10||bullet[i].bulletpos.y>=600)
+ {
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ }
+ else
+ {
+ bulletspr[grey]->SetColor(bullet[i].sccolor);
+ bulletspr[grey]->RenderEx(bullet[i].bulletpos.x+2.4,bullet[i].bulletpos.y+2.4,0,0.2,0);
+ }
}
void BulletEffect_Attatch(int n)
{