From 285f4f3379a68db34eec86cdc5c8d6f3c5597f5e Mon Sep 17 00:00:00 2001 From: "chirs241097@gmail.com" Date: Tue, 11 Mar 2014 03:37:24 +0000 Subject: Additive blending bullets, supernova level first draft. --- towernbullet.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'towernbullet.h') diff --git a/towernbullet.h b/towernbullet.h index 4c25f9d..8106dc8 100644 --- a/towernbullet.h +++ b/towernbullet.h @@ -66,6 +66,7 @@ int CreateBullet2(double x,double y,double bs,double rad,bool eff=false,bool inv if (i>bulcnt)bulcnt=i; } bullet[i].exist=true; + bullet[i].addblend=false; bullet[i].inv=invi; bullet[i].bullettype=2; bullet[i].bulletpos.x=x; @@ -420,7 +421,11 @@ void ProcessBullet2(int i) else { if(bullet[i].alterColor2==COLOR_COUNT) + { + if(bullet[i].addblend)bulletspr[bullet[i].alterColor]->SetBlendMode(0); bulletspr[bullet[i].alterColor]->RenderEx(bullet[i].bulletpos.x+7.2,bullet[i].bulletpos.y+7.2,0,0.6*bullet[i].scale,0); + if(bullet[i].addblend)bulletspr[bullet[i].alterColor]->SetBlendMode(2); + } else RenderAlter(vector2d(bullet[i].bulletpos.x+7.2,bullet[i].bulletpos.y+7.2),bullet[i].alterColor,bullet[i].alterColor2,bullet[i].rot,0.6*bullet[i].scale), Current_Position==1?bullet[i].rot+=(i&1?1:-1)*(1000/hge->Timer_GetFPS())*pi/1000:0; -- cgit v1.2.3