diff --git a/core/src/zero1hd/rhythmbullet/RhythmBullet.java b/core/src/zero1hd/rhythmbullet/RhythmBullet.java index 723f08b..314e8c7 100755 --- a/core/src/zero1hd/rhythmbullet/RhythmBullet.java +++ b/core/src/zero1hd/rhythmbullet/RhythmBullet.java @@ -40,7 +40,7 @@ import zero1hd.rhythmbullet.util.AdvancedResizeScreen; public class RhythmBullet extends Game { private boolean initComplete = false; private boolean resizing; - + private int screenWidth, screenHeight; public static final int GAME_AREA_WIDTH = 64; public static final int GAME_AREA_HEIGHT = 48; public static final String VERSION = "(0.1)R1-PreAlpha"; @@ -98,6 +98,8 @@ public class RhythmBullet extends Game { queueAssets(); setScreen(initialScreen); + screenWidth = Gdx.graphics.getWidth(); + screenHeight = Gdx.graphics.getHeight(); } public void checkAssetQueue() { if (!initComplete) { @@ -159,16 +161,18 @@ public class RhythmBullet extends Game { @Override public void resize(int width, int height) { - if (initComplete) { - Gdx.app.debug("Resize", "Pre-transition is happening. Using resolution " + width + "x" + height); - rRHandler.setResolution(width, height); - ((AdvancedResizeScreen) getScreen()).preAssetLoad(); - assetManager.clear(); - prefs.putInteger("screen-width", width); - prefs.putInteger("screen-height", height); - prefs.flush(); - resizing = true; - queueAssets(); + if (width != screenWidth || height != screenHeight) { + if (initComplete) { + Gdx.app.debug("Resize", "Pre-transition is happening. Using resolution " + width + "x" + height); + rRHandler.setResolution(width, height); + ((AdvancedResizeScreen) getScreen()).preAssetLoad(); + assetManager.clear(); + prefs.putInteger("screen-width", width); + prefs.putInteger("screen-height", height); + prefs.flush(); + resizing = true; + queueAssets(); + } } super.resize(width, height); } diff --git a/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java b/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java index f9211f2..93329b9 100755 --- a/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java +++ b/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java @@ -38,7 +38,7 @@ public class BasicVisualizer extends VisualizerCore { pixmap.setColor(Color.WHITE); pixmap.fill(); barCount = 70; - smoothRange = 3; + smoothRange = 2; angleRot = new Vector2(MathUtils.cosDeg(rotation), MathUtils.sinDeg(rotation)); bars = new Sprite[barCount]; barHeights = new float[barCount]; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/Mp3Manager.java b/desktop/src/zero1hd/rhythmbullet/desktop/audio/Mp3Manager.java index 8601a2b..f4f97fc 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/Mp3Manager.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/audio/Mp3Manager.java @@ -68,8 +68,6 @@ public class Mp3Manager implements MusicManager { channels = mp3File.getAudioHeader().getChannels().equals("Mono") ? 1:2; sampleCount = MathUtils.round(Float.valueOf((float) (sampleRate*durationInSeconds))) * channels; - //Rounding error probably? - sampleCount += readWindowSize*2; } catch (IOException | TagException | ReadOnlyFileException | InvalidAudioFrameException e) { e.printStackTrace(); } diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicListController.java b/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicListController.java index 456778b..0e6043c 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicListController.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicListController.java @@ -75,6 +75,12 @@ public class MusicListController extends Observable implements OnCompletionListe } else { currentPlaybackID++; } + + if (currentPlaybackID >= musicList.getTotal()) { + currentPlaybackID = 0; + } else if (currentPlaybackID < 0) { + currentPlaybackID = musicList.getTotal()-1; + } loadMusic(); play(); } diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java index 50e00b1..d319561 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java @@ -22,6 +22,7 @@ public class AnalysisPage extends Page { private Label diffModPercentLabel, heltModPercentLabel, speeModPercentLabel; private Label progressLabel; private TextButton confirmButton; + public AnalysisPage(Skin skin, AssetManager assets) { setTextureBackground(assets.get("gradients.atlas", TextureAtlas.class).findRegion("red-round")); table = new Table(); @@ -75,6 +76,9 @@ public class AnalysisPage extends Page { public void changed(ChangeEvent event, Actor actor) { confirmed = true; confirmButton.setDisabled(true); + speedModifierSlider.setDisabled(true); + healthModifierSlider.setDisabled(true); + difficultyModifierSlider.setDisabled(true); } }); @@ -85,6 +89,10 @@ public class AnalysisPage extends Page { } public void processSong(MusicManager mm) { + confirmButton.setDisabled(false); + speedModifierSlider.setDisabled(false); + healthModifierSlider.setDisabled(false); + difficultyModifierSlider.setDisabled(false); aa = new AudioAnalyzer(mm); aa.start(); }