additional fixes

This commit is contained in:
lax1dude 2024-12-13 22:34:23 -08:00
parent 5918b23f14
commit 70273c7694
6 changed files with 22 additions and 10 deletions

View File

@ -1,4 +1,15 @@
§lCHANGES §lIN §lSERVICE §lPACK §l#2:§r
- improved resource packs §4(by §4ayunami2000)§r
- improved the FPS even more
- improved voice chat reliability
- improved shared worlds reliability
- backported X's vanilla world export
- backported X's vsync mode
Release date: §912/14/2024§r
§lCHANGES §lIN §lSERVICE §lPACK §l#1:§r
- resource packs §4(by §4ayunami2000)§r

View File

@ -45,7 +45,7 @@ public class VFile extends File {
public String getAllChars() {
try {
return Files.readString(this.toPath(), StandardCharsets.UTF_8);
return new String(Files.readAllBytes(this.toPath()), StandardCharsets.UTF_8);
} catch (IOException e) {
return null;
}
@ -57,8 +57,9 @@ public class VFile extends File {
public boolean setAllBytes(byte[] bytes) {
try {
if (this.getParentFile() != null) {
this.getParentFile().mkdirs();
File f = this.getParentFile();
if (f != null) {
f.mkdirs();
}
Files.write(this.toPath(), bytes);
return true;

View File

@ -6,12 +6,10 @@ public class ConfigConstants {
public static boolean profanity = false;
public static final String version = "1.5.2-sp1.01";
public static final String version = "1.5.2-sp2";
public static final String mainMenuString = "eaglercraft " + version;
public static final String forkMe = null;
public static final boolean html5build = true;
public static String ayonullTitle = null;
public static String ayonullLink = null;

View File

@ -273,7 +273,6 @@ public class IntegratedServerLAN {
System.out.println("LAN client '" + clientId + "' disconnected");
disconnect();
}else {
System.out.println(evt.getClass().getSimpleName());
switch(state) {
case SENT_DESCRIPTION:{
if(evt instanceof LANPeerEvent.LANPeerICECandidateEvent) {

View File

@ -563,6 +563,9 @@ public class EaglerAdapterImpl2 {
@JSBody(params = { }, script = "return {antialias: false, depth: true, powerPreference: \"high-performance\", desynchronized: true, preserveDrawingBuffer: false, premultipliedAlpha: false, alpha: false};")
public static native JSObject youEagler();
@JSBody(params = { }, script = "return { willReadFrequently: true };")
public static native JSObject youEagler2();
public static final int _wGL_TEXTURE_2D = TEXTURE_2D;
public static final int _wGL_DEPTH_TEST = DEPTH_TEST;
public static final int _wGL_LEQUAL = LEQUAL;
@ -1063,7 +1066,7 @@ public class EaglerAdapterImpl2 {
imageLoadCanvas.setHeight(toLoad.getHeight());
}
if(imageLoadContext == null) {
imageLoadContext = (CanvasRenderingContext2D) imageLoadCanvas.getContext("2d");
imageLoadContext = (CanvasRenderingContext2D) imageLoadCanvas.getContext("2d", youEagler2());
setImageSmoothingMode(imageLoadContext, false);
}
imageLoadContext.clearRect(0, 0, toLoad.getWidth(), toLoad.getHeight());
@ -1942,7 +1945,7 @@ public class EaglerAdapterImpl2 {
HTMLCanvasElement retardedCanvas = (HTMLCanvasElement)doc.createElement("canvas");
retardedCanvas.setWidth(canvas.getWidth());
retardedCanvas.setHeight(canvas.getHeight());
CanvasRenderingContext2D cc = (CanvasRenderingContext2D)retardedCanvas.getContext("2d");
CanvasRenderingContext2D cc = (CanvasRenderingContext2D)retardedCanvas.getContext("2d", youEagler2());
setImageSmoothingMode(cc, false);
cc.setFillStyle("black");
cc.fillRect(0, 0, canvas.getWidth(), canvas.getHeight());

View File

@ -162,7 +162,7 @@ function countdown() {
<body style="margin:0px;width:100vw;height:100vh;font-family:sans-serif;" id="game_frame">
<div id="locally" style="text-align:center;">
<div style="height:5vh;"></div>
<h2>Eaglercraft 1.5.2 Service Pack #1</h2>
<h2>Eaglercraft 1.5.2 Service Pack #2</h2>
<h3>the version you are currently using is from <span style="color:#cc0000;font-size:larger;">${date}</span></h3>
<p id="countdown" style="text-align:center;">(Game will launch in 5)</p>
</div>