Skip to content

Commit

Permalink
game loads !
Browse files Browse the repository at this point in the history
  • Loading branch information
Leclowndu93150 committed Dec 12, 2024
1 parent 60f13ca commit b023417
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doom/src/doom/DoomMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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.<T, V>newBuilder()
.setVideoScale(vs).setBppMode(bppMode).setWadLoader(wadLoader)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[]{});
Expand Down

0 comments on commit b023417

Please sign in to comment.