Added SystemGdxFont

This commit is contained in:
Willem Cazander 2022-03-03 00:50:26 +01:00
parent c6bee21cee
commit b619004477
20 changed files with 146 additions and 85 deletions

View file

@ -16,10 +16,6 @@
<groupId>com.badlogicgames.gdx</groupId> <groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-backend-lwjgl3</artifactId> <artifactId>gdx-backend-lwjgl3</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-platform</artifactId>
</dependency>
<dependency> <dependency>
<groupId>games.spooky.gdx</groupId> <groupId>games.spooky.gdx</groupId>
<artifactId>gdx-nativefilechooser-desktop</artifactId> <artifactId>gdx-nativefilechooser-desktop</artifactId>

View file

@ -49,6 +49,17 @@
<artifactId>org.osgi.service.component.annotations</artifactId> <artifactId>org.osgi.service.component.annotations</artifactId>
<version>1.4.0</version> <version>1.4.0</version>
</dependency> </dependency>
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-freetype</artifactId>
<version>1.10.0</version>
</dependency>
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-freetype-platform</artifactId>
<version>1.10.0</version>
<classifier>natives-desktop</classifier>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

View file

@ -19,13 +19,13 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ;
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ; import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ;
import love.distributedrebirth.bassboonyd.jmx.GuageCounterᴶᴹˣ; import love.distributedrebirth.bassboonyd.jmx.GuageCounterᴶᴹˣ;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpTerminal; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxTerminal;
import net.spookygames.gdx.nativefilechooser.NativeFileChooser; import net.spookygames.gdx.nativefilechooser.NativeFileChooser;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
@BãßBȍőnClassInfoʸᴰ(name = "GDXAppTos4", purpose = "Main loop render dispatcher and bootup.") @BãßBȍőnClassInfoʸᴰ(name = "GDXAppTos4", purpose = "Main loop render dispatcher and bootup.")
@BãßBȍőnPackageInfoʸᴰ(name = "love.distributedrebirth.gdxapp4d.tos4") @BãßBȍőnPackageInfoʸᴰ(name = "love.distributedrebirth.gdxapp4d.tos4")
public enum GDXAppTos4 implements DefaultEnumInstanceᴶᴹˣ<GDXAppTos4,GDXAppTos4Keyʸᴰ>, ApplicationListener, SystemWarpTerminal { public enum GDXAppTos4 implements DefaultEnumInstanceᴶᴹˣ<GDXAppTos4,GDXAppTos4Keyʸᴰ>, ApplicationListener, SystemGdxTerminal {
INSTANCE; INSTANCE;

View file

@ -18,13 +18,19 @@ import org.slf4j.LoggerFactory;
import org.x4o.xml.io.X4OConnectionException; import org.x4o.xml.io.X4OConnectionException;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.FreeTypeFontParameter;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBase; import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBase;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpLogger; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxFont;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxLog;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpSea; import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpSea;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpShip; import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpShip;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpTerminal; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxTerminal;
import love.distributedrebirth.warpme.Warpᵐᵉ; import love.distributedrebirth.warpme.Warpᵐᵉ;
import love.distributedrebirth.warpme.sea.WaterOcean; import love.distributedrebirth.warpme.sea.WaterOcean;
import love.distributedrebirth.warpme.sea.WaterOceanDriver; import love.distributedrebirth.warpme.sea.WaterOceanDriver;
@ -43,9 +49,10 @@ public class GDXAppTos4Activator implements BundleActivator {
private NativeFileChooser fileChooser; private NativeFileChooser fileChooser;
private File hyperdriveHome; private File hyperdriveHome;
private File warpshipHome; private File warpshipHome;
private BitmapFont gdxFont;
private Properties localOverrides; private Properties localOverrides;
private WaterDevice warpshipDevice; private WaterDevice warpshipDevice;
private SystemWarpTerminal systemWarpTerminal; private SystemGdxTerminal systemGdxTerminal;
private List<GDXAppTos4BootListener> listeners = new ArrayList<>(); private List<GDXAppTos4BootListener> listeners = new ArrayList<>();
private static final String SYSTEM_USER_HOME = "user.home"; private static final String SYSTEM_USER_HOME = "user.home";
@ -55,12 +62,12 @@ public class GDXAppTos4Activator implements BundleActivator {
public GDXAppTos4Activator() { public GDXAppTos4Activator() {
} }
public void BãßInit(List<String> args, int viewWidth, int viewHeight,NativeFileChooser fileChooser, SystemWarpTerminal systemWarpTerminal) { public void BãßInit(List<String> args, int viewWidth, int viewHeight,NativeFileChooser fileChooser, SystemGdxTerminal systemGdxTerminal) {
this.args = args; this.args = args;
this.viewWidth = viewWidth; this.viewWidth = viewWidth;
this.viewHeight = viewHeight; this.viewHeight = viewHeight;
this.fileChooser = fileChooser; this.fileChooser = fileChooser;
this.systemWarpTerminal = systemWarpTerminal; this.systemGdxTerminal = systemGdxTerminal;
} }
private void fireMessageEvent(String message) { private void fireMessageEvent(String message) {
@ -138,13 +145,34 @@ public class GDXAppTos4Activator implements BundleActivator {
} }
} }
FreeTypeFontParameter parameter = new FreeTypeFontParameter();
parameter.characters = FreeTypeFontGenerator.DEFAULT_CHARS + getRangeUnicodeUsed();
parameter.size = 14;
Gdx.app.postRunnable(new Runnable() {
@Override
public void run() {
FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("font/code-2000.ttf"));
gdxFont = generator.generateFont(parameter);
}
});
while (gdxFont == null) {
try {
Thread.sleep(100);
} catch (InterruptedException ignored) {
}
}
fireMessageEvent("gdx-font: "+parameter.characters.length()+" glyphs loaded.");
SystemWarpShipImpl systemWarpShip = new SystemWarpShipImpl(); SystemWarpShipImpl systemWarpShip = new SystemWarpShipImpl();
context.registerService(SystemWarpLogger.class.getName(), new SystemWarpLoggerImpl(), new Hashtable<String, String>());
context.registerService(SystemWarpBase.class.getName(), new SystemWarpBaseImpl(), new Hashtable<String, String>()); context.registerService(SystemWarpBase.class.getName(), new SystemWarpBaseImpl(), new Hashtable<String, String>());
context.registerService(SystemWarpBootArgs.class.getName(), new SystemWarpBootArgsImpl(), new Hashtable<String, String>());
context.registerService(SystemWarpShip.class.getName(), systemWarpShip, new Hashtable<String, String>()); context.registerService(SystemWarpShip.class.getName(), systemWarpShip, new Hashtable<String, String>());
context.registerService(SystemWarpTerminal.class.getName(), systemWarpTerminal, new Hashtable<String, String>());
context.registerService(SystemGdxFont.class.getName(), new SystemGdxFontImpl(gdxFont), new Hashtable<String, String>());
context.registerService(SystemGdxLog.class.getName(), new SystemGdxLogImpl(), new Hashtable<String, String>());
context.registerService(SystemGdxBootArgs.class.getName(), new SystemGdxBootArgsImpl(), new Hashtable<String, String>());
context.registerService(SystemGdxTerminal.class.getName(), systemGdxTerminal, new Hashtable<String, String>());
int result = 0; int result = 0;
try { try {
@ -161,6 +189,16 @@ public class GDXAppTos4Activator implements BundleActivator {
} }
} }
private static String getRangeUnicodeUsed() {
StringBuilder buf = new StringBuilder();
buf.append("©Δ∞ 仙上主天");
buf.append("BãßBȍőnAuthorInfoʸᴰ");
for (int c=0x0100;c<=0x0200;c++) {
buf.append(""+(char)c);
}
return buf.toString();
}
public class SystemWarpSeaImpl implements SystemWarpSea { public class SystemWarpSeaImpl implements SystemWarpSea {
private final WaterOcean warpSea; private final WaterOcean warpSea;
@ -189,20 +227,20 @@ public class GDXAppTos4Activator implements BundleActivator {
} }
public class SystemWarpBootArgsImpl implements SystemWarpBootArgs { public class SystemGdxBootArgsImpl implements SystemGdxBootArgs {
@Override @Override
public List<String> getBootArgs() { public boolean isWarpCoreNoLock() {
return args; return args.contains("warpcore-nolock");
} }
@Override @Override
public int getBootWindowWidth() { public int getWindowWidth() {
return viewWidth; return viewWidth;
} }
@Override @Override
public int getBootWindowHeight() { public int getWindowHeight() {
return viewHeight; return viewHeight;
} }
@ -210,11 +248,6 @@ public class GDXAppTos4Activator implements BundleActivator {
public NativeFileChooser getFileChooser() { public NativeFileChooser getFileChooser() {
return fileChooser; return fileChooser;
} }
@Override
public Properties getLocalOverrides() {
return localOverrides;
}
} }
public class SystemWarpShipImpl implements SystemWarpShip { public class SystemWarpShipImpl implements SystemWarpShip {
@ -290,26 +323,40 @@ public class GDXAppTos4Activator implements BundleActivator {
} }
} }
public static class SystemWarpLoggerImpl implements SystemWarpLogger { public static class SystemGdxLogImpl implements SystemGdxLog {
@Override @Override
public void infoTag(String tag, String message, Object...args) { public void infoTag(String tag, String message, Object...args) {
LoggerFactory.getLogger(tag).info(message, args); LoggerFactory.getLogger(tag).info(message, args);
} }
@Override @Override
public void debugTag(String tag, String message, Object...args) { public void debugTag(String tag, String message, Object...args) {
LoggerFactory.getLogger(tag).debug(message, args); LoggerFactory.getLogger(tag).debug(message, args);
} }
@Override @Override
public void errorTag(String tag, String message, Object...args) { public void errorTag(String tag, String message, Object...args) {
LoggerFactory.getLogger(tag).error(message, args); LoggerFactory.getLogger(tag).error(message, args);
} }
@Override @Override
public void errorTag(String tag, String message, Throwable exception) { public void errorTag(String tag, String message, Throwable exception) {
LoggerFactory.getLogger(tag).error(message, exception); LoggerFactory.getLogger(tag).error(message, exception);
} }
} }
public static class SystemGdxFontImpl implements SystemGdxFont {
private final BitmapFont font;
public SystemGdxFontImpl(BitmapFont font) {
this.font = font;
}
@Override
public BitmapFont getFont() {
return font;
}
}
} }

View file

@ -51,6 +51,7 @@ public class GDXAppTos4BootFactory {
"com.badlogic.gdx.files,"+ "com.badlogic.gdx.files,"+
"com.badlogic.gdx.graphics,"+ "com.badlogic.gdx.graphics,"+
"com.badlogic.gdx.graphics.g2d,"+ "com.badlogic.gdx.graphics.g2d,"+
"com.badlogic.gdx.graphics.g2d.freetype,"+
"com.badlogic.gdx.graphics.g3d,"+ "com.badlogic.gdx.graphics.g3d,"+
"com.badlogic.gdx.graphics.g3d.attributes,"+ "com.badlogic.gdx.graphics.g3d.attributes,"+
"com.badlogic.gdx.graphics.g3d.decals,"+ "com.badlogic.gdx.graphics.g3d.decals,"+

View file

@ -1,21 +1,16 @@
package love.distributedrebirth.gdxapp4d.tos4.service; package love.distributedrebirth.gdxapp4d.tos4.service;
import java.util.List;
import java.util.Properties;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import net.spookygames.gdx.nativefilechooser.NativeFileChooser; import net.spookygames.gdx.nativefilechooser.NativeFileChooser;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface SystemWarpBootArgs { public interface SystemGdxBootArgs {
List<String> getBootArgs();
int getBootWindowWidth(); boolean isWarpCoreNoLock();
int getBootWindowHeight(); int getWindowWidth();
int getWindowHeight();
NativeFileChooser getFileChooser(); NativeFileChooser getFileChooser();
Properties getLocalOverrides();
} }

View file

@ -0,0 +1,11 @@
package love.distributedrebirth.gdxapp4d.tos4.service;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface SystemGdxFont {
BitmapFont getFont();
}

View file

@ -3,7 +3,7 @@ package love.distributedrebirth.gdxapp4d.tos4.service;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface SystemWarpLogger { public interface SystemGdxLog {
void infoTag(String tag, String message, Object...args); void infoTag(String tag, String message, Object...args);

View file

@ -5,7 +5,7 @@ import com.badlogic.gdx.Screen;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface SystemWarpTerminal { public interface SystemGdxTerminal {
void registrateScreen(Screen screen); void registrateScreen(Screen screen);

View file

@ -44,6 +44,7 @@
com.badlogic.gdx.files, com.badlogic.gdx.files,
com.badlogic.gdx.graphics, com.badlogic.gdx.graphics,
com.badlogic.gdx.graphics.g2d, com.badlogic.gdx.graphics.g2d,
com.badlogic.gdx.graphics.g2d.freetype,
com.badlogic.gdx.graphics.g3d, com.badlogic.gdx.graphics.g3d,
com.badlogic.gdx.graphics.g3d.attributes, com.badlogic.gdx.graphics.g3d.attributes,
com.badlogic.gdx.graphics.g3d.decals, com.badlogic.gdx.graphics.g3d.decals,

View file

@ -8,7 +8,7 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ;
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ; import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpTerminal; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxTerminal;
import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicManager; import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicManager;
@ -19,7 +19,7 @@ public enum GDXAppVrGem4 implements DefaultEnumInstanceᴶᴹˣ<GDXAppVrGem4,GDX
INSTANCE; INSTANCE;
public SystemWarpTerminal terminal; public SystemGdxTerminal terminal;
public MusicManager music; public MusicManager music;
//public FontAtlas basePlane; //public FontAtlas basePlane;
private final BãßBȍőnCoffinOpenʸᴰ<GDXAppVrGem4Keyʸᴰ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance(); private final BãßBȍőnCoffinOpenʸᴰ<GDXAppVrGem4Keyʸᴰ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
@ -30,13 +30,9 @@ public enum GDXAppVrGem4 implements DefaultEnumInstanceᴶᴹˣ<GDXAppVrGem4,GDX
BȍőnJmxInit(GDXAppVrGem4Keyʸᴰ.JMX); BȍőnJmxInit(GDXAppVrGem4Keyʸᴰ.JMX);
} }
public void init(List<String> args, SystemWarpTerminal terminal) { public void init(SystemGdxTerminal terminal) {
boolean musicStop = args.contains("music-stop");
if (musicStop) {
System.out.println("music-stop: requested");
}
music = new MusicManager(); music = new MusicManager();
music.init(musicStop); music.init(false);
this.terminal = terminal; this.terminal = terminal;
} }

View file

@ -1,7 +1,5 @@
package love.distributedrebirth.gdxapp4d.vrgem4; package love.distributedrebirth.gdxapp4d.vrgem4;
import java.util.List;
import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext; import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference; import org.osgi.framework.ServiceReference;
@ -11,9 +9,10 @@ import com.badlogic.gdx.Gdx;
import imgui.type.ImBoolean; import imgui.type.ImBoolean;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumBaseᴶᴹˣ; import love.distributedrebirth.bassboonyd.jmx.DefaultEnumBaseᴶᴹˣ;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxFont;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpShip; import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpShip;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpTerminal; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxTerminal;
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenCredits; import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenCredits;
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop1; import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop1;
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop2; import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop2;
@ -25,8 +24,6 @@ import love.distributedrebirth.numberxd.base2t.Base2PartsFactory;
import love.distributedrebirth.numberxd.base2t.Base2Terminator; import love.distributedrebirth.numberxd.base2t.Base2Terminator;
import love.distributedrebirth.numberxd.base2t.part.warp.TOSWarpCore; import love.distributedrebirth.numberxd.base2t.part.warp.TOSWarpCore;
import love.distributedrebirth.numberxd.glyph.BaseGlyphSet; import love.distributedrebirth.numberxd.glyph.BaseGlyphSet;
import love.distributedrebirth.warpme.core.WaterBucket;
import love.distributedrebirth.warpme.core.WaterBucketDriver;
import love.distributedrebirth.warpme.ship.WaterShipOcean; import love.distributedrebirth.warpme.ship.WaterShipOcean;
public class GDXAppVrGem4Activator implements BundleActivator { public class GDXAppVrGem4Activator implements BundleActivator {
@ -46,10 +43,13 @@ public class GDXAppVrGem4Activator implements BundleActivator {
} catch (InterruptedException ignored) { } catch (InterruptedException ignored) {
} }
ServiceReference<SystemWarpTerminal> termRef = context.getServiceReference(SystemWarpTerminal.class); ServiceReference<SystemGdxTerminal> termRef = context.getServiceReference(SystemGdxTerminal.class);
SystemWarpTerminal terminal = context.getService(termRef); SystemGdxTerminal terminal = context.getService(termRef);
GDXAppVrGem4BootScreen bootScreen = new GDXAppVrGem4BootScreen(); ServiceReference<SystemGdxFont> gdxFontRef = context.getServiceReference(SystemGdxFont.class);
SystemGdxFont gdxFont = context.getService(gdxFontRef);
GDXAppVrGem4BootScreen bootScreen = new GDXAppVrGem4BootScreen(gdxFont.getFont());
Gdx.app.postRunnable(new Runnable() { Gdx.app.postRunnable(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -91,10 +91,10 @@ public class GDXAppVrGem4Activator implements BundleActivator {
} }
bootScreen.bootLine("ImGui Loaded"); bootScreen.bootLine("ImGui Loaded");
ServiceReference<SystemWarpBootArgs> bootArgsRef = context.getServiceReference(SystemWarpBootArgs.class); ServiceReference<SystemGdxBootArgs> bootArgsRef = context.getServiceReference(SystemGdxBootArgs.class);
SystemWarpBootArgs bootArgs = context.getService(bootArgsRef); SystemGdxBootArgs bootArgs = context.getService(bootArgsRef);
List<String> args = bootArgs.getBootArgs();
/*
bootScreen.bootLine("warpcore: Check request"); bootScreen.bootLine("warpcore: Check request");
try { try {
if (args.contains("warpcore-load")) { if (args.contains("warpcore-load")) {
@ -110,13 +110,15 @@ public class GDXAppVrGem4Activator implements BundleActivator {
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
if (!args.contains("warpcore-nolock")) { */
if (!bootArgs.isWarpCoreNoLock()) {
bootScreen.bootLine("warpcore-lock: BãßLockWarpCipher"); bootScreen.bootLine("warpcore-lock: BãßLockWarpCipher");
TOSWarpCore.INSTANCE.BãßLockWarpCipher(v -> {}); TOSWarpCore.INSTANCE.BãßLockWarpCipher(v -> {});
} else { } else {
bootScreen.bootLine("warpcore-nolock: requested"); bootScreen.bootLine("warpcore-nolock: requested");
} }
/*
if (args.contains("full-screen")) { if (args.contains("full-screen")) {
bootScreen.bootLine("full-screen: requested"); bootScreen.bootLine("full-screen: requested");
Gdx.app.postRunnable(new Runnable() { Gdx.app.postRunnable(new Runnable() {
@ -126,9 +128,10 @@ public class GDXAppVrGem4Activator implements BundleActivator {
} }
}); });
} }
*/
bootScreen.bootLine("vrGEM4: init"); bootScreen.bootLine("vrGEM4: init");
GDXAppVrGem4.INSTANCE.init(args, terminal); GDXAppVrGem4.INSTANCE.init(terminal);
bootScreen.bootLine("terminal: added screens"); bootScreen.bootLine("terminal: added screens");
Gdx.app.postRunnable(new Runnable() { Gdx.app.postRunnable(new Runnable() {
@ -167,7 +170,7 @@ public class GDXAppVrGem4Activator implements BundleActivator {
} else { } else {
bootScreen.bootLine("vrGEM4: chains resolved."); bootScreen.bootLine("vrGEM4: chains resolved.");
try { try {
Thread.sleep(2000); Thread.sleep(6000);
} catch (InterruptedException ignored) { } catch (InterruptedException ignored) {
} }
Gdx.app.postRunnable(new Runnable() { Gdx.app.postRunnable(new Runnable() {

View file

@ -11,18 +11,18 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch;
public class GDXAppVrGem4BootScreen extends ScreenAdapter implements GDXAppVrGem4BootListener { public class GDXAppVrGem4BootScreen extends ScreenAdapter implements GDXAppVrGem4BootListener {
private BitmapFont font; private final BitmapFont font;
private SpriteBatch batch; private SpriteBatch batch;
private Texture backgroundImage; private Texture backgroundImage;
private List<String> messages = new ArrayList<>(); private List<String> messages = new ArrayList<>();
public GDXAppVrGem4BootScreen() { public GDXAppVrGem4BootScreen(BitmapFont font) {
this.font = font;
} }
public void create() { public void create() {
batch = new SpriteBatch(); batch = new SpriteBatch();
backgroundImage = new Texture(Gdx.files.internal("background/temple-os.png")); backgroundImage = new Texture(Gdx.files.internal("background/temple-os.png"));
font = new BitmapFont();
} }
@Override @Override

View file

@ -5,14 +5,14 @@ import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate; import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpLogger; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxLog;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpShip; import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpShip;
@Component @Component
public class TestComponent { public class TestComponent {
@Reference @Reference
private SystemWarpLogger log; private SystemGdxLog log;
@Reference @Reference
private SystemWarpShip warpShip; private SystemWarpShip warpShip;

View file

@ -8,7 +8,7 @@ import com.badlogic.gdx.Gdx;
import imgui.ImGui; import imgui.ImGui;
import imgui.type.ImBoolean; import imgui.type.ImBoolean;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
import love.distributedrebirth.gdxapp4d.vrgem4.FontAwesomeIcons; import love.distributedrebirth.gdxapp4d.vrgem4.FontAwesomeIcons;
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppLauncher; import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppLauncher;
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4; import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4;
@ -29,13 +29,13 @@ import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenHelp;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class DeskTopScreenMenu { public class DeskTopScreenMenu {
private SystemWarpBootArgs bootArgs; private SystemGdxBootArgs bootArgs;
private List<GDXAppLauncher> apps; private List<GDXAppLauncher> apps;
private ImBoolean fileMinimizeSelected = new ImBoolean(false); private ImBoolean fileMinimizeSelected = new ImBoolean(false);
private ImBoolean fileCloseSelected = new ImBoolean(false); private ImBoolean fileCloseSelected = new ImBoolean(false);
private ImBoolean tosSelfSelected = new ImBoolean(false); private ImBoolean tosSelfSelected = new ImBoolean(false);
public DeskTopScreenMenu(SystemWarpBootArgs bootArgs) { public DeskTopScreenMenu(SystemGdxBootArgs bootArgs) {
this.bootArgs = bootArgs; this.bootArgs = bootArgs;
apps = new ArrayList<>(); apps = new ArrayList<>();
apps.add(new GDXAppLauncher("Basic Console", () -> new BasicConsoleApp())); apps.add(new GDXAppLauncher("Basic Console", () -> new BasicConsoleApp()));
@ -225,7 +225,7 @@ public class DeskTopScreenMenu {
ImGui.separator(); ImGui.separator();
if (Gdx.graphics.isFullscreen()) { if (Gdx.graphics.isFullscreen()) {
if (ImGui.menuItem(FontAwesomeIcons.Wheelchair + " Window Mode")) { if (ImGui.menuItem(FontAwesomeIcons.Wheelchair + " Window Mode")) {
Gdx.graphics.setWindowedMode(bootArgs.getBootWindowWidth(), bootArgs.getBootWindowHeight()); Gdx.graphics.setWindowedMode(bootArgs.getWindowWidth(), bootArgs.getWindowHeight());
} }
} else { } else {
if (ImGui.menuItem(FontAwesomeIcons.FighterJet + " Full Screen")) { if (ImGui.menuItem(FontAwesomeIcons.FighterJet + " Full Screen")) {

View file

@ -17,7 +17,7 @@ import imgui.ImGui;
import imgui.flag.ImGuiCond; import imgui.flag.ImGuiCond;
import imgui.flag.ImGuiWindowFlags; import imgui.flag.ImGuiWindowFlags;
import imgui.type.ImBoolean; import imgui.type.ImBoolean;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
import love.distributedrebirth.gdxapp4d.vrgem4.ImGuiSetup; import love.distributedrebirth.gdxapp4d.vrgem4.ImGuiSetup;
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskApp; import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskApp;
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection; import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection;
@ -42,7 +42,7 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
private ModelBatch modelBatch; private ModelBatch modelBatch;
private Array<ModelInstance> modelInstances = new Array<ModelInstance>(); private Array<ModelInstance> modelInstances = new Array<ModelInstance>();
public AbstractScreenDesktop(String name, SystemWarpBootArgs bootArgs) { public AbstractScreenDesktop(String name, SystemGdxBootArgs bootArgs) {
this.create(bootArgs); this.create(bootArgs);
deskAppScreen = new DeskAppScreen(name); deskAppScreen = new DeskAppScreen(name);
deskAppScreen.addDeskAppListener(new DeskAppScreenListener() { deskAppScreen.addDeskAppListener(new DeskAppScreenListener() {
@ -62,7 +62,7 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
} }
private void create(SystemWarpBootArgs bootArgs) { private void create(SystemGdxBootArgs bootArgs) {
batch = new SpriteBatch(); batch = new SpriteBatch();
font = new BitmapFont(); font = new BitmapFont();
camera = new OrthographicCamera(); camera = new OrthographicCamera();

View file

@ -9,13 +9,13 @@ import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder;
import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.Array;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class ScreenDesktop1 extends AbstractScreenDesktop { public class ScreenDesktop1 extends AbstractScreenDesktop {
private Model grid; private Model grid;
public ScreenDesktop1(SystemWarpBootArgs bootArgs) { public ScreenDesktop1(SystemGdxBootArgs bootArgs) {
super("Desktop1", bootArgs); super("Desktop1", bootArgs);
//backgroundImage = new Texture(Gdx.files.internal("background/terrydavis-front.png")); //backgroundImage = new Texture(Gdx.files.internal("background/terrydavis-front.png"));
} }

View file

@ -9,13 +9,13 @@ import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder;
import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.Array;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class ScreenDesktop2 extends AbstractScreenDesktop { public class ScreenDesktop2 extends AbstractScreenDesktop {
private Model grid; private Model grid;
public ScreenDesktop2(SystemWarpBootArgs bootArgs) { public ScreenDesktop2(SystemGdxBootArgs bootArgs) {
super("Desktop2", bootArgs); super("Desktop2", bootArgs);
//backgroundImage = new Texture(Gdx.files.internal("background/terrydavis-nose.png")); //backgroundImage = new Texture(Gdx.files.internal("background/terrydavis-nose.png"));
} }

View file

@ -9,13 +9,13 @@ import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder;
import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.Array;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class ScreenDesktop3 extends AbstractScreenDesktop { public class ScreenDesktop3 extends AbstractScreenDesktop {
private Model grid; private Model grid;
public ScreenDesktop3(SystemWarpBootArgs bootArgs) { public ScreenDesktop3(SystemGdxBootArgs bootArgs) {
super("Desktop3", bootArgs); super("Desktop3", bootArgs);
} }

View file

@ -20,7 +20,7 @@ import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.viewport.ScreenViewport; import com.badlogic.gdx.utils.viewport.ScreenViewport;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class ScreenDesktop4 extends AbstractScreenDesktop { public class ScreenDesktop4 extends AbstractScreenDesktop {
@ -36,7 +36,7 @@ public class ScreenDesktop4 extends AbstractScreenDesktop {
private float colorFade = 0f; private float colorFade = 0f;
private boolean colorPositive = true; private boolean colorPositive = true;
public ScreenDesktop4(SystemWarpBootArgs bootArgs) { public ScreenDesktop4(SystemGdxBootArgs bootArgs) {
super("Desktop4", bootArgs); super("Desktop4", bootArgs);
shader = new UserColorShader(); shader = new UserColorShader();
shader.init(); shader.init();