diff --git a/gdxapp4d-app-notepad/pom.xml b/gdxapp4d-app-notepad/pom.xml new file mode 100644 index 00000000..e06631fe --- /dev/null +++ b/gdxapp4d-app-notepad/pom.xml @@ -0,0 +1,9 @@ + + 4.0.0 + + love.distributedrebirth.gdxapp4d + gdxapp4d + 0.0.1-SNAPSHOT + + gdxapp4d-app-notepad + \ No newline at end of file diff --git a/gdxapp4d-app-tosamp/pom.xml b/gdxapp4d-app-tosamp/pom.xml new file mode 100644 index 00000000..36e5c4b1 --- /dev/null +++ b/gdxapp4d-app-tosamp/pom.xml @@ -0,0 +1,9 @@ + + 4.0.0 + + love.distributedrebirth.gdxapp4d + gdxapp4d + 0.0.1-SNAPSHOT + + gdxapp4d-app-tosamp + \ No newline at end of file diff --git a/gdxapp4d-boot-desktop/local-override.xml b/gdxapp4d-boot-desktop/local-override.xml new file mode 100644 index 00000000..f5979bc6 --- /dev/null +++ b/gdxapp4d-boot-desktop/local-override.xml @@ -0,0 +1,8 @@ + + + + ../gdxapp4d-chain-sys-engine/src/chain + ../gdxapp4d-chain-sys-ocean/src/chain + ../gdxapp4d-vrgem4/src/chain + ../gdxapp4d-vrgem4/target/classes + diff --git a/gdxapp4d-boot-desktop/local-ship.xml b/gdxapp4d-boot-desktop/local-ship.xml new file mode 100644 index 00000000..e8d825f3 --- /dev/null +++ b/gdxapp4d-boot-desktop/local-ship.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/gdxapp4d-boot/gdxapp4d-boot-desktop/pom.xml b/gdxapp4d-boot-desktop/pom.xml similarity index 90% rename from gdxapp4d-boot/gdxapp4d-boot-desktop/pom.xml rename to gdxapp4d-boot-desktop/pom.xml index 06b78ff2..b988f688 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-desktop/pom.xml +++ b/gdxapp4d-boot-desktop/pom.xml @@ -2,14 +2,14 @@ 4.0.0 love.distributedrebirth.gdxapp4d - gdxapp4d-boot + gdxapp4d 0.0.1-SNAPSHOT gdxapp4d-boot-desktop love.distributedrebirth.gdxapp4d - gdxapp4d-boot-tos4 + gdxapp4d-tos4 ${project.version} diff --git a/gdxapp4d-boot/gdxapp4d-boot-desktop/src/main/java/love/distributedrebirth/gdxapp/desktop/GDXAppDesktopConfig.java b/gdxapp4d-boot-desktop/src/main/java/love/distributedrebirth/gdxapp4d/boot/desktop/GDXAppDesktopConfig.java similarity index 94% rename from gdxapp4d-boot/gdxapp4d-boot-desktop/src/main/java/love/distributedrebirth/gdxapp/desktop/GDXAppDesktopConfig.java rename to gdxapp4d-boot-desktop/src/main/java/love/distributedrebirth/gdxapp4d/boot/desktop/GDXAppDesktopConfig.java index f2fe2989..05f82405 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-desktop/src/main/java/love/distributedrebirth/gdxapp/desktop/GDXAppDesktopConfig.java +++ b/gdxapp4d-boot-desktop/src/main/java/love/distributedrebirth/gdxapp4d/boot/desktop/GDXAppDesktopConfig.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop; +package love.distributedrebirth.gdxapp4d.boot.desktop; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; diff --git a/gdxapp4d-boot/gdxapp4d-boot-desktop/src/main/java/love/distributedrebirth/gdxapp/desktop/GDXAppDesktopLauncher.java b/gdxapp4d-boot-desktop/src/main/java/love/distributedrebirth/gdxapp4d/boot/desktop/GDXAppDesktopLauncher.java similarity index 81% rename from gdxapp4d-boot/gdxapp4d-boot-desktop/src/main/java/love/distributedrebirth/gdxapp/desktop/GDXAppDesktopLauncher.java rename to gdxapp4d-boot-desktop/src/main/java/love/distributedrebirth/gdxapp4d/boot/desktop/GDXAppDesktopLauncher.java index 02f34960..e28ca625 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-desktop/src/main/java/love/distributedrebirth/gdxapp/desktop/GDXAppDesktopLauncher.java +++ b/gdxapp4d-boot-desktop/src/main/java/love/distributedrebirth/gdxapp4d/boot/desktop/GDXAppDesktopLauncher.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop; +package love.distributedrebirth.gdxapp4d.boot.desktop; import java.util.Arrays; @@ -7,7 +7,7 @@ import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.GDXAppMain; +import love.distributedrebirth.gdxapp4d.tos4.GDXAppTos4; import net.spookygames.gdx.nativefilechooser.desktop.DesktopFileChooser; /** @@ -21,7 +21,7 @@ public class GDXAppDesktopLauncher { int width = GDXAppDesktopConfig.WINDOW_WIDTH; int height = GDXAppDesktopConfig.WINDOW_HEIGHT; - GDXAppMain.INSTANCE.BãßInit(Arrays.asList(arg), width, height, new DesktopFileChooser()); + GDXAppTos4.INSTANCE.BãßInit(Arrays.asList(arg), width, height, new DesktopFileChooser()); Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration(); config.setMaxNetThreads(Runtime.getRuntime().availableProcessors()); @@ -29,7 +29,7 @@ public class GDXAppDesktopLauncher { config.setWindowIcon(FileType.Internal, GDXAppDesktopConfig.WINDOW_ICONS); config.setWindowedMode(width, height); - Lwjgl3Application launcher = new Lwjgl3Application(GDXAppMain.INSTANCE, config); + Lwjgl3Application launcher = new Lwjgl3Application(GDXAppTos4.INSTANCE, config); launcher.exit(); } } diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/icon/window-128.png b/gdxapp4d-boot-desktop/src/main/resources/icon/window-128.png similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/icon/window-128.png rename to gdxapp4d-boot-desktop/src/main/resources/icon/window-128.png diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/icon/window-16.png b/gdxapp4d-boot-desktop/src/main/resources/icon/window-16.png similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/icon/window-16.png rename to gdxapp4d-boot-desktop/src/main/resources/icon/window-16.png diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/icon/window-32.png b/gdxapp4d-boot-desktop/src/main/resources/icon/window-32.png similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/icon/window-32.png rename to gdxapp4d-boot-desktop/src/main/resources/icon/window-32.png diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/GDXAppMain.java b/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/GDXAppMain.java deleted file mode 100644 index 9826168a..00000000 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/GDXAppMain.java +++ /dev/null @@ -1,279 +0,0 @@ -package love.distributedrebirth.gdxapp; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.badlogic.gdx.ApplicationListener; -import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.Screen; -import com.badlogic.gdx.graphics.OrthographicCamera; -import com.badlogic.gdx.graphics.g2d.BitmapFont; -import com.badlogic.gdx.graphics.g2d.SpriteBatch; -import com.badlogic.gdx.utils.ScreenUtils; - -import imgui.ImGui; -import imgui.flag.ImGuiCond; -import imgui.flag.ImGuiWindowFlags; -import imgui.type.ImBoolean; -import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ; -import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ; -import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ; -import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ; -import love.distributedrebirth.bassboonyd.jmx.DefaultEnumBaseᴶᴹˣ; -import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ; -import love.distributedrebirth.bassboonyd.jmx.GuageCounterᴶᴹˣ; -import love.distributedrebirth.gdxapp.desktop.DeskAppContourSection; -import love.distributedrebirth.gdxapp.desktop.DeskAppRenderer; -import love.distributedrebirth.gdxapp.desktop.DeskTopScreen; -import love.distributedrebirth.gdxapp.desktop.DeskTopScreenMenu; -import love.distributedrebirth.gdxapp.music.MusicManager; -import love.distributedrebirth.gdxapp.music.MusicSongType; -import love.distributedrebirth.gdxapp.screen.ScreenCredits; -import love.distributedrebirth.gdxapp.screen.ScreenDesktop1; -import love.distributedrebirth.gdxapp.screen.ScreenDesktop2; -import love.distributedrebirth.gdxapp.screen.ScreenDesktop3; -import love.distributedrebirth.gdxapp.screen.ScreenDesktop4; -import love.distributedrebirth.gdxapp.screen.ScreenHelp; -import love.distributedrebirth.gdxapp.screen.ScreenIntro; -import love.distributedrebirth.gdxapp.screen.ScreenIntroMission; -import love.distributedrebirth.gdxapp.screen.ScreenLoading; -import love.distributedrebirth.numberxd.base2t.Base2PartsFactory; -import love.distributedrebirth.numberxd.base2t.Base2Terminator; -import love.distributedrebirth.numberxd.base2t.part.warp.TOSWarpCore; -import love.distributedrebirth.numberxd.glyph.BaseGlyphSet; -import love.distributedrebirth.unicode4d.atlas.FontAtlas; -import love.distributedrebirth.unicode4d.atlas.FontAtlasDriver; -import love.distributedrebirth.warpme.core.WaterBucket; -import love.distributedrebirth.warpme.core.WaterBucketDriver; -import net.spookygames.gdx.nativefilechooser.NativeFileChooser; - -@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") -@BãßBȍőnClassInfoʸᴰ(name = "GDXAppMain", purpose = "Main loop render dispatcher and bootup.") -@BãßBȍőnPackageInfoʸᴰ(name = "love.distributedrebirth.gdxapp") -public enum GDXAppMain implements DefaultEnumInstanceᴶᴹˣ,ApplicationListener { - - INSTANCE; - - protected Screen screen; - private int lazyIntCnt = 33; - private List args; - public NativeFileChooser fileChooser; - public SpriteBatch batch; - public BitmapFont font; - public OrthographicCamera camera; - public int viewWidth; - public int viewHeight; - public MusicManager music; - public FontAtlas basePlane; - public ImBoolean showImGuiDemo = new ImBoolean(false); - private Map,Screen> screens; - private DeskTopScreenMenu screenMenu; - private final GuageCounterᴶᴹˣ selectScreenCounter; - private final BãßBȍőnCoffinOpenʸᴰ BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance(); - public BãßBȍőnCoffinʸᴰ GET_BBC() { return BBC; } - - private GDXAppMain() { - BBC.BOON_INIT(this); - BȍőnJmxInit(GDXAppMainKeyʸᴰ.JMX); - selectScreenCounter = BȍőnJmxInitGuageCounter(GDXAppMainKeyʸᴰ.JMX, "selectScreenCounter"); - } - - public void BãßInit(List args, int viewWidth, int viewHeight, NativeFileChooser fileChooser) { - this.args = args; - this.viewWidth = viewWidth; - this.viewHeight = viewHeight; - this.fileChooser = fileChooser; - } - - //TODO: add layer or ?? private ,DefaultAuthorInfoʸᴰ> T[] storeInstances() { - @SuppressWarnings("unchecked") - private > T[] coffinInstances() { - return (T[]) new DefaultEnumBaseᴶᴹˣ[] { - BaseGlyphSet.values()[0], - Base2Terminator.INSTANCE, - Base2PartsFactory.INSTANCE, - TOSWarpCore.INSTANCE - }; - } - - private void lazyInit() { - if (lazyIntCnt > 0) { - lazyIntCnt--; - return; - } - ImGuiSetup.init(); - - // ref to init - System.out.println("BãßBȍőnCoffinʸᴰ init......"); - BãßBȍőnCoffinOpenʸᴰ.lockCoffin(this); - for (DefaultEnumBaseᴶᴹˣ coffin:coffinInstances()) { - BãßBȍőnCoffinOpenʸᴰ.lockCoffin(coffin); - } - System.out.println("BãßBȍőnCoffinʸᴰ init done."); - - try { - //basePlane = FontAtlasDriver.newInstance().createReader().readString(Gdx.files.internal("font/unicode4d.xml").readString()); - - - if (args.contains("warpcore-load")) { - System.out.println("warpcore-load: requested"); - WaterBucket bucket = WaterBucketDriver.newInstance().createReader().readFile("./warpcore.xml"); - TOSWarpCore.INSTANCE.BãßArmWarpCore(bucket); - } - if (args.contains("warpcore-save")) { - System.out.println("warpcore-save: requested"); - WaterBucket bucket = TOSWarpCore.INSTANCE.BãßCurrentWarpCore(); - WaterBucketDriver.newInstance().createWriter().writeFile(bucket, "./warpcore.xml"); - } - } catch (Exception e) { - throw new RuntimeException(e); - } - if (!args.contains("warpcore-nolock")) { - System.out.println("warpcore-lock: BãßLockWarpCipher"); - TOSWarpCore.INSTANCE.BãßLockWarpCipher(); - } else { - System.out.println("warpcore-nolock: requested"); - } - if (args.contains("full-screen")) { - System.out.println("full-screen: requested"); - Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode()); - } - if (args.contains("intro-skip")) { - System.out.println("intro-skip: requested"); - selectScreen(ScreenDesktop1.class); - music.play(MusicSongType.BACKGROUND); - } else { - selectScreen(ScreenIntro.class); - } - } - - private void putScreen(Screen screen) { - screens.put(screen.getClass(), screen); - } - - public void selectScreen(Class screenClass) { - Screen screen = screens.get(screenClass); - if (screen == null) { - throw new NullPointerException("Unknow screen: "+screenClass); - } - selectScreenCounter.increment(); - if (this.screen != null) this.screen.hide(); - this.screen = screen; - if (this.screen != null) { - this.screen.show(); - this.screen.resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); - } - } - - @Override - public void create() { - batch = new SpriteBatch(); - font = new BitmapFont(); - camera = new OrthographicCamera(); - - camera.setToOrtho(false, viewWidth, viewHeight); - camera.update(); - batch.setProjectionMatrix(camera.combined); - - boolean musicStop = args.contains("music-stop"); - if (musicStop) { - System.out.println("music-stop: requested"); - } - music = new MusicManager(); - music.init(musicStop); - - screens = new HashMap<>(); - - DeskTopScreen desktop1 = new ScreenDesktop1(this); - DeskTopScreen desktop2 = new ScreenDesktop2(this); - DeskTopScreen desktop3 = new ScreenDesktop3(); - DeskTopScreen desktop4 = new ScreenDesktop4(); - screenMenu = new DeskTopScreenMenu(desktop1, desktop2, desktop3, desktop4); - - putScreen(new ScreenLoading()); - putScreen(new ScreenIntro()); - putScreen(new ScreenIntroMission()); - putScreen(desktop1); - putScreen(desktop2); - putScreen(desktop3); - putScreen(desktop4); - putScreen(new ScreenCredits()); - putScreen(new ScreenHelp()); - - selectScreen(ScreenLoading.class); - } - - @Override - public void resize(int width, int height) { - if (screen != null) screen.resize(width, height); - } - - @Override - public void render() { - ScreenUtils.clear(0f, 0f, 0f, 1f, true); - if (screen == null) { - return; - } - if (screen instanceof ScreenLoading) { - screen.render(Gdx.graphics.getDeltaTime()); - lazyInit(); - return; - } - ImGuiSetup.imGuiImp.newFrame(); - ImGui.newFrame(); - - DeskTopScreen appScreen = null; - if (screen instanceof DeskTopScreen) { - appScreen = DeskTopScreen.class.cast(screen); - screenMenu.renderMenu(appScreen); - } - if (showImGuiDemo.get()) { - ImGui.showDemoWindow(showImGuiDemo); - } - if (appScreen != null && appScreen.getDeskAppScreen().getCurrentDeskApp() != null) { - int sizeFlags = ImGuiCond.Always; - ImGui.setNextWindowPos(0, 28, sizeFlags); - ImGui.setNextWindowSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight() - 28, sizeFlags); - int windowFlags = ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoTitleBar; - if (ImGui.begin(appScreen.getDeskAppScreen().getCurrentDeskApp().getTitle(), windowFlags)) { - DeskAppRenderer renderer = appScreen.getDeskAppScreen().getCurrentDeskApp().getContours().getContour(DeskAppContourSection.MAIN); - if (renderer != null) { - renderer.render(); - } - } - ImGui.end(); - } - if (screen != null) { - screen.render(Gdx.graphics.getDeltaTime()); - } - ImGui.render(); - ImGuiSetup.imGuiGlImp.renderDrawData(ImGui.getDrawData()); - } - - @Override - public void pause() { - if (screen != null) { - screen.pause(); - } - } - - @Override - public void resume() { - if (screen != null) { - screen.resume(); - } - } - - @Override - public void dispose() { - ImGuiSetup.dispose(); - for (Screen screen:screens.values()) { - screen.dispose(); - } - music.dispose(); - batch.dispose(); - font.dispose(); - } -} diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/AbstractScreenDesktop.java b/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/AbstractScreenDesktop.java deleted file mode 100644 index 0f3ddafc..00000000 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/AbstractScreenDesktop.java +++ /dev/null @@ -1,116 +0,0 @@ -package love.distributedrebirth.gdxapp.screen; - -import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.ScreenAdapter; -import com.badlogic.gdx.graphics.GL20; -import com.badlogic.gdx.graphics.PerspectiveCamera; -import com.badlogic.gdx.graphics.g3d.ModelBatch; -import com.badlogic.gdx.graphics.g3d.ModelInstance; -import com.badlogic.gdx.graphics.g3d.utils.FirstPersonCameraController; -import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder; -import com.badlogic.gdx.utils.Array; - -import love.distributedrebirth.gdxapp.desktop.DeskApp; -import love.distributedrebirth.gdxapp.desktop.DeskAppScreen; -import love.distributedrebirth.gdxapp.desktop.DeskAppScreenListener; -import love.distributedrebirth.gdxapp.desktop.DeskTopInputProcessor; -import love.distributedrebirth.gdxapp.desktop.DeskTopScreen; - -public abstract class AbstractScreenDesktop extends ScreenAdapter implements DeskTopScreen { - - private final DeskAppScreen deskAppScreen; - private PerspectiveCamera cam; - private FirstPersonCameraController camController; - private DeskTopInputProcessor inputFilter; - private ModelBatch modelBatch; - private Array modelInstances = new Array(); - - public AbstractScreenDesktop(String name) { - this.create(); - deskAppScreen = new DeskAppScreen(name); - deskAppScreen.addDeskAppListener(new DeskAppScreenListener() { - - @Override - public void selectDeskApp(DeskApp deskApp) { - if (deskApp == null) { - inputFilter.setFiltering(false); - } else { - inputFilter.setFiltering(true); - } - } - }); - } - - protected void createModel(ModelBuilder modelBuilder, Array modelInstances) { - - } - - private void create() { - modelBatch = new ModelBatch(); - - cam = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); - cam.position.set(10f, 10f, 10f); - cam.lookAt(0, 0, 0); - cam.near = 1f; - cam.far = 300f; - cam.update(); - - ModelBuilder modelBuilder = new ModelBuilder(); - createModel(modelBuilder, modelInstances); - - camController = new FirstPersonCameraController(cam); - //camController = new CameraInputController(cam); - - inputFilter = new DeskTopInputProcessor(camController); - } - - @Override - public final void show() { - Gdx.input.setInputProcessor(inputFilter); - showDesktop(); - } - - protected void showDesktop() { - } - - @Override - public final void hide() { - Gdx.input.setInputProcessor(null); - hideDesktop(); - } - - protected void hideDesktop() { - } - - @Override - public final void dispose() { - modelBatch.dispose(); - disposeDesktop(); - } - - protected void disposeDesktop() { - } - - @Override - public final void render(float delta) { - camController.update(); - - Gdx.gl.glViewport(0, 0, Gdx.graphics.getBackBufferWidth(), Gdx.graphics.getBackBufferHeight()); - Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); - - renderDesktop(delta, modelBatch, cam, modelInstances); - } - - protected void renderDesktop(float delta, ModelBatch modelBatch, PerspectiveCamera cam, Array modelInstances) { - modelBatch.begin(cam); - for (ModelInstance instance : modelInstances) { - modelBatch.render(instance); - } - modelBatch.end(); - } - - @Override - public DeskAppScreen getDeskAppScreen() { - return deskAppScreen; - } -} diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenDesktop1.java b/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenDesktop1.java deleted file mode 100644 index c075a0e2..00000000 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenDesktop1.java +++ /dev/null @@ -1,40 +0,0 @@ -package love.distributedrebirth.gdxapp.screen; - -import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.ScreenAdapter; -import com.badlogic.gdx.graphics.Texture; - -import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.GDXAppMain; -import love.distributedrebirth.gdxapp.desktop.DeskAppScreen; -import love.distributedrebirth.gdxapp.desktop.DeskTopScreen; - -@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") -public class ScreenDesktop1 extends ScreenAdapter implements DeskTopScreen { - private final GDXAppMain main; - private DeskAppScreen deskAppScreen; - private Texture backgroundImage; - - public ScreenDesktop1(final GDXAppMain main) { - this.main = main; - deskAppScreen = new DeskAppScreen("Desktop1"); - backgroundImage = new Texture(Gdx.files.internal("background/terrydavis-front.png")); - } - - @Override - public void render(float delta) { - main.batch.begin(); - main.batch.draw(backgroundImage, 0, 0, main.viewWidth, main.viewHeight); - main.batch.end(); - } - - @Override - public void dispose() { - backgroundImage.dispose(); - } - - @Override - public DeskAppScreen getDeskAppScreen() { - return deskAppScreen; - } -} diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenDesktop2.java b/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenDesktop2.java deleted file mode 100644 index 450759bf..00000000 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenDesktop2.java +++ /dev/null @@ -1,40 +0,0 @@ -package love.distributedrebirth.gdxapp.screen; - -import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.ScreenAdapter; -import com.badlogic.gdx.graphics.Texture; - -import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.GDXAppMain; -import love.distributedrebirth.gdxapp.desktop.DeskAppScreen; -import love.distributedrebirth.gdxapp.desktop.DeskTopScreen; - -@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") -public class ScreenDesktop2 extends ScreenAdapter implements DeskTopScreen { - private final GDXAppMain main; - private DeskAppScreen deskAppScreen; - private Texture backgroundImage; - - public ScreenDesktop2(final GDXAppMain main) { - this.main = main; - deskAppScreen = new DeskAppScreen("Desktop2"); - backgroundImage = new Texture(Gdx.files.internal("background/terrydavis-nose.png")); - } - - @Override - public void render(float delta) { - main.batch.begin(); - main.batch.draw(backgroundImage, 0, 0, main.viewWidth, main.viewHeight); - main.batch.end(); - } - - @Override - public void dispose() { - backgroundImage.dispose(); - } - - @Override - public DeskAppScreen getDeskAppScreen() { - return deskAppScreen; - } -} diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenLoading.java b/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenLoading.java deleted file mode 100644 index 73b74e19..00000000 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenLoading.java +++ /dev/null @@ -1,29 +0,0 @@ -package love.distributedrebirth.gdxapp.screen; - -import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.ScreenAdapter; -import com.badlogic.gdx.graphics.Texture; - -import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.GDXAppMain; - -@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") -public class ScreenLoading extends ScreenAdapter { - private Texture backgroundImage; - - public ScreenLoading() { - backgroundImage = new Texture(Gdx.files.internal("background/gdxapp-loading.png")); - } - - @Override - public void render(float delta) { - GDXAppMain.INSTANCE.batch.begin(); - GDXAppMain.INSTANCE.batch.draw(backgroundImage, 0, 0, GDXAppMain.INSTANCE.viewWidth, GDXAppMain.INSTANCE.viewHeight); - GDXAppMain.INSTANCE.batch.end(); - } - - @Override - public void dispose() { - backgroundImage.dispose(); - } -} diff --git a/gdxapp4d-chain/pom.xml b/gdxapp4d-chain-music-msx/pom.xml similarity index 87% rename from gdxapp4d-chain/pom.xml rename to gdxapp4d-chain-music-msx/pom.xml index f2395680..75d80052 100644 --- a/gdxapp4d-chain/pom.xml +++ b/gdxapp4d-chain-music-msx/pom.xml @@ -5,6 +5,6 @@ gdxapp4d 0.0.1-SNAPSHOT - gdxapp4d-chain + gdxapp4d-chain-music-msx pom \ No newline at end of file diff --git a/gdxapp4d-chain-music-templeos/pom.xml b/gdxapp4d-chain-music-templeos/pom.xml new file mode 100644 index 00000000..3d2bf017 --- /dev/null +++ b/gdxapp4d-chain-music-templeos/pom.xml @@ -0,0 +1,10 @@ + + 4.0.0 + + love.distributedrebirth.gdxapp4d + gdxapp4d + 0.0.1-SNAPSHOT + + gdxapp4d-chain-music-templeos + pom + \ No newline at end of file diff --git a/gdxapp4d-chain-music-templeos/src/chain/music/000-playlist.m3u b/gdxapp4d-chain-music-templeos/src/chain/music/000-playlist.m3u new file mode 100644 index 00000000..aa785a29 --- /dev/null +++ b/gdxapp4d-chain-music-templeos/src/chain/music/000-playlist.m3u @@ -0,0 +1,26 @@ +#EXTM3U +#PLAYLIST:Music TempleOS +#EXTALB:Best of Youtube (2022) +#EXTART:Various +#EXTGENRE:Electropump + +#EXTINF:123,Panoramacircle - Waterfowl +panoramacircle-waterfowl.mp3 + +#EXTINF:123,Sanctumwave - Devine Intellect +sanctumwave-devine-intellect.mp3 + +#EXTINF:123,Sanctumwave - nightwalk +sanctumwave-nightwalk.mp3 + +#EXTINF:123,The Self Help Group - TempleOS +theselfhelpgroup-temple-os.mp3 + +#EXTINF:123,Sanctumwave - Risen +sanctumwave-risen.mp3 + +#EXTINF:123,Beeble - I used TempleOS to write a song +beeble-i-used-temple-os-to-write.mp3 + +#EXTINF:123,Ryanfarran - Risen TempleOS +ryanfarran-risen-temple-os.mp3 diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/beeble-i-used-temple-os-to-write.mp3 b/gdxapp4d-chain-music-templeos/src/chain/music/beeble-i-used-temple-os-to-write.mp3 similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/beeble-i-used-temple-os-to-write.mp3 rename to gdxapp4d-chain-music-templeos/src/chain/music/beeble-i-used-temple-os-to-write.mp3 diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/panoramacircle-waterfowl.mp3 b/gdxapp4d-chain-music-templeos/src/chain/music/panoramacircle-waterfowl.mp3 similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/panoramacircle-waterfowl.mp3 rename to gdxapp4d-chain-music-templeos/src/chain/music/panoramacircle-waterfowl.mp3 diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/ryanfarran-risen-temple-os.mp3 b/gdxapp4d-chain-music-templeos/src/chain/music/ryanfarran-risen-temple-os.mp3 similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/ryanfarran-risen-temple-os.mp3 rename to gdxapp4d-chain-music-templeos/src/chain/music/ryanfarran-risen-temple-os.mp3 diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/sanctumwave-devine-intellect.mp3 b/gdxapp4d-chain-music-templeos/src/chain/music/sanctumwave-devine-intellect.mp3 similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/sanctumwave-devine-intellect.mp3 rename to gdxapp4d-chain-music-templeos/src/chain/music/sanctumwave-devine-intellect.mp3 diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/sanctumwave-nightwalk.mp3 b/gdxapp4d-chain-music-templeos/src/chain/music/sanctumwave-nightwalk.mp3 similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/sanctumwave-nightwalk.mp3 rename to gdxapp4d-chain-music-templeos/src/chain/music/sanctumwave-nightwalk.mp3 diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/sanctumwave-risen.mp3 b/gdxapp4d-chain-music-templeos/src/chain/music/sanctumwave-risen.mp3 similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/sanctumwave-risen.mp3 rename to gdxapp4d-chain-music-templeos/src/chain/music/sanctumwave-risen.mp3 diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/theselfhelpgroup-temple-os.mp3 b/gdxapp4d-chain-music-templeos/src/chain/music/theselfhelpgroup-temple-os.mp3 similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/theselfhelpgroup-temple-os.mp3 rename to gdxapp4d-chain-music-templeos/src/chain/music/theselfhelpgroup-temple-os.mp3 diff --git a/gdxapp4d-chain-music-templeos/src/chain/warp-sea.xml b/gdxapp4d-chain-music-templeos/src/chain/warp-sea.xml new file mode 100644 index 00000000..f932b61c --- /dev/null +++ b/gdxapp4d-chain-music-templeos/src/chain/warp-sea.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/gdxapp4d-boot/pom.xml b/gdxapp4d-chain-sys-engine/pom.xml similarity index 73% rename from gdxapp4d-boot/pom.xml rename to gdxapp4d-chain-sys-engine/pom.xml index 3cfd2233..3de93adc 100644 --- a/gdxapp4d-boot/pom.xml +++ b/gdxapp4d-chain-sys-engine/pom.xml @@ -5,10 +5,6 @@ gdxapp4d 0.0.1-SNAPSHOT - gdxapp4d-boot + gdxapp4d-chain-sys-engine pom - - gdxapp4d-boot-desktop - gdxapp4d-boot-tos4 - \ No newline at end of file diff --git a/gdxapp4d-chain-sys-engine/src/chain/warp-sea.xml b/gdxapp4d-chain-sys-engine/src/chain/warp-sea.xml new file mode 100644 index 00000000..1e56813e --- /dev/null +++ b/gdxapp4d-chain-sys-engine/src/chain/warp-sea.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/gdxapp4d-chain-sys-ocean/pom.xml b/gdxapp4d-chain-sys-ocean/pom.xml new file mode 100644 index 00000000..d64abab1 --- /dev/null +++ b/gdxapp4d-chain-sys-ocean/pom.xml @@ -0,0 +1,10 @@ + + 4.0.0 + + love.distributedrebirth.gdxapp4d + gdxapp4d + 0.0.1-SNAPSHOT + + gdxapp4d-chain-sys-ocean + pom + \ No newline at end of file diff --git a/gdxapp4d-chain-sys-ocean/src/chain/warp-sea.xml b/gdxapp4d-chain-sys-ocean/src/chain/warp-sea.xml new file mode 100644 index 00000000..9bb29992 --- /dev/null +++ b/gdxapp4d-chain-sys-ocean/src/chain/warp-sea.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/core/WaterBucketDriverTest.java b/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/core/WaterBucketDriverTest.java index dc251cf2..a9ffece5 100644 --- a/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/core/WaterBucketDriverTest.java +++ b/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/core/WaterBucketDriverTest.java @@ -34,6 +34,6 @@ public class WaterBucketDriverTest { cipher.addCipherHeart(heart); Assertions.assertNotNull(bucket); - WaterBucketDriver.newInstance().createWriter().writeFile(bucket, new java.io.File("build/out-core.xml")); + WaterBucketDriver.newInstance().createWriter().writeFile(bucket, new java.io.File("target/out-core.xml")); } } \ No newline at end of file diff --git a/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/hash/WaterShotDriverTest.java b/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/hash/WaterShotDriverTest.java index 02b8c65f..55f1f58d 100644 --- a/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/hash/WaterShotDriverTest.java +++ b/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/hash/WaterShotDriverTest.java @@ -21,6 +21,6 @@ public class WaterShotDriverTest { drugs.addSoftHash(new WaterSoftHash("test2.txt", "ASDFYYF234234SDFSDFASDFS")); Assertions.assertNotNull(drugs); - WaterShotDriver.newInstance().createWriter().writeFile(drugs, new java.io.File("build/out-hash.xml")); + WaterShotDriver.newInstance().createWriter().writeFile(drugs, new java.io.File("target/out-hash.xml")); } } \ No newline at end of file diff --git a/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/sea/WaterOceanDriverTest.java b/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/sea/WaterOceanDriverTest.java index 3ee17a2c..06ebff23 100644 --- a/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/sea/WaterOceanDriverTest.java +++ b/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/sea/WaterOceanDriverTest.java @@ -29,6 +29,6 @@ public class WaterOceanDriverTest { sea.addSeaMagic(new WaterSeaMagic("inode/directory", "album/")); Assertions.assertNotNull(ocean); - WaterOceanDriver.newInstance().createWriter().writeFile(ocean, new java.io.File("build/out-sea.xml")); + WaterOceanDriver.newInstance().createWriter().writeFile(ocean, new java.io.File("target/out-sea.xml")); } } \ No newline at end of file diff --git a/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/ship/WaterDeviceDriverTest.java b/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/ship/WaterDeviceDriverTest.java index 7691a95d..2b6401e9 100644 --- a/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/ship/WaterDeviceDriverTest.java +++ b/gdxapp4d-lib/gdxapp4d-lib-warpme/src/test/java/love/distributedrebirth/warpme/ship/WaterDeviceDriverTest.java @@ -26,6 +26,6 @@ public class WaterDeviceDriverTest { device.buildShip(ship); Assertions.assertNotNull(device); - WaterDeviceDriver.newInstance().createWriter().writeFile(device, new java.io.File("build/out-ship.xml")); + WaterDeviceDriver.newInstance().createWriter().writeFile(device, new java.io.File("target/out-ship.xml")); } } \ No newline at end of file diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/pom.xml b/gdxapp4d-tos4/pom.xml similarity index 50% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/pom.xml rename to gdxapp4d-tos4/pom.xml index 96b5bfdd..74cdd2dd 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/pom.xml +++ b/gdxapp4d-tos4/pom.xml @@ -2,10 +2,11 @@ 4.0.0 love.distributedrebirth.gdxapp4d - gdxapp4d-boot + gdxapp4d 0.0.1-SNAPSHOT - gdxapp4d-boot-tos4 + gdxapp4d-tos4 + bundle love.distributedrebirth.gdxapp4d @@ -35,5 +36,33 @@ games.spooky.gdx gdx-nativefilechooser + + org.apache.felix + org.apache.felix.framework + + + ch.qos.logback + logback-classic + + + + + org.apache.felix + maven-bundle-plugin + true + + + <_donotcopy>(.git) + org.osgi.framework,org.osgi.service.packageadmin,org.osgi.service.url,org.osgi.service.startlevel,org.osgi.util.tracker,* + love.distributedrebirth.gdxapp4d.tos4.service + love.distributedrebirth.gdxapp4d.tos4.* + *;artifactId=org.apache.felix.framework;inline=true,*;artifactId=gdxapp4d-lib-bassboonyd;inline=true + love.distributedrebirth.gdxapp4d.tos4.GDXAppTos4Activator + distributedrebirth.love + + + + + \ No newline at end of file diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4.java new file mode 100644 index 00000000..e8c02e86 --- /dev/null +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4.java @@ -0,0 +1,121 @@ +package love.distributedrebirth.gdxapp4d.tos4; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.osgi.framework.BundleException; +import org.osgi.framework.launch.Framework; + +import com.badlogic.gdx.ApplicationListener; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.Screen; +import com.badlogic.gdx.utils.ScreenUtils; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ; +import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ; +import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ; +import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ; +import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ; +import love.distributedrebirth.bassboonyd.jmx.GuageCounterᴶᴹˣ; +import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpTerminal; +import net.spookygames.gdx.nativefilechooser.NativeFileChooser; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +@BãßBȍőnClassInfoʸᴰ(name = "GDXAppTos4", purpose = "Main loop render dispatcher and bootup.") +@BãßBȍőnPackageInfoʸᴰ(name = "love.distributedrebirth.gdxapp4d.tos4") +public enum GDXAppTos4 implements DefaultEnumInstanceᴶᴹˣ, ApplicationListener, SystemWarpTerminal { + + INSTANCE; + + private Screen screen; + private Framework systemBundle; + private GDXAppTos4Activator systemActivator; + private Map,Screen> screens; + private NativeFileChooser fileChooser; + private final GuageCounterᴶᴹˣ selectScreenCounter; + private final BãßBȍőnCoffinOpenʸᴰ BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance(); + public BãßBȍőnCoffinʸᴰ GET_BBC() { return BBC; } + + private GDXAppTos4() { + BBC.BOON_INIT(this); + BȍőnJmxInit(GDXAppTos4Keyʸᴰ.JMX); + selectScreenCounter = BȍőnJmxInitGuageCounter(GDXAppTos4Keyʸᴰ.JMX, "selectScreenCounter"); + } + + public void BãßInit(List args, int viewWidth, int viewHeight, NativeFileChooser fileChooser) { + this.fileChooser = fileChooser; + screens = new HashMap<>(); + systemActivator = new GDXAppTos4Activator(); + systemActivator.BãßInit(args, viewWidth, viewHeight, this); + } + + @Override + public void create() { + systemBundle = GDXAppTos4Startup.init(this, systemActivator); + } + + @Override + public void resize(int width, int height) { + screen.resize(width, height); + } + + @Override + public void render() { + ScreenUtils.clear(0f, 0f, 0f, 1f, true); + screen.render(Gdx.graphics.getDeltaTime()); + } + + @Override + public void pause() { + screen.pause(); + } + + @Override + public void resume() { + screen.resume(); + } + + @Override + public void dispose() { + for (Screen screen:screens.values()) { + screen.dispose(); + } + try { + systemBundle.stop(); + } catch (BundleException e) { + throw new RuntimeException(e); + } + } + + @Override + public void registrateScreen(Screen screen) { + screens.put(screen.getClass(), screen); + } + + @Override + public void disposeScreen(Screen screen) { + screens.remove(screen.getClass()); + screen.dispose(); + } + + @Override + public void selectScreen(Class screenClass) { + Screen screen = screens.get(screenClass); + if (screen == null) { + throw new NullPointerException("Unknow screen: "+screenClass); + } + if (this.screen != null) { + this.screen.hide(); + } + this.screen = screen; + this.screen.show(); + this.screen.resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); + selectScreenCounter.increment(); + } + + public NativeFileChooser getFileChooser() { + return fileChooser; + } +} diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Activator.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Activator.java new file mode 100644 index 00000000..98eb9d12 --- /dev/null +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Activator.java @@ -0,0 +1,272 @@ +package love.distributedrebirth.gdxapp4d.tos4; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.List; +import java.util.Properties; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.BundleException; +import org.x4o.xml.io.X4OConnectionException; +import org.xml.sax.SAXException; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBase; +import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs; +import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpSea; +import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpShip; +import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpTerminal; +import love.distributedrebirth.warpme.Warpᵐᵉ; +import love.distributedrebirth.warpme.sea.WaterOcean; +import love.distributedrebirth.warpme.sea.WaterOceanDriver; +import love.distributedrebirth.warpme.sea.WaterSeaChain; +import love.distributedrebirth.warpme.sea.WaterSeaMagic; +import love.distributedrebirth.warpme.ship.WaterDevice; +import love.distributedrebirth.warpme.ship.WaterDeviceDriver; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class GDXAppTos4Activator implements BundleActivator { + + public List args; + public int viewWidth; + public int viewHeight; + private File hyperdriveHome; + private File warpshipHome; + private WaterDevice warpshipDevice; + private SystemWarpTerminal systemWarpTerminal; + private List listeners = new ArrayList<>(); + + private static final String SYSTEM_USER_HOME = "user.home"; + private static final String HYPERDRIVE_HOME = "Hyperdrive"; + private static final String WARPSHIP_HOME = "Warpship"; + + public GDXAppTos4Activator() { + } + + public void BãßInit(List args, int viewWidth, int viewHeight, SystemWarpTerminal systemWarpTerminal) { + this.args = args; + this.viewWidth = viewWidth; + this.viewHeight = viewHeight; + this.systemWarpTerminal = systemWarpTerminal; + } + + private void fireMessageEvent(String message) { + for (GDXAppTos4BootListener listener:listeners) { + listener.bootLine(message); + } + } + + public void addBootListener(GDXAppTos4BootListener listener) { + listeners.add(listener); + } + + public void removeBootListener(GDXAppTos4BootListener listener) { + listeners.remove(listener); + } + + @Override + public void stop(final BundleContext context) { + } + + @Override + public void start(final BundleContext context) { + fireMessageEvent("Mecca System eXtension superscript Four"); + fireMessageEvent("tos4: starting..."); + fireMessageEvent("init-cpus: "+Runtime.getRuntime().availableProcessors()); + fireMessageEvent("free-memory: 0x"+Long.toHexString(Runtime.getRuntime().freeMemory())); + + boolean useLocal = args.contains("use-local"); + + File userHome = new File(System.getProperty(SYSTEM_USER_HOME)); + hyperdriveHome = new File(userHome, HYPERDRIVE_HOME); + fireMessageEvent("hyper-home: "+hyperdriveHome); + if (!hyperdriveHome.exists()) { + fireMessageEvent("ERROR: No Hyperdrive home."); + return; + } + warpshipHome = new File(hyperdriveHome, WARPSHIP_HOME); + if (useLocal) { + warpshipHome = new File("."); + } + if (!warpshipHome.exists()) { + fireMessageEvent("ERROR: No Warpship home."); + return; + } + File warpShip = new File(warpshipHome, Warpᵐᵉ.WARP_SHIP); + if (useLocal) { + warpShip = new File(warpshipHome, "local-ship.xml"); + } + fireMessageEvent("warp-ship: "+warpShip); + if (!warpShip.exists()) { + fireMessageEvent("ERROR: No warp-ship.xml found."); + return; + } + + context.registerService(SystemWarpBase.class.getName(), new SystemWarpBaseImpl(), new Hashtable()); + context.registerService(SystemWarpBootArgs.class.getName(), new SystemWarpBootArgsImpl(), new Hashtable()); + context.registerService(SystemWarpShip.class.getName(), new SystemWarpShipImpl(), new Hashtable()); + context.registerService(SystemWarpTerminal.class.getName(), systemWarpTerminal, new Hashtable()); + + try { + warpshipDevice = WaterDeviceDriver.newInstance().createReader().readFile(warpShip); + } catch (Exception e) { + e.printStackTrace(); + fireMessageEvent("ERROR: "+e.getMessage()); + return; + } + fireMessageEvent("warp-engine: "+warpshipDevice.theShip().getName()); + + Properties overrides = new Properties(); + if (useLocal) { + File localOverride = new File("local-override.xml"); + if (localOverride.exists()) { + try { + overrides.loadFromXML(new FileInputStream(localOverride)); + } catch (Exception e) { + throw new RuntimeException(e); + } + fireMessageEvent("use-local: local-override.xml loaded."); + } else { + fireMessageEvent("use-local: local-override.xml not found."); + } + + } + int result = 0; + try { + result = resolveWaterOcean(overrides, context, warpshipDevice.theShip().getEngine()); + } catch (Exception e) { + e.printStackTrace(); + fireMessageEvent("ERROR: "+e.getMessage()); + return; + } + if (result > 0) { + fireMessageEvent("tos4: FAILURE BOOT ABORTED"); + } else { + fireMessageEvent("tos4: chains resolved."); + } + } + + private int resolveWaterOcean(Properties overrides, BundleContext context, String key) throws IOException, InterruptedException, X4OConnectionException, SAXException, BundleException { + File waterHome; + String override = overrides.getProperty(key); + if (override == null) { + waterHome = new File(hyperdriveHome, key); + if (!waterHome.exists()) { + executeHyperdrive("hyperdrive", "mount", waterHome.getAbsolutePath(), key); + } + String infoResult = executeHyperdrive("hyperdrive", "info", waterHome.getAbsolutePath()); + if (!infoResult.startsWith("Drive Info")) { + fireMessageEvent("ERROR: Couldn't get info on: "+waterHome); + return 1; + } + } else { + waterHome = new File(override); + } + File waterSea = new File(waterHome, Warpᵐᵉ.WARP_SEA); + if (!waterSea.exists()) { + fireMessageEvent("ERROR: No warp-sea.xml found."); + return 1; + } + WaterOcean ocean = WaterOceanDriver.newInstance().createReader().readFile(waterSea); + fireMessageEvent("water-ocean: "+key+" ("+ocean.theWater().getName()+")"); + + Hashtable props = new Hashtable(); + props.put(SystemWarpSea.NAME_PROPERTY, ocean.theWater().getName()); + props.put(SystemWarpSea.PROVIDER_PROPERTY, ocean.theWater().getProvider()); + context.registerService(SystemWarpSea.class.getName(), new SystemWarpSeaImpl(ocean), props); + + for (WaterSeaMagic magic:ocean.theWater().getSeaMagics()) { + if ("application/vnd.osgi.bundle".equals(magic.getMime())) { + String overrideBundleKey = key + "." + magic.getFile(); + String overrideBundle = overrides.getProperty(overrideBundleKey); + if (overrideBundle == null) { + GDXAppTos4BootFactory.installAndStartBundles(context, "reference:file:"+waterHome.getAbsolutePath()+"/"+magic.getFile()); + } else { + GDXAppTos4BootFactory.installAndStartBundles(context, "reference:file:"+overrideBundle); + } + } + } + int result = 0; + for (WaterSeaChain chain: ocean.theWater().getSeaChains()) { + result += resolveWaterOcean(overrides, context, chain.getKey()); + } + return result; + } + + private String executeHyperdrive(String...cmd) throws IOException, InterruptedException { + ProcessBuilder builder = new ProcessBuilder(); + builder.command(cmd); + builder.directory(new File(System.getProperty("user.home"))); + Process process = builder.start(); + StringBuilder buf = new StringBuilder(); + try(BufferedReader input = new BufferedReader(new InputStreamReader(process.getInputStream()))) { + String line; + while ((line = input.readLine()) != null) { + buf.append(line); + } + } + process.waitFor(); + return buf.toString(); + } + + public class SystemWarpSeaImpl implements SystemWarpSea { + + private final WaterOcean warpSea; + + public SystemWarpSeaImpl(WaterOcean warpSea) { + this.warpSea = warpSea; + } + + @Override + public WaterOcean getWarpSea() { + return warpSea; + } + } + + public class SystemWarpBaseImpl implements SystemWarpBase { + + @Override + public File getHyperdriveHome() { + return hyperdriveHome; + } + + @Override + public File getWarpshipHome() { + return warpshipHome; + } + + } + + public class SystemWarpBootArgsImpl implements SystemWarpBootArgs { + + @Override + public List getBootArgs() { + return args; + } + + @Override + public int getBootWindowWidth() { + return viewWidth; + } + + @Override + public int getBootWindowHeight() { + return viewHeight; + } + + } + + public class SystemWarpShipImpl implements SystemWarpShip { + + @Override + public WaterDevice getWarpShip() { + return warpshipDevice; + } + } +} diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4BootFactory.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4BootFactory.java new file mode 100644 index 00000000..63d60810 --- /dev/null +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4BootFactory.java @@ -0,0 +1,149 @@ +package love.distributedrebirth.gdxapp4d.tos4; + +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.ServiceLoader; + +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.osgi.framework.BundleException; +import org.osgi.framework.Constants; +import org.osgi.framework.launch.Framework; +import org.osgi.framework.launch.FrameworkFactory; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class GDXAppTos4BootFactory { + + public static void installAndStartBundles(BundleContext bundleContext, String... bundleLocations) throws BundleException { + for (String location : bundleLocations) { + Bundle addition = bundleContext.installBundle(location); + addition.start(); + } + } + + public static Framework createFramework() { + return createFramework(buildConfig()); + } + + public static Framework createFramework(Map config) { + ServiceLoader factoryLoader = ServiceLoader.load(FrameworkFactory.class); + for (FrameworkFactory factory : factoryLoader) { + return factory.newFramework(config); + } + throw new IllegalStateException("Unable to load FrameworkFactory service."); + } + + public static Map buildConfig() { + final File cachedir = createCacheDir(); + + Map configMap = new HashMap(); + configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, + "love.distributedrebirth.gdxapp4d.tos4.service,"+ + "com.badlogic.gdx,"+ + "com.badlogic.gdx.assets,"+ + "com.badlogic.gdx.assets.loaders,"+ + "com.badlogic.gdx.assets.loaders.resolvers,"+ + "com.badlogic.gdx.audio,"+ + "com.badlogic.gdx.files,"+ + "com.badlogic.gdx.graphics,"+ + "com.badlogic.gdx.graphics.g2d,"+ + "com.badlogic.gdx.graphics.g3d,"+ + "com.badlogic.gdx.graphics.g3d.attributes,"+ + "com.badlogic.gdx.graphics.g3d.decals,"+ + "com.badlogic.gdx.graphics.g3d.environment,"+ + "com.badlogic.gdx.graphics.g3d.loader,"+ + "com.badlogic.gdx.graphics.g3d.model,"+ + "com.badlogic.gdx.graphics.g3d.model.data,"+ + "com.badlogic.gdx.graphics.g3d.particles,"+ + "com.badlogic.gdx.graphics.g3d.particles.bactches,"+ + "com.badlogic.gdx.graphics.g3d.particles.emitters,"+ + "com.badlogic.gdx.graphics.g3d.particles.influencers,"+ + "com.badlogic.gdx.graphics.g3d.particles.renderers,"+ + "com.badlogic.gdx.graphics.g3d.particles.values,"+ + "com.badlogic.gdx.graphics.g3d.shaders,"+ + "com.badlogic.gdx.graphics.g3d.utils,"+ + "com.badlogic.gdx.graphics.g3d.utils.shapebuilders,"+ + "com.badlogic.gdx.graphics.glutils,"+ + "com.badlogic.gdx.graphics.profiling,"+ + "com.badlogic.gdx.input,"+ + "com.badlogic.gdx.maps,"+ + "com.badlogic.gdx.maps.objects,"+ + "com.badlogic.gdx.maps.tiled,"+ + "com.badlogic.gdx.maps.tiled.objects,"+ + "com.badlogic.gdx.maps.tiled.renderers,"+ + "com.badlogic.gdx.maps.tiled.tiles,"+ + "com.badlogic.gdx.math,"+ + "com.badlogic.gdx.math.collision,"+ + "com.badlogic.gdx.net,"+ + "com.badlogic.gdx.scenes.scene2d,"+ + "com.badlogic.gdx.scenes.scene2d.actions,"+ + "com.badlogic.gdx.scenes.scene2d.ui,"+ + "com.badlogic.gdx.scenes.scene2d.utils,"+ + "com.badlogic.gdx.utils,"+ + "com.badlogic.gdx.utils.async,"+ + "com.badlogic.gdx.utils.compression,"+ + "com.badlogic.gdx.utils.compression.lz,"+ + "com.badlogic.gdx.utils.compression.lzma,"+ + "com.badlogic.gdx.utils.compression.rangecoder,"+ + "com.badlogic.gdx.utils.reflect,"+ + "com.badlogic.gdx.utils.viewport,"+ + "imgui,"+ + "imgui.flag,"+ + "imgui.glfw,"+ + "imgui.gl3,"+ + "imgui.type,"+ + "net.spookygames.gdx.nativefilechooser,"+ + "love.distributedrebirth.bassboonyd,"+ + "love.distributedrebirth.bassboonyd.jmx,"+ + "love.distributedrebirth.numberxd,"+ + "love.distributedrebirth.numberxd.base2t,"+ + "love.distributedrebirth.numberxd.base2t.part,"+ + "love.distributedrebirth.numberxd.base2t.part.warp,"+ + "love.distributedrebirth.numberxd.base2t.type,"+ + "love.distributedrebirth.numberxd.base2t.typexl,"+ + "love.distributedrebirth.numberxd.glyph,"+ + "love.distributedrebirth.numberxd.x4o" + ); // ; version=1.0.0 + + if (cachedir != null) { + configMap.put(Constants.FRAMEWORK_STORAGE, cachedir.getAbsolutePath()); + } + return configMap; + } + + private static File createCacheDir() { + final File cachedir; + try { + cachedir = File.createTempFile("gdxapp4d.tos4.cache", null); + cachedir.delete(); + createShutdownHook(cachedir); + return cachedir; + } catch (IOException e) { + // temp dir creation failed, return null + return null; + } + } + + private static void createShutdownHook(final File cachedir) { + Runtime.getRuntime().addShutdownHook(new Thread() { + @Override + public void run() { + deleteFileOrDir(cachedir); + } + }); + } + + private static void deleteFileOrDir(File file) { + if (file.isDirectory()) { + File[] childs = file.listFiles(); + for (File child : childs) { + deleteFileOrDir(child); + } + } + file.delete(); + } +} diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4BootListener.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4BootListener.java new file mode 100644 index 00000000..4e4312f6 --- /dev/null +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4BootListener.java @@ -0,0 +1,9 @@ +package love.distributedrebirth.gdxapp4d.tos4; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public interface GDXAppTos4BootListener { + + void bootLine(String message); +} diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4BootScreen.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4BootScreen.java new file mode 100644 index 00000000..e3568642 --- /dev/null +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4BootScreen.java @@ -0,0 +1,56 @@ +package love.distributedrebirth.gdxapp4d.tos4; + +import java.util.ArrayList; +import java.util.List; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.ScreenAdapter; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class GDXAppTos4BootScreen extends ScreenAdapter implements GDXAppTos4BootListener { + + private BitmapFont font; + private SpriteBatch batch; + private Texture backgroundImage; + private List messages = new ArrayList<>(); + + public GDXAppTos4BootScreen() { + batch = new SpriteBatch(); + backgroundImage = new Texture(Gdx.files.internal("background/msx-boot.png")); + font = new BitmapFont(); + } + + @Override + public void render(float delta) { + int textX = 100; + int textY = 420; + int textYStep = 20; + batch.begin(); + batch.draw(backgroundImage, 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); + synchronized (messages) { + for (String message:messages) { + font.draw(batch, message, textX, textY-=textYStep); + } + } + batch.end(); + } + + @Override + public void dispose() { + batch.dispose(); + backgroundImage.dispose(); + font.dispose(); + } + + @Override + public void bootLine(String message) { + synchronized (messages) { + messages.add(message); + } + } +} diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/GDXAppMainKeyʸᴰ.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Keyʸᴰ.java similarity index 69% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/GDXAppMainKeyʸᴰ.java rename to gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Keyʸᴰ.java index 4b4f19ce..61065def 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/GDXAppMainKeyʸᴰ.java +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Keyʸᴰ.java @@ -1,10 +1,10 @@ -package love.distributedrebirth.gdxapp; +package love.distributedrebirth.gdxapp4d.tos4; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreKeyʸᴰ; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") -public enum GDXAppMainKeyʸᴰ implements BãßBȍőnCoffinStoreKeyʸᴰ { +public enum GDXAppTos4Keyʸᴰ implements BãßBȍőnCoffinStoreKeyʸᴰ { JMX, diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Startup.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Startup.java new file mode 100644 index 00000000..8a792bf8 --- /dev/null +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Startup.java @@ -0,0 +1,84 @@ +package love.distributedrebirth.gdxapp4d.tos4; + +import org.osgi.framework.launch.Framework; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.badlogic.gdx.Application; +import com.badlogic.gdx.ApplicationLogger; +import com.badlogic.gdx.Gdx; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class GDXAppTos4Startup { + + private static final Logger LOG = LoggerFactory.getLogger(GDXAppTos4Startup.class); + + public static Framework init(GDXAppTos4 tos4, GDXAppTos4Activator systemActivator) { + LOG.info("init framework"); + Gdx.app.setLogLevel(Application.LOG_DEBUG); + Gdx.app.setApplicationLogger(new GDXAppApplicationLogger()); + + final Framework systemBundle = GDXAppTos4BootFactory.createFramework(); + final GDXAppTos4BootScreen bootScreen = new GDXAppTos4BootScreen(); + + systemActivator.addBootListener(bootScreen); + tos4.registrateScreen(bootScreen); + tos4.selectScreen(GDXAppTos4BootScreen.class); + + Runnable run = () -> { + try { + systemBundle.init(); + systemBundle.start(); + systemActivator.start(systemBundle.getBundleContext()); + + Gdx.app.postRunnable(() -> { + LOG.debug("Release boot screen"); + systemActivator.removeBootListener(bootScreen); + tos4.disposeScreen(bootScreen); + }); + } catch (Exception e) { + throw new RuntimeException(e); + } + }; + Thread framework = new Thread(run); + framework.start(); + + return systemBundle; + } + + static class GDXAppApplicationLogger implements ApplicationLogger { + + @Override + public void log(String tag, String message) { + LoggerFactory.getLogger(tag).info(message); + } + + @Override + public void log(String tag, String message, Throwable exception) { + LoggerFactory.getLogger(tag).info(message, exception); + } + + @Override + public void error(String tag, String message) { + LoggerFactory.getLogger(tag).error(message); + } + + @Override + public void error(String tag, String message, Throwable exception) { + LoggerFactory.getLogger(tag).error(message, exception); + } + + @Override + public void debug(String tag, String message) { + LoggerFactory.getLogger(tag).debug(message); + } + + @Override + public void debug(String tag, String message, Throwable exception) { + LoggerFactory.getLogger(tag).debug(message, exception); + } + } +} diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpBase.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpBase.java new file mode 100644 index 00000000..7285222b --- /dev/null +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpBase.java @@ -0,0 +1,13 @@ +package love.distributedrebirth.gdxapp4d.tos4.service; + +import java.io.File; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public interface SystemWarpBase { + + File getHyperdriveHome(); + + File getWarpshipHome(); +} diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpBootArgs.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpBootArgs.java new file mode 100644 index 00000000..7be99aad --- /dev/null +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpBootArgs.java @@ -0,0 +1,15 @@ +package love.distributedrebirth.gdxapp4d.tos4.service; + +import java.util.List; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public interface SystemWarpBootArgs { + + List getBootArgs(); + + int getBootWindowWidth(); + + int getBootWindowHeight(); +} diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpSea.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpSea.java new file mode 100644 index 00000000..f506c72e --- /dev/null +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpSea.java @@ -0,0 +1,13 @@ +package love.distributedrebirth.gdxapp4d.tos4.service; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.warpme.sea.WaterOcean; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public interface SystemWarpSea { + + String NAME_PROPERTY = "warp.sea.name"; + String PROVIDER_PROPERTY = "warp.sea.provider"; + + WaterOcean getWarpSea(); +} diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpShip.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpShip.java new file mode 100644 index 00000000..c6c2de50 --- /dev/null +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpShip.java @@ -0,0 +1,10 @@ +package love.distributedrebirth.gdxapp4d.tos4.service; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.warpme.ship.WaterDevice; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public interface SystemWarpShip { + + WaterDevice getWarpShip(); +} diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpTerminal.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpTerminal.java new file mode 100644 index 00000000..14e0fa0a --- /dev/null +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpTerminal.java @@ -0,0 +1,15 @@ +package love.distributedrebirth.gdxapp4d.tos4.service; + +import com.badlogic.gdx.Screen; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public interface SystemWarpTerminal { + + void registrateScreen(Screen screen); + + void disposeScreen(Screen screen); + + void selectScreen(Class screenClass); +} diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/background/doom-credits.png b/gdxapp4d-tos4/src/main/resources/background/doom-credits.png similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/background/doom-credits.png rename to gdxapp4d-tos4/src/main/resources/background/doom-credits.png diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/background/gdxapp-loading.png b/gdxapp4d-tos4/src/main/resources/background/gdxapp-loading.png similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/background/gdxapp-loading.png rename to gdxapp4d-tos4/src/main/resources/background/gdxapp-loading.png diff --git a/gdxapp4d-tos4/src/main/resources/background/msx-boot.png b/gdxapp4d-tos4/src/main/resources/background/msx-boot.png new file mode 100644 index 00000000..9d3dd725 Binary files /dev/null and b/gdxapp4d-tos4/src/main/resources/background/msx-boot.png differ diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/background/temple-os.png b/gdxapp4d-tos4/src/main/resources/background/temple-os.png similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/background/temple-os.png rename to gdxapp4d-tos4/src/main/resources/background/temple-os.png diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/background/terrydavis-front.png b/gdxapp4d-tos4/src/main/resources/background/terrydavis-front.png similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/background/terrydavis-front.png rename to gdxapp4d-tos4/src/main/resources/background/terrydavis-front.png diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/background/terrydavis-nose.png b/gdxapp4d-tos4/src/main/resources/background/terrydavis-nose.png similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/background/terrydavis-nose.png rename to gdxapp4d-tos4/src/main/resources/background/terrydavis-nose.png diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/code-2000.ttf b/gdxapp4d-tos4/src/main/resources/font/code-2000.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/code-2000.ttf rename to gdxapp4d-tos4/src/main/resources/font/code-2000.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/code-2001.ttf b/gdxapp4d-tos4/src/main/resources/font/code-2001.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/code-2001.ttf rename to gdxapp4d-tos4/src/main/resources/font/code-2001.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/code-2002.ttf b/gdxapp4d-tos4/src/main/resources/font/code-2002.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/code-2002.ttf rename to gdxapp4d-tos4/src/main/resources/font/code-2002.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/fa-solid-900.ttf b/gdxapp4d-tos4/src/main/resources/font/fa-solid-900.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/fa-solid-900.ttf rename to gdxapp4d-tos4/src/main/resources/font/fa-solid-900.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/free-sans.ttf b/gdxapp4d-tos4/src/main/resources/font/free-sans.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/free-sans.ttf rename to gdxapp4d-tos4/src/main/resources/font/free-sans.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/new-gardiner-bmp.ttf b/gdxapp4d-tos4/src/main/resources/font/new-gardiner-bmp.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/new-gardiner-bmp.ttf rename to gdxapp4d-tos4/src/main/resources/font/new-gardiner-bmp.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-balinese.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-balinese.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-balinese.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-balinese.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-bamum.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-bamum.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-bamum.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-bamum.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-batak.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-batak.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-batak.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-batak.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-brahmi.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-brahmi.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-brahmi.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-brahmi.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-glagolitic.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-glagolitic.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-glagolitic.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-glagolitic.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-lepcha.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-lepcha.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-lepcha.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-lepcha.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-lisu.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-lisu.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-lisu.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-lisu.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-samaritan.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-samaritan.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-samaritan.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-samaritan.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-sinhala.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-sinhala.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-sinhala.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-sinhala.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-sundanese.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-sundanese.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-sundanese.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-sundanese.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-tagalog.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-tagalog.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-tagalog.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-tagalog.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-tagbanwa.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-tagbanwa.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-tagbanwa.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-tagbanwa.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-tai-le.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-tai-le.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-tai-le.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-tai-le.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-tai-tham.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-sans-tai-tham.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-sans-tai-tham.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-sans-tai-tham.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-serif-tibetan.ttf b/gdxapp4d-tos4/src/main/resources/font/noto-serif-tibetan.ttf similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/font/noto-serif-tibetan.ttf rename to gdxapp4d-tos4/src/main/resources/font/noto-serif-tibetan.ttf diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/idtech-doom-sigil.mp3 b/gdxapp4d-tos4/src/main/resources/idtech-doom-sigil.mp3 similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/music/idtech-doom-sigil.mp3 rename to gdxapp4d-tos4/src/main/resources/idtech-doom-sigil.mp3 diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/shader/color.fragment.glsl b/gdxapp4d-tos4/src/main/resources/shader/color.fragment.glsl similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/shader/color.fragment.glsl rename to gdxapp4d-tos4/src/main/resources/shader/color.fragment.glsl diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/shader/color.vertex.glsl b/gdxapp4d-tos4/src/main/resources/shader/color.vertex.glsl similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/shader/color.vertex.glsl rename to gdxapp4d-tos4/src/main/resources/shader/color.vertex.glsl diff --git a/gdxapp4d-vrgem4/pom.xml b/gdxapp4d-vrgem4/pom.xml new file mode 100644 index 00000000..514cbd8c --- /dev/null +++ b/gdxapp4d-vrgem4/pom.xml @@ -0,0 +1,106 @@ + + 4.0.0 + + love.distributedrebirth.gdxapp4d + gdxapp4d + 0.0.1-SNAPSHOT + + gdxapp4d-vrgem4 + bundle + + + love.distributedrebirth.gdxapp4d + gdxapp4d-tos4 + ${project.version} + + + + + + org.apache.felix + maven-bundle-plugin + true + + + <_donotcopy>(.git) + + love.distributedrebirth.gdxapp4d.tos4.service, + org.osgi.framework, + com.badlogic.gdx, + com.badlogic.gdx.assets, + com.badlogic.gdx.assets.loaders, + com.badlogic.gdx.assets.loaders.resolvers, + com.badlogic.gdx.audio, + com.badlogic.gdx.files, + com.badlogic.gdx.graphics, + com.badlogic.gdx.graphics.g2d, + com.badlogic.gdx.graphics.g3d, + com.badlogic.gdx.graphics.g3d.attributes, + com.badlogic.gdx.graphics.g3d.decals, + com.badlogic.gdx.graphics.g3d.environment, + com.badlogic.gdx.graphics.g3d.loader, + com.badlogic.gdx.graphics.g3d.model, + com.badlogic.gdx.graphics.g3d.model.data, + com.badlogic.gdx.graphics.g3d.particles, + com.badlogic.gdx.graphics.g3d.particles.bactches, + com.badlogic.gdx.graphics.g3d.particles.emitters, + com.badlogic.gdx.graphics.g3d.particles.influencers, + com.badlogic.gdx.graphics.g3d.particles.renderers, + com.badlogic.gdx.graphics.g3d.particles.values, + com.badlogic.gdx.graphics.g3d.shaders, + com.badlogic.gdx.graphics.g3d.utils, + com.badlogic.gdx.graphics.g3d.utils.shapebuilders, + com.badlogic.gdx.graphics.glutils, + com.badlogic.gdx.graphics.profiling, + com.badlogic.gdx.input, + com.badlogic.gdx.maps, + com.badlogic.gdx.maps.objects, + com.badlogic.gdx.maps.tiled, + com.badlogic.gdx.maps.tiled.objects, + com.badlogic.gdx.maps.tiled.renderers, + com.badlogic.gdx.maps.tiled.tiles, + com.badlogic.gdx.math, + com.badlogic.gdx.math.collision, + com.badlogic.gdx.net, + com.badlogic.gdx.scenes.scene2d, + com.badlogic.gdx.scenes.scene2d.actions, + com.badlogic.gdx.scenes.scene2d.ui, + com.badlogic.gdx.scenes.scene2d.utils, + com.badlogic.gdx.utils, + com.badlogic.gdx.utils.async, + com.badlogic.gdx.utils.compression, + com.badlogic.gdx.utils.compression.lz, + com.badlogic.gdx.utils.compression.lzma, + com.badlogic.gdx.utils.compression.rangecoder, + com.badlogic.gdx.utils.reflect, + com.badlogic.gdx.utils.viewport, + imgui, + imgui.flag, + imgui.glfw, + imgui.gl3, + imgui.type, + net.spookygames.gdx.nativefilechooser, + love.distributedrebirth.bassboonyd, + love.distributedrebirth.bassboonyd.jmx, + love.distributedrebirth.numberxd, + love.distributedrebirth.numberxd.base2t, + love.distributedrebirth.numberxd.base2t.part, + love.distributedrebirth.numberxd.base2t.part.warp, + love.distributedrebirth.numberxd.base2t.type, + love.distributedrebirth.numberxd.base2t.typexl, + love.distributedrebirth.numberxd.glyph, + love.distributedrebirth.numberxd.x4o, + + love.distributedrebirth.gdxapp4d.vrgem4.service + love.distributedrebirth.gdxapp4d.vrgem4.* + + love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4Activator + distributedrebirth.love + + + + + + \ No newline at end of file diff --git a/gdxapp4d-vrgem4/src/chain/warp-sea.xml b/gdxapp4d-vrgem4/src/chain/warp-sea.xml new file mode 100644 index 00000000..52e89601 --- /dev/null +++ b/gdxapp4d-vrgem4/src/chain/warp-sea.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/FontAwesomeIcons.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/FontAwesomeIcons.java similarity index 99% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/FontAwesomeIcons.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/FontAwesomeIcons.java index 2cef9495..739249e2 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/FontAwesomeIcons.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/FontAwesomeIcons.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp; +package love.distributedrebirth.gdxapp4d.vrgem4; @SuppressWarnings("unused") public class FontAwesomeIcons { diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/GDXAppLauncher.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppLauncher.java similarity index 77% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/GDXAppLauncher.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppLauncher.java index 05686f26..c63ad39a 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/GDXAppLauncher.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppLauncher.java @@ -1,8 +1,8 @@ -package love.distributedrebirth.gdxapp; +package love.distributedrebirth.gdxapp4d.vrgem4; import java.util.function.Supplier; -import love.distributedrebirth.gdxapp.desktop.DefaultDeskApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp; public final class GDXAppLauncher { diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4.java new file mode 100644 index 00000000..776622c9 --- /dev/null +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4.java @@ -0,0 +1,43 @@ +package love.distributedrebirth.gdxapp4d.vrgem4; + +import java.util.List; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ; +import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ; +import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ; +import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ; +import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ; +import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpTerminal; +import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicManager; + + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +@BãßBȍőnClassInfoʸᴰ(name = "GDXAppMain", purpose = "Main loop render dispatcher and bootup.") +@BãßBȍőnPackageInfoʸᴰ(name = "love.distributedrebirth.gdxapp") +public enum GDXAppVrGem4 implements DefaultEnumInstanceᴶᴹˣ { + + INSTANCE; + + public SystemWarpTerminal terminal; + public MusicManager music; + //public FontAtlas basePlane; + private final BãßBȍőnCoffinOpenʸᴰ BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance(); + public BãßBȍőnCoffinʸᴰ GET_BBC() { return BBC; } + + private GDXAppVrGem4() { + BBC.BOON_INIT(this); + BȍőnJmxInit(GDXAppVrGem4Keyʸᴰ.JMX); + } + + public void init(List args, SystemWarpTerminal terminal) { + boolean musicStop = args.contains("music-stop"); + if (musicStop) { + System.out.println("music-stop: requested"); + } + music = new MusicManager(); + music.init(musicStop); + + this.terminal = terminal; + } +} diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4Activator.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4Activator.java new file mode 100644 index 00000000..b245fc03 --- /dev/null +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4Activator.java @@ -0,0 +1,159 @@ +package love.distributedrebirth.gdxapp4d.vrgem4; + +import java.util.List; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; + +import com.badlogic.gdx.Gdx; + +import imgui.type.ImBoolean; +import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ; +import love.distributedrebirth.bassboonyd.jmx.DefaultEnumBaseᴶᴹˣ; +import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs; +import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpTerminal; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenCredits; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop1; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop2; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop3; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop4; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenHelp; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenIntro; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenIntroMission; +import love.distributedrebirth.numberxd.base2t.Base2PartsFactory; +import love.distributedrebirth.numberxd.base2t.Base2Terminator; +import love.distributedrebirth.numberxd.base2t.part.warp.TOSWarpCore; +import love.distributedrebirth.numberxd.glyph.BaseGlyphSet; +import love.distributedrebirth.warpme.core.WaterBucket; +import love.distributedrebirth.warpme.core.WaterBucketDriver; + +public class GDXAppVrGem4Activator implements BundleActivator { + +// private static final Logger LOG = LoggerFactory.getLogger(GDXAppVrGem4Activator.class); + + @Override + public void stop(final BundleContext context) { + } + + @Override + public void start(final BundleContext context) { +// LOG.info("GDXAppVrGem4Activator started"); + + ServiceReference termRef = context.getServiceReference(SystemWarpTerminal.class); + SystemWarpTerminal terminal = context.getService(termRef); + + GDXAppVrGem4BootScreen bootScreen = new GDXAppVrGem4BootScreen(); + Gdx.app.postRunnable(new Runnable() { + @Override + public void run() { + bootScreen.create(); + terminal.registrateScreen(bootScreen); + terminal.selectScreen(GDXAppVrGem4BootScreen.class); + } + }); + try { + Thread.sleep(100); + } catch (InterruptedException ignored) { + } + bootScreen.bootLine("vrGEM4 Booting..."); + + // ref to init +// LOG.debug("BãßBȍőnCoffinʸᴰ init......"); + for (DefaultEnumBaseᴶᴹˣ coffin:coffinInstances()) { + BãßBȍőnCoffinOpenʸᴰ.lockCoffin(coffin); + } + bootScreen.bootLine("BãßBȍőnCoffinʸᴰ init done."); + + bootScreen.bootLine("ImGui Setup"); + ImBoolean imLoaded = new ImBoolean(false); + Gdx.app.postRunnable(new Runnable() { + @Override + public void run() { + ImGuiSetup.init(); + imLoaded.set(true); + } + }); + while (!imLoaded.get()) { + try { + Thread.sleep(100); + } catch (InterruptedException ignored) { + } + } + bootScreen.bootLine("ImGui Loaded"); + + + ServiceReference bootArgsRef = context.getServiceReference(SystemWarpBootArgs.class); + SystemWarpBootArgs bootArgs = context.getService(bootArgsRef); + List args = bootArgs.getBootArgs(); + + try { + if (args.contains("warpcore-load")) { + bootScreen.bootLine("warpcore-load: requested"); + WaterBucket bucket = WaterBucketDriver.newInstance().createReader().readFile("./warpcore.xml"); + TOSWarpCore.INSTANCE.BãßArmWarpCore(bucket); + } + if (args.contains("warpcore-save")) { + bootScreen.bootLine("warpcore-save: requested"); + WaterBucket bucket = TOSWarpCore.INSTANCE.BãßCurrentWarpCore(); + WaterBucketDriver.newInstance().createWriter().writeFile(bucket, "./warpcore.xml"); + } + } catch (Exception e) { + throw new RuntimeException(e); + } + if (!args.contains("warpcore-nolock")) { + bootScreen.bootLine("warpcore-lock: BãßLockWarpCipher"); + TOSWarpCore.INSTANCE.BãßLockWarpCipher(); + } else { + bootScreen.bootLine("warpcore-nolock: requested"); + } + + if (args.contains("full-screen")) { + System.out.println("full-screen: requested"); + Gdx.app.postRunnable(new Runnable() { + @Override + public void run() { + Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode()); + } + }); + } + + GDXAppVrGem4.INSTANCE.init(args, terminal); + + Gdx.app.postRunnable(new Runnable() { + @Override + public void run() { + terminal.registrateScreen(new ScreenIntro()); + terminal.registrateScreen(new ScreenIntroMission()); + terminal.registrateScreen(new ScreenDesktop1()); + terminal.registrateScreen(new ScreenDesktop2()); + terminal.registrateScreen(new ScreenDesktop3()); + terminal.registrateScreen(new ScreenDesktop4()); + terminal.registrateScreen(new ScreenCredits()); + terminal.registrateScreen(new ScreenHelp()); + + if (args.contains("intro-skip")) { + System.out.println("intro-skip: requested"); + terminal.selectScreen(ScreenDesktop1.class); +// music.play(MusicSongType.BACKGROUND); + } else { + terminal.selectScreen(ScreenIntro.class); + } + } + }); + } + + + + //TODO: add layer or ?? private ,DefaultAuthorInfoʸᴰ> T[] storeInstances() { + @SuppressWarnings("unchecked") + private > T[] coffinInstances() { + return (T[]) new DefaultEnumBaseᴶᴹˣ[] { + GDXAppVrGem4.INSTANCE, + BaseGlyphSet.values()[0], + Base2Terminator.INSTANCE, + Base2PartsFactory.INSTANCE, + TOSWarpCore.INSTANCE + }; + } +} diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4BootListener.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4BootListener.java new file mode 100644 index 00000000..1aad4659 --- /dev/null +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4BootListener.java @@ -0,0 +1,6 @@ +package love.distributedrebirth.gdxapp4d.vrgem4; + +public interface GDXAppVrGem4BootListener { + + void bootLine(String message); +} diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4BootScreen.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4BootScreen.java new file mode 100644 index 00000000..325a3b5c --- /dev/null +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4BootScreen.java @@ -0,0 +1,56 @@ +package love.distributedrebirth.gdxapp4d.vrgem4; + +import java.util.ArrayList; +import java.util.List; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.ScreenAdapter; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; + +public class GDXAppVrGem4BootScreen extends ScreenAdapter implements GDXAppVrGem4BootListener { + + private BitmapFont font; + private SpriteBatch batch; + private Texture backgroundImage; + private List messages = new ArrayList<>(); + + public GDXAppVrGem4BootScreen() { + } + + public void create() { + batch = new SpriteBatch(); + backgroundImage = new Texture(Gdx.files.internal("background/temple-os.png")); + font = new BitmapFont(); + } + + @Override + public void render(float delta) { + int textX = 40; + int textY = Gdx.graphics.getHeight(); + int textYStep = 20; + batch.begin(); + synchronized (messages) { + for (String message:messages) { + font.draw(batch, message, textX, textY-=textYStep); + } + batch.draw(backgroundImage, textY, textY, textY, textY); + } + batch.end(); + } + + @Override + public void dispose() { + batch.dispose(); + backgroundImage.dispose(); + font.dispose(); + } + + @Override + public void bootLine(String message) { + synchronized (messages) { + messages.add(message); + } + } +} diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4Keyʸᴰ.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4Keyʸᴰ.java new file mode 100644 index 00000000..50be6318 --- /dev/null +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4Keyʸᴰ.java @@ -0,0 +1,12 @@ +package love.distributedrebirth.gdxapp4d.vrgem4; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreKeyʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public enum GDXAppVrGem4Keyʸᴰ implements BãßBȍőnCoffinStoreKeyʸᴰ { + + JMX, + + ; +} diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/ImGuiSetup.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/ImGuiSetup.java similarity index 98% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/ImGuiSetup.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/ImGuiSetup.java index 742a48ae..92ea6074 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/ImGuiSetup.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/ImGuiSetup.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp; +package love.distributedrebirth.gdxapp4d.vrgem4; import com.badlogic.gdx.Gdx; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DefaultDeskApp.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DefaultDeskApp.java similarity index 92% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DefaultDeskApp.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DefaultDeskApp.java index 98c4f197..daa610d4 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DefaultDeskApp.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DefaultDeskApp.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskApp.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskApp.java similarity index 82% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskApp.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskApp.java index 5c37f9a6..7c284e36 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskApp.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskApp.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppContour.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppContour.java similarity index 91% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppContour.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppContour.java index dec6b397..4bd81512 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppContour.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppContour.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop; import java.util.HashMap; import java.util.Map; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppContourSection.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppContourSection.java similarity index 87% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppContourSection.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppContourSection.java index 4f9e1f5b..78822a31 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppContourSection.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppContourSection.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppRenderer.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppRenderer.java similarity index 78% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppRenderer.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppRenderer.java index 9a72c2e8..87721ae6 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppRenderer.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppRenderer.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppScreen.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppScreen.java similarity index 96% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppScreen.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppScreen.java index f338ee35..1845746b 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppScreen.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppScreen.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop; import java.util.ArrayList; import java.util.List; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppScreenListener.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppScreenListener.java similarity index 80% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppScreenListener.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppScreenListener.java index f8d6ca01..6ad7817e 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskAppScreenListener.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskAppScreenListener.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskTopInputProcessor.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskTopInputProcessor.java similarity index 97% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskTopInputProcessor.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskTopInputProcessor.java index df485f78..3c2512ed 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskTopInputProcessor.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskTopInputProcessor.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop; import com.badlogic.gdx.InputProcessor; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskTopScreen.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskTopScreen.java similarity index 82% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskTopScreen.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskTopScreen.java index 9b762ce9..3a7d1085 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskTopScreen.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskTopScreen.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop; import com.badlogic.gdx.Screen; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskTopScreenMenu.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskTopScreenMenu.java similarity index 77% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskTopScreenMenu.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskTopScreenMenu.java index 70f5b4b4..a354c978 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/DeskTopScreenMenu.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/DeskTopScreenMenu.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop; import java.util.ArrayList; import java.util.List; @@ -8,41 +8,32 @@ import com.badlogic.gdx.Gdx; import imgui.ImGui; import imgui.type.ImBoolean; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.FontAwesomeIcons; -import love.distributedrebirth.gdxapp.GDXAppLauncher; -import love.distributedrebirth.gdxapp.GDXAppMain; -import love.distributedrebirth.gdxapp.desktop.apps.BasicConsoleApp; -import love.distributedrebirth.gdxapp.desktop.apps.HebrewWalletApp; -import love.distributedrebirth.gdxapp.desktop.apps.MusicPlayerApp; -import love.distributedrebirth.gdxapp.desktop.apps.SystemBaseGlyphApp; -import love.distributedrebirth.gdxapp.desktop.apps.SystemBasePartApp; -import love.distributedrebirth.gdxapp.desktop.apps.SystemBaseUnicodePlaneApp; -import love.distributedrebirth.gdxapp.desktop.apps.Unicode4DApp; -import love.distributedrebirth.gdxapp.screen.ScreenCredits; -import love.distributedrebirth.gdxapp.screen.ScreenDesktop1; -import love.distributedrebirth.gdxapp.screen.ScreenDesktop2; -import love.distributedrebirth.gdxapp.screen.ScreenDesktop3; -import love.distributedrebirth.gdxapp.screen.ScreenDesktop4; -import love.distributedrebirth.gdxapp.screen.ScreenHelp; +import love.distributedrebirth.gdxapp4d.tos4.GDXAppTos4; +import love.distributedrebirth.gdxapp4d.vrgem4.FontAwesomeIcons; +import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppLauncher; +import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.BasicConsoleApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.HebrewWalletApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.MusicPlayerApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.SystemBaseGlyphApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.SystemBasePartApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.SystemBaseUnicodePlaneApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.Unicode4DApp; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenCredits; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop1; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop2; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop3; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop4; +import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenHelp; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public class DeskTopScreenMenu { - private final DeskTopScreen desktop1; - private final DeskTopScreen desktop2; - private final DeskTopScreen desktop3; - private final DeskTopScreen desktop4; private List apps; private ImBoolean fileMinimizeSelected = new ImBoolean(false); private ImBoolean fileCloseSelected = new ImBoolean(false); - public DeskTopScreenMenu(DeskTopScreen desktop1, DeskTopScreen desktop2, - DeskTopScreen desktop3, DeskTopScreen desktop4) { - this.desktop1 = desktop1; - this.desktop2 = desktop2; - this.desktop3 = desktop3; - this.desktop4 = desktop4; - + public DeskTopScreenMenu() { apps = new ArrayList<>(); apps.add(new GDXAppLauncher("Basic Console", () -> new BasicConsoleApp())); apps.add(new GDXAppLauncher("Sys Glyph Set", () -> new SystemBaseGlyphApp())); @@ -204,16 +195,16 @@ public class DeskTopScreenMenu { infix4 = FontAwesomeIcons.Eye + " "; } if (ImGui.menuItem(infix1+"Desktop1")) { - GDXAppMain.INSTANCE.selectScreen(ScreenDesktop1.class); + GDXAppVrGem4.INSTANCE.terminal.selectScreen(ScreenDesktop1.class); } if (ImGui.menuItem(infix2+"Desktop2")) { - GDXAppMain.INSTANCE.selectScreen(ScreenDesktop2.class); + GDXAppVrGem4.INSTANCE.terminal.selectScreen(ScreenDesktop2.class); } if (ImGui.menuItem(infix3+"Desktop3")) { - GDXAppMain.INSTANCE.selectScreen(ScreenDesktop3.class); + GDXAppVrGem4.INSTANCE.terminal.selectScreen(ScreenDesktop3.class); } if (ImGui.menuItem(infix4+"Desktop4")) { - GDXAppMain.INSTANCE.selectScreen(ScreenDesktop4.class); + GDXAppVrGem4.INSTANCE.terminal.selectScreen(ScreenDesktop4.class); } ImGui.separator(); if (ImGui.beginMenu(FontAwesomeIcons.PlusSquare + " Start App")) { @@ -229,27 +220,27 @@ public class DeskTopScreenMenu { ImGui.separator(); if (Gdx.graphics.isFullscreen()) { if (ImGui.menuItem(FontAwesomeIcons.Wheelchair + " Window Mode")) { - Gdx.graphics.setWindowedMode(GDXAppMain.INSTANCE.viewWidth, GDXAppMain.INSTANCE.viewHeight); +// Gdx.graphics.setWindowedMode(GDXAppVrGem4.INSTANCE.viewWidth, GDXAppVrGem4.INSTANCE.viewHeight); } } else { if (ImGui.menuItem(FontAwesomeIcons.FighterJet + " Full Screen")) { - Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode()); +// Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode()); } } ImGui.separator(); if (ImGui.menuItem(FontAwesomeIcons.CreditCard + " Credits")) { - GDXAppMain.INSTANCE.selectScreen(ScreenCredits.class); + GDXAppVrGem4.INSTANCE.terminal.selectScreen(ScreenCredits.class); } if (ImGui.menuItem(FontAwesomeIcons.HandsHelping + " Help")) { - GDXAppMain.INSTANCE.selectScreen(ScreenHelp.class); + GDXAppVrGem4.INSTANCE.terminal.selectScreen(ScreenHelp.class); } ImGui.separator(); if (ImGui.menuItem(FontAwesomeIcons.Trademark + " ImGui Demo")) { - GDXAppMain.INSTANCE.showImGuiDemo.set(true); +// GDXAppVrGem4.INSTANCE.showImGuiDemo.set(true); } if (ImGui.menuItem(FontAwesomeIcons.PowerOff + " Shutdown")) { - GDXAppMain.INSTANCE.dispose(); +// GDXAppVrGem4.INSTANCE.dispose(); System.exit(0); } ImGui.endMenu(); diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/BasicConsoleApp.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/BasicConsoleApp.java similarity index 76% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/BasicConsoleApp.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/BasicConsoleApp.java index 43e6ba32..006a357f 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/BasicConsoleApp.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/BasicConsoleApp.java @@ -1,10 +1,10 @@ -package love.distributedrebirth.gdxapp.desktop.apps; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps; import imgui.ImGui; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.desktop.DefaultDeskApp; -import love.distributedrebirth.gdxapp.desktop.DeskAppContourSection; -import love.distributedrebirth.gdxapp.desktop.DeskAppRenderer; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public class BasicConsoleApp extends DefaultDeskApp { diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/HebrewWalletApp.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/HebrewWalletApp.java similarity index 85% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/HebrewWalletApp.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/HebrewWalletApp.java index 3a45410d..2468448f 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/HebrewWalletApp.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/HebrewWalletApp.java @@ -1,11 +1,11 @@ -package love.distributedrebirth.gdxapp.desktop.apps; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps; import imgui.ImGui; import imgui.flag.ImGuiTableFlags; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.desktop.DefaultDeskApp; -import love.distributedrebirth.gdxapp.desktop.DeskAppContourSection; -import love.distributedrebirth.gdxapp.desktop.DeskAppRenderer; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer; import love.distributedrebirth.numberxd.Gê̄ldGetậl; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/MusicPlayerApp.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/MusicPlayerApp.java similarity index 73% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/MusicPlayerApp.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/MusicPlayerApp.java index c3d85d79..c3905f97 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/MusicPlayerApp.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/MusicPlayerApp.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop.apps; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps; import java.util.function.Consumer; @@ -10,12 +10,13 @@ import imgui.flag.ImGuiSelectableFlags; import imgui.flag.ImGuiTableColumnFlags; import imgui.flag.ImGuiTableFlags; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.FontAwesomeIcons; -import love.distributedrebirth.gdxapp.GDXAppMain; -import love.distributedrebirth.gdxapp.desktop.DefaultDeskApp; -import love.distributedrebirth.gdxapp.desktop.DeskAppContourSection; -import love.distributedrebirth.gdxapp.desktop.DeskAppRenderer; -import love.distributedrebirth.gdxapp.music.MusicSong; +import love.distributedrebirth.gdxapp4d.tos4.GDXAppTos4; +import love.distributedrebirth.gdxapp4d.vrgem4.FontAwesomeIcons; +import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer; +import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicSong; import net.spookygames.gdx.nativefilechooser.NativeFileChooserCallback; import net.spookygames.gdx.nativefilechooser.NativeFileChooserConfiguration; @@ -35,8 +36,8 @@ public class MusicPlayerApp extends DefaultDeskApp implements DeskAppRenderer { @Override public void render() { if (ImGui.menuItem(FontAwesomeIcons.Plus + " Add")) { - GDXAppMain.INSTANCE.fileChooser.chooseFile(fileChooserConfig, - NativeFileChooserCallbackAdapter.onFileChosen(v -> GDXAppMain.INSTANCE.music.addBackgroundMusic(v))); +// GDXAppVrGem4.INSTANCE.terminal.getFileChooser().chooseFile(fileChooserConfig, +// NativeFileChooserCallbackAdapter.onFileChosen(v -> GDXAppVrGem4.INSTANCE.music.addBackgroundMusic(v))); } } @@ -50,7 +51,7 @@ public class MusicPlayerApp extends DefaultDeskApp implements DeskAppRenderer { @Override public void render() { ImGui.text("Current Song:"); - MusicSong currentSong = GDXAppMain.INSTANCE.music.getCurrentSong(); + MusicSong currentSong = GDXAppVrGem4.INSTANCE.music.getCurrentSong(); if (currentSong != null) { ImGui.sameLine(); ImGui.text(currentSong.getName()); @@ -58,22 +59,22 @@ public class MusicPlayerApp extends DefaultDeskApp implements DeskAppRenderer { ImGui.separator(); if (currentSong != null) { if (ImGui.button("Play")) { - GDXAppMain.INSTANCE.music.play(currentSong); + GDXAppVrGem4.INSTANCE.music.play(currentSong); } } else { ImGui.text("Play"); } ImGui.sameLine(); if (ImGui.button("<")) { - GDXAppMain.INSTANCE.music.prev(); + GDXAppVrGem4.INSTANCE.music.prev(); } ImGui.sameLine(); if (ImGui.button(">")) { - GDXAppMain.INSTANCE.music.next(); + GDXAppVrGem4.INSTANCE.music.next(); } ImGui.sameLine(); if (ImGui.button("Stop")) { - GDXAppMain.INSTANCE.music.stop(); + GDXAppVrGem4.INSTANCE.music.stop(); } int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV; ImGui.beginTable("playlist", 3, flags); @@ -82,14 +83,14 @@ public class MusicPlayerApp extends DefaultDeskApp implements DeskAppRenderer { ImGui.tableSetupColumn("Name"); ImGui.tableHeadersRow(); int i=1; - for (MusicSong song:GDXAppMain.INSTANCE.music.getBackgroundSongs()) { + for (MusicSong song:GDXAppVrGem4.INSTANCE.music.getBackgroundSongs()) { ImGui.pushID(i); ImGui.tableNextRow(); ImGui.tableNextColumn(); ImGui.selectable(""+i, song.isPlaying(), ImGuiSelectableFlags.None); ImGui.tableNextColumn(); if (ImGui.smallButton(">")) { - GDXAppMain.INSTANCE.music.play(song); + GDXAppVrGem4.INSTANCE.music.play(song); } ImGui.tableNextColumn(); ImGui.selectable(song.getName(), song.isPlaying(), ImGuiSelectableFlags.None); diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/SystemBaseGlyphApp.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/SystemBaseGlyphApp.java similarity index 90% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/SystemBaseGlyphApp.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/SystemBaseGlyphApp.java index 0c889514..95f8bc4d 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/SystemBaseGlyphApp.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/SystemBaseGlyphApp.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop.apps; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps; import java.util.Locale; import java.util.ResourceBundle; @@ -7,9 +7,9 @@ import imgui.ImGui; import imgui.flag.ImGuiTableFlags; import imgui.type.ImBoolean; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.desktop.DefaultDeskApp; -import love.distributedrebirth.gdxapp.desktop.DeskAppContourSection; -import love.distributedrebirth.gdxapp.desktop.DeskAppRenderer; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer; import love.distributedrebirth.numberxd.glyph.BaseGlyphSet; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/SystemBasePartApp.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/SystemBasePartApp.java similarity index 95% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/SystemBasePartApp.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/SystemBasePartApp.java index 365b044d..d1a39a7e 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/SystemBasePartApp.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/SystemBasePartApp.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop.apps; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps; import java.util.ArrayList; import java.util.List; @@ -10,9 +10,9 @@ import imgui.flag.ImGuiTableFlags; import imgui.type.ImBoolean; import imgui.type.ImInt; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.desktop.DefaultDeskApp; -import love.distributedrebirth.gdxapp.desktop.DeskAppContourSection; -import love.distributedrebirth.gdxapp.desktop.DeskAppRenderer; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer; import love.distributedrebirth.numberxd.base2t.Base2PartsFactory; import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt1ʸᴰ; import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt2ʸᴰ; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/SystemBaseUnicodePlaneApp.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/SystemBaseUnicodePlaneApp.java similarity index 84% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/SystemBaseUnicodePlaneApp.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/SystemBaseUnicodePlaneApp.java index 12689a56..af1358a9 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/SystemBaseUnicodePlaneApp.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/SystemBaseUnicodePlaneApp.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop.apps; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps; import java.util.Locale; import java.util.ResourceBundle; @@ -6,9 +6,9 @@ import java.util.ResourceBundle; import imgui.ImGui; import imgui.flag.ImGuiTableFlags; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.desktop.DefaultDeskApp; -import love.distributedrebirth.gdxapp.desktop.DeskAppContourSection; -import love.distributedrebirth.gdxapp.desktop.DeskAppRenderer; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer; import love.distributedrebirth.unicode4d.UnicodePlaneᶻᴰ; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/Unicode4DApp.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/Unicode4DApp.java similarity index 87% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/Unicode4DApp.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/Unicode4DApp.java index 6a1b5bb6..0c8330b5 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/desktop/apps/Unicode4DApp.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/desktop/apps/Unicode4DApp.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.desktop.apps; +package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps; import java.util.List; @@ -7,10 +7,10 @@ import imgui.ImDrawList; import imgui.ImGui; import imgui.ImVec2; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.GDXAppMain; -import love.distributedrebirth.gdxapp.desktop.DefaultDeskApp; -import love.distributedrebirth.gdxapp.desktop.DeskAppContourSection; -import love.distributedrebirth.gdxapp.desktop.DeskAppRenderer; +import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer; import love.distributedrebirth.numberxd.base2t.type.V072Tong; import love.distributedrebirth.unicode4d.atlas.FontAtlasStore; import love.distributedrebirth.unicode4d.atlas.FontAtlasStoreGlyph; diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/music/M3UParser.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/music/M3UParser.java new file mode 100644 index 00000000..b10d962f --- /dev/null +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/music/M3UParser.java @@ -0,0 +1,38 @@ +package love.distributedrebirth.gdxapp4d.vrgem4.music; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.List; + +public class M3UParser { + + private static final String M3U_HEADER = "#EXTM3U"; + + public class M3UPlaylist { + + private List tracks = new ArrayList<>(); + } + + public class M3UTrack { + + } + + public M3UPlaylist parse(InputStream stream) throws IOException { + M3UPlaylist result = new M3UPlaylist(); + + BufferedReader buffer = new BufferedReader(new InputStreamReader(stream)); + String line = buffer.readLine(); + if (!line.startsWith(M3U_HEADER)) { + throw new IOException("Missing header"); + } + + while ((line = buffer.readLine()) != null) { + + } + + return result; + } +} diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/music/MusicManager.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/music/MusicManager.java similarity index 83% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/music/MusicManager.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/music/MusicManager.java index bc744042..c5b8b496 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/music/MusicManager.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/music/MusicManager.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.music; +package love.distributedrebirth.gdxapp4d.vrgem4.music; import java.util.ArrayList; import java.util.List; @@ -16,8 +16,8 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public class MusicManager { - private final MusicSong introSong; - private final MusicSong creditsSong; +// private final MusicSong introSong; +// private final MusicSong creditsSong; private final List backgroundSongs; private final NextSongListener nextSongListener; private MusicSong currentSong = null; @@ -25,8 +25,8 @@ public class MusicManager { public MusicManager() { backgroundSongs = new ArrayList<>(); - introSong = new MusicSong(Gdx.audio.newMusic(Gdx.files.internal("music/panoramacircle-waterfowl.mp3")),"panoramacircle-waterfowl"); - creditsSong = new MusicSong(Gdx.audio.newMusic(Gdx.files.internal("music/idtech-doom-sigil.mp3")), "idtech-doom-sigil"); + // introSong = new MusicSong(Gdx.audio.newMusic(Gdx.files.internal("music/panoramacircle-waterfowl.mp3")),"panoramacircle-waterfowl"); + // creditsSong = new MusicSong(Gdx.audio.newMusic(Gdx.files.internal("music/idtech-doom-sigil.mp3")), "idtech-doom-sigil"); nextSongListener = new NextSongListener(); } @@ -38,17 +38,19 @@ public class MusicManager { public void init(boolean noMusic) { this.noMusic = noMusic; + /* addBackgroundMusic(Gdx.files.internal("music/sanctumwave-risen.mp3")); addBackgroundMusic(Gdx.files.internal("music/sanctumwave-devine-intellect.mp3")); addBackgroundMusic(Gdx.files.internal("music/theselfhelpgroup-temple-os.mp3")); addBackgroundMusic(Gdx.files.internal("music/sanctumwave-nightwalk.mp3")); addBackgroundMusic(Gdx.files.internal("music/beeble-i-used-temple-os-to-write.mp3")); addBackgroundMusic(Gdx.files.internal("music/ryanfarran-risen-temple-os.mp3")); + */ } public void dispose() { - introSong.music.dispose(); - creditsSong.music.dispose(); + // introSong.music.dispose(); + // creditsSong.music.dispose(); for (MusicSong song:backgroundSongs) { song.music.dispose(); } @@ -71,19 +73,19 @@ public class MusicManager { public void play(MusicSongType type) { MusicSong nextSong = null; if (MusicSongType.INTRO.equals(type)) { - nextSong = introSong; - play(nextSong); +// nextSong = introSong; +// play(nextSong); } else if (MusicSongType.CREDITS.equals(type)) { - nextSong = creditsSong; - play(nextSong); +// nextSong = creditsSong; +// play(nextSong); } else { int currentBackground = backgroundSongs.indexOf(currentSong); - if (currentBackground == -1) { + if (currentBackground == -1 && !backgroundSongs.isEmpty()) { nextSong = backgroundSongs.get(0); } else { nextSong = currentSong; } - if (!noMusic) { + if (!noMusic && nextSong!=null) { play(nextSong); } } diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/music/MusicSong.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/music/MusicSong.java similarity index 90% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/music/MusicSong.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/music/MusicSong.java index ffb7d0d1..7e7b6eab 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/music/MusicSong.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/music/MusicSong.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.music; +package love.distributedrebirth.gdxapp4d.vrgem4.music; import com.badlogic.gdx.audio.Music; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/music/MusicSongType.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/music/MusicSongType.java similarity index 81% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/music/MusicSongType.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/music/MusicSongType.java index 5b70d32a..28ed2aad 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/music/MusicSongType.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/music/MusicSongType.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.music; +package love.distributedrebirth.gdxapp4d.vrgem4.music; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/AbstractScreenDesktop.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/AbstractScreenDesktop.java new file mode 100644 index 00000000..f5860469 --- /dev/null +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/AbstractScreenDesktop.java @@ -0,0 +1,168 @@ +package love.distributedrebirth.gdxapp4d.vrgem4.screen; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.ScreenAdapter; +import com.badlogic.gdx.graphics.OrthographicCamera; +import com.badlogic.gdx.graphics.PerspectiveCamera; +import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; +import com.badlogic.gdx.graphics.g3d.ModelBatch; +import com.badlogic.gdx.graphics.g3d.ModelInstance; +import com.badlogic.gdx.graphics.g3d.utils.FirstPersonCameraController; +import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder; +import com.badlogic.gdx.utils.Array; +import com.badlogic.gdx.utils.ScreenUtils; + +import imgui.ImGui; +import imgui.flag.ImGuiCond; +import imgui.flag.ImGuiWindowFlags; +import imgui.type.ImBoolean; +import love.distributedrebirth.gdxapp4d.vrgem4.ImGuiSetup; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskApp; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppScreen; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppScreenListener; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskTopInputProcessor; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskTopScreen; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskTopScreenMenu; + +public abstract class AbstractScreenDesktop extends ScreenAdapter implements DeskTopScreen { + + protected SpriteBatch batch; + protected BitmapFont font; + protected OrthographicCamera camera; + protected ImBoolean showImGuiDemo = new ImBoolean(false); + private DeskTopScreenMenu screenMenu; + private final DeskAppScreen deskAppScreen; + private PerspectiveCamera cam; + private FirstPersonCameraController camController; + private DeskTopInputProcessor inputFilter; + private ModelBatch modelBatch; + private Array modelInstances = new Array(); + + public AbstractScreenDesktop(String name) { + this.create(); + deskAppScreen = new DeskAppScreen(name); + deskAppScreen.addDeskAppListener(new DeskAppScreenListener() { + + @Override + public void selectDeskApp(DeskApp deskApp) { + if (deskApp == null) { + inputFilter.setFiltering(false); + } else { + inputFilter.setFiltering(true); + } + } + }); + } + + protected void createModel(ModelBuilder modelBuilder, Array modelInstances) { + + } + + private void create() { + batch = new SpriteBatch(); + font = new BitmapFont(); + camera = new OrthographicCamera(); + + camera.setToOrtho(false, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); + camera.update(); + batch.setProjectionMatrix(camera.combined); + + screenMenu = new DeskTopScreenMenu(); + + modelBatch = new ModelBatch(); + + cam = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); + cam.position.set(10f, 10f, 10f); + cam.lookAt(0, 0, 0); + cam.near = 1f; + cam.far = 300f; + cam.update(); + + ModelBuilder modelBuilder = new ModelBuilder(); + createModel(modelBuilder, modelInstances); + + camController = new FirstPersonCameraController(cam); + //camController = new CameraInputController(cam); + + inputFilter = new DeskTopInputProcessor(camController); + } + + @Override + public final void show() { + Gdx.input.setInputProcessor(inputFilter); + showDesktop(); + } + + protected void showDesktop() { + } + + @Override + public final void hide() { + Gdx.input.setInputProcessor(null); + hideDesktop(); + } + + protected void hideDesktop() { + } + + @Override + public final void dispose() { + batch.dispose(); + font.dispose(); + modelBatch.dispose(); + disposeDesktop(); + } + + protected void disposeDesktop() { + } + + @Override + public final void render(float delta) { + ScreenUtils.clear(0f, 0f, 0f, 1f, true); + ImGuiSetup.imGuiImp.newFrame(); + ImGui.newFrame(); + + DeskTopScreen appScreen = this; + screenMenu.renderMenu(appScreen); + if (showImGuiDemo.get()) { + ImGui.showDemoWindow(showImGuiDemo); + } + if (appScreen != null && appScreen.getDeskAppScreen().getCurrentDeskApp() != null) { + int sizeFlags = ImGuiCond.Always; + ImGui.setNextWindowPos(0, 28, sizeFlags); + ImGui.setNextWindowSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight() - 28, sizeFlags); + int windowFlags = ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoTitleBar; + if (ImGui.begin(appScreen.getDeskAppScreen().getCurrentDeskApp().getTitle(), windowFlags)) { + DeskAppRenderer renderer = appScreen.getDeskAppScreen().getCurrentDeskApp().getContours().getContour(DeskAppContourSection.MAIN); + if (renderer != null) { + renderer.render(); + } + } + ImGui.end(); + } + + camController.update(); + renderDesktop(delta, modelBatch, cam, modelInstances); + + ImGui.render(); + ImGuiSetup.imGuiGlImp.renderDrawData(ImGui.getDrawData()); + //Gdx.gl.glViewport(0, 0, Gdx.graphics.getBackBufferWidth(), Gdx.graphics.getBackBufferHeight()); + //Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); + } + + protected void renderDesktop(float delta, ModelBatch modelBatch, PerspectiveCamera cam, Array modelInstances) { + modelBatch.begin(cam); + for (ModelInstance instance : modelInstances) { + modelBatch.render(instance); + } + modelBatch.end(); + } + + @Override + public DeskAppScreen getDeskAppScreen() { + return deskAppScreen; + } +} diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/AbstractScrollScreen.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/AbstractScrollScreen.java similarity index 69% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/AbstractScrollScreen.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/AbstractScrollScreen.java index 325e2106..6006cef9 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/AbstractScrollScreen.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/AbstractScrollScreen.java @@ -1,14 +1,17 @@ -package love.distributedrebirth.gdxapp.screen; +package love.distributedrebirth.gdxapp4d.vrgem4.screen; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Screen; import com.badlogic.gdx.ScreenAdapter; import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.utils.ScreenUtils; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.GDXAppMain; +import love.distributedrebirth.gdxapp4d.tos4.GDXAppTos4; +import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") abstract public class AbstractScrollScreen extends ScreenAdapter { @@ -18,20 +21,24 @@ abstract public class AbstractScrollScreen extends ScreenAdapter { private int scrollIndex = 0; private int scrollLine = LINE_HEIGHT; private final Texture backgroundImage; + protected SpriteBatch batch; + protected BitmapFont font; public AbstractScrollScreen(String background) { + batch = new SpriteBatch(); + font = new BitmapFont(); backgroundImage = new Texture(Gdx.files.internal(background)); } abstract protected String getScrollText(); - abstract protected Class getNextScreen(GDXAppMain main); + abstract protected Class getNextScreen(GDXAppVrGem4 main); @Override public final void render(float delta) { ScreenUtils.clear(0f, 0f, 0f, 1f); - GDXAppMain.INSTANCE.batch.begin(); - GDXAppMain.INSTANCE.batch.draw(backgroundImage, 0, 0, GDXAppMain.INSTANCE.viewWidth, GDXAppMain.INSTANCE.viewHeight); + batch.begin(); + batch.draw(backgroundImage, 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); scrollDeltaTime += delta; if (scrollDeltaTime > 0.04f) { @@ -50,14 +57,14 @@ abstract public class AbstractScrollScreen extends ScreenAdapter { String[] lines = scrollText.split("\n"); for (int i=lines.length;i>0;i--) { String line = lines[i-1]; - GDXAppMain.INSTANCE.font.draw(GDXAppMain.INSTANCE.batch, line, 100, scrollLine + (drawLine*LINE_HEIGHT)); + font.draw(batch, line, 100, scrollLine + (drawLine*LINE_HEIGHT)); drawLine++; } - GDXAppMain.INSTANCE.batch.end(); + batch.end(); if (scrollText.length() >= 33) { - if (scrollLine >=GDXAppMain.INSTANCE.viewHeight || Gdx.input.isTouched() || Gdx.input.isKeyPressed(Keys.ENTER) || Gdx.input.isKeyPressed(Keys.SPACE)) { - GDXAppMain.INSTANCE.selectScreen(getNextScreen(GDXAppMain.INSTANCE)); + if (scrollLine >=Gdx.graphics.getHeight() || Gdx.input.isTouched() || Gdx.input.isKeyPressed(Keys.ENTER) || Gdx.input.isKeyPressed(Keys.SPACE)) { + GDXAppVrGem4.INSTANCE.terminal.selectScreen(getNextScreen(GDXAppVrGem4.INSTANCE)); } } } @@ -83,6 +90,8 @@ abstract public class AbstractScrollScreen extends ScreenAdapter { @Override public final void dispose() { + batch.dispose(); + font.dispose(); backgroundImage.dispose(); disposeScroll(); } diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenCredits.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenCredits.java similarity index 84% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenCredits.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenCredits.java index ccaff4c3..bde0def1 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenCredits.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenCredits.java @@ -1,10 +1,10 @@ -package love.distributedrebirth.gdxapp.screen; +package love.distributedrebirth.gdxapp4d.vrgem4.screen; import com.badlogic.gdx.Screen; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.GDXAppMain; -import love.distributedrebirth.gdxapp.music.MusicSongType; +import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4; +import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicSongType; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public class ScreenCredits extends AbstractScrollScreen { @@ -73,17 +73,17 @@ public class ScreenCredits extends AbstractScrollScreen { } @Override - protected Class getNextScreen(GDXAppMain main) { + protected Class getNextScreen(GDXAppVrGem4 main) { return ScreenDesktop1.class; } @Override public void showScroll() { - GDXAppMain.INSTANCE.music.play(MusicSongType.CREDITS); + GDXAppVrGem4.INSTANCE.music.play(MusicSongType.CREDITS); } @Override public void hideScroll() { - GDXAppMain.INSTANCE.music.play(MusicSongType.BACKGROUND); + GDXAppVrGem4.INSTANCE.music.play(MusicSongType.BACKGROUND); } } diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenDesktop1.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenDesktop1.java new file mode 100644 index 00000000..f175af6d --- /dev/null +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenDesktop1.java @@ -0,0 +1,37 @@ +package love.distributedrebirth.gdxapp4d.vrgem4.screen; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.ScreenAdapter; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.VertexAttributes.Usage; +import com.badlogic.gdx.graphics.g3d.Material; +import com.badlogic.gdx.graphics.g3d.Model; +import com.badlogic.gdx.graphics.g3d.ModelInstance; +import com.badlogic.gdx.graphics.g3d.attributes.ColorAttribute; +import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder; +import com.badlogic.gdx.utils.Array; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppScreen; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskTopScreen; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class ScreenDesktop1 extends AbstractScreenDesktop { + private Model grid; + + public ScreenDesktop1() { + super("Desktop1"); + //backgroundImage = new Texture(Gdx.files.internal("background/terrydavis-front.png")); + } + + protected void createModel(ModelBuilder modelBuilder, Array modelInstances) { + grid = modelBuilder.createLineGrid(33, 33, 1f, 1f, new Material(ColorAttribute.createDiffuse(1f,1f,1f,.1f)), Usage.Position | Usage.Normal); + modelInstances.add(new ModelInstance(grid, 0, 0, 0)); + } + + @Override + protected void disposeDesktop() { + grid.dispose(); + } +} diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenDesktop2.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenDesktop2.java new file mode 100644 index 00000000..7db8d3a4 --- /dev/null +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenDesktop2.java @@ -0,0 +1,37 @@ +package love.distributedrebirth.gdxapp4d.vrgem4.screen; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.ScreenAdapter; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.VertexAttributes.Usage; +import com.badlogic.gdx.graphics.g3d.Material; +import com.badlogic.gdx.graphics.g3d.Model; +import com.badlogic.gdx.graphics.g3d.ModelInstance; +import com.badlogic.gdx.graphics.g3d.attributes.ColorAttribute; +import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder; +import com.badlogic.gdx.utils.Array; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppScreen; +import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskTopScreen; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +public class ScreenDesktop2 extends AbstractScreenDesktop { + private Model grid; + + public ScreenDesktop2() { + super("Desktop2"); + //backgroundImage = new Texture(Gdx.files.internal("background/terrydavis-nose.png")); + } + + protected void createModel(ModelBuilder modelBuilder, Array modelInstances) { + grid = modelBuilder.createLineGrid(33, 33, 1f, 1f, new Material(ColorAttribute.createDiffuse(1f,1f,1f,.1f)), Usage.Position | Usage.Normal); + modelInstances.add(new ModelInstance(grid, 0, 0, 0)); + } + + @Override + protected void disposeDesktop() { + grid.dispose(); + } +} diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenDesktop3.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenDesktop3.java similarity index 94% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenDesktop3.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenDesktop3.java index 0550a5d1..24b6df4f 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenDesktop3.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenDesktop3.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.screen; +package love.distributedrebirth.gdxapp4d.vrgem4.screen; import com.badlogic.gdx.graphics.VertexAttributes.Usage; import com.badlogic.gdx.graphics.g3d.Material; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenDesktop4.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenDesktop4.java similarity index 99% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenDesktop4.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenDesktop4.java index 46edc628..c9b49d33 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenDesktop4.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenDesktop4.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.screen; +package love.distributedrebirth.gdxapp4d.vrgem4.screen; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.PerspectiveCamera; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenHelp.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenHelp.java similarity index 84% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenHelp.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenHelp.java index 728934fb..260d6a01 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenHelp.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenHelp.java @@ -1,10 +1,10 @@ -package love.distributedrebirth.gdxapp.screen; +package love.distributedrebirth.gdxapp4d.vrgem4.screen; import com.badlogic.gdx.Screen; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.GDXAppMain; -import love.distributedrebirth.gdxapp.music.MusicSongType; +import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4; +import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicSongType; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public class ScreenHelp extends AbstractScrollScreen { @@ -56,17 +56,17 @@ public class ScreenHelp extends AbstractScrollScreen { } @Override - protected Class getNextScreen(GDXAppMain main) { + protected Class getNextScreen(GDXAppVrGem4 main) { return ScreenDesktop1.class; } @Override public void showScroll() { - GDXAppMain.INSTANCE.music.play(MusicSongType.INTRO); + GDXAppVrGem4.INSTANCE.music.play(MusicSongType.INTRO); } @Override public void hideScroll() { - GDXAppMain.INSTANCE.music.play(MusicSongType.BACKGROUND); + GDXAppVrGem4.INSTANCE.music.play(MusicSongType.BACKGROUND); } } diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenIntro.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenIntro.java similarity index 59% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenIntro.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenIntro.java index 455942c8..9ff4ccf6 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenIntro.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenIntro.java @@ -1,22 +1,29 @@ -package love.distributedrebirth.gdxapp.screen; +package love.distributedrebirth.gdxapp4d.vrgem4.screen; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.ScreenAdapter; import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.utils.ScreenUtils; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.GDXAppMain; -import love.distributedrebirth.gdxapp.music.MusicSongType; +import love.distributedrebirth.gdxapp4d.tos4.GDXAppTos4; +import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4; +import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicSongType; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public class ScreenIntro extends ScreenAdapter { private Texture backgroundImage; private float colorDeltaTime = 0f; private boolean colorPositive = true; - + protected SpriteBatch batch; + protected BitmapFont font; + public ScreenIntro() { + batch = new SpriteBatch(); + font = new BitmapFont(); backgroundImage = new Texture(Gdx.files.internal("background/temple-os.png")); } @@ -34,24 +41,26 @@ public class ScreenIntro extends ScreenAdapter { } ScreenUtils.clear(0.333f, colorDeltaTime, colorDeltaTime, 1); - GDXAppMain.INSTANCE.batch.begin(); - GDXAppMain.INSTANCE.batch.draw(backgroundImage, 0, 0, GDXAppMain.INSTANCE.viewWidth, GDXAppMain.INSTANCE.viewHeight); - GDXAppMain.INSTANCE.font.draw(GDXAppMain.INSTANCE.batch, "Tap anywhere to begin!", GDXAppMain.INSTANCE.viewWidth/2 - 73, 33); - GDXAppMain.INSTANCE.batch.end(); + batch.begin(); + batch.draw(backgroundImage, 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); + font.draw(batch, "Tap anywhere to begin!", Gdx.graphics.getWidth()/2 - 73, 33); + batch.end(); if (Gdx.input.isTouched() || Gdx.input.isKeyPressed(Keys.ENTER) || Gdx.input.isKeyPressed(Keys.SPACE)) { - GDXAppMain.INSTANCE.selectScreen(ScreenIntroMission.class); + GDXAppVrGem4.INSTANCE.terminal.selectScreen(ScreenIntroMission.class); dispose(); } } @Override public void show() { - GDXAppMain.INSTANCE.music.play(MusicSongType.INTRO); + GDXAppVrGem4.INSTANCE.music.play(MusicSongType.INTRO); } @Override public void dispose() { + //batch.dispose(); + font.dispose(); backgroundImage.dispose(); } } diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenIntroMission.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenIntroMission.java similarity index 86% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenIntroMission.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenIntroMission.java index b20c9cf6..3b1bd2e1 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/ScreenIntroMission.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/ScreenIntroMission.java @@ -1,10 +1,10 @@ -package love.distributedrebirth.gdxapp.screen; +package love.distributedrebirth.gdxapp4d.vrgem4.screen; import com.badlogic.gdx.Screen; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; -import love.distributedrebirth.gdxapp.GDXAppMain; -import love.distributedrebirth.gdxapp.music.MusicSongType; +import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4; +import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicSongType; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public class ScreenIntroMission extends AbstractScrollScreen { @@ -66,12 +66,12 @@ public class ScreenIntroMission extends AbstractScrollScreen { } @Override - protected Class getNextScreen(GDXAppMain main) { + protected Class getNextScreen(GDXAppVrGem4 main) { return ScreenDesktop1.class; } @Override public void hideScroll() { - GDXAppMain.INSTANCE.music.play(MusicSongType.BACKGROUND); + GDXAppVrGem4.INSTANCE.music.play(MusicSongType.BACKGROUND); } } diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/UserColorShader.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/UserColorShader.java similarity index 97% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/UserColorShader.java rename to gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/UserColorShader.java index 6e80d8b4..6dda3d25 100644 --- a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/java/love/distributedrebirth/gdxapp/screen/UserColorShader.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/UserColorShader.java @@ -1,4 +1,4 @@ -package love.distributedrebirth.gdxapp.screen; +package love.distributedrebirth.gdxapp4d.vrgem4.screen; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Camera; diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/love/distributedrebirth/gdxapp/Main.properties b/gdxapp4d-vrgem4/src/main/resources/love/distributedrebirth/gdxapp/Main.properties similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/love/distributedrebirth/gdxapp/Main.properties rename to gdxapp4d-vrgem4/src/main/resources/love/distributedrebirth/gdxapp/Main.properties diff --git a/gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/love/distributedrebirth/gdxapp/Main_hiero.properties b/gdxapp4d-vrgem4/src/main/resources/love/distributedrebirth/gdxapp/Main_hiero.properties similarity index 100% rename from gdxapp4d-boot/gdxapp4d-boot-tos4/src/main/resources/love/distributedrebirth/gdxapp/Main_hiero.properties rename to gdxapp4d-vrgem4/src/main/resources/love/distributedrebirth/gdxapp/Main_hiero.properties diff --git a/pom.xml b/pom.xml index 6e6c3549..63e907aa 100644 --- a/pom.xml +++ b/pom.xml @@ -9,10 +9,16 @@ 3.0.1 - unitxc-converter - gdxapp4d-chain gdxapp4d-lib - gdxapp4d-boot + gdxapp4d-tos4 + gdxapp4d-vrgem4 + gdxapp4d-boot-desktop + gdxapp4d-app-notepad + gdxapp4d-app-tosamp + gdxapp4d-chain-music-templeos + gdxapp4d-chain-music-msx + gdxapp4d-chain-sys-engine + gdxapp4d-chain-sys-ocean UTF-8 @@ -26,7 +32,7 @@ org.slf4j slf4j-api - 1.7.21 + 1.7.36 org.apache.commons @@ -41,7 +47,7 @@ ch.qos.logback logback-classic - 1.1.7 + 1.2.10 org.x4o @@ -98,6 +104,11 @@ gdx-nativefilechooser-desktop ${nativefilechooser.version} + + org.apache.felix + org.apache.felix.framework + 7.0.3 + @@ -106,11 +117,6 @@ junit-jupiter test - - ch.qos.logback - logback-classic - test - @@ -135,6 +141,11 @@ maven-source-plugin 2.2.1 + + org.apache.felix + maven-bundle-plugin + 5.1.4 +