Snaking sliders initial implementation.

Draws curves in a range from 0 to x (where x is a value between 0 and 1) while blending them in (if enabled in the options)
Cache a unit-cone once and re-use that with scaling and translation instead of generating it each time again.
This is more for readability than performance (since presumably feeding it mostly constants like before would be faster)

Only draws the cones in the curve once if possible
(only possible if consective calls to draw with the intervals x_1 before x_2 are made and [0, x_1] [0, x_2] with x_1 < x_2 holds true)

minor refactoring and cleanup

Omg my code is such a mess. I feel like I've committed a crime against humanity by just randomly putting that
random vbo id into the class called "Rendertarget". But there's really no good place for it now (that has a way to clean it up).
But if "Rendertarget" will ever be used by anything else but the sliders I'm gonna pull that out.

added blending in for return arrows and ticks
This commit is contained in:
Peter Tissen
2015-09-16 17:19:23 +02:00
parent e0da6a2444
commit 131138ea8c
7 changed files with 203 additions and 104 deletions

View File

@@ -417,6 +417,7 @@ public class Options {
BACKGROUND_DIM ("Background Dim", "DimLevel", "Percentage to dim the background image during gameplay.", 50, 0, 100),
FORCE_DEFAULT_PLAYFIELD ("Force Default Playfield", "ForceDefaultPlayfield", "Override the song background with the default playfield background.", false),
IGNORE_BEATMAP_SKINS ("Ignore All Beatmap Skins", "IgnoreBeatmapSkins", "Never use skin element overrides provided by beatmaps.", false),
SNAKING_SLIDERS ("Snaking sliders", "SnakingSliders", "Sliders gradually snake out from their starting point.", true),
SHOW_HIT_LIGHTING ("Show Hit Lighting", "HitLighting", "Adds an effect behind hit explosions.", true),
SHOW_COMBO_BURSTS ("Show Combo Bursts", "ComboBurst", "A character image is displayed at combo milestones.", true),
SHOW_PERFECT_HIT ("Show Perfect Hits", "PerfectHit", "Whether to show perfect hit result bursts (300s, slider ticks).", true),
@@ -941,6 +942,12 @@ public class Options {
*/
public static boolean isBeatmapSkinIgnored() { return GameOption.IGNORE_BEATMAP_SKINS.getBooleanValue(); }
/**
* Returns whether or not sliders should snake in or just appear fully at once.
* @return true if sliders should snake in
*/
public static boolean isSliderSnaking() { return GameOption.SNAKING_SLIDERS.getBooleanValue(); }
/**
* Returns the fixed circle size override, if any.
* @return the CS value (0, 10], 0f if disabled