will not reload everytime minimized; minor visualizer tweaks; fixed non shuffle out of bounds issue; progress on analysis page

This commit is contained in:
2018-01-15 15:55:51 -06:00
parent 36eb547943
commit da76c05435
5 changed files with 30 additions and 14 deletions

View File

@@ -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);
}

View File

@@ -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];