mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-07-16 12:19:58 -05:00
Update #53 - Improved FPS, reduced WebGL context loss crashes
This commit is contained in:
@ -26,6 +26,7 @@ static uint32_t initEPWBinaryCompressedHelper(struct epw_slice_compressed* slice
|
||||
static uint32_t initEPWBinaryHelper(struct epw_slice* sliceIn, uint32_t epwLen);
|
||||
static uint32_t initEPWStringHelper(struct epw_slice* sliceIn, uint32_t epwLen);
|
||||
|
||||
#define SLICE_IS_PRESENT(pSlice) (((struct epw_slice_compressed*)(pSlice))->sliceCompressedLength && ((struct epw_slice_compressed*)(pSlice))->sliceDecompressedLength)
|
||||
#define SLICE_IN_BOUNDS(pSlice, epwLen) (((struct epw_slice*)(pSlice))->sliceOffset + ((struct epw_slice*)(pSlice))->sliceLength <= (epwLen))
|
||||
|
||||
// Note: Linux kernel uses 4096
|
||||
@ -186,20 +187,28 @@ int main(int argc, char** argv) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
dbgLog("Decompressing classes.wasm.teadbg...");
|
||||
|
||||
result->classesDeobfTEADBGData = initEPWBinaryCompressedHelper(&headerPtr->classesDeobfTEADBGData, epwLen);
|
||||
if(!result->classesDeobfTEADBGData) {
|
||||
resultFailed(EPW_INVALID);
|
||||
return -1;
|
||||
if(SLICE_IS_PRESENT(&headerPtr->classesDeobfTEADBGData)) {
|
||||
dbgLog("Decompressing classes.wasm.teadbg...");
|
||||
|
||||
result->classesDeobfTEADBGData = initEPWBinaryCompressedHelper(&headerPtr->classesDeobfTEADBGData, epwLen);
|
||||
if(!result->classesDeobfTEADBGData) {
|
||||
resultFailed(EPW_INVALID);
|
||||
return -1;
|
||||
}
|
||||
}else {
|
||||
result->classesDeobfTEADBGData = -1;
|
||||
}
|
||||
|
||||
dbgLog("Decompressing deobfuscator...");
|
||||
|
||||
result->classesDeobfWASMData = initEPWBinaryCompressedHelper(&headerPtr->classesDeobfWASMData, epwLen);
|
||||
if(!result->classesDeobfWASMData) {
|
||||
resultFailed(EPW_INVALID);
|
||||
return -1;
|
||||
if(SLICE_IS_PRESENT(&headerPtr->classesDeobfWASMData)) {
|
||||
dbgLog("Decompressing deobfuscator...");
|
||||
|
||||
result->classesDeobfWASMData = initEPWBinaryCompressedHelper(&headerPtr->classesDeobfWASMData, epwLen);
|
||||
if(!result->classesDeobfWASMData) {
|
||||
resultFailed(EPW_INVALID);
|
||||
return -1;
|
||||
}
|
||||
}else {
|
||||
result->classesDeobfWASMData = -1;
|
||||
}
|
||||
|
||||
result->numEPKs = numEPKs;
|
||||
|
@ -78,8 +78,8 @@ addToLibrary({
|
||||
|
||||
const eagRuntimeJSURL = URL.createObjectURL(new Blob([results[HEAP32[idx]]], { type: "text/javascript;charset=utf-8" }));
|
||||
const classesWASMURL = URL.createObjectURL(new Blob([results[HEAP32[idx + 1]]], { type: "application/wasm" }));
|
||||
const classesDeobfTEADBGURL = URL.createObjectURL(new Blob([results[HEAP32[idx + 2]]], { type: "application/octet-stream" }));
|
||||
const classesDeobfWASMURL = URL.createObjectURL(new Blob([results[HEAP32[idx + 3]]], { type: "application/wasm" }));
|
||||
const classesDeobfTEADBGURL = HEAP32[idx + 2] !== -1 ? URL.createObjectURL(new Blob([results[HEAP32[idx + 2]]], { type: "application/octet-stream" })) : null;
|
||||
const classesDeobfWASMURL = HEAP32[idx + 3] !== -1 ? URL.createObjectURL(new Blob([results[HEAP32[idx + 3]]], { type: "application/wasm" })) : null;
|
||||
|
||||
const pressAnyKey = URL.createObjectURL(new Blob([results[HEAP32[idx + 4]]], { type: results[HEAP32[idx + 5]] }));
|
||||
const crashImg = URL.createObjectURL(new Blob([results[HEAP32[idx + 6]]], { type: results[HEAP32[idx + 7]] }));
|
||||
|
Reference in New Issue
Block a user