diff --git a/android/assets/1280x720/RhythmBulletBG.png b/android/assets/1280x720/backgrounds/mainBG.png old mode 100644 new mode 100755 similarity index 100% rename from android/assets/1280x720/RhythmBulletBG.png rename to android/assets/1280x720/backgrounds/mainBG.png diff --git a/android/assets/1280x800/RhythmBulletBG.png b/android/assets/1280x800/backgrounds/mainBG.png old mode 100644 new mode 100755 similarity index 100% rename from android/assets/1280x800/RhythmBulletBG.png rename to android/assets/1280x800/backgrounds/mainBG.png diff --git a/android/assets/1366x768/RhythmBulletBG.png b/android/assets/1366x768/backgrounds/mainBG.png old mode 100644 new mode 100755 similarity index 100% rename from android/assets/1366x768/RhythmBulletBG.png rename to android/assets/1366x768/backgrounds/mainBG.png diff --git a/android/assets/1920x1080/RhythmBulletBG.png b/android/assets/1920x1080/backgrounds/mainBG.png old mode 100644 new mode 100755 similarity index 100% rename from android/assets/1920x1080/RhythmBulletBG.png rename to android/assets/1920x1080/backgrounds/mainBG.png diff --git a/android/assets/1920x1200/RhythmBulletBG.png b/android/assets/1920x1200/backgrounds/mainBG.png old mode 100644 new mode 100755 similarity index 100% rename from android/assets/1920x1200/RhythmBulletBG.png rename to android/assets/1920x1200/backgrounds/mainBG.png diff --git a/android/assets/2560x1440/RhythmBulletBG.png b/android/assets/2560x1440/backgrounds/mainBG.png old mode 100644 new mode 100755 similarity index 100% rename from android/assets/2560x1440/RhythmBulletBG.png rename to android/assets/2560x1440/backgrounds/mainBG.png diff --git a/android/assets/3840x2160/RhythmBulletBG.png b/android/assets/3840x2160/backgrounds/mainBG.png old mode 100644 new mode 100755 similarity index 100% rename from android/assets/3840x2160/RhythmBulletBG.png rename to android/assets/3840x2160/backgrounds/mainBG.png diff --git a/core/src/zero1hd/rhythmbullet/RhythmBullet.java b/core/src/zero1hd/rhythmbullet/RhythmBullet.java index 7668a46..da88b5c 100755 --- a/core/src/zero1hd/rhythmbullet/RhythmBullet.java +++ b/core/src/zero1hd/rhythmbullet/RhythmBullet.java @@ -38,11 +38,13 @@ import zero1hd.rhythmbullet.util.AdvancedResizeScreen; public class RhythmBullet extends Game { + public static final int WORLD_WIDTH = 64; + public static final int WORLD_HEIGHT = 48; + public static final int SPAWN_CIRCLE_RADIUS = 4; + public static float pixels_per_unit; 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"; private AssetManager assetManager = new AssetManager(); @@ -165,6 +167,9 @@ public class RhythmBullet extends Game { if (width != screenWidth || height != screenHeight) { screenWidth = Gdx.graphics.getWidth(); screenHeight = Gdx.graphics.getHeight(); + + pixels_per_unit = screenHeight/WORLD_HEIGHT; + if (initComplete) { Gdx.app.debug("Resize", "Pre-transition is happening. Using resolution " + width + "x" + height); rRHandler.setResolution(width, height); @@ -238,7 +243,7 @@ public class RhythmBullet extends Game { assetManager.load("beateffect.p", ParticleEffect.class); assetManager.load("tpSelector.png", Texture.class); assetManager.load("magic1.png", Texture.class); - assetManager.load("RhythmBulletBG.png", Texture.class); + assetManager.load("backgrounds/mainBG.png", Texture.class); } public void generateFonts(final int height) { diff --git a/core/src/zero1hd/rhythmbullet/audio/AudioDataPackage.java b/core/src/zero1hd/rhythmbullet/audio/AudioDataPackage.java index fa58d36..eb99285 100755 --- a/core/src/zero1hd/rhythmbullet/audio/AudioDataPackage.java +++ b/core/src/zero1hd/rhythmbullet/audio/AudioDataPackage.java @@ -4,8 +4,6 @@ import java.security.InvalidParameterException; import com.badlogic.gdx.utils.FloatArray; -import zero1hd.rhythmbullet.util.MusicManager; - public class AudioDataPackage { private FloatArray bassPeaks; private FloatArray mPeaks; diff --git a/core/src/zero1hd/rhythmbullet/util/MusicManager.java b/core/src/zero1hd/rhythmbullet/audio/MusicManager.java similarity index 94% rename from core/src/zero1hd/rhythmbullet/util/MusicManager.java rename to core/src/zero1hd/rhythmbullet/audio/MusicManager.java index 551b599..fbf8bc9 100755 --- a/core/src/zero1hd/rhythmbullet/util/MusicManager.java +++ b/core/src/zero1hd/rhythmbullet/audio/MusicManager.java @@ -1,5 +1,5 @@ -package zero1hd.rhythmbullet.util; +package zero1hd.rhythmbullet.audio; import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.audio.Music.OnCompletionListener; diff --git a/core/src/zero1hd/rhythmbullet/audio/analyzer/AudioAnalyzer.java b/core/src/zero1hd/rhythmbullet/audio/analyzer/AudioAnalyzer.java index eba0632..1a67bcc 100755 --- a/core/src/zero1hd/rhythmbullet/audio/analyzer/AudioAnalyzer.java +++ b/core/src/zero1hd/rhythmbullet/audio/analyzer/AudioAnalyzer.java @@ -5,7 +5,7 @@ import java.util.concurrent.Executors; import com.badlogic.gdx.utils.Disposable; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class AudioAnalyzer implements Disposable { private ExecutorService exec; diff --git a/core/src/zero1hd/rhythmbullet/audio/analyzer/PeakDetectionRunnable.java b/core/src/zero1hd/rhythmbullet/audio/analyzer/PeakDetectionRunnable.java index ac4f2f8..ffee2d3 100755 --- a/core/src/zero1hd/rhythmbullet/audio/analyzer/PeakDetectionRunnable.java +++ b/core/src/zero1hd/rhythmbullet/audio/analyzer/PeakDetectionRunnable.java @@ -4,7 +4,7 @@ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.utils.FloatArray; import zero1hd.rhythmbullet.audio.AudioDataPackage; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class PeakDetectionRunnable implements Runnable { boolean work = true, done; diff --git a/core/src/zero1hd/rhythmbullet/audio/analyzer/PruneFluxRunnable.java b/core/src/zero1hd/rhythmbullet/audio/analyzer/PruneFluxRunnable.java index fee44f6..b06ade9 100755 --- a/core/src/zero1hd/rhythmbullet/audio/analyzer/PruneFluxRunnable.java +++ b/core/src/zero1hd/rhythmbullet/audio/analyzer/PruneFluxRunnable.java @@ -3,7 +3,7 @@ package zero1hd.rhythmbullet.audio.analyzer; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.utils.FloatArray; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class PruneFluxRunnable implements Runnable { boolean work = true; diff --git a/core/src/zero1hd/rhythmbullet/audio/analyzer/SpectralFluxAnalysisRunnable.java b/core/src/zero1hd/rhythmbullet/audio/analyzer/SpectralFluxAnalysisRunnable.java index 65ce488..3ef896a 100755 --- a/core/src/zero1hd/rhythmbullet/audio/analyzer/SpectralFluxAnalysisRunnable.java +++ b/core/src/zero1hd/rhythmbullet/audio/analyzer/SpectralFluxAnalysisRunnable.java @@ -5,7 +5,7 @@ import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.utils.FloatArray; import edu.emory.mathcs.jtransforms.fft.FloatFFT_1D; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class SpectralFluxAnalysisRunnable implements Runnable { boolean work = true; diff --git a/core/src/zero1hd/rhythmbullet/audio/analyzer/ThresholdCalcRunnable.java b/core/src/zero1hd/rhythmbullet/audio/analyzer/ThresholdCalcRunnable.java index afda534..21e2f8e 100755 --- a/core/src/zero1hd/rhythmbullet/audio/analyzer/ThresholdCalcRunnable.java +++ b/core/src/zero1hd/rhythmbullet/audio/analyzer/ThresholdCalcRunnable.java @@ -3,7 +3,7 @@ package zero1hd.rhythmbullet.audio.analyzer; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.utils.FloatArray; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class ThresholdCalcRunnable implements Runnable { boolean work = true; diff --git a/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java b/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java index 9f0c7bf..c66b467 100755 --- a/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java +++ b/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java @@ -11,7 +11,7 @@ import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.utils.Array; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class BasicVisualizer extends VisualizerCore { private Pixmap pixmap; diff --git a/core/src/zero1hd/rhythmbullet/audio/visualizer/VisualizerCore.java b/core/src/zero1hd/rhythmbullet/audio/visualizer/VisualizerCore.java index f04af36..08e9cea 100755 --- a/core/src/zero1hd/rhythmbullet/audio/visualizer/VisualizerCore.java +++ b/core/src/zero1hd/rhythmbullet/audio/visualizer/VisualizerCore.java @@ -6,7 +6,7 @@ import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.utils.Disposable; import edu.emory.mathcs.jtransforms.fft.FloatFFT_1D; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class VisualizerCore implements Disposable { protected MusicManager mm; diff --git a/core/src/zero1hd/rhythmbullet/entity/Entity.java b/core/src/zero1hd/rhythmbullet/entity/Entity.java index b1a803f..28d8785 100755 --- a/core/src/zero1hd/rhythmbullet/entity/Entity.java +++ b/core/src/zero1hd/rhythmbullet/entity/Entity.java @@ -1,5 +1,7 @@ package zero1hd.rhythmbullet.entity; +import java.security.InvalidParameterException; + import com.badlogic.gdx.Preferences; import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.graphics.Color; @@ -22,7 +24,6 @@ public class Entity implements Poolable { protected EntityManager ec; protected boolean enemy; - protected boolean nonStnrd = false; protected boolean move = true; protected boolean dead; @@ -62,7 +63,14 @@ public class Entity implements Poolable { } public void init(float deg, float speed, int hp) { - + rotRatios.set(MathUtils.cosDeg(angle), MathUtils.sinDeg(angle)); + sprite.setSize(sprite.getTexture().getWidth()/RhythmBullet.pixels_per_unit, sprite.getTexture().getHeight()/RhythmBullet.pixels_per_unit); + float r = RhythmBullet.SPAWN_CIRCLE_RADIUS - sprite.getWidth(); + if (r < RhythmBullet.SPAWN_CIRCLE_RADIUS -1) { + throw new InvalidParameterException("Entity is too big! Calculated final distance from center: " + r); + } + sprite.setPosition(r*rotRatios.x, r*rotRatios.y); + updatePosition(); } /** @@ -85,21 +93,19 @@ public class Entity implements Poolable { } public void calculate(float delta) { - if (!nonStnrd) { - if (coordinator != null) { - coordinator.coordinate(delta); - } - - if (dead) { - ef.recycleEntity(this); - } + if (coordinator != null) { + coordinator.coordinate(delta); + } + + if (dead) { + ef.recycleEntity(this); } if (angle >= 360f) { angle -= 360f; } - if (sprite.getX() > RhythmBullet.GAME_AREA_WIDTH || sprite.getY() > RhythmBullet.GAME_AREA_HEIGHT || sprite.getX() < 0-sprite.getWidth() || sprite.getX() < 0-sprite.getWidth()) { + if (sprite.getX() > RhythmBullet.WORLD_WIDTH || sprite.getY() > RhythmBullet.WORLD_HEIGHT || sprite.getX() < 0-sprite.getWidth() || sprite.getX() < 0-sprite.getWidth()) { dead = true; } @@ -107,18 +113,16 @@ public class Entity implements Poolable { } public void draw(Batch batch) { - if (!nonStnrd) { - sprite.draw(batch); - } + sprite.draw(batch); batch.setColor(Color.WHITE); } public void moveBy(float x, float y) { - rotRatios.set(MathUtils.cosDeg(angle), MathUtils.sinDeg(angle)); - sprite.setCenter(x, y); + sprite.setCenter(sprite.getX() + x, sprite.getY() + y); } public void updatePosition() { + rotRatios.set(MathUtils.cosDeg(angle), MathUtils.sinDeg(angle)); sprite.setOriginCenter(); sprite.setRotation(angle); hitbox.setCenter(sprite.getOriginX(), sprite.getOriginY()); diff --git a/core/src/zero1hd/rhythmbullet/entity/ally/Laser.java b/core/src/zero1hd/rhythmbullet/entity/ally/Laser.java index be44e63..780290f 100755 --- a/core/src/zero1hd/rhythmbullet/entity/ally/Laser.java +++ b/core/src/zero1hd/rhythmbullet/entity/ally/Laser.java @@ -28,7 +28,7 @@ public class Laser extends Entity { @Override public void calculate(float delta) { - if (getY() > RhythmBullet.GAME_AREA_HEIGHT) { + if (getY() > RhythmBullet.WORLD_HEIGHT) { dead = true; } super.calculate(delta); diff --git a/core/src/zero1hd/rhythmbullet/entity/ally/PolyjetEntity.java b/core/src/zero1hd/rhythmbullet/entity/ally/PolyjetEntity.java index 0efff37..318dd8f 100755 --- a/core/src/zero1hd/rhythmbullet/entity/ally/PolyjetEntity.java +++ b/core/src/zero1hd/rhythmbullet/entity/ally/PolyjetEntity.java @@ -19,12 +19,11 @@ public class PolyjetEntity extends Entity { private float rate; private int maxH; public PolyjetEntity(AssetManager assets, float speed, float accel,int maxHealth, String jet) { - nonStnrd = true; health = 100; this.speed = speed; this.accel = accel; setSize(1.5f, 1.5f); - setPosition(RhythmBullet.GAME_AREA_WIDTH/2 - getWidth()/2, -4f); + setPosition(RhythmBullet.WORLD_WIDTH/2 - getWidth()/2, -4f); maxH = maxHealth; hitbox = new Rectangle(getX(), getY(), getWidth(), getHeight()); polyjet = assets.get("polyjet-" + jet + ".png", Texture.class); diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/map/EntitySpawnInfo.java b/core/src/zero1hd/rhythmbullet/game/EntitySpawnInfo.java similarity index 91% rename from desktop/src/zero1hd/rhythmbullet/desktop/audio/map/EntitySpawnInfo.java rename to core/src/zero1hd/rhythmbullet/game/EntitySpawnInfo.java index af4e93b..720b829 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/map/EntitySpawnInfo.java +++ b/core/src/zero1hd/rhythmbullet/game/EntitySpawnInfo.java @@ -1,4 +1,4 @@ -package zero1hd.rhythmbullet.desktop.audio.map; +package zero1hd.rhythmbullet.game; import java.util.HashMap; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/stages/GameController.java b/core/src/zero1hd/rhythmbullet/game/GameController.java similarity index 88% rename from desktop/src/zero1hd/rhythmbullet/desktop/stages/GameController.java rename to core/src/zero1hd/rhythmbullet/game/GameController.java index 9b4362f..ce82a18 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/stages/GameController.java +++ b/core/src/zero1hd/rhythmbullet/game/GameController.java @@ -1,4 +1,4 @@ -package zero1hd.rhythmbullet.desktop.stages; +package zero1hd.rhythmbullet.game; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.InputProcessor; @@ -8,7 +8,6 @@ import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.utils.Disposable; import zero1hd.rhythmbullet.controls.KeyMap; -import zero1hd.rhythmbullet.desktop.audio.map.GamePlayMap; import zero1hd.rhythmbullet.entity.CollisionDetector; import zero1hd.rhythmbullet.entity.EntityManager; import zero1hd.rhythmbullet.entity.ally.Laser; @@ -19,7 +18,6 @@ import zero1hd.rhythmbullet.util.ScoreManager; public class GameController implements Disposable, InputProcessor { public PolyjetEntity polyjet; - private GamePlayMap audioMap; public CoordinatorManager cm; public EntityManager em; @@ -58,14 +56,6 @@ public class GameController implements Disposable, InputProcessor { } } - public void setAudioMap(GamePlayMap audioMap) { - this.audioMap = audioMap; - } - - public GamePlayMap getAudioMap() { - return audioMap; - } - @Override public boolean keyDown(int keycode) { if (keycode == KeyMap.left) { diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/map/GamePlayMap.java b/core/src/zero1hd/rhythmbullet/game/GamePlayMap.java similarity index 92% rename from desktop/src/zero1hd/rhythmbullet/desktop/audio/map/GamePlayMap.java rename to core/src/zero1hd/rhythmbullet/game/GamePlayMap.java index d95210a..6573a36 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/map/GamePlayMap.java +++ b/core/src/zero1hd/rhythmbullet/game/GamePlayMap.java @@ -1,10 +1,10 @@ -package zero1hd.rhythmbullet.desktop.audio.map; +package zero1hd.rhythmbullet.game; +import zero1hd.rhythmbullet.audio.MusicManager; import zero1hd.rhythmbullet.entity.Entity; import zero1hd.rhythmbullet.entity.EntityFrame; import zero1hd.rhythmbullet.entity.coordinator.Coordinator; import zero1hd.rhythmbullet.entity.coordinator.CoordinatorFrame; -import zero1hd.rhythmbullet.util.MusicManager; public class GamePlayMap { private MusicManager musicData; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/map/MapWindowData.java b/core/src/zero1hd/rhythmbullet/game/MapWindowData.java similarity index 83% rename from desktop/src/zero1hd/rhythmbullet/desktop/audio/map/MapWindowData.java rename to core/src/zero1hd/rhythmbullet/game/MapWindowData.java index a3c82ce..ba71acf 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/map/MapWindowData.java +++ b/core/src/zero1hd/rhythmbullet/game/MapWindowData.java @@ -1,8 +1,7 @@ -package zero1hd.rhythmbullet.desktop.audio.map; +package zero1hd.rhythmbullet.game; import com.badlogic.gdx.utils.Array; - public class MapWindowData { Array entityDatas; public MapWindowData() { diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/DesktopLauncher.java b/desktop/src/zero1hd/rhythmbullet/desktop/DesktopLauncher.java index e0807ce..bfa2d84 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/DesktopLauncher.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/DesktopLauncher.java @@ -7,7 +7,7 @@ import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; import zero1hd.rhythmbullet.RhythmBullet; -import zero1hd.rhythmbullet.desktop.screens.LoadingScreen; +import zero1hd.rhythmbullet.desktop.screens.SplashScreen; public class DesktopLauncher { public static void main (String[] arg) { @@ -20,7 +20,7 @@ public class DesktopLauncher { config.allowSoftwareMode = true; config.useHDPI = true; core = new RhythmBullet(); - core.setInitialScreen(new LoadingScreen(core)); + core.setInitialScreen(new SplashScreen(core)); new LwjglApplication(core, config); diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/Mp3Manager.java b/desktop/src/zero1hd/rhythmbullet/desktop/audio/Mp3Manager.java index f8605c6..485ecb6 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/Mp3Manager.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/audio/Mp3Manager.java @@ -24,7 +24,7 @@ import javazoom.jl.decoder.DecoderException; import javazoom.jl.decoder.Header; import javazoom.jl.decoder.MP3Decoder; import javazoom.jl.decoder.OutputBuffer; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class Mp3Manager implements MusicManager { diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicList.java b/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicList.java index e22a6da..36572c0 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicList.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicList.java @@ -9,8 +9,8 @@ import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.Sort; +import zero1hd.rhythmbullet.audio.MusicManager; import zero1hd.rhythmbullet.util.FileHandleAlphabeticalComparator; -import zero1hd.rhythmbullet.util.MusicManager; public class MusicList extends Observable { private Array musicList; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicListController.java b/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicListController.java index 1b2905a..bc7e59a 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicListController.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicListController.java @@ -9,7 +9,7 @@ import com.badlogic.gdx.Preferences; import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.audio.Music.OnCompletionListener; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class MusicListController extends Observable implements OnCompletionListener, Observer { private MusicList musicList; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/WAVManager.java b/desktop/src/zero1hd/rhythmbullet/desktop/audio/WAVManager.java index 590e5c3..0242c46 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/WAVManager.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/audio/WAVManager.java @@ -12,8 +12,8 @@ import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.audio.Music.OnCompletionListener; import com.badlogic.gdx.files.FileHandle; +import zero1hd.rhythmbullet.audio.MusicManager; import zero1hd.rhythmbullet.audio.wavedecoder.WAVSampleReader; -import zero1hd.rhythmbullet.util.MusicManager; public class WAVManager implements MusicManager { private int readWindowSize = 1024; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/map/RhythmMapAlgorithm.java b/desktop/src/zero1hd/rhythmbullet/desktop/audio/map/RhythmMapAlgorithm.java index f603c93..c839b67 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/map/RhythmMapAlgorithm.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/audio/map/RhythmMapAlgorithm.java @@ -2,13 +2,13 @@ package zero1hd.rhythmbullet.desktop.audio.map; import org.apache.commons.math3.random.MersenneTwister; -import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.utils.FloatArray; -import zero1hd.rhythmbullet.RhythmBullet; import zero1hd.rhythmbullet.audio.AudioDataPackage; import zero1hd.rhythmbullet.entity.EntityManager; import zero1hd.rhythmbullet.entity.coordinator.CoordinatorManager; +import zero1hd.rhythmbullet.game.EntitySpawnInfo; +import zero1hd.rhythmbullet.game.GamePlayMap; public class RhythmMapAlgorithm implements Runnable { diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/AudioGraph.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/AudioGraph.java index dbbb158..670b4a7 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/AudioGraph.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/AudioGraph.java @@ -9,7 +9,7 @@ import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.utils.FloatArray; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class AudioGraph extends Actor { private MusicManager audioData; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/AudioGraphRelation.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/AudioGraphRelation.java index 5aced90..3b318db 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/AudioGraphRelation.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/AudioGraphRelation.java @@ -9,7 +9,7 @@ import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.utils.FloatArray; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class AudioGraphRelation extends Actor { private MusicManager audioData; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/GraphicsOptions.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/GraphicsOptions.java index bde3224..e61ccb4 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/GraphicsOptions.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/GraphicsOptions.java @@ -11,7 +11,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton; import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; import com.badlogic.gdx.utils.Align; -import zero1hd.rhythmbullet.desktop.screens.MainMenu; +import zero1hd.rhythmbullet.desktop.screens.MainMenuScreen; public class GraphicsOptions extends Table { private Label resolutions, shaders; @@ -28,7 +28,7 @@ public class GraphicsOptions extends Table { _1366x768; - public GraphicsOptions(final MainMenu mainMenu, Skin skin, final Preferences prefs) { + public GraphicsOptions(final MainMenuScreen mainMenu, Skin skin, final Preferences prefs) { align(Align.center); defaults().space(10f); this.prefs = prefs; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/Visualizer.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/Visualizer.java index 340341d..46e536e 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/Visualizer.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/Visualizer.java @@ -17,8 +17,8 @@ import com.badlogic.gdx.utils.reflect.ClassReflection; import com.badlogic.gdx.utils.reflect.Field; import com.badlogic.gdx.utils.reflect.ReflectionException; +import zero1hd.rhythmbullet.audio.MusicManager; import zero1hd.rhythmbullet.audio.visualizer.BasicVisualizer; -import zero1hd.rhythmbullet.util.MusicManager; public class Visualizer extends Widget implements Disposable { private BasicVisualizer vis; 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 6e326fa..2e62581 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java @@ -14,8 +14,8 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton; import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; import zero1hd.rhythmbullet.audio.MusicInfo; +import zero1hd.rhythmbullet.audio.MusicManager; import zero1hd.rhythmbullet.audio.analyzer.AudioAnalyzer; -import zero1hd.rhythmbullet.util.MusicManager; public class AnalysisPage extends Page { private boolean confirmed; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MainPage.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MainPage.java index 20d3798..47a8ae2 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MainPage.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MainPage.java @@ -14,12 +14,12 @@ import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; import com.badlogic.gdx.utils.Align; import zero1hd.rhythmbullet.RhythmBullet; +import zero1hd.rhythmbullet.audio.MusicManager; import zero1hd.rhythmbullet.desktop.audio.MusicListController; import zero1hd.rhythmbullet.desktop.graphics.ui.components.MusicControls; import zero1hd.rhythmbullet.desktop.graphics.ui.components.ScrollText; import zero1hd.rhythmbullet.desktop.graphics.ui.components.TitleBarVisualizer; -import zero1hd.rhythmbullet.desktop.screens.MainMenu; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.desktop.screens.MainMenuScreen; public class MainPage extends Page implements Observer { private Label versionLabel; @@ -32,10 +32,10 @@ public class MainPage extends Page implements Observer { private TextButton quitButton; private MusicControls musicControls; - private MainMenu mMenu; + private MainMenuScreen mMenu; private ScrollText scrollText; - public MainPage(RhythmBullet core, final Vector3 targetPosition, MusicListController mlc, final MainMenu mainMenu) { + public MainPage(RhythmBullet core, final Vector3 targetPosition, MusicListController mlc, final MainMenuScreen mainMenu) { this.mlc = mlc; this.mMenu = mainMenu; titleBar = new TitleBarVisualizer(core.getAssetManager()); diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MusicSelectionPage.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MusicSelectionPage.java index f9c73f4..710f096 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MusicSelectionPage.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MusicSelectionPage.java @@ -26,11 +26,11 @@ import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable; import com.badlogic.gdx.utils.Array; import zero1hd.rhythmbullet.audio.MusicInfo; +import zero1hd.rhythmbullet.audio.MusicManager; import zero1hd.rhythmbullet.desktop.audio.MusicInfoController; import zero1hd.rhythmbullet.desktop.audio.MusicListController; import zero1hd.rhythmbullet.desktop.graphics.ui.components.MusicSelectable; import zero1hd.rhythmbullet.desktop.graphics.ui.components.ScrollText; -import zero1hd.rhythmbullet.util.MusicManager; public class MusicSelectionPage extends Page implements Observer { Preferences musicFileAnnotation; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/VideoOptionsPage.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/VideoOptionsPage.java index 6dc08a1..f560a4d 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/VideoOptionsPage.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/VideoOptionsPage.java @@ -10,14 +10,14 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton; import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; import zero1hd.rhythmbullet.desktop.graphics.ui.components.GraphicsOptions; -import zero1hd.rhythmbullet.desktop.screens.MainMenu; +import zero1hd.rhythmbullet.desktop.screens.MainMenuScreen; public class VideoOptionsPage extends Page { private ScrollPane scrollPane; private GraphicsOptions graphicsTable; private TextButton backButton; - public VideoOptionsPage(Skin skin, Preferences prefs, final MainMenu menu, AssetManager assets) { + public VideoOptionsPage(Skin skin, Preferences prefs, final MainMenuScreen menu, AssetManager assets) { graphicsTable = new GraphicsOptions(menu, skin, prefs); scrollPane = new ScrollPane(graphicsTable, skin); scrollPane.setFadeScrollBars(false); diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/windows/BeatViewer.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/windows/BeatViewer.java index bb9842c..68810f2 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/windows/BeatViewer.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/windows/BeatViewer.java @@ -10,7 +10,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup; import com.badlogic.gdx.scenes.scene2d.ui.Window; import zero1hd.rhythmbullet.audio.AudioDataPackage; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class BeatViewer extends Window { Pixmap lights; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/windows/VolumeWindow.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/windows/VolumeWindow.java index 0929351..95d69d0 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/windows/VolumeWindow.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/windows/VolumeWindow.java @@ -9,7 +9,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Slider; import com.badlogic.gdx.scenes.scene2d.ui.Window; import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; -import zero1hd.rhythmbullet.util.MusicManager; +import zero1hd.rhythmbullet.audio.MusicManager; public class VolumeWindow extends Window { diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/screens/GameScreen.java b/desktop/src/zero1hd/rhythmbullet/desktop/screens/GameScreen.java new file mode 100755 index 0000000..4f365d6 --- /dev/null +++ b/desktop/src/zero1hd/rhythmbullet/desktop/screens/GameScreen.java @@ -0,0 +1,29 @@ +package zero1hd.rhythmbullet.desktop.screens; + +import com.badlogic.gdx.Preferences; +import com.badlogic.gdx.ScreenAdapter; +import com.badlogic.gdx.assets.AssetManager; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; +import com.badlogic.gdx.utils.viewport.ExtendViewport; + +import zero1hd.rhythmbullet.RhythmBullet; +import zero1hd.rhythmbullet.game.GameController; + +public class GameScreen extends ScreenAdapter { + private AssetManager assets; + private SpriteBatch batch; + private ExtendViewport viewport; + private GameController gc; + + public GameScreen(AssetManager assets, Preferences prefs) { + this.assets = assets; + batch = new SpriteBatch(); + viewport = new ExtendViewport(RhythmBullet.WORLD_WIDTH, RhythmBullet.WORLD_HEIGHT); + } + + + @Override + public void render(float delta) { + super.render(delta); + } +} diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/screens/MainMenu.java b/desktop/src/zero1hd/rhythmbullet/desktop/screens/MainMenuScreen.java similarity index 98% rename from desktop/src/zero1hd/rhythmbullet/desktop/screens/MainMenu.java rename to desktop/src/zero1hd/rhythmbullet/desktop/screens/MainMenuScreen.java index 3122d78..951e318 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/screens/MainMenu.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/screens/MainMenuScreen.java @@ -20,6 +20,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.badlogic.gdx.utils.viewport.ScreenViewport; import zero1hd.rhythmbullet.RhythmBullet; +import zero1hd.rhythmbullet.audio.MusicManager; import zero1hd.rhythmbullet.desktop.audio.MusicInfoController; import zero1hd.rhythmbullet.desktop.audio.MusicList; import zero1hd.rhythmbullet.desktop.audio.MusicListController; @@ -31,9 +32,8 @@ import zero1hd.rhythmbullet.desktop.graphics.ui.pages.MusicSelectionPage; import zero1hd.rhythmbullet.desktop.graphics.ui.pages.OptionsPage; import zero1hd.rhythmbullet.desktop.graphics.ui.pages.VideoOptionsPage; import zero1hd.rhythmbullet.util.AdvancedResizeScreen; -import zero1hd.rhythmbullet.util.MusicManager; -public class MainMenu extends ScreenAdapter implements AdvancedResizeScreen { +public class MainMenuScreen extends ScreenAdapter implements AdvancedResizeScreen { public Stage stage; private Texture background; private Vector3 cameraPosition; @@ -65,7 +65,7 @@ public class MainMenu extends ScreenAdapter implements AdvancedResizeScreen { private ScreenViewport screenViewport; private boolean shaderLoaded; - public MainMenu(RhythmBullet core) { + public MainMenuScreen(RhythmBullet core) { this.core = core; stage = new Stage(new ScreenViewport()); cameraPosition = new Vector3(stage.getCamera().position); @@ -90,7 +90,7 @@ public class MainMenu extends ScreenAdapter implements AdvancedResizeScreen { stage.addActor(mainPage); //End main menu - background = core.getAssetManager().get("RhythmBulletBG.png", Texture.class); + background = core.getAssetManager().get("backgrounds/mainBG.png", Texture.class); keybindPage = new KeybindOptionsPage(core.getDefaultSkin(), core.getAssetManager(), cameraPosition); keybindPage.setPosition(-1f*Gdx.graphics.getWidth(), -1f*Gdx.graphics.getHeight()); diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/screens/LoadingScreen.java b/desktop/src/zero1hd/rhythmbullet/desktop/screens/SplashScreen.java similarity index 88% rename from desktop/src/zero1hd/rhythmbullet/desktop/screens/LoadingScreen.java rename to desktop/src/zero1hd/rhythmbullet/desktop/screens/SplashScreen.java index 30c0beb..b9349bb 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/screens/LoadingScreen.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/screens/SplashScreen.java @@ -13,14 +13,14 @@ import com.badlogic.gdx.utils.viewport.ScreenViewport; import zero1hd.rhythmbullet.RhythmBullet; import zero1hd.rhythmbullet.util.AdvancedResizeScreen; -public class LoadingScreen extends ScreenAdapter implements AdvancedResizeScreen { +public class SplashScreen extends ScreenAdapter implements AdvancedResizeScreen { private Stage stage; private RhythmBullet core; private Texture splash; private Image zero1HD; private boolean done; - public LoadingScreen(RhythmBullet core) { + public SplashScreen(RhythmBullet core) { this.core = core; } @@ -48,7 +48,7 @@ public class LoadingScreen extends ScreenAdapter implements AdvancedResizeScreen if (!done) { Gdx.app.debug("Loading Screen", "queue has all been loaded. Action is done playing."); done = true; - core.setScreen(new MainMenu(core)); + core.setScreen(new MainMenuScreen(core)); zero1HD.remove(); } }