Merge branch 'additions'

This commit is contained in:
yugecin 2016-09-30 21:16:53 +02:00
commit 196c022906
6 changed files with 32 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -746,6 +746,21 @@ public enum GameImage {
break; 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()) if (!list.isEmpty())
return list.toArray(new Image[list.size()]); return list.toArray(new Image[list.size()]);
} }

View File

@ -433,6 +433,7 @@ public class Options {
container.setMusicVolume(getMasterVolume() * getMusicVolume()); 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), 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), 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) { 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; } 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. * Returns the music offset time.
* @return the offset (in milliseconds) * @return the offset (in milliseconds)

View File

@ -291,6 +291,10 @@ public class SoundController {
if (hitSound < 0) if (hitSound < 0)
return; return;
if (Options.ignoreBeatmapSampleVolume()) {
sampleVolumeMultiplier = 1f;
}
float volume = Options.getHitSoundVolume() * sampleVolumeMultiplier * Options.getMasterVolume(); float volume = Options.getHitSoundVolume() * sampleVolumeMultiplier * Options.getMasterVolume();
if (volume == 0f) if (volume == 0f)
return; return;

View File

@ -321,7 +321,11 @@ public class Slider extends GameObject {
Image sliderBallFrame = sliderBallImages[(int) (t * sliderTime * 60 / 1000) % sliderBallImages.length]; 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); float angle = (float) (Math.atan2(c2.y - c.y, c2.x - c.x) * 180 / Math.PI);
sliderBallFrame.setRotation(angle); 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 // follow circle
if (followCircleActive) { if (followCircleActive) {

View File

@ -70,6 +70,7 @@ public class OptionsMenu extends BasicGameState {
GameOption.MUSIC_VOLUME, GameOption.MUSIC_VOLUME,
GameOption.EFFECT_VOLUME, GameOption.EFFECT_VOLUME,
GameOption.HITSOUND_VOLUME, GameOption.HITSOUND_VOLUME,
GameOption.IGNORE_SAMPLE_VOLUME,
GameOption.MUSIC_OFFSET, GameOption.MUSIC_OFFSET,
GameOption.DISABLE_SOUNDS, GameOption.DISABLE_SOUNDS,
GameOption.ENABLE_THEME_SONG GameOption.ENABLE_THEME_SONG