cleanup
This commit is contained in:
parent
82e2d2100d
commit
156d52f8c8
|
@ -225,8 +225,7 @@ public class BeatmapParser {
|
||||||
}
|
}
|
||||||
try (
|
try (
|
||||||
InputStream bis = new BufferedInputStream(new FileInputStream(map.getFile()));
|
InputStream bis = new BufferedInputStream(new FileInputStream(map.getFile()));
|
||||||
MD5InputStreamWrapper md5stream = (!hasNoMD5Algorithm) ? new MD5InputStreamWrapper(bis) : null;
|
BufferedReader in = new BufferedReader(new InputStreamReader(bis, "UTF-8"));
|
||||||
BufferedReader in = new BufferedReader(new InputStreamReader((md5stream != null) ? md5stream : bis, "UTF-8"));
|
|
||||||
) {
|
) {
|
||||||
String line;
|
String line;
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
|
@ -249,12 +248,6 @@ public class BeatmapParser {
|
||||||
map.timingPoints.trimToSize();
|
map.timingPoints.trimToSize();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
ErrorHandler.error(String.format("Failed to read file '%s'.", map.getFile().getAbsolutePath()), e, false);
|
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -262,6 +262,9 @@ public class SongMenu extends BasicGameState {
|
||||||
/** Footer pulsing logo button. */
|
/** Footer pulsing logo button. */
|
||||||
private MenuButton footerLogoButton;
|
private MenuButton footerLogoButton;
|
||||||
|
|
||||||
|
/** Size of the footer pulsing logo. */
|
||||||
|
private float footerLogoSize;
|
||||||
|
|
||||||
/** Whether the cursor hovers over the footer logo. */
|
/** Whether the cursor hovers over the footer logo. */
|
||||||
private boolean bottomLogoHovered;
|
private boolean bottomLogoHovered;
|
||||||
|
|
||||||
|
@ -343,8 +346,9 @@ public class SongMenu extends BasicGameState {
|
||||||
|
|
||||||
// logo coordinates
|
// logo coordinates
|
||||||
float footerHeight = height - footerY;
|
float footerHeight = height - footerY;
|
||||||
|
footerLogoSize = footerHeight * 3.25f;
|
||||||
Image logo = GameImage.MENU_LOGO.getImage();
|
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 = new MenuButton(logo, width - footerHeight * 0.8f, height - footerHeight * 0.65f);
|
||||||
footerLogoButton.setHoverAnimationDuration(1);
|
footerLogoButton.setHoverAnimationDuration(1);
|
||||||
footerLogoButton.setHoverExpand(1.4f);
|
footerLogoButton.setHoverExpand(1.4f);
|
||||||
|
@ -523,8 +527,7 @@ public class SongMenu extends BasicGameState {
|
||||||
float expand = position * 0.15f;
|
float expand = position * 0.15f;
|
||||||
footerLogoButton.draw(Color.white, 1f - expand);
|
footerLogoButton.draw(Color.white, 1f - expand);
|
||||||
Image ghostLogo = GameImage.MENU_LOGO.getImage();
|
Image ghostLogo = GameImage.MENU_LOGO.getImage();
|
||||||
ghostLogo = ghostLogo.getScaledCopy((height - footerY) * 3.25f / ghostLogo.getWidth());
|
ghostLogo = ghostLogo.getScaledCopy((1f + expand) * footerLogoSize / ghostLogo.getWidth());
|
||||||
ghostLogo = ghostLogo.getScaledCopy(1f + expand);
|
|
||||||
float scaleposmodx = ghostLogo.getWidth() / 2;
|
float scaleposmodx = ghostLogo.getWidth() / 2;
|
||||||
float scaleposmody = ghostLogo.getHeight() / 2;
|
float scaleposmody = ghostLogo.getHeight() / 2;
|
||||||
float a = Colors.GHOST_LOGO.a;
|
float a = Colors.GHOST_LOGO.a;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user