Clean some boot text and shutdown code path fixes

This commit is contained in:
Willem Cazander 2025-07-15 17:39:41 +02:00
parent 54d9e98254
commit 614bf64a8d
6 changed files with 90 additions and 69 deletions

View file

@ -66,8 +66,6 @@ import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAu
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
public class GDXAppVrGem4Activator implements BundleActivator {
private static final int VIEW_SLEEP_TIME = 1234;
@Override
public void stop(final BundleContext context) {
Gdx.app.postRunnable(new Runnable() {
@ -80,11 +78,6 @@ public class GDXAppVrGem4Activator implements BundleActivator {
@Override
public void start(final BundleContext context) {
try {
Thread.sleep(VIEW_SLEEP_TIME);
} catch (InterruptedException ignored) {
}
ServiceReference<SystemGdxLog> loggerRef = context.getServiceReference(SystemGdxLog.class);
SystemGdxLog logger = context.getService(loggerRef);
@ -120,21 +113,17 @@ public class GDXAppVrGem4Activator implements BundleActivator {
result = systemWarpShip.loadWaterOcean(context, registratedSeas, ocean.getSea(), v -> bootScreen.bootLine(v));
}
} catch (Exception e) {
e.printStackTrace();
bootScreen.bootLine("ERROR: "+e.getMessage());
throw new IllegalStateException(e);
}
if (result < 0) {
bootScreen.bootLine("SPACE DOCK FAILURE, WARP SEA NAVIGATION ABORTED");
return;
}
if (result > 0) {
bootScreen.bootLine("vrGEM4: FAILURE BOOT ABORTED");
return;
}
bootScreen.bootLine("vrGEM4: chains resolved.");
bootScreen.bootLine("vrGEM⁴: Resolved " + result + " chains");
try {
systemWarpShip.loadBundles(context, registratedSeas);
} catch (BundleException e) {
e.printStackTrace();
bootScreen.bootLine("ERROR: "+e.getMessage());
return;
throw new IllegalStateException(e);
}
bootArgs.addBootReadyListener(new SystemGdxBootReadyListener() {
@Override
@ -154,7 +143,7 @@ public class GDXAppVrGem4Activator implements BundleActivator {
unicodeService.init(context, systemWarpShip, (v) -> bootScreen.bootLine(v));
context.registerService(VrGem4Unicode4DService.class.getName(), unicodeService, new Hashtable<String, String>());
startBundles(bootScreen);
bootScreen.bootLine("vrGEM⁴: Loaded virtual space");
}
private GDXAppVrGem4BootScreen createBootScreen(SystemGdxTerminal terminal, SystemGdxFont gdxFont) {
@ -167,10 +156,6 @@ public class GDXAppVrGem4Activator implements BundleActivator {
terminal.selectScreen(GDXAppVrGem4BootScreen.class);
}
});
try {
Thread.sleep(100);
} catch (InterruptedException ignored) {
}
return bootScreen;
}
@ -238,18 +223,6 @@ public class GDXAppVrGem4Activator implements BundleActivator {
terminal.registrateScreen(new ScreenHelp(terminal));
}
});
try {
Thread.sleep(100);
} catch (InterruptedException ignored) {
}
}
private void startBundles(GDXAppVrGem4BootScreen bootScreen) {
try {
Thread.sleep(VIEW_SLEEP_TIME);
} catch (InterruptedException ignored) {
}
bootScreen.bootLine("vrGEM4: Init bundles...");
}
@SuppressWarnings("unchecked")

View file

@ -63,6 +63,9 @@ public class VrGem4Unicode4DServiceImpl implements VrGem4Unicode4DService {
List<File> glyps = warpShip.searchMagic(context, "application/x-font-ttf4d");
try {
for (File glypSet : glyps) {
if (!warpShip.isRunning()) {
return;
}
log.accept("Loading glypSet: " + glypSet.getName());
FontAtlas atlas = FontAtlasDriver.newInstance().createReader().readFile(glypSet);
masterFontAtlas.setStores(atlas.getStores());
@ -75,6 +78,9 @@ public class VrGem4Unicode4DServiceImpl implements VrGem4Unicode4DService {
int dup = 0;
for (FontAtlasStore fontStore:masterFontAtlas.getStores()) {
if (!warpShip.isRunning()) {
return;
}
log.accept("Map unicode: "+fontStore.getName()+" size: "+fontStore.getGlyphs().size());
for (FontAtlasStoreGlyph glyph: fontStore.getGlyphs()) {
int unicode = CodePointᶻᴰ.INSTANCE.searchUnicode(glyph.getTongs());

View file

@ -47,7 +47,7 @@ public class ScreenCredits extends AbstractScrollScreen {
"Bunnies have easter egg children with many colored seed spots",
"...",
" ",
"=== BEGIN KJV PAGE ONE ===",
"=== BEGIN OF KJV PAGE ONE ===",
" ",
"### Genesis 1",
" ",
@ -288,9 +288,11 @@ public class ScreenCredits extends AbstractScrollScreen {
" ",
"5 But unto Cain and to his offering he had not respect. And Cain was very wroth, and his countenance fell.",
" ",
"=== BEGIN KJV PAGE ONE ===",
"=== END OF KJV PAGE ONE ===",
" ",
"Page two requires consent for marriage.",
"Page two requires consent for marriage;",
"- Information kills the heart",
"- Love is before the fall to the fruit",
" "
);