From 1d47e3aa120539e053ffa41293f3f756b9d07844 Mon Sep 17 00:00:00 2001 From: mattkae Date: Sun, 16 Jan 2022 18:32:50 -0500 Subject: Successful beginnings of the winter theme --- themes/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'themes/main.cpp') diff --git a/themes/main.cpp b/themes/main.cpp index 8ca7fc4..8f908a3 100644 --- a/themes/main.cpp +++ b/themes/main.cpp @@ -5,6 +5,7 @@ #include "types.h" #include "TreeShape.h" #include "LeafParticleRender.h" +#include "Snowflake.h" enum Theme { Default = 0, @@ -23,6 +24,8 @@ struct AutumnTheme { }; struct WinterTheme { + SnowflakeParticleRenderer spr; + void load(Renderer2d* renderer); void update(float32 dtSeconds); void render(Renderer2d* renderer); @@ -167,13 +170,19 @@ void AutumnTheme::unload() { // -- Winter theme void WinterTheme::load(Renderer2d* renderer) { renderer->clearColor = Vector4(200, 229, 239, 255).toNormalizedColor(); + SnowflakeLoadParameters lp; + lp.spawnIntervalSeconds = 0.05; + spr.load(lp, renderer); } void WinterTheme::update(float32 dtSeconds) { + spr.update(dtSeconds); } void WinterTheme::render(Renderer2d* renderer) { + spr.render(renderer); } void WinterTheme::unload() { + spr.unload(); } -- cgit v1.2.1