Graphics: Change ParticleStruct_Sprite position and velocity type from Vector2f to Vector3f

Former-commit-id: 5a2e3b02fced8d8ef08a55edf6cc246d30ec2436 [formerly b628e1509d43b8e47d3fdddb5d4ea56e49ed1c07] [formerly f35249524a6f3079ea7cb042e552c10d902afefe [formerly 23cbf8238b8d7d610352c6b159543c86e4de9cbf]]
Former-commit-id: 851b59b1079848fbdc5ddd4af59dbbe8c0b78fe7 [formerly 577851856f53246120e73e55ab3b848df6156078]
Former-commit-id: 0b2af1ee989dd5184199b0caf6be9c39fa08bbf3
This commit is contained in:
Lynix 2016-08-03 13:47:17 +02:00
parent e03f281f43
commit e4211b13a0
2 changed files with 4 additions and 4 deletions

View File

@ -35,8 +35,8 @@ namespace Nz
struct ParticleStruct_Sprite
{
Color color;
Vector2f position;
Vector2f velocity;
Vector3f position;
Vector3f velocity;
UInt32 life;
float rotation;
};

View File

@ -308,9 +308,9 @@ namespace Nz
declaration = &s_declarations[ParticleLayout_Sprite];
declaration->EnableComponent(ParticleComponent_Color, ComponentType_Color, NazaraOffsetOf(ParticleStruct_Sprite, color));
declaration->EnableComponent(ParticleComponent_Life, ComponentType_Int1, NazaraOffsetOf(ParticleStruct_Sprite, life));
declaration->EnableComponent(ParticleComponent_Position, ComponentType_Float2, NazaraOffsetOf(ParticleStruct_Sprite, position));
declaration->EnableComponent(ParticleComponent_Position, ComponentType_Float3, NazaraOffsetOf(ParticleStruct_Sprite, position));
declaration->EnableComponent(ParticleComponent_Rotation, ComponentType_Float1, NazaraOffsetOf(ParticleStruct_Sprite, rotation));
declaration->EnableComponent(ParticleComponent_Velocity, ComponentType_Float2, NazaraOffsetOf(ParticleStruct_Sprite, velocity));
declaration->EnableComponent(ParticleComponent_Velocity, ComponentType_Float3, NazaraOffsetOf(ParticleStruct_Sprite, velocity));
NazaraAssert(declaration->GetStride() == sizeof(ParticleStruct_Sprite), "Invalid stride for declaration ParticleLayout_Sprite");
}