post-merge fixes

This commit is contained in:
yugecin 2018-10-22 22:10:43 +02:00
parent 3d470cbe7a
commit 5a268bc713
2 changed files with 10 additions and 18 deletions

View File

@ -733,12 +733,12 @@ public class Game extends ComplexOpsuState {
for (ReplayPlayback replayPlayback : replays) {
totalHeight += replayPlayback.getHeight();
}
float ypos = (displayContainer.height - totalHeight) / 2 - ReplayPlayback.UNITHEIGHT;
float ypos = (height - totalHeight) / 2 - ReplayPlayback.UNITHEIGHT;
for (ReplayPlayback replayPlayback : replays) {
float h = replayPlayback.getHeight();
ypos += h;
//if (h > 0f) {
replayPlayback.render(displayContainer.renderDelta, g, ypos, trackPosition);
replayPlayback.render(renderDelta, g, ypos, trackPosition);
//}
}
}
@ -1486,11 +1486,9 @@ public class Game extends ComplexOpsuState {
super.enter();
File replaydir = new File("d:/Users/Robin/games/osu/osr-stuff-master/furioso/");
File replaydir = new File("d:/Users/Robin/games/osu/osr-stuff-master/xi/");
if (!replaydir.exists()) {
BubNotifListener.EVENT.make().onBubNotif(String.format(
"replay folder '%s' does not exist", replaydir.getAbsolutePath()
), Colors.BUB_RED);
bubNotifs.sendf(Colors.BUB_RED, "replay folder '%s' does not exist", replaydir.getAbsolutePath());
displayContainer.switchStateInstantly(songMenuState);
return;
}
@ -1515,12 +1513,12 @@ public class Game extends ComplexOpsuState {
try {
r.load();
} catch (IOException e) {
BubNotifListener.EVENT.make().onBubNotif("could not load replay " + file.getName(), Colors.BUB_RED);
bubNotifs.sendf(Colors.BUB_RED, "could not load replay %s", file.getName());
continue;
}
Color color = new Color(java.awt.Color.getHSBColor((hue) / 360f, 1.0f, 1.0f).getRGB());
final ReplayPlayback.HitData hitdata = new ReplayPlayback.HitData(hitdatafile);
replays.add(new ReplayPlayback(displayContainer, r, hitdata, color));
replays.add(new ReplayPlayback(r, hitdata, color));
hue += hueshift;
}
@ -1826,10 +1824,6 @@ public class Game extends ComplexOpsuState {
GameMod.loadModState(previousMods);
}
/**
* Adjusts the beatmap's local music offset.
* @param sign the sign (multiplier)
*/
public void adjustLocalMusicOffset(int amount) {
int newOffset = beatmap.localMusicOffset + amount;
barNotifs.send(String.format("Local beatmap offset set to %dms", newOffset));

View File

@ -26,7 +26,6 @@ import itdelatrisu.opsu.ui.animations.AnimationEquation;
import org.newdawn.slick.Color;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import yugecin.opsudance.core.DisplayContainer;
import yugecin.opsudance.core.Entrypoint;
import java.io.*;
@ -36,12 +35,12 @@ import java.util.LinkedList;
import static itdelatrisu.opsu.GameData.*;
import static itdelatrisu.opsu.Utils.*;
import static itdelatrisu.opsu.ui.animations.AnimationEquation.*;
import static yugecin.opsudance.core.InstanceContainer.*;
public class ReplayPlayback {
private static final boolean HIDEMOUSEBTNS = true;
private final DisplayContainer container;
private final HitData hitdata;
public final Replay replay;
public ReplayFrame currentFrame;
@ -73,8 +72,7 @@ public class ReplayPlayback {
private static final Color missedColor = new Color(0.4f, 0.4f, 0.4f, 1f);
public ReplayPlayback(DisplayContainer container, Replay replay, HitData hitdata, Color color) {
this.container = container;
public ReplayPlayback(Replay replay, HitData hitdata, Color color) {
this.replay = replay;
this.hitdata = hitdata;
resetFrameIndex();
@ -259,7 +257,7 @@ public class ReplayPlayback {
failposx = currentFrame.getScaledX();
failposy = currentFrame.getScaledY();
if (hr) {
failposy = container.height - failposy;
failposy = height - failposy;
}
}
missed = true;
@ -298,7 +296,7 @@ public class ReplayPlayback {
}
int y = currentFrame.getScaledY();
if (hr) {
y = container.height - y;
y = height - y;
}
cursor.setCursorPosition(renderdelta, currentFrame.getScaledX(), y);
cursor.draw(false);