From 08d9f4165a34d3c88066533c34c07c29d3b9edaa Mon Sep 17 00:00:00 2001 From: yugecin Date: Fri, 30 Sep 2016 20:46:38 +0200 Subject: [PATCH 1/4] option to ignore beatmap sample volume --- src/itdelatrisu/opsu/Options.java | 7 +++++++ src/itdelatrisu/opsu/audio/SoundController.java | 4 ++++ src/itdelatrisu/opsu/states/OptionsMenu.java | 1 + 3 files changed, 12 insertions(+) diff --git a/src/itdelatrisu/opsu/Options.java b/src/itdelatrisu/opsu/Options.java index 335a706e..66b50f03 100644 --- a/src/itdelatrisu/opsu/Options.java +++ b/src/itdelatrisu/opsu/Options.java @@ -433,6 +433,7 @@ public class Options { container.setMusicVolume(getMasterVolume() * getMusicVolume()); } }, + IGNORE_SAMPLE_VOLUME ("Ignore sample volume", "IgnoreBMSample", "Ignore hitsound volume set by beatmap", true), EFFECT_VOLUME ("Effect Volume", "VolumeEffect", "Volume of menu and game sounds.", 70, 0, 100), HITSOUND_VOLUME ("Hit Sound Volume", "VolumeHitSound", "Volume of hit sounds.", 30, 0, 100), MUSIC_OFFSET ("Music Offset", "Offset", "Adjust this value if hit objects are out of sync.", -75, -500, 500) { @@ -1164,6 +1165,12 @@ public class Options { */ public static float getHitSoundVolume() { return GameOption.HITSOUND_VOLUME.getIntegerValue() / 100f; } + /** + * Returns the default hit sound volume. + * @return the hit sound volume [0, 1] + */ + public static boolean ignoreBeatmapSampleVolume() { return GameOption.IGNORE_SAMPLE_VOLUME.bool; } + /** * Returns the music offset time. * @return the offset (in milliseconds) diff --git a/src/itdelatrisu/opsu/audio/SoundController.java b/src/itdelatrisu/opsu/audio/SoundController.java index 7f42f144..7d354d81 100644 --- a/src/itdelatrisu/opsu/audio/SoundController.java +++ b/src/itdelatrisu/opsu/audio/SoundController.java @@ -291,6 +291,10 @@ public class SoundController { if (hitSound < 0) return; + if (Options.ignoreBeatmapSampleVolume()) { + sampleVolumeMultiplier = 1f; + } + float volume = Options.getHitSoundVolume() * sampleVolumeMultiplier * Options.getMasterVolume(); if (volume == 0f) return; diff --git a/src/itdelatrisu/opsu/states/OptionsMenu.java b/src/itdelatrisu/opsu/states/OptionsMenu.java index 8e9818fd..c8333a52 100644 --- a/src/itdelatrisu/opsu/states/OptionsMenu.java +++ b/src/itdelatrisu/opsu/states/OptionsMenu.java @@ -70,6 +70,7 @@ public class OptionsMenu extends BasicGameState { GameOption.MUSIC_VOLUME, GameOption.EFFECT_VOLUME, GameOption.HITSOUND_VOLUME, + GameOption.IGNORE_SAMPLE_VOLUME, GameOption.MUSIC_OFFSET, GameOption.DISABLE_SOUNDS, GameOption.ENABLE_THEME_SONG From 39b24b5f1c308039fb58eade00d5bae87016949c Mon Sep 17 00:00:00 2001 From: yugecin Date: Fri, 30 Sep 2016 21:11:03 +0200 Subject: [PATCH 2/4] attempt to load normal image if there's no array (load sliderb if there's no sliderb0, sliderb1 etc) --- src/itdelatrisu/opsu/GameImage.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/itdelatrisu/opsu/GameImage.java b/src/itdelatrisu/opsu/GameImage.java index dde6369e..ac18af23 100644 --- a/src/itdelatrisu/opsu/GameImage.java +++ b/src/itdelatrisu/opsu/GameImage.java @@ -746,6 +746,21 @@ public enum GameImage { break; } } + if (list.isEmpty()) { + // look for image without 0-1 etc + String name = getImageFileName(filename, dir, type, true); + if (name != null) { + try { + Image img = new Image(name); + if (suffix.equals(HD_SUFFIX)) + img = img.getScaledCopy(0.5f); + list.add(img); + } catch (SlickException e) { + ErrorHandler.error(String.format("Failed to set image '%s'.", name), null, false); + break; + } + } + } if (!list.isEmpty()) return list.toArray(new Image[list.size()]); } From ae9bdcd68f895c3fd3f95c313d13e529a32ea436 Mon Sep 17 00:00:00 2001 From: yugecin Date: Fri, 30 Sep 2016 20:55:10 +0200 Subject: [PATCH 3/4] implement sliderballtint --- src/itdelatrisu/opsu/objects/Slider.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/itdelatrisu/opsu/objects/Slider.java b/src/itdelatrisu/opsu/objects/Slider.java index d0dea977..4df9a60d 100644 --- a/src/itdelatrisu/opsu/objects/Slider.java +++ b/src/itdelatrisu/opsu/objects/Slider.java @@ -321,7 +321,11 @@ public class Slider extends GameObject { Image sliderBallFrame = sliderBallImages[(int) (t * sliderTime * 60 / 1000) % sliderBallImages.length]; float angle = (float) (Math.atan2(c2.y - c.y, c2.x - c.x) * 180 / Math.PI); sliderBallFrame.setRotation(angle); - sliderBallFrame.drawCentered(c.x, c.y); + if (Options.getSkin().isAllowSliderBallTint()) { + sliderBallFrame.drawCentered(c.x, c.y, color); + } else { + sliderBallFrame.drawCentered(c.x, c.y); + } // follow circle if (followCircleActive) { From 829ea085732cf48c959ac0835b3bd6400ee0ea97 Mon Sep 17 00:00:00 2001 From: yugecin Date: Fri, 30 Sep 2016 21:16:34 +0200 Subject: [PATCH 4/4] new slidergradient, should look better --- res/slidergradient.png | Bin 1492 -> 8670 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/res/slidergradient.png b/res/slidergradient.png index 1337613a92d7f781cf27628eb59ca314453b2dd2..9e333c006ef1c46443c22b709825778cfcd137ef 100644 GIT binary patch literal 8670 zcmW++4O~;@{(sKd*~V}LG8BgfGZMr~%!OnKJ6y_}3c*J-GL7w4vO;kd8VYXb3~ur7 zrZ;YCioEQ2OF>abe+4vRJ9ta2cv&TaPS{K@PF|;MV{B*V{2%^&KD_O7*g5BUzQ6C= z;q#m~{u&Y-6$}6fS@-&@8v#J!k02sQ0KfXFPxIk7Or4&U4#0O`&SCz>hrf$)dw2Ek{q!F5Kf1=Z&#bSO<`%$@UAb>m zS6|7hu3agYU+L=VI{3(RPMepp)ws}q^UXaww?>^Pz7T)(?jrTzd;e?+G~YMIzwG*Z zWxdyOcv0!^8QJ?CA3l{DIH`WcwX?E*$}+X6)Rd99$MITd$B!qEt#&=B%ztEQiZ1QW zFqS#op&gG;Ca1XGtQ;D)q%10Zm@)Z@BQ><6_vEy~)tEAI`Tln$L;D}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