Merge remote-tracking branch 'remotes/original/master' into upstream
# Conflicts: # src/itdelatrisu/opsu/objects/Slider.java
This commit is contained in:
commit
badae5f85c
|
@ -906,6 +906,7 @@ public class GameData {
|
|||
float scale = (!hitResult.expand) ? 1f : 1f + (HITCIRCLE_ANIM_SCALE - 1f) * progress;
|
||||
float alpha = 1f - progress;
|
||||
|
||||
// "hidden" mod: circle and slider animations not drawn
|
||||
if (!GameMod.HIDDEN.isActive()) {
|
||||
// slider curve
|
||||
if (hitResult.curve != null) {
|
||||
|
|
|
@ -33,6 +33,8 @@ import org.json.JSONObject;
|
|||
|
||||
/**
|
||||
* Download server: https://osu.hexide.com/
|
||||
* <p>
|
||||
* <i>This server went offline in 2016.</i>
|
||||
*/
|
||||
public class HexideServer extends DownloadServer {
|
||||
/** Server name. */
|
||||
|
|
|
@ -106,6 +106,12 @@ public class Slider extends GameObject {
|
|||
/** Number of ticks hit and tick intervals so far. */
|
||||
private int ticksHit = 0, tickIntervals = 1;
|
||||
|
||||
/** The current tick time for the follow circle expanding animation. */
|
||||
private int tickExpandTime = 0;
|
||||
|
||||
/** The duration of the follow circle expanding animation on ticks. */
|
||||
private static final int TICK_EXPAND_TIME = 200;
|
||||
|
||||
/** Container dimensions. */
|
||||
private static int containerWidth, containerHeight;
|
||||
|
||||
|
@ -119,9 +125,6 @@ public class Slider extends GameObject {
|
|||
|
||||
private int comboColorIndex;
|
||||
|
||||
private int tickExpand = 0;
|
||||
private final int TICKEXPAND = 200;
|
||||
|
||||
public int baseSliderFrom;
|
||||
|
||||
/**
|
||||
|
@ -344,7 +347,8 @@ public class Slider extends GameObject {
|
|||
|
||||
// follow circle
|
||||
if (followCircleActive) {
|
||||
GameImage.SLIDER_FOLLOWCIRCLE.getImage().getScaledCopy(1f + (tickExpand / (float) TICKEXPAND) * 0.1f).drawCentered(c.x, c.y);
|
||||
float followCircleScale = 1f + (tickExpandTime / (float) TICK_EXPAND_TIME) * 0.1f;
|
||||
GameImage.SLIDER_FOLLOWCIRCLE.getImage().getScaledCopy(followCircleScale).drawCentered(c.x, c.y);
|
||||
|
||||
// "flashlight" mod: dim the screen
|
||||
if (GameMod.FLASHLIGHT.isActive()) {
|
||||
|
@ -362,6 +366,13 @@ public class Slider extends GameObject {
|
|||
color = orig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws slider ticks.
|
||||
* @param g the graphics context
|
||||
* @param trackPosition the track position
|
||||
* @param curveAlpha the curve alpha level
|
||||
* @param decorationsAlpha the decorations alpha level
|
||||
*/
|
||||
private void drawSliderTicks(Graphics g, int trackPosition, float curveAlpha, float decorationsAlpha, boolean mirror) {
|
||||
float tickScale = 0.5f + 0.5f * AnimationEquation.OUT_BACK.calc(decorationsAlpha);
|
||||
Image tick = GameImage.SLIDER_TICK.getImage().getScaledCopy(tickScale);
|
||||
|
@ -382,6 +393,7 @@ public class Slider extends GameObject {
|
|||
min = 0;
|
||||
}
|
||||
|
||||
// draw ticks
|
||||
for (int i = min; i < max; i++) {
|
||||
Vec2f c = curve.pointAt(ticksT[i]);
|
||||
Colors.WHITE_FADE.a = Math.min(curveAlpha, decorationsAlpha);
|
||||
|
@ -581,17 +593,10 @@ public class Slider extends GameObject {
|
|||
mousePressed(mouseX, mouseY, trackPosition);
|
||||
}
|
||||
|
||||
if (tickExpand > 0) {
|
||||
tickExpand -= delta;
|
||||
if (tickExpand < 0) {
|
||||
tickExpand = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// end of slider
|
||||
if (trackPosition > hitObject.getTime() + sliderTimeTotal) {
|
||||
tickIntervals++;
|
||||
tickExpand = TICKEXPAND;
|
||||
tickExpandTime = TICK_EXPAND_TIME;
|
||||
|
||||
// check if cursor pressed and within end circle
|
||||
if (keyPressed || GameMod.RELAX.isActive()) {
|
||||
|
@ -617,16 +622,22 @@ public class Slider extends GameObject {
|
|||
return true;
|
||||
}
|
||||
|
||||
// update tick expand time
|
||||
if (tickExpandTime > 0) {
|
||||
tickExpandTime -= delta;
|
||||
if (tickExpandTime < 0)
|
||||
tickExpandTime = 0;
|
||||
}
|
||||
|
||||
// repeats
|
||||
boolean isNewRepeat = false;
|
||||
if (repeatCount - 1 > currentRepeats) {
|
||||
float t = getT(trackPosition, true);
|
||||
if (Math.floor(t) > currentRepeats) {
|
||||
currentRepeats++;
|
||||
//tickIntervals++;
|
||||
tickExpand = TICKEXPAND;
|
||||
isNewRepeat = true;
|
||||
tickIndex = 0;
|
||||
isNewRepeat = true;
|
||||
tickExpandTime = TICK_EXPAND_TIME;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -639,8 +650,8 @@ public class Slider extends GameObject {
|
|||
if (t - Math.floor(t) >= ticksT[tickIndex]) {
|
||||
tickIntervals++;
|
||||
tickIndex = (tickIndex + 1) % ticksT.length;
|
||||
tickExpand = TICKEXPAND;
|
||||
isNewTick = true;
|
||||
tickExpandTime = TICK_EXPAND_TIME;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -733,6 +744,7 @@ public class Slider extends GameObject {
|
|||
tickIndex = 0;
|
||||
ticksHit = 0;
|
||||
tickIntervals = 1;
|
||||
tickExpandTime = 0;
|
||||
}
|
||||
|
||||
public Curve getCurve() {
|
||||
|
|
|
@ -34,7 +34,6 @@ import itdelatrisu.opsu.downloads.DownloadList;
|
|||
import itdelatrisu.opsu.downloads.DownloadNode;
|
||||
import itdelatrisu.opsu.downloads.servers.BloodcatServer;
|
||||
import itdelatrisu.opsu.downloads.servers.DownloadServer;
|
||||
import itdelatrisu.opsu.downloads.servers.HexideServer;
|
||||
import itdelatrisu.opsu.downloads.servers.MengSkyServer;
|
||||
import itdelatrisu.opsu.downloads.servers.MnetworkServer;
|
||||
import itdelatrisu.opsu.downloads.servers.YaSOnlineServer;
|
||||
|
@ -82,8 +81,10 @@ public class DownloadsMenu extends BasicGameState {
|
|||
|
||||
/** Available beatmap download servers. */
|
||||
private static final DownloadServer[] SERVERS = {
|
||||
new BloodcatServer(), new HexideServer(), new YaSOnlineServer(),
|
||||
new MnetworkServer(), new MengSkyServer()
|
||||
new BloodcatServer(),
|
||||
new YaSOnlineServer(),
|
||||
new MnetworkServer(),
|
||||
new MengSkyServer()
|
||||
};
|
||||
|
||||
/** The current list of search results. */
|
||||
|
|
|
@ -498,16 +498,16 @@ public class Game extends BasicGameState {
|
|||
// letterbox effect (black bars on top/bottom)
|
||||
if (beatmap.letterboxInBreaks && breakLength >= 4000) {
|
||||
// let it fade in/out
|
||||
float a = Color.black.a;
|
||||
float a = Colors.BLACK_ALPHA.a;
|
||||
if (trackPosition - breakTime > breakLength / 2) {
|
||||
Color.black.a = (Math.min(500f, breakTime + breakLength - trackPosition)) / 500f;
|
||||
Colors.BLACK_ALPHA.a = (Math.min(500f, breakTime + breakLength - trackPosition)) / 500f;
|
||||
} else {
|
||||
Color.black.a = Math.min(500, trackPosition - breakTime) / 500f;
|
||||
Colors.BLACK_ALPHA.a = Math.min(500, trackPosition - breakTime) / 500f;
|
||||
}
|
||||
g.setColor(Color.black);
|
||||
Color.black.a = a;
|
||||
g.setColor(Colors.BLACK_ALPHA);
|
||||
g.fillRect(0, 0, width, height * 0.125f);
|
||||
g.fillRect(0, height * 0.875f, width, height * 0.125f);
|
||||
Colors.BLACK_ALPHA.a = a;
|
||||
}
|
||||
|
||||
if (!Dancer.hideui || !GameMod.AUTO.isActive()) {
|
||||
|
@ -954,7 +954,8 @@ public class Game extends BasicGameState {
|
|||
if (beatmap.breaks != null && breakIndex < beatmap.breaks.size()) {
|
||||
int breakValue = beatmap.breaks.get(breakIndex);
|
||||
if (breakTime > 0) { // in a break period
|
||||
if (trackPosition < breakValue && trackPosition < beatmap.objects[objectIndex].getTime() - approachTime)
|
||||
if (trackPosition < breakValue &&
|
||||
trackPosition < beatmap.objects[objectIndex].getTime() - approachTime)
|
||||
return;
|
||||
else {
|
||||
// break is over
|
||||
|
|
Loading…
Reference in New Issue
Block a user