summaryrefslogtreecommitdiff
path: root/themes/src/Snowflake.h
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2023-01-02 18:16:45 -0500
committermattkae <mattkae@protonmail.com>2023-01-02 18:16:45 -0500
commit64a8d78225e6539ca25374596fe5de44e6252a62 (patch)
treeb45a7d0c4069c5603968244ead0f2eb4881e70f9 /themes/src/Snowflake.h
parentbe692c3f5b7d9fb537262fc3336eca1607167779 (diff)
Generating snowflakes to be much prettier
Diffstat (limited to 'themes/src/Snowflake.h')
-rw-r--r--themes/src/Snowflake.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/themes/src/Snowflake.h b/themes/src/Snowflake.h
index 02673c1..2524483 100644
--- a/themes/src/Snowflake.h
+++ b/themes/src/Snowflake.h
@@ -1,3 +1,6 @@
+#ifndef SNOWFLAKE_H
+#define SNOWFLAKE_H
+
#include "types.h"
#include "mathlib.h"
#include "list.h"
@@ -6,15 +9,11 @@ struct Renderer2d;
struct Vertex2D;
struct SnowflakeLoadParameters {
- i32 numSnowflakes = 500;
- f32 rateOfSnowfall = 0.1f;
- Vector2 flakeV0 = { 0, 1 };
- Vector4 snowColor = { 0.8, 0.8, 0.8, 1.0 };
- f32 windIntervalSeconds = 1.5;
+ i32 numSnowflakes = 480;
+ f32 windIntervalSeconds = 1.5f;
};
struct SnowflakeUpdateData {
- Vector2 v0;
Vector2 velocity;
Vector2 position;
f32 rotateVelocity = 0.f;
@@ -30,8 +29,8 @@ struct SnowflakeParticleRenderer {
f32 windIntervalSeconds = 1.5;
i32 numSnowflakes = 0;
Vector2 windSpeed;
- SnowflakeUpdateData* updateData;
f32 timeUntilNextWindSeconds = 0;
+ SnowflakeUpdateData* updateData;
u32 vao;
u32 vbo;
@@ -43,3 +42,5 @@ struct SnowflakeParticleRenderer {
void render(Renderer2d* renderer);
void unload();
};
+
+#endif