2020-06-15 19:59:08 +02:00
|
|
|
#pragma once
|
|
|
|
#include <d3d11.h>
|
|
|
|
#include <SimpleMath.h>
|
|
|
|
#include <array>
|
|
|
|
namespace T5M {
|
|
|
|
namespace Effects {
|
|
|
|
namespace Explosion {
|
|
|
|
struct ExplosionParticle {
|
|
|
|
DirectX::SimpleMath::Vector3 pos;
|
|
|
|
DirectX::SimpleMath::Vector3 vel;
|
|
|
|
DirectX::SimpleMath::Vector4 tint;
|
|
|
|
float size;
|
|
|
|
float rotation;
|
|
|
|
float angularVel;
|
|
|
|
float age;
|
|
|
|
float life;
|
|
|
|
int room;
|
|
|
|
int sprite;
|
|
|
|
bool active;
|
|
|
|
};
|
|
|
|
extern std::array<ExplosionParticle, 64> explosionParticles;
|
2021-07-23 21:50:29 +01:00
|
|
|
void TriggerExplosion(DirectX::SimpleMath::Vector3 const & pos, float size, bool triggerSparks, bool triggerSmoke, bool triggerShockwave, int room);
|
2020-06-15 19:59:08 +02:00
|
|
|
void UpdateExplosionParticles();
|
|
|
|
ExplosionParticle& getFreeExplosionParticle();
|
2021-07-23 21:50:29 +01:00
|
|
|
void SpawnExplosionParticle(DirectX::SimpleMath::Vector3 const & pos);
|
2020-06-15 19:59:08 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|