summaryrefslogtreecommitdiff
path: root/themes/Snowflake.h
diff options
context:
space:
mode:
Diffstat (limited to 'themes/Snowflake.h')
-rw-r--r--themes/Snowflake.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/themes/Snowflake.h b/themes/Snowflake.h
index f67c214..6e0934e 100644
--- a/themes/Snowflake.h
+++ b/themes/Snowflake.h
@@ -6,49 +6,49 @@ struct Renderer2d;
struct Renderer2dVertex;
struct SnowflakeLoadParameters {
- int32 maxSnowflakes = 1000;
- int32 initialSnowflakeCount = 100;
- float32 rateOfSnowfall = 0.1f;
+ i32 maxSnowflakes = 1000;
+ i32 initialSnowflakeCount = 100;
+ f32 rateOfSnowfall = 0.1f;
Vector2 flakeV0 = { 0, 1 };
- float32 flakeSize = 5.f;
- float32 flakeSizeDeviation = 1.f;
+ f32 flakeSize = 5.f;
+ f32 flakeSizeDeviation = 1.f;
Vector4 snowColor = { 0.8, 0.8, 0.8, 1.0 };
- float32 spawnIntervalSeconds = 0.3;
- float32 windIntervalSeconds = 1.5;
+ f32 spawnIntervalSeconds = 0.3;
+ f32 windIntervalSeconds = 1.5;
};
struct SnowflakeUpdateData {
Vector2 v0;
Vector2 velocity;
Vector2 position;
- float32 rotation;
+ f32 rotation;
bool isAlive = false;
bool onGround = false;
- int32 vtxIdx = 0;
- int32 numVertices = 0;
+ i32 vtxIdx = 0;
+ i32 numVertices = 0;
};
struct SnowflakeParticleRenderer {
- float32 xMax = 0;
- float32 yMax = 0;
- float32 spawnIntervalSeconds = 0.3;
- float32 windIntervalSeconds = 1.5;
- int32 startIndex = 0;
- int32 endIndex = 0;
- int32 numSnowflakes = 0;
+ f32 xMax = 0;
+ f32 yMax = 0;
+ f32 spawnIntervalSeconds = 0.3;
+ f32 windIntervalSeconds = 1.5;
+ i32 startIndex = 0;
+ i32 endIndex = 0;
+ i32 numSnowflakes = 0;
Vector2 windSpeed;
SnowflakeUpdateData* updateData;
- float32 timeUntilNextSpawnSeconds = 0;
- float32 timeUntilNextWindSeconds = 0;
+ f32 timeUntilNextSpawnSeconds = 0;
+ f32 timeUntilNextWindSeconds = 0;
- uint32 vao;
- uint32 vbo;
+ u32 vao;
+ u32 vbo;
Mat4x4 model;
List<Renderer2dVertex> vertices;
void load(SnowflakeLoadParameters params, Renderer2d* renderer);
- void update(float32 dtSeconds);
+ void update(f32 dtSeconds);
void render(Renderer2d* renderer);
void unload();
};