Merge branch 'particles' into Sound+Particles
Conflicts: src/GameWorld.cpp vs11/Returngeance/Returngeance.vcxproj vs11/Returngeance/Returngeance.vcxproj.filters
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#ifndef Components_BlendMap_h__
|
||||
#define Components_BlendMap_h__
|
||||
|
||||
#include "Component.h"
|
||||
#include "Entity.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
struct BlendMap : Component
|
||||
{
|
||||
BlendMap()
|
||||
: TextureRed("Textures/ErrorTextureRed.png")
|
||||
, TextureRedNormal("Textures/NeutralNormalMap.png")
|
||||
, TextureRedSpecular("Textures/NeutralSpecularMap.png")
|
||||
, TextureGreen("Textures/ErrorTextureGreen.png")
|
||||
, TextureGreenNormal("Textures/NeutralNormalMap.png")
|
||||
, TextureGreenSpecular("Textures/NeutralSpecularMap.png")
|
||||
, TextureBlue("Textures/ErrorTextureBlue.png")
|
||||
, TextureBlueNormal("Textures/NeutralNormalMap.png")
|
||||
, TextureBlueSpecular("Textures/NeutralSpecularMap.png")
|
||||
, TextureRepeats(100.f) { }
|
||||
|
||||
std::string TextureRed;
|
||||
std::string TextureRedNormal;
|
||||
std::string TextureRedSpecular;
|
||||
std::string TextureGreen;
|
||||
std::string TextureGreenNormal;
|
||||
std::string TextureGreenSpecular;
|
||||
std::string TextureBlue;
|
||||
std::string TextureBlueNormal;
|
||||
std::string TextureBlueSpecular;
|
||||
float TextureRepeats;
|
||||
|
||||
virtual BlendMap* Clone() const override { return new BlendMap(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
#endif // !Components_BlendMap_h__
|
||||
@@ -4,18 +4,18 @@
|
||||
#include <string>
|
||||
|
||||
#include "Component.h"
|
||||
#include "Color.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Model : Component
|
||||
{
|
||||
Model() : Visible(true), ShadowCaster(true) { }
|
||||
Model() : Color(glm::vec4(1.0f, 1.0f, 1.0f, 1.0f)), Visible(true), ShadowCaster(true), Transparent(false) { }
|
||||
std::string ModelFile;
|
||||
Color Color;
|
||||
glm::vec4 Color;
|
||||
bool Visible;
|
||||
bool ShadowCaster;
|
||||
bool Transparent;
|
||||
|
||||
virtual Model* Clone() const override { return new Model(*this); }
|
||||
};
|
||||
|
||||
@@ -11,9 +11,10 @@ namespace Components
|
||||
|
||||
struct Particle : Component
|
||||
{
|
||||
std::vector<Color> ColorSpectrum;
|
||||
std::vector<glm::vec3> ScaleSpectrum;
|
||||
double LifeTime;
|
||||
double SpawnTime;
|
||||
bool Fade;
|
||||
std::vector<glm::vec3> VelocitySpectrum;
|
||||
std::vector<float> AngularVelocitySpectrum;
|
||||
std::vector<glm::vec3> OrientationSpectrum; //Keep?
|
||||
|
||||
@@ -19,20 +19,22 @@ struct ParticleEmitter : Component
|
||||
, SpawnCount(0)
|
||||
, SpreadAngle(0)
|
||||
, LifeTime(0)
|
||||
, TimeSinceLastSpawn(100) { } // TEMP fulhack så att partiklarna spawnar direkt
|
||||
, TimeSinceLastSpawn(100)
|
||||
, Color(glm::vec4(0)) { }
|
||||
|
||||
EntityID ParticleTemplate;
|
||||
float SpawnFrequency;
|
||||
float Speed;
|
||||
int SpawnCount;
|
||||
std::vector<Color> ColorSpectrum;
|
||||
glm::vec4 Color;
|
||||
std::vector<glm::vec3> ScaleSpectrum;
|
||||
float SpreadAngle;
|
||||
double LifeTime;
|
||||
bool UseGoalVelocity;
|
||||
bool Fade;
|
||||
glm::vec3 GoalVelocity;
|
||||
std::vector<float> AngularVelocitySpectrum;
|
||||
std::vector<glm::vec3> OrientationSpectrum; //Keep?
|
||||
std::vector<glm::vec3> OrientationSpectrum; //Keep? noo..
|
||||
|
||||
private:
|
||||
double TimeSinceLastSpawn;
|
||||
|
||||
@@ -4,15 +4,16 @@
|
||||
#include <string>
|
||||
|
||||
#include "Component.h"
|
||||
#include "Color.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Sprite : Component
|
||||
{
|
||||
Sprite() : Color(glm::vec4(1.0f, 1.0f, 1.0f, 1.0f)) { }
|
||||
|
||||
std::string SpriteFile;
|
||||
Color Color;
|
||||
glm::vec4 Color;
|
||||
|
||||
virtual Sprite* Clone() const override { return new Sprite(*this); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user