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:
parent
e03f281f43
commit
e4211b13a0
|
|
@ -35,8 +35,8 @@ namespace Nz
|
||||||
struct ParticleStruct_Sprite
|
struct ParticleStruct_Sprite
|
||||||
{
|
{
|
||||||
Color color;
|
Color color;
|
||||||
Vector2f position;
|
Vector3f position;
|
||||||
Vector2f velocity;
|
Vector3f velocity;
|
||||||
UInt32 life;
|
UInt32 life;
|
||||||
float rotation;
|
float rotation;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -308,9 +308,9 @@ namespace Nz
|
||||||
declaration = &s_declarations[ParticleLayout_Sprite];
|
declaration = &s_declarations[ParticleLayout_Sprite];
|
||||||
declaration->EnableComponent(ParticleComponent_Color, ComponentType_Color, NazaraOffsetOf(ParticleStruct_Sprite, color));
|
declaration->EnableComponent(ParticleComponent_Color, ComponentType_Color, NazaraOffsetOf(ParticleStruct_Sprite, color));
|
||||||
declaration->EnableComponent(ParticleComponent_Life, ComponentType_Int1, NazaraOffsetOf(ParticleStruct_Sprite, life));
|
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_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");
|
NazaraAssert(declaration->GetStride() == sizeof(ParticleStruct_Sprite), "Invalid stride for declaration ParticleLayout_Sprite");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue