Merge branch 'reversearrows' into master

This commit is contained in:
yugecin 2016-10-01 13:15:19 +02:00
commit e926e668b5
2 changed files with 8 additions and 3 deletions

View File

@ -32,7 +32,6 @@ import itdelatrisu.opsu.states.Game;
import itdelatrisu.opsu.ui.Colors; import itdelatrisu.opsu.ui.Colors;
import itdelatrisu.opsu.ui.animations.AnimationEquation; import itdelatrisu.opsu.ui.animations.AnimationEquation;
import org.lwjgl.opengl.GL11;
import org.newdawn.slick.Color; import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer; import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics; import org.newdawn.slick.Graphics;
@ -114,6 +113,8 @@ public class Slider extends GameObject {
private static Color curveColor = new Color(0, 0, 0, 20); private static Color curveColor = new Color(0, 0, 0, 20);
public static double bpm;
/** /**
* Initializes the Slider data type with images and dimensions. * Initializes the Slider data type with images and dimensions.
* @param container the game container * @param container the game container
@ -273,8 +274,9 @@ public class Slider extends GameObject {
for (int tcurRepeat = currentRepeats; tcurRepeat <= currentRepeats + 1; tcurRepeat++) { for (int tcurRepeat = currentRepeats; tcurRepeat <= currentRepeats + 1; tcurRepeat++) {
if (hitObject.getRepeatCount() - 1 > tcurRepeat) { if (hitObject.getRepeatCount() - 1 > tcurRepeat) {
Image arrow = GameImage.REVERSEARROW.getImage(); Image arrow = GameImage.REVERSEARROW.getImage();
float colorLuminance = 0.299f*color.r + 0.587f*color.g + 0.114f*color.b; //float colorLuminance = 0.299f*color.r + 0.587f*color.g + 0.114f*color.b;
Color arrowColor = colorLuminance < 0.8f ? Color.white : Color.black; //Color arrowColor = colorLuminance < 0.8f ? Color.white : Color.black;
Color arrowColor = Color.white;
if (tcurRepeat != currentRepeats) { if (tcurRepeat != currentRepeats) {
if (sliderTime == 0) if (sliderTime == 0)
continue; continue;
@ -282,6 +284,7 @@ public class Slider extends GameObject {
arrow.setAlpha((float) (t - Math.floor(t))); arrow.setAlpha((float) (t - Math.floor(t)));
} else } else
arrow.setAlpha(Options.isSliderSnaking() ? decorationsAlpha : 1f); arrow.setAlpha(Options.isSliderSnaking() ? decorationsAlpha : 1f);
arrow = arrow.getScaledCopy((float) (1 + 0.3d * (trackPosition % bpm) / bpm));
if (tcurRepeat % 2 == 0) { if (tcurRepeat % 2 == 0) {
// last circle // last circle
arrow.setRotation(curve.getEndAngle()); arrow.setRotation(curve.getEndAngle());

View File

@ -1313,6 +1313,8 @@ public class Game extends BasicGameState {
SoundController.mute(false); SoundController.mute(false);
} }
Slider.bpm = beatmap.bpmMin * GameMod.getSpeedMultiplier();
skipButton.resetHover(); skipButton.resetHover();
if (isReplay || GameMod.AUTO.isActive()) if (isReplay || GameMod.AUTO.isActive())
playbackSpeed.getButton().resetHover(); playbackSpeed.getButton().resetHover();