From b02341792d6f406c75e7b0344aa90fc81092c94f Mon Sep 17 00:00:00 2001 From: Leclowndu93150 Date: Thu, 12 Dec 2024 15:30:36 +0100 Subject: [PATCH] game loads ! --- doom/src/doom/DoomMain.java | 8 +++++++- .../main/java/com/portingdeadmods/doomstation/DSMain.java | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doom/src/doom/DoomMain.java b/doom/src/doom/DoomMain.java index 23974d5..5fdf93d 100644 --- a/doom/src/doom/DoomMain.java +++ b/doom/src/doom/DoomMain.java @@ -769,6 +769,7 @@ public final String IdentifyVersion() { // None found, using current. if (!eval(doomwaddir)) { doomwaddir = System.getProperty("user.dir") + "\\wads"; + this.tempWadDir = doomwaddir; } System.out.println("DOOMWADDIR: " + doomwaddir); @@ -2639,11 +2640,16 @@ public boolean CheckDemoStatus() { * them have Init() methods which are NOT yet safe to call. * */ + + String tempWadDir = null; + @SuppressWarnings("LeakingThisInConstructor") public DoomMain() throws IOException { // Init game status... super(); + this.tempWadDir = "Testing 1234"; + // Init players players = new player_t[MAXPLAYERS]; Arrays.setAll(players, i -> new player_t(this)); @@ -2709,8 +2715,8 @@ public DoomMain() throws IOException { wadLoader.InitMultipleFiles(wadfiles); } catch (Exception e1) { LOGGER.log(Level.SEVERE, "Could not init WAD files", e1); + LOGGER.log(Level.SEVERE, "Specified WAD path was: " + this.tempWadDir); } - // Video Renderer this.graphicSystem = RendererFactory.newBuilder() .setVideoScale(vs).setBppMode(bppMode).setWadLoader(wadLoader) diff --git a/neoforge/src/main/java/com/portingdeadmods/doomstation/DSMain.java b/neoforge/src/main/java/com/portingdeadmods/doomstation/DSMain.java index aedcc8c..9fd9910 100644 --- a/neoforge/src/main/java/com/portingdeadmods/doomstation/DSMain.java +++ b/neoforge/src/main/java/com/portingdeadmods/doomstation/DSMain.java @@ -19,6 +19,9 @@ public class DSMain public DSMain(IEventBus modEventBus, ModContainer modContainer) throws IOException { RegisterStuff.CREATIVE_MODE_TABS.register(modEventBus); RegisterStuff.ITEMS.register(modEventBus); + + System.setProperty("java.awt.headless", "false"); + new Thread(() -> { try { Engine.main(new String[]{});