diff --git a/build.gradle b/build.gradle index 56baec1..32b8e45 100644 --- a/build.gradle +++ b/build.gradle @@ -112,27 +112,12 @@ configurations { } dependencies { - // Example optional mod dependency with JEI - // The JEI API is declared for compile time use, while the full JEI artifact is used at runtime - // compileOnly "mezz.jei:jei-${mc_version}-common-api:${jei_version}" - // compileOnly "mezz.jei:jei-${mc_version}-neoforge-api:${jei_version}" - // We add the full version to localRuntime, not runtimeOnly, so that we do not publish a dependency on it - // localRuntime "mezz.jei:jei-${mc_version}-neoforge:${jei_version}" - - // Example mod dependency using a mod jar from ./libs with a flat dir repository - // This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar - // The group id is ignored when searching -- in this case, it is "blank" - // implementation "blank:coolmod-${mc_version}:${coolmod_version}" - - // Example mod dependency using a file as dependency - // implementation files("libs/coolmod-${mc_version}-${coolmod_version}.jar") - - // Example project dependency using a sister or child project: - // implementation project(":myproject") - - // For more info: - // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html - // http://www.gradle.org/docs/current/userguide/dependency_management.html + + + + + + } // This block of code expands all declared replace properties in the specified resource targets. @@ -187,3 +172,12 @@ idea { downloadJavadoc = true } } + +sourceSets { + main { + java { + // Include the default `src/main/java` and the additional `src/doom` folder + srcDirs = ['src/main/java', 'src/doom'] + } + } +} diff --git a/default.cfg b/default.cfg new file mode 100644 index 0000000..a175887 --- /dev/null +++ b/default.cfg @@ -0,0 +1,43 @@ +mouse_sensitivity 5 +sfx_volume 8 +music_volume 8 +show_messages 1 +key_right 77 +key_left 75 +key_up 72 +key_down 80 +key_strafeleft 51 +key_straferight 52 +key_fire 29 +key_use 57 +key_strafe 56 +key_speed 54 +use_mouse 1 +mouseb_fire 0 +mouseb_strafe 1 +mouseb_forward 2 +use_joystick 0 +joyb_fire 0 +joyb_strafe 1 +joyb_use 3 +joyb_speed 2 +screenblocks 10 +detaillevel 0 +snd_channels 8 +snd_musicdevice 3 +snd_sfxdevice 3 +snd_sbport 0 +snd_sbirq 0 +snd_sbdma 0 +snd_mport 0 +usegamma 0 +chatmacro0 "No" +chatmacro1 "I'm ready to kick butt!" +chatmacro2 "I'm OK." +chatmacro3 "I'm not looking too good!" +chatmacro4 "Help!" +chatmacro5 "You suck!" +chatmacro6 "Next time, scumbag..." +chatmacro7 "Come here!" +chatmacro8 "I'll take care of it." +chatmacro9 "Yes" diff --git a/mochadoom.cfg b/mochadoom.cfg new file mode 100644 index 0000000..69d5bfd --- /dev/null +++ b/mochadoom.cfg @@ -0,0 +1,31 @@ +alwaysrun false +automap_plotter_style Thin +color_depth Indexed +enable_colormap_lump true +extend_button_slots_limit true +extend_plats_limit true +fix_blockmap true +fix_gamma_palette false +fix_gamma_ramp false +fix_medi_need false +fix_ouch_face false +fix_sky_change false +fix_sky_palette false +fullscreen false +fullscreen_interpolation Nearest +fullscreen_mode Native +fullscreen_stretch Fit +fuzz_mix false +greyscale_filter Luminance +line_of_sight Vanilla +mb_used 2 +multiply 3 +parallelism_patch_columns 0 +parallelism_realcolor_tint 12 +reconstruct_savegame_pointers true +scale_melt true +scale_screen_tiles true +scene_renderer_mode Serial +semi_translucent_fuzz false +vanilla_key_behavior true +vestrobe false diff --git a/src/doom/DOOMU.WAD b/src/doom/DOOMU.WAD new file mode 100644 index 0000000..6e1700a Binary files /dev/null and b/src/doom/DOOMU.WAD differ diff --git a/src/doom/doom/DoomMain.java b/src/doom/doom/DoomMain.java index 030d3a7..cb7553c 100644 --- a/src/doom/doom/DoomMain.java +++ b/src/doom/doom/DoomMain.java @@ -749,6 +749,7 @@ public final String IdentifyVersion() { final String separator = System.getProperty("file.separator"); final String iwad = test.substring(1 + test.lastIndexOf(separator)); doomwaddir = test.substring(0, 1 + test.lastIndexOf(separator)); + final GameMode attempt = DoomVersion.tryOnlyOne(iwad, doomwaddir); // Note: at this point we can't distinguish between "doom" retail // and "doom" ultimate yet. diff --git a/src/doom/run.java b/src/doom/run.java new file mode 100644 index 0000000..c2515ef --- /dev/null +++ b/src/doom/run.java @@ -0,0 +1,12 @@ +import mochadoom.Engine; + +import java.io.IOException; + +public class run { + + static String[] commandVariables = {"-iwad C:/Users/Abdel/IdeaProjects/DoomStation/src/doom/doomu.wad"}; + + public static void main(String[] args) throws IOException { + Engine.main(commandVariables); + } +} diff --git a/src/main/java/com/portingdeadmods/doomstation/DSMain.java b/src/main/java/com/portingdeadmods/doomstation/DSMain.java index eac7ff5..995e3ac 100644 --- a/src/main/java/com/portingdeadmods/doomstation/DSMain.java +++ b/src/main/java/com/portingdeadmods/doomstation/DSMain.java @@ -1,23 +1,28 @@ package com.portingdeadmods.doomstation; import com.portingdeadmods.doomstation.registry.RegisterStuff; +import mochadoom.Engine; import org.slf4j.Logger; import com.mojang.logging.LogUtils; - import net.neoforged.bus.api.IEventBus; import net.neoforged.fml.ModContainer; import net.neoforged.fml.common.Mod; +import java.io.IOException; + @Mod(DSMain.MODID) public class DSMain { public static final String MODID = "doomstation"; private static final Logger LOGGER = LogUtils.getLogger(); - public DSMain(IEventBus modEventBus, ModContainer modContainer) { + String[] args = {"-iwad DOOMU.WAD"}; + + public DSMain(IEventBus modEventBus, ModContainer modContainer) throws IOException { RegisterStuff.CREATIVE_MODE_TABS.register(modEventBus); RegisterStuff.ITEMS.register(modEventBus); + Engine.main(args); //modContainer.registerConfig(ModConfig.Type.COMMON, Config.SPEC); }