Kaynağa Gözat

Add instafade checkbox

kiwec 4 ay önce
ebeveyn
işleme
2fb0c61f49

+ 1 - 0
src/App/Osu/Changelog.cpp

@@ -30,6 +30,7 @@ Changelog::Changelog() : ScreenBackable() {
     latest.title =
         UString::format("%.2f (%s, %s)", convar->getConVarByName("osu_version")->getFloat(), __DATE__, __TIME__);
     latest.changes.push_back("- Added cursor trail customization settings");
+    latest.changes.push_back("- Added instafade checkbox");
     latest.changes.push_back("- Added more UI sounds");
     latest.changes.push_back("- Chat: added support for /me command");
     latest.changes.push_back("- Chat: added support for links");

+ 2 - 1
src/App/Osu/Circle.cpp

@@ -429,7 +429,8 @@ void Circle::draw(Graphics *g) {
     Skin *skin = osu->getSkin();
 
     // draw hit animation
-    if(m_fHitAnimation > 0.0f && m_fHitAnimation != 1.0f && !osu->getModHD()) {
+    bool is_instafade = convar->getConVarByName("instafade")->getBool();
+    if(!is_instafade && m_fHitAnimation > 0.0f && m_fHitAnimation != 1.0f && !osu->getModHD()) {
         float alpha = 1.0f - m_fHitAnimation;
 
         float scale = m_fHitAnimation;

+ 1 - 0
src/App/Osu/OptionsMenu.cpp

@@ -847,6 +847,7 @@ OptionsMenu::OptionsMenu() : ScreenBackable() {
     hitResultScaleSlider->setKeyDelta(0.01f);
     addCheckbox("Draw Numbers", convar->getConVarByName("osu_draw_numbers"));
     addCheckbox("Draw Approach Circles", convar->getConVarByName("osu_draw_approach_circles"));
+    addCheckbox("Instafade", convar->getConVarByName("instafade"));
     addSpacer();
     addCheckbox("Ignore Beatmap Sample Volume",
                 "Ignore beatmap timingpoint effect volumes.\nQuiet hitsounds can destroy accuracy and concentration, "

+ 1 - 0
src/App/Osu/Osu.cpp

@@ -145,6 +145,7 @@ ConVar instant_replay_duration("instant_replay_duration", 15.f, FCVAR_DEFAULT,
 ConVar normalize_loudness("normalize_loudness", false, FCVAR_DEFAULT, "normalize loudness across songs");
 ConVar restart_sound_engine_before_playing("restart_sound_engine_before_playing", false, FCVAR_DEFAULT,
                                            "jank fix for users who experience sound issues after playing for a while");
+ConVar instafade("instafade", false, FCVAR_DEFAULT, "don't draw hitcircle fadeout animations");
 
 ConVar use_https("use_https", true, FCVAR_DEFAULT);
 ConVar mp_server("mp_server", "ez-pp.farm", FCVAR_DEFAULT);

+ 6 - 5
src/App/Osu/Slider.cpp

@@ -368,8 +368,9 @@ void Slider::draw(Graphics *g) {
     }
 
     // slider body fade animation, draw start/end circle hit animation
-
-    if(m_fEndSliderBodyFadeAnimation > 0.0f && m_fEndSliderBodyFadeAnimation != 1.0f && !osu->getModHD()) {
+    bool is_instafade = convar->getConVarByName("instafade")->getBool();
+    if(!is_instafade && m_fEndSliderBodyFadeAnimation > 0.0f && m_fEndSliderBodyFadeAnimation != 1.0f &&
+       !osu->getModHD()) {
         std::vector<Vector2> emptyVector;
         std::vector<Vector2> alwaysPoints;
         alwaysPoints.push_back(m_beatmap->osuCoords2Pixels(m_curve->pointAt(m_fSlidePercent)));
@@ -381,8 +382,8 @@ void Slider::draw(Graphics *g) {
                                  1.0f - m_fEndSliderBodyFadeAnimation, getTime());
     }
 
-    if(osu_slider_sliderhead_fadeout.getBool() && m_fStartHitAnimation > 0.0f && m_fStartHitAnimation != 1.0f &&
-       !osu->getModHD()) {
+    if(!is_instafade && osu_slider_sliderhead_fadeout.getBool() && m_fStartHitAnimation > 0.0f &&
+       m_fStartHitAnimation != 1.0f && !osu->getModHD()) {
         float alpha = 1.0f - m_fStartHitAnimation;
 
         float scale = m_fStartHitAnimation;
@@ -420,7 +421,7 @@ void Slider::draw(Graphics *g) {
         g->popTransform();
     }
 
-    if(m_fEndHitAnimation > 0.0f && m_fEndHitAnimation != 1.0f && !osu->getModHD()) {
+    if(!is_instafade && m_fEndHitAnimation > 0.0f && m_fEndHitAnimation != 1.0f && !osu->getModHD()) {
         float alpha = 1.0f - m_fEndHitAnimation;
 
         float scale = m_fEndHitAnimation;