diff --git a/.gitignore b/.gitignore index 547a9d8a..d009412d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ build bin proxyServer/bin proxyServer/rundir +desktopRuntime/eclipseProject/* desktopRuntime/_eagstorage* desktopRuntime/eclipseProject/bin* desktopRuntime/hs_err_* diff --git a/desktopRuntime/eclipseProject/.classpath b/desktopRuntime/eclipseProject/.classpath index f1336b46..a47dae84 100644 --- a/desktopRuntime/eclipseProject/.classpath +++ b/desktopRuntime/eclipseProject/.classpath @@ -7,17 +7,17 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/desktopRuntime/eclipseProject/.project b/desktopRuntime/eclipseProject/.project index ad0a82ff..09a34438 100644 --- a/desktopRuntime/eclipseProject/.project +++ b/desktopRuntime/eclipseProject/.project @@ -18,12 +18,12 @@ src_lwjgl_java 2 - /workspace/Resent-1.8/eaglercraftx-1.8/../eaglercraft_1.8_workspace/src/lwjgl/java + C:/Users/hooman/Downloads/resent source real/Resent-1.8/src/lwjgl/java src_main_java 2 - /workspace/Resent-1.8/eaglercraftx-1.8/../eaglercraft_1.8_workspace/src/main/java + C:/Users/hooman/Downloads/resent source real/Resent-1.8/src/main/java diff --git a/desktopRuntime/eclipseProject/eaglercraftDebugRuntime.launch b/desktopRuntime/eclipseProject/eaglercraftDebugRuntime.launch index 3fb0b74f..d11cfed8 100644 --- a/desktopRuntime/eclipseProject/eaglercraftDebugRuntime.launch +++ b/desktopRuntime/eclipseProject/eaglercraftDebugRuntime.launch @@ -18,5 +18,5 @@ - + diff --git a/desktopRuntime/resources/assets/eagler/gui/background.jpg b/desktopRuntime/resources/assets/eagler/gui/background.jpg new file mode 100644 index 00000000..3d02d054 Binary files /dev/null and b/desktopRuntime/resources/assets/eagler/gui/background.jpg differ diff --git a/desktopRuntime/resources/assets/eagler/gui/background.webp b/desktopRuntime/resources/assets/eagler/gui/background.webp deleted file mode 100644 index c8a3c323..00000000 Binary files a/desktopRuntime/resources/assets/eagler/gui/background.webp and /dev/null differ diff --git a/desktopRuntime/resources/assets/eagler/gui/wings.png b/desktopRuntime/resources/assets/eagler/gui/wings.png deleted file mode 100644 index b8a680c8..00000000 Binary files a/desktopRuntime/resources/assets/eagler/gui/wings.png and /dev/null differ diff --git a/src/main/java/dev/resent/javascript/LoadScreen.java b/src/main/java/dev/resent/javascript/LoadScreen.java deleted file mode 100644 index 4ed3ebfd..00000000 --- a/src/main/java/dev/resent/javascript/LoadScreen.java +++ /dev/null @@ -1,17 +0,0 @@ -package dev.resent.javascript; - -import org.teavm.jso.JSBody; -import org.teavm.jso.dom.events.Event; - -public class LoadScreen { - - @JSBody(params = { "event", "epkSize" }, script = "setBarProg(event, epkSize)") - public static native void setBarProgress(Event event, int epkSize); - - @JSBody(params = { "version" }, script = "setVersion(version)") - public static native void setClientVersion(String version); - - @JSBody( script = "die()") - public static native void remove(); - -} diff --git a/src/main/java/net/minecraft/client/gui/GuiMainMenu.java b/src/main/java/net/minecraft/client/gui/GuiMainMenu.java index b75a19dd..832f52e0 100644 --- a/src/main/java/net/minecraft/client/gui/GuiMainMenu.java +++ b/src/main/java/net/minecraft/client/gui/GuiMainMenu.java @@ -20,7 +20,7 @@ public class GuiMainMenu extends GuiScreen { @Override public void drawScreen(final int mouseX, final int mouseY, final float partialTicks) { this.drawDefaultBackground(); - this.mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/background.webp")); + this.mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/background.jpg")); Gui.drawModalRectWithCustomSizedTexture(0, 0, 0.0f, 0.0f, this.width, this.height, this.width + 21, this.height + 50); final String s1 = "Copyright " + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "M" + EnumChatFormatting.RESET + "ojang AB"; this.drawString(Minecraft.getMinecraft().fontRendererObj, s1, this.width - Minecraft.getMinecraft().fontRendererObj.getStringWidth(s1) - 2, this.height - 10, -1); diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java index 865625f5..7db2d660 100644 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java @@ -34,7 +34,6 @@ import com.jcraft.jzlib.GZIPOutputStream; import com.jcraft.jzlib.InflaterInputStream; import dev.resent.client.Resent; -import dev.resent.javascript.LoadScreen; import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; import net.lax1dude.eaglercraft.v1_8.internal.buffer.EaglerArrayBufferAllocator; @@ -152,7 +151,7 @@ public class PlatformRuntime { } logger.info("Decompressing: {}", logURL); - LoadScreen.remove(); + remove(); try { EPKLoader.loadEPK(epkFileData, epkFiles[i].path, PlatformAssets.assets); @@ -178,6 +177,15 @@ public class PlatformRuntime { logger.info("Platform initialization complete"); } + @JSBody(params = { "event", "epkSize" }, script = "setBarProg(event, epkSize)") + public static native void setBarProgress(Event event, int epkSize); + + @JSBody(params = { "version" }, script = "setVersion(version)") + public static native void setClientVersion(String version); + + @JSBody( script = "die()") + public static native void remove(); + @JSBody(params = {}, script = "return {antialias: false, depth: false, powerPreference: \"high-performance\", desynchronized: true, preserveDrawingBuffer: false, premultipliedAlpha: false, alpha: false};") public static native JSObject youEagler(); @@ -295,8 +303,8 @@ public class PlatformRuntime { int epkSize = Integer.parseInt(request.getResponseHeader("content-length")); Event event = evt; - LoadScreen.setClientVersion(Resent.VERSION); - LoadScreen.setBarProgress(event, epkSize); + setClientVersion(Resent.VERSION); + setBarProgress(event, epkSize); }catch (Exception e){ e.printStackTrace(); }