-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParticle.h
executable file
·48 lines (43 loc) · 1.16 KB
/
Particle.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
class Particle
{
protected:
FPOINT mLoc;
FPOINT mSpeed;
FPOINT mAccel;
DWORD mColor;
double mAlphaLevel;
double mAlphaShift;
int mTimeToLive;
int mMaxTimeToLive;
public:
virtual void Init(POINT Location, FPOINT Speed, FPOINT Acceleration, DWORD Color, UCHAR AlphaLevel = 0, double AlphaShift = 0.5, int TimeToLive = 5000);
virtual void Update(int TimeDiff);
virtual void Draw(HDC LockedDC);
virtual bool IsDead();
};
class ParticleSpawner : public Particle
{
public:
void Update(int TimeDiff);
};
class GlobParticle : public Particle //HAS A RADIUS OF THREE
{
public:
void Draw(HDC LockedDC);
};
class GlobParticleSpawner : public GlobParticle
{
public:
void Update(int TimeDiff);
};
void InitParticleSystem();
void ClearParticleMap();
void FreeParticleSystem();
void BeginDrawingParticles();
void EndDrawingParticles();
DWORD BlendAlphaPixel(DWORD OldColor, DWORD InputColor, UCHAR AlphaLevel);
void UpdateAndDrawAllParticles(int TimeDiff);
void AddParticle(Particle* P);
void AddBloodSparkParticle(POINT pt);
void AddArmorSparkParticle(POINT pt);
void DrawParticlePixel(HDC dc, POINT At, DWORD InputColor, double Alpha);