diff --git a/.project b/.project index fa618a13..a32a4bd5 100644 --- a/.project +++ b/.project @@ -26,7 +26,7 @@ - 1489692006412 + 1493478184465 22 @@ -35,7 +35,7 @@ - 1489692006414 + 1493478184467 22 @@ -43,6 +43,15 @@ 1.0-name-matches-false-false-*.o + + 1493478184469 + + 5 + + org.eclipse.ui.ide.multiFilter + 1.0-location-matches-false-false-res/bin + + 1489692029191 src diff --git a/res/bin/raindrop2.o b/res/bin/raindrop2.o new file mode 100644 index 00000000..2f51ed25 Binary files /dev/null and b/res/bin/raindrop2.o differ diff --git a/res/raindrop2 b/res/raindrop2 new file mode 100644 index 00000000..457c2d9c Binary files /dev/null and b/res/raindrop2 differ diff --git a/res/raindrop2.png b/res/raindrop2.png new file mode 100644 index 00000000..1e1477e2 Binary files /dev/null and b/res/raindrop2.png differ diff --git a/src/gui/ncc/Background.cpp b/src/gui/ncc/Background.cpp index 95d5f166..ebb2dd98 100644 --- a/src/gui/ncc/Background.cpp +++ b/src/gui/ncc/Background.cpp @@ -13,17 +13,18 @@ Background::Background() : CBaseWidget("nc_background"), tx_snowflake(&_binary_snowflake_start, 16, 16), tx_raindrop(&_binary_raindrop_start, 16, 16), tx_flame(&_binary_flame_start, 16, 16), - tx_heart(&_binary_heart_start, 16, 16) { + tx_heart(&_binary_heart_start, 16, 16), + tx_raindrop2(&_binary_raindrop2_start, 16, 16) { SetSize(draw::width, draw::height); } static CatVar particles(CV_SWITCH, "gui_bg_particles", "0", "Particles"); -static CatEnum particle_type_enum({"Snowflake", "Raindrop", "Flame", "Heart", "Random"}); +static CatEnum particle_type_enum({"Snowflake", "Raindrop", "Flame", "Heart", "Raindrop 2", "Random"}); static CatVar particle_type(particle_type_enum, "gui_bg_particles_type", "0", "Particles Type", "Defines particle type"); static CatVar particle_chance(CV_INT, "gui_bg_particles_chance", "10", "Particles Spawn Rate", "Defines snowflake spawn rate (HAS TO BE NONZERO!)", 1.0f, 100.0f); static CatVar particle_pack_size(CV_INT, "gui_bg_particles_pack_size", "10", "Particles Max Pack", "Defines max snowflake spawn pack size (HAS TO BE NONZERO!)", 1.0f, 100.0f); static CatVar particle_safe(CV_INT, "gui_bg_particles_safe_zone", "100", "Particles Safe Zone", "Defines snowflake safe zone (they will decay after reaching that point)", 0.0f, 400.0f); -static CatVar particle_gravity(CV_FLOAT, "gui_bg_particles_gravity", "700", "Particles Gravity", "Defines snowflake gravity (HAS TO BE NONZERO!)", 0.01f, 5.0f); +static CatVar particle_gravity(CV_FLOAT, "gui_bg_particles_gravity", "700", "Particles Gravity", "Defines snowflake gravity (HAS TO BE NONZERO!)", 0.01f, 2400.0f); static CatVar particle_jittering(CV_INT, "gui_bg_particles_jittering", "2", "Particles Jittering", "Defines snowflake jittering amount", 0.0f, 10.0f); static CatVar particle_wind(CV_INT, "gui_bg_particles_wind", "0", "Particles Wind", "Wind strength and direction", -500.0f, 500.0f); static CatVar particle_jittering_chance(CV_INT, "gui_bg_particles_jittering_chance", "60", "Snowflake Jittering Rate", "Defines snowflake jittering rate (HAS TO BE NONZERO!)", 1.0f, 20.0f); @@ -67,6 +68,7 @@ void Background::LoadTextures() { tx_raindrop.Load(); tx_snowflake.Load(); tx_heart.Load(); + tx_raindrop2.Load(); textures_loaded = true; } @@ -96,7 +98,7 @@ void Background::MakeParticle() { flake->dead = false; flake->next = nullptr; flake->show_in = rand() % 4; - switch (((int)particle_type == 4) ? (rand() % 4) : (int)particle_type) { + switch (((int)particle_type == 5) ? (rand() % 5) : (int)particle_type) { case 1: flake->texture = &tx_raindrop; break; @@ -106,6 +108,9 @@ void Background::MakeParticle() { case 3: flake->texture = &tx_heart; break; + case 4: + flake->texture = &tx_raindrop2; + break; default: flake->texture = &tx_snowflake; } @@ -133,7 +138,7 @@ void Background::KillParticle(Particle* flake) { void Background::Particle::Update(float dt) { if (show_in) show_in--; if (particle_wind) { - vx += (float)particle_wind * dt; + vx += (float)particle_wind * dt * 10.0f; } if (!(rand() % (int)(particle_jittering_chance))) { x += (rand() % 2) ? (int)particle_jittering : -(int)particle_jittering; diff --git a/src/gui/ncc/Background.hpp b/src/gui/ncc/Background.hpp index 38f561f5..133c345e 100644 --- a/src/gui/ncc/Background.hpp +++ b/src/gui/ncc/Background.hpp @@ -13,6 +13,7 @@ extern unsigned char _binary_snowflake_start; extern unsigned char _binary_flame_start; extern unsigned char _binary_raindrop_start; +extern unsigned char _binary_raindrop2_start; extern unsigned char _binary_heart_start; namespace menu { namespace ncc { @@ -43,6 +44,7 @@ public: bool textures_loaded { false }; Texture tx_snowflake; Texture tx_raindrop; + Texture tx_raindrop2; Texture tx_flame; Texture tx_heart; std::chrono::time_point last_update;