This commit is contained in:
yugecin 2016-12-20 00:40:51 +01:00
parent 82e2d2100d
commit 156d52f8c8
2 changed files with 7 additions and 11 deletions

View File

@ -225,8 +225,7 @@ public class BeatmapParser {
}
try (
InputStream bis = new BufferedInputStream(new FileInputStream(map.getFile()));
MD5InputStreamWrapper md5stream = (!hasNoMD5Algorithm) ? new MD5InputStreamWrapper(bis) : null;
BufferedReader in = new BufferedReader(new InputStreamReader((md5stream != null) ? md5stream : bis, "UTF-8"));
BufferedReader in = new BufferedReader(new InputStreamReader(bis, "UTF-8"));
) {
String line;
boolean found = false;
@ -249,12 +248,6 @@ public class BeatmapParser {
map.timingPoints.trimToSize();
} catch (IOException e) {
ErrorHandler.error(String.format("Failed to read file '%s'.", map.getFile().getAbsolutePath()), e, false);
} catch (NoSuchAlgorithmException e) {
ErrorHandler.error("Failed to get MD5 hash stream.", e, true);
// retry without MD5
hasNoMD5Algorithm = true;
parseOnlyTimingPoints(map);
}
}

View File

@ -262,6 +262,9 @@ public class SongMenu extends BasicGameState {
/** Footer pulsing logo button. */
private MenuButton footerLogoButton;
/** Size of the footer pulsing logo. */
private float footerLogoSize;
/** Whether the cursor hovers over the footer logo. */
private boolean bottomLogoHovered;
@ -343,8 +346,9 @@ public class SongMenu extends BasicGameState {
// logo coordinates
float footerHeight = height - footerY;
footerLogoSize = footerHeight * 3.25f;
Image logo = GameImage.MENU_LOGO.getImage();
logo = logo.getScaledCopy(footerHeight * 3.25f / logo.getWidth());
logo = logo.getScaledCopy(footerLogoSize / logo.getWidth());
footerLogoButton = new MenuButton(logo, width - footerHeight * 0.8f, height - footerHeight * 0.65f);
footerLogoButton.setHoverAnimationDuration(1);
footerLogoButton.setHoverExpand(1.4f);
@ -523,8 +527,7 @@ public class SongMenu extends BasicGameState {
float expand = position * 0.15f;
footerLogoButton.draw(Color.white, 1f - expand);
Image ghostLogo = GameImage.MENU_LOGO.getImage();
ghostLogo = ghostLogo.getScaledCopy((height - footerY) * 3.25f / ghostLogo.getWidth());
ghostLogo = ghostLogo.getScaledCopy(1f + expand);
ghostLogo = ghostLogo.getScaledCopy((1f + expand) * footerLogoSize / ghostLogo.getWidth());
float scaleposmodx = ghostLogo.getWidth() / 2;
float scaleposmody = ghostLogo.getHeight() / 2;
float a = Colors.GHOST_LOGO.a;