Removed intro and loaded the oceans

This commit is contained in:
Willem Cazander 2022-03-02 00:19:07 +01:00
parent f0de4f3a9b
commit 706baabfd0
10 changed files with 157 additions and 164 deletions

View file

@ -90,6 +90,11 @@
love.distributedrebirth.numberxd.base2t.typexl,
love.distributedrebirth.numberxd.glyph,
love.distributedrebirth.numberxd.x4o,
love.distributedrebirth.warpme,
love.distributedrebirth.warpme.core,
love.distributedrebirth.warpme.hash,
love.distributedrebirth.warpme.sea,
love.distributedrebirth.warpme.ship,
love.distributedrebirth.unicode4d,
love.distributedrebirth.unicode4d.atlas
</Import-Package>

View file

@ -12,6 +12,7 @@ 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.SystemWarpShip;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpTerminal;
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenCredits;
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop1;
@ -19,7 +20,6 @@ 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;
@ -27,6 +27,7 @@ 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;
import love.distributedrebirth.warpme.ship.WaterShipOcean;
public class GDXAppVrGem4Activator implements BundleActivator {
@ -59,13 +60,16 @@ public class GDXAppVrGem4Activator implements BundleActivator {
bootScreen.bootLine("vrGEM4 Booting...");
// ref to init
// LOG.debug("BãßBȍőnCoffinʸᴰ init......");
for (DefaultEnumBaseᴶᴹˣ<?,?> coffin:coffinInstances()) {
BãßBȍőnCoffinOpenʸᴰ.lockCoffin(coffin);
BãßBȍőnCoffinOpenʸᴰ.lockCoffin(coffin, v -> bootScreen.bootLine(v));
}
bootScreen.bootLine("BãßBȍőnCoffinʸᴰ init done.");
bootScreen.bootLine("ImGui Setup");
try {
Thread.sleep(100);
} catch (InterruptedException ignored) {
}
ImBoolean imLoaded = new ImBoolean(false);
Gdx.app.postRunnable(new Runnable() {
@Override
@ -82,11 +86,11 @@ public class GDXAppVrGem4Activator implements BundleActivator {
}
bootScreen.bootLine("ImGui Loaded");
ServiceReference<SystemWarpBootArgs> bootArgsRef = context.getServiceReference(SystemWarpBootArgs.class);
SystemWarpBootArgs bootArgs = context.getService(bootArgsRef);
List<String> args = bootArgs.getBootArgs();
bootScreen.bootLine("warpcore: Check request");
try {
if (args.contains("warpcore-load")) {
bootScreen.bootLine("warpcore-load: requested");
@ -103,13 +107,13 @@ public class GDXAppVrGem4Activator implements BundleActivator {
}
if (!args.contains("warpcore-nolock")) {
bootScreen.bootLine("warpcore-lock: BãßLockWarpCipher");
TOSWarpCore.INSTANCE.BãßLockWarpCipher();
TOSWarpCore.INSTANCE.BãßLockWarpCipher(v -> {});
} else {
bootScreen.bootLine("warpcore-nolock: requested");
}
if (args.contains("full-screen")) {
System.out.println("full-screen: requested");
bootScreen.bootLine("full-screen: requested");
Gdx.app.postRunnable(new Runnable() {
@Override
public void run() {
@ -118,33 +122,58 @@ public class GDXAppVrGem4Activator implements BundleActivator {
});
}
bootScreen.bootLine("vrGEM4: init");
GDXAppVrGem4.INSTANCE.init(args, terminal);
bootScreen.bootLine("terminal: added screens");
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);
}
terminal.registrateScreen(new ScreenIntroMission());
}
});
try {
Thread.sleep(100);
} catch (InterruptedException ignored) {
}
ServiceReference<SystemWarpShip> systemWarpShipRef = context.getServiceReference(SystemWarpShip.class);
SystemWarpShip systemWarpShip = context.getService(systemWarpShipRef);
int result = 0;
try {
for (WaterShipOcean ocean:systemWarpShip.getWarpShip().theShip().getShipOceans()) {
result = systemWarpShip.loadWaterOcean(context, ocean.getSea(), v -> bootScreen.bootLine(v));
}
} catch (Exception e) {
e.printStackTrace();
bootScreen.bootLine("ERROR: "+e.getMessage());
return;
}
if (result > 0) {
bootScreen.bootLine("vrGEM4: FAILURE BOOT ABORTED");
} else {
bootScreen.bootLine("vrGEM4: chains resolved.");
try {
Thread.sleep(5000);
} catch (InterruptedException ignored) {
}
Gdx.app.postRunnable(new Runnable() {
@Override
public void run() {
terminal.selectScreen(ScreenDesktop1.class);
}
});
}
}
//TODO: add layer or ?? private <T extends BãßBȍőnCoffinStoreʸᴰ<?>,DefaultAuthorInfoʸᴰ> T[] storeInstances() {
@SuppressWarnings("unchecked")
private <T extends DefaultEnumBaseᴶᴹˣ<?,?>> T[] coffinInstances() {

View file

@ -35,7 +35,7 @@ public class GDXAppVrGem4BootScreen extends ScreenAdapter implements GDXAppVrGem
for (String message:messages) {
font.draw(batch, message, textX, textY-=textYStep);
}
batch.draw(backgroundImage, textY, textY, textY, textY);
batch.draw(backgroundImage, 200, textY, Gdx.graphics.getWidth() - 200, Gdx.graphics.getHeight() - textY);
}
batch.end();
}

View file

@ -1,66 +0,0 @@
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.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"));
}
@Override
public void render(float delta) {
if (colorPositive) {
colorDeltaTime += Gdx.graphics.getDeltaTime()/2;
} else {
colorDeltaTime -= Gdx.graphics.getDeltaTime()/2;
}
if (colorDeltaTime > 1f) {
colorPositive = false;
} else if (colorDeltaTime < 0f) {
colorPositive = true;
}
ScreenUtils.clear(0.333f, colorDeltaTime, colorDeltaTime, 1);
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)) {
GDXAppVrGem4.INSTANCE.terminal.selectScreen(ScreenIntroMission.class);
dispose();
}
}
@Override
public void show() {
GDXAppVrGem4.INSTANCE.music.play(MusicSongType.INTRO);
}
@Override
public void dispose() {
//batch.dispose();
font.dispose();
backgroundImage.dispose();
}
}