// Copyright 2010 The Emscripten Authors. All rights reserved. // Emscripten is available under two separate licenses, the MIT license and the // University of Illinois/NCSA Open Source License. Both these licenses can be // found in the LICENSE file. // The CCModule object: Our interface to the outside world. We import // and export values on it. There are various ways CCModule can be used: // 1. Not defined. We create it here // 2. A function parameter, function(CCModule) { ..generated code.. } // 3. pre-run appended it, var CCModule = {}; ..generated code.. // 4. External script tag defines var CCModule. // We need to check if CCModule already exists (e.g. case 3 above). // Substitution will be replaced with actual code on later stage of the build, // this way Closure Compiler will not mangle it (e.g. case 4. above). // Note that if you want to run closure, and also to use CCModule // after the generated code, you will need to define var CCModule = {}; // before the code. Then that object will be used in the code, and you // can continue to use CCModule afterwards as well. var CCModule = typeof CCModule !== 'undefined' ? CCModule : {}; // --pre-jses are emitted after the CCModule integration code, so that they can // refer to CCModule (if they choose; they can also define CCModule) if (!CCModule.expectedDataFileDownloads) { CCModule.expectedDataFileDownloads = 0; CCModule.finishedDataFileDownloads = 0; } CCModule.expectedDataFileDownloads++; (function() { var loadPackage = function(metadata) { var PACKAGE_PATH; if (typeof window === 'object') { PACKAGE_PATH = window['encodeURIComponent'](window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf('/')) + '/'); } else if (typeof location !== 'undefined') { // worker PACKAGE_PATH = encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf('/')) + '/'); } else { throw 'using preloaded data can only be done on a web page or in a web worker'; } var PACKAGE_NAME = '/Program Files/ClassiCube/default.zip'; var REMOTE_PACKAGE_BASE = '/Program Files/ClassiCube/default.zip'; if (typeof CCModule['locateFilePackage'] === 'function' && !CCModule['locateFile']) { CCModule['locateFile'] = CCModule['locateFilePackage']; err('warning: you defined CCModule.locateFilePackage, that has been renamed to CCModule.locateFile (using your locateFilePackage for now)'); } var REMOTE_PACKAGE_NAME = CCModule['locateFile'] ? CCModule['locateFile'](REMOTE_PACKAGE_BASE, '') : REMOTE_PACKAGE_BASE; var REMOTE_PACKAGE_SIZE = metadata.remote_package_size; var PACKAGE_UUID = metadata.package_uuid; function fetchRemotePackage(packageName, packageSize, callback, errback) { var xhr = new XMLHttpRequest(); xhr.open('GET', packageName, true); xhr.responseType = 'arraybuffer'; xhr.onprogress = function(event) { var url = packageName; var size = packageSize; if (event.total) size = event.total; if (event.loaded) { if (!xhr.addedTotal) { xhr.addedTotal = true; if (!CCModule.dataFileDownloads) CCModule.dataFileDownloads = {}; CCModule.dataFileDownloads[url] = { loaded: event.loaded, total: size }; } else { CCModule.dataFileDownloads[url].loaded = event.loaded; } var total = 0; var loaded = 0; var num = 0; for (var download in CCModule.dataFileDownloads) { var data = CCModule.dataFileDownloads[download]; total += data.total; loaded += data.loaded; num++; } total = Math.ceil(total * CCModule.expectedDataFileDownloads/num); if (CCModule['setStatus']) CCModule['setStatus']('Downloading data... (' + loaded + '/' + total + ')'); } else if (!CCModule.dataFileDownloads) { if (CCModule['setStatus']) CCModule['setStatus']('Downloading data...'); } }; xhr.onerror = function(event) { throw new Error("NetworkError for: " + packageName); } xhr.onload = function(event) { if (xhr.status == 200 || xhr.status == 304 || xhr.status == 206 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 var packageData = xhr.response; callback(packageData); } else { throw new Error(xhr.statusText + " : " + xhr.responseURL); } }; xhr.send(null); }; function handleError(error) { console.error('package error:', error); }; var fetchedCallback = null; var fetched = CCModule['getPreloadedPackage'] ? CCModule['getPreloadedPackage'](REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE) : null; if (!fetched) fetchRemotePackage(REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE, function(data) { if (fetchedCallback) { fetchedCallback(data); fetchedCallback = null; } else { fetched = data; } }, handleError); function runWithFS() { function assert(check, msg) { if (!check) throw msg + new Error().stack; } CCModule['FS_createPath']('/', 'texpacks', true, true); function DataRequest(start, end, audio) { this.start = start; this.end = end; this.audio = audio; } DataRequest.prototype = { requests: {}, open: function(mode, name) { this.name = name; this.requests[name] = this; CCModule['addRunDependency']('fp ' + this.name); }, send: function() {}, onload: function() { var byteArray = this.byteArray.subarray(this.start, this.end); this.finish(byteArray); }, finish: function(byteArray) { var that = this; CCModule['FS_createDataFile']?.(this.name, null, byteArray, true, true, true); // canOwn this data in the filesystem, it is a slide into the heap that will never change CCModule['removeRunDependency']?.('fp ' + that.name); this.requests[this.name] = null; } }; var files = metadata.files; for (var i = 0; i < files.length; ++i) { new DataRequest(files[i].start, files[i].end, files[i].audio).open('GET', files[i].filename); } function processPackageData(arrayBuffer) { CCModule.finishedDataFileDownloads++; assert(arrayBuffer, 'Loading data file failed.'); assert(arrayBuffer instanceof ArrayBuffer, 'bad input to processPackageData'); var byteArray = new Uint8Array(arrayBuffer); var curr; // Reuse the bytearray from the XHR as the source for file reads. DataRequest.prototype.byteArray = byteArray; var files = metadata.files; for (var i = 0; i < files.length; ++i) { DataRequest.prototype.requests[files[i].filename].onload(); } CCModule['removeRunDependency']?.('datafile_/static/default.zip'); }; CCModule['addRunDependency']('datafile_/static/default.zip'); if (!CCModule.preloadResults) CCModule.preloadResults = {}; CCModule.preloadResults[PACKAGE_NAME] = {fromCache: false}; if (fetched) { processPackageData(fetched); fetched = null; } else { fetchedCallback = processPackageData; } } if (CCModule['calledRun']) { runWithFS(); } else { if (!CCModule['preRun']) CCModule['preRun'] = []; CCModule["preRun"].push(runWithFS); // FS is not initialized yet, wait for it } } loadPackage({"files": [{"start": 0, "audio": 0, "end": 237603, "filename": "/texpacks/default.zip"}], "remote_package_size": 237603, "package_uuid": "f0ca0bcd-5221-433f-8eb3-e836be7f57f3"}); })(); // Sometimes an existing CCModule object exists with properties // meant to overwrite the default module functionality. Here // we collect those properties and reapply _after_ we configure // the current environment's defaults to avoid having to be so // defensive during initialization. var moduleOverrides = {}; var key; for (key in CCModule) { if (CCModule.hasOwnProperty(key)) { moduleOverrides[key] = CCModule[key]; } } CCModule['arguments'] = []; CCModule['thisProgram'] = './this.program'; CCModule['quit'] = function(status, toThrow) { throw toThrow; }; CCModule['preRun'] = []; CCModule['postRun'] = []; // Determine the runtime environment we are in. You can customize this by // setting the ENVIRONMENT setting at compile time (see settings.js). var ENVIRONMENT_IS_WEB = true; var ENVIRONMENT_IS_WORKER = false; var ENVIRONMENT_IS_NODE = false; var ENVIRONMENT_IS_SHELL = false; // Three configurations we can be running in: // 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false) // 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false) // 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true) // `/` should be present at the end if `scriptDirectory` is not empty var scriptDirectory = ''; function locateFile(path) { if (CCModule['locateFile']) { return CCModule['locateFile'](path, scriptDirectory); } else { return scriptDirectory + path; } } if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled scriptDirectory = self.location.href; } else if (document.currentScript) { // web scriptDirectory = document.currentScript.src; } // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them. // otherwise, slice off the final part of the url to find the script directory. // if scriptDirectory does not contain a slash, lastIndexOf will return -1, // and scriptDirectory will correctly be replaced with an empty string. if (scriptDirectory.indexOf('blob:') !== 0) { scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf('/')+1); } else { scriptDirectory = ''; } CCModule['read'] = function shell_read(url) { try { var xhr = new XMLHttpRequest(); xhr.open('GET', url, false); xhr.send(null); return xhr.responseText; } catch (err) { var data = tryParseAsDataURI(url); if (data) { return intArrayToString(data); } throw err; } }; if (ENVIRONMENT_IS_WORKER) { CCModule['readBinary'] = function readBinary(url) { try { var xhr = new XMLHttpRequest(); xhr.open('GET', url, false); xhr.responseType = 'arraybuffer'; xhr.send(null); return new Uint8Array(xhr.response); } catch (err) { var data = tryParseAsDataURI(url); if (data) { return data; } throw err; } }; } CCModule['readAsync'] = function readAsync(url, onload, onerror) { if (url === "/static/default.zip") url = '/Program Files/ClassiCube/default.zip'; var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.responseType = 'arraybuffer'; xhr.onload = function xhr_onload() { if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 onload(xhr.response); return; } var data = tryParseAsDataURI(url); if (data) { onload(data.buffer); return; } onerror(); }; xhr.onerror = onerror; xhr.send(null); }; CCModule['setWindowTitle'] = function(title) { document.title = title }; } else { } // Set up the out() and err() hooks, which are how we can print to stdout or // stderr, respectively. // If the user provided CCModule.print or printErr, use that. Otherwise, // console.log is checked first, as 'print' on the web will open a print dialogue // printErr is preferable to console.warn (works better in shells) // bind(console) is necessary to fix IE/Edge closed dev tools panel behavior. var out = CCModule['print'] || (typeof console !== 'undefined' ? console.log.bind(console) : (typeof print !== 'undefined' ? print : null)); var err = CCModule['printErr'] || (typeof printErr !== 'undefined' ? printErr : ((typeof console !== 'undefined' && console.warn.bind(console)) || out)); // Merge back in the overrides for (key in moduleOverrides) { if (moduleOverrides.hasOwnProperty(key)) { CCModule[key] = moduleOverrides[key]; } } // Free the object hierarchy contained in the overrides, this lets the GC // reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. moduleOverrides = undefined; // perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message // Copyright 2017 The Emscripten Authors. All rights reserved. // Emscripten is available under two separate licenses, the MIT license and the // University of Illinois/NCSA Open Source License. Both these licenses can be // found in the LICENSE file. // {{PREAMBLE_ADDITIONS}} var STACK_ALIGN = 16; function dynamicAlloc(size) { var ret = HEAP32[DYNAMICTOP_PTR>>2]; var end = (ret + size + 15) & -16; if (end <= _emscripten_get_heap_size()) { HEAP32[DYNAMICTOP_PTR>>2] = end; } else { var success = _emscripten_resize_heap(end); if (!success) return 0; } return ret; } function alignMemory(size, factor) { if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default return Math.ceil(size / factor) * factor; } function getNativeTypeSize(type) { switch (type) { case 'i1': case 'i8': return 1; case 'i16': return 2; case 'i32': return 4; case 'i64': return 8; case 'float': return 4; case 'double': return 8; default: { if (type[type.length-1] === '*') { return 4; // A pointer } else if (type[0] === 'i') { var bits = parseInt(type.substr(1)); assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type); return bits / 8; } else { return 0; } } } } function warnOnce(text) { if (!warnOnce.shown) warnOnce.shown = {}; if (!warnOnce.shown[text]) { warnOnce.shown[text] = 1; err(text); } } var asm2wasmImports = { // special asm2wasm imports "f64-rem": function(x, y) { return x % y; }, "debugger": function() { debugger; } }; var jsCallStartIndex = 1; var functionPointers = new Array(0); // 'sig' parameter is required for the llvm backend but only when func is not // already a WebAssembly function. function addFunction(func, sig) { var base = 0; for (var i = base; i < base + 0; i++) { if (!functionPointers[i]) { functionPointers[i] = func; return jsCallStartIndex + i; } } throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; } function removeFunction(index) { functionPointers[index-jsCallStartIndex] = null; } var funcWrappers = {}; function getFuncWrapper(func, sig) { if (!func) return; // on null pointer, return undefined assert(sig); if (!funcWrappers[sig]) { funcWrappers[sig] = {}; } var sigCache = funcWrappers[sig]; if (!sigCache[func]) { // optimize away arguments usage in common cases if (sig.length === 1) { sigCache[func] = function dynCall_wrapper() { return dynCall(sig, func); }; } else if (sig.length === 2) { sigCache[func] = function dynCall_wrapper(arg) { return dynCall(sig, func, [arg]); }; } else { // general case sigCache[func] = function dynCall_wrapper() { return dynCall(sig, func, Array.prototype.slice.call(arguments)); }; } } return sigCache[func]; } function makeBigInt(low, high, unsigned) { return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0)); } function dynCall(sig, ptr, args) { if (args && args.length) { return CCModule['dynCall_' + sig].apply(null, [ptr].concat(args)); } else { return CCModule['dynCall_' + sig].call(null, ptr); } } var tempRet0 = 0; var setTempRet0 = function(value) { tempRet0 = value; } var getTempRet0 = function() { return tempRet0; } var Runtime = { }; // The address globals begin at. Very low in memory, for code size and optimization opportunities. // Above 0 is static memory, starting with globals. // Then the stack. // Then 'dynamic' memory for sbrk. var GLOBAL_BASE = 8; // === Preamble library stuff === // Documentation for the public APIs defined in this file must be updated in: // site/source/docs/api_reference/preamble.js.rst // A prebuilt local version of the documentation is available at: // site/build/text/docs/api_reference/preamble.js.txt // You can also build docs locally as HTML or other formats in site/ // An online HTML version (which may be of a different version of Emscripten) // is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html /** @type {function(number, string, boolean=)} */ function getValue(ptr, type, noSafe) { type = type || 'i8'; if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit switch(type) { case 'i1': return HEAP8[((ptr)>>0)]; case 'i8': return HEAP8[((ptr)>>0)]; case 'i16': return HEAP16[((ptr)>>1)]; case 'i32': return HEAP32[((ptr)>>2)]; case 'i64': return HEAP32[((ptr)>>2)]; case 'float': return HEAPF32[((ptr)>>2)]; case 'double': return HEAPF64[((ptr)>>3)]; default: abort('invalid type for getValue: ' + type); } return null; } // Wasm globals var wasmMemory; // Potentially used for direct table calls. var wasmTable; //======================================== // Runtime essentials //======================================== // whether we are quitting the application. no code should run after this. // set in exit() and abort() var ABORT = false; // set by exit() and abort(). Passed to 'onExit' handler. // NOTE: This is also used as the process return code code in shell environments // but only when noExitRuntime is false. var EXITSTATUS = 0; /** @type {function(*, string=)} */ function assert(condition, text) { if (!condition) { abort('Assertion failed: ' + text); } } // Returns the C function with a specified identifier (for C++, you need to do manual name mangling) function getCFunc(ident) { var func = CCModule['_' + ident]; // closure exported function assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported'); return func; } // C calling interface. function ccall(ident, returnType, argTypes, args, opts) { // For fast lookup of conversion functions var toC = { 'string': function(str) { var ret = 0; if (str !== null && str !== undefined && str !== 0) { // null string // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' var len = (str.length << 2) + 1; ret = stackAlloc(len); stringToUTF8(str, ret, len); } return ret; }, 'array': function(arr) { var ret = stackAlloc(arr.length); writeArrayToMemory(arr, ret); return ret; } }; function convertReturnValue(ret) { if (returnType === 'string') return UTF8ToString(ret); if (returnType === 'boolean') return Boolean(ret); return ret; } var func = getCFunc(ident); var cArgs = []; var stack = 0; if (args) { for (var i = 0; i < args.length; i++) { var converter = toC[argTypes[i]]; if (converter) { if (stack === 0) stack = stackSave(); cArgs[i] = converter(args[i]); } else { cArgs[i] = args[i]; } } } var ret = func.apply(null, cArgs); ret = convertReturnValue(ret); if (stack !== 0) stackRestore(stack); return ret; } function cwrap(ident, returnType, argTypes, opts) { argTypes = argTypes || []; // When the function takes numbers and returns a number, we can just return // the original function var numericArgs = argTypes.every(function(type){ return type === 'number'}); var numericRet = returnType !== 'string'; if (numericRet && numericArgs && !opts) { return getCFunc(ident); } return function() { return ccall(ident, returnType, argTypes, arguments, opts); } } /** @type {function(number, number, string, boolean=)} */ function setValue(ptr, value, type, noSafe) { type = type || 'i8'; if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit switch(type) { case 'i1': HEAP8[((ptr)>>0)]=value; break; case 'i8': HEAP8[((ptr)>>0)]=value; break; case 'i16': HEAP16[((ptr)>>1)]=value; break; case 'i32': HEAP32[((ptr)>>2)]=value; break; case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; case 'float': HEAPF32[((ptr)>>2)]=value; break; case 'double': HEAPF64[((ptr)>>3)]=value; break; default: abort('invalid type for setValue: ' + type); } } var ALLOC_NORMAL = 0; // Tries to use _malloc() var ALLOC_STACK = 1; // Lives for the duration of the current function call var ALLOC_DYNAMIC = 2; // Cannot be freed except through sbrk var ALLOC_NONE = 3; // Do not allocate // allocate(): This is for internal use. You can use it yourself as well, but the interface // is a little tricky (see docs right below). The reason is that it is optimized // for multiple syntaxes to save space in generated code. So you should // normally not use allocate(), and instead allocate memory using _malloc(), // initialize it with setValue(), and so forth. // @slab: An array of data, or a number. If a number, then the size of the block to allocate, // in *bytes* (note that this is sometimes confusing: the next parameter does not // affect this!) // @types: Either an array of types, one for each byte (or 0 if no type at that position), // or a single type which is used for the entire block. This only matters if there // is initial data - if @slab is a number, then this does not matter at all and is // ignored. // @allocator: How to allocate memory, see ALLOC_* /** @type {function((TypedArray|Array|number), string, number, number=)} */ function allocate(slab, types, allocator, ptr) { var zeroinit, size; if (typeof slab === 'number') { zeroinit = true; size = slab; } else { zeroinit = false; size = slab.length; } var singleType = typeof types === 'string' ? types : null; var ret; if (allocator == ALLOC_NONE) { ret = ptr; } else { ret = [_malloc, stackAlloc, dynamicAlloc][allocator](Math.max(size, singleType ? 1 : types.length)); } if (zeroinit) { var stop; ptr = ret; assert((ret & 3) == 0); stop = ret + (size & ~3); for (; ptr < stop; ptr += 4) { HEAP32[((ptr)>>2)]=0; } stop = ret + size; while (ptr < stop) { HEAP8[((ptr++)>>0)]=0; } return ret; } if (singleType === 'i8') { if (slab.subarray || slab.slice) { HEAPU8.set(/** @type {!Uint8Array} */ (slab), ret); } else { HEAPU8.set(new Uint8Array(slab), ret); } return ret; } var i = 0, type, typeSize, previousType; while (i < size) { var curr = slab[i]; type = singleType || types[i]; if (type === 0) { i++; continue; } if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later setValue(ret+i, curr, type); // no need to look up size unless type changes, so cache it if (previousType !== type) { typeSize = getNativeTypeSize(type); previousType = type; } i += typeSize; } return ret; } // Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready function getMemory(size) { if (!runtimeInitialized) return dynamicAlloc(size); return _malloc(size); } /** @type {function(number, number=)} */ function Pointer_stringify(ptr, length) { abort("this function has been removed - you should use UTF8ToString(ptr, maxBytesToRead) instead!"); } // Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns // a copy of that string as a Javascript String object. function AsciiToString(ptr) { var str = ''; while (1) { var ch = HEAPU8[((ptr++)>>0)]; if (!ch) return str; str += String.fromCharCode(ch); } } // Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', // null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. function stringToAscii(str, outPtr) { return writeAsciiToMemory(str, outPtr, false); } // Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns // a copy of that string as a Javascript String object. var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined; /** * @param {number} idx * @param {number=} maxBytesToRead * @return {string} */ function UTF8ArrayToString(u8Array, idx, maxBytesToRead) { var endIdx = idx + maxBytesToRead; var endPtr = idx; // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. // (As a tiny code save trick, compare endPtr against endIdx using a negation, so that undefined means Infinity) while (u8Array[endPtr] && !(endPtr >= endIdx)) ++endPtr; if (endPtr - idx > 16 && u8Array.subarray && UTF8Decoder) { return UTF8Decoder.decode(u8Array.subarray(idx, endPtr)); } else { var str = ''; // If building with TextDecoder, we have already computed the string length above, so test loop end condition against that while (idx < endPtr) { // For UTF8 byte structure, see: // http://en.wikipedia.org/wiki/UTF-8#Description // https://www.ietf.org/rfc/rfc2279.txt // https://tools.ietf.org/html/rfc3629 var u0 = u8Array[idx++]; if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } var u1 = u8Array[idx++] & 63; if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } var u2 = u8Array[idx++] & 63; if ((u0 & 0xF0) == 0xE0) { u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; } else { u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (u8Array[idx++] & 63); } if (u0 < 0x10000) { str += String.fromCharCode(u0); } else { var ch = u0 - 0x10000; str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); } } } return str; } // Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns a // copy of that string as a Javascript String object. // maxBytesToRead: an optional length that specifies the maximum number of bytes to read. You can omit // this parameter to scan the string until the first \0 byte. If maxBytesToRead is // passed, and the string at [ptr, ptr+maxBytesToReadr[ contains a null byte in the // middle, then the string will cut short at that byte index (i.e. maxBytesToRead will // not produce a string of exact length [ptr, ptr+maxBytesToRead[) // N.B. mixing frequent uses of UTF8ToString() with and without maxBytesToRead may // throw JS JIT optimizations off, so it is worth to consider consistently using one // style or the other. /** * @param {number} ptr * @param {number=} maxBytesToRead * @return {string} */ function UTF8ToString(ptr, maxBytesToRead) { return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ''; } // Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', // encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. // Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. // Parameters: // str: the Javascript string to copy. // outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. // outIdx: The starting offset in the array to begin the copying. // maxBytesToWrite: The maximum number of bytes this function can write to the array. // This count should include the null terminator, // i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. // maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. // Returns the number of bytes written, EXCLUDING the null terminator. function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. return 0; var startIdx = outIdx; var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. for (var i = 0; i < str.length; ++i) { // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. // See http://unicode.org/faq/utf_bom.html#utf16-3 // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 var u = str.charCodeAt(i); // possibly a lead surrogate if (u >= 0xD800 && u <= 0xDFFF) { var u1 = str.charCodeAt(++i); u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF); } if (u <= 0x7F) { if (outIdx >= endIdx) break; outU8Array[outIdx++] = u; } else if (u <= 0x7FF) { if (outIdx + 1 >= endIdx) break; outU8Array[outIdx++] = 0xC0 | (u >> 6); outU8Array[outIdx++] = 0x80 | (u & 63); } else if (u <= 0xFFFF) { if (outIdx + 2 >= endIdx) break; outU8Array[outIdx++] = 0xE0 | (u >> 12); outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); outU8Array[outIdx++] = 0x80 | (u & 63); } else { if (outIdx + 3 >= endIdx) break; outU8Array[outIdx++] = 0xF0 | (u >> 18); outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); outU8Array[outIdx++] = 0x80 | (u & 63); } } // Null-terminate the pointer to the buffer. outU8Array[outIdx] = 0; return outIdx - startIdx; } // Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', // null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. // Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. // Returns the number of bytes written, EXCLUDING the null terminator. function stringToUTF8(str, outPtr, maxBytesToWrite) { return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); } // Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. function lengthBytesUTF8(str) { var len = 0; for (var i = 0; i < str.length; ++i) { // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. // See http://unicode.org/faq/utf_bom.html#utf16-3 var u = str.charCodeAt(i); // possibly a lead surrogate if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); if (u <= 0x7F) ++len; else if (u <= 0x7FF) len += 2; else if (u <= 0xFFFF) len += 3; else len += 4; } return len; } // Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns // a copy of that string as a Javascript String object. var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined; function UTF16ToString(ptr) { var endPtr = ptr; // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. var idx = endPtr >> 1; while (HEAP16[idx]) ++idx; endPtr = idx << 1; if (endPtr - ptr > 32 && UTF16Decoder) { return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); } else { var i = 0; var str = ''; while (1) { var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; if (codeUnit == 0) return str; ++i; // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. str += String.fromCharCode(codeUnit); } } } // Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', // null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. // Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. // Parameters: // str: the Javascript string to copy. // outPtr: Byte address in Emscripten HEAP where to write the string to. // maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null // terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. // maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. // Returns the number of bytes written, EXCLUDING the null terminator. function stringToUTF16(str, outPtr, maxBytesToWrite) { // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. if (maxBytesToWrite === undefined) { maxBytesToWrite = 0x7FFFFFFF; } if (maxBytesToWrite < 2) return 0; maxBytesToWrite -= 2; // Null terminator. var startPtr = outPtr; var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; for (var i = 0; i < numCharsToWrite; ++i) { // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. var codeUnit = str.charCodeAt(i); // possibly a lead surrogate HEAP16[((outPtr)>>1)]=codeUnit; outPtr += 2; } // Null-terminate the pointer to the HEAP. HEAP16[((outPtr)>>1)]=0; return outPtr - startPtr; } // Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. function lengthBytesUTF16(str) { return str.length*2; } function UTF32ToString(ptr) { var i = 0; var str = ''; while (1) { var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; if (utf32 == 0) return str; ++i; // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. // See http://unicode.org/faq/utf_bom.html#utf16-3 if (utf32 >= 0x10000) { var ch = utf32 - 0x10000; str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); } else { str += String.fromCharCode(utf32); } } } // Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', // null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. // Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. // Parameters: // str: the Javascript string to copy. // outPtr: Byte address in Emscripten HEAP where to write the string to. // maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null // terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. // maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. // Returns the number of bytes written, EXCLUDING the null terminator. function stringToUTF32(str, outPtr, maxBytesToWrite) { // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. if (maxBytesToWrite === undefined) { maxBytesToWrite = 0x7FFFFFFF; } if (maxBytesToWrite < 4) return 0; var startPtr = outPtr; var endPtr = startPtr + maxBytesToWrite - 4; for (var i = 0; i < str.length; ++i) { // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. // See http://unicode.org/faq/utf_bom.html#utf16-3 var codeUnit = str.charCodeAt(i); // possibly a lead surrogate if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { var trailSurrogate = str.charCodeAt(++i); codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); } HEAP32[((outPtr)>>2)]=codeUnit; outPtr += 4; if (outPtr + 4 > endPtr) break; } // Null-terminate the pointer to the HEAP. HEAP32[((outPtr)>>2)]=0; return outPtr - startPtr; } // Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. function lengthBytesUTF32(str) { var len = 0; for (var i = 0; i < str.length; ++i) { // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. // See http://unicode.org/faq/utf_bom.html#utf16-3 var codeUnit = str.charCodeAt(i); if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. len += 4; } return len; } // Allocate heap space for a JS string, and write it there. // It is the responsibility of the caller to free() that memory. function allocateUTF8(str) { var size = lengthBytesUTF8(str) + 1; var ret = _malloc(size); if (ret) stringToUTF8Array(str, HEAP8, ret, size); return ret; } // Allocate stack space for a JS string, and write it there. function allocateUTF8OnStack(str) { var size = lengthBytesUTF8(str) + 1; var ret = stackAlloc(size); stringToUTF8Array(str, HEAP8, ret, size); return ret; } // Deprecated: This function should not be called because it is unsafe and does not provide // a maximum length limit of how many bytes it is allowed to write. Prefer calling the // function stringToUTF8Array() instead, which takes in a maximum length that can be used // to be secure from out of bounds writes. /** @deprecated */ function writeStringToMemory(string, buffer, dontAddNull) { warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!'); var /** @type {number} */ lastChar, /** @type {number} */ end; if (dontAddNull) { // stringToUTF8Array always appends null. If we don't want to do that, remember the // character that existed at the location where the null will be placed, and restore // that after the write (below). end = buffer + lengthBytesUTF8(string); lastChar = HEAP8[end]; } stringToUTF8(string, buffer, Infinity); if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character. } function writeArrayToMemory(array, buffer) { HEAP8.set(array, buffer); } function writeAsciiToMemory(str, buffer, dontAddNull) { for (var i = 0; i < str.length; ++i) { HEAP8[((buffer++)>>0)]=str.charCodeAt(i); } // Null-terminate the pointer to the HEAP. if (!dontAddNull) HEAP8[((buffer)>>0)]=0; } function demangle(func) { return func; } function demangleAll(text) { var regex = /__Z[\w\d_]+/g; return text.replace(regex, function(x) { var y = demangle(x); return x === y ? x : (y + ' [' + x + ']'); }); } function jsStackTrace() { var err = new Error(); if (!err.stack) { // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, // so try that as a special-case. try { throw new Error(0); } catch(e) { err = e; } if (!err.stack) { return '(no stack trace available)'; } } return err.stack.toString(); } function stackTrace() { var js = jsStackTrace(); if (CCModule['extraStackTrace']) js += '\n' + CCModule['extraStackTrace'](); return demangleAll(js); } // Memory management var PAGE_SIZE = 16384; var WASM_PAGE_SIZE = 65536; var ASMJS_PAGE_SIZE = 16777216; function alignUp(x, multiple) { if (x % multiple > 0) { x += multiple - (x % multiple); } return x; } var HEAP, /** @type {ArrayBuffer} */ buffer, /** @type {Int8Array} */ HEAP8, /** @type {Uint8Array} */ HEAPU8, /** @type {Int16Array} */ HEAP16, /** @type {Uint16Array} */ HEAPU16, /** @type {Int32Array} */ HEAP32, /** @type {Uint32Array} */ HEAPU32, /** @type {Float32Array} */ HEAPF32, /** @type {Float64Array} */ HEAPF64; function updateGlobalBufferViews() { CCModule['HEAP8'] = HEAP8 = new Int8Array(buffer); CCModule['HEAP16'] = HEAP16 = new Int16Array(buffer); CCModule['HEAP32'] = HEAP32 = new Int32Array(buffer); CCModule['HEAPU8'] = HEAPU8 = new Uint8Array(buffer); CCModule['HEAPU16'] = HEAPU16 = new Uint16Array(buffer); CCModule['HEAPU32'] = HEAPU32 = new Uint32Array(buffer); CCModule['HEAPF32'] = HEAPF32 = new Float32Array(buffer); CCModule['HEAPF64'] = HEAPF64 = new Float64Array(buffer); } var STATIC_BASE = 8, STACK_BASE = 1973184, STACKTOP = STACK_BASE, STACK_MAX = 7216064, DYNAMIC_BASE = 7216064, DYNAMICTOP_PTR = 1972928; var TOTAL_STACK = 5242880; var INITIAL_TOTAL_MEMORY = CCModule['TOTAL_MEMORY'] || 16777216; if (INITIAL_TOTAL_MEMORY < TOTAL_STACK) err('TOTAL_MEMORY should be larger than TOTAL_STACK, was ' + INITIAL_TOTAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')'); // Initialize the runtime's memory // Use a provided buffer, if there is one, or else allocate a new one if (CCModule['buffer']) { buffer = CCModule['buffer']; } else { // Use a WebAssembly memory where available { buffer = new ArrayBuffer(INITIAL_TOTAL_MEMORY); } } updateGlobalBufferViews(); HEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE; // Endianness check (note: assumes compiler arch was little-endian) function callRuntimeCallbacks(callbacks) { while(callbacks.length > 0) { var callback = callbacks.shift(); if (typeof callback == 'function') { callback(); continue; } var func = callback.func; if (typeof func === 'number') { if (callback.arg === undefined) { CCModule['dynCall_v'](func); } else { CCModule['dynCall_vi'](func, callback.arg); } } else { func(callback.arg === undefined ? null : callback.arg); } } } var __ATPRERUN__ = []; // functions called before the runtime is initialized var __ATINIT__ = []; // functions called during startup var __ATMAIN__ = []; // functions called when main() is to be run var __ATEXIT__ = []; // functions called during shutdown var __ATPOSTRUN__ = []; // functions called after the main() is called var runtimeInitialized = false; var runtimeExited = false; function preRun() { // compatibility - merge in anything from CCModule['preRun'] at this time if (CCModule['preRun']) { if (typeof CCModule['preRun'] == 'function') CCModule['preRun'] = [CCModule['preRun']]; while (CCModule['preRun'].length) { addOnPreRun(CCModule['preRun'].shift()); } } callRuntimeCallbacks(__ATPRERUN__); } function ensureInitRuntime() { if (runtimeInitialized) return; runtimeInitialized = true; if (!CCModule["noFSInit"] && !FS.init.initialized) FS.init(); TTY.init(); callRuntimeCallbacks(__ATINIT__); } function preMain() { FS.ignorePermissions = false; callRuntimeCallbacks(__ATMAIN__); } function exitRuntime() { runtimeExited = true; } function postRun() { // compatibility - merge in anything from CCModule['postRun'] at this time if (CCModule['postRun']) { if (typeof CCModule['postRun'] == 'function') CCModule['postRun'] = [CCModule['postRun']]; while (CCModule['postRun'].length) { addOnPostRun(CCModule['postRun'].shift()); } } callRuntimeCallbacks(__ATPOSTRUN__); } function addOnPreRun(cb) { __ATPRERUN__.unshift(cb); } function addOnInit(cb) { __ATINIT__.unshift(cb); } function addOnPreMain(cb) { __ATMAIN__.unshift(cb); } function addOnExit(cb) { } function addOnPostRun(cb) { __ATPOSTRUN__.unshift(cb); } function unSign(value, bits, ignore) { if (value >= 0) { return value; } return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts : Math.pow(2, bits) + value; } function reSign(value, bits, ignore) { if (value <= 0) { return value; } var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 : Math.pow(2, bits-1); if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors // TODO: In i64 mode 1, resign the two parts separately and safely value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts } return value; } // check for imul support, and also for correctness ( https://bugs.webkit.org/show_bug.cgi?id=126345 ) if (!Math.imul || Math.imul(0xffffffff, 5) !== -5) Math.imul = function imul(a, b) { var ah = a >>> 16; var al = a & 0xffff; var bh = b >>> 16; var bl = b & 0xffff; return (al*bl + ((ah*bl + al*bh) << 16))|0; }; if (!Math.clz32) Math.clz32 = function(x) { var n = 32; var y = x >> 16; if (y) { n -= 16; x = y; } y = x >> 8; if (y) { n -= 8; x = y; } y = x >> 4; if (y) { n -= 4; x = y; } y = x >> 2; if (y) { n -= 2; x = y; } y = x >> 1; if (y) return n - 2; return n - x; }; if (!Math.trunc) Math.trunc = function(x) { return x < 0 ? Math.ceil(x) : Math.floor(x); }; var Math_abs = Math.abs; var Math_cos = Math.cos; var Math_sin = Math.sin; var Math_tan = Math.tan; var Math_acos = Math.acos; var Math_asin = Math.asin; var Math_atan = Math.atan; var Math_atan2 = Math.atan2; var Math_exp = Math.exp; var Math_log = Math.log; var Math_sqrt = Math.sqrt; var Math_ceil = Math.ceil; var Math_floor = Math.floor; var Math_pow = Math.pow; var Math_imul = Math.imul; var Math_fround = Math.fround; var Math_round = Math.round; var Math_min = Math.min; var Math_max = Math.max; var Math_clz32 = Math.clz32; var Math_trunc = Math.trunc; // A counter of dependencies for calling run(). If we need to // do asynchronous work before running, increment this and // decrement it. Incrementing must happen in a place like // CCModule.preRun (used by emcc to add file preloading). // Note that you can add dependencies in preRun, even though // it happens right before run - run will be postponed until // the dependencies are met. var runDependencies = 0; var runDependencyWatcher = null; var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled function getUniqueRunDependency(id) { return id; } function addRunDependency(id) { runDependencies++; if (CCModule['monitorRunDependencies']) { CCModule['monitorRunDependencies'](runDependencies); } } function removeRunDependency(id) { runDependencies--; if (CCModule['monitorRunDependencies']) { CCModule['monitorRunDependencies'](runDependencies); } if (runDependencies == 0) { if (runDependencyWatcher !== null) { clearInterval(runDependencyWatcher); runDependencyWatcher = null; } if (dependenciesFulfilled) { var callback = dependenciesFulfilled; dependenciesFulfilled = null; callback(); // can add another dependenciesFulfilled } } } CCModule["preloadedImages"] = {}; // maps url to image data CCModule["preloadedAudios"] = {}; // maps url to audio data var memoryInitializer = null; // Copyright 2017 The Emscripten Authors. All rights reserved. // Emscripten is available under two separate licenses, the MIT license and the // University of Illinois/NCSA Open Source License. Both these licenses can be // found in the LICENSE file. // Prefix of data URIs emitted by SINGLE_FILE and related options. var dataURIPrefix = 'data:application/octet-stream;base64,'; // Indicates whether filename is a base64 data URI. function isDataURI(filename) { return String.prototype.startsWith ? filename.startsWith(dataURIPrefix) : filename.indexOf(dataURIPrefix) === 0; } // === Body === var ASM_CONSTS = []; // STATICTOP = STATIC_BASE + 1973176; /* global initializers */ /*__ATINIT__.push();*/ memoryInitializer = "data:application/octet-stream;base64,AAAAAAAAAAAHAAAAIVwAAAcAAAAtXAAABwAAADlcAAAHAAAARVwAAAMAAABRXAAAAwAAAF1cAAADAAAAaVwAAAMAAAB1XAAAAgAAAIFcAAACAAAAjlwAAAIAAACbXAAAAgAAAKhcAAAIAAAAtVwAAAgAAADAXAAACAAAAMtcAAAIAAAA1lwAAAkAAADhXAAACQAAAOxcAAAJAAAA91wAAAkAAAACXQAABAAAAA1dAAAEAAAAGV0AAAQAAAAlXQAABAAAADFdAAABAAAAPV0AAAEAAABIXQAAAQAAAFNdAAABAAAAXl0AAAAAAAAAAAAABwAAAGldAAAHAAAAdF0AAAcAAAB/XQAABwAAAIpdAAADAAAAlV0AAAMAAACgXQAAAwAAAKtdAAADAAAAtl0AAAYAAADBXQAABgAAAMxdAAAGAAAA110AAAIAAADiXQAAAgAAAO5dAAACAAAA+l0AAAIAAAAGXgAACAAAABJeAAAIAAAAHF4AAAgAAAAmXgAACAAAADBeAAAJAAAAOl4AAAkAAABEXgAACQAAAE5eAAAJAAAAWF4AAAQAAABiXgAABAAAAG1eAAAEAAAAeF4AAAQAAACDXgAAAQAAAI5eAAABAAAAmF4AAAEAAACiXgAAAQAAAKxeAAACAgECAgMEAgMEAgEBAgIBAgQDAgQDAgIBAgMBBAMDBAEDAgEAAAAAAAAAAAAAAAABAAAAAAAAAAMAAAABAAAAAgAAAAAAAAAEAAAAAAAAAAJfAAAAAAAQAAAAAAAAAGQEAAAABl8AAAEBARAAAAAAAAABZAACBAQMXwAAAAMCEAAAAAAAAAFkAAIDAxJfAAACAgIQAAAAAAAAAWQAAgICF18AABAQEBAAAAAAAAABZAACBAQjXwAABAQEEAAAAAAAAAFkAAIBAShfAAAPDw8QAAAAAAAAAGQFAAMAMF8AABERERAAAAAAAAABZAACBAQ4XwAADg4OEAUFM/8KAAFkAwUAAD5fAAAODg4QBQUz/woAAWQDBQAASl8AAB4eHhCZGQD/tAEBZAAGAABPXwAAHh4eEJkZAP+0AQFkAAYAAFpfAAASEhIQAAAAAAAAAWQAAggIX18AABMTExAAAAAAAAABZAACAgJmXwAAICAgEAAAAAAAAAFkAAIEBG9fAAAhISEQAAAAAAAAAWQAAgQEeF8AACIiIhAAAAAAAAABZAACBASBXwAAFRQVEAAAAAAAAAFkAAIBAYVfAAAWFhYQAAAAAAAAACgCAgMDjF8AADAwMBAAAAAAAAABWgACAwOTXwAAMTExEAAAAAAAAABkAQIGBJlfAABAQEAQAAAAAAAAAWQAAgcHnV8AAEFBQRAAAAAAAAABZAACBwekXwAAQkJCEAAAAAAAAAFkAAIHB6tfAABDQ0MQAAAAAAAAAWQAAgcHsF8AAERERBAAAAAAAAABZAACBwe2XwAARUVFEAAAAAAAAAFkAAIHB7tfAABGRkYQAAAAAAAAAWQAAgcHwF8AAEdHRxAAAAAAAAABZAACBwfFXwAASEhIEAAAAAAAAAFkAAIHB8pfAABJSUkQAAAAAAAAAWQAAgcH0V8AAEpKShAAAAAAAAABZAACBwfYXwAAS0tLEAAAAAAAAAFkAAIHB+BfAABMTEwQAAAAAAAAAWQAAgcH5V8AAE1NTRAAAAAAAAABZAACBwfrXwAATk5OEAAAAAAAAAFkAAIHB/BfAABPT08QAAAAAAAAAWQAAgcH9l8AAA0NDRAAAAAAAAAAZAUAAwAAYAAADAwMEAAAAAAAAABkBQADAAVgAAAdHR0QAAAAAAAAAGQFAAMAFGAAABwcHBAAAAAAAAAAZAUAAwAhYAAAGCg4EAAAAAAAAAFkAAIFBSZgAAAXJzcQAAAAAAAAAWQAAgUFK2AAAAYFBhAAAAAAAAABZAACBAQ3YAAABgUGCAAAAAAAAAFkAAIEBDxgAAAHBwcQAAAAAAAAAWQAAgQEQmAAAAkIChAAAAAAAAABZAACAwNGYAAABCMEEAAAAAAAAAFkAAIBAVBgAAAkJCQQAAAAAAAAAWQAAgQEXGAAACUlJRAAAAAAAAABZAACBARlYAAAEBAQCAAAAAAAAAFkAAIEBHZgAAALCwsQAAAAAAAAAGQFBwcHe2AAABkpORAAAAAAAAABZAACBASFYAAAMjIyBAAAAAAAAAFkAAAJCYpgAAAmJiYQAAAAAAABAGQFAAEAj2AAAFBQUBAAAAAAAAABZAACBweaYAAAUVFREAAAAAAAAAFkAAIHB6dgAABSUlIQAAAAAAAAAWQAAgcHrWAAAFNTUxAAAAAAAAABZAACBwe3YAAAVFRUEAAAAAAAAAFkAAIHB8FgAAAzMzMQAAAAAAAAAWQDAwQExWAAADY2NhAAAAAAAAABZAACBATSYAAAVlZWEAAAAAAAAQFkAAIEBNhgAAAaKjoQAAAAAAAAAWQAAgQE32AAADU1NRAAAAAAAAABZAACAQHlYAAANDQ0EAAAAAAAAAFkAAIEBAAAAAAAAAAA/////wEAAADu////EgAAALz+//9EAQAAAAAAAAAAAAAHDhwAwIEDB/8BAAAAAPwHSZIkASRJkgQAAAAAAAAAAOCDAgAAAEAAIIQCAAAAQABghAIAAABAAKCEAgAAAEAA4IQCAAAAQAAAAAAAAAAAACCFAgAAAEAAYIUCAAAAQACghQIAAABAAAAAAAAAAAAA4IUCAAAAQADghwIAAABAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcICAgICAgICAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFEBESAAgHCQYKBQsEDAMNAg4BDwAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQECAgICAwMDAwQEBAQFBQUFAAAAAAMABAAFAAYABwAIAAkACgALAA0ADwARABMAFwAbAB8AIwArADMAOwBDAFMAYwBzAIMAowDDAOMAAgEAAAAAAAAAAAAAAQECAgMDBAQFBQYGBwcICAkJCgoLCwwMDQ0AAAEAAgADAAQABQAHAAkADQARABkAIQAxAEEAYQCBAMEAAQGBAQECAQMBBAEGAQgBDAEQARgBIAEwAUABYAAAAAADAAQABQAGAAcACAAJAAoACwANAA8AEQATABcAGwAfACMAKwAzADsAQwBTAGMAcwCDAKMAwwDjAAIB//8AAAAAAQACAAMABAAFAAcACQANABEAGQAhADEAQQBhAIEAwQABAYEBAQIBAwEEAQYBCAEMARABGAEgATABQAFg//8AAG1rAAB/awAAi2sAAJdrAAClawAArWsAALZrAADAawAAx2sAAM5rAADeawAA62sAAPNrAAD7awAAA2wAAA1sAAAYbAAAHmwAAAAAAAAAAAAAdHwAAChsAAAwbAAANGwAAD9sAAAAAAAAAAAAAAAAAAB0fAAAS2wAAFdsAABebAAAAACAvwAAgL8AAIC/AAAAAAAAgD4AAIA/AACAPwAAgL8AAIC/AAAAAAAAAD8AAIA/AACAPwAAgD8AAIC/AAAAAAAAAD8AAAA/AACAvwAAgD8AAIC/AAAAAAAAgD4AAAA/AACAvwAAgL8AAIA/AAAAAAAAAAAAAIA/AACAvwAAgL8AAIC/AAAAAAAAgD4AAIA/AACAvwAAgD8AAIC/AAAAAAAAgD4AAAA/AACAvwAAgD8AAIA/AAAAAAAAAAAAAAA/AACAPwAAgL8AAIA/AAAAAAAAQD8AAIA/AACAvwAAgL8AAIA/AAAAAAAAgD8AAIA/AACAvwAAgD8AAIA/AAAAAAAAgD8AAAA/AACAPwAAgD8AAIA/AAAAAAAAQD8AAAA/AACAPwAAgL8AAIC/AAAAAAAAAD8AAIA/AACAPwAAgL8AAIA/AAAAAAAAQD8AAIA/AACAPwAAgD8AAIA/AAAAAAAAQD8AAAA/AACAPwAAgD8AAIC/AAAAAAAAAD8AAAA/AACAPwAAgD8AAIC/AAAAAAAAAD8AAAA/AACAPwAAgD8AAIA/AAAAAAAAAD8AAAAAAACAvwAAgD8AAIA/AAAAAAAAgD4AAAAAAACAvwAAgD8AAIC/AAAAAAAAgD4AAAA/AACAPwAAgL8AAIC/AAAAAAAAQD8AAAA/AACAPwAAgL8AAIA/AAAAAAAAQD8AAAAAAACAvwAAgL8AAIA/AAAAAAAAAD8AAAAAAACAvwAAgL8AAIC/AAAAAAAAAD8AAAA/AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBAAAAACckJAouFRYWFhYEABYVABYXGBYaGxweHyAhIiMkFhQxLQEEAAkLBBMFEQoxFAESDAUZLiwRMRQBEgwFGSQiAAkLLiwACQsIChYbFggKHBExFAESDAUZLiwLCQAJC6MAAAkLAAAAAAAAABwWFQsAAAAuLgoKLhQpKgsJAAgKCggAFhYAAAAAAAAAAAAAABUKAAAAAAAWFioDAh0vAAAAAAAbLjAYFiQiCAoVHRYKFhYpEyMVHTEiECkAFgoACVNjaGVtYXRpYwgACU1hdGVyaWFscwAHQ2xhc3NpYwIABVdpZHRoAAACAAZIZWlnaHQAAAIABkxlbmd0aAAABwAGQmxvY2tzAAAAAAAACQAIRW50aXRpZXMKAAAAAAkADFRpbGVFbnRpdGllcwoAAAAAAAAAAAAAAAAAAAAASQAAAO9wAADM1hAASQAAAPxwAADQ1hAASQAAAPVwAADU1hAASQEAACRxAADgNxsASQEAACtxAADkNxsASQEAADJxAADoNxsAWwAAAAJxAAAAAAAAAAAAAAAAAAAAAAAALCcMAAshGQMdHBQqMSQFAadxAACycQAAvXEAAMhxAADUcQAA4HEAAAAAAAAAAAAACAAQACAAQACAAAABAAIABAAIABAAAAAAAAAAAAAAAAABBC0DBRESFCwwBiUmJygMDRMVFhcYGRobHB0eHyAhIiMkEA8OKikvLjEAAAAAAAABBAMFERIGJSYnKAwNFBMpFRYXGBkaGxwdHh8gISIjJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO57AAAWABYABXwAACIAIgAofAAAFwAXAAV8AAAiACIAdHwAAHl8AAB8fAAAf3wAAIJ8AACFfAAAiHwAAIt8AACOfAAAkXwAAJR8AACYfAAAnHwAAKB8AACkfAAAqHwAAKx8AACwfAAAtHwAALh8AAC8fAAAwHwAAMR8AADIfAAAzHwAANB8AADWfAAA3HwAAOF8AADtfAAA+nwAAAB9AAAKfQAAEH0AABZ9AAAdfQAAJ30AADF9AAA8fQAASH0AAFV9AABdfQAAZn0AAG59AAB3fQAAen0AAFyUAABhlAAAf30AAId9AACPfQAAl30AAJ99AACnfQAAr30AALd9AAC/fQAAx30AAM99AADWqAAA1n0AANt9AADffQAA5n0AAO99AAD0fQAA9n0AAPh9AAD6fQAA/H0AAP59AAAAfgAAAn4AAAR+AAAGfgAACH4AAAp+AAAMfgAADn4AABB+AAASfgAAFH4AABZ+AAAYfgAAGn4AABx+AAAefgAAIH4AACJ+AAAkfgAAJn4AACh+AAAufgAANX4AADt+AABFfgAASX4AAFJ+AABdfgAAaX4AAG9+AAB3fgAAf34AAId+AACPfgAAl34AAJ9+AACnfgAAr34AALd+AAC/fgAAx34AANR+AADjfgAA8n4AAPx+AAAKfwAAFn8AAB9/AAAofwAAMn8AAD1/AAAAAAAAAAAAAEl/AAB5fAAAfHwAAH98AACCfAAAhXwAAIh8AACLfAAAjnwAAJF8AACUfAAAmHwAAJx8AACgfAAApHwAAKh8AACsfAAAsHwAALR8AAC4fAAAvHwAAMB8AADEfAAAyHwAAMx8AABOfwAAVH8AAFp/AABffwAAaH8AAHF/AAB3fwAAgX8AAIx/AACSfwAAmX8AAKN/AACqfwAAsX8AALp/AADDfwAAyH8AAM1/AADSfwAA138AANp/AADffwAA5H8AAOp/AADsfwAA7n8AAPB/AADyfwAA9H8AAPZ/AAD4fwAA+n8AAPx/AAD+fwAABYAAAAyAAAARgAAAFYAAANp/AAAbgAAA9H0AAPZ9AAD4fQAA+n0AAPx9AAD+fQAAAH4AAAJ+AAAEfgAABn4AAAh+AAAKfgAADH4AAA5+AAAQfgAAEn4AABR+AAAWfgAAGH4AABp+AAAcfgAAHn4AACB+AAAifgAAJH4AACZ+AAAggAAAJ4AAAC6AAAA0gAAAOYAAAD2AAABFgAAATIAAAFKAAABYgAAAYIAAAGiAAABwgAAAeIAAAICAAACIgAAAkIAAAJiAAACggAAAqIAAALCAAAC3gAAAwIAAAMmAAADNgAAA1YAAAOGAAADqgAAA84AAAPqAAAABgQAAAAAAAAAAAABXU0FEXVJbVEJGW18kWFpRRSgDDAsFAQdDJnd5eAYoCEcKAAAAAAAAAAAAAAAAAAAAXDEyMzQ1Njc4OTAaG15fUVdFUlRZVUlPUBwdWyZBU0RGR0hKS0wfIBkkI1pYQ1ZCTk0hIh4lAChdYAECAwQFBgcICQpkYWxtbnFpamtyZmdoZXMAAAALDAAAAAAAAAAAAAAADQ4PEBESAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAByAAAAAAAAAAAAAAAAAAB0JwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbwAAKQAAAAAAAAAAAAAAAGMAPCw+AC4ALwA9LT86OwAAAAAAAAAqKwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPJQAAESUAABclAAAYZQAAEmUAAClqAAAPYEAAJioAACIlQAARoEAAFCBAABZgQAAwqgAAGSBAAC3qAAAa4EAAHGBAAB5gQAAgoEAABWWAAAglgAAioEAAJaBAACegQAAqIEAALaBAADAgQAAzIEAANaBAADhgQAA7IEAAPyBAAAJggAAE4IAAB2CAAAAAAAAJKMbAHyjGwDUoxsALKQbAISkGwDcpBsANKUbAGimGwCMpRsAAAAAAAAAAAAAAAAArL0bAOy6GwBEuxsAnLsbAPS7GwBMvBsApLwbAFS9GwD8vBsAAAAAAAAAAAAAAAAAYP/O/+OIAAAZAAAAoADO/+6IAAAaAAAAoAAAAASJAAAbAAAAoAAyABKJAAAcAAAAYP8AACCJAAAdAAAAYP8yADeJAAAeAAAAAAAAAAAAAADItBAAILUQAHi1EADQtRAAKLYQAJizEACAthAAAAAAAAi3EABgtxAAuLcQABC4EABAuRAAAAAAAAAAAAAAAAAAUYsAAA2LAAAHiwAAAAAAABiLAAAniwAAO4sAAAAAAABRiwAAvosAAMOLAAAHiwAAyIsAAAAAAAAAAAAAAAAAALi6EADouxAAGL0QAEi+EAB4vxAAvL8QAADAEABEwBAAiMAQAKy5EAAEuhAAXLoQAGD/nP+mjQAAHwAAAGD/zv+2jQAAIAAAAGD/AADFjQAAIQAAAGD/MgDZjQAAIgAAAKAAnP/ljQAAIwAAAKAAzv/1jQAAJAAAAKAAAAAHjgAAJQAAAKAAMgAXjgAAJgAAAGCMAACGjAAAq4wAANyMAAARjQAAII0AAEmNAAB3jQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACDGGwAAAAAA//9q/y+OAAAnAAAALgAAAC8AAAD//5z/Qo4AACcAAAAwAAAAMQAAAP//zv9UjgAAJwAAADIAAAAzAAAA//8AAGmOAAAnAAAANAAAADUAAAD//zIAfY4AACcAAAA2AAAANwAAAAEAav+NjgAAJwAAADgAAAA5AAAAAQCc/6GOAAAnAAAAOgAAADsAAAABAM7/qY4AACcAAAA8AAAAPQAAAAEAAAC9jgAAJwAAAD4AAAA/AAAAAAAAAAAAAAAAAAAA//9q/7CPAAAoAAAAQAAAAEEAAAD//5z/vY8AACgAAABCAAAAQwAAAP//zv/HjwAAKAAAAEQAAABFAAAA//8AANGPAAAoAAAARgAAAEcAAAD//zIA3o8AACgAAABIAAAASQAAAAEAav/sjwAAKAAAAEoAAABLAAAAAQCc//uPAAAoAAAATAAAAE0AAAABAM7/CJAAACkAAABOAAAATwAAAAEAAAAQkAAAKAAAAFAAAABRAAAAAQAyACCQAAAoAAAAUgAAAFMAAAAAAAAAAAAAAP//av8wkgAAJwAAAFkAAABaAAAA//+c/z6SAAAoAAAAWwAAAFwAAAD//87/T5IAACcAAABdAAAAXgAAAP//AABfkgAAKAAAAF8AAABgAAAA//8yAGuSAAAnAAAAYQAAAGIAAAABAGr/e5IAACcAAABjAAAAZAAAAAEAnP+PkgAAJwAAAGUAAABmAAAAAQDO/6GSAAAnAAAAZwAAAGgAAAABAAAAspIAACcAAABpAAAAagAAAAEAMgC/kgAAKAAAAGsAAABsAAAAAAAAAAAAAAD//wAAj5MAACgAAABtAAAAbgAAAP//MgCakwAAKAAAAG8AAABwAAAAAQAAAKWTAAAnAAAAcQAAAHIAAAABADIAsZMAACcAAABzAAAAdAAAADyUAABElAAASZQAAJioAACtqAAAfJUAAFyUAABhlAAAiJUAAG2UAAClqAAAkpUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABTHGwBYxxsAnMcbAPTHGwBMyBsAAAAAAAAAAAAAAAAAX5UAAFmVAABSlQAATpUAAP//av+2lAAAJwAAAHoAAAB7AAAA//+c/7yUAAAnAAAAfAAAAH0AAAD//87/yZQAACkAAAB+AAAAfwAAAP//AADZlAAAJwAAAIAAAACBAAAAAQBq/+eUAAAnAAAAggAAAIMAAAABAJz/7ZQAACcAAACEAAAAhQAAAAEAzv/2lAAAJwAAAIYAAACHAAAAAQAAAAOVAAApAAAAiAAAAIkAAAAAADwAMJIAACcAAACKAAAAiwAAAAAAAAAAAAAAAAAAADyUAABElAAASZQAAJioAABOlAAAXJQAAGGUAABnlAAAbZQAAHiUAAAAAAAAAAAAAMKoAAC7qAAAm5QAALeoAACmlAAArZQAAAAAAAAAAAAAwqgAALuoAACblAAApJUAALeoAACmlAAArZQAALCVAADYlQAA55UAAPCVAAD5lQAACpYAABWWAAAglgAAK5YAADuWAABHlgAAVZYAAI+SAAD//5z/h5oAACgAAACMAAAAjQAAAP//zv8DlQAAKQAAAIgAAACJAAAA//8AAJOaAAAoAAAAjgAAAI8AAAD//zIAoZoAACcAAACQAAAAkQAAAAEAnP9HlgAAJwAAAJIAAACTAAAAAQDO/7OaAAApAAAAlAAAAJUAAAABAAAAuZoAACkAAACWAAAAlwAAAAEAMgDBmgAAJwAAAJgAAACZAAAA//+c/xibAAAnAAAAmgAAAJsAAAD//87/7ZQAACcAAACcAAAAnQAAAP//AAArmwAAKAAAAJ4AAACfAAAA//8yADibAAAoAAAAoAAAAKEAAAABAM7/SJsAACcAAACiAAAAowAAAAEAAABamwAAJwAAAKQAAAClAAAAAQAyAGqbAAAqAAAAAAAAAAAAAAAAAAAA//+c/wOcAAAoAAAApgAAAKcAAAD//87/EpwAACgAAACoAAAAqQAAAP//AAAfnAAAKAAAAKoAAACrAAAA//8yAPaUAAAnAAAArAAAAK0AAAABAJz/2ZQAACcAAACuAAAArwAAAAEAAAC8lAAAJwAAALAAAACxAAAAAQAyAC2cAAAoAAAAsgAAALMAAAAAAAAAGL4bAHC+GwDIvhsAIL8bAHi/GwDQvxsAKMAbAIDAGwDYwBsAHMEbAAAAAAAAAAAArL0bAOy6GwBEuxsAnLsbAPS7GwBMvBsAVL0bAAAAAAAAAJz/44gAACsAAAAAAM7/7ogAACwAAAAAAAAAUJwAABwAAAAAADIAXZwAABsAAAAAAGQAF44AACYAAAAAAAAAPM4bANzMGwA0zRsAjM0bAOTNGwAAAAAAAAAAAAAAAAAk0BsAaNAbAKzQGwDw0BsAdM8bAMzPGwAAAAAAAAAAAMzTGwAQ1BsAVNQbAJjUGwBs0hsAxNIbABzTGwB00xsAPNUbAJTVGwDs1RsARNYbAJzWGwD01hsATNcbAKTXGwD81xsAVNgbAKzYGwAAAAAAiP/O/5ioAAAtAAAAeADO/52oAAAtAAAAiP8AAMSeAAAtAAAAeAAAAK2oAAAtAAAAiP8yALeoAAAtAAAAeAAyALuoAAAtAAAAiP9kAMKoAAAtAAAAeABkAJuUAAAtAAAAiP/O/7CVAAAtAAAAeADO/9aoAAAtAAAAiP8AAN2oAAAtAAAAeAAAAOKoAAAtAAAAiP8yAKGeAAAtAAAAeAAyAK+eAAAtAAAAiP9kAK+eAAAtAAAAeABkAK+eAAAtAAAAmv/O/6MaHgAuAAAAZgDO/6MaHgAvAAAAmv8AAKMaHgAwAAAAZgAAAKMaHgAxAAAAAAAyACWfAAAyAAAAAAAAACzZGwCE2RsA3NkbADTaGwCM2hsA5NobAAAAAAAAAAAAmv/O/xWWAAAzAAAAmv8AACCWAAA0AAAAZgDO/5ioAAA1AAAAZgAAAEefAAA2AAAAAAAyACmUAAA3AAAAAABkAEufAAA4AAAAAAAAAAAAAACA2xsA2NsbADDcGwCI3BsA4NwbADjdGwCQ3RsAAAAAAAAAAQAAAgEAAgEAAQMAAQMAAgIAAgIAAQAAAAAAAQMAAQMAAAAAAwAAAgMAAgMAAwADAQADAgEDAgEDAQMDAQMDAgIDAgIDAQADAAADAQMDAQMDAAADAwADAgMDAgMDAwABAAACAAACAQABAQABAwACAwACAgABAgAAAAABAAABAwAAAwADAAACAAACAwADAwMBAAMCAAMCAQMBAQMBAwMCAwMCAgMBAgMAAAMBAAMBAwMAAwMDAAMCAAMCAwMDAwABAAACAAECAAEBAAMBAAMCAAICAAIBAAAAAAABAAMBAAMAAAADAAACAAMCAAMDAAABAwACAwECAwEBAwMBAwMCAwICAwIBAwAAAwABAwMBAwMAAwADAwACAwMCAwMDA5ejAAClowAApKIAALKjAAC7owAAu6IAAMajAADQowAAyaIAAOCjAADmogAA7KMAAK6iAAD7owAA2qIAAAajAAD3ogAAhqMAABCjAAAHpAAAF6QAACKkAAAvpAAAJKMAADejAAA+pAAATaQAAEKjAABZpAAAY6QAAHGkAACBpAAASqMAAFejAACRpAAAZqMAAHejAAAAAAAAAAAAAAAAAACY1RAA3NUQANDUEAAo1RAAmKgAAAAAAAA+AAAAAAAAAJ2oAAAAAAAAPwAAAAAAAAClqAAAAAAAAEAAAAD7ORsAragAAAAAAABBAAAA+zkbALeoAAAAAAAAQgAAAPo5GwC7qAAAAAAAAEMAAAD8ORsAwqgAAAAAAABEAAAA+TkbAMioAAAAAAAARQAAAPk5GwDPqAAAAAAAAEYAAAD4ORsA1qgAAAAAAABHAAAAAAAAAN2oAAAAAAAASAAAAAAAAADiqAAAAAAAAEkAAAAAAAAA6KgAAAAAAABKAAAAAAAAAJSoAAAEMgoASwAAAAAAAACUqAAADzJGAEsAAAAAAAAAlqgAABAyCgBLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABy4HQCgvR0AAAAAAAAAAAAAAAAAAAQFAQIGBwMAAgMBBAYHBQACBgQBAwcFAAAAAAAAAAAAAQEFBQQEAAIDAwcHBgYCAAIBAwUHBAYAAAAAAAAAAAAAOiY7JmUmZiZjJmAmIiDYJcsl2SVCJkAmaiZrJjwmuiXEJZUhPCC2AKcArCWoIZEhkyGSIZAhHyKUIbIlvCUCI8cA/ADpAOIA5ADgAOUA5wDqAOsA6ADvAO4A7ADEAMUAyQDmAMYA9AD2APIA+wD5AP8A1gDcAKIAowClAKcgkgHhAO0A8wD6APEA0QCqALoAvwAQI6wAvQC8AKEAqwC7AJElkiWTJQIlJCVhJWIlViVVJWMlUSVXJV0lXCVbJRAlFCU0JSwlHCUAJTwlXiVfJVolVCVpJWYlYCVQJWwlZyVoJWQlZSVZJVglUiVTJWslaiUYJQwliCWEJYwlkCWAJbED3wCTA8ADowPDA7UAxAOmA5gDqQO0Ax4ixgO1AykiYSKxAGUiZCIgIyEj9wBIIrAAGSK3ABoifyCyAKAloAAAAAAAAAAAAAAAAAAAAAAAAACWMAd3LGEO7rpRCZkZxG0Hj/RqcDWlY+mjlWSeMojbDqS43Hke6dXgiNnSlytMtgm9fLF+By2455Edv5BkELcd8iCwakhxufPeQb6EfdTaGuvk3W1RtdT0x4XTg1aYbBPAqGtkevli/ezJZYpPXAEU2WwGY2M9D/r1DQiNyCBuO14QaUzkQWDVcnFnotHkAzxH1ARL/YUN0mu1CqX6qLU1bJiyQtbJu9tA+bys42zYMnVc30XPDdbcWT3Rq6ww2SY6AN5RgFHXyBZh0L+19LQhI8SzVpmVus8Ppb24nrgCKAiIBV+y2QzGJOkLsYd8by8RTGhYqx1hwT0tZraQQdx2BnHbAbwg0pgqENXviYWxcR+1tgal5L+fM9S46KLJB3g0+QAPjqgJlhiYDuG7DWp/LT1tCJdsZJEBXGPm9FFra2JhbBzYMGWFTgBi8u2VBmx7pQEbwfQIglfED/XG2bBlUOm3Euq4vot8iLn83x3dYkkt2hXzfNOMZUzU+1hhsk3OUbU6dAC8o+Iwu9RBpd9K15XYPW3E0aT79NbTaulpQ/zZbjRGiGet0Lhg2nMtBETlHQMzX0wKqsl8Dd08cQVQqkECJxAQC76GIAzJJbVoV7OFbyAJ1Ga5n+Rhzg753l6YydkpIpjQsLSo18cXPbNZgQ20LjtcvbetbLrAIIO47bazv5oM4rYDmtKxdDlH1eqvd9KdFSbbBIMW3HMSC2PjhDtklD5qbQ2oWmp6C88O5J3/CZMnrgAKsZ4HfUSTD/DSowiHaPIBHv7CBmldV2L3y2dlgHE2bBnnBmtudhvU/uAr04laetoQzErdZ2/fufn5776OQ763F9WOsGDoo9bWfpPRocTC2DhS8t9P8We70WdXvKbdBrU/SzaySNorDdhMGwqv9koDNmB6BEHD72DfVd9nqO+ObjF5vmlGjLNhyxqDZryg0m8lNuJoUpV3DMwDRwu7uRYCIi8mBVW+O7rFKAu9spJatCsEarNcp//XwjHP0LWLntksHa7eW7DCZJsm8mPsnKNqdQqTbQKpBgmcPzYO64VnB3ITVwAFgkq/lRR6uOKuK7F7OBu2DJuO0pINvtXlt+/cfCHf2wvU0tOGQuLU8fiz3Whug9ofzRa+gVsmufbhd7Bvd0e3GOZaCIhwag//yjsGZlwLARH/nmWPaa5i+NP/a2FFz2wWeOIKoO7SDddUgwROwrMDOWEmZ6f3FmDQTUdpSdt3bj5KatGu3FrW2WYL30DwO9g3U668qcWeu95/z7JH6f+1MBzyvb2KwrrKMJOzU6ajtCQFNtC6kwbXzSlX3lS/Z9kjLnpms7hKYcQCG2hdlCtvKje+C7ShjgzDG98FWo3vAi1UISIZDQECAxFLHAwQBAsdEh4naG5vcHFiIAUGDxMUFRoIFgcoJBcYCQoOGx8lI4OCfSYqKzw9Pj9DR0pNWFlaW1xdXl9gYWNkZWZnaWprbHJzdHl6e3wAAAAAAAAAAABJbGxlZ2FsIGJ5dGUgc2VxdWVuY2UARG9tYWluIGVycm9yAFJlc3VsdCBub3QgcmVwcmVzZW50YWJsZQBOb3QgYSB0dHkAUGVybWlzc2lvbiBkZW5pZWQAT3BlcmF0aW9uIG5vdCBwZXJtaXR0ZWQATm8gc3VjaCBmaWxlIG9yIGRpcmVjdG9yeQBObyBzdWNoIHByb2Nlc3MARmlsZSBleGlzdHMAVmFsdWUgdG9vIGxhcmdlIGZvciBkYXRhIHR5cGUATm8gc3BhY2UgbGVmdCBvbiBkZXZpY2UAT3V0IG9mIG1lbW9yeQBSZXNvdXJjZSBidXN5AEludGVycnVwdGVkIHN5c3RlbSBjYWxsAFJlc291cmNlIHRlbXBvcmFyaWx5IHVuYXZhaWxhYmxlAEludmFsaWQgc2VlawBDcm9zcy1kZXZpY2UgbGluawBSZWFkLW9ubHkgZmlsZSBzeXN0ZW0ARGlyZWN0b3J5IG5vdCBlbXB0eQBDb25uZWN0aW9uIHJlc2V0IGJ5IHBlZXIAT3BlcmF0aW9uIHRpbWVkIG91dABDb25uZWN0aW9uIHJlZnVzZWQASG9zdCBpcyBkb3duAEhvc3QgaXMgdW5yZWFjaGFibGUAQWRkcmVzcyBpbiB1c2UAQnJva2VuIHBpcGUASS9PIGVycm9yAE5vIHN1Y2ggZGV2aWNlIG9yIGFkZHJlc3MAQmxvY2sgZGV2aWNlIHJlcXVpcmVkAE5vIHN1Y2ggZGV2aWNlAE5vdCBhIGRpcmVjdG9yeQBJcyBhIGRpcmVjdG9yeQBUZXh0IGZpbGUgYnVzeQBFeGVjIGZvcm1hdCBlcnJvcgBJbnZhbGlkIGFyZ3VtZW50AEFyZ3VtZW50IGxpc3QgdG9vIGxvbmcAU3ltYm9saWMgbGluayBsb29wAEZpbGVuYW1lIHRvbyBsb25nAFRvbyBtYW55IG9wZW4gZmlsZXMgaW4gc3lzdGVtAE5vIGZpbGUgZGVzY3JpcHRvcnMgYXZhaWxhYmxlAEJhZCBmaWxlIGRlc2NyaXB0b3IATm8gY2hpbGQgcHJvY2VzcwBCYWQgYWRkcmVzcwBGaWxlIHRvbyBsYXJnZQBUb28gbWFueSBsaW5rcwBObyBsb2NrcyBhdmFpbGFibGUAUmVzb3VyY2UgZGVhZGxvY2sgd291bGQgb2NjdXIAU3RhdGUgbm90IHJlY292ZXJhYmxlAFByZXZpb3VzIG93bmVyIGRpZWQAT3BlcmF0aW9uIGNhbmNlbGVkAEZ1bmN0aW9uIG5vdCBpbXBsZW1lbnRlZABObyBtZXNzYWdlIG9mIGRlc2lyZWQgdHlwZQBJZGVudGlmaWVyIHJlbW92ZWQARGV2aWNlIG5vdCBhIHN0cmVhbQBObyBkYXRhIGF2YWlsYWJsZQBEZXZpY2UgdGltZW91dABPdXQgb2Ygc3RyZWFtcyByZXNvdXJjZXMATGluayBoYXMgYmVlbiBzZXZlcmVkAFByb3RvY29sIGVycm9yAEJhZCBtZXNzYWdlAEZpbGUgZGVzY3JpcHRvciBpbiBiYWQgc3RhdGUATm90IGEgc29ja2V0AERlc3RpbmF0aW9uIGFkZHJlc3MgcmVxdWlyZWQATWVzc2FnZSB0b28gbGFyZ2UAUHJvdG9jb2wgd3JvbmcgdHlwZSBmb3Igc29ja2V0AFByb3RvY29sIG5vdCBhdmFpbGFibGUAUHJvdG9jb2wgbm90IHN1cHBvcnRlZABTb2NrZXQgdHlwZSBub3Qgc3VwcG9ydGVkAE5vdCBzdXBwb3J0ZWQAUHJvdG9jb2wgZmFtaWx5IG5vdCBzdXBwb3J0ZWQAQWRkcmVzcyBmYW1pbHkgbm90IHN1cHBvcnRlZCBieSBwcm90b2NvbABBZGRyZXNzIG5vdCBhdmFpbGFibGUATmV0d29yayBpcyBkb3duAE5ldHdvcmsgdW5yZWFjaGFibGUAQ29ubmVjdGlvbiByZXNldCBieSBuZXR3b3JrAENvbm5lY3Rpb24gYWJvcnRlZABObyBidWZmZXIgc3BhY2UgYXZhaWxhYmxlAFNvY2tldCBpcyBjb25uZWN0ZWQAU29ja2V0IG5vdCBjb25uZWN0ZWQAQ2Fubm90IHNlbmQgYWZ0ZXIgc29ja2V0IHNodXRkb3duAE9wZXJhdGlvbiBhbHJlYWR5IGluIHByb2dyZXNzAE9wZXJhdGlvbiBpbiBwcm9ncmVzcwBTdGFsZSBmaWxlIGhhbmRsZQBSZW1vdGUgSS9PIGVycm9yAFF1b3RhIGV4Y2VlZGVkAE5vIG1lZGl1bSBmb3VuZABXcm9uZyBtZWRpdW0gdHlwZQBObyBlcnJvciBpbmZvcm1hdGlvbgAAAAAAAAAAAAAAANA/yogAAAEAAQDUrQAAFAAUAAEAAAACAAAAAAAAAAAAAAAAAAAAAAAAAJBZAAABAAAAAAAAAJ9ZAAACAAAAAAAAANNaAAADAAAAAAAAAOBaAAAEAAAAAAAAAAMAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAP8AAP8AAP//AP8A/wcAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAD8AAAAAAAAAP/peAAAAAAAQAAAAAAAAAWQAAgAACQAAAAAAAAAAAAAAAAAAAAoAAAAAAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAACAAAAAwAAAAEAAAABAAAAAQAAAAwAAAANAAAABAAAAAEAAAAAAAAAAQAAAAEAAAACAAAABQAAAAIAAAABAAAAAQAAAAwAAAANAAAABAAAAAIAAAAAAAAAAQAAAAEAAAACAAAABQAAAAIAAAABAAAAAQAAAAwAAAANAAAABAAAAAIAAAAAAAAAAABAQAAAQEBghgIAAABAAKCGAgAAAEAA4IYCAAAAQAAOAAAADwAAABAAAAAAAAAAAAAAAAAAAAAwiQIAAABAACCIAgAAAAQBJGIAAAQABAAUagAABQAAAAIAAAAcagAALmoAAAAAAAAAAAAAAAAAAAAAAADRaAAABgAAAAIAAADWaAAA9GgAAAAAAAAAAAAAAAAAAAAAAADrZgAABwAAAAIAAAD2ZgAAIGcAAGhnAACqZwAAAWgAAAAAAAD2ZQAACAAAAAAAAAABZgAAJ2YAAAAAAAAAAAAAAAAAAAAAAAAyZQAACQAAAAMAAAA4ZQAAT2UAAIVlAAAAAAAAAAAAAAAAAABdYwAACgAAAAMAAABkYwAAh2MAAMFjAAD5YwAAMGQAAAAAAACrYgAACwAAAAEAAACuYgAAw2IAAAAAAAAAAAAAAAAAAAAAAAApYgAADAAAAAIAAAA1YgAAS2IAAAAAAAAAAAAAAAAAAAAAAAD/////cmQAACQAJAD1ZAAAAwADAJhqAAAIAAgAkGoAAAcABwCYagAACAAIAJBqAAAHAAcAEQAAABIAAAATAAAAAAAAAAAAAAAAAAAAcI0CAAAAQADYagAADQAAAAAAAABAawAALAAsABJrAAAtAC0A5GoAAC0ALQAIAAAAbWsAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgD8AAIA/FAAAABUAAAAVAAAAAAAAAAAAAAAAAAAAFgAAABcAAAAYAAAAGQAAAAAAAAAAAAAAAwAAAAYAAAAOAAAAAQAAAAEAAAAHAAAA1J8AAAgACABvnwAABQAFAAAAgDwAAAAAAACAPAQAAAAGAAAADwAAAAEAAAACAAAACAAAAM3MTD/NzEw/zcxMPwAAAD8AAAA/AAAAPwAAAD+amVk/AAAAP1FZBOlRWQTpUVkE6RoAAAAbAAAAHAAAABwAAAAdAAAAAAAAAHVuAAAQAAAAAAAAAGpuAAARAAAAAAAAAGFuAAASAAAAAAAAAFhuAAATAAAAAAAAAFGLAAADAAMAw4sAAAQABADIiwAABAAEAL6LAAAEAAQAB4sAAAUABQCscAAABQAFAAACAAAAAgAAAIAAAFDyBQAAAAQBYPMFAAAAQAAGAAAAoPMFABp0AAAGKQgg0A8AACJ0AAD+cwAABRQGCwZ0AAARdAAA5HMAAAQSBgnscwAA9XMAANZzAAAHQQoqAAAAANtzAADWcwAABzEJKqAPAADbcwAAWnUAAEAAQAAeAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////EAAAABgAAAD/////AACAvwAAgL+5egAAFgAWAB8AAAAgAAAAIQAAAAAAAAAAAAAAAAAAAAN7AAAUAAAAAAAAAPN6AAAVAAAAAAAAAOl6AAAWAAAAAAAAAN96AAAXAAAAAAAAACIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAG+fAAAFAAUAH4XrPrgeBb/sUTi/KVwPP+xROL/sUTi/IwAAACQAAAAkAAAAAAAAAAAAAAAAAAAAYPQFAAAAgAC/rwAABwAHAMevAAAIAAgAAQAAACUAAAAmAAAAAAAAAAAAAAAAAAAAAAAAAC6BAAAHAAcA/////wAAgL8nAAAAAAAAACgAAAAAAAAAAAAAAAAAAAApAAAAKgAAACoAAAAqAAAAKwAAAAAAAADMgwAACQAAADqIAAAQABAALAAAAC0AAAAtAAAALQAAAC4AAAAAAAAAUVkEaVFZBGlRWQRp////f////3////9/DAAAAAoAAAAFAAAACwAAAAYAAAAMAAAAAQAAABgAAAACAAAAAwAAAAEAAAABAAAAAgAAAAEAAAANAAAADgAAAA8AAAAQAAAABQAAABEAAAAHAAAADAAAAAQAAAAYAAAAAgAAAAMAAAABAAAAAQAAAAIAAAACAAAAEgAAABMAAAAUAAAAFQAAAAgAAAAWAAAACQAAAAwAAAAFAAAAGAAAAAYAAAAHAAAAAQAAAAEAAAACAAAAAgAAABcAAAAYAAAAGQAAAASuAAAIAAgAX4oAAAQABAB9igAA+DoAABoAAAABAAAABK4AAF+KAAAAAAAAGwAAAAoAAAAWAAAABwAAAAwAAAAIAAAAGAAAAAkAAAAKAAAAAQAAAAEAAAACAAAAAgAAABwAAAAdAAAAHgAAAA2LAAAKAAoAB4sAAAUABQCjiwAABAAEAKiLAAAAGQAAHwAAAAAAAAC6iwAAIAAAAAsAAAAWAAAABwAAAAwAAAALAAAAGAAAAAwAAAANAAAAAwAAAAEAAAACAAAAAgAAACEAAAAiAAAAIwAAACQAAAAFAAAAJQAAAAcAAAAMAAAABAAAABgAAAACAAAAAwAAAAEAAAABAAAABAAAAAIAAAAmAAAAJwAAACgAAAApAAAABQAAACoAAAAMAAAADAAAAAQAAAAYAAAAAgAAAAMAAAABAAAAAQAAAAUAAAACAAAAKwAAACwAAAAtAAAAVAAAAA0AAABVAAAADgAAAAwAAAAOAAAAGAAAAA8AAAAQAAAABgAAAAEAAAAHAAAAAgAAAFYAAABXAAAAWAAAAPjAEABQwRAAqMEQAHUAAAAFAAAAdgAAAAcAAAAMAAAAEQAAABgAAAACAAAAAwAAAAEAAAABAAAAAgAAAAIAAAB3AAAAeAAAAHkAAACalgAAp5YAALKWAAC0AAAABQAAAHYAAAAHAAAADAAAAAQAAAAYAAAAAgAAAAMAAAABAAAAAQAAAAIAAAACAAAAtQAAABMAAAC2AAAAtwAAAAUAAAB2AAAABwAAAAwAAAAEAAAAGAAAAAIAAAADAAAAAQAAAAEAAAACAAAAAgAAALgAAAATAAAAuQAAALoAAAAFAAAAuwAAAA8AAAC8AAAAEgAAABgAAAATAAAAFAAAAAEAAAABAAAAAgAAAAIAAAC9AAAAvgAAAL8AAACZnAAACgAKAJecAAABAAEAEM8bAMAAAAAFAAAAdgAAAAcAAAAMAAAABAAAABgAAAACAAAAAwAAAAEAAAABAAAAAgAAAAIAAADBAAAAEwAAAMIAAADDAAAAEAAAAHYAAAAHAAAADAAAAAQAAAAYAAAAAgAAAAMAAAABAAAAAQAAAAIAAAACAAAAxAAAAMUAAADGAAAAx68AAAgACAC/rwAABwAHAMcAAAAFAAAAdgAAAAcAAAAMAAAABAAAABgAAAACAAAAAwAAAAEAAAABAAAAAgAAAAIAAADIAAAAyQAAAMoAAADLAAAABQAAAHYAAAAHAAAADAAAAAQAAAAYAAAAAgAAAAMAAAABAAAAAQAAAAIAAAACAAAAzAAAAM0AAADOAAAAzwAAAAUAAAB2AAAABwAAAAwAAAAEAAAAGAAAAAIAAAADAAAAAQAAAAEAAAACAAAAAgAAANAAAAATAAAA0QAAAC8AAAAwAAAAMQAAAAAAAAAAAAAAAAAAAEigAAAAAAAAAAAAAAAAAAA8oAAAAAAAAAAAAAAAAAAAMKAAAAAAAAAAAAAAAAAAACigAAAAAAAAAAAAAAAAAAAeoAAAAAAAAAAAAAAAAAAAEKAAAAAAAAAAAAAAAAAAAAOgAAAAAAAAAAAAAAAAAAD4nwAAAAAAAAAAAAAAAAAA7Z8AAAAAAAAAAAAAAAAAAN2fAAAAAAAAAAAAAAAAAADUnwAAYOYNAAA/AAAyAAAA0gAAAAEAAAACAAAA0wAAANQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb58AAAAAAAAAPwAAMwAAANUAAAADAAAABAAAANYAAADXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQD0AAEA9AABAPXWfAADg5A0AkD8AADQAAADYAAAABQAAAAYAAADZAAAA2gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC/AAAAAAAAAL8AAAA/AACAPwAAAD8AAHA/AABwPwAAcD8AAAAAEBAQAAAAAL8AAAAAAAAAvwAAAD8AAIA/AAAAPwAAAAAAAAA/AAAAAIifAABg5g0AAD8AADMAAADbAAAAAQAAAAcAAADcAAAA3QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC/AAAAAAAAgL4AAAA/AACwPwAAgD6amQk/zcyQP5qZCT+MnwAAYOYNAAA/AAAzAAAA3gAAAAEAAAAIAAAA3wAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAvgAAAAAAAIC+AACAPgAAAD8AAIA+zcz8Ps3M/D7NzPw+kZ8AAGABDgAAPwAANQAAAOEAAAAJAAAACgAAAOIAAADjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgL4AAAAAAACAvgAAgD4AAIA/AACAPjMzkz7NzKA/MzOTPgAAAAAICAgAAACAvgAAQD8AAIC+AACAPgAAoD8AAIA+AAAAAAAAUD8AAAAAIAAAAAgICAAAAIi+AAA8PwAAiL4AAIg+AACiPwAAiD4AAAAAAABQPwAAAACXnwAAYOYNAIA/AAAzAAAA5AAAAAEAAAACAAAA0wAAAOUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmpkJP83M4D+amQk/np8AAGAcDgBwPwAANgAAAOYAAAALAAAADAAAAOcAAADoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoL4AAAAAAAAwvwAAoD4AAEA/AABwPwAAcD8AAEA/AABwPyAABAAICAgAAACAvgAAgD4AADC/AACAPgAAQD8AAEC+AAAAAAAAAD8AAEC+AAAAAAYGBgAAAEC+AACgPgAAQD4AAEA+AAAwPwAAQL4AAAAAAACgPgAAAAAAAAwACggMAAAAoL4AAIA+AABAPgAAoD4AAEA/AABwPwAAAAAAAIA+AAAQPxIAAAAQAgIAAACYvwAA4D4AAIC9AABAvgAAED8AAIA9AABAvgAAAD8AAAAAEgAAABACAgAAAEA+AADgPgAAgL0AAJg/AAAQPwAAgD0AAEA+AAAAPwAAAAClnwAA4CMOAGA/AAA3AAAA6QAAAAEAAAACAAAA6gAAAOsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAvgAAAAAAAIC+AACAPgAAAEAAAIA+AAAAP83M4D8AAAA/AAAAAAgICAAAAIC+AADAPwAAgL4AAIA+AAAAQAAAgD4AAAAAAADAPwAAAAAQABAACAwEAAAAgL4AAEA/AAAAvgAAgD4AAMA/AAAAPgAAAAAAAEA/AAAAAAAAEAACDAIAAACAvQAAAAAAAIC9AABAvgAAQD8AAIA9AAAAAAAAQD8AAAAAAAAQAAIMAgAAAIA9AAAAAAAAgL0AAEA+AABAPwAAgD0AAAAAAABAPwAAAAAoABAAAgwCAAAAgL4AAEA/AACAvQAAwL4AAMA/AACAPQAAoL4AALg/AAAAACgAEAACDAIAAACAPgAAQD8AAIC9AADAPgAAwD8AAIA9AACgPgAAuD8AAAAArp8AAOAsDgBAPwAAOAAAAOwAAAANAAAADgAAAO0AAADuAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwL4AAAAAAABQvwAAwD4AALg/AAAgPwAAID8AAKA/AAAgPwAAAAAGBggAAABAvgAAgD8AAGC/AABAPgAAsD8AAMC+AAAAAAAAkD8AAAC/HAAIAAgGEAAAAIC+AABAPwAAAL8AAIA+AACQPwAAAD8AAAAAAABAPwAAAAAAABAABAwEAAAAoL4AAAAAAADgvgAAgL0AAEA/AABAvgAAAAAAAEA/AACgvgAAEAAEDAQAAACAPQAAAAAAAOC+AACgPgAAQD8AAEC+AAAAAAAAQD8AAKC+AAAQAAQMBAAAAKC+AAAAAAAAoD4AAIC9AABAPwAAED8AAAAAAABAPwAA4D4AABAABAwEAAAAgD0AAAAAAACgPgAAoD4AAEA/AAAQPwAAAAAAAEA/AADgPgAAAAAGBgYAAABgvgAAeD8AAEi/AABgPgAAtD8AALC+AAAAAAAAkD8AAAC/HAAIAAgGEAAAAMC+AAAoPwAAIL8AAMA+AACcPwAAID8AAAAAAABAPwAAAAAAABAABAYEAAAAsL4AALA+AADwvgAAAL0AAEg/AAAgvgAAAAAAAEA/AACgvgAAEAAEBgQAAAAAPQAAsD4AAPC+AACwPgAASD8AACC+AAAAAAAAQD8AAKC+AAAQAAQGBAAAALC+AACwPgAAkD4AAAC9AABIPwAAGD8AAAAAAABAPwAA4D4AABAABAYEAAAAAD0AALA+AACQPgAAsD4AAEg/AAAYPwAAAAAAAEA/AADgPrqfAADgLA4AQD8AADgAAADvAAAADQAAAA4AAADtAAAA7gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAnwAA4D4OADA/AAA5AAAA8AAAAA8AAAAQAAAA8QAAAPIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgvgAAAAAAAGC/AACgPgAAgD8AABA/AABgPwAAYD8AAGA/AAAAAAgICAAAAIC+AAAAPwAAYL8AAIA+AACAPwAAwL4AAAAAAABAPwAAwL4cAAgACggQAAAAoL4AAMA+AAAAvwAAoD4AAGA/AAAAPwAAAAAAAMA+AAAAAAAAEAAEBgQAAACgvgAAAAAAAOC+AACAvQAAwD4AAEC+AAAAAAAAwD4AAKC+AAAQAAQGBAAAAIA9AAAAAAAA4L4AAKA+AADAPgAAQL4AAAAAAADAPgAAoL4AABAABAYEAAAAoL4AAAAAAACgPgAAgL0AAMA+AAAQPwAAAAAAAMA+AADgPgAAEAAEBgQAAACAPQAAAAAAAKA+AACgPgAAwD4AABA/AAAAAAAAwD4AAOA+xJ8AAOBHDgAgPwAAOgAAAPMAAAARAAAAEgAAAPQAAAD1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgL4AAAAAAADAvgAAgD4AANA/AADAPgAAAD8AANA/AAAAPwAAAAAICAgAAACAvgAAkD8AAIC+AACAPgAA0D8AAIA+AAAAAAAAkD8AAAAAEAAQAAgMBAAAAIC+AADAPgAAAL4AAIA+AACQPwAAAD4AAAAAAADAPgAAAAAAABAABAYEAAAAgL4AAAAAAADAvgAAAAAAAMA+AAAAvgAAAAAAAMA+AAAAvgAAEAAEBgQAAAAAAAAAAAAAAMC+AACAPgAAwD4AAAC+AAAAAAAAwD4AAAC+AAAQAAQGBAAAAIC+AAAAAAAAAD4AAAAAAADAPgAAwD4AAAAAAADAPgAAAD4AABAABAYEAAAAAAAAAAAAAAAAPgAAgD4AAMA+AADAPgAAAAAAAMA+AAAAPsyfAADgUA4AED8AADsAAAD2AAAAEwAAABQAAAD3AAAA+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIC+AAAAAAAAAL8AAIA+AABwPwAAgD4AAAA/AABAPwAAAD8AAAAABAYDAAAAAL4AABA/AADAvgAAAD4AAHA/AABAvgAAAAAAABA/AACAvg4ABAACAgIAAACAvQAAED8AAOC+AACAPQAAMD8AAKC+AAAAAAAAED8AAIC+DgAAAAQCAgAAAAC+AAAwPwAAAL8AAAA+AABQPwAAwL4AAAAAAAAQPwAAgL4AAAkABgYHAAAAQL4AAKA+AACAvgAAQD4AADA/AABAPgAAAAAAAKA+AAAAABgADQABBAYAAACAvgAA4D4AAEC+AABAvgAAMD8AAEA+AABAvgAAMD8AAAAAGAANAAEEBgAAAEA+AADgPgAAQL4AAIA+AAAwPwAAQD4AAEA+AAAwPwAAAAAAAAC/AAAAAAAAgL4AAAA/AAAAQAAAgD4AAAAACAgIAAAAgL4AAMA/AACAvgAAgD4AAABAAACAPgAAAAAAAMA/AAAAABAAEAAIDAQAAACAvgAAQD8AAAC+AACAPgAAwD8AAAA+AAAAAAAAQD8AAAAAIAAAAAgICAAAAJC+AAC8PwAAkL4AAJA+AAACQAAAkD4AAAAAAADAPwAAAAAQACAACAwEAAAAkL4AADg/AAAgvgAAkD4AAMQ/AAAgPgAAAAAAAEA/AAAAAAAAEAAEDAQAAAAAAAAAAAAAAAC+AACAvgAAQD8AAAA+AAAAAAAAQD8AAAAAAAAQAAQMBAAAAAAAAAAAAAAAAL4AAIA+AABAPwAAAD4AAAAAAABAPwAAAAAoABAABAwEAAAAgL4AAEA/AAAAvgAAAL8AAMA/AAAAPgAAoL4AALA/AAAAACgAEAAEDAQAAACAPgAAQD8AAAC+AAAAPwAAwD8AAAA+AACgPgAAsD8AAAAAEAAwAAQMBAAAAIC+AAAAAAAAAL4AAAAAAABAPwAAAD4AAAAAAABAPwAAAAAgADAABAwEAAAAAL8AAEA/AAAAvgAAgL4AAMA/AAAAPgAAoL4AALA/AAAAACAAMAADDAQAAADgvgAAQD8AAAC+AACAvgAAwD8AAAA+AACgvgAAsD8AAAAAKAAQAAMMBAAAAIA+AABAPwAAAL4AAOA+AADAPwAAAD4AAKA+AACwPwAAAAAAADAABAwEAAAAkL4AAAC9AAAgvgAAAD0AAEg/AAAgPgAAAAAAAEA/AAAAAAAAIAAEDAQAAAAAvQAAAL0AACC+AACQPgAASD8AACA+AAAAAAAAQD8AAAAAMAAwAAQMBAAAAAi/AAA4PwAAIL4AAGC+AADEPwAAID4AAKC+AACwPwAAAAAoACAABAwEAAAAYD4AADg/AAAgvgAACD8AAMQ/AAAgPgAAoD4AALA/AAAAADAAMAADDAQAAADwvgAAOD8AACC+AABgvgAAxD8AACA+AACgvgAAsD8AAAAAKAAgAAMMBAAAAGA+AAA4PwAAIL4AAPA+AADEPwAAID4AAKA+AACwPwAAAABRqwAABQAFAFerAAAEAAQAPAAAAD0AAAA+AAAAPgAAAAAAAAAAAAAArKAAADkAAAAAAAAAAACAPAAA4D0AACA9AAAAPoAPEABAAAAAPwAAAEAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////zczMPc3MzD3NzMw9AMqaOwIAAAAaAAAABgAAABEAAABBAAAAAAAAAEIAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAIAAAC3pAAACQAJAAuqAAAfAB8A0aQAAA0ADQDEpAAADAAMAN+kAAAHAAcAnqUAABYAFgDfqQAADAAMAPkAAAARAAAA+gAAABIAAAD7AAAAFQAAADoAAAATAAAAFAAAAAgAAAACAAAACQAAAAMAAAD8AAAA/QAAAP4AAADCpgAADwAPALemAAAKAAoA/wAAAAUAAAAAAQAAEwAAAAEBAAAWAAAAOwAAABMAAAAUAAAACgAAAAEAAAALAAAABAAAAAIBAAADAQAABAEAAAUBAAAFAAAABgEAABQAAAAHAQAAFwAAADwAAAAYAAAAGQAAAAwAAAABAAAACwAAAAUAAAAIAQAACQEAAAoBAABxpwAAAQABAAsBAAAFAAAADAEAABUAAAANAQAAGgAAAD0AAAACAAAAAwAAAA0AAAADAAAADgAAAAYAAAAOAQAADwEAABABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcD0AAHA9EQEAAAUAAAASAQAAFgAAABMBAAAbAAAAGAAAAAIAAAADAAAADwAAAAEAAAAPAAAAAgAAABQBAAAVAQAAFgEAANC2HQAUtx0AFwEAABcAAAAYAQAAGAAAABMBAAAbAAAAGAAAAAIAAAADAAAADwAAAAEAAAALAAAAAgAAABQBAAAVAQAAFgEAAOinAAAQABAA26cAAAwADACMqAAABwAHAISoAAAHAAcAGQEAABkAAAAaAQAAGgAAAAwAAAAEAAAAGAAAAAIAAAADAAAAAQAAAAEAAAACAAAAAgAAABsBAAAcAQAAHQEAAB4BAAAFAAAAHwEAABsAAAAMAAAAFgAAABgAAAATAAAAFAAAABAAAAAEAAAACwAAAAQAAAAgAQAAIQEAACIBAABDAAAARAAAAEUAAABFAAAAAAAAAAAAAABGAAAARwAAAEgAAABJAAAAAAAAAAAAAAALqgAAHwAfAOypAAAeAB4AqKkAAA0ADQCDqQAAJAAkAN+pAAAMAAwAZaoAADgAOAC0qgAAEgASAMeqAAAMAAwAcIoQAAAAQACwihAAAAAEAUoAAABLAAAATAAAAAAAAAAAAAAAAAAAAKWtAAALAAsApa0AAEwAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAAAAAAAAACAP00AAAAcAAAAHQAAAB4AAABOAAAATwAAAB8AAAAgAAAAIQAAAFAAAABRAAAAHwAAACAAAAAhAAAAUgAAAFMAAAAiAAAAIwAAACQAAABUAAAAVQAAACUAAAAmAAAAJgAAAFIAAABWAAAAJwAAACgAAAAoAAAAUgAAABwAAAAjAQAAJAEAACkAAABXAAAABwAAABEAAAAFAAAAEgAAAFgAAAAqAAAAHQAAACUBAAAmAQAAKQAAAFcAAAAHAAAAEQAAAAUAAAASAAAAWQAAACsAAAAAAAAAAAAAAAAAAAAAAAAAAACsPgAASD8AANQ+AAAAAAAAAAAAAAAAAAAAAAAAhD4AAEg/AACsPgAAAAAAAAAAAAAAAAAAAAAAADg+AABIPwAAhD4eAAAAJwEAACgBAAApAAAAVwAAAAgAAAATAAAABgAAABQAAAAAAAAAAAAAAB8AAAApAQAAKgEAACwAAABaAAAACQAAABUAAAAHAAAAFgAAAAAAAAAAAAAA2rAAAAMAAwAgAAAAKwEAACwBAAAtAAAAVwAAAAoAAAAXAAAACAAAABgAAAAAAAAAAAAAAN6wAAABAAEAIQAAAC0BAAAuAQAALgAAAFcAAAAHAAAAGQAAAAUAAAASAAAAWwAAAC8AAAAiAAAALQEAAC4BAAAwAAAAVwAAAAcAAAAaAAAABQAAABIAAAAAAAAAAAAAAOCwAAACAAIAIwAAAC8BAAAwAQAAKQAAAFcAAAAHAAAAEQAAAAUAAAASAAAAAAAAAAAAAAAkAAAAMQEAADIBAAApAAAAVwAAAAcAAAAbAAAABQAAABIAAAAAAAAAAAAAALixAAAHAAcAs7EAAAQABACTsQAAHwAfAIqxAAAIAAgAWLEAADEAMQBQsQAABwAHAC6xAAAhACEAKLEAAAUABQD5sAAALgAuAAAAAAB2AAAAMwEAACkAAABXAAAABwAAABEAAAAFAAAAEgAAAFwAAAAxAAAAcLIAAHayAAB8sgAATQAAAE0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkGh4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAIACAAAACYW5pbWF0aW9ucy5wbmcAYW5pbWF0aW9ucy50eHQAJmNOb3QgZW5vdWdoIGFyZ3VtZW50cyBmb3IgYW5pbTogJXMAJmNJbnZhbGlkIGFuaW0gdGlsZSBYIGNvb3JkOiAlcwAmY0ludmFsaWQgYW5pbSB0aWxlIFkgY29vcmQ6ICVzACZjSW52YWxpZCBhbmltIGZyYW1lIFggY29vcmQ6ICVzACZjSW52YWxpZCBhbmltIGZyYW1lIFkgY29vcmQ6ICVzACZjSW52YWxpZCBhbmltIGZyYW1lIHNpemU6ICVzACZjSW52YWxpZCBhbmltIHN0YXRlcyBjb3VudDogJXMAJmNJbnZhbGlkIGFuaW0gZnJhbWUgZGVsYXk6ICVzACZjQ2Fubm90IHNob3cgb3ZlciA1MTIgYW5pbWF0aW9ucwB1c2V3YXRlcmFuaW0AdXNlbGF2YWFuaW0AJmNDdXJyZW50IHRleHR1cmUgcGFjayBzcGVjaWZpZXMgaXQgdXNlcyBhbmltYXRpb25zLAAmY2J1dCBpcyBtaXNzaW5nIGFuaW1hdGlvbnMucG5nACZjQW5pbWF0aW9uIGZyYW1lcyBmb3IgdGlsZSAoJWksICVpKSBhcmUgYmlnZ2VyIHRoYW4gdGhlIHNpemUgb2YgYSB0aWxlIGluIHRlcnJhaW4ucG5nACZjU29tZSBvZiB0aGUgYW5pbWF0aW9uIGZyYW1lcyBmb3IgdGlsZSAoJWksICVpKSBhcmUgYXQgY29vcmRpbmF0ZXMgb3V0c2lkZSBhbmltYXRpb25zLnBuZwBkZWZhdWx0LnppcABwbGF5aW5nIHNvdW5kcwAmY0Rpc2FibGluZyBzb3VuZHMAc3RlcF9jbG90aDEAc3RlcF9jbG90aDIAc3RlcF9jbG90aDMAc3RlcF9jbG90aDQAc3RlcF9ncmFzczEAc3RlcF9ncmFzczIAc3RlcF9ncmFzczMAc3RlcF9ncmFzczQAc3RlcF9ncmF2ZWwxAHN0ZXBfZ3JhdmVsMgBzdGVwX2dyYXZlbDMAc3RlcF9ncmF2ZWw0AHN0ZXBfc2FuZDEAc3RlcF9zYW5kMgBzdGVwX3NhbmQzAHN0ZXBfc2FuZDQAc3RlcF9zbm93MQBzdGVwX3Nub3cyAHN0ZXBfc25vdzMAc3RlcF9zbm93NABzdGVwX3N0b25lMQBzdGVwX3N0b25lMgBzdGVwX3N0b25lMwBzdGVwX3N0b25lNABzdGVwX3dvb2QxAHN0ZXBfd29vZDIAc3RlcF93b29kMwBzdGVwX3dvb2Q0AGRpZ19jbG90aDEAZGlnX2Nsb3RoMgBkaWdfY2xvdGgzAGRpZ19jbG90aDQAZGlnX2dyYXNzMQBkaWdfZ3Jhc3MyAGRpZ19ncmFzczMAZGlnX2dyYXNzNABkaWdfZ2xhc3MxAGRpZ19nbGFzczIAZGlnX2dsYXNzMwBkaWdfZ3JhdmVsMQBkaWdfZ3JhdmVsMgBkaWdfZ3JhdmVsMwBkaWdfZ3JhdmVsNABkaWdfc2FuZDEAZGlnX3NhbmQyAGRpZ19zYW5kMwBkaWdfc2FuZDQAZGlnX3Nub3cxAGRpZ19zbm93MgBkaWdfc25vdzMAZGlnX3Nub3c0AGRpZ19zdG9uZTEAZGlnX3N0b25lMgBkaWdfc3RvbmUzAGRpZ19zdG9uZTQAZGlnX3dvb2QxAGRpZ193b29kMgBkaWdfd29vZDMAZGlnX3dvb2Q0AGluaXRpbmcgV2ViQXVkaW8gY29udGV4dAAmY011c2ljIGlzIG5vdCBzdXBwb3J0ZWQgY3VycmVudGx5AIlQTkcNChoKSW52YWxpZABBaXIAU3RvbmUAR3Jhc3MARGlydABDb2JibGVzdG9uZQBXb29kAFNhcGxpbmcAQmVkcm9jawBXYXRlcgBTdGlsbCB3YXRlcgBMYXZhAFN0aWxsIGxhdmEAU2FuZABHcmF2ZWwAR29sZCBvcmUASXJvbiBvcmUAQ29hbCBvcmUATG9nAExlYXZlcwBTcG9uZ2UAR2xhc3MAUmVkAE9yYW5nZQBZZWxsb3cATGltZQBHcmVlbgBUZWFsAEFxdWEAQ3lhbgBCbHVlAEluZGlnbwBWaW9sZXQATWFnZW50YQBQaW5rAEJsYWNrAEdyYXkAV2hpdGUARGFuZGVsaW9uAFJvc2UAQnJvd24gbXVzaHJvb20AUmVkIG11c2hyb29tAEdvbGQASXJvbgBEb3VibGUgc2xhYgBTbGFiAEJyaWNrAFROVABCb29rc2hlbGYATW9zc3kgcm9ja3MAT2JzaWRpYW4AQ29iYmxlc3RvbmUgc2xhYgBSb3BlAFNhbmRzdG9uZQBTbm93AEZpcmUATGlnaHQgcGluawBGb3Jlc3QgZ3JlZW4AQnJvd24ARGVlcCBibHVlAFR1cnF1b2lzZQBJY2UAQ2VyYW1pYyB0aWxlAE1hZ21hAFBpbGxhcgBDcmF0ZQBTdG9uZSBicmljawAtVUQALVdFAC1OUwAtRQAtUwAtVwAtTgAtVQAtRAAtTlcALU5FAC1TVwAtU0UAJmNUb28gbWFueSBwaHlzaWNzIGVudHJpZXMsIGNsZWFyaW5nAHBoeXNpY3MgdGljayBxdWV1ZQAmY0NoYXQgbG9nIGNsZWFyZWQgYXMgaXQgaGl0IDguMyBtaWxsaW9uIGNoYXJhY3RlciBsaW1pdABbJXAyOiVwMjolcDJdIAAmY0Rpc2FibGluZyBjaGF0IGxvZ2dpbmcAbG9ncy8lcDQtJXAyLSVwMiAAJXMgXyVpLmxvZwAlcy5sb2cAYXBwZW5kaW5nIHRvACZjRmFpbGVkIHRvIG9wZW4gYSBjaGF0IGxvZyBmaWxlIGFmdGVyICVpIHRyaWVzLCBnaXZpbmcgdXAAbG9ncwBDbGVhckRlbmllZAAmYS9jbGllbnQgY2xlYXJkZW5pZWQAJmVDbGVhcnMgdGhlIGxpc3Qgb2YgdGV4dHVyZSBwYWNrIFVSTHMgeW91IGhhdmUgZGVuaWVkAFJlbW92ZWQgJmUlaSAmZmRlbmllZCB0ZXh0dXJlIHBhY2sgVVJMcy4AVFAAJmEvY2xpZW50IHRwIFt4IHkgel0AJmVNb3ZlcyB5b3UgdG8gdGhlIGdpdmVuIGNvb3JkaW5hdGVzLgAmZS9jbGllbnQgdGVsZXBvcnQ6ICZjWW91IGRpZG4ndCBzcGVjaWZ5IFgsIFkgYW5kIFogY29vcmRpbmF0ZXMuACZlL2NsaWVudCB0ZWxlcG9ydDogJmNDb29yZGluYXRlcyBtdXN0IGJlIGRlY2ltYWxzAEN1Ym9pZAAmYS9jbGllbnQgY3Vib2lkIFtibG9ja10gW3BlcnNpc3RdACZlRmlsbHMgdGhlIDNEIHJlY3RhbmdsZSBiZXR3ZWVuIHR3byBwb2ludHMgd2l0aCBbYmxvY2tdLgAmZUlmIG5vIGJsb2NrIGlzIGdpdmVuLCB1c2VzIHlvdXIgY3VycmVudGx5IGhlbGQgYmxvY2suACZlICBJZiBwZXJzaXN0IGlzIGdpdmVuIGFuZCBpcyAieWVzIiwgdGhlbiB0aGUgY29tbWFuZAAmZSAgd2lsbCByZXBlYXRlZGx5IGN1Ym9pZCwgd2l0aG91dCBuZWVkaW5nIHRvIGJlIHR5cGVkIGluIGFnYWluLgAmZUN1Ym9pZDogJmZQbGFjZSBvciBkZWxldGUgYSBibG9jay4AJmVDdWJvaWQ6ICZjIiVzIiBpcyBub3QgYSB2YWxpZCBibG9jayBuYW1lIG9yIGlkLgAmZUN1Ym9pZDogJmNUaGVyZSBpcyBubyBibG9jayB3aXRoIGlkICIlcyIuAHllcwAmZUN1Ym9pZDogJmZNYXJrIDEgcGxhY2VkIGF0ICglaSwgJWksICVpKSwgcGxhY2UgbWFyayAyLgBNb2RlbAAmYS9jbGllbnQgbW9kZWwgW25hbWVdACZibmFtZXM6ICZlY2hpYmksIGNoaWNrZW4sIGNyZWVwZXIsIGh1bWFuLCBwaWcsIHNoZWVwACZlICAgICAgIHNrZWxldG9uLCBzcGlkZXIsIHpvbWJpZSwgc2l0LCA8bnVtZXJpY2FsIGJsb2NrIGlkPgAmZS9jbGllbnQgbW9kZWw6ICZjWW91IGRpZG4ndCBzcGVjaWZ5IGEgbW9kZWwgbmFtZS4AUmVzb2x1dGlvbgAmYS9jbGllbnQgcmVzb2x1dGlvbiBbd2lkdGhdIFtoZWlnaHRdACZlUHJlY2lzZWx5IHNldHMgdGhlIHNpemUgb2YgdGhlIHJlbmRlcmVkIHdpbmRvdy4AJmUvY2xpZW50OiAmZkN1cnJlbnQgcmVzb2x1dGlvbiBpcyAlaUAlZjIgeCAlaUAlZjIAJmUvY2xpZW50OiAmY1dpZHRoIGFuZCBoZWlnaHQgbXVzdCBiZSBpbnRlZ2Vycy4AJmUvY2xpZW50OiAmY1dpZHRoIGFuZCBoZWlnaHQgbXVzdCBiZSBhYm92ZSAwLgBSZW5kZXJUeXBlACZhL2NsaWVudCByZW5kZXJ0eXBlIFtub3JtYWwvbGVnYWN5L2Zhc3RdACZibm9ybWFsOiAmZURlZmF1bHQgcmVuZGVyIG1vZGUsIHdpdGggYWxsIGVudmlyb25tZW50YWwgZWZmZWN0cyBlbmFibGVkACZibGVnYWN5OiAmZVNhbWUgYXMgbm9ybWFsIG1vZGUsICZjYnV0IGlzIHVzdWFsbHkgc2xpZ2h0bHkgc2xvd2VyACAgICZlSWYgeW91IGhhdmUgaXNzdWVzIHdpdGggY2xvdWRzIGFuZCBtYXAgZWRnZXMgZGlzYXBwZWFyaW5nIHJhbmRvbWx5LCB1c2UgdGhpcyBtb2RlACZiZmFzdDogJmVTYWNyaWZpY2VzIGNsb3VkcywgZm9nIGFuZCBvdmVyaGVhZCBza3kgZm9yIGZhc3RlciBwZXJmb3JtYW5jZQAmZS9jbGllbnQ6ICZjWW91IGRpZG4ndCBzcGVjaWZ5IGEgbmV3IHJlbmRlciB0eXBlLgAmZS9jbGllbnQ6ICZmUmVuZGVyIHR5cGUgaXMgbm93ICVzLgAmZS9jbGllbnQ6ICZjVW5yZWNvZ25pc2VkIHJlbmRlciB0eXBlICZmIiVzIiZjLgBIZWxwACZhL2NsaWVudCBoZWxwIFtjb21tYW5kIG5hbWVdACZlRGlzcGxheXMgdGhlIGhlbHAgZm9yIHRoZSBnaXZlbiBjb21tYW5kLgAmZS9jbGllbnQ6IE11bHRpcGxlIGNvbW1hbmRzIGZvdW5kIHRoYXQgc3RhcnQgd2l0aDogIiZmJXMmZSIuACZlL2NsaWVudDogVW5yZWNvZ25pc2VkIGNvbW1hbmQ6ICImZiVzJmUiLgAmZS9jbGllbnQ6IFR5cGUgJmEvY2xpZW50ICZlZm9yIGEgbGlzdCBvZiBjb21tYW5kcy4AJmVMaXN0IG9mIGNsaWVudCBjb21tYW5kczoALCAAJmVUbyBzZWUgaGVscCBmb3IgYSBjb21tYW5kLCB0eXBlIC9jbGllbnQgaGVscCBbY21kIG5hbWVdAEdwdUluZm8AJmEvY2xpZW50IGdwdWluZm8AJmVEaXNwbGF5cyBpbmZvcm1hdGlvbiBhYm91dCB5b3VyIEdQVS4AJmElcwAmZS9jbGllbnQ6ICImZiVzJmUiIGNhbiBvbmx5IGJlIHVzZWQgaW4gc2luZ2xlcGxheWVyLgAvY2xpZW50AC9jbGllbnQgAB+LCAAAAAAAAABVbnN1cHBvcnRlZC56aXAgZW50cnkgY29tcHJlc3Npb24gbWV0aG9kOiAlaQBkZWZhdWx0LnBuZwAmY1dpZHRoIG9mIGRlZmF1bHQucG5nIG11c3QgYmUgYSBwb3dlciBvZiB0d28AJmNkZWZhdWx0LnBuZyBtdXN0IGJlIGF0IGxlYXN0IDE2IHBpeGVscyB3aWRlACZjV2lkdGggb2YgZGVmYXVsdC5wbmcgbXVzdCBlcXVhbCBpdHMgaGVpZ2h0AEFyaWFsAGJpdG1hcCBkYXRhAEFyaWFsIEJsYWNrAENvdXJpZXIgTmV3AENvbWljIFNhbnMgTVMAR2VvcmdpYQBHYXJhbW9uZABIZWx2ZXRpY2EASW1wYWN0AFRhaG9tYQBUaW1lcyBOZXcgUm9tYW4AVHJlYnVjaGV0IE1TAFZlcmRhbmEAY3Vyc2l2ZQBmYW50YXN5AG1vbm9zcGFjZQBzYW5zLXNlcmlmAHNlcmlmAHN5c3RlbS11aQBIb3ZlcmVkAEFsbABBbGxIb3ZlcmVkAEFsbFVuc2NhbGVkAFNuYXBUb0Jsb2NrAENpcmNsZQBDaXJjbGVBbGwAaGFja3MtcGVybS1tc2dzAGRlY29kaW5nIHNraW4AIChnb3QgACkAJmNTa2luICVzIGlzIHRvbyBsYXJnZQBnaWFudAAmY1Jlc3Bhd25pbmcgaXMgY3VycmVudGx5IGRpc2FibGVkACZjQ2Fubm90IHNldCBzcGF3biBtaWRhaXIgd2hlbiBub2NsaXAgaXMgZGlzYWJsZWQAJmNGbHlpbmcgaXMgY3VycmVudGx5IGRpc2FibGVkACZjTm9jbGlwIGlzIGN1cnJlbnRseSBkaXNhYmxlZAAmY0Nhbm5vdCB6b29tIGNhbWVyYSBvdXQgYXMgZmx5aW5nIGlzIGN1cnJlbnRseSBkaXNhYmxlZAAtaGF4ACtmbHkALWZseQArbm9jbGlwAC1ub2NsaXAAK3NwZWVkAC1zcGVlZAArcmVzcGF3bgAtcmVzcGF3bgArcHVzaAAtcHVzaAArdGhpcmRwZXJzb24ALXRoaXJkcGVyc29uACtuYW1lcwAtbmFtZXMAaG9yc3BlZWQ9AG1heHNwZWVkPQBqdW1wcz0AK29waGF4AC1vcGhheAB0ID4gMSBpbiBwaHlzaWNzIGNhbGN1bGF0aW9uLi4gdGhpcyBzaG91bGRuJ3QgaGF2ZSBoYXBwZW5lZC4Abm9ybWFsAHJhaW4ucG5nAHNub3cucG5nAHNreWJveC5wbmcAY2xvdWRzLnBuZwBsZWdhY3kAZmFzdABub3JtYWxmYXN0AGxlZ2FjeWZhc3QAd2VhdGhlciBoZWlnaHRtYXAAQXR0ZW1wdCB0byByZWdpc3RlciBldmVudCBoYW5kbGVyIHRoYXQgd2FzIGFscmVhZHkgcmVnaXN0ZXJlZABVbmFibGUgdG8gcmVnaXN0ZXIgYW5vdGhlciBldmVudCBoYW5kbGVyACZjRW5kIG9mIHN0cmVhbSByZWFkaW5nIC5sdmwgY3VzdG9tIGJsb2NrcyBzZWN0aW9uACZjICBTb21lIGJsb2NrcyBtYXkgdGhlcmVmb3JlIGFwcGVhciBpbmNvcnJlY3RseQBDUEUATWV0YWRhdGEASUQASUQyAENvbGxpZGVUeXBlAFRyYW5zbWl0c0xpZ2h0AEZ1bGxCcmlnaHQAQmxvY2tEcmF3AFNoYXBlAE5hbWUAVGV4dHVyZXMAV2Fsa1NvdW5kAENvb3JkcwBEaXN0YW5jZQBXZWF0aGVyVHlwZQBTaWRlQmxvY2sARWRnZUJsb2NrAFNpZGVMZXZlbABUZXh0dXJlVVJMAEVkZ2VIZWlnaHQAU2lkZXNPZmZzZXQAQ2xvdWRzSGVpZ2h0AENsb3Vkc1NwZWVkAFdlYXRoZXJTcGVlZABXZWF0aGVyRmFkZQBFeHBGb2cAU2t5Ym94SG9yAFNreWJveFZlcgBTa3kAQ2xvdWQAU3VubGlnaHQAQW1iaWVudABTa3lib3gAQmxvY2sATWFwR2VuZXJhdG9yAFNlZWQAVVVJRABCbG9ja0FycmF5AEJsb2NrQXJyYXkyAC5jdyBtYXAgYmxvY2tzAHdpZHRoAGhlaWdodABkZXB0aABibG9ja3MAQmxvY2tzIGZpZWxkIG11c3QgYmUgQXJyYXkAeFNwYXduAHlTcGF3bgB6U3Bhd24ARmllbGQgdHlwZSBtdXN0IGJlIEludDMyAENsYXNzaWNXb3JsZABGb3JtYXRWZXJzaW9uAAcABERhdGEAAAAAJxu3iAKs7QAFY29tLm1vamFuZy5taW5lY3JhZnQubGV2ZWwuTGV2ZWwAW0IAeHBMaW1pdFZTeW5jAExpbWl0MzBGUFMATGltaXQ2MEZQUwBMaW1pdDEyMEZQUwBMaW1pdDE0NEZQUwBMaW1pdE5vbmUAbGVhdmluZyBmdWxsc2NyZWVuAGdvaW5nIGZ1bGxzY3JlZW4Admlld2Rpc3QAJmNFcnJvciBsb2FkaW5nICVzIGZyb20gdGhlIHRleHR1cmUgcGFjay4AJmNVbmFibGUgdG8gdXNlICVzIGZyb20gdGhlIHRleHR1cmUgcGFjay4AJmMgSXRzIHNpemUgaXMgKCVpLCVpKSwgeW91ciBHUFUgc3VwcG9ydHMgKCVpLCVpKSBhdCBtb3N0LgAmYyBJdHMgc2l6ZSBpcyAoJWksJWkpLCB3aGljaCBpcyBub3QgYSBwb3dlciBvZiB0d28gc2l6ZS4Ac2NyZWVuc2hvdF8lcDQtJXAyLSVwMgAtJXAyLSVwMi0lcDIucG5nAE1pc3NpbmcgZmlsZQBkZWZhdWx0LnppcCBpcyBtaXNzaW5nLCB0cnkgZG93bmxvYWRpbmcgcmVzb3VyY2VzIGZpcnN0LgoKVGhlIGdhbWUgd2lsbCBzdGlsbCBydW4sIGJ1dCB3aXRob3V0IGFueSB0ZXh0dXJlcwAmZUV4aXRlZCByZWR1Y2VkIHBlcmZvcm1hbmNlIG1vZGUAbW9kZS1jbGFzc2ljAG5vc3RhbGdpYS1oYWNrcwAmYyVzAHByb3RvY29sLXZlcnNpb24AMC4zMAABBC0DBRESFCwwLjAuMTdhAAEEAwUREgYMDQEDBAUGERIMDTAuMC4xOWEAAQQDBRESBgwNFBMBAxMFBhESFA0wLjAuMjNhAAEEAwUREgYlJlNldHRpbmcgYWlyIGJsb2NrcwBTZXR0aW5nIGRpcnQgYmxvY2tzAFNldHRpbmcgZ3Jhc3MgYmxvY2tzAGdlbiBoZWlnaHRtYXAAQ2FydmluZyBjb2FsIG9yZQBDYXJ2aW5nIGlyb24gb3JlAENhcnZpbmcgZ29sZCBvcmUAUGxhbnRpbmcgdHJlZXMAUGxhbnRpbmcgbXVzaHJvb21zAFBsYW50aW5nIGZsb3dlcnMAQ3JlYXRpbmcgc3VyZmFjZQBGbG9vZGluZyBsYXZhAEZsb29kaW5nIHdhdGVyAEZsb29kaW5nIGVkZ2Ugd2F0ZXIAQ2FydmluZyBjYXZlcwBDcmVhdGluZyBzdHJhdGEARmlsbGluZyBtYXAAQnVpbGRpbmcgaGVpZ2h0bWFwACZlUnVubmluZyBpbiByZWR1Y2VkIHBlcmZvcm1hbmNlIG1vZGUgKGdhbWUgbWluaW1pc2VkIG9yIGhpZGRlbikAVGV4dHVyZXMgbXVzdCBoYXZlIHBvd2VyIG9mIHR3byBkaW1lbnNpb25zAG1pcG1hcHMATG9zdCBncmFwaGljcyBjb250ZXh0OiAlYwBSZWNyZWF0aW5nIGdyYXBoaWNzIGNvbnRleHQAR2Z4X0FsbG9jVGVtcE1lbW9yeQBGYWlsZWQgdG8gY3JlYXRlIHZlcnRleCBzaGFkZXIARmFpbGVkIHRvIGNyZWF0ZSBmcmFnbWVudCBzaGFkZXIARmFpbGVkIHRvIGNyZWF0ZSBwcm9ncmFtAGluX3BvcwBpbl9jb2wAaW5fdXYAbXZwAHRleE9mZnNldABmb2dDb2wAZm9nRW5kAGZvZ0RlbnNpdHkARmFpbGVkIHRvIGNvbXBpbGUgcHJvZ3JhbQBwcmVjaXNpb24gbWVkaXVtcCBmbG9hdDsKAHByZWNpc2lvbiBoaWdocCBmbG9hdDsKAHZhcnlpbmcgdmVjNCBvdXRfY29sOwoAdmFyeWluZyB2ZWMyIG91dF91djsKAHVuaWZvcm0gc2FtcGxlcjJEIHRleEltYWdlOwoAdW5pZm9ybSB2ZWMzIGZvZ0NvbDsKAHVuaWZvcm0gZmxvYXQgZm9nRW5kOwoAdW5pZm9ybSBmbG9hdCBmb2dEZW5zaXR5OwoAdm9pZCBtYWluKCkgewoAICB2ZWM0IGNvbCA9IHRleHR1cmUyRCh0ZXhJbWFnZSwgb3V0X3V2KSAqIG91dF9jb2w7CgAgIHZlYzQgY29sID0gb3V0X2NvbDsKACAgaWYgKGNvbC5hIDwgMC41KSBkaXNjYXJkOwoAICBmbG9hdCBkZXB0aCA9IGdsX0ZyYWdDb29yZC56IC8gZ2xfRnJhZ0Nvb3JkLnc7CgAgIGZsb2F0IGYgPSBjbGFtcCgoZm9nRW5kIC0gZGVwdGgpIC8gZm9nRW5kLCAwLjAsIDEuMCk7CgAgIGZsb2F0IGYgPSBjbGFtcChleHAoZm9nRGVuc2l0eSAqIGRlcHRoKSwgMC4wLCAxLjApOwoAICBjb2wucmdiID0gbWl4KGZvZ0NvbCwgY29sLnJnYiwgZik7CgAgIGdsX0ZyYWdDb2xvciA9IGNvbDsKAH0ARmFpbGVkIHRvIGNyZWF0ZSBzaGFkZXIARmFpbGVkIHRvIGNvbXBpbGUgc2hhZGVyAGF0dHJpYnV0ZSB2ZWMzIGluX3BvczsKAGF0dHJpYnV0ZSB2ZWM0IGluX2NvbDsKAGF0dHJpYnV0ZSB2ZWMyIGluX3V2OwoAdW5pZm9ybSBtYXQ0IG12cDsKAHVuaWZvcm0gdmVjMiB0ZXhPZmZzZXQ7CgAgIGdsX1Bvc2l0aW9uID0gbXZwICogdmVjNChpbl9wb3MsIDEuMCk7CgAgIG91dF9jb2wgPSBpbl9jb2w7CgAgIG91dF91diAgPSBpbl91djsKACAgb3V0X3V2ICA9IG91dF91diArIHRleE9mZnNldDsKAEdmeF9VcGRhdGVUZXh0dXJlIHRlbXAALS0gVXNpbmcgT3BlbkdMIE1vZGVybiAoJWkgYml0KSAtLQoAVmVuZG9yOiAlYwoAUmVuZGVyZXI6ICVjCgBHTCB2ZXJzaW9uOiAlYwoATWF4IHRleHR1cmUgc2l6ZTogKCVpLCAlaSkKAERlcHRoIGJ1ZmZlciBiaXRzOiAlaQoAVmlkZW8gbWVtb3J5OiAlZjIgTUIgdG90YWwsICVmMiBmcmVlCgBHTF9OVlhfZ3B1X21lbW9yeV9pbmZvAEdMQ29udGV4dCBsb3N0AHRvdWNoLnBuZwBpY29ucy5wbmcAZ3VpX2NsYXNzaWMucG5nAGd1aS5wbmcASGl0IG1heCBzY3JlZW5zAGd1aS1ibG9ja2luaGFuZABodHRwLW5vLWh0dHBzAGh0dHBzLXZlcmlmeQBodHRwLXNraW5zZXJ2ZXIAaHR0cDovL2NsYXNzaWN1YmUuczMuYW1hem9uYXdzLmNvbS9za2luAFRyaWVkIHRvIHJlbW92ZSBlbGVtZW50IGF0IGxpc3QgZW5kAElnbm9yaW5nIGludmFsaWQgcmVxdWVzdCAoJWkpAEhUVFAgcmV0dXJuZWQgZGF0YTogJWkgYnl0ZXMARmV0Y2hpbmcgJXMAJXMlcwBodHRwOi8vZGwuZHJvcGJveC5jb20vAGh0dHBzOi8vZGwuZHJvcGJveHVzZXJjb250ZW50LmNvbS8AaHR0cHM6Ly9kbC5kcm9wYm94LmNvbS8AJXMvJXMucG5nAEFkZGluZyAlcyAodHlwZSAlYikASHR0cF9Qb3N0RGF0YQA/dD0laSVpAE5vbmUARjEARjIARjMARjQARjUARjYARjcARjgARjkARjEwAEYxMQBGMTIARjEzAEYxNABGMTUARjE2AEYxNwBGMTgARjE5AEYyMABGMjEARjIyAEYyMwBGMjQAVGlsZGUATWludXMAUGx1cwBCcmFja2V0TGVmdABCcmFja2V0UmlnaHQAU2xhc2gAU2VtaWNvbG9uAFF1b3RlAENvbW1hAFBlcmlvZABCYWNrU2xhc2gAU2hpZnRMZWZ0AFNoaWZ0UmlnaHQAQ29udHJvbExlZnQAQ29udHJvbFJpZ2h0AEFsdExlZnQAQWx0UmlnaHQAV2luTGVmdABXaW5SaWdodABVcABEb3duAE51bWJlcjAATnVtYmVyMQBOdW1iZXIyAE51bWJlcjMATnVtYmVyNABOdW1iZXI1AE51bWJlcjYATnVtYmVyNwBOdW1iZXI4AE51bWJlcjkASW5zZXJ0AEhvbWUARW5kAFBhZ2VVcABQYWdlRG93bgBNZW51AEEAQgBDAEQARQBGAEcASABJAEoASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAVwBYAFkAWgBFbnRlcgBFc2NhcGUAU3BhY2UAQmFja1NwYWNlAFRhYgBDYXBzTG9jawBTY3JvbGxMb2NrAFByaW50U2NyZWVuAFBhdXNlAE51bUxvY2sAS2V5cGFkMABLZXlwYWQxAEtleXBhZDIAS2V5cGFkMwBLZXlwYWQ0AEtleXBhZDUAS2V5cGFkNgBLZXlwYWQ3AEtleXBhZDgAS2V5cGFkOQBLZXlwYWREaXZpZGUAS2V5cGFkTXVsdGlwbHkAS2V5cGFkU3VidHJhY3QAS2V5cGFkQWRkAEtleXBhZERlY2ltYWwAS2V5cGFkRW50ZXIAWEJ1dHRvbjEAWEJ1dHRvbjIATGVmdE1vdXNlAFJpZ2h0TW91c2UATWlkZGxlTW91c2UATk9ORQBHUkFWRQBNSU5VUwBQTFVTAExCUkFDS0VUAFJCUkFDS0VUAFNMQVNIAFNFTUlDT0xPTgBBUE9TVFJPUEhFAENPTU1BAFBFUklPRABCQUNLU0xBU0gATFNISUZUAFJTSElGVABMQ09OVFJPTABSQ09OVFJPTABMQUxUAFJBTFQATFdJTgBSV0lOAFVQAERPV04ATEVGVABSSUdIVAAwADEAMgAzADQANQA2ADcAOAA5AElOU0VSVABERUxFVEUASE9NRQBFTkQAUFJJT1IATUVOVQBSRVRVUk4ARVNDQVBFAFNQQUNFAEJBQ0sAVEFCAENBUElUQUwAU0NST0xMAFBSSU5UAFBBVVNFAE5VTUxPQ0sATlVNUEFEMABOVU1QQUQxAE5VTVBBRDIATlVNUEFEMwBOVU1QQUQ0AE5VTVBBRDUATlVNUEFENgBOVU1QQUQ3AE5VTVBBRDgATlVNUEFEOQBESVZJREUATVVMVElQTFkAU1VCVFJBQ1QAQUREAERFQ0lNQUwATlVNUEFERU5URVIAWEJVVFRPTjEAWEJVVFRPTjIATE1PVVNFAFJNT1VTRQBNTU9VU0UAJmNDYW5ub3QgZGVmaW5lIG1vcmUgdGhhbiAyNTYgaG90a2V5cwBob3RrZXktAGtleS0lYwBTZXRTcGF3bgBUb2dnbGVGb2cAU2VuZENoYXQAUGxheWVyTGlzdABOb0NsaXAARmx5VXAARmx5RG93bgBFeHRJbnB1dABIaWRlRlBTAFRoaXJkUGVyc29uAEhpZGVHVUkAQXhpc0xpbmVzAFpvb21TY3JvbGxpbmcASGFsZlNwZWVkAERlbGV0ZUJsb2NrAFBpY2tCbG9jawBQbGFjZUJsb2NrAEF1dG9Sb3RhdGUASG90YmFyU3dpdGNoaW5nAFNtb290aENhbWVyYQBEcm9wQmxvY2sASURPdmVybGF5AEJyZWFrYWJsZUxpcXVpZHMAICAmZVNtb290aCBjYW1lcmEgaXMgJmFlbmFibGVkACAgJmVTbW9vdGggY2FtZXJhIGlzICZjZGlzYWJsZWQAICAmZUF4aXMgbGluZXMgKCY0WCZlLCAmMlkmZSwgJjFaJmUpIG5vdyBzaG93ACAgJmVBeGlzIGxpbmVzIG5vIGxvbmdlciBzaG93ACAgJmVBdXRvIHJvdGF0ZSBpcyAmYWVuYWJsZWQAICAmZUF1dG8gcm90YXRlIGlzICZjZGlzYWJsZWQAICAmZUJyZWFrYWJsZSBsaXF1aWRzIGlzICZhZW5hYmxlZAAgICZlQnJlYWthYmxlIGxpcXVpZHMgaXMgJmNkaXNhYmxlZAAlYy4gJmVQcmVzcyAmYSVjICZldG8gZGlzYWJsZS4AJWMuICZlUHJlc3MgJmElYyAmZXRvIHJlLWVuYWJsZS4AaG90a2V5LSVjJiViACV0JiVzACZjVGhlIHNlcnZlciBoYXMgZm9yYmlkZGVuIHlvdSBmcm9tIGNoYW5naW5nIHlvdXIgaGVsZCBibG9jay4ARXJyb3IARXJyb3IgJWkgd2hlbiAlYwBFcnJvciAlaCB3aGVuICVjAAogIEVycm9yIG1lYW5pbmc6ICVjAAogIEVycm9yIG1lYW5pbmc6ICVzAEJ5dGVBcnJheSBOQlQgdGFnIHRvbyBzbWFsbABFeHBlY3RlZCBCeXRlQXJyYXkgTkJUIHRhZwBFeHBlY3RlZCBTdHJpbmcgTkJUIHRhZwBFeHBlY3RlZCBGbG9hdDMyIE5CVCB0YWcARXhwZWN0ZWQgSW50MzIgTkJUIHRhZwBFeHBlY3RlZCBJbnQxNiBOQlQgdGFnAEV4cGVjdGVkIEludDggTkJUIHRhZwBDYW5ub3QgbmF2aWdhdGUgdG8gaW52YWxpZCBVUkwAQ2Fubm90IGRvd25sb2FkIGZyb20gaW52YWxpZCBVUkwATm8gYXVkaW8gb3V0cHV0IGRldmljZXMgcGx1Z2dlZCBpbgBXZWJzaXRlIGRlbmllZCBkb3dubG9hZCBvciBkb2Vzbid0IGV4aXN0AE5CVCBzdHJpbmcgdG9vIGxvbmcASW52YWxpZCByb290IE5CVCB0YWcAVW5rbm93biBOQlQgdGFnIHR5cGUASW52YWxpZCBQTkcgc2NhbmxpbmUgdHlwZQBObyBpbWFnZSBpbiBQTkcASW5jb21wbGV0ZSBQTkcgaW1hZ2UgZGF0YQBJbnRlcmxhY2VkIFBOR3MgdW5zdXBwb3J0ZWQAUE5HIGltYWdlIHRvbyB0YWxsAFBORyBpbWFnZSB0b28gd2lkZQBJbnZhbGlkIFBORyBoZWFkZXIgc2l6ZQBPbmx5IFBORyBpbWFnZXMgc3VwcG9ydGVkAENhbm5vdCBsb2FkIC56aXAgZmlsZXMgd2l0aCBvdmVyIDEwMjQgZW50cmllcwBVbnN1cHBvcnRlZCBXQVYgYXVkaW8gZm9ybWF0AEludmFsaWQgV0FWIHR5cGUAT25seSBXQVYgc291bmQgZmlsZXMgc3VwcG9ydGVkAE1QMyBhdWRpbyBmaWxlcyBhcmUgbm90IHN1cHBvcnRlZABJbnZhbGlkIE9HRyBmb3JtYXQgdmVyc2lvbgBPbmx5IE9HRyBtdXNpYyBmaWxlcyBzdXBwb3J0ZWQASW52YWxpZCBhcmd1bWVudABPcGVyYXRpb24gbm90IHN1cHBvcnRlZABFbmQgb2Ygc3RyZWFtAEVycm9yICVpIHdoZW4gJWMgJyVzJwBFcnJvciAlaCB3aGVuICVjICclcycAQ2xhc3NpQ3ViZSBjcmFzaGVkLgoAUmVhc29uOiAlYwoAJWgKAEZ1bGwgZGV0YWlscyBvZiB0aGUgY3Jhc2ggaGF2ZSBiZWVuIGxvZ2dlZCB0byAnY2xpZW50LmxvZycuCgBQbGVhc2UgcmVwb3J0IHRoaXMgb24gdGhlIENsYXNzaUN1YmUgZm9ydW1zIG9yIHRvIFVua25vd25TaGFkb3cyMDAuCgoAV2UncmUgc29ycnkALS0gYmFja3RyYWNlIC0tCgBjaHVuayBwYXJ0cwBjaHVuayBpbmZvAHNvcnRlZCBjaHVuayBpbmZvAHJlbmRlciBjaHVuayBpbmZvAGNodW5rIGRpc3RhbmNlcwBnZngtbWF4Y2h1bmt1cGRhdGVzADwAPgBEb25lAFVwbG9hZAAgJjcocGFnZSAlaS8laSkALQBCYWNrIHRvIGdhbWUAR2FtZSBtZW51AE9wdGlvbnMuLi4AR2VuZXJhdGUgbmV3IGxldmVsLi4uAExvYWQgbGV2ZWwuLi4AU2F2ZSBsZXZlbC4uLgBDaGFuZ2UgdGV4dHVyZSBwYWNrLi4uAEhvdGtleXMuLi4ATW9kaWZ5IGhvdGtleXMATmV3IGhvdGtleS4uLgBDdHJsAFNoaWZ0AEFsdABTYXZlIGNoYW5nZXMAQWRkIGhvdGtleQBSZW1vdmUgaG90a2V5AElucHV0IHN0YXlzIG9wZW46IABPRkYAT04ATW9kaWZpZXJzOiBwcmVzcyBhIGtleS4uAE1vZGlmaWVyczoAIE5vbmUAIEN0cmwAIFNoaWZ0ACBBbHQAS2V5OiBwcmVzcyBhIGtleS4uAEtleTogAEhvdGtleSB0ZXh0ACArAFNlbGVjdCBhIHRleHR1cmUgcGFjawAmZVJlbG9hZGluZyB0ZXh0dXJlIHBhY2sgbGlzdCBhcyBpdCBtYXkgYmUgb3V0IG9mIGRhdGUALnppcABzaG93aW5nIG9wZW4gZmlsZSBkaWFsb2cAVGV4dHVyZSBwYWNrcwBEb3dubG9hZABTYXZlACZjT3ZlcndyaXRlIGV4aXN0aW5nPwBNYXAgbmFtZQAmZVBsZWFzZSBlbnRlciBhIGZpbGVuYW1lAHNob3dpbmcgc2F2ZSBmaWxlIGRpYWxvZwAmZVNhdmVkIG1hcCB0bzogJXMAZW5jb2RpbmcALm1pbmUALnNjaGVtYXRpYwBDbGFzc2lDdWJlIG1hcABNaW5lY3JhZnQgc2NoZW1hdGljAE1pbmVjcmFmdCBjbGFzc2ljIG1hcAAuY3cAbWFwcy8lcy5jdwBMb2FkIGxldmVsAG1hcHMvJXMAJmVSZWxvYWRpbmcgbGV2ZWwgbGlzdCBhcyBpdCBtYXkgYmUgb3V0IG9mIGRhdGUAbWFwcwBDbGFzc2ljIG1hcCBmaWxlcwB0bXAALmRhdAAubHZsAC5mY20AV2lkdGg6AEhlaWdodDoATGVuZ3RoOgBTZWVkOgBHZW5lcmF0ZSBuZXcgbGV2ZWwARmxhdGdyYXNzAFZhbmlsbGEAJmNUaGUgZ2VuZXJhdGVkIG1hcCdzIHZvbHVtZSBpcyB0b28gYmlnLgAmY09uZSBvZiB0aGUgbWFwIGRpbWVuc2lvbnMgaXMgaW52YWxpZC4AJmVNdXNpYy9Tb3VuZCwgdmlldyBib2JiaW5nLCBhbmQgbW9yZQAmZUd1aSBzY2FsZSwgZm9udCBzZXR0aW5ncywgYW5kIG1vcmUAJmVGUFMgbGltaXQsIHZpZXcgZGlzdGFuY2UsIGVudGl0eSBuYW1lcy9zaGFkb3dzACZlU2V0IGtleSBiaW5kaW5ncywgYmluZCBrZXlzIHRvIGFjdCBhcyBtb3VzZSBjbGlja3MAJmVDaGF0IG9wdGlvbnMAJmVIYWNrcyBhbGxvd2VkLCBqdW1wIHNldHRpbmdzLCBhbmQgbW9yZQAmZUVudiBjb2xvdXJzLCB3YXRlciBsZXZlbCwgd2VhdGhlciwgYW5kIG1vcmUAJmVTZXR0aW5ncyBmb3IgcmVzZW1ibGluZyB0aGUgb3JpZ2luYWwgY2xhc3NpYwBNaXNjIG9wdGlvbnMuLi4AR3VpIG9wdGlvbnMuLi4AR3JhcGhpY3Mgb3B0aW9ucy4uLgBDb250cm9scy4uLgBDaGF0IG9wdGlvbnMuLi4ASGFja3Mgc2V0dGluZ3MuLi4ARW52IHNldHRpbmdzLi4uAE5vc3RhbGdpYSBvcHRpb25zLi4uADogAENsYXNzaWMgaGFuZCBtb2RlbABDbGFzc2ljIHdhbGsgYW5pbQBDbGFzc2ljIGd1aSB0ZXh0dXJlcwBDbGFzc2ljIHBsYXllciBsaXN0AENsYXNzaWMgb3B0aW9ucwBBbGxvdyBjdXN0b20gYmxvY2tzAFVzZSBDUEUAVXNlIHNlcnZlciB0ZXh0dXJlcwBVc2UgY2xhc3NpYyBjaGF0AG5vc3RhbGdpYS1jbGFzc2ljY2hhdABub3N0YWxnaWEtc2VydmVydGV4dHVyZXMAbm9zdGFsZ2lhLXVzZWNwZQBub3N0YWxnaWEtY3VzdG9tYmxvY2tzAG5vc3RhbGdpYS1jbGFzc2ljb3B0aW9ucwBub3N0YWxnaWEtY2xhc3NpY3RhYmxpc3QAbm9zdGFsZ2lhLWNsYXNzaWNndWkAbm9zdGFsZ2lhLXNpbXBsZWFybXMAJmVCdXR0b25zIG9uIHRoZSByaWdodCByZXF1aXJlIHJlc3RhcnRpbmcgZ2FtZQBDbG91ZHMgY29sb3IAU2t5IGNvbG9yAEZvZyBjb2xvcgBDbG91ZHMgc3BlZWQAQ2xvdWRzIGhlaWdodABTdW5saWdodCBjb2xvcgBTaGFkb3cgY29sb3IAV2VhdGhlcgBSYWluL1Nub3cgc3BlZWQAV2F0ZXIgbGV2ZWwAT0sARGVmYXVsdCB2YWx1ZQAmZUlmICZmT04mZSwgdGhlbiB0aGUgdGhpcmQgcGVyc29uIGNhbWVyYXMgd2lsbCBsaW1pdAomZXRoZWlyIHpvb20gZGlzdGFuY2UgaWYgdGhleSBoaXQgYSBzb2xpZCBibG9jay4AJmVTZXRzIGhvdyBtYW55IGJsb2NrcyBoaWdoIHlvdSBjYW4ganVtcCB1cC4KJmVOb3RlOiBZb3UganVtcCBtdWNoIGhpZ2hlciB3aGVuIGhvbGRpbmcgZG93biB0aGUgU3BlZWQga2V5IGJpbmRpbmcuACZlSWYgJmZPTiZlLCBwbGFjaW5nIGJsb2NrcyB0aGF0IGludGVyc2VjdCB5b3VyIG93biBwb3NpdGlvbiBjYXVzZQomZXRoZSBibG9jayB0byBiZSBwbGFjZWQsIGFuZCB5b3UgdG8gYmUgbW92ZWQgb3V0IG9mIHRoZSB3YXkuCiZmVGhpcyBpcyBtYWlubHkgdXNlZnVsIGZvciBxdWljayBwaWxsYXJpbmcvdG93ZXJpbmcuACZlSWYgJmZPRkYmZSwgeW91IHdpbGwgaW1tZWRpYXRlbHkgc3RvcCB3aGVuIGluIG5vY2xpcAomZW1vZGUgYW5kIG5vIG1vdmVtZW50IGtleXMgYXJlIGhlbGQgZG93bi4ASGFja3MgZW5hYmxlZABTcGVlZCBtdWx0aXBsaWVyAENhbWVyYSBjbGlwcGluZwBKdW1wIGhlaWdodABXT00gc3R5bGUgaGFja3MARnVsbCBibG9jayBzdGVwcGluZwBCcmVha2FibGUgbGlxdWlkcwBQdXNoYmFjayBwbGFjaW5nAE5vY2xpcCBzbGlkZQBGaWVsZCBvZiB2aWV3AGhhY2tzLWZvdgBoYWNrcy1ub2NsaXBzbGlkZQBoYWNrcy1wdXNoYmFja3BsYWNpbmcAaGFja3MtbGlxdWlkc2JyZWFrYWJsZQBoYWNrcy1mdWxsYmxvY2tzdGVwAGhhY2tzLXdvbXN0eWxlaGFja3MAaGFja3MtanVtcHZlbG9jaXR5AGhhY2tzLWNhbWVyYWNsaXBwaW5nAGhhY2tzLXNwZWVkbXVsdGlwbGllcgBoYWNrcy1oYWNrc2VuYWJsZWQAQ2hhdCBzY2FsZQBDaGF0IGxpbmVzAExvZyB0byBkaXNrAENsaWNrYWJsZSBjaGF0AGd1aS1jaGF0Y2xpY2thYmxlAGNoYXQtbG9nZ2luZwBndWktY2hhdGxpbmVzAGd1aS1jaGF0c2NhbGUAAAEEBwYLAgMICQUKTm9ybWFsIGNvbnRyb2xzAD4gJWM6ICVjIDwAJWM6ICVjAENvbnRyb2xzAAABBAcGAgMICQVGb3J3YXJkAEJhY2sASnVtcABTYXZlIGxvY2F0aW9uAExlZnQAUmlnaHQAQnVpbGQAVG9nZ2xlIGZvZwBMb2FkIGxvY2F0aW9uAAwNGQ4PEEhhY2tzIGNvbnRyb2xzAEhhbGYgc3BlZWQARmx5IHVwAEZseSBkb3duAE11c2ljAEludmVydCBtb3VzZQBSZW5kZXIgZGlzdGFuY2UAQmxvY2sgcGh5c2ljcwBTb3VuZABTaG93IEZQUwBWaWV3IGJvYmJpbmcARlBTIG1vZGUAZnBzbGltaXQAdmlld2JvYmJpbmcAZ3VpLXNob3dmcHMAc291bmRzdm9sdW1lAHNpbmdsZXBsYXllcnBoeXNpY3MARkFSAE5PUk1BTABTSE9SVABUSU5ZAGludmVydG1vdXNlAG11c2ljdm9sdW1lAFBsYXllciBsaXN0AEludmVudG9yeQBTZW5kIGNoYXQADA0ZGA4PEBVTY3JvbGwgem9vbQBUaGlyZCBwZXJzb24AERIWHiATFBcdHyEiT3RoZXIgY29udHJvbHMAU2hvdyBleHQgaW5wdXQASGlkZSBGUFMASGlkZSBndWkASG90YmFyIHN3aXRjaGluZwBEcm9wIGJsb2NrAFNjcmVlbnNob3QARnVsbHNjcmVlbgBTaG93IGF4aXMgbGluZXMAQXV0by1yb3RhdGUAU21vb3RoIGNhbWVyYQBJRCBvdmVybGF5ACZlUHJlc3MgZXNjYXBlIHRvIHJlc2V0IHRoZSBiaW5kaW5nABobHE1vdXNlIGtleSBiaW5kaW5ncwBEZWxldGUgYmxvY2sAUGljayBibG9jawBQbGFjZSBibG9jawAmZUNoYW5nZSB0aGUgc21vb3RobmVzcyBvZiB0aGUgc21vb3RoIGNhbWVyYS4AJmVWU3luYzogJmZOdW1iZXIgb2YgZnJhbWVzIHJlbmRlcmVkIGlzIGF0IG1vc3QgdGhlIG1vbml0b3IncyByZWZyZXNoIHJhdGUuCiZlMzAvNjAvMTIwLzE0NCBGUFM6ICZmUmVuZGVycyAzMC82MC8xMjAvMTQ0IGZyYW1lcyBhdCBtb3N0IGVhY2ggc2Vjb25kLgomZU5vTGltaXQ6ICZmUmVuZGVycyBhcyBtYW55IGZyYW1lcyBhcyBwb3NzaWJsZSBlYWNoIHNlY29uZC4KJmNOb0xpbWl0IGlzIHBvaW50bGVzcyAtIGl0IHdhc3RlZnVsbHkgcmVuZGVycyBmcmFtZXMgdGhhdCB5b3UgZG9uJ3QgZXZlbiBzZWUhACZjTm90ZTogJmVTbW9vdGggbGlnaHRpbmcgaXMgc3RpbGwgZXhwZXJpbWVudGFsIGFuZCBjYW4gaGVhdmlseSByZWR1Y2UgcGVyZm9ybWFuY2UuACZlTm9uZTogJmZObyBuYW1lcyBvZiBwbGF5ZXJzIGFyZSBkcmF3bi4KJmVIb3ZlcmVkOiAmZk5hbWUgb2YgdGhlIHRhcmdldGVkIHBsYXllciBpcyBkcmF3biBzZWUtdGhyb3VnaC4KJmVBbGw6ICZmTmFtZXMgb2YgYWxsIG90aGVyIHBsYXllcnMgYXJlIGRyYXduIG5vcm1hbGx5LgomZUFsbEhvdmVyZWQ6ICZmQWxsIG5hbWVzIG9mIHBsYXllcnMgYXJlIGRyYXduIHNlZS10aHJvdWdoLgomZUFsbFVuc2NhbGVkOiAmZkFsbCBuYW1lcyBvZiBwbGF5ZXJzIGFyZSBkcmF3biBzZWUtdGhyb3VnaCB3aXRob3V0IHNjYWxpbmcuACZlTm9uZTogJmZObyBlbnRpdHkgc2hhZG93cyBhcmUgZHJhd24uCiZlU25hcFRvQmxvY2s6ICZmQSBzcXVhcmUgc2hhZG93IGlzIHNob3duIG9uIGJsb2NrIHlvdSBhcmUgZGlyZWN0bHkgYWJvdmUuCiZlQ2lyY2xlOiAmZkEgY2lyY3VsYXIgc2hhZG93IGlzIHNob3duIGFjcm9zcyB0aGUgYmxvY2tzIHlvdSBhcmUgYWJvdmUuCiZlQ2lyY2xlQWxsOiAmZkEgY2lyY3VsYXIgc2hhZG93IGlzIHNob3duIHVuZGVybmVhdGggYWxsIGVudGl0aWVzLgBDYW1lcmEgTWFzcwBWaWV3IGRpc3RhbmNlAEFkdmFuY2VkIGxpZ2h0aW5nAE5hbWVzAFNoYWRvd3MATWlwbWFwcwBnZngtbWlwbWFwcwBlbnRpdHlzaGFkb3cAbmFtZXNtb2RlAGNhbWVyYS1zbW9vdGgAZ2Z4LXNtb290aGxpZ2h0aW5nAGNhbWVyYW1hc3MAQmxhY2sgdGV4dCBzaGFkb3dzAEhvdGJhciBzY2FsZQBJbnZlbnRvcnkgc2NhbGUAVGFiIGF1dG8tY29tcGxldGUAVXNlIHN5c3RlbSBmb250AFNlbGVjdCBzeXN0ZW0gZm9udABTZWxlY3QgYSBmb250AG1ha2luZyBmb250AGd1aS1mb250bmFtZQBndWktYXJpYWxjaGF0Zm9udABndWktdGFiLWF1dG9jb21wbGV0ZQBndWktaW52ZW50b3J5c2NhbGUAZ3VpLWhvdGJhcnNjYWxlAGd1aS1ibGFja3RleHRzaGFkb3dzAFJlYWNoIGRpc3RhbmNlAE11c2ljIHZvbHVtZQBTb3VuZHMgdm9sdW1lAE1vdXNlIHNlbnNpdGl2aXR5AG1vdXNlc2Vuc2l0aXZpdHkAU2F2ZSBsZXZlbC4uAExvYWQgbGV2ZWwuLgBTbWFsbABOb3JtYWwASHVnZQBUZXh0dXJlIElEIHJlZmVyZW5jZSBzaGVldABmADAxMjM0NTY3ODkAJmVBcmUgeW91IHN1cmUgeW91IHdhbnQgdG8gb3BlbiB0aGlzIGxpbms/AEJlIGNhcmVmdWwgLSBsaW5rcyBmcm9tIHN0cmFuZ2VycyBtYXkgYmUgd2Vic2l0ZXMgdGhhdAAgaGF2ZSB2aXJ1c2VzLCBvciB0aGluZ3MgeW91IG1heSBub3Qgd2FudCB0byBvcGVuL3NlZS4AWWVzAE5vAG9wZW5pbmcgdXJsIGluIGJyb3dzZXIARG8geW91IHdhbnQgdG8gZG93bmxvYWQgdGhlIHNlcnZlcidzIHRleHR1cmUgcGFjaz8AJmVZb3UgbWlnaHQgYmUgbWlzc2luZyBvdXQuAFRleHR1cmUgcGFjayB1cmw6AFRleHR1cmUgcGFja3MgY2FuIHBsYXkgYSB2aXRhbCByb2xlIGluIHRoZSBsb29rIGFuZCBmZWVsIG9mIG1hcHMuAEknbSBzdXJlAEdvIGJhY2sAQWx3YXlzIHllcwBBbHdheXMgbm8AU3VyZSB5b3UgZG9uJ3Qgd2FudCB0byBkb3dubG9hZCB0aGUgdGV4dHVyZSBwYWNrPwBEb3dubG9hZCBzaXplOiAlZjMgTUIARG93bmxvYWQgc2l6ZTogVW5rbm93bgBEb3dubG9hZCBzaXplOiBEZXRlcm1pbmluZy4uLgBTd2l0Y2ggaG90YmFyAC0tLQBndWktdG91Y2hidXR0b25zAFNwYXduAFNjYWxlOiAAU2Vuc2l0aXZpdHk6IABIb2xkOiBEZWxldGUASG9sZDogTm9uZQBIb2xkOiBQbGFjZQBUYXA6IERlbGV0ZQBUYXA6IE5vbmUAVGFwOiBQbGFjZQBPbi1zY3JlZW4gY29udHJvbHMAZ3VpLXRvdWNoc2NhbGUARm9nAE1haW4gbWVudQBub3N0YWxnaWEtY2xhc3NpY2FybQBob2xkAGJsb2NrAHNraW5uZWRjdWJlAGNvcnBzZQBzaXQAaGVhZABjaGliaQB6b21iaWUAc3BpZGVyAHNrZWxldG9uAHNoZWVwX25vZnVyAHNoZWVwAHBpZwBjcmVlcGVyAGNoaWNrZW4AaHVtYW5vaWQAc2tpbm5lZGN1YmUucG5nAHpvbWJpZS5wbmcAc3BpZGVyLnBuZwBza2VsZXRvbi5wbmcAc2hlZXBfZnVyLnBuZwBzaGVlcC5wbmcAcGlnLnBuZwBjcmVlcGVyLnBuZwBjaGlja2VuLnBuZwBjaGFyLnBuZwBDaGVja01heFZlcnRpY2VzIGZvdW5kIHNtYWxsZXIgYnVmZmVyLCByZXNldHRpbmcgTW9kZWxzLlZiAG9wdGlvbnMtZGVmYXVsdC50eHQAb3B0aW9ucy50eHQAcGFydGljbGVzLnBuZwBjb2xsaXNpb24gc2VhcmNoIHN0YXRlcwBTb21ldGhpbmcgd2VudCB3cm9uZywgZGlkIG92ZXIgMjUsMDAwIGl0ZXJhdGlvbnMgaW4gUGlja2luZ19SYXlUcmFjZSgpAE91dCBvZiBtZW1vcnkhICh3aGVuIGFsbG9jYXRpbmcgJWMpAFN0cmluZyB0b28gbG9uZyB0byBleHBhbmQAL2NsYXNzaWN1YmUAL3N0YXRpYy9kZWZhdWx0LnppcABXZWJUZXN0IQAlYyAnJXMnAEludmFsaWQgcG9ydABGYWlsZWQgdG8gc3RhcnQATWlzc2luZyBJUCBhbmQvb3IgcG9ydCAtIAB3aW5kb3ctd2lkdGgAd2luZG93LWhlaWdodAAlYyAoJXMpAENsYXNzaUN1YmUAc2V0dGluZyBjdXJyZW50IGRpcmVjdG9yeQBTdGFydGluZyBDbGFzc2lDdWJlIDEuMy40IHdlYiAuLgAmY0N1c3RvbSBNb2RlbCAnJXMnIGV4Y2VlZHMgcGFydHMgbGltaXQgb2YgJWkAQ3VzdG9tTW9kZWwgdmVydGljZXMAVGV4IHVybDogJXMAQ1BFIGhvdGtleSBhZGRlZDogJWMsICViOiAlcwBjcGUgZXh0OiAlcywgJWkASGVsZEJsb2NrAE1lc3NhZ2VUeXBlcwBFeHRQbGF5ZXJMaXN0AEJsb2NrUGVybWlzc2lvbnMAUGxheWVyQ2xpY2sARW52TWFwQXBwZWFyYW5jZQBMb25nZXJNZXNzYWdlcwBGdWxsQ1A0MzcAQmxvY2tEZWZpbml0aW9uc0V4dABFeHRFbnRpdHlQb3NpdGlvbnMAVHdvV2F5UGluZwBGYXN0TWFwAEN1c3RvbU1vZGVscwBQbHVnaW5NZXNzYWdlcwBFeHRlbmRlZFRleHR1cmVzAEV4dGVuZGVkQmxvY2tzAEJsb2NrRGVmaW5pdGlvbnMAQ2xpY2tEaXN0YW5jZQBDdXN0b21CbG9ja3MARW1vdGVGaXgAVGV4dEhvdEtleQBFbnZDb2xvcnMAU2VsZWN0aW9uQ3Vib2lkAENoYW5nZU1vZGVsAEVudldlYXRoZXJUeXBlAEhhY2tDb250cm9sAEJ1bGtCbG9ja1VwZGF0ZQBUZXh0Q29sb3JzAEVudk1hcEFzcGVjdABFbnRpdHlQcm9wZXJ0eQBJbnZlbnRvcnlPcmRlcgBJbnN0YW50TU9URABTZXRIb3RiYXIAU2V0U3Bhd25wb2ludABWZWxvY2l0eUNvbnRyb2wAQ3VzdG9tUGFydGljbGVzAEV4dEVudGl0eVRlbGVwb3J0AFNlcnZlciBzb2Z0d2FyZTogJXMARDMgc2VydmVyACZlAF5kZXRhaWwudXNlcgBeZGV0YWlsLnVzZXI9AFBsYXllcnMAbWFwIGxvYWRpbmcgdG9vazogJWkAJmNGYWlsZWQgdG8gbG9hZCBtYXAsIHRyeSBqb2luaW5nIGEgZGlmZmVyZW50IG1hcAAgICAmY0F0dGVtcHRlZCB0byBsb2FkIG1hcCB3aXRob3V0IGEgQmxvY2tzIGFycmF5ACAgICZjQmxvY2tzIGFycmF5IHNpemUgKCVpKSBkb2VzIG5vdCBtYXRjaCB2b2x1bWUgb2YgbWFwICglaSkAL3dvbWlkIFdvTUNsaWVudC0yLjAuNwBOb3QgZW5vdWdoIGZyZWUgbWVtb3J5IHRvIGpvaW4gdGhhdCBtYXAuClRyeSBqb2luaW5nIGEgZGlmZmVyZW50IG1hcC4AU2VydmVyIHNlbnQgY29ycnVwdGVkIG1hcCBkYXRhIChlcnJvciAlaCkAY2ZnPQBodHRwOi8vJXMAZW52aXJvbm1lbnQuY2xvdWQAZW52aXJvbm1lbnQuc2t5AGVudmlyb25tZW50LmZvZwBlbnZpcm9ubWVudC5sZXZlbAB1c2VyLmRldGFpbABab29tIGZvdiAlaSAgAEZseSBPTiAgIABTcGVlZCAlZjF4ICAgAE5vY2xpcCBPTiAgIABQb3NpdGlvbjogADAxMjM0NTY3ODktLCAoKQAlaSBmcHMsIAAlaSBjaHVuayB1cGRhdGVzACVpIGNodW5rcy9zLCAAJWkgdmVydGljZXMALCBwaW5nICVpIG1zAENvbm5lY3RlZCBwbGF5ZXJzOgAlcyAATW9yZQBTZW5kAENhbmNlbABTZWxlY3QgYmxvY2sAIChJRCAlaSZmACwgcGxhY2UgJmNObyZmACwgZGVsZXRlICZjTm8mZgAvAEVudGVyIGNoYXQAJmVSZXRyaWV2aW5nIHRleHR1cmUgcGFjay4uACZlRG93bmxvYWRpbmcgdGV4dHVyZSBwYWNrACZlRG93bmxvYWRpbmcgdGV4dHVyZSBwYWNrICgmNyVpJmUlJSkAR2VuZXJhdGluZy4uAEdlbmVyYXRpbmcgbGV2ZWwAJmNGYWlsZWQgdG8gZ2VuZXJhdGUgdGhlIG1hcC4ATm90IGVub3VnaCBmcmVlIG1lbW9yeSB0byBnZW5lcmF0ZSBhIG1hcCB0aGF0IGxhcmdlLgpUcnkgYSBzbWFsbGVyIHNpemUuAFF1aXQgZ2FtZQBSZWNvbm5lY3QgaW4gJWkAUmVjb25uZWN0AEJhbm5lZCAAS2lja2VkIAAeAB8AQ2hhdABUYWJsaXN0AFJlc3Bhd24AU2V0IHNwYXduAEZseQBOb2NsaXAAU3BlZWQAq1NwZWVkAENhbWVyYQBEZWxldGUAUGljawBQbGFjZQBIb3RiYXIAQ2xhc3NpQ3ViZSAxLjMuNCB3ZWIAQ2xhc3NpQ3ViZSAxLjMuNCB3ZWIgbW9iaWxlAEVycm9yIHJlYWRpbmcgZnJvbSAlczolaTogJWkKAFNraXBwaW5nIGludmFsaWQgSGFja0NvbnRyb2wgYnl0ZSBmcm9tIEQzIHNlcnZlcgBFcnJvciBmcm9tIHNlbmQ6ICVpAFlvdSd2ZSBsb3N0IGNvbm5lY3Rpb24gdG8gdGhlIHNlcnZlcgBEaXNjb25uZWN0ZWQhAFNlcnZlciBzZW50IGludmFsaWQgcGFja2V0ICViISAocHJldiAlYikARGlzY29ubmVjdGVkAEkvTyBlcnJvciB3aGVuIHJlYWRpbmcgcGFja2V0cwAmZUxvc3QgY29ubmVjdGlvbiB0byB0aGUgc2VydmVyAEVycm9yIGNvbm5lY3RpbmcgdG8gJXM6JWk6ICVpCgBGYWlsZWQgdG8gY29ubmVjdCB0byAlczolaQBZb3UgZmFpbGVkIHRvIGNvbm5lY3QgdG8gdGhlIHNlcnZlci4gSXQncyBwcm9iYWJseSBkb3duIQBDb25uZWN0aW5nIHRvICVzOiVpLi4ASW52YWxpZCBJUCBhZGRyZXNzAFNpbmdsZXBsYXllcgBPZmZzZXQgZm9yIHN1YnN0cmluZyBvdXQgb2YgcmFuZ2UATGVuZ3RoIGZvciBzdWJzdHJpbmcgb3V0IG9mIHJhbmdlAFJlc3VsdCBzdWJzdHJpbmcgaXMgb3V0IG9mIHJhbmdlAFN1YiBvZmZzZXQgb3V0IG9mIHJhbmdlAEZhbHNlAFRydWUAT2Zmc2V0IGZvciBJbnNlcnRBdCBvdXQgb2YgcmFuZ2UAQ2Fubm90IGluc2VydCBjaGFyYWN0ZXIgaW50byBmdWxsIHN0cmluZwBPZmZzZXQgZm9yIERlbGV0ZUF0IG91dCBvZiByYW5nZQBJbnZhbGlkIHR5cGUgZm9yIHN0cmluZyBmb3JtYXQAMjE0NzQ4MzY0OAAyMTQ3NDgzNjQ3AFRyaWVkIHRvIGdldCBTdHJpbmcgcGFzdCBTdHJpbmdzQnVmZmVyIGVuZABTdHJpbmcgdG9vIGJpZyB0byBpbnNlcnQgaW50byBTdHJpbmdzQnVmZmVyAFRyaWVkIHRvIHJlbW92ZSBTdHJpbmcgcGFzdCBTdHJpbmdzQnVmZmVyIGVuZABXb3JkV3JhcF9HZXRCYWNrTGVuZ3RoIC0gaW5kZXggcGFzdCBlbmQgb2Ygc3RyaW5nAFdvcmRXcmFwX0dldEZvcndhcmRMZW5ndGggLSBpbmRleCBwYXN0IGVuZCBvZiBzdHJpbmcAZXh0cmFjdGluZwBkZWNvZGluZwAmY1VuYWJsZSB0byB1c2UgdGVycmFpbi5wbmcgZnJvbSB0aGUgdGV4dHVyZSBwYWNrLgAmYyBJdHMgaGVpZ2h0IGlzIGxlc3MgdGhhbiBpdHMgd2lkdGguACZjIEl0IG11c3QgYmUgMTYgb3IgbW9yZSBwaXhlbHMgd2lkZS4ATG9hZGVkIHRlcnJhaW4gYXRsYXM6ICVpIGJtcHMsICVpIHBlciBibXAAdGVycmFpbi5wbmcAb3BlbmluZyBjYWNoZSBmb3IAdGV4dHVyZWNhY2hlAC8lcwB0ZXhwYWNrcy9kZWZhdWx0LnppcABkZWZhdWx0dGV4cGFjawB0ZXhwYWNrcy8lcwB0ZXhwYWNrcwB0ZXh0dXJlY2FjaGUvYWNjZXB0ZWR1cmxzLnR4dAB0ZXh0dXJlY2FjaGUvZGVuaWVkdXJscy50eHQAdGV4dHVyZWNhY2hlL2V0YWdzLnR4dAB0ZXh0dXJlY2FjaGUvbGFzdG1vZGlmaWVkLnR4dAB0cnlpbmcgdG8gZG93bmxvYWQgdGV4dHVyZSBwYWNrACZjNDA0IE5vdCBGb3VuZCBlcnJvciB3aGVuIHRyeWluZyB0byBkb3dubG9hZCB0ZXh0dXJlIHBhY2sAICAmY1RoZSB0ZXh0dXJlIHBhY2sgVVJMIG1heSBiZSBpbmNvcnJlY3Qgb3Igbm8gbG9uZ2VyIGV4aXN0ACZjJWkgTm90IEF1dGhvcmlzZWQgZXJyb3Igd2hlbiB0cnlpbmcgdG8gZG93bmxvYWQgdGV4dHVyZSBwYWNrACAgJmNUaGUgdGV4dHVyZSBwYWNrIFVSTCBtYXkgbm90IGJlIHB1YmxpY2x5IHNoYXJlZAAmYyVpIGVycm9yIHdoZW4gdHJ5aW5nIHRvIGRvd25sb2FkIHRleHR1cmUgcGFjawBjYWNoaW5nAGh0dHA6Ly8AaHR0cHM6Ly8AY3JlYXRpbmcgZGlyZWN0b3J5AGluaXRpbmcgYXJyYXkAcmVzaXppbmcgYXJyYXkAb3BlbmluZwByZWFkaW5nIGZyb20AU2tpcHBpbmcgdmVyeSBsb25nICglaSBjaGFyYWN0ZXJzKSBsaW5lIGluICVjLCBmaWxlIG1heSBiZSBjb3JydXB0ZWQAJXMlciVzAGNyZWF0aW5nAHdyaXRpbmcgdG8AY2xvc2luZwAmNygjMDAwMDAwIC0gI0ZGRkZGRikAJjcoJWkgLSAlaSkAJjcoYW4gaW50ZWdlcikAJjcoJWYyIC0gJWYyKQAmNyhFbnRlciBuYW1lKQAmNyhFbnRlciB0ZXh0KQAuLi4AXwA+IAAmZSVpIG1hdGNoaW5nIG5hbWVzOiAAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eH3+bnJ2epqeoqaqtrq/5+gBPdGhlcgCAgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqgoaKjpKUATGV0dGVycwCwsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/+AExpbmUvQm94AJ+rrODh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j7/P0ATWF0aABDb2xvdXJzACNjYW52YXMAWW91IGhhdmUgdW5zYXZlZCBjaGFuZ2VzLiBBcmUgeW91IHN1cmUgeW91IHdhbnQgdG8gcXVpdD8AY2FudmFzX3dyYXBwZXIAJXMlYwBPUEVOIFNFU0FNRQBXZWJHTCB1bnN1cHBvcnRlZABXZWJHTCBpcyByZXF1aXJlZCB0byBydW4gQ2xhc3NpQ3ViZQBXZWJHTCBjb250ZXh0IGxvc3QAR1BVOiAAU3VubnkAUmFpbnkAU25vd3kAT3V0IG9mIG1lbW9yeQBOb3QgZW5vdWdoIGZyZWUgbWVtb3J5IHRvIGxvYWQgdGhlIG1hcC4KVHJ5IGpvaW5pbmcgYSBkaWZmZXJlbnQgbWFwLg=="; /* no memory initializer */ var tempDoublePtr = 1973168 function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much HEAP8[tempDoublePtr] = HEAP8[ptr]; HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; } function copyTempDouble(ptr) { HEAP8[tempDoublePtr] = HEAP8[ptr]; HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; } // {{PRE_LIBRARY}} function _emscripten_set_main_loop_timing(mode, value) { Browser.mainLoop.timingMode = mode; Browser.mainLoop.timingValue = value; if (!Browser.mainLoop.func) { return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. } if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { var timeUntilNextTick = Math.max(0, Browser.mainLoop.tickStartTime + value - _emscripten_get_now())|0; setTimeout(Browser.mainLoop.runner, timeUntilNextTick); // doing this each time means that on exception, we stop }; Browser.mainLoop.method = 'timeout'; } else if (mode == 1 /*EM_TIMING_RAF*/) { Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { Browser.requestAnimationFrame(Browser.mainLoop.runner); }; Browser.mainLoop.method = 'rAF'; } else if (mode == 2 /*EM_TIMING_SETIMMEDIATE*/) { if (typeof setImmediate === 'undefined') { // Emulate setImmediate. (note: not a complete polyfill, we don't emulate clearImmediate() to keep code size to minimum, since not needed) var setImmediates = []; var emscriptenMainLoopMessageId = 'setimmediate'; var Browser_setImmediate_messageHandler = function(event) { // When called in current thread or Worker, the main loop ID is structured slightly different to accommodate for --proxy-to-worker runtime listening to Worker events, // so check for both cases. if (event.data === emscriptenMainLoopMessageId || event.data.target === emscriptenMainLoopMessageId) { event.stopPropagation(); setImmediates.shift()(); } } addEventListener("message", Browser_setImmediate_messageHandler, true); setImmediate = function Browser_emulated_setImmediate(func) { setImmediates.push(func); if (ENVIRONMENT_IS_WORKER) { if (CCModule['setImmediates'] === undefined) CCModule['setImmediates'] = []; CCModule['setImmediates'].push(func); postMessage({target: emscriptenMainLoopMessageId}); // In --proxy-to-worker, route the message via proxyClient.js } else postMessage(emscriptenMainLoopMessageId, "*"); // On the main thread, can just send the message to itself. } } Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { setImmediate(Browser.mainLoop.runner); }; Browser.mainLoop.method = 'immediate'; } return 0; } function _emscripten_get_now() { abort() }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) { CCModule['noExitRuntime'] = true; assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); Browser.mainLoop.func = func; Browser.mainLoop.arg = arg; var browserIterationFunc; if (typeof arg !== 'undefined') { browserIterationFunc = function() { CCModule['dynCall_vi'](func, arg); }; } else { browserIterationFunc = function() { CCModule['dynCall_v'](func); }; } var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop; Browser.mainLoop.runner = function Browser_mainLoop_runner() { if (ABORT) return; if (Browser.mainLoop.queue.length > 0) { var start = Date.now(); var blocker = Browser.mainLoop.queue.shift(); blocker.func(blocker.arg); if (Browser.mainLoop.remainingBlockers) { var remaining = Browser.mainLoop.remainingBlockers; var next = remaining%1 == 0 ? remaining-1 : Math.floor(remaining); if (blocker.counted) { Browser.mainLoop.remainingBlockers = next; } else { // not counted, but move the progress along a tiny bit next = next + 0.5; // do not steal all the next one's progress Browser.mainLoop.remainingBlockers = (8*remaining + next)/9; } } console.log('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + ' ms'); //, left: ' + Browser.mainLoop.remainingBlockers); Browser.mainLoop.updateStatus(); // catches pause/resume main loop from blocker execution if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; setTimeout(Browser.mainLoop.runner, 0); return; } // catch pauses from non-main loop sources if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; // Implement very basic swap interval control Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0; if (Browser.mainLoop.timingMode == 1/*EM_TIMING_RAF*/ && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) { // Not the scheduled time to render this frame - skip. Browser.mainLoop.scheduler(); return; } else if (Browser.mainLoop.timingMode == 0/*EM_TIMING_SETTIMEOUT*/) { Browser.mainLoop.tickStartTime = _emscripten_get_now(); } // Signal GL rendering layer that processing of a new frame is about to start. This helps it optimize // VBO double-buffering and reduce GPU stalls. if (Browser.mainLoop.method === 'timeout' && CCModule.ctx) { err('Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!'); Browser.mainLoop.method = ''; // just warn once per call to set main loop } Browser.mainLoop.runIter(browserIterationFunc); // catch pauses from the main loop itself if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; // Queue new audio data. This is important to be right after the main loop invocation, so that we will immediately be able // to queue the newest produced audio samples. // TODO: Consider adding pre- and post- rAF callbacks so that GL.newRenderingFrameStarted() and SDL.audio.queueNewAudioData() // do not need to be hardcoded into this function, but can be more generic. if (typeof SDL === 'object' && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData(); Browser.mainLoop.scheduler(); } if (!noSetTiming) { if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) Browser.mainLoop.scheduler(); } if (simulateInfiniteLoop) { throw 'SimulateInfiniteLoop'; } }var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function () { Browser.mainLoop.scheduler = null; Browser.mainLoop.currentlyRunningMainloop++; // Incrementing this signals the previous main loop that it's now become old, and it must return. },resume:function () { Browser.mainLoop.currentlyRunningMainloop++; var timingMode = Browser.mainLoop.timingMode; var timingValue = Browser.mainLoop.timingValue; var func = Browser.mainLoop.func; Browser.mainLoop.func = null; _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */); _emscripten_set_main_loop_timing(timingMode, timingValue); Browser.mainLoop.scheduler(); },updateStatus:function () { if (CCModule['setStatus']) { var message = CCModule['statusMessage'] || 'Please wait...'; var remaining = Browser.mainLoop.remainingBlockers; var expected = Browser.mainLoop.expectedBlockers; if (remaining) { if (remaining < expected) { CCModule['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')'); } else { CCModule['setStatus'](message); } } else { CCModule['setStatus'](''); } } },runIter:function (func) { if (ABORT) return; if (CCModule['preMainLoop']) { var preRet = CCModule['preMainLoop'](); if (preRet === false) { return; // |return false| skips a frame } } try { func(); } catch (e) { if (e instanceof ExitStatus) { return; } else { if (e && typeof e === 'object' && e.stack) err('exception thrown: ' + [e, e.stack]); throw e; } } if (CCModule['postMainLoop']) CCModule['postMainLoop'](); }},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function () { if (!CCModule["preloadPlugins"]) CCModule["preloadPlugins"] = []; // needs to exist even in workers if (Browser.initted) return; Browser.initted = true; try { new Blob(); Browser.hasBlobConstructor = true; } catch(e) { Browser.hasBlobConstructor = false; console.log("warning: no blob constructor, cannot create blobs with mimetypes"); } Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null)); Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : undefined; if (!CCModule.noImageDecoding && typeof Browser.URLObject === 'undefined') { console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."); CCModule.noImageDecoding = true; } // Support for plugins that can process preloaded files. You can add more of these to // your app by creating and appending to CCModule.preloadPlugins. // // Each plugin is asked if it can handle a file based on the file's name. If it can, // it is given the file's raw data. When it is done, it calls a callback with the file's // (possibly modified) data. For example, a plugin might decompress a file, or it // might create some side data structure for use later (like an Image element, etc.). var imagePlugin = {}; imagePlugin['canHandle'] = function imagePlugin_canHandle(name) { return !CCModule.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name); }; imagePlugin['handle'] = function imagePlugin_handle(byteArray, name, onload, onerror) { var b = null; if (Browser.hasBlobConstructor) { try { b = new Blob([byteArray], { type: Browser.getMimetype(name) }); if (b.size !== byteArray.length) { // Safari bug #118630 // Safari's Blob can only take an ArrayBuffer b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) }); } } catch(e) { warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder'); } } if (!b) { var bb = new Browser.BlobBuilder(); bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range b = bb.getBlob(); } var url = Browser.URLObject.createObjectURL(b); var img = new Image(); img.onload = function img_onload() { assert(img.complete, 'Image ' + name + ' could not be decoded'); var canvas = document.createElement('canvas'); canvas.width = img.width; canvas.height = img.height; var ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0); CCModule["preloadedImages"][name] = canvas; Browser.URLObject.revokeObjectURL(url); if (onload) onload(byteArray); }; img.onerror = function img_onerror(event) { console.log('Image ' + url + ' could not be decoded'); if (onerror) onerror(); }; img.src = url; }; CCModule['preloadPlugins'].push(imagePlugin); var audioPlugin = {}; audioPlugin['canHandle'] = function audioPlugin_canHandle(name) { return !CCModule.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 }; }; audioPlugin['handle'] = function audioPlugin_handle(byteArray, name, onload, onerror) { var done = false; function finish(audio) { if (done) return; done = true; CCModule["preloadedAudios"][name] = audio; if (onload) onload(byteArray); } function fail() { if (done) return; done = true; CCModule["preloadedAudios"][name] = new Audio(); // empty shim if (onerror) onerror(); } if (Browser.hasBlobConstructor) { try { var b = new Blob([byteArray], { type: Browser.getMimetype(name) }); } catch(e) { return fail(); } var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this! var audio = new Audio(); audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926 audio.onerror = function audio_onerror(event) { if (done) return; console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach'); function encode64(data) { var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var PAD = '='; var ret = ''; var leftchar = 0; var leftbits = 0; for (var i = 0; i < data.length; i++) { leftchar = (leftchar << 8) | data[i]; leftbits += 8; while (leftbits >= 6) { var curr = (leftchar >> (leftbits-6)) & 0x3f; leftbits -= 6; ret += BASE[curr]; } } if (leftbits == 2) { ret += BASE[(leftchar&3) << 4]; ret += PAD + PAD; } else if (leftbits == 4) { ret += BASE[(leftchar&0xf) << 2]; ret += PAD; } return ret; } audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray); finish(audio); // we don't wait for confirmation this worked - but it's worth trying }; audio.src = url; // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror Browser.safeSetTimeout(function() { finish(audio); // try to use it even though it is not necessarily ready to play }, 10000); } else { return fail(); } }; CCModule['preloadPlugins'].push(audioPlugin); // Canvas event setup function pointerLockChange() { Browser.pointerLock = document['pointerLockElement'] === CCModule['canvas'] || document['mozPointerLockElement'] === CCModule['canvas'] || document['webkitPointerLockElement'] === CCModule['canvas'] || document['msPointerLockElement'] === CCModule['canvas']; } var canvas = CCModule['canvas']; if (canvas) { // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on CCModule // CCModule['forcedAspectRatio'] = 4 / 3; canvas.requestPointerLock = canvas['requestPointerLock'] || canvas['mozRequestPointerLock'] || canvas['webkitRequestPointerLock'] || canvas['msRequestPointerLock'] || function(){}; canvas.exitPointerLock = document['exitPointerLock'] || document['mozExitPointerLock'] || document['webkitExitPointerLock'] || document['msExitPointerLock'] || function(){}; // no-op if function does not exist canvas.exitPointerLock = canvas.exitPointerLock.bind(document); document.addEventListener('pointerlockchange', pointerLockChange, false); document.addEventListener('mozpointerlockchange', pointerLockChange, false); document.addEventListener('webkitpointerlockchange', pointerLockChange, false); document.addEventListener('mspointerlockchange', pointerLockChange, false); if (CCModule['elementPointerLock']) { canvas.addEventListener("click", function(ev) { if (!Browser.pointerLock && CCModule['canvas'].requestPointerLock) { CCModule['canvas'].requestPointerLock(); ev.preventDefault(); } }, false); } } },createContext:function (canvas, useWebGL, setInCCModule, webGLContextAttributes) { if (useWebGL && CCModule.ctx && canvas == CCModule.canvas) return CCModule.ctx; // no need to recreate GL context if it's already been created for this canvas. var ctx; var contextHandle; if (useWebGL) { // For GLES2/desktop GL compatibility, adjust a few defaults to be different to WebGL defaults, so that they align better with the desktop defaults. var contextAttributes = { antialias: false, alpha: false, majorVersion: 1, }; if (webGLContextAttributes) { for (var attribute in webGLContextAttributes) { contextAttributes[attribute] = webGLContextAttributes[attribute]; } } // This check of existence of GL is here to satisfy Closure compiler, which yells if variable GL is referenced below but GL object is not // actually compiled in because application is not doing any GL operations. TODO: Ideally if GL is not being used, this function // Browser.createContext() should not even be emitted. if (typeof GL !== 'undefined') { contextHandle = GL.createContext(canvas, contextAttributes); if (contextHandle) { ctx = GL.getContext(contextHandle).GLctx; } } } else { ctx = canvas.getContext('2d'); } if (!ctx) return null; if (setInCCModule) { if (!useWebGL) assert(typeof GLctx === 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it'); CCModule.ctx = ctx; if (useWebGL) GL.makeContextCurrent(contextHandle); CCModule.useWebGL = useWebGL; Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() }); Browser.init(); } return ctx; },destroyContext:function (canvas, useWebGL, setInCCModule) {},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function (lockPointer, resizeCanvas, vrDevice) { Browser.lockPointer = lockPointer; Browser.resizeCanvas = resizeCanvas; Browser.vrDevice = vrDevice; if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; if (typeof Browser.vrDevice === 'undefined') Browser.vrDevice = null; var canvas = CCModule['canvas']; function fullscreenChange() { Browser.isFullscreen = false; var canvasContainer = canvas.parentNode; if ((document['fullscreenElement'] || document['mozFullScreenElement'] || document['msFullscreenElement'] || document['webkitFullscreenElement'] || document['webkitCurrentFullScreenElement']) === canvasContainer) { canvas.exitFullscreen = Browser.exitFullscreen; if (Browser.lockPointer) canvas.requestPointerLock(); Browser.isFullscreen = true; if (Browser.resizeCanvas) { Browser.setFullscreenCanvasSize(); } else { Browser.updateCanvasDimensions(canvas); } } else { // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen canvasContainer.parentNode.insertBefore(canvas, canvasContainer); canvasContainer.parentNode.removeChild(canvasContainer); if (Browser.resizeCanvas) { Browser.setWindowedCanvasSize(); } else { Browser.updateCanvasDimensions(canvas); } } if (CCModule['onFullScreen']) CCModule['onFullScreen'](Browser.isFullscreen); if (CCModule['onFullscreen']) CCModule['onFullscreen'](Browser.isFullscreen); } if (!Browser.fullscreenHandlersInstalled) { Browser.fullscreenHandlersInstalled = true; document.addEventListener('fullscreenchange', fullscreenChange, false); document.addEventListener('mozfullscreenchange', fullscreenChange, false); document.addEventListener('webkitfullscreenchange', fullscreenChange, false); document.addEventListener('MSFullscreenChange', fullscreenChange, false); } // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root var canvasContainer = document.createElement("div"); canvas.parentNode.insertBefore(canvasContainer, canvas); canvasContainer.appendChild(canvas); // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) canvasContainer.requestFullscreen = canvasContainer['requestFullscreen'] || canvasContainer['mozRequestFullScreen'] || canvasContainer['msRequestFullscreen'] || (canvasContainer['webkitRequestFullscreen'] ? function() { canvasContainer['webkitRequestFullscreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null) || (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); if (vrDevice) { canvasContainer.requestFullscreen({ vrDisplay: vrDevice }); } else { canvasContainer.requestFullscreen(); } },requestFullScreen:function (lockPointer, resizeCanvas, vrDevice) { err('Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.'); Browser.requestFullScreen = function(lockPointer, resizeCanvas, vrDevice) { return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice); } return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice); },exitFullscreen:function () { // This is workaround for chrome. Trying to exit from fullscreen // not in fullscreen state will cause "TypeError: Document not active" // in chrome. See https://github.com/emscripten-core/emscripten/pull/8236 if (!Browser.isFullscreen) { return false; } var CFS = document['exitFullscreen'] || document['cancelFullScreen'] || document['mozCancelFullScreen'] || document['msExitFullscreen'] || document['webkitCancelFullScreen'] || (function() {}); CFS.apply(document, []); return true; },nextRAF:0,fakeRequestAnimationFrame:function (func) { // try to keep 60fps between calls to here var now = Date.now(); if (Browser.nextRAF === 0) { Browser.nextRAF = now + 1000/60; } else { while (now + 2 >= Browser.nextRAF) { // fudge a little, to avoid timer jitter causing us to do lots of delay:0 Browser.nextRAF += 1000/60; } } var delay = Math.max(Browser.nextRAF - now, 0); setTimeout(func, delay); },requestAnimationFrame:function requestAnimationFrame(func) { if (typeof window === 'undefined') { // Provide fallback to setTimeout if window is undefined (e.g. in Node.js) Browser.fakeRequestAnimationFrame(func); } else { if (!window.requestAnimationFrame) { window.requestAnimationFrame = window['requestAnimationFrame'] || window['mozRequestAnimationFrame'] || window['webkitRequestAnimationFrame'] || window['msRequestAnimationFrame'] || window['oRequestAnimationFrame'] || Browser.fakeRequestAnimationFrame; } window.requestAnimationFrame(func); } },safeCallback:function (func) { return function() { if (!ABORT) return func.apply(null, arguments); }; },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function () { Browser.allowAsyncCallbacks = false; },resumeAsyncCallbacks:function () { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now Browser.allowAsyncCallbacks = true; if (Browser.queuedAsyncCallbacks.length > 0) { var callbacks = Browser.queuedAsyncCallbacks; Browser.queuedAsyncCallbacks = []; callbacks.forEach(function(func) { func(); }); } },safeRequestAnimationFrame:function (func) { return Browser.requestAnimationFrame(function() { if (ABORT) return; if (Browser.allowAsyncCallbacks) { func(); } else { Browser.queuedAsyncCallbacks.push(func); } }); },safeSetTimeout:function (func, timeout) { CCModule['noExitRuntime'] = true; return setTimeout(function() { if (ABORT) return; if (Browser.allowAsyncCallbacks) { func(); } else { Browser.queuedAsyncCallbacks.push(func); } }, timeout); },safeSetInterval:function (func, timeout) { CCModule['noExitRuntime'] = true; return setInterval(function() { if (ABORT) return; if (Browser.allowAsyncCallbacks) { func(); } // drop it on the floor otherwise, next interval will kick in }, timeout); },getMimetype:function (name) { return { 'jpg': 'image/jpeg', 'jpeg': 'image/jpeg', 'png': 'image/png', 'bmp': 'image/bmp', 'ogg': 'audio/ogg', 'wav': 'audio/wav', 'mp3': 'audio/mpeg' }[name.substr(name.lastIndexOf('.')+1)]; },getUserMedia:function (func) { if(!window.getUserMedia) { window.getUserMedia = navigator['getUserMedia'] || navigator['mozGetUserMedia']; } window.getUserMedia(func); },getMovementX:function (event) { return event['movementX'] || event['mozMovementX'] || event['webkitMovementX'] || 0; },getMovementY:function (event) { return event['movementY'] || event['mozMovementY'] || event['webkitMovementY'] || 0; },getMouseWheelDelta:function (event) { var delta = 0; switch (event.type) { case 'DOMMouseScroll': // 3 lines make up a step delta = event.detail / 3; break; case 'mousewheel': // 120 units make up a step delta = event.wheelDelta / 120; break; case 'wheel': delta = event.deltaY switch(event.deltaMode) { case 0: // DOM_DELTA_PIXEL: 100 pixels make up a step delta /= 100; break; case 1: // DOM_DELTA_LINE: 3 lines make up a step delta /= 3; break; case 2: // DOM_DELTA_PAGE: A page makes up 80 steps delta *= 80; break; default: throw 'unrecognized mouse wheel delta mode: ' + event.deltaMode; } break; default: throw 'unrecognized mouse wheel event: ' + event.type; } return delta; },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function (event) { // event should be mousemove, mousedown or mouseup if (Browser.pointerLock) { // When the pointer is locked, calculate the coordinates // based on the movement of the mouse. // Workaround for Firefox bug 764498 if (event.type != 'mousemove' && ('mozMovementX' in event)) { Browser.mouseMovementX = Browser.mouseMovementY = 0; } else { Browser.mouseMovementX = Browser.getMovementX(event); Browser.mouseMovementY = Browser.getMovementY(event); } // check if SDL is available if (typeof SDL != "undefined") { Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; Browser.mouseY = SDL.mouseY + Browser.mouseMovementY; } else { // just add the mouse delta to the current absolut mouse position // FIXME: ideally this should be clamped against the canvas size and zero Browser.mouseX += Browser.mouseMovementX; Browser.mouseY += Browser.mouseMovementY; } } else { // Otherwise, calculate the movement based on the changes // in the coordinates. var rect = CCModule["canvas"].getBoundingClientRect(); var cw = CCModule["canvas"].width; var ch = CCModule["canvas"].height; // Neither .scrollX or .pageXOffset are defined in a spec, but // we prefer .scrollX because it is currently in a spec draft. // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/) var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset); var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset); if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchmove') { var touch = event.touch; if (touch === undefined) { return; // the "touch" property is only defined in SDL } var adjustedX = touch.pageX - (scrollX + rect.left); var adjustedY = touch.pageY - (scrollY + rect.top); adjustedX = adjustedX * (cw / rect.width); adjustedY = adjustedY * (ch / rect.height); var coords = { x: adjustedX, y: adjustedY }; if (event.type === 'touchstart') { Browser.lastTouches[touch.identifier] = coords; Browser.touches[touch.identifier] = coords; } else if (event.type === 'touchend' || event.type === 'touchmove') { var last = Browser.touches[touch.identifier]; if (!last) last = coords; Browser.lastTouches[touch.identifier] = last; Browser.touches[touch.identifier] = coords; } return; } var x = event.pageX - (scrollX + rect.left); var y = event.pageY - (scrollY + rect.top); // the canvas might be CSS-scaled compared to its backbuffer; // SDL-using content will want mouse coordinates in terms // of backbuffer units. x = x * (cw / rect.width); y = y * (ch / rect.height); Browser.mouseMovementX = x - Browser.mouseX; Browser.mouseMovementY = y - Browser.mouseY; Browser.mouseX = x; Browser.mouseY = y; } },asyncLoad:function (url, onload, onerror, noRunDep) { var dep = !noRunDep ? getUniqueRunDependency('al ' + url) : ''; CCModule['readAsync'](url, function(arrayBuffer) { assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); onload(new Uint8Array(arrayBuffer)); if (dep) removeRunDependency(dep); }, function(event) { if (onerror) { onerror(); } else { throw 'Loading data file "' + url + '" failed.'; } }); if (dep) addRunDependency(dep); },resizeListeners:[],updateResizeListeners:function () { // var canvas = CCModule['canvas']; // Browser.resizeListeners.forEach(function(listener) { // listener(canvas.width, canvas.height); // }); },setCanvasSize:function (width, height, noUpdates) { var canvas = CCModule['canvas']; Browser.updateCanvasDimensions(canvas, width, height); // if (!noUpdates) Browser.updateResizeListeners(); },windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function () { // check if SDL is available if (typeof SDL != "undefined") { var flags = HEAPU32[((SDL.screen)>>2)]; flags = flags | 0x00800000; // set SDL_FULLSCREEN flag HEAP32[((SDL.screen)>>2)]=flags } Browser.updateCanvasDimensions(CCModule['canvas']); // Browser.updateResizeListeners(); },setWindowedCanvasSize:function () { // check if SDL is available if (typeof SDL != "undefined") { var flags = HEAPU32[((SDL.screen)>>2)]; flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag HEAP32[((SDL.screen)>>2)]=flags } Browser.updateCanvasDimensions(CCModule['canvas']); Browser.updateResizeListeners(); },updateCanvasDimensions:function (canvas, wNative, hNative) { if (wNative && hNative) { canvas.widthNative = wNative; canvas.heightNative = hNative; } else { wNative = canvas.widthNative; hNative = canvas.heightNative; } var w = wNative; var h = hNative; if (CCModule['forcedAspectRatio'] && CCModule['forcedAspectRatio'] > 0) { if (w/h < CCModule['forcedAspectRatio']) { w = Math.round(h * CCModule['forcedAspectRatio']); } else { h = Math.round(w / CCModule['forcedAspectRatio']); } } if (((document['fullscreenElement'] || document['mozFullScreenElement'] || document['msFullscreenElement'] || document['webkitFullscreenElement'] || document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) { var factor = Math.min(screen.width / w, screen.height / h); w = Math.round(w * factor); h = Math.round(h * factor); } if (Browser.resizeCanvas) { if (canvas.width != w) canvas.width = w; if (canvas.height != h) canvas.height = h; if (typeof canvas.style != 'undefined') { canvas.style.removeProperty( "width"); canvas.style.removeProperty("height"); } } else { if (canvas.width != wNative) canvas.width = wNative; if (canvas.height != hNative) canvas.height = hNative; if (typeof canvas.style != 'undefined') { if (w != wNative || h != hNative) { canvas.style.setProperty( "width", w + "px", "important"); canvas.style.setProperty("height", h + "px", "important"); } else { canvas.style.removeProperty( "width"); canvas.style.removeProperty("height"); } } } },wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function () { var handle = Browser.nextWgetRequestHandle; Browser.nextWgetRequestHandle++; return handle; }};function _emscripten_cancel_main_loop() { Browser.mainLoop.pause(); Browser.mainLoop.func = null; } var JSEvents={keyEvent:0,mouseEvent:0,wheelEvent:0,uiEvent:0,focusEvent:0,deviceOrientationEvent:0,deviceMotionEvent:0,fullscreenChangeEvent:0,pointerlockChangeEvent:0,visibilityChangeEvent:0,touchEvent:0,previousFullscreenElement:null,previousScreenX:null,previousScreenY:null,removeEventListenersRegistered:false,removeAllEventListeners:function () { for(var i = JSEvents.eventHandlers.length-1; i >= 0; --i) { JSEvents._removeHandler(i); } JSEvents.eventHandlers = []; JSEvents.deferredCalls = []; },registerRemoveEventListeners:function () { if (!JSEvents.removeEventListenersRegistered) { __ATEXIT__.push(JSEvents.removeAllEventListeners); JSEvents.removeEventListenersRegistered = true; } },deferredCalls:[],deferCall:function (targetFunction, precedence, argsList) { function arraysHaveEqualContent(arrA, arrB) { if (arrA.length != arrB.length) return false; for(var i in arrA) { if (arrA[i] != arrB[i]) return false; } return true; } // Test if the given call was already queued, and if so, don't add it again. for(var i in JSEvents.deferredCalls) { var call = JSEvents.deferredCalls[i]; if (call.targetFunction == targetFunction && arraysHaveEqualContent(call.argsList, argsList)) { return; } } JSEvents.deferredCalls.push({ targetFunction: targetFunction, precedence: precedence, argsList: argsList }); JSEvents.deferredCalls.sort(function(x,y) { return x.precedence < y.precedence; }); },removeDeferredCalls:function (targetFunction) { for(var i = 0; i < JSEvents.deferredCalls.length; ++i) { if (JSEvents.deferredCalls[i].targetFunction == targetFunction) { JSEvents.deferredCalls.splice(i, 1); --i; } } },canPerformEventHandlerRequests:function () { return JSEvents.inEventHandler && JSEvents.currentEventHandler.allowsDeferredCalls; },runDeferredCalls:function () { if (!JSEvents.canPerformEventHandlerRequests()) { return; } for(var i = 0; i < JSEvents.deferredCalls.length; ++i) { var call = JSEvents.deferredCalls[i]; JSEvents.deferredCalls.splice(i, 1); --i; call.targetFunction.apply(this, call.argsList); } },inEventHandler:0,currentEventHandler:null,eventHandlers:[],isInternetExplorer:function () { return navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0; },removeAllHandlersOnTarget:function (target, eventTypeString) { for(var i = 0; i < JSEvents.eventHandlers.length; ++i) { if (JSEvents.eventHandlers[i].target == target && (!eventTypeString || eventTypeString == JSEvents.eventHandlers[i].eventTypeString)) { JSEvents._removeHandler(i--); } } },_removeHandler:function (i) { var h = JSEvents.eventHandlers[i]; h.target.removeEventListener(h.eventTypeString, h.eventListenerFunc, h.useCapture); JSEvents.eventHandlers.splice(i, 1); },registerOrRemoveHandler:function (eventHandler) { var jsEventHandler = function jsEventHandler(event) { // Increment nesting count for the event handler. ++JSEvents.inEventHandler; JSEvents.currentEventHandler = eventHandler; // Process any old deferred calls the user has placed. JSEvents.runDeferredCalls(); // Process the actual event, calls back to user C code handler. eventHandler.handlerFunc(event); // Process any new deferred calls that were placed right now from this event handler. JSEvents.runDeferredCalls(); // Out of event handler - restore nesting count. --JSEvents.inEventHandler; } if (eventHandler.callbackfunc) { eventHandler.eventListenerFunc = jsEventHandler; eventHandler.target.addEventListener(eventHandler.eventTypeString, jsEventHandler, { useCapture: eventHandler.useCapture, passive: false }); JSEvents.eventHandlers.push(eventHandler); JSEvents.registerRemoveEventListeners(); } else { for(var i = 0; i < JSEvents.eventHandlers.length; ++i) { if (JSEvents.eventHandlers[i].target == eventHandler.target && JSEvents.eventHandlers[i].eventTypeString == eventHandler.eventTypeString) { JSEvents._removeHandler(i--); } } } },getBoundingClientRectOrZeros:function (target) { return target.getBoundingClientRect ? target.getBoundingClientRect() : { left: 0, top: 0 }; },pageScrollPos:function () { if (window.pageXOffset > 0 || window.pageYOffset > 0) { return [window.pageXOffset, window.pageYOffset]; } if (typeof document.documentElement.scrollLeft !== 'undefined' || typeof document.documentElement.scrollTop !== 'undefined') { return [document.documentElement.scrollLeft, document.documentElement.scrollTop]; } return [document.body.scrollLeft|0, document.body.scrollTop|0]; },getNodeNameForTarget:function (target) { if (!target) return ''; if (target == window) return '#window'; if (target == screen) return '#screen'; return (target && target.nodeName) ? target.nodeName : ''; },tick:function () { if (window['performance'] && window['performance']['now']) return window['performance']['now'](); else return Date.now(); },fullscreenEnabled:function () { return document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled || document.msFullscreenEnabled; }}; var __currentFullscreenStrategy={}; var __specialEventTargets=[0, document, window];function __findEventTarget(target) { try { // The sensible "default" target varies between events, but use window as the default // since DOM events mostly can default to that. Specific callback registrations // override their own defaults. if (!target) return window; if (typeof target === "number") target = __specialEventTargets[target] || UTF8ToString(target); if (target === '#window') return window; else if (target === '#document') return document; else if (target === '#screen') return screen; else if (target === '#canvas') return CCModule['canvas']; return (typeof target === 'string') ? document.getElementById(target) : target; } catch(e) { // In Web Workers, some objects above, such as '#document' do not exist. Gracefully // return null for them. return null; } }function __findCanvasEventTarget(target) { if (typeof target === 'number') target = UTF8ToString(target); if (!target || target === '#canvas') { if (typeof GL !== 'undefined' && GL.offscreenCanvases['canvas']) return GL.offscreenCanvases['canvas']; // TODO: Remove this line, target '#canvas' should refer only to CCModule['canvas'], not to GL.offscreenCanvases['canvas'] - but need stricter tests to be able to remove this line. return CCModule['canvas']; } if (typeof GL !== 'undefined' && GL.offscreenCanvases[target]) return GL.offscreenCanvases[target]; return __findEventTarget(target); }function _emscripten_get_canvas_element_size(target, width, height) { var canvas = __findCanvasEventTarget(target); if (!canvas) return -4; HEAP32[((width)>>2)]=canvas.width; HEAP32[((height)>>2)]=canvas.height; }function __get_canvas_element_size(target) { var stackTop = stackSave(); var w = stackAlloc(8); var h = w + 4; var targetInt = stackAlloc(target.id.length+1); stringToUTF8(target.id, targetInt, target.id.length+1); var ret = _emscripten_get_canvas_element_size(targetInt, w, h); var size = [HEAP32[((w)>>2)], HEAP32[((h)>>2)]]; stackRestore(stackTop); return size; } function _emscripten_set_canvas_element_size(target, width, height) { var canvas = __findCanvasEventTarget(target); if (!canvas) return -4; canvas.width = width; canvas.height = height; return 0; }function __set_canvas_element_size(target, width, height) { if (!target.controlTransferredOffscreen) { target.width = width; target.height = height; } else { // This function is being called from high-level JavaScript code instead of asm.js/Wasm, // and it needs to synchronously proxy over to another thread, so marshal the string onto the heap to do the call. var stackTop = stackSave(); var targetInt = stackAlloc(target.id.length+1); stringToUTF8(target.id, targetInt, target.id.length+1); _emscripten_set_canvas_element_size(targetInt, width, height); stackRestore(stackTop); } }function __registerRestoreOldStyle(canvas) { var canvasSize = __get_canvas_element_size(canvas); var oldWidth = canvasSize[0]; var oldHeight = canvasSize[1]; var oldCssWidth = canvas.style.width; var oldCssHeight = canvas.style.height; var oldBackgroundColor = canvas.style.backgroundColor; // Chrome reads color from here. var oldDocumentBackgroundColor = document.body.style.backgroundColor; // IE11 reads color from here. // Firefox always has black background color. var oldPaddingLeft = canvas.style.paddingLeft; // Chrome, FF, Safari var oldPaddingRight = canvas.style.paddingRight; var oldPaddingTop = canvas.style.paddingTop; var oldPaddingBottom = canvas.style.paddingBottom; var oldMarginLeft = canvas.style.marginLeft; // IE11 var oldMarginRight = canvas.style.marginRight; var oldMarginTop = canvas.style.marginTop; var oldMarginBottom = canvas.style.marginBottom; var oldDocumentBodyMargin = document.body.style.margin; var oldDocumentOverflow = document.documentElement.style.overflow; // Chrome, Firefox var oldDocumentScroll = document.body.scroll; // IE var oldImageRendering = canvas.style.imageRendering; function restoreOldStyle() { var fullscreenElement = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; if (!fullscreenElement) { document.removeEventListener('fullscreenchange', restoreOldStyle); document.removeEventListener('mozfullscreenchange', restoreOldStyle); document.removeEventListener('webkitfullscreenchange', restoreOldStyle); document.removeEventListener('MSFullscreenChange', restoreOldStyle); __set_canvas_element_size(canvas, oldWidth, oldHeight); canvas.style.width = oldCssWidth; canvas.style.height = oldCssHeight; canvas.style.backgroundColor = oldBackgroundColor; // Chrome // IE11 hack: assigning 'undefined' or an empty string to document.body.style.backgroundColor has no effect, so first assign back the default color // before setting the undefined value. Setting undefined value is also important, or otherwise we would later treat that as something that the user // had explicitly set so subsequent fullscreen transitions would not set background color properly. if (!oldDocumentBackgroundColor) document.body.style.backgroundColor = 'white'; document.body.style.backgroundColor = oldDocumentBackgroundColor; // IE11 canvas.style.paddingLeft = oldPaddingLeft; // Chrome, FF, Safari canvas.style.paddingRight = oldPaddingRight; canvas.style.paddingTop = oldPaddingTop; canvas.style.paddingBottom = oldPaddingBottom; canvas.style.marginLeft = oldMarginLeft; // IE11 canvas.style.marginRight = oldMarginRight; canvas.style.marginTop = oldMarginTop; canvas.style.marginBottom = oldMarginBottom; document.body.style.margin = oldDocumentBodyMargin; document.documentElement.style.overflow = oldDocumentOverflow; // Chrome, Firefox document.body.scroll = oldDocumentScroll; // IE canvas.style.imageRendering = oldImageRendering; if (canvas.GLctxObject) canvas.GLctxObject.GLctx.viewport(0, 0, oldWidth, oldHeight); if (__currentFullscreenStrategy.canvasResizedCallback) { dynCall_iiii(__currentFullscreenStrategy.canvasResizedCallback, 37, 0, __currentFullscreenStrategy.canvasResizedCallbackUserData); } } } document.addEventListener('fullscreenchange', restoreOldStyle); document.addEventListener('mozfullscreenchange', restoreOldStyle); document.addEventListener('webkitfullscreenchange', restoreOldStyle); document.addEventListener('MSFullscreenChange', restoreOldStyle); return restoreOldStyle; } function __setLetterbox(element, topBottom, leftRight) { if (JSEvents.isInternetExplorer()) { // Cannot use padding on IE11, because IE11 computes padding in addition to the size, unlike // other browsers, which treat padding to be part of the size. // e.g. // FF, Chrome: If CSS size = 1920x1080, padding-leftright = 460, padding-topbottomx40, then content size = (1920 - 2*460) x (1080-2*40) = 1000x1000px, and total element size = 1920x1080px. // IE11: If CSS size = 1920x1080, padding-leftright = 460, padding-topbottomx40, then content size = 1920x1080px and total element size = (1920+2*460) x (1080+2*40)px. // IE11 treats margin like Chrome and FF treat padding. element.style.marginLeft = element.style.marginRight = leftRight + 'px'; element.style.marginTop = element.style.marginBottom = topBottom + 'px'; } else { // Cannot use margin to specify letterboxes in FF or Chrome, since those ignore margins in fullscreen mode. element.style.paddingLeft = element.style.paddingRight = leftRight + 'px'; element.style.paddingTop = element.style.paddingBottom = topBottom + 'px'; } }function _JSEvents_resizeCanvasForFullscreen(target, strategy) { var restoreOldStyle = __registerRestoreOldStyle(target); var cssWidth = strategy.softFullscreen ? window.innerWidth : screen.width; var cssHeight = strategy.softFullscreen ? window.innerHeight : screen.height; var rect = target.getBoundingClientRect(); var windowedCssWidth = rect.right - rect.left; var windowedCssHeight = rect.bottom - rect.top; var canvasSize = __get_canvas_element_size(target); var windowedRttWidth = canvasSize[0]; var windowedRttHeight = canvasSize[1]; if (strategy.scaleMode == 3) { __setLetterbox(target, (cssHeight - windowedCssHeight) / 2, (cssWidth - windowedCssWidth) / 2); cssWidth = windowedCssWidth; cssHeight = windowedCssHeight; } else if (strategy.scaleMode == 2) { if (cssWidth*windowedRttHeight < windowedRttWidth*cssHeight) { var desiredCssHeight = windowedRttHeight * cssWidth / windowedRttWidth; __setLetterbox(target, (cssHeight - desiredCssHeight) / 2, 0); cssHeight = desiredCssHeight; } else { var desiredCssWidth = windowedRttWidth * cssHeight / windowedRttHeight; __setLetterbox(target, 0, (cssWidth - desiredCssWidth) / 2); cssWidth = desiredCssWidth; } } // If we are adding padding, must choose a background color or otherwise Chrome will give the // padding a default white color. Do it only if user has not customized their own background color. if (!target.style.backgroundColor) target.style.backgroundColor = 'black'; // IE11 does the same, but requires the color to be set in the document body. if (!document.body.style.backgroundColor) document.body.style.backgroundColor = 'black'; // IE11 // Firefox always shows black letterboxes independent of style color. target.style.width = cssWidth + 'px'; target.style.height = cssHeight + 'px'; if (strategy.filteringMode == 1) { target.style.imageRendering = 'optimizeSpeed'; target.style.imageRendering = '-moz-crisp-edges'; target.style.imageRendering = '-o-crisp-edges'; target.style.imageRendering = '-webkit-optimize-contrast'; target.style.imageRendering = 'optimize-contrast'; target.style.imageRendering = 'crisp-edges'; target.style.imageRendering = 'pixelated'; } var dpiScale = (strategy.canvasResolutionScaleMode == 2) ? window.devicePixelRatio : 1; if (strategy.canvasResolutionScaleMode != 0) { var newWidth = (cssWidth * dpiScale)|0; var newHeight = (cssHeight * dpiScale)|0; __set_canvas_element_size(target, newWidth, newHeight); if (target.GLctxObject) target.GLctxObject.GLctx.viewport(0, 0, newWidth, newHeight); } return restoreOldStyle; }function _JSEvents_requestFullscreen(target, strategy) { // EMSCRIPTEN_FULLSCREEN_SCALE_DEFAULT + EMSCRIPTEN_FULLSCREEN_CANVAS_SCALE_NONE is a mode where no extra logic is performed to the DOM elements. if (strategy.scaleMode != 0 || strategy.canvasResolutionScaleMode != 0) { _JSEvents_resizeCanvasForFullscreen(target, strategy); } if (target.requestFullscreen) { target.requestFullscreen(); } else if (target.msRequestFullscreen) { target.msRequestFullscreen(); } else if (target.mozRequestFullScreen) { target.mozRequestFullScreen(); } else if (target.mozRequestFullscreen) { target.mozRequestFullscreen(); } else if (target.webkitRequestFullscreen) { target.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); } else { if (typeof JSEvents.fullscreenEnabled() === 'undefined') { return -1; } else { return -3; } } if (strategy.canvasResizedCallback) { dynCall_iiii(strategy.canvasResizedCallback, 37, 0, strategy.canvasResizedCallbackUserData); } return 0; }function _emscripten_exit_fullscreen() { if (typeof JSEvents.fullscreenEnabled() === 'undefined') return -1; // Make sure no queued up calls will fire after this. JSEvents.removeDeferredCalls(_JSEvents_requestFullscreen); var d = __specialEventTargets[1]; if (d.exitFullscreen) { d.fullscreenElement && d.exitFullscreen(); } else if (d.msExitFullscreen) { d.msFullscreenElement && d.msExitFullscreen(); } else if (d.mozCancelFullScreen) { d.mozFullScreenElement && d.mozCancelFullScreen(); } else if (d.webkitExitFullscreen) { d.webkitFullscreenElement && d.webkitExitFullscreen(); } else { return -1; } if (__currentFullscreenStrategy.canvasResizedCallback) { dynCall_iiii(__currentFullscreenStrategy.canvasResizedCallback, 37, 0, __currentFullscreenStrategy.canvasResizedCallbackUserData); __currentFullscreenStrategy = 0; } return 0; } function __requestPointerLock(target) { if (target.requestPointerLock) { target.requestPointerLock(); } else if (target.mozRequestPointerLock) { target.mozRequestPointerLock(); } else if (target.webkitRequestPointerLock) { target.webkitRequestPointerLock(); } else if (target.msRequestPointerLock) { target.msRequestPointerLock(); } else { // document.body is known to accept pointer lock, so use that to differentiate if the user passed a bad element, // or if the whole browser just doesn't support the feature. if (document.body.requestPointerLock || document.body.mozRequestPointerLock || document.body.webkitRequestPointerLock || document.body.msRequestPointerLock) { return -3; } else { return -1; } } return 0; }function _emscripten_exit_pointerlock() { // Make sure no queued up calls will fire after this. JSEvents.removeDeferredCalls(__requestPointerLock); if (document.exitPointerLock) { document.exitPointerLock(); } else if (document.msExitPointerLock) { document.msExitPointerLock(); } else if (document.mozExitPointerLock) { document.mozExitPointerLock(); } else if (document.webkitExitPointerLock) { document.webkitExitPointerLock(); } else { return -1; } return 0; } function _emscripten_get_device_pixel_ratio() { return window.devicePixelRatio || 1.0; } function _emscripten_get_element_css_size(target, width, height) { target = target ? __findEventTarget(target) : CCModule['canvas']; if (!target) return -4; if (target.getBoundingClientRect) { var rect = target.getBoundingClientRect(); HEAPF64[((width)>>3)]=rect.right - rect.left; HEAPF64[((height)>>3)]=rect.bottom - rect.top; } else { HEAPF64[((width)>>3)]=target.clientWidth; HEAPF64[((height)>>3)]=target.clientHeight; } return 0; } function __fillFullscreenChangeEventData(eventStruct, e) { var fullscreenElement = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; var isFullscreen = !!fullscreenElement; HEAP32[((eventStruct)>>2)]=isFullscreen; HEAP32[(((eventStruct)+(4))>>2)]=JSEvents.fullscreenEnabled(); // If transitioning to fullscreen, report info about the element that is now fullscreen. // If transitioning to windowed mode, report info about the element that just was fullscreen. var reportedElement = isFullscreen ? fullscreenElement : JSEvents.previousFullscreenElement; var nodeName = JSEvents.getNodeNameForTarget(reportedElement); var id = (reportedElement && reportedElement.id) ? reportedElement.id : ''; stringToUTF8(nodeName, eventStruct + 8, 128); stringToUTF8(id, eventStruct + 136, 128); HEAP32[(((eventStruct)+(264))>>2)]=reportedElement ? reportedElement.clientWidth : 0; HEAP32[(((eventStruct)+(268))>>2)]=reportedElement ? reportedElement.clientHeight : 0; HEAP32[(((eventStruct)+(272))>>2)]=screen.width; HEAP32[(((eventStruct)+(276))>>2)]=screen.height; if (isFullscreen) { JSEvents.previousFullscreenElement = fullscreenElement; } }function _emscripten_get_fullscreen_status(fullscreenStatus) { if (typeof JSEvents.fullscreenEnabled() === 'undefined') return -1; __fillFullscreenChangeEventData(fullscreenStatus); return 0; } function _emscripten_get_heap_size() { return HEAP8.length; } function __fillPointerlockChangeEventData(eventStruct, e) { var pointerLockElement = document.pointerLockElement || document.mozPointerLockElement || document.webkitPointerLockElement || document.msPointerLockElement; var isPointerlocked = !!pointerLockElement; HEAP32[((eventStruct)>>2)]=isPointerlocked; var nodeName = JSEvents.getNodeNameForTarget(pointerLockElement); var id = (pointerLockElement && pointerLockElement.id) ? pointerLockElement.id : ''; stringToUTF8(nodeName, eventStruct + 4, 128); stringToUTF8(id, eventStruct + 132, 128); }function _emscripten_get_pointerlock_status(pointerlockStatus) { if (pointerlockStatus) __fillPointerlockChangeEventData(pointerlockStatus); if (!document.body || (!document.body.requestPointerLock && !document.body.mozRequestPointerLock && !document.body.webkitRequestPointerLock && !document.body.msRequestPointerLock)) { return -1; } return 0; } function _emscripten_is_webgl_context_lost(target) { return !GL.contexts[target] || GL.contexts[target].GLctx.isContextLost(); // No context ~> lost context. } function __emscripten_do_request_fullscreen(target, strategy) { if (typeof JSEvents.fullscreenEnabled() === 'undefined') return -1; if (!JSEvents.fullscreenEnabled()) return -3; if (!target) target = '#canvas'; target = __findEventTarget(target); if (!target) return -4; if (!target.requestFullscreen && !target.msRequestFullscreen && !target.mozRequestFullScreen && !target.mozRequestFullscreen && !target.webkitRequestFullscreen) { return -3; } var canPerformRequests = JSEvents.canPerformEventHandlerRequests(); // Queue this function call if we're not currently in an event handler and the user saw it appropriate to do so. if (!canPerformRequests) { if (strategy.deferUntilInEventHandler) { JSEvents.deferCall(_JSEvents_requestFullscreen, 1 /* priority over pointer lock */, [target, strategy]); return 1; } else { return -2; } } return _JSEvents_requestFullscreen(target, strategy); }function _emscripten_request_fullscreen_strategy(target, deferUntilInEventHandler, fullscreenStrategy) { var strategy = {}; strategy.scaleMode = HEAP32[((fullscreenStrategy)>>2)]; strategy.canvasResolutionScaleMode = HEAP32[(((fullscreenStrategy)+(4))>>2)]; strategy.filteringMode = HEAP32[(((fullscreenStrategy)+(8))>>2)]; strategy.deferUntilInEventHandler = deferUntilInEventHandler; strategy.canvasResizedCallback = HEAP32[(((fullscreenStrategy)+(12))>>2)]; strategy.canvasResizedCallbackUserData = HEAP32[(((fullscreenStrategy)+(16))>>2)]; __currentFullscreenStrategy = strategy; return __emscripten_do_request_fullscreen(target, strategy); } function _emscripten_request_pointerlock(target, deferUntilInEventHandler) { if (!target) target = '#canvas'; target = __findEventTarget(target); if (!target) return -4; if (!target.requestPointerLock && !target.mozRequestPointerLock && !target.webkitRequestPointerLock && !target.msRequestPointerLock) { return -1; } var canPerformRequests = JSEvents.canPerformEventHandlerRequests(); // Queue this function call if we're not currently in an event handler and the user saw it appropriate to do so. if (!canPerformRequests) { if (deferUntilInEventHandler) { JSEvents.deferCall(__requestPointerLock, 2 /* priority below fullscreen */, [target]); return 1; } else { return -2; } } return __requestPointerLock(target); } function emscripten_realloc_buffer(size) { try { var newBuffer = new ArrayBuffer(size); if (newBuffer.byteLength != size) return false; new Int8Array(newBuffer).set(HEAP8); } catch(e) { return false; } CCModule['_emscripten_replace_memory'](newBuffer); HEAP8 = new Int8Array(newBuffer); HEAP16 = new Int16Array(newBuffer); HEAP32 = new Int32Array(newBuffer); HEAPU8 = new Uint8Array(newBuffer); HEAPU16 = new Uint16Array(newBuffer); HEAPU32 = new Uint32Array(newBuffer); HEAPF32 = new Float32Array(newBuffer); HEAPF64 = new Float64Array(newBuffer); buffer = newBuffer; return newBuffer; }function _emscripten_resize_heap(requestedSize) { var oldSize = _emscripten_get_heap_size(); var PAGE_MULTIPLE = 16777216; var LIMIT = 2147483648 - PAGE_MULTIPLE; // We can do one page short of 2GB as theoretical maximum. if (requestedSize > LIMIT) { return false; } var MIN_TOTAL_MEMORY = 16777216; var newSize = Math.max(oldSize, MIN_TOTAL_MEMORY); // So the loop below will not be infinite, and minimum asm.js memory size is 16MB. while (newSize < requestedSize) { // Keep incrementing the heap size as long as it's less than what is requested. if (newSize <= 536870912) { newSize = alignUp(2 * newSize, PAGE_MULTIPLE); // Simple heuristic: double until 1GB... } else { // ..., but after that, add smaller increments towards 2GB, which we cannot reach newSize = Math.min(alignUp((3 * newSize + 2147483648) / 4, PAGE_MULTIPLE), LIMIT); } } var replacement = emscripten_realloc_buffer(newSize); if (!replacement || replacement.byteLength != newSize) { return false; } // everything worked updateGlobalBufferViews(); return true; } function _emscripten_resume_main_loop() { Browser.mainLoop.resume(); } function __registerBeforeUnloadEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString) { var beforeUnloadEventHandlerFunc = function(event) { var e = event || window.event; // Note: This is always called on the main browser thread, since it needs synchronously return a value! var confirmationMessage = dynCall_iiii(callbackfunc, eventTypeId, 0, userData); if (confirmationMessage) { confirmationMessage = UTF8ToString(confirmationMessage); } if (confirmationMessage) { e.preventDefault(); e.returnValue = confirmationMessage; return confirmationMessage; } }; var eventHandler = { target: __findEventTarget(target), allowsDeferredCalls: false, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: beforeUnloadEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); }function _emscripten_set_beforeunload_callback_on_thread(userData, callbackfunc, targetThread) { if (typeof window.onbeforeunload === 'undefined') return -1; // beforeunload callback can only be registered on the main browser thread, because the page will go away immediately after returning from the handler, // and there is no time to start proxying it anywhere. if (targetThread !== 1) return -5; // __registerBeforeUnloadEventCallback(2, userData, true, callbackfunc, 28, "beforeunload"); return 0; } function __registerFocusEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.focusEvent) JSEvents.focusEvent = _malloc( 256 ); var focusEventHandlerFunc = function(event) { var e = event || window.event; var nodeName = JSEvents.getNodeNameForTarget(e.target); var id = e.target.id ? e.target.id : ''; var focusEvent = JSEvents.focusEvent; stringToUTF8(nodeName, focusEvent + 0, 128); stringToUTF8(id, focusEvent + 128, 128); if (dynCall_iiii(callbackfunc, eventTypeId, focusEvent, userData)) e.preventDefault(); }; var eventHandler = { target: __findEventTarget(target), allowsDeferredCalls: false, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: focusEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); }function _emscripten_set_blur_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerFocusEventCallback(target, userData, useCapture, callbackfunc, 12, "blur", targetThread); return 0; } function _emscripten_set_element_css_size(target, width, height) { target = target ? __findEventTarget(target) : CCModule['canvas']; if (!target) return -4; target.style.width = width + "px"; target.style.height = height + "px"; return 0; } function _emscripten_set_focus_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerFocusEventCallback(target, userData, useCapture, callbackfunc, 13, "focus", targetThread); return 0; } function __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.fullscreenChangeEvent) JSEvents.fullscreenChangeEvent = _malloc( 280 ); var fullscreenChangeEventhandlerFunc = function(event) { var e = event || window.event; var fullscreenChangeEvent = JSEvents.fullscreenChangeEvent; __fillFullscreenChangeEventData(fullscreenChangeEvent, e); if (dynCall_iiii(callbackfunc, eventTypeId, fullscreenChangeEvent, userData)) e.preventDefault(); }; var eventHandler = { target: target, allowsDeferredCalls: false, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: fullscreenChangeEventhandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); }function _emscripten_set_fullscreenchange_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { if (typeof JSEvents.fullscreenEnabled() === 'undefined') return -1; target = target ? __findEventTarget(target) : __specialEventTargets[1]; if (!target) return -4; __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "fullscreenchange", targetThread); __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "mozfullscreenchange", targetThread); __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "webkitfullscreenchange", targetThread); __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "msfullscreenchange", targetThread); return 0; } function __registerKeyEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.keyEvent) JSEvents.keyEvent = _malloc( 164 ); var keyEventHandlerFunc = function(event) { var e = event || window.event; var keyEventData = JSEvents.keyEvent; stringToUTF8(e.key ? e.key : "", keyEventData + 0, 32); stringToUTF8(e.code ? e.code : "", keyEventData + 32, 32); HEAP32[(((keyEventData)+(64))>>2)]=e.location; HEAP32[(((keyEventData)+(68))>>2)]=e.ctrlKey; HEAP32[(((keyEventData)+(72))>>2)]=e.shiftKey; HEAP32[(((keyEventData)+(76))>>2)]=e.altKey; HEAP32[(((keyEventData)+(80))>>2)]=e.metaKey; HEAP32[(((keyEventData)+(84))>>2)]=e.repeat; stringToUTF8(e.locale ? e.locale : "", keyEventData + 88, 32); stringToUTF8(e.char ? e.char : "", keyEventData + 120, 32); HEAP32[(((keyEventData)+(152))>>2)]=e.charCode; HEAP32[(((keyEventData)+(156))>>2)]=e.keyCode; HEAP32[(((keyEventData)+(160))>>2)]=e.which; if (dynCall_iiii(callbackfunc, eventTypeId, keyEventData, userData)) e.preventDefault(); }; var eventHandler = { target: __findEventTarget(target), allowsDeferredCalls: JSEvents.isInternetExplorer() ? false : true, // MSIE doesn't allow fullscreen and pointerlock requests from key handlers, others do. eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: keyEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); }function _emscripten_set_keydown_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerKeyEventCallback(target, userData, useCapture, callbackfunc, 2, "keydown", targetThread); return 0; } function _emscripten_set_keypress_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerKeyEventCallback(target, userData, useCapture, callbackfunc, 1, "keypress", targetThread); return 0; } function _emscripten_set_keyup_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerKeyEventCallback(target, userData, useCapture, callbackfunc, 3, "keyup", targetThread); return 0; } function __fillMouseEventData(eventStruct, e, target) { HEAPF64[((eventStruct)>>3)]=JSEvents.tick(); HEAP32[(((eventStruct)+(8))>>2)]=e.screenX; HEAP32[(((eventStruct)+(12))>>2)]=e.screenY; HEAP32[(((eventStruct)+(16))>>2)]=e.clientX; HEAP32[(((eventStruct)+(20))>>2)]=e.clientY; HEAP32[(((eventStruct)+(24))>>2)]=e.ctrlKey; HEAP32[(((eventStruct)+(28))>>2)]=e.shiftKey; HEAP32[(((eventStruct)+(32))>>2)]=e.altKey; HEAP32[(((eventStruct)+(36))>>2)]=e.metaKey; HEAP16[(((eventStruct)+(40))>>1)]=e.button; HEAP16[(((eventStruct)+(42))>>1)]=e.buttons; HEAP32[(((eventStruct)+(44))>>2)]=e["movementX"] || e["mozMovementX"] || e["webkitMovementX"] || (e.screenX-JSEvents.previousScreenX); HEAP32[(((eventStruct)+(48))>>2)]=e["movementY"] || e["mozMovementY"] || e["webkitMovementY"] || (e.screenY-JSEvents.previousScreenY); if (CCModule['canvas']) { var rect = CCModule['canvas'].getBoundingClientRect(); HEAP32[(((eventStruct)+(60))>>2)]=e.clientX - rect.left; HEAP32[(((eventStruct)+(64))>>2)]=e.clientY - rect.top; } else { // Canvas is not initialized, return 0. HEAP32[(((eventStruct)+(60))>>2)]=0; HEAP32[(((eventStruct)+(64))>>2)]=0; } if (target) { var rect = JSEvents.getBoundingClientRectOrZeros(target); HEAP32[(((eventStruct)+(52))>>2)]=e.clientX - rect.left; HEAP32[(((eventStruct)+(56))>>2)]=e.clientY - rect.top; } else { // No specific target passed, return 0. HEAP32[(((eventStruct)+(52))>>2)]=0; HEAP32[(((eventStruct)+(56))>>2)]=0; } // wheel and mousewheel events contain wrong screenX/screenY on chrome/opera // https://github.com/emscripten-core/emscripten/pull/4997 // https://bugs.chromium.org/p/chromium/issues/detail?id=699956 if (e.type !== 'wheel' && e.type !== 'mousewheel') { JSEvents.previousScreenX = e.screenX; JSEvents.previousScreenY = e.screenY; } }function __registerMouseEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.mouseEvent) JSEvents.mouseEvent = _malloc( 72 ); target = __findEventTarget(target); var mouseEventHandlerFunc = function(event) { var e = event || window.event; // TODO: Make this access thread safe, or this could update live while app is reading it. __fillMouseEventData(JSEvents.mouseEvent, e, target); if (dynCall_iiii(callbackfunc, eventTypeId, JSEvents.mouseEvent, userData)) e.preventDefault(); }; var eventHandler = { target: target, allowsDeferredCalls: eventTypeString != 'mousemove' && eventTypeString != 'mouseenter' && eventTypeString != 'mouseleave', // Mouse move events do not allow fullscreen/pointer lock requests to be handled in them! eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: mouseEventHandlerFunc, useCapture: useCapture }; // In IE, mousedown events don't either allow deferred calls to be run! if (JSEvents.isInternetExplorer() && eventTypeString == 'mousedown') eventHandler.allowsDeferredCalls = false; JSEvents.registerOrRemoveHandler(eventHandler); }function _emscripten_set_mousedown_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerMouseEventCallback(target, userData, useCapture, callbackfunc, 5, "mousedown", targetThread); return 0; } function _emscripten_set_mousemove_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerMouseEventCallback(target, userData, useCapture, callbackfunc, 8, "mousemove", targetThread); return 0; } function _emscripten_set_mouseup_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerMouseEventCallback(target, userData, useCapture, callbackfunc, 6, "mouseup", targetThread); return 0; } function __registerUiEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.uiEvent) JSEvents.uiEvent = _malloc( 36 ); if (eventTypeString == "scroll" && !target) { target = document; // By default read scroll events on document rather than window. } else { target = __findEventTarget(target); } var uiEventHandlerFunc = function(event) { var e = event || window.event; if (e.target != target) { // Never take ui events such as scroll via a 'bubbled' route, but always from the direct element that // was targeted. Otherwise e.g. if app logs a message in response to a page scroll, the Emscripten log // message box could cause to scroll, generating a new (bubbled) scroll message, causing a new log print, // causing a new scroll, etc.. return; } var scrollPos = JSEvents?.pageScrollPos(); var uiEvent = JSEvents.uiEvent; HEAP32[((uiEvent)>>2)]=e.detail; HEAP32[(((uiEvent)+(4))>>2)]=document.body.clientWidth; HEAP32[(((uiEvent)+(8))>>2)]=document.body.clientHeight; HEAP32[(((uiEvent)+(12))>>2)]=window.innerWidth; HEAP32[(((uiEvent)+(16))>>2)]=window.innerHeight; HEAP32[(((uiEvent)+(20))>>2)]=window.outerWidth; HEAP32[(((uiEvent)+(24))>>2)]=window.outerHeight; HEAP32[(((uiEvent)+(28))>>2)]=scrollPos[0]; HEAP32[(((uiEvent)+(32))>>2)]=scrollPos[1]; if (dynCall_iiii(callbackfunc, eventTypeId, uiEvent, userData)) e.preventDefault(); }; var eventHandler = { target: target, allowsDeferredCalls: false, // Neither scroll or resize events allow running requests inside them. eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: uiEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); }function _emscripten_set_resize_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerUiEventCallback(target, userData, useCapture, callbackfunc, 10, "resize", targetThread); return 0; } function __registerTouchEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.touchEvent) JSEvents.touchEvent = _malloc( 1684 ); target = __findEventTarget(target); var touchEventHandlerFunc = function(event) { var e = event || window.event; var touches = {}; for(var i = 0; i < e.touches.length; ++i) { var touch = e.touches[i]; touches[touch.identifier] = touch; } for(var i = 0; i < e.changedTouches.length; ++i) { var touch = e.changedTouches[i]; touches[touch.identifier] = touch; touch.changed = true; } for(var i = 0; i < e.targetTouches.length; ++i) { var touch = e.targetTouches[i]; touches[touch.identifier].onTarget = true; } var touchEvent = JSEvents.touchEvent; var ptr = touchEvent; HEAP32[(((ptr)+(4))>>2)]=e.ctrlKey; HEAP32[(((ptr)+(8))>>2)]=e.shiftKey; HEAP32[(((ptr)+(12))>>2)]=e.altKey; HEAP32[(((ptr)+(16))>>2)]=e.metaKey; ptr += 20; // Advance to the start of the touch array. var canvasRect = CCModule['canvas'] ? CCModule['canvas'].getBoundingClientRect() : undefined; var targetRect = JSEvents.getBoundingClientRectOrZeros(target); var numTouches = 0; for(var i in touches) { var t = touches[i]; HEAP32[((ptr)>>2)]=t.identifier; HEAP32[(((ptr)+(4))>>2)]=t.screenX; HEAP32[(((ptr)+(8))>>2)]=t.screenY; HEAP32[(((ptr)+(12))>>2)]=t.clientX; HEAP32[(((ptr)+(16))>>2)]=t.clientY; HEAP32[(((ptr)+(20))>>2)]=t.pageX; HEAP32[(((ptr)+(24))>>2)]=t.pageY; HEAP32[(((ptr)+(28))>>2)]=t.changed; HEAP32[(((ptr)+(32))>>2)]=t.onTarget; if (canvasRect) { HEAP32[(((ptr)+(44))>>2)]=t.clientX - canvasRect.left; HEAP32[(((ptr)+(48))>>2)]=t.clientY - canvasRect.top; } else { HEAP32[(((ptr)+(44))>>2)]=0; HEAP32[(((ptr)+(48))>>2)]=0; } HEAP32[(((ptr)+(36))>>2)]=t.clientX - targetRect.left; HEAP32[(((ptr)+(40))>>2)]=t.clientY - targetRect.top; ptr += 52; if (++numTouches >= 32) { break; } } HEAP32[((touchEvent)>>2)]=numTouches; if (dynCall_iiii(callbackfunc, eventTypeId, touchEvent, userData)) e.preventDefault(); }; var eventHandler = { target: target, allowsDeferredCalls: eventTypeString == 'touchstart' || eventTypeString == 'touchend', eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: touchEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); }function _emscripten_set_touchcancel_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 25, "touchcancel", targetThread); return 0; } function _emscripten_set_touchend_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 23, "touchend", targetThread); return 0; } function _emscripten_set_touchmove_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 24, "touchmove", targetThread); return 0; } function _emscripten_set_touchstart_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 22, "touchstart", targetThread); return 0; } function __fillVisibilityChangeEventData(eventStruct, e) { var visibilityStates = [ "hidden", "visible", "prerender", "unloaded" ]; var visibilityState = visibilityStates.indexOf(document.visibilityState); HEAP32[((eventStruct)>>2)]=document.hidden; HEAP32[(((eventStruct)+(4))>>2)]=visibilityState; }function __registerVisibilityChangeEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.visibilityChangeEvent) JSEvents.visibilityChangeEvent = _malloc( 8 ); var visibilityChangeEventHandlerFunc = function(event) { var e = event || window.event; var visibilityChangeEvent = JSEvents.visibilityChangeEvent; __fillVisibilityChangeEventData(visibilityChangeEvent, e); if (dynCall_iiii(callbackfunc, eventTypeId, visibilityChangeEvent, userData)) e.preventDefault(); }; var eventHandler = { target: target, allowsDeferredCalls: false, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: visibilityChangeEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); }function _emscripten_set_visibilitychange_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { __registerVisibilityChangeEventCallback(__specialEventTargets[1], userData, useCapture, callbackfunc, 21, "visibilitychange", targetThread); return 0; } function __registerWebGlEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!target) target = CCModule['canvas']; var webGlEventHandlerFunc = function(event) { var e = event || window.event; if (dynCall_iiii(callbackfunc, eventTypeId, 0, userData)) e.preventDefault(); }; var eventHandler = { target: __findEventTarget(target), allowsDeferredCalls: false, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: webGlEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); }function _emscripten_set_webglcontextlost_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerWebGlEventCallback(target, userData, useCapture, callbackfunc, 31, "webglcontextlost", targetThread); return 0; } function __registerWheelEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.wheelEvent) JSEvents.wheelEvent = _malloc( 104 ); // The DOM Level 3 events spec event 'wheel' var wheelHandlerFunc = function(event) { var e = event || window.event; var wheelEvent = JSEvents.wheelEvent; __fillMouseEventData(wheelEvent, e, target); HEAPF64[(((wheelEvent)+(72))>>3)]=e["deltaX"]; HEAPF64[(((wheelEvent)+(80))>>3)]=e["deltaY"]; HEAPF64[(((wheelEvent)+(88))>>3)]=e["deltaZ"]; HEAP32[(((wheelEvent)+(96))>>2)]=e["deltaMode"]; if (dynCall_iiii(callbackfunc, eventTypeId, wheelEvent, userData)) e.preventDefault(); }; // The 'mousewheel' event as implemented in Safari 6.0.5 var mouseWheelHandlerFunc = function(event) { var e = event || window.event; __fillMouseEventData(JSEvents.wheelEvent, e, target); HEAPF64[(((JSEvents.wheelEvent)+(72))>>3)]=e["wheelDeltaX"] || 0; HEAPF64[(((JSEvents.wheelEvent)+(80))>>3)]=-(e["wheelDeltaY"] ? e["wheelDeltaY"] : e["wheelDelta"]) /* 1. Invert to unify direction with the DOM Level 3 wheel event. 2. MSIE does not provide wheelDeltaY, so wheelDelta is used as a fallback. */; HEAPF64[(((JSEvents.wheelEvent)+(88))>>3)]=0 /* Not available */; HEAP32[(((JSEvents.wheelEvent)+(96))>>2)]=0 /* DOM_DELTA_PIXEL */; var shouldCancel = dynCall_iiii(callbackfunc, eventTypeId, JSEvents.wheelEvent, userData); if (shouldCancel) { e.preventDefault(); } }; var eventHandler = { target: target, allowsDeferredCalls: true, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: (eventTypeString == 'wheel') ? wheelHandlerFunc : mouseWheelHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); }function _emscripten_set_wheel_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { target = __findEventTarget(target); if (typeof target.onwheel !== 'undefined') { __registerWheelEventCallback(target, userData, useCapture, callbackfunc, 9, "wheel", targetThread); return 0; } else if (typeof target.onmousewheel !== 'undefined') { __registerWheelEventCallback(target, userData, useCapture, callbackfunc, 9, "mousewheel", targetThread); return 0; } else { return -1; } } var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function () { GL.miniTempBuffer = new Float32Array(GL.MINI_TEMP_BUFFER_SIZE); for (var i = 0; i < GL.MINI_TEMP_BUFFER_SIZE; i++) { GL.miniTempBufferViews[i] = GL.miniTempBuffer.subarray(0, i+1); } },recordError:function recordError(errorCode) { if (!GL.lastError) { GL.lastError = errorCode; } },getNewId:function (table) { var ret = GL.counter++; for (var i = table.length; i < ret; i++) { table[i] = null; } return ret; },MINI_TEMP_BUFFER_SIZE:256,miniTempBuffer:null,miniTempBufferViews:[0],getSource:function (shader, count, string, length) { var source = ''; for (var i = 0; i < count; ++i) { var len = length ? HEAP32[(((length)+(i*4))>>2)] : -1; source += UTF8ToString(HEAP32[(((string)+(i*4))>>2)], len < 0 ? undefined : len); } return source; },createContext:function (canvas, webGLContextAttributes) { var ctx = (canvas.getContext("webgl", webGLContextAttributes) || canvas.getContext("experimental-webgl", webGLContextAttributes)); return ctx && GL.registerContext(ctx, webGLContextAttributes); },registerContext:function (ctx, webGLContextAttributes) { var handle = _malloc(8); // Make space on the heap to store GL context attributes that need to be accessible as shared between threads. var context = { handle: handle, attributes: webGLContextAttributes, version: webGLContextAttributes.majorVersion, GLctx: ctx }; context.cannotHandleOffsetsInUniformArrayViews = (function(g) { function b(c, t) { var s = g.createShader(t); g.shaderSource(s, c); g.compileShader(s); return s; } try { var p = g.createProgram(); // Note: we do not delete this program so it stays part of the context we created, but that is ok - it does not do anything and we want to keep this detection size minimal. g.attachShader(p, b("attribute vec4 p;void main(){gl_Position=p;}", g.VERTEX_SHADER)); g.attachShader(p, b("precision lowp float;uniform vec4 u;void main(){gl_FragColor=u;}", g.FRAGMENT_SHADER)); g.linkProgram(p); var h = new Float32Array(8); h[4] = 1; g.useProgram(p); var l = g.getUniformLocation(p, "u"); g.uniform4fv(l, h.subarray(4, 8)); // Uploading a 4-vector GL uniform from last four elements of array [0,0,0,0,1,0,0,0], i.e. uploading vec4=(1,0,0,0) at offset=4. return !g.getUniform(p, l)[0]; // in proper WebGL we expect to read back the vector we just uploaded: (1,0,0,0). On buggy browser would instead have uploaded offset=0 of above array, i.e. vec4=(0,0,0,0) } catch(e) { return false; } // If we get an exception, we assume we got some other error, and do not trigger this workaround. })(); // Store the created context object so that we can access the context given a canvas without having to pass the parameters again. if (ctx.canvas) ctx.canvas.GLctxObject = context; GL.contexts[handle] = context; if (typeof webGLContextAttributes.enableExtensionsByDefault === 'undefined' || webGLContextAttributes.enableExtensionsByDefault) { GL.initExtensions(context); } return handle; },makeContextCurrent:function (contextHandle) { GL.currentContext = GL.contexts[contextHandle]; // Active Emscripten GL layer context object. CCModule.ctx = GLctx = GL.currentContext && GL.currentContext.GLctx; // Active WebGL context object. return !(contextHandle && !GLctx); },getContext:function (contextHandle) { return GL.contexts[contextHandle]; },deleteContext:function (contextHandle) { if (GL.currentContext === GL.contexts[contextHandle]) GL.currentContext = null; if (typeof JSEvents === 'object') JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas); // Release all JS event handlers on the DOM element that the GL context is associated with since the context is now deleted. if (GL.contexts[contextHandle] && GL.contexts[contextHandle].GLctx.canvas) GL.contexts[contextHandle].GLctx.canvas.GLctxObject = undefined; // Make sure the canvas object no longer refers to the context object so there are no GC surprises. _free(GL.contexts[contextHandle]); GL.contexts[contextHandle] = null; },initExtensions:function (context) { // If this function is called without a specific context object, init the extensions of the currently active context. if (!context) context = GL.currentContext; if (context.initExtensionsDone) return; context.initExtensionsDone = true; var GLctx = context.GLctx; // Detect the presence of a few extensions manually, this GL interop layer itself will need to know if they exist. if (context.version < 2) { // Extension available from Firefox 26 and Google Chrome 30 var instancedArraysExt = GLctx.getExtension('ANGLE_instanced_arrays'); if (instancedArraysExt) { GLctx['vertexAttribDivisor'] = function(index, divisor) { instancedArraysExt['vertexAttribDivisorANGLE'](index, divisor); }; GLctx['drawArraysInstanced'] = function(mode, first, count, primcount) { instancedArraysExt['drawArraysInstancedANGLE'](mode, first, count, primcount); }; GLctx['drawElementsInstanced'] = function(mode, count, type, indices, primcount) { instancedArraysExt['drawElementsInstancedANGLE'](mode, count, type, indices, primcount); }; } // Extension available from Firefox 25 and WebKit var vaoExt = GLctx.getExtension('OES_vertex_array_object'); if (vaoExt) { GLctx['createVertexArray'] = function() { return vaoExt['createVertexArrayOES'](); }; GLctx['deleteVertexArray'] = function(vao) { vaoExt['deleteVertexArrayOES'](vao); }; GLctx['bindVertexArray'] = function(vao) { vaoExt['bindVertexArrayOES'](vao); }; GLctx['isVertexArray'] = function(vao) { return vaoExt['isVertexArrayOES'](vao); }; } var drawBuffersExt = GLctx.getExtension('WEBGL_draw_buffers'); if (drawBuffersExt) { GLctx['drawBuffers'] = function(n, bufs) { drawBuffersExt['drawBuffersWEBGL'](n, bufs); }; } } GLctx.disjointTimerQueryExt = GLctx.getExtension("EXT_disjoint_timer_query"); // These are the 'safe' feature-enabling extensions that don't add any performance impact related to e.g. debugging, and // should be enabled by default so that client GLES2/GL code will not need to go through extra hoops to get its stuff working. // As new extensions are ratified at http://www.khronos.org/registry/webgl/extensions/ , feel free to add your new extensions // here, as long as they don't produce a performance impact for users that might not be using those extensions. // E.g. debugging-related extensions should probably be off by default. var automaticallyEnabledExtensions = [ // Khronos ratified WebGL extensions ordered by number (no debug extensions): "OES_texture_float", "OES_texture_half_float", "OES_standard_derivatives", "OES_vertex_array_object", "WEBGL_compressed_texture_s3tc", "WEBGL_depth_texture", "OES_element_index_uint", "EXT_texture_filter_anisotropic", "EXT_frag_depth", "WEBGL_draw_buffers", "ANGLE_instanced_arrays", "OES_texture_float_linear", "OES_texture_half_float_linear", "EXT_blend_minmax", "EXT_shader_texture_lod", // Community approved WebGL extensions ordered by number: "WEBGL_compressed_texture_pvrtc", "EXT_color_buffer_half_float", "WEBGL_color_buffer_float", "EXT_sRGB", "WEBGL_compressed_texture_etc1", "EXT_disjoint_timer_query", "WEBGL_compressed_texture_etc", "WEBGL_compressed_texture_astc", "EXT_color_buffer_float", "WEBGL_compressed_texture_s3tc_srgb", "EXT_disjoint_timer_query_webgl2"]; function shouldEnableAutomatically(extension) { var ret = false; automaticallyEnabledExtensions.forEach(function(include) { if (extension.indexOf(include) != -1) { ret = true; } }); return ret; } var exts = GLctx.getSupportedExtensions(); if (exts && exts.length > 0) { GLctx.getSupportedExtensions().forEach(function(ext) { if (automaticallyEnabledExtensions.indexOf(ext) != -1) { GLctx.getExtension(ext); // Calling .getExtension enables that extension permanently, no need to store the return value to be enabled. } }); } },populateUniformTable:function (program) { var p = GL.programs[program]; var ptable = GL.programInfos[program] = { uniforms: {}, maxUniformLength: 0, // This is eagerly computed below, since we already enumerate all uniforms anyway. maxAttributeLength: -1, // This is lazily computed and cached, computed when/if first asked, "-1" meaning not computed yet. maxUniformBlockNameLength: -1 // Lazily computed as well }; var utable = ptable.uniforms; // A program's uniform table maps the string name of an uniform to an integer location of that uniform. // The global GL.uniforms map maps integer locations to WebGLUniformLocations. var numUniforms = GLctx.getProgramParameter(p, 0x8B86/*GL_ACTIVE_UNIFORMS*/); for (var i = 0; i < numUniforms; ++i) { var u = GLctx.getActiveUniform(p, i); var name = u.name; ptable.maxUniformLength = Math.max(ptable.maxUniformLength, name.length+1); // If we are dealing with an array, e.g. vec4 foo[3], strip off the array index part to canonicalize that "foo", "foo[]", // and "foo[0]" will mean the same. Loop below will populate foo[1] and foo[2]. if (name.slice(-1) == ']') { name = name.slice(0, name.lastIndexOf('[')); } // Optimize memory usage slightly: If we have an array of uniforms, e.g. 'vec3 colors[3];', then // only store the string 'colors' in utable, and 'colors[0]', 'colors[1]' and 'colors[2]' will be parsed as 'colors'+i. // Note that for the GL.uniforms table, we still need to fetch the all WebGLUniformLocations for all the indices. var loc = GLctx.getUniformLocation(p, name); if (loc) { var id = GL.getNewId(GL.uniforms); utable[name] = [u.size, id]; GL.uniforms[id] = loc; for (var j = 1; j < u.size; ++j) { var n = name + '['+j+']'; loc = GLctx.getUniformLocation(p, n); id = GL.getNewId(GL.uniforms); GL.uniforms[id] = loc; } } } }}; var __emscripten_webgl_power_preferences=['default', 'low-power', 'high-performance'];function _emscripten_webgl_do_create_context(target, attributes) { var contextAttributes = {}; var a = attributes >> 2; contextAttributes['alpha'] = !!HEAP32[a + (0>>2)]; contextAttributes['depth'] = !!HEAP32[a + (4>>2)]; contextAttributes['stencil'] = !!HEAP32[a + (8>>2)]; contextAttributes['antialias'] = !!HEAP32[a + (12>>2)]; contextAttributes['premultipliedAlpha'] = !!HEAP32[a + (16>>2)]; contextAttributes['preserveDrawingBuffer'] = !!HEAP32[a + (20>>2)]; var powerPreference = HEAP32[a + (24>>2)]; contextAttributes['powerPreference'] = __emscripten_webgl_power_preferences[powerPreference]; contextAttributes['failIfMajorPerformanceCaveat'] = !!HEAP32[a + (28>>2)]; contextAttributes.majorVersion = HEAP32[a + (32>>2)]; contextAttributes.minorVersion = HEAP32[a + (36>>2)]; contextAttributes.enableExtensionsByDefault = HEAP32[a + (40>>2)]; contextAttributes.explicitSwapControl = HEAP32[a + (44>>2)]; contextAttributes.proxyContextToMainThread = HEAP32[a + (48>>2)]; contextAttributes.renderViaOffscreenBackBuffer = HEAP32[a + (52>>2)]; var canvas = __findCanvasEventTarget(target); if (!canvas) { return 0; } if (contextAttributes.explicitSwapControl) { return 0; } var contextHandle = GL.createContext(canvas, contextAttributes); return contextHandle; }function _emscripten_webgl_create_context(a0,a1 /**/) { return _emscripten_webgl_do_create_context(a0,a1); } function _emscripten_webgl_destroy_context_calling_thread(contextHandle) { if (GL.currentContext == contextHandle) GL.currentContext = 0; GL.deleteContext(contextHandle); }function _emscripten_webgl_destroy_context(a0 /**/) { return _emscripten_webgl_destroy_context_calling_thread(a0); } function _emscripten_webgl_init_context_attributes(attributes) { var a = attributes >> 2; for(var i = 0; i < (56>>2); ++i) { HEAP32[a+i] = 0; } HEAP32[a + (0>>2)] = HEAP32[a + (4>>2)] = HEAP32[a + (12>>2)] = HEAP32[a + (16>>2)] = HEAP32[a + (32>>2)] = HEAP32[a + (40>>2)] = 1; } function _emscripten_webgl_make_context_current(contextHandle) { var success = GL.makeContextCurrent(contextHandle); return success ? 0 : -5; } CCModule["_emscripten_webgl_make_context_current"] = _emscripten_webgl_make_context_current; function _exit(status) { // void _exit(int status); // http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html exit(status); } function _gettimeofday(ptr) { var now = Date.now(); HEAP32[((ptr)>>2)]=(now/1000)|0; // seconds HEAP32[(((ptr)+(4))>>2)]=((now % 1000)*1000)|0; // microseconds return 0; } function _glAttachShader(program, shader) { GLctx.attachShader(GL.programs[program], GL.shaders[shader]); } function _glBindAttribLocation(program, index, name) { GLctx.bindAttribLocation(GL.programs[program], index, UTF8ToString(name)); } function _glBindBuffer(target, buffer) { GLctx.bindBuffer(target, GL.buffers[buffer]); } function _glBindTexture(target, texture) { GLctx.bindTexture(target, GL.textures[texture]); } function _glBlendFunc(x0, x1) { GLctx['blendFunc'](x0, x1) } function _glBufferData(target, size, data, usage) { // N.b. here first form specifies a heap subarray, second form an integer size, so the ?: code here is polymorphic. It is advised to avoid // randomly mixing both uses in calling code, to avoid any potential JS engine JIT issues. GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage); } function _glBufferSubData(target, offset, size, data) { GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data+size)); } function _glClear(x0) { GLctx['clear'](x0) } function _glClearColor(x0, x1, x2, x3) { GLctx['clearColor'](x0, x1, x2, x3) } function _glColorMask(red, green, blue, alpha) { GLctx.colorMask(!!red, !!green, !!blue, !!alpha); } function _glCompileShader(shader) { GLctx.compileShader(GL.shaders[shader]); } function _glCreateProgram() { var id = GL.getNewId(GL.programs); var program = GLctx.createProgram(); program.name = id; GL.programs[id] = program; return id; } function _glCreateShader(shaderType) { var id = GL.getNewId(GL.shaders); GL.shaders[id] = GLctx.createShader(shaderType); return id; } function _glDeleteBuffers(n, buffers) { for (var i = 0; i < n; i++) { var id = HEAP32[(((buffers)+(i*4))>>2)]; var buffer = GL.buffers[id]; // From spec: "glDeleteBuffers silently ignores 0's and names that do not // correspond to existing buffer objects." if (!buffer) continue; GLctx.deleteBuffer(buffer); buffer.name = 0; GL.buffers[id] = null; if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; } } function _glDeleteProgram(id) { if (!id) return; var program = GL.programs[id]; if (!program) { // glDeleteProgram actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. GL.recordError(0x0501 /* GL_INVALID_VALUE */); return; } GLctx.deleteProgram(program); program.name = 0; GL.programs[id] = null; GL.programInfos[id] = null; } function _glDeleteShader(id) { if (!id) return; var shader = GL.shaders[id]; if (!shader) { // glDeleteShader actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. GL.recordError(0x0501 /* GL_INVALID_VALUE */); return; } GLctx.deleteShader(shader); GL.shaders[id] = null; } function _glDeleteTextures(n, textures) { for (var i = 0; i < n; i++) { var id = HEAP32[(((textures)+(i*4))>>2)]; var texture = GL.textures[id]; if (!texture) continue; // GL spec: "glDeleteTextures silently ignores 0s and names that do not correspond to existing textures". GLctx.deleteTexture(texture); texture.name = 0; GL.textures[id] = null; } } function _glDepthFunc(x0) { GLctx['depthFunc'](x0) } function _glDepthMask(flag) { GLctx.depthMask(!!flag); } function _glDetachShader(program, shader) { GLctx.detachShader(GL.programs[program], GL.shaders[shader]); } function _glDisable(x0) { GLctx['disable'](x0) } function _glDisableVertexAttribArray(index) { GLctx.disableVertexAttribArray(index); } function _glDrawArrays(mode, first, count) { GLctx.drawArrays(mode, first, count); } function _glDrawElements(mode, count, type, indices) { GLctx.drawElements(mode, count, type, indices); } function _glEnable(x0) { GLctx['enable'](x0) } function _glEnableVertexAttribArray(index) { GLctx.enableVertexAttribArray(index); } function __glGenObject(n, buffers, createFunction, objectTable ) { for (var i = 0; i < n; i++) { var buffer = GLctx[createFunction](); var id = buffer && GL.getNewId(objectTable); if (buffer) { buffer.name = id; objectTable[id] = buffer; } else { GL.recordError(0x0502 /* GL_INVALID_OPERATION */); } HEAP32[(((buffers)+(i*4))>>2)]=id; } }function _glGenBuffers(n, buffers) { __glGenObject(n, buffers, 'createBuffer', GL.buffers ); } function _glGenTextures(n, textures) { __glGenObject(n, textures, 'createTexture', GL.textures ); } function emscriptenWebGLGet(name_, p, type) { // Guard against user passing a null pointer. // Note that GLES2 spec does not say anything about how passing a null pointer should be treated. // Testing on desktop core GL 3, the application crashes on glGetIntegerv to a null pointer, but // better to report an error instead of doing anything random. if (!p) { GL.recordError(0x0501 /* GL_INVALID_VALUE */); return; } var ret = undefined; switch(name_) { // Handle a few trivial GLES values case 0x8DFA: // GL_SHADER_COMPILER ret = 1; break; case 0x8DF8: // GL_SHADER_BINARY_FORMATS if (type !== 'Integer' && type !== 'Integer64') { GL.recordError(0x0500); // GL_INVALID_ENUM } return; // Do not write anything to the out pointer, since no binary formats are supported. case 0x8DF9: // GL_NUM_SHADER_BINARY_FORMATS ret = 0; break; case 0x86A2: // GL_NUM_COMPRESSED_TEXTURE_FORMATS // WebGL doesn't have GL_NUM_COMPRESSED_TEXTURE_FORMATS (it's obsolete since GL_COMPRESSED_TEXTURE_FORMATS returns a JS array that can be queried for length), // so implement it ourselves to allow C++ GLES2 code get the length. var formats = GLctx.getParameter(0x86A3 /*GL_COMPRESSED_TEXTURE_FORMATS*/); ret = formats ? formats.length : 0; break; } if (ret === undefined) { var result = GLctx.getParameter(name_); switch (typeof(result)) { case "number": ret = result; break; case "boolean": ret = result ? 1 : 0; break; case "string": GL.recordError(0x0500); // GL_INVALID_ENUM return; case "object": if (result === null) { // null is a valid result for some (e.g., which buffer is bound - perhaps nothing is bound), but otherwise // can mean an invalid name_, which we need to report as an error switch(name_) { case 0x8894: // ARRAY_BUFFER_BINDING case 0x8B8D: // CURRENT_PROGRAM case 0x8895: // ELEMENT_ARRAY_BUFFER_BINDING case 0x8CA6: // FRAMEBUFFER_BINDING case 0x8CA7: // RENDERBUFFER_BINDING case 0x8069: // TEXTURE_BINDING_2D case 0x85B5: // WebGL 2 GL_VERTEX_ARRAY_BINDING, or WebGL 1 extension OES_vertex_array_object GL_VERTEX_ARRAY_BINDING_OES case 0x8514: { // TEXTURE_BINDING_CUBE_MAP ret = 0; break; } default: { GL.recordError(0x0500); // GL_INVALID_ENUM return; } } } else if (result instanceof Float32Array || result instanceof Uint32Array || result instanceof Int32Array || result instanceof Array) { for (var i = 0; i < result.length; ++i) { switch (type) { case 'Integer': HEAP32[(((p)+(i*4))>>2)]=result[i]; break; case 'Float': HEAPF32[(((p)+(i*4))>>2)]=result[i]; break; case 'Boolean': HEAP8[(((p)+(i))>>0)]=result[i] ? 1 : 0; break; default: throw 'internal glGet error, bad type: ' + type; } } return; } else { try { ret = result.name | 0; } catch(e) { GL.recordError(0x0500); // GL_INVALID_ENUM err('GL_INVALID_ENUM in glGet' + type + 'v: Unknown object returned from WebGL getParameter(' + name_ + ')! (error: ' + e + ')'); return; } } break; default: GL.recordError(0x0500); // GL_INVALID_ENUM return; } } switch (type) { case 'Integer64': (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((p)>>2)]=tempI64[0],HEAP32[(((p)+(4))>>2)]=tempI64[1]); break; case 'Integer': HEAP32[((p)>>2)]=ret; break; case 'Float': HEAPF32[((p)>>2)]=ret; break; case 'Boolean': HEAP8[((p)>>0)]=ret ? 1 : 0; break; default: throw 'internal glGet error, bad type: ' + type; } }function _glGetIntegerv(name_, p) { emscriptenWebGLGet(name_, p, 'Integer'); } function _glGetProgramInfoLog(program, maxLength, length, infoLog) { var log = GLctx.getProgramInfoLog(GL.programs[program]); if (log === null) log = '(unknown error)'; if (maxLength > 0 && infoLog) { var numBytesWrittenExclNull = stringToUTF8(log, infoLog, maxLength); if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; } else { if (length) HEAP32[((length)>>2)]=0; } } function _glGetProgramiv(program, pname, p) { if (!p) { // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x0501 /* GL_INVALID_VALUE */); return; } if (program >= GL.counter) { GL.recordError(0x0501 /* GL_INVALID_VALUE */); return; } var ptable = GL.programInfos[program]; if (!ptable) { GL.recordError(0x0502 /* GL_INVALID_OPERATION */); return; } if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH var log = GLctx.getProgramInfoLog(GL.programs[program]); if (log === null) log = '(unknown error)'; HEAP32[((p)>>2)]=log.length + 1; } else if (pname == 0x8B87 /* GL_ACTIVE_UNIFORM_MAX_LENGTH */) { HEAP32[((p)>>2)]=ptable.maxUniformLength; } else if (pname == 0x8B8A /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */) { if (ptable.maxAttributeLength == -1) { program = GL.programs[program]; var numAttribs = GLctx.getProgramParameter(program, 0x8B89/*GL_ACTIVE_ATTRIBUTES*/); ptable.maxAttributeLength = 0; // Spec says if there are no active attribs, 0 must be returned. for (var i = 0; i < numAttribs; ++i) { var activeAttrib = GLctx.getActiveAttrib(program, i); ptable.maxAttributeLength = Math.max(ptable.maxAttributeLength, activeAttrib.name.length+1); } } HEAP32[((p)>>2)]=ptable.maxAttributeLength; } else if (pname == 0x8A35 /* GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */) { if (ptable.maxUniformBlockNameLength == -1) { program = GL.programs[program]; var numBlocks = GLctx.getProgramParameter(program, 0x8A36/*GL_ACTIVE_UNIFORM_BLOCKS*/); ptable.maxUniformBlockNameLength = 0; for (var i = 0; i < numBlocks; ++i) { var activeBlockName = GLctx.getActiveUniformBlockName(program, i); ptable.maxUniformBlockNameLength = Math.max(ptable.maxUniformBlockNameLength, activeBlockName.length+1); } } HEAP32[((p)>>2)]=ptable.maxUniformBlockNameLength; } else { HEAP32[((p)>>2)]=GLctx.getProgramParameter(GL.programs[program], pname); } } function _glGetShaderInfoLog(shader, maxLength, length, infoLog) { var log = GLctx.getShaderInfoLog(GL.shaders[shader]); if (log === null) log = '(unknown error)'; if (maxLength > 0 && infoLog) { var numBytesWrittenExclNull = stringToUTF8(log, infoLog, maxLength); if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; } else { if (length) HEAP32[((length)>>2)]=0; } } function _glGetShaderiv(shader, pname, p) { if (!p) { // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x0501 /* GL_INVALID_VALUE */); return; } if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH var log = GLctx.getShaderInfoLog(GL.shaders[shader]); if (log === null) log = '(unknown error)'; HEAP32[((p)>>2)]=log.length + 1; } else if (pname == 0x8B88) { // GL_SHADER_SOURCE_LENGTH var source = GLctx.getShaderSource(GL.shaders[shader]); var sourceLength = (source === null || source.length == 0) ? 0 : source.length + 1; HEAP32[((p)>>2)]=sourceLength; } else { HEAP32[((p)>>2)]=GLctx.getShaderParameter(GL.shaders[shader], pname); } } function stringToNewUTF8(jsString) { var length = lengthBytesUTF8(jsString)+1; var cString = _malloc(length); stringToUTF8(jsString, cString, length); return cString; }function _glGetString(name_) { if (GL.stringCache[name_]) return GL.stringCache[name_]; var ret; switch(name_) { case 0x1F03 /* GL_EXTENSIONS */: var exts = GLctx.getSupportedExtensions(); var gl_exts = []; for (var i = 0; i < exts.length; ++i) { gl_exts.push(exts[i]); gl_exts.push("GL_" + exts[i]); } ret = stringToNewUTF8(gl_exts.join(' ')); break; case 0x1F00 /* GL_VENDOR */: case 0x1F01 /* GL_RENDERER */: case 0x9245 /* UNMASKED_VENDOR_WEBGL */: case 0x9246 /* UNMASKED_RENDERER_WEBGL */: var s = GLctx.getParameter(name_); if (!s) { GL.recordError(0x0500/*GL_INVALID_ENUM*/); } ret = stringToNewUTF8(s); break; case 0x1F02 /* GL_VERSION */: var glVersion = GLctx.getParameter(GLctx.VERSION); // return GLES version string corresponding to the version of the WebGL context { glVersion = 'OpenGL ES 2.0 (' + glVersion + ')'; } ret = stringToNewUTF8(glVersion); break; case 0x8B8C /* GL_SHADING_LANGUAGE_VERSION */: var glslVersion = GLctx.getParameter(GLctx.SHADING_LANGUAGE_VERSION); // extract the version number 'N.M' from the string 'WebGL GLSL ES N.M ...' var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/; var ver_num = glslVersion.match(ver_re); if (ver_num !== null) { if (ver_num[1].length == 3) ver_num[1] = ver_num[1] + '0'; // ensure minor version has 2 digits glslVersion = 'OpenGL ES GLSL ES ' + ver_num[1] + ' (' + glslVersion + ')'; } ret = stringToNewUTF8(glslVersion); break; default: GL.recordError(0x0500/*GL_INVALID_ENUM*/); return 0; } GL.stringCache[name_] = ret; return ret; } function _glGetUniformLocation(program, name) { name = UTF8ToString(name); var arrayIndex = 0; // If user passed an array accessor "[index]", parse the array index off the accessor. if (name[name.length - 1] == ']') { var leftBrace = name.lastIndexOf('['); arrayIndex = name[leftBrace+1] != ']' ? parseInt(name.slice(leftBrace + 1)) : 0; // "index]", parseInt will ignore the ']' at the end; but treat "foo[]" as "foo[0]" name = name.slice(0, leftBrace); } var uniformInfo = GL.programInfos[program] && GL.programInfos[program].uniforms[name]; // returns pair [ dimension_of_uniform_array, uniform_location ] if (uniformInfo && arrayIndex >= 0 && arrayIndex < uniformInfo[0]) { // Check if user asked for an out-of-bounds element, i.e. for 'vec4 colors[3];' user could ask for 'colors[10]' which should return -1. return uniformInfo[1] + arrayIndex; } else { return -1; } } function _glLinkProgram(program) { GLctx.linkProgram(GL.programs[program]); GL.populateUniformTable(program); } function _glShaderSource(shader, count, string, length) { var source = GL.getSource(shader, count, string, length); GLctx.shaderSource(GL.shaders[shader], source); } function __computeUnpackAlignedImageSize(width, height, sizePerPixel, alignment) { function roundedToNextMultipleOf(x, y) { return (x + y - 1) & -y; } var plainRowSize = width * sizePerPixel; var alignedRowSize = roundedToNextMultipleOf(plainRowSize, alignment); return height * alignedRowSize; } var __colorChannelsInGlTextureFormat={6402:1,6406:1,6407:3,6408:4,6409:1,6410:2,35904:3,35906:4}; var __sizeOfGlTextureElementType={5121:1,5123:2,5125:4,5126:4,32819:2,32820:2,33635:2,34042:4,36193:2};function emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) { var sizePerPixel = __colorChannelsInGlTextureFormat[format] * __sizeOfGlTextureElementType[type]; if (!sizePerPixel) { GL.recordError(0x0500); // GL_INVALID_ENUM return; } var bytes = __computeUnpackAlignedImageSize(width, height, sizePerPixel, GL.unpackAlignment); var end = pixels + bytes; switch(type) { case 0x1401 /* GL_UNSIGNED_BYTE */: return HEAPU8.subarray(pixels, end); case 0x1406 /* GL_FLOAT */: return HEAPF32.subarray(pixels>>2, end>>2); case 0x1405 /* GL_UNSIGNED_INT */: case 0x84FA /* GL_UNSIGNED_INT_24_8_WEBGL/GL_UNSIGNED_INT_24_8 */: return HEAPU32.subarray(pixels>>2, end>>2); case 0x1403 /* GL_UNSIGNED_SHORT */: case 0x8363 /* GL_UNSIGNED_SHORT_5_6_5 */: case 0x8033 /* GL_UNSIGNED_SHORT_4_4_4_4 */: case 0x8034 /* GL_UNSIGNED_SHORT_5_5_5_1 */: case 0x8D61 /* GL_HALF_FLOAT_OES */: return HEAPU16.subarray(pixels>>1, end>>1); default: GL.recordError(0x0500); // GL_INVALID_ENUM } }function _glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null); } function _glTexParameteri(x0, x1, x2) { GLctx['texParameteri'](x0, x1, x2) } function _glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) { var pixelData = null; if (pixels) pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, 0); GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixelData); } function _glUniform1f(location, v0) { GLctx.uniform1f(GL.uniforms[location], v0); } function _glUniform2f(location, v0, v1) { GLctx.uniform2f(GL.uniforms[location], v0, v1); } function _glUniform3f(location, v0, v1, v2) { GLctx.uniform3f(GL.uniforms[location], v0, v1, v2); } function _glUniformMatrix4fv(location, count, transpose, value) { if (16*count <= GL.MINI_TEMP_BUFFER_SIZE) { // avoid allocation when uploading few enough uniforms var view = GL.miniTempBufferViews[16*count-1]; for (var i = 0; i < 16*count; i += 16) { view[i] = HEAPF32[(((value)+(4*i))>>2)]; view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; view[i+9] = HEAPF32[(((value)+(4*i+36))>>2)]; view[i+10] = HEAPF32[(((value)+(4*i+40))>>2)]; view[i+11] = HEAPF32[(((value)+(4*i+44))>>2)]; view[i+12] = HEAPF32[(((value)+(4*i+48))>>2)]; view[i+13] = HEAPF32[(((value)+(4*i+52))>>2)]; view[i+14] = HEAPF32[(((value)+(4*i+56))>>2)]; view[i+15] = HEAPF32[(((value)+(4*i+60))>>2)]; } } else { var view = HEAPF32.subarray((value)>>2,(value+count*64)>>2); if (GL.currentContext.cannotHandleOffsetsInUniformArrayViews) view = new Float32Array(view); } GLctx.uniformMatrix4fv(GL.uniforms[location], !!transpose, view); } function _glUseProgram(program) { GLctx.useProgram(GL.programs[program]); } function _glVertexAttribPointer(index, size, type, normalized, stride, ptr) { GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr); } function _glViewport(x0, x1, x2, x3) { GLctx['viewport'](x0, x1, x2, x3) } function _interop_AddClipboardListeners() { // Copy text, but only if user isn't selecting something else on the webpage // (don't check window.clipboardData here, that's handled in interop_TrySetClipboardText instead) window.addEventListener('copy', function(e) { if (window.getSelection && window.getSelection().toString()) return; ccall('Window_RequestClipboardText', 'void'); if (!window.cc_copyText) return; if (e.clipboardData) { e.clipboardData.setData('text/plain', window.cc_copyText); e.preventDefault(); } window.cc_copyText = null; }); // Paste text (window.clipboardData is handled in interop_TryGetClipboardText instead) window.addEventListener('paste', function(e) { if (e.clipboardData) { var contents = e.clipboardData.getData('text/plain'); ccall('Window_GotClipboardText', 'void', ['string'], [contents]); } }); } function _interop_AdjustXY(x, y) { var canvasRect = CCModule['canvas'].getBoundingClientRect(); HEAP32[x >> 2] = HEAP32[x >> 2] - canvasRect.left; HEAP32[y >> 2] = HEAP32[y >> 2] - canvasRect.top; } function _interop_AsyncDownloadTexturePack(rawPath, rawUrl) { var path = UTF8ToString(rawPath); var url = UTF8ToString(rawUrl); CCModule.setStatus('Downloading textures.. (1/2)'); CCModule.readAsync(url, function(buffer) { // onload CCFS.writeFile(path, new Uint8Array(buffer)); ccall('main_phase1', 'void'); }, function() { // onerror ccall('main_phase1', 'void'); } ); } function _IDBFS_getDB(callback) { var db = window.IDBFS_db; if (db) return callback(null, db); IDBFS_DB_VERSION = 21; IDBFS_DB_STORE_NAME = "FILE_DATA"; var idb = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; if (!idb) return callback("IndexedDB unsupported"); var req; try { req = idb.open('/classicube', IDBFS_DB_VERSION); } catch (e) { return callback(e); } if (!req) return callback("Unable to connect to IndexedDB"); req.onupgradeneeded = function(e) { var db = e.target.result; var transaction = e.target.transaction; var fileStore; if (db.objectStoreNames.contains(IDBFS_DB_STORE_NAME)) { fileStore = transaction.objectStore(IDBFS_DB_STORE_NAME); } else { fileStore = db.createObjectStore(IDBFS_DB_STORE_NAME); } if (!fileStore.indexNames.contains('timestamp')) { fileStore.createIndex('timestamp', 'timestamp', { unique: false }); } }; req.onsuccess = function() { db = req.result; window.IDBFS_db = db; // browser will sometimes close connection behind the scenes db.onclose = function(ev) { console.log('IndexedDB connection closed unexpectedly!'); window.IDBFS_db = null; } callback(null, db); }; req.onerror = function(e) { callback(this.error); e.preventDefault(); }; }function _IDBFS_getRemoteSet(callback) { var entries = {}; _IDBFS_getDB(function(err, db) { if (err) return callback(err); try { var transaction = db.transaction([IDBFS_DB_STORE_NAME], 'readonly'); transaction.onerror = function(e) { callback(this.error); e.preventDefault(); }; var store = transaction.objectStore(IDBFS_DB_STORE_NAME); var index = store.index('timestamp'); index.openKeyCursor().onsuccess = function(event) { var cursor = event.target.result; if (!cursor) { return callback(null, { type: 'remote', db: db, entries: entries }); } entries[cursor.primaryKey] = { timestamp: cursor.key }; cursor.continue(); }; } catch (e) { return callback(e); } }); } function _IDBFS_loadRemoteEntry(store, path, callback) { var req = store.get(path); req.onsuccess = function(event) { callback(null, event.target.result); }; req.onerror = function(e) { callback(this.error); e.preventDefault(); }; } function _IDBFS_storeLocalEntry(path, entry, callback) { try { // ignore directories from IndexedDB created in older game versions if (CCFS.isFile(entry.mode)) { CCFS.writeFile(path, entry.contents); CCFS.utime(path, entry.timestamp); } } catch (e) { return callback(e); } callback(null); }function _IDBFS_reconcile(src, callback) { var total = 0; var create = []; Object.keys(src.entries).forEach(function (key) { create.push(key); total++; }); if (!total) return callback(null); var errored = false; var completed = 0; var transaction = src.db.transaction([IDBFS_DB_STORE_NAME], 'readwrite'); var store = transaction.objectStore(IDBFS_DB_STORE_NAME); function done(err) { if (err) { if (!done.errored) { done.errored = true; return callback(err); } return; } if (++completed >= total) { return callback(null); } }; transaction.onerror = function(e) { done(this.error); e.preventDefault(); }; // sort paths in ascending order so directory entries are created // before the files inside them create.sort().forEach(function (path) { _IDBFS_loadRemoteEntry(store, path, function (err, entry) { if (err) return done(err); _IDBFS_storeLocalEntry(path, entry, done); }); }); }function _IDBFS_loadFS(callback) { _IDBFS_getRemoteSet(function(err, remote) { if (err) return callback(err); _IDBFS_reconcile(remote, callback); }); }function _interop_AsyncLoadIndexedDB() { CCModule.setStatus('Preloading filesystem.. (2/2)'); _IDBFS_loadFS(function(err) { if (err) window.cc_idbErr = err; ccall('main_phase2', 'void'); }); } function _interop_AudioClose(ctxID) { var src = AUDIO.sources[ctxID - 1|0]; if (src.source) src.source.stop(); AUDIO.sources[ctxID - 1|0] = null; } function _interop_AudioCreate() { var src = { source: null, gain: null, playing: false, }; AUDIO.sources.push(src); return AUDIO.sources.length|0; // NOTE: 0 is used by Audio.c for "no source" } function _interop_AudioDescribe(errCode, buffer, bufferLen) { if (errCode > AUDIO.errors.length) return 0; var str = AUDIO.errors[errCode - 1]; return stringToUTF8(str, buffer, bufferLen); } function _interop_AudioDownload(name) { var xhr = new XMLHttpRequest(); xhr.open('GET', '/static/sounds/' + name + '.wav', true); xhr.responseType = 'arraybuffer'; xhr.onload = function() { var data = xhr.response; AUDIO.context.decodeAudioData(data, function(buffer) { AUDIO.buffers[name] = buffer; }); }; xhr.send(); }function _interop_AudioPlay(ctxID, sndID, volume, rate) { var src = AUDIO.sources[ctxID - 1|0]; var name = UTF8ToString(sndID); // do we need to download this file? if (!AUDIO.seen.hasOwnProperty(name)) { AUDIO.seen[name] = true; _interop_AudioDownload(name); return 0; } // still downloading or failed to download this file var buffer = AUDIO.buffers[name]; if (!buffer) return 0; try { if (!src.gain) src.gain = AUDIO.context.createGain(); // AudioBufferSourceNode only allows the buffer property // to be assigned *ONCE* (throws InvalidStateError next time) // MDN says that these nodes are very inexpensive to create though // https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode src.source = AUDIO.context.createBufferSource(); src.source.buffer = buffer; src.gain.gain.value = volume / 100; src.source.playbackRate.value = rate / 100; // source -> gain -> output src.source.connect(src.gain); src.gain.connect(AUDIO.context.destination); src.source.start(); return 0; } catch (err) { return _interop_AudioLog(err) } } function _interop_AudioPoll(ctxID, inUse) { var src = AUDIO.sources[ctxID - 1|0]; HEAP32[inUse >> 2] = src.playing; // only 1 buffer return 0; } function _interop_CanvasHeight() { return CCModule['canvas'].height; } function _interop_CanvasWidth() { return CCModule['canvas'].width; } function _interop_CloseKeyboard() { if (!window.cc_inputElem) return; window.cc_container.removeChild(window.cc_divElem); window.cc_container.removeChild(window.cc_inputElem); window.cc_divElem = null; window.cc_inputElem = null; } function _interop_DirectoryIter(raw) { var path = UTF8ToString(raw); try { var entries = CCFS.readdir(path); for (var i = 0; i < entries.length; i++) { var path = entries[i]; // absolute path to root relative path if (path.indexOf(CCFS.currentPath) === 0) { path = path.substring(CCFS.currentPath.length + 1); } ccall('Directory_IterCallback', 'void', ['string'], [path]); } return 0; } catch (e) { if (!(e instanceof CCFS.ErrnoError)) abort(e); return -e.errno; } } function _interop_DirectorySetWorking(raw) { var path = UTF8ToString(raw); CCFS.chdir(path); } function _interop_DownloadAsync(urlStr, method, reqID) { // onFinished = FUNC(data, len, status) // onProgress = FUNC(read, total) var url = UTF8ToString(urlStr); var reqMethod = method == 1 ? 'HEAD' : 'GET'; var onFinished = CCModule["_Http_OnFinishedAsync"]; var onProgress = CCModule["_Http_OnUpdateProgress"]; var xhr = new XMLHttpRequest(); try { url = url.replace("http://classicube.s3.amazonaws.com", "/Program Files/ClassiCube"); url = url.replace("https://classicube.s3.amazonaws.com", "/Program Files/ClassiCube"); xhr.open(reqMethod, url); } catch (e) { // DOMException gets thrown when invalid URL provided. Test cases: // http://%7https://www.example.com/test.zip // http://example:app/test.zip console.log(e); return 1; } xhr.responseType = 'arraybuffer'; var getContentLength = function(e) { if (e.total) return e.total; try { var len = xhr.getResponseHeader('Content-Length'); return parseInt(len, 10); } catch (ex) { return 0; } }; xhr.onload = function(e) { var src = new Uint8Array(xhr.response); var len = src.byteLength; var data = _malloc(len); HEAPU8.set(src, data); onFinished(reqID, data, len || getContentLength(e), xhr.status); }; xhr.onerror = function(e) { onFinished(reqID, 0, 0, xhr.status); }; xhr.ontimeout = function(e) { onFinished(reqID, 0, 0, xhr.status); }; xhr.onprogress = function(e) { onProgress(reqID, e.loaded, e.total); }; try { xhr.send(); } catch (e) { onFinished(reqID, 0, 0, 0); } return 0; } function _interop_SaveBlob(blob, name) { if (window.navigator.msSaveBlob) { window.navigator.msSaveBlob(blob, name); return; } var url = window.URL.createObjectURL(blob); var elem = document.createElement('a'); elem.href = url; elem.download = name; elem.style.display = 'none'; document.body.appendChild(elem); elem.click(); document.body.removeChild(elem); window.URL.revokeObjectURL(url); } function _interop_ShowSaveDialog(filename, filters, titles) { // not supported by all browsers if (!window.showSaveFilePicker) return 0; var fileTypes = []; for (var i = 0; HEAP32[(filters>>2)+i|0]; i++) { var filter = HEAP32[(filters>>2)+i|0]; var title = HEAP32[(titles >>2)+i|0]; var filetype = { description: UTF8ToString(title), accept: {'applicaion/octet-stream': [UTF8ToString(filter)]} }; fileTypes.push(filetype); } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises // https://web.dev/file-system-access/ var path = null; var opts = { suggestedName: UTF8ToString(filename), types: fileTypes }; window.showSaveFilePicker(opts) .then(function(fileHandle) { path = 'Downloads/' + fileHandle.name; return fileHandle.createWritable(); }) .then(function(writable) { ccall('Window_OnFileUploaded', 'void', ['string'], [path]); var data = CCFS.readFile(path); writable.write(data); return writable.close(); }) .catch(function(error) { ccall('Platform_LogError', 'void', ['string'], ['&cError downloading file']); ccall('Platform_LogError', 'void', ['string'], [' &c' + err]); }) .finally(function(result) { if (path) CCFS.unlink(path); }); return 1; }function _interop_DownloadFile(filename, filters, titles) { try { if (_interop_ShowSaveDialog(filename, filters, titles)) return 0; var name = UTF8ToString(filename); var path = 'Downloads/' + name; ccall('Window_OnFileUploaded', 'void', ['string'], [path]); var data = CCFS.readFile(path); var blob = new Blob([data], { type: 'application/octet-stream' }); _interop_SaveBlob(blob, UTF8ToString(filename)); CCFS.unlink(path); return 0; } catch (e) { if (!(e instanceof CCFS.ErrnoError)) abort(e); return e.errno; } } function _interop_EnterFullscreen() { // emscripten sets css size to screen's base width/height, // except that becomes wrong when device rotates. // Better to just set CSS width/height to always be 100% var canvas = CCModule['canvas']; canvas.style.width = '100%'; canvas.style.height = '100%'; // By default, pressing Escape will immediately exit fullscreen - which is // quite annoying given that it is also the Menu key. Some browsers allow // 'locking' the Escape key, so that you have to hold down Escape to exit. // NOTE: This ONLY works when the webpage is a https:// one try { navigator.keyboard.lock(["Escape"]); } catch (ex) { } } function _interop_FS_Init() { if (window.CCFS) return; window.MEMFS={ createNode:function(path) { var node = CCFS.createNode(path); node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity. // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme. node.contents = null; node.timestamp = Date.now(); return node; }, getFileDataAsTypedArray:function(node) { if (!node.contents) return new Uint8Array; if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. return new Uint8Array(node.contents); }, expandFileStorage:function(node, newCapacity) { var prevCapacity = node.contents ? node.contents.length : 0; if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough. // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity. // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to // avoid overshooting the allocation cap by a very large margin. var CAPACITY_DOUBLING_MAX = 1024 * 1024; newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) | 0); if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding. var oldContents = node.contents; node.contents = new Uint8Array(newCapacity); // Allocate new storage. if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage. return; }, clearFileStorage:function(node) { node.contents = null; // Fully decommit when requesting a resize to zero. node.usedBytes = 0; }, stream_read:function(stream, buffer, offset, length, position) { var contents = stream.node.contents; if (position >= stream.node.usedBytes) return 0; var size = Math.min(stream.node.usedBytes - position, length); assert(size >= 0); if (size > 8 && contents.subarray) { // non-trivial, and typed array buffer.set(contents.subarray(position, position + size), offset); } else { for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; } return size; }, stream_write:function(stream, buffer, offset, length, position, canOwn) { if (!length) return 0; var node = stream.node; var chunk = buffer.subarray(offset, offset + length); node.timestamp = Date.now(); if (canOwn) { // NOTE: buffer cannot be a part of the memory buffer (i.e. HEAP8) // - don't want to hold on to references of the memory Buffer, // as they may get invalidated. assert(position === 0, 'canOwn must imply no weird position inside the file'); node.contents = chunk; node.usedBytes = length; } else if (node.usedBytes === 0 && position === 0) { // First write to an empty file, do a fast set since don't need to care about old data node.contents = new Uint8Array(chunk); node.usedBytes = length; } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file node.contents.set(chunk, position); } else { // Appending to an existing file and we need to reallocate MEMFS.expandFileStorage(node, position+length); node.contents.set(chunk, position); node.usedBytes = Math.max(node.usedBytes, position+length); } return length; } }; window.CCFS={ streams:[],entries:{},currentPath:"/",ErrnoError:null, resolvePath:function(path) { if (path.charAt(0) !== '/') { path = CCFS.currentPath + '/' + path; } return path; }, lookupPath:function(path) { path = CCFS.resolvePath(path); var node = CCFS.entries[path]; if (!node) throw new CCFS.ErrnoError(2); return { path: path, node: node }; }, createNode:function(path) { var node = { path: path }; CCFS.entries[path] = node; return node; }, MODE_TYPE_FILE:32768, isFile:function(mode) { return (mode & 61440) === CCFS.MODE_TYPE_FILE; }, nextfd:function() { // max 4096 open files for (var fd = 0; fd <= 4096; fd++) { if (!CCFS.streams[fd]) return fd; } throw new CCFS.ErrnoError(24); }, getStream:function(fd) { return CCFS.streams[fd]; }, createStream:function(stream) { var fd = CCFS.nextfd(); stream.fd = fd; CCFS.streams[fd] = stream; return stream; }, readdir:function(path) { path = CCFS.resolvePath(path) + '/'; // all entries starting with given directory var entries = []; for (var entry in CCFS.entries) { if (entry.indexOf(path) !== 0) continue; entries.push(entry); } return entries; }, unlink:function(path) { var lookup = CCFS.lookupPath(path); delete CCFS.entries[lookup.path]; }, utime:function(path, mtime) { var lookup = CCFS.lookupPath(path); var node = lookup.node; node.timestamp = mtime; }, open:function(path, flags) { path = CCFS.resolvePath(path); var node = CCFS.entries[path]; // perhaps we need to create the node var created = false; if ((flags & 64)) { if (node) { // if O_CREAT and O_EXCL are set, error out if the node already exists if ((flags & 128)) { throw new CCFS.ErrnoError(17); } } else { // node doesn't exist, try to create it node = MEMFS.createNode(path); created = true; } } if (!node) { throw new CCFS.ErrnoError(2); } // do truncation if necessary if ((flags & 512)) { MEMFS.clearFileStorage(node); node.timestamp = Date.now(); } // we've already handled these, don't pass down to the underlying vfs flags &= ~(128 | 512); // register the stream with the filesystem var stream = CCFS.createStream({ node: node, path: path, flags: flags, position: 0 }); return stream; }, close:function(stream) { if (CCFS.isClosed(stream)) { throw new CCFS.ErrnoError(9); } CCFS.streams[stream.fd] = null; stream.fd = null; }, isClosed:function(stream) { return stream.fd === null; }, llseek:function(stream, offset, whence) { if (CCFS.isClosed(stream)) { throw new CCFS.ErrnoError(9); } var position = offset; if (whence === 0) { // SEEK_SET // beginning of file, no need to add anything } else if (whence === 1) { // SEEK_CUR position += stream.position; } else if (whence === 2) { // SEEK_END position += stream.node.usedBytes; } if (position < 0) { throw new CCFS.ErrnoError(22); } stream.position = position; return stream.position; }, read:function(stream, buffer, offset, length) { if (length < 0) { throw new CCFS.ErrnoError(22); } if (CCFS.isClosed(stream)) { throw new CCFS.ErrnoError(9); } if ((stream.flags & 2097155) === 1) { throw new CCFS.ErrnoError(9); } var position = stream.position; var bytesRead = MEMFS.stream_read(stream, buffer, offset, length, position); stream.position += bytesRead; return bytesRead; }, write:function(stream, buffer, offset, length, canOwn) { if (length < 0) { throw new CCFS.ErrnoError(22); } if (CCFS.isClosed(stream)) { throw new CCFS.ErrnoError(9); } if ((stream.flags & 2097155) === 0) { throw new CCFS.ErrnoError(9); } if (stream.flags & 1024) { // seek to the end before writing in append mode CCFS.llseek(stream, 0, 2); } var position = stream.position; var bytesWritten = MEMFS.stream_write(stream, buffer, offset, length, position, canOwn); stream.position += bytesWritten; return bytesWritten; }, readFile:function(path, opts) { opts = opts || {}; opts.encoding = opts.encoding || 'binary'; var ret; var stream = CCFS.open(path, 0); // O_RDONLY var length = stream.node.usedBytes; var buf = new Uint8Array(length); CCFS.read(stream, buf, 0, length); if (opts.encoding === 'utf8') { ret = UTF8ArrayToString(buf, 0); } else if (opts.encoding === 'binary') { ret = buf; } else { throw new Error('Invalid encoding type "' + opts.encoding + '"'); } CCFS.close(stream); return ret; }, writeFile:function(path, data) { var stream = CCFS.open(path, 577); // O_WRONLY | O_CREAT | O_TRUNC if (typeof data === 'string') { var buf = new Uint8Array(lengthBytesUTF8(data)+1); var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); CCFS.write(stream, buf, 0, actualNumBytes, true); } else if (ArrayBuffer.isView(data)) { CCFS.write(stream, data, 0, data.byteLength, true); } else { throw new Error('Unsupported data type'); } CCFS.close(stream); }, chdir:function(path) { CCFS.currentPath = CCFS.resolvePath(path); }, ensureErrnoError:function() { CCFS.ErrnoError = function ErrnoError(errno, node) { this.node = node; this.errno = errno; }; CCFS.ErrnoError.prototype = new Error(); CCFS.ErrnoError.prototype.constructor = CCFS.ErrnoError; }}; CCFS.ensureErrnoError(); } function _IDBFS_storeRemoteEntry(store, path, entry, callback) { var req = store.put(entry, path); req.onsuccess = function() { callback(null); }; req.onerror = function(e) { callback(this.error); e.preventDefault(); }; }function _interop_SaveNode(path) { var callback = function(err) { if (!err) return; console.log(err); ccall('Platform_LogError', 'void', ['string'], ['&cError saving ' + path]); ccall('Platform_LogError', 'void', ['string'], [' &c' + err]); }; var stat, node, entry; try { var lookup = CCFS.lookupPath(path); node = lookup.node; // Performance consideration: storing a normal JavaScript array to a IndexedDB is much slower than storing a typed array. // Therefore always convert the file contents to a typed array first before writing the data to IndexedDB. node.contents = MEMFS.getFileDataAsTypedArray(node); entry = { timestamp: node.timestamp, mode: CCFS.MODE_TYPE_FILE, contents: node.contents }; } catch (err) { return callback(err); } _IDBFS_getDB(function(err, db) { if (err) return callback(err); var transaction, store; // can still throw errors here try { transaction = db.transaction([IDBFS_DB_STORE_NAME], 'readwrite'); store = transaction.objectStore(IDBFS_DB_STORE_NAME); } catch (err) { return callback(err); } transaction.onerror = function(e) { callback(this.error); e.preventDefault(); }; _IDBFS_storeRemoteEntry(store, path, entry, callback); }); }function _interop_FileClose(fd) { try { var stream = CCFS.getStream(fd); CCFS.close(stream); // save writable files to IndexedDB (check for O_RDWR) if ((stream.flags & 3) == 2) _interop_SaveNode(stream.path); return 0; } catch (e) { if (!(e instanceof CCFS.ErrnoError)) abort(e); return -e.errno; } } function _interop_FileCreate(raw, flags) { var path = UTF8ToString(raw); try { var stream = CCFS.open(path, flags); return stream.fd|0; } catch (e) { if (!(e instanceof CCFS.ErrnoError)) abort(e); return -e.errno; } } function _interop_FileExists(raw) { var path = UTF8ToString(raw); path = CCFS.resolvePath(path); return path in CCFS.entries; } function _interop_FileLength(fd) { try { var stream = CCFS.getStream(fd); return stream.node.usedBytes|0; } catch (e) { if (!(e instanceof CCFS.ErrnoError)) abort(e); return -e.errno; } } function _interop_FileRead(fd, dst, count) { try { var stream = CCFS.getStream(fd); return CCFS.read(stream, HEAP8, dst, count)|0; } catch (e) { if (!(e instanceof CCFS.ErrnoError)) abort(e); return -e.errno; } } function _interop_FileSeek(fd, offset, whence) { try { var stream = CCFS.getStream(fd); return CCFS.llseek(stream, offset, whence)|0; } catch (e) { if (!(e instanceof CCFS.ErrnoError)) abort(e); return -e.errno; } } function _interop_FileWrite(fd, src, count) { try { var stream = CCFS.getStream(fd); return CCFS.write(stream, HEAP8, src, count)|0; } catch (e) { if (!(e instanceof CCFS.ErrnoError)) abort(e); return -e.errno; } } function _interop_ForceTouchPageLayout() { if (typeof(forceTouchLayout) === 'function') forceTouchLayout(); } function _interop_GetContainerID() { // For chrome on android, need to make container div fullscreen instead return document.getElementById('canvas_wrapper') ? 1 : 0; } function _interop_GetGpuRenderer(buffer, len) { var dbg = GLctx.getExtension('WEBGL_debug_renderer_info'); var str = dbg ? GLctx.getParameter(dbg.UNMASKED_RENDERER_WEBGL) : ""; stringToUTF8(str, buffer, len); } function _interop_GetLocalTime(time) { var date = new Date(); HEAP32[(time|0 + 0)>>2] = date.getFullYear(); HEAP32[(time|0 + 4)>>2] = date.getMonth() + 1|0; HEAP32[(time|0 + 8)>>2] = date.getDate(); HEAP32[(time|0 + 12)>>2] = date.getHours(); HEAP32[(time|0 + 16)>>2] = date.getMinutes(); HEAP32[(time|0 + 20)>>2] = date.getSeconds(); } function _interop_AudioLog(err) { console.log(err); window.AUDIO.errors.push(''+err); return window.AUDIO.errors.length|0; }function _interop_InitAudio() { window.AUDIO = window.AUDIO || { context: null, sources: [], buffers: {}, errors: [], seen: {}, }; if (window.AUDIO.context) return 0; try { if (window.AudioContext) { AUDIO.context = new window.AudioContext(); } else { AUDIO.context = new window.webkitAudioContext(); } return 0; } catch (err) { return _interop_AudioLog(err) } } function _interop_InitContainer() { // Create wrapper div if necessary (so input textbox shows in fullscreen on android) var agent = navigator.userAgent; var canvas = CCModule['canvas']; window.cc_container = document.body; if (/Android/i.test(agent)) { var wrapper = document.createElement("div"); wrapper.id = 'canvas_wrapper'; canvas.parentNode.insertBefore(wrapper, canvas); wrapper.appendChild(canvas); window.cc_container = wrapper; } } function _interop_InitFilesystem(buffer) { if (!window.cc_idbErr) return; var msg = 'Error preloading IndexedDB:' + window.cc_idbErr + '\n\nPreviously saved settings/maps will be lost'; ccall('Platform_LogError', 'void', ['string'], [msg]); } function _interop_InitCCModule() { // these are required for older versions of emscripten, but the compiler removes // this by default as no syscalls are used by the C platform code anymore window.ERRNO_CODES={EPERM:1,ENOENT:2,EIO:5,ENXIO:6,EBADF:9,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EEXIST:17,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,EBADFD:77,ENOTEMPTY:39}; } function _interop_InitSockets() { window.SOCKETS = { EBADF:-8,EISCONN:-30,ENOTCONN:-53,EAGAIN:-6,EHOSTUNREACH:-23,EINPROGRESS:-26,EALREADY:-7,ECONNRESET:-15,EINVAL:-28,ECONNREFUSED:-14, sockets: [], }; } function _interop_IsAndroid() { return /Android/i.test(navigator.userAgent); } function _interop_IsHttpsOnly() { // If this webpage is https://, browsers deny any http:// downloading return location.protocol === 'https:'; } function _interop_IsIOS() { // iOS 13 on iPad doesn't identify itself as iPad by default anymore // https://stackoverflow.com/questions/57765958/how-to-detect-ipad-and-ipad-os-version-in-ios-13-and-up return /iPhone|iPad|iPod/i.test(navigator.userAgent) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints && navigator.maxTouchPoints > 2); } function _interop_LoadIndexedDB() { // previously you were required to add interop_LoadIndexedDB to CCModule.preRun array // to load the indexedDB asynchronously *before* starting ClassiCube, because it // could not load indexedDB asynchronously // however, as ClassiCube now loads IndexedDB asynchronously itself, this is no longer // necessary, but is kept arounf foe backwards compatibility } function _interop_Log(msg, len) { const decodedMsg = UTF8ArrayToString(HEAPU8, msg, len); if (decodedMsg.startsWith("Adding ") || decodedMsg.startsWith("Fetching ")) return; CCModule.print(decodedMsg); } function _interop_OpenFileDialog(filter, action, folder) { var elem = window.cc_uploadElem; var root = UTF8ToString(folder); if (!elem) { elem = document.createElement('input'); elem.setAttribute('type', 'file'); elem.setAttribute('style', 'display: none'); elem.accept = UTF8ToString(filter); elem.addEventListener('change', function(ev) { var files = ev.target.files; for (var i = 0; i < files.length; i++) { var reader = new FileReader(); var name = files[i].name; reader.onload = function(e) { var data = new Uint8Array(e.target.result); var path = root + '/' + name; CCFS.writeFile(path, data); ccall('Window_OnFileUploaded', 'void', ['string'], [path]); if (action == 0) CCFS.unlink(path); // OFD_UPLOAD_DELETE if (action == 1) _interop_SaveNode(path); // OFD_UPLOAD_PERSIST }; reader.readAsArrayBuffer(files[i]); } window.cc_container.removeChild(window.cc_uploadElem); window.cc_uploadElem = null; }, false); window.cc_uploadElem = elem; window.cc_container.appendChild(elem); } elem.click(); } function _interop_OpenKeyboard(text, flags, placeholder) { var elem = window.cc_inputElem; var shown = true; var type = flags & 0xFF; if (!elem) { if (type == 1) { // KEYBOARD_TYPE_NUMBER elem = document.createElement('input'); elem.setAttribute('type', 'text') elem.setAttribute('inputmode', 'decimal'); } else if (type == 3) { // KEYBOARD_TYPE_INTEGER elem = document.createElement('input'); elem.setAttribute('type', 'text') elem.setAttribute('inputmode', 'numeric'); // Fix for older iOS safari where inputmode is unsupported // https://news.ycombinator.com/item?id=22433654 // https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/ elem.setAttribute('pattern', '[0-9]*'); } else { elem = document.createElement('textarea'); } shown = false; } if (flags & 0x100) { elem.setAttribute('enterkeyhint', 'send'); } //elem.setAttribute('style', 'position:absolute; left:0.5%; bottom:1%; margin: 0px; width: 99%; background-color: #080808; border: none; color: white; opacity: 0.7'); elem.setAttribute('style', 'position:absolute; left:0; bottom:0; margin: 0px; width: 100%; background-color: #222222; border: none; color: white;'); elem.setAttribute('placeholder', UTF8ToString(placeholder)); elem.value = UTF8ToString(text); if (!shown) { // stop event propagation, because we don't want the game trying to handle these events elem.addEventListener('touchstart', function(ev) { ev.stopPropagation(); }, false); elem.addEventListener('touchmove', function(ev) { ev.stopPropagation(); }, false); elem.addEventListener('mousedown', function(ev) { ev.stopPropagation(); }, false); elem.addEventListener('mousemove', function(ev) { ev.stopPropagation(); }, false); elem.addEventListener('input', function(ev) { ccall('Window_OnTextChanged', 'void', ['string'], [ev.target.value]); }, false); window.cc_inputElem = elem; window.cc_divElem = document.createElement('div'); window.cc_divElem.setAttribute('style', 'position:absolute; left:0; top:0; width:100%; height:100%; background-color: black; opacity:0.4; resize:none; pointer-events:none;'); window.cc_container.appendChild(window.cc_divElem); window.cc_container.appendChild(elem); } // force on-screen keyboard to be shown elem.focus(); elem.click(); } function _interop_OpenTab(url) { try { window.open(UTF8ToString(url)); } catch (e) { // DOMException gets thrown when invalid URL provided. Test cases: // http://example:app/test.zip console.log(e); return 1; } return 0; } function _interop_RequestCanvasResize() { if (typeof(resizeGameCanvas) === 'function') resizeGameCanvas(); } function _interop_ScreenHeight() { return screen.height; } function _interop_ScreenWidth() { return screen.width; } function _interop_SetFont(fontStr, size, flags) { if (!window.FONT_CANVAS) { window.FONT_CANVAS = document.createElement('canvas'); window.FONT_CONTEXT = window.FONT_CANVAS.getContext('2d'); } var prefix = ''; if (flags & 1) prefix += 'Bold '; size += 4; // adjust font size so text appears more like FreeType var font = UTF8ToString(fontStr); var ctx = window.FONT_CONTEXT; ctx.font = prefix + size + 'px ' + font; ctx.textAlign = 'left'; ctx.textBaseline = 'top'; return ctx; } function _interop_SetKeyboardText(text) { if (!window.cc_inputElem) return; var str = UTF8ToString(text); var cur = window.cc_inputElem.value; // when pressing 'Go' on the on-screen keyboard, some web browsers add \n to value if (cur.length && cur[cur.length - 1] == '\n') { cur = cur.substring(0, cur.length - 1); } if (str != cur) window.cc_inputElem.value = str; } function _interop_SetPageTitle(title) { document.title = UTF8ToString(title); } function _interop_ShowDialog(title, msg) { alert(UTF8ToString(title) + "\n\n" + UTF8ToString(msg)); } function _interop_SocketClose(sockFD) { var sock = SOCKETS.sockets[sockFD]; if (!sock) return SOCKETS.EBADF; try { sock.socket.close(); } catch (e) { } delete sock.socket; return 0; } function _interop_SocketConnect(sockFD, raw, port) { var addr = UTF8ToString(raw); var sock = SOCKETS.sockets[sockFD]; if (!sock) return SOCKETS.EBADF; // already connecting or connected var ws = sock.socket; if (ws) { if (ws.readyState === ws.CONNECTING) return SOCKETS.EALREADY; return SOCKETS.EISCONN; } // create the actual websocket object and connect try { var parts = addr.split('/'); var proto = _interop_IsHttpsOnly() ? 'wss://' : 'ws://'; var url = proto + parts[0] + ":" + port + "/" + parts.slice(1).join('/'); ws = new WebSocket(url, 'ClassiCube'); ws.binaryType = 'arraybuffer'; } catch (e) { return SOCKETS.EHOSTUNREACH; } sock.socket = ws; ws.onopen = function() {}; ws.onclose = function() {}; ws.onmessage = function(event) { var data = event.data; if (typeof data === 'string') { var encoder = new TextEncoder(); // should be utf-8 data = encoder.encode(data); // make a typed array from the string } else { assert(data.byteLength !== undefined); // must receive an ArrayBuffer if (data.byteLength == 0) { // An empty ArrayBuffer will emit a pseudo disconnect event // as recv/recvmsg will return zero which indicates that a socket // has performed a shutdown although the connection has not been disconnected yet. return; } else { data = new Uint8Array(data); // make a typed array view on the array buffer } } sock.recv_queue.push(data); }; ws.onerror = function(error) { // The WebSocket spec only allows a 'simple event' to be thrown on error, // so we only really know as much as ECONNREFUSED. sock.error = -SOCKETS.ECONNREFUSED; // Used by interop_SocketGetError }; // always "fail" in non-blocking mode return SOCKETS.EINPROGRESS; } function _interop_SocketCreate() { var sock = { error: null, // Used by interop_SocketGetError recv_queue: [], socket: null, }; SOCKETS.sockets.push(sock); return (SOCKETS.sockets.length - 1) | 0; } function _interop_SocketGetError(sockFD) { var sock = SOCKETS.sockets[sockFD]; if (!sock) return SOCKETS.EBADF; return sock.error || 0; } function _interop_SocketGetPending(sockFD) { var sock = SOCKETS.sockets[sockFD]; if (!sock) return SOCKETS.EBADF; return sock.recv_queue.length; } function _interop_SocketPoll(sockFD) { var sock = SOCKETS.sockets[sockFD]; if (!sock) return SOCKETS.EBADF; var ws = sock.socket; if (!ws) return 0; var mask = 0; if (sock.recv_queue.length || (ws.readyState === ws.CLOSING || ws.readyState === ws.CLOSED)) mask |= 1; if (ws.readyState === ws.OPEN) mask |= 2; return mask; } function _interop_SocketRecv(sockFD, dst, length) { var sock = SOCKETS.sockets[sockFD]; if (!sock) return SOCKETS.EBADF; var packet = sock.recv_queue.shift(); if (!packet) { var ws = sock.socket; if (!ws || ws.readyState == ws.CLOSING || ws.readyState == ws.CLOSED) { return SOCKETS.ENOTCONN; } else { // socket is in a valid state but truly has nothing available return SOCKETS.EAGAIN; } } // packet will be an ArrayBuffer if it's unadulterated, but if it's // requeued TCP data it'll be an ArrayBufferView var packetLength = packet.byteLength || packet.length; var packetOffset = packet.byteOffset || 0; var packetBuffer = packet.buffer || packet; var bytesRead = Math.min(length, packetLength); var msg = new Uint8Array(packetBuffer, packetOffset, bytesRead); // push back any unread data for TCP connections if (bytesRead < packetLength) { var bytesRemaining = packetLength - bytesRead; packet = new Uint8Array(packetBuffer, packetOffset + bytesRead, bytesRemaining); sock.recv_queue.unshift(packet); } HEAPU8.set(msg, dst); return msg.byteLength; } function _interop_SocketSend(sockFD, src, length) { var sock = SOCKETS.sockets[sockFD]; if (!sock) return SOCKETS.EBADF; var ws = sock.socket; if (!ws || ws.readyState === ws.CLOSING || ws.readyState === ws.CLOSED) { return SOCKETS.ENOTCONN; } else if (ws.readyState === ws.CONNECTING) { return SOCKETS.EAGAIN; } // var data = HEAP8.slice(src, src + length); unsupported in IE11 var data = new Uint8Array(length); for (var i = 0; i < length; i++) { data[i] = HEAP8[src + i]; } try { ws.send(data); return length; } catch (e) { return SOCKETS.EINVAL; } } function _interop_TakeScreenshot(path) { var name = UTF8ToString(path); var canvas = CCModule['canvas']; if (canvas.toBlob) { canvas.toBlob(function(blob) { _interop_SaveBlob(blob, name); }); } else if (canvas.msToBlob) { _interop_SaveBlob(canvas.msToBlob(), name); } } function _interop_TextDraw(textStr, textLen, bmp, dstX, dstY, shadow, hexStr) { var text = UTF8ArrayToString(HEAPU8, textStr, textLen); var hex = UTF8ArrayToString(HEAPU8, hexStr, 7); var ctx = window.FONT_CONTEXT; // resize canvas if necessary so text fits var data = ctx.measureText(text); var text_width = Math.ceil(data.width)|0; if (text_width > ctx.canvas.width) { var font = ctx.font; ctx.canvas.width = text_width; // resizing canvas also resets the properties of CanvasRenderingContext2D ctx.font = font; ctx.textAlign = 'left'; ctx.textBaseline = 'top'; } var text_offset = 0.0; ctx.fillStyle = hex; if (shadow) { text_offset = 1.3; } ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); ctx.fillText(text, text_offset, text_offset); bmp = bmp|0; dstX = dstX|0; dstY = dstY|0; var dst_pixels = HEAP32[(bmp + 0|0)>>2] + (dstX << 2); var dst_width = HEAP32[(bmp + 4|0)>>2]; var dst_height = HEAP32[(bmp + 8|0)>>2]; // TODO not all of it var src = ctx.getImageData(0, 0, ctx.canvas.width, ctx.canvas.height); var src_pixels = src.data; var src_width = src.width|0; var src_height = src.height|0; var img_width = Math.min(src_width, dst_width); var img_height = Math.min(src_height, dst_height); for (var y = 0; y < img_height; y++) { var yy = y + dstY; if (yy < 0 || yy >= dst_height) continue; var src_row = (y *(src_width << 2))|0; var dst_row = dst_pixels + (yy*(dst_width << 2))|0; for (var x = 0; x < img_width; x++) { var xx = x + dstX; if (xx < 0 || xx >= dst_width) continue; var I = src_pixels[src_row + (x<<2)+3], invI = 255 - I|0; HEAPU8[dst_row + (x<<2)+0] = ((src_pixels[src_row + (x<<2)+0] * I) >> 8) + ((HEAPU8[dst_row + (x<<2)+0] * invI) >> 8); HEAPU8[dst_row + (x<<2)+1] = ((src_pixels[src_row + (x<<2)+1] * I) >> 8) + ((HEAPU8[dst_row + (x<<2)+1] * invI) >> 8); HEAPU8[dst_row + (x<<2)+2] = ((src_pixels[src_row + (x<<2)+2] * I) >> 8) + ((HEAPU8[dst_row + (x<<2)+2] * invI) >> 8); HEAPU8[dst_row + (x<<2)+3] = I + ((HEAPU8[dst_row + (x<<2)+3] * invI) >> 8); } } return data.width; } function _interop_TextWidth(textStr, textLen) { var text = UTF8ArrayToString(HEAPU8, textStr, textLen); var ctx = window.FONT_CONTEXT; var data = ctx.measureText(text); return data.width; } function _interop_TryGetClipboardText() { // For IE11, use window.clipboardData to get the clipboard if (window.clipboardData) { var contents = window.clipboardData.getData('Text'); ccall('Window_StoreClipboardText', 'void', ['string'], [contents]); } } function _interop_TrySetClipboardText(text) { // For IE11, use window.clipboardData to set the clipboard */ // For other browsers, instead use the window.copy events */ if (window.clipboardData) { if (window.getSelection && window.getSelection().toString()) return; window.clipboardData.setData('Text', UTF8ToString(text)); } else { window.cc_copyText = UTF8ToString(text); } } function _emscripten_memcpy_big(dest, src, num) { HEAPU8.set(HEAPU8.subarray(src, src+num), dest); } function ___setErrNo(value) { if (CCModule['___errno_location']) HEAP32[((CCModule['___errno_location']())>>2)]=value; return value; } var PATH={splitPath:function (filename) { var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; return splitPathRe.exec(filename).slice(1); },normalizeArray:function (parts, allowAboveRoot) { // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = parts.length - 1; i >= 0; i--) { var last = parts[i]; if (last === '.') { parts.splice(i, 1); } else if (last === '..') { parts.splice(i, 1); up++; } else if (up) { parts.splice(i, 1); up--; } } // if the path is allowed to go above the root, restore leading ..s if (allowAboveRoot) { for (; up; up--) { parts.unshift('..'); } } return parts; },normalize:function (path) { var isAbsolute = path.charAt(0) === '/', trailingSlash = path.substr(-1) === '/'; // Normalize the path path = PATH.normalizeArray(path.split('/').filter(function(p) { return !!p; }), !isAbsolute).join('/'); if (!path && !isAbsolute) { path = '.'; } if (path && trailingSlash) { path += '/'; } return (isAbsolute ? '/' : '') + path; },dirname:function (path) { var result = PATH.splitPath(path), root = result[0], dir = result[1]; if (!root && !dir) { // No dirname whatsoever return '.'; } if (dir) { // It has a dirname, strip trailing slash dir = dir.substr(0, dir.length - 1); } return root + dir; },basename:function (path) { // EMSCRIPTEN return '/'' for '/', not an empty string if (path === '/') return '/'; var lastSlash = path.lastIndexOf('/'); if (lastSlash === -1) return path; return path.substr(lastSlash+1); },extname:function (path) { return PATH.splitPath(path)[3]; },join:function () { var paths = Array.prototype.slice.call(arguments, 0); return PATH.normalize(paths.join('/')); },join2:function (l, r) { return PATH.normalize(l + '/' + r); },resolve:function () { var resolvedPath = '', resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { var path = (i >= 0) ? arguments[i] : FS.cwd(); // Skip empty and invalid entries if (typeof path !== 'string') { throw new TypeError('Arguments to path.resolve must be strings'); } else if (!path) { return ''; // an invalid portion invalidates the whole thing } resolvedPath = path + '/' + resolvedPath; resolvedAbsolute = path.charAt(0) === '/'; } // At this point the path should be resolved to a full absolute path, but // handle relative paths to be safe (might happen when process.cwd() fails) resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { return !!p; }), !resolvedAbsolute).join('/'); return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; },relative:function (from, to) { from = PATH.resolve(from).substr(1); to = PATH.resolve(to).substr(1); function trim(arr) { var start = 0; for (; start < arr.length; start++) { if (arr[start] !== '') break; } var end = arr.length - 1; for (; end >= 0; end--) { if (arr[end] !== '') break; } if (start > end) return []; return arr.slice(start, end - start + 1); } var fromParts = trim(from.split('/')); var toParts = trim(to.split('/')); var length = Math.min(fromParts.length, toParts.length); var samePartsLength = length; for (var i = 0; i < length; i++) { if (fromParts[i] !== toParts[i]) { samePartsLength = i; break; } } var outputParts = []; for (var i = samePartsLength; i < fromParts.length; i++) { outputParts.push('..'); } outputParts = outputParts.concat(toParts.slice(samePartsLength)); return outputParts.join('/'); }}; var TTY={ttys:[],init:function () { // https://github.com/emscripten-core/emscripten/pull/1555 // if (ENVIRONMENT_IS_NODE) { // // currently, FS.init does not distinguish if process.stdin is a file or TTY // // device, it always assumes it's a TTY device. because of this, we're forcing // // process.stdin to UTF8 encoding to at least make stdin reading compatible // // with text files until FS.init can be refactored. // process['stdin']['setEncoding']('utf8'); // } },shutdown:function () { // https://github.com/emscripten-core/emscripten/pull/1555 // if (ENVIRONMENT_IS_NODE) { // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)? // // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists? // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call // process['stdin']['pause'](); // } },register:function (dev, ops) { TTY.ttys[dev] = { input: [], output: [], ops: ops }; FS.registerDevice(dev, TTY.stream_ops); },stream_ops:{open:function (stream) { var tty = TTY.ttys[stream.node.rdev]; if (!tty) { throw new FS.ErrnoError(ERRNO_CODES.ENODEV); } stream.tty = tty; stream.seekable = false; },close:function (stream) { // flush any pending line data stream.tty.ops.flush(stream.tty); },flush:function (stream) { stream.tty.ops.flush(stream.tty); },read:function (stream, buffer, offset, length, pos /* ignored */) { if (!stream.tty || !stream.tty.ops.get_char) { throw new FS.ErrnoError(ERRNO_CODES.ENXIO); } var bytesRead = 0; for (var i = 0; i < length; i++) { var result; try { result = stream.tty.ops.get_char(stream.tty); } catch (e) { throw new FS.ErrnoError(ERRNO_CODES.EIO); } if (result === undefined && bytesRead === 0) { throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); } if (result === null || result === undefined) break; bytesRead++; buffer[offset+i] = result; } if (bytesRead) { stream.node.timestamp = Date.now(); } return bytesRead; },write:function (stream, buffer, offset, length, pos) { if (!stream.tty || !stream.tty.ops.put_char) { throw new FS.ErrnoError(ERRNO_CODES.ENXIO); } try { for (var i = 0; i < length; i++) { stream.tty.ops.put_char(stream.tty, buffer[offset+i]); } } catch (e) { throw new FS.ErrnoError(ERRNO_CODES.EIO); } if (length) { stream.node.timestamp = Date.now(); } return i; }},default_tty_ops:{get_char:function (tty) { if (!tty.input.length) { var result = null; if (typeof window != 'undefined' && typeof window.prompt == 'function') { // Browser. result = window.prompt('Input: '); // returns null on cancel if (result !== null) { result += '\n'; } } else if (typeof readline == 'function') { // Command line. result = readline(); if (result !== null) { result += '\n'; } } if (!result) { return null; } tty.input = intArrayFromString(result, true); } return tty.input.shift(); },put_char:function (tty, val) { if (val === null || val === 10) { out(UTF8ArrayToString(tty.output, 0)); tty.output = []; } else { if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. } },flush:function (tty) { if (tty.output && tty.output.length > 0) { out(UTF8ArrayToString(tty.output, 0)); tty.output = []; } }},default_tty1_ops:{put_char:function (tty, val) { if (val === null || val === 10) { err(UTF8ArrayToString(tty.output, 0)); tty.output = []; } else { if (val != 0) tty.output.push(val); } },flush:function (tty) { if (tty.output && tty.output.length > 0) { err(UTF8ArrayToString(tty.output, 0)); tty.output = []; } }}}; var MEMFS={ops_table:null,mount:function (mount) { return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); },createNode:function (parent, name, mode, dev) { if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { // no supported throw new FS.ErrnoError(ERRNO_CODES.EPERM); } if (!MEMFS.ops_table) { MEMFS.ops_table = { dir: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr, lookup: MEMFS.node_ops.lookup, mknod: MEMFS.node_ops.mknod, rename: MEMFS.node_ops.rename, unlink: MEMFS.node_ops.unlink, rmdir: MEMFS.node_ops.rmdir, readdir: MEMFS.node_ops.readdir, symlink: MEMFS.node_ops.symlink }, stream: { llseek: MEMFS.stream_ops.llseek } }, file: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr }, stream: { llseek: MEMFS.stream_ops.llseek, read: MEMFS.stream_ops.read, write: MEMFS.stream_ops.write, allocate: MEMFS.stream_ops.allocate, mmap: MEMFS.stream_ops.mmap, msync: MEMFS.stream_ops.msync } }, link: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr, readlink: MEMFS.node_ops.readlink }, stream: {} }, chrdev: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr }, stream: FS.chrdev_stream_ops } }; } var node = FS.createNode(parent, name, mode, dev); if (FS.isDir(node.mode)) { node.node_ops = MEMFS.ops_table.dir.node; node.stream_ops = MEMFS.ops_table.dir.stream; node.contents = {}; } else if (FS.isFile(node.mode)) { node.node_ops = MEMFS.ops_table.file.node; node.stream_ops = MEMFS.ops_table.file.stream; node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity. // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme. node.contents = null; } else if (FS.isLink(node.mode)) { node.node_ops = MEMFS.ops_table.link.node; node.stream_ops = MEMFS.ops_table.link.stream; } else if (FS.isChrdev(node.mode)) { node.node_ops = MEMFS.ops_table.chrdev.node; node.stream_ops = MEMFS.ops_table.chrdev.stream; } node.timestamp = Date.now(); // add the new node to the parent if (parent) { parent.contents[name] = node; } return node; },getFileDataAsRegularArray:function (node) { if (node.contents && node.contents.subarray) { var arr = []; for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]); return arr; // Returns a copy of the original data. } return node.contents; // No-op, the file contents are already in a JS array. Return as-is. },getFileDataAsTypedArray:function (node) { if (!node.contents) return new Uint8Array; if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. return new Uint8Array(node.contents); },expandFileStorage:function (node, newCapacity) { var prevCapacity = node.contents ? node.contents.length : 0; if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough. // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity. // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to // avoid overshooting the allocation cap by a very large margin. var CAPACITY_DOUBLING_MAX = 1024 * 1024; newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) | 0); if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding. var oldContents = node.contents; node.contents = new Uint8Array(newCapacity); // Allocate new storage. if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage. return; },resizeFileStorage:function (node, newSize) { if (node.usedBytes == newSize) return; if (newSize == 0) { node.contents = null; // Fully decommit when requesting a resize to zero. node.usedBytes = 0; return; } if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. var oldContents = node.contents; node.contents = new Uint8Array(new ArrayBuffer(newSize)); // Allocate new storage. if (oldContents) { node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage. } node.usedBytes = newSize; return; } // Backing with a JS array. if (!node.contents) node.contents = []; if (node.contents.length > newSize) node.contents.length = newSize; else while (node.contents.length < newSize) node.contents.push(0); node.usedBytes = newSize; },node_ops:{getattr:function (node) { var attr = {}; // device numbers reuse inode numbers. attr.dev = FS.isChrdev(node.mode) ? node.id : 1; attr.ino = node.id; attr.mode = node.mode; attr.nlink = 1; attr.uid = 0; attr.gid = 0; attr.rdev = node.rdev; if (FS.isDir(node.mode)) { attr.size = 4096; } else if (FS.isFile(node.mode)) { attr.size = node.usedBytes; } else if (FS.isLink(node.mode)) { attr.size = node.link.length; } else { attr.size = 0; } attr.atime = new Date(node.timestamp); attr.mtime = new Date(node.timestamp); attr.ctime = new Date(node.timestamp); // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), // but this is not required by the standard. attr.blksize = 4096; attr.blocks = Math.ceil(attr.size / attr.blksize); return attr; },setattr:function (node, attr) { if (attr.mode !== undefined) { node.mode = attr.mode; } if (attr.timestamp !== undefined) { node.timestamp = attr.timestamp; } if (attr.size !== undefined) { MEMFS.resizeFileStorage(node, attr.size); } },lookup:function (parent, name) { throw FS.genericErrors[ERRNO_CODES.ENOENT]; },mknod:function (parent, name, mode, dev) { return MEMFS.createNode(parent, name, mode, dev); },rename:function (old_node, new_dir, new_name) { // if we're overwriting a directory at new_name, make sure it's empty. if (FS.isDir(old_node.mode)) { var new_node; try { new_node = FS.lookupNode(new_dir, new_name); } catch (e) { } if (new_node) { for (var i in new_node.contents) { throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY); } } } // do the internal rewiring delete old_node.parent.contents[old_node.name]; old_node.name = new_name; new_dir.contents[new_name] = old_node; old_node.parent = new_dir; },unlink:function (parent, name) { delete parent.contents[name]; },rmdir:function (parent, name) { var node = FS.lookupNode(parent, name); for (var i in node.contents) { throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY); } delete parent.contents[name]; },readdir:function (node) { var entries = ['.', '..'] for (var key in node.contents) { if (!node.contents.hasOwnProperty(key)) { continue; } entries.push(key); } return entries; },symlink:function (parent, newname, oldpath) { var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0); node.link = oldpath; return node; },readlink:function (node) { if (!FS.isLink(node.mode)) { throw new FS.ErrnoError(ERRNO_CODES.EINVAL); } return node.link; }},stream_ops:{read:function (stream, buffer, offset, length, position) { var contents = stream.node.contents; if (position >= stream.node.usedBytes) return 0; var size = Math.min(stream.node.usedBytes - position, length); if (size > 8 && contents.subarray) { // non-trivial, and typed array buffer.set(contents.subarray(position, position + size), offset); } else { for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; } return size; },write:function (stream, buffer, offset, length, position, canOwn) { // If memory can grow, we don't want to hold on to references of // the memory Buffer, as they may get invalidated. That means // we need to do a copy here. canOwn = false; if (!length) return 0; var node = stream.node; node.timestamp = Date.now(); if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array? if (canOwn) { node.contents = buffer.subarray(offset, offset + length); node.usedBytes = length; return length; } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data. node.contents = new Uint8Array(buffer.subarray(offset, offset + length)); node.usedBytes = length; return length; } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file? node.contents.set(buffer.subarray(offset, offset + length), position); return length; } } // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. MEMFS.expandFileStorage(node, position+length); if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available. else { for (var i = 0; i < length; i++) { node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. } } node.usedBytes = Math.max(node.usedBytes, position+length); return length; },llseek:function (stream, offset, whence) { var position = offset; if (whence === 1) { // SEEK_CUR. position += stream.position; } else if (whence === 2) { // SEEK_END. if (FS.isFile(stream.node.mode)) { position += stream.node.usedBytes; } } if (position < 0) { throw new FS.ErrnoError(ERRNO_CODES.EINVAL); } return position; },allocate:function (stream, offset, length) { MEMFS.expandFileStorage(stream.node, offset + length); stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); },mmap:function (stream, buffer, offset, length, position, prot, flags) { if (!FS.isFile(stream.node.mode)) { throw new FS.ErrnoError(ERRNO_CODES.ENODEV); } var ptr; var allocated; var contents = stream.node.contents; // Only make a new copy when MAP_PRIVATE is specified. if ( !(flags & 2) && (contents.buffer === buffer || contents.buffer === buffer.buffer) ) { // We can't emulate MAP_SHARED when the file is not backed by the buffer // we're mapping to (e.g. the HEAP buffer). allocated = false; ptr = contents.byteOffset; } else { // Try to avoid unnecessary slices. if (position > 0 || position + length < stream.node.usedBytes) { if (contents.subarray) { contents = contents.subarray(position, position + length); } else { contents = Array.prototype.slice.call(contents, position, position + length); } } allocated = true; ptr = _malloc(length); if (!ptr) { throw new FS.ErrnoError(ERRNO_CODES.ENOMEM); } buffer.set(contents, ptr); } return { ptr: ptr, allocated: allocated }; },msync:function (stream, buffer, offset, length, mmapFlags) { if (!FS.isFile(stream.node.mode)) { throw new FS.ErrnoError(ERRNO_CODES.ENODEV); } if (mmapFlags & 2) { // MAP_PRIVATE calls need not to be synced back to underlying fs return 0; } var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); // should we check if bytesWritten and length are the same? return 0; }}}; var IDBFS={dbs:{},indexedDB:function () { if (typeof indexedDB !== 'undefined') return indexedDB; var ret = null; if (typeof window === 'object') ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; assert(ret, 'IDBFS used, but indexedDB not supported'); return ret; },DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function (mount) { // reuse all of the core MEMFS functionality return MEMFS.mount.apply(null, arguments); },syncfs:function (mount, populate, callback) { IDBFS.getLocalSet(mount, function(err, local) { if (err) return callback(err); IDBFS.getRemoteSet(mount, function(err, remote) { if (err) return callback(err); var src = populate ? remote : local; var dst = populate ? local : remote; IDBFS.reconcile(src, dst, callback); }); }); },getDB:function (name, callback) { // check the cache first var db = IDBFS.dbs[name]; if (db) { return callback(null, db); } var req; try { req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION); } catch (e) { return callback(e); } if (!req) { return callback("Unable to connect to IndexedDB"); } req.onupgradeneeded = function(e) { var db = e.target.result; var transaction = e.target.transaction; var fileStore; if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) { fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME); } else { fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); } if (!fileStore.indexNames.contains('timestamp')) { fileStore.createIndex('timestamp', 'timestamp', { unique: false }); } }; req.onsuccess = function() { db = req.result; // add to the cache IDBFS.dbs[name] = db; callback(null, db); }; req.onerror = function(e) { callback(this.error); e.preventDefault(); }; },getLocalSet:function (mount, callback) { var entries = {}; function isRealDir(p) { return p !== '.' && p !== '..'; }; function toAbsolute(root) { return function(p) { return PATH.join2(root, p); } }; var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint)); while (check.length) { var path = check.pop(); var stat; try { stat = FS.stat(path); } catch (e) { return callback(e); } if (FS.isDir(stat.mode)) { check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path))); } entries[path] = { timestamp: stat.mtime }; } return callback(null, { type: 'local', entries: entries }); },getRemoteSet:function (mount, callback) { var entries = {}; IDBFS.getDB(mount.mountpoint, function(err, db) { if (err) return callback(err); try { var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly'); transaction.onerror = function(e) { callback(this.error); e.preventDefault(); }; var store = transaction.objectStore(IDBFS.DB_STORE_NAME); var index = store.index('timestamp'); index.openKeyCursor().onsuccess = function(event) { var cursor = event.target.result; if (!cursor) { return callback(null, { type: 'remote', db: db, entries: entries }); } entries[cursor.primaryKey] = { timestamp: cursor.key }; cursor.continue(); }; } catch (e) { return callback(e); } }); },loadLocalEntry:function (path, callback) { var stat, node; try { var lookup = FS.lookupPath(path); node = lookup.node; stat = FS.stat(path); } catch (e) { return callback(e); } if (FS.isDir(stat.mode)) { return callback(null, { timestamp: stat.mtime, mode: stat.mode }); } else if (FS.isFile(stat.mode)) { // Performance consideration: storing a normal JavaScript array to a IndexedDB is much slower than storing a typed array. // Therefore always convert the file contents to a typed array first before writing the data to IndexedDB. node.contents = MEMFS.getFileDataAsTypedArray(node); return callback(null, { timestamp: stat.mtime, mode: stat.mode, contents: node.contents }); } else { return callback(new Error('node type not supported')); } },storeLocalEntry:function (path, entry, callback) { try { if (FS.isDir(entry.mode)) { FS.mkdir(path, entry.mode); } else if (FS.isFile(entry.mode)) { FS.writeFile(path, entry.contents, { canOwn: true }); } else { return callback(new Error('node type not supported')); } FS.chmod(path, entry.mode); FS.utime(path, entry.timestamp, entry.timestamp); } catch (e) { return callback(e); } callback(null); },removeLocalEntry:function (path, callback) { try { var lookup = FS.lookupPath(path); var stat = FS.stat(path); if (FS.isDir(stat.mode)) { FS.rmdir(path); } else if (FS.isFile(stat.mode)) { FS.unlink(path); } } catch (e) { return callback(e); } callback(null); },loadRemoteEntry:function (store, path, callback) { var req = store.get(path); req.onsuccess = function(event) { callback(null, event.target.result); }; req.onerror = function(e) { callback(this.error); e.preventDefault(); }; },storeRemoteEntry:function (store, path, entry, callback) { var req = store.put(entry, path); req.onsuccess = function() { callback(null); }; req.onerror = function(e) { callback(this.error); e.preventDefault(); }; },removeRemoteEntry:function (store, path, callback) { var req = store.delete(path); req.onsuccess = function() { callback(null); }; req.onerror = function(e) { callback(this.error); e.preventDefault(); }; },reconcile:function (src, dst, callback) { var total = 0; var create = []; Object.keys(src.entries).forEach(function (key) { var e = src.entries[key]; var e2 = dst.entries[key]; if (!e2 || e.timestamp > e2.timestamp) { create.push(key); total++; } }); var remove = []; Object.keys(dst.entries).forEach(function (key) { var e = dst.entries[key]; var e2 = src.entries[key]; if (!e2) { remove.push(key); total++; } }); if (!total) { return callback(null); } var errored = false; var completed = 0; var db = src.type === 'remote' ? src.db : dst.db; var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite'); var store = transaction.objectStore(IDBFS.DB_STORE_NAME); function done(err) { if (err) { if (!done.errored) { done.errored = true; return callback(err); } return; } if (++completed >= total) { return callback(null); } }; transaction.onerror = function(e) { done(this.error); e.preventDefault(); }; // sort paths in ascending order so directory entries are created // before the files inside them create.sort().forEach(function (path) { if (dst.type === 'local') { IDBFS.loadRemoteEntry(store, path, function (err, entry) { if (err) return done(err); IDBFS.storeLocalEntry(path, entry, done); }); } else { IDBFS.loadLocalEntry(path, function (err, entry) { if (err) return done(err); IDBFS.storeRemoteEntry(store, path, entry, done); }); } }); // sort paths in descending order so files are deleted before their // parent directories remove.sort().reverse().forEach(function(path) { if (dst.type === 'local') { IDBFS.removeLocalEntry(path, done); } else { IDBFS.removeRemoteEntry(store, path, done); } }); }}; var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function (mount) { assert(ENVIRONMENT_IS_WORKER); if (!WORKERFS.reader) WORKERFS.reader = new FileReaderSync(); var root = WORKERFS.createNode(null, '/', WORKERFS.DIR_MODE, 0); var createdParents = {}; function ensureParent(path) { // return the parent node, creating subdirs as necessary var parts = path.split('/'); var parent = root; for (var i = 0; i < parts.length-1; i++) { var curr = parts.slice(0, i+1).join('/'); // Issue 4254: Using curr as a node name will prevent the node // from being found in FS.nameTable when FS.open is called on // a path which holds a child of this node, // given that all FS functions assume node names // are just their corresponding parts within their given path, // rather than incremental aggregates which include their parent's // directories. if (!createdParents[curr]) { createdParents[curr] = WORKERFS.createNode(parent, parts[i], WORKERFS.DIR_MODE, 0); } parent = createdParents[curr]; } return parent; } function base(path) { var parts = path.split('/'); return parts[parts.length-1]; } // We also accept FileList here, by using Array.prototype Array.prototype.forEach.call(mount.opts["files"] || [], function(file) { WORKERFS.createNode(ensureParent(file.name), base(file.name), WORKERFS.FILE_MODE, 0, file, file.lastModifiedDate); }); (mount.opts["blobs"] || []).forEach(function(obj) { WORKERFS.createNode(ensureParent(obj["name"]), base(obj["name"]), WORKERFS.FILE_MODE, 0, obj["data"]); }); (mount.opts["packages"] || []).forEach(function(pack) { pack['metadata'].files.forEach(function(file) { var name = file.filename.substr(1); // remove initial slash WORKERFS.createNode(ensureParent(name), base(name), WORKERFS.FILE_MODE, 0, pack['blob'].slice(file.start, file.end)); }); }); return root; },createNode:function (parent, name, mode, dev, contents, mtime) { var node = FS.createNode(parent, name, mode); node.mode = mode; node.node_ops = WORKERFS.node_ops; node.stream_ops = WORKERFS.stream_ops; node.timestamp = (mtime || new Date).getTime(); assert(WORKERFS.FILE_MODE !== WORKERFS.DIR_MODE); if (mode === WORKERFS.FILE_MODE) { node.size = contents.size; node.contents = contents; } else { node.size = 4096; node.contents = {}; } if (parent) { parent.contents[name] = node; } return node; },node_ops:{getattr:function (node) { return { dev: 1, ino: undefined, mode: node.mode, nlink: 1, uid: 0, gid: 0, rdev: undefined, size: node.size, atime: new Date(node.timestamp), mtime: new Date(node.timestamp), ctime: new Date(node.timestamp), blksize: 4096, blocks: Math.ceil(node.size / 4096), }; },setattr:function (node, attr) { if (attr.mode !== undefined) { node.mode = attr.mode; } if (attr.timestamp !== undefined) { node.timestamp = attr.timestamp; } },lookup:function (parent, name) { throw new FS.ErrnoError(ERRNO_CODES.ENOENT); },mknod:function (parent, name, mode, dev) { throw new FS.ErrnoError(ERRNO_CODES.EPERM); },rename:function (oldNode, newDir, newName) { throw new FS.ErrnoError(ERRNO_CODES.EPERM); },unlink:function (parent, name) { throw new FS.ErrnoError(ERRNO_CODES.EPERM); },rmdir:function (parent, name) { throw new FS.ErrnoError(ERRNO_CODES.EPERM); },readdir:function (node) { var entries = ['.', '..']; for (var key in node.contents) { if (!node.contents.hasOwnProperty(key)) { continue; } entries.push(key); } return entries; },symlink:function (parent, newName, oldPath) { throw new FS.ErrnoError(ERRNO_CODES.EPERM); },readlink:function (node) { throw new FS.ErrnoError(ERRNO_CODES.EPERM); }},stream_ops:{read:function (stream, buffer, offset, length, position) { if (position >= stream.node.size) return 0; var chunk = stream.node.contents.slice(position, position + length); var ab = WORKERFS.reader.readAsArrayBuffer(chunk); buffer.set(new Uint8Array(ab), offset); return chunk.size; },write:function (stream, buffer, offset, length, position) { throw new FS.ErrnoError(ERRNO_CODES.EIO); },llseek:function (stream, offset, whence) { var position = offset; if (whence === 1) { // SEEK_CUR. position += stream.position; } else if (whence === 2) { // SEEK_END. if (FS.isFile(stream.node.mode)) { position += stream.node.size; } } if (position < 0) { throw new FS.ErrnoError(ERRNO_CODES.EINVAL); } return position; }}}; var _stdin=1972944; var _stdout=1972960; var _stderr=1972976;var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function (e) { if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); return ___setErrNo(e.errno); },lookupPath:function (path, opts) { path = PATH.resolve(FS.cwd(), path); opts = opts || {}; if (!path) return { path: '', node: null }; var defaults = { follow_mount: true, recurse_count: 0 }; for (var key in defaults) { if (opts[key] === undefined) { opts[key] = defaults[key]; } } if (opts.recurse_count > 8) { // max recursive lookup of 8 throw new FS.ErrnoError(40); } // split the path var parts = PATH.normalizeArray(path.split('/').filter(function(p) { return !!p; }), false); // start at the root var current = FS.root; var current_path = '/'; for (var i = 0; i < parts.length; i++) { var islast = (i === parts.length-1); if (islast && opts.parent) { // stop resolving break; } current = FS.lookupNode(current, parts[i]); current_path = PATH.join2(current_path, parts[i]); // jump to the mount's root node if this is a mountpoint if (FS.isMountpoint(current)) { if (!islast || (islast && opts.follow_mount)) { current = current.mounted.root; } } // by default, lookupPath will not follow a symlink if it is the final path component. // setting opts.follow = true will override this behavior. if (!islast || opts.follow) { var count = 0; while (FS.isLink(current.mode)) { var link = FS.readlink(current_path); current_path = PATH.resolve(PATH.dirname(current_path), link); var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); current = lookup.node; if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX). throw new FS.ErrnoError(40); } } } } return { path: current_path, node: current }; },getPath:function (node) { var path; while (true) { if (FS.isRoot(node)) { var mount = node.mount.mountpoint; if (!path) return mount; return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path; } path = path ? node.name + '/' + path : node.name; node = node.parent; } },hashName:function (parentid, name) { var hash = 0; for (var i = 0; i < name.length; i++) { hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; } return ((parentid + hash) >>> 0) % FS.nameTable.length; },hashAddNode:function (node) { var hash = FS.hashName(node.parent.id, node.name); node.name_next = FS.nameTable[hash]; FS.nameTable[hash] = node; },hashRemoveNode:function (node) { var hash = FS.hashName(node.parent.id, node.name); if (FS.nameTable[hash] === node) { FS.nameTable[hash] = node.name_next; } else { var current = FS.nameTable[hash]; while (current) { if (current.name_next === node) { current.name_next = node.name_next; break; } current = current.name_next; } } },lookupNode:function (parent, name) { var err = FS.mayLookup(parent); if (err) { throw new FS.ErrnoError(err, parent); } var hash = FS.hashName(parent.id, name); for (var node = FS.nameTable[hash]; node; node = node.name_next) { var nodeName = node.name; if (node.parent.id === parent.id && nodeName === name) { return node; } } // if we failed to find it in the cache, call into the VFS return FS.lookup(parent, name); },createNode:function (parent, name, mode, rdev) { if (!FS.FSNode) { FS.FSNode = function(parent, name, mode, rdev) { if (!parent) { parent = this; // root node sets parent to itself } this.parent = parent; this.mount = parent.mount; this.mounted = null; this.id = FS.nextInode++; this.name = name; this.mode = mode; this.node_ops = {}; this.stream_ops = {}; this.rdev = rdev; }; FS.FSNode.prototype = {}; // compatibility var readMode = 292 | 73; var writeMode = 146; // NOTE we must use Object.defineProperties instead of individual calls to // Object.defineProperty in order to make closure compiler happy Object.defineProperties(FS.FSNode.prototype, { read: { get: function() { return (this.mode & readMode) === readMode; }, set: function(val) { val ? this.mode |= readMode : this.mode &= ~readMode; } }, write: { get: function() { return (this.mode & writeMode) === writeMode; }, set: function(val) { val ? this.mode |= writeMode : this.mode &= ~writeMode; } }, isFolder: { get: function() { return FS.isDir(this.mode); } }, isDevice: { get: function() { return FS.isChrdev(this.mode); } } }); } var node = new FS.FSNode(parent, name, mode, rdev); FS.hashAddNode(node); return node; },destroyNode:function (node) { FS.hashRemoveNode(node); },isRoot:function (node) { return node === node.parent; },isMountpoint:function (node) { return !!node.mounted; },isFile:function (mode) { return (mode & 61440) === 32768; },isDir:function (mode) { return (mode & 61440) === 16384; },isLink:function (mode) { return (mode & 61440) === 40960; },isChrdev:function (mode) { return (mode & 61440) === 8192; },isBlkdev:function (mode) { return (mode & 61440) === 24576; },isFIFO:function (mode) { return (mode & 61440) === 4096; },isSocket:function (mode) { return (mode & 49152) === 49152; },flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function (str) { var flags = FS.flagModes[str]; if (typeof flags === 'undefined') { throw new Error('Unknown file open mode: ' + str); } return flags; },flagsToPermissionString:function (flag) { var perms = ['r', 'w', 'rw'][flag & 3]; if ((flag & 512)) { perms += 'w'; } return perms; },nodePermissions:function (node, perms) { if (FS.ignorePermissions) { return 0; } // return 0 if any user, group or owner bits are set. if (perms.indexOf('r') !== -1 && !(node.mode & 292)) { return 13; } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) { return 13; } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) { return 13; } return 0; },mayLookup:function (dir) { var err = FS.nodePermissions(dir, 'x'); if (err) return err; if (!dir.node_ops.lookup) return 13; return 0; },mayCreate:function (dir, name) { try { var node = FS.lookupNode(dir, name); return 17; } catch (e) { } return FS.nodePermissions(dir, 'wx'); },mayDelete:function (dir, name, isdir) { var node; try { node = FS.lookupNode(dir, name); } catch (e) { return e.errno; } var err = FS.nodePermissions(dir, 'wx'); if (err) { return err; } if (isdir) { if (!FS.isDir(node.mode)) { return 20; } if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { return 16; } } else { if (FS.isDir(node.mode)) { return 21; } } return 0; },mayOpen:function (node, flags) { if (!node) { return 2; } if (FS.isLink(node.mode)) { return 40; } else if (FS.isDir(node.mode)) { if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only) return 21; } } return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); },MAX_OPEN_FDS:4096,nextfd:function (fd_start, fd_end) { fd_start = fd_start || 0; fd_end = fd_end || FS.MAX_OPEN_FDS; for (var fd = fd_start; fd <= fd_end; fd++) { if (!FS.streams[fd]) { return fd; } } throw new FS.ErrnoError(24); },getStream:function (fd) { return FS.streams[fd]; },createStream:function (stream, fd_start, fd_end) { if (!FS.FSStream) { FS.FSStream = function(){}; FS.FSStream.prototype = {}; // compatibility Object.defineProperties(FS.FSStream.prototype, { object: { get: function() { return this.node; }, set: function(val) { this.node = val; } }, isRead: { get: function() { return (this.flags & 2097155) !== 1; } }, isWrite: { get: function() { return (this.flags & 2097155) !== 0; } }, isAppend: { get: function() { return (this.flags & 1024); } } }); } // clone it, so we can return an instance of FSStream var newStream = new FS.FSStream(); for (var p in stream) { newStream[p] = stream[p]; } stream = newStream; var fd = FS.nextfd(fd_start, fd_end); stream.fd = fd; FS.streams[fd] = stream; return stream; },closeStream:function (fd) { FS.streams[fd] = null; },chrdev_stream_ops:{open:function (stream) { var device = FS.getDevice(stream.node.rdev); // override node's stream ops with the device's stream.stream_ops = device.stream_ops; // forward the open call if (stream.stream_ops.open) { stream.stream_ops.open(stream); } },llseek:function () { throw new FS.ErrnoError(29); }},major:function (dev) { return ((dev) >> 8); },minor:function (dev) { return ((dev) & 0xff); },makedev:function (ma, mi) { return ((ma) << 8 | (mi)); },registerDevice:function (dev, ops) { FS.devices[dev] = { stream_ops: ops }; },getDevice:function (dev) { return FS.devices[dev]; },getMounts:function (mount) { var mounts = []; var check = [mount]; while (check.length) { var m = check.pop(); mounts.push(m); check.push.apply(check, m.mounts); } return mounts; },syncfs:function (populate, callback) { if (typeof(populate) === 'function') { callback = populate; populate = false; } FS.syncFSRequests++; if (FS.syncFSRequests > 1) { console.log('warning: ' + FS.syncFSRequests + ' FS.syncfs operations in flight at once, probably just doing extra work'); } var mounts = FS.getMounts(FS.root.mount); var completed = 0; function doCallback(err) { FS.syncFSRequests--; return callback(err); } function done(err) { if (err) { if (!done.errored) { done.errored = true; return doCallback(err); } return; } if (++completed >= mounts.length) { doCallback(null); } }; // sync all mounts mounts.forEach(function (mount) { if (!mount.type.syncfs) { return done(null); } mount.type.syncfs(mount, populate, done); }); },mount:function (type, opts, mountpoint) { var root = mountpoint === '/'; var pseudo = !mountpoint; var node; if (root && FS.root) { throw new FS.ErrnoError(16); } else if (!root && !pseudo) { var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); mountpoint = lookup.path; // use the absolute path node = lookup.node; if (FS.isMountpoint(node)) { throw new FS.ErrnoError(16); } if (!FS.isDir(node.mode)) { throw new FS.ErrnoError(20); } } var mount = { type: type, opts: opts, mountpoint: mountpoint, mounts: [] }; // create a root node for the fs var mountRoot = type.mount(mount); mountRoot.mount = mount; mount.root = mountRoot; if (root) { FS.root = mountRoot; } else if (node) { // set as a mountpoint node.mounted = mount; // add the new mount to the current mount's children if (node.mount) { node.mount.mounts.push(mount); } } return mountRoot; },unmount:function (mountpoint) { var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); if (!FS.isMountpoint(lookup.node)) { throw new FS.ErrnoError(22); } // destroy the nodes for this mount, and all its child mounts var node = lookup.node; var mount = node.mounted; var mounts = FS.getMounts(mount); Object.keys(FS.nameTable).forEach(function (hash) { var current = FS.nameTable[hash]; while (current) { var next = current.name_next; if (mounts.indexOf(current.mount) !== -1) { FS.destroyNode(current); } current = next; } }); // no longer a mountpoint node.mounted = null; // remove this mount from the child mounts var idx = node.mount.mounts.indexOf(mount); node.mount.mounts.splice(idx, 1); },lookup:function (parent, name) { return parent.node_ops.lookup(parent, name); },mknod:function (path, mode, dev) { var lookup = FS.lookupPath(path, { parent: true }); var parent = lookup.node; var name = PATH.basename(path); if (!name || name === '.' || name === '..') { throw new FS.ErrnoError(22); } var err = FS.mayCreate(parent, name); if (err) { throw new FS.ErrnoError(err); } if (!parent.node_ops.mknod) { throw new FS.ErrnoError(1); } return parent.node_ops.mknod(parent, name, mode, dev); },create:function (path, mode) { mode = mode !== undefined ? mode : 438 /* 0666 */; mode &= 4095; mode |= 32768; return FS.mknod(path, mode, 0); },mkdir:function (path, mode) { mode = mode !== undefined ? mode : 511 /* 0777 */; mode &= 511 | 512; mode |= 16384; return FS.mknod(path, mode, 0); },mkdirTree:function (path, mode) { var dirs = path.split('/'); var d = ''; for (var i = 0; i < dirs.length; ++i) { if (!dirs[i]) continue; d += '/' + dirs[i]; try { FS.mkdir(d, mode); } catch(e) { if (e.errno != 17) throw e; } } },mkdev:function (path, mode, dev) { if (typeof(dev) === 'undefined') { dev = mode; mode = 438 /* 0666 */; } mode |= 8192; return FS.mknod(path, mode, dev); },symlink:function (oldpath, newpath) { if (!PATH.resolve(oldpath)) { throw new FS.ErrnoError(2); } var lookup = FS.lookupPath(newpath, { parent: true }); var parent = lookup.node; if (!parent) { throw new FS.ErrnoError(2); } var newname = PATH.basename(newpath); var err = FS.mayCreate(parent, newname); if (err) { throw new FS.ErrnoError(err); } if (!parent.node_ops.symlink) { throw new FS.ErrnoError(1); } return parent.node_ops.symlink(parent, newname, oldpath); },rename:function (old_path, new_path) { var old_dirname = PATH.dirname(old_path); var new_dirname = PATH.dirname(new_path); var old_name = PATH.basename(old_path); var new_name = PATH.basename(new_path); // parents must exist var lookup, old_dir, new_dir; try { lookup = FS.lookupPath(old_path, { parent: true }); old_dir = lookup.node; lookup = FS.lookupPath(new_path, { parent: true }); new_dir = lookup.node; } catch (e) { throw new FS.ErrnoError(16); } if (!old_dir || !new_dir) throw new FS.ErrnoError(2); // need to be part of the same mount if (old_dir.mount !== new_dir.mount) { throw new FS.ErrnoError(18); } // source must exist var old_node = FS.lookupNode(old_dir, old_name); // old path should not be an ancestor of the new path var relative = PATH.relative(old_path, new_dirname); if (relative.charAt(0) !== '.') { throw new FS.ErrnoError(22); } // new path should not be an ancestor of the old path relative = PATH.relative(new_path, old_dirname); if (relative.charAt(0) !== '.') { throw new FS.ErrnoError(39); } // see if the new path already exists var new_node; try { new_node = FS.lookupNode(new_dir, new_name); } catch (e) { // not fatal } // early out if nothing needs to change if (old_node === new_node) { return; } // we'll need to delete the old entry var isdir = FS.isDir(old_node.mode); var err = FS.mayDelete(old_dir, old_name, isdir); if (err) { throw new FS.ErrnoError(err); } // need delete permissions if we'll be overwriting. // need create permissions if new doesn't already exist. err = new_node ? FS.mayDelete(new_dir, new_name, isdir) : FS.mayCreate(new_dir, new_name); if (err) { throw new FS.ErrnoError(err); } if (!old_dir.node_ops.rename) { throw new FS.ErrnoError(1); } if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { throw new FS.ErrnoError(16); } // if we are going to change the parent, check write permissions if (new_dir !== old_dir) { err = FS.nodePermissions(old_dir, 'w'); if (err) { throw new FS.ErrnoError(err); } } try { if (FS.trackingDelegate['willMovePath']) { FS.trackingDelegate['willMovePath'](old_path, new_path); } } catch(e) { console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); } // remove the node from the lookup hash FS.hashRemoveNode(old_node); // do the underlying fs rename try { old_dir.node_ops.rename(old_node, new_dir, new_name); } catch (e) { throw e; } finally { // add the node back to the hash (in case node_ops.rename // changed its name) FS.hashAddNode(old_node); } try { if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path); } catch(e) { console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); } },rmdir:function (path) { var lookup = FS.lookupPath(path, { parent: true }); var parent = lookup.node; var name = PATH.basename(path); var node = FS.lookupNode(parent, name); var err = FS.mayDelete(parent, name, true); if (err) { throw new FS.ErrnoError(err); } if (!parent.node_ops.rmdir) { throw new FS.ErrnoError(1); } if (FS.isMountpoint(node)) { throw new FS.ErrnoError(16); } try { if (FS.trackingDelegate['willDeletePath']) { FS.trackingDelegate['willDeletePath'](path); } } catch(e) { console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); } parent.node_ops.rmdir(parent, name); FS.destroyNode(node); try { if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); } catch(e) { console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); } },readdir:function (path) { var lookup = FS.lookupPath(path, { follow: true }); var node = lookup.node; if (!node.node_ops.readdir) { throw new FS.ErrnoError(20); } return node.node_ops.readdir(node); },unlink:function (path) { var lookup = FS.lookupPath(path, { parent: true }); var parent = lookup.node; var name = PATH.basename(path); var node = FS.lookupNode(parent, name); var err = FS.mayDelete(parent, name, false); if (err) { // According to POSIX, we should map EISDIR to EPERM, but // we instead do what Linux does (and we must, as we use // the musl linux libc). throw new FS.ErrnoError(err); } if (!parent.node_ops.unlink) { throw new FS.ErrnoError(1); } if (FS.isMountpoint(node)) { throw new FS.ErrnoError(16); } try { if (FS.trackingDelegate['willDeletePath']) { FS.trackingDelegate['willDeletePath'](path); } } catch(e) { console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); } parent.node_ops.unlink(parent, name); FS.destroyNode(node); try { if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); } catch(e) { console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); } },readlink:function (path) { var lookup = FS.lookupPath(path); var link = lookup.node; if (!link) { throw new FS.ErrnoError(2); } if (!link.node_ops.readlink) { throw new FS.ErrnoError(22); } return PATH.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); },stat:function (path, dontFollow) { var lookup = FS.lookupPath(path, { follow: !dontFollow }); var node = lookup.node; if (!node) { throw new FS.ErrnoError(2); } if (!node.node_ops.getattr) { throw new FS.ErrnoError(1); } return node.node_ops.getattr(node); },lstat:function (path) { return FS.stat(path, true); },chmod:function (path, mode, dontFollow) { var node; if (typeof path === 'string') { var lookup = FS.lookupPath(path, { follow: !dontFollow }); node = lookup.node; } else { node = path; } if (!node.node_ops.setattr) { throw new FS.ErrnoError(1); } node.node_ops.setattr(node, { mode: (mode & 4095) | (node.mode & ~4095), timestamp: Date.now() }); },lchmod:function (path, mode) { FS.chmod(path, mode, true); },fchmod:function (fd, mode) { var stream = FS.getStream(fd); if (!stream) { throw new FS.ErrnoError(9); } FS.chmod(stream.node, mode); },chown:function (path, uid, gid, dontFollow) { var node; if (typeof path === 'string') { var lookup = FS.lookupPath(path, { follow: !dontFollow }); node = lookup.node; } else { node = path; } if (!node.node_ops.setattr) { throw new FS.ErrnoError(1); } node.node_ops.setattr(node, { timestamp: Date.now() // we ignore the uid / gid for now }); },lchown:function (path, uid, gid) { FS.chown(path, uid, gid, true); },fchown:function (fd, uid, gid) { var stream = FS.getStream(fd); if (!stream) { throw new FS.ErrnoError(9); } FS.chown(stream.node, uid, gid); },truncate:function (path, len) { if (len < 0) { throw new FS.ErrnoError(22); } var node; if (typeof path === 'string') { var lookup = FS.lookupPath(path, { follow: true }); node = lookup.node; } else { node = path; } if (!node.node_ops.setattr) { throw new FS.ErrnoError(1); } if (FS.isDir(node.mode)) { throw new FS.ErrnoError(21); } if (!FS.isFile(node.mode)) { throw new FS.ErrnoError(22); } var err = FS.nodePermissions(node, 'w'); if (err) { throw new FS.ErrnoError(err); } node.node_ops.setattr(node, { size: len, timestamp: Date.now() }); },ftruncate:function (fd, len) { var stream = FS.getStream(fd); if (!stream) { throw new FS.ErrnoError(9); } if ((stream.flags & 2097155) === 0) { throw new FS.ErrnoError(22); } FS.truncate(stream.node, len); },utime:function (path, atime, mtime) { var lookup = FS.lookupPath(path, { follow: true }); var node = lookup.node; node.node_ops.setattr(node, { timestamp: Math.max(atime, mtime) }); },open:function (path, flags, mode, fd_start, fd_end) { if (path === "") { throw new FS.ErrnoError(2); } flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; if ((flags & 64)) { mode = (mode & 4095) | 32768; } else { mode = 0; } var node; if (typeof path === 'object') { node = path; } else { path = PATH.normalize(path); try { var lookup = FS.lookupPath(path, { follow: !(flags & 131072) }); node = lookup.node; } catch (e) { // ignore } } // perhaps we need to create the node var created = false; if ((flags & 64)) { if (node) { // if O_CREAT and O_EXCL are set, error out if the node already exists if ((flags & 128)) { throw new FS.ErrnoError(17); } } else { // node doesn't exist, try to create it node = FS.mknod(path, mode, 0); created = true; } } if (!node) { throw new FS.ErrnoError(2); } // can't truncate a device if (FS.isChrdev(node.mode)) { flags &= ~512; } // if asked only for a directory, then this must be one if ((flags & 65536) && !FS.isDir(node.mode)) { throw new FS.ErrnoError(20); } // check permissions, if this is not a file we just created now (it is ok to // create and write to a file with read-only permissions; it is read-only // for later use) if (!created) { var err = FS.mayOpen(node, flags); if (err) { throw new FS.ErrnoError(err); } } // do truncation if necessary if ((flags & 512)) { FS.truncate(node, 0); } // we've already handled these, don't pass down to the underlying vfs flags &= ~(128 | 512); // register the stream with the filesystem var stream = FS.createStream({ node: node, path: FS.getPath(node), // we want the absolute path to the node flags: flags, seekable: true, position: 0, stream_ops: node.stream_ops, // used by the file family libc calls (fopen, fwrite, ferror, etc.) ungotten: [], error: false }, fd_start, fd_end); // call the new stream's open function if (stream.stream_ops.open) { stream.stream_ops.open(stream); } if (CCModule['logReadFiles'] && !(flags & 1)) { if (!FS.readFiles) FS.readFiles = {}; if (!(path in FS.readFiles)) { FS.readFiles[path] = 1; console.log("FS.trackingDelegate error on read file: " + path); } } try { if (FS.trackingDelegate['onOpenFile']) { var trackingFlags = 0; if ((flags & 2097155) !== 1) { trackingFlags |= FS.tracking.openFlags.READ; } if ((flags & 2097155) !== 0) { trackingFlags |= FS.tracking.openFlags.WRITE; } FS.trackingDelegate['onOpenFile'](path, trackingFlags); } } catch(e) { console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: " + e.message); } return stream; },close:function (stream) { if (FS.isClosed(stream)) { throw new FS.ErrnoError(9); } if (stream.getdents) stream.getdents = null; // free readdir state try { if (stream.stream_ops.close) { stream.stream_ops.close(stream); } } catch (e) { throw e; } finally { FS.closeStream(stream.fd); } stream.fd = null; },isClosed:function (stream) { return stream.fd === null; },llseek:function (stream, offset, whence) { if (FS.isClosed(stream)) { throw new FS.ErrnoError(9); } if (!stream.seekable || !stream.stream_ops.llseek) { throw new FS.ErrnoError(29); } if (whence != 0 /* SEEK_SET */ && whence != 1 /* SEEK_CUR */ && whence != 2 /* SEEK_END */) { throw new FS.ErrnoError(22); } stream.position = stream.stream_ops.llseek(stream, offset, whence); stream.ungotten = []; return stream.position; },read:function (stream, buffer, offset, length, position) { if (length < 0 || position < 0) { throw new FS.ErrnoError(22); } if (FS.isClosed(stream)) { throw new FS.ErrnoError(9); } if ((stream.flags & 2097155) === 1) { throw new FS.ErrnoError(9); } if (FS.isDir(stream.node.mode)) { throw new FS.ErrnoError(21); } if (!stream.stream_ops.read) { throw new FS.ErrnoError(22); } var seeking = typeof position !== 'undefined'; if (!seeking) { position = stream.position; } else if (!stream.seekable) { throw new FS.ErrnoError(29); } var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); if (!seeking) stream.position += bytesRead; return bytesRead; },write:function (stream, buffer, offset, length, position, canOwn) { if (length < 0 || position < 0) { throw new FS.ErrnoError(22); } if (FS.isClosed(stream)) { throw new FS.ErrnoError(9); } if ((stream.flags & 2097155) === 0) { throw new FS.ErrnoError(9); } if (FS.isDir(stream.node.mode)) { throw new FS.ErrnoError(21); } if (!stream.stream_ops.write) { throw new FS.ErrnoError(22); } if (stream.flags & 1024) { // seek to the end before writing in append mode FS.llseek(stream, 0, 2); } var seeking = typeof position !== 'undefined'; if (!seeking) { position = stream.position; } else if (!stream.seekable) { throw new FS.ErrnoError(29); } var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); if (!seeking) stream.position += bytesWritten; try { if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path); } catch(e) { console.log("FS.trackingDelegate['onWriteToFile']('"+stream.path+"') threw an exception: " + e.message); } return bytesWritten; },allocate:function (stream, offset, length) { if (FS.isClosed(stream)) { throw new FS.ErrnoError(9); } if (offset < 0 || length <= 0) { throw new FS.ErrnoError(22); } if ((stream.flags & 2097155) === 0) { throw new FS.ErrnoError(9); } if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { throw new FS.ErrnoError(19); } if (!stream.stream_ops.allocate) { throw new FS.ErrnoError(95); } stream.stream_ops.allocate(stream, offset, length); },mmap:function (stream, buffer, offset, length, position, prot, flags) { // TODO if PROT is PROT_WRITE, make sure we have write access if ((stream.flags & 2097155) === 1) { throw new FS.ErrnoError(13); } if (!stream.stream_ops.mmap) { throw new FS.ErrnoError(19); } return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags); },msync:function (stream, buffer, offset, length, mmapFlags) { if (!stream || !stream.stream_ops.msync) { return 0; } return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); },munmap:function (stream) { return 0; },ioctl:function (stream, cmd, arg) { if (!stream.stream_ops.ioctl) { throw new FS.ErrnoError(25); } return stream.stream_ops.ioctl(stream, cmd, arg); },readFile:function (path, opts) { opts = opts || {}; opts.flags = opts.flags || 'r'; opts.encoding = opts.encoding || 'binary'; if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { throw new Error('Invalid encoding type "' + opts.encoding + '"'); } var ret; var stream = FS.open(path, opts.flags); var stat = FS.stat(path); var length = stat.size; var buf = new Uint8Array(length); FS.read(stream, buf, 0, length, 0); if (opts.encoding === 'utf8') { ret = UTF8ArrayToString(buf, 0); } else if (opts.encoding === 'binary') { ret = buf; } FS.close(stream); return ret; },writeFile:function (path, data, opts) { opts = opts || {}; opts.flags = opts.flags || 'w'; var stream = FS.open(path, opts.flags, opts.mode); if (typeof data === 'string') { var buf = new Uint8Array(lengthBytesUTF8(data)+1); var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); } else if (ArrayBuffer.isView(data)) { FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); } else { throw new Error('Unsupported data type'); } FS.close(stream); },cwd:function () { return FS.currentPath; },chdir:function (path) { var lookup = FS.lookupPath(path, { follow: true }); if (lookup.node === null) { throw new FS.ErrnoError(2); } if (!FS.isDir(lookup.node.mode)) { throw new FS.ErrnoError(20); } var err = FS.nodePermissions(lookup.node, 'x'); if (err) { throw new FS.ErrnoError(err); } FS.currentPath = lookup.path; },createDefaultDirectories:function () { FS.mkdir('/tmp'); FS.mkdir('/home'); FS.mkdir('/home/web_user'); },createDefaultDevices:function () { // create /dev FS.mkdir('/dev'); // setup /dev/null FS.registerDevice(FS.makedev(1, 3), { read: function() { return 0; }, write: function(stream, buffer, offset, length, pos) { return length; } }); FS.mkdev('/dev/null', FS.makedev(1, 3)); // setup /dev/tty and /dev/tty1 // stderr needs to print output using CCModule['printErr'] // so we register a second tty just for it. TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); FS.mkdev('/dev/tty', FS.makedev(5, 0)); FS.mkdev('/dev/tty1', FS.makedev(6, 0)); // setup /dev/[u]random var random_device; if (typeof crypto === 'object' && typeof crypto['getRandomValues'] === 'function') { // for modern web browsers var randomBuffer = new Uint8Array(1); random_device = function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; }; } else {} if (!random_device) { // we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096 random_device = function() { abort("random_device"); }; } FS.createDevice('/dev', 'random', random_device); FS.createDevice('/dev', 'urandom', random_device); // we're not going to emulate the actual shm device, // just create the tmp dirs that reside in it commonly FS.mkdir('/dev/shm'); FS.mkdir('/dev/shm/tmp'); },createSpecialDirectories:function () { // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname) FS.mkdir('/proc'); FS.mkdir('/proc/self'); FS.mkdir('/proc/self/fd'); FS.mount({ mount: function() { var node = FS.createNode('/proc/self', 'fd', 16384 | 511 /* 0777 */, 73); node.node_ops = { lookup: function(parent, name) { var fd = +name; var stream = FS.getStream(fd); if (!stream) throw new FS.ErrnoError(9); var ret = { parent: null, mount: { mountpoint: 'fake' }, node_ops: { readlink: function() { return stream.path } } }; ret.parent = ret; // make it look like a simple root node return ret; } }; return node; } }, {}, '/proc/self/fd'); },createStandardStreams:function () { // TODO deprecate the old functionality of a single // input / output callback and that utilizes FS.createDevice // and instead require a unique set of stream ops // by default, we symlink the standard streams to the // default tty devices. however, if the standard streams // have been overwritten we create a unique device for // them instead. if (CCModule['stdin']) { FS.createDevice('/dev', 'stdin', CCModule['stdin']); } else { FS.symlink('/dev/tty', '/dev/stdin'); } if (CCModule['stdout']) { FS.createDevice('/dev', 'stdout', null, CCModule['stdout']); } else { FS.symlink('/dev/tty', '/dev/stdout'); } if (CCModule['stderr']) { FS.createDevice('/dev', 'stderr', null, CCModule['stderr']); } else { FS.symlink('/dev/tty1', '/dev/stderr'); } // open default streams for the stdin, stdout and stderr devices var stdin = FS.open('/dev/stdin', 'r'); var stdout = FS.open('/dev/stdout', 'w'); var stderr = FS.open('/dev/stderr', 'w'); },ensureErrnoError:function () { if (FS.ErrnoError) return; FS.ErrnoError = function ErrnoError(errno, node) { this.node = node; this.setErrno = function(errno) { this.errno = errno; }; this.setErrno(errno); this.message = 'FS error'; // Node.js compatibility: assigning on this.stack fails on Node 4 (but fixed on Node 8) if (this.stack) Object.defineProperty(this, "stack", { value: (new Error).stack, writable: true }); }; FS.ErrnoError.prototype = new Error(); FS.ErrnoError.prototype.constructor = FS.ErrnoError; // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info) [2].forEach(function(code) { FS.genericErrors[code] = new FS.ErrnoError(code); FS.genericErrors[code].stack = ''; }); },staticInit:function () { FS.ensureErrnoError(); FS.nameTable = new Array(4096); FS.mount(MEMFS, {}, '/'); FS.createDefaultDirectories(); FS.createDefaultDevices(); FS.createSpecialDirectories(); FS.filesystems = { 'MEMFS': MEMFS, 'IDBFS': IDBFS, 'WORKERFS': WORKERFS, }; },init:function (input, output, error) { FS.init.initialized = true; FS.ensureErrnoError(); // Allow CCModule.stdin etc. to provide defaults, if none explicitly passed to us here CCModule['stdin'] = input || CCModule['stdin']; CCModule['stdout'] = output || CCModule['stdout']; CCModule['stderr'] = error || CCModule['stderr']; FS.createStandardStreams(); },quit:function () { FS.init.initialized = false; // force-flush all streams, so we get musl std streams printed out var fflush = CCModule['_fflush']; if (fflush) fflush(0); // close all of our streams for (var i = 0; i < FS.streams.length; i++) { var stream = FS.streams[i]; if (!stream) { continue; } FS.close(stream); } },getMode:function (canRead, canWrite) { var mode = 0; if (canRead) mode |= 292 | 73; if (canWrite) mode |= 146; return mode; },joinPath:function (parts, forceRelative) { var path = PATH.join.apply(null, parts); if (forceRelative && path[0] == '/') path = path.substr(1); return path; },absolutePath:function (relative, base) { return PATH.resolve(base, relative); },standardizePath:function (path) { return PATH.normalize(path); },findObject:function (path, dontResolveLastLink) { var ret = FS.analyzePath(path, dontResolveLastLink); if (ret.exists) { return ret.object; } else { ___setErrNo(ret.error); return null; } },analyzePath:function (path, dontResolveLastLink) { // operate from within the context of the symlink's target try { var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); path = lookup.path; } catch (e) { } var ret = { isRoot: false, exists: false, error: 0, name: null, path: null, object: null, parentExists: false, parentPath: null, parentObject: null }; try { var lookup = FS.lookupPath(path, { parent: true }); ret.parentExists = true; ret.parentPath = lookup.path; ret.parentObject = lookup.node; ret.name = PATH.basename(path); lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); ret.exists = true; ret.path = lookup.path; ret.object = lookup.node; ret.name = lookup.node.name; ret.isRoot = lookup.path === '/'; } catch (e) { ret.error = e.errno; }; return ret; },createFolder:function (parent, name, canRead, canWrite) { var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); var mode = FS.getMode(canRead, canWrite); return FS.mkdir(path, mode); },createPath:function (parent, path, canRead, canWrite) { parent = typeof parent === 'string' ? parent : FS.getPath(parent); var parts = path.split('/').reverse(); while (parts.length) { var part = parts.pop(); if (!part) continue; var current = PATH.join2(parent, part); try { FS.mkdir(current); } catch (e) { // ignore EEXIST } parent = current; } return current; },createFile:function (parent, name, properties, canRead, canWrite) { var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); var mode = FS.getMode(canRead, canWrite); return FS.create(path, mode); },createDataFile:function (parent, name, data, canRead, canWrite, canOwn) { var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent; var mode = FS.getMode(canRead, canWrite); var node = FS.create(path, mode); if (data) { if (typeof data === 'string') { var arr = new Array(data.length); for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); data = arr; } // make sure we can write to the file FS.chmod(node, mode | 146); var stream = FS.open(node, 'w'); FS.write(stream, data, 0, data.length, 0, canOwn); FS.close(stream); FS.chmod(node, mode); } return node; },createDevice:function (parent, name, input, output) { var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); var mode = FS.getMode(!!input, !!output); if (!FS.createDevice.major) FS.createDevice.major = 64; var dev = FS.makedev(FS.createDevice.major++, 0); // Create a fake device that a set of stream ops to emulate // the old behavior. FS.registerDevice(dev, { open: function(stream) { stream.seekable = false; }, close: function(stream) { // flush any pending line data if (output && output.buffer && output.buffer.length) { output(10); } }, read: function(stream, buffer, offset, length, pos /* ignored */) { var bytesRead = 0; for (var i = 0; i < length; i++) { var result; try { result = input(); } catch (e) { throw new FS.ErrnoError(5); } if (result === undefined && bytesRead === 0) { throw new FS.ErrnoError(11); } if (result === null || result === undefined) break; bytesRead++; buffer[offset+i] = result; } if (bytesRead) { stream.node.timestamp = Date.now(); } return bytesRead; }, write: function(stream, buffer, offset, length, pos) { for (var i = 0; i < length; i++) { try { output(buffer[offset+i]); } catch (e) { throw new FS.ErrnoError(5); } } if (length) { stream.node.timestamp = Date.now(); } return i; } }); return FS.mkdev(path, mode, dev); },createLink:function (parent, name, target, canRead, canWrite) { var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); return FS.symlink(target, path); },forceLoadFile:function (obj) { if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; var success = true; if (typeof XMLHttpRequest !== 'undefined') { throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); } else if (CCModule['read']) { // Command-line. try { // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as // read() will try to parse UTF8. obj.contents = intArrayFromString(CCModule['read'](obj.url), true); obj.usedBytes = obj.contents.length; } catch (e) { success = false; } } else { throw new Error('Cannot load without read() or XMLHttpRequest.'); } if (!success) ___setErrNo(5); return success; },createLazyFile:function (parent, name, url, canRead, canWrite) { // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse. function LazyUint8Array() { this.lengthKnown = false; this.chunks = []; // Loaded chunks. Index is the chunk number } LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { if (idx > this.length-1 || idx < 0) { return undefined; } var chunkOffset = idx % this.chunkSize; var chunkNum = (idx / this.chunkSize)|0; return this.getter(chunkNum)[chunkOffset]; } LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { this.getter = getter; } LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { // Find length var xhr = new XMLHttpRequest(); xhr.open('HEAD', url, false); xhr.send(null); if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); var datalength = Number(xhr.getResponseHeader("Content-length")); var header; var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; var chunkSize = 1024*1024; // Chunk size in bytes if (!hasByteServing) chunkSize = datalength; // Function to get a range from the remote URL. var doXHR = (function(from, to) { if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!"); // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. var xhr = new XMLHttpRequest(); xhr.open('GET', url, false); if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); // Some hints to the browser that we want binary data. if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer'; if (xhr.overrideMimeType) { xhr.overrideMimeType('text/plain; charset=x-user-defined'); } xhr.send(null); if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); if (xhr.response !== undefined) { return new Uint8Array(xhr.response || []); } else { return intArrayFromString(xhr.responseText || '', true); } }); var lazyArray = this; lazyArray.setDataGetter(function(chunkNum) { var start = chunkNum * chunkSize; var end = (chunkNum+1) * chunkSize - 1; // including this byte end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block if (typeof(lazyArray.chunks[chunkNum]) === "undefined") { lazyArray.chunks[chunkNum] = doXHR(start, end); } if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!"); return lazyArray.chunks[chunkNum]; }); if (usesGzip || !datalength) { // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file datalength = this.getter(0).length; chunkSize = datalength; console.log("LazyFiles on gzip forces download of the whole file when length is accessed"); } this._length = datalength; this._chunkSize = chunkSize; this.lengthKnown = true; } if (typeof XMLHttpRequest !== 'undefined') { if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; var lazyArray = new LazyUint8Array(); Object.defineProperties(lazyArray, { length: { get: function() { if(!this.lengthKnown) { this.cacheLength(); } return this._length; } }, chunkSize: { get: function() { if(!this.lengthKnown) { this.cacheLength(); } return this._chunkSize; } } }); var properties = { isDevice: false, contents: lazyArray }; } else { var properties = { isDevice: false, url: url }; } var node = FS.createFile(parent, name, properties, canRead, canWrite); // This is a total hack, but I want to get this lazy file code out of the // core of MEMFS. If we want to keep this lazy file concept I feel it should // be its own thin LAZYFS proxying calls to MEMFS. if (properties.contents) { node.contents = properties.contents; } else if (properties.url) { node.contents = null; node.url = properties.url; } // Add a function that defers querying the file size until it is asked the first time. Object.defineProperties(node, { usedBytes: { get: function() { return this.contents.length; } } }); // override each stream op with one that tries to force load the lazy file first var stream_ops = {}; var keys = Object.keys(node.stream_ops); keys.forEach(function(key) { var fn = node.stream_ops[key]; stream_ops[key] = function forceLoadLazyFile() { if (!FS.forceLoadFile(node)) { throw new FS.ErrnoError(5); } return fn.apply(null, arguments); }; }); // use a custom read function stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) { if (!FS.forceLoadFile(node)) { throw new FS.ErrnoError(5); } var contents = stream.node.contents; if (position >= contents.length) return 0; var size = Math.min(contents.length - position, length); if (contents.slice) { // normal array for (var i = 0; i < size; i++) { buffer[offset + i] = contents[position + i]; } } else { for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR buffer[offset + i] = contents.get(position + i); } } return size; }; node.stream_ops = stream_ops; return node; },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { Browser.init(); // XXX perhaps this method should move onto Browser? // TODO we should allow people to just pass in a complete filename instead // of parent and name being that we just join them anyways var fullname = name ? PATH.resolve(PATH.join2(parent, name)) : parent; var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname function processData(byteArray) { function finish(byteArray) { if (preFinish) preFinish(); if (!dontCreateFile) { FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); } if (onload) onload(); removeRunDependency(dep); } var handled = false; CCModule['preloadPlugins'].forEach(function(plugin) { if (handled) return; if (plugin['canHandle'](fullname)) { plugin['handle'](byteArray, fullname, finish, function() { if (onerror) onerror(); removeRunDependency(dep); }); handled = true; } }); if (!handled) finish(byteArray); } addRunDependency(dep); if (typeof url == 'string') { Browser.asyncLoad(url, function(byteArray) { processData(byteArray); }, onerror); } else { processData(url); } },indexedDB:function () { return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; },DB_NAME:function () { return 'EM_FS_' + window.location.pathname; },DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function (paths, onload, onerror) { onload = onload || function(){}; onerror = onerror || function(){}; var indexedDB = FS.indexedDB(); try { var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); } catch (e) { return onerror(e); } openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { console.log('creating db'); var db = openRequest.result; db.createObjectStore(FS.DB_STORE_NAME); }; openRequest.onsuccess = function openRequest_onsuccess() { var db = openRequest.result; var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite'); var files = transaction.objectStore(FS.DB_STORE_NAME); var ok = 0, fail = 0, total = paths.length; function finish() { if (fail == 0) onload(); else onerror(); } paths.forEach(function(path) { var putRequest = files.put(FS.analyzePath(path).object.contents, path); putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() }; putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() }; }); transaction.onerror = onerror; }; openRequest.onerror = onerror; },loadFilesFromDB:function (paths, onload, onerror) { onload = onload || function(){}; onerror = onerror || function(){}; var indexedDB = FS.indexedDB(); try { var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); } catch (e) { return onerror(e); } openRequest.onupgradeneeded = onerror; // no database to load from openRequest.onsuccess = function openRequest_onsuccess() { var db = openRequest.result; try { var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly'); } catch(e) { onerror(e); return; } var files = transaction.objectStore(FS.DB_STORE_NAME); var ok = 0, fail = 0, total = paths.length; function finish() { if (fail == 0) onload(); else onerror(); } paths.forEach(function(path) { var getRequest = files.get(path); getRequest.onsuccess = function getRequest_onsuccess() { if (FS.analyzePath(path).exists) { FS.unlink(path); } FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); ok++; if (ok + fail == total) finish(); }; getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() }; }); transaction.onerror = onerror; }; openRequest.onerror = onerror; }}; CCModule["requestFullScreen"] = function CCModule_requestFullScreen(lockPointer, resizeCanvas, vrDevice) { err("CCModule.requestFullScreen is deprecated. Please call CCModule.requestFullscreen instead."); CCModule["requestFullScreen"] = CCModule["requestFullscreen"]; Browser.requestFullScreen(lockPointer, resizeCanvas, vrDevice) }; CCModule["requestFullscreen"] = function CCModule_requestFullscreen(lockPointer, resizeCanvas, vrDevice) { Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice) }; CCModule["requestAnimationFrame"] = function CCModule_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; CCModule["setCanvasSize"] = function CCModule_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; CCModule["pauseMainLoop"] = function CCModule_pauseMainLoop() { Browser.mainLoop.pause() }; CCModule["resumeMainLoop"] = function CCModule_resumeMainLoop() { Browser.mainLoop.resume() }; CCModule["getUserMedia"] = function CCModule_getUserMedia() { Browser.getUserMedia() } CCModule["createContext"] = function CCModule_createContext(canvas, useWebGL, setInCCModule, webGLContextAttributes) { return Browser.createContext(canvas, useWebGL, setInCCModule, webGLContextAttributes) }; if (typeof dateNow !== 'undefined') { _emscripten_get_now = dateNow; } else if (typeof performance === 'object' && performance && typeof performance['now'] === 'function') { _emscripten_get_now = function() { return performance['now'](); }; } else { _emscripten_get_now = Date.now; }; var GLctx; GL.init(); FS.staticInit();CCModule["FS_createFolder"] = FS.createFolder;CCModule["FS_createPath"] = FS.createPath;CCModule["FS_createDataFile"] = FS.createDataFile;CCModule["FS_createPreloadedFile"] = FS.createPreloadedFile;CCModule["FS_createLazyFile"] = FS.createLazyFile;CCModule["FS_createLink"] = FS.createLink;CCModule["FS_createDevice"] = FS.createDevice;CCModule["FS_unlink"] = FS.unlink;; var ASSERTIONS = false; // Copyright 2017 The Emscripten Authors. All rights reserved. // Emscripten is available under two separate licenses, the MIT license and the // University of Illinois/NCSA Open Source License. Both these licenses can be // found in the LICENSE file. /** @type {function(string, boolean=, number=)} */ function intArrayFromString(stringy, dontAddNull, length) { var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; var u8array = new Array(len); var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); if (dontAddNull) u8array.length = numBytesWritten; return u8array; } function intArrayToString(array) { var ret = []; for (var i = 0; i < array.length; i++) { var chr = array[i]; if (chr > 0xFF) { if (ASSERTIONS) { assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ') at offset ' + i + ' not in 0x00-0xFF.'); } chr &= 0xFF; } ret.push(String.fromCharCode(chr)); } return ret.join(''); } // Copied from https://github.com/strophe/strophejs/blob/e06d027/src/polyfills.js#L149 // This code was written by Tyler Akins and has been placed in the // public domain. It would be nice if you left this header intact. // Base64 code from Tyler Akins -- http://rumkin.com /** * Decodes a base64 string. * @param {String} input The string to decode. */ var decodeBase64 = typeof atob === 'function' ? atob : function (input) { var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; var output = ''; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; // remove all characters that are not A-Z, a-z, 0-9, +, /, or = input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); do { enc1 = keyStr.indexOf(input.charAt(i++)); enc2 = keyStr.indexOf(input.charAt(i++)); enc3 = keyStr.indexOf(input.charAt(i++)); enc4 = keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 !== 64) { output = output + String.fromCharCode(chr2); } if (enc4 !== 64) { output = output + String.fromCharCode(chr3); } } while (i < input.length); return output; }; // Converts a string of base64 into a byte array. // Throws error on invalid input. function intArrayFromBase64(s) { try { var decoded = decodeBase64(s); var bytes = new Uint8Array(decoded.length); for (var i = 0 ; i < decoded.length ; ++i) { bytes[i] = decoded.charCodeAt(i); } return bytes; } catch (_) { throw new Error('Converting base64 string to bytes failed.'); } } // If filename is a base64 data URI, parses and returns data (Buffer on node, // Uint8Array otherwise). If filename is not a base64 data URI, returns undefined. function tryParseAsDataURI(filename) { if (!isDataURI(filename)) { return; } return intArrayFromBase64(filename.slice(dataURIPrefix.length)); } // ASM_LIBRARY EXTERN PRIMITIVES: Math_imul,Int8Array,Int32Array var asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "Infinity": Infinity } var asmLibraryArg = { "a": abort, "b": setTempRet0, "c": getTempRet0, "d": _IDBFS_getDB, "e": _IDBFS_getRemoteSet, "f": _IDBFS_loadFS, "g": _IDBFS_loadRemoteEntry, "h": _IDBFS_reconcile, "i": _IDBFS_storeLocalEntry, "j": _IDBFS_storeRemoteEntry, "k": _JSEvents_requestFullscreen, "l": _JSEvents_resizeCanvasForFullscreen, "m": ___setErrNo, "n": __computeUnpackAlignedImageSize, "o": __emscripten_do_request_fullscreen, "p": __fillFullscreenChangeEventData, "q": __fillMouseEventData, "r": __fillPointerlockChangeEventData, "s": __fillVisibilityChangeEventData, "t": __findCanvasEventTarget, "u": __findEventTarget, "v": __get_canvas_element_size, "w": __glGenObject, "x": __registerBeforeUnloadEventCallback, "y": __registerFocusEventCallback, "z": __registerFullscreenChangeEventCallback, "A": __registerKeyEventCallback, "B": __registerMouseEventCallback, "C": __registerRestoreOldStyle, "D": __registerTouchEventCallback, "E": __registerUiEventCallback, "F": __registerVisibilityChangeEventCallback, "G": __registerWebGlEventCallback, "H": __registerWheelEventCallback, "I": __requestPointerLock, "J": __setLetterbox, "K": __set_canvas_element_size, "L": _emscripten_cancel_main_loop, "M": _emscripten_exit_fullscreen, "N": _emscripten_exit_pointerlock, "O": _emscripten_get_canvas_element_size, "P": _emscripten_get_device_pixel_ratio, "Q": _emscripten_get_element_css_size, "R": _emscripten_get_fullscreen_status, "S": _emscripten_get_heap_size, "T": _emscripten_get_now, "U": _emscripten_get_pointerlock_status, "V": _emscripten_is_webgl_context_lost, "W": _emscripten_memcpy_big, "X": _emscripten_request_fullscreen_strategy, "Y": _emscripten_request_pointerlock, "Z": _emscripten_resize_heap, "_": _emscripten_resume_main_loop, "$": _emscripten_set_beforeunload_callback_on_thread, "aa": _emscripten_set_blur_callback_on_thread, "ab": _emscripten_set_canvas_element_size, "ac": _emscripten_set_element_css_size, "ad": _emscripten_set_focus_callback_on_thread, "ae": _emscripten_set_fullscreenchange_callback_on_thread, "af": _emscripten_set_keydown_callback_on_thread, "ag": _emscripten_set_keypress_callback_on_thread, "ah": _emscripten_set_keyup_callback_on_thread, "ai": _emscripten_set_main_loop, "aj": _emscripten_set_main_loop_timing, "ak": _emscripten_set_mousedown_callback_on_thread, "al": _emscripten_set_mousemove_callback_on_thread, "am": _emscripten_set_mouseup_callback_on_thread, "an": _emscripten_set_resize_callback_on_thread, "ao": _emscripten_set_touchcancel_callback_on_thread, "ap": _emscripten_set_touchend_callback_on_thread, "aq": _emscripten_set_touchmove_callback_on_thread, "ar": _emscripten_set_touchstart_callback_on_thread, "as": _emscripten_set_visibilitychange_callback_on_thread, "at": _emscripten_set_webglcontextlost_callback_on_thread, "au": _emscripten_set_wheel_callback_on_thread, "av": _emscripten_webgl_create_context, "aw": _emscripten_webgl_destroy_context, "ax": _emscripten_webgl_destroy_context_calling_thread, "ay": _emscripten_webgl_do_create_context, "az": _emscripten_webgl_init_context_attributes, "aA": _emscripten_webgl_make_context_current, "aB": _exit, "aC": _gettimeofday, "aD": _glAttachShader, "aE": _glBindAttribLocation, "aF": _glBindBuffer, "aG": _glBindTexture, "aH": _glBlendFunc, "aI": _glBufferData, "aJ": _glBufferSubData, "aK": _glClear, "aL": _glClearColor, "aM": _glColorMask, "aN": _glCompileShader, "aO": _glCreateProgram, "aP": _glCreateShader, "aQ": _glDeleteBuffers, "aR": _glDeleteProgram, "aS": _glDeleteShader, "aT": _glDeleteTextures, "aU": _glDepthFunc, "aV": _glDepthMask, "aW": _glDetachShader, "aX": _glDisable, "aY": _glDisableVertexAttribArray, "aZ": _glDrawArrays, "a_": _glDrawElements, "a$": _glEnable, "ba": _glEnableVertexAttribArray, "bb": _glGenBuffers, "bc": _glGenTextures, "bd": _glGetIntegerv, "be": _glGetProgramInfoLog, "bf": _glGetProgramiv, "bg": _glGetShaderInfoLog, "bh": _glGetShaderiv, "bi": _glGetString, "bj": _glGetUniformLocation, "bk": _glLinkProgram, "bl": _glShaderSource, "bm": _glTexImage2D, "bn": _glTexParameteri, "bo": _glTexSubImage2D, "bp": _glUniform1f, "bq": _glUniform2f, "br": _glUniform3f, "bs": _glUniformMatrix4fv, "bt": _glUseProgram, "bu": _glVertexAttribPointer, "bv": _glViewport, "bw": _interop_AddClipboardListeners, "bx": _interop_AdjustXY, "by": _interop_AsyncDownloadTexturePack, "bz": _interop_AsyncLoadIndexedDB, "bA": _interop_AudioClose, "bB": _interop_AudioCreate, "bC": _interop_AudioDescribe, "bD": _interop_AudioDownload, "bE": _interop_AudioLog, "bF": _interop_AudioPlay, "bG": _interop_AudioPoll, "bH": _interop_CanvasHeight, "bI": _interop_CanvasWidth, "bJ": _interop_CloseKeyboard, "bK": _interop_DirectoryIter, "bL": _interop_DirectorySetWorking, "bM": _interop_DownloadAsync, "bN": _interop_DownloadFile, "bO": _interop_EnterFullscreen, "bP": _interop_FS_Init, "bQ": _interop_FileClose, "bR": _interop_FileCreate, "bS": _interop_FileExists, "bT": _interop_FileLength, "bU": _interop_FileRead, "bV": _interop_FileSeek, "bW": _interop_FileWrite, "bX": _interop_ForceTouchPageLayout, "bY": _interop_GetContainerID, "bZ": _interop_GetGpuRenderer, "b_": _interop_GetLocalTime, "b$": _interop_InitAudio, "ca": _interop_InitContainer, "cb": _interop_InitFilesystem, "cc": _interop_InitCCModule, "cd": _interop_InitSockets, "ce": _interop_IsAndroid, "cf": _interop_IsHttpsOnly, "cg": _interop_IsIOS, "ch": _interop_LoadIndexedDB, "ci": _interop_Log, "cj": _interop_OpenFileDialog, "ck": _interop_OpenKeyboard, "cl": _interop_OpenTab, "cm": _interop_RequestCanvasResize, "cn": _interop_SaveBlob, "co": _interop_SaveNode, "cp": _interop_ScreenHeight, "cq": _interop_ScreenWidth, "cr": _interop_SetFont, "cs": _interop_SetKeyboardText, "ct": _interop_SetPageTitle, "cu": _interop_ShowDialog, "cv": _interop_ShowSaveDialog, "cw": _interop_SocketClose, "cx": _interop_SocketConnect, "cy": _interop_SocketCreate, "cz": _interop_SocketGetError, "cA": _interop_SocketGetPending, "cB": _interop_SocketPoll, "cC": _interop_SocketRecv, "cD": _interop_SocketSend, "cE": _interop_TakeScreenshot, "cF": _interop_TextDraw, "cG": _interop_TextWidth, "cH": _interop_TryGetClipboardText, "cI": _interop_TrySetClipboardText, "cJ": emscriptenWebGLGet, "cK": emscriptenWebGLGetTexPixelData, "cL": emscripten_realloc_buffer, "cM": stringToNewUTF8, "cN": tempDoublePtr, "cO": DYNAMICTOP_PTR } // EMSCRIPTEN_START_ASM var asm = (/** @suppress {uselessCode} */ function(global, env, buffer) { 'almost asm'; var HEAP8 = new global.Int8Array(buffer), HEAP16 = new global.Int16Array(buffer), HEAP32 = new global.Int32Array(buffer), HEAPU8 = new global.Uint8Array(buffer), HEAPU16 = new global.Uint16Array(buffer), HEAPF32 = new global.Float32Array(buffer), HEAPF64 = new global.Float64Array(buffer), tempDoublePtr=env.cN|0, DYNAMICTOP_PTR=env.cO|0, __THREW__ = 0, threwValue = 0, setjmpId = 0, tempInt = 0, tempBigInt = 0, tempBigIntS = 0, tempValue = 0, tempDouble = 0.0, inf = global.Infinity, Math_floor=global.Math.floor, Math_abs=global.Math.abs, Math_sqrt=global.Math.sqrt, Math_cos=global.Math.cos, Math_sin=global.Math.sin, Math_atan2=global.Math.atan2, Math_exp=global.Math.exp, Math_log=global.Math.log, Math_ceil=global.Math.ceil, Math_imul=global.Math.imul, Math_min=global.Math.min, abort=env.a, setTempRet0=env.b, getTempRet0=env.c, _IDBFS_getDB=env.d, _IDBFS_getRemoteSet=env.e, _IDBFS_loadFS=env.f, _IDBFS_loadRemoteEntry=env.g, _IDBFS_reconcile=env.h, _IDBFS_storeLocalEntry=env.i, _IDBFS_storeRemoteEntry=env.j, _JSEvents_requestFullscreen=env.k, _JSEvents_resizeCanvasForFullscreen=env.l, ___setErrNo=env.m, __computeUnpackAlignedImageSize=env.n, __emscripten_do_request_fullscreen=env.o, __fillFullscreenChangeEventData=env.p, __fillMouseEventData=env.q, __fillPointerlockChangeEventData=env.r, __fillVisibilityChangeEventData=env.s, __findCanvasEventTarget=env.t, __findEventTarget=env.u, __get_canvas_element_size=env.v, __glGenObject=env.w, __registerBeforeUnloadEventCallback=env.x, __registerFocusEventCallback=env.y, __registerFullscreenChangeEventCallback=env.z, __registerKeyEventCallback=env.A, __registerMouseEventCallback=env.B, __registerRestoreOldStyle=env.C, __registerTouchEventCallback=env.D, __registerUiEventCallback=env.E, __registerVisibilityChangeEventCallback=env.F, __registerWebGlEventCallback=env.G, __registerWheelEventCallback=env.H, __requestPointerLock=env.I, __setLetterbox=env.J, __set_canvas_element_size=env.K, _emscripten_cancel_main_loop=env.L, _emscripten_exit_fullscreen=env.M, _emscripten_exit_pointerlock=env.N, _emscripten_get_canvas_element_size=env.O, _emscripten_get_device_pixel_ratio=env.P, _emscripten_get_element_css_size=env.Q, _emscripten_get_fullscreen_status=env.R, _emscripten_get_heap_size=env.S, _emscripten_get_now=env.T, _emscripten_get_pointerlock_status=env.U, _emscripten_is_webgl_context_lost=env.V, _emscripten_memcpy_big=env.W, _emscripten_request_fullscreen_strategy=env.X, _emscripten_request_pointerlock=env.Y, _emscripten_resize_heap=env.Z, _emscripten_resume_main_loop=env._, _emscripten_set_beforeunload_callback_on_thread=env.$, _emscripten_set_blur_callback_on_thread=env.aa, _emscripten_set_canvas_element_size=env.ab, _emscripten_set_element_css_size=env.ac, _emscripten_set_focus_callback_on_thread=env.ad, _emscripten_set_fullscreenchange_callback_on_thread=env.ae, _emscripten_set_keydown_callback_on_thread=env.af, _emscripten_set_keypress_callback_on_thread=env.ag, _emscripten_set_keyup_callback_on_thread=env.ah, _emscripten_set_main_loop=env.ai, _emscripten_set_main_loop_timing=env.aj, _emscripten_set_mousedown_callback_on_thread=env.ak, _emscripten_set_mousemove_callback_on_thread=env.al, _emscripten_set_mouseup_callback_on_thread=env.am, _emscripten_set_resize_callback_on_thread=env.an, _emscripten_set_touchcancel_callback_on_thread=env.ao, _emscripten_set_touchend_callback_on_thread=env.ap, _emscripten_set_touchmove_callback_on_thread=env.aq, _emscripten_set_touchstart_callback_on_thread=env.ar, _emscripten_set_visibilitychange_callback_on_thread=env.as, _emscripten_set_webglcontextlost_callback_on_thread=env.at, _emscripten_set_wheel_callback_on_thread=env.au, _emscripten_webgl_create_context=env.av, _emscripten_webgl_destroy_context=env.aw, _emscripten_webgl_destroy_context_calling_thread=env.ax, _emscripten_webgl_do_create_context=env.ay, _emscripten_webgl_init_context_attributes=env.az, _emscripten_webgl_make_context_current=env.aA, _exit=env.aB, _gettimeofday=env.aC, _glAttachShader=env.aD, _glBindAttribLocation=env.aE, _glBindBuffer=env.aF, _glBindTexture=env.aG, _glBlendFunc=env.aH, _glBufferData=env.aI, _glBufferSubData=env.aJ, _glClear=env.aK, _glClearColor=env.aL, _glColorMask=env.aM, _glCompileShader=env.aN, _glCreateProgram=env.aO, _glCreateShader=env.aP, _glDeleteBuffers=env.aQ, _glDeleteProgram=env.aR, _glDeleteShader=env.aS, _glDeleteTextures=env.aT, _glDepthFunc=env.aU, _glDepthMask=env.aV, _glDetachShader=env.aW, _glDisable=env.aX, _glDisableVertexAttribArray=env.aY, _glDrawArrays=env.aZ, _glDrawElements=env.a_, _glEnable=env.a$, _glEnableVertexAttribArray=env.ba, _glGenBuffers=env.bb, _glGenTextures=env.bc, _glGetIntegerv=env.bd, _glGetProgramInfoLog=env.be, _glGetProgramiv=env.bf, _glGetShaderInfoLog=env.bg, _glGetShaderiv=env.bh, _glGetString=env.bi, _glGetUniformLocation=env.bj, _glLinkProgram=env.bk, _glShaderSource=env.bl, _glTexImage2D=env.bm, _glTexParameteri=env.bn, _glTexSubImage2D=env.bo, _glUniform1f=env.bp, _glUniform2f=env.bq, _glUniform3f=env.br, _glUniformMatrix4fv=env.bs, _glUseProgram=env.bt, _glVertexAttribPointer=env.bu, _glViewport=env.bv, _interop_AddClipboardListeners=env.bw, _interop_AdjustXY=env.bx, _interop_AsyncDownloadTexturePack=env.by, _interop_AsyncLoadIndexedDB=env.bz, _interop_AudioClose=env.bA, _interop_AudioCreate=env.bB, _interop_AudioDescribe=env.bC, _interop_AudioDownload=env.bD, _interop_AudioLog=env.bE, _interop_AudioPlay=env.bF, _interop_AudioPoll=env.bG, _interop_CanvasHeight=env.bH, _interop_CanvasWidth=env.bI, _interop_CloseKeyboard=env.bJ, _interop_DirectoryIter=env.bK, _interop_DirectorySetWorking=env.bL, _interop_DownloadAsync=env.bM, _interop_DownloadFile=env.bN, _interop_EnterFullscreen=env.bO, _interop_FS_Init=env.bP, _interop_FileClose=env.bQ, _interop_FileCreate=env.bR, _interop_FileExists=env.bS, _interop_FileLength=env.bT, _interop_FileRead=env.bU, _interop_FileSeek=env.bV, _interop_FileWrite=env.bW, _interop_ForceTouchPageLayout=env.bX, _interop_GetContainerID=env.bY, _interop_GetGpuRenderer=env.bZ, _interop_GetLocalTime=env.b_, _interop_InitAudio=env.b$, _interop_InitContainer=env.ca, _interop_InitFilesystem=env.cb, _interop_InitCCModule=env.cc, _interop_InitSockets=env.cd, _interop_IsAndroid=env.ce, _interop_IsHttpsOnly=env.cf, _interop_IsIOS=env.cg, _interop_LoadIndexedDB=env.ch, _interop_Log=env.ci, _interop_OpenFileDialog=env.cj, _interop_OpenKeyboard=env.ck, _interop_OpenTab=env.cl, _interop_RequestCanvasResize=env.cm, _interop_SaveBlob=env.cn, _interop_SaveNode=env.co, _interop_ScreenHeight=env.cp, _interop_ScreenWidth=env.cq, _interop_SetFont=env.cr, _interop_SetKeyboardText=env.cs, _interop_SetPageTitle=env.ct, _interop_ShowDialog=env.cu, _interop_ShowSaveDialog=env.cv, _interop_SocketClose=env.cw, _interop_SocketConnect=env.cx, _interop_SocketCreate=env.cy, _interop_SocketGetError=env.cz, _interop_SocketGetPending=env.cA, _interop_SocketPoll=env.cB, _interop_SocketRecv=env.cC, _interop_SocketSend=env.cD, _interop_TakeScreenshot=env.cE, _interop_TextDraw=env.cF, _interop_TextWidth=env.cG, _interop_TryGetClipboardText=env.cH, _interop_TrySetClipboardText=env.cI, emscriptenWebGLGet=env.cJ, emscriptenWebGLGetTexPixelData=env.cK, emscripten_realloc_buffer=env.cL, stringToNewUTF8=env.cM, STACKTOP = 1973184, STACK_MAX = 7216064, tempFloat = 0.0; function _emscripten_replace_memory(newBuffer) { HEAP8 = new Int8Array(newBuffer); HEAPU8 = new Uint8Array(newBuffer); HEAP16 = new Int16Array(newBuffer); HEAPU16 = new Uint16Array(newBuffer); HEAP32 = new Int32Array(newBuffer); HEAPF32 = new Float32Array(newBuffer); HEAPF64 = new Float64Array(newBuffer); buffer = newBuffer; return true; } // EMSCRIPTEN_START_FUNCS function stackAlloc(size) { size = size|0; var ret = 0; ret = STACKTOP; STACKTOP = (STACKTOP + size)|0; STACKTOP = (STACKTOP + 15)&-16; return ret|0; } function stackSave() { return STACKTOP|0; } function stackRestore(top) { top = top|0; STACKTOP = top; } function establishStackSpace(stackBase, stackMax) { stackBase = stackBase|0; stackMax = stackMax|0; STACKTOP = stackBase; STACK_MAX = stackMax; } function _OnInit() { var label = 0, sp = 0; sp = STACKTOP; _TextureEntry_Register(13152); _TextureEntry_Register(13164); _TextureEntry_Register(13176); _TextureEntry_Register(13188); (_ScheduledTask_Add(0.050000000000000003,308)|0); _Event_Register((1792228),0,309); return; } function _Animations_Clear() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[275914]|0; _Mem_Free($0); HEAP32[275917] = 0; HEAP32[275914] = 0; HEAP8[1972810] = 0; return; } function _Animations_Tick($0) { $0 = $0|0; var $$04 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[275917]|0; $2 = ($1|0)==(0); if ($2) { return; } $3 = HEAP32[275914]|0; $4 = ($3|0)==(0|0); if ($4) { _Chat_AddRaw(23276); _Chat_AddRaw(23329); HEAP32[275917] = 0; return; } $5 = HEAP8[1972810]|0; $6 = ($5<<24>>24)==(0); if ($6) { _Animations_Validate(); } $7 = HEAP32[275917]|0; $8 = ($7|0)>(0); if (!($8)) { return; } $$04 = 0; while(1) { $9 = (45792 + ($$04<<4)|0); _Animations_Apply($9); $10 = (($$04) + 1)|0; $11 = HEAP32[275917]|0; $12 = ($10|0)<($11|0); if ($12) { $$04 = $10; } else { break; } } return; } function _OnPackChanged($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Animations_Clear(); _Animations_IsDefaultZip(); return; } function _AnimationsPngProcess($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Png_Decode(1103656,$0)|0); $3 = ($2|0)==(0); if ($3) { return; } _Logger_SysWarn2($2,44275,$1); $4 = HEAP32[275914]|0; _Mem_Free($4); HEAP32[275914] = 0; return; } function _Animations_ReadDescription($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $7 = 0, $8 = 0, $9 = 0; var $or$cond = 0, $or$cond10 = 0, $or$cond12 = 0, $switch$split2D = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 2336|0; $2 = sp + 2296|0; $3 = sp + 2112|0; $4 = sp + 2048|0; $5 = sp + 2304|0; $6 = sp + 2321|0; $7 = sp + 2320|0; $8 = sp; $9 = sp + 2240|0; ;HEAP16[$5>>1]=0|0;HEAP16[$5+2>>1]=0|0;HEAP16[$5+4>>1]=0|0;HEAP16[$5+6>>1]=0|0;HEAP16[$5+8>>1]=0|0;HEAP16[$5+10>>1]=0|0;HEAP16[$5+12>>1]=0|0;HEAP16[$5+14>>1]=0|0; HEAP32[$2>>2] = $3; $10 = ((($2)) + 4|0); HEAP16[$10>>1] = 0; $11 = ((($2)) + 6|0); HEAP16[$11>>1] = 128; _Stream_ReadonlyBuffered($9,$0,$8,2048); $12 = ((($4)) + 8|0); $13 = ((($4)) + 16|0); $14 = ((($5)) + 2|0); $15 = ((($4)) + 24|0); $16 = ((($5)) + 4|0); $17 = ((($4)) + 32|0); $18 = ((($5)) + 6|0); $19 = ((($4)) + 40|0); $20 = ((($5)) + 10|0); $21 = ((($4)) + 48|0); $22 = ((($5)) + 14|0); L1: while(1) { $23 = (_Stream_ReadLine($9,$2)|0); $switch$split2D = ($23|0)<(0); if ($switch$split2D) { label = 27; break; } switch ($23|0) { case 0: { break; } default: { break L1; } } $24 = HEAP16[$10>>1]|0; $25 = ($24<<16>>16)==(0); do { if (!($25)) { $26 = HEAP32[$2>>2]|0; $27 = HEAP8[$26>>0]|0; $28 = ($27<<24>>24)==(35); if (!($28)) { $29 = (_String_UNSAFE_Split($2,32,$4,7)|0); $30 = ($29|0)<(7); if ($30) { _Chat_Add1(22958,$2); break; } $31 = (_Convert_ParseUInt8($4,$6)|0); $32 = ($31<<24>>24)==(0); $33 = HEAP8[$6>>0]|0; $34 = ($33&255)>(15); $or$cond = $32 | $34; if ($or$cond) { _Chat_Add1(22994,$4); break; } $35 = (_Convert_ParseUInt8($12,$7)|0); $36 = ($35<<24>>24)==(0); $37 = HEAP8[$7>>0]|0; $38 = ($37&255)>(31); $or$cond10 = $36 | $38; if ($or$cond10) { _Chat_Add1(23026,$12); break; } $39 = (_Convert_ParseUInt16($13,$14)|0); $40 = ($39<<24>>24)==(0); if ($40) { _Chat_Add1(23058,$13); break; } $41 = (_Convert_ParseUInt16($15,$16)|0); $42 = ($41<<24>>24)==(0); if ($42) { _Chat_Add1(23091,$15); break; } $43 = (_Convert_ParseUInt16($17,$18)|0); $44 = ($43<<24>>24)==(0); $45 = HEAP16[$18>>1]|0; $46 = ($45<<16>>16)==(0); $or$cond12 = $44 | $46; if ($or$cond12) { _Chat_Add1(23124,$17); break; } $47 = (_Convert_ParseUInt16($19,$20)|0); $48 = ($47<<24>>24)==(0); if ($48) { _Chat_Add1(23154,$19); break; } $49 = (_Convert_ParseUInt16($21,$22)|0); $50 = ($49<<24>>24)==(0); if ($50) { _Chat_Add1(23186,$21); break; } $51 = HEAP32[275917]|0; $52 = ($51|0)==(512); if ($52) { label = 24; break L1; } $53 = HEAP8[$6>>0]|0; $54 = $53&255; $55 = HEAP8[$7>>0]|0; $56 = $55&255; $57 = $56 << 4; $58 = (($57) + ($54))|0; $59 = $58&65535; HEAP16[$5>>1] = $59; $60 = (($51) + 1)|0; HEAP32[275917] = $60; $61 = (45792 + ($51<<4)|0); ;HEAP16[$61>>1]=HEAP16[$5>>1]|0;HEAP16[$61+2>>1]=HEAP16[$5+2>>1]|0;HEAP16[$61+4>>1]=HEAP16[$5+4>>1]|0;HEAP16[$61+6>>1]=HEAP16[$5+6>>1]|0;HEAP16[$61+8>>1]=HEAP16[$5+8>>1]|0;HEAP16[$61+10>>1]=HEAP16[$5+10>>1]|0;HEAP16[$61+12>>1]=HEAP16[$5+12>>1]|0;HEAP16[$61+14>>1]=HEAP16[$5+14>>1]|0; } } } while(0); } L34: do { if ((label|0) == 24) { _Chat_AddRaw(23217); STACKTOP = sp;return; } else if ((label|0) == 27) { switch ($23|0) { case -857812991: { break; } default: { break L34; } } STACKTOP = sp;return; } } while(0); _Logger_SysWarn2($23,45064,$1); STACKTOP = sp;return; } function _UseWaterProcess($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _UseLavaProcess($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Animations_Validate() { var $$04248 = 0, $$047 = 0, $$1 = 0, $$lcssa = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0, $$sroa$1235$0$$sroa_idx36 = 0, $$sroa$1235$0$copyload = 0, $$sroa$7$0$$sroa_idx25 = 0, $$sroa$7$0$copyload = 0, $$sroa$8$0$$sroa_idx27 = 0, $$sroa$8$0$copyload = 0, $$sroa$9$0$$sroa_idx29 = 0, $$sroa$9$0$copyload = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0; var $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0; var $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond44 = 0, $or$cond46 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp + 4|0; $1 = sp; HEAP8[1972810] = 1; $2 = HEAP32[275917]|0; $3 = ($2|0)>(0); if (!($3)) { STACKTOP = sp;return; } $$04248 = 0; while(1) { $$sroa$0$0$$sroa_idx = (45792 + ($$04248<<4)|0); $$sroa$0$0$copyload = HEAP16[$$sroa$0$0$$sroa_idx>>1]|0; $$sroa$7$0$$sroa_idx25 = (((45792 + ($$04248<<4)|0)) + 2|0); $$sroa$7$0$copyload = HEAP16[$$sroa$7$0$$sroa_idx25>>1]|0; $$sroa$8$0$$sroa_idx27 = (((45792 + ($$04248<<4)|0)) + 4|0); $$sroa$8$0$copyload = HEAP16[$$sroa$8$0$$sroa_idx27>>1]|0; $$sroa$9$0$$sroa_idx29 = (((45792 + ($$04248<<4)|0)) + 6|0); $$sroa$9$0$copyload = HEAP16[$$sroa$9$0$$sroa_idx29>>1]|0; $$sroa$1235$0$$sroa_idx36 = (((45792 + ($$04248<<4)|0)) + 10|0); $$sroa$1235$0$copyload = HEAP16[$$sroa$1235$0$$sroa_idx36>>1]|0; $4 = $$sroa$9$0$copyload&65535; $5 = $$sroa$0$0$copyload&65535; $6 = $5 & 15; HEAP32[$0>>2] = $6; $7 = (4)?($5 >>> 4):($5); HEAP32[$1>>2] = $7; $8 = HEAP32[(1951372)>>2]|0; $9 = ($8|0)>=($4|0); $10 = HEAP32[(1951376)>>2]|0; $11 = ($7|0)<($10|0); $or$cond44 = $9 & $11; if ($or$cond44) { $12 = $$sroa$8$0$copyload&65535; $13 = (($4) + ($12))|0; $14 = $$sroa$1235$0$copyload&65535; $15 = Math_imul($14, $4)|0; $16 = $$sroa$7$0$copyload&65535; $17 = (($15) + ($16))|0; $18 = HEAP32[(1103660)>>2]|0; $19 = ($17|0)>($18|0); $20 = HEAP32[(1103664)>>2]|0; $21 = ($13|0)>($20|0); $or$cond46 = $19 | $21; if ($or$cond46) { _Chat_Add2(23448,$0,$1); label = 7; } else { $$1 = $$04248; } } else { _Chat_Add2(23361,$0,$1); label = 7; } if ((label|0) == 7) { label = 0; $22 = HEAP32[275917]|0; $23 = (($22) + -1)|0; $24 = ($$04248|0)<($23|0); if ($24) { $25 = HEAP32[275917]|0; $26 = (($25) + -1)|0; $$047 = $$04248; while(1) { $27 = (45792 + ($$047<<4)|0); $28 = (($$047) + 1)|0; $29 = (45792 + ($28<<4)|0); ;HEAP32[$27>>2]=HEAP32[$29>>2]|0;HEAP32[$27+4>>2]=HEAP32[$29+4>>2]|0;HEAP32[$27+8>>2]=HEAP32[$29+8>>2]|0;HEAP32[$27+12>>2]=HEAP32[$29+12>>2]|0; $30 = ($28|0)<($26|0); if ($30) { $$047 = $28; } else { $$lcssa = $26; break; } } } else { $$lcssa = $23; } $31 = (($$04248) + -1)|0; HEAP32[275917] = $$lcssa; $$1 = $31; } $32 = (($$1) + 1)|0; $33 = HEAP32[275917]|0; $34 = ($32|0)<($33|0); if ($34) { $$04248 = $32; } else { break; } } STACKTOP = sp;return; } function _Animations_Apply($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($0)) + 12|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { $6 = ((($0)) + 8|0); $7 = HEAP16[$6>>1]|0; $8 = (($7) + 1)<<16>>16; $9 = ((($0)) + 10|0); $10 = HEAP16[$9>>1]|0; $11 = (($8&65535) % ($10&65535))&-1; HEAP16[$6>>1] = $11; $12 = ((($0)) + 14|0); $13 = HEAP16[$12>>1]|0; HEAP16[$2>>1] = $13; $14 = HEAP16[$0>>1]|0; $15 = $14&65535; $16 = ((($0)) + 6|0); $17 = HEAP16[$16>>1]|0; $18 = $17&65535; $19 = ((($1)) + 4|0); HEAP32[$19>>2] = $18; $20 = ((($1)) + 8|0); HEAP32[$20>>2] = $18; $21 = HEAP32[275914]|0; $22 = ((($0)) + 4|0); $23 = HEAP16[$22>>1]|0; $24 = $23&65535; $25 = HEAP32[(1103660)>>2]|0; $26 = Math_imul($25, $24)|0; $27 = (($21) + ($26<<2)|0); $28 = ((($0)) + 2|0); $29 = HEAP16[$28>>1]|0; $30 = $29&65535; $31 = $11&65535; $32 = Math_imul($18, $31)|0; $33 = (($32) + ($30))|0; $34 = (($27) + ($33<<2)|0); HEAP32[$1>>2] = $34; _Animations_Update($15,$1,$25); STACKTOP = sp;return; } else { $5 = (($3) + -1)<<16>>16; HEAP16[$2>>1] = $5; STACKTOP = sp;return; } } function _Animations_Update($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1949304)>>2]|0; $4 = ($3)?($0 >> $3):($0); $5 = (1949312 + ($4<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(0); if ($7) { return; } $8 = HEAP32[(1949300)>>2]|0; $9 = $8 & $0; $10 = HEAP32[(1951372)>>2]|0; $11 = Math_imul($9, $10)|0; $12 = HEAP8[(1803129)>>0]|0; _Gfx_UpdateTexture($6,0,$11,$1,$2,$12); return; } function _Animations_IsDefaultZip() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; $1 = HEAP16[(21780)>>1]|0; $2 = ($1<<16>>16)==(0); if ($2) { $3 = (_Options_UNSAFE_Get(44521,$0)|0); $4 = ($3<<24>>24)==(0); if (!($4)) { } } STACKTOP = sp;return; } function _OnInit_1() { var label = 0, sp = 0; sp = STACKTOP; _Sounds_Init(); return; } function _OnFree() { var label = 0, sp = 0; sp = STACKTOP; _Sounds_Free(); return; } function _Sounds_Free() { var label = 0, sp = 0; sp = STACKTOP; _Sounds_Stop(); return; } function _Sounds_Stop() { var label = 0, sp = 0; sp = STACKTOP; _Audio_Close(53984); _Audio_Close((53988)); _Audio_Close((53992)); _Audio_Close((53996)); _Audio_Close((54000)); _Audio_Close((54004)); _Audio_Close((54008)); _Audio_Close((54012)); return; } function _Audio_Close($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[$0>>2]|0; $2 = ($1|0)==(0); if (!($2)) { _interop_AudioClose(($1|0)); } HEAP32[$0>>2] = 0; return; } function _Sounds_Init() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_Options_GetInt(38189,0,100,0)|0); _Audio_SetSounds($0); _Event_Register(1794048,0,9); return; } function _Audio_SetSounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[275918] = $0; $1 = ($0|0)==(0); if ($1) { _Sounds_Stop(); return; } else { _Sounds_Start(); return; } } function _Audio_PlayBlockSound($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($3<<16>>16)==(0); if ($4) { $5 = $2&65535; $6 = (1121556 + ($5)|0); $7 = HEAP8[$6>>0]|0; _Audio_PlayDigSound($7); return; } $8 = HEAP8[1972839]|0; $9 = ($8<<24>>24)==(0); if (!($9)) { return; } $10 = $3&65535; $11 = (1122324 + ($10)|0); $12 = HEAP8[$11>>0]|0; _Audio_PlayDigSound($12); return; } function _Audio_PlayDigSound($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Sounds_Play($0,1103680); return; } function _Sounds_Play($0,$1) { $0 = $0|0; $1 = $1|0; var $$ = 0, $$lcssa = 0, $$lcssa49 = 0, $$lcssa51 = 0, $$lcssa55 = 0, $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0; var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0; var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $or$cond = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp + 8|0; $3 = sp; $4 = ($0<<24>>24)!=(0); $5 = HEAP32[275918]|0; $6 = ($5|0)!=(0); $or$cond = $4 & $6; if (!($or$cond)) { STACKTOP = sp;return; } $7 = (_Soundboard_PickRandom($1,$0)|0); $8 = ($7|0)==(0|0); if ($8) { STACKTOP = sp;return; } $9 = ((($7)) + 8|0); $10 = HEAP32[$9>>2]|0; HEAP32[$2>>2] = $10; $11 = ((($7)) + 12|0); $12 = HEAP32[$11>>2]|0; $13 = ((($2)) + 4|0); HEAP32[$13>>2] = $12; $14 = HEAP32[$7>>2]|0; $15 = ((($2)) + 8|0); HEAP32[$15>>2] = $14; $16 = ((($7)) + 4|0); $17 = HEAP32[$16>>2]|0; $18 = ((($2)) + 12|0); HEAP32[$18>>2] = $17; $19 = ((($2)) + 20|0); HEAP32[$19>>2] = 100; $20 = HEAP32[275918]|0; $21 = ((($2)) + 16|0); HEAP32[$21>>2] = $20; $22 = ($1|0)==(1103680|0); if ($22) { $23 = ($0<<24>>24)==(5); $$ = $23 ? 120 : 80; $$sink = $$; label = 7; } else { $24 = (($20|0) / 2)&-1; HEAP32[$21>>2] = $24; $25 = ($0<<24>>24)==(5); if ($25) { $$sink = 140; label = 7; } } if ((label|0) == 7) { HEAP32[$19>>2] = $$sink; } $28 = (_Audio_Poll(53984,$3)|0); $29 = ($28|0)==(0); L13: do { if ($29) { $30 = HEAP32[$3>>2]|0; $31 = ($30|0)>(0); do { if ($31) { $26 = (_Audio_Poll((53988),$3)|0); $27 = ($26|0)==(0); if (!($27)) { $$lcssa51 = $26; break L13; } $68 = HEAP32[$3>>2]|0; $69 = ($68|0)>(0); if ($69) { $70 = (_Audio_Poll((53992),$3)|0); $71 = ($70|0)==(0); if (!($71)) { $$lcssa51 = $70; break L13; } $72 = HEAP32[$3>>2]|0; $73 = ($72|0)>(0); if ($73) { $74 = (_Audio_Poll((53996),$3)|0); $75 = ($74|0)==(0); if (!($75)) { $$lcssa51 = $74; break L13; } $76 = HEAP32[$3>>2]|0; $77 = ($76|0)>(0); if ($77) { $78 = (_Audio_Poll((54000),$3)|0); $79 = ($78|0)==(0); if (!($79)) { $$lcssa51 = $78; break L13; } $80 = HEAP32[$3>>2]|0; $81 = ($80|0)>(0); if ($81) { $82 = (_Audio_Poll((54004),$3)|0); $83 = ($82|0)==(0); if (!($83)) { $$lcssa51 = $82; break L13; } $84 = HEAP32[$3>>2]|0; $85 = ($84|0)>(0); if ($85) { $86 = (_Audio_Poll((54008),$3)|0); $87 = ($86|0)==(0); if (!($87)) { $$lcssa51 = $86; break L13; } $88 = HEAP32[$3>>2]|0; $89 = ($88|0)>(0); if ($89) { $90 = (_Audio_Poll((54012),$3)|0); $91 = ($90|0)==(0); if (!($91)) { $$lcssa51 = $90; break L13; } $92 = HEAP32[$3>>2]|0; $93 = ($92|0)>(0); if (!($93)) { $$lcssa55 = (54012); break; } $36 = (_Audio_Poll(53984,$3)|0); $37 = ($36|0)==(0); L31: do { if ($37) { $38 = HEAP32[$3>>2]|0; $39 = ($38|0)>(0); do { if ($39) { $34 = (_Audio_Poll((53988),$3)|0); $35 = ($34|0)==(0); if (!($35)) { $$lcssa = $34; break L31; } $42 = HEAP32[$3>>2]|0; $43 = ($42|0)>(0); if (!($43)) { $$lcssa49 = (53988); break; } $44 = (_Audio_Poll((53992),$3)|0); $45 = ($44|0)==(0); if (!($45)) { $$lcssa = $44; break L31; } $46 = HEAP32[$3>>2]|0; $47 = ($46|0)>(0); if (!($47)) { $$lcssa49 = (53992); break; } $48 = (_Audio_Poll((53996),$3)|0); $49 = ($48|0)==(0); if (!($49)) { $$lcssa = $48; break L31; } $50 = HEAP32[$3>>2]|0; $51 = ($50|0)>(0); if (!($51)) { $$lcssa49 = (53996); break; } $52 = (_Audio_Poll((54000),$3)|0); $53 = ($52|0)==(0); if (!($53)) { $$lcssa = $52; break L31; } $54 = HEAP32[$3>>2]|0; $55 = ($54|0)>(0); if (!($55)) { $$lcssa49 = (54000); break; } $56 = (_Audio_Poll((54004),$3)|0); $57 = ($56|0)==(0); if (!($57)) { $$lcssa = $56; break L31; } $58 = HEAP32[$3>>2]|0; $59 = ($58|0)>(0); if (!($59)) { $$lcssa49 = (54004); break; } $60 = (_Audio_Poll((54008),$3)|0); $61 = ($60|0)==(0); if (!($61)) { $$lcssa = $60; break L31; } $62 = HEAP32[$3>>2]|0; $63 = ($62|0)>(0); if (!($63)) { $$lcssa49 = (54008); break; } $64 = (_Audio_Poll((54012),$3)|0); $65 = ($64|0)==(0); if (!($65)) { $$lcssa = $64; break L31; } $66 = HEAP32[$3>>2]|0; $67 = ($66|0)>(0); if (!($67)) { $$lcssa49 = (54012); break; } STACKTOP = sp;return; } else { $$lcssa49 = 53984; } } while(0); $40 = (_Audio_PlayData($$lcssa49,$2)|0); $41 = ($40|0)==(0); if ($41) { STACKTOP = sp;return; } _Sounds_Fail($40); STACKTOP = sp;return; } else { $$lcssa = $36; } } while(0); _Sounds_Fail($$lcssa); STACKTOP = sp;return; } else { $$lcssa55 = (54008); } } else { $$lcssa55 = (54004); } } else { $$lcssa55 = (54000); } } else { $$lcssa55 = (53996); } } else { $$lcssa55 = (53992); } } else { $$lcssa55 = (53988); } } else { $$lcssa55 = 53984; } } while(0); $32 = (_Audio_PlayData($$lcssa55,$2)|0); $33 = ($32|0)==(0); if ($33) { STACKTOP = sp;return; } _Sounds_Fail($32); STACKTOP = sp;return; } else { $$lcssa51 = $28; } } while(0); _Sounds_Fail($$lcssa51); STACKTOP = sp;return; } function _Soundboard_PickRandom($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (($1) + -1)<<24>>24; $3 = ($2&255)>(8); if ($3) { $$0 = 0; return ($$0|0); } $4 = ($1<<24>>24)==(5); $5 = $1&255; $6 = $4 ? 4 : $5; $7 = (($0) + (($6*164)|0)|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(0); if ($9) { $$0 = 0; return ($$0|0); } $10 = (_Random_Next(1084928,$8)|0); $11 = ((((($0) + (($6*164)|0)|0)) + 4|0) + ($10<<4)|0); $$0 = $11; return ($$0|0); } function _Audio_Poll($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[$0>>2]|0; $3 = ($2|0)==(0); if ($3) { HEAP32[$1>>2] = 0; $$0 = 0; return ($$0|0); } else { $4 = (_interop_AudioPoll(($2|0),($1|0))|0); $$0 = $4; return ($$0|0); } } function _Sounds_Fail($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _AudioWarn($0,23551); _Chat_AddRaw(23566); _Audio_SetSounds(0); return; } function _Audio_PlayData($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[$0>>2]|0; $3 = ($2|0)==(0); if ($3) { $4 = (_interop_AudioCreate()|0); HEAP32[$0>>2] = $4; } $5 = HEAP32[$0>>2]|0; $6 = HEAP32[$1>>2]|0; $7 = ((($1)) + 16|0); $8 = HEAP32[$7>>2]|0; $9 = ((($1)) + 20|0); $10 = HEAP32[$9>>2]|0; $11 = (_interop_AudioPlay(($5|0),($6|0),($8|0),($10|0))|0); return ($11|0); } function _AudioWarn($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Logger_Warn($0,$1,50); return; } function _Audio_DescribeError($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 608|0; $2 = sp; $3 = (_interop_AudioDescribe(($0|0),($2|0),600)|0); _String_AppendUtf8($1,$2,$3); $4 = ($3|0)>(0); $5 = $4&1; STACKTOP = sp;return ($5|0); } function _Sounds_Start() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_AudioBackend_Init()|0); $1 = ($0<<24>>24)==(0); if ($1) { HEAP32[275918] = 0; return; } $2 = HEAP8[1972811]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { return; } HEAP8[1972811] = 1; _InitWebSounds(); return; } function _AudioBackend_Init() { var $$0 = 0, $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_interop_InitAudio()|0); $1 = ($0|0)==(0); if ($1) { $$0 = 1; return ($$0|0); } _AudioWarn($0,24246); $$0 = 0; return ($$0|0); } function _InitWebSounds() { var $$01213 = 0, $$014 = 0, $$1 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $$01213 = 1105320;$$014 = 0; while(1) { $0 = (16 + ($$014<<3)|0); $1 = HEAP32[$0>>2]|0; $2 = ($$014|0)==(28); if ($2) { $$1 = 1103680; } else { $3 = (((16 + ($$014<<3)|0)) + 4|0); $4 = HEAP32[$3>>2]|0; $5 = (($$01213) + (($1*164)|0)|0); $6 = HEAP32[$5>>2]|0; $7 = (($6) + 1)|0; HEAP32[$5>>2] = $7; $8 = ((((((($$01213) + (($1*164)|0)|0)) + 4|0) + ($6<<4)|0)) + 8|0); HEAP32[$8>>2] = $4; $$1 = $$01213; } $9 = (($$014) + 1)|0; $exitcond = ($9|0)==(60); if ($exitcond) { break; } else { $$01213 = $$1;$$014 = $9; } } return; } function _Audio_PlayStepSound($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Sounds_Play($0,1105320); return; } function _Audio_SetMusic($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[275919] = $0; $1 = ($0|0)==(0); if ($1) { return; } _Music_Start(); return; } function _Music_Start() { var label = 0, sp = 0; sp = STACKTOP; _Chat_AddRaw(24271); HEAP32[275919] = 0; return; } function _OnInit_43() { var label = 0, sp = 0; sp = STACKTOP; _Event_Register((1793528),0,310); return; } function _OnFree_44() { var label = 0, sp = 0; sp = STACKTOP; _OnContextLost(0); return; } function _OnContextLost($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteVb(1106960); return; } function _AxisLinesRenderer_Render() { var $$0 = 0.0, $$025 = 0.0, $$02629 = 0, $$02728 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0; var $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $0 = sp; $1 = sp + 84|0; $2 = sp + 72|0; $3 = sp + 60|0; $4 = HEAP8[1972812]|0; $5 = ($4<<24>>24)==(0); if ($5) { STACKTOP = sp;return; } $6 = HEAP32[276740]|0; $7 = ($6|0)==(0); if ($7) { _Gfx_RecreateDynamicVb(1106960,0,12); } $8 = HEAP32[(1771060)>>2]|0; $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(0); if ($10) { ;HEAP32[$1>>2]=HEAP32[(1771048)>>2]|0;HEAP32[$1+4>>2]=HEAP32[(1771048)+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[(1771048)+8>>2]|0; $14 = +HEAPF32[(1783792)>>2]; $15 = $14 * 0.01745329238474369; $16 = +HEAPF32[(1783788)>>2]; $17 = $16 * 0.01745329238474369; _Vec3_GetDirVector($3,$15,$17); ;HEAP32[$2>>2]=HEAP32[$3>>2]|0;HEAP32[$2+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[$3+8>>2]|0; _Vec3_Mul1($2,$2); _Vec3_Add($1,$2,$1); $$0 = 0.125;$$025 = 0.03125; } else { ;HEAP32[$1>>2]=HEAP32[(1783776)>>2]|0;HEAP32[$1+4>>2]=HEAP32[(1783776)+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[(1783776)+8>>2]|0; $11 = ((($1)) + 4|0); $12 = +HEAPF32[$11>>2]; $13 = $12 + 0.05000000074505806; HEAPF32[$11>>2] = $13; $$0 = 1.0;$$025 = 1.0; } $18 = $$025 * -3.0; _Vec3_Add1($0,$1,$18); $19 = ((($0)) + 12|0); $20 = $$0 * -0.03125; _Vec3_Add1($19,$1,$20); $21 = ((($0)) + 24|0); ;HEAP32[$21>>2]=HEAP32[$1>>2]|0;HEAP32[$21+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$21+8>>2]=HEAP32[$1+8>>2]|0; $22 = ((($0)) + 36|0); $23 = $$0 * 0.03125; _Vec3_Add1($22,$1,$23); $24 = ((($0)) + 48|0); $25 = $$025 * 3.0; _Vec3_Add1($24,$1,$25); $26 = HEAP32[276740]|0; $27 = (_Gfx_LockDynamicVb($26,0,12)|0); $$02629 = $27;$$02728 = 0; while(1) { $28 = ($$02728*3)|0; $29 = (496 + ($28)|0); $30 = HEAP8[$29>>0]|0; $31 = $30&255; $32 = (($0) + (($31*12)|0)|0); $33 = HEAP32[$32>>2]|0; HEAP32[$$02629>>2] = $33; $34 = (($28) + 1)|0; $35 = (496 + ($34)|0); $36 = HEAP8[$35>>0]|0; $37 = $36&255; $38 = (((($0) + (($37*12)|0)|0)) + 4|0); $39 = HEAP32[$38>>2]|0; $40 = ((($$02629)) + 4|0); HEAP32[$40>>2] = $39; $41 = (($28) + 2)|0; $42 = (496 + ($41)|0); $43 = HEAP8[$42>>0]|0; $44 = $43&255; $45 = (((($0) + (($44*12)|0)|0)) + 8|0); $46 = HEAP32[$45>>2]|0; $47 = ((($$02629)) + 8|0); HEAP32[$47>>2] = $46; $48 = (2)?($$02728 >>> 2):($$02728); $49 = (13248 + ($48<<2)|0); $50 = HEAP32[$49>>2]|0; $51 = ((($$02629)) + 12|0); HEAP32[$51>>2] = $50; $52 = (($$02728) + 1)|0; $53 = ((($$02629)) + 16|0); $exitcond = ($52|0)==(12); if ($exitcond) { break; } else { $$02629 = $53;$$02728 = $52; } } _Gfx_SetVertexFormat(0); $54 = HEAP32[276740]|0; _Gfx_UnlockDynamicVb($54); _Gfx_DrawVb_IndexedTris(12); STACKTOP = sp;return; } function _Vec3_Mul1($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0.0, $11 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[$1>>2]; $3 = $2 * 0.5; HEAPF32[$0>>2] = $3; $4 = ((($1)) + 4|0); $5 = +HEAPF32[$4>>2]; $6 = $5 * 0.5; $7 = ((($0)) + 4|0); HEAPF32[$7>>2] = $6; $8 = ((($1)) + 8|0); $9 = +HEAPF32[$8>>2]; $10 = $9 * 0.5; $11 = ((($0)) + 8|0); HEAPF32[$11>>2] = $10; return; } function _Vec3_Add($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 + $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 + $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 + $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _Vec3_Add1($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = +$2; var $10 = 0.0, $11 = 0.0, $12 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = $3 + $2; HEAPF32[$0>>2] = $4; $5 = ((($1)) + 4|0); $6 = +HEAPF32[$5>>2]; $7 = $6 + $2; $8 = ((($0)) + 4|0); HEAPF32[$8>>2] = $7; $9 = ((($1)) + 8|0); $10 = +HEAPF32[$9>>2]; $11 = $10 + $2; $12 = ((($0)) + 8|0); HEAPF32[$12>>2] = $11; return; } function _Bitmap_UNSAFE_CopyBlock($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; var $$02628 = 0, $$027 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $7 = 0; var $8 = 0, $9 = 0, $exitcond = 0, $exitcond32 = 0, label = 0, sp = 0; sp = STACKTOP; $7 = ($6|0)>(0); if (!($7)) { return; } $8 = HEAP32[$4>>2]|0; $9 = ((($4)) + 4|0); $10 = HEAP32[$5>>2]|0; $11 = ((($5)) + 4|0); $$02628 = 0; while(1) { $12 = (($$02628) + ($1))|0; $13 = HEAP32[$9>>2]|0; $14 = Math_imul($13, $12)|0; $15 = (($8) + ($14<<2)|0); $16 = (($15) + ($0<<2)|0); $17 = (($$02628) + ($3))|0; $18 = HEAP32[$11>>2]|0; $19 = Math_imul($18, $17)|0; $20 = (($10) + ($19<<2)|0); $21 = (($20) + ($2<<2)|0); $$027 = 0; while(1) { $22 = (($16) + ($$027<<2)|0); $23 = HEAP32[$22>>2]|0; $24 = (($21) + ($$027<<2)|0); HEAP32[$24>>2] = $23; $25 = (($$027) + 1)|0; $exitcond = ($25|0)==($6|0); if ($exitcond) { break; } else { $$027 = $25; } } $26 = (($$02628) + 1)|0; $exitcond32 = ($26|0)==($6|0); if ($exitcond32) { break; } else { $$02628 = $26; } } return; } function _Bitmap_Allocate($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 4|0); HEAP32[$3>>2] = $1; $4 = ((($0)) + 8|0); HEAP32[$4>>2] = $2; $5 = Math_imul($2, $1)|0; $6 = (_Mem_Alloc($5,4,27507)|0); HEAP32[$0>>2] = $6; return; } function _Bitmap_TryAllocate($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 4|0); HEAP32[$3>>2] = $1; $4 = ((($0)) + 8|0); HEAP32[$4>>2] = $2; $5 = Math_imul($2, $1)|0; $6 = (_Mem_TryAlloc($5,4)|0); HEAP32[$0>>2] = $6; return; } function _Png_Detect($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1>>>0)>(7); if (!($2)) { $5 = 0; return ($5|0); } $3 = (_Mem_Equal($0,24306,8)|0); $4 = ($3|0)!=(0); $phitmp = $4&1; $5 = $phitmp; return ($5|0); } function _Png_Decode($0,$1) { $0 = $0|0; $1 = $1|0; var $$0180264 = 0, $$0184263 = 0, $$0188261 = 0, $$0190260 = 0, $$0192259 = 0, $$0194232 = 0, $$0195258 = 0, $$0197257 = 0, $$0201312 = 0, $$0204256 = 0, $$0206254 = 0, $$0206254$op = 0, $$0208253 = 0, $$1181 = 0, $$1185$lcssa = 0, $$1185238 = 0, $$1189 = 0, $$1191 = 0, $$1193 = 0, $$1196 = 0; var $$1198$lcssa = 0, $$1198237 = 0, $$1202250 = 0, $$1205 = 0, $$1207 = 0, $$1209 = 0, $$2199$lcssa = 0, $$2199231 = 0, $$2203247 = 0, $$3187 = 0, $$3200 = 0, $$5 = 0, $$neg = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0; var $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0; var $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0; var $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0; var $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0; var $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0; var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0; var $exitcond325 = 0, $or$cond214 = 0, $spec$select = 0, $spec$select211 = 0, $switch$split112D = 0, $switch$split142D = 0, $switch$split2D = 0, $switch$split82D = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 570960|0; $2 = sp + 525328|0; $3 = sp + 524304|0; $4 = sp; $5 = sp + 570948|0; $6 = sp + 526208|0; $7 = sp + 526152|0; $8 = sp + 526096|0; $9 = sp + 570952|0; $10 = ((($0)) + 4|0); HEAP32[$10>>2] = 0; $11 = ((($0)) + 8|0); HEAP32[$11>>2] = 0; HEAP32[$0>>2] = 0; $12 = (_Stream_Read($1,$2,8)|0); $13 = ($12|0)==(0); if (!($13)) { $$5 = $12; STACKTOP = sp;return ($$5|0); } $14 = (_Png_Detect($2,8)|0); $15 = ($14<<24>>24)==(0); if ($15) { $$5 = -857812961; STACKTOP = sp;return ($$5|0); } $$0201312 = 0; while(1) { $16 = (($3) + ($$0201312<<2)|0); HEAP32[$16>>2] = -16777216; $17 = (($$0201312) + 1)|0; $exitcond325 = ($17|0)==(256); if ($exitcond325) { break; } else { $$0201312 = $17; } } _Inflate_MakeStream2($7,$6,$1); _ZLibHeader_Init($9); $18 = (_Stream_Read($1,$2,8)|0); $19 = ($18|0)==(0); if (!($19)) { $$5 = $18; STACKTOP = sp;return ($$5|0); } $20 = ((($2)) + 4|0); $21 = ((($1)) + 12|0); $22 = ((($1)) + 12|0); $23 = ((($6)) + 28|0); $24 = ((($9)) + 1|0); $25 = ((($2)) + 2|0); $26 = ((($2)) + 8|0); $27 = ((($2)) + 9|0); $28 = ((($2)) + 10|0); $29 = ((($2)) + 11|0); $30 = ((($2)) + 12|0); $$0180264 = 0;$$0184263 = 0;$$0188261 = 0;$$0190260 = 0;$$0192259 = 0;$$0195258 = 0;$$0197257 = 0;$$0204256 = -16777216;$$0206254 = 0;$$0208253 = 0; L13: while(1) { $33 = (_Stream_GetU32_BE($2)|0); $34 = (_Stream_GetU32_BE($20)|0); $switch$split2D = ($34|0)<(1229472850); L15: do { if ($switch$split2D) { $switch$split82D = ($34|0)<(1229278788); if (!($switch$split82D)) { switch ($34|0) { case 1229278788: { $$5 = -857812950; label = 56; break L13; } default: { label = 54; break L15; } } } switch ($34|0) { case 1229209940: { break; } default: { label = 54; break L15; } } _Stream_ReadonlyPortion($8,$1,$33); HEAP32[$23>>2] = $8; $134 = HEAP8[$24>>0]|0; $135 = ($134<<24>>24)==(0); if ($135) { while(1) { $138 = (_ZLibHeader_Read($8,$9)|0); $139 = ($138|0)==(0); if (!($139)) { $$5 = $138; label = 56; break L13; } $136 = HEAP8[$24>>0]|0; $137 = ($136<<24>>24)==(0); if (!($137)) { break; } } } $140 = HEAP32[$0>>2]|0; $141 = ($140|0)==(0|0); if ($141) { $$5 = -857812949; label = 56; break L13; } $142 = HEAP32[$11>>2]|0; $143 = ($$0197257>>>0)<($142>>>0); L28: do { if ($143) { $$0206254$op = (0 - ($$0206254))|0; $$1185238 = $$0184263;$$1198237 = $$0197257; while(1) { $144 = (($$1185238>>>0) / ($$0206254>>>0))&-1; $145 = (($$0188261) - ($$1185238))|0; $146 = ($$0206254>>>0)>($$1185238>>>0); $$neg = $146 ? $$0206254$op : 0; $spec$select = (($145) + ($$neg))|0; $147 = HEAP32[$7>>2]|0; $148 = (($4) + ($$1185238)|0); $149 = (FUNCTION_TABLE_iiiii[$147 & 63]($7,$148,$spec$select,$5)|0); $150 = ($149|0)==(0); if (!($150)) { $$5 = $149; label = 56; break L13; } $151 = HEAP32[$5>>2]|0; $152 = ($151|0)==(0); if ($152) { $$1185$lcssa = $$1185238;$$1198$lcssa = $$1198237; break L28; } $153 = (($151) + ($$1185238))|0; $154 = (($153>>>0) / ($$0206254>>>0))&-1; $155 = ($153|0)==($$0188261|0); $spec$select211 = $155 ? 0 : $153; $156 = ($144>>>0)<($154>>>0); L34: do { if ($156) { $$0194232 = $144;$$2199231 = $$1198237; while(1) { $157 = HEAP32[$11>>2]|0; $158 = ($$2199231>>>0)<($157>>>0); if (!($158)) { $$2199$lcssa = $$2199231; break L34; } $159 = Math_imul($$0194232, $$0206254)|0; $160 = (($4) + ($159)|0); $161 = HEAP8[$160>>0]|0; $162 = ($161&255)>(4); if ($162) { $$5 = -857812948; label = 56; break L13; } $163 = ($$0194232|0)==(0); $164 = $163 ? $$0190260 : $$0194232; $165 = (($164) + -1)|0; $166 = Math_imul($165, $$0206254)|0; $167 = (($4) + ($166)|0); $168 = ((($160)) + 1|0); $169 = ((($167)) + 1|0); _Png_Reconstruct($161,$$0192259,$168,$169,$$0208253); $170 = HEAP32[$10>>2]|0; $171 = HEAP32[$0>>2]|0; $172 = Math_imul($170, $$2199231)|0; $173 = (($171) + ($172<<2)|0); FUNCTION_TABLE_viiii[$$0195258 & 31]($170,$3,$168,$173); $174 = (($$0194232) + 1)|0; $175 = (($$2199231) + 1)|0; $176 = ($174>>>0)<($154>>>0); if ($176) { $$0194232 = $174;$$2199231 = $175; } else { $$2199$lcssa = $175; break; } } } else { $$2199$lcssa = $$1198237; } } while(0); $177 = HEAP32[$11>>2]|0; $178 = ($$2199$lcssa>>>0)<($177>>>0); if ($178) { $$1185238 = $spec$select211;$$1198237 = $$2199$lcssa; } else { $$1185$lcssa = $spec$select211;$$1198$lcssa = $$2199$lcssa; break; } } } else { $$1185$lcssa = $$0184263;$$1198$lcssa = $$0197257; } } while(0); $179 = HEAP32[$11>>2]|0; $180 = ($$1198$lcssa|0)==($179|0); if ($180) { label = 52; break L13; } else { $$1181 = $$0180264;$$1189 = $$0188261;$$1191 = $$0190260;$$1193 = $$0192259;$$1196 = $$0195258;$$1205 = $$0204256;$$1207 = $$0206254;$$1209 = $$0208253;$$3187 = $$1185$lcssa;$$3200 = $$1198$lcssa; } } else { $switch$split112D = ($34|0)<(1347179589); if ($switch$split112D) { switch ($34|0) { case 1229472850: { break; } default: { label = 54; break L15; } } $35 = ($33|0)==(13); if (!($35)) { $$5 = -857812960; label = 56; break L13; } $36 = (_Stream_Read($1,$2,13)|0); $37 = ($36|0)==(0); if (!($37)) { $$5 = $36; label = 56; break L13; } $38 = (_Stream_GetU32_BE($2)|0); HEAP32[$10>>2] = $38; $39 = (_Stream_GetU32_BE($20)|0); HEAP32[$11>>2] = $39; $40 = HEAP32[$10>>2]|0; $41 = ($40>>>0)>(32768); if ($41) { $$5 = -857812959; label = 56; break L13; } $42 = ($39>>>0)>(32768); if ($42) { $$5 = -857812958; label = 56; break L13; } $43 = Math_imul($40, $39)|0; $44 = (_Mem_TryAlloc($43,4)|0); HEAP32[$0>>2] = $44; $45 = ($44|0)==(0|0); if ($45) { $$5 = -857812988; label = 56; break L13; } $46 = HEAP8[$26>>0]|0; $47 = HEAP8[$27>>0]|0; $48 = (_Png_GetExpander($47,$46)|0); $49 = ($48|0)==(0|0); if ($49) { $$5 = -857812957; label = 56; break L13; } $50 = HEAP8[$28>>0]|0; $51 = ($50<<24>>24)==(0); if (!($51)) { $$5 = -857812956; label = 56; break L13; } $52 = HEAP8[$29>>0]|0; $53 = ($52<<24>>24)==(0); if (!($53)) { $$5 = -857812955; label = 56; break L13; } $54 = HEAP8[$30>>0]|0; $55 = ($54<<24>>24)==(0); if (!($55)) { $$5 = -857812954; label = 56; break L13; } $56 = $47&255; $57 = (544 + ($56<<2)|0); $58 = HEAP32[$57>>2]|0; $59 = $46&255; $60 = Math_imul($58, $59)|0; $61 = (($60) + 7)|0; $62 = (3)?($61 >>> 3):($61); $63 = $62&255; $64 = HEAP32[$10>>2]|0; $65 = Math_imul($60, $64)|0; $66 = (($65) + 7)|0; $67 = (3)?($66 >>> 3):($66); $68 = (($67) + 1)|0; _Mem_Set($4,0,$68); $69 = (524290 / ($68>>>0))&-1; $70 = Math_imul($68, $69)|0; $$1181 = $47;$$1189 = $70;$$1191 = $69;$$1193 = $63;$$1196 = $48;$$1205 = $$0204256;$$1207 = $68;$$1209 = $67;$$3187 = $68;$$3200 = $$0197257; break; } $switch$split142D = ($34|0)<(1951551059); if ($switch$split142D) { switch ($34|0) { case 1347179589: { break; } default: { label = 54; break L15; } } $71 = ($33>>>0)<(769); $72 = (($33>>>0) % 3)&-1; $73 = ($72|0)==(0); $or$cond214 = $71 & $73; if (!($or$cond214)) { $$5 = -857812953; label = 56; break L13; } $74 = (_Stream_Read($1,$2,$33)|0); $75 = ($74|0)==(0); if (!($75)) { $$5 = $74; label = 56; break L13; } $76 = ($33|0)==(0); if ($76) { $$1181 = $$0180264;$$1189 = $$0188261;$$1191 = $$0190260;$$1193 = $$0192259;$$1196 = $$0195258;$$1205 = $$0204256;$$1207 = $$0206254;$$1209 = $$0208253;$$3187 = $$0184263;$$3200 = $$0197257; break; } $$1202250 = 0; while(1) { $77 = (($$1202250>>>0) / 3)&-1; $78 = (($3) + ($77<<2)|0); $79 = HEAP32[$78>>2]|0; $80 = $79 & -16777216; $81 = (($2) + ($$1202250)|0); $82 = HEAP8[$81>>0]|0; $83 = $82&255; $84 = $80 | $83; $85 = (($$1202250) + 1)|0; $86 = (($2) + ($85)|0); $87 = HEAP8[$86>>0]|0; $88 = $87&255; $89 = $88 << 8; $90 = $89 | $84; $91 = (($$1202250) + 2)|0; $92 = (($2) + ($91)|0); $93 = HEAP8[$92>>0]|0; $94 = $93&255; $95 = $94 << 16; $96 = $95 | $90; HEAP32[$78>>2] = $96; $97 = (($$1202250) + 3)|0; $98 = ($97>>>0)<($33>>>0); if ($98) { $$1202250 = $97; } else { $$1181 = $$0180264;$$1189 = $$0188261;$$1191 = $$0190260;$$1193 = $$0192259;$$1196 = $$0195258;$$1205 = $$0204256;$$1207 = $$0206254;$$1209 = $$0208253;$$3187 = $$0184263;$$3200 = $$0197257; break L15; } } } switch ($34|0) { case 1951551059: { break; } default: { label = 54; break L15; } } switch ($$0180264<<24>>24) { case 0: { $99 = ($33|0)==(2); if (!($99)) { $$5 = -857812952; label = 56; break L13; } $100 = (_Stream_Read($1,$2,$33)|0); $101 = ($100|0)==(0); if (!($101)) { $$5 = $100; label = 56; break L13; } $102 = HEAP8[$2>>0]|0; $103 = $102&255; $104 = $103 << 8; $105 = $104 | $103; $106 = $103 << 16; $107 = $105 | $106; $$1181 = 0;$$1189 = $$0188261;$$1191 = $$0190260;$$1193 = $$0192259;$$1196 = $$0195258;$$1205 = $107;$$1207 = $$0206254;$$1209 = $$0208253;$$3187 = $$0184263;$$3200 = $$0197257; break L15; } case 3: { $108 = ($33>>>0)>(256); if ($108) { $$5 = -857812952; label = 56; break L13; } $109 = (_Stream_Read($1,$2,$33)|0); $110 = ($109|0)==(0); if (!($110)) { $$5 = $109; label = 56; break L13; } $111 = ($33|0)==(0); if ($111) { $$1181 = 3;$$1189 = $$0188261;$$1191 = $$0190260;$$1193 = $$0192259;$$1196 = $$0195258;$$1205 = $$0204256;$$1207 = $$0206254;$$1209 = $$0208253;$$3187 = $$0184263;$$3200 = $$0197257; break L15; } $$2203247 = 0; while(1) { $112 = (($3) + ($$2203247<<2)|0); $113 = HEAP32[$112>>2]|0; $114 = $113 & 16777215; $115 = (($2) + ($$2203247)|0); $116 = HEAP8[$115>>0]|0; $117 = $116&255; $118 = $117 << 24; $119 = $118 | $114; HEAP32[$112>>2] = $119; $120 = (($$2203247) + 1)|0; $exitcond = ($120|0)==($33|0); if ($exitcond) { $$1181 = $$0180264;$$1189 = $$0188261;$$1191 = $$0190260;$$1193 = $$0192259;$$1196 = $$0195258;$$1205 = $$0204256;$$1207 = $$0206254;$$1209 = $$0208253;$$3187 = $$0184263;$$3200 = $$0197257; break; } else { $$2203247 = $120; } } break; } case 2: { $121 = ($33|0)==(6); if (!($121)) { $$5 = -857812952; label = 56; break L13; } $122 = (_Stream_Read($1,$2,$33)|0); $123 = ($122|0)==(0); if (!($123)) { $$5 = $122; label = 56; break L13; } $124 = HEAP8[$2>>0]|0; $125 = $124&255; $126 = HEAP8[$25>>0]|0; $127 = $126&255; $128 = $127 << 8; $129 = $128 | $125; $130 = HEAP8[$20>>0]|0; $131 = $130&255; $132 = $131 << 16; $133 = $129 | $132; $$1181 = 2;$$1189 = $$0188261;$$1191 = $$0190260;$$1193 = $$0192259;$$1196 = $$0195258;$$1205 = $133;$$1207 = $$0206254;$$1209 = $$0208253;$$3187 = $$0184263;$$3200 = $$0197257; break L15; } default: { $$5 = -857812951; label = 56; break L13; } } } } while(0); if ((label|0) == 54) { label = 0; $182 = HEAP32[$21>>2]|0; $183 = (FUNCTION_TABLE_iii[$182 & 127]($1,$33)|0); $184 = ($183|0)==(0); if ($184) { $$1181 = $$0180264;$$1189 = $$0188261;$$1191 = $$0190260;$$1193 = $$0192259;$$1196 = $$0195258;$$1205 = $$0204256;$$1207 = $$0206254;$$1209 = $$0208253;$$3187 = $$0184263;$$3200 = $$0197257; } else { $$5 = $183; label = 56; break; } } $185 = HEAP32[$22>>2]|0; $186 = (FUNCTION_TABLE_iii[$185 & 127]($1,4)|0); $187 = ($186|0)==(0); if (!($187)) { $$5 = $186; label = 56; break; } $31 = (_Stream_Read($1,$2,8)|0); $32 = ($31|0)==(0); if ($32) { $$0180264 = $$1181;$$0184263 = $$3187;$$0188261 = $$1189;$$0190260 = $$1191;$$0192259 = $$1193;$$0195258 = $$1196;$$0197257 = $$3200;$$0204256 = $$1205;$$0206254 = $$1207;$$0208253 = $$1209; } else { $$5 = $31; label = 56; break; } } if ((label|0) == 52) { $181 = ($$0204256>>>0)>(16777215); if ($181) { $$5 = 0; STACKTOP = sp;return ($$5|0); } _ComputeTransparency($0,$$0204256); $$5 = 0; STACKTOP = sp;return ($$5|0); } else if ((label|0) == 56) { STACKTOP = sp;return ($$5|0); } return (0)|0; } function _Png_GetExpander($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $switch$select = 0, $switch$select11 = 0, $switch$select13 = 0, $switch$select15 = 0, $switch$select7 = 0, $switch$select9 = 0, $switch$selectcmp = 0, $switch$selectcmp10 = 0, $switch$selectcmp12 = 0, $switch$selectcmp14 = 0, $switch$selectcmp6 = 0, $switch$selectcmp8 = 0, label = 0, sp = 0; sp = STACKTOP; L1: do { switch ($0<<24>>24) { case 0: { switch ($1<<24>>24) { case 1: { $$0 = 16; break L1; } case 2: { $$0 = 17; break L1; } case 4: { $$0 = 18; break L1; } case 8: { $$0 = 19; break L1; } case 16: { $$0 = 20; break L1; } default: { $$0 = 0; break L1; } } } case 2: { $switch$selectcmp = ($1<<24>>24)==(16); $switch$select = $switch$selectcmp ? 10 : 0; $switch$selectcmp6 = ($1<<24>>24)==(8); $switch$select7 = $switch$selectcmp6 ? 11 : $switch$select; $$0 = $switch$select7; break; } case 3: { switch ($1<<24>>24) { case 1: { $$0 = 21; break L1; } case 2: { $$0 = 22; break L1; } case 4: { $$0 = 23; break L1; } case 8: { $$0 = 24; break L1; } default: { $$0 = 0; break L1; } } } case 4: { $switch$selectcmp8 = ($1<<24>>24)==(16); $switch$select9 = $switch$selectcmp8 ? 12 : 0; $switch$selectcmp10 = ($1<<24>>24)==(8); $switch$select11 = $switch$selectcmp10 ? 13 : $switch$select9; $$0 = $switch$select11; break; } case 6: { $switch$selectcmp12 = ($1<<24>>24)==(16); $switch$select13 = $switch$selectcmp12 ? 14 : 0; $switch$selectcmp14 = ($1<<24>>24)==(8); $switch$select15 = $switch$selectcmp14 ? 15 : $switch$select13; $$0 = $switch$select15; break; } default: { $$0 = 0; } } } while(0); return ($$0|0); } function _Png_Reconstruct($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$08595 = 0, $$096 = 0, $$186102 = 0, $$199 = 0, $$2$lcssa = 0, $$2106 = 0, $$28791 = 0, $$3103 = 0, $$4$lcssa = 0, $$493 = 0, $$592 = 0, $$sink126 = 0, $$sink127 = 0, $10 = 0, $100 = 0, $101 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0; var $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0; var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0; var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0; var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond115 = 0, $exitcond116 = 0, $exitcond117 = 0, $exitcond118 = 0, $exitcond119 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; switch ($0<<24>>24) { case 4: { $57 = $1&255; $58 = ($1<<24>>24)==(0); if ($58) { $$4$lcssa = 0; } else { $$493 = 0; while(1) { $59 = (($3) + ($$493)|0); $60 = HEAP8[$59>>0]|0; $61 = $60&255; $62 = (($2) + ($$493)|0); $63 = HEAP8[$62>>0]|0; $64 = $63&255; $65 = (($64) + ($61))|0; $66 = $65&255; HEAP8[$62>>0] = $66; $67 = (($$493) + 1)|0; $exitcond115 = ($67|0)==($57|0); if ($exitcond115) { $$4$lcssa = $57; break; } else { $$493 = $67; } } } $68 = ($$4$lcssa>>>0)<($4>>>0); if (!($68)) { return; } $69 = (($4) - ($$4$lcssa))|0; $$28791 = 0;$$592 = $$4$lcssa; while(1) { $70 = (($2) + ($$28791)|0); $71 = HEAP8[$70>>0]|0; $72 = (($3) + ($$592)|0); $73 = HEAP8[$72>>0]|0; $74 = (($3) + ($$28791)|0); $75 = HEAP8[$74>>0]|0; $76 = $71&255; $77 = $73&255; $78 = (($77) + ($76))|0; $79 = $75&255; $80 = (($78) - ($79))|0; $81 = (($80) - ($76))|0; $82 = (_Math_AbsI($81)|0); $83 = (($80) - ($77))|0; $84 = (_Math_AbsI($83)|0); $85 = (($80) - ($79))|0; $86 = (_Math_AbsI($85)|0); $87 = ($82|0)>($84|0); $88 = ($82|0)>($86|0); $or$cond = $87 | $88; do { if ($or$cond) { $93 = ($84|0)>($86|0); $94 = (($2) + ($$592)|0); $95 = HEAP8[$94>>0]|0; $96 = $95&255; if ($93) { $98 = (($96) + ($79))|0; $$sink126 = $94;$$sink127 = $98; break; } else { $97 = (($96) + ($77))|0; $$sink126 = $94;$$sink127 = $97; break; } } else { $89 = (($2) + ($$592)|0); $90 = HEAP8[$89>>0]|0; $91 = $90&255; $92 = (($91) + ($76))|0; $$sink126 = $89;$$sink127 = $92; } } while(0); $99 = $$sink127&255; HEAP8[$$sink126>>0] = $99; $100 = (($$592) + 1)|0; $101 = (($$28791) + 1)|0; $exitcond = ($101|0)==($69|0); if ($exitcond) { break; } else { $$28791 = $101;$$592 = $100; } } return; } case 1: { $5 = $1&255; $6 = ($5>>>0)<($4>>>0); if (!($6)) { return; } $7 = (($4) - ($5))|0; $$08595 = 0;$$096 = $5; while(1) { $8 = (($2) + ($$08595)|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (($2) + ($$096)|0); $12 = HEAP8[$11>>0]|0; $13 = $12&255; $14 = (($13) + ($10))|0; $15 = $14&255; HEAP8[$11>>0] = $15; $16 = (($$096) + 1)|0; $17 = (($$08595) + 1)|0; $exitcond116 = ($17|0)==($7|0); if ($exitcond116) { break; } else { $$08595 = $17;$$096 = $16; } } return; } case 2: { $18 = ($4|0)==(0); if ($18) { return; } $$199 = 0; while(1) { $19 = (($3) + ($$199)|0); $20 = HEAP8[$19>>0]|0; $21 = $20&255; $22 = (($2) + ($$199)|0); $23 = HEAP8[$22>>0]|0; $24 = $23&255; $25 = (($24) + ($21))|0; $26 = $25&255; HEAP8[$22>>0] = $26; $27 = (($$199) + 1)|0; $exitcond117 = ($27|0)==($4|0); if ($exitcond117) { break; } else { $$199 = $27; } } return; } case 3: { $28 = $1&255; $29 = ($1<<24>>24)==(0); if ($29) { $$2$lcssa = 0; } else { $$2106 = 0; while(1) { $30 = (($3) + ($$2106)|0); $31 = HEAP8[$30>>0]|0; $32 = $31&255; $33 = (1)?($32 >>> 1):($32); $34 = (($2) + ($$2106)|0); $35 = HEAP8[$34>>0]|0; $36 = $35&255; $37 = (($33) + ($36))|0; $38 = $37&255; HEAP8[$34>>0] = $38; $39 = (($$2106) + 1)|0; $exitcond119 = ($39|0)==($28|0); if ($exitcond119) { $$2$lcssa = $28; break; } else { $$2106 = $39; } } } $40 = ($$2$lcssa>>>0)<($4>>>0); if (!($40)) { return; } $41 = (($4) - ($$2$lcssa))|0; $$186102 = 0;$$3103 = $$2$lcssa; while(1) { $42 = (($3) + ($$3103)|0); $43 = HEAP8[$42>>0]|0; $44 = $43&255; $45 = (($2) + ($$186102)|0); $46 = HEAP8[$45>>0]|0; $47 = $46&255; $48 = (($47) + ($44))|0; $49 = (1)?($48 >>> 1):($48); $50 = (($2) + ($$3103)|0); $51 = HEAP8[$50>>0]|0; $52 = $51&255; $53 = (($49) + ($52))|0; $54 = $53&255; HEAP8[$50>>0] = $54; $55 = (($$3103) + 1)|0; $56 = (($$186102) + 1)|0; $exitcond118 = ($56|0)==($41|0); if ($exitcond118) { break; } else { $$186102 = $56;$$3103 = $55; } } return; } default: { return; } } } function _ComputeTransparency($0,$1) { $0 = $0|0; $1 = $1|0; var $$ = 0, $$03335 = 0, $$034 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $exitcond = 0, $exitcond39 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $1 & 16777215; $3 = ((($0)) + 4|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 8|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)>(0); if (!($7)) { return; } $8 = HEAP32[$0>>2]|0; $9 = ($4|0)>(0); $$03335 = 0; while(1) { $10 = HEAP32[$3>>2]|0; $11 = Math_imul($10, $$03335)|0; $12 = (($8) + ($11<<2)|0); if ($9) { $$034 = 0; while(1) { $13 = (($12) + ($$034<<2)|0); $14 = HEAP32[$13>>2]|0; $15 = $14 & 16777215; $16 = ($15|0)==($2|0); $$ = $16 ? $2 : $14; HEAP32[$13>>2] = $$; $17 = (($$034) + 1)|0; $exitcond = ($17|0)==($4|0); if ($exitcond) { break; } else { $$034 = $17; } } } $18 = (($$03335) + 1)|0; $exitcond39 = ($18|0)==($6|0); if ($exitcond39) { break; } else { $$03335 = $18; } } return; } function _Png_Expand_RGB_16($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$01415 = 0, $$016 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($0|0)>(0); if (!($4)) { return; } $$01415 = 0;$$016 = 0; while(1) { $5 = (($2) + ($$016)|0); $6 = HEAP8[$5>>0]|0; $7 = $6&255; $8 = (($$016) + 2)|0; $9 = (($2) + ($8)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = $11 << 8; $13 = (($$016) + 4)|0; $14 = (($2) + ($13)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 16; $18 = $12 | $7; $19 = $18 | $17; $20 = $19 | -16777216; $21 = (($3) + ($$01415<<2)|0); HEAP32[$21>>2] = $20; $22 = (($$01415) + 1)|0; $23 = (($$016) + 6)|0; $exitcond = ($22|0)==($0|0); if ($exitcond) { break; } else { $$01415 = $22;$$016 = $23; } } return; } function _Png_Expand_RGB_8($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0$lcssa = 0, $$050$lcssa = 0, $$05054 = 0, $$055 = 0, $$15152 = 0, $$153 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0; var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0; var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0; var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0; var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0; var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = $0 & -4; $5 = ($4|0)>(0); if ($5) { $6 = (($4) + -1)|0; $7 = (2)?($6 >>> 2):($6); $8 = ($7*12)|0; $$05054 = 0;$$055 = 0; while(1) { $9 = (($2) + ($$055)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = $$055 | 1; $13 = (($2) + ($12)|0); $14 = HEAP8[$13>>0]|0; $15 = $14&255; $16 = $15 << 8; $17 = $$055 | 2; $18 = (($2) + ($17)|0); $19 = HEAP8[$18>>0]|0; $20 = $19&255; $21 = $20 << 16; $22 = $16 | $11; $23 = $22 | $21; $24 = $23 | -16777216; $25 = (($3) + ($$05054<<2)|0); HEAP32[$25>>2] = $24; $26 = $$055 | 3; $27 = (($2) + ($26)|0); $28 = HEAP8[$27>>0]|0; $29 = $28&255; $30 = (($26) + 1)|0; $31 = (($2) + ($30)|0); $32 = HEAP8[$31>>0]|0; $33 = $32&255; $34 = $33 << 8; $35 = (($26) + 2)|0; $36 = (($2) + ($35)|0); $37 = HEAP8[$36>>0]|0; $38 = $37&255; $39 = $38 << 16; $40 = $34 | $29; $41 = $40 | $39; $42 = $41 | -16777216; $43 = $$05054 | 1; $44 = (($3) + ($43<<2)|0); HEAP32[$44>>2] = $42; $45 = (($$055) + 6)|0; $46 = (($2) + ($45)|0); $47 = HEAP8[$46>>0]|0; $48 = $47&255; $49 = (($$055) + 7)|0; $50 = (($2) + ($49)|0); $51 = HEAP8[$50>>0]|0; $52 = $51&255; $53 = $52 << 8; $54 = (($$055) + 8)|0; $55 = (($2) + ($54)|0); $56 = HEAP8[$55>>0]|0; $57 = $56&255; $58 = $57 << 16; $59 = $53 | $48; $60 = $59 | $58; $61 = $60 | -16777216; $62 = $$05054 | 2; $63 = (($3) + ($62<<2)|0); HEAP32[$63>>2] = $61; $64 = (($$055) + 9)|0; $65 = (($2) + ($64)|0); $66 = HEAP8[$65>>0]|0; $67 = $66&255; $68 = (($$055) + 10)|0; $69 = (($2) + ($68)|0); $70 = HEAP8[$69>>0]|0; $71 = $70&255; $72 = $71 << 8; $73 = (($$055) + 11)|0; $74 = (($2) + ($73)|0); $75 = HEAP8[$74>>0]|0; $76 = $75&255; $77 = $76 << 16; $78 = $72 | $67; $79 = $78 | $77; $80 = $79 | -16777216; $81 = $$05054 | 3; $82 = (($3) + ($81<<2)|0); HEAP32[$82>>2] = $80; $83 = (($$05054) + 4)|0; $84 = (($$055) + 12)|0; $85 = ($83|0)<($4|0); if ($85) { $$05054 = $83;$$055 = $84; } else { break; } } $86 = $0 & -4; $87 = (($8) + 12)|0; $$0$lcssa = $87;$$050$lcssa = $86; } else { $$0$lcssa = 0;$$050$lcssa = 0; } $88 = ($$050$lcssa|0)<($0|0); if (!($88)) { return; } $$15152 = $$050$lcssa;$$153 = $$0$lcssa; while(1) { $89 = (($2) + ($$153)|0); $90 = HEAP8[$89>>0]|0; $91 = $90&255; $92 = (($$153) + 1)|0; $93 = (($2) + ($92)|0); $94 = HEAP8[$93>>0]|0; $95 = $94&255; $96 = $95 << 8; $97 = (($$153) + 2)|0; $98 = (($2) + ($97)|0); $99 = HEAP8[$98>>0]|0; $100 = $99&255; $101 = $100 << 16; $102 = $96 | $91; $103 = $102 | $101; $104 = $103 | -16777216; $105 = (($3) + ($$15152<<2)|0); HEAP32[$105>>2] = $104; $106 = (($$15152) + 1)|0; $107 = (($$153) + 3)|0; $exitcond = ($106|0)==($0|0); if ($exitcond) { break; } else { $$15152 = $106;$$153 = $107; } } return; } function _Png_Expand_GRAYSCALE_A_16($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$012 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0; var sp = 0; sp = STACKTOP; $4 = ($0|0)>(0); if (!($4)) { return; } $$012 = 0; while(1) { $5 = $$012 << 2; $6 = (($2) + ($5)|0); $7 = HEAP8[$6>>0]|0; $8 = $7&255; $9 = $8 << 8; $10 = $9 | $8; $11 = $8 << 16; $12 = $10 | $11; $13 = $5 | 2; $14 = (($2) + ($13)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 24; $18 = $12 | $17; $19 = (($3) + ($$012<<2)|0); HEAP32[$19>>2] = $18; $20 = (($$012) + 1)|0; $exitcond = ($20|0)==($0|0); if ($exitcond) { break; } else { $$012 = $20; } } return; } function _Png_Expand_GRAYSCALE_A_8($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0$lcssa = 0, $$055$lcssa = 0, $$05559 = 0, $$060 = 0, $$15657 = 0, $$158 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = $0 & -4; $5 = ($4|0)>(0); if ($5) { $6 = (($4) + 2147483647)|0; $7 = (2)?($6 >>> 2):($6); $8 = $7 << 3; $$05559 = 0;$$060 = 0; while(1) { $9 = (($2) + ($$060)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = $11 << 8; $13 = $12 | $11; $14 = $11 << 16; $15 = $13 | $14; $16 = $$060 | 1; $17 = (($2) + ($16)|0); $18 = HEAP8[$17>>0]|0; $19 = $18&255; $20 = $19 << 24; $21 = $15 | $20; $22 = (($3) + ($$05559<<2)|0); HEAP32[$22>>2] = $21; $23 = $$060 | 2; $24 = (($2) + ($23)|0); $25 = HEAP8[$24>>0]|0; $26 = $25&255; $27 = $26 << 8; $28 = $27 | $26; $29 = $26 << 16; $30 = $28 | $29; $31 = $$060 | 3; $32 = (($2) + ($31)|0); $33 = HEAP8[$32>>0]|0; $34 = $33&255; $35 = $34 << 24; $36 = $30 | $35; $37 = $$05559 | 1; $38 = (($3) + ($37<<2)|0); HEAP32[$38>>2] = $36; $39 = $$060 | 4; $40 = (($2) + ($39)|0); $41 = HEAP8[$40>>0]|0; $42 = $41&255; $43 = $42 << 8; $44 = $43 | $42; $45 = $42 << 16; $46 = $44 | $45; $47 = $$060 | 5; $48 = (($2) + ($47)|0); $49 = HEAP8[$48>>0]|0; $50 = $49&255; $51 = $50 << 24; $52 = $46 | $51; $53 = $$05559 | 2; $54 = (($3) + ($53<<2)|0); HEAP32[$54>>2] = $52; $55 = $$060 | 6; $56 = (($2) + ($55)|0); $57 = HEAP8[$56>>0]|0; $58 = $57&255; $59 = $58 << 8; $60 = $59 | $58; $61 = $58 << 16; $62 = $60 | $61; $63 = $$060 | 7; $64 = (($2) + ($63)|0); $65 = HEAP8[$64>>0]|0; $66 = $65&255; $67 = $66 << 24; $68 = $62 | $67; $69 = $$05559 | 3; $70 = (($3) + ($69<<2)|0); HEAP32[$70>>2] = $68; $71 = (($$05559) + 4)|0; $72 = (($$060) + 8)|0; $73 = ($71|0)<($4|0); if ($73) { $$05559 = $71;$$060 = $72; } else { break; } } $74 = $0 & -4; $75 = (($8) + 8)|0; $$0$lcssa = $75;$$055$lcssa = $74; } else { $$0$lcssa = 0;$$055$lcssa = 0; } $76 = ($$055$lcssa|0)<($0|0); if (!($76)) { return; } $$15657 = $$055$lcssa;$$158 = $$0$lcssa; while(1) { $77 = (($2) + ($$158)|0); $78 = HEAP8[$77>>0]|0; $79 = $78&255; $80 = $79 << 8; $81 = $80 | $79; $82 = $79 << 16; $83 = $81 | $82; $84 = $$158 | 1; $85 = (($2) + ($84)|0); $86 = HEAP8[$85>>0]|0; $87 = $86&255; $88 = $87 << 24; $89 = $83 | $88; $90 = (($3) + ($$15657<<2)|0); HEAP32[$90>>2] = $89; $91 = (($$15657) + 1)|0; $92 = (($$158) + 2)|0; $exitcond = ($91|0)==($0|0); if ($exitcond) { break; } else { $$15657 = $91;$$158 = $92; } } return; } function _Png_Expand_RGB_A_16($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$01617 = 0, $$018 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($0|0)>(0); if (!($4)) { return; } $$01617 = 0;$$018 = 0; while(1) { $5 = (($2) + ($$018)|0); $6 = HEAP8[$5>>0]|0; $7 = $6&255; $8 = $$018 | 2; $9 = (($2) + ($8)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = $11 << 8; $13 = $12 | $7; $14 = $$018 | 4; $15 = (($2) + ($14)|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = $17 << 16; $19 = $13 | $18; $20 = $$018 | 6; $21 = (($2) + ($20)|0); $22 = HEAP8[$21>>0]|0; $23 = $22&255; $24 = $23 << 24; $25 = $19 | $24; $26 = (($3) + ($$01617<<2)|0); HEAP32[$26>>2] = $25; $27 = (($$01617) + 1)|0; $28 = (($$018) + 8)|0; $exitcond = ($27|0)==($0|0); if ($exitcond) { break; } else { $$01617 = $27;$$018 = $28; } } return; } function _Png_Expand_RGB_A_8($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0$lcssa = 0, $$060$lcssa = 0, $$06064 = 0, $$065 = 0, $$16162 = 0, $$163 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0; var $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0; var $130 = 0, $131 = 0, $132 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0; var $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0; var $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0; var $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0; var $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = $0 & -4; $5 = ($4|0)>(0); if ($5) { $6 = (($4) + 1073741823)|0; $7 = (2)?($6 >>> 2):($6); $8 = $7 << 4; $$06064 = 0;$$065 = 0; while(1) { $9 = (($2) + ($$065)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = $$065 | 1; $13 = (($2) + ($12)|0); $14 = HEAP8[$13>>0]|0; $15 = $14&255; $16 = $15 << 8; $17 = $16 | $11; $18 = $$065 | 2; $19 = (($2) + ($18)|0); $20 = HEAP8[$19>>0]|0; $21 = $20&255; $22 = $21 << 16; $23 = $17 | $22; $24 = $$065 | 3; $25 = (($2) + ($24)|0); $26 = HEAP8[$25>>0]|0; $27 = $26&255; $28 = $27 << 24; $29 = $23 | $28; $30 = (($3) + ($$06064<<2)|0); HEAP32[$30>>2] = $29; $31 = $$065 | 4; $32 = (($2) + ($31)|0); $33 = HEAP8[$32>>0]|0; $34 = $33&255; $35 = $$065 | 5; $36 = (($2) + ($35)|0); $37 = HEAP8[$36>>0]|0; $38 = $37&255; $39 = $38 << 8; $40 = $39 | $34; $41 = $$065 | 6; $42 = (($2) + ($41)|0); $43 = HEAP8[$42>>0]|0; $44 = $43&255; $45 = $44 << 16; $46 = $40 | $45; $47 = $$065 | 7; $48 = (($2) + ($47)|0); $49 = HEAP8[$48>>0]|0; $50 = $49&255; $51 = $50 << 24; $52 = $46 | $51; $53 = $$06064 | 1; $54 = (($3) + ($53<<2)|0); HEAP32[$54>>2] = $52; $55 = $$065 | 8; $56 = (($2) + ($55)|0); $57 = HEAP8[$56>>0]|0; $58 = $57&255; $59 = $$065 | 9; $60 = (($2) + ($59)|0); $61 = HEAP8[$60>>0]|0; $62 = $61&255; $63 = $62 << 8; $64 = $63 | $58; $65 = $$065 | 10; $66 = (($2) + ($65)|0); $67 = HEAP8[$66>>0]|0; $68 = $67&255; $69 = $68 << 16; $70 = $64 | $69; $71 = $$065 | 11; $72 = (($2) + ($71)|0); $73 = HEAP8[$72>>0]|0; $74 = $73&255; $75 = $74 << 24; $76 = $70 | $75; $77 = $$06064 | 2; $78 = (($3) + ($77<<2)|0); HEAP32[$78>>2] = $76; $79 = $$065 | 12; $80 = (($2) + ($79)|0); $81 = HEAP8[$80>>0]|0; $82 = $81&255; $83 = $$065 | 13; $84 = (($2) + ($83)|0); $85 = HEAP8[$84>>0]|0; $86 = $85&255; $87 = $86 << 8; $88 = $87 | $82; $89 = $$065 | 14; $90 = (($2) + ($89)|0); $91 = HEAP8[$90>>0]|0; $92 = $91&255; $93 = $92 << 16; $94 = $88 | $93; $95 = $$065 | 15; $96 = (($2) + ($95)|0); $97 = HEAP8[$96>>0]|0; $98 = $97&255; $99 = $98 << 24; $100 = $94 | $99; $101 = $$06064 | 3; $102 = (($3) + ($101<<2)|0); HEAP32[$102>>2] = $100; $103 = (($$06064) + 4)|0; $104 = (($$065) + 16)|0; $105 = ($103|0)<($4|0); if ($105) { $$06064 = $103;$$065 = $104; } else { break; } } $106 = $0 & -4; $107 = (($8) + 16)|0; $$0$lcssa = $107;$$060$lcssa = $106; } else { $$0$lcssa = 0;$$060$lcssa = 0; } $108 = ($$060$lcssa|0)<($0|0); if (!($108)) { return; } $$16162 = $$060$lcssa;$$163 = $$0$lcssa; while(1) { $109 = (($2) + ($$163)|0); $110 = HEAP8[$109>>0]|0; $111 = $110&255; $112 = $$163 | 1; $113 = (($2) + ($112)|0); $114 = HEAP8[$113>>0]|0; $115 = $114&255; $116 = $115 << 8; $117 = $116 | $111; $118 = $$163 | 2; $119 = (($2) + ($118)|0); $120 = HEAP8[$119>>0]|0; $121 = $120&255; $122 = $121 << 16; $123 = $117 | $122; $124 = $$163 | 3; $125 = (($2) + ($124)|0); $126 = HEAP8[$125>>0]|0; $127 = $126&255; $128 = $127 << 24; $129 = $123 | $128; $130 = (($3) + ($$16162<<2)|0); HEAP32[$130>>2] = $129; $131 = (($$16162) + 1)|0; $132 = (($$163) + 4)|0; $exitcond = ($131|0)==($0|0); if ($exitcond) { break; } else { $$16162 = $131;$$163 = $132; } } return; } function _Png_Expand_INDEXED_8($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0$lcssa = 0, $$032 = 0, $$131 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = $0 & -4; $5 = ($4|0)>(0); if ($5) { $$032 = 0; while(1) { $6 = (($2) + ($$032)|0); $7 = HEAP8[$6>>0]|0; $8 = $7&255; $9 = (($1) + ($8<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = (($3) + ($$032<<2)|0); HEAP32[$11>>2] = $10; $12 = $$032 | 1; $13 = (($2) + ($12)|0); $14 = HEAP8[$13>>0]|0; $15 = $14&255; $16 = (($1) + ($15<<2)|0); $17 = HEAP32[$16>>2]|0; $18 = (($3) + ($12<<2)|0); HEAP32[$18>>2] = $17; $19 = $$032 | 2; $20 = (($2) + ($19)|0); $21 = HEAP8[$20>>0]|0; $22 = $21&255; $23 = (($1) + ($22<<2)|0); $24 = HEAP32[$23>>2]|0; $25 = (($3) + ($19<<2)|0); HEAP32[$25>>2] = $24; $26 = $$032 | 3; $27 = (($2) + ($26)|0); $28 = HEAP8[$27>>0]|0; $29 = $28&255; $30 = (($1) + ($29<<2)|0); $31 = HEAP32[$30>>2]|0; $32 = (($3) + ($26<<2)|0); HEAP32[$32>>2] = $31; $33 = (($$032) + 4)|0; $34 = ($33|0)<($4|0); if ($34) { $$032 = $33; } else { break; } } $35 = $0 & -4; $$0$lcssa = $35; } else { $$0$lcssa = 0; } $36 = ($$0$lcssa|0)<($0|0); if (!($36)) { return; } $$131 = $$0$lcssa; while(1) { $37 = (($2) + ($$131)|0); $38 = HEAP8[$37>>0]|0; $39 = $38&255; $40 = (($1) + ($39<<2)|0); $41 = HEAP32[$40>>2]|0; $42 = (($3) + ($$131<<2)|0); HEAP32[$42>>2] = $41; $43 = (($$131) + 1)|0; $exitcond = ($43|0)==($0|0); if ($exitcond) { break; } else { $$131 = $43; } } return; } function _Png_Expand_INDEXED_4($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0$lcssa = 0, $$025$lcssa = 0, $$02527 = 0, $$028 = 0, $$126 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond34 = 0; var label = 0, sp = 0; sp = STACKTOP; $4 = $0 & -2; $5 = ($4|0)>(0); if ($5) { $6 = (($4) + -1)|0; $7 = (1)?($6 >>> 1):($6); $8 = (($7) + 1)|0; $$02527 = 0;$$028 = 0; while(1) { $9 = (($2) + ($$02527)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = (4)?($11 >>> 4):($11); $13 = (($1) + ($12<<2)|0); $14 = HEAP32[$13>>2]|0; $15 = (($3) + ($$028<<2)|0); HEAP32[$15>>2] = $14; $16 = $11 & 15; $17 = (($1) + ($16<<2)|0); $18 = HEAP32[$17>>2]|0; $19 = $$028 | 1; $20 = (($3) + ($19<<2)|0); HEAP32[$20>>2] = $18; $21 = (($$028) + 2)|0; $22 = (($$02527) + 1)|0; $exitcond34 = ($22|0)==($8|0); if ($exitcond34) { break; } else { $$02527 = $22;$$028 = $21; } } $23 = $0 & -2; $$0$lcssa = $23;$$025$lcssa = $8; } else { $$0$lcssa = 0;$$025$lcssa = 0; } $24 = ($$0$lcssa|0)<($0|0); if (!($24)) { return; } $25 = (($2) + ($$025$lcssa)|0); $$126 = $$0$lcssa; while(1) { $26 = HEAP8[$25>>0]|0; $27 = $26&255; $28 = $$126 << 2; $29 = $28 & 4; $30 = $29 ^ 4; $31 = ($30)?($27 >>> $30):($27); $32 = $31 & 15; $33 = (($1) + ($32<<2)|0); $34 = HEAP32[$33>>2]|0; $35 = (($3) + ($$126<<2)|0); HEAP32[$35>>2] = $34; $36 = (($$126) + 1)|0; $exitcond = ($36|0)==($0|0); if ($exitcond) { break; } else { $$126 = $36; } } return; } function _Png_Expand_INDEXED_2($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($0|0)>(0); if (!($4)) { return; } $$09 = 0; while(1) { $5 = (2)?($$09 >>> 2):($$09); $6 = (($2) + ($5)|0); $7 = HEAP8[$6>>0]|0; $8 = $7&255; $9 = $$09 << 1; $10 = $9 & 6; $11 = $10 ^ 6; $12 = ($11)?($8 >>> $11):($8); $13 = $12 & 3; $14 = (($1) + ($13<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = (($3) + ($$09<<2)|0); HEAP32[$16>>2] = $15; $17 = (($$09) + 1)|0; $exitcond = ($17|0)==($0|0); if ($exitcond) { break; } else { $$09 = $17; } } return; } function _Png_Expand_GRAYSCALE_16($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$010 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($0|0)>(0); if (!($4)) { return; } $$010 = 0; while(1) { $5 = $$010 << 1; $6 = (($2) + ($5)|0); $7 = HEAP8[$6>>0]|0; $8 = $7&255; $9 = $8 << 8; $10 = $8 << 16; $11 = $9 | $8; $12 = $11 | $10; $13 = $12 | -16777216; $14 = (($3) + ($$010<<2)|0); HEAP32[$14>>2] = $13; $15 = (($$010) + 1)|0; $exitcond = ($15|0)==($0|0); if ($exitcond) { break; } else { $$010 = $15; } } return; } function _Png_Expand_GRAYSCALE_8($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0$lcssa = 0, $$042 = 0, $$141 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0; var sp = 0; sp = STACKTOP; $4 = $0 & -4; $5 = ($4|0)>(0); if ($5) { $$042 = 0; while(1) { $6 = (($2) + ($$042)|0); $7 = HEAP8[$6>>0]|0; $8 = $7&255; $9 = $8 << 8; $10 = $8 << 16; $11 = $9 | $8; $12 = $11 | $10; $13 = $12 | -16777216; $14 = (($3) + ($$042<<2)|0); HEAP32[$14>>2] = $13; $15 = $$042 | 1; $16 = (($2) + ($15)|0); $17 = HEAP8[$16>>0]|0; $18 = $17&255; $19 = $18 << 8; $20 = $18 << 16; $21 = $19 | $18; $22 = $21 | $20; $23 = $22 | -16777216; $24 = (($3) + ($15<<2)|0); HEAP32[$24>>2] = $23; $25 = $$042 | 2; $26 = (($2) + ($25)|0); $27 = HEAP8[$26>>0]|0; $28 = $27&255; $29 = $28 << 8; $30 = $28 << 16; $31 = $29 | $28; $32 = $31 | $30; $33 = $32 | -16777216; $34 = (($3) + ($25<<2)|0); HEAP32[$34>>2] = $33; $35 = $$042 | 3; $36 = (($2) + ($35)|0); $37 = HEAP8[$36>>0]|0; $38 = $37&255; $39 = $38 << 8; $40 = $38 << 16; $41 = $39 | $38; $42 = $41 | $40; $43 = $42 | -16777216; $44 = (($3) + ($35<<2)|0); HEAP32[$44>>2] = $43; $45 = (($$042) + 4)|0; $46 = ($45|0)<($4|0); if ($46) { $$042 = $45; } else { break; } } $47 = $0 & -4; $$0$lcssa = $47; } else { $$0$lcssa = 0; } $48 = ($$0$lcssa|0)<($0|0); if (!($48)) { return; } $$141 = $$0$lcssa; while(1) { $49 = (($2) + ($$141)|0); $50 = HEAP8[$49>>0]|0; $51 = $50&255; $52 = $51 << 8; $53 = $51 << 16; $54 = $52 | $51; $55 = $54 | $53; $56 = $55 | -16777216; $57 = (($3) + ($$141<<2)|0); HEAP32[$57>>2] = $56; $58 = (($$141) + 1)|0; $exitcond = ($58|0)==($0|0); if ($exitcond) { break; } else { $$141 = $58; } } return; } function _Png_Expand_GRAYSCALE_4($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0$lcssa = 0, $$031$lcssa = 0, $$03133 = 0, $$034 = 0, $$132 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond40 = 0, $mulconv = 0, label = 0, sp = 0; sp = STACKTOP; $4 = $0 & -2; $5 = ($4|0)>(0); if ($5) { $6 = (($4) + -1)|0; $7 = (1)?($6 >>> 1):($6); $8 = (($7) + 1)|0; $$03133 = 0;$$034 = 0; while(1) { $9 = (($2) + ($$034)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = (4)?($11 >>> 4):($11); $13 = ($12*17)|0; $14 = $13 & 255; $15 = $14 << 8; $16 = $14 << 16; $17 = $14 | $15; $18 = $17 | $16; $19 = $18 | -16777216; $20 = (($3) + ($$03133<<2)|0); HEAP32[$20>>2] = $19; $21 = HEAP8[$9>>0]|0; $22 = $21 & 15; $mulconv = ($22*17)|0; $23 = $mulconv&255; $24 = $23 << 8; $25 = $23 << 16; $26 = $24 | $23; $27 = $26 | $25; $28 = $27 | -16777216; $29 = $$03133 | 1; $30 = (($3) + ($29<<2)|0); HEAP32[$30>>2] = $28; $31 = (($$03133) + 2)|0; $32 = (($$034) + 1)|0; $exitcond40 = ($32|0)==($8|0); if ($exitcond40) { break; } else { $$03133 = $31;$$034 = $32; } } $33 = $0 & -2; $$0$lcssa = $8;$$031$lcssa = $33; } else { $$0$lcssa = 0;$$031$lcssa = 0; } $34 = ($$031$lcssa|0)<($0|0); if (!($34)) { return; } $35 = (($2) + ($$0$lcssa)|0); $$132 = $$031$lcssa; while(1) { $36 = HEAP8[$35>>0]|0; $37 = $36&255; $38 = $$132 << 2; $39 = $38 & 4; $40 = $39 ^ 4; $41 = ($40)?($37 >>> $40):($37); $42 = $41 & 15; $43 = ($42*17)|0; $44 = $43 & 255; $45 = $44 << 8; $46 = Math_imul($42, 1114112)|0; $47 = $46 | $44; $48 = $47 | $45; $49 = $48 | -16777216; $50 = (($3) + ($$132<<2)|0); HEAP32[$50>>2] = $49; $51 = (($$132) + 1)|0; $exitcond = ($51|0)==($0|0); if ($exitcond) { break; } else { $$132 = $51; } } return; } function _Png_Expand_GRAYSCALE_2($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$011 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($0|0)>(0); if (!($4)) { return; } $$011 = 0; while(1) { $5 = (2)?($$011 >>> 2):($$011); $6 = (($2) + ($5)|0); $7 = HEAP8[$6>>0]|0; $8 = $7&255; $9 = $$011 << 1; $10 = $9 & 6; $11 = $10 ^ 6; $12 = ($11)?($8 >>> $11):($8); $13 = $12 & 3; $14 = ($13*85)|0; $15 = $14 & 255; $16 = $15 << 8; $17 = Math_imul($13, 5570560)|0; $18 = $17 | $15; $19 = $18 | $16; $20 = $19 | -16777216; $21 = (($3) + ($$011<<2)|0); HEAP32[$21>>2] = $20; $22 = (($$011) + 1)|0; $exitcond = ($22|0)==($0|0); if ($exitcond) { break; } else { $$011 = $22; } } return; } function _Png_Expand_GRAYSCALE_1($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$011 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0; var label = 0, sp = 0; sp = STACKTOP; $4 = ($0|0)>(0); if (!($4)) { return; } $$011 = 0; while(1) { $5 = (3)?($$011 >>> 3):($$011); $6 = (($2) + ($5)|0); $7 = HEAP8[$6>>0]|0; $8 = $7&255; $9 = $$011 & 7; $10 = $9 ^ 7; $11 = ($10)?($8 >>> $10):($8); $12 = $11 & 1; $13 = (0 - ($12))|0; $14 = $13 & 255; $15 = $14 << 8; $16 = $14 << 16; $17 = $14 | $15; $18 = $17 | $16; $19 = $18 | -16777216; $20 = (($3) + ($$011<<2)|0); HEAP32[$20>>2] = $19; $21 = (($$011) + 1)|0; $exitcond = ($21|0)==($0|0); if ($exitcond) { break; } else { $$011 = $21; } } return; } function _Png_Expand_INDEXED_1($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($0|0)>(0); if (!($4)) { return; } $$09 = 0; while(1) { $5 = (3)?($$09 >>> 3):($$09); $6 = (($2) + ($5)|0); $7 = HEAP8[$6>>0]|0; $8 = $7&255; $9 = $$09 & 7; $10 = $9 ^ 7; $11 = ($10)?($8 >>> $10):($8); $12 = $11 & 1; $13 = (($1) + ($12<<2)|0); $14 = HEAP32[$13>>2]|0; $15 = (($3) + ($$09<<2)|0); HEAP32[$15>>2] = $14; $16 = (($$09) + 1)|0; $exitcond = ($16|0)==($0|0); if ($exitcond) { break; } else { $$09 = $16; } } return; } function _OnInit_79() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[1972813] = 1; _Event_Register(1791968,0,311); _OnReset(); return; } function _OnReset() { var $$015 = 0, $0 = 0, $1 = 0, $exitcond = 0, dest = 0, label = 0, sp = 0, stop = 0; sp = STACKTOP; dest=54016; stop=dest+96|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); $$015 = 0; while(1) { $0 = $$015&65535; _Block_ResetProps($0); $1 = (($$015) + 1)|0; $exitcond = ($1|0)==(768); if ($exitcond) { break; } else { $$015 = $1; } } _Block_UpdateAllCulling(); _Block_RecalculateAllSpriteBB(); _memset(((1171476)|0),1,1536)|0; return; } function _Block_ResetProps($0) { $0 = $0|0; var $$sink = 0.0, $$sink49 = 0.0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0; var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = $0&65535; $3 = HEAP8[(1803053)>>0]|0; $4 = $3&255; $5 = ($2>>>0)>($4>>>0); $6 = (576 + (($2*20)|0)|0); $7 = $5 ? 13296 : $6; $8 = HEAP32[$7>>2]|0; _String_FromReadonly($1,$8); $9 = ((($7)) + 14|0); $10 = HEAP8[$9>>0]|0; $11 = (1107732 + ($2)|0); HEAP8[$11>>0] = $10; $12 = ((($7)) + 13|0); $13 = HEAP8[$12>>0]|0; $14 = (1108500 + ($2)|0); HEAP8[$14>>0] = $13; $15 = ((($7)) + 8|0); $16 = HEAP32[$15>>2]|0; $17 = (1109268 + ($2<<2)|0); HEAP32[$17>>2] = $16; $18 = ((($7)) + 12|0); $19 = HEAP8[$18>>0]|0; $20 = (+($19&255)); $21 = $20 / 100.0; $22 = (1112340 + ($2<<2)|0); HEAPF32[$22>>2] = $21; $23 = ((($7)) + 17|0); $24 = HEAP8[$23>>0]|0; _Block_SetCollide($0,$24); $25 = ((($7)) + 18|0); $26 = HEAP8[$25>>0]|0; $27 = (1121556 + ($2)|0); HEAP8[$27>>0] = $26; $28 = ((($7)) + 19|0); $29 = HEAP8[$28>>0]|0; $30 = (1122324 + ($2)|0); HEAP8[$30>>0] = $29; $31 = (1116948 + ($2<<2)|0); HEAPF32[$31>>2] = 1.0; _Block_SetName($0,$1); $32 = (1123092 + ($2)|0); HEAP8[$32>>0] = 0; $33 = (1124628 + ($2)|0); HEAP8[$33>>0] = 0; $34 = ((($7)) + 16|0); $35 = HEAP8[$34>>0]|0; $36 = (1120788 + ($2)|0); HEAP8[$36>>0] = $35; $37 = ($35<<24>>24)==(5); $38 = (1125396 + (($2*12)|0)|0); if ($37) { HEAPF32[$38>>2] = 0.15625; $39 = (((1125396 + (($2*12)|0)|0)) + 4|0); HEAPF32[$39>>2] = 0.0; $40 = (((1125396 + (($2*12)|0)|0)) + 8|0); HEAPF32[$40>>2] = 0.15625; $41 = (1134612 + (($2*12)|0)|0); HEAPF32[$41>>2] = 0.84375; $$sink = 0.84375;$$sink49 = 1.0; } else { HEAPF32[$38>>2] = 0.0; $42 = (((1125396 + (($2*12)|0)|0)) + 4|0); HEAPF32[$42>>2] = 0.0; $43 = (((1125396 + (($2*12)|0)|0)) + 8|0); HEAPF32[$43>>2] = 0.0; $44 = (1134612 + (($2*12)|0)|0); HEAPF32[$44>>2] = 1.0; $45 = ((($7)) + 7|0); $46 = HEAP8[$45>>0]|0; $47 = (+($46&255)); $48 = $47 * 0.0625; $$sink = 1.0;$$sink49 = $48; } $49 = (((1134612 + (($2*12)|0)|0)) + 4|0); HEAPF32[$49>>2] = $$sink49; $50 = (((1134612 + (($2*12)|0)|0)) + 8|0); HEAPF32[$50>>2] = $$sink; _Block_SetDrawType($0,$35); _Block_CalcRenderBounds($0); _Block_CalcLightOffset($0); $51 = ((($7)) + 4|0); $52 = HEAP8[$51>>0]|0; $53 = $52&255; $54 = ($2*6)|0; $55 = (($54) + 5)|0; $56 = (1162260 + ($55<<1)|0); HEAP16[$56>>1] = $53; $57 = ((($7)) + 6|0); $58 = HEAP8[$57>>0]|0; $59 = $58&255; $60 = (($54) + 4)|0; $61 = (1162260 + ($60<<1)|0); HEAP16[$61>>1] = $59; $62 = ((($7)) + 5|0); $63 = HEAP8[$62>>0]|0; $64 = $63&255; _Block_SetSide($64,$0); $65 = ((($7)) + 15|0); $66 = HEAP8[$65>>0]|0; $67 = (+($66&255)); $68 = $67 / 100.0; $69 = $68 * 5.4000000953674316; $70 = (1763604 + ($2<<2)|0); HEAPF32[$70>>2] = $69; STACKTOP = sp;return; } function _Block_UpdateAllCulling() { var $$010 = 0, $$0911 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $exitcond = 0, $exitcond12 = 0, label = 0, sp = 0; sp = STACKTOP; $$0911 = 0; while(1) { $0 = $$0911&65535; _Block_CalcStretch($0); $$010 = 0; while(1) { $1 = $$010&65535; _Block_CalcCulling($0,$1); $2 = (($$010) + 1)|0; $exitcond = ($2|0)==(768); if ($exitcond) { break; } else { $$010 = $2; } } $3 = (($$0911) + 1)|0; $exitcond12 = ($3|0)==(768); if ($exitcond12) { break; } else { $$0911 = $3; } } return; } function _Block_RecalculateAllSpriteBB() { var $$05 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $$05 = 0; while(1) { $0 = (1120788 + ($$05)|0); $1 = HEAP8[$0>>0]|0; $2 = ($1<<24>>24)==(5); if ($2) { $3 = $$05&65535; _Block_RecalculateBB($3); } $4 = (($$05) + 1)|0; $exitcond = ($4|0)==(768); if ($exitcond) { break; } else { $$05 = $4; } } return; } function _Block_RecalculateBB($0) { $0 = $0|0; var $$0 = 0.0, $$043 = 0.0, $$044 = 0.0, $$045 = 0.0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0.0, $phitmp46 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $1 = sp + 48|0; $2 = sp + 36|0; $3 = sp + 24|0; $4 = sp + 12|0; $5 = sp; $6 = HEAP32[(1951372)>>2]|0; $7 = $0&65535; $8 = ($7*6)|0; $9 = $8 | 1; $10 = (1162260 + ($9<<1)|0); $11 = HEAP16[$10>>1]|0; $12 = $11&65535; $13 = $12 & 15; $14 = (4)?($12 >>> 4):($12); ;HEAP32[$1>>2]=HEAP32[13284>>2]|0;HEAP32[$1+4>>2]=HEAP32[13284+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[13284+8>>2]|0; $15 = HEAP32[(1951376)>>2]|0; $16 = ($14|0)<($15|0); if ($16) { $17 = (+_GetSpriteBB_MinX($6,$13,$14)); $18 = (+_GetSpriteBB_MinY($6,$13,$14)); $19 = (+_GetSpriteBB_MaxX($6,$13,$14)); $20 = (+_GetSpriteBB_MaxY($6,$13,$14)); $phitmp = $17 + -0.5; $phitmp46 = $19 + -0.5; $$0 = $20;$$043 = $phitmp46;$$044 = $18;$$045 = $phitmp; } else { $$0 = 1.0;$$043 = 0.5;$$044 = 0.0;$$045 = -0.5; } _Vec3_RotateY3($4,$$045,$$044,0.0,0.78539818525314331); ;HEAP32[$2>>2]=HEAP32[$4>>2]|0;HEAP32[$2+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[$4+8>>2]|0; _Vec3_RotateY3($5,$$043,$$0,0.0,0.78539818525314331); ;HEAP32[$3>>2]=HEAP32[$5>>2]|0;HEAP32[$3+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$3+8>>2]=HEAP32[$5+8>>2]|0; $21 = (1125396 + (($7*12)|0)|0); _Vec3_Add_80($21,$2,$1); $22 = (1134612 + (($7*12)|0)|0); _Vec3_Add_80($22,$3,$1); _Block_CalcRenderBounds($0); STACKTOP = sp;return; } function _GetSpriteBB_MinX($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$02 = 0, $$0223 = 0, $$023 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($0|0)>(0); if (!($3)) { $$023 = 1.0; return (+$$023); } $4 = HEAP32[487840]|0; $5 = Math_imul($2, $0)|0; $6 = HEAP32[(1951364)>>2]|0; $7 = Math_imul($1, $0)|0; $$0223 = 0; L4: while(1) { $$02 = 0; while(1) { $10 = (($$02) + ($5))|0; $11 = Math_imul($6, $10)|0; $12 = (($4) + ($11<<2)|0); $13 = (($12) + ($7<<2)|0); $14 = (($13) + ($$0223<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = ($15>>>0)>(16777215); $8 = (($$02) + 1)|0; if ($16) { break L4; } $9 = ($8|0)<($0|0); if ($9) { $$02 = $8; } else { break; } } $20 = (($$0223) + 1)|0; $21 = ($20|0)<($0|0); if ($21) { $$0223 = $20; } else { $$023 = 1.0; label = 8; break; } } if ((label|0) == 8) { return (+$$023); } $17 = (+($$0223|0)); $18 = (+($0|0)); $19 = $17 / $18; $$023 = $19; return (+$$023); } function _GetSpriteBB_MinY($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0222 = 0, $$023 = 0.0, $$05 = 0, $$05$in = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($0|0)>(0); if (!($3)) { $$023 = 1.0; return (+$$023); } $4 = HEAP32[487840]|0; $5 = Math_imul($2, $0)|0; $6 = HEAP32[(1951364)>>2]|0; $7 = Math_imul($1, $0)|0; $$05$in = $0; L4: while(1) { $$05 = (($$05$in) + -1)|0; $8 = (($$05) + ($5))|0; $9 = Math_imul($6, $8)|0; $10 = (($4) + ($9<<2)|0); $11 = (($10) + ($7<<2)|0); $$0222 = 0; while(1) { $14 = (($11) + ($$0222<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = ($15>>>0)>(16777215); $12 = (($$0222) + 1)|0; if ($16) { break L4; } $13 = ($12|0)<($0|0); if ($13) { $$0222 = $12; } else { break; } } $21 = ($$05$in|0)>(1); if ($21) { $$05$in = $$05; } else { $$023 = 1.0; label = 8; break; } } if ((label|0) == 8) { return (+$$023); } $17 = (+($$05$in|0)); $18 = (+($0|0)); $19 = $17 / $18; $20 = 1.0 - $19; $$023 = $20; return (+$$023); } function _GetSpriteBB_MaxX($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$02 = 0, $$0225 = 0, $$0225$in = 0, $$023 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($0|0)>(0); if (!($3)) { $$023 = 0.0; return (+$$023); } $4 = HEAP32[487840]|0; $5 = Math_imul($2, $0)|0; $6 = HEAP32[(1951364)>>2]|0; $7 = Math_imul($1, $0)|0; $$0225$in = $0; L4: while(1) { $$0225 = (($$0225$in) + -1)|0; $$02 = 0; while(1) { $10 = (($$02) + ($5))|0; $11 = Math_imul($6, $10)|0; $12 = (($4) + ($11<<2)|0); $13 = (($12) + ($7<<2)|0); $14 = (($13) + ($$0225<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = ($15>>>0)>(16777215); $8 = (($$02) + 1)|0; if ($16) { break L4; } $9 = ($8|0)<($0|0); if ($9) { $$02 = $8; } else { break; } } $20 = ($$0225$in|0)>(1); if ($20) { $$0225$in = $$0225; } else { $$023 = 0.0; label = 8; break; } } if ((label|0) == 8) { return (+$$023); } $17 = (+($$0225$in|0)); $18 = (+($0|0)); $19 = $17 / $18; $$023 = $19; return (+$$023); } function _GetSpriteBB_MaxY($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0222 = 0, $$023 = 0.0, $$03 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($0|0)>(0); if (!($3)) { $$023 = 0.0; return (+$$023); } $4 = HEAP32[487840]|0; $5 = Math_imul($2, $0)|0; $6 = HEAP32[(1951364)>>2]|0; $7 = Math_imul($1, $0)|0; $$03 = 0; L4: while(1) { $8 = (($$03) + ($5))|0; $9 = Math_imul($6, $8)|0; $10 = (($4) + ($9<<2)|0); $11 = (($10) + ($7<<2)|0); $$0222 = 0; while(1) { $14 = (($11) + ($$0222<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = ($15>>>0)>(16777215); $12 = (($$0222) + 1)|0; if ($16) { break L4; } $13 = ($12|0)<($0|0); if ($13) { $$0222 = $12; } else { break; } } $21 = (($$03) + 1)|0; $22 = ($21|0)<($0|0); if ($22) { $$03 = $21; } else { $$023 = 0.0; label = 8; break; } } if ((label|0) == 8) { return (+$$023); } $17 = (+($$03|0)); $18 = (+($0|0)); $19 = $17 / $18; $20 = 1.0 - $19; $$023 = $20; return (+$$023); } function _Vec3_Add_80($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 + $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 + $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 + $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _Block_CalcRenderBounds($0) { $0 = $0|0; var $$sroa$0$0 = 0.0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$$sroa_idx2 = 0, $$sroa$0$0$copyload = 0.0, $$sroa$015$0 = 0.0, $$sroa$015$0$$sroa_idx = 0, $$sroa$015$0$$sroa_idx17 = 0, $$sroa$015$0$copyload = 0.0, $$sroa$12$0 = 0.0, $$sroa$12$0$$sroa_idx10 = 0, $$sroa$12$0$$sroa_idx11 = 0, $$sroa$12$0$copyload = 0.0, $$sroa$1226$0 = 0.0, $$sroa$1226$0$$sroa_idx27 = 0, $$sroa$1226$0$$sroa_idx28 = 0, $$sroa$1226$0$copyload = 0.0, $$sroa$8$0 = 0.0, $$sroa$8$0$$sroa_idx5 = 0, $$sroa$8$0$$sroa_idx6 = 0, $$sroa$8$0$copyload = 0.0; var $$sroa$820$0 = 0.0, $$sroa$820$0$$sroa_idx21 = 0, $$sroa$820$0$$sroa_idx22 = 0, $$sroa$820$0$copyload = 0.0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $3 = 0; var $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $spec$select = 0.0, $spec$select38 = 0.0, $spec$select39 = 0.0, $spec$select40 = 0.0, $spec$select41 = 0.0, $spec$select42 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $$sroa$015$0$$sroa_idx = (1125396 + (($1*12)|0)|0); $$sroa$015$0$copyload = +HEAPF32[$$sroa$015$0$$sroa_idx>>2]; $$sroa$820$0$$sroa_idx21 = (((1125396 + (($1*12)|0)|0)) + 4|0); $$sroa$820$0$copyload = +HEAPF32[$$sroa$820$0$$sroa_idx21>>2]; $$sroa$1226$0$$sroa_idx27 = (((1125396 + (($1*12)|0)|0)) + 8|0); $$sroa$1226$0$copyload = +HEAPF32[$$sroa$1226$0$$sroa_idx27>>2]; $$sroa$0$0$$sroa_idx = (1134612 + (($1*12)|0)|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$8$0$$sroa_idx5 = (((1134612 + (($1*12)|0)|0)) + 4|0); $$sroa$8$0$copyload = +HEAPF32[$$sroa$8$0$$sroa_idx5>>2]; $$sroa$12$0$$sroa_idx10 = (((1134612 + (($1*12)|0)|0)) + 8|0); $$sroa$12$0$copyload = +HEAPF32[$$sroa$12$0$$sroa_idx10>>2]; $2 = (1106964 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if ($4) { $11 = (1120788 + ($1)|0); $12 = HEAP8[$11>>0]|0; $13 = ($12<<24>>24)==(3); if ($13) { $14 = (1115412 + ($1)|0); $15 = HEAP8[$14>>0]|0; $16 = ($15<<24>>24)==(2); $17 = $$sroa$015$0$copyload + 0.0062500000931322575; $18 = $$sroa$0$0$copyload + 0.0062500000931322575; $19 = $$sroa$1226$0$copyload + 0.0062500000931322575; $20 = $$sroa$12$0$copyload + 0.0062500000931322575; $21 = $$sroa$820$0$copyload + -0.0062500000931322575; $22 = $$sroa$8$0$copyload + -0.0062500000931322575; $spec$select = $16 ? $$sroa$1226$0$copyload : $19; $spec$select38 = $16 ? $$sroa$820$0$copyload : $21; $spec$select39 = $16 ? $$sroa$015$0$copyload : $17; $spec$select40 = $16 ? $$sroa$12$0$copyload : $20; $spec$select41 = $16 ? $$sroa$8$0$copyload : $22; $spec$select42 = $16 ? $$sroa$0$0$copyload : $18; $$sroa$0$0 = $spec$select42;$$sroa$015$0 = $spec$select39;$$sroa$12$0 = $spec$select40;$$sroa$1226$0 = $spec$select;$$sroa$8$0 = $spec$select41;$$sroa$820$0 = $spec$select38; } else { $$sroa$0$0 = $$sroa$0$0$copyload;$$sroa$015$0 = $$sroa$015$0$copyload;$$sroa$12$0 = $$sroa$12$0$copyload;$$sroa$1226$0 = $$sroa$1226$0$copyload;$$sroa$8$0 = $$sroa$8$0$copyload;$$sroa$820$0 = $$sroa$820$0$copyload; } } else { $5 = $$sroa$015$0$copyload + 0.0062500000931322575; $6 = $$sroa$0$0$copyload + 0.0062500000931322575; $7 = $$sroa$1226$0$copyload + 0.0062500000931322575; $8 = $$sroa$12$0$copyload + 0.0062500000931322575; $9 = $$sroa$820$0$copyload + -0.09375; $10 = $$sroa$8$0$copyload + -0.09375; $$sroa$0$0 = $6;$$sroa$015$0 = $5;$$sroa$12$0 = $8;$$sroa$1226$0 = $7;$$sroa$8$0 = $10;$$sroa$820$0 = $9; } $$sroa$015$0$$sroa_idx17 = (1143828 + (($1*12)|0)|0); HEAPF32[$$sroa$015$0$$sroa_idx17>>2] = $$sroa$015$0; $$sroa$820$0$$sroa_idx22 = (((1143828 + (($1*12)|0)|0)) + 4|0); HEAPF32[$$sroa$820$0$$sroa_idx22>>2] = $$sroa$820$0; $$sroa$1226$0$$sroa_idx28 = (((1143828 + (($1*12)|0)|0)) + 8|0); HEAPF32[$$sroa$1226$0$$sroa_idx28>>2] = $$sroa$1226$0; $$sroa$0$0$$sroa_idx2 = (1153044 + (($1*12)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx2>>2] = $$sroa$0$0; $$sroa$8$0$$sroa_idx6 = (((1153044 + (($1*12)|0)|0)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx6>>2] = $$sroa$8$0; $$sroa$12$0$$sroa_idx11 = (((1153044 + (($1*12)|0)|0)) + 8|0); HEAPF32[$$sroa$12$0$$sroa_idx11>>2] = $$sroa$12$0; return; } function _Block_CalcStretch($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0.0, $4 = 0; var $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1125396 + (($1*12)|0)|0); $3 = +HEAPF32[$2>>2]; $4 = $3 == 0.0; if ($4) { $5 = (1134612 + (($1*12)|0)|0); $6 = +HEAPF32[$5>>2]; $7 = $6 == 1.0; if ($7) { $8 = (1762836 + ($1)|0); $9 = HEAP8[$8>>0]|0; $10 = $9 | 60; HEAP8[$8>>0] = $10; } else { label = 4; } } else { label = 4; } if ((label|0) == 4) { $11 = (1762836 + ($1)|0); $12 = HEAP8[$11>>0]|0; $13 = $12 & -61; HEAP8[$11>>0] = $13; } $14 = (((1125396 + (($1*12)|0)|0)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $15 == 0.0; if ($16) { $17 = (((1134612 + (($1*12)|0)|0)) + 8|0); $18 = +HEAPF32[$17>>2]; $19 = $18 == 1.0; if ($19) { $20 = (1762836 + ($1)|0); $21 = HEAP8[$20>>0]|0; $22 = $21 | 3; HEAP8[$20>>0] = $22; return; } } $23 = (1762836 + ($1)|0); $24 = HEAP8[$23>>0]|0; $25 = $24 & -4; HEAP8[$23>>0] = $25; return; } function _Block_CalcCulling($0,$1) { $0 = $0|0; $1 = $1|0; var $$mux = 0, $$mux106107 = 0, $$not102 = 0, $$sink = 0, $$sink114 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$028$0$$sroa_idx = 0, $$sroa$028$0$copyload = 0.0, $$sroa$041$0$$sroa_idx = 0, $$sroa$041$0$copyload = 0.0, $$sroa$056$0$$sroa_idx = 0, $$sroa$056$0$copyload = 0.0, $$sroa$11$0$$sroa_idx24 = 0, $$sroa$11$0$copyload = 0.0, $$sroa$1151$0$$sroa_idx52 = 0, $$sroa$1151$0$copyload = 0.0, $$sroa$6$0 = 0.0, $$sroa$6$0$$sroa_idx19 = 0, $$sroa$6$0$copyload = 0.0; var $$sroa$632$0$$sroa_idx33 = 0, $$sroa$632$0$copyload = 0.0, $$sroa$645$0$$sroa_idx46 = 0, $$sroa$645$0$copyload = 0.0, $$sroa$660$0$$sroa_idx61 = 0, $$sroa$660$0$copyload = 0.0, $$sroa$9$0$$sroa_idx37 = 0, $$sroa$9$0$copyload = 0.0, $$sroa$965$0$$sroa_idx66 = 0, $$sroa$965$0$copyload = 0.0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0; var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $brmerge = 0, $brmerge103 = 0, $narrow = 0, $narrow111 = 0, $narrow112 = 0, $not$ = 0, $not$or$cond91 = 0, $not$or$cond97 = 0, $or$cond = 0, $or$cond100 = 0, $or$cond101 = 0, $or$cond91 = 0, $or$cond93 = 0, $or$cond97 = 0, $or$cond98 = 0, $or$cond99 = 0; var $phitmp89 = 0, $phitmp89$pn = 0, $phitmp90 = 0, $spec$select = 0.0, $spec$select109 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Block_MightCull($0,$1)|0); $3 = ($2<<24>>24)==(0); $4 = $0&65535; if ($3) { $5 = ($4*768)|0; $6 = $1&65535; $7 = (($5) + ($6))|0; $$sink = 0;$$sink114 = $7; $55 = (1173012 + ($$sink114)|0); HEAP8[$55>>0] = $$sink; return; } $$sroa$056$0$$sroa_idx = (1125396 + (($4*12)|0)|0); $$sroa$056$0$copyload = +HEAPF32[$$sroa$056$0$$sroa_idx>>2]; $$sroa$660$0$$sroa_idx61 = (((1125396 + (($4*12)|0)|0)) + 4|0); $$sroa$660$0$copyload = +HEAPF32[$$sroa$660$0$$sroa_idx61>>2]; $$sroa$965$0$$sroa_idx66 = (((1125396 + (($4*12)|0)|0)) + 8|0); $$sroa$965$0$copyload = +HEAPF32[$$sroa$965$0$$sroa_idx66>>2]; $$sroa$041$0$$sroa_idx = (1134612 + (($4*12)|0)|0); $$sroa$041$0$copyload = +HEAPF32[$$sroa$041$0$$sroa_idx>>2]; $$sroa$645$0$$sroa_idx46 = (((1134612 + (($4*12)|0)|0)) + 4|0); $$sroa$645$0$copyload = +HEAPF32[$$sroa$645$0$$sroa_idx46>>2]; $$sroa$1151$0$$sroa_idx52 = (((1134612 + (($4*12)|0)|0)) + 8|0); $$sroa$1151$0$copyload = +HEAPF32[$$sroa$1151$0$$sroa_idx52>>2]; $8 = $1&65535; $$sroa$028$0$$sroa_idx = (1125396 + (($8*12)|0)|0); $$sroa$028$0$copyload = +HEAPF32[$$sroa$028$0$$sroa_idx>>2]; $$sroa$632$0$$sroa_idx33 = (((1125396 + (($8*12)|0)|0)) + 4|0); $$sroa$632$0$copyload = +HEAPF32[$$sroa$632$0$$sroa_idx33>>2]; $$sroa$9$0$$sroa_idx37 = (((1125396 + (($8*12)|0)|0)) + 8|0); $$sroa$9$0$copyload = +HEAPF32[$$sroa$9$0$$sroa_idx37>>2]; $$sroa$0$0$$sroa_idx = (1134612 + (($8*12)|0)|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$6$0$$sroa_idx19 = (((1134612 + (($8*12)|0)|0)) + 4|0); $$sroa$6$0$copyload = +HEAPF32[$$sroa$6$0$$sroa_idx19>>2]; $$sroa$11$0$$sroa_idx24 = (((1134612 + (($8*12)|0)|0)) + 8|0); $$sroa$11$0$copyload = +HEAPF32[$$sroa$11$0$$sroa_idx24>>2]; $9 = (1106964 + ($4)|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==(0); $12 = $$sroa$645$0$copyload + -0.09375; $spec$select = $11 ? $$sroa$645$0$copyload : $12; $13 = (1106964 + ($8)|0); $14 = HEAP8[$13>>0]|0; $15 = ($14<<24>>24)==(0); $16 = $$sroa$6$0$copyload + -0.09375; $$sroa$6$0 = $15 ? $$sroa$6$0$copyload : $16; $17 = ($14<<24>>24)!=(0); $not$ = $11 ^ 1; $spec$select109 = $17 & $not$; $18 = !($$sroa$965$0$copyload >= $$sroa$9$0$copyload); $19 = !($$sroa$1151$0$copyload <= $$sroa$11$0$copyload); $or$cond = $18 | $19; $20 = !($$sroa$660$0$copyload >= $$sroa$632$0$copyload); $or$cond91 = $20 | $or$cond; $21 = $spec$select <= $$sroa$6$0; $not$or$cond91 = $or$cond91 ^ 1; $narrow = $21 & $not$or$cond91; $22 = !($$sroa$056$0$copyload >= $$sroa$028$0$copyload); $23 = !($$sroa$041$0$copyload <= $$sroa$0$0$copyload); $or$cond93 = $22 | $23; $brmerge = $18 | $or$cond93; $24 = !($$sroa$1151$0$copyload <= $$sroa$11$0$copyload); $or$cond97 = $20 | $or$cond93; $not$or$cond97 = $or$cond97 ^ 1; $narrow111 = $21 & $not$or$cond97; $25 = $$sroa$0$0$copyload == 1.0; $or$cond98 = $25 & $narrow; $26 = $$sroa$056$0$copyload == 0.0; $narrow112 = $26 & $or$cond98; $27 = $narrow112&1; $28 = $$sroa$028$0$copyload == 0.0; $or$cond99 = $28 & $narrow; $29 = $$sroa$041$0$copyload == 1.0; $30 = $29 & $or$cond99; $31 = $30 ? 2 : 0; $32 = $31 | $27; $33 = $$sroa$11$0$copyload == 1.0; $or$cond100 = $33 & $narrow111; $34 = $$sroa$965$0$copyload == 0.0; $35 = $34 & $or$cond100; $36 = $35 ? 4 : 0; $37 = $32 | $36; $38 = $$sroa$9$0$copyload == 0.0; $or$cond101 = $38 & $narrow111; $39 = $$sroa$1151$0$copyload == 1.0; $40 = $39 & $or$cond101; $41 = $40 ? 8 : 0; $42 = $37 | $41; $$not102 = $brmerge | $24; $brmerge103 = $$not102 | $spec$select109; if ($brmerge103) { $$mux = $$not102 ? 0 : 16; $$mux106107 = $$not102 ? 0 : 32; $51 = $$mux106107;$phitmp89$pn = $$mux; } else { $43 = $$sroa$6$0 == 1.0; $44 = $$sroa$660$0$copyload == 0.0; $45 = $44 & $43; $phitmp89 = $45 ? 16 : 0; $46 = $$sroa$632$0$copyload == 0.0; $47 = $spec$select == 1.0; $48 = $46 & $47; $phitmp90 = $48 ? 32 : 0; $51 = $phitmp90;$phitmp89$pn = $phitmp89; } $49 = $42 | $phitmp89$pn; $50 = $49 | $51; $52 = $50&255; $53 = ($4*768)|0; $54 = (($53) + ($8))|0; $$sink = $52;$$sink114 = $54; $55 = (1173012 + ($$sink114)|0); HEAP8[$55>>0] = $$sink; return; } function _Block_MightCull($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$0$shrunk = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond20 = 0, $switch = 0, $switch19 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0&65535; $3 = (1120788 + ($2)|0); $4 = HEAP8[$3>>0]|0; $5 = ($4<<24>>24)==(5); do { if ($5) { $$0$shrunk = 0; } else { $6 = $0 & -2; $switch = ($6<<16>>16)==(8); $7 = $1 & -2; $switch19 = ($7<<16>>16)==(10); $or$cond = $switch & $switch19; if ($or$cond) { $$0$shrunk = 1; } else { $8 = $1&65535; $9 = ($0<<16>>16)==($1<<16>>16); if ($9) { $10 = ($4<<24>>24)!=(2); $$0$shrunk = $10; break; } $11 = (1120788 + ($8)|0); $12 = HEAP8[$11>>0]|0; $13 = ($12<<24>>24)==(0); if ($13) { $14 = (1106964 + ($8)|0); $15 = HEAP8[$14>>0]|0; $16 = ($15<<24>>24)==(0); $$0$shrunk = $16; break; } $17 = ($4<<24>>24)==(3); $18 = ($12<<24>>24)==(3); $or$cond20 = $17 & $18; if ($or$cond20) { $19 = (1115412 + ($2)|0); $20 = HEAP8[$19>>0]|0; $21 = ($20<<24>>24)==(2); if ($21) { $22 = (1115412 + ($8)|0); $23 = HEAP8[$22>>0]|0; $24 = ($23<<24>>24)==(2); if ($24) { $$0$shrunk = 1; break; } } $25 = ($20<<24>>24)!=(2); $$0$shrunk = $25; } else { $$0$shrunk = 0; } } } } while(0); $$0 = $$0$shrunk&1; return ($$0|0); } function _Block_SetCollide($0,$1) { $0 = $0|0; $1 = $1|0; var $$1 = 0, $$3 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $spec$select = 0, $spec$select9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0&65535; $3 = (1116180 + ($2)|0); HEAP8[$3>>0] = $1; _Block_RecalcIsLiquid($0); $4 = ($1<<24>>24)==(3); $spec$select = $4 ? 2 : $1; $5 = ($spec$select<<24>>24)==(4); $$1 = $5 ? 2 : $spec$select; $6 = ($$1<<24>>24)==(5); $spec$select9 = $6 ? 1 : $$1; $7 = ($spec$select9<<24>>24)==(6); $$3 = $7 ? 1 : $spec$select9; $8 = (1115412 + ($2)|0); HEAP8[$8>>0] = $$3; return; } function _Block_SetName($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0&65535; $3 = $2 << 6; $4 = (54112 + ($3)|0); _String_CopyToRaw($4,64,$1); return; } function _Block_SetDrawType($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(0); if ($2) { $3 = $0&65535; $4 = (1115412 + ($3)|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)!=(2); $spec$select = $6&1; $$0 = $spec$select; } else { $$0 = $1; } $7 = $0&65535; $8 = (1120788 + ($7)|0); HEAP8[$8>>0] = $$0; _Block_RecalcIsLiquid($0); $9 = ($$0<<24>>24)==(0); if ($9) { $10 = (1125396 + (($7*12)|0)|0); $11 = +HEAPF32[$10>>2]; $12 = $11 == 0.0; if ($12) { $13 = (((1125396 + (($7*12)|0)|0)) + 4|0); $14 = +HEAPF32[$13>>2]; $15 = $14 == 0.0; if ($15) { $16 = (((1125396 + (($7*12)|0)|0)) + 8|0); $17 = +HEAPF32[$16>>2]; $18 = $17 == 0.0; if ($18) { $19 = (1134612 + (($7*12)|0)|0); $20 = +HEAPF32[$19>>2]; $21 = $20 == 1.0; if ($21) { $22 = (((1134612 + (($7*12)|0)|0)) + 4|0); $23 = +HEAPF32[$22>>2]; $24 = $23 == 1.0; if ($24) { $25 = (((1134612 + (($7*12)|0)|0)) + 8|0); $26 = +HEAPF32[$25>>2]; $27 = $26 == 1.0; $phitmp = $27&1; $29 = $phitmp; } else { $29 = 0; } } else { $29 = 0; } } else { $29 = 0; } } else { $29 = 0; } } else { $29 = 0; } } else { $29 = 0; } $28 = (1123860 + ($7)|0); HEAP8[$28>>0] = $29; return; } function _Block_CalcLightOffset($0) { $0 = $0|0; var $$0 = 0, $$1 = 0, $$2 = 0, $$3 = 0, $$4 = 0, $$5 = 0, $$6 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$07$0$$sroa_idx = 0, $$sroa$07$0$copyload = 0.0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$49$0$$sroa_idx10 = 0, $$sroa$49$0$copyload = 0.0, $$sroa$6$0$$sroa_idx5 = 0, $$sroa$6$0$copyload = 0.0, $$sroa$613$0$$sroa_idx14 = 0, $$sroa$613$0$copyload = 0.0, $1 = 0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $spec$select = 0; var label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $$sroa$07$0$$sroa_idx = (1125396 + (($1*12)|0)|0); $$sroa$07$0$copyload = +HEAPF32[$$sroa$07$0$$sroa_idx>>2]; $$sroa$49$0$$sroa_idx10 = (((1125396 + (($1*12)|0)|0)) + 4|0); $$sroa$49$0$copyload = +HEAPF32[$$sroa$49$0$$sroa_idx10>>2]; $$sroa$613$0$$sroa_idx14 = (((1125396 + (($1*12)|0)|0)) + 8|0); $$sroa$613$0$copyload = +HEAPF32[$$sroa$613$0$$sroa_idx14>>2]; $$sroa$0$0$$sroa_idx = (1134612 + (($1*12)|0)|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$4$0$$sroa_idx2 = (((1134612 + (($1*12)|0)|0)) + 4|0); $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx2>>2]; $$sroa$6$0$$sroa_idx5 = (((1134612 + (($1*12)|0)|0)) + 8|0); $$sroa$6$0$copyload = +HEAPF32[$$sroa$6$0$$sroa_idx5>>2]; $2 = $$sroa$07$0$copyload != 0.0; $$0 = $2 ? 254 : 255; $3 = $$sroa$0$0$copyload != 1.0; $4 = $$0 & 253; $$1 = $3 ? $4 : $$0; $5 = $$sroa$613$0$copyload != 0.0; $6 = $$1 & 251; $$2 = $5 ? $6 : $$1; $7 = $$sroa$6$0$copyload != 1.0; $8 = $$2 & 247; $$3 = $7 ? $8 : $$2; $9 = $$sroa$49$0$copyload != 0.0; $10 = $$3 & 239; $$4 = $9 ? $10 : $$3; $11 = $$sroa$4$0$copyload != 1.0; $12 = $$4 & 223; $$5 = $11 ? $12 : $$4; $13 = $$sroa$4$0$copyload == 1.0; $or$cond = $9 & $13; if (!($or$cond)) { $$6 = $$5; $18 = $$6&255; $19 = (1120020 + ($1)|0); HEAP8[$19>>0] = $18; return; } $14 = $$5 & -65; $15 = (1120788 + ($1)|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(4); $spec$select = $17 ? $$5 : $14; $$6 = $spec$select; $18 = $$6&255; $19 = (1120020 + ($1)|0); HEAP8[$19>>0] = $18; return; } function _Block_SetSide($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $1&65535; $3 = ($2*6)|0; $4 = (1162260 + ($3<<1)|0); HEAP16[$4>>1] = $0; $5 = $3 | 1; $6 = (1162260 + ($5<<1)|0); HEAP16[$6>>1] = $0; $7 = (($3) + 2)|0; $8 = (1162260 + ($7<<1)|0); HEAP16[$8>>1] = $0; $9 = (($3) + 3)|0; $10 = (1162260 + ($9<<1)|0); HEAP16[$10>>1] = $0; return; } function _Block_RecalcIsLiquid($0) { $0 = $0|0; var $$shrunk = 0, $$sink6 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1116180 + ($1)|0); $3 = HEAP8[$2>>0]|0; switch ($3<<24>>24) { case 5: { $$sink6 = 3; label = 3; break; } case 6: { $$sink6 = 1; label = 3; break; } default: { $$shrunk = 0; } } if ((label|0) == 3) { $4 = (1120788 + ($1)|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==($$sink6<<24>>24); $phitmp = $6&1; $$shrunk = $phitmp; } $7 = (1106964 + ($1)|0); HEAP8[$7>>0] = $$shrunk; return; } function _OnAtlasChanged($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Block_RecalculateAllSpriteBB(); return; } function _Block_IsCustomDefined($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (5)?($1 >>> 5):($1); $3 = (54016 + ($2<<2)|0); $4 = HEAP32[$3>>2]|0; $5 = $1 & 31; $6 = 1 << $5; $7 = $4 & $6; $8 = ($7|0)!=(0); $9 = $8&1; return ($9|0); } function _Block_DefineCustom($0,$1) { $0 = $0|0; $1 = $1|0; var $$lobit = 0, $$not = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; _Block_UNSAFE_GetName($2,$0); $3 = $0&65535; $4 = (1115412 + ($3)|0); $5 = HEAP8[$4>>0]|0; $6 = (_DefaultSet_MapOldCollide($0,$5)|0); $7 = (1109268 + ($3<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(-16777216); if ($9) { $13 = 0; } else { $10 = (_String_IndexOfAt($2,0,35)|0); $$lobit = (31)?($10 >>> 31):($10); $11 = $$lobit&255; $$not = $11 ^ 1; $13 = $$not; } $12 = (1123092 + ($3)|0); HEAP8[$12>>0] = $13; _Block_SetCollide($0,$6); $14 = (1120788 + ($3)|0); $15 = HEAP8[$14>>0]|0; _Block_SetDrawType($0,$15); _Block_CalcRenderBounds($0); _Block_UpdateCulling($0); _Block_CalcLightOffset($0); _Inventory_AddDefault($0); _Block_SetCustomDefined($0,1); _Event_RaiseVoid((1795348)); $16 = ($1<<24>>24)==(0); if ($16) { STACKTOP = sp;return; } $17 = HEAP8[$14>>0]|0; $18 = ($17<<24>>24)==(5); if (!($18)) { STACKTOP = sp;return; } _Block_RecalculateBB($0); STACKTOP = sp;return; } function _Block_UNSAFE_GetName($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $1&65535; $3 = $2 << 6; $4 = (54112 + ($3)|0); _String_FromRaw($0,$4,64); return; } function _DefaultSet_MapOldCollide($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$old = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, $or$cond12 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($0<<16>>16)==(51); $3 = ($1<<24>>24)==(0); $or$cond = $2 & $3; L1: do { if ($or$cond) { $$0 = 7; } else { $4 = ($0<<16>>16)==(60); $5 = ($1<<24>>24)==(2); $or$cond12 = $4 & $5; if ($or$cond12) { $$0 = 3; } else { switch ($0<<16>>16) { case 9: case 8: { $6 = ($1<<24>>24)==(1); if ($6) { $$0 = 5; break L1; } break; } case 11: case 10: { $$old = ($1<<24>>24)==(1); if ($$old) { $$0 = 6; break L1; } break; } default: { } } $$0 = $1; } } } while(0); return ($$0|0); } function _Block_UpdateCulling($0) { $0 = $0|0; var $$08 = 0, $1 = 0, $2 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; _Block_CalcStretch($0); $$08 = 0; while(1) { $1 = $$08&65535; _Block_CalcCulling($0,$1); _Block_CalcCulling($1,$0); $2 = (($$08) + 1)|0; $exitcond = ($2|0)==(768); if ($exitcond) { break; } else { $$08 = $2; } } return; } function _Block_SetCustomDefined($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(0); $3 = $0&65535; $4 = $3 & 31; $5 = 1 << $4; if ($2) { $10 = $5 ^ -1; $11 = (5)?($3 >>> 5):($3); $12 = (54016 + ($11<<2)|0); $13 = HEAP32[$12>>2]|0; $14 = $13 & $10; HEAP32[$12>>2] = $14; return; } else { $6 = (5)?($3 >>> 5):($3); $7 = (54016 + ($6<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = $8 | $5; HEAP32[$7>>2] = $9; return; } } function _Block_UndefineCustom($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; _Block_ResetProps($0); _Block_UpdateCulling($0); _Inventory_Remove($0); $1 = $0&65535; $2 = ($0&65535)<(66); if ($2) { _Inventory_AddDefault($0); } _Block_SetCustomDefined($0,0); _Event_RaiseVoid((1795348)); $3 = (1120788 + ($1)|0); $4 = HEAP8[$3>>0]|0; $5 = ($4<<24>>24)==(5); if (!($5)) { return; } _Block_RecalculateBB($0); return; } function _Block_FindID($0) { $0 = $0|0; var $$05 = 0, $$07 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 8|0; $2 = sp; $$07 = 0; while(1) { $3 = $$07&65535; _Block_UNSAFE_GetName($2,$3); $4 = $2; $5 = $4; $6 = HEAP32[$5>>2]|0; $7 = (($4) + 4)|0; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = $1; $11 = $10; HEAP32[$11>>2] = $6; $12 = (($10) + 4)|0; $13 = $12; HEAP32[$13>>2] = $9; $14 = (_String_CaselessEquals($1,$0)|0); $15 = ($14|0)==(0); if (!($15)) { $$05 = $$07; label = 4; break; } $16 = (($$07) + 1)|0; $17 = ($16>>>0)<(768); if ($17) { $$07 = $16; } else { $$05 = -1; label = 4; break; } } if ((label|0) == 4) { STACKTOP = sp;return ($$05|0); } return (0)|0; } function _Block_Parse($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = (_Convert_ParseInt($0,$1)|0); $3 = ($2<<24>>24)!=(0); $4 = HEAP32[$1>>2]|0; $5 = ($4|0)<(768); $or$cond = $3 & $5; if ($or$cond) { $$0 = $4; STACKTOP = sp;return ($$0|0); } $6 = (_Block_FindID($0)|0); $$0 = $6; STACKTOP = sp;return ($$0|0); } function _AutoRotate_RotateBlock($0) { $0 = $0|0; var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 144|0; $1 = sp + 136|0; $2 = sp; $3 = sp + 128|0; _Block_UNSAFE_GetName($3,$0); HEAP32[$1>>2] = $2; $4 = ((($1)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($1)) + 6|0); HEAP16[$5>>1] = 128; _String_AppendString($1,$3); $6 = (_FindRotated($1,0)|0); $7 = ($6|0)==(-1); $8 = $0&65535; $9 = $7 ? $8 : $6; $10 = $9&65535; STACKTOP = sp;return ($10|0); } function _FindRotated($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_String_LastIndexOfAt($0,$1,45)|0); $4 = ($3|0)==(-1); L1: do { if ($4) { $$0 = -1; } else { _String_UNSAFE_SubstringAt($2,$0,$3); $5 = ((($2)) + 4|0); $6 = HEAP16[$5>>1]|0; $7 = $6&65535; $8 = (($7) - ($1))|0; $9 = $8&65535; HEAP16[$5>>1] = $9; $10 = $8 & 65535; $11 = ($10>>>0)>(3); if ($11) { $$0 = -1; } else { $12 = (($10) + ($1))|0; $13 = (_AR_CalcGroup($2)|0); switch ($13|0) { case 0: { $14 = (_RotateCorner($0,$12)|0); $$0 = $14; break L1; } case 1: { $15 = (_RotateVertical($0,$12)|0); $$0 = $15; break L1; } case 2: { $16 = (_RotateDirection($0,$12)|0); $$0 = $16; break L1; } case 3: { _AutoRotate_Insert($0,$12,24817); $17 = (_Block_FindID($0)|0); $18 = ($17|0)==(-1); if ($18) { $19 = (_RotateFence($0,$12)|0); $$0 = $19; break L1; } else { $20 = (_RotatePillar($0,$12)|0); $$0 = $20; break L1; } } default: { $$0 = -1; break L1; } } } } } while(0); STACKTOP = sp;return ($$0|0); } function _AR_CalcGroup($0) { $0 = $0|0; var $$0 = 0, $$0$v = 0, $$036 = 0, $$03659 = 0, $$037 = 0, $$off = 0, $$off67 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond4062 = 0, $or$cond4263 = 0, $or$cond4364 = 0; var $or$cond45 = 0, $or$cond49 = 0, $or$cond50 = 0, $or$cond51 = 0, $or$cond52 = 0, $or$cond53 = 0, $or$cond5466 = 0, $or$cond55 = 0, $or$cond56 = 0, $or$cond60 = 0, $or$cond61 = 0, $sext = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP16[$1>>1]|0; $3 = ($2&65535)>(1); if ($3) { $4 = HEAP32[$0>>2]|0; $5 = ((($4)) + 1|0); $6 = HEAP8[$5>>0]|0; $7 = $6 << 24 >> 24; $$off67 = (($6) + -65)<<24>>24; $8 = ($$off67&255)<(26); $9 = (($7) + 32)|0; $$036 = $8 ? $9 : $7; $10 = ($2<<16>>16)==(2); if ($10) { $$03659 = $$036;$15 = 0; } else { $11 = HEAP32[$0>>2]|0; $12 = ((($11)) + 2|0); $13 = HEAP8[$12>>0]|0; $14 = $13 << 24 >> 24; $$03659 = $$036;$15 = $14; } } else { $$03659 = 0;$15 = 0; } $$off = (($15) + -65)|0; $16 = ($$off>>>0)<(26); $17 = (($15) + 32)|0; $$0$v = $16 ? $17 : $15; $$0 = $$0$v&255; $sext = $$03659 << 24; $18 = ($sext|0)==(1845493760); $19 = ($$0<<24>>24)==(119); $20 = ($$0<<24>>24)==(101); $or$cond4062 = $19 | $20; $or$cond52 = $18 & $or$cond4062; if ($or$cond52) { $$037 = 0; return ($$037|0); } $21 = ($sext|0)==(1929379840); $or$cond4263 = $19 | $20; $or$cond53 = $21 & $or$cond4263; if ($or$cond53) { $$037 = 0; return ($$037|0); } $22 = ($sext|0)==(1962934272); $23 = ($$0<<24>>24)==(0); $24 = ($sext|0)==(1677721600); $or$cond4364 = $22 | $24; $or$cond60 = $or$cond4364 & $23; if ($or$cond60) { $$037 = 1; return ($$037|0); } $or$cond45 = $18 & $23; if ($or$cond45) { $$037 = 2; return ($$037|0); } $25 = $sext | 67108864; $26 = ($25|0)==(1996488704); $27 = ($sext|0)==(1694498816); $or$cond5466 = $27 | $26; $or$cond61 = $or$cond5466 & $23; if ($or$cond61) { $$037 = 2; return ($$037|0); } else { $28 = ($sext|0)==(1996488704); $29 = ($$0<<24>>24)==(100); $or$cond49 = $22 & $29; $or$cond50 = $28 & $20; $or$cond55 = $or$cond49 | $or$cond50; $30 = ($$0<<24>>24)==(115); $or$cond51 = $18 & $30; $or$cond56 = $or$cond51 | $or$cond55; $spec$select = $or$cond56 ? 3 : -1; return ($spec$select|0); } } function _RotateCorner($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[(1803016)>>2]; $3 = HEAP32[(1803028)>>2]|0; $4 = (+($3|0)); $5 = $2 - $4; $6 = +HEAPF32[(1803024)>>2]; $7 = HEAP32[(1803036)>>2]|0; $8 = (+($7|0)); $9 = $6 - $8; $10 = $5 < 0.5; $11 = $9 < 0.5; $or$cond = $10 & $11; do { if ($or$cond) { _AutoRotate_Insert($0,$1,24847); } else { $12 = $5 >= 0.5; $or$cond3 = $12 & $11; if ($or$cond3) { _AutoRotate_Insert($0,$1,24851); break; } $13 = $9 >= 0.5; $or$cond5 = $10 & $13; if ($or$cond5) { _AutoRotate_Insert($0,$1,24855); break; } $or$cond7 = $12 & $13; if ($or$cond7) { _AutoRotate_Insert($0,$1,24859); } } } while(0); $14 = (_GetRotated($0,$1)|0); return ($14|0); } function _RotateVertical($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[(1803020)>>2]; $3 = HEAP32[(1803032)>>2]|0; $4 = (+($3|0)); $5 = $2 - $4; $6 = !($5 >= 0.5); if ($6) { _AutoRotate_Insert($0,$1,24844); } else { _AutoRotate_Insert($0,$1,24841); } $7 = (_GetRotated($0,$1)|0); return ($7|0); } function _RotateDirection($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[(1783792)>>2]; $3 = (+_Math_ClampAngle($2)); $4 = $3 >= 45.0; $5 = $3 < 135.0; $or$cond = $4 & $5; do { if ($or$cond) { _AutoRotate_Insert($0,$1,24829); } else { $6 = $3 >= 135.0; $7 = $3 < 225.0; $or$cond3 = $6 & $7; if ($or$cond3) { _AutoRotate_Insert($0,$1,24832); break; } $8 = $3 >= 225.0; $9 = $3 < 315.0; $or$cond5 = $8 & $9; if ($or$cond5) { _AutoRotate_Insert($0,$1,24835); break; } else { _AutoRotate_Insert($0,$1,24838); break; } } } while(0); $10 = (_GetRotated($0,$1)|0); return ($10|0); } function _AutoRotate_Insert($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$01213 = 0, $$014 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 4|0); $4 = HEAP8[$2>>0]|0; $5 = ($4<<24>>24)==(0); if ($5) { return; } $6 = HEAP16[$3>>1]|0; $7 = $6&65535; $8 = (($7) - ($1))|0; $$01213 = $2;$$014 = $8;$14 = $4; while(1) { $9 = HEAP16[$3>>1]|0; $10 = $9&65535; $11 = ($$014|0)<($10|0); if ($11) { $12 = HEAP32[$0>>2]|0; $13 = (($12) + ($$014)|0); HEAP8[$13>>0] = $14; } else { _String_Append($0,$14); } $15 = ((($$01213)) + 1|0); $16 = (($$014) + 1)|0; $17 = HEAP8[$15>>0]|0; $18 = ($17<<24>>24)==(0); if ($18) { break; } else { $$01213 = $15;$$014 = $16;$14 = $17; } } return; } function _RotateFence($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond = 0, $or$cond3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[(1783792)>>2]; $3 = (+_Math_ClampAngle($2)); $4 = $3 < 45.0; if (!($4)) { $5 = $3 >= 135.0; $6 = $3 < 225.0; $or$cond = $5 & $6; $7 = $3 > 315.0; $or$cond3 = $7 | $or$cond; if (!($or$cond3)) { _AutoRotate_Insert($0,$1,24825); $8 = (_GetRotated($0,$1)|0); return ($8|0); } } _AutoRotate_Insert($0,$1,24821); $8 = (_GetRotated($0,$1)|0); return ($8|0); } function _RotatePillar($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1803041)>>0]|0; switch ($2<<24>>24) { case 4: case 5: { _AutoRotate_Insert($0,$1,24817); break; } case 0: case 1: { _AutoRotate_Insert($0,$1,24821); break; } case 2: case 3: { _AutoRotate_Insert($0,$1,24825); break; } default: { } } $3 = (_GetRotated($0,$1)|0); return ($3|0); } function _GetRotated($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_FindRotated($0,$1)|0); $3 = ($2|0)==(-1); if (!($3)) { $5 = $2; return ($5|0); } $4 = (_Block_FindID($0)|0); $5 = $4; return ($5|0); } function _AutoRotate_BlocksShareGroup($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $phitmp = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp + 8|0; $3 = sp; $4 = sp + 24|0; $5 = sp + 16|0; _Block_UNSAFE_GetName($2,$0); _GetAutoRotateTypes($2,$4); $6 = HEAP32[$4>>2]|0; $7 = ($6|0)==(-1); if ($7) { $$0 = 0; STACKTOP = sp;return ($$0|0); } _Block_UNSAFE_GetName($3,$1); _GetAutoRotateTypes($3,$5); $8 = HEAP32[$5>>2]|0; $9 = ($8|0)!=(-1); $10 = ($6|0)==($8|0); $or$cond = $9 & $10; if (!($or$cond)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $11 = ((($4)) + 4|0); $12 = HEAP32[$11>>2]|0; $13 = ((($5)) + 4|0); $14 = HEAP32[$13>>2]|0; $15 = ($12|0)==($14|0); if (!($15)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $16 = (_String_CaselessEquals($2,$3)|0); $17 = ($16|0)!=(0); $phitmp = $17&1; $$0 = $phitmp; STACKTOP = sp;return ($$0|0); } function _GetAutoRotateTypes($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 8|0; $3 = sp; HEAP32[$1>>2] = -1; $4 = ((($1)) + 4|0); HEAP32[$4>>2] = -1; $5 = ((($0)) + 4|0); $6 = (_String_LastIndexOfAt($0,0,45)|0); $7 = ($6|0)==(-1); if ($7) { STACKTOP = sp;return; } _String_UNSAFE_SubstringAt($3,$0,$6); $8 = $3; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = (($8) + 4)|0; $12 = $11; $13 = HEAP32[$12>>2]|0; $14 = $2; $15 = $14; HEAP32[$15>>2] = $10; $16 = (($14) + 4)|0; $17 = $16; HEAP32[$17>>2] = $13; $18 = (_AR_CalcGroup($2)|0); HEAP32[$1>>2] = $18; $19 = $6&65535; HEAP16[$5>>1] = $19; $20 = (_String_LastIndexOfAt($0,0,45)|0); $21 = ($20|0)==(-1); if ($21) { STACKTOP = sp;return; } _String_UNSAFE_SubstringAt($3,$0,$20); $22 = $3; $23 = $22; $24 = HEAP32[$23>>2]|0; $25 = (($22) + 4)|0; $26 = $25; $27 = HEAP32[$26>>2]|0; $28 = $2; $29 = $28; HEAP32[$29>>2] = $24; $30 = (($28) + 4)|0; $31 = $30; HEAP32[$31>>2] = $27; $32 = (_AR_CalcGroup($2)|0); $33 = ((($1)) + 4|0); HEAP32[$33>>2] = $32; $34 = $20&65535; HEAP16[$5>>1] = $34; STACKTOP = sp;return; } function _Physics_SetEnabled($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; HEAP8[1766676] = $0; _Physics_OnNewMapLoaded(0); return; } function _Physics_OnNewMapLoaded($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; _TickQueue_Clear(1770776); _TickQueue_Clear(1770800); $1 = HEAP32[(1103576)>>2]|0; $2 = (($1) + -2)|0; HEAP32[442706] = $2; $3 = HEAP32[(1103580)>>2]|0; $4 = (($3) + -2)|0; HEAP32[442707] = $4; $5 = HEAP32[(1103584)>>2]|0; $6 = (($5) + -2)|0; HEAP32[442708] = $6; $7 = HEAP32[275888]|0; HEAP32[450772] = $7; _Random_SeedFromCurrentTime(1084936); HEAP32[450773] = 1084936; return; } function _TickQueue_Clear($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[$0>>2]|0; $2 = ($1|0)==(0|0); if ($2) { return; } _Mem_Free($1); _TickQueue_Init($0); return; } function _TickQueue_Init($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;HEAP32[$0+12>>2]=0|0;HEAP32[$0+16>>2]=0|0;HEAP32[$0+20>>2]=0|0; return; } function _Physics_OnBlockChanged($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = HEAP8[1766676]|0; $6 = ($5<<24>>24)==(0); if ($6) { return; } $7 = ($4<<16>>16)==(0); if ($7) { $8 = (_Physics_IsEdgeWater($0,$1,$2)|0); $9 = ($8<<24>>24)==(0); if ($9) { $$0 = 0; } else { _Game_UpdateBlock($0,$1,$2,9); $$0 = 9; } } else { $$0 = $4; } $10 = HEAP32[(1103572)>>2]|0; $11 = Math_imul($10, $1)|0; $12 = (($11) + ($2))|0; $13 = HEAP32[(1103564)>>2]|0; $14 = Math_imul($12, $13)|0; $15 = (($14) + ($0))|0; $16 = ($$0<<16>>16)==(0); if ($16) { $17 = $3 & 255; $18 = $17&65535; $19 = (1769752 + ($18<<2)|0); $20 = HEAP32[$19>>2]|0; $21 = ($20|0)==(0|0); if (!($21)) { FUNCTION_TABLE_vii[$20 & 255]($15,$3); } } else { $22 = $$0 & 255; $23 = $22&65535; $24 = (1768728 + ($23<<2)|0); $25 = HEAP32[$24>>2]|0; $26 = ($25|0)==(0|0); if (!($26)) { FUNCTION_TABLE_vii[$25 & 255]($15,$$0); } } _Physics_ActivateNeighbours($0,$1,$2,$15); return; } function _Physics_IsEdgeWater($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond7 = 0, $or$cond9 = 0, $phitmp = 0, $switch = 0, label = 0; var sp = 0; sp = STACKTOP; $3 = HEAP16[986072]|0; $4 = $3 & -2; $switch = ($4<<16>>16)==(8); if (!($switch)) { $16 = 0; return ($16|0); } $5 = HEAP32[(1972148)>>2]|0; $6 = HEAP32[(1972152)>>2]|0; $7 = (($6) + ($5))|0; $8 = ($7|0)<=($1|0); $9 = ($5|0)>($1|0); $or$cond7 = $9 & $8; if (!($or$cond7)) { $16 = 0; return ($16|0); } $10 = ($0|0)==(0); $11 = ($2|0)==(0); $or$cond = $10 | $11; $12 = HEAP32[(1103576)>>2]|0; $13 = ($12|0)==($0|0); $or$cond9 = $or$cond | $13; if ($or$cond9) { $16 = 1; return ($16|0); } $14 = HEAP32[(1103584)>>2]|0; $15 = ($14|0)==($2|0); $phitmp = $15&1; $16 = $phitmp; return ($16|0); } function _Physics_ActivateNeighbours($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $4 = ($0|0)>(0); if ($4) { $5 = (($3) + -1)|0; _Physics_Activate($5); } $6 = HEAP32[(1103576)>>2]|0; $7 = ($6|0)>($0|0); if ($7) { $8 = (($3) + 1)|0; _Physics_Activate($8); } $9 = ($2|0)>(0); if ($9) { $10 = HEAP32[(1103564)>>2]|0; $11 = (($3) - ($10))|0; _Physics_Activate($11); } $12 = HEAP32[(1103584)>>2]|0; $13 = ($12|0)>($2|0); if ($13) { $14 = HEAP32[(1103564)>>2]|0; $15 = (($14) + ($3))|0; _Physics_Activate($15); } $16 = ($1|0)>(0); if ($16) { $17 = HEAP32[(1103588)>>2]|0; $18 = (($3) - ($17))|0; _Physics_Activate($18); } $19 = HEAP32[(1103580)>>2]|0; $20 = ($19|0)>($1|0); if (!($20)) { return; } $21 = HEAP32[(1103588)>>2]|0; $22 = (($21) + ($3))|0; _Physics_Activate($22); return; } function _Physics_Activate($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[275888]|0; $2 = (($1) + ($0)|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (1766680 + ($4<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(0|0); if ($7) { return; } $8 = $3&255; FUNCTION_TABLE_vii[$6 & 255]($0,$8); return; } function _Physics_Init() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; _Event_Register((1796128),0,312); $0 = (_Options_GetBool(38202,1)|0); HEAP8[1766676] = $0; _TickQueue_Init(1770776); _TickQueue_Init(1770800); HEAP32[(1768776)>>2] = 93; HEAP32[(1768780)>>2] = 93; HEAP32[(1766728)>>2] = 93; HEAP32[(1766732)>>2] = 93; HEAP32[(1767752)>>2] = 93; HEAP32[(1767756)>>2] = 93; HEAP32[(1768752)>>2] = 94; HEAP32[(1767728)>>2] = 94; HEAP32[(1767716)>>2] = 95; HEAP32[(1767712)>>2] = 96; HEAP32[(1767852)>>2] = 97; HEAP32[(1767856)>>2] = 97; HEAP32[(1767864)>>2] = 98; HEAP32[(1767860)>>2] = 98; HEAP32[(1768768)>>2] = 99; HEAP32[(1768760)>>2] = 100; HEAP32[(1768804)>>2] = 101; HEAP32[(1769828)>>2] = 102; HEAP32[(1766712)>>2] = (100); HEAP32[(1766716)>>2] = (100); HEAP32[(1766720)>>2] = (99); $1 = HEAP32[(1768768)>>2]|0; HEAP32[(1766724)>>2] = $1; HEAP32[(1767736)>>2] = 103; HEAP32[(1767740)>>2] = 103; HEAP32[(1767744)>>2] = 104; HEAP32[(1767748)>>2] = 104; HEAP32[(1768904)>>2] = 105; HEAP32[(1768928)>>2] = 106; HEAP32[(1768912)>>2] = 107; return; } function _Physics_DoFalling($0,$1) { $0 = $0|0; $1 = $1|0; var $$037$lcssa = 0, $$03739 = 0, $$040 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103588)>>2]|0; $3 = ($2|0)>($0|0); if ($3) { return; } $4 = HEAP32[275888]|0; $5 = HEAP32[(1103588)>>2]|0; $$03739 = -1;$$040 = $0;$8 = $2; while(1) { $6 = (($$040) - ($8))|0; $9 = (($4) + ($6)|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==(0); $12 = $10 & -4; $13 = ($12<<24>>24)==(8); $or$cond = $11 | $13; if (!($or$cond)) { $$037$lcssa = $$03739; break; } $7 = ($6|0)<($5|0); if ($7) { $$037$lcssa = $6; break; } else { $$03739 = $6;$$040 = $6;$8 = $5; } } $14 = ($$037$lcssa|0)==(-1); if ($14) { return; } $15 = HEAP32[(1103564)>>2]|0; $16 = (($$037$lcssa|0) / ($15|0))&-1; $17 = Math_imul($16, $15)|0; $18 = (($$037$lcssa) - ($17))|0; $19 = HEAP32[(1103572)>>2]|0; $20 = (($16|0) / ($19|0))&-1; $21 = Math_imul($20, $19)|0; $22 = (($16) - ($21))|0; _Game_UpdateBlock($18,$20,$22,$1); $23 = HEAP32[(1103564)>>2]|0; $24 = (($0|0) / ($23|0))&-1; $25 = Math_imul($24, $23)|0; $26 = (($0) - ($25))|0; $27 = HEAP32[(1103572)>>2]|0; $28 = (($24|0) / ($27|0))&-1; $29 = Math_imul($28, $27)|0; $30 = (($24) - ($29))|0; _Game_UpdateBlock($26,$28,$30,0); _Physics_ActivateNeighbours($26,$28,$30,$0); return; } function _Physics_HandleSapling($0,$1) { $0 = $0|0; $1 = $1|0; var $$038 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 1248|0; $2 = sp + 96|0; $3 = sp; $4 = HEAP32[(1103564)>>2]|0; $5 = (($0|0) / ($4|0))&-1; $6 = Math_imul($5, $4)|0; $7 = (($0) - ($6))|0; $8 = HEAP32[(1103572)>>2]|0; $9 = (($5|0) / ($8|0))&-1; $10 = Math_imul($9, $8)|0; $11 = (($5) - ($10))|0; $12 = ($9|0)>(0); if (!($12)) { STACKTOP = sp;return; } $13 = HEAP32[275888]|0; $14 = HEAP32[(1103588)>>2]|0; $15 = (($0) - ($14))|0; $16 = (($13) + ($15)|0); $17 = HEAP8[$16>>0]|0; $phitmp = ($17<<24>>24)==(2); if (!($phitmp)) { STACKTOP = sp;return; } $18 = (_Random_Next(1084936,3)|0); $19 = (($18) + 5)|0; _Game_UpdateBlock($7,$9,$11,0); $20 = (_TreeGen_CanGrow($7,$9,$11,$19)|0); $21 = ($20<<24>>24)==(0); if ($21) { _Game_UpdateBlock($7,$9,$11,6); STACKTOP = sp;return; } $22 = (_TreeGen_Grow($7,$9,$11,$19,$2,$3)|0); $23 = ($22|0)>(0); if (!($23)) { STACKTOP = sp;return; } $$038 = 0; while(1) { $24 = (($2) + (($$038*12)|0)|0); $25 = HEAP32[$24>>2]|0; $26 = (((($2) + (($$038*12)|0)|0)) + 4|0); $27 = HEAP32[$26>>2]|0; $28 = (((($2) + (($$038*12)|0)|0)) + 8|0); $29 = HEAP32[$28>>2]|0; $30 = (($3) + ($$038)|0); $31 = HEAP8[$30>>0]|0; $32 = $31&255; _Game_UpdateBlock($25,$27,$29,$32); $33 = (($$038) + 1)|0; $exitcond = ($33|0)==($22|0); if ($exitcond) { break; } else { $$038 = $33; } } STACKTOP = sp;return; } function _Physics_HandleDirt($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = (($0|0) / ($2|0))&-1; $4 = Math_imul($3, $2)|0; $5 = (($0) - ($4))|0; $6 = HEAP32[(1103572)>>2]|0; $7 = (($3|0) / ($6|0))&-1; $8 = Math_imul($7, $6)|0; $9 = (($3) - ($8))|0; $10 = (_ClassicLighting_IsLit($5,$7,$9)|0); $11 = ($10<<24>>24)==(0); if ($11) { return; } _Game_UpdateBlock($5,$7,$9,2); return; } function _Physics_HandleGrass($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = (($0|0) / ($2|0))&-1; $4 = Math_imul($3, $2)|0; $5 = (($0) - ($4))|0; $6 = HEAP32[(1103572)>>2]|0; $7 = (($3|0) / ($6|0))&-1; $8 = Math_imul($7, $6)|0; $9 = (($3) - ($8))|0; $10 = (_ClassicLighting_IsLit($5,$7,$9)|0); $11 = ($10<<24>>24)==(0); if (!($11)) { return; } _Game_UpdateBlock($5,$7,$9,3); return; } function _Physics_HandleFlower($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $switch = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = (($0|0) / ($2|0))&-1; $4 = Math_imul($3, $2)|0; $5 = (($0) - ($4))|0; $6 = HEAP32[(1103572)>>2]|0; $7 = (($3|0) / ($6|0))&-1; $8 = Math_imul($7, $6)|0; $9 = (($3) - ($8))|0; $10 = (_ClassicLighting_IsLit($5,$7,$9)|0); $11 = ($10<<24>>24)==(0); if ($11) { _Game_UpdateBlock($5,$7,$9,0); _Physics_ActivateNeighbours($5,$7,$9,$0); return; } $12 = ($7|0)>(0); if (!($12)) { return; } $13 = HEAP32[275888]|0; $14 = HEAP32[(1103588)>>2]|0; $15 = (($0) - ($14))|0; $16 = (($13) + ($15)|0); $17 = HEAP8[$16>>0]|0; $18 = $17 & -2; $switch = ($18<<24>>24)==(2); if ($switch) { return; } _Game_UpdateBlock($5,$7,$9,0); _Physics_ActivateNeighbours($5,$7,$9,$0); return; } function _Physics_HandleMushroom($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = (($0|0) / ($2|0))&-1; $4 = Math_imul($3, $2)|0; $5 = (($0) - ($4))|0; $6 = HEAP32[(1103572)>>2]|0; $7 = (($3|0) / ($6|0))&-1; $8 = Math_imul($7, $6)|0; $9 = (($3) - ($8))|0; $10 = (_ClassicLighting_IsLit($5,$7,$9)|0); $11 = ($10<<24>>24)==(0); if (!($11)) { _Game_UpdateBlock($5,$7,$9,0); _Physics_ActivateNeighbours($5,$7,$9,$0); return; } $12 = ($7|0)>(0); if (!($12)) { return; } $13 = HEAP32[275888]|0; $14 = HEAP32[(1103588)>>2]|0; $15 = (($0) - ($14))|0; $16 = (($13) + ($15)|0); $17 = HEAP8[$16>>0]|0; switch ($17<<24>>24) { case 4: case 1: { return; } default: { } } _Game_UpdateBlock($5,$7,$9,0); _Physics_ActivateNeighbours($5,$7,$9,$0); return; } function _Physics_PlaceLava($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0 | -268435456; _TickQueue_Enqueue(1770776,$2); return; } function _Physics_PlaceWater($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0 | 671088640; _TickQueue_Enqueue(1770800,$2); return; } function _Physics_PlaceSponge($0,$1) { $0 = $0|0; $1 = $1|0; var $$03741 = 0, $$040 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, $switch = 0, $switch$1 = 0, $switch$2 = 0, $switch$3 = 0, $switch$4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = (($0|0) / ($2|0))&-1; $4 = Math_imul($3, $2)|0; $5 = (($0) - ($4))|0; $6 = HEAP32[(1103572)>>2]|0; $7 = (($3|0) / ($6|0))&-1; $8 = Math_imul($7, $6)|0; $9 = (($3) - ($8))|0; $10 = (($7) + -2)|0; $11 = (($7) + 2)|0; $12 = (($9) + -2)|0; $13 = (($9) + 2)|0; $14 = (($5) + -2)|0; $15 = (($5) + -1)|0; $16 = (($5) + 1)|0; $17 = (($5) + 2)|0; $$03741 = $10; while(1) { $$040 = $12; while(1) { $18 = (_World_Contains($14,$$03741,$$040)|0); $19 = ($18<<24>>24)==(0); if (!($19)) { $20 = (_World_GetBlock($14,$$03741,$$040)|0); $21 = $20 & -2; $switch = ($21<<16>>16)==(8); if ($switch) { _Game_UpdateBlock($14,$$03741,$$040,0); } } $26 = (_World_Contains($15,$$03741,$$040)|0); $27 = ($26<<24>>24)==(0); if (!($27)) { $28 = (_World_GetBlock($15,$$03741,$$040)|0); $29 = $28 & -2; $switch$1 = ($29<<16>>16)==(8); if ($switch$1) { _Game_UpdateBlock($15,$$03741,$$040,0); } } $30 = (_World_Contains($5,$$03741,$$040)|0); $31 = ($30<<24>>24)==(0); if (!($31)) { $32 = (_World_GetBlock($5,$$03741,$$040)|0); $33 = $32 & -2; $switch$2 = ($33<<16>>16)==(8); if ($switch$2) { _Game_UpdateBlock($5,$$03741,$$040,0); } } $34 = (_World_Contains($16,$$03741,$$040)|0); $35 = ($34<<24>>24)==(0); if (!($35)) { $36 = (_World_GetBlock($16,$$03741,$$040)|0); $37 = $36 & -2; $switch$3 = ($37<<16>>16)==(8); if ($switch$3) { _Game_UpdateBlock($16,$$03741,$$040,0); } } $38 = (_World_Contains($17,$$03741,$$040)|0); $39 = ($38<<24>>24)==(0); if (!($39)) { $40 = (_World_GetBlock($17,$$03741,$$040)|0); $41 = $40 & -2; $switch$4 = ($41<<16>>16)==(8); if ($switch$4) { _Game_UpdateBlock($17,$$03741,$$040,0); } } $22 = (($$040) + 1)|0; $23 = ($$040|0)<($13|0); if ($23) { $$040 = $22; } else { break; } } $24 = (($$03741) + 1)|0; $25 = ($$03741|0)<($11|0); if ($25) { $$03741 = $24; } else { break; } } return; } function _Physics_DeleteSponge($0,$1) { $0 = $0|0; $1 = $1|0; var $$04247 = 0, $$04344 = 0, $$046 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $switch = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = (($0|0) / ($2|0))&-1; $4 = Math_imul($3, $2)|0; $5 = (($0) - ($4))|0; $6 = HEAP32[(1103572)>>2]|0; $7 = (($3|0) / ($6|0))&-1; $8 = Math_imul($7, $6)|0; $9 = (($3) - ($8))|0; $10 = (($7) + -3)|0; $11 = (($7) + 3)|0; $12 = (($9) + -3)|0; $13 = (($9) + 3)|0; $14 = (($5) + -3)|0; $15 = (($5) + 3)|0; $$04247 = $10; while(1) { $16 = (($$04247) - ($7))|0; $$046 = $12; while(1) { $17 = (($$046) - ($9))|0; $$04344 = $14; while(1) { $18 = (_Math_AbsI($16)|0); $19 = ($18|0)==(3); if ($19) { label = 7; } else { $20 = (_Math_AbsI($17)|0); $21 = ($20|0)==(3); if ($21) { label = 7; } else { $22 = (($$04344) - ($5))|0; $23 = (_Math_AbsI($22)|0); $24 = ($23|0)==(3); if ($24) { label = 7; } } } if ((label|0) == 7) { label = 0; $25 = (_World_Contains($$04344,$$04247,$$046)|0); $26 = ($25<<24>>24)==(0); if (!($26)) { $27 = HEAP32[(1103572)>>2]|0; $28 = Math_imul($27, $$04247)|0; $29 = (($28) + ($$046))|0; $30 = HEAP32[(1103564)>>2]|0; $31 = Math_imul($29, $30)|0; $32 = (($31) + ($$04344))|0; $33 = HEAP32[275888]|0; $34 = (($33) + ($32)|0); $35 = HEAP8[$34>>0]|0; $36 = $35 & -2; $switch = ($36<<24>>24)==(8); if ($switch) { $37 = $32 | 134217728; _TickQueue_Enqueue(1770800,$37); } } } $38 = (($$04344) + 1)|0; $39 = ($$04344|0)<($15|0); if ($39) { $$04344 = $38; } else { break; } } $40 = (($$046) + 1)|0; $41 = ($$046|0)<($13|0); if ($41) { $$046 = $40; } else { break; } } $42 = (($$04247) + 1)|0; $43 = ($$04247|0)<($11|0); if ($43) { $$04247 = $42; } else { break; } } return; } function _Physics_ActivateWater($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = (($0|0) / ($2|0))&-1; $4 = Math_imul($3, $2)|0; $5 = (($0) - ($4))|0; $6 = HEAP32[(1103572)>>2]|0; $7 = (($3|0) / ($6|0))&-1; $8 = Math_imul($7, $6)|0; $9 = (($3) - ($8))|0; $10 = ($5|0)>(0); if ($10) { $11 = (($5) + -1)|0; $12 = (($0) + -1)|0; _Physics_PropagateWater($12,$11,$7,$9); } $13 = HEAP32[(1103576)>>2]|0; $14 = ($5|0)<($13|0); if ($14) { $15 = (($5) + 1)|0; $16 = (($0) + 1)|0; _Physics_PropagateWater($16,$15,$7,$9); } $17 = ($9|0)>(0); if ($17) { $18 = (($9) + -1)|0; $19 = HEAP32[(1103564)>>2]|0; $20 = (($0) - ($19))|0; _Physics_PropagateWater($20,$5,$7,$18); } $21 = HEAP32[(1103584)>>2]|0; $22 = ($9|0)<($21|0); if ($22) { $23 = (($9) + 1)|0; $24 = HEAP32[(1103564)>>2]|0; $25 = (($24) + ($0))|0; _Physics_PropagateWater($25,$5,$7,$23); } $26 = ($7|0)>(0); if (!($26)) { return; } $27 = (($7) + -1)|0; $28 = HEAP32[(1103588)>>2]|0; $29 = (($0) - ($28))|0; _Physics_PropagateWater($29,$5,$27,$9); return; } function _Physics_ActivateLava($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = (($0|0) / ($2|0))&-1; $4 = Math_imul($3, $2)|0; $5 = (($0) - ($4))|0; $6 = HEAP32[(1103572)>>2]|0; $7 = (($3|0) / ($6|0))&-1; $8 = Math_imul($7, $6)|0; $9 = (($3) - ($8))|0; $10 = ($5|0)>(0); if ($10) { $11 = (($5) + -1)|0; $12 = (($0) + -1)|0; _Physics_PropagateLava($12,$11,$7,$9); } $13 = HEAP32[(1103576)>>2]|0; $14 = ($5|0)<($13|0); if ($14) { $15 = (($5) + 1)|0; $16 = (($0) + 1)|0; _Physics_PropagateLava($16,$15,$7,$9); } $17 = ($9|0)>(0); if ($17) { $18 = (($9) + -1)|0; $19 = HEAP32[(1103564)>>2]|0; $20 = (($0) - ($19))|0; _Physics_PropagateLava($20,$5,$7,$18); } $21 = HEAP32[(1103584)>>2]|0; $22 = ($9|0)<($21|0); if ($22) { $23 = (($9) + 1)|0; $24 = HEAP32[(1103564)>>2]|0; $25 = (($24) + ($0))|0; _Physics_PropagateLava($25,$5,$7,$23); } $26 = ($7|0)>(0); if (!($26)) { return; } $27 = (($7) + -1)|0; $28 = HEAP32[(1103588)>>2]|0; $29 = (($0) - ($28))|0; _Physics_PropagateLava($29,$5,$27,$9); return; } function _Physics_HandleSlab($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = (($0|0) / ($2|0))&-1; $4 = Math_imul($3, $2)|0; $5 = (($0) - ($4))|0; $6 = HEAP32[(1103572)>>2]|0; $7 = (($3|0) / ($6|0))&-1; $8 = Math_imul($7, $6)|0; $9 = (($3) - ($8))|0; $10 = HEAP32[(1103588)>>2]|0; $11 = ($10|0)>($0|0); if ($11) { return; } $12 = HEAP32[275888]|0; $13 = (($0) - ($10))|0; $14 = (($12) + ($13)|0); $15 = HEAP8[$14>>0]|0; $16 = ($15<<24>>24)==(44); if (!($16)) { return; } $17 = (($7) + -1)|0; _Game_UpdateBlock($5,$7,$9,0); _Game_UpdateBlock($5,$17,$9,43); return; } function _Physics_HandleCobblestoneSlab($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = (($0|0) / ($2|0))&-1; $4 = Math_imul($3, $2)|0; $5 = (($0) - ($4))|0; $6 = HEAP32[(1103572)>>2]|0; $7 = (($3|0) / ($6|0))&-1; $8 = Math_imul($7, $6)|0; $9 = (($3) - ($8))|0; $10 = HEAP32[(1103588)>>2]|0; $11 = ($10|0)>($0|0); if ($11) { return; } $12 = HEAP32[275888]|0; $13 = (($0) - ($10))|0; $14 = (($12) + ($13)|0); $15 = HEAP8[$14>>0]|0; $16 = ($15<<24>>24)==(50); if (!($16)) { return; } $17 = (($7) + -1)|0; _Game_UpdateBlock($5,$7,$9,0); _Game_UpdateBlock($5,$17,$9,4); return; } function _Physics_HandleTnt($0,$1) { $0 = $0|0; $1 = $1|0; var $$06063 = 0, $$06164 = 0, $$062 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond65 = 0, $exitcond66 = 0; var label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = (($0|0) / ($2|0))&-1; $4 = Math_imul($3, $2)|0; $5 = (($0) - ($4))|0; $6 = HEAP32[(1103572)>>2]|0; $7 = (($3|0) / ($6|0))&-1; $8 = Math_imul($7, $6)|0; $9 = (($3) - ($8))|0; _Game_UpdateBlock($5,$7,$9,0); _Physics_ActivateNeighbours($5,$7,$9,$0); $$06164 = -4; while(1) { $10 = Math_imul($$06164, $$06164)|0; $11 = (($$06164) + ($7))|0; $$06063 = -4; while(1) { $12 = Math_imul($$06063, $$06063)|0; $13 = (($12) + ($10))|0; $14 = (($$06063) + ($9))|0; $$062 = -4; while(1) { $15 = Math_imul($$062, $$062)|0; $16 = (($13) + ($15))|0; $17 = ($16>>>0)>(16); if (!($17)) { $18 = (($$062) + ($5))|0; $19 = (_World_Contains($18,$11,$14)|0); $20 = ($19<<24>>24)==(0); if (!($20)) { $21 = HEAP32[(1103572)>>2]|0; $22 = Math_imul($21, $11)|0; $23 = (($22) + ($14))|0; $24 = HEAP32[(1103564)>>2]|0; $25 = Math_imul($23, $24)|0; $26 = (($25) + ($18))|0; $27 = HEAP32[275888]|0; $28 = (($27) + ($26)|0); $29 = HEAP8[$28>>0]|0; $30 = $29&255; $31 = (_BlocksTNT($30)|0); $32 = ($31<<24>>24)==(0); if ($32) { _Game_UpdateBlock($18,$11,$14,0); _Physics_ActivateNeighbours($18,$11,$14,$26); } } } $33 = (($$062) + 1)|0; $exitcond = ($33|0)==(5); if ($exitcond) { break; } else { $$062 = $33; } } $34 = (($$06063) + 1)|0; $exitcond65 = ($34|0)==(5); if ($exitcond65) { break; } else { $$06063 = $34; } } $35 = (($$06164) + 1)|0; $exitcond66 = ($35|0)==(5); if ($exitcond66) { break; } else { $$06164 = $35; } } return; } function _World_Contains($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1103564)>>2]|0; $4 = ($3>>>0)>($0>>>0); $5 = HEAP32[(1103568)>>2]|0; $6 = ($5>>>0)>($1>>>0); $or$cond = $4 & $6; $7 = HEAP32[(1103572)>>2]|0; $8 = ($7>>>0)>($2>>>0); $narrow = $or$cond & $8; $9 = $narrow&1; return ($9|0); } function _BlocksTNT($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = $0 & -4; $3 = ($2<<16>>16)==(8); if ($3) { $11 = 1; return ($11|0); } $4 = (1116180 + ($1)|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(2); if ($6) { $7 = (1121556 + ($1)|0); $8 = HEAP8[$7>>0]|0; $9 = $8 | 1; $10 = ($9<<24>>24)==(5); $spec$select = $10&1; return ($spec$select|0); } else { $11 = 0; return ($11|0); } } function _Physics_PropagateLava($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $switch = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[275888]|0; $5 = (($4) + ($0)|0); $6 = HEAP8[$5>>0]|0; $7 = $6 & -2; $switch = ($7<<24>>24)==(8); if ($switch) { _Game_UpdateBlock($1,$2,$3,1); return; } $8 = $6&255; $9 = (1115412 + ($8)|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==(0); if (!($11)) { return; } $12 = $0 | -268435456; _TickQueue_Enqueue(1770776,$12); _Game_UpdateBlock($1,$2,$3,10); return; } function _TickQueue_Enqueue($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 12|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = ($3|0)==($5|0); if ($6) { _TickQueue_Resize($0); } $7 = HEAP32[$0>>2]|0; $8 = ((($0)) + 20|0); $9 = HEAP32[$8>>2]|0; $10 = (($7) + ($9<<2)|0); HEAP32[$10>>2] = $1; $11 = HEAP32[$8>>2]|0; $12 = (($11) + 1)|0; $13 = ((($0)) + 8|0); $14 = HEAP32[$13>>2]|0; $15 = $12 & $14; HEAP32[$8>>2] = $15; $16 = HEAP32[$2>>2]|0; $17 = (($16) + 1)|0; HEAP32[$2>>2] = $17; return; } function _TickQueue_Resize($0) { $0 = $0|0; var $$030 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$store$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)>(536870910); if ($3) { _Chat_AddRaw(24863); _TickQueue_Clear($0); } $4 = HEAP32[$1>>2]|0; $5 = $4 << 1; $6 = ($5|0)>(32); $spec$store$select = $6 ? $5 : 32; $7 = (_Mem_Alloc($spec$store$select,4,24900)|0); $8 = ((($0)) + 12|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)>(0); if ($10) { $11 = ((($0)) + 16|0); $12 = ((($0)) + 8|0); $13 = HEAP32[$0>>2]|0; $$030 = 0; while(1) { $14 = HEAP32[$11>>2]|0; $15 = (($14) + ($$030))|0; $16 = HEAP32[$12>>2]|0; $17 = $15 & $16; $18 = (($13) + ($17<<2)|0); $19 = HEAP32[$18>>2]|0; $20 = (($7) + ($$030<<2)|0); HEAP32[$20>>2] = $19; $21 = (($$030) + 1)|0; $22 = HEAP32[$8>>2]|0; $23 = ($21|0)<($22|0); if ($23) { $$030 = $21; } else { break; } } } $24 = HEAP32[$0>>2]|0; _Mem_Free($24); HEAP32[$0>>2] = $7; HEAP32[$1>>2] = $spec$store$select; $25 = (($spec$store$select) + -1)|0; $26 = ((($0)) + 8|0); HEAP32[$26>>2] = $25; $27 = ((($0)) + 16|0); HEAP32[$27>>2] = 0; $28 = HEAP32[$8>>2]|0; $29 = ((($0)) + 20|0); HEAP32[$29>>2] = $28; return; } function _Physics_PropagateWater($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$04148 = 0, $$04243 = 0, $$044 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $7 = 0, $8 = 0, $9 = 0; var $or$cond = 0, $switch = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[275888]|0; $5 = (($4) + ($0)|0); $6 = HEAP8[$5>>0]|0; $7 = $6 & -2; $switch = ($7<<24>>24)==(10); if ($switch) { _Game_UpdateBlock($1,$2,$3,1); return; } $8 = $6&255; $9 = (1115412 + ($8)|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)!=(0); $12 = ($6<<24>>24)==(51); $or$cond = $12 | $11; if ($or$cond) { return; } $13 = ($2|0)<(2); $14 = (($2) + -2)|0; $15 = $13 ? 0 : $14; $16 = HEAP32[442707]|0; $17 = ($16|0)<($2|0); $18 = HEAP32[(1103580)>>2]|0; $19 = (($2) + 2)|0; $20 = $17 ? $18 : $19; $21 = ($15|0)>($20|0); L8: do { if (!($21)) { $22 = ($3|0)<(2); $23 = (($3) + -2)|0; $24 = $22 ? 0 : $23; $25 = HEAP32[442708]|0; $26 = ($25|0)<($3|0); $27 = HEAP32[(1103584)>>2]|0; $28 = (($3) + 2)|0; $29 = $26 ? $27 : $28; $30 = ($24|0)>($29|0); $31 = HEAP32[442707]|0; $32 = ($31|0)<($2|0); $33 = HEAP32[(1103580)>>2]|0; $34 = $32 ? $33 : $19; $35 = ($1|0)<(2); $36 = (($1) + -2)|0; $37 = $35 ? 0 : $36; $38 = HEAP32[442706]|0; $39 = ($38|0)<($1|0); $40 = HEAP32[(1103576)>>2]|0; $41 = (($1) + 2)|0; $42 = $39 ? $40 : $41; $43 = ($37|0)>($42|0); $44 = HEAP32[442708]|0; $45 = ($44|0)<($3|0); $46 = HEAP32[(1103584)>>2]|0; $47 = $45 ? $46 : $28; $48 = HEAP32[442706]|0; $49 = ($48|0)<($1|0); $50 = HEAP32[(1103576)>>2]|0; $51 = $49 ? $50 : $41; $$04148 = $15; L10: while(1) { if (!($30)) { $$044 = $24; while(1) { if (!($43)) { $$04243 = $37; while(1) { $54 = (_World_GetBlock($$04243,$$04148,$$044)|0); $55 = ($54<<16>>16)==(19); if ($55) { break L10; } $52 = (($$04243) + 1)|0; $53 = ($$04243|0)<($51|0); if ($53) { $$04243 = $52; } else { break; } } } $56 = (($$044) + 1)|0; $57 = ($$044|0)<($47|0); if ($57) { $$044 = $56; } else { break; } } } $58 = (($$04148) + 1)|0; $59 = ($$04148|0)<($34|0); if ($59) { $$04148 = $58; } else { break L8; } } return; } } while(0); $60 = $0 | 671088640; _TickQueue_Enqueue(1770800,$60); _Game_UpdateBlock($1,$2,$3,8); return; } function _World_GetBlock($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $3 = HEAP32[(1103572)>>2]|0; $4 = Math_imul($3, $1)|0; $5 = (($4) + ($2))|0; $6 = HEAP32[(1103564)>>2]|0; $7 = Math_imul($5, $6)|0; $8 = (($7) + ($0))|0; $9 = HEAP32[275888]|0; $10 = (($9) + ($8)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = HEAP32[(1103556)>>2]|0; $14 = (($13) + ($8)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 8; $18 = $17 | $12; $19 = HEAP32[(1103608)>>2]|0; $20 = $18 & $19; $21 = $20&65535; return ($21|0); } function _Physics_Free() { var label = 0, sp = 0; sp = STACKTOP; _Event_Unregister((1796128),0,312); return; } function _Physics_Tick() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1766676]|0; $1 = ($0<<24>>24)!=(0); $2 = HEAP32[275888]|0; $3 = ($2|0)!=(0|0); $or$cond = $1 & $3; if (!($or$cond)) { return; } _Physics_TickLava(); _Physics_TickWater(); $4 = HEAP32[442709]|0; $5 = (($4) + 1)|0; HEAP32[442709] = $5; _Physics_TickRandomBlocks(); return; } function _Physics_TickLava() { var $$01314 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $switch = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; $1 = HEAP32[(1770788)>>2]|0; $2 = ($1|0)>(0); if (!($2)) { STACKTOP = sp;return; } $$01314 = 0; while(1) { $3 = (_Physics_CheckItem(1770776,$0)|0); $4 = ($3<<24>>24)==(0); if (!($4)) { $5 = HEAP32[275888]|0; $6 = HEAP32[$0>>2]|0; $7 = (($5) + ($6)|0); $8 = HEAP8[$7>>0]|0; $9 = $8 & -2; $switch = ($9<<24>>24)==(10); if ($switch) { $10 = $8&255; _Physics_ActivateLava($6,$10); } } $11 = (($$01314) + 1)|0; $exitcond = ($11|0)==($1|0); if ($exitcond) { break; } else { $$01314 = $11; } } STACKTOP = sp;return; } function _Physics_TickWater() { var $$01314 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $switch = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; $1 = HEAP32[(1770812)>>2]|0; $2 = ($1|0)>(0); if (!($2)) { STACKTOP = sp;return; } $$01314 = 0; while(1) { $3 = (_Physics_CheckItem(1770800,$0)|0); $4 = ($3<<24>>24)==(0); if (!($4)) { $5 = HEAP32[275888]|0; $6 = HEAP32[$0>>2]|0; $7 = (($5) + ($6)|0); $8 = HEAP8[$7>>0]|0; $9 = $8 & -2; $switch = ($9<<24>>24)==(8); if ($switch) { $10 = $8&255; _Physics_ActivateWater($6,$10); } } $11 = (($$01314) + 1)|0; $exitcond = ($11|0)==($1|0); if ($exitcond) { break; } else { $$01314 = $11; } } STACKTOP = sp;return; } function _Physics_TickRandomBlocks() { var $$06270 = 0, $$06364 = 0, $$065 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1103568)>>2]|0; $1 = ($0|0)>(0); if (!($1)) { return; } $$06270 = 0; while(1) { $2 = $$06270 | 15; $3 = HEAP32[(1103580)>>2]|0; $4 = ($2|0)<($3|0); $5 = $4 ? $2 : $3; $6 = HEAP32[(1103572)>>2]|0; $7 = ($6|0)>(0); if ($7) { $$065 = 0; while(1) { $8 = $$065 | 15; $9 = HEAP32[(1103584)>>2]|0; $10 = ($8|0)<($9|0); $11 = $10 ? $8 : $9; $12 = HEAP32[(1103564)>>2]|0; $13 = ($12|0)>(0); if ($13) { $$06364 = 0;$22 = $12; while(1) { $14 = $$06364 | 15; $15 = HEAP32[(1103576)>>2]|0; $16 = ($14|0)<($15|0); $17 = $16 ? $14 : $15; $18 = HEAP32[(1103572)>>2]|0; $19 = Math_imul($18, $$06270)|0; $20 = (($19) + ($$065))|0; $21 = Math_imul($20, $22)|0; $23 = (($21) + ($$06364))|0; $24 = Math_imul($18, $5)|0; $25 = (($24) + ($11))|0; $26 = Math_imul($25, $22)|0; $27 = (($26) + ($17))|0; $28 = (_Random_Range($23,$27)|0); $29 = HEAP32[275888]|0; $30 = (($29) + ($28)|0); $31 = HEAP8[$30>>0]|0; $32 = $31&255; $33 = (1767704 + ($32<<2)|0); $34 = HEAP32[$33>>2]|0; $35 = ($34|0)==(0|0); if (!($35)) { $36 = $31&255; FUNCTION_TABLE_vii[$34 & 255]($28,$36); } $37 = (_Random_Range($23,$27)|0); $38 = HEAP32[275888]|0; $39 = (($38) + ($37)|0); $40 = HEAP8[$39>>0]|0; $41 = $40&255; $42 = (1767704 + ($41<<2)|0); $43 = HEAP32[$42>>2]|0; $44 = ($43|0)==(0|0); if (!($44)) { $45 = $40&255; FUNCTION_TABLE_vii[$43 & 255]($37,$45); } $46 = (_Random_Range($23,$27)|0); $47 = HEAP32[275888]|0; $48 = (($47) + ($46)|0); $49 = HEAP8[$48>>0]|0; $50 = $49&255; $51 = (1767704 + ($50<<2)|0); $52 = HEAP32[$51>>2]|0; $53 = ($52|0)==(0|0); if (!($53)) { $54 = $49&255; FUNCTION_TABLE_vii[$52 & 255]($46,$54); } $55 = (($$06364) + 16)|0; $56 = HEAP32[(1103564)>>2]|0; $57 = ($55|0)<($56|0); if ($57) { $$06364 = $55;$22 = $56; } else { break; } } } $58 = (($$065) + 16)|0; $59 = HEAP32[(1103572)>>2]|0; $60 = ($58|0)<($59|0); if ($60) { $$065 = $58; } else { break; } } } $61 = (($$06270) + 16)|0; $62 = HEAP32[(1103568)>>2]|0; $63 = ($61|0)<($62|0); if ($63) { $$06270 = $61; } else { break; } } return; } function _Random_Range($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (($1) - ($0))|0; $3 = (_Random_Next(1084936,$2)|0); $4 = (($3) + ($0))|0; return ($4|0); } function _Physics_CheckItem($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_TickQueue_Dequeue($0)|0); $3 = $2 & 134217727; HEAP32[$1>>2] = $3; $4 = ($2>>>0)>(134217727); if (!($4)) { $$0 = 1; return ($$0|0); } $5 = (($2) + -134217728)|0; _TickQueue_Enqueue($0,$5); $$0 = 0; return ($$0|0); } function _TickQueue_Dequeue($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[$0>>2]|0; $2 = ((($0)) + 16|0); $3 = HEAP32[$2>>2]|0; $4 = (($1) + ($3<<2)|0); $5 = HEAP32[$4>>2]|0; $6 = (($3) + 1)|0; $7 = ((($0)) + 8|0); $8 = HEAP32[$7>>2]|0; $9 = $8 & $6; HEAP32[$2>>2] = $9; $10 = ((($0)) + 12|0); $11 = HEAP32[$10>>2]|0; $12 = (($11) + -1)|0; HEAP32[$10>>2] = $12; return ($5|0); } function _OnInit_140() { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[476] = -1; HEAP32[(1908)>>2] = 1; HEAP32[(1912)>>2] = -18; HEAP32[(1916)>>2] = 18; HEAP32[(1920)>>2] = -324; HEAP32[(1924)>>2] = 324; $0 = HEAP8[1972839]|0; $1 = ($0<<24>>24)==(0); if (!($1)) { _Builder_ApplyActive(); return; } $2 = (_Options_GetBool(39674,0)|0); HEAP8[1972814] = $2; _Builder_ApplyActive(); return; } function _OnNewMapLoaded() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1972148)>>2]|0; $1 = HEAP32[(1972152)>>2]|0; $2 = (($1) + ($0))|0; $3 = ($2|0)>(0); $spec$select = $3 ? $2 : 0; HEAP32[442710] = $spec$select; $4 = ($0|0)>(0); $5 = $4 ? $0 : 0; HEAP32[442711] = $5; return; } function _Builder_ApplyActive() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1972814]|0; $1 = ($0<<24>>24)==(0); if ($1) { _NormalBuilder_SetActive(); return; } else { _AdvBuilder_SetActive(); return; } } function _AdvBuilder_SetActive() { var label = 0, sp = 0; sp = STACKTOP; _Builder_SetDefault(); HEAP32[442712] = 1; HEAP32[442713] = 1; HEAP32[442714] = 2; HEAP32[442715] = 25; HEAP32[442724] = 78; return; } function _NormalBuilder_SetActive() { var label = 0, sp = 0; sp = STACKTOP; _Builder_SetDefault(); HEAP32[442712] = 2; HEAP32[442713] = 3; HEAP32[442714] = 4; HEAP32[442715] = 26; return; } function _Builder_SetDefault() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[442712] = 0; HEAP32[442713] = 0; HEAP32[442714] = 0; HEAP32[442715] = 0; HEAP32[442724] = 79; return; } function _NormalBuilder_StretchXLiquid($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$0 = 0, $$024$lcssa = 0, $$02432 = 0, $$02533 = 0, $$02533$in = 0, $$02634 = 0, $$02634$in = 0, $$027 = 0, $$02730 = 0, $$02735 = 0, $$lobit = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; var $19 = 0, $20 = 0, $21 = 0, $22 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond31 = 0, label = 0, sp = 0; sp = STACKTOP; $6 = (_Builder_OccludedLiquid($4)|0); $7 = ($6<<24>>24)==(0); if (!($7)) { $$0 = 0; return ($$0|0); } $8 = $5&65535; $9 = (1762836 + ($8)|0); $10 = HEAP8[$9>>0]|0; $$lobit = $10 & 32; $$02730 = (($1) + 1)|0; $11 = HEAP32[442723]|0; $12 = ($$02730|0)>=($11|0); $13 = ($$lobit<<24>>24)==(0); $or$cond31 = $13 | $12; L4: do { if ($or$cond31) { $$024$lcssa = 1; } else { $$02432 = 1;$$02533$in = $0;$$02634$in = $4;$$02735 = $$02730; while(1) { $$02533 = (($$02533$in) + 6)|0; $$02634 = (($$02634$in) + 1)|0; $14 = (_Normal_CanStretch($5,$$02634,$$02735,$2,$3,5)|0); $15 = ($14<<24>>24)==(0); if ($15) { $$024$lcssa = $$02432; break L4; } $16 = (_Builder_OccludedLiquid($$02634)|0); $17 = ($16<<24>>24)==(0); if (!($17)) { $$024$lcssa = $$02432; break L4; } $18 = HEAP32[442716]|0; $19 = (($18) + ($$02533)|0); HEAP8[$19>>0] = 0; $20 = (($$02432) + 1)|0; $$027 = (($$02735) + 1)|0; $21 = HEAP32[442723]|0; $22 = ($$027|0)>=($21|0); $or$cond = $13 | $22; if ($or$cond) { $$024$lcssa = $20; break; } else { $$02432 = $20;$$02533$in = $$02533;$$02634$in = $$02634;$$02735 = $$027; } } } } while(0); _AddVertices($5,5); $$0 = $$024$lcssa; return ($$0|0); } function _NormalBuilder_StretchX($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; var $$023$lcssa = 0, $$02330 = 0, $$024 = 0, $$02427 = 0, $$02432 = 0, $$02533 = 0, $$02533$in = 0, $$031 = 0, $$031$in = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0; var $21 = 0, $22 = 0, $23 = 0, $7 = 0, $8 = 0, $9 = 0, $brmerge = 0, $brmerge29 = 0, label = 0, sp = 0; sp = STACKTOP; $7 = $5&65535; $8 = (1762836 + ($7)|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = $6&255; $12 = 1 << $11; $13 = $12 & $10; $14 = ($13|0)==(0); $$02427 = (($1) + 1)|0; $15 = HEAP32[442723]|0; $16 = ($$02427|0)>=($15|0); $brmerge29 = $14 | $16; if ($brmerge29) { $$023$lcssa = 1; _AddVertices($5,$6); return ($$023$lcssa|0); } $$02330 = 1;$$02432 = $$02427;$$02533$in = $4;$$031$in = $0; while(1) { $$031 = (($$031$in) + 6)|0; $$02533 = (($$02533$in) + 1)|0; $17 = (_Normal_CanStretch($5,$$02533,$$02432,$2,$3,$6)|0); $18 = ($17<<24>>24)==(0); if ($18) { $$023$lcssa = $$02330; label = 5; break; } $19 = HEAP32[442716]|0; $20 = (($19) + ($$031)|0); HEAP8[$20>>0] = 0; $21 = (($$02330) + 1)|0; $$024 = (($$02432) + 1)|0; $22 = HEAP32[442723]|0; $23 = ($$024|0)>=($22|0); $brmerge = $14 | $23; if ($brmerge) { $$023$lcssa = $21; label = 5; break; } else { $$02330 = $21;$$02432 = $$024;$$02533$in = $$02533;$$031$in = $$031; } } if ((label|0) == 5) { _AddVertices($5,$6); return ($$023$lcssa|0); } return (0)|0; } function _NormalBuilder_StretchZ($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; var $$023$lcssa = 0, $$02330 = 0, $$024 = 0, $$02427 = 0, $$02432 = 0, $$02533 = 0, $$02533$in = 0, $$031 = 0, $$031$in = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0; var $21 = 0, $22 = 0, $23 = 0, $7 = 0, $8 = 0, $9 = 0, $brmerge = 0, $brmerge29 = 0, label = 0, sp = 0; sp = STACKTOP; $7 = $5&65535; $8 = (1762836 + ($7)|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = $6&255; $12 = 1 << $11; $13 = $12 & $10; $14 = ($13|0)==(0); $$02427 = (($3) + 1)|0; $15 = HEAP32[442718]|0; $16 = ($$02427|0)>=($15|0); $brmerge29 = $14 | $16; if ($brmerge29) { $$023$lcssa = 1; _AddVertices($5,$6); return ($$023$lcssa|0); } $$02330 = 1;$$02432 = $$02427;$$02533$in = $4;$$031$in = $0; while(1) { $$031 = (($$031$in) + 96)|0; $$02533 = (($$02533$in) + 18)|0; $17 = (_Normal_CanStretch($5,$$02533,$1,$2,$$02432,$6)|0); $18 = ($17<<24>>24)==(0); if ($18) { $$023$lcssa = $$02330; label = 5; break; } $19 = HEAP32[442716]|0; $20 = (($19) + ($$031)|0); HEAP8[$20>>0] = 0; $21 = (($$02330) + 1)|0; $$024 = (($$02432) + 1)|0; $22 = HEAP32[442718]|0; $23 = ($$024|0)>=($22|0); $brmerge = $14 | $23; if ($brmerge) { $$023$lcssa = $21; label = 5; break; } else { $$02330 = $21;$$02432 = $$024;$$02533$in = $$02533;$$031$in = $$031; } } if ((label|0) == 5) { _AddVertices($5,$6); return ($$023$lcssa|0); } return (0)|0; } function _NormalBuilder_RenderBlock($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$076$0$$sroa_idx = 0, $$sroa$076$0$copyload = 0.0, $$sroa$4$0$$sroa_idx72 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$478$0$$sroa_idx79 = 0, $$sroa$478$0$copyload = 0.0, $$sroa$5$0$$sroa_idx74 = 0, $$sroa$5$0$copyload = 0.0, $$sroa$581$0$$sroa_idx82 = 0, $$sroa$581$0$copyload = 0.0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0; var $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0; var $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0; var $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0; var $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0; var $18 = 0, $180 = 0, $181 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0; var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0; var $54 = 0.0, $55 = 0.0, $56 = 0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0; var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0; var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP16[986400]|0; $5 = $4&65535; $6 = (1120788 + ($5)|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(5); if ($8) { _Builder_DrawSprite($1,$2,$3); return; } $9 = HEAP32[442716]|0; $10 = (($9) + ($0)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = (($0) + 1)|0; $14 = (($9) + ($13)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = (($0) + 2)|0; $18 = (($9) + ($17)|0); $19 = HEAP8[$18>>0]|0; $20 = $19&255; $21 = (($0) + 3)|0; $22 = (($9) + ($21)|0); $23 = HEAP8[$22>>0]|0; $24 = $23&255; $25 = (($0) + 4)|0; $26 = (($9) + ($25)|0); $27 = HEAP8[$26>>0]|0; $28 = $27&255; $29 = (($0) + 5)|0; $30 = (($9) + ($29)|0); $31 = HEAP8[$30>>0]|0; $32 = $31&255; $33 = ($15<<24>>24)==(0); $34 = $15 | $11; $35 = ($19<<24>>24)==(0); $36 = $34 | $19; $37 = ($23<<24>>24)==(0); $38 = $36 | $23; $39 = ($27<<24>>24)==(0); $40 = $38 | $27; $41 = ($31<<24>>24)==(0); $42 = $40 | $31; $43 = ($42<<24>>24)==(0); if ($43) { return; } $44 = ($11<<24>>24)==(0); $45 = (1108500 + ($5)|0); $46 = HEAP8[$45>>0]|0; $47 = ($7<<24>>24)==(3); $48 = $47&1; $49 = $48 << 9; $50 = (1120020 + ($5)|0); $51 = HEAP8[$50>>0]|0; $52 = $51&255; $53 = (1125396 + (($5*12)|0)|0); ;HEAP32[(1781656)>>2]=HEAP32[$53>>2]|0;HEAP32[(1781656)+4>>2]=HEAP32[$53+4>>2]|0;HEAP32[(1781656)+8>>2]=HEAP32[$53+8>>2]|0; $54 = +HEAPF32[(1781660)>>2]; $55 = 1.0 - $54; HEAPF32[(1781660)>>2] = $55; $56 = (1134612 + (($5*12)|0)|0); ;HEAP32[(1781668)>>2]=HEAP32[$56>>2]|0;HEAP32[(1781668)+4>>2]=HEAP32[$56+4>>2]|0;HEAP32[(1781668)+8>>2]=HEAP32[$56+8>>2]|0; $57 = +HEAPF32[(1781672)>>2]; $58 = 1.0 - $57; HEAPF32[(1781672)>>2] = $58; $$sroa$076$0$$sroa_idx = (1143828 + (($5*12)|0)|0); $$sroa$076$0$copyload = +HEAPF32[$$sroa$076$0$$sroa_idx>>2]; $$sroa$478$0$$sroa_idx79 = (((1143828 + (($5*12)|0)|0)) + 4|0); $$sroa$478$0$copyload = +HEAPF32[$$sroa$478$0$$sroa_idx79>>2]; $$sroa$581$0$$sroa_idx82 = (((1143828 + (($5*12)|0)|0)) + 8|0); $$sroa$581$0$copyload = +HEAPF32[$$sroa$581$0$$sroa_idx82>>2]; $$sroa$0$0$$sroa_idx = (1153044 + (($5*12)|0)|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$4$0$$sroa_idx72 = (((1153044 + (($5*12)|0)|0)) + 4|0); $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx72>>2]; $$sroa$5$0$$sroa_idx74 = (((1153044 + (($5*12)|0)|0)) + 8|0); $$sroa$5$0$copyload = +HEAPF32[$$sroa$5$0$$sroa_idx74>>2]; $59 = (+($1|0)); $60 = $$sroa$076$0$copyload + $59; HEAPF32[(1781680)>>2] = $60; $61 = (+($2|0)); $62 = $$sroa$478$0$copyload + $61; HEAPF32[(1781684)>>2] = $62; $63 = (+($3|0)); $64 = $$sroa$581$0$copyload + $63; HEAPF32[(1781688)>>2] = $64; $65 = $$sroa$0$0$copyload + $59; HEAPF32[(1781692)>>2] = $65; $66 = $$sroa$4$0$copyload + $61; HEAPF32[(1781696)>>2] = $66; $67 = $$sroa$5$0$copyload + $63; HEAPF32[(1781700)>>2] = $67; $68 = (1123092 + ($5)|0); $69 = HEAP8[$68>>0]|0; HEAP8[1781648] = $69; $70 = (1109268 + ($5<<2)|0); $71 = HEAP32[$70>>2]|0; HEAP32[(1781652)>>2] = $71; if (!($44)) { $72 = ($5*6)|0; $73 = (1162260 + ($72<<1)|0); $74 = HEAP16[$73>>1]|0; $75 = $52 & 1; $76 = $74&65535; $77 = HEAP32[(1949304)>>2]|0; $78 = ($77)?($76 >>> $77):($76); $79 = (($78) + ($49))|0; $80 = ($46<<24>>24)==(0); do { if ($80) { $81 = ($75|0)>($1|0); if ($81) { $84 = HEAP32[(1972208)>>2]|0; $86 = $84; break; } else { $82 = (($1) - ($75))|0; $83 = (_ClassicLighting_Color_XSide_Fast($82,$2,$3)|0); $86 = $83; break; } } else { $86 = -1; } } while(0); $85 = (103264 + (($79*60)|0)|0); _Drawer_XMin($12,$86,$74,$85); } if (!($33)) { $87 = HEAP16[986400]|0; $88 = $87&65535; $89 = ($88*6)|0; $90 = $89 | 1; $91 = (1162260 + ($90<<1)|0); $92 = HEAP16[$91>>1]|0; $93 = (1)?($52 >>> 1):($52); $94 = $93 & 1; $95 = $92&65535; $96 = HEAP32[(1949304)>>2]|0; $97 = ($96)?($95 >>> $96):($95); $98 = (($97) + ($49))|0; $99 = ($46<<24>>24)==(0); do { if ($99) { $100 = HEAP32[(1103576)>>2]|0; $101 = (($100) - ($94))|0; $102 = ($101|0)<($1|0); if ($102) { $105 = HEAP32[(1972208)>>2]|0; $107 = $105; break; } else { $103 = (($94) + ($1))|0; $104 = (_ClassicLighting_Color_XSide_Fast($103,$2,$3)|0); $107 = $104; break; } } else { $107 = -1; } } while(0); $106 = (((103264 + (($98*60)|0)|0)) + 4|0); _Drawer_XMax($16,$107,$92,$106); } if (!($35)) { $108 = HEAP16[986400]|0; $109 = $108&65535; $110 = ($109*6)|0; $111 = (($110) + 2)|0; $112 = (1162260 + ($111<<1)|0); $113 = HEAP16[$112>>1]|0; $114 = (2)?($52 >>> 2):($52); $115 = $114 & 1; $116 = $113&65535; $117 = HEAP32[(1949304)>>2]|0; $118 = ($117)?($116 >>> $117):($116); $119 = (($118) + ($49))|0; $120 = ($46<<24>>24)==(0); do { if ($120) { $121 = ($115|0)>($3|0); if ($121) { $124 = HEAP32[(1972212)>>2]|0; $126 = $124; break; } else { $122 = (($3) - ($115))|0; $123 = (_ClassicLighting_Color_ZSide_Fast($1,$2,$122)|0); $126 = $123; break; } } else { $126 = -1; } } while(0); $125 = (((103264 + (($119*60)|0)|0)) + 8|0); _Drawer_ZMin($20,$126,$113,$125); } if (!($37)) { $127 = HEAP16[986400]|0; $128 = $127&65535; $129 = ($128*6)|0; $130 = (($129) + 3)|0; $131 = (1162260 + ($130<<1)|0); $132 = HEAP16[$131>>1]|0; $133 = (3)?($52 >>> 3):($52); $134 = $133 & 1; $135 = $132&65535; $136 = HEAP32[(1949304)>>2]|0; $137 = ($136)?($135 >>> $136):($135); $138 = (($137) + ($49))|0; $139 = ($46<<24>>24)==(0); do { if ($139) { $140 = HEAP32[(1103584)>>2]|0; $141 = (($140) - ($134))|0; $142 = ($141|0)<($3|0); if ($142) { $145 = HEAP32[(1972212)>>2]|0; $147 = $145; break; } else { $143 = (($134) + ($3))|0; $144 = (_ClassicLighting_Color_ZSide_Fast($1,$2,$143)|0); $147 = $144; break; } } else { $147 = -1; } } while(0); $146 = (((103264 + (($138*60)|0)|0)) + 12|0); _Drawer_ZMax($24,$147,$132,$146); } if (!($39)) { $148 = HEAP16[986400]|0; $149 = $148&65535; $150 = ($149*6)|0; $151 = (($150) + 4)|0; $152 = (1162260 + ($151<<1)|0); $153 = HEAP16[$152>>1]|0; $154 = $153&65535; $155 = HEAP32[(1949304)>>2]|0; $156 = ($155)?($154 >>> $155):($154); $157 = (($156) + ($49))|0; $158 = ($46<<24>>24)==(0); if ($158) { $159 = (4)?($52 >>> 4):($52); $160 = $159 & 1; $161 = (($2) - ($160))|0; $162 = (_ClassicLighting_Color_YMin_Fast($1,$161,$3)|0); $164 = $162; } else { $164 = -1; } $163 = (((103264 + (($157*60)|0)|0)) + 16|0); _Drawer_YMin($28,$164,$153,$163); } if ($41) { return; } $165 = HEAP16[986400]|0; $166 = $165&65535; $167 = ($166*6)|0; $168 = (($167) + 5)|0; $169 = (1162260 + ($168<<1)|0); $170 = HEAP16[$169>>1]|0; $171 = $170&65535; $172 = HEAP32[(1949304)>>2]|0; $173 = ($172)?($171 >>> $172):($171); $174 = (($173) + ($49))|0; $175 = ($46<<24>>24)==(0); if ($175) { $176 = (5)?($52 >>> 5):($52); $177 = $176 & 1; $178 = (($177) + ($2))|0; $179 = (_ClassicLighting_Color_YMax_Fast($1,$178,$3)|0); $181 = $179; } else { $181 = -1; } $180 = (((103264 + (($174*60)|0)|0)) + 20|0); _Drawer_YMax($32,$181,$170,$180); return; } function _Builder_DrawSprite($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0.0, $$0317 = 0.0, $$0318 = 0.0, $$0319 = 0.0, $$0320 = 0.0, $$0321 = 0.0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$$sroa_idx111 = 0, $$sroa$0$0$$sroa_idx113 = 0, $$sroa$0$0$$sroa_idx115 = 0, $$sroa$0$0$$sroa_idx117 = 0, $$sroa$0$0$$sroa_idx119 = 0, $$sroa$0$0$$sroa_idx121 = 0, $$sroa$0$0$$sroa_idx123 = 0, $$sroa$0$0$$sroa_idx125 = 0, $$sroa$0$0$$sroa_idx127 = 0, $$sroa$0$0$$sroa_idx130 = 0, $$sroa$0$0$$sroa_idx132 = 0, $$sroa$0$0$$sroa_idx134 = 0, $$sroa$0$0$$sroa_idx136 = 0; var $$sroa$0$0$$sroa_idx138 = 0, $$sroa$0$0$$sroa_idx140 = 0, $$sroa$26$0$$sroa_idx142 = 0, $$sroa$26$0$$sroa_idx143 = 0, $$sroa$26$0$$sroa_idx145 = 0, $$sroa$26$0$$sroa_idx147 = 0, $$sroa$26$0$$sroa_idx149 = 0, $$sroa$26$0$$sroa_idx151 = 0, $$sroa$26$0$$sroa_idx153 = 0, $$sroa$26$0$$sroa_idx155 = 0, $$sroa$26$0$$sroa_idx157 = 0, $$sroa$26$0$$sroa_idx159 = 0, $$sroa$26$0$$sroa_idx162 = 0, $$sroa$26$0$$sroa_idx164 = 0, $$sroa$26$0$$sroa_idx166 = 0, $$sroa$26$0$$sroa_idx168 = 0, $$sroa$26$0$$sroa_idx170 = 0, $$sroa$26$0$$sroa_idx172 = 0, $$sroa$38$0$$sroa_idx174 = 0, $$sroa$38$0$$sroa_idx175 = 0; var $$sroa$38$0$$sroa_idx177 = 0, $$sroa$38$0$$sroa_idx179 = 0, $$sroa$38$0$$sroa_idx181 = 0, $$sroa$38$0$$sroa_idx183 = 0, $$sroa$38$0$$sroa_idx185 = 0, $$sroa$38$0$$sroa_idx187 = 0, $$sroa$38$0$$sroa_idx189 = 0, $$sroa$38$0$$sroa_idx191 = 0, $$sroa$38$0$$sroa_idx194 = 0, $$sroa$38$0$$sroa_idx196 = 0, $$sroa$38$0$$sroa_idx198 = 0, $$sroa$38$0$$sroa_idx200 = 0, $$sroa$38$0$$sroa_idx202 = 0, $$sroa$38$0$$sroa_idx204 = 0, $$sroa$46$0 = 0, $$sroa$46$0$$sroa_idx206 = 0, $$sroa$46$0$$sroa_idx207 = 0, $$sroa$46$0$$sroa_idx209 = 0, $$sroa$46$0$$sroa_idx211 = 0, $$sroa$46$0$$sroa_idx213 = 0; var $$sroa$46$0$$sroa_idx215 = 0, $$sroa$46$0$$sroa_idx217 = 0, $$sroa$46$0$$sroa_idx219 = 0, $$sroa$46$0$$sroa_idx221 = 0, $$sroa$46$0$$sroa_idx223 = 0, $$sroa$46$0$$sroa_idx226 = 0, $$sroa$46$0$$sroa_idx228 = 0, $$sroa$46$0$$sroa_idx230 = 0, $$sroa$46$0$$sroa_idx232 = 0, $$sroa$46$0$$sroa_idx234 = 0, $$sroa$46$0$$sroa_idx236 = 0, $$sroa$49$0$$sroa_idx238 = 0, $$sroa$49$0$$sroa_idx239 = 0, $$sroa$49$0$$sroa_idx241 = 0, $$sroa$49$0$$sroa_idx243 = 0, $$sroa$49$0$$sroa_idx245 = 0, $$sroa$49$0$$sroa_idx247 = 0, $$sroa$49$0$$sroa_idx249 = 0, $$sroa$49$0$$sroa_idx251 = 0, $$sroa$49$0$$sroa_idx253 = 0; var $$sroa$49$0$$sroa_idx255 = 0, $$sroa$49$0$$sroa_idx258 = 0, $$sroa$49$0$$sroa_idx260 = 0, $$sroa$49$0$$sroa_idx262 = 0, $$sroa$49$0$$sroa_idx264 = 0, $$sroa$49$0$$sroa_idx266 = 0, $$sroa$49$0$$sroa_idx268 = 0, $$sroa$57$0$$sroa_idx270 = 0, $$sroa$57$0$$sroa_idx271 = 0, $$sroa$57$0$$sroa_idx273 = 0, $$sroa$57$0$$sroa_idx275 = 0, $$sroa$57$0$$sroa_idx277 = 0, $$sroa$57$0$$sroa_idx279 = 0, $$sroa$57$0$$sroa_idx281 = 0, $$sroa$57$0$$sroa_idx283 = 0, $$sroa$57$0$$sroa_idx285 = 0, $$sroa$57$0$$sroa_idx287 = 0, $$sroa$57$0$$sroa_idx290 = 0, $$sroa$57$0$$sroa_idx292 = 0, $$sroa$57$0$$sroa_idx294 = 0; var $$sroa$57$0$$sroa_idx296 = 0, $$sroa$57$0$$sroa_idx298 = 0, $$sroa$57$0$$sroa_idx300 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0; var $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0, $61 = 0, $62 = 0; var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0.0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0.0, $80 = 0; var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0.0, $90 = 0, $91 = 0, $92 = 0, $spec$select = 0.0, $spec$select322 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = (+($0|0)); $4 = (+($1|0)); $5 = (+($2|0)); $6 = $3 + 0.15625; $7 = $5 + 0.15625; $8 = $3 + 0.84375; $9 = $4 + 1.0; $10 = $5 + 0.84375; $11 = HEAP16[986400]|0; $12 = $11&65535; $13 = ($12*6)|0; $14 = $13 | 1; $15 = (1162260 + ($14<<1)|0); $16 = HEAP16[$15>>1]|0; $17 = $16&65535; $18 = HEAP32[(1949300)>>2]|0; $19 = $18 & $17; $20 = (+($19|0)); $21 = +HEAPF32[(1949308)>>2]; $22 = $21 * $20; $23 = $21 * 0.99937498569488525; $24 = $23 + $22; $25 = (1124628 + ($12)|0); $26 = HEAP8[$25>>0]|0; $27 = $26 & -2; $28 = ($27<<24>>24)==(6); if ($28) { $29 = ($2*1217)|0; $30 = (($29) + ($0))|0; $31 = $30 & 2147483647; _Random_Seed(1084944,$31); $32 = (_Random_Range_142(-3)|0); $33 = (+($32|0)); $34 = $33 * 0.0625; $35 = (_Random_Range_142(0)|0); $36 = (+($35|0)); $37 = $36 * 0.0625; $38 = (_Random_Range_142(-3)|0); $39 = (+($38|0)); $40 = $39 * 0.0625; $41 = $34 + -0.10625000298023224; $42 = $6 + $41; $43 = $34 + 0.10625000298023224; $44 = $8 + $43; $45 = $40 + -0.10625000298023224; $46 = $7 + $45; $47 = $40 + 0.10625000298023224; $48 = $10 + $47; $49 = ($26<<24>>24)==(7); $50 = $4 - $37; $51 = $9 - $37; $spec$select = $49 ? $50 : $4; $spec$select322 = $49 ? $51 : $9; $$0 = $48;$$0317 = $spec$select322;$$0318 = $44;$$0319 = $46;$$0320 = $spec$select;$$0321 = $42; } else { $$0 = $10;$$0317 = $9;$$0318 = $8;$$0319 = $7;$$0320 = $4;$$0321 = $6; } $52 = HEAP16[986400]|0; $53 = $52&65535; $54 = (1108500 + ($53)|0); $55 = HEAP8[$54>>0]|0; $56 = HEAP32[(1949304)>>2]|0; $57 = ($56)?($17 >>> $56):($17); $58 = ($55<<24>>24)==(0); if ($58) { $59 = (_ClassicLighting_Color_Sprite_Fast($0,$1,$2)|0); $67 = $59; } else { $67 = -1; } $60 = HEAP16[986400]|0; $61 = $60&65535; $62 = (1123092 + ($61)|0); $63 = HEAP8[$62>>0]|0; $64 = ($63<<24>>24)==(0); if ($64) { $$sroa$46$0 = $67; } else { $65 = (1109268 + ($61<<2)|0); $66 = HEAP32[$65>>2]|0; $68 = (_PackedCol_Tint($67,$66)|0); $$sroa$46$0 = $68; } $69 = (((103264 + (($57*60)|0)|0)) + 52|0); $70 = HEAP32[$69>>2]|0; $71 = HEAP32[442717]|0; $$sroa$0$0$$sroa_idx111 = (($71) + (($70*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx111>>2] = $$0321; $$sroa$26$0$$sroa_idx143 = (((($71) + (($70*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx143>>2] = $$0320; $$sroa$38$0$$sroa_idx175 = (((($71) + (($70*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx175>>2] = $$0319; $$sroa$46$0$$sroa_idx207 = (((($71) + (($70*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx207>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx239 = (((($71) + (($70*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx239>>2] = 0.99937498569488525; $$sroa$57$0$$sroa_idx271 = (((($71) + (($70*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx271>>2] = $24; $72 = (($70) + 1)|0; $$sroa$0$0$$sroa_idx115 = (($71) + (($72*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx115>>2] = $$0321; $$sroa$26$0$$sroa_idx147 = (((($71) + (($72*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx147>>2] = $$0317; $$sroa$38$0$$sroa_idx179 = (((($71) + (($72*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx179>>2] = $$0319; $$sroa$46$0$$sroa_idx211 = (((($71) + (($72*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx211>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx243 = (((($71) + (($72*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx243>>2] = 0.99937498569488525; $$sroa$57$0$$sroa_idx275 = (((($71) + (($72*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx275>>2] = $22; $73 = (($70) + 2)|0; $$sroa$0$0$$sroa_idx117 = (($71) + (($73*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx117>>2] = $$0318; $$sroa$26$0$$sroa_idx149 = (((($71) + (($73*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx149>>2] = $$0317; $$sroa$38$0$$sroa_idx181 = (((($71) + (($73*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx181>>2] = $$0; $$sroa$46$0$$sroa_idx213 = (((($71) + (($73*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx213>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx245 = (((($71) + (($73*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx245>>2] = 0.0; $$sroa$57$0$$sroa_idx277 = (((($71) + (($73*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx277>>2] = $22; $74 = (($70) + 3)|0; $$sroa$0$0$$sroa_idx138 = (($71) + (($74*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx138>>2] = $$0318; $$sroa$26$0$$sroa_idx170 = (((($71) + (($74*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx170>>2] = $$0320; $$sroa$38$0$$sroa_idx202 = (((($71) + (($74*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx202>>2] = $$0; $$sroa$46$0$$sroa_idx234 = (((($71) + (($74*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx234>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx266 = (((($71) + (($74*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx266>>2] = 0.0; $$sroa$57$0$$sroa_idx298 = (((($71) + (($74*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx298>>2] = $24; $75 = (((103264 + (($57*60)|0)|0)) + 56|0); $76 = HEAP32[$75>>2]|0; $77 = (($76) + ($70))|0; $$sroa$0$0$$sroa_idx136 = (($71) + (($77*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx136>>2] = $$0318; $$sroa$26$0$$sroa_idx168 = (((($71) + (($77*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx168>>2] = $$0320; $$sroa$38$0$$sroa_idx200 = (((($71) + (($77*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx200>>2] = $$0; $$sroa$46$0$$sroa_idx232 = (((($71) + (($77*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx232>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx264 = (((($71) + (($77*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx264>>2] = 0.99937498569488525; $$sroa$57$0$$sroa_idx296 = (((($71) + (($77*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx296>>2] = $24; $78 = (($77) + 1)|0; $$sroa$0$0$$sroa_idx132 = (($71) + (($78*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx132>>2] = $$0318; $$sroa$26$0$$sroa_idx164 = (((($71) + (($78*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx164>>2] = $$0317; $$sroa$38$0$$sroa_idx196 = (((($71) + (($78*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx196>>2] = $$0; $$sroa$46$0$$sroa_idx228 = (((($71) + (($78*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx228>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx260 = (((($71) + (($78*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx260>>2] = 0.99937498569488525; $$sroa$57$0$$sroa_idx292 = (((($71) + (($78*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx292>>2] = $22; $79 = (($77) + 2)|0; $$sroa$0$0$$sroa_idx130 = (($71) + (($79*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx130>>2] = $$0321; $$sroa$26$0$$sroa_idx162 = (((($71) + (($79*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx162>>2] = $$0317; $$sroa$38$0$$sroa_idx194 = (((($71) + (($79*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx194>>2] = $$0319; $$sroa$46$0$$sroa_idx226 = (((($71) + (($79*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx226>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx258 = (((($71) + (($79*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx258>>2] = 0.0; $$sroa$57$0$$sroa_idx290 = (((($71) + (($79*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx290>>2] = $22; $80 = (($77) + 3)|0; $$sroa$0$0$$sroa_idx140 = (($71) + (($80*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx140>>2] = $$0321; $$sroa$26$0$$sroa_idx172 = (((($71) + (($80*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx172>>2] = $$0320; $$sroa$38$0$$sroa_idx204 = (((($71) + (($80*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx204>>2] = $$0319; $$sroa$46$0$$sroa_idx236 = (((($71) + (($80*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx236>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx268 = (((($71) + (($80*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx268>>2] = 0.0; $$sroa$57$0$$sroa_idx300 = (((($71) + (($80*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx300>>2] = $24; $81 = HEAP32[$75>>2]|0; $82 = (($81) + ($77))|0; $$sroa$0$0$$sroa_idx127 = (($71) + (($82*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx127>>2] = $$0321; $$sroa$26$0$$sroa_idx159 = (((($71) + (($82*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx159>>2] = $$0320; $$sroa$38$0$$sroa_idx191 = (((($71) + (($82*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx191>>2] = $$0; $$sroa$46$0$$sroa_idx223 = (((($71) + (($82*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx223>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx255 = (((($71) + (($82*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx255>>2] = 0.99937498569488525; $$sroa$57$0$$sroa_idx287 = (((($71) + (($82*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx287>>2] = $24; $83 = (($82) + 1)|0; $$sroa$0$0$$sroa_idx125 = (($71) + (($83*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx125>>2] = $$0321; $$sroa$26$0$$sroa_idx157 = (((($71) + (($83*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx157>>2] = $$0317; $$sroa$38$0$$sroa_idx189 = (((($71) + (($83*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx189>>2] = $$0; $$sroa$46$0$$sroa_idx221 = (((($71) + (($83*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx221>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx253 = (((($71) + (($83*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx253>>2] = 0.99937498569488525; $$sroa$57$0$$sroa_idx285 = (((($71) + (($83*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx285>>2] = $22; $84 = (($82) + 2)|0; $$sroa$0$0$$sroa_idx123 = (($71) + (($84*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx123>>2] = $$0318; $$sroa$26$0$$sroa_idx155 = (((($71) + (($84*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx155>>2] = $$0317; $$sroa$38$0$$sroa_idx187 = (((($71) + (($84*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx187>>2] = $$0319; $$sroa$46$0$$sroa_idx219 = (((($71) + (($84*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx219>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx251 = (((($71) + (($84*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx251>>2] = 0.0; $$sroa$57$0$$sroa_idx283 = (((($71) + (($84*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx283>>2] = $22; $85 = (($82) + 3)|0; $$sroa$0$0$$sroa_idx = (($71) + (($85*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $$0318; $$sroa$26$0$$sroa_idx142 = (((($71) + (($85*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx142>>2] = $$0320; $$sroa$38$0$$sroa_idx174 = (((($71) + (($85*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx174>>2] = $$0319; $$sroa$46$0$$sroa_idx206 = (((($71) + (($85*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx206>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx238 = (((($71) + (($85*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx238>>2] = 0.0; $$sroa$57$0$$sroa_idx270 = (((($71) + (($85*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx270>>2] = $24; $86 = HEAP32[$75>>2]|0; $87 = (($86) + ($82))|0; $$sroa$0$0$$sroa_idx134 = (($71) + (($87*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx134>>2] = $$0318; $$sroa$26$0$$sroa_idx166 = (((($71) + (($87*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx166>>2] = $$0320; $$sroa$38$0$$sroa_idx198 = (((($71) + (($87*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx198>>2] = $$0319; $$sroa$46$0$$sroa_idx230 = (((($71) + (($87*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx230>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx262 = (((($71) + (($87*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx262>>2] = 0.99937498569488525; $$sroa$57$0$$sroa_idx294 = (((($71) + (($87*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx294>>2] = $24; $88 = (($87) + 1)|0; $$sroa$0$0$$sroa_idx121 = (($71) + (($88*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx121>>2] = $$0318; $$sroa$26$0$$sroa_idx153 = (((($71) + (($88*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx153>>2] = $$0317; $$sroa$38$0$$sroa_idx185 = (((($71) + (($88*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx185>>2] = $$0319; $$sroa$46$0$$sroa_idx217 = (((($71) + (($88*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx217>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx249 = (((($71) + (($88*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx249>>2] = 0.99937498569488525; $$sroa$57$0$$sroa_idx281 = (((($71) + (($88*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx281>>2] = $22; $89 = (($87) + 2)|0; $$sroa$0$0$$sroa_idx113 = (($71) + (($89*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx113>>2] = $$0321; $$sroa$26$0$$sroa_idx145 = (((($71) + (($89*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx145>>2] = $$0317; $$sroa$38$0$$sroa_idx177 = (((($71) + (($89*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx177>>2] = $$0; $$sroa$46$0$$sroa_idx209 = (((($71) + (($89*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx209>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx241 = (((($71) + (($89*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx241>>2] = 0.0; $$sroa$57$0$$sroa_idx273 = (((($71) + (($89*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx273>>2] = $22; $90 = (($87) + 3)|0; $$sroa$0$0$$sroa_idx119 = (($71) + (($90*24)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx119>>2] = $$0321; $$sroa$26$0$$sroa_idx151 = (((($71) + (($90*24)|0)|0)) + 4|0); HEAPF32[$$sroa$26$0$$sroa_idx151>>2] = $$0320; $$sroa$38$0$$sroa_idx183 = (((($71) + (($90*24)|0)|0)) + 8|0); HEAPF32[$$sroa$38$0$$sroa_idx183>>2] = $$0; $$sroa$46$0$$sroa_idx215 = (((($71) + (($90*24)|0)|0)) + 12|0); HEAP32[$$sroa$46$0$$sroa_idx215>>2] = $$sroa$46$0; $$sroa$49$0$$sroa_idx247 = (((($71) + (($90*24)|0)|0)) + 16|0); HEAPF32[$$sroa$49$0$$sroa_idx247>>2] = 0.0; $$sroa$57$0$$sroa_idx279 = (((($71) + (($90*24)|0)|0)) + 20|0); HEAPF32[$$sroa$57$0$$sroa_idx279>>2] = $24; $91 = HEAP32[$69>>2]|0; $92 = (($91) + 4)|0; HEAP32[$69>>2] = $92; return; } function _Random_Range_142($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (4 - ($0))|0; $2 = (_Random_Next(1084944,$1)|0); $3 = (($2) + ($0))|0; return ($3|0); } function _Normal_CanStretch($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $6 = HEAP32[442719]|0; $7 = (($6) + ($1<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = ($8<<16>>16)==($0<<16>>16); if (!($9)) { $$0 = 0; return ($$0|0); } $10 = $8&65535; $11 = ($10*768)|0; $12 = $5&255; $13 = (1904 + ($12<<2)|0); $14 = HEAP32[$13>>2]|0; $15 = (($14) + ($1))|0; $16 = (($6) + ($15<<1)|0); $17 = HEAP16[$16>>1]|0; $18 = $17&65535; $19 = (($11) + ($18))|0; $20 = (1173012 + ($19)|0); $21 = HEAP8[$20>>0]|0; $22 = $21&255; $23 = 1 << $12; $24 = $23 & $22; $25 = ($24|0)==(0); if (!($25)) { $$0 = 0; return ($$0|0); } $26 = HEAP8[1972815]|0; $27 = ($26<<24>>24)==(0); if (!($27)) { $$0 = 1; return ($$0|0); } $28 = HEAP32[442720]|0; $29 = HEAP32[442721]|0; $30 = HEAP32[442722]|0; $31 = (_Normal_LightColor($28,$29,$30,$5,$0)|0); $32 = (_Normal_LightColor($2,$3,$4,$5,$8)|0); $33 = ($31|0)==($32|0); $34 = $33&1; $$0 = $34; return ($$0|0); } function _AddVertices($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0&65535; $3 = (1120788 + ($2)|0); $4 = HEAP8[$3>>0]|0; $5 = ($4<<24>>24)==(3); $6 = $5&1; $7 = $6 << 9; $8 = ($2*6)|0; $9 = $1&255; $10 = (($8) + ($9))|0; $11 = (1162260 + ($10<<1)|0); $12 = HEAP16[$11>>1]|0; $13 = $12&65535; $14 = HEAP32[(1949304)>>2]|0; $15 = ($14)?($13 >>> $14):($13); $16 = (($7) + ($15))|0; $17 = ((((103264 + (($16*60)|0)|0)) + 24|0) + ($9<<2)|0); $18 = HEAP32[$17>>2]|0; $19 = (($18) + 4)|0; HEAP32[$17>>2] = $19; return; } function _Normal_LightColor($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = $4&65535; $6 = (1120020 + ($5)|0); $7 = HEAP8[$6>>0]|0; $8 = $7&255; $9 = $3&255; $10 = ($9)?($8 >>> $9):($8); $11 = $10 & 1; switch ($3<<24>>24) { case 0: { $12 = ($11|0)>($0|0); if ($12) { $13 = HEAP32[(1972208)>>2]|0; $$0 = $13; return ($$0|0); } else { $14 = (($0) - ($11))|0; $15 = (_ClassicLighting_Color_XSide_Fast($14,$1,$2)|0); $$0 = $15; return ($$0|0); } } case 1: { $16 = HEAP32[(1103576)>>2]|0; $17 = (($16) - ($11))|0; $18 = ($17|0)<($0|0); if ($18) { $19 = HEAP32[(1972208)>>2]|0; $$0 = $19; return ($$0|0); } else { $20 = (($11) + ($0))|0; $21 = (_ClassicLighting_Color_XSide_Fast($20,$1,$2)|0); $$0 = $21; return ($$0|0); } } case 2: { $22 = ($11|0)>($2|0); if ($22) { $23 = HEAP32[(1972212)>>2]|0; $$0 = $23; return ($$0|0); } else { $24 = (($2) - ($11))|0; $25 = (_ClassicLighting_Color_ZSide_Fast($0,$1,$24)|0); $$0 = $25; return ($$0|0); } } case 3: { $26 = HEAP32[(1103584)>>2]|0; $27 = (($26) - ($11))|0; $28 = ($27|0)<($2|0); if ($28) { $29 = HEAP32[(1972212)>>2]|0; $$0 = $29; return ($$0|0); } else { $30 = (($11) + ($2))|0; $31 = (_ClassicLighting_Color_ZSide_Fast($0,$1,$30)|0); $$0 = $31; return ($$0|0); } } case 4: { $32 = (($1) - ($11))|0; $33 = (_ClassicLighting_Color_YMin_Fast($0,$32,$2)|0); $$0 = $33; return ($$0|0); } case 5: { $34 = (($11) + ($1))|0; $35 = (_ClassicLighting_Color_YMax_Fast($0,$34,$2)|0); $$0 = $35; return ($$0|0); } default: { $$0 = 0; return ($$0|0); } } } function _Builder_OccludedLiquid($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (($0) + 324)|0; $2 = HEAP32[442719]|0; $3 = (($2) + ($1<<1)|0); $4 = HEAP16[$3>>1]|0; $5 = $4&65535; $6 = (1123860 + ($5)|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); if ($8) { $37 = 0; return ($37|0); } $9 = (($0) + 306)|0; $10 = (($2) + ($9<<1)|0); $11 = HEAP16[$10>>1]|0; $12 = $11&65535; $13 = (1120788 + ($12)|0); $14 = HEAP8[$13>>0]|0; $15 = ($14<<24>>24)==(4); if ($15) { $37 = 0; return ($37|0); } $16 = (($0) + 323)|0; $17 = (($2) + ($16<<1)|0); $18 = HEAP16[$17>>1]|0; $19 = $18&65535; $20 = (1120788 + ($19)|0); $21 = HEAP8[$20>>0]|0; $22 = ($21<<24>>24)==(4); if ($22) { $37 = 0; return ($37|0); } $23 = (($0) + 325)|0; $24 = (($2) + ($23<<1)|0); $25 = HEAP16[$24>>1]|0; $26 = $25&65535; $27 = (1120788 + ($26)|0); $28 = HEAP8[$27>>0]|0; $29 = ($28<<24>>24)==(4); if ($29) { $37 = 0; return ($37|0); } $30 = (($0) + 342)|0; $31 = (($2) + ($30<<1)|0); $32 = HEAP16[$31>>1]|0; $33 = $32&65535; $34 = (1120788 + ($33)|0); $35 = HEAP8[$34>>0]|0; $36 = ($35<<24>>24)!=(4); $phitmp = $36&1; $37 = $phitmp; return ($37|0); } function _DefaultPrePrepateChunk() { var label = 0, sp = 0; sp = STACKTOP; _Mem_Set(103264,0,61440); return; } function _Adv_StretchXLiquid($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$0 = 0, $$029$lcssa = 0, $$02937 = 0, $$03038 = 0, $$03038$in = 0, $$03139 = 0, $$03139$in = 0, $$032 = 0, $$03235 = 0, $$03240 = 0, $$lobit = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; var $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond36 = 0, label = 0, sp = 0; sp = STACKTOP; $6 = (_Builder_OccludedLiquid($4)|0); $7 = ($6<<24>>24)==(0); if (!($7)) { $$0 = 0; return ($$0|0); } $8 = (_Adv_ComputeLightFlags($1,$2,$3,$4)|0); HEAP32[442741] = $8; $9 = HEAP32[442726]|0; $10 = (($9) + ($4<<2)|0); HEAP32[$10>>2] = $8; $11 = $5&65535; $12 = (1762836 + ($11)|0); $13 = HEAP8[$12>>0]|0; $$lobit = $13 & 32; $$03235 = (($1) + 1)|0; $14 = HEAP32[442723]|0; $15 = ($$03235|0)>=($14|0); $16 = ($$lobit<<24>>24)==(0); $or$cond36 = $16 | $15; L4: do { if ($or$cond36) { $$029$lcssa = 1; } else { $$02937 = 1;$$03038$in = $0;$$03139$in = $4;$$03240 = $$03235; while(1) { $$03038 = (($$03038$in) + 6)|0; $$03139 = (($$03139$in) + 1)|0; $17 = (_Adv_CanStretch($5,$$03139,$$03240,$2,$3,5)|0); $18 = ($17<<24>>24)==(0); if ($18) { $$029$lcssa = $$02937; break L4; } $19 = (_Builder_OccludedLiquid($$03139)|0); $20 = ($19<<24>>24)==(0); if (!($20)) { $$029$lcssa = $$02937; break L4; } $21 = HEAP32[442716]|0; $22 = (($21) + ($$03038)|0); HEAP8[$22>>0] = 0; $23 = (($$02937) + 1)|0; $$032 = (($$03240) + 1)|0; $24 = HEAP32[442723]|0; $25 = ($$032|0)>=($24|0); $or$cond = $16 | $25; if ($or$cond) { $$029$lcssa = $23; break; } else { $$02937 = $23;$$03038$in = $$03038;$$03139$in = $$03139;$$03240 = $$032; } } } } while(0); _AddVertices($5,5); $$0 = $$029$lcssa; return ($$0|0); } function _Adv_StretchX($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; var $$028$lcssa = 0, $$02835 = 0, $$029 = 0, $$02932 = 0, $$02937 = 0, $$03038 = 0, $$03038$in = 0, $$036 = 0, $$036$in = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0; var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $7 = 0, $8 = 0, $9 = 0, $brmerge = 0, $brmerge34 = 0, label = 0, sp = 0; sp = STACKTOP; $7 = (_Adv_ComputeLightFlags($1,$2,$3,$4)|0); HEAP32[442741] = $7; $8 = HEAP32[442726]|0; $9 = (($8) + ($4<<2)|0); HEAP32[$9>>2] = $7; $10 = $5&65535; $11 = (1762836 + ($10)|0); $12 = HEAP8[$11>>0]|0; $13 = $12&255; $14 = $6&255; $15 = 1 << $14; $16 = $15 & $13; $17 = ($16|0)==(0); $$02932 = (($1) + 1)|0; $18 = HEAP32[442723]|0; $19 = ($$02932|0)>=($18|0); $brmerge34 = $17 | $19; if ($brmerge34) { $$028$lcssa = 1; _AddVertices($5,$6); return ($$028$lcssa|0); } $$02835 = 1;$$02937 = $$02932;$$03038$in = $4;$$036$in = $0; while(1) { $$036 = (($$036$in) + 6)|0; $$03038 = (($$03038$in) + 1)|0; $20 = (_Adv_CanStretch($5,$$03038,$$02937,$2,$3,$6)|0); $21 = ($20<<24>>24)==(0); if ($21) { $$028$lcssa = $$02835; label = 5; break; } $22 = HEAP32[442716]|0; $23 = (($22) + ($$036)|0); HEAP8[$23>>0] = 0; $24 = (($$02835) + 1)|0; $$029 = (($$02937) + 1)|0; $25 = HEAP32[442723]|0; $26 = ($$029|0)>=($25|0); $brmerge = $17 | $26; if ($brmerge) { $$028$lcssa = $24; label = 5; break; } else { $$02835 = $24;$$02937 = $$029;$$03038$in = $$03038;$$036$in = $$036; } } if ((label|0) == 5) { _AddVertices($5,$6); return ($$028$lcssa|0); } return (0)|0; } function _Adv_StretchZ($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; var $$028$lcssa = 0, $$02835 = 0, $$029 = 0, $$02932 = 0, $$02937 = 0, $$03038 = 0, $$03038$in = 0, $$036 = 0, $$036$in = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0; var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $7 = 0, $8 = 0, $9 = 0, $brmerge = 0, $brmerge34 = 0, label = 0, sp = 0; sp = STACKTOP; $7 = (_Adv_ComputeLightFlags($1,$2,$3,$4)|0); HEAP32[442741] = $7; $8 = HEAP32[442726]|0; $9 = (($8) + ($4<<2)|0); HEAP32[$9>>2] = $7; $10 = $5&65535; $11 = (1762836 + ($10)|0); $12 = HEAP8[$11>>0]|0; $13 = $12&255; $14 = $6&255; $15 = 1 << $14; $16 = $15 & $13; $17 = ($16|0)==(0); $$02932 = (($3) + 1)|0; $18 = HEAP32[442718]|0; $19 = ($$02932|0)>=($18|0); $brmerge34 = $17 | $19; if ($brmerge34) { $$028$lcssa = 1; _AddVertices($5,$6); return ($$028$lcssa|0); } $$02835 = 1;$$02937 = $$02932;$$03038$in = $4;$$036$in = $0; while(1) { $$036 = (($$036$in) + 96)|0; $$03038 = (($$03038$in) + 18)|0; $20 = (_Adv_CanStretch($5,$$03038,$1,$2,$$02937,$6)|0); $21 = ($20<<24>>24)==(0); if ($21) { $$028$lcssa = $$02835; label = 5; break; } $22 = HEAP32[442716]|0; $23 = (($22) + ($$036)|0); HEAP8[$23>>0] = 0; $24 = (($$02835) + 1)|0; $$029 = (($$02937) + 1)|0; $25 = HEAP32[442718]|0; $26 = ($$029|0)>=($25|0); $brmerge = $17 | $26; if ($brmerge) { $$028$lcssa = $24; label = 5; break; } else { $$02835 = $24;$$02937 = $$029;$$03038$in = $$03038;$$036$in = $$036; } } if ((label|0) == 5) { _AddVertices($5,$6); return ($$028$lcssa|0); } return (0)|0; } function _Adv_RenderBlock($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$043$0$$sroa_idx = 0, $$sroa$043$0$copyload = 0.0, $$sroa$4$0$$sroa_idx39 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$445$0$$sroa_idx46 = 0, $$sroa$445$0$copyload = 0.0, $$sroa$5$0$$sroa_idx41 = 0, $$sroa$5$0$copyload = 0.0, $$sroa$548$0$$sroa_idx49 = 0, $$sroa$548$0$copyload = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0; var $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0; var $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP16[986400]|0; $5 = $4&65535; $6 = (1120788 + ($5)|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(5); if ($8) { _Builder_DrawSprite($1,$2,$3); return; } $9 = HEAP32[442716]|0; $10 = (($9) + ($0)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = (($0) + 1)|0; $14 = (($9) + ($13)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = (($0) + 2)|0; $18 = (($9) + ($17)|0); $19 = HEAP8[$18>>0]|0; $20 = $19&255; $21 = (($0) + 3)|0; $22 = (($9) + ($21)|0); $23 = HEAP8[$22>>0]|0; $24 = $23&255; $25 = (($0) + 4)|0; $26 = (($9) + ($25)|0); $27 = HEAP8[$26>>0]|0; $28 = $27&255; $29 = (($0) + 5)|0; $30 = (($9) + ($29)|0); $31 = HEAP8[$30>>0]|0; $32 = $31&255; $33 = ($15<<24>>24)==(0); $34 = $15 | $11; $35 = ($19<<24>>24)==(0); $36 = $34 | $19; $37 = ($23<<24>>24)==(0); $38 = $36 | $23; $39 = ($27<<24>>24)==(0); $40 = $38 | $27; $41 = ($31<<24>>24)==(0); $42 = $40 | $31; $43 = ($42<<24>>24)==(0); if ($43) { return; } $44 = ($11<<24>>24)==(0); $45 = (1108500 + ($5)|0); $46 = HEAP8[$45>>0]|0; HEAP8[1972815] = $46; $47 = ($7<<24>>24)==(3); $48 = $47&1; $49 = $48 << 9; HEAP32[442727] = $49; $50 = (1123092 + ($5)|0); $51 = HEAP8[$50>>0]|0; HEAP8[1972816] = $51; $$sroa$043$0$$sroa_idx = (1143828 + (($5*12)|0)|0); $$sroa$043$0$copyload = +HEAPF32[$$sroa$043$0$$sroa_idx>>2]; $$sroa$445$0$$sroa_idx46 = (((1143828 + (($5*12)|0)|0)) + 4|0); $$sroa$445$0$copyload = +HEAPF32[$$sroa$445$0$$sroa_idx46>>2]; $$sroa$548$0$$sroa_idx49 = (((1143828 + (($5*12)|0)|0)) + 8|0); $$sroa$548$0$copyload = +HEAPF32[$$sroa$548$0$$sroa_idx49>>2]; $$sroa$0$0$$sroa_idx = (1153044 + (($5*12)|0)|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$4$0$$sroa_idx39 = (((1153044 + (($5*12)|0)|0)) + 4|0); $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx39>>2]; $$sroa$5$0$$sroa_idx41 = (((1153044 + (($5*12)|0)|0)) + 8|0); $$sroa$5$0$copyload = +HEAPF32[$$sroa$5$0$$sroa_idx41>>2]; $52 = (+($1|0)); $53 = $$sroa$043$0$copyload + $52; HEAPF32[442728] = $53; $54 = (+($2|0)); $55 = $$sroa$445$0$copyload + $54; HEAPF32[442729] = $55; $56 = (+($3|0)); $57 = $$sroa$548$0$copyload + $56; HEAPF32[442730] = $57; $58 = $$sroa$0$0$copyload + $52; HEAPF32[442731] = $58; $59 = $$sroa$4$0$copyload + $54; HEAPF32[442732] = $59; $60 = $$sroa$5$0$copyload + $56; HEAPF32[442733] = $60; $61 = (1125396 + (($5*12)|0)|0); ;HEAP32[1770936>>2]=HEAP32[$61>>2]|0;HEAP32[1770936+4>>2]=HEAP32[$61+4>>2]|0;HEAP32[1770936+8>>2]=HEAP32[$61+8>>2]|0; $62 = (1134612 + (($5*12)|0)|0); ;HEAP32[1770948>>2]=HEAP32[$62>>2]|0;HEAP32[1770948+4>>2]=HEAP32[$62+4>>2]|0;HEAP32[1770948+8>>2]=HEAP32[$62+8>>2]|0; $63 = +HEAPF32[(1770940)>>2]; $64 = 1.0 - $63; HEAPF32[(1770940)>>2] = $64; $65 = +HEAPF32[(1770952)>>2]; $66 = 1.0 - $65; HEAPF32[(1770952)>>2] = $66; if (!($44)) { _Adv_DrawXMin($12); } if (!($33)) { _Adv_DrawXMax($16); } if (!($35)) { _Adv_DrawZMin($20); } if (!($37)) { _Adv_DrawZMax($24); } if (!($39)) { _Adv_DrawYMin($28); } if ($41) { return; } _Adv_DrawYMax($32); return; } function _Adv_PrePrepareChunk() { var $$011 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; _DefaultPrePrepateChunk(); $0 = HEAP32[442725]|0; HEAP32[442726] = $0; $$011 = 0; while(1) { $1 = HEAP32[(1972220)>>2]|0; $2 = HEAP32[(1972204)>>2]|0; $3 = (+($$011|0)); $4 = $3 * 0.25; $5 = (_PackedCol_Lerp($1,$2,$4)|0); $6 = (164704 + ($$011<<2)|0); HEAP32[$6>>2] = $5; $7 = HEAP32[(1972224)>>2]|0; $8 = HEAP32[(1972208)>>2]|0; $9 = (_PackedCol_Lerp($7,$8,$4)|0); $10 = (164736 + ($$011<<2)|0); HEAP32[$10>>2] = $9; $11 = HEAP32[(1972228)>>2]|0; $12 = HEAP32[(1972212)>>2]|0; $13 = (_PackedCol_Lerp($11,$12,$4)|0); $14 = (164768 + ($$011<<2)|0); HEAP32[$14>>2] = $13; $15 = HEAP32[(1972232)>>2]|0; $16 = HEAP32[(1972216)>>2]|0; $17 = (_PackedCol_Lerp($15,$16,$4)|0); $18 = (164800 + ($$011<<2)|0); HEAP32[$18>>2] = $17; $19 = (($$011) + 1)|0; $exitcond = ($19|0)==(5); if ($exitcond) { break; } else { $$011 = $19; } } return; } function _Adv_DrawXMin($0) { $0 = $0|0; var $$0 = 0, $$0204 = 0, $$0205 = 0, $$0205$sink = 0, $$0206 = 0, $$0207 = 0, $$sink = 0.0, $$sink208 = 0.0, $$sink209 = 0, $$sink212 = 0, $$sroa$11$0$$sroa_idx16 = 0, $$sroa$11$0$$sroa_idx17 = 0, $$sroa$11$0$$sroa_idx19 = 0, $$sroa$11$0$$sroa_idx23 = 0, $$sroa$11$0$$sroa_idx25 = 0, $$sroa$11$0$$sroa_idx27 = 0, $$sroa$11$0$$sroa_idx29 = 0, $$sroa$15$0$$sroa_idx32 = 0, $$sroa$15$0$$sroa_idx33 = 0, $$sroa$15$0$$sroa_idx35 = 0; var $$sroa$15$0$$sroa_idx39 = 0, $$sroa$15$0$$sroa_idx41 = 0, $$sroa$15$0$$sroa_idx43 = 0, $$sroa$15$0$$sroa_idx45 = 0, $$sroa$20$0$$sroa_idx48 = 0, $$sroa$20$0$$sroa_idx49 = 0, $$sroa$20$0$$sroa_idx51 = 0, $$sroa$20$0$$sroa_idx55 = 0, $$sroa$20$0$$sroa_idx57 = 0, $$sroa$20$0$$sroa_idx59 = 0, $$sroa$20$0$$sroa_idx61 = 0, $$sroa$28$0$$sroa_idx64 = 0, $$sroa$28$0$$sroa_idx65 = 0, $$sroa$28$0$$sroa_idx67 = 0, $$sroa$28$0$$sroa_idx71 = 0, $$sroa$28$0$$sroa_idx73 = 0, $$sroa$28$0$$sroa_idx75 = 0, $$sroa$28$0$$sroa_idx77 = 0, $$sroa$33$0$$sroa_idx80 = 0, $$sroa$33$0$$sroa_idx81 = 0; var $$sroa$33$0$$sroa_idx87 = 0, $$sroa$33$0$$sroa_idx89 = 0, $$sroa$33$0$$sroa_idx91 = 0, $$sroa$33$0$$sroa_idx93 = 0, $1 = 0, $10 = 0.0, $100 = 0, $101 = 0, $102 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0; var $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0; var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0; var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0; var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0.0, $90 = 0, $91 = 0, $92 = 0, $93 = 0; var $94 = 0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP16[986400]|0; $2 = $1&65535; $3 = ($2*6)|0; $4 = (1162260 + ($3<<1)|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; $7 = HEAP32[(1949300)>>2]|0; $8 = $7 & $6; $9 = (+($8|0)); $10 = +HEAPF32[(1949308)>>2]; $11 = $10 * $9; $12 = HEAP32[(1770944)>>2]|0; $13 = (($0) + -1)|0; $14 = (+($13|0)); $15 = +HEAPF32[(1770956)>>2]; $16 = $15 * 0.99937498569488525; $17 = $16 + $14; $18 = +HEAPF32[(1770952)>>2]; $19 = $10 * $18; $20 = $11 + $19; $21 = +HEAPF32[(1770940)>>2]; $22 = $10 * $21; $23 = $22 * 0.99937498569488525; $24 = $11 + $23; $25 = HEAP32[442727]|0; $26 = HEAP32[(1949304)>>2]|0; $27 = ($26)?($6 >>> $26):($6); $28 = (($27) + ($25))|0; $29 = HEAP32[442726]|0; $30 = HEAP32[442740]|0; $31 = (($29) + ($30<<2)|0); $32 = HEAP32[$31>>2]|0; $33 = $32 & 1; $34 = (1)?($32 >>> 1):($32); $35 = $34 & 1; $36 = (9)?($32 >>> 9):($32); $37 = $36 & 1; $38 = (10)?($32 >>> 10):($32); $39 = $38 & 1; $40 = (($37) + ($39))|0; $41 = (($40) + ($33))|0; $42 = (($41) + ($35))|0; $43 = (18)?($32 >>> 18):($32); $44 = $43 & 1; $45 = (19)?($32 >>> 19):($32); $46 = $45 & 1; $47 = (($37) + ($39))|0; $48 = (($47) + ($46))|0; $49 = (($48) + ($44))|0; $50 = (2)?($32 >>> 2):($32); $51 = $50 & 1; $52 = (11)?($32 >>> 11):($32); $53 = $52 & 1; $54 = (($53) + ($39))|0; $55 = (($54) + ($35))|0; $56 = (($55) + ($51))|0; $57 = (20)?($32 >>> 20):($32); $58 = $57 & 1; $59 = (($53) + ($39))|0; $60 = (($59) + ($46))|0; $61 = (($60) + ($58))|0; $62 = HEAP8[1972815]|0; $63 = ($62<<24>>24)==(0); if ($63) { $64 = (164736 + ($42<<2)|0); $65 = HEAP32[$64>>2]|0; $66 = (164736 + ($56<<2)|0); $67 = HEAP32[$66>>2]|0; $68 = (164736 + ($61<<2)|0); $69 = HEAP32[$68>>2]|0; $70 = (164736 + ($49<<2)|0); $71 = HEAP32[$70>>2]|0; $76 = $65;$78 = $67;$80 = $69;$82 = $71; } else { $76 = -1;$78 = -1;$80 = -1;$82 = -1; } $72 = HEAP8[1972816]|0; $73 = ($72<<24>>24)==(0); if ($73) { $$0 = $76;$$0205 = $82;$$0206 = $80;$$0207 = $78; } else { $74 = (1109268 + ($2<<2)|0); $75 = HEAP32[$74>>2]|0; $77 = (_PackedCol_Tint($76,$75)|0); $79 = (_PackedCol_Tint($78,$75)|0); $81 = (_PackedCol_Tint($80,$75)|0); $83 = (_PackedCol_Tint($82,$75)|0); $$0 = $77;$$0205 = $83;$$0206 = $81;$$0207 = $79; } $84 = (103264 + (($28*60)|0)|0); $85 = HEAP32[$84>>2]|0; $86 = HEAP32[442728]|0; $87 = (($42) + ($61))|0; $88 = (($49) + ($56))|0; $89 = ($87>>>0)>($88>>>0); $90 = HEAP32[442732]|0; if ($89) { $91 = HEAP32[442730]|0; $92 = ((($85)) + 24|0); HEAP32[$85>>2] = $86; $$sroa$11$0$$sroa_idx16 = ((($85)) + 4|0); HEAP32[$$sroa$11$0$$sroa_idx16>>2] = $90; $$sroa$15$0$$sroa_idx32 = ((($85)) + 8|0); HEAP32[$$sroa$15$0$$sroa_idx32>>2] = $91; $$sroa$20$0$$sroa_idx48 = ((($85)) + 12|0); HEAP32[$$sroa$20$0$$sroa_idx48>>2] = $$0207; $$sroa$28$0$$sroa_idx64 = ((($85)) + 16|0); HEAP32[$$sroa$28$0$$sroa_idx64>>2] = $12; $$sroa$33$0$$sroa_idx80 = ((($85)) + 20|0); HEAPF32[$$sroa$33$0$$sroa_idx80>>2] = $20; $93 = HEAP32[442729]|0; $94 = ((($85)) + 48|0); HEAP32[$92>>2] = $86; $$sroa$11$0$$sroa_idx17 = ((($85)) + 28|0); HEAP32[$$sroa$11$0$$sroa_idx17>>2] = $93; $$sroa$15$0$$sroa_idx33 = ((($85)) + 32|0); HEAP32[$$sroa$15$0$$sroa_idx33>>2] = $91; $$sroa$20$0$$sroa_idx49 = ((($85)) + 36|0); HEAP32[$$sroa$20$0$$sroa_idx49>>2] = $$0; $$sroa$28$0$$sroa_idx65 = ((($85)) + 40|0); HEAP32[$$sroa$28$0$$sroa_idx65>>2] = $12; $$sroa$33$0$$sroa_idx81 = ((($85)) + 44|0); HEAPF32[$$sroa$33$0$$sroa_idx81>>2] = $24; $95 = +HEAPF32[442733]; $96 = $95 + $14; HEAP32[$94>>2] = $86; $$sroa$11$0$$sroa_idx19 = ((($85)) + 52|0); HEAP32[$$sroa$11$0$$sroa_idx19>>2] = $93; $$sroa$15$0$$sroa_idx35 = ((($85)) + 56|0); HEAPF32[$$sroa$15$0$$sroa_idx35>>2] = $96; $$sroa$20$0$$sroa_idx51 = ((($85)) + 60|0); HEAP32[$$sroa$20$0$$sroa_idx51>>2] = $$0205; $$sroa$28$0$$sroa_idx67 = ((($85)) + 64|0); HEAPF32[$$sroa$28$0$$sroa_idx67>>2] = $17; $$0205$sink = $$0206;$$sink = $20;$$sink208 = $96;$$sink209 = $90; $$sink212 = ((($85)) + 72|0); $$sroa$33$0$$sroa_idx91 = ((($85)) + 68|0); HEAPF32[$$sroa$33$0$$sroa_idx91>>2] = $24; HEAP32[$$sink212>>2] = $86; $$sroa$11$0$$sroa_idx29 = ((($85)) + 76|0); HEAP32[$$sroa$11$0$$sroa_idx29>>2] = $$sink209; $$sroa$15$0$$sroa_idx45 = ((($85)) + 80|0); HEAPF32[$$sroa$15$0$$sroa_idx45>>2] = $$sink208; $$sroa$20$0$$sroa_idx61 = ((($85)) + 84|0); HEAP32[$$sroa$20$0$$sroa_idx61>>2] = $$0205$sink; $$sroa$28$0$$sroa_idx77 = ((($85)) + 88|0); HEAPF32[$$sroa$28$0$$sroa_idx77>>2] = $17; $$sroa$33$0$$sroa_idx93 = ((($85)) + 92|0); HEAPF32[$$sroa$33$0$$sroa_idx93>>2] = $$sink; $$0204 = ((($85)) + 96|0); HEAP32[$84>>2] = $$0204; return; } else { $97 = +HEAPF32[442733]; $98 = $97 + $14; $99 = ((($85)) + 24|0); HEAP32[$85>>2] = $86; $$sroa$11$0$$sroa_idx23 = ((($85)) + 4|0); HEAP32[$$sroa$11$0$$sroa_idx23>>2] = $90; $$sroa$15$0$$sroa_idx39 = ((($85)) + 8|0); HEAPF32[$$sroa$15$0$$sroa_idx39>>2] = $98; $$sroa$20$0$$sroa_idx55 = ((($85)) + 12|0); HEAP32[$$sroa$20$0$$sroa_idx55>>2] = $$0206; $$sroa$28$0$$sroa_idx71 = ((($85)) + 16|0); HEAPF32[$$sroa$28$0$$sroa_idx71>>2] = $17; $$sroa$33$0$$sroa_idx87 = ((($85)) + 20|0); HEAPF32[$$sroa$33$0$$sroa_idx87>>2] = $20; $100 = HEAP32[442730]|0; $101 = ((($85)) + 48|0); HEAP32[$99>>2] = $86; $$sroa$11$0$$sroa_idx25 = ((($85)) + 28|0); HEAP32[$$sroa$11$0$$sroa_idx25>>2] = $90; $$sroa$15$0$$sroa_idx41 = ((($85)) + 32|0); HEAP32[$$sroa$15$0$$sroa_idx41>>2] = $100; $$sroa$20$0$$sroa_idx57 = ((($85)) + 36|0); HEAP32[$$sroa$20$0$$sroa_idx57>>2] = $$0207; $$sroa$28$0$$sroa_idx73 = ((($85)) + 40|0); HEAP32[$$sroa$28$0$$sroa_idx73>>2] = $12; $$sroa$33$0$$sroa_idx89 = ((($85)) + 44|0); HEAPF32[$$sroa$33$0$$sroa_idx89>>2] = $20; $102 = HEAP32[442729]|0; HEAP32[$101>>2] = $86; $$sroa$11$0$$sroa_idx27 = ((($85)) + 52|0); HEAP32[$$sroa$11$0$$sroa_idx27>>2] = $102; $$sroa$15$0$$sroa_idx43 = ((($85)) + 56|0); HEAP32[$$sroa$15$0$$sroa_idx43>>2] = $100; $$sroa$20$0$$sroa_idx59 = ((($85)) + 60|0); HEAP32[$$sroa$20$0$$sroa_idx59>>2] = $$0; $$sroa$28$0$$sroa_idx75 = ((($85)) + 64|0); HEAP32[$$sroa$28$0$$sroa_idx75>>2] = $12; $$0205$sink = $$0205;$$sink = $24;$$sink208 = $98;$$sink209 = $102; $$sink212 = ((($85)) + 72|0); $$sroa$33$0$$sroa_idx91 = ((($85)) + 68|0); HEAPF32[$$sroa$33$0$$sroa_idx91>>2] = $24; HEAP32[$$sink212>>2] = $86; $$sroa$11$0$$sroa_idx29 = ((($85)) + 76|0); HEAP32[$$sroa$11$0$$sroa_idx29>>2] = $$sink209; $$sroa$15$0$$sroa_idx45 = ((($85)) + 80|0); HEAPF32[$$sroa$15$0$$sroa_idx45>>2] = $$sink208; $$sroa$20$0$$sroa_idx61 = ((($85)) + 84|0); HEAP32[$$sroa$20$0$$sroa_idx61>>2] = $$0205$sink; $$sroa$28$0$$sroa_idx77 = ((($85)) + 88|0); HEAPF32[$$sroa$28$0$$sroa_idx77>>2] = $17; $$sroa$33$0$$sroa_idx93 = ((($85)) + 92|0); HEAPF32[$$sroa$33$0$$sroa_idx93>>2] = $$sink; $$0204 = ((($85)) + 96|0); HEAP32[$84>>2] = $$0204; return; } } function _Adv_DrawXMax($0) { $0 = $0|0; var $$0 = 0, $$0$sink = 0, $$0203 = 0, $$0204 = 0, $$0205 = 0, $$0206 = 0, $$0206$sink = 0, $$sink = 0.0, $$sink207 = 0, $$sink209 = 0, $$sink212 = 0, $$sink213 = 0.0, $$sroa$11$0$$sroa_idx16 = 0, $$sroa$11$0$$sroa_idx17 = 0, $$sroa$11$0$$sroa_idx19 = 0, $$sroa$11$0$$sroa_idx23 = 0, $$sroa$11$0$$sroa_idx25 = 0, $$sroa$11$0$$sroa_idx27 = 0, $$sroa$11$0$$sroa_idx29 = 0, $$sroa$15$0$$sroa_idx32 = 0; var $$sroa$15$0$$sroa_idx33 = 0, $$sroa$15$0$$sroa_idx35 = 0, $$sroa$15$0$$sroa_idx39 = 0, $$sroa$15$0$$sroa_idx41 = 0, $$sroa$15$0$$sroa_idx43 = 0, $$sroa$15$0$$sroa_idx45 = 0, $$sroa$20$0$$sroa_idx48 = 0, $$sroa$20$0$$sroa_idx49 = 0, $$sroa$20$0$$sroa_idx55 = 0, $$sroa$20$0$$sroa_idx57 = 0, $$sroa$20$0$$sroa_idx59 = 0, $$sroa$20$0$$sroa_idx61 = 0, $$sroa$28$0$$sroa_idx64 = 0, $$sroa$28$0$$sroa_idx65 = 0, $$sroa$28$0$$sroa_idx71 = 0, $$sroa$28$0$$sroa_idx73 = 0, $$sroa$28$0$$sroa_idx75 = 0, $$sroa$28$0$$sroa_idx77 = 0, $$sroa$33$0$$sroa_idx80 = 0, $$sroa$33$0$$sroa_idx81 = 0; var $$sroa$33$0$$sroa_idx87 = 0, $$sroa$33$0$$sroa_idx89 = 0, $$sroa$33$0$$sroa_idx91 = 0, $$sroa$33$0$$sroa_idx93 = 0, $1 = 0, $10 = 0.0, $100 = 0, $101 = 0.0, $102 = 0, $103 = 0.0, $104 = 0.0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0; var $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0; var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0; var $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0; var $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0; var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0.0, $96 = 0, $97 = 0.0, $98 = 0.0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP16[986400]|0; $2 = $1&65535; $3 = ($2*6)|0; $4 = $3 | 1; $5 = (1162260 + ($4<<1)|0); $6 = HEAP16[$5>>1]|0; $7 = $6&65535; $8 = HEAP32[(1949300)>>2]|0; $9 = $8 & $7; $10 = (+($9|0)); $11 = +HEAPF32[(1949308)>>2]; $12 = $11 * $10; $13 = (+($0|0)); $14 = +HEAPF32[(1770944)>>2]; $15 = $13 - $14; $16 = +HEAPF32[(1770956)>>2]; $17 = 1.0 - $16; $18 = $17 * 0.99937498569488525; $19 = +HEAPF32[(1770952)>>2]; $20 = $11 * $19; $21 = $12 + $20; $22 = +HEAPF32[(1770940)>>2]; $23 = $11 * $22; $24 = $23 * 0.99937498569488525; $25 = $12 + $24; $26 = HEAP32[442727]|0; $27 = HEAP32[(1949304)>>2]|0; $28 = ($27)?($7 >>> $27):($7); $29 = (($28) + ($26))|0; $30 = HEAP32[442726]|0; $31 = HEAP32[442740]|0; $32 = (($30) + ($31<<2)|0); $33 = HEAP32[$32>>2]|0; $34 = (6)?($33 >>> 6):($33); $35 = $34 & 1; $36 = (7)?($33 >>> 7):($33); $37 = $36 & 1; $38 = (15)?($33 >>> 15):($33); $39 = $38 & 1; $40 = (16)?($33 >>> 16):($33); $41 = $40 & 1; $42 = (($39) + ($41))|0; $43 = (($42) + ($37))|0; $44 = (($43) + ($35))|0; $45 = (24)?($33 >>> 24):($33); $46 = $45 & 1; $47 = (25)?($33 >>> 25):($33); $48 = $47 & 1; $49 = (($39) + ($41))|0; $50 = (($49) + ($48))|0; $51 = (($50) + ($46))|0; $52 = (8)?($33 >>> 8):($33); $53 = $52 & 1; $54 = (17)?($33 >>> 17):($33); $55 = $54 & 1; $56 = (($55) + ($41))|0; $57 = (($56) + ($37))|0; $58 = (($57) + ($53))|0; $59 = (26)?($33 >>> 26):($33); $60 = $59 & 1; $61 = (($55) + ($41))|0; $62 = (($61) + ($48))|0; $63 = (($62) + ($60))|0; $64 = HEAP8[1972815]|0; $65 = ($64<<24>>24)==(0); if ($65) { $66 = (164736 + ($44<<2)|0); $67 = HEAP32[$66>>2]|0; $68 = (164736 + ($58<<2)|0); $69 = HEAP32[$68>>2]|0; $70 = (164736 + ($63<<2)|0); $71 = HEAP32[$70>>2]|0; $72 = (164736 + ($51<<2)|0); $73 = HEAP32[$72>>2]|0; $78 = $67;$80 = $69;$82 = $71;$84 = $73; } else { $78 = -1;$80 = -1;$82 = -1;$84 = -1; } $74 = HEAP8[1972816]|0; $75 = ($74<<24>>24)==(0); if ($75) { $$0 = $78;$$0204 = $84;$$0205 = $82;$$0206 = $80; } else { $76 = (1109268 + ($2<<2)|0); $77 = HEAP32[$76>>2]|0; $79 = (_PackedCol_Tint($78,$77)|0); $81 = (_PackedCol_Tint($80,$77)|0); $83 = (_PackedCol_Tint($82,$77)|0); $85 = (_PackedCol_Tint($84,$77)|0); $$0 = $79;$$0204 = $85;$$0205 = $83;$$0206 = $81; } $86 = (((103264 + (($29*60)|0)|0)) + 4|0); $87 = HEAP32[$86>>2]|0; $88 = HEAP32[442731]|0; $89 = (($44) + ($63))|0; $90 = (($51) + ($58))|0; $91 = ($89>>>0)>($90>>>0); $92 = HEAP32[442732]|0; if ($91) { $93 = HEAP32[442730]|0; $94 = ((($87)) + 24|0); HEAP32[$87>>2] = $88; $$sroa$11$0$$sroa_idx16 = ((($87)) + 4|0); HEAP32[$$sroa$11$0$$sroa_idx16>>2] = $92; $$sroa$15$0$$sroa_idx32 = ((($87)) + 8|0); HEAP32[$$sroa$15$0$$sroa_idx32>>2] = $93; $$sroa$20$0$$sroa_idx48 = ((($87)) + 12|0); HEAP32[$$sroa$20$0$$sroa_idx48>>2] = $$0206; $$sroa$28$0$$sroa_idx64 = ((($87)) + 16|0); HEAPF32[$$sroa$28$0$$sroa_idx64>>2] = $15; $$sroa$33$0$$sroa_idx80 = ((($87)) + 20|0); HEAPF32[$$sroa$33$0$$sroa_idx80>>2] = $21; $95 = +HEAPF32[442733]; $96 = (($0) + -1)|0; $97 = (+($96|0)); $98 = $95 + $97; $99 = ((($87)) + 48|0); HEAP32[$94>>2] = $88; $$sroa$11$0$$sroa_idx17 = ((($87)) + 28|0); HEAP32[$$sroa$11$0$$sroa_idx17>>2] = $92; $$sroa$15$0$$sroa_idx33 = ((($87)) + 32|0); HEAPF32[$$sroa$15$0$$sroa_idx33>>2] = $98; $$sroa$20$0$$sroa_idx49 = ((($87)) + 36|0); HEAP32[$$sroa$20$0$$sroa_idx49>>2] = $$0205; $$sroa$28$0$$sroa_idx65 = ((($87)) + 40|0); HEAPF32[$$sroa$28$0$$sroa_idx65>>2] = $18; $$sroa$33$0$$sroa_idx81 = ((($87)) + 44|0); HEAPF32[$$sroa$33$0$$sroa_idx81>>2] = $21; $100 = HEAP32[442729]|0; HEAP32[$99>>2] = $88; $$sroa$11$0$$sroa_idx19 = ((($87)) + 52|0); HEAP32[$$sroa$11$0$$sroa_idx19>>2] = $100; $$sroa$15$0$$sroa_idx35 = ((($87)) + 56|0); HEAPF32[$$sroa$15$0$$sroa_idx35>>2] = $98; $$0$sink = $$0204;$$0206$sink = $$0;$$sink = $25;$$sink207 = $93;$$sink209 = $100;$$sink213 = $18; $$sink212 = ((($87)) + 72|0); $$sroa$20$0$$sroa_idx59 = ((($87)) + 60|0); HEAP32[$$sroa$20$0$$sroa_idx59>>2] = $$0$sink; $$sroa$28$0$$sroa_idx75 = ((($87)) + 64|0); HEAPF32[$$sroa$28$0$$sroa_idx75>>2] = $$sink213; $$sroa$33$0$$sroa_idx91 = ((($87)) + 68|0); HEAPF32[$$sroa$33$0$$sroa_idx91>>2] = $25; HEAP32[$$sink212>>2] = $88; $$sroa$11$0$$sroa_idx29 = ((($87)) + 76|0); HEAP32[$$sroa$11$0$$sroa_idx29>>2] = $$sink209; $$sroa$15$0$$sroa_idx45 = ((($87)) + 80|0); HEAP32[$$sroa$15$0$$sroa_idx45>>2] = $$sink207; $$sroa$20$0$$sroa_idx61 = ((($87)) + 84|0); HEAP32[$$sroa$20$0$$sroa_idx61>>2] = $$0206$sink; $$sroa$28$0$$sroa_idx77 = ((($87)) + 88|0); HEAPF32[$$sroa$28$0$$sroa_idx77>>2] = $15; $$sroa$33$0$$sroa_idx93 = ((($87)) + 92|0); HEAPF32[$$sroa$33$0$$sroa_idx93>>2] = $$sink; $$0203 = ((($87)) + 96|0); HEAP32[$86>>2] = $$0203; return; } else { $101 = +HEAPF32[442733]; $102 = (($0) + -1)|0; $103 = (+($102|0)); $104 = $101 + $103; $105 = ((($87)) + 24|0); HEAP32[$87>>2] = $88; $$sroa$11$0$$sroa_idx23 = ((($87)) + 4|0); HEAP32[$$sroa$11$0$$sroa_idx23>>2] = $92; $$sroa$15$0$$sroa_idx39 = ((($87)) + 8|0); HEAPF32[$$sroa$15$0$$sroa_idx39>>2] = $104; $$sroa$20$0$$sroa_idx55 = ((($87)) + 12|0); HEAP32[$$sroa$20$0$$sroa_idx55>>2] = $$0205; $$sroa$28$0$$sroa_idx71 = ((($87)) + 16|0); HEAPF32[$$sroa$28$0$$sroa_idx71>>2] = $18; $$sroa$33$0$$sroa_idx87 = ((($87)) + 20|0); HEAPF32[$$sroa$33$0$$sroa_idx87>>2] = $21; $106 = HEAP32[442729]|0; $107 = ((($87)) + 48|0); HEAP32[$105>>2] = $88; $$sroa$11$0$$sroa_idx25 = ((($87)) + 28|0); HEAP32[$$sroa$11$0$$sroa_idx25>>2] = $106; $$sroa$15$0$$sroa_idx41 = ((($87)) + 32|0); HEAPF32[$$sroa$15$0$$sroa_idx41>>2] = $104; $$sroa$20$0$$sroa_idx57 = ((($87)) + 36|0); HEAP32[$$sroa$20$0$$sroa_idx57>>2] = $$0204; $$sroa$28$0$$sroa_idx73 = ((($87)) + 40|0); HEAPF32[$$sroa$28$0$$sroa_idx73>>2] = $18; $$sroa$33$0$$sroa_idx89 = ((($87)) + 44|0); HEAPF32[$$sroa$33$0$$sroa_idx89>>2] = $25; $108 = HEAP32[442730]|0; HEAP32[$107>>2] = $88; $$sroa$11$0$$sroa_idx27 = ((($87)) + 52|0); HEAP32[$$sroa$11$0$$sroa_idx27>>2] = $106; $$sroa$15$0$$sroa_idx43 = ((($87)) + 56|0); HEAP32[$$sroa$15$0$$sroa_idx43>>2] = $108; $$0$sink = $$0;$$0206$sink = $$0206;$$sink = $21;$$sink207 = $108;$$sink209 = $92;$$sink213 = $15; $$sink212 = ((($87)) + 72|0); $$sroa$20$0$$sroa_idx59 = ((($87)) + 60|0); HEAP32[$$sroa$20$0$$sroa_idx59>>2] = $$0$sink; $$sroa$28$0$$sroa_idx75 = ((($87)) + 64|0); HEAPF32[$$sroa$28$0$$sroa_idx75>>2] = $$sink213; $$sroa$33$0$$sroa_idx91 = ((($87)) + 68|0); HEAPF32[$$sroa$33$0$$sroa_idx91>>2] = $25; HEAP32[$$sink212>>2] = $88; $$sroa$11$0$$sroa_idx29 = ((($87)) + 76|0); HEAP32[$$sroa$11$0$$sroa_idx29>>2] = $$sink209; $$sroa$15$0$$sroa_idx45 = ((($87)) + 80|0); HEAP32[$$sroa$15$0$$sroa_idx45>>2] = $$sink207; $$sroa$20$0$$sroa_idx61 = ((($87)) + 84|0); HEAP32[$$sroa$20$0$$sroa_idx61>>2] = $$0206$sink; $$sroa$28$0$$sroa_idx77 = ((($87)) + 88|0); HEAPF32[$$sroa$28$0$$sroa_idx77>>2] = $15; $$sroa$33$0$$sroa_idx93 = ((($87)) + 92|0); HEAPF32[$$sroa$33$0$$sroa_idx93>>2] = $$sink; $$0203 = ((($87)) + 96|0); HEAP32[$86>>2] = $$0203; return; } } function _Adv_DrawZMin($0) { $0 = $0|0; var $$0 = 0, $$0204 = 0, $$0205 = 0, $$0206 = 0, $$0206$sink = 0, $$0207 = 0, $$0207$sink = 0, $$sink = 0.0, $$sink209 = 0, $$sink211 = 0.0, $$sink212 = 0.0, $$sink214 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$$sroa_idx11 = 0, $$sroa$15$0$$sroa_idx16 = 0, $$sroa$15$0$$sroa_idx17 = 0, $$sroa$15$0$$sroa_idx19 = 0, $$sroa$15$0$$sroa_idx23 = 0, $$sroa$15$0$$sroa_idx25 = 0, $$sroa$15$0$$sroa_idx27 = 0; var $$sroa$20$0$$sroa_idx32 = 0, $$sroa$20$0$$sroa_idx33 = 0, $$sroa$20$0$$sroa_idx35 = 0, $$sroa$20$0$$sroa_idx39 = 0, $$sroa$20$0$$sroa_idx41 = 0, $$sroa$20$0$$sroa_idx43 = 0, $$sroa$21$0$$sroa_idx48 = 0, $$sroa$21$0$$sroa_idx49 = 0, $$sroa$21$0$$sroa_idx51 = 0, $$sroa$21$0$$sroa_idx55 = 0, $$sroa$21$0$$sroa_idx57 = 0, $$sroa$21$0$$sroa_idx59 = 0, $$sroa$29$0$$sroa_idx64 = 0, $$sroa$29$0$$sroa_idx65 = 0, $$sroa$29$0$$sroa_idx67 = 0, $$sroa$29$0$$sroa_idx71 = 0, $$sroa$29$0$$sroa_idx73 = 0, $$sroa$29$0$$sroa_idx75 = 0, $$sroa$34$0$$sroa_idx80 = 0, $$sroa$34$0$$sroa_idx81 = 0; var $$sroa$34$0$$sroa_idx83 = 0, $$sroa$34$0$$sroa_idx87 = 0, $$sroa$34$0$$sroa_idx89 = 0, $$sroa$34$0$$sroa_idx91 = 0, $1 = 0, $10 = 0.0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0.0, $105 = 0, $106 = 0.0, $107 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0; var $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0; var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; var $9 = 0, $90 = 0, $91 = 0.0, $92 = 0, $93 = 0.0, $94 = 0.0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP16[986400]|0; $2 = $1&65535; $3 = ($2*6)|0; $4 = (($3) + 2)|0; $5 = (1162260 + ($4<<1)|0); $6 = HEAP16[$5>>1]|0; $7 = $6&65535; $8 = HEAP32[(1949300)>>2]|0; $9 = $8 & $7; $10 = (+($9|0)); $11 = +HEAPF32[(1949308)>>2]; $12 = $11 * $10; $13 = (+($0|0)); $14 = +HEAPF32[442734]; $15 = $13 - $14; $16 = +HEAPF32[442737]; $17 = 1.0 - $16; $18 = $17 * 0.99937498569488525; $19 = +HEAPF32[(1770952)>>2]; $20 = $11 * $19; $21 = $12 + $20; $22 = +HEAPF32[(1770940)>>2]; $23 = $11 * $22; $24 = $23 * 0.99937498569488525; $25 = $12 + $24; $26 = HEAP32[442727]|0; $27 = HEAP32[(1949304)>>2]|0; $28 = ($27)?($7 >>> $27):($7); $29 = (($28) + ($26))|0; $30 = HEAP32[442726]|0; $31 = HEAP32[442740]|0; $32 = (($30) + ($31<<2)|0); $33 = HEAP32[$32>>2]|0; $34 = $33 & 1; $35 = (1)?($33 >>> 1):($33); $36 = $35 & 1; $37 = (3)?($33 >>> 3):($33); $38 = $37 & 1; $39 = (4)?($33 >>> 4):($33); $40 = $39 & 1; $41 = (($38) + ($40))|0; $42 = (($41) + ($34))|0; $43 = (($42) + ($36))|0; $44 = (2)?($33 >>> 2):($33); $45 = $44 & 1; $46 = (5)?($33 >>> 5):($33); $47 = $46 & 1; $48 = (($47) + ($40))|0; $49 = (($48) + ($36))|0; $50 = (($49) + ($45))|0; $51 = (6)?($33 >>> 6):($33); $52 = $51 & 1; $53 = (7)?($33 >>> 7):($33); $54 = $53 & 1; $55 = (($38) + ($40))|0; $56 = (($55) + ($54))|0; $57 = (($56) + ($52))|0; $58 = (8)?($33 >>> 8):($33); $59 = $58 & 1; $60 = (($47) + ($40))|0; $61 = (($60) + ($54))|0; $62 = (($61) + ($59))|0; $63 = HEAP8[1972815]|0; $64 = ($63<<24>>24)==(0); if ($64) { $65 = (164768 + ($43<<2)|0); $66 = HEAP32[$65>>2]|0; $67 = (164768 + ($57<<2)|0); $68 = HEAP32[$67>>2]|0; $69 = (164768 + ($62<<2)|0); $70 = HEAP32[$69>>2]|0; $71 = (164768 + ($50<<2)|0); $72 = HEAP32[$71>>2]|0; $77 = $66;$79 = $68;$81 = $70;$83 = $72; } else { $77 = -1;$79 = -1;$81 = -1;$83 = -1; } $73 = HEAP8[1972816]|0; $74 = ($73<<24>>24)==(0); if ($74) { $$0 = $77;$$0205 = $83;$$0206 = $81;$$0207 = $79; } else { $75 = (1109268 + ($2<<2)|0); $76 = HEAP32[$75>>2]|0; $78 = (_PackedCol_Tint($77,$76)|0); $80 = (_PackedCol_Tint($79,$76)|0); $82 = (_PackedCol_Tint($81,$76)|0); $84 = (_PackedCol_Tint($83,$76)|0); $$0 = $78;$$0205 = $84;$$0206 = $82;$$0207 = $80; } $85 = (((103264 + (($29*60)|0)|0)) + 8|0); $86 = HEAP32[$85>>2]|0; $87 = HEAP32[442730]|0; $88 = (($62) + ($43))|0; $89 = (($50) + ($57))|0; $90 = ($88>>>0)>($89>>>0); if ($90) { $91 = +HEAPF32[442731]; $92 = (($0) + -1)|0; $93 = (+($92|0)); $94 = $91 + $93; $95 = HEAP32[442729]|0; $96 = ((($86)) + 24|0); HEAPF32[$86>>2] = $94; $$sroa$15$0$$sroa_idx17 = ((($86)) + 4|0); HEAP32[$$sroa$15$0$$sroa_idx17>>2] = $95; $$sroa$20$0$$sroa_idx33 = ((($86)) + 8|0); HEAP32[$$sroa$20$0$$sroa_idx33>>2] = $87; $$sroa$21$0$$sroa_idx49 = ((($86)) + 12|0); HEAP32[$$sroa$21$0$$sroa_idx49>>2] = $$0207; $$sroa$29$0$$sroa_idx65 = ((($86)) + 16|0); HEAPF32[$$sroa$29$0$$sroa_idx65>>2] = $18; $$sroa$34$0$$sroa_idx81 = ((($86)) + 20|0); HEAPF32[$$sroa$34$0$$sroa_idx81>>2] = $25; $97 = HEAP32[442728]|0; $98 = ((($86)) + 48|0); HEAP32[$96>>2] = $97; $$sroa$15$0$$sroa_idx19 = ((($86)) + 28|0); HEAP32[$$sroa$15$0$$sroa_idx19>>2] = $95; $$sroa$20$0$$sroa_idx35 = ((($86)) + 32|0); HEAP32[$$sroa$20$0$$sroa_idx35>>2] = $87; $$sroa$21$0$$sroa_idx51 = ((($86)) + 36|0); HEAP32[$$sroa$21$0$$sroa_idx51>>2] = $$0; $$sroa$29$0$$sroa_idx67 = ((($86)) + 40|0); HEAPF32[$$sroa$29$0$$sroa_idx67>>2] = $15; $$sroa$34$0$$sroa_idx83 = ((($86)) + 44|0); HEAPF32[$$sroa$34$0$$sroa_idx83>>2] = $25; $99 = HEAP32[442732]|0; HEAP32[$98>>2] = $97; $$0206$sink = $$0205;$$0207$sink = $$0206;$$sink = $21;$$sink209 = $99;$$sink211 = $94;$$sink212 = $15;$$sink214 = $99; $$sroa$15$0$$sroa_idx16 = ((($86)) + 52|0); HEAP32[$$sroa$15$0$$sroa_idx16>>2] = $$sink214; $$sroa$20$0$$sroa_idx32 = ((($86)) + 56|0); HEAP32[$$sroa$20$0$$sroa_idx32>>2] = $87; $$sroa$21$0$$sroa_idx48 = ((($86)) + 60|0); HEAP32[$$sroa$21$0$$sroa_idx48>>2] = $$0206$sink; $$sroa$29$0$$sroa_idx64 = ((($86)) + 64|0); HEAPF32[$$sroa$29$0$$sroa_idx64>>2] = $$sink212; $$sroa$34$0$$sroa_idx80 = ((($86)) + 68|0); HEAPF32[$$sroa$34$0$$sroa_idx80>>2] = $21; $$sroa$0$0$$sroa_idx11 = ((($86)) + 72|0); HEAPF32[$$sroa$0$0$$sroa_idx11>>2] = $$sink211; $$sroa$15$0$$sroa_idx27 = ((($86)) + 76|0); HEAP32[$$sroa$15$0$$sroa_idx27>>2] = $$sink209; $$sroa$20$0$$sroa_idx43 = ((($86)) + 80|0); HEAP32[$$sroa$20$0$$sroa_idx43>>2] = $87; $$sroa$21$0$$sroa_idx59 = ((($86)) + 84|0); HEAP32[$$sroa$21$0$$sroa_idx59>>2] = $$0207$sink; $$sroa$29$0$$sroa_idx75 = ((($86)) + 88|0); HEAPF32[$$sroa$29$0$$sroa_idx75>>2] = $18; $$sroa$34$0$$sroa_idx91 = ((($86)) + 92|0); HEAPF32[$$sroa$34$0$$sroa_idx91>>2] = $$sink; $$0204 = ((($86)) + 96|0); HEAP32[$85>>2] = $$0204; return; } else { $100 = HEAP32[442728]|0; $101 = HEAP32[442729]|0; $102 = ((($86)) + 24|0); HEAP32[$86>>2] = $100; $$sroa$15$0$$sroa_idx23 = ((($86)) + 4|0); HEAP32[$$sroa$15$0$$sroa_idx23>>2] = $101; $$sroa$20$0$$sroa_idx39 = ((($86)) + 8|0); HEAP32[$$sroa$20$0$$sroa_idx39>>2] = $87; $$sroa$21$0$$sroa_idx55 = ((($86)) + 12|0); HEAP32[$$sroa$21$0$$sroa_idx55>>2] = $$0; $$sroa$29$0$$sroa_idx71 = ((($86)) + 16|0); HEAPF32[$$sroa$29$0$$sroa_idx71>>2] = $15; $$sroa$34$0$$sroa_idx87 = ((($86)) + 20|0); HEAPF32[$$sroa$34$0$$sroa_idx87>>2] = $25; $103 = HEAP32[442732]|0; HEAP32[$102>>2] = $100; $$sroa$15$0$$sroa_idx25 = ((($86)) + 28|0); HEAP32[$$sroa$15$0$$sroa_idx25>>2] = $103; $$sroa$20$0$$sroa_idx41 = ((($86)) + 32|0); HEAP32[$$sroa$20$0$$sroa_idx41>>2] = $87; $$sroa$21$0$$sroa_idx57 = ((($86)) + 36|0); HEAP32[$$sroa$21$0$$sroa_idx57>>2] = $$0205; $$sroa$29$0$$sroa_idx73 = ((($86)) + 40|0); HEAPF32[$$sroa$29$0$$sroa_idx73>>2] = $15; $$sroa$34$0$$sroa_idx89 = ((($86)) + 44|0); HEAPF32[$$sroa$34$0$$sroa_idx89>>2] = $21; $104 = +HEAPF32[442731]; $105 = (($0) + -1)|0; $106 = (+($105|0)); $107 = $104 + $106; $$sroa$0$0$$sroa_idx = ((($86)) + 48|0); HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $107; $$0206$sink = $$0206;$$0207$sink = $$0207;$$sink = $25;$$sink209 = $101;$$sink211 = $107;$$sink212 = $18;$$sink214 = $103; $$sroa$15$0$$sroa_idx16 = ((($86)) + 52|0); HEAP32[$$sroa$15$0$$sroa_idx16>>2] = $$sink214; $$sroa$20$0$$sroa_idx32 = ((($86)) + 56|0); HEAP32[$$sroa$20$0$$sroa_idx32>>2] = $87; $$sroa$21$0$$sroa_idx48 = ((($86)) + 60|0); HEAP32[$$sroa$21$0$$sroa_idx48>>2] = $$0206$sink; $$sroa$29$0$$sroa_idx64 = ((($86)) + 64|0); HEAPF32[$$sroa$29$0$$sroa_idx64>>2] = $$sink212; $$sroa$34$0$$sroa_idx80 = ((($86)) + 68|0); HEAPF32[$$sroa$34$0$$sroa_idx80>>2] = $21; $$sroa$0$0$$sroa_idx11 = ((($86)) + 72|0); HEAPF32[$$sroa$0$0$$sroa_idx11>>2] = $$sink211; $$sroa$15$0$$sroa_idx27 = ((($86)) + 76|0); HEAP32[$$sroa$15$0$$sroa_idx27>>2] = $$sink209; $$sroa$20$0$$sroa_idx43 = ((($86)) + 80|0); HEAP32[$$sroa$20$0$$sroa_idx43>>2] = $87; $$sroa$21$0$$sroa_idx59 = ((($86)) + 84|0); HEAP32[$$sroa$21$0$$sroa_idx59>>2] = $$0207$sink; $$sroa$29$0$$sroa_idx75 = ((($86)) + 88|0); HEAPF32[$$sroa$29$0$$sroa_idx75>>2] = $18; $$sroa$34$0$$sroa_idx91 = ((($86)) + 92|0); HEAPF32[$$sroa$34$0$$sroa_idx91>>2] = $$sink; $$0204 = ((($86)) + 96|0); HEAP32[$85>>2] = $$0204; return; } } function _Adv_DrawZMax($0) { $0 = $0|0; var $$0 = 0, $$0204 = 0, $$0205 = 0, $$0206 = 0, $$0207 = 0, $$0207$sink = 0, $$sink = 0.0, $$sink209 = 0, $$sink211 = 0.0, $$sroa$0$0$$sroa_idx11 = 0, $$sroa$0$0$$sroa_idx5 = 0, $$sroa$15$0$$sroa_idx16 = 0, $$sroa$15$0$$sroa_idx17 = 0, $$sroa$15$0$$sroa_idx19 = 0, $$sroa$15$0$$sroa_idx21 = 0, $$sroa$15$0$$sroa_idx23 = 0, $$sroa$15$0$$sroa_idx25 = 0, $$sroa$15$0$$sroa_idx27 = 0, $$sroa$20$0$$sroa_idx32 = 0, $$sroa$20$0$$sroa_idx33 = 0; var $$sroa$20$0$$sroa_idx35 = 0, $$sroa$20$0$$sroa_idx37 = 0, $$sroa$20$0$$sroa_idx39 = 0, $$sroa$20$0$$sroa_idx41 = 0, $$sroa$20$0$$sroa_idx43 = 0, $$sroa$21$0$$sroa_idx48 = 0, $$sroa$21$0$$sroa_idx49 = 0, $$sroa$21$0$$sroa_idx51 = 0, $$sroa$21$0$$sroa_idx53 = 0, $$sroa$21$0$$sroa_idx55 = 0, $$sroa$21$0$$sroa_idx57 = 0, $$sroa$21$0$$sroa_idx59 = 0, $$sroa$29$0$$sroa_idx64 = 0, $$sroa$29$0$$sroa_idx65 = 0, $$sroa$29$0$$sroa_idx67 = 0, $$sroa$29$0$$sroa_idx69 = 0, $$sroa$29$0$$sroa_idx71 = 0, $$sroa$29$0$$sroa_idx73 = 0, $$sroa$29$0$$sroa_idx75 = 0, $$sroa$34$0$$sroa_idx80 = 0; var $$sroa$34$0$$sroa_idx81 = 0, $$sroa$34$0$$sroa_idx83 = 0, $$sroa$34$0$$sroa_idx87 = 0, $$sroa$34$0$$sroa_idx89 = 0, $$sroa$34$0$$sroa_idx91 = 0, $1 = 0, $10 = 0.0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0; var $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP16[986400]|0; $2 = $1&65535; $3 = ($2*6)|0; $4 = (($3) + 3)|0; $5 = (1162260 + ($4<<1)|0); $6 = HEAP16[$5>>1]|0; $7 = $6&65535; $8 = HEAP32[(1949300)>>2]|0; $9 = $8 & $7; $10 = (+($9|0)); $11 = +HEAPF32[(1949308)>>2]; $12 = $11 * $10; $13 = HEAP32[442734]|0; $14 = (($0) + -1)|0; $15 = (+($14|0)); $16 = +HEAPF32[442737]; $17 = $16 * 0.99937498569488525; $18 = $17 + $15; $19 = +HEAPF32[(1770952)>>2]; $20 = $11 * $19; $21 = $12 + $20; $22 = +HEAPF32[(1770940)>>2]; $23 = $11 * $22; $24 = $23 * 0.99937498569488525; $25 = $12 + $24; $26 = HEAP32[442727]|0; $27 = HEAP32[(1949304)>>2]|0; $28 = ($27)?($7 >>> $27):($7); $29 = (($28) + ($26))|0; $30 = HEAP32[442726]|0; $31 = HEAP32[442740]|0; $32 = (($30) + ($31<<2)|0); $33 = HEAP32[$32>>2]|0; $34 = (18)?($33 >>> 18):($33); $35 = $34 & 1; $36 = (19)?($33 >>> 19):($33); $37 = $36 & 1; $38 = (21)?($33 >>> 21):($33); $39 = $38 & 1; $40 = (22)?($33 >>> 22):($33); $41 = $40 & 1; $42 = (($39) + ($41))|0; $43 = (($42) + ($37))|0; $44 = (($43) + ($35))|0; $45 = (24)?($33 >>> 24):($33); $46 = $45 & 1; $47 = (25)?($33 >>> 25):($33); $48 = $47 & 1; $49 = (($39) + ($41))|0; $50 = (($49) + ($48))|0; $51 = (($50) + ($46))|0; $52 = (20)?($33 >>> 20):($33); $53 = $52 & 1; $54 = (23)?($33 >>> 23):($33); $55 = $54 & 1; $56 = (($55) + ($41))|0; $57 = (($56) + ($37))|0; $58 = (($57) + ($53))|0; $59 = (26)?($33 >>> 26):($33); $60 = $59 & 1; $61 = (($55) + ($41))|0; $62 = (($61) + ($48))|0; $63 = (($62) + ($60))|0; $64 = HEAP8[1972815]|0; $65 = ($64<<24>>24)==(0); if ($65) { $66 = (164768 + ($63<<2)|0); $67 = HEAP32[$66>>2]|0; $68 = (164768 + ($51<<2)|0); $69 = HEAP32[$68>>2]|0; $70 = (164768 + ($44<<2)|0); $71 = HEAP32[$70>>2]|0; $72 = (164768 + ($58<<2)|0); $73 = HEAP32[$72>>2]|0; $78 = $71;$80 = $69;$82 = $67;$84 = $73; } else { $78 = -1;$80 = -1;$82 = -1;$84 = -1; } $74 = HEAP8[1972816]|0; $75 = ($74<<24>>24)==(0); if ($75) { $$0 = $82;$$0205 = $84;$$0206 = $78;$$0207 = $80; } else { $76 = (1109268 + ($2<<2)|0); $77 = HEAP32[$76>>2]|0; $79 = (_PackedCol_Tint($78,$77)|0); $81 = (_PackedCol_Tint($80,$77)|0); $83 = (_PackedCol_Tint($82,$77)|0); $85 = (_PackedCol_Tint($84,$77)|0); $$0 = $83;$$0205 = $85;$$0206 = $79;$$0207 = $81; } $86 = (((103264 + (($29*60)|0)|0)) + 12|0); $87 = HEAP32[$86>>2]|0; $88 = HEAP32[442733]|0; $89 = (($63) + ($44))|0; $90 = (($58) + ($51))|0; $91 = ($89>>>0)>($90>>>0); if ($91) { $92 = HEAP32[442728]|0; $93 = HEAP32[442732]|0; $94 = ((($87)) + 24|0); HEAP32[$87>>2] = $92; $$sroa$15$0$$sroa_idx17 = ((($87)) + 4|0); HEAP32[$$sroa$15$0$$sroa_idx17>>2] = $93; $$sroa$20$0$$sroa_idx33 = ((($87)) + 8|0); HEAP32[$$sroa$20$0$$sroa_idx33>>2] = $88; $$sroa$21$0$$sroa_idx49 = ((($87)) + 12|0); HEAP32[$$sroa$21$0$$sroa_idx49>>2] = $$0205; $$sroa$29$0$$sroa_idx65 = ((($87)) + 16|0); HEAP32[$$sroa$29$0$$sroa_idx65>>2] = $13; $$sroa$34$0$$sroa_idx81 = ((($87)) + 20|0); HEAPF32[$$sroa$34$0$$sroa_idx81>>2] = $21; $95 = HEAP32[442729]|0; HEAP32[$94>>2] = $92; $$sroa$15$0$$sroa_idx19 = ((($87)) + 28|0); HEAP32[$$sroa$15$0$$sroa_idx19>>2] = $95; $$sroa$20$0$$sroa_idx35 = ((($87)) + 32|0); HEAP32[$$sroa$20$0$$sroa_idx35>>2] = $88; $$sroa$21$0$$sroa_idx51 = ((($87)) + 36|0); HEAP32[$$sroa$21$0$$sroa_idx51>>2] = $$0206; $$sroa$29$0$$sroa_idx67 = ((($87)) + 40|0); HEAP32[$$sroa$29$0$$sroa_idx67>>2] = $13; $$sroa$34$0$$sroa_idx83 = ((($87)) + 44|0); HEAPF32[$$sroa$34$0$$sroa_idx83>>2] = $25; $96 = +HEAPF32[442731]; $97 = $96 + $15; $$sroa$0$0$$sroa_idx5 = ((($87)) + 48|0); HEAPF32[$$sroa$0$0$$sroa_idx5>>2] = $97; $$sroa$15$0$$sroa_idx21 = ((($87)) + 52|0); HEAP32[$$sroa$15$0$$sroa_idx21>>2] = $95; $$sroa$20$0$$sroa_idx37 = ((($87)) + 56|0); HEAP32[$$sroa$20$0$$sroa_idx37>>2] = $88; $$sroa$21$0$$sroa_idx53 = ((($87)) + 60|0); HEAP32[$$sroa$21$0$$sroa_idx53>>2] = $$0207; $$sroa$29$0$$sroa_idx69 = ((($87)) + 64|0); HEAPF32[$$sroa$29$0$$sroa_idx69>>2] = $18; $$0207$sink = $$0;$$sink = $21;$$sink209 = $93;$$sink211 = $97; $$sroa$34$0$$sroa_idx80 = ((($87)) + 68|0); HEAPF32[$$sroa$34$0$$sroa_idx80>>2] = $25; $$sroa$0$0$$sroa_idx11 = ((($87)) + 72|0); HEAPF32[$$sroa$0$0$$sroa_idx11>>2] = $$sink211; $$sroa$15$0$$sroa_idx27 = ((($87)) + 76|0); HEAP32[$$sroa$15$0$$sroa_idx27>>2] = $$sink209; $$sroa$20$0$$sroa_idx43 = ((($87)) + 80|0); HEAP32[$$sroa$20$0$$sroa_idx43>>2] = $88; $$sroa$21$0$$sroa_idx59 = ((($87)) + 84|0); HEAP32[$$sroa$21$0$$sroa_idx59>>2] = $$0207$sink; $$sroa$29$0$$sroa_idx75 = ((($87)) + 88|0); HEAPF32[$$sroa$29$0$$sroa_idx75>>2] = $18; $$sroa$34$0$$sroa_idx91 = ((($87)) + 92|0); HEAPF32[$$sroa$34$0$$sroa_idx91>>2] = $$sink; $$0204 = ((($87)) + 96|0); HEAP32[$86>>2] = $$0204; return; } else { $98 = +HEAPF32[442731]; $99 = $98 + $15; $100 = HEAP32[442732]|0; $101 = ((($87)) + 24|0); HEAPF32[$87>>2] = $99; $$sroa$15$0$$sroa_idx23 = ((($87)) + 4|0); HEAP32[$$sroa$15$0$$sroa_idx23>>2] = $100; $$sroa$20$0$$sroa_idx39 = ((($87)) + 8|0); HEAP32[$$sroa$20$0$$sroa_idx39>>2] = $88; $$sroa$21$0$$sroa_idx55 = ((($87)) + 12|0); HEAP32[$$sroa$21$0$$sroa_idx55>>2] = $$0; $$sroa$29$0$$sroa_idx71 = ((($87)) + 16|0); HEAPF32[$$sroa$29$0$$sroa_idx71>>2] = $18; $$sroa$34$0$$sroa_idx87 = ((($87)) + 20|0); HEAPF32[$$sroa$34$0$$sroa_idx87>>2] = $21; $102 = HEAP32[442728]|0; $103 = ((($87)) + 48|0); HEAP32[$101>>2] = $102; $$sroa$15$0$$sroa_idx25 = ((($87)) + 28|0); HEAP32[$$sroa$15$0$$sroa_idx25>>2] = $100; $$sroa$20$0$$sroa_idx41 = ((($87)) + 32|0); HEAP32[$$sroa$20$0$$sroa_idx41>>2] = $88; $$sroa$21$0$$sroa_idx57 = ((($87)) + 36|0); HEAP32[$$sroa$21$0$$sroa_idx57>>2] = $$0205; $$sroa$29$0$$sroa_idx73 = ((($87)) + 40|0); HEAP32[$$sroa$29$0$$sroa_idx73>>2] = $13; $$sroa$34$0$$sroa_idx89 = ((($87)) + 44|0); HEAPF32[$$sroa$34$0$$sroa_idx89>>2] = $21; $104 = HEAP32[442729]|0; HEAP32[$103>>2] = $102; $$sroa$15$0$$sroa_idx16 = ((($87)) + 52|0); HEAP32[$$sroa$15$0$$sroa_idx16>>2] = $104; $$sroa$20$0$$sroa_idx32 = ((($87)) + 56|0); HEAP32[$$sroa$20$0$$sroa_idx32>>2] = $88; $$sroa$21$0$$sroa_idx48 = ((($87)) + 60|0); HEAP32[$$sroa$21$0$$sroa_idx48>>2] = $$0206; $$sroa$29$0$$sroa_idx64 = ((($87)) + 64|0); HEAP32[$$sroa$29$0$$sroa_idx64>>2] = $13; $$0207$sink = $$0207;$$sink = $25;$$sink209 = $104;$$sink211 = $99; $$sroa$34$0$$sroa_idx80 = ((($87)) + 68|0); HEAPF32[$$sroa$34$0$$sroa_idx80>>2] = $25; $$sroa$0$0$$sroa_idx11 = ((($87)) + 72|0); HEAPF32[$$sroa$0$0$$sroa_idx11>>2] = $$sink211; $$sroa$15$0$$sroa_idx27 = ((($87)) + 76|0); HEAP32[$$sroa$15$0$$sroa_idx27>>2] = $$sink209; $$sroa$20$0$$sroa_idx43 = ((($87)) + 80|0); HEAP32[$$sroa$20$0$$sroa_idx43>>2] = $88; $$sroa$21$0$$sroa_idx59 = ((($87)) + 84|0); HEAP32[$$sroa$21$0$$sroa_idx59>>2] = $$0207$sink; $$sroa$29$0$$sroa_idx75 = ((($87)) + 88|0); HEAPF32[$$sroa$29$0$$sroa_idx75>>2] = $18; $$sroa$34$0$$sroa_idx91 = ((($87)) + 92|0); HEAPF32[$$sroa$34$0$$sroa_idx91>>2] = $$sink; $$0204 = ((($87)) + 96|0); HEAP32[$86>>2] = $$0204; return; } } function _Adv_DrawYMin($0) { $0 = $0|0; var $$0 = 0, $$0204 = 0, $$0205 = 0, $$0206 = 0, $$0207 = 0, $$0207$sink = 0, $$sink = 0.0, $$sink208 = 0, $$sink211 = 0.0, $$sroa$0$0$$sroa_idx1 = 0, $$sroa$0$0$$sroa_idx3 = 0, $$sroa$15$0$$sroa_idx17 = 0, $$sroa$15$0$$sroa_idx19 = 0, $$sroa$15$0$$sroa_idx21 = 0, $$sroa$15$0$$sroa_idx23 = 0, $$sroa$15$0$$sroa_idx26 = 0, $$sroa$15$0$$sroa_idx28 = 0, $$sroa$15$0$$sroa_idx30 = 0, $$sroa$16$0$$sroa_idx33 = 0, $$sroa$16$0$$sroa_idx35 = 0; var $$sroa$16$0$$sroa_idx37 = 0, $$sroa$16$0$$sroa_idx39 = 0, $$sroa$16$0$$sroa_idx42 = 0, $$sroa$16$0$$sroa_idx44 = 0, $$sroa$16$0$$sroa_idx46 = 0, $$sroa$21$0$$sroa_idx49 = 0, $$sroa$21$0$$sroa_idx51 = 0, $$sroa$21$0$$sroa_idx53 = 0, $$sroa$21$0$$sroa_idx55 = 0, $$sroa$21$0$$sroa_idx58 = 0, $$sroa$21$0$$sroa_idx60 = 0, $$sroa$21$0$$sroa_idx62 = 0, $$sroa$29$0$$sroa_idx65 = 0, $$sroa$29$0$$sroa_idx67 = 0, $$sroa$29$0$$sroa_idx69 = 0, $$sroa$29$0$$sroa_idx71 = 0, $$sroa$29$0$$sroa_idx74 = 0, $$sroa$29$0$$sroa_idx76 = 0, $$sroa$29$0$$sroa_idx78 = 0, $$sroa$34$0$$sroa_idx81 = 0; var $$sroa$34$0$$sroa_idx83 = 0, $$sroa$34$0$$sroa_idx85 = 0, $$sroa$34$0$$sroa_idx87 = 0, $$sroa$34$0$$sroa_idx92 = 0, $$sroa$34$0$$sroa_idx94 = 0, $1 = 0, $10 = 0.0, $100 = 0, $101 = 0, $102 = 0.0, $103 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0; var $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0; var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0; var $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0.0; var $92 = 0.0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP16[986400]|0; $2 = $1&65535; $3 = ($2*6)|0; $4 = (($3) + 4)|0; $5 = (1162260 + ($4<<1)|0); $6 = HEAP16[$5>>1]|0; $7 = $6&65535; $8 = HEAP32[(1949300)>>2]|0; $9 = $8 & $7; $10 = (+($9|0)); $11 = +HEAPF32[(1949308)>>2]; $12 = $11 * $10; $13 = HEAP32[442734]|0; $14 = (($0) + -1)|0; $15 = (+($14|0)); $16 = +HEAPF32[442737]; $17 = $16 * 0.99937498569488525; $18 = $17 + $15; $19 = +HEAPF32[(1770944)>>2]; $20 = $11 * $19; $21 = $12 + $20; $22 = +HEAPF32[(1770956)>>2]; $23 = $11 * $22; $24 = $23 * 0.99937498569488525; $25 = $12 + $24; $26 = HEAP32[442727]|0; $27 = HEAP32[(1949304)>>2]|0; $28 = ($27)?($7 >>> $27):($7); $29 = (($28) + ($26))|0; $30 = HEAP32[442726]|0; $31 = HEAP32[442740]|0; $32 = (($30) + ($31<<2)|0); $33 = HEAP32[$32>>2]|0; $34 = $33 & 1; $35 = (9)?($33 >>> 9):($33); $36 = $35 & 1; $37 = (3)?($33 >>> 3):($33); $38 = $37 & 1; $39 = (12)?($33 >>> 12):($33); $40 = $39 & 1; $41 = (($38) + ($40))|0; $42 = (($41) + ($34))|0; $43 = (($42) + ($36))|0; $44 = (6)?($33 >>> 6):($33); $45 = $44 & 1; $46 = (15)?($33 >>> 15):($33); $47 = $46 & 1; $48 = (($38) + ($40))|0; $49 = (($48) + ($47))|0; $50 = (($49) + ($45))|0; $51 = (18)?($33 >>> 18):($33); $52 = $51 & 1; $53 = (21)?($33 >>> 21):($33); $54 = $53 & 1; $55 = (($54) + ($40))|0; $56 = (($55) + ($36))|0; $57 = (($56) + ($52))|0; $58 = (24)?($33 >>> 24):($33); $59 = $58 & 1; $60 = (($54) + ($40))|0; $61 = (($60) + ($47))|0; $62 = (($61) + ($59))|0; $63 = HEAP8[1972815]|0; $64 = ($63<<24>>24)==(0); if ($64) { $65 = (164800 + ($57<<2)|0); $66 = HEAP32[$65>>2]|0; $67 = (164800 + ($62<<2)|0); $68 = HEAP32[$67>>2]|0; $69 = (164800 + ($50<<2)|0); $70 = HEAP32[$69>>2]|0; $71 = (164800 + ($43<<2)|0); $72 = HEAP32[$71>>2]|0; $77 = $72;$79 = $70;$81 = $68;$83 = $66; } else { $77 = -1;$79 = -1;$81 = -1;$83 = -1; } $73 = HEAP8[1972816]|0; $74 = ($73<<24>>24)==(0); if ($74) { $$0 = $83;$$0205 = $77;$$0206 = $79;$$0207 = $81; } else { $75 = (1109268 + ($2<<2)|0); $76 = HEAP32[$75>>2]|0; $78 = (_PackedCol_Tint($77,$76)|0); $80 = (_PackedCol_Tint($79,$76)|0); $82 = (_PackedCol_Tint($81,$76)|0); $84 = (_PackedCol_Tint($83,$76)|0); $$0 = $84;$$0205 = $78;$$0206 = $80;$$0207 = $82; } $85 = (((103264 + (($29*60)|0)|0)) + 16|0); $86 = HEAP32[$85>>2]|0; $87 = HEAP32[442729]|0; $88 = (($57) + ($50))|0; $89 = (($43) + ($62))|0; $90 = ($88>>>0)>($89>>>0); if ($90) { $91 = +HEAPF32[442731]; $92 = $91 + $15; $93 = HEAP32[442733]|0; $94 = ((($86)) + 24|0); HEAPF32[$86>>2] = $92; $$sroa$15$0$$sroa_idx30 = ((($86)) + 4|0); HEAP32[$$sroa$15$0$$sroa_idx30>>2] = $87; $$sroa$16$0$$sroa_idx46 = ((($86)) + 8|0); HEAP32[$$sroa$16$0$$sroa_idx46>>2] = $93; $$sroa$21$0$$sroa_idx62 = ((($86)) + 12|0); HEAP32[$$sroa$21$0$$sroa_idx62>>2] = $$0207; $$sroa$29$0$$sroa_idx78 = ((($86)) + 16|0); HEAPF32[$$sroa$29$0$$sroa_idx78>>2] = $18; $$sroa$34$0$$sroa_idx94 = ((($86)) + 20|0); HEAPF32[$$sroa$34$0$$sroa_idx94>>2] = $25; $95 = HEAP32[442728]|0; $96 = ((($86)) + 48|0); HEAP32[$94>>2] = $95; $$sroa$15$0$$sroa_idx28 = ((($86)) + 28|0); HEAP32[$$sroa$15$0$$sroa_idx28>>2] = $87; $$sroa$16$0$$sroa_idx44 = ((($86)) + 32|0); HEAP32[$$sroa$16$0$$sroa_idx44>>2] = $93; $$sroa$21$0$$sroa_idx60 = ((($86)) + 36|0); HEAP32[$$sroa$21$0$$sroa_idx60>>2] = $$0; $$sroa$29$0$$sroa_idx76 = ((($86)) + 40|0); HEAP32[$$sroa$29$0$$sroa_idx76>>2] = $13; $$sroa$34$0$$sroa_idx92 = ((($86)) + 44|0); HEAPF32[$$sroa$34$0$$sroa_idx92>>2] = $25; $97 = HEAP32[442730]|0; HEAP32[$96>>2] = $95; $$sroa$15$0$$sroa_idx26 = ((($86)) + 52|0); HEAP32[$$sroa$15$0$$sroa_idx26>>2] = $87; $$sroa$16$0$$sroa_idx42 = ((($86)) + 56|0); HEAP32[$$sroa$16$0$$sroa_idx42>>2] = $97; $$sroa$21$0$$sroa_idx58 = ((($86)) + 60|0); HEAP32[$$sroa$21$0$$sroa_idx58>>2] = $$0205; $$sroa$29$0$$sroa_idx74 = ((($86)) + 64|0); HEAP32[$$sroa$29$0$$sroa_idx74>>2] = $13; $$0207$sink = $$0206;$$sink = $21;$$sink208 = $97;$$sink211 = $92; $$sroa$34$0$$sroa_idx83 = ((($86)) + 68|0); HEAPF32[$$sroa$34$0$$sroa_idx83>>2] = $21; $$sroa$0$0$$sroa_idx1 = ((($86)) + 72|0); HEAPF32[$$sroa$0$0$$sroa_idx1>>2] = $$sink211; $$sroa$15$0$$sroa_idx17 = ((($86)) + 76|0); HEAP32[$$sroa$15$0$$sroa_idx17>>2] = $87; $$sroa$16$0$$sroa_idx33 = ((($86)) + 80|0); HEAP32[$$sroa$16$0$$sroa_idx33>>2] = $$sink208; $$sroa$21$0$$sroa_idx49 = ((($86)) + 84|0); HEAP32[$$sroa$21$0$$sroa_idx49>>2] = $$0207$sink; $$sroa$29$0$$sroa_idx65 = ((($86)) + 88|0); HEAPF32[$$sroa$29$0$$sroa_idx65>>2] = $18; $$sroa$34$0$$sroa_idx81 = ((($86)) + 92|0); HEAPF32[$$sroa$34$0$$sroa_idx81>>2] = $$sink; $$0204 = ((($86)) + 96|0); HEAP32[$85>>2] = $$0204; return; } else { $98 = HEAP32[442728]|0; $99 = HEAP32[442733]|0; $100 = ((($86)) + 24|0); HEAP32[$86>>2] = $98; $$sroa$15$0$$sroa_idx23 = ((($86)) + 4|0); HEAP32[$$sroa$15$0$$sroa_idx23>>2] = $87; $$sroa$16$0$$sroa_idx39 = ((($86)) + 8|0); HEAP32[$$sroa$16$0$$sroa_idx39>>2] = $99; $$sroa$21$0$$sroa_idx55 = ((($86)) + 12|0); HEAP32[$$sroa$21$0$$sroa_idx55>>2] = $$0; $$sroa$29$0$$sroa_idx71 = ((($86)) + 16|0); HEAP32[$$sroa$29$0$$sroa_idx71>>2] = $13; $$sroa$34$0$$sroa_idx87 = ((($86)) + 20|0); HEAPF32[$$sroa$34$0$$sroa_idx87>>2] = $25; $101 = HEAP32[442730]|0; HEAP32[$100>>2] = $98; $$sroa$15$0$$sroa_idx21 = ((($86)) + 28|0); HEAP32[$$sroa$15$0$$sroa_idx21>>2] = $87; $$sroa$16$0$$sroa_idx37 = ((($86)) + 32|0); HEAP32[$$sroa$16$0$$sroa_idx37>>2] = $101; $$sroa$21$0$$sroa_idx53 = ((($86)) + 36|0); HEAP32[$$sroa$21$0$$sroa_idx53>>2] = $$0205; $$sroa$29$0$$sroa_idx69 = ((($86)) + 40|0); HEAP32[$$sroa$29$0$$sroa_idx69>>2] = $13; $$sroa$34$0$$sroa_idx85 = ((($86)) + 44|0); HEAPF32[$$sroa$34$0$$sroa_idx85>>2] = $21; $102 = +HEAPF32[442731]; $103 = $102 + $15; $$sroa$0$0$$sroa_idx3 = ((($86)) + 48|0); HEAPF32[$$sroa$0$0$$sroa_idx3>>2] = $103; $$sroa$15$0$$sroa_idx19 = ((($86)) + 52|0); HEAP32[$$sroa$15$0$$sroa_idx19>>2] = $87; $$sroa$16$0$$sroa_idx35 = ((($86)) + 56|0); HEAP32[$$sroa$16$0$$sroa_idx35>>2] = $101; $$sroa$21$0$$sroa_idx51 = ((($86)) + 60|0); HEAP32[$$sroa$21$0$$sroa_idx51>>2] = $$0206; $$sroa$29$0$$sroa_idx67 = ((($86)) + 64|0); HEAPF32[$$sroa$29$0$$sroa_idx67>>2] = $18; $$0207$sink = $$0207;$$sink = $25;$$sink208 = $99;$$sink211 = $103; $$sroa$34$0$$sroa_idx83 = ((($86)) + 68|0); HEAPF32[$$sroa$34$0$$sroa_idx83>>2] = $21; $$sroa$0$0$$sroa_idx1 = ((($86)) + 72|0); HEAPF32[$$sroa$0$0$$sroa_idx1>>2] = $$sink211; $$sroa$15$0$$sroa_idx17 = ((($86)) + 76|0); HEAP32[$$sroa$15$0$$sroa_idx17>>2] = $87; $$sroa$16$0$$sroa_idx33 = ((($86)) + 80|0); HEAP32[$$sroa$16$0$$sroa_idx33>>2] = $$sink208; $$sroa$21$0$$sroa_idx49 = ((($86)) + 84|0); HEAP32[$$sroa$21$0$$sroa_idx49>>2] = $$0207$sink; $$sroa$29$0$$sroa_idx65 = ((($86)) + 88|0); HEAPF32[$$sroa$29$0$$sroa_idx65>>2] = $18; $$sroa$34$0$$sroa_idx81 = ((($86)) + 92|0); HEAPF32[$$sroa$34$0$$sroa_idx81>>2] = $$sink; $$0204 = ((($86)) + 96|0); HEAP32[$85>>2] = $$0204; return; } } function _Adv_DrawYMax($0) { $0 = $0|0; var $$0 = 0, $$0204 = 0, $$0205 = 0, $$0206 = 0, $$0207 = 0, $$0207$sink = 0, $$sink = 0.0, $$sink208 = 0, $$sink211 = 0.0, $$sroa$0$0$$sroa_idx1 = 0, $$sroa$0$0$$sroa_idx3 = 0, $$sroa$15$0$$sroa_idx17 = 0, $$sroa$15$0$$sroa_idx19 = 0, $$sroa$15$0$$sroa_idx21 = 0, $$sroa$15$0$$sroa_idx23 = 0, $$sroa$15$0$$sroa_idx26 = 0, $$sroa$15$0$$sroa_idx28 = 0, $$sroa$15$0$$sroa_idx30 = 0, $$sroa$16$0$$sroa_idx33 = 0, $$sroa$16$0$$sroa_idx35 = 0; var $$sroa$16$0$$sroa_idx37 = 0, $$sroa$16$0$$sroa_idx39 = 0, $$sroa$16$0$$sroa_idx42 = 0, $$sroa$16$0$$sroa_idx44 = 0, $$sroa$16$0$$sroa_idx46 = 0, $$sroa$21$0$$sroa_idx49 = 0, $$sroa$21$0$$sroa_idx51 = 0, $$sroa$21$0$$sroa_idx53 = 0, $$sroa$21$0$$sroa_idx55 = 0, $$sroa$21$0$$sroa_idx58 = 0, $$sroa$21$0$$sroa_idx60 = 0, $$sroa$21$0$$sroa_idx62 = 0, $$sroa$29$0$$sroa_idx65 = 0, $$sroa$29$0$$sroa_idx67 = 0, $$sroa$29$0$$sroa_idx69 = 0, $$sroa$29$0$$sroa_idx71 = 0, $$sroa$29$0$$sroa_idx74 = 0, $$sroa$29$0$$sroa_idx76 = 0, $$sroa$29$0$$sroa_idx78 = 0, $$sroa$34$0$$sroa_idx81 = 0; var $$sroa$34$0$$sroa_idx83 = 0, $$sroa$34$0$$sroa_idx85 = 0, $$sroa$34$0$$sroa_idx87 = 0, $$sroa$34$0$$sroa_idx92 = 0, $$sroa$34$0$$sroa_idx94 = 0, $1 = 0, $10 = 0.0, $100 = 0, $101 = 0, $102 = 0, $103 = 0.0, $104 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0; var $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; var $91 = 0, $92 = 0.0, $93 = 0.0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP16[986400]|0; $2 = $1&65535; $3 = ($2*6)|0; $4 = (($3) + 5)|0; $5 = (1162260 + ($4<<1)|0); $6 = HEAP16[$5>>1]|0; $7 = $6&65535; $8 = HEAP32[(1949300)>>2]|0; $9 = $8 & $7; $10 = (+($9|0)); $11 = +HEAPF32[(1949308)>>2]; $12 = $11 * $10; $13 = HEAP32[442734]|0; $14 = (($0) + -1)|0; $15 = (+($14|0)); $16 = +HEAPF32[442737]; $17 = $16 * 0.99937498569488525; $18 = $17 + $15; $19 = +HEAPF32[(1770944)>>2]; $20 = $11 * $19; $21 = $12 + $20; $22 = +HEAPF32[(1770956)>>2]; $23 = $11 * $22; $24 = $23 * 0.99937498569488525; $25 = $12 + $24; $26 = HEAP32[442727]|0; $27 = HEAP32[(1949304)>>2]|0; $28 = ($27)?($7 >>> $27):($7); $29 = (($28) + ($26))|0; $30 = HEAP32[442726]|0; $31 = HEAP32[442740]|0; $32 = (($30) + ($31<<2)|0); $33 = HEAP32[$32>>2]|0; $34 = (2)?($33 >>> 2):($33); $35 = $34 & 1; $36 = (11)?($33 >>> 11):($33); $37 = $36 & 1; $38 = (5)?($33 >>> 5):($33); $39 = $38 & 1; $40 = (14)?($33 >>> 14):($33); $41 = $40 & 1; $42 = (($39) + ($41))|0; $43 = (($42) + ($37))|0; $44 = (($43) + ($35))|0; $45 = (8)?($33 >>> 8):($33); $46 = $45 & 1; $47 = (17)?($33 >>> 17):($33); $48 = $47 & 1; $49 = (($39) + ($41))|0; $50 = (($49) + ($48))|0; $51 = (($50) + ($46))|0; $52 = (20)?($33 >>> 20):($33); $53 = $52 & 1; $54 = (23)?($33 >>> 23):($33); $55 = $54 & 1; $56 = (($55) + ($41))|0; $57 = (($56) + ($37))|0; $58 = (($57) + ($53))|0; $59 = (26)?($33 >>> 26):($33); $60 = $59 & 1; $61 = (($55) + ($41))|0; $62 = (($61) + ($48))|0; $63 = (($62) + ($60))|0; $64 = HEAP8[1972815]|0; $65 = ($64<<24>>24)==(0); if ($65) { $66 = (164704 + ($44<<2)|0); $67 = HEAP32[$66>>2]|0; $68 = (164704 + ($51<<2)|0); $69 = HEAP32[$68>>2]|0; $70 = (164704 + ($63<<2)|0); $71 = HEAP32[$70>>2]|0; $72 = (164704 + ($58<<2)|0); $73 = HEAP32[$72>>2]|0; $78 = $67;$80 = $69;$82 = $71;$84 = $73; } else { $78 = -1;$80 = -1;$82 = -1;$84 = -1; } $74 = HEAP8[1972816]|0; $75 = ($74<<24>>24)==(0); if ($75) { $$0 = $78;$$0205 = $84;$$0206 = $82;$$0207 = $80; } else { $76 = (1109268 + ($2<<2)|0); $77 = HEAP32[$76>>2]|0; $79 = (_PackedCol_Tint($78,$77)|0); $81 = (_PackedCol_Tint($80,$77)|0); $83 = (_PackedCol_Tint($82,$77)|0); $85 = (_PackedCol_Tint($84,$77)|0); $$0 = $79;$$0205 = $85;$$0206 = $83;$$0207 = $81; } $86 = (((103264 + (($29*60)|0)|0)) + 20|0); $87 = HEAP32[$86>>2]|0; $88 = HEAP32[442732]|0; $89 = (($44) + ($63))|0; $90 = (($58) + ($51))|0; $91 = ($89>>>0)>($90>>>0); if ($91) { $92 = +HEAPF32[442731]; $93 = $92 + $15; $94 = HEAP32[442730]|0; $95 = ((($87)) + 24|0); HEAPF32[$87>>2] = $93; $$sroa$15$0$$sroa_idx30 = ((($87)) + 4|0); HEAP32[$$sroa$15$0$$sroa_idx30>>2] = $88; $$sroa$16$0$$sroa_idx46 = ((($87)) + 8|0); HEAP32[$$sroa$16$0$$sroa_idx46>>2] = $94; $$sroa$21$0$$sroa_idx62 = ((($87)) + 12|0); HEAP32[$$sroa$21$0$$sroa_idx62>>2] = $$0207; $$sroa$29$0$$sroa_idx78 = ((($87)) + 16|0); HEAPF32[$$sroa$29$0$$sroa_idx78>>2] = $18; $$sroa$34$0$$sroa_idx94 = ((($87)) + 20|0); HEAPF32[$$sroa$34$0$$sroa_idx94>>2] = $21; $96 = HEAP32[442728]|0; $97 = ((($87)) + 48|0); HEAP32[$95>>2] = $96; $$sroa$15$0$$sroa_idx28 = ((($87)) + 28|0); HEAP32[$$sroa$15$0$$sroa_idx28>>2] = $88; $$sroa$16$0$$sroa_idx44 = ((($87)) + 32|0); HEAP32[$$sroa$16$0$$sroa_idx44>>2] = $94; $$sroa$21$0$$sroa_idx60 = ((($87)) + 36|0); HEAP32[$$sroa$21$0$$sroa_idx60>>2] = $$0; $$sroa$29$0$$sroa_idx76 = ((($87)) + 40|0); HEAP32[$$sroa$29$0$$sroa_idx76>>2] = $13; $$sroa$34$0$$sroa_idx92 = ((($87)) + 44|0); HEAPF32[$$sroa$34$0$$sroa_idx92>>2] = $21; $98 = HEAP32[442733]|0; HEAP32[$97>>2] = $96; $$sroa$15$0$$sroa_idx26 = ((($87)) + 52|0); HEAP32[$$sroa$15$0$$sroa_idx26>>2] = $88; $$sroa$16$0$$sroa_idx42 = ((($87)) + 56|0); HEAP32[$$sroa$16$0$$sroa_idx42>>2] = $98; $$sroa$21$0$$sroa_idx58 = ((($87)) + 60|0); HEAP32[$$sroa$21$0$$sroa_idx58>>2] = $$0205; $$sroa$29$0$$sroa_idx74 = ((($87)) + 64|0); HEAP32[$$sroa$29$0$$sroa_idx74>>2] = $13; $$0207$sink = $$0206;$$sink = $25;$$sink208 = $98;$$sink211 = $93; $$sroa$34$0$$sroa_idx83 = ((($87)) + 68|0); HEAPF32[$$sroa$34$0$$sroa_idx83>>2] = $25; $$sroa$0$0$$sroa_idx1 = ((($87)) + 72|0); HEAPF32[$$sroa$0$0$$sroa_idx1>>2] = $$sink211; $$sroa$15$0$$sroa_idx17 = ((($87)) + 76|0); HEAP32[$$sroa$15$0$$sroa_idx17>>2] = $88; $$sroa$16$0$$sroa_idx33 = ((($87)) + 80|0); HEAP32[$$sroa$16$0$$sroa_idx33>>2] = $$sink208; $$sroa$21$0$$sroa_idx49 = ((($87)) + 84|0); HEAP32[$$sroa$21$0$$sroa_idx49>>2] = $$0207$sink; $$sroa$29$0$$sroa_idx65 = ((($87)) + 88|0); HEAPF32[$$sroa$29$0$$sroa_idx65>>2] = $18; $$sroa$34$0$$sroa_idx81 = ((($87)) + 92|0); HEAPF32[$$sroa$34$0$$sroa_idx81>>2] = $$sink; $$0204 = ((($87)) + 96|0); HEAP32[$86>>2] = $$0204; return; } else { $99 = HEAP32[442728]|0; $100 = HEAP32[442730]|0; $101 = ((($87)) + 24|0); HEAP32[$87>>2] = $99; $$sroa$15$0$$sroa_idx23 = ((($87)) + 4|0); HEAP32[$$sroa$15$0$$sroa_idx23>>2] = $88; $$sroa$16$0$$sroa_idx39 = ((($87)) + 8|0); HEAP32[$$sroa$16$0$$sroa_idx39>>2] = $100; $$sroa$21$0$$sroa_idx55 = ((($87)) + 12|0); HEAP32[$$sroa$21$0$$sroa_idx55>>2] = $$0; $$sroa$29$0$$sroa_idx71 = ((($87)) + 16|0); HEAP32[$$sroa$29$0$$sroa_idx71>>2] = $13; $$sroa$34$0$$sroa_idx87 = ((($87)) + 20|0); HEAPF32[$$sroa$34$0$$sroa_idx87>>2] = $21; $102 = HEAP32[442733]|0; HEAP32[$101>>2] = $99; $$sroa$15$0$$sroa_idx21 = ((($87)) + 28|0); HEAP32[$$sroa$15$0$$sroa_idx21>>2] = $88; $$sroa$16$0$$sroa_idx37 = ((($87)) + 32|0); HEAP32[$$sroa$16$0$$sroa_idx37>>2] = $102; $$sroa$21$0$$sroa_idx53 = ((($87)) + 36|0); HEAP32[$$sroa$21$0$$sroa_idx53>>2] = $$0205; $$sroa$29$0$$sroa_idx69 = ((($87)) + 40|0); HEAP32[$$sroa$29$0$$sroa_idx69>>2] = $13; $$sroa$34$0$$sroa_idx85 = ((($87)) + 44|0); HEAPF32[$$sroa$34$0$$sroa_idx85>>2] = $25; $103 = +HEAPF32[442731]; $104 = $103 + $15; $$sroa$0$0$$sroa_idx3 = ((($87)) + 48|0); HEAPF32[$$sroa$0$0$$sroa_idx3>>2] = $104; $$sroa$15$0$$sroa_idx19 = ((($87)) + 52|0); HEAP32[$$sroa$15$0$$sroa_idx19>>2] = $88; $$sroa$16$0$$sroa_idx35 = ((($87)) + 56|0); HEAP32[$$sroa$16$0$$sroa_idx35>>2] = $102; $$sroa$21$0$$sroa_idx51 = ((($87)) + 60|0); HEAP32[$$sroa$21$0$$sroa_idx51>>2] = $$0206; $$sroa$29$0$$sroa_idx67 = ((($87)) + 64|0); HEAPF32[$$sroa$29$0$$sroa_idx67>>2] = $18; $$0207$sink = $$0207;$$sink = $21;$$sink208 = $100;$$sink211 = $104; $$sroa$34$0$$sroa_idx83 = ((($87)) + 68|0); HEAPF32[$$sroa$34$0$$sroa_idx83>>2] = $25; $$sroa$0$0$$sroa_idx1 = ((($87)) + 72|0); HEAPF32[$$sroa$0$0$$sroa_idx1>>2] = $$sink211; $$sroa$15$0$$sroa_idx17 = ((($87)) + 76|0); HEAP32[$$sroa$15$0$$sroa_idx17>>2] = $88; $$sroa$16$0$$sroa_idx33 = ((($87)) + 80|0); HEAP32[$$sroa$16$0$$sroa_idx33>>2] = $$sink208; $$sroa$21$0$$sroa_idx49 = ((($87)) + 84|0); HEAP32[$$sroa$21$0$$sroa_idx49>>2] = $$0207$sink; $$sroa$29$0$$sroa_idx65 = ((($87)) + 88|0); HEAPF32[$$sroa$29$0$$sroa_idx65>>2] = $18; $$sroa$34$0$$sroa_idx81 = ((($87)) + 92|0); HEAPF32[$$sroa$34$0$$sroa_idx81>>2] = $$sink; $$0204 = ((($87)) + 96|0); HEAP32[$86>>2] = $$0204; return; } } function _Adv_ComputeLightFlags($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; $4 = HEAP8[1972815]|0; $5 = ($4<<24>>24)==(0); if (!($5)) { $$0 = 67108863; return ($$0|0); } $6 = (($0) + -1)|0; $7 = (($2) + -1)|0; $8 = (($3) + -1)|0; $9 = (($3) + -19)|0; $10 = (_Adv_Lit($6,$1,$7,$9)|0); $11 = (_Adv_Lit($6,$1,$2,$8)|0); $12 = $11 << 9; $13 = $12 | $10; $14 = (($2) + 1)|0; $15 = (($3) + 17)|0; $16 = (_Adv_Lit($6,$1,$14,$15)|0); $17 = $16 << 18; $18 = $13 | $17; $19 = (($3) + -18)|0; $20 = (_Adv_Lit($0,$1,$7,$19)|0); $21 = $20 << 3; $22 = $18 | $21; $23 = (_Adv_Lit($0,$1,$2,$3)|0); $24 = $23 << 12; $25 = $22 | $24; $26 = (($3) + 18)|0; $27 = (_Adv_Lit($0,$1,$14,$26)|0); $28 = $27 << 21; $29 = $25 | $28; $30 = (($0) + 1)|0; $31 = (($3) + 1)|0; $32 = (($3) + -17)|0; $33 = (_Adv_Lit($30,$1,$7,$32)|0); $34 = $33 << 6; $35 = $29 | $34; $36 = (_Adv_Lit($30,$1,$2,$31)|0); $37 = $36 << 15; $38 = $35 | $37; $39 = (($3) + 19)|0; $40 = (_Adv_Lit($30,$1,$14,$39)|0); $41 = $40 << 24; $42 = $38 | $41; $$0 = $42; return ($$0|0); } function _Adv_CanStretch($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $6 = HEAP32[442719]|0; $7 = (($6) + ($1<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = (_Adv_ComputeLightFlags($2,$3,$4,$1)|0); $10 = HEAP32[442726]|0; $11 = (($10) + ($1<<2)|0); HEAP32[$11>>2] = $9; $12 = ($8<<16>>16)==($0<<16>>16); if (!($12)) { $37 = 0; return ($37|0); } $13 = $8&65535; $14 = ($13*768)|0; $15 = HEAP32[442719]|0; $16 = $5&255; $17 = (1904 + ($16<<2)|0); $18 = HEAP32[$17>>2]|0; $19 = (($18) + ($1))|0; $20 = (($15) + ($19<<1)|0); $21 = HEAP16[$20>>1]|0; $22 = $21&65535; $23 = (($14) + ($22))|0; $24 = (1173012 + ($23)|0); $25 = HEAP8[$24>>0]|0; $26 = $25&255; $27 = 1 << $16; $28 = $27 & $26; $29 = ($28|0)==(0); if (!($29)) { $37 = 0; return ($37|0); } $30 = HEAP32[442741]|0; $31 = ($30|0)==($9|0); if (!($31)) { $37 = 0; return ($37|0); } $32 = ($30|0)==(0); if ($32) { $37 = 1; return ($37|0); } $33 = (1936 + ($16<<2)|0); $34 = HEAP32[$33>>2]|0; $35 = $34 & $30; $36 = ($35|0)==($34|0); $phitmp = $36&1; $37 = $phitmp; return ($37|0); } function _Adv_Lit($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $spec$select = 0, $spec$select41 = 0, $spec$select42 = 0; var label = 0, sp = 0; sp = STACKTOP; $4 = ($1|0)>(-1); $5 = HEAP32[(1103568)>>2]|0; $6 = ($5|0)>($1|0); $or$cond = $4 & $6; if (!($or$cond)) { $$0 = 7; return ($$0|0); } $7 = (_World_ContainsXZ($0,$2)|0); $8 = ($7<<24>>24)==(0); if ($8) { $9 = HEAP32[442711]|0; $10 = ($9|0)>($1|0); $11 = (($9) + -1)|0; $12 = ($11|0)==($1|0); $13 = $12 ? 6 : 0; $spec$select42 = $10 ? $13 : 7; return ($spec$select42|0); } $14 = HEAP32[442719]|0; $15 = (($14) + ($3<<1)|0); $16 = HEAP16[$15>>1]|0; $17 = $16&65535; $18 = (1120020 + ($17)|0); $19 = HEAP8[$18>>0]|0; $20 = $19&255; $21 = (6)?($20 >>> 6):($20); $22 = $21 & 1; $23 = (($1) - ($22))|0; $24 = (_ClassicLighting_IsLit_Fast($0,$23,$2)|0); $25 = ($24<<24>>24)!=(0); $26 = $25&1; $27 = (_ClassicLighting_IsLit_Fast($0,$1,$2)|0); $28 = ($27<<24>>24)==(0); $29 = $28 ? 0 : 2; $30 = $29 | $26; $31 = (($1) + 1)|0; $32 = (($31) - ($22))|0; $33 = (_ClassicLighting_IsLit_Fast($0,$32,$2)|0); $34 = ($33<<24>>24)==(0); $35 = $34 ? 0 : 4; $36 = $30 | $35; $37 = HEAP32[442719]|0; $38 = (($3) + -324)|0; $39 = (($37) + ($38<<1)|0); $40 = HEAP16[$39>>1]|0; $41 = $40&65535; $42 = (1108500 + ($41)|0); $43 = HEAP8[$42>>0]|0; $44 = ($43<<24>>24)!=(0); $45 = $44&1; $spec$select = $36 | $45; $46 = (1108500 + ($17)|0); $47 = HEAP8[$46>>0]|0; $48 = ($47<<24>>24)==(0); $49 = $spec$select | 2; $$1 = $48 ? $spec$select : $49; $50 = (($3) + 324)|0; $51 = (($37) + ($50<<1)|0); $52 = HEAP16[$51>>1]|0; $53 = $52&65535; $54 = (1108500 + ($53)|0); $55 = HEAP8[$54>>0]|0; $56 = ($55<<24>>24)==(0); $57 = $$1 | 4; $spec$select41 = $56 ? $$1 : $57; $$0 = $spec$select41; return ($$0|0); } function _World_ContainsXZ($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = ($2>>>0)>($0>>>0); $4 = HEAP32[(1103572)>>2]|0; $5 = ($4>>>0)>($1>>>0); $narrow = $3 & $5; $6 = $narrow&1; return ($6|0); } function _Builder_MakeChunk($0) { $0 = $0|0; var $$036 = 0, $$pr = 0, $$pr37 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 5|0; $2 = sp + 4|0; $3 = sp; $4 = HEAP16[$0>>1]|0; $5 = $4&65535; $6 = (($5) + -8)|0; $7 = ((($0)) + 2|0); $8 = HEAP16[$7>>1]|0; $9 = $8&65535; $10 = (($9) + -8)|0; $11 = ((($0)) + 4|0); $12 = HEAP16[$11>>1]|0; $13 = $12&65535; $14 = (($13) + -8)|0; $15 = (_BuildChunk($6,$10,$14,$0)|0); $16 = ($15<<24>>24)==(0); if ($16) { STACKTOP = sp;return; } $17 = (4)?($14 >> 4):($14); $18 = HEAP32[(1103636)>>2]|0; $19 = Math_imul($18, $17)|0; $20 = (4)?($10 >> 4):($10); $21 = (($19) + ($20))|0; $22 = HEAP32[(1103632)>>2]|0; $23 = Math_imul($21, $22)|0; $24 = (4)?($6 >> 4):($6); $25 = (($23) + ($24))|0; HEAP32[$3>>2] = 0; HEAP8[$1>>0] = 0; HEAP8[$2>>0] = 0; $26 = HEAP32[452782]|0; $27 = ($26|0)>(0); if (!($27)) { STACKTOP = sp;return; } $$036 = 0; while(1) { $28 = (($$036) + 512)|0; $29 = HEAP32[(1103644)>>2]|0; $30 = Math_imul($29, $$036)|0; $31 = (($30) + ($25))|0; $32 = (103264 + (($$036*60)|0)|0); $33 = HEAP32[452791]|0; $34 = (($33) + (($31*20)|0)|0); _SetPartInfo($32,$3,$34,$1); $35 = (103264 + (($28*60)|0)|0); $36 = HEAP32[452792]|0; $37 = (($36) + (($31*20)|0)|0); _SetPartInfo($35,$3,$37,$2); $38 = (($$036) + 1)|0; $39 = HEAP32[452782]|0; $40 = ($38|0)<($39|0); if ($40) { $$036 = $38; } else { break; } } $$pr = HEAP8[$1>>0]|0; $41 = ($$pr<<24>>24)==(0); if (!($41)) { $42 = HEAP32[452791]|0; $43 = (($42) + (($25*20)|0)|0); $44 = ((($0)) + 12|0); HEAP32[$44>>2] = $43; } $$pr37 = HEAP8[$2>>0]|0; $45 = ($$pr37<<24>>24)==(0); if ($45) { STACKTOP = sp;return; } $46 = HEAP32[452792]|0; $47 = (($46) + (($25*20)|0)|0); $48 = ((($0)) + 16|0); HEAP32[$48>>2] = $47; STACKTOP = sp;return; } function _BuildChunk($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0101 = 0, $$085106 = 0, $$08699 = 0, $$087100 = 0, $$088105 = 0, $$08998 = 0, $$090 = 0, $$09197 = 0, $$092 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0; var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond3 = 0, $or$cond96 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 59584|0; $4 = sp + 47904|0; $5 = sp + 23328|0; $6 = sp; $7 = sp + 59568|0; HEAP32[442719] = $4; HEAP32[442716] = $5; HEAP32[442725] = $6; $8 = HEAP32[442724]|0; FUNCTION_TABLE_v[$8 & 127](); $9 = ($0|0)==(0); $10 = ($1|0)==(0); $or$cond = $9 | $10; $11 = ($2|0)==(0); $or$cond3 = $or$cond | $11; if ($or$cond3) { label = 5; } else { $12 = (($0) + 16)|0; $13 = HEAP32[(1103564)>>2]|0; $14 = ($12|0)<($13|0); if ($14) { $15 = (($1) + 16)|0; $16 = HEAP32[(1103568)>>2]|0; $17 = ($15|0)<($16|0); if ($17) { $18 = (($2) + 16)|0; $19 = HEAP32[(1103572)>>2]|0; $20 = ($18|0)<($19|0); if ($20) { $21 = (_ReadChunkData($0,$1,$2,$7)|0); $phitmp = ($21<<24>>24)==(0); $$092 = $phitmp; } else { label = 5; } } else { label = 5; } } else { label = 5; } } if ((label|0) == 5) { _Mem_Set($4,0,11664); _ReadBorderChunkData($0,$1,$2,$7); $$092 = 1; } $22 = HEAP8[$7>>0]|0; $23 = ((($3)) + 6|0); $24 = HEAP8[$23>>0]|0; $25 = ($22 << 3)&255; $26 = $25 & 8; $27 = $24 & -9; $28 = $27 | $26; HEAP8[$23>>0] = $28; $29 = ($22<<24>>24)==(0); $or$cond96 = $$092 & $29; if (!($or$cond96)) { $$090 = 0; STACKTOP = sp;return ($$090|0); } $30 = (($0) + -1)|0; $31 = (($2) + -1)|0; _ClassicLighting_LightHint($30,$31); _Mem_Set($5,1,24576); $32 = HEAP32[(1103564)>>2]|0; $33 = (($0) + 16)|0; $34 = ($32|0)<($33|0); $35 = $34 ? $32 : $33; $36 = HEAP32[(1103568)>>2]|0; $37 = (($1) + 16)|0; $38 = ($36|0)<($37|0); $39 = $38 ? $36 : $37; $40 = HEAP32[(1103572)>>2]|0; $41 = (($2) + 16)|0; $42 = ($40|0)<($41|0); $43 = $42 ? $40 : $41; HEAP32[442723] = $35; HEAP32[442718] = $43; _PrepareChunk($0,$1,$2); $44 = (_Builder_TotalVerticesCount()|0); $45 = ($44|0)==(0); if ($45) { $$090 = 0; STACKTOP = sp;return ($$090|0); } $46 = ((($3)) + 8|0); $47 = (($44) + 1)|0; $48 = (_Gfx_RecreateAndLockVb($46,1,$47)|0); HEAP32[442717] = $48; _DefaultPostStretchChunk(); $49 = ($39|0)>($1|0); if ($49) { $50 = ($43|0)>($2|0); $51 = ($35|0)>($0|0); $$085106 = 0;$$088105 = $1; while(1) { if ($50) { $52 = ($$085106*324)|0; $53 = (($52) + 324)|0; $54 = $$085106 << 8; $$0101 = 0;$$087100 = $2; while(1) { $55 = (($$0101) + 1)|0; if ($51) { $56 = ($55*18)|0; $57 = (($53) + ($56))|0; $58 = $57 | 1; $59 = $$0101 << 4; $60 = $59 | $54; $$08699 = 0;$$08998 = $0;$$09197 = $58; while(1) { $61 = (($4) + ($$09197<<1)|0); $62 = HEAP16[$61>>1]|0; HEAP16[986400] = $62; $63 = $62&65535; $64 = (1120788 + ($63)|0); $65 = HEAP8[$64>>0]|0; $66 = ($65<<24>>24)==(4); if (!($66)) { $67 = $60 | $$08699; $68 = ($67*6)|0; HEAP32[442740] = $$09197; $69 = HEAP32[442715]|0; FUNCTION_TABLE_viiii[$69 & 31]($68,$$08998,$$088105,$$087100); } $70 = (($$08998) + 1)|0; $71 = (($$08699) + 1)|0; $72 = (($$09197) + 1)|0; $73 = ($70|0)<($35|0); if ($73) { $$08699 = $71;$$08998 = $70;$$09197 = $72; } else { break; } } } $74 = (($$087100) + 1)|0; $75 = ($74|0)<($43|0); if ($75) { $$0101 = $55;$$087100 = $74; } else { break; } } } $76 = (($$088105) + 1)|0; $77 = (($$085106) + 1)|0; $78 = ($76|0)<($39|0); if ($78) { $$085106 = $77;$$088105 = $76; } else { break; } } } $79 = HEAP32[$46>>2]|0; _Gfx_UnlockVb($79); $$090 = 1; STACKTOP = sp;return ($$090|0); } function _SetPartInfo($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_Builder1DPart_VerticesCount($0)|0); HEAP32[$2>>2] = -1; $5 = ($4|0)==(0); if ($5) { return; } $6 = HEAP32[$1>>2]|0; HEAP32[$2>>2] = $6; $7 = HEAP32[$1>>2]|0; $8 = (($7) + ($4))|0; HEAP32[$1>>2] = $8; HEAP8[$3>>0] = 1; $9 = ((($0)) + 24|0); $10 = HEAP32[$9>>2]|0; $11 = $10&65535; $12 = ((($2)) + 8|0); HEAP16[$12>>1] = $11; $13 = ((($0)) + 28|0); $14 = HEAP32[$13>>2]|0; $15 = $14&65535; $16 = ((($2)) + 10|0); HEAP16[$16>>1] = $15; $17 = ((($0)) + 32|0); $18 = HEAP32[$17>>2]|0; $19 = $18&65535; $20 = ((($2)) + 12|0); HEAP16[$20>>1] = $19; $21 = ((($0)) + 36|0); $22 = HEAP32[$21>>2]|0; $23 = $22&65535; $24 = ((($2)) + 14|0); HEAP16[$24>>1] = $23; $25 = ((($0)) + 40|0); $26 = HEAP32[$25>>2]|0; $27 = $26&65535; $28 = ((($2)) + 16|0); HEAP16[$28>>1] = $27; $29 = ((($0)) + 44|0); $30 = HEAP32[$29>>2]|0; $31 = $30&65535; $32 = ((($2)) + 18|0); HEAP16[$32>>1] = $31; $33 = ((($0)) + 48|0); $34 = HEAP32[$33>>2]|0; $35 = ((($2)) + 4|0); HEAP32[$35>>2] = $34; return; } function _Builder1DPart_VerticesCount($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 48|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 24|0); $4 = HEAP32[$3>>2]|0; $5 = (($4) + ($2))|0; $6 = ((($0)) + 28|0); $7 = HEAP32[$6>>2]|0; $8 = (($7) + ($5))|0; $9 = ((($0)) + 32|0); $10 = HEAP32[$9>>2]|0; $11 = (($10) + ($8))|0; $12 = ((($0)) + 36|0); $13 = HEAP32[$12>>2]|0; $14 = (($13) + ($11))|0; $15 = ((($0)) + 40|0); $16 = HEAP32[$15>>2]|0; $17 = (($16) + ($14))|0; $18 = ((($0)) + 44|0); $19 = HEAP32[$18>>2]|0; $20 = (($19) + ($17))|0; return ($20|0); } function _ReadBorderChunkData($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$012 = 0, $$08614 = 0, $$08810 = 0, $$0908 = 0, $$0927 = 0, $$09413 = 0, $$10 = 0, $$11 = 0, $$12 = 0, $$121 = 0, $$18723 = 0, $$18919 = 0, $$19117 = 0, $$19316 = 0, $$19511 = 0, $$26 = 0, $$3 = 0, $$4 = 0, $$5 = 0, $$622 = 0; var $$720 = 0, $$815 = 0, $$9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0; var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[275888]|0; $5 = HEAP32[(1103608)>>2]|0; $6 = ($5|0)<(256); if ($6) { $7 = (($0) + -1)|0; $8 = HEAP32[442719]|0; $$08614 = -1;$$09413 = 1; L3: while(1) { $9 = (($$08614) + ($1))|0; $10 = ($9|0)<(0); L5: do { if ($10) { $$5 = $$09413; } else { $11 = HEAP32[(1103568)>>2]|0; $12 = ($9|0)<($11|0); if (!($12)) { $$12 = $$09413; label = 32; break L3; } $13 = ($$08614*324)|0; $14 = (($13) + 342)|0; $$012 = -1;$$19511 = $$09413; while(1) { $15 = (($$012) + ($2))|0; $16 = ($15|0)<(0); L10: do { if ($16) { $$4 = $$19511; } else { $17 = HEAP32[(1103572)>>2]|0; $18 = ($15|0)<($17|0); if (!($18)) { $$5 = $$19511; break L5; } $19 = Math_imul($17, $9)|0; $20 = (($19) + ($15))|0; $21 = HEAP32[(1103564)>>2]|0; $22 = Math_imul($21, $20)|0; $23 = (($7) + ($22))|0; $24 = ($$012*18)|0; $25 = (($14) + ($24))|0; $$08810 = -1;$$0908 = $25;$$0927 = $23;$$26 = $$19511; while(1) { $26 = (($$08810) + ($0))|0; $27 = ($26|0)<(0); if ($27) { $$3 = $$26; } else { $28 = ($26|0)<($21|0); if (!($28)) { $$4 = $$26; break L10; } $29 = (($4) + ($$0927)|0); $30 = HEAP8[$29>>0]|0; $31 = $30&255; $32 = ($$26<<24>>24)==(0); if ($32) { $38 = 0; } else { $33 = $30&255; $34 = (1120788 + ($33)|0); $35 = HEAP8[$34>>0]|0; $36 = ($35<<24>>24)==(4); $38 = $36; } $37 = $38&1; $39 = (($8) + ($$0908<<1)|0); HEAP16[$39>>1] = $31; $$3 = $37; } $40 = (($$08810) + 1)|0; $41 = (($$0927) + 1)|0; $42 = (($$0908) + 1)|0; $43 = ($$08810|0)<(16); if ($43) { $$08810 = $40;$$0908 = $42;$$0927 = $41;$$26 = $$3; } else { $$4 = $$3; break; } } } } while(0); $44 = (($$012) + 1)|0; $45 = ($$012|0)<(16); if ($45) { $$012 = $44;$$19511 = $$4; } else { $$5 = $$4; break; } } } } while(0); $46 = (($$08614) + 1)|0; $47 = ($$08614|0)<(16); if ($47) { $$08614 = $46;$$09413 = $$5; } else { $$12 = $$5; label = 32; break; } } if ((label|0) == 32) { HEAP8[$3>>0] = $$12; return; } } else { $48 = HEAP32[(1103556)>>2]|0; $49 = (($0) + -1)|0; $50 = HEAP32[442719]|0; $$18723 = -1;$$622 = 1; L28: while(1) { $51 = (($$18723) + ($1))|0; $52 = ($51|0)<(0); L30: do { if ($52) { $$11 = $$622; } else { $53 = HEAP32[(1103568)>>2]|0; $54 = ($51|0)<($53|0); if (!($54)) { $$12 = $$622; label = 32; break L28; } $55 = ($$18723*324)|0; $56 = (($55) + 342)|0; $$121 = -1;$$720 = $$622; while(1) { $57 = (($$121) + ($2))|0; $58 = ($57|0)<(0); L35: do { if ($58) { $$10 = $$720; } else { $59 = HEAP32[(1103572)>>2]|0; $60 = ($57|0)<($59|0); if (!($60)) { $$11 = $$720; break L30; } $61 = Math_imul($59, $51)|0; $62 = (($61) + ($57))|0; $63 = HEAP32[(1103564)>>2]|0; $64 = Math_imul($63, $62)|0; $65 = (($49) + ($64))|0; $66 = ($$121*18)|0; $67 = (($56) + ($66))|0; $$18919 = -1;$$19117 = $67;$$19316 = $65;$$815 = $$720; while(1) { $68 = (($$18919) + ($0))|0; $69 = ($68|0)<(0); if ($69) { $$9 = $$815; } else { $70 = ($68|0)<($63|0); if (!($70)) { $$10 = $$815; break L35; } $71 = (($4) + ($$19316)|0); $72 = HEAP8[$71>>0]|0; $73 = $72&255; $74 = (($48) + ($$19316)|0); $75 = HEAP8[$74>>0]|0; $76 = $75&255; $77 = $76 << 8; $78 = $77 | $73; $79 = $78&65535; $80 = ($$815<<24>>24)==(0); if ($80) { $85 = 0; } else { $81 = (1120788 + ($78)|0); $82 = HEAP8[$81>>0]|0; $83 = ($82<<24>>24)==(4); $85 = $83; } $84 = $85&1; $86 = (($50) + ($$19117<<1)|0); HEAP16[$86>>1] = $79; $$9 = $84; } $87 = (($$18919) + 1)|0; $88 = (($$19316) + 1)|0; $89 = (($$19117) + 1)|0; $90 = ($$18919|0)<(16); if ($90) { $$18919 = $87;$$19117 = $89;$$19316 = $88;$$815 = $$9; } else { $$10 = $$9; break; } } } } while(0); $91 = (($$121) + 1)|0; $92 = ($$121|0)<(16); if ($92) { $$121 = $91;$$720 = $$10; } else { $$11 = $$10; break; } } } } while(0); $93 = (($$18723) + 1)|0; $94 = ($$18723|0)<(16); if ($94) { $$18723 = $93;$$622 = $$11; } else { $$12 = $$11; label = 32; break; } } if ((label|0) == 32) { HEAP8[$3>>0] = $$12; return; } } } function _ReadChunkData($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$06997 = 0, $$07390 = 0, $$07589 = 0, $$07796 = 0, $$07995 = 0, $$094 = 0, $$1105 = 0, $$170108 = 0, $$174101 = 0, $$176100 = 0, $$17893 = 0, $$18092 = 0, $$28187 = 0, $$288 = 0, $$3107 = 0, $$382106 = 0, $$4104 = 0, $$483103 = 0, $$58498 = 0, $$599 = 0; var $$6 = 0, $$685 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; var $83 = 0, $9 = 0, $exitcond = 0, $exitcond115 = 0, $exitcond116 = 0, $exitcond121 = 0, $exitcond122 = 0, $exitcond123 = 0, $indvars$iv = 0, $indvars$iv$next = 0, $indvars$iv$next114 = 0, $indvars$iv$next118 = 0, $indvars$iv$next120 = 0, $indvars$iv113 = 0, $indvars$iv117 = 0, $indvars$iv119 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[275888]|0; $5 = HEAP32[(1103608)>>2]|0; $6 = ($5|0)<(256); if ($6) { $7 = (($0) + -1)|0; $8 = HEAP32[442719]|0; $$06997 = -1;$$07796 = 1;$$07995 = 1;$indvars$iv = 18; while(1) { $9 = (($$06997) + ($1))|0; $10 = ($$06997*324)|0; $11 = (($10) + 324)|0; $$094 = -1;$$17893 = $$07796;$$18092 = $$07995;$indvars$iv113 = $indvars$iv; while(1) { $12 = HEAP32[(1103572)>>2]|0; $13 = Math_imul($12, $9)|0; $14 = (($$094) + ($2))|0; $15 = (($14) + ($13))|0; $16 = HEAP32[(1103564)>>2]|0; $17 = Math_imul($15, $16)|0; $18 = (($7) + ($17))|0; $19 = (($$094) + 1)|0; $20 = ($19*18)|0; $21 = (($11) + ($20))|0; $$07390 = $21;$$07589 = $18;$$28187 = $$18092;$$288 = $$17893; while(1) { $22 = (($4) + ($$07589)|0); $23 = HEAP8[$22>>0]|0; $24 = $23&255; $25 = ($$28187<<24>>24)==(0); if ($25) { $31 = 0; } else { $26 = $23&255; $27 = (1120788 + ($26)|0); $28 = HEAP8[$27>>0]|0; $29 = ($28<<24>>24)==(4); $31 = $29; } $30 = $31&1; $32 = ($$288<<24>>24)==(0); if ($32) { $38 = 0; } else { $33 = $23&255; $34 = (1123860 + ($33)|0); $35 = HEAP8[$34>>0]|0; $36 = ($35<<24>>24)!=(0); $38 = $36; } $37 = $38&1; $39 = (($8) + ($$07390<<1)|0); HEAP16[$39>>1] = $24; $40 = (($$07589) + 1)|0; $41 = (($$07390) + 1)|0; $exitcond = ($41|0)==($indvars$iv113|0); if ($exitcond) { break; } else { $$07390 = $41;$$07589 = $40;$$28187 = $30;$$288 = $37; } } $indvars$iv$next114 = (($indvars$iv113) + 18)|0; $exitcond115 = ($19|0)==(17); if ($exitcond115) { break; } else { $$094 = $19;$$17893 = $37;$$18092 = $30;$indvars$iv113 = $indvars$iv$next114; } } $42 = (($$06997) + 1)|0; $indvars$iv$next = (($indvars$iv) + 324)|0; $exitcond116 = ($42|0)==(17); if ($exitcond116) { $$6 = $37;$$685 = $30; break; } else { $$06997 = $42;$$07796 = $37;$$07995 = $30;$indvars$iv = $indvars$iv$next; } } HEAP8[$3>>0] = $$685; return ($$6|0); } else { $43 = HEAP32[(1103556)>>2]|0; $44 = (($0) + -1)|0; $45 = HEAP32[442719]|0; $$170108 = -1;$$3107 = 1;$$382106 = 1;$indvars$iv117 = 18; while(1) { $46 = (($$170108) + ($1))|0; $47 = ($$170108*324)|0; $48 = (($47) + 324)|0; $$1105 = -1;$$4104 = $$3107;$$483103 = $$382106;$indvars$iv119 = $indvars$iv117; while(1) { $49 = HEAP32[(1103572)>>2]|0; $50 = Math_imul($49, $46)|0; $51 = (($$1105) + ($2))|0; $52 = (($51) + ($50))|0; $53 = HEAP32[(1103564)>>2]|0; $54 = Math_imul($52, $53)|0; $55 = (($44) + ($54))|0; $56 = (($$1105) + 1)|0; $57 = ($56*18)|0; $58 = (($48) + ($57))|0; $$174101 = $58;$$176100 = $55;$$58498 = $$483103;$$599 = $$4104; while(1) { $59 = (($4) + ($$176100)|0); $60 = HEAP8[$59>>0]|0; $61 = $60&255; $62 = (($43) + ($$176100)|0); $63 = HEAP8[$62>>0]|0; $64 = $63&255; $65 = $64 << 8; $66 = $65 | $61; $67 = $66&65535; $68 = ($$58498<<24>>24)==(0); if ($68) { $73 = 0; } else { $69 = (1120788 + ($66)|0); $70 = HEAP8[$69>>0]|0; $71 = ($70<<24>>24)==(4); $73 = $71; } $72 = $73&1; $74 = ($$599<<24>>24)==(0); if ($74) { $79 = 0; } else { $75 = (1123860 + ($66)|0); $76 = HEAP8[$75>>0]|0; $77 = ($76<<24>>24)!=(0); $79 = $77; } $78 = $79&1; $80 = (($45) + ($$174101<<1)|0); HEAP16[$80>>1] = $67; $81 = (($$176100) + 1)|0; $82 = (($$174101) + 1)|0; $exitcond121 = ($82|0)==($indvars$iv119|0); if ($exitcond121) { break; } else { $$174101 = $82;$$176100 = $81;$$58498 = $72;$$599 = $78; } } $indvars$iv$next120 = (($indvars$iv119) + 18)|0; $exitcond122 = ($56|0)==(17); if ($exitcond122) { break; } else { $$1105 = $56;$$4104 = $78;$$483103 = $72;$indvars$iv119 = $indvars$iv$next120; } } $83 = (($$170108) + 1)|0; $indvars$iv$next118 = (($indvars$iv117) + 324)|0; $exitcond123 = ($83|0)==(17); if ($exitcond123) { $$6 = $78;$$685 = $72; break; } else { $$170108 = $83;$$3107 = $78;$$382106 = $72;$indvars$iv117 = $indvars$iv$next118; } } HEAP8[$3>>0] = $$685; return ($$6|0); } } function _PrepareChunk($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0167204 = 0, $$0168196 = 0, $$0169197 = 0, $$0170202 = 0, $$0171190 = 0, $$0172188 = 0, $$0198 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0; var $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0; var $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0; var $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0; var $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0; var $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $20 = 0, $200 = 0, $201 = 0; var $202 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0; var $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0; var $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0; var $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $cond = 0, $cond186 = 0, $or$cond = 0, $or$cond175 = 0, $or$cond178 = 0, $or$cond181 = 0, $or$cond184 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1103564)>>2]|0; $4 = (($0) + 16)|0; $5 = ($3|0)<($4|0); $6 = $5 ? $3 : $4; $7 = HEAP32[(1103568)>>2]|0; $8 = (($1) + 16)|0; $9 = ($7|0)<($8|0); $10 = $9 ? $7 : $8; $11 = HEAP32[(1103572)>>2]|0; $12 = (($2) + 16)|0; $13 = ($11|0)<($12|0); $14 = $13 ? $11 : $12; $15 = ($10|0)>($1|0); if (!($15)) { return; } $16 = ($14|0)>($2|0); $17 = ($6|0)>($0|0); $$0167204 = 0;$$0170202 = $1; while(1) { if ($16) { $18 = ($$0167204*324)|0; $19 = (($18) + 324)|0; $20 = $$0167204 << 8; $21 = ($$0170202|0)==(0); $$0169197 = $2;$$0198 = 0; while(1) { $22 = (($$0198) + 1)|0; if ($17) { $23 = ($22*18)|0; $24 = (($19) + ($23))|0; $25 = $24 | 1; $26 = $$0198 << 4; $27 = $26 | $20; $cond186 = ($$0169197|0)==(0); $$0168196 = 0;$$0171190 = $0;$$0172188 = $25; while(1) { $28 = HEAP32[442719]|0; $29 = (($28) + ($$0172188<<1)|0); $30 = HEAP16[$29>>1]|0; $31 = $30&65535; $32 = (1120788 + ($31)|0); $33 = HEAP8[$32>>0]|0; $34 = ($33<<24>>24)==(4); do { if (!($34)) { $35 = $27 | $$0168196; $36 = ($35*6)|0; $37 = ($33<<24>>24)==(5); if ($37) { _AddSpriteVertices($30); break; } HEAP32[442720] = $$0171190; HEAP32[442721] = $$0170202; HEAP32[442722] = $$0169197; $38 = (1108500 + ($31)|0); $39 = HEAP8[$38>>0]|0; HEAP8[1972815] = $39; $40 = ($31*768)|0; $41 = HEAP32[442716]|0; $42 = (($41) + ($36)|0); $43 = HEAP8[$42>>0]|0; $44 = ($43<<24>>24)==(0); do { if ($44) { label = 15; } else { $cond = ($$0171190|0)==(0); if ($cond) { $45 = HEAP32[442710]|0; $46 = ($$0170202|0)<($45|0); if ($46) { label = 15; break; } $47 = $30 & -4; $48 = ($47<<16>>16)==(8); $49 = HEAP32[442711]|0; $50 = ($$0170202|0)<($49|0); $or$cond175 = $48 & $50; if ($or$cond175) { label = 15; break; } } else { $51 = (($$0172188) + -1)|0; $52 = (($28) + ($51<<1)|0); $53 = HEAP16[$52>>1]|0; $54 = $53&65535; $55 = (($40) + ($54))|0; $56 = (1173012 + ($55)|0); $57 = HEAP8[$56>>0]|0; $58 = $57 & 1; $59 = ($58<<24>>24)==(0); if (!($59)) { label = 15; break; } } $60 = HEAP32[442714]|0; $61 = (FUNCTION_TABLE_iiiiiiii[$60 & 7]($36,$$0171190,$$0170202,$$0169197,$$0172188,$30,0)|0); $62 = $61&255; $63 = HEAP32[442716]|0; $64 = (($63) + ($36)|0); HEAP8[$64>>0] = $62; } } while(0); if ((label|0) == 15) { label = 0; HEAP8[$42>>0] = 0; } $65 = $36 | 1; $66 = HEAP32[442716]|0; $67 = (($66) + ($65)|0); $68 = HEAP8[$67>>0]|0; $69 = ($68<<24>>24)==(0); do { if ($69) { label = 22; } else { $70 = HEAP32[(1103576)>>2]|0; $71 = ($$0171190|0)==($70|0); if ($71) { $72 = HEAP32[442710]|0; $73 = ($$0170202|0)<($72|0); if ($73) { label = 22; break; } $74 = $30 & -4; $75 = ($74<<16>>16)==(8); $76 = HEAP32[442711]|0; $77 = ($$0170202|0)<($76|0); $or$cond178 = $75 & $77; if ($or$cond178) { label = 22; break; } } else { $78 = HEAP32[442719]|0; $79 = (($$0172188) + 1)|0; $80 = (($78) + ($79<<1)|0); $81 = HEAP16[$80>>1]|0; $82 = $81&65535; $83 = (($40) + ($82))|0; $84 = (1173012 + ($83)|0); $85 = HEAP8[$84>>0]|0; $86 = $85 & 2; $87 = ($86<<24>>24)==(0); if (!($87)) { label = 22; break; } } $88 = HEAP32[442714]|0; $89 = (FUNCTION_TABLE_iiiiiiii[$88 & 7]($65,$$0171190,$$0170202,$$0169197,$$0172188,$30,1)|0); $90 = $89&255; $91 = HEAP32[442716]|0; $92 = (($91) + ($65)|0); HEAP8[$92>>0] = $90; } } while(0); if ((label|0) == 22) { label = 0; HEAP8[$67>>0] = 0; } $93 = (($65) + 1)|0; $94 = HEAP32[442716]|0; $95 = (($94) + ($93)|0); $96 = HEAP8[$95>>0]|0; $97 = ($96<<24>>24)==(0); do { if ($97) { label = 29; } else { if ($cond186) { $98 = HEAP32[442710]|0; $99 = ($$0170202|0)<($98|0); if ($99) { label = 29; break; } $100 = $30 & -4; $101 = ($100<<16>>16)==(8); $102 = HEAP32[442711]|0; $103 = ($$0170202|0)<($102|0); $or$cond181 = $101 & $103; if ($or$cond181) { label = 29; break; } } else { $104 = HEAP32[442719]|0; $105 = (($$0172188) + -18)|0; $106 = (($104) + ($105<<1)|0); $107 = HEAP16[$106>>1]|0; $108 = $107&65535; $109 = (($40) + ($108))|0; $110 = (1173012 + ($109)|0); $111 = HEAP8[$110>>0]|0; $112 = $111 & 4; $113 = ($112<<24>>24)==(0); if (!($113)) { label = 29; break; } } $114 = HEAP32[442713]|0; $115 = (FUNCTION_TABLE_iiiiiiii[$114 & 7]($93,$$0171190,$$0170202,$$0169197,$$0172188,$30,2)|0); $116 = $115&255; $117 = HEAP32[442716]|0; $118 = (($117) + ($93)|0); HEAP8[$118>>0] = $116; } } while(0); if ((label|0) == 29) { label = 0; HEAP8[$95>>0] = 0; } $119 = (($65) + 2)|0; $120 = HEAP32[442716]|0; $121 = (($120) + ($119)|0); $122 = HEAP8[$121>>0]|0; $123 = ($122<<24>>24)==(0); do { if ($123) { label = 36; } else { $124 = HEAP32[(1103584)>>2]|0; $125 = ($$0169197|0)==($124|0); if ($125) { $126 = HEAP32[442710]|0; $127 = ($$0170202|0)<($126|0); if ($127) { label = 36; break; } $128 = $30 & -4; $129 = ($128<<16>>16)==(8); $130 = HEAP32[442711]|0; $131 = ($$0170202|0)<($130|0); $or$cond184 = $129 & $131; if ($or$cond184) { label = 36; break; } } else { $132 = HEAP32[442719]|0; $133 = (($$0172188) + 18)|0; $134 = (($132) + ($133<<1)|0); $135 = HEAP16[$134>>1]|0; $136 = $135&65535; $137 = (($40) + ($136))|0; $138 = (1173012 + ($137)|0); $139 = HEAP8[$138>>0]|0; $140 = $139 & 8; $141 = ($140<<24>>24)==(0); if (!($141)) { label = 36; break; } } $142 = HEAP32[442713]|0; $143 = (FUNCTION_TABLE_iiiiiiii[$142 & 7]($119,$$0171190,$$0170202,$$0169197,$$0172188,$30,3)|0); $144 = $143&255; $145 = HEAP32[442716]|0; $146 = (($145) + ($119)|0); HEAP8[$146>>0] = $144; } } while(0); if ((label|0) == 36) { label = 0; HEAP8[$121>>0] = 0; } $147 = (($65) + 3)|0; $148 = HEAP32[442716]|0; $149 = (($148) + ($147)|0); $150 = HEAP8[$149>>0]|0; $151 = ($150<<24>>24)==(0); $or$cond = $21 | $151; if ($or$cond) { label = 40; } else { $152 = HEAP32[442719]|0; $153 = (($$0172188) + -324)|0; $154 = (($152) + ($153<<1)|0); $155 = HEAP16[$154>>1]|0; $156 = $155&65535; $157 = (($40) + ($156))|0; $158 = (1173012 + ($157)|0); $159 = HEAP8[$158>>0]|0; $160 = $159 & 16; $161 = ($160<<24>>24)==(0); if ($161) { $162 = HEAP32[442713]|0; $163 = (FUNCTION_TABLE_iiiiiiii[$162 & 7]($147,$$0171190,$$0170202,$$0169197,$$0172188,$30,4)|0); $164 = $163&255; $165 = HEAP32[442716]|0; $166 = (($165) + ($147)|0); HEAP8[$166>>0] = $164; } else { label = 40; } } if ((label|0) == 40) { label = 0; HEAP8[$149>>0] = 0; } $167 = (($65) + 4)|0; $168 = HEAP32[442716]|0; $169 = (($168) + ($167)|0); $170 = HEAP8[$169>>0]|0; $171 = ($170<<24>>24)==(0); if (!($171)) { $172 = HEAP32[442719]|0; $173 = (($$0172188) + 324)|0; $174 = (($172) + ($173<<1)|0); $175 = HEAP16[$174>>1]|0; $176 = $175&65535; $177 = (($40) + ($176))|0; $178 = (1173012 + ($177)|0); $179 = HEAP8[$178>>0]|0; $180 = $179 & 32; $181 = ($180<<24>>24)==(0); if ($181) { $182 = $30 & -4; $183 = ($182<<16>>16)==(8); if ($183) { $189 = HEAP32[442712]|0; $190 = (FUNCTION_TABLE_iiiiiii[$189 & 3]($167,$$0171190,$$0170202,$$0169197,$$0172188,$30)|0); $191 = $190&255; $192 = HEAP32[442716]|0; $193 = (($192) + ($167)|0); HEAP8[$193>>0] = $191; break; } else { $184 = HEAP32[442713]|0; $185 = (FUNCTION_TABLE_iiiiiiii[$184 & 7]($167,$$0171190,$$0170202,$$0169197,$$0172188,$30,5)|0); $186 = $185&255; $187 = HEAP32[442716]|0; $188 = (($187) + ($167)|0); HEAP8[$188>>0] = $186; break; } } } HEAP8[$169>>0] = 0; } } while(0); $194 = (($$0171190) + 1)|0; $195 = (($$0168196) + 1)|0; $196 = (($$0172188) + 1)|0; $197 = ($194|0)<($6|0); if ($197) { $$0168196 = $195;$$0171190 = $194;$$0172188 = $196; } else { break; } } } $198 = (($$0169197) + 1)|0; $199 = ($198|0)<($14|0); if ($199) { $$0169197 = $198;$$0198 = $22; } else { break; } } } $200 = (($$0170202) + 1)|0; $201 = (($$0167204) + 1)|0; $202 = ($200|0)<($10|0); if ($202) { $$0167204 = $201;$$0170202 = $200; } else { break; } } return; } function _Builder_TotalVerticesCount() { var $$010 = 0, $$089 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $$010 = 0;$$089 = 0; while(1) { $0 = (103264 + (($$089*60)|0)|0); $1 = (_Builder1DPart_VerticesCount($0)|0); $2 = (($1) + ($$010))|0; $3 = (($$089) + 1)|0; $exitcond = ($3|0)==(1024); if ($exitcond) { break; } else { $$010 = $2;$$089 = $3; } } return ($2|0); } function _DefaultPostStretchChunk() { var $$01213 = 0, $$014 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $$01213 = 0;$$014 = 0; while(1) { $0 = (($$01213) + 512)|0; $1 = (103264 + (($$01213*60)|0)|0); $2 = (_Builder1DPart_CalcOffsets($1,$$014)|0); $3 = (103264 + (($0*60)|0)|0); $4 = (_Builder1DPart_CalcOffsets($3,$2)|0); $5 = (($$01213) + 1)|0; $exitcond = ($5|0)==(512); if ($exitcond) { break; } else { $$01213 = $5;$$014 = $4; } } return; } function _Builder1DPart_CalcOffsets($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 52|0); HEAP32[$2>>2] = $1; $3 = ((($0)) + 48|0); $4 = HEAP32[$3>>2]|0; $5 = (2)?($4 >> 2):($4); $6 = ((($0)) + 56|0); HEAP32[$6>>2] = $5; $7 = (($4) + ($1))|0; $8 = HEAP32[442717]|0; $9 = (($8) + (($7*24)|0)|0); HEAP32[$0>>2] = $9; $10 = ((($0)) + 24|0); $11 = HEAP32[$10>>2]|0; $12 = (($11) + ($7))|0; $13 = (($8) + (($12*24)|0)|0); $14 = ((($0)) + 4|0); HEAP32[$14>>2] = $13; $15 = ((($0)) + 28|0); $16 = HEAP32[$15>>2]|0; $17 = (($16) + ($12))|0; $18 = (($8) + (($17*24)|0)|0); $19 = ((($0)) + 8|0); HEAP32[$19>>2] = $18; $20 = ((($0)) + 32|0); $21 = HEAP32[$20>>2]|0; $22 = (($21) + ($17))|0; $23 = (($8) + (($22*24)|0)|0); $24 = ((($0)) + 12|0); HEAP32[$24>>2] = $23; $25 = ((($0)) + 36|0); $26 = HEAP32[$25>>2]|0; $27 = (($26) + ($22))|0; $28 = (($8) + (($27*24)|0)|0); $29 = ((($0)) + 16|0); HEAP32[$29>>2] = $28; $30 = ((($0)) + 40|0); $31 = HEAP32[$30>>2]|0; $32 = (($31) + ($27))|0; $33 = (($8) + (($32*24)|0)|0); $34 = ((($0)) + 20|0); HEAP32[$34>>2] = $33; $35 = ((($0)) + 44|0); $36 = HEAP32[$35>>2]|0; $37 = (($36) + ($32))|0; return ($37|0); } function _AddSpriteVertices($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = ($1*6)|0; $3 = $2 | 1; $4 = (1162260 + ($3<<1)|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; $7 = HEAP32[(1949304)>>2]|0; $8 = ($7)?($6 >>> $7):($6); $9 = (((103264 + (($8*60)|0)|0)) + 48|0); $10 = HEAP32[$9>>2]|0; $11 = (($10) + 16)|0; HEAP32[$9>>2] = $11; return; } function _OnInit_145() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; _Camera_Register(13364); _Camera_Register(13412); _Camera_Register(13460); HEAP32[(1771060)>>2] = 13364; _Event_Register((1801848),0,3); _Event_Register((1794308),0,313); $0 = (_Options_GetInt(39999,1,200,30)|0); HEAP32[442742] = $0; $1 = (_Options_GetBool(37713,1)|0); HEAP8[(1770973)>>0] = $1; $2 = (_Options_GetBool(38244,0)|0); HEAP8[(1770974)>>0] = $2; $3 = (+_Options_GetFloat(39693,1.0,100.0,20.0)); HEAPF32[(1771064)>>2] = $3; $4 = (_Options_GetBool(39660,0)|0); HEAP8[(1770972)>>0] = $4; $5 = (_Options_GetInt(37581,1,179,70)|0); HEAP32[(1771072)>>2] = $5; HEAP32[(1771068)>>2] = $5; HEAP32[(1771076)>>2] = $5; _Camera_UpdateProjection(); return; } function _Camera_Register($0) { $0 = $0|0; var $$sink = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[442809]|0; $2 = ($1|0)==(0|0); $3 = HEAP32[442810]|0; $4 = ((($3)) + 44|0); $$sink = $2 ? 1771236 : $4; HEAP32[$$sink>>2] = $0; HEAP32[442810] = $0; $5 = ((($0)) + 44|0); $6 = HEAP32[442809]|0; HEAP32[$5>>2] = $6; return; } function _OnRawMovement($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = +$2; var $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1771060)>>2]|0; $4 = ((($3)) + 24|0); $5 = HEAP32[$4>>2]|0; FUNCTION_TABLE_vdd[$5 & 1]($1,$2); return; } function _OnHacksChanged($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1784312)>>0]|0; $2 = ($1<<24>>24)==(0); $3 = HEAP8[(1784310)>>0]|0; $4 = ($3<<24>>24)==(0); $or$cond = $2 | $4; if (!($or$cond)) { return; } _Camera_CycleActive(); return; } function _Camera_UpdateProjection() { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1771060)>>2]|0; $1 = ((($0)) + 4|0); $2 = HEAP32[$1>>2]|0; FUNCTION_TABLE_vi[$2 & 511]((1803196)); _Gfx_LoadMatrix(0,(1803196)); _Event_RaiseVoid((1793268)); return; } function _Camera_CycleActive() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1972839]|0; $1 = ($0<<24>>24)==(0); if (!($1)) { return; } $2 = HEAP32[(1771060)>>2]|0; $3 = ((($2)) + 44|0); $4 = HEAP32[$3>>2]|0; HEAP32[(1771060)>>2] = $4; $5 = HEAP8[(1784312)>>0]|0; $6 = ($5<<24>>24)==(0); $7 = HEAP8[(1784310)>>0]|0; $8 = ($7<<24>>24)==(0); $or$cond = $6 | $8; if ($or$cond) { HEAP32[(1771060)>>2] = 13364; } $9 = HEAP32[(1771060)>>2]|0; $10 = ($9|0)==(13460|0); $11 = $10&1; HEAP8[1972817] = $11; HEAPF32[442771] = 0.0; HEAPF32[442772] = 0.0; _Camera_UpdateProjection(); return; } function _PerspectiveCamera_GetProjection($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1771068)>>2]|0; $2 = (+($1|0)); $3 = $2 * 0.01745329238474369; $4 = HEAP32[271246]|0; $5 = (+($4|0)); $6 = HEAP32[(1084988)>>2]|0; $7 = (+($6|0)); $8 = $5 / $7; $9 = HEAP32[3582]|0; $10 = (+($9|0)); _Gfx_CalcPerspectiveMatrix($3,$8,$10,$0); return; } function _PerspectiveCamera_GetView($0) { $0 = $0|0; var $$byval_copy = 0, $$byval_copy1 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $$byval_copy1 = sp + 32|0; $$byval_copy = sp + 20|0; $1 = sp + 8|0; $2 = sp; ;HEAP32[$1>>2]=HEAP32[(1771048)>>2]|0;HEAP32[$1+4>>2]=HEAP32[(1771048)+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[(1771048)+8>>2]|0; $3 = HEAP32[(1771060)>>2]|0; $4 = ((($3)) + 12|0); $5 = HEAP32[$4>>2]|0; FUNCTION_TABLE_vi[$5 & 511]($2); ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$1+8>>2]|0; ;HEAP32[$$byval_copy1>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$2+4>>2]|0; _Matrix_LookRot($0,$$byval_copy,$$byval_copy1); _Matrix_Mul($0,$0,(1770976)); STACKTOP = sp;return; } function _ThirdPersonCamera_GetOrientation($0) { $0 = $0|0; var $$sroa$0$0 = 0.0, $$sroa$8$0 = 0.0, $$sroa$8$0$$sroa_idx3 = 0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1783792)>>2]; $2 = $1 * 0.01745329238474369; $3 = +HEAPF32[(1783788)>>2]; $4 = $3 * 0.01745329238474369; $5 = HEAP8[1972817]|0; $6 = ($5<<24>>24)==(0); $7 = $2 + 3.1415927410125732; $8 = - $4; $$sroa$8$0 = $6 ? $4 : $8; $$sroa$0$0 = $6 ? $2 : $7; $9 = +HEAPF32[442771]; $10 = $9 * 0.01745329238474369; $11 = $$sroa$0$0 + $10; $12 = +HEAPF32[442772]; $13 = $12 * 0.01745329238474369; $14 = $$sroa$8$0 + $13; HEAPF32[$0>>2] = $11; $$sroa$8$0$$sroa_idx3 = ((($0)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx3>>2] = $14; return; } function _ThirdPersonCamera_GetPosition($0,$1) { $0 = $0|0; $1 = +$1; var $$sroa$0$0$copyload = 0.0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$4$0$copyload = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $2 = sp + 48|0; $3 = sp + 36|0; $4 = sp + 24|0; $5 = sp + 16|0; $6 = sp; $7 = (+_ThirdPersonCamera_GetZoom()); _PerspectiveCamera_CalcViewBobbing($1,$7); _Entity_GetEyePosition($4,1783772); ;HEAP32[$2>>2]=HEAP32[$4>>2]|0;HEAP32[$2+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[$4+8>>2]|0; $8 = +HEAPF32[(1771040)>>2]; $9 = ((($2)) + 4|0); $10 = +HEAPF32[$9>>2]; $11 = $8 + $10; HEAPF32[$9>>2] = $11; $12 = HEAP32[(1771060)>>2]|0; $13 = ((($12)) + 12|0); $14 = HEAP32[$13>>2]|0; FUNCTION_TABLE_vi[$14 & 511]($5); $$sroa$0$0$copyload = +HEAPF32[$5>>2]; $$sroa$4$0$$sroa_idx2 = ((($5)) + 4|0); $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx2>>2]; _Vec3_GetDirVector($6,$$sroa$0$0$copyload,$$sroa$4$0$copyload); ;HEAP32[$3>>2]=HEAP32[$6>>2]|0;HEAP32[$3+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$3+8>>2]=HEAP32[$6+8>>2]|0; _Vec3_Negate($3,$3); _Picking_ClipCameraPos($2,$3,$7,1771108); ;HEAP32[$0>>2]=HEAP32[(1771208)>>2]|0;HEAP32[$0+4>>2]=HEAP32[(1771208)+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[(1771208)+8>>2]|0; STACKTOP = sp;return; } function _PerspectiveCamera_UpdateMouse($0) { $0 = +$0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1803572)>>2]|0; $2 = ($1|0)!=(0|0); $3 = HEAP8[(1972125)>>0]|0; $4 = ($3<<24>>24)==(0); $or$cond = $2 | $4; if (!($or$cond)) { } _PerspectiveCamera_UpdateMouseRotation($0); HEAPF32[442773] = 0.0; HEAPF32[442774] = 0.0; return; } function _Camera_OnRawMovement($0,$1) { $0 = +$0; $1 = +$1; var $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[442773]; $3 = $2 + $0; HEAPF32[442773] = $3; $4 = +HEAPF32[442774]; $5 = $4 + $1; HEAPF32[442774] = $5; return; } function _PerspectiveCamera_GetPickedBlock($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 12|0; $2 = sp; $3 = +HEAPF32[(1783792)>>2]; $4 = $3 * 0.01745329238474369; $5 = +HEAPF32[(1783788)>>2]; $6 = $5 * 0.01745329238474369; $7 = +HEAPF32[(1771080)>>2]; $8 = $6 + $7; _Vec3_GetDirVector($1,$4,$8); _Entity_GetEyePosition($2,1783772); $9 = +HEAPF32[(1784296)>>2]; _Picking_CalcPickedBlock($2,$1,$9,$0); STACKTOP = sp;return; } function _ThirdPersonCamera_Zoom($0) { $0 = +$0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972817]|0; $2 = ($1<<24>>24)==(0); $3 = $2 ? 13508 : 13512; $4 = +HEAPF32[$3>>2]; $5 = $4 - $0; $6 = $5 > 2.0; $7 = $6 ? $5 : 2.0; HEAPF32[$3>>2] = $7; return 1; } function _PerspectiveCamera_UpdateMouseRotation($0) { $0 = +$0; var $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0.0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $1 = sp + 8|0; $2 = sp; _PerspectiveCamera_GetMouseDelta($2,$0); $3 = HEAP8[(390408)>>0]|0; $4 = HEAP8[(390409)>>0]|0; $5 = $4 | $3; $6 = ($5<<24>>24)==(0); if (!($6)) { $7 = HEAP32[(1771060)>>2]|0; $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(0); if (!($9)) { $10 = +HEAPF32[$2>>2]; $11 = +HEAPF32[442771]; $12 = $10 + $11; HEAPF32[442771] = $12; $13 = ((($2)) + 4|0); $14 = +HEAPF32[$13>>2]; $15 = +HEAPF32[442772]; $16 = $14 + $15; HEAPF32[442772] = $16; STACKTOP = sp;return; } } $17 = ((($1)) + 28|0); HEAP8[$17>>0] = 6; $18 = +HEAPF32[(1784248)>>2]; $19 = +HEAPF32[$2>>2]; $20 = $18 + $19; $21 = ((($1)) + 16|0); HEAPF32[$21>>2] = $20; $22 = +HEAPF32[(1784244)>>2]; $23 = ((($2)) + 4|0); $24 = +HEAPF32[$23>>2]; $25 = $22 + $24; $26 = ((($1)) + 12|0); $27 = (+_Math_ClampAngle($25)); HEAPF32[$26>>2] = $27; $28 = !($27 >= 90.0); $29 = !($27 <= 270.0); $or$cond8 = $28 | $29; if (!($or$cond8)) { $30 = +HEAPF32[(1784244)>>2]; $31 = $30 < 180.0; $32 = $31 ? 90.0 : 270.0; HEAPF32[$26>>2] = $32; } $33 = HEAP32[445943]|0; $34 = ((($33)) + 8|0); $35 = HEAP32[$34>>2]|0; FUNCTION_TABLE_vii[$35 & 255](1783772,$1); STACKTOP = sp;return; } function _PerspectiveCamera_GetMouseDelta($0,$1) { $0 = $0|0; $1 = +$1; var $$ = 0.0, $$sroa$4$0$$sroa_idx2 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0; var $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $spec$select = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[442742]|0; $3 = (+($2|0)); $4 = $3 * 0.0038197184912860394; $5 = HEAP8[(1770972)>>0]|0; $6 = ($5<<24>>24)==(0); $7 = +HEAPF32[442773]; do { if ($6) { HEAPF32[442775] = $7; $27 = HEAP32[442774]|0; HEAP32[442776] = $27; } else { $8 = +HEAPF32[442775]; $9 = $7 - $8; $10 = $9 * 35.0; $11 = +HEAPF32[(1771064)>>2]; $12 = $10 / $11; $13 = +HEAPF32[442774]; $14 = +HEAPF32[442776]; $15 = $13 - $14; $16 = $15 * 35.0; $17 = $16 / $11; $18 = $1; $19 = $12 * $18; $20 = $8 + $19; $21 = $17 * $18; $22 = $14 + $21; $23 = $8 * $20; $24 = $23 < 0.0; $$ = $24 ? 0.0 : $20; HEAPF32[442775] = $$; $25 = $14 * $22; $26 = $25 < 0.0; if ($26) { HEAPF32[442776] = 0.0; break; } else { HEAPF32[442776] = $22; break; } } } while(0); $28 = +HEAPF32[442775]; $29 = $4 * $28; $30 = +HEAPF32[442776]; $31 = $4 * $30; $32 = HEAP8[(1770974)>>0]|0; $33 = ($32<<24>>24)==(0); $34 = - $31; $spec$select = $33 ? $31 : $34; HEAPF32[$0>>2] = $29; $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $spec$select; return; } function _ThirdPersonCamera_GetZoom() { var $0 = 0, $1 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $spec$select = 0.0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1972817]|0; $1 = ($0<<24>>24)==(0); $2 = +HEAPF32[3378]; $3 = +HEAPF32[3377]; $4 = $1 ? $3 : $2; $5 = $4 > 3.0; if ($5) { $6 = (_LocalPlayer_CheckCanZoom()|0); $7 = ($6<<24>>24)==(0); $spec$select = $7 ? 3.0 : $4; return (+$spec$select); } else { return (+$4); } } function _PerspectiveCamera_CalcViewBobbing($0,$1) { $0 = +$0; $1 = +$1; var $$sink = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0; var $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 128|0; $2 = sp + 64|0; $3 = sp; $4 = HEAP8[1972844]|0; $5 = ($4<<24>>24)==(0); if ($5) { dest=(1770976); src=21836; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $$sink = 0.0; } else { $6 = +HEAPF32[(1784480)>>2]; $7 = +HEAPF32[(1783984)>>2]; $8 = $6 * $7; $9 = - $8; _Matrix_RotateZ((1770976),$9); $10 = +HEAPF32[(1784484)>>2]; $11 = (+Math_abs((+$10))); $12 = $11 * 3.0; $13 = +HEAPF32[(1783984)>>2]; $14 = $13 * $12; _Matrix_RotateX($2,$14); _Matrix_Mul((1770976),(1770976),$2); $15 = +HEAPF32[(1783964)>>2]; $16 = $15 * 0.30000001192092896; $17 = +HEAPF32[(1783984)>>2]; $18 = $16 * $17; HEAPF32[(1771044)>>2] = $18; $19 = +HEAPF32[(1783968)>>2]; $20 = $19 * 0.60000002384185791; $21 = $17 * $20; HEAPF32[(1771040)>>2] = $21; $22 = +HEAPF32[(1784280)>>2]; $23 = $22 + 0.079999998211860657; $24 = +HEAPF32[(1783812)>>2]; $25 = $24 + 0.079999998211860657; $26 = (+_Math_Lerp($23,$25,$0)); $27 = $26 * -0.05000000074505806; $28 = +HEAPF32[(1784488)>>2]; $29 = $27 * $28; $30 = $29 / $1; _Matrix_RotateX($3,$30); _Matrix_Mul((1770976),(1770976),$3); $31 = HEAP8[1972839]|0; $32 = ($31<<24>>24)==(0); if ($32) { $$sink = $30; } else { STACKTOP = sp;return; } } HEAPF32[(1771080)>>2] = $$sink; STACKTOP = sp;return; } function _Vec3_Negate($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0.0, $11 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[$1>>2]; $3 = - $2; HEAPF32[$0>>2] = $3; $4 = ((($1)) + 4|0); $5 = +HEAPF32[$4>>2]; $6 = - $5; $7 = ((($0)) + 4|0); HEAPF32[$7>>2] = $6; $8 = ((($1)) + 8|0); $9 = +HEAPF32[$8>>2]; $10 = - $9; $11 = ((($0)) + 8|0); HEAPF32[$11>>2] = $10; return; } function _FirstPersonCamera_GetOrientation($0) { $0 = $0|0; var $$sroa$4$0$$sroa_idx2 = 0, $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1783792)>>2]; $2 = $1 * 0.01745329238474369; $3 = +HEAPF32[(1783788)>>2]; $4 = $3 * 0.01745329238474369; HEAPF32[$0>>2] = $2; $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $4; return; } function _FirstPersonCamera_GetPosition($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0; var $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; _Entity_GetEyePosition($2,1783772); $3 = +HEAPF32[(1783792)>>2]; $4 = $3 * 0.01745329238474369; _PerspectiveCamera_CalcViewBobbing($1,1.0); $5 = +HEAPF32[(1771040)>>2]; $6 = ((($2)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = $5 + $7; HEAPF32[$6>>2] = $8; $9 = +HEAPF32[(1771044)>>2]; $10 = $4; $11 = (+_Math_Cos($10)); $12 = $11; $13 = $9 * $12; $14 = +HEAPF32[$2>>2]; $15 = $14 + $13; HEAPF32[$2>>2] = $15; $16 = +HEAPF32[(1771044)>>2]; $17 = (+_Math_Sin($10)); $18 = $17; $19 = $16 * $18; $20 = ((($2)) + 8|0); $21 = +HEAPF32[$20>>2]; $22 = $21 + $19; HEAPF32[$20>>2] = $22; ;HEAP32[$0>>2]=HEAP32[$2>>2]|0;HEAP32[$0+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[$2+8>>2]|0; STACKTOP = sp;return; } function _FirstPersonCamera_Zoom($0) { $0 = +$0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _Camera_CheckFocus() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1803572)>>2]|0; $1 = ($0|0)==(0|0); $2 = $1&1; $3 = HEAP8[1972818]|0; $4 = $3&255; $5 = ($2|0)==($4|0); if ($5) { return; } $6 = $1&1; HEAP8[1972818] = $6; $7 = HEAP32[(1771060)>>2]|0; if ($1) { $8 = ((($7)) + 28|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_v[$9 & 127](); return; } else { $10 = ((($7)) + 32|0); $11 = HEAP32[$10>>2]|0; FUNCTION_TABLE_v[$11 & 127](); return; } } function _Camera_SetFov($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1771068)>>2]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[(1771068)>>2] = $0; _Camera_UpdateProjection(); return; } function _OnInit_152() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; _Commands_Register(13588); _Commands_Register(13624); _Commands_Register(13660); _Commands_Register(13696); _Commands_Register(13732); _Commands_Register(13768); _Commands_Register(13804); _Commands_Register(13840); $0 = (_Options_GetBool(37842,0)|0); HEAP8[1972819] = $0; return; } function _OnFree_153() { var label = 0, sp = 0; sp = STACKTOP; _CloseLogFile(); _ClearCPEMessages(); HEAP32[444116] = 0; _ClearChatLogs(); _StringsBuffer_Clear(1776468); return; } function _OnReset_154() { var label = 0, sp = 0; sp = STACKTOP; _CloseLogFile(); _ResetLogFile(); _ClearCPEMessages(); return; } function _CloseLogFile() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1776440)>>2]|0; $1 = ($0|0)==(0); if ($1) { return; } $2 = HEAP32[(1776436)>>2]|0; $3 = (FUNCTION_TABLE_ii[$2 & 31](1776408)|0); $4 = ($3|0)==(0); if ($4) { return; } _Logger_SysWarn2($3,45173,13572); return; } function _ResetLogFile() { var label = 0, sp = 0; sp = STACKTOP; HEAP16[(13568)>>1] = 0; HEAP32[444101] = -123; return; } function _ClearCPEMessages() { var label = 0, sp = 0; sp = STACKTOP; _Chat_AddOf(1949280,100); _Chat_AddOf(1949280,101); _Chat_AddOf(1949280,102); _Chat_AddOf(1949280,1); _Chat_AddOf(1949280,2); _Chat_AddOf(1949280,3); _Chat_AddOf(1949280,11); _Chat_AddOf(1949280,12); _Chat_AddOf(1949280,13); return; } function _Chat_AddOf($0,$1) { $0 = $0|0; $1 = $1|0; var $$off = 0, $$off29 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = ($1|0)==(0); L1: do { if ($3) { $4 = HEAP32[(1771256)>>2]|0; $5 = ($4|0)>(8388000); if ($5) { _ClearChatLogs(); _Chat_AddRaw(24919); } $6 = $0; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = $2; $13 = $12; HEAP32[$13>>2] = $8; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; $16 = ((($2)) + 4|0); $17 = HEAP16[$16>>1]|0; $18 = $17&65535; $19 = ($18>>>0)<(256); $20 = $19 ? $18 : 256; $21 = $20&65535; HEAP16[$16>>1] = $21; $22 = +HEAPF64[(1084992)>>3]; $23 = HEAP32[(1771252)>>2]|0; $24 = $23 & 31; $25 = (165664 + ($24<<3)|0); HEAPF64[$25>>3] = $22; _AppendChatLog($2); _StringsBuffer_Add(1771244,$2); } else { $$off = (($1) + -1)|0; $26 = ($$off>>>0)<(3); if ($26) { $27 = (($1) + 1)|0; $28 = (1968 + ($27<<3)|0); _String_Copy($28,$0); break; } $$off29 = (($1) + -11)|0; $29 = ($$off29>>>0)<(3); if ($29) { $30 = (2016 + ($$off29<<3)|0); _String_Copy($30,$0); break; } switch ($1|0) { case 100: { _String_Copy(13516,$0); $31 = +HEAPF64[(1084992)>>3]; HEAPF64[135619] = $31; break L1; } case 101: { _String_Copy(13524,$0); $32 = +HEAPF64[(1084992)>>3]; HEAPF64[135620] = $32; break L1; } case 102: { _String_Copy(13532,$0); $33 = +HEAPF64[(1084992)>>3]; HEAPF64[135621] = $33; break L1; } default: { $34 = $1 & -2; switch ($34|0) { case 256: { $35 = (($1) + -256)|0; $36 = (2048 + ($35<<3)|0); _String_Copy($36,$0); break L1; } case 360: { $37 = (($1) + -360)|0; $38 = (1968 + ($37<<3)|0); _String_Copy($38,$0); break L1; } default: { break L1; } } } } } } while(0); _Event_RaiseChat((1796908),$0,$1); STACKTOP = sp;return; } function _ClearChatLogs() { var label = 0, sp = 0; sp = STACKTOP; _Mem_Set(165664,0,256); _StringsBuffer_Clear(1771244); return; } function _Chat_AddRaw($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _String_FromReadonly($1,$0); _Chat_AddOf($1,0); STACKTOP = sp;return; } function _AppendChatLog($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 304|0; $1 = sp + 288|0; $2 = sp; $3 = sp + 256|0; $4 = HEAP16[(13568)>>1]|0; $5 = ($4<<16>>16)!=(0); $6 = HEAP8[1972819]|0; $7 = ($6<<24>>24)!=(0); $or$cond = $5 & $7; if (!($or$cond)) { STACKTOP = sp;return; } _DateTime_CurrentLocal($3); $8 = ((($3)) + 8|0); $9 = HEAP32[$8>>2]|0; $10 = HEAP32[444099]|0; $11 = ($9|0)==($10|0); if ($11) { $12 = ((($3)) + 4|0); $13 = HEAP32[$12>>2]|0; $14 = HEAP32[444100]|0; $15 = ($13|0)==($14|0); if ($15) { $16 = HEAP32[$3>>2]|0; $17 = HEAP32[444101]|0; $18 = ($16|0)==($17|0); if (!($18)) { label = 5; } } else { label = 5; } } else { label = 5; } if ((label|0) == 5) { _CloseLogFile(); _OpenChatLog($3); } $19 = HEAP32[$8>>2]|0; HEAP32[444099] = $19; $20 = ((($3)) + 4|0); $21 = HEAP32[$20>>2]|0; HEAP32[444100] = $21; $22 = HEAP32[$3>>2]|0; HEAP32[444101] = $22; $23 = HEAP32[(1776440)>>2]|0; $24 = ($23|0)==(0); if ($24) { STACKTOP = sp;return; } HEAP32[$1>>2] = $2; $25 = ((($1)) + 4|0); HEAP16[$25>>1] = 0; $26 = ((($1)) + 6|0); HEAP16[$26>>1] = 256; $27 = ((($3)) + 12|0); $28 = ((($3)) + 16|0); $29 = ((($3)) + 20|0); _String_Format3($1,24976,$27,$28,$29); _Drawer2D_WithoutColors($1,$0); $30 = (_Stream_WriteLine(1776408,$1)|0); $31 = ($30|0)==(0); if ($31) { STACKTOP = sp;return; } _Chat_DisableLogging(); _Logger_SysWarn2($30,45162,13572); STACKTOP = sp;return; } function _OpenChatLog($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = (_CreateLogsDirectory()|0); $3 = ($2<<24>>24)==(0); if ($3) { STACKTOP = sp;return; } HEAP32[$1>>2] = 0; $4 = ((($0)) + 4|0); $5 = ((($0)) + 8|0); $6 = HEAP32[5237]|0; while(1) { HEAP16[(13576)>>1] = 0; _String_Format3(13572,25016,$0,$4,$5); $7 = HEAP32[$1>>2]|0; $8 = ($7|0)>(0); if ($8) { _String_Format2(13572,25034,13564,$1); } else { _String_Format1(13572,25045,13564); } $9 = (_Stream_AppendFile(1776408,13572)|0); $10 = ($9|0)==(0); $11 = ($9|0)==($6|0); $or$cond = $10 | $11; if (!($or$cond)) { label = 7; break; } if (!($11)) { label = 11; break; } $12 = HEAP32[$1>>2]|0; $13 = (($12) + 1)|0; HEAP32[$1>>2] = $13; $14 = ($12|0)<(19); if (!($14)) { label = 10; break; } } if ((label|0) == 7) { _Chat_DisableLogging(); _Logger_SysWarn2($9,25052,13572); STACKTOP = sp;return; } else if ((label|0) == 10) { _Chat_DisableLogging(); _Chat_Add1(25065,$1); STACKTOP = sp;return; } else if ((label|0) == 11) { STACKTOP = sp;return; } } function _Chat_DisableLogging() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[1972819] = 0; HEAP32[444101] = -321; _Chat_AddRaw(24991); _CloseLogFile(); return; } function _CreateLogsDirectory() { var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_Directory_Create(13580)|0); $1 = ($0|0)==(0); $2 = HEAP32[5241]|0; $3 = ($0|0)==($2|0); $or$cond = $1 | $3; if ($or$cond) { $$0 = 1; return ($$0|0); } _Chat_DisableLogging(); _Logger_SysWarn2($0,45008,13580); $$0 = 0; return ($$0|0); } function _Chat_Add1($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Chat_Add4($0,$1,0,0,0); return; } function _Chat_Add4($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 144|0; $5 = sp + 128|0; $6 = sp; HEAP32[$5>>2] = $6; $7 = ((($5)) + 4|0); HEAP16[$7>>1] = 0; $8 = ((($5)) + 6|0); HEAP16[$8>>1] = 128; _String_Format4($5,$0,$1,$2,$3,$4); _Chat_AddOf($5,0); STACKTOP = sp;return; } function _Commands_Register($0) { $0 = $0|0; var $$sink = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[444116]|0; $2 = ($1|0)==(0|0); $3 = HEAP32[445411]|0; $4 = ((($3)) + 32|0); $$sink = $2 ? 1776464 : $4; HEAP32[$$sink>>2] = $0; HEAP32[445411] = $0; $5 = ((($0)) + 32|0); HEAP32[$5>>2] = 0; return; } function _ClearDeniedCommand_Execute($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_TextureCache_ClearDenied()|0); HEAP32[$2>>2] = $3; _Chat_Add1(25218,$2); STACKTOP = sp;return; } function _TeleportCommand_Execute($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $2 = sp + 16|0; $3 = sp; $4 = ($1|0)==(3); if (!($4)) { _Chat_AddRaw(25321); STACKTOP = sp;return; } $5 = (_Convert_ParseFloat($0,$3)|0); $6 = ($5<<24>>24)==(0); if (!($6)) { $7 = ((($0)) + 8|0); $8 = ((($3)) + 4|0); $9 = (_Convert_ParseFloat($7,$8)|0); $10 = ($9<<24>>24)==(0); if (!($10)) { $11 = ((($0)) + 16|0); $12 = ((($3)) + 8|0); $13 = (_Convert_ParseFloat($11,$12)|0); $14 = ($13<<24>>24)==(0); if (!($14)) { $15 = ((($2)) + 28|0); HEAP8[$15>>0] = 1; ;HEAP32[$2>>2]=HEAP32[$3>>2]|0;HEAP32[$2+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[$3+8>>2]|0; $16 = HEAP32[445943]|0; $17 = ((($16)) + 8|0); $18 = HEAP32[$17>>2]|0; FUNCTION_TABLE_vii[$18 & 255](1783772,$2); STACKTOP = sp;return; } } } _Chat_AddRaw(25386); STACKTOP = sp;return; } function _CuboidCommand_Execute($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[1972820]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { _Event_Unregister(1794048,0,27); HEAP8[1972820] = 0; } HEAP32[3469] = -1; HEAP8[1972821] = 0; HEAP8[1972822] = 0; $4 = ($1|0)==(0); if (!($4)) { $5 = (_CuboidCommand_ParseArgs($0)|0); $6 = ($5<<24>>24)==(0); if ($6) { return; } } _Chat_AddOf(13880,256); _Event_Register(1794048,0,27); HEAP8[1972820] = 1; return; } function _CuboidCommand_BlockChanged($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $4 = sp + 64|0; $5 = sp; HEAP32[$4>>2] = $5; $6 = ((($4)) + 4|0); HEAP16[$6>>1] = 0; $7 = ((($4)) + 6|0); HEAP16[$7>>1] = 64; $8 = HEAP8[1972821]|0; $9 = ($8<<24>>24)==(0); if ($9) { ;HEAP32[1781620>>2]=HEAP32[$1>>2]|0;HEAP32[1781620+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[1781620+8>>2]=HEAP32[$1+8>>2]|0; HEAP8[1972821] = 1; $10 = HEAP32[$1>>2]|0; $11 = ((($1)) + 4|0); $12 = HEAP32[$11>>2]|0; $13 = ((($1)) + 8|0); $14 = HEAP32[$13>>2]|0; _Game_UpdateBlock($10,$12,$14,$2); _String_Format3($4,25849,$1,$11,$13); _Chat_AddOf($4,256); STACKTOP = sp;return; } ;HEAP32[1781632>>2]=HEAP32[$1>>2]|0;HEAP32[1781632+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[1781632+8>>2]=HEAP32[$1+8>>2]|0; _CuboidCommand_DoCuboid(); $15 = HEAP8[1972822]|0; $16 = ($15<<24>>24)==(0); if ($16) { _Event_Unregister(1794048,0,27); HEAP8[1972820] = 0; _Chat_AddOf(1949280,256); STACKTOP = sp;return; } else { HEAP8[1972821] = 0; _Chat_AddOf(13880,256); STACKTOP = sp;return; } } function _CuboidCommand_ParseArgs($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = $0; $3 = $2; $4 = HEAP32[$3>>2]|0; $5 = (($2) + 4)|0; $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = $1; $9 = $8; HEAP32[$9>>2] = $4; $10 = (($8) + 4)|0; $11 = $10; HEAP32[$11>>2] = $7; $12 = (_String_CaselessEnds($1,13888)|0); $13 = ($12|0)==(0); if (!($13)) { HEAP8[1972822] = 1; $14 = ((($1)) + 4|0); $15 = HEAP16[$14>>1]|0; $16 = $15&65535; $17 = (($16) + 65533)|0; $18 = $17&65535; HEAP16[$14>>1] = $18; _String_UNSAFE_TrimEnd($1); $19 = HEAP16[$14>>1]|0; $20 = ($19<<16>>16)==(0); if ($20) { $$0 = 1; STACKTOP = sp;return ($$0|0); } } $21 = (_Block_Parse($1)|0); $22 = ($21|0)==(-1); if ($22) { _Chat_Add1(25751,$1); $$0 = 0; STACKTOP = sp;return ($$0|0); } $23 = HEAP8[(1803053)>>0]|0; $24 = $23&255; $25 = ($21|0)>($24|0); if ($25) { $26 = $21&65535; $27 = (_Block_IsCustomDefined($26)|0); $28 = ($27<<24>>24)==(0); if ($28) { _Chat_Add1(25801,$1); $$0 = 0; STACKTOP = sp;return ($$0|0); } } HEAP32[3469] = $21; $$0 = 1; STACKTOP = sp;return ($$0|0); } function _CuboidCommand_DoCuboid() { var $$01725 = 0, $$01820 = 0, $$019 = 0, $$021 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $0 = sp + 12|0; $1 = sp; _IVec3_Min($0,1781620,1781632); _IVec3_Max($1,1781620,1781632); $2 = HEAP32[$0>>2]|0; $3 = ((($0)) + 4|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 8|0); $6 = HEAP32[$5>>2]|0; $7 = (_World_Contains_192($2,$4,$6)|0); $8 = ($7<<24>>24)==(0); if ($8) { STACKTOP = sp;return; } $9 = HEAP32[$1>>2]|0; $10 = ((($1)) + 4|0); $11 = HEAP32[$10>>2]|0; $12 = ((($1)) + 8|0); $13 = HEAP32[$12>>2]|0; $14 = (_World_Contains_192($9,$11,$13)|0); $15 = ($14<<24>>24)==(0); if ($15) { STACKTOP = sp;return; } $16 = HEAP32[3469]|0; $17 = $16&65535; $18 = ($16|0)==(-1); if ($18) { $19 = HEAP32[(1811004)>>2]|0; $20 = HEAP32[(1811000)>>2]|0; $21 = (($20) + ($19))|0; $22 = (1809300 + ($21<<1)|0); $23 = HEAP16[$22>>1]|0; $$019 = $23; } else { $$019 = $17; } $24 = HEAP32[$10>>2]|0; $25 = ($4|0)>($24|0); if ($25) { STACKTOP = sp;return; } $$01725 = $4; while(1) { $26 = HEAP32[$5>>2]|0; $27 = HEAP32[$12>>2]|0; $28 = ($26|0)>($27|0); if (!($28)) { $$021 = $26; while(1) { $29 = HEAP32[$0>>2]|0; $30 = HEAP32[$1>>2]|0; $31 = ($29|0)>($30|0); if (!($31)) { $$01820 = $29; while(1) { _Game_ChangeBlock($$01820,$$01725,$$021,$$019); $32 = (($$01820) + 1)|0; $33 = HEAP32[$1>>2]|0; $34 = ($$01820|0)<($33|0); if ($34) { $$01820 = $32; } else { break; } } } $35 = (($$021) + 1)|0; $36 = HEAP32[$12>>2]|0; $37 = ($$021|0)<($36|0); if ($37) { $$021 = $35; } else { break; } } } $38 = (($$01725) + 1)|0; $39 = HEAP32[$10>>2]|0; $40 = ($$01725|0)<($39|0); if ($40) { $$01725 = $38; } else { break; } } STACKTOP = sp;return; } function _World_Contains_192($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1103564)>>2]|0; $4 = ($3>>>0)>($0>>>0); $5 = HEAP32[(1103568)>>2]|0; $6 = ($5>>>0)>($1>>>0); $or$cond = $4 & $6; $7 = HEAP32[(1103572)>>2]|0; $8 = ($7>>>0)>($2>>>0); $narrow = $or$cond & $8; $9 = $narrow&1; return ($9|0); } function _ModelCommand_Execute($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)==(0); if ($2) { _Chat_AddRaw(26050); return; } else { _Entity_SetModel(1783772,$0); return; } } function _ResolutionCommand_Execute($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 4|0; $3 = sp; $4 = ($1|0)<(2); if ($4) { _Chat_Add4(26201,(1972116),(1972084),(1972120),(1972088)); STACKTOP = sp;return; } $5 = (_Convert_ParseInt($0,$2)|0); $6 = ($5<<24>>24)==(0); if (!($6)) { $7 = ((($0)) + 8|0); $8 = (_Convert_ParseInt($7,$3)|0); $9 = ($8<<24>>24)==(0); if (!($9)) { $10 = HEAP32[$2>>2]|0; $11 = ($10|0)<(1); $12 = HEAP32[$3>>2]|0; $13 = ($12|0)<(1); $or$cond = $11 | $13; if ($or$cond) { _Chat_AddRaw(26300); STACKTOP = sp;return; } else { _Window_SetSize($10,$12); $14 = HEAP32[$2>>2]|0; $15 = (+($14|0)); $16 = +HEAPF32[(1972084)>>2]; $17 = $15 / $16; $18 = (~~(($17))); _Options_SetInt(41407,$18); $19 = HEAP32[$3>>2]|0; $20 = (+($19|0)); $21 = +HEAPF32[(1972088)>>2]; $22 = $20 / $21; $23 = (~~(($22))); _Options_SetInt(41420,$23); STACKTOP = sp;return; } } } _Chat_AddRaw(26252); STACKTOP = sp;return; } function _RenderTypeCommand_Execute($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)==(0); if ($2) { _Chat_AddRaw(26698); return; } $3 = (_EnvRenderer_CalcFlags($0)|0); $4 = ($3|0)>(-1); if ($4) { _EnvRenderer_SetMode($3); _Options_Set(28241,$0); _Chat_Add1(26749,$0); return; } else { _Chat_Add1(26785,$0); return; } } function _HelpCommand_Execute($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)==(0); if ($2) { _Commands_PrintDefault(); return; } $3 = (_Commands_FindMatch($0)|0); $4 = ($3|0)==(0|0); if ($4) { return; } $5 = ((($3)) + 12|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(0|0); if (!($7)) { _Chat_AddRaw($6); } $8 = ((($3)) + 16|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)==(0|0); if (!($10)) { _Chat_AddRaw($9); } $11 = ((($3)) + 20|0); $12 = HEAP32[$11>>2]|0; $13 = ($12|0)==(0|0); if (!($13)) { _Chat_AddRaw($12); } $14 = ((($3)) + 24|0); $15 = HEAP32[$14>>2]|0; $16 = ($15|0)==(0|0); if (!($16)) { _Chat_AddRaw($15); } $17 = ((($3)) + 28|0); $18 = HEAP32[$17>>2]|0; $19 = ($18|0)==(0|0); if ($19) { return; } _Chat_AddRaw($18); return; } function _Commands_PrintDefault() { var $$0 = 0, $$05 = 0, $$06 = 0, $$pr = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $0 = sp + 80|0; $1 = sp; $2 = sp + 72|0; $3 = sp + 64|0; _Chat_AddRaw(27068); HEAP32[$0>>2] = $1; $4 = ((($0)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($0)) + 6|0); HEAP16[$5>>1] = 64; $$05 = HEAP32[444116]|0; $6 = ($$05|0)==(0|0); if ($6) { _Chat_AddRaw(27098); STACKTOP = sp;return; } $7 = ((($2)) + 4|0); $$06 = $$05; while(1) { $8 = HEAP32[$$06>>2]|0; _String_FromReadonly($3,$8); $9 = $3; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = (($9) + 4)|0; $13 = $12; $14 = HEAP32[$13>>2]|0; $15 = $2; $16 = $15; HEAP32[$16>>2] = $11; $17 = (($15) + 4)|0; $18 = $17; HEAP32[$18>>2] = $14; $19 = HEAP16[$4>>1]|0; $20 = $19&65535; $21 = HEAP16[$7>>1]|0; $22 = $21&65535; $23 = (($20) + 2)|0; $24 = (($23) + ($22))|0; $25 = HEAP16[$5>>1]|0; $26 = $25&65535; $27 = ($24>>>0)>($26>>>0); if ($27) { _Chat_Add($0); HEAP16[$4>>1] = 0; } _String_AppendString($0,$2); _String_AppendConst($0,27095); $28 = ((($$06)) + 32|0); $$0 = HEAP32[$28>>2]|0; $29 = ($$0|0)==(0|0); if ($29) { break; } else { $$06 = $$0; } } $$pr = HEAP16[$4>>1]|0; $30 = ($$pr<<16>>16)==(0); if ($30) { _Chat_AddRaw(27098); STACKTOP = sp;return; } _Chat_Add($0); _Chat_AddRaw(27098); STACKTOP = sp;return; } function _Commands_FindMatch($0) { $0 = $0|0; var $$0 = 0, $$01826 = 0, $$020 = 0, $$028 = 0, $$029 = 0, $$1 = 0, $$119 = 0, $$125$pr = 0, $$127 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 16|0; $2 = sp + 8|0; $3 = sp; $$028 = HEAP32[444116]|0; $4 = ($$028|0)==(0|0); do { if (!($4)) { $$029 = $$028; while(1) { $5 = HEAP32[$$029>>2]|0; _String_FromReadonly($2,$5); $6 = $2; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = $1; $13 = $12; HEAP32[$13>>2] = $8; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; $16 = (_String_CaselessEquals($1,$0)|0); $17 = ($16|0)==(0); if (!($17)) { $$020 = $$029; label = 13; break; } $18 = ((($$029)) + 32|0); $$0 = HEAP32[$18>>2]|0; $19 = ($$0|0)==(0|0); if ($19) { break; } else { $$029 = $$0; } } if ((label|0) == 13) { STACKTOP = sp;return ($$020|0); } $$125$pr = HEAP32[444116]|0; $20 = ($$125$pr|0)==(0|0); if (!($20)) { $$01826 = 0;$$127 = $$125$pr; while(1) { $21 = HEAP32[$$127>>2]|0; _String_FromReadonly($3,$21); $22 = $3; $23 = $22; $24 = HEAP32[$23>>2]|0; $25 = (($22) + 4)|0; $26 = $25; $27 = HEAP32[$26>>2]|0; $28 = $1; $29 = $28; HEAP32[$29>>2] = $24; $30 = (($28) + 4)|0; $31 = $30; HEAP32[$31>>2] = $27; $32 = (_String_CaselessStarts($1,$0)|0); $33 = ($32|0)==(0); if ($33) { $$119 = $$01826; } else { $34 = ($$01826|0)==(0|0); if ($34) { $$119 = $$127; } else { label = 9; break; } } $35 = ((($$127)) + 32|0); $$1 = HEAP32[$35>>2]|0; $36 = ($$1|0)==(0|0); if ($36) { label = 11; break; } else { $$01826 = $$119;$$127 = $$1; } } if ((label|0) == 9) { _Chat_Add1(26911,$0); $$020 = 0; STACKTOP = sp;return ($$020|0); } else if ((label|0) == 11) { $37 = ($$119|0)==(0|0); if ($37) { break; } else { $$020 = $$119; } STACKTOP = sp;return ($$020|0); } } } } while(0); _Chat_Add1(26973,$0); _Chat_AddRaw(27016); $$020 = 0; STACKTOP = sp;return ($$020|0); } function _Chat_Add($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Chat_AddOf($0,0); return; } function _GpuInfoCommand_Execute($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 464|0; $2 = sp; $3 = sp + 456|0; $4 = sp + 448|0; HEAP32[$3>>2] = $2; $5 = ((($3)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($3)) + 6|0); HEAP16[$6>>1] = 448; _Gfx_GetApiInfo($3); $7 = HEAP16[$5>>1]|0; $8 = ($7<<16>>16)==(0); if ($8) { STACKTOP = sp;return; } $9 = ((($4)) + 4|0); while(1) { _String_UNSAFE_SplitBy($3,10,$4); $10 = HEAP16[$9>>1]|0; $11 = ($10<<16>>16)==(0); if (!($11)) { _Chat_Add1(27221,$4); } $12 = HEAP16[$5>>1]|0; $13 = ($12<<16>>16)==(0); if ($13) { break; } } STACKTOP = sp;return; } function _Chat_SetLogName($0) { $0 = $0|0; var $$08 = 0, $$1 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0; var sp = 0; sp = STACKTOP; $1 = HEAP16[(13568)>>1]|0; $2 = ($1<<16>>16)==(0); if (!($2)) { return; } $3 = ((($0)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = ($4<<16>>16)==(0); if ($5) { return; } $$08 = 0; while(1) { $6 = HEAP32[$0>>2]|0; $7 = (($6) + ($$08)|0); $8 = HEAP8[$7>>0]|0; $9 = (_AllowedLogNameChar($8)|0); $10 = ($9<<24>>24)==(0); if ($10) { $11 = ($8<<24>>24)==(38); $12 = $11&1; $spec$select = (($$08) + ($12))|0; $$1 = $spec$select; } else { _String_Append(13564,$8); $$1 = $$08; } $13 = (($$1) + 1)|0; $14 = HEAP16[$3>>1]|0; $15 = $14&65535; $16 = ($13|0)<($15|0); if ($16) { $$08 = $13; } else { break; } } return; } function _AllowedLogNameChar($0) { $0 = $0|0; var $$off13 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; switch ($0<<24>>24) { case 41: case 40: case 93: case 91: case 125: case 123: { return 1; } default: { } } $$off13 = (($0) + -48)<<24>>24; $1 = ($$off13&255)<(10); if ($1) { return 1; } else { $2 = $0 & -33; $3 = (($2) + -65)<<24>>24; $4 = ($3&255)<(26); $spec$select = $4&1; return ($spec$select|0); } } function _Chat_Add2($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _Chat_Add4($0,$1,$2,0,0); return; } function _Chat_Send($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { return; } _Event_RaiseChat((1797168),$0,0); $5 = ($1<<24>>24)==(0); if (!($5)) { _LogInputUsage($0); } $6 = (_Commands_IsCommandPrefix($0)|0); $7 = ($6<<24>>24)==(0); if ($7) { $8 = HEAP32[(1949200)>>2]|0; FUNCTION_TABLE_vi[$8 & 511]($0); return; } else { _Commands_Execute($0); return; } } function _LogInputUsage($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = HEAP32[(1776476)>>2]|0; $3 = ($2|0)==(0); if (!($3)) { $4 = (($2) + -1)|0; _StringsBuffer_UNSAFE_Get($1,1776468,$4); $5 = (_String_Equals($0,$1)|0); $6 = ($5|0)==(0); if (!($6)) { STACKTOP = sp;return; } } _StringsBuffer_Add(1776468,$0); STACKTOP = sp;return; } function _Commands_IsCommandPrefix($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP16[$1>>1]|0; $3 = ($2<<16>>16)==(0); if ($3) { $$0 = 0; return ($$0|0); } $4 = HEAP8[(1949240)>>0]|0; $5 = ($4<<24>>24)==(0); if (!($5)) { $6 = HEAP32[$0>>2]|0; $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(47); if ($8) { $$0 = 1; return ($$0|0); } } $9 = (_String_CaselessStarts($0,13912)|0); $10 = ($9|0)==(0); if (!($10)) { $$0 = 1; return ($$0|0); } $11 = (_String_CaselessEquals($0,13920)|0); $12 = ($11|0)!=(0); $phitmp = $12&1; $$0 = $phitmp; return ($$0|0); } function _Commands_Execute($0) { $0 = $0|0; var $$ = 0, $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 432|0; $1 = sp + 408|0; $2 = sp + 424|0; $3 = sp + 416|0; $4 = sp; $5 = sp + 400|0; $6 = $0; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = $1; $13 = $12; HEAP32[$13>>2] = $8; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; $16 = (_String_CaselessStarts($1,13896)|0); $17 = ($16|0)==(0); if ($17) { $18 = (_String_CaselessStarts($1,13904)|0); $19 = ($18|0)==(0); $$ = $19 ? 1 : 7; $$0 = $$; } else { $$0 = 8; } _String_UNSAFE_SubstringAt($5,$1,$$0); $20 = $5; $21 = $20; $22 = HEAP32[$21>>2]|0; $23 = (($20) + 4)|0; $24 = $23; $25 = HEAP32[$24>>2]|0; $26 = $1; $27 = $26; HEAP32[$27>>2] = $22; $28 = (($26) + 4)|0; $29 = $28; HEAP32[$29>>2] = $25; $30 = ((($1)) + 4|0); $31 = HEAP16[$30>>1]|0; $32 = ($31<<16>>16)==(0); if ($32) { _Commands_PrintDefault(); STACKTOP = sp;return; } (_String_UNSAFE_Separate($1,32,$2,$3)|0); $33 = (_Commands_FindMatch($2)|0); $34 = ($33|0)==(0|0); if ($34) { STACKTOP = sp;return; } $35 = ((($33)) + 8|0); $36 = HEAP8[$35>>0]|0; $37 = $36&255; $38 = $37 & 1; $39 = ($38|0)==(0); $40 = HEAP8[(1949240)>>0]|0; $41 = ($40<<24>>24)!=(0); $or$cond = $41 | $39; if (!($or$cond)) { _Chat_Add1(27226,$2); STACKTOP = sp;return; } $42 = $37 & 2; $43 = ($42|0)==(0); if ($43) { $50 = (_String_UNSAFE_Split($3,32,$4,50)|0); $51 = ((($33)) + 4|0); $52 = HEAP32[$51>>2]|0; $53 = ((($3)) + 4|0); $54 = HEAP16[$53>>1]|0; $55 = ($54<<16>>16)==(0); $56 = $55 ? 0 : $50; FUNCTION_TABLE_vii[$52 & 255]($4,$56); STACKTOP = sp;return; } else { $44 = ((($33)) + 4|0); $45 = HEAP32[$44>>2]|0; $46 = ((($3)) + 4|0); $47 = HEAP16[$46>>1]|0; $48 = ($47<<16>>16)!=(0); $49 = $48&1; FUNCTION_TABLE_vii[$45 & 255]($3,$49); STACKTOP = sp;return; } } function _GZipHeader_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[$0>>0] = 0; $1 = ((($0)) + 1|0); HEAP8[$1>>0] = 0; $2 = ((($0)) + 4|0); HEAP32[$2>>2] = 0; $3 = ((($0)) + 2|0); HEAP8[$3>>0] = 0; return; } function _GZipHeader_Read($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0; var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0; var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0; var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0; var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0; var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = HEAP8[$1>>0]|0; switch ($3<<24>>24) { case 0: { label = 2; break; } case 1: { label = 5; break; } case 2: { label = 8; break; } case 3: { label = 11; break; } case 4: { label = 14; break; } case 5: { label = 19; break; } case 6: { label = 21; break; } case 8: { label = 23; break; } case 9: { label = 29; break; } case 7: { break; } default: { $$0 = 0; STACKTOP = sp;return ($$0|0); } } do { if ((label|0) == 2) { $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = (FUNCTION_TABLE_iii[$5 & 127]($0,$2)|0); $7 = ($6|0)==(0); if (!($7)) { $$0 = $6; STACKTOP = sp;return ($$0|0); } $8 = HEAP8[$2>>0]|0; $9 = ($8<<24>>24)==(31); if ($9) { $10 = HEAP8[$1>>0]|0; $11 = (($10) + 1)<<24>>24; HEAP8[$1>>0] = $11; label = 5; break; } else { $$0 = -857812939; STACKTOP = sp;return ($$0|0); } } } while(0); do { if ((label|0) == 5) { $12 = ((($0)) + 4|0); $13 = HEAP32[$12>>2]|0; $14 = (FUNCTION_TABLE_iii[$13 & 127]($0,$2)|0); $15 = ($14|0)==(0); if (!($15)) { $$0 = $14; STACKTOP = sp;return ($$0|0); } $16 = HEAP8[$2>>0]|0; $17 = ($16<<24>>24)==(-117); if ($17) { $18 = HEAP8[$1>>0]|0; $19 = (($18) + 1)<<24>>24; HEAP8[$1>>0] = $19; label = 8; break; } else { $$0 = -857812938; STACKTOP = sp;return ($$0|0); } } } while(0); do { if ((label|0) == 8) { $20 = ((($0)) + 4|0); $21 = HEAP32[$20>>2]|0; $22 = (FUNCTION_TABLE_iii[$21 & 127]($0,$2)|0); $23 = ($22|0)==(0); if (!($23)) { $$0 = $22; STACKTOP = sp;return ($$0|0); } $24 = HEAP8[$2>>0]|0; $25 = ($24<<24>>24)==(8); if ($25) { $26 = HEAP8[$1>>0]|0; $27 = (($26) + 1)<<24>>24; HEAP8[$1>>0] = $27; label = 11; break; } else { $$0 = -857812937; STACKTOP = sp;return ($$0|0); } } } while(0); do { if ((label|0) == 11) { $28 = ((($0)) + 4|0); $29 = HEAP32[$28>>2]|0; $30 = (FUNCTION_TABLE_iii[$29 & 127]($0,$2)|0); $31 = ($30|0)==(0); if (!($31)) { $$0 = $30; STACKTOP = sp;return ($$0|0); } $32 = HEAP8[$2>>0]|0; $33 = $32&255; $34 = ((($1)) + 4|0); HEAP32[$34>>2] = $33; $35 = $33 & 4; $36 = ($35|0)==(0); if ($36) { $37 = HEAP8[$1>>0]|0; $38 = (($37) + 1)<<24>>24; HEAP8[$1>>0] = $38; label = 14; break; } else { $$0 = -857812936; STACKTOP = sp;return ($$0|0); } } } while(0); if ((label|0) == 14) { $39 = ((($1)) + 2|0); $40 = HEAP8[$39>>0]|0; $41 = ($40&255)<(4); L37: do { if ($41) { $42 = ((($0)) + 4|0); while(1) { $43 = HEAP32[$42>>2]|0; $44 = (FUNCTION_TABLE_iii[$43 & 127]($0,$2)|0); $45 = ($44|0)==(0); if (!($45)) { $$0 = $44; break; } $46 = HEAP8[$39>>0]|0; $47 = (($46) + 1)<<24>>24; HEAP8[$39>>0] = $47; $48 = ($47&255)<(4); if (!($48)) { break L37; } } STACKTOP = sp;return ($$0|0); } } while(0); $49 = HEAP8[$1>>0]|0; $50 = (($49) + 1)<<24>>24; HEAP8[$1>>0] = $50; HEAP8[$39>>0] = 0; label = 19; } do { if ((label|0) == 19) { $51 = ((($0)) + 4|0); $52 = HEAP32[$51>>2]|0; $53 = (FUNCTION_TABLE_iii[$52 & 127]($0,$2)|0); $54 = ($53|0)==(0); if ($54) { $55 = HEAP8[$1>>0]|0; $56 = (($55) + 1)<<24>>24; HEAP8[$1>>0] = $56; label = 21; break; } else { $$0 = $53; STACKTOP = sp;return ($$0|0); } } } while(0); do { if ((label|0) == 21) { $57 = ((($0)) + 4|0); $58 = HEAP32[$57>>2]|0; $59 = (FUNCTION_TABLE_iii[$58 & 127]($0,$2)|0); $60 = ($59|0)==(0); if ($60) { $61 = HEAP8[$1>>0]|0; $62 = (($61) + 1)<<24>>24; HEAP8[$1>>0] = $62; label = 23; break; } else { $$0 = $59; STACKTOP = sp;return ($$0|0); } } } while(0); if ((label|0) == 23) { $63 = ((($1)) + 4|0); $64 = HEAP32[$63>>2]|0; $65 = $64 & 8; $66 = ($65|0)==(0); L56: do { if (!($66)) { $67 = ((($0)) + 4|0); $68 = HEAP32[$67>>2]|0; $69 = (FUNCTION_TABLE_iii[$68 & 127]($0,$2)|0); $70 = ($69|0)==(0); if (!($70)) { $$0 = $69; STACKTOP = sp;return ($$0|0); } while(1) { $74 = HEAP8[$2>>0]|0; $75 = ($74<<24>>24)==(0); if ($75) { break L56; } $71 = HEAP32[$67>>2]|0; $72 = (FUNCTION_TABLE_iii[$71 & 127]($0,$2)|0); $73 = ($72|0)==(0); if (!($73)) { $$0 = $72; break; } } STACKTOP = sp;return ($$0|0); } } while(0); $76 = HEAP8[$1>>0]|0; $77 = (($76) + 1)<<24>>24; HEAP8[$1>>0] = $77; label = 29; } if ((label|0) == 29) { $78 = ((($1)) + 4|0); $79 = HEAP32[$78>>2]|0; $80 = $79 & 16; $81 = ($80|0)==(0); L68: do { if (!($81)) { $82 = ((($0)) + 4|0); $83 = HEAP32[$82>>2]|0; $84 = (FUNCTION_TABLE_iii[$83 & 127]($0,$2)|0); $85 = ($84|0)==(0); if (!($85)) { $$0 = $84; STACKTOP = sp;return ($$0|0); } while(1) { $89 = HEAP8[$2>>0]|0; $90 = ($89<<24>>24)==(0); if ($90) { break L68; } $86 = HEAP32[$82>>2]|0; $87 = (FUNCTION_TABLE_iii[$86 & 127]($0,$2)|0); $88 = ($87|0)==(0); if (!($88)) { $$0 = $87; break; } } STACKTOP = sp;return ($$0|0); } } while(0); $91 = HEAP8[$1>>0]|0; $92 = (($91) + 1)<<24>>24; HEAP8[$1>>0] = $92; } $93 = ((($1)) + 4|0); $94 = HEAP32[$93>>2]|0; $95 = $94 & 2; $96 = ($95|0)==(0); L79: do { if (!($96)) { $97 = ((($1)) + 2|0); $98 = HEAP8[$97>>0]|0; $99 = ($98&255)<(2); if ($99) { $100 = ((($0)) + 4|0); while(1) { $101 = HEAP32[$100>>2]|0; $102 = (FUNCTION_TABLE_iii[$101 & 127]($0,$2)|0); $103 = ($102|0)==(0); if (!($103)) { $$0 = $102; break; } $104 = HEAP8[$97>>0]|0; $105 = (($104) + 1)<<24>>24; HEAP8[$97>>0] = $105; $106 = ($105&255)<(2); if (!($106)) { break L79; } } STACKTOP = sp;return ($$0|0); } } } while(0); $107 = HEAP8[$1>>0]|0; $108 = (($107) + 1)<<24>>24; HEAP8[$1>>0] = $108; $109 = ((($1)) + 2|0); HEAP8[$109>>0] = 0; $110 = ((($1)) + 1|0); HEAP8[$110>>0] = 1; $$0 = 0; STACKTOP = sp;return ($$0|0); } function _ZLibHeader_Init($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[$0>>0] = 0; $1 = ((($0)) + 1|0); HEAP8[$1>>0] = 0; return; } function _ZLibHeader_Read($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = HEAP8[$1>>0]|0; switch ($3<<24>>24) { case 0: { $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = (FUNCTION_TABLE_iii[$5 & 127]($0,$2)|0); $7 = ($6|0)==(0); if ($7) { $8 = HEAP8[$2>>0]|0; $9 = $8 & 15; $10 = ($9<<24>>24)==(8); if ($10) { $11 = HEAP8[$1>>0]|0; $12 = (($11) + 1)<<24>>24; HEAP8[$1>>0] = $12; label = 5; } else { $$0 = -857812935; } } else { $$0 = $6; } break; } case 1: { label = 5; break; } default: { $$0 = 0; } } if ((label|0) == 5) { $13 = ((($0)) + 4|0); $14 = HEAP32[$13>>2]|0; $15 = (FUNCTION_TABLE_iii[$14 & 127]($0,$2)|0); $16 = ($15|0)==(0); if ($16) { $17 = HEAP8[$2>>0]|0; $18 = $17 & 32; $19 = ($18<<24>>24)==(0); if ($19) { $20 = HEAP8[$1>>0]|0; $21 = (($20) + 1)<<24>>24; HEAP8[$1>>0] = $21; $22 = ((($1)) + 1|0); HEAP8[$22>>0] = 1; $$0 = 0; } else { $$0 = -857812934; } } else { $$0 = $15; } } STACKTOP = sp;return ($$0|0); } function _Inflate_Init2($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[$0>>0] = 0; $2 = ((($0)) + 1|0); HEAP8[$2>>0] = 0; $3 = ((($0)) + 4|0); HEAP32[$3>>2] = 0; $4 = ((($0)) + 8|0); HEAP32[$4>>2] = 0; $5 = ((($0)) + 64|0); $6 = ((($0)) + 12|0); HEAP32[$6>>2] = $5; $7 = ((($0)) + 16|0); HEAP32[$7>>2] = 0; $8 = ((($0)) + 20|0); HEAP32[$8>>2] = 0; $9 = ((($0)) + 24|0); HEAP32[$9>>2] = 0; $10 = ((($0)) + 28|0); HEAP32[$10>>2] = $1; $11 = ((($0)) + 36|0); HEAP32[$11>>2] = 0; $12 = ((($0)) + 44736|0); HEAP32[$12>>2] = 0; return; } function _Inflate_Process($0) { $0 = $0|0; var $$ = 0, $$0373 = 0, $$0373$be = 0, $$0375 = 0, $$0375$be = 0, $$0503 = 0, $$1374 = 0, $$1376 = 0, $$1469 = 0, $$379 = 0, $$lcssa = 0, $$lcssa400 = 0, $$lcssa404 = 0, $$lcssa408 = 0, $$lcssa412 = 0, $$lcssa416 = 0, $$lcssa420 = 0, $$lcssa424 = 0, $$lcssa433 = 0, $$lcssa437 = 0; var $$pr = 0, $$pr551 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0; var $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0; var $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0; var $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0; var $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0; var $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0; var $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0; var $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0; var $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0; var $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0; var $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0; var $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0; var $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0; var $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0; var $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0; var $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0; var $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0; var $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0; var $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0; var $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0; var $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $51 = 0, $52 = 0, $53 = 0; var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0; var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0; var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $spec$select = 0, $spec$select384 = 0, $spec$select385 = 0, $spec$select386 = 0, $trunc = 0, $trunc$clear = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 8|0); $2 = ((($0)) + 8|0); $3 = ((($0)) + 24|0); $4 = ((($0)) + 32|0); $5 = ((($0)) + 8|0); $6 = ((($0)) + 8|0); $7 = ((($0)) + 32|0); $8 = ((($0)) + 40|0); $9 = ((($0)) + 44|0); $10 = ((($0)) + 48|0); $11 = ((($0)) + 32|0); $12 = ((($0)) + 52|0); $13 = ((($0)) + 24|0); $14 = ((($0)) + 56|0); $15 = ((($0)) + 8|0); $16 = ((($0)) + 10272|0); $17 = ((($0)) + 60|0); $18 = ((($0)) + 60|0); $19 = ((($0)) + 8|0); $20 = ((($0)) + 24|0); $21 = ((($0)) + 4|0); $22 = ((($0)) + 1|0); $23 = ((($0)) + 16|0); $24 = ((($0)) + 12|0); $25 = ((($0)) + 4|0); $26 = ((($0)) + 4|0); $27 = ((($0)) + 16|0); $28 = ((($0)) + 12|0); $29 = ((($0)) + 4|0); $30 = ((($0)) + 16|0); $31 = ((($0)) + 4|0); $32 = ((($0)) + 20|0); $33 = ((($0)) + 36|0); $34 = ((($0)) + 4|0); $35 = ((($0)) + 44|0); $36 = ((($0)) + 48|0); $37 = ((($0)) + 40|0); $38 = ((($0)) + 32|0); $39 = ((($0)) + 16|0); $40 = ((($0)) + 12|0); $41 = ((($0)) + 4|0); $42 = ((($0)) + 8|0); $43 = ((($0)) + 4|0); $44 = ((($0)) + 16|0); $45 = ((($0)) + 12|0); $46 = ((($0)) + 4|0); $47 = ((($0)) + 8576|0); $48 = ((($0)) + 44|0); $49 = ((($0)) + 48|0); $50 = ((($0)) + 32|0); $51 = ((($0)) + 8|0); $52 = ((($0)) + 8|0); $53 = ((($0)) + 8|0); $54 = ((($0)) + 8576|0); $55 = ((($0)) + 4|0); $56 = ((($0)) + 16|0); $57 = ((($0)) + 12|0); $58 = ((($0)) + 4|0); $59 = ((($0)) + 4|0); $60 = ((($0)) + 16|0); $61 = ((($0)) + 12|0); $62 = ((($0)) + 4|0); $63 = ((($0)) + 56|0); $64 = ((($0)) + 60|0); $65 = ((($0)) + 36|0); $66 = ((($0)) + 16|0); $67 = ((($0)) + 8576|0); $68 = ((($0)) + 10272|0); $69 = ((($0)) + 16|0); $70 = ((($0)) + 44736|0); $71 = ((($0)) + 32|0); $72 = ((($0)) + 24|0); $73 = ((($0)) + 8576|0); $74 = ((($0)) + 8256|0); $75 = ((($0)) + 16|0); $76 = ((($0)) + 4|0); $77 = ((($0)) + 32|0); $78 = ((($0)) + 16|0); $79 = ((($0)) + 12|0); $80 = ((($0)) + 4|0); $81 = ((($0)) + 4|0); $82 = ((($0)) + 16|0); $83 = ((($0)) + 12|0); $84 = ((($0)) + 4|0); $85 = ((($0)) + 4|0); $86 = ((($0)) + 16|0); $87 = ((($0)) + 12|0); $88 = ((($0)) + 4|0); $89 = ((($0)) + 20|0); $90 = ((($0)) + 24|0); $91 = ((($0)) + 24|0); $92 = ((($0)) + 32|0); $93 = ((($0)) + 24|0); $94 = ((($0)) + 8576|0); $95 = ((($0)) + 8256|0); $96 = ((($0)) + 52|0); $97 = ((($0)) + 20|0); $98 = ((($0)) + 36|0); $99 = ((($0)) + 1|0); $100 = ((($0)) + 56|0); $101 = ((($0)) + 16|0); $102 = ((($0)) + 20|0); $103 = ((($0)) + 12|0); $104 = ((($0)) + 36|0); $105 = ((($0)) + 10272|0); $106 = ((($0)) + 1|0); $107 = ((($0)) + 11968|0); $$0373 = 0;$$0375 = 0; L1: while(1) { $108 = HEAP8[$0>>0]|0; L3: do { switch ($108<<24>>24) { case 13: { label = 111; break L1; } case 0: { $109 = HEAP32[$1>>2]|0; $110 = ($109>>>0)<(3); if ($110) { $111 = HEAP32[$23>>2]|0; $112 = ($111|0)==(0); if ($112) { label = 111; break L1; } $113 = (($111) + -1)|0; HEAP32[$23>>2] = $113; $114 = HEAP32[$24>>2]|0; $115 = ((($114)) + 1|0); HEAP32[$24>>2] = $115; $116 = HEAP8[$114>>0]|0; $117 = $116&255; $118 = $117 << $109; $119 = HEAP32[$25>>2]|0; $120 = $118 | $119; HEAP32[$25>>2] = $120; $121 = (($109) + 8)|0; HEAP32[$1>>2] = $121; $$lcssa437 = $121; } else { $$lcssa437 = $109; } $122 = HEAP32[$21>>2]|0; $123 = (3)?($122 >>> 3):($122); HEAP32[$21>>2] = $123; $124 = (($$lcssa437) + -3)|0; HEAP32[$1>>2] = $124; $125 = $122 & 1; $126 = $125&255; HEAP8[$22>>0] = $126; $127 = (1)?($122 >>> 1):($122); $trunc = $127&255; $trunc$clear = $trunc & 3; switch ($trunc$clear<<24>>24) { case 0: { $128 = $124 & 7; $129 = ($128)?($123 >>> $128):($123); HEAP32[$21>>2] = $129; $130 = (($124) - ($128))|0; HEAP32[$1>>2] = $130; HEAP8[$0>>0] = 1; $$0373$be = $$0373;$$0375$be = $$0375; break L3; } case 1: { (_Huffman_Build($67,2064,288)|0); (_Huffman_Build($68,2352,32)|0); $131 = HEAP32[$69>>2]|0; $132 = ($131>>>0)>(9); if ($132) { $133 = HEAP32[$91>>2]|0; $134 = ($133>>>0)>(257); $spec$select384 = $134 ? 12 : 7; $135 = $spec$select384; } else { $135 = 7; } HEAP8[$0>>0] = $135; $$0373$be = $$0373;$$0375$be = $$0375; break L3; } case 2: { HEAP8[$0>>0] = 3; $$0373$be = $$0373;$$0375$be = $$0375; break L3; } case 3: { HEAP32[$70>>2] = -857812906; HEAP8[$0>>0] = 13; $$0373$be = $$0373;$$0375$be = $$0375; break L3; } default: { label = 110; break L1; } } } case 1: { $136 = HEAP32[$2>>2]|0; $137 = ($136>>>0)<(32); if ($137) { $146 = $136; while(1) { $138 = HEAP32[$27>>2]|0; $139 = ($138|0)==(0); if ($139) { label = 111; break L1; } $140 = (($138) + -1)|0; HEAP32[$27>>2] = $140; $141 = HEAP32[$28>>2]|0; $142 = ((($141)) + 1|0); HEAP32[$28>>2] = $142; $143 = HEAP8[$141>>0]|0; $144 = $143&255; $145 = $144 << $146; $147 = HEAP32[$29>>2]|0; $148 = $145 | $147; HEAP32[$29>>2] = $148; $149 = (($146) + 8)|0; HEAP32[$2>>2] = $149; $150 = ($149>>>0)<(32); if ($150) { $146 = $149; } else { $$lcssa433 = $149; break; } } } else { $$lcssa433 = $136; } $151 = HEAP32[$26>>2]|0; $152 = $151 & 65535; $153 = (16)?($151 >>> 16):($151); HEAP32[$26>>2] = 0; $154 = (($$lcssa433) + -32)|0; HEAP32[$2>>2] = $154; $155 = $153 ^ 65535; $156 = ($152|0)==($155|0); if (!($156)) { label = 18; break L1; } HEAP32[$71>>2] = $152; HEAP8[$0>>0] = 2; label = 20; break; } case 2: { label = 20; break; } case 3: { $224 = HEAP32[$6>>2]|0; $225 = ($224>>>0)<(14); if ($225) { $234 = $224; while(1) { $226 = HEAP32[$39>>2]|0; $227 = ($226|0)==(0); if ($227) { label = 111; break L1; } $228 = (($226) + -1)|0; HEAP32[$39>>2] = $228; $229 = HEAP32[$40>>2]|0; $230 = ((($229)) + 1|0); HEAP32[$40>>2] = $230; $231 = HEAP8[$229>>0]|0; $232 = $231&255; $233 = $232 << $234; $235 = HEAP32[$41>>2]|0; $236 = $233 | $235; HEAP32[$41>>2] = $236; $237 = (($234) + 8)|0; HEAP32[$6>>2] = $237; $238 = ($237>>>0)<(14); if ($238) { $234 = $237; } else { $$lcssa416 = $237; break; } } } else { $$lcssa416 = $224; } $239 = HEAP32[$34>>2]|0; $240 = $239 & 31; $241 = (($240) + 257)|0; HEAP32[$35>>2] = $241; $242 = (5)?($239 >>> 5):($239); $243 = $242 & 31; $244 = (($243) + 1)|0; HEAP32[$36>>2] = $244; $245 = (10)?($239 >>> 10):($239); $246 = $245 & 15; $247 = (($246) + 4)|0; HEAP32[$37>>2] = $247; $248 = (14)?($239 >>> 14):($239); HEAP32[$34>>2] = $248; $249 = (($$lcssa416) + -14)|0; HEAP32[$6>>2] = $249; HEAP32[$38>>2] = 0; HEAP8[$0>>0] = 4; label = 39; break; } case 4: { label = 39; break; } case 5: { label = 50; break; } case 6: { $319 = HEAP32[$12>>2]|0; switch ($319|0) { case 16: { $320 = HEAP32[$51>>2]|0; $321 = ($320>>>0)<(2); if ($321) { $322 = HEAP32[$78>>2]|0; $323 = ($322|0)==(0); if ($323) { label = 111; break L1; } $324 = (($322) + -1)|0; HEAP32[$78>>2] = $324; $325 = HEAP32[$79>>2]|0; $326 = ((($325)) + 1|0); HEAP32[$79>>2] = $326; $327 = HEAP8[$325>>0]|0; $328 = $327&255; $329 = $328 << $320; $330 = HEAP32[$80>>2]|0; $331 = $329 | $330; HEAP32[$80>>2] = $331; $332 = (($320) + 8)|0; HEAP32[$51>>2] = $332; $$lcssa412 = $332; } else { $$lcssa412 = $320; } $333 = HEAP32[$76>>2]|0; $334 = (2)?($333 >>> 2):($333); HEAP32[$76>>2] = $334; $335 = (($$lcssa412) + -2)|0; HEAP32[$51>>2] = $335; $336 = HEAP32[$77>>2]|0; $337 = ($336|0)==(0); if ($337) { label = 68; break L1; } $339 = $333 & 3; $340 = (($339) + 3)|0; $341 = (($336) + -1)|0; $342 = (((($0)) + 8256|0) + ($341)|0); $343 = HEAP8[$342>>0]|0; $$1374 = $343;$$1376 = $340; break; } case 17: { $344 = HEAP32[$52>>2]|0; $345 = ($344>>>0)<(3); if ($345) { $346 = HEAP32[$82>>2]|0; $347 = ($346|0)==(0); if ($347) { label = 111; break L1; } $348 = (($346) + -1)|0; HEAP32[$82>>2] = $348; $349 = HEAP32[$83>>2]|0; $350 = ((($349)) + 1|0); HEAP32[$83>>2] = $350; $351 = HEAP8[$349>>0]|0; $352 = $351&255; $353 = $352 << $344; $354 = HEAP32[$84>>2]|0; $355 = $353 | $354; HEAP32[$84>>2] = $355; $356 = (($344) + 8)|0; HEAP32[$52>>2] = $356; $$lcssa408 = $356; } else { $$lcssa408 = $344; } $357 = HEAP32[$81>>2]|0; $358 = $357 & 7; $359 = (3)?($357 >>> 3):($357); HEAP32[$81>>2] = $359; $360 = (($$lcssa408) + -3)|0; HEAP32[$52>>2] = $360; $361 = (($358) + 3)|0; $$1374 = 0;$$1376 = $361; break; } case 18: { $362 = HEAP32[$53>>2]|0; $363 = ($362>>>0)<(7); if ($363) { $364 = HEAP32[$86>>2]|0; $365 = ($364|0)==(0); if ($365) { label = 111; break L1; } $366 = (($364) + -1)|0; HEAP32[$86>>2] = $366; $367 = HEAP32[$87>>2]|0; $368 = ((($367)) + 1|0); HEAP32[$87>>2] = $368; $369 = HEAP8[$367>>0]|0; $370 = $369&255; $371 = $370 << $362; $372 = HEAP32[$88>>2]|0; $373 = $371 | $372; HEAP32[$88>>2] = $373; $374 = (($362) + 8)|0; HEAP32[$53>>2] = $374; $$lcssa404 = $374; } else { $$lcssa404 = $362; } $375 = HEAP32[$85>>2]|0; $376 = $375 & 127; $377 = (7)?($375 >>> 7):($375); HEAP32[$85>>2] = $377; $378 = (($$lcssa404) + -7)|0; HEAP32[$53>>2] = $378; $379 = (($376) + 11)|0; $$1374 = 0;$$1376 = $379; break; } default: { $$1374 = $$0373;$$1376 = $$0375; } } $380 = HEAP32[$48>>2]|0; $381 = HEAP32[$49>>2]|0; $382 = (($381) + ($380))|0; $383 = HEAP32[$50>>2]|0; $384 = (($383) + ($$1376))|0; $385 = ($384>>>0)>($382>>>0); if ($385) { label = 79; break L1; } $387 = (((($0)) + 8256|0) + ($383)|0); _Mem_Set($387,$$1374,$$1376); $388 = HEAP32[$50>>2]|0; $389 = (($388) + ($$1376))|0; HEAP32[$50>>2] = $389; HEAP8[$0>>0] = 5; $$0373$be = $$1374;$$0375$be = $$1376; break; } case 7: { $390 = HEAP32[$13>>2]|0; $391 = ($390|0)==(0); if ($391) { label = 111; break L1; } $392 = (_Huffman_Decode($0,$54)|0); $393 = ($392|0)<(256); if ($393) { $394 = ($392|0)==(-1); if ($394) { label = 111; break L1; } $395 = $392&255; $396 = HEAP32[$97>>2]|0; HEAP8[$396>>0] = $395; $397 = HEAP32[$98>>2]|0; $398 = (((($0)) + 11968|0) + ($397)|0); HEAP8[$398>>0] = $395; $399 = HEAP32[$97>>2]|0; $400 = ((($399)) + 1|0); HEAP32[$97>>2] = $400; $401 = HEAP32[$13>>2]|0; $402 = (($401) + -1)|0; HEAP32[$13>>2] = $402; $403 = HEAP32[$98>>2]|0; $404 = (($403) + 1)|0; $405 = $404 & 32767; HEAP32[$98>>2] = $405; $$0373$be = $$0373;$$0375$be = $$0375; break L3; } $406 = ($392|0)==(256); if ($406) { $407 = HEAP8[$99>>0]|0; $408 = ($407<<24>>24)==(0); $409 = $408 ? 0 : 13; HEAP8[$0>>0] = $409; $$0373$be = $$0373;$$0375$be = $$0375; break L3; } else { $410 = (($392) + -257)|0; HEAP32[$100>>2] = $410; HEAP8[$0>>0] = 8; label = 88; break L3; } } case 8: { label = 88; break; } case 9: { label = 93; break; } case 10: { label = 95; break; } case 11: { label = 100; break; } case 12: { _Inflate_InflateFast($0); $502 = HEAP8[$0>>0]|0; $503 = ($502<<24>>24)==(12); if ($503) { $504 = HEAP32[$66>>2]|0; $505 = ($504>>>0)>(9); if ($505) { $506 = HEAP32[$90>>2]|0; $507 = ($506>>>0)>(257); $spec$select386 = $507 ? 12 : 7; $508 = $spec$select386; } else { $508 = 7; } HEAP8[$0>>0] = $508; $$0373$be = $$0373;$$0375$be = $$0375; } else { $$0373$be = $$0373;$$0375$be = $$0375; } break; } default: { $$0373$be = $$0373;$$0375$be = $$0375; } } } while(0); if ((label|0) == 20) { label = 0; $158 = HEAP32[$5>>2]|0; $159 = ($158|0)==(0); L68: do { if (!($159)) { while(1) { $160 = HEAP32[$3>>2]|0; $161 = ($160|0)==(0); if ($161) { break L68; } $162 = HEAP32[$4>>2]|0; $163 = ($162|0)==(0); if ($163) { break L68; } $164 = HEAP32[$31>>2]|0; $165 = $164&255; $166 = HEAP32[$32>>2]|0; HEAP8[$166>>0] = $165; $167 = HEAP32[$31>>2]|0; $168 = (8)?($167 >>> 8):($167); HEAP32[$31>>2] = $168; $169 = HEAP32[$5>>2]|0; $170 = (($169) + -8)|0; HEAP32[$5>>2] = $170; $171 = HEAP32[$32>>2]|0; $172 = HEAP8[$171>>0]|0; $173 = HEAP32[$33>>2]|0; $174 = (((($0)) + 11968|0) + ($173)|0); HEAP8[$174>>0] = $172; $175 = HEAP32[$33>>2]|0; $176 = (($175) + 1)|0; $177 = $176 & 32767; HEAP32[$33>>2] = $177; $178 = HEAP32[$32>>2]|0; $179 = ((($178)) + 1|0); HEAP32[$32>>2] = $179; $180 = HEAP32[$3>>2]|0; $181 = (($180) + -1)|0; HEAP32[$3>>2] = $181; $182 = HEAP32[$4>>2]|0; $183 = (($182) + -1)|0; HEAP32[$4>>2] = $183; $184 = HEAP32[$5>>2]|0; $185 = ($184|0)==(0); if ($185) { break; } } } } while(0); $186 = HEAP32[$30>>2]|0; $187 = ($186|0)==(0); if ($187) { label = 111; break; } $188 = HEAP32[$72>>2]|0; $189 = ($188|0)==(0); if ($189) { label = 111; break; } $190 = ($186>>>0)<($188>>>0); $$ = $190 ? $186 : $188; $191 = HEAP32[$92>>2]|0; $192 = ($$>>>0)<($191>>>0); $193 = $192 ? $$ : $191; $194 = ($193|0)==(0); if ($194) { $219 = $191; } else { $195 = HEAP32[$102>>2]|0; $196 = HEAP32[$103>>2]|0; _Mem_Copy($195,$196,$193); $197 = HEAP32[$104>>2]|0; $198 = (32768 - ($197))|0; $199 = ($198>>>0)<($193>>>0); $200 = $199 ? $198 : $193; $201 = (((($0)) + 11968|0) + ($197)|0); $202 = HEAP32[$102>>2]|0; _Mem_Copy($201,$202,$200); if ($199) { $203 = (($193) - ($200))|0; $204 = HEAP32[$102>>2]|0; $205 = (($204) + ($200)|0); _Mem_Copy($107,$205,$203); } $206 = HEAP32[$104>>2]|0; $207 = (($206) + ($193))|0; $208 = $207 & 32767; HEAP32[$104>>2] = $208; $209 = HEAP32[$102>>2]|0; $210 = (($209) + ($193)|0); HEAP32[$102>>2] = $210; $211 = HEAP32[$72>>2]|0; $212 = (($211) - ($193))|0; HEAP32[$72>>2] = $212; $213 = HEAP32[$92>>2]|0; $214 = (($213) - ($193))|0; HEAP32[$92>>2] = $214; $215 = HEAP32[$103>>2]|0; $216 = (($215) + ($193)|0); HEAP32[$103>>2] = $216; $217 = HEAP32[$30>>2]|0; $218 = (($217) - ($193))|0; HEAP32[$30>>2] = $218; $$pr = HEAP32[$92>>2]|0; $219 = $$pr; } $220 = ($219|0)==(0); if ($220) { $221 = HEAP8[$106>>0]|0; $222 = ($221<<24>>24)==(0); $223 = $222 ? 0 : 13; HEAP8[$0>>0] = $223; $$0373$be = $$0373;$$0375$be = $$0375; } else { $$0373$be = $$0373;$$0375$be = $$0375; } } else if ((label|0) == 39) { label = 0; $250 = HEAP32[$7>>2]|0; $251 = HEAP32[$8>>2]|0; $252 = ($250>>>0)<($251>>>0); if ($252) { $$pr551 = HEAP32[$42>>2]|0; $253 = $$pr551;$267 = $250; while(1) { $254 = ($253>>>0)<(3); if ($254) { $255 = HEAP32[$44>>2]|0; $256 = ($255|0)==(0); if ($256) { label = 111; break L1; } $257 = (($255) + -1)|0; HEAP32[$44>>2] = $257; $258 = HEAP32[$45>>2]|0; $259 = ((($258)) + 1|0); HEAP32[$45>>2] = $259; $260 = HEAP8[$258>>0]|0; $261 = $260&255; $262 = $261 << $253; $263 = HEAP32[$46>>2]|0; $264 = $262 | $263; HEAP32[$46>>2] = $264; $265 = (($253) + 8)|0; HEAP32[$42>>2] = $265; $$lcssa420 = $265; } else { $$lcssa420 = $253; } $266 = (2384 + ($267)|0); $268 = HEAP8[$266>>0]|0; $269 = $268&255; $270 = HEAP32[$43>>2]|0; $271 = $270 & 7; $272 = $271&255; $273 = (((($0)) + 8256|0) + ($269)|0); HEAP8[$273>>0] = $272; $274 = (3)?($270 >>> 3):($270); HEAP32[$43>>2] = $274; $275 = (($$lcssa420) + -3)|0; HEAP32[$42>>2] = $275; $276 = (($267) + 1)|0; HEAP32[$7>>2] = $276; $277 = HEAP32[$8>>2]|0; $278 = ($276>>>0)<($277>>>0); if ($278) { $253 = $275;$267 = $276; } else { $$lcssa424 = $277; break; } } } else { $$lcssa424 = $251; } $279 = ($$lcssa424>>>0)<(19); if ($279) { $$0503 = $$lcssa424; while(1) { $280 = (2384 + ($$0503)|0); $281 = HEAP8[$280>>0]|0; $282 = $281&255; $283 = (((($0)) + 8256|0) + ($282)|0); HEAP8[$283>>0] = 0; $284 = (($$0503) + 1)|0; $exitcond = ($284|0)==(19); if ($exitcond) { break; } else { $$0503 = $284; } } } HEAP32[$7>>2] = 0; HEAP8[$0>>0] = 5; $285 = (_Huffman_Build($73,$74,19)|0); $286 = ($285|0)==(0); if ($286) { label = 50; } else { label = 49; break; } } else if ((label|0) == 88) { label = 0; $411 = HEAP32[$14>>2]|0; $412 = (2416 + ($411)|0); $413 = HEAP8[$412>>0]|0; $414 = $413&255; $415 = HEAP32[$15>>2]|0; $416 = ($415>>>0)<($414>>>0); if ($416) { $425 = $415; while(1) { $417 = HEAP32[$56>>2]|0; $418 = ($417|0)==(0); if ($418) { label = 111; break L1; } $419 = (($417) + -1)|0; HEAP32[$56>>2] = $419; $420 = HEAP32[$57>>2]|0; $421 = ((($420)) + 1|0); HEAP32[$57>>2] = $421; $422 = HEAP8[$420>>0]|0; $423 = $422&255; $424 = $423 << $425; $426 = HEAP32[$58>>2]|0; $427 = $424 | $426; HEAP32[$58>>2] = $427; $428 = (($425) + 8)|0; HEAP32[$15>>2] = $428; $429 = ($428>>>0)<($414>>>0); if ($429) { $425 = $428; } else { $$lcssa = $428; break; } } } else { $$lcssa = $415; } $430 = (2448 + ($411<<1)|0); $431 = HEAP16[$430>>1]|0; $432 = $431&65535; $433 = HEAP32[$55>>2]|0; $434 = 1 << $414; $435 = (($434) + -1)|0; $436 = $433 & $435; $437 = (($436) + ($432))|0; HEAP32[$14>>2] = $437; $438 = ($414)?($433 >>> $414):($433); HEAP32[$55>>2] = $438; $439 = (($$lcssa) - ($414))|0; HEAP32[$15>>2] = $439; HEAP8[$0>>0] = 9; label = 93; } if ((label|0) == 50) { label = 0; $288 = HEAP32[$9>>2]|0; $289 = HEAP32[$10>>2]|0; $290 = (($289) + ($288))|0; $291 = HEAP32[$11>>2]|0; $292 = ($291>>>0)<($290>>>0); L108: do { if ($292) { while(1) { $293 = (_Huffman_Decode($0,$47)|0); $294 = ($293|0)<(16); if (!($294)) { break; } $295 = ($293|0)==(-1); if ($295) { label = 111; break L1; } $296 = $293&255; $297 = HEAP32[$11>>2]|0; $298 = (((($0)) + 8256|0) + ($297)|0); HEAP8[$298>>0] = $296; $299 = HEAP32[$11>>2]|0; $300 = (($299) + 1)|0; HEAP32[$11>>2] = $300; $301 = ($300>>>0)<($290>>>0); if (!($301)) { break L108; } } HEAP32[$96>>2] = $293; HEAP8[$0>>0] = 6; } } while(0); $302 = HEAP32[$11>>2]|0; $303 = ($302|0)==($290|0); if ($303) { HEAP32[$11>>2] = 0; $304 = HEAP32[$75>>2]|0; $305 = ($304>>>0)>(9); if ($305) { $306 = HEAP32[$93>>2]|0; $307 = ($306>>>0)>(257); $spec$select385 = $307 ? 12 : 7; $308 = $spec$select385; } else { $308 = 7; } HEAP8[$0>>0] = $308; $309 = HEAP32[$9>>2]|0; $310 = (_Huffman_Build($94,$95,$309)|0); $311 = ($310|0)==(0); if (!($311)) { label = 60; break; } $313 = HEAP32[$9>>2]|0; $314 = (((($0)) + 8256|0) + ($313)|0); $315 = HEAP32[$10>>2]|0; $316 = (_Huffman_Build($105,$314,$315)|0); $317 = ($316|0)==(0); if ($317) { $$0373$be = $$0373;$$0375$be = $$0375; } else { label = 62; break; } } else { $$0373$be = $$0373;$$0375$be = $$0375; } } else if ((label|0) == 93) { label = 0; $440 = (_Huffman_Decode($0,$16)|0); HEAP32[$17>>2] = $440; $441 = ($440|0)==(-1); if ($441) { label = 111; break; } HEAP8[$0>>0] = 10; label = 95; } if ((label|0) == 95) { label = 0; $442 = HEAP32[$18>>2]|0; $443 = (2512 + ($442)|0); $444 = HEAP8[$443>>0]|0; $445 = $444&255; $446 = HEAP32[$19>>2]|0; $447 = ($446>>>0)<($445>>>0); if ($447) { $456 = $446; while(1) { $448 = HEAP32[$60>>2]|0; $449 = ($448|0)==(0); if ($449) { label = 111; break L1; } $450 = (($448) + -1)|0; HEAP32[$60>>2] = $450; $451 = HEAP32[$61>>2]|0; $452 = ((($451)) + 1|0); HEAP32[$61>>2] = $452; $453 = HEAP8[$451>>0]|0; $454 = $453&255; $455 = $454 << $456; $457 = HEAP32[$62>>2]|0; $458 = $455 | $457; HEAP32[$62>>2] = $458; $459 = (($456) + 8)|0; HEAP32[$19>>2] = $459; $460 = ($459>>>0)<($445>>>0); if ($460) { $456 = $459; } else { $$lcssa400 = $459; break; } } } else { $$lcssa400 = $446; } $461 = (2544 + ($442<<1)|0); $462 = HEAP16[$461>>1]|0; $463 = $462&65535; $464 = HEAP32[$59>>2]|0; $465 = 1 << $445; $466 = (($465) + -1)|0; $467 = $464 & $466; $468 = (($467) + ($463))|0; HEAP32[$18>>2] = $468; $469 = ($445)?($464 >>> $445):($464); HEAP32[$59>>2] = $469; $470 = (($$lcssa400) - ($445))|0; HEAP32[$19>>2] = $470; HEAP8[$0>>0] = 11; label = 100; } if ((label|0) == 100) { label = 0; $471 = HEAP32[$20>>2]|0; $472 = ($471|0)==(0); if ($472) { label = 111; break; } $473 = HEAP32[$63>>2]|0; $474 = HEAP32[$64>>2]|0; $475 = ($473>>>0)<($471>>>0); $$379 = $475 ? $473 : $471; $476 = HEAP32[$65>>2]|0; $477 = (($476) - ($474))|0; $478 = ($$379|0)==(0); if (!($478)) { $$1469 = 0; while(1) { $479 = (($477) + ($$1469))|0; $480 = $479 & 32767; $481 = (((($0)) + 11968|0) + ($480)|0); $482 = HEAP8[$481>>0]|0; $483 = HEAP32[$89>>2]|0; HEAP8[$483>>0] = $482; $484 = (($$1469) + ($476))|0; $485 = $484 & 32767; $486 = (((($0)) + 11968|0) + ($485)|0); HEAP8[$486>>0] = $482; $487 = HEAP32[$89>>2]|0; $488 = ((($487)) + 1|0); HEAP32[$89>>2] = $488; $489 = (($$1469) + 1)|0; $490 = ($489>>>0)<($$379>>>0); if ($490) { $$1469 = $489; } else { break; } } } $491 = (($476) + ($$379))|0; $492 = $491 & 32767; HEAP32[$65>>2] = $492; $493 = HEAP32[$63>>2]|0; $494 = (($493) - ($$379))|0; HEAP32[$63>>2] = $494; $495 = HEAP32[$20>>2]|0; $496 = (($495) - ($$379))|0; HEAP32[$20>>2] = $496; $497 = ($494|0)==(0); if ($497) { $498 = HEAP32[$101>>2]|0; $499 = ($498>>>0)>(9); $500 = ($496>>>0)>(257); $spec$select = $500 & $499; $501 = $spec$select ? 12 : 7; HEAP8[$0>>0] = $501; $$0373$be = $$0373;$$0375$be = $$0375; } else { $$0373$be = $$0373;$$0375$be = $$0375; } } $$0373 = $$0373$be;$$0375 = $$0375$be; } if ((label|0) == 18) { $157 = ((($0)) + 44736|0); HEAP32[$157>>2] = -857812906; HEAP8[$0>>0] = 13; return; } else if ((label|0) == 49) { $287 = ((($0)) + 44736|0); HEAP32[$287>>2] = $285; HEAP8[$0>>0] = 13; return; } else if ((label|0) == 60) { $312 = ((($0)) + 44736|0); HEAP32[$312>>2] = $310; HEAP8[$0>>0] = 13; return; } else if ((label|0) == 62) { $318 = ((($0)) + 44736|0); HEAP32[$318>>2] = $316; HEAP8[$0>>0] = 13; return; } else if ((label|0) == 68) { $338 = ((($0)) + 44736|0); HEAP32[$338>>2] = -857812904; HEAP8[$0>>0] = 13; return; } else if ((label|0) == 79) { $386 = ((($0)) + 44736|0); HEAP32[$386>>2] = -857812903; HEAP8[$0>>0] = 13; return; } else if ((label|0) == 110) { // unreachable; } else if ((label|0) == 111) { return; } } function _Huffman_Build($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $$08494 = 0, $$085100 = 0, $$08699 = 0, $$08893 = 0, $$1102 = 0, $$398 = 0, $$496 = 0, $$sink = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0; var $11 = 0, $110 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0; var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond106 = 0, $exitcond107 = 0; var dest = 0, label = 0, sp = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 128|0; $3 = sp + 64|0; $4 = sp; $5 = ((($0)) + 1024|0); HEAP16[$5>>1] = 0; $6 = ((($0)) + 1088|0); HEAP16[$6>>1] = 0; $7 = ((($0)) + 1056|0); HEAP16[$7>>1] = 0; dest=$3; stop=dest+64|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); $8 = ($2|0)>(0); if ($8) { $$1102 = 0; while(1) { $9 = (($1) + ($$1102)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = (($3) + ($11<<2)|0); $13 = HEAP32[$12>>2]|0; $14 = (($13) + 1)|0; HEAP32[$12>>2] = $14; $15 = (($$1102) + 1)|0; $exitcond107 = ($15|0)==($2|0); if ($exitcond107) { break; } else { $$1102 = $15; } } } HEAP32[$3>>2] = 0; $19 = ((($3)) + 4|0); $20 = HEAP32[$19>>2]|0; $21 = ($20|0)>(2); if ($21) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $16 = ((($3)) + 8|0); $17 = HEAP32[$16>>2]|0; $18 = ($17|0)>(4); if ($18) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $72 = ((($3)) + 12|0); $73 = HEAP32[$72>>2]|0; $74 = ($73|0)>(8); if ($74) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $75 = ((($3)) + 16|0); $76 = HEAP32[$75>>2]|0; $77 = ($76|0)>(16); if ($77) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $78 = ((($3)) + 20|0); $79 = HEAP32[$78>>2]|0; $80 = ($79|0)>(32); if ($80) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $81 = ((($3)) + 24|0); $82 = HEAP32[$81>>2]|0; $83 = ($82|0)>(64); if ($83) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $84 = ((($3)) + 28|0); $85 = HEAP32[$84>>2]|0; $86 = ($85|0)>(128); if ($86) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $87 = ((($3)) + 32|0); $88 = HEAP32[$87>>2]|0; $89 = ($88|0)>(256); if ($89) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $90 = ((($3)) + 36|0); $91 = HEAP32[$90>>2]|0; $92 = ($91|0)>(512); if ($92) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $93 = ((($3)) + 40|0); $94 = HEAP32[$93>>2]|0; $95 = ($94|0)>(1024); if ($95) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $96 = ((($3)) + 44|0); $97 = HEAP32[$96>>2]|0; $98 = ($97|0)>(2048); if ($98) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $99 = ((($3)) + 48|0); $100 = HEAP32[$99>>2]|0; $101 = ($100|0)>(4096); if ($101) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $102 = ((($3)) + 52|0); $103 = HEAP32[$102>>2]|0; $104 = ($103|0)>(8192); if ($104) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $105 = ((($3)) + 56|0); $106 = HEAP32[$105>>2]|0; $107 = ($106|0)>(16384); if ($107) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $108 = ((($3)) + 60|0); $109 = HEAP32[$108>>2]|0; $110 = ($109|0)>(32768); if ($110) { $$0 = -857812901; STACKTOP = sp;return ($$0|0); } $$085100 = 0;$$08699 = 0;$$398 = 1; while(1) { $22 = (($$398) + -1)|0; $23 = (($3) + ($22<<2)|0); $24 = HEAP32[$23>>2]|0; $25 = (($24) + ($$085100))|0; $26 = $25 << 1; $27 = (($4) + ($$398<<2)|0); HEAP32[$27>>2] = $$08699; $28 = $26&65535; $29 = (((($0)) + 1024|0) + ($$398<<1)|0); HEAP16[$29>>1] = $28; $30 = $$08699&65535; $31 = (((($0)) + 1088|0) + ($$398<<1)|0); HEAP16[$31>>1] = $30; $32 = (($3) + ($$398<<2)|0); $33 = HEAP32[$32>>2]|0; $34 = (($33) + ($$08699))|0; $35 = ($33|0)==(0); $36 = (($33) + ($26))|0; $37 = $36&65535; $$sink = $35 ? 0 : $37; $38 = (((($0)) + 1056|0) + ($$398<<1)|0); HEAP16[$38>>1] = $$sink; $39 = (($$398) + 1)|0; $exitcond106 = ($39|0)==(16); if ($exitcond106) { break; } else { $$085100 = $26;$$08699 = $34;$$398 = $39; } } _Mem_Set($0,-1,1024); $40 = ($2|0)>(0); if (!($40)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $$496 = 0; while(1) { $41 = (($1) + ($$496)|0); $42 = HEAP8[$41>>0]|0; $43 = $42&255; $44 = ($42<<24>>24)==(0); if (!($44)) { $45 = $$496&65535; $46 = (($4) + ($43<<2)|0); $47 = HEAP32[$46>>2]|0; $48 = (((($0)) + 1120|0) + ($47<<1)|0); HEAP16[$48>>1] = $45; $49 = ($42&255)<(10); do { if ($49) { $50 = $43 << 9; $51 = $50 | $$496; $52 = $51&65535; $53 = (9 - ($43))|0; $54 = 1 << $53; $55 = ($53|0)==(31); if ($55) { break; } $56 = (((($0)) + 1024|0) + ($43<<1)|0); $57 = HEAP16[$56>>1]|0; $58 = $57&65535; $59 = (($47) + ($58))|0; $60 = (((($0)) + 1088|0) + ($43<<1)|0); $61 = HEAP16[$60>>1]|0; $62 = $61&65535; $63 = (($59) - ($62))|0; $64 = $63 << $53; $$08494 = $64;$$08893 = 0; while(1) { $65 = (_Huffman_ReverseBits($$08494,9)|0); $66 = (($0) + ($65<<1)|0); HEAP16[$66>>1] = $52; $67 = (($$08893) + 1)|0; $68 = (($$08494) + 1)|0; $69 = ($67|0)<($54|0); if ($69) { $$08494 = $68;$$08893 = $67; } else { break; } } } } while(0); $70 = (($47) + 1)|0; HEAP32[$46>>2] = $70; } $71 = (($$496) + 1)|0; $exitcond = ($71|0)==($2|0); if ($exitcond) { $$0 = 0; break; } else { $$496 = $71; } } STACKTOP = sp;return ($$0|0); } function _Huffman_Decode($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$05164 = 0, $$05263 = 0, $$05362 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; var $61 = 0, $62 = 0, $63 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = ($3>>>0)<(17); L1: do { if ($4) { $5 = ((($0)) + 16|0); $6 = ((($0)) + 12|0); $7 = ((($0)) + 4|0); $16 = $3; while(1) { $8 = HEAP32[$5>>2]|0; $9 = ($8|0)==(0); if ($9) { break; } $10 = (($8) + -1)|0; HEAP32[$5>>2] = $10; $11 = HEAP32[$6>>2]|0; $12 = ((($11)) + 1|0); HEAP32[$6>>2] = $12; $13 = HEAP8[$11>>0]|0; $14 = $13&255; $15 = $14 << $16; $17 = HEAP32[$7>>2]|0; $18 = $15 | $17; HEAP32[$7>>2] = $18; $19 = (($16) + 8)|0; HEAP32[$2>>2] = $19; $20 = ($19>>>0)<(17); if ($20) { $16 = $19; } else { $32 = $19; label = 6; break L1; } } $21 = ($16>>>0)>(8); if ($21) { $32 = $16; label = 6; } else { $35 = $16; } } else { $32 = $3; label = 6; } } while(0); if ((label|0) == 6) { $22 = ((($0)) + 4|0); $23 = HEAP32[$22>>2]|0; $24 = $23 & 511; $25 = (($1) + ($24<<1)|0); $26 = HEAP16[$25>>1]|0; $27 = $26 << 16 >> 16; $28 = ($26<<16>>16)>(-1); if ($28) { $29 = (9)?($27 >> 9):($27); $30 = ($29)?($23 >>> $29):($23); HEAP32[$22>>2] = $30; $31 = (($32) - ($29))|0; HEAP32[$2>>2] = $31; $33 = $27 & 511; $$0 = $33; return ($$0|0); } else { $35 = $32; } } $34 = ((($0)) + 4|0); $$05164 = 1;$$05263 = 0;$$05362 = 0; while(1) { $36 = ($35>>>0)<($$05164>>>0); if ($36) { $$0 = -1; label = 14; break; } $37 = $$05362 << 1; $38 = HEAP32[$34>>2]|0; $39 = ($$05263)?($38 >>> $$05263):($38); $40 = $39 & 1; $41 = $40 | $37; $42 = (((($1)) + 1056|0) + ($$05164<<1)|0); $43 = HEAP16[$42>>1]|0; $44 = $43&65535; $45 = ($41>>>0)<($44>>>0); if ($45) { label = 11; break; } $60 = (($$05164) + 1)|0; $61 = (($$05263) + 1)|0; $62 = ($60>>>0)<(16); if ($62) { $$05164 = $60;$$05263 = $61;$$05362 = $41; } else { label = 13; break; } } if ((label|0) == 11) { $46 = ((($0)) + 4|0); $47 = (((($1)) + 1088|0) + ($$05164<<1)|0); $48 = HEAP16[$47>>1]|0; $49 = $48&65535; $50 = (((($1)) + 1024|0) + ($$05164<<1)|0); $51 = HEAP16[$50>>1]|0; $52 = $51&65535; $53 = (($41) + ($49))|0; $54 = (($53) - ($52))|0; $55 = ($$05164)?($38 >>> $$05164):($38); HEAP32[$46>>2] = $55; $56 = (($35) - ($$05164))|0; HEAP32[$2>>2] = $56; $57 = (((($1)) + 1120|0) + ($54<<1)|0); $58 = HEAP16[$57>>1]|0; $59 = $58&65535; $$0 = $59; return ($$0|0); } else if ((label|0) == 13) { $63 = ((($0)) + 44736|0); HEAP32[$63>>2] = -857812902; HEAP8[$0>>0] = 13; $$0 = -1; return ($$0|0); } else if ((label|0) == 14) { return ($$0|0); } return (0)|0; } function _Inflate_InflateFast($0) { $0 = $0|0; var $$0$lcssa = 0, $$0178$lcssa = 0, $$0178218 = 0, $$0180 = 0, $$0181197 = 0, $$0181232 = 0, $$0183 = 0, $$0184199 = 0, $$0184231 = 0, $$0186$lcssa = 0, $$0186217 = 0, $$0219 = 0, $$1179227 = 0, $$1182 = 0, $$1185 = 0, $$1185$in = 0, $$1187226 = 0, $$1228 = 0, $$2214 = 0, $$lcssa = 0; var $$lcssa194 = 0, $$lcssa195 = 0, $$neg191 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0; var $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0; var $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0; var $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0; var $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0; var $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0; var $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0; var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0; var $exitcond = 0, $exitcond253 = 0, $or$cond = 0, $or$cond189 = 0, $scevgep = 0, $scevgep250 = 0, $scevgep251 = 0, $scevgep252 = 0, $storemerge$lcssa = 0, $storemerge205 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 11968|0); $2 = ((($0)) + 36|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 24|0); $5 = HEAP32[$4>>2]|0; $6 = ($5>>>0)>(257); if (!($6)) { return; } $7 = ((($0)) + 16|0); $8 = ((($0)) + 8|0); $9 = ((($0)) + 12|0); $10 = ((($0)) + 4|0); $11 = ((($0)) + 4|0); $12 = ((($0)) + 8576|0); $13 = ((($0)) + 12|0); $14 = ((($0)) + 12|0); $15 = ((($0)) + 10272|0); $16 = ((($0)) + 12|0); $scevgep = ((($0)) + 11972|0); $scevgep251 = ((($0)) + 11972|0); $$0181232 = 0;$$0184231 = $3; while(1) { $17 = HEAP32[$7>>2]|0; $18 = ($17>>>0)>(9); $19 = ($$0181232>>>0)<(32510); $or$cond = $19 & $18; if (!($or$cond)) { $$0181197 = $$0181232;$$0184199 = $$0184231; break; } $20 = HEAP32[$8>>2]|0; $21 = ($20>>>0)<(16); if ($21) { $22 = (15 - ($20))|0; $23 = $22 & -8; $31 = $20; while(1) { $24 = HEAP32[$7>>2]|0; $25 = (($24) + -1)|0; HEAP32[$7>>2] = $25; $26 = HEAP32[$9>>2]|0; $27 = ((($26)) + 1|0); HEAP32[$9>>2] = $27; $28 = HEAP8[$26>>0]|0; $29 = $28&255; $30 = $29 << $31; $32 = HEAP32[$10>>2]|0; $33 = $30 | $32; HEAP32[$10>>2] = $33; $34 = (($31) + 8)|0; HEAP32[$8>>2] = $34; $35 = ($34>>>0)<(16); if ($35) { $31 = $34; } else { break; } } $36 = (($20) + 8)|0; $37 = (($36) + ($23))|0; $$lcssa = $37; } else { $$lcssa = $20; } $38 = HEAP32[$11>>2]|0; $39 = $38 & 511; $40 = (((($0)) + 8576|0) + ($39<<1)|0); $41 = HEAP16[$40>>1]|0; $42 = $41 << 16 >> 16; $43 = ($41<<16>>16)>(-1); if ($43) { $44 = (9)?($42 >> 9):($42); $45 = ($44)?($38 >>> $44):($38); HEAP32[$11>>2] = $45; $46 = (($$lcssa) - ($44))|0; HEAP32[$8>>2] = $46; $47 = $42 & 511; $$0180 = $47; } else { $48 = (_Huffman_UNSAFE_Decode_Slow($0,$12)|0); $$0180 = $48; } $49 = ($$0180>>>0)<(257); if ($49) { $50 = ($$0180|0)==(256); if ($50) { label = 14; break; } $51 = $$0180&255; $52 = (((($0)) + 11968|0) + ($$0184231)|0); HEAP8[$52>>0] = $51; $53 = HEAP32[$4>>2]|0; $54 = (($53) + -1)|0; HEAP32[$4>>2] = $54; $55 = (($$0181232) + 1)|0; $56 = (($$0184231) + 1)|0; $$1182 = $55;$$1185$in = $56;$199 = $54; } else { $61 = (($$0180) + -257)|0; $62 = (2416 + ($61)|0); $63 = HEAP8[$62>>0]|0; $64 = $63&255; $65 = HEAP32[$8>>2]|0; $66 = ($65>>>0)<($64>>>0); if ($66) { $67 = (($64) + -1)|0; $68 = (($67) - ($65))|0; $69 = $68 & -8; $77 = $65; while(1) { $70 = HEAP32[$7>>2]|0; $71 = (($70) + -1)|0; HEAP32[$7>>2] = $71; $72 = HEAP32[$13>>2]|0; $73 = ((($72)) + 1|0); HEAP32[$13>>2] = $73; $74 = HEAP8[$72>>0]|0; $75 = $74&255; $76 = $75 << $77; $78 = HEAP32[$11>>2]|0; $79 = $76 | $78; HEAP32[$11>>2] = $79; $80 = (($77) + 8)|0; HEAP32[$8>>2] = $80; $81 = ($80>>>0)<($64>>>0); if ($81) { $77 = $80; } else { break; } } $82 = (($65) + 8)|0; $83 = (($82) + ($69))|0; $$lcssa194 = $83; } else { $$lcssa194 = $65; } $84 = (2448 + ($61<<1)|0); $85 = HEAP16[$84>>1]|0; $86 = $85&65535; $87 = HEAP32[$11>>2]|0; $88 = 1 << $64; $89 = (($88) + -1)|0; $90 = $87 & $89; $91 = (($90) + ($86))|0; $92 = ($64)?($87 >>> $64):($87); HEAP32[$11>>2] = $92; $93 = (($$lcssa194) - ($64))|0; HEAP32[$8>>2] = $93; $94 = ($93>>>0)<(16); if ($94) { $95 = (($$lcssa194) + 8)|0; $96 = (($64) + 15)|0; $97 = (($96) - ($$lcssa194))|0; $98 = $97 & -8; $99 = (($95) + ($98))|0; $storemerge205 = $93; while(1) { $100 = HEAP32[$7>>2]|0; $101 = (($100) + -1)|0; HEAP32[$7>>2] = $101; $102 = HEAP32[$14>>2]|0; $103 = ((($102)) + 1|0); HEAP32[$14>>2] = $103; $104 = HEAP8[$102>>0]|0; $105 = $104&255; $106 = $105 << $storemerge205; $107 = HEAP32[$11>>2]|0; $108 = $106 | $107; HEAP32[$11>>2] = $108; $109 = (($storemerge205) + 8)|0; HEAP32[$8>>2] = $109; $110 = ($109>>>0)<(16); if ($110) { $storemerge205 = $109; } else { break; } } $111 = (($99) - ($64))|0; $storemerge$lcssa = $111; } else { $storemerge$lcssa = $93; } $112 = HEAP32[$11>>2]|0; $113 = $112 & 511; $114 = (((($0)) + 10272|0) + ($113<<1)|0); $115 = HEAP16[$114>>1]|0; $116 = $115 << 16 >> 16; $117 = ($115<<16>>16)>(-1); if ($117) { $118 = (9)?($116 >> 9):($116); $119 = ($118)?($112 >>> $118):($112); HEAP32[$11>>2] = $119; $120 = (($storemerge$lcssa) - ($118))|0; HEAP32[$8>>2] = $120; $121 = $116 & 511; $$0183 = $121; } else { $122 = (_Huffman_UNSAFE_Decode_Slow($0,$15)|0); $$0183 = $122; } $123 = (2512 + ($$0183)|0); $124 = HEAP8[$123>>0]|0; $125 = $124&255; $126 = HEAP32[$8>>2]|0; $127 = ($126>>>0)<($125>>>0); if ($127) { $128 = (($125) + -1)|0; $129 = (($128) - ($126))|0; $130 = $129 & -8; $138 = $126; while(1) { $131 = HEAP32[$7>>2]|0; $132 = (($131) + -1)|0; HEAP32[$7>>2] = $132; $133 = HEAP32[$16>>2]|0; $134 = ((($133)) + 1|0); HEAP32[$16>>2] = $134; $135 = HEAP8[$133>>0]|0; $136 = $135&255; $137 = $136 << $138; $139 = HEAP32[$11>>2]|0; $140 = $137 | $139; HEAP32[$11>>2] = $140; $141 = (($138) + 8)|0; HEAP32[$8>>2] = $141; $142 = ($141>>>0)<($125>>>0); if ($142) { $138 = $141; } else { break; } } $143 = (($126) + 8)|0; $144 = (($143) + ($130))|0; $$lcssa195 = $144; } else { $$lcssa195 = $126; } $145 = (2544 + ($$0183<<1)|0); $146 = HEAP16[$145>>1]|0; $147 = $146&65535; $148 = HEAP32[$11>>2]|0; $149 = 1 << $125; $150 = (($149) + 32767)|0; $151 = $148 & $150; $152 = ($125)?($148 >>> $125):($148); HEAP32[$11>>2] = $152; $153 = (($$lcssa195) - ($125))|0; HEAP32[$8>>2] = $153; $$neg191 = (($$0184231) - ($147))|0; $154 = (($$neg191) - ($151))|0; $155 = $154 & 32767; $156 = ($$0184231>>>0)>=($155>>>0); $157 = (($91) + ($$0184231))|0; $158 = ($157>>>0)<(32768); $or$cond189 = $158 & $156; if ($or$cond189) { $159 = (((($0)) + 11968|0) + ($155)|0); $160 = (((($0)) + 11968|0) + ($$0184231)|0); $161 = $91 & -4; $162 = ($161|0)==(0); if ($162) { $$0$lcssa = $160;$$0178$lcssa = $159;$$0186$lcssa = 0; } else { $163 = (($161) + -1)|0; $164 = $163 & -4; $165 = (($164) + ($155))|0; $166 = (($$0184231) + ($164))|0; $scevgep252 = (($scevgep251) + ($166)|0); $$0178218 = $159;$$0186217 = 0;$$0219 = $160; while(1) { $167 = ((($$0178218)) + 1|0); $168 = HEAP8[$$0178218>>0]|0; $169 = ((($$0219)) + 1|0); HEAP8[$$0219>>0] = $168; $170 = ((($$0178218)) + 2|0); $171 = HEAP8[$167>>0]|0; $172 = ((($$0219)) + 2|0); HEAP8[$169>>0] = $171; $173 = ((($$0178218)) + 3|0); $174 = HEAP8[$170>>0]|0; $175 = ((($$0219)) + 3|0); HEAP8[$172>>0] = $174; $176 = ((($$0178218)) + 4|0); $177 = HEAP8[$173>>0]|0; $178 = ((($$0219)) + 4|0); HEAP8[$175>>0] = $177; $179 = (($$0186217) + 4)|0; $180 = ($179>>>0)<($161>>>0); if ($180) { $$0178218 = $176;$$0186217 = $179;$$0219 = $178; } else { break; } } $scevgep250 = (($scevgep) + ($165)|0); $181 = (($164) + 4)|0; $$0$lcssa = $scevgep252;$$0178$lcssa = $scevgep250;$$0186$lcssa = $181; } $182 = ($$0186$lcssa>>>0)<($91>>>0); if ($182) { $$1179227 = $$0178$lcssa;$$1187226 = $$0186$lcssa;$$1228 = $$0$lcssa; while(1) { $183 = ((($$1179227)) + 1|0); $184 = HEAP8[$$1179227>>0]|0; $185 = ((($$1228)) + 1|0); HEAP8[$$1228>>0] = $184; $186 = (($$1187226) + 1)|0; $exitcond253 = ($186|0)==($91|0); if ($exitcond253) { break; } else { $$1179227 = $183;$$1187226 = $186;$$1228 = $185; } } } } else { $187 = ($91|0)==(0); if (!($187)) { $$2214 = 0; while(1) { $188 = (($$2214) + ($154))|0; $189 = $188 & 32767; $190 = (((($0)) + 11968|0) + ($189)|0); $191 = HEAP8[$190>>0]|0; $192 = (($$2214) + ($$0184231))|0; $193 = $192 & 32767; $194 = (((($0)) + 11968|0) + ($193)|0); HEAP8[$194>>0] = $191; $195 = (($$2214) + 1)|0; $exitcond = ($195|0)==($91|0); if ($exitcond) { break; } else { $$2214 = $195; } } } } $196 = HEAP32[$4>>2]|0; $197 = (($196) - ($91))|0; HEAP32[$4>>2] = $197; $198 = (($91) + ($$0181232))|0; $$1182 = $198;$$1185$in = $157;$199 = $197; } $$1185 = $$1185$in & 32767; $200 = ($199>>>0)>(257); if ($200) { $$0181232 = $$1182;$$0184231 = $$1185; } else { $$0181197 = $$1182;$$0184199 = $$1185; break; } } if ((label|0) == 14) { $57 = ((($0)) + 1|0); $58 = HEAP8[$57>>0]|0; $59 = ($58<<24>>24)==(0); $60 = $59 ? 0 : 13; HEAP8[$0>>0] = $60; $$0181197 = $$0181232;$$0184199 = $$0184231; } HEAP32[$2>>2] = $$0184199; $201 = ($$0181197|0)==(0); if ($201) { return; } $202 = (($$0181197) + ($3))|0; $203 = ($202>>>0)<(32768); if ($203) { $204 = ((($0)) + 20|0); $205 = HEAP32[$204>>2]|0; $206 = (((($0)) + 11968|0) + ($3)|0); _Mem_Copy($205,$206,$$0181197); $207 = HEAP32[$204>>2]|0; $208 = (($207) + ($$0181197)|0); HEAP32[$204>>2] = $208; return; } else { $209 = (32768 - ($3))|0; $210 = ((($0)) + 20|0); $211 = HEAP32[$210>>2]|0; $212 = (((($0)) + 11968|0) + ($3)|0); _Mem_Copy($211,$212,$209); $213 = HEAP32[$210>>2]|0; $214 = (($213) + ($209)|0); HEAP32[$210>>2] = $214; $215 = (($$0181197) - ($209))|0; _Mem_Copy($214,$1,$215); $216 = HEAP32[$210>>2]|0; $217 = (($216) + ($215)|0); HEAP32[$210>>2] = $217; return; } } function _Huffman_UNSAFE_Decode_Slow($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$03436$lcssa = 0, $$lcssa = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0; var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP32[$2>>2]|0; $4 = $3 & 511; $5 = (_Huffman_ReverseBits($4,9)|0); $6 = $5 << 1; $7 = (9)?($3 >>> 9):($3); $8 = $7 & 1; $9 = $6 | $8; $10 = ((($1)) + 1076|0); $11 = HEAP16[$10>>1]|0; $12 = $11&65535; $13 = ($9>>>0)<($12>>>0); if ($13) { $$03436$lcssa = 10;$$lcssa = $9; } else { $29 = $9 << 1; $30 = (10)?($3 >>> 10):($3); $31 = $30 & 1; $32 = $29 | $31; $33 = ((($1)) + 1078|0); $34 = HEAP16[$33>>1]|0; $35 = $34&65535; $36 = ($32>>>0)<($35>>>0); if ($36) { $$03436$lcssa = 11;$$lcssa = $32; } else { $37 = $32 << 1; $38 = (11)?($3 >>> 11):($3); $39 = $38 & 1; $40 = $37 | $39; $41 = ((($1)) + 1080|0); $42 = HEAP16[$41>>1]|0; $43 = $42&65535; $44 = ($40>>>0)<($43>>>0); if ($44) { $$03436$lcssa = 12;$$lcssa = $40; } else { $45 = $40 << 1; $46 = (12)?($3 >>> 12):($3); $47 = $46 & 1; $48 = $45 | $47; $49 = ((($1)) + 1082|0); $50 = HEAP16[$49>>1]|0; $51 = $50&65535; $52 = ($48>>>0)<($51>>>0); if ($52) { $$03436$lcssa = 13;$$lcssa = $48; } else { $53 = $48 << 1; $54 = (13)?($3 >>> 13):($3); $55 = $54 & 1; $56 = $53 | $55; $57 = ((($1)) + 1084|0); $58 = HEAP16[$57>>1]|0; $59 = $58&65535; $60 = ($56>>>0)<($59>>>0); if ($60) { $$03436$lcssa = 14;$$lcssa = $56; } else { $61 = $56 << 1; $62 = (14)?($3 >>> 14):($3); $63 = $62 & 1; $64 = $61 | $63; $65 = ((($1)) + 1086|0); $66 = HEAP16[$65>>1]|0; $67 = $66&65535; $68 = ($64>>>0)<($67>>>0); if ($68) { $$03436$lcssa = 15;$$lcssa = $64; } else { $69 = ((($0)) + 44736|0); HEAP32[$69>>2] = -857812902; HEAP8[$0>>0] = 13; $70 = ((($0)) + 16|0); HEAP32[$70>>2] = 0; $$0 = 0; return ($$0|0); } } } } } } $14 = (((($1)) + 1088|0) + ($$03436$lcssa<<1)|0); $15 = HEAP16[$14>>1]|0; $16 = $15&65535; $17 = (((($1)) + 1024|0) + ($$03436$lcssa<<1)|0); $18 = HEAP16[$17>>1]|0; $19 = $18&65535; $20 = (($$lcssa) + ($16))|0; $21 = (($20) - ($19))|0; $22 = ($$03436$lcssa)?($3 >>> $$03436$lcssa):($3); HEAP32[$2>>2] = $22; $23 = ((($0)) + 8|0); $24 = HEAP32[$23>>2]|0; $25 = (($24) - ($$03436$lcssa))|0; HEAP32[$23>>2] = $25; $26 = (((($1)) + 1120|0) + ($21<<1)|0); $27 = HEAP16[$26>>1]|0; $28 = $27&65535; $$0 = $28; return ($$0|0); } function _Huffman_ReverseBits($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (1)?($0 >>> 1):($0); $3 = $2 & 21845; $4 = $0 << 1; $5 = $4 & 43690; $6 = $3 | $5; $7 = (2)?($6 >>> 2):($6); $8 = $7 & 13107; $9 = $6 << 2; $10 = $9 & 52428; $11 = $8 | $10; $12 = (4)?($11 >>> 4):($11); $13 = $12 & 3855; $14 = $11 << 4; $15 = $14 & 61680; $16 = $13 | $15; $17 = (8)?($16 >>> 8):($16); $18 = $16 << 8; $19 = $18 & 65280; $20 = $19 | $17; $21 = $1&255; $22 = (16 - ($21))|0; $23 = ($22)?($20 >>> $22):($20); return ($23|0); } function _Inflate_MakeStream2($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, label = 0, sp = 0; sp = STACKTOP; _Stream_Init($0); _Inflate_Init2($1,$2); $3 = ((($0)) + 32|0); HEAP32[$3>>2] = $1; HEAP32[$0>>2] = 28; return; } function _Inflate_StreamRead($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$03839 = 0, $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp; HEAP32[$3>>2] = 0; $5 = ((($0)) + 32|0); $6 = HEAP32[$5>>2]|0; $7 = ((($6)) + 20|0); HEAP32[$7>>2] = $1; $8 = ((($6)) + 24|0); HEAP32[$8>>2] = $2; $9 = ($2|0)==(0); if ($9) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $10 = ((($6)) + 16|0); $11 = ((($6)) + 8256|0); $12 = ((($6)) + 12|0); $13 = ((($6)) + 64|0); $14 = $11; $15 = ((($6)) + 28|0); $$03839 = 1; while(1) { $16 = HEAP8[$6>>0]|0; $17 = ($16<<24>>24)==(13); if ($17) { label = 4; break; } $20 = HEAP32[$10>>2]|0; $21 = ($20|0)==(0); if ($21) { $22 = HEAP32[$12>>2]|0; $23 = ($22|0)==($11|0); if ($23) { HEAP32[$12>>2] = $13; } $24 = HEAP32[$12>>2]|0; $25 = $24; $26 = (($14) - ($25))|0; $27 = HEAP32[$15>>2]|0; $28 = HEAP32[$27>>2]|0; $29 = (FUNCTION_TABLE_iiiii[$28 & 63]($27,$24,$26,$4)|0); $30 = ($29|0)==(0); if (!($30)) { $$0 = $29; label = 11; break; } $31 = HEAP32[$4>>2]|0; $32 = ($31|0)!=(0); $33 = $32&1; $34 = HEAP32[$10>>2]|0; $35 = (($34) + ($31))|0; HEAP32[$10>>2] = $35; $$1 = $33; } else { $$1 = $$03839; } $36 = HEAP32[$8>>2]|0; _Inflate_Process($6); $37 = HEAP32[$8>>2]|0; $38 = (($36) - ($37))|0; $39 = HEAP32[$3>>2]|0; $40 = (($38) + ($39))|0; HEAP32[$3>>2] = $40; $41 = HEAP32[$8>>2]|0; $42 = ($41|0)!=(0); $43 = ($$1<<24>>24)!=(0); $44 = $43 & $42; if ($44) { $$03839 = $$1; } else { $$0 = 0; label = 11; break; } } if ((label|0) == 4) { $18 = ((($6)) + 44736|0); $19 = HEAP32[$18>>2]|0; $$0 = $19; STACKTOP = sp;return ($$0|0); } else if ((label|0) == 11) { STACKTOP = sp;return ($$0|0); } return (0)|0; } function _Deflate_MakeStream($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Stream_Init($0); $3 = ((($0)) + 32|0); HEAP32[$3>>2] = $1; $4 = ((($0)) + 8|0); HEAP32[$4>>2] = 29; $5 = ((($0)) + 28|0); HEAP32[$5>>2] = 3; $6 = ((($1)) + 8|0); HEAP32[$6>>2] = 16384; HEAP32[$1>>2] = 0; $7 = ((($1)) + 4|0); HEAP32[$7>>2] = 0; $8 = ((($1)) + 33656|0); $9 = ((($1)) + 12|0); HEAP32[$9>>2] = $8; $10 = ((($1)) + 16|0); HEAP32[$10>>2] = 8192; $11 = ((($1)) + 20|0); HEAP32[$11>>2] = $2; $12 = ((($1)) + 189304|0); HEAP8[$12>>0] = 0; $13 = ((($1)) + 41848|0); _Mem_Set($13,0,16384); $14 = ((($1)) + 58232|0); _Mem_Set($14,0,131072); $15 = ((($1)) + 24|0); $16 = ((($1)) + 600|0); _Deflate_BuildTable($15,$16); return; } function _Deflate_StreamWrite($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$03438 = 0, $$03537 = 0, $$2 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 32|0); $5 = HEAP32[$4>>2]|0; HEAP32[$3>>2] = 0; $6 = ($2|0)==(0); if ($6) { $$2 = 0; return ($$2|0); } $7 = ((($5)) + 8|0); $$03438 = $1;$$03537 = $2; while(1) { $8 = HEAP32[$7>>2]|0; $9 = (((($5)) + 888|0) + ($8)|0); $10 = (($8) + ($$03537))|0; $11 = ($10>>>0)>(32767); $12 = (32768 - ($8))|0; $spec$select = $11 ? $12 : $$03537; _Mem_Copy($9,$$03438,$spec$select); $13 = (($$03537) - ($spec$select))|0; $14 = HEAP32[$7>>2]|0; $15 = (($spec$select) + ($14))|0; HEAP32[$7>>2] = $15; $16 = HEAP32[$3>>2]|0; $17 = (($16) + ($spec$select))|0; HEAP32[$3>>2] = $17; $18 = (($$03438) + ($spec$select)|0); $19 = HEAP32[$7>>2]|0; $20 = ($19|0)==(32768); if ($20) { $21 = (_Deflate_FlushBlock($5,16384)|0); $22 = ($21|0)==(0); if (!($22)) { $$2 = $21; label = 6; break; } } $23 = ($13|0)==(0); if ($23) { $$2 = 0; label = 6; break; } else { $$03438 = $18;$$03537 = $13; } } if ((label|0) == 6) { return ($$2|0); } return (0)|0; } function _Deflate_StreamClose($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $storemerge$lcssa = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 32|0); $2 = HEAP32[$1>>2]|0; $3 = ((($2)) + 8|0); $4 = HEAP32[$3>>2]|0; $5 = (($4) + -16384)|0; $6 = (_Deflate_FlushBlock($2,$5)|0); $7 = ($6|0)==(0); if (!($7)) { $$0 = $6; return ($$0|0); } $8 = ((($2)) + 536|0); $9 = HEAP16[$8>>1]|0; $10 = $9&65535; $11 = ((($2)) + 4|0); $12 = HEAP32[$11>>2]|0; $13 = $10 << $12; $14 = HEAP32[$2>>2]|0; $15 = $14 | $13; HEAP32[$2>>2] = $15; $16 = ((($2)) + 856|0); $17 = HEAP8[$16>>0]|0; $18 = $17&255; $19 = (($12) + ($18))|0; HEAP32[$11>>2] = $19; $20 = ($19>>>0)>(7); if ($20) { $21 = ((($2)) + 12|0); $22 = ((($2)) + 16|0); while(1) { $23 = HEAP32[$2>>2]|0; $24 = $23&255; $25 = HEAP32[$21>>2]|0; $26 = ((($25)) + 1|0); HEAP32[$21>>2] = $26; HEAP8[$25>>0] = $24; $27 = HEAP32[$22>>2]|0; $28 = (($27) + -1)|0; HEAP32[$22>>2] = $28; $29 = HEAP32[$2>>2]|0; $30 = (8)?($29 >>> 8):($29); HEAP32[$2>>2] = $30; $31 = HEAP32[$11>>2]|0; $32 = (($31) + -8)|0; HEAP32[$11>>2] = $32; $33 = ($32>>>0)>(7); if (!($33)) { $storemerge$lcssa = $32; break; } } } else { $storemerge$lcssa = $19; } $34 = ($storemerge$lcssa|0)==(0); if (!($34)) { HEAP32[$11>>2] = 8; $35 = ((($2)) + 12|0); $36 = ((($2)) + 16|0); while(1) { $37 = HEAP32[$2>>2]|0; $38 = $37&255; $39 = HEAP32[$35>>2]|0; $40 = ((($39)) + 1|0); HEAP32[$35>>2] = $40; HEAP8[$39>>0] = $38; $41 = HEAP32[$36>>2]|0; $42 = (($41) + -1)|0; HEAP32[$36>>2] = $42; $43 = HEAP32[$2>>2]|0; $44 = (8)?($43 >>> 8):($43); HEAP32[$2>>2] = $44; $45 = HEAP32[$11>>2]|0; $46 = (($45) + -8)|0; HEAP32[$11>>2] = $46; $47 = ($46>>>0)>(7); if (!($47)) { break; } } } $48 = ((($2)) + 20|0); $49 = HEAP32[$48>>2]|0; $50 = ((($2)) + 33656|0); $51 = ((($2)) + 16|0); $52 = HEAP32[$51>>2]|0; $53 = (8192 - ($52))|0; $54 = (_Stream_Write($49,$50,$53)|0); $$0 = $54; return ($$0|0); } function _Deflate_BuildTable($0,$1) { $0 = $0|0; $1 = $1|0; var $$02 = 0, $$0271 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 1696|0; $2 = sp; (_Huffman_Build($2,2064,288)|0); $$02 = 0; while(1) { $3 = (((($2)) + 1056|0) + ($$02<<1)|0); $4 = HEAP16[$3>>1]|0; $5 = ($4<<16>>16)==(0); if (!($5)) { $6 = $4&65535; $7 = (((($2)) + 1024|0) + ($$02<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = $8&65535; $10 = (($6) - ($9))|0; $11 = ($10|0)>(0); if ($11) { $12 = (((($2)) + 1088|0) + ($$02<<1)|0); $13 = HEAP16[$12>>1]|0; $14 = $13&65535; $15 = $$02&255; $$0271 = 0; while(1) { $16 = (($$0271) + ($14))|0; $17 = (((($2)) + 1120|0) + ($16<<1)|0); $18 = HEAP16[$17>>1]|0; $19 = $18&65535; $20 = (($$0271) + ($9))|0; $21 = (($1) + ($19)|0); HEAP8[$21>>0] = $15; $22 = (_Huffman_ReverseBits($20,$15)|0); $23 = $22&65535; $24 = (($0) + ($19<<1)|0); HEAP16[$24>>1] = $23; $25 = (($$0271) + 1)|0; $exitcond = ($25|0)==($10|0); if ($exitcond) { break; } else { $$0271 = $25; } } } } $26 = (($$02) + 1)|0; $exitcond3 = ($26|0)==(16); if ($exitcond3) { break; } else { $$02 = $26; } } STACKTOP = sp;return; } function _Deflate_FlushBlock($0,$1) { $0 = $0|0; $1 = $1|0; var $$0$lcssa = 0, $$0111 = 0, $$0112$lcssa = 0, $$0112144 = 0, $$0115 = 0, $$0115138 = 0, $$0115140 = 0, $$0116 = 0, $$0116129 = 0, $$0116133 = 0, $$0117$lcssa = 0, $$0117132 = 0, $$0120131 = 0, $$0122$lcssa = 0, $$0122130 = 0, $$0145 = 0, $$1113 = 0, $$1121139 = 0, $$2114127 = 0, $$2128 = 0; var $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $9 = 0; var $spec$select = 0, $spec$select124 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 189304|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if ($4) { HEAP8[$2>>0] = 1; $5 = ((($0)) + 4|0); $6 = HEAP32[$5>>2]|0; $7 = 3 << $6; $8 = HEAP32[$0>>2]|0; $9 = $8 | $7; HEAP32[$0>>2] = $9; $10 = (($6) + 3)|0; HEAP32[$5>>2] = $10; } $11 = ((($0)) + 17272|0); $12 = ($1|0)>(3); L4: do { if ($12) { $13 = ((($0)) + 888|0); $14 = $13; $15 = ((($0)) + 16|0); $16 = ((($0)) + 20|0); $17 = ((($0)) + 33656|0); $18 = ((($0)) + 12|0); $$0112144 = $1;$$0145 = $11; while(1) { $19 = (_Deflate_Hash($$0145)|0); $20 = ($$0112144|0)<(258); $21 = $20 ? $$0112144 : 258; $22 = (((($0)) + 41848|0) + ($19<<2)|0); $$0116129 = HEAP32[$22>>2]|0; $23 = ($$0116129|0)==(0); if ($23) { $$0117$lcssa = 0;$$0122$lcssa = 2; } else { $$0116133 = $$0116129;$$0117132 = 0;$$0120131 = 0;$$0122130 = 2; while(1) { $24 = (((($0)) + 888|0) + ($$0116133)|0); $25 = (_Deflate_MatchLen($24,$$0145,$21)|0); $26 = ($25|0)>($$0122130|0); $spec$select = $26 ? $25 : $$0122130; $spec$select124 = $26 ? $$0116133 : $$0117132; $27 = (((($0)) + 58232|0) + ($$0116133<<2)|0); $28 = (($$0120131) + 1)|0; $$0116 = HEAP32[$27>>2]|0; $29 = ($$0116|0)!=(0); $30 = ($28>>>0)<(5); $31 = $30 & $29; if ($31) { $$0116133 = $$0116;$$0117132 = $spec$select124;$$0120131 = $28;$$0122130 = $spec$select; } else { $$0117$lcssa = $spec$select124;$$0122$lcssa = $spec$select; break; } } } $32 = $$0145; $33 = (($32) - ($14))|0; $34 = HEAP32[$22>>2]|0; HEAP32[$22>>2] = $33; $35 = $34 & 65535; $36 = (((($0)) + 58232|0) + ($33<<2)|0); HEAP32[$36>>2] = $35; $37 = ($$0117$lcssa|0)==(0); L13: do { if ($37) { label = 15; } else { $38 = ((($$0145)) + 1|0); $39 = (_Deflate_Hash($38)|0); $40 = (((($0)) + 41848|0) + ($39<<2)|0); $41 = (($$0112144) + -1)|0; $42 = ($41|0)<(258); $43 = $42 ? $41 : 258; $$0115138 = HEAP32[$40>>2]|0; $44 = ($$0115138|0)==(0); if (!($44)) { $$0115140 = $$0115138;$$1121139 = 0; while(1) { $45 = (((($0)) + 888|0) + ($$0115140)|0); $46 = (_Deflate_MatchLen($45,$38,$43)|0); $47 = ($46|0)>($$0122$lcssa|0); if ($47) { label = 15; break L13; } $48 = (((($0)) + 58232|0) + ($$0115140<<2)|0); $49 = (($$1121139) + 1)|0; $$0115 = HEAP32[$48>>2]|0; $50 = ($$0115|0)!=(0); $51 = ($49>>>0)<(5); $52 = $51 & $50; if ($52) { $$0115140 = $$0115;$$1121139 = $49; } else { break; } } $53 = ($$0117$lcssa|0)==(0); if ($53) { label = 15; break; } } $54 = (($33) - ($$0117$lcssa))|0; _Deflate_LenDist($0,$$0122$lcssa,$54); $55 = (($$0112144) - ($$0122$lcssa))|0; $$1113 = $55;$$sink = $$0122$lcssa; } } while(0); if ((label|0) == 15) { label = 0; $56 = HEAP8[$$0145>>0]|0; $57 = $56&255; _Deflate_Lit($0,$57); $58 = (($$0112144) + -1)|0; $$1113 = $58;$$sink = 1; } $59 = (($$0145) + ($$sink)|0); $60 = HEAP32[$15>>2]|0; $61 = ($60>>>0)>(19); if (!($61)) { $63 = HEAP32[$16>>2]|0; $64 = (8192 - ($60))|0; $65 = (_Stream_Write($63,$17,$64)|0); HEAP32[$18>>2] = $17; HEAP32[$15>>2] = 8192; $66 = ($65|0)==(0); if (!($66)) { $$0111 = $65; break; } } $62 = ($$1113|0)>(3); if ($62) { $$0112144 = $$1113;$$0145 = $59; } else { $$0$lcssa = $59;$$0112$lcssa = $$1113; break L4; } } return ($$0111|0); } else { $$0$lcssa = $11;$$0112$lcssa = $1; } } while(0); $67 = ($$0112$lcssa|0)>(0); if ($67) { $$2114127 = $$0112$lcssa;$$2128 = $$0$lcssa; while(1) { $68 = HEAP8[$$2128>>0]|0; $69 = $68&255; _Deflate_Lit($0,$69); $70 = (($$2114127) + -1)|0; $71 = ((($$2128)) + 1|0); $72 = ($$2114127|0)>(1); if ($72) { $$2114127 = $70;$$2128 = $71; } else { break; } } } $73 = ((($0)) + 20|0); $74 = HEAP32[$73>>2]|0; $75 = ((($0)) + 33656|0); $76 = ((($0)) + 16|0); $77 = HEAP32[$76>>2]|0; $78 = (8192 - ($77))|0; $79 = (_Stream_Write($74,$75,$78)|0); $80 = ((($0)) + 12|0); HEAP32[$80>>2] = $75; HEAP32[$76>>2] = 8192; _Deflate_MoveBlock($0); $$0111 = $79; return ($$0111|0); } function _Deflate_Hash($0) { $0 = $0|0; var $$masked = 0, $$masked3 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; $2 = $1&255; $3 = $2 << 8; $4 = ((($0)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; $7 = $6 << 4; $8 = ((($0)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $$masked3 = $3 & 3840; $$masked = $$masked3 ^ $7; $11 = $$masked ^ $10; return ($11|0); } function _Deflate_MatchLen($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0$lcssa = 0, $$011 = 0, $$0710 = 0, $$089 = 0, $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($2|0)>(0); L1: do { if ($3) { $$011 = 0;$$0710 = $0;$$089 = $1; while(1) { $4 = HEAP8[$$0710>>0]|0; $5 = HEAP8[$$089>>0]|0; $6 = ($4<<24>>24)==($5<<24>>24); if (!($6)) { $$0$lcssa = $$011; break L1; } $7 = (($$011) + 1)|0; $8 = ((($$0710)) + 1|0); $9 = ((($$089)) + 1|0); $10 = ($7|0)<($2|0); if ($10) { $$011 = $7;$$0710 = $8;$$089 = $9; } else { $$0$lcssa = $7; break; } } } else { $$0$lcssa = 0; } } while(0); return ($$0$lcssa|0); } function _Deflate_LenDist($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $$1 = 0, $$lcssa = 0, $$pr = 0, $$pr42 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $$0 = 0; while(1) { $3 = (($$0) + 1)|0; $4 = (2608 + ($3<<1)|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; $7 = ($6|0)>($1|0); if ($7) { break; } else { $$0 = $3; } } $8 = (($$0) + 257)|0; $9 = (((($0)) + 24|0) + ($8<<1)|0); $10 = HEAP16[$9>>1]|0; $11 = $10&65535; $12 = ((($0)) + 4|0); $13 = HEAP32[$12>>2]|0; $14 = $11 << $13; $15 = HEAP32[$0>>2]|0; $16 = $15 | $14; HEAP32[$0>>2] = $16; $17 = (((($0)) + 600|0) + ($8)|0); $18 = HEAP8[$17>>0]|0; $19 = $18&255; $20 = (($13) + ($19))|0; HEAP32[$12>>2] = $20; $21 = (($$0) + -8)|0; $22 = ($21>>>0)<(20); if ($22) { $23 = (2416 + ($$0)|0); $24 = (2608 + ($$0<<1)|0); $25 = HEAP16[$24>>1]|0; $26 = $25&65535; $27 = (($1) - ($26))|0; $28 = $27 << $20; $29 = $28 | $16; HEAP32[$0>>2] = $29; $30 = HEAP8[$23>>0]|0; $31 = $30&255; $32 = (($20) + ($31))|0; HEAP32[$12>>2] = $32; $$pr = $32; } else { $$pr = $20; } $33 = ($$pr>>>0)>(7); if ($33) { $34 = ((($0)) + 12|0); $35 = ((($0)) + 16|0); while(1) { $36 = HEAP32[$0>>2]|0; $37 = $36&255; $38 = HEAP32[$34>>2]|0; $39 = ((($38)) + 1|0); HEAP32[$34>>2] = $39; HEAP8[$38>>0] = $37; $40 = HEAP32[$35>>2]|0; $41 = (($40) + -1)|0; HEAP32[$35>>2] = $41; $42 = HEAP32[$0>>2]|0; $43 = (8)?($42 >>> 8):($42); HEAP32[$0>>2] = $43; $44 = HEAP32[$12>>2]|0; $45 = (($44) + -8)|0; HEAP32[$12>>2] = $45; $46 = ($45>>>0)>(7); if (!($46)) { $$lcssa = $45; break; } } } else { $$lcssa = $$pr; } $$1 = 0; while(1) { $47 = (($$1) + 1)|0; $48 = (2672 + ($47<<1)|0); $49 = HEAP16[$48>>1]|0; $50 = $49&65535; $51 = ($50|0)>($2|0); if ($51) { break; } else { $$1 = $47; } } $52 = (_Huffman_ReverseBits($$1,5)|0); $53 = $52 << $$lcssa; $54 = HEAP32[$0>>2]|0; $55 = $54 | $53; HEAP32[$0>>2] = $55; $56 = (($$lcssa) + 5)|0; HEAP32[$12>>2] = $56; $57 = (($$1) + -4)|0; $58 = ($57>>>0)<(26); if ($58) { $59 = (2512 + ($$1)|0); $60 = (2672 + ($$1<<1)|0); $61 = HEAP16[$60>>1]|0; $62 = $61&65535; $63 = (($2) - ($62))|0; $64 = $63 << $56; $65 = $64 | $55; HEAP32[$0>>2] = $65; $66 = HEAP8[$59>>0]|0; $67 = $66&255; $68 = (($56) + ($67))|0; HEAP32[$12>>2] = $68; $$pr42 = $68; } else { $$pr42 = $56; } $69 = ($$pr42>>>0)>(7); if (!($69)) { return; } $70 = ((($0)) + 12|0); $71 = ((($0)) + 16|0); while(1) { $72 = HEAP32[$0>>2]|0; $73 = $72&255; $74 = HEAP32[$70>>2]|0; $75 = ((($74)) + 1|0); HEAP32[$70>>2] = $75; HEAP8[$74>>0] = $73; $76 = HEAP32[$71>>2]|0; $77 = (($76) + -1)|0; HEAP32[$71>>2] = $77; $78 = HEAP32[$0>>2]|0; $79 = (8)?($78 >>> 8):($78); HEAP32[$0>>2] = $79; $80 = HEAP32[$12>>2]|0; $81 = (($80) + -8)|0; HEAP32[$12>>2] = $81; $82 = ($81>>>0)>(7); if (!($82)) { break; } } return; } function _Deflate_Lit($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (((($0)) + 24|0) + ($1<<1)|0); $3 = HEAP16[$2>>1]|0; $4 = $3&65535; $5 = ((($0)) + 4|0); $6 = HEAP32[$5>>2]|0; $7 = $4 << $6; $8 = HEAP32[$0>>2]|0; $9 = $8 | $7; HEAP32[$0>>2] = $9; $10 = (((($0)) + 600|0) + ($1)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = (($6) + ($12))|0; HEAP32[$5>>2] = $13; $14 = ($13>>>0)>(7); if (!($14)) { return; } $15 = ((($0)) + 12|0); $16 = ((($0)) + 16|0); while(1) { $17 = HEAP32[$0>>2]|0; $18 = $17&255; $19 = HEAP32[$15>>2]|0; $20 = ((($19)) + 1|0); HEAP32[$15>>2] = $20; HEAP8[$19>>0] = $18; $21 = HEAP32[$16>>2]|0; $22 = (($21) + -1)|0; HEAP32[$16>>2] = $22; $23 = HEAP32[$0>>2]|0; $24 = (8)?($23 >>> 8):($23); HEAP32[$0>>2] = $24; $25 = HEAP32[$5>>2]|0; $26 = (($25) + -8)|0; HEAP32[$5>>2] = $26; $27 = ($26>>>0)>(7); if (!($27)) { break; } } return; } function _Deflate_MoveBlock($0) { $0 = $0|0; var $$021 = 0, $$120 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond22 = 0, $spec$select = 0, $spec$select19 = 0, label = 0; var sp = 0; sp = STACKTOP; $1 = ((($0)) + 888|0); $2 = ((($0)) + 17272|0); _Mem_Copy($1,$2,16384); $3 = ((($0)) + 8|0); HEAP32[$3>>2] = 16384; $$021 = 0; while(1) { $4 = (((($0)) + 41848|0) + ($$021<<2)|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)<(16384); $7 = (($5) + -16384)|0; $spec$select = $6 ? 0 : $7; HEAP32[$4>>2] = $spec$select; $8 = (($$021) + 1)|0; $exitcond22 = ($8|0)==(4096); if ($exitcond22) { break; } else { $$021 = $8; } } $$120 = 0; while(1) { $9 = (((($0)) + 58232|0) + ($$120<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)<(16384); $12 = (($10) + -16384)|0; $spec$select19 = $11 ? 0 : $12; HEAP32[$9>>2] = $spec$select19; $13 = (($$120) + 1)|0; $exitcond = ($13|0)==(32768); if ($exitcond) { break; } else { $$120 = $13; } } return; } function _GZip_MakeStream($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; _Deflate_MakeStream($0,$1,$2); $3 = ((($1)) + 189308|0); HEAP32[$3>>2] = -1; $4 = ((($1)) + 189312|0); HEAP32[$4>>2] = 0; $5 = ((($0)) + 8|0); HEAP32[$5>>2] = 30; $6 = ((($0)) + 28|0); HEAP32[$6>>2] = 4; return; } function _GZip_StreamWriteFirst($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 32|0); $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 20|0); $7 = HEAP32[$6>>2]|0; $8 = (_Stream_Write($7,27297,10)|0); $9 = ($8|0)==(0); if (!($9)) { $$0 = $8; return ($$0|0); } $10 = ((($0)) + 8|0); HEAP32[$10>>2] = 31; $11 = (_GZip_StreamWrite($0,$1,$2,$3)|0); $$0 = $11; return ($$0|0); } function _GZip_StreamClose($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($0)) + 32|0); $3 = HEAP32[$2>>2]|0; $4 = (_Deflate_StreamClose($0)|0); $5 = ($4|0)==(0); if (!($5)) { $$0 = $4; STACKTOP = sp;return ($$0|0); } $6 = ((($3)) + 189308|0); $7 = HEAP32[$6>>2]|0; $8 = $7 ^ -1; _Stream_SetU32_LE($1,$8); $9 = ((($1)) + 4|0); $10 = ((($3)) + 189312|0); $11 = HEAP32[$10>>2]|0; _Stream_SetU32_LE($9,$11); $12 = ((($3)) + 20|0); $13 = HEAP32[$12>>2]|0; $14 = (_Stream_Write($13,$1,8)|0); $$0 = $14; STACKTOP = sp;return ($$0|0); } function _GZip_StreamWrite($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0$lcssa = 0, $$0$masked = 0, $$02021 = 0, $$022 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 32|0); $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 189308|0); $7 = HEAP32[$6>>2]|0; $8 = ((($5)) + 189312|0); $9 = HEAP32[$8>>2]|0; $10 = (($9) + ($2))|0; HEAP32[$8>>2] = $10; $11 = ($2|0)==(0); if ($11) { $$0$lcssa = $7; HEAP32[$6>>2] = $$0$lcssa; $21 = (_Deflate_StreamWrite($0,$1,$2,$3)|0); return ($21|0); } $$02021 = 0;$$022 = $7; while(1) { $12 = (($1) + ($$02021)|0); $13 = HEAP8[$12>>0]|0; $14 = $13&255; $$0$masked = $$022 & 255; $15 = $$0$masked ^ $14; $16 = (10176 + ($15<<2)|0); $17 = HEAP32[$16>>2]|0; $18 = (8)?($$022 >>> 8):($$022); $19 = $17 ^ $18; $20 = (($$02021) + 1)|0; $exitcond = ($20|0)==($2|0); if ($exitcond) { $$0$lcssa = $19; break; } else { $$02021 = $20;$$022 = $19; } } HEAP32[$6>>2] = $$0$lcssa; $21 = (_Deflate_StreamWrite($0,$1,$2,$3)|0); return ($21|0); } function _Zip_Extract($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$04767 = 0, $$14864 = 0, $$2 = 0, $$24954 = 0, $$pr = 0, $$pr$pr = 0, $$pr74 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0; var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, $switch$split2D = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16416|0; $3 = sp + 8|0; $4 = sp + 4|0; $5 = sp; HEAP32[$5>>2] = 0; $6 = ((($0)) + 24|0); $7 = HEAP32[$6>>2]|0; $8 = (FUNCTION_TABLE_iii[$7 & 127]($0,$4)|0); $9 = ($8|0)==(0); L1: do { if ($9) { $10 = HEAP32[$4>>2]|0; $11 = ($10>>>0)<(257); $12 = $11 ? $10 : 257; $13 = ($12|0)>(22); L3: do { if ($13) { $14 = ((($0)) + 16|0); $$04767 = 22; while(1) { $17 = HEAP32[$14>>2]|0; $18 = HEAP32[$4>>2]|0; $19 = (($18) - ($$04767))|0; $20 = (FUNCTION_TABLE_iii[$17 & 127]($0,$19)|0); $21 = ($20|0)==(0); if (!($21)) { $$2 = -857812946; break L1; } $22 = (_Stream_ReadU32_LE($0,$5)|0); $23 = ($22|0)==(0); if (!($23)) { $$2 = $22; break L1; } $24 = HEAP32[$5>>2]|0; $25 = ($24|0)==(101010256); $15 = (($$04767) + 1)|0; if ($25) { break; } $16 = ($15>>>0)<($12>>>0); if ($16) { $$04767 = $15; } else { $$pr = $24; label = 9; break L3; } } HEAP32[$3>>2] = $0; $28 = ((($3)) + 4|0); HEAP32[$28>>2] = $1; $29 = ((($3)) + 8|0); HEAP32[$29>>2] = $2; } else { $$pr$pr = HEAP32[$5>>2]|0; $$pr = $$pr$pr; label = 9; } } while(0); if ((label|0) == 9) { $phitmp = ($$pr|0)==(101010256); HEAP32[$3>>2] = $0; $26 = ((($3)) + 4|0); HEAP32[$26>>2] = $1; $27 = ((($3)) + 8|0); HEAP32[$27>>2] = $2; if (!($phitmp)) { $$2 = -857812945; break; } } $30 = (_Zip_ReadEndOfCentralDirectory($3)|0); $31 = ($30|0)==(0); if ($31) { $32 = ((($0)) + 16|0); $33 = HEAP32[$32>>2]|0; $34 = ((($3)) + 20|0); $35 = HEAP32[$34>>2]|0; $36 = (FUNCTION_TABLE_iii[$33 & 127]($0,$35)|0); $37 = ($36|0)==(0); if ($37) { $38 = ((($3)) + 12|0); HEAP32[$38>>2] = 0; $39 = ((($3)) + 16|0); $40 = HEAP32[$39>>2]|0; $41 = ($40|0)>(0); if ($41) { $$14864 = 0; while(1) { $45 = (_Stream_ReadU32_LE($0,$5)|0); $46 = ($45|0)==(0); if (!($46)) { $$2 = $45; break L1; } $47 = HEAP32[$5>>2]|0; $switch$split2D = ($47|0)<(101010256); if (!($switch$split2D)) { label = 28; break; } switch ($47|0) { case 33639248: { break; } default: { $$2 = -857812943; break L1; } } $48 = (_Zip_ReadCentralDirectory($3)|0); $49 = ($48|0)==(0); $43 = (($$14864) + 1)|0; if (!($49)) { $$2 = $48; break L1; } $42 = HEAP32[$39>>2]|0; $44 = ($43|0)<($42|0); if ($44) { $$14864 = $43; } else { break; } } if ((label|0) == 28) { switch ($47|0) { case 101010256: { break; } default: { $$2 = -857812943; break L1; } } } $$pr74 = HEAP32[$38>>2]|0; $50 = ($$pr74|0)>(0); if ($50) { $$24954 = 0; while(1) { $54 = (((($3)) + 24|0) + ($$24954<<4)|0); $55 = HEAP32[$32>>2]|0; $56 = (((((($3)) + 24|0) + ($$24954<<4)|0)) + 8|0); $57 = HEAP32[$56>>2]|0; $58 = (FUNCTION_TABLE_iii[$55 & 127]($0,$57)|0); $59 = ($58|0)==(0); if (!($59)) { $$2 = -857812942; break L1; } $60 = (_Stream_ReadU32_LE($0,$5)|0); $61 = ($60|0)==(0); if (!($61)) { $$2 = $60; break L1; } $62 = HEAP32[$5>>2]|0; $63 = ($62|0)==(67324752); if (!($63)) { $$2 = -857812941; break L1; } $64 = (_Zip_ReadLocalFileHeader($3,$54)|0); $65 = ($64|0)==(0); $52 = (($$24954) + 1)|0; if (!($65)) { $$2 = $64; break L1; } $51 = HEAP32[$38>>2]|0; $53 = ($52|0)<($51|0); if ($53) { $$24954 = $52; } else { $$2 = 0; break; } } } else { $$2 = 0; } } else { $$2 = 0; } } else { $$2 = -857812944; } } else { $$2 = $30; } } else { $$2 = $8; } } while(0); STACKTOP = sp;return ($$2|0); } function _Zip_ReadEndOfCentralDirectory($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; $2 = HEAP32[$0>>2]|0; $3 = (_Stream_Read($2,$1,18)|0); $4 = ($3|0)==(0); if (!($4)) { $$0 = $3; STACKTOP = sp;return ($$0|0); } $5 = ((($1)) + 6|0); $6 = (_Stream_GetU16_LE($5)|0); $7 = $6&65535; $8 = ((($0)) + 16|0); HEAP32[$8>>2] = $7; $9 = ((($1)) + 12|0); $10 = (_Stream_GetU32_LE($9)|0); $11 = ((($0)) + 20|0); HEAP32[$11>>2] = $10; $$0 = 0; STACKTOP = sp;return ($$0|0); } function _Zip_ReadCentralDirectory($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 576|0; $1 = sp + 512|0; $2 = sp + 560|0; $3 = sp; $4 = HEAP32[$0>>2]|0; $5 = (_Stream_Read($4,$1,42)|0); $6 = ($5|0)==(0); if (!($6)) { $$0 = $5; STACKTOP = sp;return ($$0|0); } $7 = ((($1)) + 24|0); $8 = (_Stream_GetU16_LE($7)|0); $9 = $8&65535; $10 = ($8&65535)>(512); if ($10) { $$0 = -857812940; STACKTOP = sp;return ($$0|0); } _String_Init($2,$3,$9,$9); $11 = (_Stream_Read($4,$3,$9)|0); $12 = ($11|0)==(0); if (!($12)) { $$0 = $11; STACKTOP = sp;return ($$0|0); } $13 = ((($1)) + 26|0); $14 = (_Stream_GetU16_LE($13)|0); $15 = $14&65535; $16 = ((($1)) + 28|0); $17 = (_Stream_GetU16_LE($16)|0); $18 = $17&65535; $19 = ((($4)) + 12|0); $20 = HEAP32[$19>>2]|0; $21 = (($18) + ($15))|0; $22 = (FUNCTION_TABLE_iii[$20 & 127]($4,$21)|0); $23 = ($22|0)==(0); if (!($23)) { $$0 = $22; STACKTOP = sp;return ($$0|0); } $24 = ((($0)) + 4|0); $25 = HEAP32[$24>>2]|0; $26 = (FUNCTION_TABLE_ii[$25 & 31]($2)|0); $27 = ($26<<24>>24)==(0); if ($27) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $28 = ((($0)) + 12|0); $29 = HEAP32[$28>>2]|0; $30 = ($29|0)>(1023); if ($30) { $$0 = -857812947; STACKTOP = sp;return ($$0|0); } $31 = (($29) + 1)|0; HEAP32[$28>>2] = $31; $32 = ((($1)) + 12|0); $33 = (_Stream_GetU32_LE($32)|0); $34 = (((((($0)) + 24|0) + ($29<<4)|0)) + 12|0); HEAP32[$34>>2] = $33; $35 = ((($1)) + 16|0); $36 = (_Stream_GetU32_LE($35)|0); $37 = (((($0)) + 24|0) + ($29<<4)|0); HEAP32[$37>>2] = $36; $38 = ((($1)) + 20|0); $39 = (_Stream_GetU32_LE($38)|0); $40 = (((((($0)) + 24|0) + ($29<<4)|0)) + 4|0); HEAP32[$40>>2] = $39; $41 = ((($1)) + 38|0); $42 = (_Stream_GetU32_LE($41)|0); $43 = (((((($0)) + 24|0) + ($29<<4)|0)) + 8|0); HEAP32[$43>>2] = $42; $$0 = 0; STACKTOP = sp;return ($$0|0); } function _Zip_ReadLocalFileHeader($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$037 = 0, $$038 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 45424|0; $2 = sp + 512|0; $3 = sp + 544|0; $4 = sp; $5 = sp + 45408|0; $6 = sp + 45352|0; $7 = sp + 45296|0; $8 = sp + 552|0; $9 = HEAP32[$0>>2]|0; $10 = (_Stream_Read($9,$2,26)|0); $11 = ($10|0)==(0); if (!($11)) { $$0 = $10; STACKTOP = sp;return ($$0|0); } $12 = ((($2)) + 22|0); $13 = (_Stream_GetU16_LE($12)|0); $14 = $13&65535; $15 = ($13&65535)>(512); if ($15) { $$0 = -857812940; STACKTOP = sp;return ($$0|0); } _String_Init($3,$4,$14,$14); $16 = (_Stream_Read($9,$4,$14)|0); $17 = ($16|0)==(0); if (!($17)) { $$0 = $16; STACKTOP = sp;return ($$0|0); } $18 = ((($0)) + 4|0); $19 = HEAP32[$18>>2]|0; $20 = (FUNCTION_TABLE_ii[$19 & 31]($3)|0); $21 = ($20<<24>>24)==(0); if ($21) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $22 = ((($2)) + 24|0); $23 = (_Stream_GetU16_LE($22)|0); $24 = $23&65535; $25 = ((($9)) + 12|0); $26 = HEAP32[$25>>2]|0; $27 = (FUNCTION_TABLE_iii[$26 & 127]($9,$24)|0); $28 = ($27|0)==(0); if (!($28)) { $$0 = $27; STACKTOP = sp;return ($$0|0); } $29 = ((($2)) + 4|0); $30 = (_Stream_GetU16_LE($29)|0); $31 = $30&65535; HEAP32[$5>>2] = $31; $32 = ((($2)) + 14|0); $33 = (_Stream_GetU32_LE($32)|0); $34 = ((($2)) + 18|0); $35 = (_Stream_GetU32_LE($34)|0); $36 = ($33|0)==(0); if ($36) { $37 = HEAP32[$1>>2]|0; $$037 = $37; } else { $$037 = $33; } $38 = ($35|0)==(0); if ($38) { $39 = ((($1)) + 4|0); $40 = HEAP32[$39>>2]|0; $$038 = $40; } else { $$038 = $35; } $41 = HEAP32[$5>>2]|0; switch ($41|0) { case 0: { _Stream_ReadonlyPortion($6,$9,$$038); $42 = ((($0)) + 8|0); $43 = HEAP32[$42>>2]|0; $44 = (FUNCTION_TABLE_iiii[$43 & 31]($3,$6,$1)|0); $$0 = $44; STACKTOP = sp;return ($$0|0); } case 8: { _Stream_ReadonlyPortion($6,$9,$$037); _Inflate_MakeStream2($7,$8,$6); $45 = ((($0)) + 8|0); $46 = HEAP32[$45>>2]|0; $47 = (FUNCTION_TABLE_iiii[$46 & 31]($3,$7,$1)|0); $$0 = $47; STACKTOP = sp;return ($$0|0); } default: { _Platform_Log1(27307,$5); $$0 = 0; STACKTOP = sp;return ($$0|0); } } } function _String_Init($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = $2&65535; $5 = $3&65535; HEAP32[$0>>2] = $1; $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); HEAP16[$$sroa$4$0$$sroa_idx2>>1] = $4; $$sroa$5$0$$sroa_idx4 = ((($0)) + 6|0); HEAP16[$$sroa$5$0$$sroa_idx4>>1] = $5; return; } function _Drawer_XMin($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$sroa$12$0$$sroa_idx40 = 0, $$sroa$12$0$$sroa_idx41 = 0, $$sroa$12$0$$sroa_idx43 = 0, $$sroa$12$0$$sroa_idx45 = 0, $$sroa$13$0$$sroa_idx48 = 0, $$sroa$13$0$$sroa_idx49 = 0, $$sroa$13$0$$sroa_idx51 = 0, $$sroa$13$0$$sroa_idx53 = 0, $$sroa$16$0$$sroa_idx56 = 0, $$sroa$16$0$$sroa_idx57 = 0, $$sroa$16$0$$sroa_idx59 = 0, $$sroa$16$0$$sroa_idx61 = 0, $$sroa$7$0$$sroa_idx24 = 0, $$sroa$7$0$$sroa_idx25 = 0, $$sroa$7$0$$sroa_idx27 = 0, $$sroa$7$0$$sroa_idx29 = 0, $$sroa$9$0$$sroa_idx32 = 0, $$sroa$9$0$$sroa_idx33 = 0, $$sroa$9$0$$sroa_idx35 = 0; var $$sroa$9$0$$sroa_idx37 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[$3>>2]|0; $5 = $2&65535; $6 = HEAP32[(1949300)>>2]|0; $7 = $6 & $5; $8 = (+($7|0)); $9 = +HEAPF32[(1949308)>>2]; $10 = $9 * $8; $11 = HEAP32[(1781664)>>2]|0; $12 = (($0) + -1)|0; $13 = (+($12|0)); $14 = +HEAPF32[(1781676)>>2]; $15 = $14 * 0.99937498569488525; $16 = $15 + $13; $17 = +HEAPF32[(1781672)>>2]; $18 = $9 * $17; $19 = $10 + $18; $20 = +HEAPF32[(1781660)>>2]; $21 = $9 * $20; $22 = $21 * 0.99937498569488525; $23 = $10 + $22; $24 = HEAP8[1781648]|0; $25 = ($24<<24>>24)==(0); if ($25) { $$0 = $1; } else { $26 = HEAP32[(1781652)>>2]|0; $27 = (_PackedCol_Tint($1,$26)|0); $$0 = $27; } $28 = HEAP32[(1781680)>>2]|0; $29 = HEAP32[(1781696)>>2]|0; $30 = +HEAPF32[(1781700)>>2]; $31 = $30 + $13; $32 = ((($4)) + 24|0); HEAP32[$4>>2] = $28; $$sroa$7$0$$sroa_idx29 = ((($4)) + 4|0); HEAP32[$$sroa$7$0$$sroa_idx29>>2] = $29; $$sroa$9$0$$sroa_idx37 = ((($4)) + 8|0); HEAPF32[$$sroa$9$0$$sroa_idx37>>2] = $31; $$sroa$12$0$$sroa_idx45 = ((($4)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx45>>2] = $$0; $$sroa$13$0$$sroa_idx53 = ((($4)) + 16|0); HEAPF32[$$sroa$13$0$$sroa_idx53>>2] = $16; $$sroa$16$0$$sroa_idx61 = ((($4)) + 20|0); HEAPF32[$$sroa$16$0$$sroa_idx61>>2] = $19; $33 = HEAP32[(1781688)>>2]|0; $34 = ((($4)) + 48|0); HEAP32[$32>>2] = $28; $$sroa$7$0$$sroa_idx27 = ((($4)) + 28|0); HEAP32[$$sroa$7$0$$sroa_idx27>>2] = $29; $$sroa$9$0$$sroa_idx35 = ((($4)) + 32|0); HEAP32[$$sroa$9$0$$sroa_idx35>>2] = $33; $$sroa$12$0$$sroa_idx43 = ((($4)) + 36|0); HEAP32[$$sroa$12$0$$sroa_idx43>>2] = $$0; $$sroa$13$0$$sroa_idx51 = ((($4)) + 40|0); HEAP32[$$sroa$13$0$$sroa_idx51>>2] = $11; $$sroa$16$0$$sroa_idx59 = ((($4)) + 44|0); HEAPF32[$$sroa$16$0$$sroa_idx59>>2] = $19; $35 = HEAP32[(1781684)>>2]|0; $36 = ((($4)) + 72|0); HEAP32[$34>>2] = $28; $$sroa$7$0$$sroa_idx25 = ((($4)) + 52|0); HEAP32[$$sroa$7$0$$sroa_idx25>>2] = $35; $$sroa$9$0$$sroa_idx33 = ((($4)) + 56|0); HEAP32[$$sroa$9$0$$sroa_idx33>>2] = $33; $$sroa$12$0$$sroa_idx41 = ((($4)) + 60|0); HEAP32[$$sroa$12$0$$sroa_idx41>>2] = $$0; $$sroa$13$0$$sroa_idx49 = ((($4)) + 64|0); HEAP32[$$sroa$13$0$$sroa_idx49>>2] = $11; $$sroa$16$0$$sroa_idx57 = ((($4)) + 68|0); HEAPF32[$$sroa$16$0$$sroa_idx57>>2] = $23; $37 = +HEAPF32[(1781700)>>2]; $38 = $37 + $13; $39 = ((($4)) + 96|0); HEAP32[$36>>2] = $28; $$sroa$7$0$$sroa_idx24 = ((($4)) + 76|0); HEAP32[$$sroa$7$0$$sroa_idx24>>2] = $35; $$sroa$9$0$$sroa_idx32 = ((($4)) + 80|0); HEAPF32[$$sroa$9$0$$sroa_idx32>>2] = $38; $$sroa$12$0$$sroa_idx40 = ((($4)) + 84|0); HEAP32[$$sroa$12$0$$sroa_idx40>>2] = $$0; $$sroa$13$0$$sroa_idx48 = ((($4)) + 88|0); HEAPF32[$$sroa$13$0$$sroa_idx48>>2] = $16; $$sroa$16$0$$sroa_idx56 = ((($4)) + 92|0); HEAPF32[$$sroa$16$0$$sroa_idx56>>2] = $23; HEAP32[$3>>2] = $39; return; } function _Drawer_XMax($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$sroa$12$0$$sroa_idx40 = 0, $$sroa$12$0$$sroa_idx41 = 0, $$sroa$12$0$$sroa_idx43 = 0, $$sroa$12$0$$sroa_idx45 = 0, $$sroa$13$0$$sroa_idx48 = 0, $$sroa$13$0$$sroa_idx49 = 0, $$sroa$13$0$$sroa_idx51 = 0, $$sroa$13$0$$sroa_idx53 = 0, $$sroa$16$0$$sroa_idx56 = 0, $$sroa$16$0$$sroa_idx57 = 0, $$sroa$16$0$$sroa_idx59 = 0, $$sroa$16$0$$sroa_idx61 = 0, $$sroa$7$0$$sroa_idx24 = 0, $$sroa$7$0$$sroa_idx25 = 0, $$sroa$7$0$$sroa_idx27 = 0, $$sroa$7$0$$sroa_idx29 = 0, $$sroa$9$0$$sroa_idx32 = 0, $$sroa$9$0$$sroa_idx33 = 0, $$sroa$9$0$$sroa_idx35 = 0; var $$sroa$9$0$$sroa_idx37 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[$3>>2]|0; $5 = $2&65535; $6 = HEAP32[(1949300)>>2]|0; $7 = $6 & $5; $8 = (+($7|0)); $9 = +HEAPF32[(1949308)>>2]; $10 = $9 * $8; $11 = (+($0|0)); $12 = +HEAPF32[(1781664)>>2]; $13 = $11 - $12; $14 = +HEAPF32[(1781676)>>2]; $15 = 1.0 - $14; $16 = $15 * 0.99937498569488525; $17 = +HEAPF32[(1781672)>>2]; $18 = $9 * $17; $19 = $10 + $18; $20 = +HEAPF32[(1781660)>>2]; $21 = $9 * $20; $22 = $21 * 0.99937498569488525; $23 = $10 + $22; $24 = HEAP8[1781648]|0; $25 = ($24<<24>>24)==(0); if ($25) { $$0 = $1; } else { $26 = HEAP32[(1781652)>>2]|0; $27 = (_PackedCol_Tint($1,$26)|0); $$0 = $27; } $28 = HEAP32[(1781692)>>2]|0; $29 = HEAP32[(1781696)>>2]|0; $30 = HEAP32[(1781688)>>2]|0; $31 = ((($4)) + 24|0); HEAP32[$4>>2] = $28; $$sroa$7$0$$sroa_idx29 = ((($4)) + 4|0); HEAP32[$$sroa$7$0$$sroa_idx29>>2] = $29; $$sroa$9$0$$sroa_idx37 = ((($4)) + 8|0); HEAP32[$$sroa$9$0$$sroa_idx37>>2] = $30; $$sroa$12$0$$sroa_idx45 = ((($4)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx45>>2] = $$0; $$sroa$13$0$$sroa_idx53 = ((($4)) + 16|0); HEAPF32[$$sroa$13$0$$sroa_idx53>>2] = $13; $$sroa$16$0$$sroa_idx61 = ((($4)) + 20|0); HEAPF32[$$sroa$16$0$$sroa_idx61>>2] = $19; $32 = +HEAPF32[(1781700)>>2]; $33 = (($0) + -1)|0; $34 = (+($33|0)); $35 = $32 + $34; $36 = ((($4)) + 48|0); HEAP32[$31>>2] = $28; $$sroa$7$0$$sroa_idx27 = ((($4)) + 28|0); HEAP32[$$sroa$7$0$$sroa_idx27>>2] = $29; $$sroa$9$0$$sroa_idx35 = ((($4)) + 32|0); HEAPF32[$$sroa$9$0$$sroa_idx35>>2] = $35; $$sroa$12$0$$sroa_idx43 = ((($4)) + 36|0); HEAP32[$$sroa$12$0$$sroa_idx43>>2] = $$0; $$sroa$13$0$$sroa_idx51 = ((($4)) + 40|0); HEAPF32[$$sroa$13$0$$sroa_idx51>>2] = $16; $$sroa$16$0$$sroa_idx59 = ((($4)) + 44|0); HEAPF32[$$sroa$16$0$$sroa_idx59>>2] = $19; $37 = HEAP32[(1781684)>>2]|0; $38 = ((($4)) + 72|0); HEAP32[$36>>2] = $28; $$sroa$7$0$$sroa_idx25 = ((($4)) + 52|0); HEAP32[$$sroa$7$0$$sroa_idx25>>2] = $37; $$sroa$9$0$$sroa_idx33 = ((($4)) + 56|0); HEAPF32[$$sroa$9$0$$sroa_idx33>>2] = $35; $$sroa$12$0$$sroa_idx41 = ((($4)) + 60|0); HEAP32[$$sroa$12$0$$sroa_idx41>>2] = $$0; $$sroa$13$0$$sroa_idx49 = ((($4)) + 64|0); HEAPF32[$$sroa$13$0$$sroa_idx49>>2] = $16; $$sroa$16$0$$sroa_idx57 = ((($4)) + 68|0); HEAPF32[$$sroa$16$0$$sroa_idx57>>2] = $23; $39 = HEAP32[(1781688)>>2]|0; $40 = ((($4)) + 96|0); HEAP32[$38>>2] = $28; $$sroa$7$0$$sroa_idx24 = ((($4)) + 76|0); HEAP32[$$sroa$7$0$$sroa_idx24>>2] = $37; $$sroa$9$0$$sroa_idx32 = ((($4)) + 80|0); HEAP32[$$sroa$9$0$$sroa_idx32>>2] = $39; $$sroa$12$0$$sroa_idx40 = ((($4)) + 84|0); HEAP32[$$sroa$12$0$$sroa_idx40>>2] = $$0; $$sroa$13$0$$sroa_idx48 = ((($4)) + 88|0); HEAPF32[$$sroa$13$0$$sroa_idx48>>2] = $13; $$sroa$16$0$$sroa_idx56 = ((($4)) + 92|0); HEAPF32[$$sroa$16$0$$sroa_idx56>>2] = $23; HEAP32[$3>>2] = $40; return; } function _Drawer_ZMin($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$11$0$$sroa_idx32 = 0, $$sroa$11$0$$sroa_idx33 = 0, $$sroa$11$0$$sroa_idx35 = 0, $$sroa$11$0$$sroa_idx37 = 0, $$sroa$12$0$$sroa_idx40 = 0, $$sroa$12$0$$sroa_idx41 = 0, $$sroa$12$0$$sroa_idx43 = 0, $$sroa$12$0$$sroa_idx45 = 0, $$sroa$13$0$$sroa_idx48 = 0, $$sroa$13$0$$sroa_idx49 = 0, $$sroa$13$0$$sroa_idx51 = 0, $$sroa$13$0$$sroa_idx53 = 0, $$sroa$16$0$$sroa_idx56 = 0, $$sroa$16$0$$sroa_idx57 = 0, $$sroa$16$0$$sroa_idx59 = 0, $$sroa$16$0$$sroa_idx61 = 0, $$sroa$9$0$$sroa_idx24 = 0, $$sroa$9$0$$sroa_idx25 = 0; var $$sroa$9$0$$sroa_idx27 = 0, $$sroa$9$0$$sroa_idx29 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0.0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0; var sp = 0; sp = STACKTOP; $4 = HEAP32[$3>>2]|0; $5 = $2&65535; $6 = HEAP32[(1949300)>>2]|0; $7 = $6 & $5; $8 = (+($7|0)); $9 = +HEAPF32[(1949308)>>2]; $10 = $9 * $8; $11 = (+($0|0)); $12 = +HEAPF32[(1781656)>>2]; $13 = $11 - $12; $14 = +HEAPF32[(1781668)>>2]; $15 = 1.0 - $14; $16 = $15 * 0.99937498569488525; $17 = +HEAPF32[(1781672)>>2]; $18 = $9 * $17; $19 = $10 + $18; $20 = +HEAPF32[(1781660)>>2]; $21 = $9 * $20; $22 = $21 * 0.99937498569488525; $23 = $10 + $22; $24 = HEAP8[1781648]|0; $25 = ($24<<24>>24)==(0); if ($25) { $$0 = $1; } else { $26 = HEAP32[(1781652)>>2]|0; $27 = (_PackedCol_Tint($1,$26)|0); $$0 = $27; } $28 = HEAP32[(1781688)>>2]|0; $29 = +HEAPF32[(1781692)>>2]; $30 = (($0) + -1)|0; $31 = (+($30|0)); $32 = $29 + $31; $33 = HEAP32[(1781684)>>2]|0; $34 = ((($4)) + 24|0); HEAPF32[$4>>2] = $32; $$sroa$9$0$$sroa_idx25 = ((($4)) + 4|0); HEAP32[$$sroa$9$0$$sroa_idx25>>2] = $33; $$sroa$11$0$$sroa_idx33 = ((($4)) + 8|0); HEAP32[$$sroa$11$0$$sroa_idx33>>2] = $28; $$sroa$12$0$$sroa_idx41 = ((($4)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx41>>2] = $$0; $$sroa$13$0$$sroa_idx49 = ((($4)) + 16|0); HEAPF32[$$sroa$13$0$$sroa_idx49>>2] = $16; $$sroa$16$0$$sroa_idx57 = ((($4)) + 20|0); HEAPF32[$$sroa$16$0$$sroa_idx57>>2] = $23; $35 = HEAP32[(1781680)>>2]|0; $36 = ((($4)) + 48|0); HEAP32[$34>>2] = $35; $$sroa$9$0$$sroa_idx29 = ((($4)) + 28|0); HEAP32[$$sroa$9$0$$sroa_idx29>>2] = $33; $$sroa$11$0$$sroa_idx37 = ((($4)) + 32|0); HEAP32[$$sroa$11$0$$sroa_idx37>>2] = $28; $$sroa$12$0$$sroa_idx45 = ((($4)) + 36|0); HEAP32[$$sroa$12$0$$sroa_idx45>>2] = $$0; $$sroa$13$0$$sroa_idx53 = ((($4)) + 40|0); HEAPF32[$$sroa$13$0$$sroa_idx53>>2] = $13; $$sroa$16$0$$sroa_idx61 = ((($4)) + 44|0); HEAPF32[$$sroa$16$0$$sroa_idx61>>2] = $23; $37 = HEAP32[(1781696)>>2]|0; HEAP32[$36>>2] = $35; $$sroa$9$0$$sroa_idx27 = ((($4)) + 52|0); HEAP32[$$sroa$9$0$$sroa_idx27>>2] = $37; $$sroa$11$0$$sroa_idx35 = ((($4)) + 56|0); HEAP32[$$sroa$11$0$$sroa_idx35>>2] = $28; $$sroa$12$0$$sroa_idx43 = ((($4)) + 60|0); HEAP32[$$sroa$12$0$$sroa_idx43>>2] = $$0; $$sroa$13$0$$sroa_idx51 = ((($4)) + 64|0); HEAPF32[$$sroa$13$0$$sroa_idx51>>2] = $13; $$sroa$16$0$$sroa_idx59 = ((($4)) + 68|0); HEAPF32[$$sroa$16$0$$sroa_idx59>>2] = $19; $38 = +HEAPF32[(1781692)>>2]; $39 = $38 + $31; $40 = ((($4)) + 96|0); $$sroa$0$0$$sroa_idx = ((($4)) + 72|0); HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $39; $$sroa$9$0$$sroa_idx24 = ((($4)) + 76|0); HEAP32[$$sroa$9$0$$sroa_idx24>>2] = $37; $$sroa$11$0$$sroa_idx32 = ((($4)) + 80|0); HEAP32[$$sroa$11$0$$sroa_idx32>>2] = $28; $$sroa$12$0$$sroa_idx40 = ((($4)) + 84|0); HEAP32[$$sroa$12$0$$sroa_idx40>>2] = $$0; $$sroa$13$0$$sroa_idx48 = ((($4)) + 88|0); HEAPF32[$$sroa$13$0$$sroa_idx48>>2] = $16; $$sroa$16$0$$sroa_idx56 = ((($4)) + 92|0); HEAPF32[$$sroa$16$0$$sroa_idx56>>2] = $19; HEAP32[$3>>2] = $40; return; } function _Drawer_ZMax($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$11$0$$sroa_idx32 = 0, $$sroa$11$0$$sroa_idx33 = 0, $$sroa$11$0$$sroa_idx35 = 0, $$sroa$11$0$$sroa_idx37 = 0, $$sroa$12$0$$sroa_idx40 = 0, $$sroa$12$0$$sroa_idx41 = 0, $$sroa$12$0$$sroa_idx43 = 0, $$sroa$12$0$$sroa_idx45 = 0, $$sroa$13$0$$sroa_idx48 = 0, $$sroa$13$0$$sroa_idx49 = 0, $$sroa$13$0$$sroa_idx51 = 0, $$sroa$13$0$$sroa_idx53 = 0, $$sroa$16$0$$sroa_idx56 = 0, $$sroa$16$0$$sroa_idx57 = 0, $$sroa$16$0$$sroa_idx59 = 0, $$sroa$16$0$$sroa_idx61 = 0, $$sroa$9$0$$sroa_idx24 = 0, $$sroa$9$0$$sroa_idx25 = 0; var $$sroa$9$0$$sroa_idx27 = 0, $$sroa$9$0$$sroa_idx29 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0.0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[$3>>2]|0; $5 = $2&65535; $6 = HEAP32[(1949300)>>2]|0; $7 = $6 & $5; $8 = (+($7|0)); $9 = +HEAPF32[(1949308)>>2]; $10 = $9 * $8; $11 = HEAP32[(1781656)>>2]|0; $12 = (($0) + -1)|0; $13 = (+($12|0)); $14 = +HEAPF32[(1781668)>>2]; $15 = $14 * 0.99937498569488525; $16 = $15 + $13; $17 = +HEAPF32[(1781672)>>2]; $18 = $9 * $17; $19 = $10 + $18; $20 = +HEAPF32[(1781660)>>2]; $21 = $9 * $20; $22 = $21 * 0.99937498569488525; $23 = $10 + $22; $24 = HEAP8[1781648]|0; $25 = ($24<<24>>24)==(0); if ($25) { $$0 = $1; } else { $26 = HEAP32[(1781652)>>2]|0; $27 = (_PackedCol_Tint($1,$26)|0); $$0 = $27; } $28 = HEAP32[(1781700)>>2]|0; $29 = +HEAPF32[(1781692)>>2]; $30 = $29 + $13; $31 = HEAP32[(1781696)>>2]|0; $32 = ((($4)) + 24|0); HEAPF32[$4>>2] = $30; $$sroa$9$0$$sroa_idx25 = ((($4)) + 4|0); HEAP32[$$sroa$9$0$$sroa_idx25>>2] = $31; $$sroa$11$0$$sroa_idx33 = ((($4)) + 8|0); HEAP32[$$sroa$11$0$$sroa_idx33>>2] = $28; $$sroa$12$0$$sroa_idx41 = ((($4)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx41>>2] = $$0; $$sroa$13$0$$sroa_idx49 = ((($4)) + 16|0); HEAPF32[$$sroa$13$0$$sroa_idx49>>2] = $16; $$sroa$16$0$$sroa_idx57 = ((($4)) + 20|0); HEAPF32[$$sroa$16$0$$sroa_idx57>>2] = $19; $33 = HEAP32[(1781680)>>2]|0; $34 = ((($4)) + 48|0); HEAP32[$32>>2] = $33; $$sroa$9$0$$sroa_idx29 = ((($4)) + 28|0); HEAP32[$$sroa$9$0$$sroa_idx29>>2] = $31; $$sroa$11$0$$sroa_idx37 = ((($4)) + 32|0); HEAP32[$$sroa$11$0$$sroa_idx37>>2] = $28; $$sroa$12$0$$sroa_idx45 = ((($4)) + 36|0); HEAP32[$$sroa$12$0$$sroa_idx45>>2] = $$0; $$sroa$13$0$$sroa_idx53 = ((($4)) + 40|0); HEAP32[$$sroa$13$0$$sroa_idx53>>2] = $11; $$sroa$16$0$$sroa_idx61 = ((($4)) + 44|0); HEAPF32[$$sroa$16$0$$sroa_idx61>>2] = $19; $35 = HEAP32[(1781684)>>2]|0; HEAP32[$34>>2] = $33; $$sroa$9$0$$sroa_idx27 = ((($4)) + 52|0); HEAP32[$$sroa$9$0$$sroa_idx27>>2] = $35; $$sroa$11$0$$sroa_idx35 = ((($4)) + 56|0); HEAP32[$$sroa$11$0$$sroa_idx35>>2] = $28; $$sroa$12$0$$sroa_idx43 = ((($4)) + 60|0); HEAP32[$$sroa$12$0$$sroa_idx43>>2] = $$0; $$sroa$13$0$$sroa_idx51 = ((($4)) + 64|0); HEAP32[$$sroa$13$0$$sroa_idx51>>2] = $11; $$sroa$16$0$$sroa_idx59 = ((($4)) + 68|0); HEAPF32[$$sroa$16$0$$sroa_idx59>>2] = $23; $36 = +HEAPF32[(1781692)>>2]; $37 = $36 + $13; $38 = ((($4)) + 96|0); $$sroa$0$0$$sroa_idx = ((($4)) + 72|0); HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $37; $$sroa$9$0$$sroa_idx24 = ((($4)) + 76|0); HEAP32[$$sroa$9$0$$sroa_idx24>>2] = $35; $$sroa$11$0$$sroa_idx32 = ((($4)) + 80|0); HEAP32[$$sroa$11$0$$sroa_idx32>>2] = $28; $$sroa$12$0$$sroa_idx40 = ((($4)) + 84|0); HEAP32[$$sroa$12$0$$sroa_idx40>>2] = $$0; $$sroa$13$0$$sroa_idx48 = ((($4)) + 88|0); HEAPF32[$$sroa$13$0$$sroa_idx48>>2] = $16; $$sroa$16$0$$sroa_idx56 = ((($4)) + 92|0); HEAPF32[$$sroa$16$0$$sroa_idx56>>2] = $23; HEAP32[$3>>2] = $38; return; } function _Drawer_YMin($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$10$0$$sroa_idx32 = 0, $$sroa$10$0$$sroa_idx33 = 0, $$sroa$10$0$$sroa_idx35 = 0, $$sroa$10$0$$sroa_idx37 = 0, $$sroa$12$0$$sroa_idx40 = 0, $$sroa$12$0$$sroa_idx41 = 0, $$sroa$12$0$$sroa_idx43 = 0, $$sroa$12$0$$sroa_idx45 = 0, $$sroa$13$0$$sroa_idx48 = 0, $$sroa$13$0$$sroa_idx49 = 0, $$sroa$13$0$$sroa_idx51 = 0, $$sroa$13$0$$sroa_idx53 = 0, $$sroa$16$0$$sroa_idx56 = 0, $$sroa$16$0$$sroa_idx57 = 0, $$sroa$16$0$$sroa_idx59 = 0, $$sroa$16$0$$sroa_idx61 = 0, $$sroa$9$0$$sroa_idx24 = 0, $$sroa$9$0$$sroa_idx25 = 0; var $$sroa$9$0$$sroa_idx27 = 0, $$sroa$9$0$$sroa_idx29 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0.0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[$3>>2]|0; $5 = $2&65535; $6 = HEAP32[(1949300)>>2]|0; $7 = $6 & $5; $8 = (+($7|0)); $9 = +HEAPF32[(1949308)>>2]; $10 = $9 * $8; $11 = HEAP32[(1781656)>>2]|0; $12 = (($0) + -1)|0; $13 = (+($12|0)); $14 = +HEAPF32[(1781668)>>2]; $15 = $14 * 0.99937498569488525; $16 = $15 + $13; $17 = +HEAPF32[(1781664)>>2]; $18 = $9 * $17; $19 = $10 + $18; $20 = +HEAPF32[(1781676)>>2]; $21 = $9 * $20; $22 = $21 * 0.99937498569488525; $23 = $10 + $22; $24 = HEAP8[1781648]|0; $25 = ($24<<24>>24)==(0); if ($25) { $$0 = $1; } else { $26 = HEAP32[(1781652)>>2]|0; $27 = (_PackedCol_Tint($1,$26)|0); $$0 = $27; } $28 = HEAP32[(1781684)>>2]|0; $29 = +HEAPF32[(1781692)>>2]; $30 = $29 + $13; $31 = HEAP32[(1781700)>>2]|0; $32 = ((($4)) + 24|0); HEAPF32[$4>>2] = $30; $$sroa$9$0$$sroa_idx27 = ((($4)) + 4|0); HEAP32[$$sroa$9$0$$sroa_idx27>>2] = $28; $$sroa$10$0$$sroa_idx35 = ((($4)) + 8|0); HEAP32[$$sroa$10$0$$sroa_idx35>>2] = $31; $$sroa$12$0$$sroa_idx43 = ((($4)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx43>>2] = $$0; $$sroa$13$0$$sroa_idx51 = ((($4)) + 16|0); HEAPF32[$$sroa$13$0$$sroa_idx51>>2] = $16; $$sroa$16$0$$sroa_idx59 = ((($4)) + 20|0); HEAPF32[$$sroa$16$0$$sroa_idx59>>2] = $23; $33 = HEAP32[(1781680)>>2]|0; $34 = ((($4)) + 48|0); HEAP32[$32>>2] = $33; $$sroa$9$0$$sroa_idx29 = ((($4)) + 28|0); HEAP32[$$sroa$9$0$$sroa_idx29>>2] = $28; $$sroa$10$0$$sroa_idx37 = ((($4)) + 32|0); HEAP32[$$sroa$10$0$$sroa_idx37>>2] = $31; $$sroa$12$0$$sroa_idx45 = ((($4)) + 36|0); HEAP32[$$sroa$12$0$$sroa_idx45>>2] = $$0; $$sroa$13$0$$sroa_idx53 = ((($4)) + 40|0); HEAP32[$$sroa$13$0$$sroa_idx53>>2] = $11; $$sroa$16$0$$sroa_idx61 = ((($4)) + 44|0); HEAPF32[$$sroa$16$0$$sroa_idx61>>2] = $23; $35 = HEAP32[(1781688)>>2]|0; HEAP32[$34>>2] = $33; $$sroa$9$0$$sroa_idx25 = ((($4)) + 52|0); HEAP32[$$sroa$9$0$$sroa_idx25>>2] = $28; $$sroa$10$0$$sroa_idx33 = ((($4)) + 56|0); HEAP32[$$sroa$10$0$$sroa_idx33>>2] = $35; $$sroa$12$0$$sroa_idx41 = ((($4)) + 60|0); HEAP32[$$sroa$12$0$$sroa_idx41>>2] = $$0; $$sroa$13$0$$sroa_idx49 = ((($4)) + 64|0); HEAP32[$$sroa$13$0$$sroa_idx49>>2] = $11; $$sroa$16$0$$sroa_idx57 = ((($4)) + 68|0); HEAPF32[$$sroa$16$0$$sroa_idx57>>2] = $19; $36 = +HEAPF32[(1781692)>>2]; $37 = $36 + $13; $38 = ((($4)) + 96|0); $$sroa$0$0$$sroa_idx = ((($4)) + 72|0); HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $37; $$sroa$9$0$$sroa_idx24 = ((($4)) + 76|0); HEAP32[$$sroa$9$0$$sroa_idx24>>2] = $28; $$sroa$10$0$$sroa_idx32 = ((($4)) + 80|0); HEAP32[$$sroa$10$0$$sroa_idx32>>2] = $35; $$sroa$12$0$$sroa_idx40 = ((($4)) + 84|0); HEAP32[$$sroa$12$0$$sroa_idx40>>2] = $$0; $$sroa$13$0$$sroa_idx48 = ((($4)) + 88|0); HEAPF32[$$sroa$13$0$$sroa_idx48>>2] = $16; $$sroa$16$0$$sroa_idx56 = ((($4)) + 92|0); HEAPF32[$$sroa$16$0$$sroa_idx56>>2] = $19; HEAP32[$3>>2] = $38; return; } function _Drawer_YMax($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$10$0$$sroa_idx32 = 0, $$sroa$10$0$$sroa_idx33 = 0, $$sroa$10$0$$sroa_idx35 = 0, $$sroa$10$0$$sroa_idx37 = 0, $$sroa$12$0$$sroa_idx40 = 0, $$sroa$12$0$$sroa_idx41 = 0, $$sroa$12$0$$sroa_idx43 = 0, $$sroa$12$0$$sroa_idx45 = 0, $$sroa$13$0$$sroa_idx48 = 0, $$sroa$13$0$$sroa_idx49 = 0, $$sroa$13$0$$sroa_idx51 = 0, $$sroa$13$0$$sroa_idx53 = 0, $$sroa$16$0$$sroa_idx56 = 0, $$sroa$16$0$$sroa_idx57 = 0, $$sroa$16$0$$sroa_idx59 = 0, $$sroa$16$0$$sroa_idx61 = 0, $$sroa$9$0$$sroa_idx24 = 0, $$sroa$9$0$$sroa_idx25 = 0; var $$sroa$9$0$$sroa_idx27 = 0, $$sroa$9$0$$sroa_idx29 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0.0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[$3>>2]|0; $5 = $2&65535; $6 = HEAP32[(1949300)>>2]|0; $7 = $6 & $5; $8 = (+($7|0)); $9 = +HEAPF32[(1949308)>>2]; $10 = $9 * $8; $11 = HEAP32[(1781656)>>2]|0; $12 = (($0) + -1)|0; $13 = (+($12|0)); $14 = +HEAPF32[(1781668)>>2]; $15 = $14 * 0.99937498569488525; $16 = $15 + $13; $17 = +HEAPF32[(1781664)>>2]; $18 = $9 * $17; $19 = $10 + $18; $20 = +HEAPF32[(1781676)>>2]; $21 = $9 * $20; $22 = $21 * 0.99937498569488525; $23 = $10 + $22; $24 = HEAP8[1781648]|0; $25 = ($24<<24>>24)==(0); if ($25) { $$0 = $1; } else { $26 = HEAP32[(1781652)>>2]|0; $27 = (_PackedCol_Tint($1,$26)|0); $$0 = $27; } $28 = HEAP32[(1781696)>>2]|0; $29 = +HEAPF32[(1781692)>>2]; $30 = $29 + $13; $31 = HEAP32[(1781688)>>2]|0; $32 = ((($4)) + 24|0); HEAPF32[$4>>2] = $30; $$sroa$9$0$$sroa_idx27 = ((($4)) + 4|0); HEAP32[$$sroa$9$0$$sroa_idx27>>2] = $28; $$sroa$10$0$$sroa_idx35 = ((($4)) + 8|0); HEAP32[$$sroa$10$0$$sroa_idx35>>2] = $31; $$sroa$12$0$$sroa_idx43 = ((($4)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx43>>2] = $$0; $$sroa$13$0$$sroa_idx51 = ((($4)) + 16|0); HEAPF32[$$sroa$13$0$$sroa_idx51>>2] = $16; $$sroa$16$0$$sroa_idx59 = ((($4)) + 20|0); HEAPF32[$$sroa$16$0$$sroa_idx59>>2] = $19; $33 = HEAP32[(1781680)>>2]|0; $34 = ((($4)) + 48|0); HEAP32[$32>>2] = $33; $$sroa$9$0$$sroa_idx29 = ((($4)) + 28|0); HEAP32[$$sroa$9$0$$sroa_idx29>>2] = $28; $$sroa$10$0$$sroa_idx37 = ((($4)) + 32|0); HEAP32[$$sroa$10$0$$sroa_idx37>>2] = $31; $$sroa$12$0$$sroa_idx45 = ((($4)) + 36|0); HEAP32[$$sroa$12$0$$sroa_idx45>>2] = $$0; $$sroa$13$0$$sroa_idx53 = ((($4)) + 40|0); HEAP32[$$sroa$13$0$$sroa_idx53>>2] = $11; $$sroa$16$0$$sroa_idx61 = ((($4)) + 44|0); HEAPF32[$$sroa$16$0$$sroa_idx61>>2] = $19; $35 = HEAP32[(1781700)>>2]|0; HEAP32[$34>>2] = $33; $$sroa$9$0$$sroa_idx25 = ((($4)) + 52|0); HEAP32[$$sroa$9$0$$sroa_idx25>>2] = $28; $$sroa$10$0$$sroa_idx33 = ((($4)) + 56|0); HEAP32[$$sroa$10$0$$sroa_idx33>>2] = $35; $$sroa$12$0$$sroa_idx41 = ((($4)) + 60|0); HEAP32[$$sroa$12$0$$sroa_idx41>>2] = $$0; $$sroa$13$0$$sroa_idx49 = ((($4)) + 64|0); HEAP32[$$sroa$13$0$$sroa_idx49>>2] = $11; $$sroa$16$0$$sroa_idx57 = ((($4)) + 68|0); HEAPF32[$$sroa$16$0$$sroa_idx57>>2] = $23; $36 = +HEAPF32[(1781692)>>2]; $37 = $36 + $13; $38 = ((($4)) + 96|0); $$sroa$0$0$$sroa_idx = ((($4)) + 72|0); HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $37; $$sroa$9$0$$sroa_idx24 = ((($4)) + 76|0); HEAP32[$$sroa$9$0$$sroa_idx24>>2] = $28; $$sroa$10$0$$sroa_idx32 = ((($4)) + 80|0); HEAP32[$$sroa$10$0$$sroa_idx32>>2] = $35; $$sroa$12$0$$sroa_idx40 = ((($4)) + 84|0); HEAP32[$$sroa$12$0$$sroa_idx40>>2] = $$0; $$sroa$13$0$$sroa_idx48 = ((($4)) + 88|0); HEAPF32[$$sroa$13$0$$sroa_idx48>>2] = $16; $$sroa$16$0$$sroa_idx56 = ((($4)) + 92|0); HEAPF32[$$sroa$16$0$$sroa_idx56>>2] = $23; HEAP32[$3>>2] = $38; return; } function _OnInit_257() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; _OnReset_259(); $0 = HEAP8[1972839]|0; $1 = ($0<<24>>24)==(0); if ($1) { $2 = (_Options_GetBool(39844,0)|0); $3 = ($2<<24>>24)==(0); $phitmp = $3&1; $4 = $phitmp; } else { $4 = 1; } HEAP8[1781704] = $4; $5 = (_Options_GetBool(39918,0)|0); HEAP8[(1781705)>>0] = $5; _Options_Get(39831,13952,1972899); $6 = HEAP8[1972839]|0; $7 = ($6<<24>>24)==(0); if ($7) { _TextureEntry_Register(13960); return; } HEAP16[(13956)>>1] = 0; _TextureEntry_Register(13960); return; } function _OnFree_258() { var label = 0, sp = 0; sp = STACKTOP; _FreeFontBitmap(); HEAP32[445683] = 0; return; } function _OnReset_259() { var label = 0, sp = 0; sp = STACKTOP; _memset(((1781708)|0),0,1024)|0; _InitHexEncodedColor(48,0); _InitHexEncodedColor(49,1); _InitHexEncodedColor(50,2); _InitHexEncodedColor(51,3); _InitHexEncodedColor(52,4); _InitHexEncodedColor(53,5); _InitHexEncodedColor(54,6); _InitHexEncodedColor(55,7); _InitHexEncodedColor(56,8); _InitHexEncodedColor(57,9); _InitHexEncodedColor(97,10); _InitHexEncodedColor(65,10); _InitHexEncodedColor(98,11); _InitHexEncodedColor(66,11); _InitHexEncodedColor(99,12); _InitHexEncodedColor(67,12); _InitHexEncodedColor(100,13); _InitHexEncodedColor(68,13); _InitHexEncodedColor(101,14); _InitHexEncodedColor(69,14); _InitHexEncodedColor(102,15); _InitHexEncodedColor(70,15); return; } function _InitHexEncodedColor($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (2)?($1 >>> 2):($1); $3 = $2 & 1; $4 = (0 - ($3))|0; $5 = $4 & 191; $6 = (3)?($1 >> 3):($1); $7 = $6 << 6; $8 = (($5) + ($7))|0; $9 = $8 & 255; $10 = (1)?($1 >>> 1):($1); $11 = $10 & 1; $12 = (0 - ($11))|0; $13 = $12 & 191; $14 = (($13) + ($7))|0; $15 = $14 << 8; $16 = $15 & 65280; $17 = $1 & 1; $18 = (0 - ($17))|0; $19 = $18 & 191; $20 = (($19) + ($7))|0; $21 = $20 << 16; $22 = $21 | $9; $23 = $22 | $16; $24 = $23 | -16777216; $25 = (1781708 + ($0<<2)|0); HEAP32[$25>>2] = $24; return; } function _FreeFontBitmap() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; _memset((166256|0),0,1024)|0; $0 = HEAP32[445683]|0; _Mem_Free($0); return; } function _DefaultPngProcess($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_Png_Decode($2,$0)|0); $4 = ($3|0)==(0); if (!($4)) { _Logger_SysWarn2($3,44275,$1); $5 = HEAP32[$2>>2]|0; _Mem_Free($5); STACKTOP = sp;return; } $6 = (_Font_SetBitmapAtlas($2)|0); $7 = ($6<<24>>24)==(0); if ($7) { $8 = HEAP32[$2>>2]|0; _Mem_Free($8); STACKTOP = sp;return; } else { _Event_RaiseVoid(1796648); STACKTOP = sp;return; } } function _Font_SetBitmapAtlas($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 8|0); $4 = HEAP32[$3>>2]|0; $5 = ($2|0)==($4|0); if (!($5)) { $6 = HEAP32[3701]|0; FUNCTION_TABLE_vi[$6 & 511](13972); $$0 = 0; return ($$0|0); } $7 = ($2|0)<(16); if ($7) { $8 = HEAP32[3701]|0; FUNCTION_TABLE_vi[$8 & 511](13980); $$0 = 0; return ($$0|0); } $9 = (_Math_IsPowOf2($2)|0); $10 = ($9<<24>>24)==(0); if ($10) { $11 = HEAP32[3701]|0; FUNCTION_TABLE_vi[$11 & 511](13988); $$0 = 0; return ($$0|0); } else { _FreeFontBitmap(); ;HEAP32[1782732>>2]=HEAP32[$0>>2]|0;HEAP32[1782732+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[1782732+8>>2]=HEAP32[$0+8>>2]|0; $12 = HEAP32[$1>>2]|0; $13 = (4)?($12 >> 4):($12); HEAP32[3499] = $13; _CalculateTextWidths(); $$0 = 1; return ($$0|0); } } function _CalculateTextWidths() { var $$$034$in = 0, $$03440 = 0, $$03440$in = 0, $$03544 = 0, $$03641 = 0, $$042 = 0, $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1782736)>>2]|0; $1 = HEAP32[(1782740)>>2]|0; $2 = ($1|0)>(0); $3 = HEAP32[3499]|0; if (!($2)) { $$lcssa = $3; $25 = (($$lcssa|0) / 4)&-1; HEAP32[(166384)>>2] = $25; return; } $4 = HEAP32[445683]|0; $5 = ($0|0)>(0); $6 = HEAP32[3499]|0; $$03544 = 0;$10 = $3; while(1) { $7 = Math_imul($$03544, $0)|0; $8 = (($4) + ($7<<2)|0); if ($5) { $9 = (($$03544|0) / ($10|0))&-1; $11 = $9 << 4; $12 = ($10|0)>(0); $$03641 = 0;$$042 = $11; while(1) { L10: do { if ($12) { $$03440$in = $10; while(1) { $$03440 = (($$03440$in) + -1)|0; $14 = (($$03440) + ($$03641))|0; $15 = (($8) + ($14<<2)|0); $16 = HEAP32[$15>>2]|0; $17 = ($16>>>0)>(16777215); if ($17) { break; } $13 = ($$03440$in|0)>(1); if ($13) { $$03440$in = $$03440; } else { break L10; } } $18 = (166256 + ($$042<<2)|0); $19 = HEAP32[$18>>2]|0; $20 = ($19|0)>($$03440$in|0); $$$034$in = $20 ? $19 : $$03440$in; HEAP32[$18>>2] = $$$034$in; } } while(0); $21 = (($$03641) + ($10))|0; $22 = (($$042) + 1)|0; $23 = ($21|0)<($0|0); if ($23) { $$03641 = $21;$$042 = $22; } else { break; } } } $24 = (($$03544) + 1)|0; $exitcond = ($24|0)==($1|0); if ($exitcond) { $$lcssa = $6; break; } else { $$03544 = $24;$10 = $6; } } $25 = (($$lcssa|0) / 4)&-1; HEAP32[(166384)>>2] = $25; return; } function _DrawTextArgs_Make($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = $1; $5 = $4; $6 = HEAP32[$5>>2]|0; $7 = (($4) + 4)|0; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = $0; $11 = $10; HEAP32[$11>>2] = $6; $12 = (($10) + 4)|0; $13 = $12; HEAP32[$13>>2] = $9; $14 = ((($0)) + 8|0); HEAP32[$14>>2] = $2; $15 = ((($0)) + 12|0); HEAP8[$15>>0] = $3; return; } function _DrawTextArgs_MakeEmpty($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = 1949280; $4 = $3; $5 = HEAP32[$4>>2]|0; $6 = (($3) + 4)|0; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = $0; $10 = $9; HEAP32[$10>>2] = $5; $11 = (($9) + 4)|0; $12 = $11; HEAP32[$12>>2] = $8; $13 = ((($0)) + 8|0); HEAP32[$13>>2] = $1; $14 = ((($0)) + 12|0); HEAP8[$14>>0] = $2; return; } function _Font_SetDefault($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _String_Copy(13952,$0); _Event_RaiseVoid(1796648); return; } function _Font_MakeBitmapped($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_Display_ScaleY($1)|0); HEAP32[$0>>2] = 0; $4 = $3&65535; $5 = ((($0)) + 4|0); HEAP16[$5>>1] = $4; $6 = $2&65535; $7 = ((($0)) + 6|0); HEAP16[$7>>1] = $6; $8 = (_Drawer2D_AdjHeight($3)|0); $9 = ((($0)) + 8|0); HEAP32[$9>>2] = $8; return; } function _Drawer2D_AdjHeight($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0*3)|0; $2 = (_Math_CeilDiv($1,2)|0); return ($2|0); } function _Font_Make($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP8[1781704]|0; $4 = ($3<<24>>24)==(0); if ($4) { _SysFont_MakeDefault($0,$1,$2); return; } else { _Font_MakeBitmapped($0,$1,$2); return; } } function _SysFont_MakeDefault($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_SysFonts_UNSAFE_GetDefault()|0); (_SysFont_Make($0,$3,$1,$2)|0); return; } function _SysFonts_UNSAFE_GetDefault() { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP16[(13956)>>1]|0; $1 = ($0<<16>>16)==(0); $2 = $1 ? 14000 : 13952; return ($2|0); } function _SysFont_Make($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = $2&65535; $5 = ((($0)) + 4|0); HEAP16[$5>>1] = $4; $6 = $3&65535; $7 = ((($0)) + 6|0); HEAP16[$7>>1] = $6; $8 = (_Drawer2D_AdjHeight($2)|0); $9 = ((($0)) + 8|0); HEAP32[$9>>2] = $8; $10 = ((($1)) + 4|0); $11 = HEAP16[$10>>1]|0; $12 = $11&65535; $13 = (($12) + 1)|0; $14 = (_Mem_TryAlloc($13,1)|0); HEAP32[$0>>2] = $14; $15 = ($14|0)==(0|0); if ($15) { $$0 = -857812988; return ($$0|0); } $16 = HEAP16[$10>>1]|0; $17 = $16&65535; $18 = (($17) + 1)|0; _String_CopyToRaw($14,$18,$1); $$0 = 0; return ($$0|0); } function _Font_SetPadding($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[$0>>2]|0; $3 = ($2|0)==(0|0); if (!($3)) { return; } $4 = ((($0)) + 4|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; $7 = (_Display_ScaleY($1)|0); $8 = $7 << 1; $9 = (($8) + ($6))|0; $10 = ((($0)) + 8|0); HEAP32[$10>>2] = $9; return; } function _Drawer2D_Clamp($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$ = 0, $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $5 = HEAP32[$1>>2]|0; $6 = ((($0)) + 12|0); $7 = HEAP32[$6>>2]|0; $8 = ($5|0)<($7|0); if (!($8)) { $$0 = 0; return ($$0|0); } $9 = HEAP32[$2>>2]|0; $10 = ((($0)) + 16|0); $11 = HEAP32[$10>>2]|0; $12 = ($9|0)<($11|0); if (!($12)) { $$0 = 0; return ($$0|0); } $13 = ($5|0)<(0); if ($13) { $14 = HEAP32[$3>>2]|0; $15 = (($14) + ($5))|0; HEAP32[$3>>2] = $15; HEAP32[$1>>2] = 0; } $16 = HEAP32[$2>>2]|0; $17 = ($16|0)<(0); if ($17) { $18 = HEAP32[$4>>2]|0; $19 = (($18) + ($16))|0; HEAP32[$4>>2] = $19; HEAP32[$2>>2] = 0; } $20 = HEAP32[$1>>2]|0; $21 = HEAP32[$3>>2]|0; $22 = (($21) + ($20))|0; $23 = HEAP32[$6>>2]|0; $24 = ($22|0)<($23|0); $$ = $24 ? $22 : $23; $25 = (($$) - ($20))|0; HEAP32[$3>>2] = $25; $26 = HEAP32[$2>>2]|0; $27 = HEAP32[$4>>2]|0; $28 = (($27) + ($26))|0; $29 = HEAP32[$10>>2]|0; $30 = ($28|0)<($29|0); $31 = $30 ? $28 : $29; $32 = (($31) - ($26))|0; HEAP32[$4>>2] = $32; $33 = HEAP32[$3>>2]|0; $34 = ($33|0)>(0); $35 = ($32|0)>(0); $narrow = $34 & $35; $36 = $narrow&1; $$0 = $36; return ($$0|0); } function _Context2D_Alloc($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 12|0); HEAP32[$3>>2] = $1; $4 = ((($0)) + 16|0); HEAP32[$4>>2] = $2; $5 = ((($0)) + 20|0); HEAP32[$5>>2] = 0; $6 = (_Math_NextPowOf2($1)|0); $7 = (_Math_NextPowOf2($2)|0); $8 = ((($0)) + 4|0); HEAP32[$8>>2] = $6; $9 = ((($0)) + 8|0); HEAP32[$9>>2] = $7; $10 = Math_imul($7, $6)|0; $11 = (_Mem_AllocCleared($10,4,27507)|0); HEAP32[$0>>2] = $11; return; } function _Context2D_Free($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[$0>>2]|0; _Mem_Free($1); return; } function _Context2D_Clear($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$01819 = 0, $$020 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $6 = sp + 12|0; $7 = sp + 8|0; $8 = sp + 4|0; $9 = sp; HEAP32[$6>>2] = $2; HEAP32[$7>>2] = $3; HEAP32[$8>>2] = $4; HEAP32[$9>>2] = $5; $10 = (_Drawer2D_Clamp($0,$6,$7,$8,$9)|0); $11 = ($10<<24>>24)!=(0); $12 = HEAP32[$9>>2]|0; $13 = ($12|0)>(0); $or$cond = $11 & $13; if (!($or$cond)) { STACKTOP = sp;return; } $14 = HEAP32[$0>>2]|0; $15 = HEAP32[$7>>2]|0; $16 = ((($0)) + 4|0); $17 = HEAP32[$6>>2]|0; $18 = HEAP32[$8>>2]|0; $19 = ($18|0)>(0); $20 = HEAP32[$9>>2]|0; $$020 = 0; while(1) { $21 = (($15) + ($$020))|0; $22 = HEAP32[$16>>2]|0; $23 = Math_imul($21, $22)|0; $24 = (($14) + ($23<<2)|0); $25 = (($24) + ($17<<2)|0); if ($19) { $$01819 = 0; while(1) { $26 = (($25) + ($$01819<<2)|0); HEAP32[$26>>2] = $1; $27 = (($$01819) + 1)|0; $exitcond = ($27|0)==($18|0); if ($exitcond) { break; } else { $$01819 = $27; } } } $28 = (($$020) + 1)|0; $29 = ($28|0)<($20|0); if ($29) { $$020 = $28; } else { break; } } STACKTOP = sp;return; } function _Drawer2D_MakeTextTexture($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = HEAP8[(1803128)>>0]|0; $4 = ($3<<24>>24)==(0); if (!($4)) { ;HEAP32[$0>>2]=HEAP32[14008>>2]|0;HEAP32[$0+4>>2]=HEAP32[14008+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[14008+8>>2]|0;HEAP32[$0+12>>2]=HEAP32[14008+12>>2]|0;HEAP32[$0+16>>2]=HEAP32[14008+16>>2]|0;HEAP32[$0+20>>2]=HEAP32[14008+20>>2]|0;HEAP32[$0+24>>2]=HEAP32[14008+24>>2]|0; STACKTOP = sp;return; } $5 = (_Drawer2D_TextWidth($1)|0); $6 = ($5|0)==(0); if ($6) { ;HEAP32[$0>>2]=HEAP32[14008>>2]|0;HEAP32[$0+4>>2]=HEAP32[14008+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[14008+8>>2]|0;HEAP32[$0+12>>2]=HEAP32[14008+12>>2]|0;HEAP32[$0+16>>2]=HEAP32[14008+16>>2]|0;HEAP32[$0+20>>2]=HEAP32[14008+20>>2]|0;HEAP32[$0+24>>2]=HEAP32[14008+24>>2]|0; STACKTOP = sp;return; } else { $7 = (_Drawer2D_TextHeight($1)|0); _Context2D_Alloc($2,$5,$7); _Context2D_DrawText($2,$1,0,0); _Context2D_MakeTexture($0,$2); _Context2D_Free($2); STACKTOP = sp;return; } } function _Drawer2D_TextWidth($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 8|0); $2 = HEAP32[$1>>2]|0; $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0|0); if ($4) { $5 = (_MeasureBitmappedWidth($0)|0); $$0 = $5; return ($$0|0); } else { $6 = (_Font_SysTextWidth($0)|0); $$0 = $6; return ($$0|0); } } function _Drawer2D_TextHeight($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 8|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 12|0); $4 = HEAP8[$3>>0]|0; $5 = (_Font_CalcHeight($2,$4)|0); return ($5|0); } function _Context2D_DrawText($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_Drawer2D_IsEmptyText($1)|0); $5 = ($4<<24>>24)==(0); if (!($5)) { return; } $6 = ((($1)) + 8|0); $7 = HEAP32[$6>>2]|0; $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(0|0); if ($9) { _DrawBitmappedText($0,$1,$2,$3); return; } $10 = ((($1)) + 12|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(0); if (!($12)) { _Font_SysTextDraw($1,$0,$2,$3,1); } _Font_SysTextDraw($1,$0,$2,$3,0); return; } function _Context2D_MakeTexture($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Gfx_RecreateTexture($0,$1,0,0); $2 = ((($1)) + 12|0); $3 = HEAP32[$2>>2]|0; $4 = $3&65535; $5 = ((($0)) + 8|0); HEAP16[$5>>1] = $4; $6 = ((($1)) + 16|0); $7 = HEAP32[$6>>2]|0; $8 = $7&65535; $9 = ((($0)) + 10|0); HEAP16[$9>>1] = $8; $10 = ((($0)) + 12|0); HEAPF32[$10>>2] = 0.0; $11 = ((($0)) + 16|0); HEAPF32[$11>>2] = 0.0; $12 = (+($3|0)); $13 = ((($1)) + 4|0); $14 = HEAP32[$13>>2]|0; $15 = (+($14|0)); $16 = $12 / $15; $17 = ((($0)) + 20|0); HEAPF32[$17>>2] = $16; $18 = (+($7|0)); $19 = ((($1)) + 8|0); $20 = HEAP32[$19>>2]|0; $21 = (+($20|0)); $22 = $18 / $21; $23 = ((($0)) + 24|0); HEAPF32[$23>>2] = $22; return; } function _Drawer2D_IsEmptyText($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; $2 = sp + 8|0; $3 = sp + 16|0; $4 = $0; $5 = $4; $6 = HEAP32[$5>>2]|0; $7 = (($4) + 4)|0; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = $1; $11 = $10; HEAP32[$11>>2] = $6; $12 = (($10) + 4)|0; $13 = $12; HEAP32[$13>>2] = $9; $14 = ((($2)) + 4|0); $15 = (_Drawer2D_UNSAFE_NextPart($1,$2,$3)|0); $16 = ($15<<24>>24)==(0); if ($16) { $$0 = 1; STACKTOP = sp;return ($$0|0); } while(1) { $19 = HEAP16[$14>>1]|0; $20 = ($19<<16>>16)==(0); if (!($20)) { $$0 = 0; label = 5; break; } $17 = (_Drawer2D_UNSAFE_NextPart($1,$2,$3)|0); $18 = ($17<<24>>24)==(0); if ($18) { $$0 = 1; label = 5; break; } } if ((label|0) == 5) { STACKTOP = sp;return ($$0|0); } return (0)|0; } function _DrawBitmappedText($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($1)) + 8|0); $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 4|0); $7 = HEAP16[$6>>1]|0; $8 = (3)?(($7&65535) >>> 3):(($7&65535)); $9 = $8&65535; $10 = ((($1)) + 12|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(0); if ($12) { _DrawBitmappedTextCore($0,$1,$2,$3,0); return; } $13 = (($9) + ($3))|0; $14 = (($9) + ($2))|0; _DrawBitmappedTextCore($0,$1,$14,$13,1); _DrawBitmappedTextCore($0,$1,$2,$3,0); return; } function _Font_SysTextDraw($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$026 = 0, $$027 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 640|0; $5 = sp + 600|0; $6 = sp + 616|0; $7 = sp + 631|0; $8 = sp + 624|0; $9 = sp + 608|0; $10 = sp; $11 = ((($0)) + 8|0); $12 = HEAP32[$11>>2]|0; $13 = $0; $14 = $13; $15 = HEAP32[$14>>2]|0; $16 = (($13) + 4)|0; $17 = $16; $18 = HEAP32[$17>>2]|0; $19 = $5; $20 = $19; HEAP32[$20>>2] = $15; $21 = (($19) + 4)|0; $22 = $21; HEAP32[$22>>2] = $18; HEAP8[$7>>0] = 102; $23 = ((($12)) + 8|0); $24 = HEAP32[$23>>2]|0; $25 = ((($12)) + 4|0); $26 = HEAP16[$25>>1]|0; $27 = $26&65535; $28 = (($24) - ($27))|0; $29 = (($28|0) / 2)&-1; $30 = (($29) + ($3))|0; $31 = HEAP32[$12>>2]|0; $32 = ((($12)) + 6|0); $33 = HEAP16[$32>>1]|0; $34 = $33&65535; _interop_SetFont(($31|0),($27|0),($34|0)); $35 = (_Drawer2D_UNSAFE_NextPart($5,$6,$7)|0); $36 = ($35<<24>>24)==(0); if ($36) { STACKTOP = sp;return; } $37 = ($4<<24>>24)==(0); $38 = ((($9)) + 4|0); $39 = ((($9)) + 6|0); $$027 = 0.0; while(1) { $40 = (_Platform_EncodeUtf8($10,$6)|0); $41 = HEAP8[$7>>0]|0; $42 = $41&255; $43 = (1781708 + ($42<<2)|0); $44 = HEAP32[$43>>2]|0; if ($37) { $$026 = $44; } else { $45 = (_GetShadowColor($44)|0); $$026 = $45; } HEAP32[$9>>2] = $8; HEAP16[$38>>1] = 0; HEAP16[$39>>1] = 7; _String_Append($9,35); $46 = $$026&255; _String_AppendHex($9,$46); $47 = (8)?($$026 >>> 8):($$026); $48 = $47&255; _String_AppendHex($9,$48); $49 = (16)?($$026 >>> 16):($$026); $50 = $49&255; _String_AppendHex($9,$50); $51 = (~~(($$027))); $52 = (($51) + ($2))|0; $53 = (+_interop_TextDraw(($10|0),($40|0),($1|0),($52|0),($30|0),($4|0),($8|0))); $54 = $$027 + $53; $55 = (_Drawer2D_UNSAFE_NextPart($5,$6,$7)|0); $56 = ($55<<24>>24)==(0); if ($56) { break; } else { $$027 = $54; } } STACKTOP = sp;return; } function _Drawer2D_UNSAFE_NextPart($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0$lcssa = 0, $$028 = 0, $$pr = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = ($4&65535)>(1); do { if ($5) { $6 = HEAP32[$0>>2]|0; $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(38); if ($8) { $9 = ((($6)) + 1|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = (1781708 + ($11<<2)|0); $13 = HEAP32[$12>>2]|0; $14 = ($13>>>0)>(16777215); if ($14) { HEAP8[$2>>0] = $10; $15 = HEAP32[$0>>2]|0; $16 = ((($15)) + 2|0); HEAP32[$0>>2] = $16; $17 = HEAP16[$3>>1]|0; $18 = $17&65535; $19 = (($18) + 65534)|0; $20 = $19&65535; HEAP16[$3>>1] = $20; $21 = $20; break; } } $$pr = HEAP16[$3>>1]|0; $21 = $$pr; } else { $21 = $4; } } while(0); $22 = ($21<<16>>16)==(0); L8: do { if ($22) { $$0$lcssa = 0; } else { $23 = HEAP32[$0>>2]|0; $$028 = 0; while(1) { $24 = (($23) + ($$028)|0); $25 = HEAP8[$24>>0]|0; $26 = ($25<<24>>24)==(38); if ($26) { $27 = (($$028) + 1)|0; $28 = (_Drawer2D_ValidColorCodeAt($0,$27)|0); $29 = ($28<<24>>24)==(0); if (!($29)) { $$0$lcssa = $$028; break L8; } } $30 = (($$028) + 1)|0; $31 = HEAP16[$3>>1]|0; $32 = $31&65535; $33 = ($30>>>0)<($32>>>0); if ($33) { $$028 = $30; } else { $$0$lcssa = $30; break; } } } } while(0); $34 = HEAP32[$0>>2]|0; HEAP32[$1>>2] = $34; $35 = $$0$lcssa&65535; $36 = ((($1)) + 4|0); HEAP16[$36>>1] = $35; $37 = HEAP32[$0>>2]|0; $38 = (($37) + ($$0$lcssa)|0); HEAP32[$0>>2] = $38; $39 = HEAP16[$3>>1]|0; $40 = $39&65535; $41 = (($40) - ($$0$lcssa))|0; $42 = $41&65535; HEAP16[$3>>1] = $42; $43 = HEAP16[$36>>1]|0; $44 = ($43<<16>>16)!=(0); $45 = $41 & 65535; $46 = ($45|0)!=(0); $narrow = $44 | $46; $47 = $narrow&1; return ($47|0); } function _GetShadowColor($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1781705)>>0]|0; $2 = ($1<<24>>24)==(0); $3 = $0 & -16777216; $4 = (2)?($0 >>> 2):($0); $5 = $4 & 4144959; $6 = $5 | $3; $spec$select = $2 ? $6 : -16777216; return ($spec$select|0); } function _Drawer2D_ValidColorCodeAt($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = $3&65535; $5 = ($4|0)>($1|0); if (!($5)) { $$0 = 0; return ($$0|0); } $6 = HEAP32[$0>>2]|0; $7 = (($6) + ($1)|0); $8 = HEAP8[$7>>0]|0; $9 = $8&255; $10 = (1781708 + ($9<<2)|0); $11 = HEAP32[$10>>2]|0; $12 = ($11>>>0)>(16777215); $13 = $12&1; $$0 = $13; return ($$0|0); } function _DrawBitmappedTextCore($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$0147 = 0, $$0151182 = 0, $$0155$lcssa = 0, $$0155181 = 0, $$0157$lcssa = 0, $$0157161 = 0, $$0158170 = 0, $$0159177 = 0, $$1148183 = 0, $$1152 = 0, $$1156 = 0, $$1173 = 0, $$2153172 = 0, $$3150 = 0, $$3154167 = 0, $$3168 = 0, $$4$lcssa = 0, $$4162 = 0, $10 = 0, $100 = 0; var $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0; var $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0; var $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0; var $156 = 0, $157 = 0, $158 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0; var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0; var $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0; var $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0; var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond188 = 0, $exitcond189 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 1808|0; $5 = sp + 1792|0; $6 = sp + 1536|0; $7 = sp + 512|0; $8 = sp; $9 = $1; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = (($9) + 4)|0; $13 = $12; $14 = HEAP32[$13>>2]|0; $15 = $5; $16 = $15; HEAP32[$16>>2] = $11; $17 = (($15) + 4)|0; $18 = $17; HEAP32[$18>>2] = $14; $19 = ((($1)) + 8|0); $20 = HEAP32[$19>>2]|0; $21 = ((($20)) + 4|0); $22 = HEAP16[$21>>1]|0; $23 = $22&65535; $24 = HEAP32[(1782116)>>2]|0; $25 = ($4<<24>>24)!=(0); if ($25) { $26 = (_GetShadowColor($24)|0); $$0147 = $26; } else { $$0147 = $24; } $27 = ((($5)) + 4|0); $28 = HEAP16[$27>>1]|0; $29 = ($28<<16>>16)==(0); if ($29) { $$0155$lcssa = 0; } else { $$0151182 = 0;$$0155181 = 0;$$1148183 = $$0147; while(1) { $30 = HEAP32[$5>>2]|0; $31 = (($30) + ($$0151182)|0); $32 = HEAP8[$31>>0]|0; $33 = ($32<<24>>24)==(38); if ($33) { $34 = (($$0151182) + 1)|0; $35 = (_Drawer2D_ValidColorCodeAt($5,$34)|0); $36 = ($35<<24>>24)==(0); if ($36) { label = 9; } else { $37 = (($30) + ($34)|0); $38 = HEAP8[$37>>0]|0; $39 = $38&255; $40 = (1781708 + ($39<<2)|0); $41 = HEAP32[$40>>2]|0; if ($25) { $42 = (_GetShadowColor($41)|0); $$1152 = $34;$$1156 = $$0155181;$$3150 = $42; } else { $$1152 = $34;$$1156 = $$0155181;$$3150 = $41; } } } else { label = 9; } if ((label|0) == 9) { label = 0; $43 = (($6) + ($$0155181)|0); HEAP8[$43>>0] = $32; $44 = (($7) + ($$0155181<<2)|0); HEAP32[$44>>2] = $$1148183; $45 = (_Drawer2D_Width($23,$32)|0); $46 = $45&65535; $47 = (($8) + ($$0155181<<1)|0); HEAP16[$47>>1] = $46; $48 = (($$0155181) + 1)|0; $$1152 = $$0151182;$$1156 = $48;$$3150 = $$1148183; } $49 = (($$1152) + 1)|0; $50 = HEAP16[$27>>1]|0; $51 = $50&65535; $52 = ($49|0)<($51|0); if ($52) { $$0151182 = $49;$$0155181 = $$1156;$$1148183 = $$3150; } else { $$0155$lcssa = $$1156; break; } } } $53 = HEAP32[$19>>2]|0; $54 = ((($53)) + 8|0); $55 = HEAP32[$54>>2]|0; $56 = (($55) - ($23))|0; $57 = (($56|0) / 2)&-1; $58 = (($57) + ($3))|0; $59 = (_Math_CeilDiv($23,8)|0); $60 = ($22<<16>>16)==(0); if (!($60)) { $61 = ((($0)) + 8|0); $62 = HEAP32[3499]|0; $63 = ((($0)) + 4|0); $64 = ($$0155$lcssa|0)>(0); $65 = HEAP32[445683]|0; $$0159177 = 0; while(1) { $66 = (($$0159177) + ($58))|0; $67 = HEAP32[$61>>2]|0; $68 = ($66>>>0)<($67>>>0); if ($68) { $69 = Math_imul($62, $$0159177)|0; $70 = (($69|0) / ($23|0))&-1; $71 = HEAP32[$0>>2]|0; $72 = HEAP32[$63>>2]|0; $73 = Math_imul($72, $66)|0; $74 = (($71) + ($73<<2)|0); if ($64) { $$1173 = $2;$$2153172 = 0; while(1) { $75 = (($6) + ($$2153172)|0); $76 = HEAP8[$75>>0]|0; $77 = $76&255; $78 = $77 & 15; $79 = Math_imul($78, $62)|0; $80 = (4)?($77 >>> 4):($77); $81 = Math_imul($80, $62)|0; $82 = (($81) + ($70))|0; $83 = HEAP32[(1782736)>>2]|0; $84 = Math_imul($82, $83)|0; $85 = (($65) + ($84<<2)|0); $86 = (166256 + ($77<<2)|0); $87 = HEAP32[$86>>2]|0; $88 = (($8) + ($$2153172<<1)|0); $89 = HEAP16[$88>>1]|0; $90 = $89&65535; $91 = (($7) + ($$2153172<<2)|0); $92 = HEAP32[$91>>2]|0; $93 = ($89<<16>>16)==(0); if (!($93)) { $94 = $92 & 255; $95 = (8)?($92 >>> 8):($92); $96 = $95 & 255; $97 = (16)?($92 >>> 16):($92); $98 = $97 & 255; $$0158170 = 0; while(1) { $99 = Math_imul($$0158170, $87)|0; $100 = (($99|0) / ($90|0))&-1; $101 = (($100) + ($79))|0; $102 = (($85) + ($101<<2)|0); $103 = HEAP32[$102>>2]|0; $104 = ($103>>>0)<(16777216); if (!($104)) { $105 = (($$0158170) + ($$1173))|0; $106 = HEAP32[$63>>2]|0; $107 = ($105>>>0)<($106>>>0); if ($107) { $108 = $103 & 255; $109 = Math_imul($108, $94)|0; $110 = (($109>>>0) / 255)&-1; $111 = $110 & 255; $112 = (8)?($103 >>> 8):($103); $113 = $112 & 255; $114 = Math_imul($113, $96)|0; $115 = (($114>>>0) / 255)&-1; $116 = $115 << 8; $117 = $116 & 65280; $118 = (16)?($103 >>> 16):($103); $119 = $118 & 255; $120 = Math_imul($119, $98)|0; $121 = (($120>>>0) / 255)&-1; $122 = $121 << 16; $123 = $122 & 16711680; $124 = $103 & -16777216; $125 = $111 | $124; $126 = $125 | $117; $127 = $126 | $123; $128 = (($74) + ($105<<2)|0); HEAP32[$128>>2] = $127; } } $129 = (($$0158170) + 1)|0; $exitcond = ($129|0)==($90|0); if ($exitcond) { break; } else { $$0158170 = $129; } } } $130 = (($$1173) + ($59))|0; $131 = (($130) + ($90))|0; $132 = (($$2153172) + 1)|0; $exitcond188 = ($132|0)==($$0155$lcssa|0); if ($exitcond188) { break; } else { $$1173 = $131;$$2153172 = $132; } } } } $133 = (($$0159177) + 1)|0; $exitcond189 = ($133|0)==($23|0); if ($exitcond189) { break; } else { $$0159177 = $133; } } } $134 = HEAP32[$19>>2]|0; $135 = ((($134)) + 6|0); $136 = HEAP16[$135>>1]|0; $137 = $136 & 2; $138 = ($137<<16>>16)==(0); if ($138) { STACKTOP = sp;return; } $139 = ($23*7)|0; $140 = (3)?($139 >>> 3):($139); $141 = (($58) + ($140))|0; $142 = (($23) - ($140))|0; $143 = ($$0155$lcssa|0)>(0); if (!($143)) { STACKTOP = sp;return; } $$3154167 = 0;$$3168 = $2; while(1) { $144 = (($7) + ($$3154167<<2)|0); $145 = HEAP32[$144>>2]|0; $146 = ($$3154167|0)<($$0155$lcssa|0); L44: do { if ($146) { $$0157161 = 0;$$4162 = $$3154167; while(1) { $147 = (($7) + ($$4162<<2)|0); $148 = HEAP32[$147>>2]|0; $149 = ($145|0)==($148|0); if (!($149)) { $$0157$lcssa = $$0157161;$$4$lcssa = $$4162; break L44; } $150 = (($8) + ($$4162<<1)|0); $151 = HEAP16[$150>>1]|0; $152 = $151&65535; $153 = (($$0157161) + ($59))|0; $154 = (($153) + ($152))|0; $155 = (($$4162) + 1)|0; $156 = ($155|0)<($$0155$lcssa|0); if ($156) { $$0157161 = $154;$$4162 = $155; } else { $$0157$lcssa = $154;$$4$lcssa = $155; break; } } } else { $$0157$lcssa = 0;$$4$lcssa = $$3154167; } } while(0); _Drawer2D_Underline($0,$$3168,$141,$$0157$lcssa,$142,$145); $157 = (($$0157$lcssa) + ($$3168))|0; $158 = ($$4$lcssa|0)<($$0155$lcssa|0); if ($158) { $$3154167 = $$4$lcssa;$$3168 = $157; } else { break; } } STACKTOP = sp;return; } function _Drawer2D_Width($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $1&255; $3 = (166256 + ($2<<2)|0); $4 = HEAP32[$3>>2]|0; $5 = Math_imul($4, $0)|0; $6 = HEAP32[3499]|0; $7 = (_Math_CeilDiv($5,$6)|0); return ($7|0); } function _Drawer2D_Underline($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$02425 = 0, $$027 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $6 = ((($0)) + 8|0); $7 = (($4) + ($2))|0; $8 = ($4|0)>(0); if (!($8)) { return; } $9 = ((($0)) + 4|0); $10 = (($3) + ($1))|0; $11 = ($3|0)>(0); $$027 = $2; while(1) { $12 = HEAP32[$6>>2]|0; $13 = ($$027|0)<($12|0); if (!($13)) { label = 9; break; } $14 = HEAP32[$0>>2]|0; $15 = HEAP32[$9>>2]|0; $16 = Math_imul($15, $$027)|0; $17 = (($14) + ($16<<2)|0); L7: do { if ($11) { $$02425 = $1; while(1) { $18 = HEAP32[$9>>2]|0; $19 = ($$02425|0)<($18|0); if (!($19)) { break L7; } $20 = (($17) + ($$02425<<2)|0); HEAP32[$20>>2] = $5; $21 = (($$02425) + 1)|0; $22 = ($21|0)<($10|0); if ($22) { $$02425 = $21; } else { break; } } } } while(0); $23 = (($$027) + 1)|0; $24 = ($23|0)<($7|0); if ($24) { $$027 = $23; } else { label = 9; break; } } if ((label|0) == 9) { return; } } function _Font_CalcHeight($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = HEAP32[$0>>2]|0; $5 = ($4|0)==(0|0); $6 = ($1<<24>>24)!=(0); if (!($5)) { $12 = (($3) + 2)|0; $spec$select = $6 ? $12 : $3; return ($spec$select|0); } if (!($6)) { $$0 = $3; return ($$0|0); } $7 = ((($0)) + 4|0); $8 = HEAP16[$7>>1]|0; $9 = (3)?(($8&65535) >>> 3):(($8&65535)); $10 = $9&65535; $11 = (($3) + ($10))|0; $$0 = $11; return ($$0|0); } function _MeasureBitmappedWidth($0) { $0 = $0|0; var $$029 = 0, $$03034 = 0, $$03133 = 0, $$1 = 0, $$132 = 0, $$3 = 0, $$neg = 0, $$op = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = ((($3)) + 4|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; $7 = (_Math_CeilDiv($6,8)|0); $8 = $0; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = (($8) + 4)|0; $12 = $11; $13 = HEAP32[$12>>2]|0; $14 = $1; $15 = $14; HEAP32[$15>>2] = $10; $16 = (($14) + 4)|0; $17 = $16; HEAP32[$17>>2] = $13; $18 = ((($1)) + 4|0); $19 = HEAP16[$18>>1]|0; $20 = ($19<<16>>16)==(0); if ($20) { $$029 = 0; STACKTOP = sp;return ($$029|0); } $$03034 = 0;$$03133 = 0; while(1) { $21 = HEAP32[$1>>2]|0; $22 = (($21) + ($$03133)|0); $23 = HEAP8[$22>>0]|0; $24 = ($23<<24>>24)==(38); if ($24) { $25 = (($$03133) + 1)|0; $26 = (_Drawer2D_ValidColorCodeAt($1,$25)|0); $27 = ($26<<24>>24)==(0); if ($27) { label = 5; } else { $$1 = $$03034;$$132 = $25; } } else { label = 5; } if ((label|0) == 5) { label = 0; $28 = (_Drawer2D_Width($6,$23)|0); $29 = (($$03034) + ($7))|0; $30 = (($29) + ($28))|0; $$1 = $30;$$132 = $$03133; } $31 = (($$132) + 1)|0; $32 = HEAP16[$18>>1]|0; $33 = $32&65535; $34 = ($31|0)<($33|0); if ($34) { $$03034 = $$1;$$03133 = $31; } else { break; } } $35 = ($$1|0)==(0); if ($35) { $$029 = 0; STACKTOP = sp;return ($$029|0); } $36 = HEAP32[$2>>2]|0; $37 = ((($36)) + 6|0); $38 = HEAP16[$37>>1]|0; $39 = $38 & 4; $40 = ($39<<16>>16)==(0); $$op = (0 - ($7))|0; $$neg = $40 ? $$op : 0; $spec$select = (($$neg) + ($$1))|0; $41 = ((($0)) + 12|0); $42 = HEAP8[$41>>0]|0; $43 = ($42<<24>>24)==(0); $44 = (3)?($6 >>> 3):($6); $45 = $43 ? 0 : $44; $$3 = (($spec$select) + ($45))|0; $$029 = $$3; STACKTOP = sp;return ($$029|0); } function _Font_SysTextWidth($0) { $0 = $0|0; var $$0$lcssa = 0.0, $$012 = 0.0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 624|0; $1 = sp + 600|0; $2 = sp + 608|0; $3 = sp + 616|0; $4 = sp; $5 = ((($0)) + 8|0); $6 = HEAP32[$5>>2]|0; $7 = $0; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = (($7) + 4)|0; $11 = $10; $12 = HEAP32[$11>>2]|0; $13 = $1; $14 = $13; HEAP32[$14>>2] = $9; $15 = (($13) + 4)|0; $16 = $15; HEAP32[$16>>2] = $12; $17 = HEAP32[$6>>2]|0; $18 = ((($6)) + 4|0); $19 = HEAP16[$18>>1]|0; $20 = $19&65535; $21 = ((($6)) + 6|0); $22 = HEAP16[$21>>1]|0; $23 = $22&65535; _interop_SetFont(($17|0),($20|0),($23|0)); $24 = (_Drawer2D_UNSAFE_NextPart($1,$2,$3)|0); $25 = ($24<<24>>24)==(0); if ($25) { $$0$lcssa = 0.0; $31 = (_Math_Ceil($$0$lcssa)|0); STACKTOP = sp;return ($31|0); } $$012 = 0.0; while(1) { $26 = (_Platform_EncodeUtf8($4,$2)|0); $27 = (+_interop_TextWidth(($4|0),($26|0))); $28 = $$012 + $27; $29 = (_Drawer2D_UNSAFE_NextPart($1,$2,$3)|0); $30 = ($29<<24>>24)==(0); if ($30) { break; } else { $$012 = $28; } } $phitmp = $28; $$0$lcssa = $phitmp; $31 = (_Math_Ceil($$0$lcssa)|0); STACKTOP = sp;return ($31|0); } function _Drawer2D_WithoutColors($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = sp + 8|0; $4 = sp + 16|0; $5 = $1; $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = (($5) + 4)|0; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = $2; $12 = $11; HEAP32[$12>>2] = $7; $13 = (($11) + 4)|0; $14 = $13; HEAP32[$14>>2] = $10; $15 = (_Drawer2D_UNSAFE_NextPart($2,$3,$4)|0); $16 = ($15<<24>>24)==(0); if ($16) { STACKTOP = sp;return; } while(1) { _String_AppendString($0,$3); $17 = (_Drawer2D_UNSAFE_NextPart($2,$3,$4)|0); $18 = ($17<<24>>24)==(0); if ($18) { break; } } STACKTOP = sp;return; } function _Drawer2D_LastColor($0,$1) { $0 = $0|0; $1 = $1|0; var $$014 = 0, $$016 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0; var label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = $3&65535; $5 = ($4|0)>($1|0); $6 = (($4) + -1)|0; $spec$select = $5 ? $1 : $6; $7 = ($spec$select|0)>(-1); if (!($7)) { $$014 = 0; return ($$014|0); } $8 = HEAP32[$0>>2]|0; $$016 = $spec$select; while(1) { $9 = (($8) + ($$016)|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==(38); if ($11) { $12 = (($$016) + 1)|0; $13 = (_Drawer2D_ValidColorCodeAt($0,$12)|0); $14 = ($13<<24>>24)==(0); if (!($14)) { break; } } $17 = (($$016) + -1)|0; $18 = ($$016|0)>(0); if ($18) { $$016 = $17; } else { $$014 = 0; label = 7; break; } } if ((label|0) == 7) { return ($$014|0); } $15 = (($8) + ($12)|0); $16 = HEAP8[$15>>0]|0; $$014 = $16; return ($$014|0); } function _Drawer2D_IsWhiteColor($0) { $0 = $0|0; var $1 = 0, $2 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; switch ($0<<24>>24) { case 102: case 0: { $2 = 1; break; } default: { $1 = ($0<<24>>24)==(70); $phitmp = $1&1; $2 = $phitmp; } } return ($2|0); } function _Drawer2D_ReducePadding_Tex($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP8[1781704]|0; $4 = ($3<<24>>24)==(0); if ($4) { return; } $5 = ((($0)) + 10|0); $6 = HEAP16[$5>>1]|0; $7 = $6&65535; $8 = (($7) - ($1))|0; $9 = (($8|0) / ($2|0))&-1; $10 = (+($9|0)); $11 = (_Math_NextPowOf2($7)|0); $12 = (+($11|0)); $13 = $10 / $12; $14 = ((($0)) + 16|0); $15 = +HEAPF32[$14>>2]; $16 = $15 + $13; HEAPF32[$14>>2] = $16; $17 = ((($0)) + 24|0); $18 = +HEAPF32[$17>>2]; $19 = $18 - $13; HEAPF32[$17>>2] = $19; $20 = $9 << 1; $21 = HEAP16[$5>>1]|0; $22 = $21&65535; $23 = (($22) - ($20))|0; $24 = $23&65535; HEAP16[$5>>1] = $24; return; } function _Drawer2D_ReducePadding_Height($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP8[1781704]|0; $4 = ($3<<24>>24)==(0); if ($4) { return; } $5 = HEAP32[$0>>2]|0; $6 = (($5) - ($1))|0; $7 = (($6|0) / ($2|0))&-1; $8 = $7 << 1; $9 = (($5) - ($8))|0; HEAP32[$0>>2] = $9; return; } function _SysFonts_GetNames($0) { $0 = $0|0; var $$04 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $$04 = 0; while(1) { $2 = (2736 + ($$04<<2)|0); $3 = HEAP32[$2>>2]|0; _String_FromReadonly($1,$3); _StringsBuffer_Add($0,$1); $4 = (($$04) + 1)|0; $exitcond = ($4|0)==(18); if ($exitcond) { break; } else { $$04 = $4; } } STACKTOP = sp;return; } function _Font_Free($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[$0>>2]|0; _Mem_Free($1); HEAP32[$0>>2] = 0; $2 = ((($0)) + 4|0); HEAP16[$2>>1] = 0; return; } function _Tablist_Init() { var label = 0, sp = 0; sp = STACKTOP; _TabList_Set(-1,14340,14340,1949280,0); return; } function _TabList_Clear() { var label = 0, sp = 0; sp = STACKTOP; _Mem_Set(1784624,0,512); _Mem_Set((1785136),0,256); _StringsBuffer_Clear((1785392)); return; } function _TabList_Set($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $5 = sp + 80|0; $6 = sp + 72|0; $7 = sp + 64|0; $8 = sp + 88|0; $9 = sp; HEAP32[$8>>2] = $9; $10 = ((($8)) + 4|0); HEAP16[$10>>1] = 0; $11 = ((($8)) + 6|0); HEAP16[$11>>1] = 64; _String_AppendColorless($8,$1); $12 = $0&255; $13 = (1784624 + ($12<<1)|0); $14 = HEAP16[$13>>1]|0; $15 = ($14<<16>>16)==(0); if ($15) { $$0 = 1791188; } else { $16 = $14&65535; $17 = (($16) + -3)|0; _StringsBuffer_UNSAFE_Get($5,(1785392),$17); $18 = HEAP16[$13>>1]|0; $19 = $18&65535; $20 = (($19) + -2)|0; _StringsBuffer_UNSAFE_Get($6,(1785392),$20); $21 = HEAP16[$13>>1]|0; $22 = $21&65535; $23 = (($22) + -1)|0; _StringsBuffer_UNSAFE_Get($7,(1785392),$23); $24 = (1785136 + ($12)|0); $25 = HEAP8[$24>>0]|0; $26 = (_String_Equals($8,$5)|0); $27 = ($26|0)==(0); if ($27) { $$0 = (1791448); } else { $28 = (_String_Equals($2,$6)|0); $29 = ($28|0)==(0); if ($29) { $$0 = (1791448); } else { $30 = (_String_Equals($3,$7)|0); $31 = ($30|0)!=(0); $32 = ($25<<24>>24)==($4<<24>>24); $or$cond = $32 & $31; if ($or$cond) { STACKTOP = sp;return; } else { $$0 = (1791448); } } } } _TabList_Delete($0); _StringsBuffer_Add((1785392),$8); _StringsBuffer_Add((1785392),$2); _StringsBuffer_Add((1785392),$3); $33 = HEAP32[(1785400)>>2]|0; $34 = $33&65535; HEAP16[$13>>1] = $34; $35 = (1785136 + ($12)|0); HEAP8[$35>>0] = $4; _Event_RaiseInt($$0,$12); STACKTOP = sp;return; } function _TabList_Delete($0) { $0 = $0|0; var $$013 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&255; $2 = (1784624 + ($1<<1)|0); $3 = HEAP16[$2>>1]|0; $4 = $3&65535; $5 = ($3<<16>>16)==(0); if ($5) { return; } $6 = (($4) + -1)|0; _StringsBuffer_Remove((1785392),$6); $7 = (($4) + -2)|0; _StringsBuffer_Remove((1785392),$7); $8 = (($4) + -3)|0; _StringsBuffer_Remove((1785392),$8); $$013 = 0; while(1) { $9 = (1784624 + ($$013<<1)|0); $10 = HEAP16[$9>>1]|0; $11 = ($10&65535)>($3&65535); if ($11) { $12 = $10&65535; $13 = (($12) + 65533)|0; $14 = $13&65535; HEAP16[$9>>1] = $14; } $15 = (($$013) + 1)|0; $exitcond = ($15|0)==(256); if ($exitcond) { break; } else { $$013 = $15; } } return; } function _Entities_Init() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $spec$store$select = 0, $spec$store$select1 = 0, label = 0, sp = 0; sp = STACKTOP; _Event_Register((1793528),0,314); _Event_Register(1796648,0,315); _Event_Register((1800028),0,1); _Event_Register((1800288),0,108); $0 = (_Options_GetEnum(39650,1,2816,5)|0); $1 = $0&255; $2 = HEAP8[1972839]|0; $3 = ($2<<24>>24)==(0); $spec$store$select = $3 ? $1 : 1; HEAP8[(1783768)>>0] = $spec$store$select; $4 = (_Options_GetEnum(39637,0,2848,4)|0); $5 = $4&255; $6 = HEAP8[1972839]|0; $7 = ($6<<24>>24)==(0); $spec$store$select1 = $7 ? $5 : 0; HEAP8[(1783769)>>0] = $spec$store$select1; HEAP32[(1783764)>>2] = 1783772; _LocalPlayer_Init(); return; } function _Entities_Free() { var $$05 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $$05 = 0; while(1) { $0 = (1782744 + ($$05<<2)|0); $1 = HEAP32[$0>>2]|0; $2 = ($1|0)==(0|0); if (!($2)) { $3 = $$05&255; _Entities_Remove($3); } $4 = (($$05) + 1)|0; $exitcond = ($4|0)==(256); if ($exitcond) { break; } else { $$05 = $4; } } _Gfx_DeleteTexture(1790576); return; } function _LocalPlayer_Reset() { var label = 0, sp = 0; sp = STACKTOP; HEAPF32[(1784296)>>2] = 5.0; HEAPF32[(1783808)>>2] = 0.0; HEAPF32[(1783812)>>2] = 0.0; HEAPF32[(1783816)>>2] = 0.0; _LocalPlayer_ResetJumpVelocity(); return; } function _LocalPlayer_OnNewMap() { var label = 0, sp = 0; sp = STACKTOP; HEAPF32[(1783808)>>2] = 0.0; HEAPF32[(1783812)>>2] = 0.0; HEAPF32[(1783816)>>2] = 0.0; HEAPF32[(1784276)>>2] = 0.0; HEAPF32[(1784280)>>2] = 0.0; HEAPF32[(1784284)>>2] = 0.0; HEAP32[(1784612)>>2] = 0; return; } function _LocalPlayer_ResetJumpVelocity() { var $0 = 0, $1 = 0, $2 = 0.0, $spec$select = 0.0, label = 0, sp = 0; sp = STACKTOP; $0 = (_HacksComp_CanJumpHigher((1784300))|0); $1 = ($0<<24>>24)==(0); $2 = +HEAPF32[(1784596)>>2]; $spec$select = $1 ? 0.41999998688697815 : $2; HEAPF32[(1784592)>>2] = $spec$select; HEAPF32[(1784600)>>2] = $spec$select; return; } function _Entities_Remove($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $1 = $0&255; _Event_RaiseInt((1790928),$1); $2 = (1782744 + ($1<<2)|0); $3 = HEAP32[$2>>2]|0; $4 = HEAP32[$3>>2]|0; $5 = ((($4)) + 4|0); $6 = HEAP32[$5>>2]|0; FUNCTION_TABLE_vi[$6 & 511]($3); HEAP32[$2>>2] = 0; $7 = (3)?($1 >>> 3):($1); $8 = (1790544 + ($7)|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = $1 & 7; $12 = 1 << $11; $13 = $12 & $10; $14 = ($13|0)==(0); if ($14) { return; } _TabList_Remove($0); $15 = $12 ^ 255; $16 = HEAP8[$8>>0]|0; $17 = $16&255; $18 = $15 & $17; $19 = $18&255; HEAP8[$8>>0] = $19; return; } function _TabList_Remove($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; _TabList_Delete($0); $1 = $0&255; $2 = (1784624 + ($1<<1)|0); HEAP16[$2>>1] = 0; $3 = (1785136 + ($1)|0); HEAP8[$3>>0] = 0; _Event_RaiseInt((1791708),$1); return; } function _Entities_ContextLost($0) { $0 = $0|0; var $$010 = 0, $$19 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond11 = 0, label = 0, sp = 0; sp = STACKTOP; $$010 = 0; while(1) { $1 = (1782744 + ($$010<<2)|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)==(0|0); if (!($3)) { _Entity_ContextLost($2); } $4 = (($$010) + 1)|0; $exitcond11 = ($4|0)==(256); if ($exitcond11) { break; } else { $$010 = $4; } } _Gfx_DeleteTexture(1790576); $5 = HEAP8[(1803130)>>0]|0; $6 = ($5<<24>>24)==(0); if (!($6)) { return; } $$19 = 0; while(1) { $7 = (1782744 + ($$19<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(0|0); if (!($9)) { _DeleteSkin($8); } $10 = (($$19) + 1)|0; $exitcond = ($10|0)==(256); if ($exitcond) { break; } else { $$19 = $10; } } return; } function _Entities_ChatFontChanged($0) { $0 = $0|0; var $$05 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $$05 = 0; while(1) { $1 = (1782744 + ($$05<<2)|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)==(0|0); if (!($3)) { _DeleteNameTex($2); } $4 = (($$05) + 1)|0; $exitcond = ($4|0)==(256); if ($exitcond) { break; } else { $$05 = $4; } } return; } function _LocalPlayer_InputDown($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1803572)>>2]|0; $4 = ($3|0)==(0|0); if (!($4)) { return; } _LocalPlayer_InputSet($1,1); return; } function _LocalPlayer_InputUp($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _LocalPlayer_InputSet($1,0); return; } function _LocalPlayer_Init() { var $$pr = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, $or$cond = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; _Entity_Init(1783772); _Entity_SetName(1783772,14340); _Entity_SetSkin(1783772,14340); _Event_Register((1794308),0,316); HEAP32[(1784616)>>2] = 109; HEAP32[(1784564)>>2] = 1783772; _HacksComp_Init((1784300)); _PhysicsComp_Init((1784580),1783772); _TiltComp_Init((1784480)); HEAP8[(1783826)>>0] = 1; HEAPF32[(1784296)>>2] = 5.0; HEAP32[(1784604)>>2] = (1784300); HEAP32[(1784608)>>2] = (1784564); HEAP32[445943] = 14084; $0 = HEAP8[1972839]|0; $1 = ($0<<24>>24)==(0); $2 = HEAP8[1972840]|0; $3 = ($2<<24>>24)!=(0); $or$cond = $1 | $3; if (!($or$cond)) { HEAP8[(1784310)>>0] = 0; return; } $4 = (_Options_GetBool(37756,1)|0); $5 = ($4<<24>>24)!=(0); $phitmp = $5&1; $$pr = HEAP8[1972839]|0; HEAP8[(1784310)>>0] = $phitmp; $6 = ($$pr<<24>>24)==(0); if (!($6)) { return; } $7 = (+_Options_GetFloat(37734,0.10000000149011612,50.0,10.0)); HEAPF32[(1784304)>>2] = $7; $8 = (_Options_GetBool(37609,0)|0); HEAP8[(1784308)>>0] = $8; $9 = (_Options_GetBool(37591,0)|0); HEAP8[(1784332)>>0] = $9; $10 = (_Options_GetBool(37674,0)|0); HEAP8[(1784333)>>0] = $10; $11 = (_Options_GetBool(37654,0)|0); HEAP8[(1784309)>>0] = $11; $12 = (+_Options_GetFloat(37694,0.0,52.0,0.41999998688697815)); HEAPF32[(1784596)>>2] = $12; HEAPF32[(1784592)>>2] = $12; $13 = (_Options_GetBool(27752,1)|0); HEAP8[1972823] = $13; return; } function _Entity_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 80|0); HEAPF32[$1>>2] = 1.0; $2 = ((($0)) + 84|0); HEAPF32[$2>>2] = 1.0; $3 = ((($0)) + 88|0); HEAPF32[$3>>2] = 1.0; $4 = ((($0)) + 120|0); HEAPF32[$4>>2] = 1.0; $5 = ((($0)) + 124|0); HEAPF32[$5>>2] = 1.0; $6 = ((($0)) + 104|0); HEAP32[$6>>2] = 0; $7 = ((($0)) + 272|0); HEAP8[$7>>0] = 0; $8 = ((($0)) + 336|0); HEAP8[$8>>0] = 0; _Entity_SetModel($0,14108); return; } function _Entity_SetName($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; _DeleteNameTex($0); $2 = ((($0)) + 336|0); _String_CopyToRaw($2,64,$1); return; } function _Entity_SetSkin($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp + 64|0; $3 = sp; _DeleteSkin($0); $4 = (_Utils_IsUrlPrefix($1)|0); $5 = ($4<<24>>24)==(0); if ($5) { HEAP32[$2>>2] = $3; $16 = ((($2)) + 4|0); HEAP16[$16>>1] = 0; $17 = ((($2)) + 6|0); HEAP16[$17>>1] = 64; _String_AppendColorless($2,$1); $18 = ((($0)) + 272|0); _String_CopyToRaw($18,64,$2); STACKTOP = sp;return; } else { $6 = $1; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = $2; $13 = $12; HEAP32[$13>>2] = $8; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; $18 = ((($0)) + 272|0); _String_CopyToRaw($18,64,$2); STACKTOP = sp;return; } } function _LocalPlayer_CheckJumpVelocity($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_HacksComp_CanJumpHigher((1784300))|0); $2 = ($1<<24>>24)==(0); if (!($2)) { return; } $3 = HEAP32[(1784600)>>2]|0; HEAP32[(1784592)>>2] = $3; return; } function _LocalPlayer_GetMovement($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = (_KeyBind_IsPressed(0)|0); $3 = ($2<<24>>24)==(0); if (!($3)) { $4 = +HEAPF32[$1>>2]; $5 = $4 + -1.0; HEAPF32[$1>>2] = $5; } $6 = (_KeyBind_IsPressed(1)|0); $7 = ($6<<24>>24)==(0); if (!($7)) { $8 = +HEAPF32[$1>>2]; $9 = $8 + 1.0; HEAPF32[$1>>2] = $9; } $10 = (_KeyBind_IsPressed(2)|0); $11 = ($10<<24>>24)==(0); if (!($11)) { $12 = +HEAPF32[$0>>2]; $13 = $12 + -1.0; HEAPF32[$0>>2] = $13; } $14 = (_KeyBind_IsPressed(3)|0); $15 = ($14<<24>>24)==(0); if ($15) { return; } $16 = +HEAPF32[$0>>2]; $17 = $16 + 1.0; HEAPF32[$0>>2] = $17; return; } function _LocalPlayer_Tick($0,$1) { $0 = $0|0; $1 = +$1; var $$byval_copy1 = 0, $$byval_copy2 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $or$cond = 0, $or$cond3 = 0, $phitmp = 0.0, $phitmp44 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $$byval_copy2 = sp + 32|0; $$byval_copy1 = sp + 20|0; $2 = sp + 16|0; $3 = sp; $4 = sp + 4|0; $5 = ((($0)) + 528|0); HEAPF32[$2>>2] = 0.0; HEAPF32[$3>>2] = 0.0; $6 = HEAP8[(1103612)>>0]|0; $7 = ($6<<24>>24)==(0); if ($7) { STACKTOP = sp;return; } $8 = ((($5)) + 9|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(0); if ($10) { $18 = 0.5; } else { $11 = ((($5)) + 10|0); $12 = HEAP8[$11>>0]|0; $13 = ($12<<24>>24)==(0); if ($13) { $18 = 0.5; } else { $14 = ((($5)) + 13|0); $15 = HEAP8[$14>>0]|0; $16 = ($15<<24>>24)==(0); $phitmp = $16 ? 0.5 : 1.0; $18 = $phitmp; } } $17 = ((($0)) + 804|0); HEAPF32[$17>>2] = $18; $19 = ((($0)) + 504|0); $20 = ((($0)) + 36|0); ;HEAP32[$19>>2]=HEAP32[$20>>2]|0;HEAP32[$19+4>>2]=HEAP32[$20+4>>2]|0;HEAP32[$19+8>>2]=HEAP32[$20+8>>2]|0; $21 = ((($0)) + 111|0); $22 = HEAP8[$21>>0]|0; $23 = ((($0)) + 728|0); _LocalInterpComp_AdvanceState($23,$0); _LocalPlayer_HandleInput($2,$3); $24 = ((($5)) + 34|0); $25 = HEAP8[$24>>0]|0; $26 = ($25<<24>>24)==(0); if ($26) { $28 = ((($5)) + 35|0); $29 = HEAP8[$28>>0]|0; $30 = ($29<<24>>24)!=(0); $phitmp44 = $30&1; $31 = ((($5)) + 1|0); HEAP8[$31>>0] = $phitmp44; if ($30) { $53 = $31; } else { $32 = ((($5)) + 20|0); $33 = HEAP8[$32>>0]|0; $34 = ($33<<24>>24)==(0); if ($34) { $53 = $31; } else { _PhysicsComp_DoEntityPush($0); $53 = $31; } } } else { $27 = ((($5)) + 1|0); HEAP8[$27>>0] = 1; $53 = $27; } $35 = ((($5)) + 32|0); $36 = HEAP8[$35>>0]|0; $37 = ($36<<24>>24)==(0); if ($37) { $38 = HEAP8[$24>>0]|0; $39 = ($38<<24>>24)!=(0); $40 = +HEAPF32[$2>>2]; $41 = $40 == 0.0; $or$cond = $39 & $41; $42 = +HEAPF32[$3>>2]; $43 = $42 == 0.0; $or$cond3 = $or$cond & $43; if ($or$cond3) { HEAPF32[$20>>2] = 0.0; $44 = ((($0)) + 40|0); HEAPF32[$44>>2] = 0.0; $45 = ((($0)) + 44|0); HEAPF32[$45>>2] = 0.0; } } $46 = ((($0)) + 808|0); _PhysicsComp_UpdateVelocityState($46); $47 = +HEAPF32[$2>>2]; $48 = +HEAPF32[$3>>2]; $49 = ((($0)) + 20|0); $50 = +HEAPF32[$49>>2]; $51 = $50 * 0.01745329238474369; _Vec3_RotateY3($4,$47,0.0,$48,$51); ;HEAP32[$$byval_copy2>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$4+8>>2]|0; _PhysicsComp_PhysicsTick($46,$$byval_copy2); $52 = HEAP8[$53>>0]|0; $54 = ($52<<24>>24)==(0); if (!($54)) { $55 = ((($0)) + 40|0); HEAPF32[$55>>2] = 0.0; } $56 = ((($0)) + 460|0); $57 = ((($0)) + 4|0); ;HEAP32[$56>>2]=HEAP32[$57>>2]|0;HEAP32[$56+4>>2]=HEAP32[$57+4>>2]|0;HEAP32[$56+8>>2]=HEAP32[$57+8>>2]|0; $58 = ((($0)) + 428|0); ;HEAP32[$57>>2]=HEAP32[$58>>2]|0;HEAP32[$57+4>>2]=HEAP32[$58+4>>2]|0;HEAP32[$57+8>>2]=HEAP32[$58+8>>2]|0; ;HEAP32[$$byval_copy1>>2]=HEAP32[$58>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$58+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$58+8>>2]|0; ;HEAP32[$$byval_copy2>>2]=HEAP32[$56>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$56+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$56+8>>2]|0; _AnimatedComp_Update($0,$$byval_copy1,$$byval_copy2,$1); $59 = ((($0)) + 708|0); _TiltComp_Update($59,$1); _Entity_CheckSkin($0); _SoundComp_Tick($22); STACKTOP = sp;return; } function _Player_Despawn($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _DeleteSkin($0); _Entity_ContextLost($0); return; } function _LocalPlayer_SetLocation($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 728|0); _LocalInterpComp_SetLocation($2,$1); return; } function _Entity_GetColor($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 12|0; $2 = sp; _Entity_GetEyePosition($1,$0); _IVec3_Floor($2,$1); $3 = HEAP32[$2>>2]|0; $4 = ((($2)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = ((($2)) + 8|0); $7 = HEAP32[$6>>2]|0; $8 = (_ClassicLighting_Color($3,$5,$7)|0); STACKTOP = sp;return ($8|0); } function _LocalPlayer_RenderModel($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = +$2; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; _AnimatedComp_GetCurrent($0,$2); $3 = ((($0)) + 708|0); _TiltComp_GetCurrent($3,$2); $4 = HEAP32[(1771060)>>2]|0; $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(0); if ($6) { return; } $7 = ((($0)) + 48|0); $8 = HEAP32[$7>>2]|0; _Model_Render($8,$0); return; } function _LocalPlayer_RenderName($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1771060)>>2]|0; $2 = HEAP8[$1>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } _DrawName($0); return; } function _DrawName($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0; var $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0.0, $45 = 0; var $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0; var $64 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 192|0; $1 = sp; $2 = sp + 120|0; $3 = sp + 104|0; $4 = sp + 96|0; $5 = ((($0)) + 404|0); $6 = HEAP16[$5>>1]|0; $7 = ($6<<16>>16)==(-30000); if ($7) { STACKTOP = sp;return; } $8 = ((($0)) + 400|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)==(0); if ($10) { _MakeNameTexture($0); } $11 = HEAP32[$8>>2]|0; _Gfx_BindTexture($11); $12 = ((($0)) + 48|0); $13 = HEAP32[$12>>2]|0; $14 = ((($13)) + 20|0); $15 = HEAP32[$14>>2]|0; $16 = (+FUNCTION_TABLE_di[$15 & 31]($0)); $17 = ((($0)) + 128|0); _Vec3_TransformY($3,$16,$17); $18 = ((($13)) + 92|0); $19 = +HEAPF32[$18>>2]; $20 = ((($0)) + 84|0); $21 = +HEAPF32[$20>>2]; $22 = $19 * $21; $23 = $22 > 1.0; $24 = $22 / 70.0; $25 = $23 ? 0.014285714365541935 : $24; $26 = ((($0)) + 408|0); $27 = HEAP16[$26>>1]|0; $28 = (+($27&65535)); $29 = $25 * $28; HEAPF32[$4>>2] = $29; $30 = ((($0)) + 410|0); $31 = HEAP16[$30>>1]|0; $32 = (+($31&65535)); $33 = $25 * $32; $34 = ((($4)) + 4|0); HEAPF32[$34>>2] = $33; $35 = HEAP8[(1783768)>>0]|0; $36 = ($35<<24>>24)!=(4); $37 = HEAP8[(1784318)>>0]|0; $38 = ($37<<24>>24)==(0); $or$cond = $36 | $38; if (!($or$cond)) { _Matrix_Mul($2,(1803132),(1803196)); $39 = +HEAPF32[$3>>2]; $40 = ((($2)) + 12|0); $41 = +HEAPF32[$40>>2]; $42 = $39 * $41; $43 = ((($3)) + 4|0); $44 = +HEAPF32[$43>>2]; $45 = ((($2)) + 28|0); $46 = +HEAPF32[$45>>2]; $47 = $44 * $46; $48 = $42 + $47; $49 = ((($3)) + 8|0); $50 = +HEAPF32[$49>>2]; $51 = ((($2)) + 44|0); $52 = +HEAPF32[$51>>2]; $53 = $50 * $52; $54 = $48 + $53; $55 = ((($2)) + 60|0); $56 = +HEAPF32[$55>>2]; $57 = $56 + $54; $58 = $57 * 0.20000000298023224; $59 = +HEAPF32[$4>>2]; $60 = $59 * $58; HEAPF32[$4>>2] = $60; $61 = +HEAPF32[$34>>2]; $62 = $61 * $58; HEAPF32[$34>>2] = $62; } $63 = ((($0)) + 412|0); _Particle_DoRender($4,$3,$63,-1,$1); _Gfx_SetVertexFormat(1); $64 = HEAP32[450816]|0; _Gfx_UpdateDynamicVb_IndexedTris($64,$1,4); STACKTOP = sp;return; } function _MakeNameTexture($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 144|0; $1 = sp + 88|0; $2 = sp; $3 = sp + 72|0; $4 = sp + 120|0; $5 = sp + 96|0; $6 = sp + 64|0; _Font_MakeBitmapped($4,24,0); $7 = ((($4)) + 4|0); HEAP16[$7>>1] = 24; $8 = ((($4)) + 8|0); HEAP32[$8>>2] = 24; $9 = ((($0)) + 336|0); _String_FromRaw($6,$9,64); _DrawTextArgs_Make($3,$6,$4,0); $10 = (_Drawer2D_TextWidth($3)|0); $11 = ($10|0)==(0); if ($11) { $12 = ((($0)) + 400|0); HEAP32[$12>>2] = 0; $13 = ((($0)) + 404|0); HEAP16[$13>>1] = -30000; STACKTOP = sp;return; } else { HEAP32[$1>>2] = $2; $14 = ((($1)) + 4|0); HEAP16[$14>>1] = 0; $15 = ((($1)) + 6|0); HEAP16[$15>>1] = 64; $16 = (($10) + 3)|0; $17 = (_Drawer2D_TextHeight($3)|0); $18 = (($17) + 3)|0; _Context2D_Alloc($5,$16,$18); $19 = HEAP32[(1782116)>>2]|0; HEAP32[(1782116)>>2] = -11513776; _Drawer2D_WithoutColors($1,$6); $20 = $1; $21 = $20; $22 = HEAP32[$21>>2]|0; $23 = (($20) + 4)|0; $24 = $23; $25 = HEAP32[$24>>2]|0; $26 = $3; $27 = $26; HEAP32[$27>>2] = $22; $28 = (($26) + 4)|0; $29 = $28; HEAP32[$29>>2] = $25; _Context2D_DrawText($5,$3,3,3); HEAP32[(1782116)>>2] = $19; $30 = $6; $31 = $30; $32 = HEAP32[$31>>2]|0; $33 = (($30) + 4)|0; $34 = $33; $35 = HEAP32[$34>>2]|0; $36 = $3; $37 = $36; HEAP32[$37>>2] = $32; $38 = (($36) + 4)|0; $39 = $38; HEAP32[$39>>2] = $35; _Context2D_DrawText($5,$3,0,0); $40 = ((($0)) + 400|0); _Context2D_MakeTexture($40,$5); _Context2D_Free($5); STACKTOP = sp;return; } } function _Entity_GetEyePosition($0,$1) { $0 = $0|0; $1 = $1|0; var $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload13 = 0, $$sroa$4$0$$sroa_idx4 = 0, $$sroa$4$0$$sroa_idx5 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$6$0$$sroa_idx8 = 0, $$sroa$6$0$$sroa_idx9 = 0, $$sroa$6$0$copyload14 = 0, $2 = 0.0, $3 = 0.0, label = 0, sp = 0; sp = STACKTOP; $$sroa$0$0$$sroa_idx = ((($1)) + 4|0); $$sroa$0$0$copyload13 = HEAP32[$$sroa$0$0$$sroa_idx>>2]|0; $$sroa$4$0$$sroa_idx4 = ((($1)) + 8|0); $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx4>>2]; $$sroa$6$0$$sroa_idx8 = ((($1)) + 12|0); $$sroa$6$0$copyload14 = HEAP32[$$sroa$6$0$$sroa_idx8>>2]|0; $2 = (+_Entity_GetEyeHeight($1)); $3 = $$sroa$4$0$copyload + $2; HEAP32[$0>>2] = $$sroa$0$0$copyload13; $$sroa$4$0$$sroa_idx5 = ((($0)) + 4|0); HEAPF32[$$sroa$4$0$$sroa_idx5>>2] = $3; $$sroa$6$0$$sroa_idx9 = ((($0)) + 8|0); HEAP32[$$sroa$6$0$$sroa_idx9>>2] = $$sroa$6$0$copyload14; return; } function _Entity_GetEyeHeight($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 48|0); $2 = HEAP32[$1>>2]|0; $3 = ((($2)) + 24|0); $4 = HEAP32[$3>>2]|0; $5 = (+FUNCTION_TABLE_di[$4 & 31]($0)); $6 = ((($0)) + 84|0); $7 = +HEAPF32[$6>>2]; $8 = $5 * $7; return (+$8); } function _DeleteSkin($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_CanDeleteTexture($0)|0); $2 = ($1<<24>>24)==(0); if (!($2)) { $3 = ((($0)) + 112|0); _Gfx_DeleteTexture($3); } _Entity_ResetSkin($0); $4 = ((($0)) + 109|0); HEAP8[$4>>0] = 0; return; } function _Entity_ContextLost($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _DeleteNameTex($0); return; } function _DeleteNameTex($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 400|0); _Gfx_DeleteTexture($1); $2 = ((($0)) + 404|0); HEAP16[$2>>1] = 0; return; } function _CanDeleteTexture($0) { $0 = $0|0; var $$010 = 0, $$09 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 112|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)==(0); if ($3) { $$09 = 0; return ($$09|0); } $$010 = 0; while(1) { $4 = (1782744 + ($$010<<2)|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)==(0|0); $7 = ($5|0)==($0|0); $or$cond = $6 | $7; if (!($or$cond)) { $8 = ((($5)) + 112|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)==($2|0); if ($10) { $$09 = 0; label = 6; break; } } $11 = (($$010) + 1)|0; $12 = ($11>>>0)<(256); if ($12) { $$010 = $11; } else { $$09 = 1; label = 6; break; } } if ((label|0) == 6) { return ($$09|0); } return (0)|0; } function _Entity_ResetSkin($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 120|0); HEAPF32[$1>>2] = 1.0; $2 = ((($0)) + 124|0); HEAPF32[$2>>2] = 1.0; $3 = ((($0)) + 116|0); HEAP32[$3>>2] = 0; $4 = ((($0)) + 112|0); HEAP32[$4>>2] = 0; $5 = ((($0)) + 108|0); HEAP8[$5>>0] = 0; return; } function _LocalPlayer_HandleInput($0,$1) { $0 = $0|0; $1 = $1|0; var $$030 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0.0, $9 = 0.0, $or$cond = 0, $or$cond29 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1803572)>>2]|0; $3 = ($2|0)==(0|0); if (!($3)) { HEAP8[(1784582)>>0] = 0; HEAP8[(1784336)>>0] = 0; HEAP8[(1784337)>>0] = 0; return; } $$030 = (1784616); while(1) { $4 = HEAP32[$$030>>2]|0; FUNCTION_TABLE_vii[$4 & 255]($0,$1); $5 = ((($$030)) + 4|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(0|0); if ($7) { break; } else { $$030 = $6; } } $8 = +HEAPF32[$0>>2]; $9 = $8 * 0.98000001907348633; HEAPF32[$0>>2] = $9; $10 = +HEAPF32[$1>>2]; $11 = $10 * 0.98000001907348633; HEAPF32[$1>>2] = $11; $12 = (_KeyBind_IsPressed(4)|0); HEAP8[(1784582)>>0] = $12; $13 = (_KeyBind_IsPressed(15)|0); HEAP8[(1784336)>>0] = $13; $14 = (_KeyBind_IsPressed(16)|0); HEAP8[(1784337)>>0] = $14; $15 = HEAP8[(1784333)>>0]|0; $16 = ($15<<24>>24)==(0); $17 = HEAP8[(1784310)>>0]|0; $18 = ($17<<24>>24)==(0); $or$cond = $16 | $18; $19 = HEAP8[(1784316)>>0]|0; $20 = ($19<<24>>24)==(0); $or$cond29 = $or$cond | $20; if ($or$cond29) { return; } $21 = HEAP8[(1784334)>>0]|0; $22 = ($21<<24>>24)==(0); if (!($22)) { HEAPF32[(1783808)>>2] = 0.0; HEAPF32[(1783812)>>2] = 0.0; HEAPF32[(1783816)>>2] = 0.0; } $23 = (_KeyBind_IsPressed(13)|0); _HacksComp_SetNoclip((1784300),$23); return; } function _Entity_CheckSkin($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 400|0; $1 = sp + 8|0; $2 = sp + 336|0; $3 = sp + 320|0; $4 = sp; $5 = ((($0)) + 48|0); $6 = HEAP32[$5>>2]|0; $7 = ((($6)) + 44|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(0); if ($9) { STACKTOP = sp;return; } $10 = ((($0)) + 109|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(2); if ($12) { STACKTOP = sp;return; } $13 = ((($0)) + 272|0); _String_FromRaw($4,$13,64); $14 = HEAP8[$10>>0]|0; $15 = ($14<<24>>24)==(0); do { if ($15) { $16 = (_Entity_FirstOtherWithSameSkinAndFetchedSkin($0)|0); $17 = ($16|0)==(0|0); if ($17) { $18 = ($0|0)==(1783772|0); $19 = $18 ? 2 : 0; $20 = (_Http_AsyncGetSkin($4,$19)|0); $21 = ((($0)) + 104|0); HEAP32[$21>>2] = $20; HEAP8[$10>>0] = 1; break; } _Entity_CopySkin($0,$16); HEAP8[$10>>0] = 2; STACKTOP = sp;return; } } while(0); $22 = ((($0)) + 104|0); $23 = HEAP32[$22>>2]|0; $24 = (_Http_GetResult($23,$1)|0); $25 = ($24<<24>>24)==(0); if ($25) { STACKTOP = sp;return; } $26 = ((($1)) + 301|0); $27 = HEAP8[$26>>0]|0; $28 = ($27<<24>>24)==(0); if ($28) { _Entity_SetSkinAll($0,1); STACKTOP = sp;return; } $29 = ((($1)) + 156|0); $30 = HEAP32[$29>>2]|0; $31 = ((($1)) + 160|0); $32 = HEAP32[$31>>2]|0; _Stream_ReadonlyMemory($2,$30,$32); $33 = (_ApplySkin($0,$3,$2,$4)|0); $34 = ($33|0)==(0); if (!($34)) { $35 = HEAP32[$29>>2]|0; $36 = HEAP32[$31>>2]|0; _LogInvalidSkin($33,$4,$35,$36); } $37 = HEAP32[$3>>2]|0; _Mem_Free($37); $38 = HEAP32[$29>>2]|0; _Mem_Free($38); STACKTOP = sp;return; } function _Entity_FirstOtherWithSameSkinAndFetchedSkin($0) { $0 = $0|0; var $$013 = 0, $$017 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 16|0; $2 = sp + 8|0; $3 = sp; $4 = ((($0)) + 272|0); _String_FromRaw($1,$4,64); $$017 = 0; while(1) { $5 = (1782744 + ($$017<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(0|0); $8 = ($6|0)==($0|0); $or$cond = $7 | $8; if (!($or$cond)) { $9 = ((($6)) + 272|0); _String_FromRaw($3,$9,64); $10 = $3; $11 = $10; $12 = HEAP32[$11>>2]|0; $13 = (($10) + 4)|0; $14 = $13; $15 = HEAP32[$14>>2]|0; $16 = $2; $17 = $16; HEAP32[$17>>2] = $12; $18 = (($16) + 4)|0; $19 = $18; HEAP32[$19>>2] = $15; $20 = ((($6)) + 109|0); $21 = HEAP8[$20>>0]|0; $22 = ($21<<24>>24)==(0); if (!($22)) { $23 = (_String_Equals($1,$2)|0); $24 = ($23|0)==(0); if (!($24)) { $$013 = $6; label = 6; break; } } } $25 = (($$017) + 1)|0; $26 = ($25>>>0)<(256); if ($26) { $$017 = $25; } else { $$013 = 0; label = 6; break; } } if ((label|0) == 6) { STACKTOP = sp;return ($$013|0); } return (0)|0; } function _Entity_CopySkin($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 112|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 112|0); HEAP32[$4>>2] = $3; $5 = ((($1)) + 108|0); $6 = HEAP8[$5>>0]|0; $7 = ((($0)) + 108|0); HEAP8[$7>>0] = $6; $8 = ((($1)) + 120|0); $9 = HEAP32[$8>>2]|0; $10 = ((($0)) + 120|0); HEAP32[$10>>2] = $9; $11 = ((($1)) + 124|0); $12 = HEAP32[$11>>2]|0; $13 = ((($0)) + 124|0); HEAP32[$13>>2] = $12; $14 = ((($1)) + 116|0); $15 = HEAP32[$14>>2]|0; $16 = ((($0)) + 116|0); HEAP32[$16>>2] = $15; return; } function _Entity_SetSkinAll($0,$1) { $0 = $0|0; $1 = $1|0; var $$017 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp + 16|0; $3 = sp + 8|0; $4 = sp; $5 = ((($0)) + 272|0); _String_FromRaw($2,$5,64); $6 = (_Utils_IsUrlPrefix($2)|0); $7 = ($6<<24>>24)==(0); if ($7) { $11 = 0; } else { $8 = ((($0)) + 112|0); $9 = HEAP32[$8>>2]|0; $11 = $9; } $10 = ((($0)) + 116|0); HEAP32[$10>>2] = $11; $12 = ($1<<24>>24)==(0); $$017 = 0; while(1) { $13 = (1782744 + ($$017<<2)|0); $14 = HEAP32[$13>>2]|0; $15 = ($14|0)==(0|0); if (!($15)) { $16 = ((($14)) + 272|0); _String_FromRaw($4,$16,64); $17 = $4; $18 = $17; $19 = HEAP32[$18>>2]|0; $20 = (($17) + 4)|0; $21 = $20; $22 = HEAP32[$21>>2]|0; $23 = $3; $24 = $23; HEAP32[$24>>2] = $19; $25 = (($23) + 4)|0; $26 = $25; HEAP32[$26>>2] = $22; $27 = (_String_Equals($2,$3)|0); $28 = ($27|0)==(0); if (!($28)) { if ($12) { _Entity_CopySkin($14,$0); } else { _Entity_ResetSkin($14); } $29 = ((($14)) + 109|0); HEAP8[$29>>0] = 2; } } $30 = (($$017) + 1)|0; $exitcond = ($30|0)==(256); if ($exitcond) { break; } else { $$017 = $30; } } STACKTOP = sp;return; } function _ApplySkin($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_Png_Decode($1,$2)|0); $5 = ($4|0)==(0); if (!($5)) { $$0 = $4; return ($$0|0); } $6 = ((($0)) + 112|0); _Gfx_DeleteTexture($6); _Entity_SetSkinAll($0,1); $7 = (_EnsurePow2Skin($0,$1)|0); $8 = ($7|0)==(0); if (!($8)) { $$0 = $7; return ($$0|0); } $9 = (_Utils_CalcSkinType($1)|0); $10 = ((($0)) + 108|0); HEAP8[$10>>0] = $9; $11 = ((($1)) + 4|0); $12 = HEAP32[$11>>2]|0; $13 = HEAP32[450779]|0; $14 = ($12|0)>($13|0); if (!($14)) { $15 = ((($1)) + 8|0); $16 = HEAP32[$15>>2]|0; $17 = HEAP32[(1803120)>>2]|0; $18 = ($16|0)>($17|0); if (!($18)) { $19 = ((($0)) + 48|0); $20 = HEAP32[$19>>2]|0; $21 = ((($20)) + 46|0); $22 = HEAP8[$21>>0]|0; $23 = ($22<<24>>24)==(0); if (!($23)) { _Entity_ClearHat($1,$9); } _Gfx_RecreateTexture($6,$1,1,0); _Entity_SetSkinAll($0,0); $$0 = 0; return ($$0|0); } } _Chat_Add1(27791,$3); $$0 = 0; return ($$0|0); } function _LogInvalidSkin($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $4 = sp + 256|0; $5 = sp; HEAP32[$4>>2] = $5; $6 = ((($4)) + 4|0); HEAP16[$6>>1] = 0; $7 = ((($4)) + 6|0); HEAP16[$7>>1] = 256; _Logger_FormatWarn2($4,$0,27768,$1,51); $8 = ($0|0)==(-857812961); if ($8) { _String_AppendConst($4,27782); $10 = ($3|0)<(8); $11 = $10 ? $3 : 8; _String_AppendAll($4,$2,$11); _String_AppendConst($4,27789); $12 = HEAP32[3701]|0; FUNCTION_TABLE_vi[$12 & 511]($4); STACKTOP = sp;return; } else { $9 = HEAP32[3701]|0; FUNCTION_TABLE_vi[$9 & 511]($4); STACKTOP = sp;return; } } function _EnsurePow2Skin($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$03839 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = ((($1)) + 4|0); $4 = HEAP32[$3>>2]|0; $5 = (_Math_NextPowOf2($4)|0); $6 = ((($1)) + 8|0); $7 = HEAP32[$6>>2]|0; $8 = (_Math_NextPowOf2($7)|0); $9 = HEAP32[$3>>2]|0; $10 = ($5|0)==($9|0); if ($10) { $11 = HEAP32[$6>>2]|0; $12 = ($8|0)==($11|0); if ($12) { $$0 = 0; STACKTOP = sp;return ($$0|0); } } _Bitmap_TryAllocate($2,$5,$8); $13 = HEAP32[$2>>2]|0; $14 = ($13|0)==(0|0); if ($14) { $$0 = -857812988; STACKTOP = sp;return ($$0|0); } $15 = HEAP32[$3>>2]|0; $16 = (+($15|0)); $17 = (+($5|0)); $18 = $16 / $17; $19 = ((($0)) + 120|0); HEAPF32[$19>>2] = $18; $20 = HEAP32[$6>>2]|0; $21 = (+($20|0)); $22 = (+($8|0)); $23 = $21 / $22; $24 = ((($0)) + 124|0); HEAPF32[$24>>2] = $23; $25 = $15 << 2; $26 = HEAP32[$6>>2]|0; $27 = ($26|0)>(0); if ($27) { $28 = ((($2)) + 4|0); $$03839 = 0; while(1) { $29 = HEAP32[$1>>2]|0; $30 = HEAP32[$3>>2]|0; $31 = Math_imul($30, $$03839)|0; $32 = (($29) + ($31<<2)|0); $33 = HEAP32[$2>>2]|0; $34 = HEAP32[$28>>2]|0; $35 = Math_imul($34, $$03839)|0; $36 = (($33) + ($35<<2)|0); _Mem_Copy($36,$32,$25); $37 = (($$03839) + 1)|0; $38 = HEAP32[$6>>2]|0; $39 = ($37|0)<($38|0); if ($39) { $$03839 = $37; } else { break; } } } $40 = HEAP32[$1>>2]|0; _Mem_Free($40); ;HEAP32[$1>>2]=HEAP32[$2>>2]|0;HEAP32[$1+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[$2+8>>2]|0; $$0 = 0; STACKTOP = sp;return ($$0|0); } function _Entity_ClearHat($0,$1) { $0 = $0|0; $1 = $1|0; var $$04860 = 0, $$056 = 0, $$14953 = 0, $$152 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $switch$split2D = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP32[$2>>2]|0; $4 = (($3|0) / 64)&-1; $5 = $4 << 5; $6 = ($1<<24>>24)==(0); $7 = $6 ? 32 : 64; $8 = ((($0)) + 8|0); $9 = HEAP32[$8>>2]|0; $10 = (($9|0) / ($7|0))&-1; $11 = $10 << 4; $12 = ($10|0)>(0); if (!($12)) { return; } $13 = HEAP32[$0>>2]|0; $14 = ($3|0)>(63); $$04860 = 0; L4: while(1) { $15 = Math_imul($$04860, $3)|0; $16 = (($13) + ($15<<2)|0); $17 = (($16) + ($5<<2)|0); if ($14) { $$056 = 0; while(1) { $20 = (($17) + ($$056<<2)|0); $21 = HEAP32[$20>>2]|0; $22 = ($21>>>0)<(4278190080); $18 = (($$056) + 1)|0; if ($22) { label = 16; break L4; } $19 = ($18|0)<($5|0); if ($19) { $$056 = $18; } else { break; } } } $23 = (($$04860) + 1)|0; $24 = ($23|0)<($11|0); if ($24) { $$04860 = $23; } else { break; } } if ((label|0) == 16) { return; } $25 = ($10|0)>(0); if (!($25)) { return; } $26 = HEAP32[$0>>2]|0; $27 = ($3|0)>(63); $$14953 = 0; while(1) { $28 = HEAP32[$2>>2]|0; $29 = Math_imul($28, $$14953)|0; $30 = (($26) + ($29<<2)|0); $31 = (($30) + ($5<<2)|0); if ($27) { $$152 = 0; while(1) { $32 = (($31) + ($$152<<2)|0); $33 = HEAP32[$32>>2]|0; $switch$split2D = ($33|0)<(-1); if ($switch$split2D) { switch ($33|0) { case -16777216: { label = 13; break; } default: { } } } else { switch ($33|0) { case -1: { label = 13; break; } default: { } } } if ((label|0) == 13) { label = 0; HEAP32[$32>>2] = 0; } $34 = (($$152) + 1)|0; $35 = ($34|0)<($5|0); if ($35) { $$152 = $34; } else { break; } } } $36 = (($$14953) + 1)|0; $37 = ($36|0)<($11|0); if ($37) { $$14953 = $36; } else { break; } } return; } function _Entity_SetModel($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp + 8|0; $3 = sp + 16|0; $4 = sp; $5 = ((($0)) + 80|0); HEAPF32[$5>>2] = 1.0; $6 = ((($0)) + 84|0); HEAPF32[$6>>2] = 1.0; $7 = ((($0)) + 88|0); HEAPF32[$7>>2] = 1.0; (_String_UNSAFE_Separate($1,124,$2,$3)|0); $8 = (_String_CaselessEqualsConst($2,27814)|0); $9 = ($8|0)==(0); if (!($9)) { _String_FromReadonly($4,40916); $10 = $4; $11 = $10; $12 = HEAP32[$11>>2]|0; $13 = (($10) + 4)|0; $14 = $13; $15 = HEAP32[$14>>2]|0; $16 = $2; $17 = $16; HEAP32[$17>>2] = $12; $18 = (($16) + 4)|0; $19 = $18; HEAP32[$19>>2] = $15; HEAPF32[$5>>2] = 2.0; HEAPF32[$6>>2] = 2.0; HEAPF32[$7>>2] = 2.0; } $20 = ((($0)) + 52|0); HEAP16[$20>>1] = 0; $21 = (_Model_Get($2)|0); $22 = ((($0)) + 48|0); HEAP32[$22>>2] = $21; $23 = ($21|0)==(0|0); if (!($23)) { _Entity_ParseScale($0,$3); _Entity_UpdateModelBounds($0); STACKTOP = sp;return; } _Entity_SetBlockModel($0,$2); _Entity_ParseScale($0,$3); _Entity_UpdateModelBounds($0); STACKTOP = sp;return; } function _Entity_SetBlockModel($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Block_Parse($1)|0); $3 = ($2|0)==(-1); if ($3) { $4 = HEAP32[(1826340)>>2]|0; $5 = ((($0)) + 48|0); HEAP32[$5>>2] = $4; return; } else { $6 = $2&65535; $7 = ((($0)) + 52|0); HEAP16[$7>>1] = $6; $8 = (_Model_Get(14116)|0); $9 = ((($0)) + 48|0); HEAP32[$9>>2] = $8; return; } } function _Entity_ParseScale($0,$1) { $0 = $0|0; $1 = $1|0; var $$ = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_Convert_ParseFloat($1,$2)|0); $4 = ($3<<24>>24)==(0); if ($4) { STACKTOP = sp;return; } $5 = +HEAPF32[$2>>2]; $6 = $5 > 0.0010000000474974513; $7 = $6 ? $5 : 0.0010000000474974513; HEAPF32[$2>>2] = $7; $8 = ((($0)) + 54|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(0); if (!($10)) { $11 = ((($0)) + 48|0); $12 = HEAP32[$11>>2]|0; $13 = ((($12)) + 84|0); $14 = +HEAPF32[$13>>2]; $15 = $7 < $14; $$ = $15 ? $7 : $14; HEAPF32[$2>>2] = $$; } $16 = HEAP32[$2>>2]|0; $17 = ((($0)) + 80|0); HEAP32[$17>>2] = $16; $18 = ((($0)) + 84|0); HEAP32[$18>>2] = $16; $19 = ((($0)) + 88|0); HEAP32[$19>>2] = $16; STACKTOP = sp;return; } function _Entity_UpdateModelBounds($0) { $0 = $0|0; var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 48|0); $2 = HEAP32[$1>>2]|0; $3 = ((($2)) + 28|0); $4 = HEAP32[$3>>2]|0; FUNCTION_TABLE_vi[$4 & 511]($0); $5 = ((($2)) + 32|0); $6 = HEAP32[$5>>2]|0; FUNCTION_TABLE_vi[$6 & 511]($0); $7 = ((($0)) + 92|0); $8 = ((($0)) + 80|0); _Vec3_Mul3($7,$7,$8); $9 = ((($0)) + 56|0); _Vec3_Mul3($9,$9,$8); $10 = ((($0)) + 68|0); _Vec3_Mul3($10,$10,$8); return; } function _Vec3_Mul3($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 * $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 * $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 * $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _LocalPlayer_InputSet($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)!=(0); $3 = HEAP8[(1784310)>>0]|0; $4 = ($3<<24>>24)==(0); $or$cond = $2 & $4; if ($or$cond) { return; } $5 = HEAP8[(390764)>>0]|0; $6 = $5&255; $7 = ($6|0)==($0|0); if ($7) { HEAP8[(1784338)>>0] = $1; } $8 = HEAP8[(390777)>>0]|0; $9 = $8&255; $10 = ($9|0)==($0|0); if (!($10)) { return; } HEAP8[(1784339)>>0] = $1; return; } function _Entity_GetTransform($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $4 = sp; $5 = +HEAPF32[$2>>2]; $6 = ((($2)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 8|0); $9 = +HEAPF32[$8>>2]; _Matrix_Scale($3,$5,$7,$9); $10 = ((($0)) + 32|0); $11 = +HEAPF32[$10>>2]; $12 = $11 * -0.01745329238474369; _Matrix_RotateZ($4,$12); _Matrix_Mul($3,$3,$4); $13 = ((($0)) + 24|0); $14 = +HEAPF32[$13>>2]; $15 = $14 * -0.01745329238474369; _Matrix_RotateX($4,$15); _Matrix_Mul($3,$3,$4); $16 = ((($0)) + 28|0); $17 = +HEAPF32[$16>>2]; $18 = $17 * -0.01745329238474369; _Matrix_RotateY($4,$18); _Matrix_Mul($3,$3,$4); $19 = +HEAPF32[$1>>2]; $20 = ((($1)) + 4|0); $21 = +HEAPF32[$20>>2]; $22 = ((($1)) + 8|0); $23 = +HEAPF32[$22>>2]; _Matrix_Translate($4,$19,$21,$23); _Matrix_Mul($3,$3,$4); STACKTOP = sp;return; } function _Entity_GetPickingBounds($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 56|0); $3 = ((($0)) + 4|0); _AABB_Offset($1,$2,$3); return; } function _Entity_GetBounds($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = ((($0)) + 92|0); _AABB_Make($1,$2,$3); return; } function _Entity_TouchesAny($0,$1) { $0 = $0|0; $1 = $1|0; var $$02635 = 0, $$02730 = 0, $$028 = 0, $$031 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; var $61 = 0, $62 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $2 = sp + 52|0; $3 = sp + 40|0; $4 = sp + 16|0; $5 = sp; _IVec3_Floor($2,$0); $6 = ((($0)) + 12|0); _IVec3_Floor($3,$6); $7 = HEAP32[$2>>2]|0; $8 = ($7|0)>(0); $9 = $8 ? $7 : 0; HEAP32[$2>>2] = $9; $10 = HEAP32[$3>>2]|0; $11 = HEAP32[(1103576)>>2]|0; $12 = ($10|0)<($11|0); $13 = $12 ? $10 : $11; HEAP32[$3>>2] = $13; $14 = ((($2)) + 4|0); $15 = HEAP32[$14>>2]|0; $16 = ($15|0)>(0); $17 = $16 ? $15 : 0; HEAP32[$14>>2] = $17; $18 = ((($3)) + 4|0); $19 = HEAP32[$18>>2]|0; $20 = HEAP32[(1103580)>>2]|0; $21 = ($19|0)<($20|0); $22 = $21 ? $19 : $20; HEAP32[$18>>2] = $22; $23 = ((($2)) + 8|0); $24 = HEAP32[$23>>2]|0; $25 = ($24|0)>(0); $26 = $25 ? $24 : 0; HEAP32[$23>>2] = $26; $27 = ((($3)) + 8|0); $28 = HEAP32[$27>>2]|0; $29 = HEAP32[(1103584)>>2]|0; $30 = ($28|0)<($29|0); $31 = $30 ? $28 : $29; HEAP32[$27>>2] = $31; $32 = HEAP32[$18>>2]|0; $33 = ($17|0)>($32|0); if ($33) { $$028 = 0; STACKTOP = sp;return ($$028|0); } $34 = ((($5)) + 4|0); $35 = ((($5)) + 8|0); $36 = ((($4)) + 12|0); $$02635 = $17; L4: while(1) { $37 = (+($$02635|0)); HEAPF32[$34>>2] = $37; $38 = HEAP32[$23>>2]|0; $39 = HEAP32[$27>>2]|0; $40 = ($38|0)>($39|0); if (!($40)) { $$031 = $38; while(1) { $41 = (+($$031|0)); HEAPF32[$35>>2] = $41; $42 = HEAP32[$2>>2]|0; $43 = HEAP32[$3>>2]|0; $44 = ($42|0)>($43|0); if (!($44)) { $$02730 = $42; while(1) { $45 = (+($$02730|0)); HEAPF32[$5>>2] = $45; $46 = (_World_GetBlock_321($$02730,$$02635,$$031)|0); $47 = $46&65535; $48 = (1125396 + (($47*12)|0)|0); _Vec3_Add_322($4,$5,$48); $49 = (1134612 + (($47*12)|0)|0); _Vec3_Add_322($36,$5,$49); $50 = (_AABB_Intersects($4,$0)|0); $51 = ($50<<24>>24)==(0); if (!($51)) { $52 = (FUNCTION_TABLE_ii[$1 & 31]($46)|0); $53 = ($52<<24>>24)==(0); if (!($53)) { $$028 = 1; label = 12; break L4; } } $54 = (($$02730) + 1)|0; $55 = HEAP32[$3>>2]|0; $56 = ($$02730|0)<($55|0); if ($56) { $$02730 = $54; } else { break; } } } $57 = (($$031) + 1)|0; $58 = HEAP32[$27>>2]|0; $59 = ($$031|0)<($58|0); if ($59) { $$031 = $57; } else { break; } } } $60 = (($$02635) + 1)|0; $61 = HEAP32[$18>>2]|0; $62 = ($$02635|0)<($61|0); if ($62) { $$02635 = $60; } else { $$028 = 0; label = 12; break; } } if ((label|0) == 12) { STACKTOP = sp;return ($$028|0); } return (0)|0; } function _World_GetBlock_321($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $3 = HEAP32[(1103572)>>2]|0; $4 = Math_imul($3, $1)|0; $5 = (($4) + ($2))|0; $6 = HEAP32[(1103564)>>2]|0; $7 = Math_imul($5, $6)|0; $8 = (($7) + ($0))|0; $9 = HEAP32[275888]|0; $10 = (($9) + ($8)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = HEAP32[(1103556)>>2]|0; $14 = (($13) + ($8)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 8; $18 = $17 | $12; $19 = HEAP32[(1103608)>>2]|0; $20 = $18 & $19; $21 = $20&65535; return ($21|0); } function _Vec3_Add_322($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 + $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 + $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 + $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _Entity_TouchesAnyRope($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; _Entity_GetBounds($0,$1); $2 = ((($1)) + 16|0); $3 = +HEAPF32[$2>>2]; $4 = $3 + 0.03125; HEAPF32[$2>>2] = $4; $5 = (_Entity_TouchesAny($1,5)|0); STACKTOP = sp;return ($5|0); } function _IsRopeCollide($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1116180 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(7); $5 = $4&1; return ($5|0); } function _Entity_TouchesAnyLava($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; _Entity_GetBounds($0,$1); _AABB_Offset($1,$1,14124); $2 = (_Entity_TouchesAny($1,6)|0); STACKTOP = sp;return ($2|0); } function _IsLavaCollide($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1116180 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(6); $5 = $4&1; return ($5|0); } function _Entity_TouchesAnyWater($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; _Entity_GetBounds($0,$1); _AABB_Offset($1,$1,14124); $2 = (_Entity_TouchesAny($1,7)|0); STACKTOP = sp;return ($2|0); } function _IsWaterCollide($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1116180 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(5); $5 = $4&1; return ($5|0); } function _Entity_LerpAngles($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0; var $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 440|0); $3 = +HEAPF32[$2>>2]; $4 = ((($0)) + 472|0); $5 = +HEAPF32[$4>>2]; $6 = (+_Math_LerpAngle($3,$5,$1)); $7 = ((($0)) + 16|0); HEAPF32[$7>>2] = $6; $8 = ((($0)) + 444|0); $9 = +HEAPF32[$8>>2]; $10 = ((($0)) + 476|0); $11 = +HEAPF32[$10>>2]; $12 = (+_Math_LerpAngle($9,$11,$1)); $13 = ((($0)) + 20|0); HEAPF32[$13>>2] = $12; $14 = ((($0)) + 448|0); $15 = +HEAPF32[$14>>2]; $16 = ((($0)) + 480|0); $17 = +HEAPF32[$16>>2]; $18 = (+_Math_LerpAngle($15,$17,$1)); $19 = ((($0)) + 24|0); HEAPF32[$19>>2] = $18; $20 = ((($0)) + 452|0); $21 = +HEAPF32[$20>>2]; $22 = ((($0)) + 484|0); $23 = +HEAPF32[$22>>2]; $24 = (+_Math_LerpAngle($21,$23,$1)); $25 = ((($0)) + 28|0); HEAPF32[$25>>2] = $24; $26 = ((($0)) + 456|0); $27 = +HEAPF32[$26>>2]; $28 = ((($0)) + 488|0); $29 = +HEAPF32[$28>>2]; $30 = (+_Math_LerpAngle($27,$29,$1)); $31 = ((($0)) + 32|0); HEAPF32[$31>>2] = $30; return; } function _Entities_Tick($0) { $0 = $0|0; var $$06 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 8|0); $$06 = 0; while(1) { $2 = (1782744 + ($$06<<2)|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0|0); if (!($4)) { $5 = HEAP32[$3>>2]|0; $6 = HEAP32[$5>>2]|0; $7 = +HEAPF64[$1>>3]; FUNCTION_TABLE_vid[$6 & 63]($3,$7); } $8 = (($$06) + 1)|0; $exitcond = ($8|0)==(256); if ($exitcond) { break; } else { $$06 = $8; } } return; } function _Entities_RenderModels($0,$1) { $0 = +$0; $1 = +$1; var $$07 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; _Gfx_SetAlphaTest(1); $$07 = 0; while(1) { $2 = (1782744 + ($$07<<2)|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0|0); if (!($4)) { $5 = HEAP32[$3>>2]|0; $6 = ((($5)) + 16|0); $7 = HEAP32[$6>>2]|0; FUNCTION_TABLE_vidd[$7 & 3]($3,$0,$1); } $8 = (($$07) + 1)|0; $exitcond = ($8|0)==(256); if ($exitcond) { break; } else { $$07 = $8; } } _Gfx_SetAlphaTest(0); return; } function _Entities_RenderNames() { var $$016 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, $exitcond = 0, $or$cond = 0, $or$cond15 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1783768)>>0]|0; $1 = ($0<<24>>24)==(0); if ($1) { return; } $2 = (_Entities_GetClosest(1783772)|0); HEAP8[1972824] = $2; $3 = HEAP8[(1784318)>>0]|0; $4 = ($3<<24>>24)!=(0); $5 = HEAP8[(1783768)>>0]|0; $6 = ($5<<24>>24)==(2); $or$cond15 = $4 & $6; if (!($or$cond15)) { return; } _Gfx_SetAlphaTest(1); $7 = (_Gfx_GetFog()|0); $8 = ($7<<24>>24)!=(0); if ($8) { _Gfx_SetFog(0); } $$016 = 0; while(1) { $9 = (1782744 + ($$016<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0|0); if (!($11)) { $12 = HEAP8[1972824]|0; $13 = $12&255; $14 = ($$016|0)!=($13|0); $15 = ($$016|0)==(255); $or$cond = $15 | $14; if ($or$cond) { $16 = HEAP32[$10>>2]|0; $17 = ((($16)) + 20|0); $18 = HEAP32[$17>>2]|0; FUNCTION_TABLE_vi[$18 & 511]($10); } } $19 = (($$016) + 1)|0; $exitcond = ($19|0)==(256); if ($exitcond) { break; } else { $$016 = $19; } } _Gfx_SetAlphaTest(0); if (!($8)) { return; } _Gfx_SetFog(1); return; } function _Entities_GetClosest($0) { $0 = $0|0; var $$01623 = 0.0, $$01722 = 0, $$01821 = 0, $$2 = 0.0, $$220 = 0, $$byval_copy = 0, $$byval_copy1 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0.0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $$byval_copy1 = sp + 44|0; $$byval_copy = sp + 32|0; $1 = sp + 20|0; $2 = sp + 8|0; $3 = sp + 4|0; $4 = sp; _Entity_GetEyePosition($1,$0); $5 = ((($0)) + 20|0); $6 = +HEAPF32[$5>>2]; $7 = $6 * 0.01745329238474369; $8 = ((($0)) + 16|0); $9 = +HEAPF32[$8>>2]; $10 = $9 * 0.01745329238474369; _Vec3_GetDirVector($2,$7,$10); $$01623 = inf;$$01722 = 0;$$01821 = -1; while(1) { $11 = (1782744 + ($$01722<<2)|0); $12 = HEAP32[$11>>2]|0; $13 = ($12|0)==(0|0); if ($13) { $$2 = $$01623;$$220 = $$01821; } else { ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$1+8>>2]|0; ;HEAP32[$$byval_copy1>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$2+8>>2]|0; $14 = (_Intersection_RayIntersectsRotatedBox($$byval_copy,$$byval_copy1,$12,$3,$4)|0); $15 = ($14<<24>>24)==(0); if ($15) { $$2 = $$01623;$$220 = $$01821; } else { $16 = +HEAPF32[$3>>2]; $17 = $16 < $$01623; if ($17) { $18 = $$01722&255; $$2 = $16;$$220 = $18; } else { $$2 = $$01623;$$220 = $$01821; } } } $19 = (($$01722) + 1)|0; $exitcond = ($19|0)==(255); if ($exitcond) { break; } else { $$01623 = $$2;$$01722 = $19;$$01821 = $$220; } } STACKTOP = sp;return ($$220|0); } function _Entities_RenderHoveredNames() { var $$015 = 0, $$old1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $exitcond = 0, $or$cond = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1783768)>>0]|0; switch ($0<<24>>24) { case 2: case 1: { $5 = 0; break; } case 0: { return; } default: { $1 = HEAP8[(1784318)>>0]|0; $2 = ($1<<24>>24)!=(0); $phitmp = $2&1; $5 = $phitmp; } } _Gfx_SetAlphaTest(1); _Gfx_SetDepthTest(0); $3 = (_Gfx_GetFog()|0); $4 = ($3<<24>>24)!=(0); if ($4) { _Gfx_SetFog(0); } $6 = ($5|0)!=(0); $$015 = 0; L8: while(1) { $7 = (1782744 + ($$015<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(0|0); do { if (!($9)) { $10 = HEAP8[1972824]|0; $11 = $10&255; $12 = ($$015|0)==($11|0); if ($12) { $$old1 = ($$015|0)==(255); if ($$old1) { break L8; } } else { $13 = ($$015|0)!=(255); $or$cond = $6 & $13; if (!($or$cond)) { break; } } $14 = HEAP32[$8>>2]|0; $15 = ((($14)) + 20|0); $16 = HEAP32[$15>>2]|0; FUNCTION_TABLE_vi[$16 & 511]($8); } } while(0); $17 = (($$015) + 1)|0; $exitcond = ($17|0)==(256); if ($exitcond) { break; } else { $$015 = $17; } } _Gfx_SetAlphaTest(0); _Gfx_SetDepthTest(1); if (!($4)) { return; } _Gfx_SetFog(1); return; } function _Entities_DrawShadows() { var $$06 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1783769)>>0]|0; $1 = ($0<<24>>24)==(0); if ($1) { return; } HEAP8[1972825] = 0; _Gfx_SetDepthWrite(0); _Gfx_SetAlphaBlending(1); _Gfx_SetVertexFormat(1); $2 = HEAP32[(1783764)>>2]|0; _ShadowComponent_Draw($2); $3 = HEAP8[(1783769)>>0]|0; $4 = ($3<<24>>24)==(3); if ($4) { $$06 = 0; while(1) { $5 = (1782744 + ($$06<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(0|0); if (!($7)) { $8 = ((($6)) + 55|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(0); if (!($10)) { _ShadowComponent_Draw($6); } } $11 = (($$06) + 1)|0; $exitcond = ($11|0)==(255); if ($exitcond) { break; } else { $$06 = $11; } } } _Gfx_SetDepthWrite(1); _Gfx_SetAlphaBlending(0); return; } function _LocalPlayer_JumpHeight() { var $0 = 0.0, $1 = 0.0, $2 = 0.0, label = 0, sp = 0; sp = STACKTOP; $0 = +HEAPF32[(1784592)>>2]; $1 = (+_PhysicsComp_CalcMaxHeight($0)); $2 = $1; return (+$2); } function _LocalPlayer_SetInterpPosition($0) { $0 = +$0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1784333)>>0]|0; $2 = ($1<<24>>24)==(0); $3 = HEAP8[(1784334)>>0]|0; $4 = ($3<<24>>24)==(0); $or$cond = $2 | $4; if (!($or$cond)) { _Entity_LerpAngles(1783772,$0); return; } _Vec3_Lerp((1783776),(1784200),(1784232),$0); _Entity_LerpAngles(1783772,$0); return; } function _LocalPlayer_HandleRespawn() { var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1784315)>>0]|0; $1 = ($0<<24>>24)==(0); if ($1) { $2 = HEAP8[(1784612)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { HEAP8[(1784612)>>0] = 1; $4 = HEAP8[1972823]|0; $5 = ($4<<24>>24)==(0); if ($5) { $$0 = 0; } else { _Chat_AddRaw(27820); $$0 = 0; } } else { $$0 = 0; } } else { _LocalPlayer_DoRespawn(); $$0 = 1; } return ($$0|0); } function _LocalPlayer_DoRespawn() { var $$029 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0; var $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $0 = sp + 48|0; $1 = sp + 24|0; $2 = sp + 12|0; $3 = sp; ;HEAP32[$2>>2]=HEAP32[(1784264)>>2]|0;HEAP32[$2+4>>2]=HEAP32[(1784264)+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[(1784264)+8>>2]|0; $4 = HEAP8[(1103612)>>0]|0; $5 = ($4<<24>>24)==(0); if ($5) { STACKTOP = sp;return; } _IVec3_Floor($3,$2); $6 = HEAP8[(1784316)>>0]|0; $7 = ($6<<24>>24)==(0); L4: do { if (!($7)) { _AABB_Make($1,$2,(1783864)); $8 = ((($3)) + 4|0); $9 = HEAP32[$8>>2]|0; $10 = HEAP32[(1103568)>>2]|0; $11 = ($9|0)>($10|0); if (!($11)) { $12 = ((($1)) + 4|0); $13 = ((($1)) + 16|0); $$029 = $9; while(1) { $14 = (+_Respawn_HighestSolidY($1)); $15 = $14 == -1.0E+5; if ($15) { break; } $31 = +HEAPF32[$12>>2]; $32 = $31 + 1.0; HEAPF32[$12>>2] = $32; $33 = +HEAPF32[$13>>2]; $34 = $33 + 1.0; HEAPF32[$13>>2] = $34; $35 = (($$029) + 1)|0; $36 = HEAP32[(1103568)>>2]|0; $37 = ($$029|0)<($36|0); if ($37) { $$029 = $35; } else { break L4; } } $16 = HEAP32[$3>>2]|0; $17 = ((($3)) + 8|0); $18 = HEAP32[$17>>2]|0; $19 = (_World_SafeGetBlock($16,$$029,$18)|0); $20 = $19&65535; $21 = (1115412 + ($20)|0); $22 = HEAP8[$21>>0]|0; $23 = ($22<<24>>24)==(2); if ($23) { $24 = (((1134612 + (($20*12)|0)|0)) + 4|0); $25 = +HEAPF32[$24>>2]; $28 = $25; } else { $28 = 0.0; } $26 = (+($$029|0)); $27 = $28 + $26; $29 = $27 + 0.0010000000474974513; $30 = ((($2)) + 4|0); HEAPF32[$30>>2] = $29; } } } while(0); $38 = ((($2)) + 4|0); $39 = +HEAPF32[$38>>2]; $40 = $39 + 0.125; HEAPF32[$38>>2] = $40; $41 = ((($0)) + 28|0); HEAP8[$41>>0] = 7; ;HEAP32[$0>>2]=HEAP32[$2>>2]|0;HEAP32[$0+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[$2+8>>2]|0; $42 = HEAP32[(1784288)>>2]|0; $43 = ((($0)) + 16|0); HEAP32[$43>>2] = $42; $44 = HEAP32[(1784292)>>2]|0; $45 = ((($0)) + 12|0); HEAP32[$45>>2] = $44; $46 = HEAP32[445943]|0; $47 = ((($46)) + 8|0); $48 = HEAP32[$47>>2]|0; FUNCTION_TABLE_vii[$48 & 255](1783772,$0); HEAPF32[(1783808)>>2] = 0.0; HEAPF32[(1783812)>>2] = 0.0; HEAPF32[(1783816)>>2] = 0.0; _Entity_GetBounds(1783772,$1); $49 = ((($1)) + 4|0); $50 = +HEAPF32[$49>>2]; $51 = $50 + -0.0099999997764825821; HEAPF32[$49>>2] = $51; $52 = ((($1)) + 16|0); HEAPF32[$52>>2] = $51; $53 = (_Entity_TouchesAny($1,8)|0); HEAP8[(1783883)>>0] = $53; STACKTOP = sp;return; } function _LocalPlayer_IsSolidCollide($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1115412 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(2); $5 = $4&1; return ($5|0); } function _LocalPlayer_HandleSetSpawn() { var $$0 = 0, $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0; var label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1784315)>>0]|0; $1 = ($0<<24>>24)==(0); if (!($1)) { $2 = HEAP8[(1784316)>>0]|0; $3 = HEAP8[(1783883)>>0]|0; $4 = $3 | $2; $5 = ($4<<24>>24)==(0); if ($5) { _Chat_AddRaw(27855); $$0 = 0; return ($$0|0); } $6 = ($2<<24>>24)==(0); if ($6) { ;HEAP32[(1784264)>>2]=HEAP32[(1783776)>>2]|0;HEAP32[(1784264)+4>>2]=HEAP32[(1783776)+4>>2]|0;HEAP32[(1784264)+8>>2]=HEAP32[(1783776)+8>>2]|0; } else { $7 = +HEAPF32[(1783776)>>2]; $8 = (_Math_Floor($7)|0); $9 = (+($8|0)); $10 = $9 + 0.5; HEAPF32[(1784264)>>2] = $10; $11 = HEAP32[(1783780)>>2]|0; HEAP32[(1784268)>>2] = $11; $12 = +HEAPF32[(1783784)>>2]; $13 = (_Math_Floor($12)|0); $14 = (+($13|0)); $15 = $14 + 0.5; HEAPF32[(1784272)>>2] = $15; } $16 = HEAP32[(1783792)>>2]|0; HEAP32[(1784288)>>2] = $16; $17 = HEAP32[(1783788)>>2]|0; HEAP32[(1784292)>>2] = $17; } $18 = (_LocalPlayer_HandleRespawn()|0); $$0 = $18; return ($$0|0); } function _LocalPlayer_HandleFly() { var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1784314)>>0]|0; $1 = ($0<<24>>24)==(0); $2 = HEAP8[(1784310)>>0]|0; $3 = ($2<<24>>24)==(0); $or$cond = $1 | $3; if (!($or$cond)) { $4 = HEAP8[(1784335)>>0]|0; $5 = ($4<<24>>24)==(0); $6 = $5&1; _HacksComp_SetFlying((1784300),$6); $$0 = 1; return ($$0|0); } $7 = HEAP8[(1784613)>>0]|0; $8 = ($7<<24>>24)==(0); if (!($8)) { $$0 = 0; return ($$0|0); } HEAP8[(1784613)>>0] = 1; $9 = HEAP8[1972823]|0; $10 = ($9<<24>>24)==(0); if ($10) { $$0 = 0; return ($$0|0); } _Chat_AddRaw(27905); $$0 = 0; return ($$0|0); } function _LocalPlayer_HandleNoclip() { var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1784316)>>0]|0; $1 = ($0<<24>>24)==(0); $2 = HEAP8[(1784310)>>0]|0; $3 = ($2<<24>>24)==(0); $or$cond = $1 | $3; if ($or$cond) { $9 = HEAP8[(1784614)>>0]|0; $10 = ($9<<24>>24)==(0); if (!($10)) { $$0 = 0; return ($$0|0); } HEAP8[(1784614)>>0] = 1; $11 = HEAP8[1972823]|0; $12 = ($11<<24>>24)==(0); if ($12) { $$0 = 0; return ($$0|0); } _Chat_AddRaw(27936); $$0 = 0; return ($$0|0); } else { $4 = HEAP8[(1784333)>>0]|0; $5 = ($4<<24>>24)==(0); if (!($5)) { $$0 = 1; return ($$0|0); } $6 = HEAP8[(1784334)>>0]|0; $7 = ($6<<24>>24)==(0); if (!($7)) { HEAPF32[(1783812)>>2] = 0.0; } $8 = $7&1; _HacksComp_SetNoclip((1784300),$8); $$0 = 1; return ($$0|0); } } function _LocalPlayer_HandleJump() { var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1783883)>>0]|0; $1 = HEAP8[(1784335)>>0]|0; $2 = $1 | $0; $3 = HEAP8[(1784334)>>0]|0; $4 = $2 | $3; $5 = ($4<<24>>24)==(0); if (!($5)) { $$0 = 0; return ($$0|0); } $6 = HEAP8[(1784319)>>0]|0; $7 = ($6<<24>>24)==(0); if ($7) { $11 = 0; } else { $8 = HEAP8[(1784333)>>0]|0; $9 = ($8<<24>>24)==(0); $phitmp = $9 ? 0 : 2; $11 = $phitmp; } $10 = HEAP32[(1784328)>>2]|0; $12 = ($11|0)<($10|0); $13 = (($10) + -1)|0; $14 = $12 ? $13 : $11; $15 = HEAP32[(1784584)>>2]|0; $16 = ($15|0)<($14|0); if (!($16)) { $$0 = 1; return ($$0|0); } _PhysicsComp_DoNormalJump((1784580)); $17 = HEAP32[(1784584)>>2]|0; $18 = (($17) + 1)|0; HEAP32[(1784584)>>2] = $18; $$0 = 1; return ($$0|0); } function _LocalPlayer_CheckCanZoom() { var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1784314)>>0]|0; $1 = ($0<<24>>24)==(0); if ($1) { $2 = HEAP8[(1784615)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { HEAP8[(1784615)>>0] = 1; $4 = HEAP8[1972823]|0; $5 = ($4<<24>>24)==(0); if ($5) { $$0 = 0; } else { _Chat_AddRaw(27967); $$0 = 0; } } else { $$0 = 0; } } else { $$0 = 1; } return ($$0|0); } function _LocalPlayer_MoveToSpawn() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $0 = sp + 16|0; $1 = sp; $2 = ((($0)) + 28|0); HEAP8[$2>>0] = 7; ;HEAP32[$0>>2]=HEAP32[(1784264)>>2]|0;HEAP32[$0+4>>2]=HEAP32[(1784264)+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[(1784264)+8>>2]|0; $3 = HEAP32[(1784288)>>2]|0; $4 = ((($0)) + 16|0); HEAP32[$4>>2] = $3; $5 = HEAP32[(1784292)>>2]|0; $6 = ((($0)) + 12|0); HEAP32[$6>>2] = $5; $7 = HEAP32[445943]|0; $8 = ((($7)) + 8|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_vii[$9 & 255](1783772,$0); $10 = HEAP32[(1771060)>>2]|0; $11 = ((($10)) + 16|0); $12 = HEAP32[$11>>2]|0; FUNCTION_TABLE_vid[$12 & 63]($1,0.0); ;HEAP32[(1771048)>>2]=HEAP32[$1>>2]|0;HEAP32[(1771048)+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[(1771048)+8>>2]=HEAP32[$1+8>>2]|0; STACKTOP = sp;return; } function _LocalPlayer_CalcDefaultSpawn() { var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $$byval_copy = sp + 12|0; $0 = sp; $1 = HEAP32[(1103564)>>2]|0; $2 = (($1|0) / 2)&-1; $3 = (+($2|0)); $4 = $3 + 0.5; $5 = HEAP32[(1103572)>>2]|0; $6 = (($5|0) / 2)&-1; $7 = (+($6|0)); $8 = $7 + 0.5; ;HEAP32[$$byval_copy>>2]=HEAP32[(1783864)>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[(1783864)+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[(1783864)+8>>2]|0; _Respawn_FindSpawnPosition($0,$4,$8,$$byval_copy); ;HEAP32[(1784264)>>2]=HEAP32[$0>>2]|0;HEAP32[(1784264)+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[(1784264)+8>>2]=HEAP32[$0+8>>2]|0; HEAPF32[(1784288)>>2] = 0.0; HEAPF32[(1784292)>>2] = 0.0; STACKTOP = sp;return; } function _NetPlayer_Init($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Mem_Set($0,0,872); _Entity_Init($0); HEAP32[$0>>2] = 14136; return; } function _NetPlayer_Tick($0,$1) { $0 = $0|0; $1 = +$1; var $$byval_copy = 0, $$byval_copy1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $$byval_copy1 = sp + 12|0; $$byval_copy = sp; $2 = ((($0)) + 492|0); _NetInterpComp_AdvanceState($2,$0); _Entity_CheckSkin($0); $3 = ((($0)) + 428|0); $4 = ((($0)) + 460|0); ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$3+8>>2]|0; ;HEAP32[$$byval_copy1>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$4+8>>2]|0; _AnimatedComp_Update($0,$$byval_copy,$$byval_copy1,$1); STACKTOP = sp;return; } function _NetPlayer_SetLocation($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 492|0); _NetInterpComp_SetLocation($2,$1,$0); return; } function _NetPlayer_RenderModel($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = +$2; var $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 4|0); $4 = ((($0)) + 428|0); $5 = ((($0)) + 460|0); _Vec3_Lerp($3,$4,$5,$2); _Entity_LerpAngles($0,$2); _AnimatedComp_GetCurrent($0,$2); $6 = (_Model_ShouldRender($0)|0); $7 = ((($0)) + 55|0); HEAP8[$7>>0] = $6; $8 = ($6<<24>>24)==(0); if ($8) { return; } $9 = ((($0)) + 48|0); $10 = HEAP32[$9>>2]|0; _Model_Render($10,$0); return; } function _NetPlayer_RenderName($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 55|0); $2 = HEAP8[$1>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } $4 = (+_Model_RenderDistance($0)); $5 = HEAP8[(1783768)>>0]|0; $6 = ($5<<24>>24)==(4); $7 = $6 ? 67108864.0 : 1024.0; $8 = !($4 <= $7); if ($8) { return; } _DrawName($0); return; } function _AnimatedComp_Update($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = +$3; var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0; var $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0; var $49 = 0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0, $phitmp = 0, $phitmp41 = 0, $phitmp42 = 0, $storemerge = 0.0; var label = 0, sp = 0; sp = STACKTOP; $4 = +HEAPF32[$2>>2]; $5 = +HEAPF32[$1>>2]; $6 = $4 - $5; $7 = ((($2)) + 8|0); $8 = +HEAPF32[$7>>2]; $9 = ((($1)) + 8|0); $10 = +HEAPF32[$9>>2]; $11 = $8 - $10; $12 = $6 * $6; $13 = $11 * $11; $14 = $12 + $13; $15 = (+Math_sqrt((+$14))); $16 = ((($0)) + 220|0); $17 = HEAP32[$16>>2]|0; $18 = ((($0)) + 216|0); HEAP32[$18>>2] = $17; $19 = ((($0)) + 228|0); $20 = HEAP32[$19>>2]|0; $21 = ((($0)) + 224|0); HEAP32[$21>>2] = $20; $22 = $15 > 0.05000000074505806; if ($22) { $23 = $15 * 2.0; $24 = $3 * 20.0; $25 = $24; $26 = $23 * $25; $27 = +HEAPF32[$16>>2]; $28 = $26 + $27; HEAPF32[$16>>2] = $28; $29 = $3; $30 = $29 * 3.0; $31 = +HEAPF32[$19>>2]; $32 = $30 + $31; $storemerge = $32; } else { $33 = $3; $34 = $33 * 3.0; $35 = +HEAPF32[$19>>2]; $36 = $35 - $34; $storemerge = $36; } $37 = $storemerge < 0.0; $38 = $37 ? 0.0 : $storemerge; $39 = $38 > 1.0; $40 = $39 ? 1.0 : $38; HEAPF32[$19>>2] = $40; $41 = ((($0)) + 236|0); $42 = HEAP32[$41>>2]|0; $43 = ((($0)) + 232|0); HEAP32[$43>>2] = $42; $44 = ((($0)) + 111|0); $45 = HEAP8[1972844]|0; $46 = ($45<<24>>24)==(0); if ($46) { $49 = 1; } else { $47 = HEAP8[$44>>0]|0; $48 = ($47<<24>>24)==(0); $phitmp = $48&1; $49 = $phitmp; } _AnimatedComp_DoTilt($41,$49); $50 = HEAP8[1972844]|0; $51 = ($50<<24>>24)==(0); if ($51) { $54 = 1; } else { $52 = HEAP8[$44>>0]|0; $53 = ($52<<24>>24)==(0); $phitmp41 = $53&1; $54 = $phitmp41; } _AnimatedComp_DoTilt($41,$54); $55 = HEAP8[1972844]|0; $56 = ($55<<24>>24)==(0); if ($56) { $59 = 1; _AnimatedComp_DoTilt($41,$59); return; } $57 = HEAP8[$44>>0]|0; $58 = ($57<<24>>24)==(0); $phitmp42 = $58&1; $59 = $phitmp42; _AnimatedComp_DoTilt($41,$59); return; } function _AnimatedComp_DoTilt($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, $storemerge = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(0); $3 = +HEAPF32[$0>>2]; $4 = $3 + 0.10000000149011612; $5 = $3 * 0.8399999737739563; $storemerge = $2 ? $4 : $5; $6 = $storemerge < 0.0; $7 = $6 ? 0.0 : $storemerge; $8 = $7 > 1.0; $9 = $8 ? 1.0 : $7; HEAPF32[$0>>2] = $9; return; } function _AnimatedComp_GetCurrent($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0.0; var $29 = 0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0; var $47 = 0, $48 = 0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0; var $65 = 0.0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0.0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0.0, $80 = 0, $9 = 0.0, $or$cond = 0; var label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 192|0); $3 = +HEAPF64[(1084992)>>3]; $4 = $3; $5 = $4 * 1.2566370964050293; $6 = (+_Math_SinF($5)); $7 = $6 * 0.052359879016876221; $8 = $4 * 1.7951958179473877; $9 = (+_Math_CosF($8)); $10 = $9 * 0.052359879016876221; $11 = $10 + 0.052359879016876221; $12 = ((($0)) + 224|0); $13 = +HEAPF32[$12>>2]; $14 = ((($0)) + 228|0); $15 = +HEAPF32[$14>>2]; $16 = (+_Math_Lerp($13,$15,$1)); $17 = ((($0)) + 208|0); HEAPF32[$17>>2] = $16; $18 = ((($0)) + 216|0); $19 = +HEAPF32[$18>>2]; $20 = ((($0)) + 220|0); $21 = +HEAPF32[$20>>2]; $22 = (+_Math_Lerp($19,$21,$1)); $23 = ((($0)) + 204|0); HEAPF32[$23>>2] = $22; $24 = ((($0)) + 232|0); $25 = +HEAPF32[$24>>2]; $26 = ((($0)) + 236|0); $27 = +HEAPF32[$26>>2]; $28 = (+_Math_Lerp($25,$27,$1)); $29 = ((($0)) + 212|0); HEAPF32[$29>>2] = $28; $30 = +HEAPF32[$23>>2]; $31 = (+_Math_CosF($30)); $32 = +HEAPF32[$17>>2]; $33 = $31 * $32; $34 = $33 * 1.0471975803375244; $35 = $34 - $7; $36 = ((($0)) + 256|0); HEAPF32[$36>>2] = $35; $37 = - $11; $38 = ((($0)) + 260|0); HEAPF32[$38>>2] = $37; $39 = +HEAPF32[$23>>2]; $40 = (+_Math_CosF($39)); $41 = +HEAPF32[$17>>2]; $42 = $40 * $41; $43 = $42 * 1.3962633609771729; $44 = - $43; $45 = ((($0)) + 240|0); HEAPF32[$45>>2] = $44; $46 = ((($0)) + 244|0); HEAPF32[$46>>2] = 0.0; $47 = ((($0)) + 248|0); HEAPF32[$47>>2] = $43; $48 = ((($0)) + 252|0); HEAPF32[$48>>2] = -0.0; $49 = +HEAPF32[$36>>2]; $50 = - $49; $51 = ((($0)) + 264|0); HEAPF32[$51>>2] = $50; $52 = +HEAPF32[$38>>2]; $53 = - $52; $54 = ((($0)) + 268|0); HEAPF32[$54>>2] = $53; $55 = +HEAPF32[$23>>2]; $56 = (+_Math_CosF($55)); $57 = +HEAPF32[$17>>2]; $58 = $56 * $57; $59 = $58 * 0.15625; HEAPF32[$2>>2] = $59; $60 = +HEAPF32[$23>>2]; $61 = (+_Math_SinF($60)); $62 = (+Math_abs((+$61))); $63 = +HEAPF32[$17>>2]; $64 = $62 * $63; $65 = $64 * 0.15625; $66 = ((($0)) + 196|0); HEAPF32[$66>>2] = $65; $67 = +HEAPF32[$23>>2]; $68 = (+_Math_CosF($67)); $69 = (+Math_abs((+$68))); $70 = +HEAPF32[$17>>2]; $71 = $69 * $70; $72 = $71 * 0.25; $73 = ((($0)) + 200|0); HEAPF32[$73>>2] = $72; $74 = ((($0)) + 48|0); $75 = HEAP32[$74>>2]|0; $76 = ((($75)) + 45|0); $77 = HEAP8[$76>>0]|0; $78 = ($77<<24>>24)==(0); $79 = HEAP8[1972838]|0; $80 = ($79<<24>>24)!=(0); $or$cond = $78 | $80; if ($or$cond) { return; } _AnimatedComp_CalcHumanAnim($2,$7,$11); return; } function _AnimatedComp_CalcHumanAnim($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = +$2; var $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, label = 0, sp = 0; sp = STACKTOP; _AnimatedComp_PerpendicularAnim($0,0.23000000417232513,$1,$2,1); _AnimatedComp_PerpendicularAnim($0,0.2800000011920929,$1,$2,0); $3 = ((($0)) + 72|0); $4 = +HEAPF32[$3>>2]; $5 = - $4; HEAPF32[$3>>2] = $5; $6 = ((($0)) + 76|0); $7 = +HEAPF32[$6>>2]; $8 = - $7; HEAPF32[$6>>2] = $8; return; } function _AnimatedComp_PerpendicularAnim($0,$1,$2,$3,$4) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; $4 = $4|0; var $$sink = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $5 = 0; var $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $5 = ((($0)) + 12|0); $6 = +HEAPF32[$5>>2]; $7 = $6 * $1; $8 = (+_Math_SinF($7)); $9 = $8 * 0.5; $10 = $9 + 0.5; $11 = +HEAPF32[$5>>2]; $12 = (+_Math_CosF($11)); $13 = - $3; $14 = ((($0)) + 16|0); $15 = +HEAPF32[$14>>2]; $16 = $10 * $15; $17 = $16 * 1.9198621511459351; $18 = $13 - $17; $19 = $12 * $15; $20 = $19 * 1.0471975803375244; $21 = $20 * 1.5; $22 = $21 + $2; $23 = ($4<<24>>24)==(0); if ($23) { $26 = ((($0)) + 72|0); HEAPF32[$26>>2] = $22; $27 = ((($0)) + 76|0); $$sink = $27; HEAPF32[$$sink>>2] = $18; return; } else { $24 = ((($0)) + 64|0); HEAPF32[$24>>2] = $22; $25 = ((($0)) + 68|0); $$sink = $25; HEAPF32[$$sink>>2] = $18; return; } } function _TiltComp_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; HEAPF32[$0>>2] = 0.0; $1 = ((($0)) + 4|0); HEAPF32[$1>>2] = 0.0; $2 = ((($0)) + 8|0); HEAPF32[$2>>2] = 1.0; $3 = ((($0)) + 12|0); HEAPF32[$3>>2] = 1.0; $4 = ((($0)) + 16|0); HEAPF32[$4>>2] = 1.0; return; } function _TiltComp_Update($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 16|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 12|0); HEAP32[$4>>2] = $3; $5 = HEAP8[(1784301)>>0]|0; _AnimatedComp_DoTilt($2,$5); $6 = HEAP8[(1784301)>>0]|0; _AnimatedComp_DoTilt($2,$6); $7 = HEAP8[(1784301)>>0]|0; _AnimatedComp_DoTilt($2,$7); return; } function _TiltComp_GetCurrent($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 12|0); $3 = +HEAPF32[$2>>2]; $4 = ((($0)) + 16|0); $5 = +HEAPF32[$4>>2]; $6 = (+_Math_Lerp($3,$5,$1)); $7 = ((($0)) + 8|0); HEAPF32[$7>>2] = $6; $8 = +HEAPF32[(1783976)>>2]; $9 = (+_Math_CosF($8)); $10 = +HEAPF32[(1783980)>>2]; $11 = $9 * $10; $12 = $11 * 0.0026179938577115536; HEAPF32[$0>>2] = $12; $13 = +HEAPF32[(1783976)>>2]; $14 = (+_Math_SinF($13)); $15 = +HEAPF32[(1783980)>>2]; $16 = $14 * $15; $17 = $16 * 0.0026179938577115536; $18 = ((($0)) + 4|0); HEAPF32[$18>>2] = $17; return; } function _HacksComp_Init($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Mem_Set($0,0,180); _HacksComp_SetAll($0,1); $1 = ((($0)) + 4|0); HEAPF32[$1>>2] = 10.0; $2 = ((($0)) + 10|0); HEAP8[$2>>0] = 1; HEAP8[$0>>0] = 1; $3 = ((($0)) + 18|0); HEAP8[$3>>0] = 1; $4 = ((($0)) + 19|0); HEAP8[$4>>0] = 1; $5 = ((($0)) + 24|0); HEAPF32[$5>>2] = 1.0; $6 = ((($0)) + 40|0); HEAPF32[$6>>2] = 1.0; $7 = ((($0)) + 28|0); HEAP32[$7>>2] = 1; $8 = ((($0)) + 32|0); HEAP8[$8>>0] = 1; $9 = ((($0)) + 20|0); HEAP8[$9>>0] = 1; $10 = ((($0)) + 52|0); $11 = ((($0)) + 44|0); HEAP32[$11>>2] = $10; $12 = ((($0)) + 48|0); HEAP16[$12>>1] = 0; $13 = ((($0)) + 50|0); HEAP16[$13>>1] = 128; return; } function _HacksComp_SetAll($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 11|0); $3 = ($1<<24>>24)==(0); _memset(($2|0),($1|0),7)|0; if ($3) { $7 = 0; } else { $4 = HEAP8[$0>>0]|0; $5 = ($4<<24>>24)!=(0); $phitmp = $5&1; $7 = $phitmp; } $6 = ((($0)) + 18|0); HEAP8[$6>>0] = $7; return; } function _HacksComp_CanJumpHigher($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 10|0); $2 = HEAP8[$1>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { $7 = 0; return ($7|0); } $4 = ((($0)) + 13|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)!=(0); $phitmp = $6&1; $7 = $phitmp; return ($7|0); } function _HacksComp_RecheckFlags($0) { $0 = $0|0; var $$lobit = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $1 = ((($0)) + 44|0); $2 = (_String_IndexOfConst($1,28024)|0); $$lobit = (31)?($2 >>> 31):($2); $3 = $$lobit&255; _HacksComp_SetAll($0,$3); $4 = ((($0)) + 20|0); HEAP8[$4>>0] = 1; $5 = ((($0)) + 14|0); _HacksComp_ParseFlag($0,28029,28034,$5); $6 = ((($0)) + 16|0); _HacksComp_ParseFlag($0,28039,28047,$6); $7 = ((($0)) + 13|0); _HacksComp_ParseFlag($0,28055,28062,$7); $8 = ((($0)) + 15|0); _HacksComp_ParseFlag($0,28069,28078,$8); _HacksComp_ParseFlag($0,28087,28093,$4); $9 = ((($0)) + 12|0); _HacksComp_ParseFlag($0,28099,28112,$9); $10 = ((($0)) + 18|0); _HacksComp_ParseFlag($0,28125,28132,$10); $11 = HEAP8[$0>>0]|0; $12 = ($11<<24>>24)==(0); if (!($12)) { _HacksComp_ParseAllFlag($0); } $13 = (+_HacksComp_ParseFlagFloat(28139,$0)); $14 = ((($0)) + 24|0); HEAPF32[$14>>2] = $13; $15 = (+_HacksComp_ParseFlagFloat(28149,$0)); $16 = ((($0)) + 40|0); HEAPF32[$16>>2] = $15; $17 = (_HacksComp_ParseFlagInt($0)|0); $18 = ((($0)) + 28|0); HEAP32[$18>>2] = $17; _HacksComp_Update($0); return; } function _HacksComp_ParseFlag($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$sink = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 44|0); $5 = (_String_IndexOfConst($4,$1)|0); $6 = ($5|0)>(-1); if ($6) { $$sink = 1; } else { $7 = (_String_IndexOfConst($4,$2)|0); $8 = ($7|0)>(-1); if ($8) { $$sink = 0; } else { return; } } HEAP8[$3>>0] = $$sink; return; } function _HacksComp_ParseAllFlag($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 44|0); $2 = (_String_IndexOfConst($1,28166)|0); $3 = ($2|0)>(-1); if ($3) { _HacksComp_SetAll($0,1); return; } $4 = (_String_IndexOfConst($1,28173)|0); $5 = ($4|0)>(-1); if (!($5)) { return; } _HacksComp_SetAll($0,0); return; } function _HacksComp_ParseFlagFloat($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0.0, $10 = 0, $11 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $spec$select = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 8|0; $3 = sp; _HacksComp_UNSAFE_FlagValue($2,$0,$1); $4 = ((($2)) + 4|0); $5 = HEAP16[$4>>1]|0; $6 = ($5<<16>>16)!=(0); $7 = HEAP8[1972839]|0; $8 = ($7<<24>>24)==(0); $or$cond = $6 & $8; if (!($or$cond)) { $$0 = 1.0; STACKTOP = sp;return (+$$0); } $9 = (_Convert_ParseFloat($2,$3)|0); $10 = ($9<<24>>24)==(0); $11 = +HEAPF32[$3>>2]; $spec$select = $10 ? 1.0 : $11; $$0 = $spec$select; STACKTOP = sp;return (+$$0); } function _HacksComp_ParseFlagInt($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 8|0; $2 = sp; _HacksComp_UNSAFE_FlagValue($1,28159,$0); $3 = ((($1)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = ($4<<16>>16)!=(0); $6 = HEAP8[1972839]|0; $7 = ($6<<24>>24)==(0); $or$cond = $5 & $7; if (!($or$cond)) { $$0 = 1; STACKTOP = sp;return ($$0|0); } $8 = (_Convert_ParseInt($1,$2)|0); $9 = ($8<<24>>24)==(0); $10 = HEAP32[$2>>2]|0; $spec$select = $9 ? 1 : $10; $$0 = $spec$select; STACKTOP = sp;return ($$0|0); } function _HacksComp_Update($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 14|0); $2 = HEAP8[$1>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { label = 3; } else { $4 = ((($0)) + 10|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(0); if ($6) { label = 3; } } if ((label|0) == 3) { _HacksComp_SetFlying($0,0); $7 = ((($0)) + 37|0); HEAP8[$7>>0] = 0; $8 = ((($0)) + 36|0); HEAP8[$8>>0] = 0; } $9 = ((($0)) + 16|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==(0); if ($11) { label = 6; } else { $12 = ((($0)) + 10|0); $13 = HEAP8[$12>>0]|0; $14 = ($13<<24>>24)==(0); if ($14) { label = 6; } } if ((label|0) == 6) { _HacksComp_SetNoclip($0,0); } $15 = ((($0)) + 13|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(0); if ($17) { label = 9; } else { $18 = ((($0)) + 10|0); $19 = HEAP8[$18>>0]|0; $20 = ($19<<24>>24)==(0); if ($20) { label = 9; } } if ((label|0) == 9) { $21 = ((($0)) + 38|0); HEAP8[$21>>0] = 0; $22 = ((($0)) + 39|0); HEAP8[$22>>0] = 0; } $23 = ((($0)) + 10|0); $24 = HEAP8[$23>>0]|0; $25 = ($24<<24>>24)!=(0); $26 = ($16<<24>>24)!=(0); $narrow = $26 & $25; $spec$select = $narrow&1; $27 = ((($0)) + 19|0); HEAP8[$27>>0] = $spec$select; _Event_RaiseVoid((1794308)); return; } function _HacksComp_SetFlying($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 35|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==($1<<24>>24); if ($4) { return; } HEAP8[$2>>0] = $1; _Event_RaiseVoid((1794828)); return; } function _HacksComp_SetNoclip($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 34|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==($1<<24>>24); if ($4) { return; } HEAP8[$2>>0] = $1; _Event_RaiseVoid((1794828)); return; } function _HacksComp_UNSAFE_FlagValue($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($2)) + 44|0); $4 = (_String_IndexOfConst($3,$1)|0); $5 = ($4|0)<(0); if ($5) { $6 = 1949280; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = $0; $13 = $12; HEAP32[$13>>2] = $8; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; return; } $16 = (_String_Length($1)|0); $17 = (($16) + ($4))|0; $18 = (_String_IndexOfAt($3,$17,32)|0); $19 = ($18|0)<(0); if ($19) { $20 = ((($2)) + 48|0); $21 = HEAP16[$20>>1]|0; $22 = $21&65535; $$0 = $22; } else { $$0 = $18; } $23 = (($$0) - ($17))|0; _String_UNSAFE_Substring($0,$3,$17,$23); return; } function _HacksComp_CalcSpeedFactor($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0.0, $$09 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(0); if ($2) { $$09 = 0.0; return (+$$09); } $3 = ((($0)) + 39|0); $4 = HEAP8[$3>>0]|0; $5 = ($4<<24>>24)==(0); if ($5) { $$0 = 0.0; } else { $6 = ((($0)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = $7 * 0.5; $9 = $8 + 0.0; $$0 = $9; } $10 = ((($0)) + 38|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(0); if ($12) { $$09 = $$0; return (+$$09); } $13 = ((($0)) + 4|0); $14 = +HEAPF32[$13>>2]; $15 = $$0 + $14; $$09 = $15; return (+$$09); } function _NetInterpComp_SetLocation($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$byval_copy1 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$4$0$$sroa_idx31 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$8$0$$sroa_idx36 = 0, $$sroa$8$0$copyload = 0.0, $$sroa$9$0$$sroa_idx38 = 0, $$sroa$9$0$copyload = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $20 = 0.0; var $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0; var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0; var $58 = 0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $$byval_copy1 = sp + 16|0; $3 = sp; $$sroa$0$0$$sroa_idx = ((($0)) + 76|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$4$0$$sroa_idx31 = ((($0)) + 80|0); $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx31>>2]; $$sroa$8$0$$sroa_idx36 = ((($0)) + 84|0); $$sroa$8$0$copyload = +HEAPF32[$$sroa$8$0$$sroa_idx36>>2]; $$sroa$9$0$$sroa_idx38 = ((($0)) + 88|0); $$sroa$9$0$copyload = +HEAPF32[$$sroa$9$0$$sroa_idx38>>2]; $4 = ((($0)) + 76|0); $5 = ((($1)) + 28|0); $6 = HEAP8[$5>>0]|0; $7 = $6&255; $8 = $7 & 128; $9 = $7 & 1; $10 = ($9|0)==(0); if (!($10)) { $11 = $7 & 96; _NetInterpComp_SetPosition($0,$1,$2,$11); } $12 = $7 & 8; $13 = ($12|0)==(0); if (!($13)) { $14 = ((($1)) + 20|0); $15 = +HEAPF32[$14>>2]; $16 = (+_Math_ClampAngle($15)); HEAPF32[$$sroa$8$0$$sroa_idx36>>2] = $16; } $17 = $7 & 16; $18 = ($17|0)==(0); if (!($18)) { $19 = ((($1)) + 24|0); $20 = +HEAPF32[$19>>2]; $21 = (+_Math_ClampAngle($20)); HEAPF32[$$sroa$9$0$$sroa_idx38>>2] = $21; } $22 = $7 & 2; $23 = ($22|0)==(0); if (!($23)) { $24 = ((($1)) + 12|0); $25 = +HEAPF32[$24>>2]; $26 = (+_Math_ClampAngle($25)); HEAPF32[$4>>2] = $26; } $27 = $7 & 4; $28 = ($27|0)==(0); if (!($28)) { $29 = ((($1)) + 16|0); $30 = +HEAPF32[$29>>2]; $31 = (+_Math_ClampAngle($30)); HEAPF32[$$sroa$4$0$$sroa_idx31>>2] = $31; } $32 = ($8|0)==(0); if ($32) { $33 = HEAP32[$4>>2]|0; $34 = ((($2)) + 440|0); HEAP32[$34>>2] = $33; $35 = HEAP32[$$sroa$4$0$$sroa_idx31>>2]|0; $36 = ((($2)) + 444|0); HEAP32[$36>>2] = $35; $37 = HEAP32[$$sroa$8$0$$sroa_idx36>>2]|0; $38 = ((($2)) + 448|0); HEAP32[$38>>2] = $37; $39 = HEAP32[$$sroa$9$0$$sroa_idx38>>2]|0; $40 = ((($2)) + 456|0); HEAP32[$40>>2] = $39; $41 = ((($2)) + 452|0); HEAP32[$41>>2] = $35; $42 = ((($2)) + 472|0); HEAP32[$42>>2] = $33; $43 = ((($2)) + 476|0); HEAP32[$43>>2] = $35; $44 = ((($2)) + 480|0); HEAP32[$44>>2] = $37; $45 = ((($2)) + 488|0); HEAP32[$45>>2] = $39; $46 = ((($2)) + 484|0); HEAP32[$46>>2] = $35; HEAP32[$0>>2] = 0; $47 = ((($0)) + 96|0); HEAP32[$47>>2] = 0; STACKTOP = sp;return; } else { $48 = +HEAPF32[$$sroa$8$0$$sroa_idx36>>2]; $49 = (+_Math_LerpAngle($$sroa$8$0$copyload,$48,0.5)); $50 = ((($3)) + 8|0); HEAPF32[$50>>2] = $49; $51 = +HEAPF32[$$sroa$9$0$$sroa_idx38>>2]; $52 = (+_Math_LerpAngle($$sroa$9$0$copyload,$51,0.5)); $53 = ((($3)) + 12|0); HEAPF32[$53>>2] = $52; $54 = +HEAPF32[$4>>2]; $55 = (+_Math_LerpAngle($$sroa$0$0$copyload,$54,0.5)); HEAPF32[$3>>2] = $55; $56 = +HEAPF32[$$sroa$4$0$$sroa_idx31>>2]; $57 = (+_Math_LerpAngle($$sroa$4$0$copyload,$56,0.5)); $58 = ((($3)) + 4|0); HEAPF32[$58>>2] = $57; ;HEAP32[$$byval_copy1>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$3+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$3+12>>2]|0; _NetInterpComp_AddAngles($0,$$byval_copy1); ;HEAP32[$$byval_copy1>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$4+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$4+12>>2]|0; _NetInterpComp_AddAngles($0,$$byval_copy1); $59 = +HEAPF32[$$sroa$4$0$$sroa_idx31>>2]; $60 = (+_Math_LerpAngle($$sroa$4$0$copyload,$59,0.3333333432674408)); _InterpComp_AddRotY($0,$60); $61 = +HEAPF32[$$sroa$4$0$$sroa_idx31>>2]; $62 = (+_Math_LerpAngle($$sroa$4$0$copyload,$61,0.66666668653488159)); _InterpComp_AddRotY($0,$62); $63 = +HEAPF32[$$sroa$4$0$$sroa_idx31>>2]; $64 = (+_Math_LerpAngle($$sroa$4$0$copyload,$63,1.0)); _InterpComp_AddRotY($0,$64); STACKTOP = sp;return; } } function _NetInterpComp_SetPosition($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$byval_copy1 = 0, $10 = 0, $11 = 0, $12 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $$byval_copy1 = sp + 24|0; $4 = sp + 12|0; $5 = sp; $6 = ((($0)) + 64|0); ;HEAP32[$4>>2]=HEAP32[$6>>2]|0;HEAP32[$4+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$4+8>>2]=HEAP32[$6+8>>2]|0; $7 = ($3|0)==(0); $8 = $3 | 32; $9 = ($8|0)==(32); if ($9) { ;HEAP32[$6>>2]=HEAP32[$1>>2]|0;HEAP32[$6+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$6+8>>2]=HEAP32[$1+8>>2]|0; } else { _Vec3_Add_374($6,$6,$1); } if ($7) { $10 = ((($2)) + 428|0); ;HEAP32[$10>>2]=HEAP32[$6>>2]|0;HEAP32[$10+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$10+8>>2]=HEAP32[$6+8>>2]|0; $11 = ((($2)) + 460|0); ;HEAP32[$11>>2]=HEAP32[$6>>2]|0;HEAP32[$11+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$11+8>>2]=HEAP32[$6+8>>2]|0; $12 = ((($0)) + 92|0); HEAP32[$12>>2] = 0; STACKTOP = sp;return; } else { _Vec3_Lerp($5,$4,$6,0.5); ;HEAP32[$$byval_copy1>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$5+8>>2]|0; _NetInterpComp_AddPosition($0,$$byval_copy1); ;HEAP32[$$byval_copy1>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$6+8>>2]|0; _NetInterpComp_AddPosition($0,$$byval_copy1); STACKTOP = sp;return; } } function _NetInterpComp_AddAngles($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 96|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(10); if ($4) { _NetInterpComp_RemoveOldestAngles($0); } $5 = HEAP32[$2>>2]|0; $6 = (($5) + 1)|0; HEAP32[$2>>2] = $6; $7 = (((($0)) + 220|0) + ($5<<4)|0); ;HEAP32[$7>>2]=HEAP32[$1>>2]|0;HEAP32[$7+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$7+8>>2]=HEAP32[$1+8>>2]|0;HEAP32[$7+12>>2]=HEAP32[$1+12>>2]|0; return; } function _InterpComp_AddRotY($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[$0>>2]|0; $3 = ($2|0)==(15); if ($3) { _InterpComp_RemoveOldestRotY($0); } $4 = HEAP32[$0>>2]|0; $5 = (((($0)) + 4|0) + ($4<<2)|0); HEAPF32[$5>>2] = $1; $6 = (($4) + 1)|0; HEAP32[$0>>2] = $6; return; } function _InterpComp_RemoveOldestRotY($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 8|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 4|0); HEAP32[$3>>2] = $2; $4 = ((($0)) + 12|0); $5 = HEAP32[$4>>2]|0; $6 = ((($0)) + 8|0); HEAP32[$6>>2] = $5; $7 = ((($0)) + 16|0); $8 = HEAP32[$7>>2]|0; $9 = ((($0)) + 12|0); HEAP32[$9>>2] = $8; $10 = ((($0)) + 20|0); $11 = HEAP32[$10>>2]|0; $12 = ((($0)) + 16|0); HEAP32[$12>>2] = $11; $13 = ((($0)) + 24|0); $14 = HEAP32[$13>>2]|0; $15 = ((($0)) + 20|0); HEAP32[$15>>2] = $14; $16 = ((($0)) + 28|0); $17 = HEAP32[$16>>2]|0; $18 = ((($0)) + 24|0); HEAP32[$18>>2] = $17; $19 = ((($0)) + 32|0); $20 = HEAP32[$19>>2]|0; $21 = ((($0)) + 28|0); HEAP32[$21>>2] = $20; $22 = ((($0)) + 36|0); $23 = HEAP32[$22>>2]|0; $24 = ((($0)) + 32|0); HEAP32[$24>>2] = $23; $25 = ((($0)) + 40|0); $26 = HEAP32[$25>>2]|0; $27 = ((($0)) + 36|0); HEAP32[$27>>2] = $26; $28 = ((($0)) + 44|0); $29 = HEAP32[$28>>2]|0; $30 = ((($0)) + 40|0); HEAP32[$30>>2] = $29; $31 = ((($0)) + 48|0); $32 = HEAP32[$31>>2]|0; $33 = ((($0)) + 44|0); HEAP32[$33>>2] = $32; $34 = ((($0)) + 52|0); $35 = HEAP32[$34>>2]|0; $36 = ((($0)) + 48|0); HEAP32[$36>>2] = $35; $37 = ((($0)) + 56|0); $38 = HEAP32[$37>>2]|0; $39 = ((($0)) + 52|0); HEAP32[$39>>2] = $38; $40 = ((($0)) + 60|0); $41 = HEAP32[$40>>2]|0; $42 = ((($0)) + 56|0); HEAP32[$42>>2] = $41; $43 = ((($0)) + 64|0); $44 = HEAP32[$43>>2]|0; $45 = ((($0)) + 60|0); HEAP32[$45>>2] = $44; $46 = HEAP32[$0>>2]|0; $47 = (($46) + -1)|0; HEAP32[$0>>2] = $47; return; } function _NetInterpComp_RemoveOldestAngles($0) { $0 = $0|0; var $$08 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 96|0); $2 = HEAP32[$1>>2]|0; $3 = (($2) + -1)|0; HEAP32[$1>>2] = $3; $4 = ($2|0)>(1); if (!($4)) { return; } $$08 = 0; while(1) { $5 = (((($0)) + 220|0) + ($$08<<4)|0); $6 = (($$08) + 1)|0; $7 = (((($0)) + 220|0) + ($6<<4)|0); ;HEAP32[$5>>2]=HEAP32[$7>>2]|0;HEAP32[$5+4>>2]=HEAP32[$7+4>>2]|0;HEAP32[$5+8>>2]=HEAP32[$7+8>>2]|0;HEAP32[$5+12>>2]=HEAP32[$7+12>>2]|0; $exitcond = ($6|0)==($3|0); if ($exitcond) { break; } else { $$08 = $6; } } return; } function _Vec3_Add_374($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 + $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 + $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 + $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _NetInterpComp_AddPosition($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 92|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(10); if ($4) { _NetInterpComp_RemoveOldestPosition($0); } $5 = HEAP32[$2>>2]|0; $6 = (($5) + 1)|0; HEAP32[$2>>2] = $6; $7 = (((($0)) + 100|0) + (($5*12)|0)|0); ;HEAP32[$7>>2]=HEAP32[$1>>2]|0;HEAP32[$7+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$7+8>>2]=HEAP32[$1+8>>2]|0; return; } function _NetInterpComp_RemoveOldestPosition($0) { $0 = $0|0; var $$08 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); $2 = HEAP32[$1>>2]|0; $3 = (($2) + -1)|0; HEAP32[$1>>2] = $3; $4 = ($2|0)>(1); if (!($4)) { return; } $$08 = 0; while(1) { $5 = (((($0)) + 100|0) + (($$08*12)|0)|0); $6 = (($$08) + 1)|0; $7 = (((($0)) + 100|0) + (($6*12)|0)|0); ;HEAP32[$5>>2]=HEAP32[$7>>2]|0;HEAP32[$5+4>>2]=HEAP32[$7+4>>2]|0;HEAP32[$5+8>>2]=HEAP32[$7+8>>2]|0; $exitcond = ($6|0)==($3|0); if ($exitcond) { break; } else { $$08 = $6; } } return; } function _NetInterpComp_AdvanceState($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 428|0); $3 = ((($1)) + 460|0); ;HEAP32[$2>>2]=HEAP32[$3>>2]|0;HEAP32[$2+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[$3+8>>2]|0;HEAP32[$2+12>>2]=HEAP32[$3+12>>2]|0;HEAP32[$2+16>>2]=HEAP32[$3+16>>2]|0;HEAP32[$2+20>>2]=HEAP32[$3+20>>2]|0;HEAP32[$2+24>>2]=HEAP32[$3+24>>2]|0;HEAP32[$2+28>>2]=HEAP32[$3+28>>2]|0; $4 = ((($1)) + 4|0); ;HEAP32[$4>>2]=HEAP32[$3>>2]|0;HEAP32[$4+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$4+8>>2]=HEAP32[$3+8>>2]|0; $5 = ((($0)) + 92|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(0); if (!($7)) { $8 = ((($0)) + 100|0); ;HEAP32[$3>>2]=HEAP32[$8>>2]|0;HEAP32[$3+4>>2]=HEAP32[$8+4>>2]|0;HEAP32[$3+8>>2]=HEAP32[$8+8>>2]|0; _NetInterpComp_RemoveOldestPosition($0); } $9 = ((($0)) + 96|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0); if ($11) { _InterpComp_AdvanceRotY($0,$1); return; } $12 = ((($0)) + 220|0); $13 = HEAP32[$12>>2]|0; $14 = ((($1)) + 472|0); HEAP32[$14>>2] = $13; $15 = ((($0)) + 224|0); $16 = HEAP32[$15>>2]|0; $17 = ((($1)) + 476|0); HEAP32[$17>>2] = $16; $18 = ((($0)) + 228|0); $19 = HEAP32[$18>>2]|0; $20 = ((($1)) + 480|0); HEAP32[$20>>2] = $19; $21 = ((($0)) + 232|0); $22 = HEAP32[$21>>2]|0; $23 = ((($1)) + 488|0); HEAP32[$23>>2] = $22; _NetInterpComp_RemoveOldestAngles($0); _InterpComp_AdvanceRotY($0,$1); return; } function _InterpComp_AdvanceRotY($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[$0>>2]|0; $3 = ($2|0)==(0); if ($3) { return; } $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = ((($1)) + 484|0); HEAP32[$6>>2] = $5; _InterpComp_RemoveOldestRotY($0); return; } function _LocalInterpComp_SetLocation($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0.0; var $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 28|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = $4 & 128; $6 = $5&255; $7 = $4 & 1; $8 = ($7|0)==(0); if (!($8)) { $9 = $4 & 96; _LocalInterpComp_SetPosition($1,$9); } $10 = $4 & 2; $11 = ($10|0)==(0); if (!($11)) { $12 = ((($1)) + 12|0); $13 = +HEAPF32[$12>>2]; _LocalInterpComp_Angle((1784212),(1784244),$13,$6); } $14 = $4 & 8; $15 = ($14|0)==(0); if (!($15)) { $16 = ((($1)) + 20|0); $17 = +HEAPF32[$16>>2]; _LocalInterpComp_Angle((1784220),(1784252),$17,$6); } $18 = $4 & 16; $19 = ($18|0)==(0); if (!($19)) { $20 = ((($1)) + 24|0); $21 = +HEAPF32[$20>>2]; _LocalInterpComp_Angle((1784228),(1784260),$21,$6); } $22 = $4 & 4; $23 = ($22|0)==(0); if ($23) { _Entity_LerpAngles(1783772,0.0); return; } $24 = ((($1)) + 16|0); $25 = +HEAPF32[$24>>2]; _LocalInterpComp_Angle((1784216),(1784248),$25,$6); $26 = ($6<<24>>24)==(0); if ($26) { $27 = HEAP32[(1784248)>>2]|0; HEAP32[(1784256)>>2] = $27; HEAP32[$0>>2] = 0; _Entity_LerpAngles(1783772,0.0); return; } else { $28 = +HEAPF32[(1784216)>>2]; $29 = +HEAPF32[(1784248)>>2]; $30 = (+_Math_LerpAngle($28,$29,0.3333333432674408)); _InterpComp_AddRotY($0,$30); $31 = +HEAPF32[(1784216)>>2]; $32 = +HEAPF32[(1784248)>>2]; $33 = (+_Math_LerpAngle($31,$32,0.66666668653488159)); _InterpComp_AddRotY($0,$33); $34 = +HEAPF32[(1784216)>>2]; $35 = +HEAPF32[(1784248)>>2]; $36 = (+_Math_LerpAngle($34,$35,1.0)); _InterpComp_AddRotY($0,$36); $37 = ((($0)) + 4|0); $38 = HEAP32[$37>>2]|0; HEAP32[(1784256)>>2] = $38; _Entity_LerpAngles(1783772,0.0); return; } } function _LocalInterpComp_SetPosition($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0.0, $11 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)==(0); $3 = $1 | 32; $4 = ($3|0)==(32); L1: do { if ($4) { ;HEAP32[(1784232)>>2]=HEAP32[$0>>2]|0;HEAP32[(1784232)+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[(1784232)+8>>2]=HEAP32[$0+8>>2]|0; } else { switch ($1|0) { case 64: { _Vec3_Add_374((1784232),(1784232),$0); break L1; } case 96: { _Vec3_Add_374((1784200),(1784200),$0); _Vec3_Add_374((1784232),(1784232),$0); break L1; } default: { break L1; } } } } while(0); $5 = +HEAPF32[(1784236)>>2]; $6 = (_Math_Floor($5)|0); $7 = (+($6|0)); $8 = $5 - $7; $9 = $8 < 0.0010000000474974513; if ($9) { $10 = +HEAPF32[(1784236)>>2]; $11 = $10 + 0.0010000000474974513; HEAPF32[(1784236)>>2] = $11; } if (!($2)) { return; } ;HEAP32[(1784200)>>2]=HEAP32[(1784232)>>2]|0;HEAP32[(1784200)+4>>2]=HEAP32[(1784232)+4>>2]|0;HEAP32[(1784200)+8>>2]=HEAP32[(1784232)+8>>2]|0; ;HEAP32[(1783776)>>2]=HEAP32[(1784232)>>2]|0;HEAP32[(1783776)+4>>2]=HEAP32[(1784232)+4>>2]|0;HEAP32[(1783776)+8>>2]=HEAP32[(1784232)+8>>2]|0; return; } function _LocalInterpComp_Angle($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = +$2; $3 = $3|0; var $4 = 0.0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (+_Math_ClampAngle($2)); HEAPF32[$1>>2] = $4; $5 = ($3<<24>>24)==(0); if (!($5)) { return; } HEAPF32[$0>>2] = $4; return; } function _LocalInterpComp_AdvanceState($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 428|0); $3 = ((($1)) + 460|0); ;HEAP32[$2>>2]=HEAP32[$3>>2]|0;HEAP32[$2+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[$3+8>>2]|0;HEAP32[$2+12>>2]=HEAP32[$3+12>>2]|0;HEAP32[$2+16>>2]=HEAP32[$3+16>>2]|0;HEAP32[$2+20>>2]=HEAP32[$3+20>>2]|0;HEAP32[$2+24>>2]=HEAP32[$3+24>>2]|0;HEAP32[$2+28>>2]=HEAP32[$3+28>>2]|0; $4 = ((($1)) + 4|0); ;HEAP32[$4>>2]=HEAP32[$3>>2]|0;HEAP32[$4+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$4+8>>2]=HEAP32[$3+8>>2]|0; _InterpComp_AdvanceRotY($0,$1); return; } function _ShadowComponent_Draw($0) { $0 = $0|0; var $$0 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$6$0$$sroa_idx51 = 0, $$sroa$6$0$copyload = 0.0, $$sroa$9$0$$sroa_idx55 = 0, $$sroa$9$0$copyload = 0.0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0; var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0; var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0.0, $56 = 0, $57 = 0; var $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $8 = 0, $9 = 0, $brmerge$demorgan = 0, $phitmp = 0.0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 3120|0; $1 = sp + 32|0; $2 = sp + 3104|0; $3 = sp; $$sroa$0$0$$sroa_idx = ((($0)) + 4|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$6$0$$sroa_idx51 = ((($0)) + 8|0); $$sroa$6$0$copyload = +HEAPF32[$$sroa$6$0$$sroa_idx51>>2]; $$sroa$9$0$$sroa_idx55 = ((($0)) + 12|0); $$sroa$9$0$copyload = +HEAPF32[$$sroa$9$0$$sroa_idx55>>2]; $4 = $$sroa$6$0$copyload < 0.0; if ($4) { STACKTOP = sp;return; } $5 = (~~(($$sroa$6$0$copyload))); $6 = HEAP32[(1103580)>>2]|0; $7 = ($6|0)>($5|0); $8 = $7 ? $5 : $6; $9 = ((($0)) + 84|0); $10 = +HEAPF32[$9>>2]; $11 = $10 < 1.0; $phitmp = $10 * 7.0; $12 = $11 ? $phitmp : 7.0; $13 = ((($0)) + 48|0); $14 = HEAP32[$13>>2]|0; $15 = ((($14)) + 88|0); $16 = +HEAPF32[$15>>2]; $17 = $12 * $16; $18 = $17 * 0.0625; HEAPF32[447645] = $18; $19 = $17 * 2.0; $20 = 16.0 / $19; HEAPF32[447646] = $20; HEAP32[$2>>2] = $1; $21 = HEAP8[(1783769)>>0]|0; $22 = ($21<<24>>24)==(1); if ($22) { $23 = HEAP32[450816]|0; $24 = (_Math_Floor($$sroa$0$0$copyload)|0); $25 = (_Math_Floor($$sroa$9$0$copyload)|0); _ShadowComponent_GetBlocks($0,$24,$8,$25,$3); $26 = +HEAPF32[$3>>2]; $27 = (+($24|0)); $28 = (+($25|0)); _ShadowComponent_DrawSquareShadow($2,$26,$27,$28); $$0 = $23; } else { $29 = HEAP32[(1826328)>>2]|0; $30 = $$sroa$0$0$copyload - $18; $31 = (_Math_Floor($30)|0); $32 = +HEAPF32[447645]; $33 = $$sroa$9$0$copyload - $32; $34 = (_Math_Floor($33)|0); $35 = +HEAPF32[447645]; $36 = $$sroa$0$0$copyload + $35; $37 = (_Math_Floor($36)|0); $38 = +HEAPF32[447645]; $39 = $$sroa$9$0$copyload + $38; $40 = (_Math_Floor($39)|0); _ShadowComponent_GetBlocks($0,$31,$8,$34,$3); $41 = ((($3)) + 6|0); $42 = HEAP8[$41>>0]|0; $43 = ($42<<24>>24)==(0); if (!($43)) { $44 = (+($34|0)); $45 = (+($31|0)); _ShadowComponent_DrawCircle($2,$0,$3,$45,$44); } $46 = ($31|0)!=($37|0); if ($46) { _ShadowComponent_GetBlocks($0,$37,$8,$34,$3); $47 = HEAP8[$41>>0]|0; $48 = ($47<<24>>24)==(0); if (!($48)) { $49 = (+($34|0)); $50 = (+($37|0)); _ShadowComponent_DrawCircle($2,$0,$3,$50,$49); } } $51 = ($34|0)!=($40|0); if ($51) { _ShadowComponent_GetBlocks($0,$31,$8,$40,$3); $52 = HEAP8[$41>>0]|0; $53 = ($52<<24>>24)==(0); if (!($53)) { $54 = (+($40|0)); $55 = (+($31|0)); _ShadowComponent_DrawCircle($2,$0,$3,$55,$54); } $brmerge$demorgan = $46 & $51; if ($brmerge$demorgan) { _ShadowComponent_GetBlocks($0,$37,$8,$40,$3); $56 = HEAP8[$41>>0]|0; $57 = ($56<<24>>24)==(0); if ($57) { $$0 = $29; } else { $58 = (+($40|0)); $59 = (+($37|0)); _ShadowComponent_DrawCircle($2,$0,$3,$59,$58); $$0 = $29; } } else { $$0 = $29; } } else { $$0 = $29; } } $60 = HEAP32[$2>>2]|0; $61 = ($60|0)==($1|0); if ($61) { STACKTOP = sp;return; } $62 = HEAP32[447644]|0; $63 = ($62|0)==(0); if ($63) { _ShadowComponent_MakeTex(); } $64 = HEAP8[1972825]|0; $65 = ($64<<24>>24)==(0); if ($65) { $66 = HEAP32[447644]|0; _Gfx_BindTexture($66); HEAP8[1972825] = 1; } $67 = HEAP32[$2>>2]|0; $68 = $1; $69 = (($67) - ($68))|0; $70 = (($69|0) / 24)&-1; _Gfx_UpdateDynamicVb_IndexedTris($$0,$1,$70); STACKTOP = sp;return; } function _ShadowComponent_GetBlocks($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$056 = 0, $$0575 = 0, $$058$lcssa10 = 0, $$0584 = 0, $$159 = 0, $$16 = 0, $$2 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0, $40 = 0.0, $41 = 0.0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0; var $61 = 0, $62 = 0, $63 = 0, $7 = 0, $8 = 0, $9 = 0, $switch = 0, label = 0, sp = 0; sp = STACKTOP; ;HEAP32[$4>>2]=0|0;HEAP32[$4+4>>2]=0|0;HEAP32[$4+8>>2]=0|0;HEAP32[$4+12>>2]=0|0;HEAP32[$4+16>>2]=0|0;HEAP32[$4+20>>2]=0|0;HEAP32[$4+24>>2]=0|0;HEAP32[$4+28>>2]=0|0; $5 = ((($0)) + 8|0); $6 = +HEAPF32[$5>>2]; $7 = (_World_ContainsXZ_383($1,$3)|0); $8 = ($7<<24>>24)==(0); $9 = ($2|0)>(-1); if ($9) { $10 = $6 + 0.0099999997764825821; $$0575 = $2;$$0584 = $4;$$16 = 0; while(1) { do { if ($8) { $12 = HEAP32[(1972148)>>2]|0; $13 = (($12) + -1)|0; $14 = ($$0575|0)==($13|0); if ($14) { $15 = HEAP16[986072]|0; $16 = $15&65535; $17 = (1120788 + ($16)|0); $18 = HEAP8[$17>>0]|0; $19 = ($18<<24>>24)==(4); $20 = $19 ? 0 : 7; $$056 = $20; break; } $21 = HEAP32[(1972152)>>2]|0; $22 = (($12) + -1)|0; $23 = (($22) + ($21))|0; $24 = ($$0575|0)==($23|0); if ($24) { $25 = HEAP16[(1972146)>>1]|0; $26 = $25&65535; $27 = (1120788 + ($26)|0); $28 = HEAP8[$27>>0]|0; $29 = ($28<<24>>24)==(4); $30 = $29 ? 0 : 7; $$056 = $30; } else { $$056 = 0; } } else { $11 = (_World_GetBlock_384($1,$$0575,$3)|0); $$056 = $11; } } while(0); $31 = $$056&65535; $32 = (1120788 + ($31)|0); $33 = HEAP8[$32>>0]|0; $34 = $33 & -2; $switch = ($34<<24>>24)==(4); if ($switch) { $$159 = $$0584;$$2 = $$16; } else { $35 = (1106964 + ($31)|0); $36 = HEAP8[$35>>0]|0; $37 = ($36<<24>>24)==(0); if ($37) { $38 = (+($$0575|0)); $39 = (((1134612 + (($31*12)|0)|0)) + 4|0); $40 = +HEAPF32[$39>>2]; $41 = $40 + $38; $42 = !($41 >= $10); if ($42) { $43 = ((($$0584)) + 4|0); HEAP16[$43>>1] = $$056; HEAPF32[$$0584>>2] = $41; _ShadowComponent_CalcAlpha($6,$$0584); $44 = (($$16) + 1)|0; $45 = ((($$0584)) + 8|0); $46 = (1125396 + (($31*12)|0)|0); $47 = +HEAPF32[$46>>2]; $48 = $47 == 0.0; if ($48) { $49 = (1134612 + (($31*12)|0)|0); $50 = +HEAPF32[$49>>2]; $51 = $50 == 1.0; if ($51) { $52 = (((1125396 + (($31*12)|0)|0)) + 8|0); $53 = +HEAPF32[$52>>2]; $54 = $53 == 0.0; if ($54) { $55 = (((1134612 + (($31*12)|0)|0)) + 8|0); $56 = +HEAPF32[$55>>2]; $57 = $56 == 1.0; if ($57) { label = 19; break; } else { $$159 = $45;$$2 = $44; } } else { $$159 = $45;$$2 = $44; } } else { $$159 = $45;$$2 = $44; } } else { $$159 = $45;$$2 = $44; } } else { $$159 = $$0584;$$2 = $$16; } } else { $$159 = $$0584;$$2 = $$16; } } $58 = (($$0575) + -1)|0; $59 = ($$0575|0)>(0); $60 = ($$2|0)<(4); $61 = $59 & $60; if ($61) { $$0575 = $58;$$0584 = $$159;$$16 = $$2; } else { break; } } if ((label|0) == 19) { return; } if ($60) { $$058$lcssa10 = $$159; } else { return; } } else { $$058$lcssa10 = $4; } $62 = HEAP16[986072]|0; $63 = ((($$058$lcssa10)) + 4|0); HEAP16[$63>>1] = $62; HEAPF32[$$058$lcssa10>>2] = 0.0; _ShadowComponent_CalcAlpha($6,$$058$lcssa10); return; } function _ShadowComponent_DrawSquareShadow($0,$1,$2,$3) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[$0>>2]|0; HEAPF32[$4>>2] = $2; $5 = ((($4)) + 4|0); HEAPF32[$5>>2] = $1; $6 = ((($4)) + 8|0); HEAPF32[$6>>2] = $3; $7 = ((($4)) + 12|0); HEAP32[$7>>2] = -587202561; $8 = ((($4)) + 16|0); HEAPF32[$8>>2] = 0.4921875; $9 = ((($4)) + 20|0); HEAPF32[$9>>2] = 0.4921875; $10 = $2 + 1.0; $11 = ((($4)) + 24|0); HEAPF32[$11>>2] = $10; $12 = ((($4)) + 28|0); HEAPF32[$12>>2] = $1; $13 = ((($4)) + 32|0); HEAPF32[$13>>2] = $3; $14 = ((($4)) + 36|0); HEAP32[$14>>2] = -587202561; $15 = ((($4)) + 40|0); HEAPF32[$15>>2] = 0.5; $16 = ((($4)) + 44|0); HEAPF32[$16>>2] = 0.4921875; $17 = ((($4)) + 48|0); HEAPF32[$17>>2] = $10; $18 = ((($4)) + 52|0); HEAPF32[$18>>2] = $1; $19 = $3 + 1.0; $20 = ((($4)) + 56|0); HEAPF32[$20>>2] = $19; $21 = ((($4)) + 60|0); HEAP32[$21>>2] = -587202561; $22 = ((($4)) + 64|0); HEAPF32[$22>>2] = 0.5; $23 = ((($4)) + 68|0); HEAPF32[$23>>2] = 0.5; $24 = ((($4)) + 72|0); HEAPF32[$24>>2] = $2; $25 = ((($4)) + 76|0); HEAPF32[$25>>2] = $1; $26 = ((($4)) + 80|0); HEAPF32[$26>>2] = $19; $27 = ((($4)) + 84|0); HEAP32[$27>>2] = -587202561; $28 = ((($4)) + 88|0); HEAPF32[$28>>2] = 0.4921875; $29 = ((($4)) + 92|0); HEAPF32[$29>>2] = 0.5; $30 = ((($4)) + 96|0); HEAP32[$0>>2] = $30; return; } function _ShadowComponent_DrawCircle($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = +$3; $4 = +$4; var $$0107 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$024$0$$sroa_idx = 0, $$sroa$024$0$copyload = 0.0, $$sroa$040$0$$sroa_idx = 0, $$sroa$040$0$copyload = 0.0, $$sroa$040$0103 = 0.0, $$sroa$050$0$$sroa_idx = 0, $$sroa$050$0$copyload = 0.0, $$sroa$050$0105 = 0.0, $$sroa$517$0$$sroa_idx18 = 0, $$sroa$517$0$copyload = 0.0, $$sroa$533$0$$sroa_idx34 = 0, $$sroa$533$0$copyload = 0.0, $$sroa$9$0$$sroa_idx47 = 0, $$sroa$9$0$copyload = 0.0, $$sroa$9$0104 = 0.0, $$sroa$958$0$$sroa_idx59 = 0, $$sroa$958$0$copyload = 0.0; var $$sroa$958$0106 = 0.0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0; var $29 = 0, $30 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = (_Math_Floor($3)|0); $6 = (+($5|0)); $7 = (_Math_Floor($4)|0); $8 = (+($7|0)); $9 = ((($2)) + 4|0); $10 = HEAP16[$9>>1]|0; $11 = $10&65535; $$sroa$050$0$$sroa_idx = (1125396 + (($11*12)|0)|0); $$sroa$050$0$copyload = +HEAPF32[$$sroa$050$0$$sroa_idx>>2]; $$sroa$958$0$$sroa_idx59 = (((1125396 + (($11*12)|0)|0)) + 8|0); $$sroa$958$0$copyload = +HEAPF32[$$sroa$958$0$$sroa_idx59>>2]; $$sroa$040$0$$sroa_idx = (1134612 + (($11*12)|0)|0); $$sroa$040$0$copyload = +HEAPF32[$$sroa$040$0$$sroa_idx>>2]; $$sroa$9$0$$sroa_idx47 = (((1134612 + (($11*12)|0)|0)) + 8|0); $$sroa$9$0$copyload = +HEAPF32[$$sroa$9$0$$sroa_idx47>>2]; $12 = $$sroa$050$0$copyload + $6; $13 = $$sroa$958$0$copyload + $8; $14 = $$sroa$040$0$copyload + $6; $15 = $$sroa$9$0$copyload + $8; _ShadowComponent_DrawCoords($0,$1,$2,$12,$13,$14,$15); $$0107 = 1;$$sroa$040$0103 = $$sroa$040$0$copyload;$$sroa$050$0105 = $$sroa$050$0$copyload;$$sroa$9$0104 = $$sroa$9$0$copyload;$$sroa$958$0106 = $$sroa$958$0$copyload; while(1) { $16 = (($2) + ($$0107<<3)|0); $17 = (((($2) + ($$0107<<3)|0)) + 4|0); $18 = HEAP16[$17>>1]|0; $19 = $18&65535; $20 = ($18<<16>>16)==(0); if ($20) { label = 4; break; } $$sroa$024$0$$sroa_idx = (1125396 + (($19*12)|0)|0); $$sroa$024$0$copyload = +HEAPF32[$$sroa$024$0$$sroa_idx>>2]; $$sroa$533$0$$sroa_idx34 = (((1125396 + (($19*12)|0)|0)) + 8|0); $$sroa$533$0$copyload = +HEAPF32[$$sroa$533$0$$sroa_idx34>>2]; $$sroa$0$0$$sroa_idx = (1134612 + (($19*12)|0)|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$517$0$$sroa_idx18 = (((1134612 + (($19*12)|0)|0)) + 8|0); $$sroa$517$0$copyload = +HEAPF32[$$sroa$517$0$$sroa_idx18>>2]; $21 = $$sroa$050$0105 + $6; $22 = $$sroa$533$0$copyload + $8; $23 = $$sroa$040$0103 + $6; $24 = $$sroa$958$0106 + $8; _ShadowComponent_DrawCoords($0,$1,$16,$21,$22,$23,$24); $25 = $$sroa$9$0104 + $8; $26 = $$sroa$517$0$copyload + $8; _ShadowComponent_DrawCoords($0,$1,$16,$21,$25,$23,$26); $27 = $$sroa$024$0$copyload + $6; _ShadowComponent_DrawCoords($0,$1,$16,$27,$22,$21,$26); $28 = $$sroa$0$0$copyload + $6; _ShadowComponent_DrawCoords($0,$1,$16,$23,$22,$28,$26); $29 = (($$0107) + 1)|0; $30 = ($29>>>0)<(4); if ($30) { $$0107 = $29;$$sroa$040$0103 = $$sroa$0$0$copyload;$$sroa$050$0105 = $$sroa$024$0$copyload;$$sroa$9$0104 = $$sroa$517$0$copyload;$$sroa$958$0106 = $$sroa$533$0$copyload; } else { label = 4; break; } } if ((label|0) == 4) { return; } } function _ShadowComponent_MakeTex() { var $$02123 = 0, $$022 = 0, $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0; var $8 = 0.0, $9 = 0.0, $exitcond = 0, $exitcond24 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 65552|0; $0 = sp; $1 = sp + 65536|0; $2 = ((($1)) + 4|0); HEAP32[$2>>2] = 128; $3 = ((($1)) + 8|0); HEAP32[$3>>2] = 128; HEAP32[$1>>2] = $0; $$02123 = 0; while(1) { $4 = $$02123 << 7; $5 = (($0) + ($4<<2)|0); $6 = (+($$02123>>>0)); $7 = $6 + 0.5; $8 = 64.0 - $7; $9 = $8 * $8; $$022 = 0; while(1) { $10 = (+($$022>>>0)); $11 = $10 + 0.5; $12 = 64.0 - $11; $13 = $12 * $12; $14 = $9 + $13; $15 = $14 < 4096.0; $16 = $15 ? -939524096 : 0; $17 = (($5) + ($$022<<2)|0); HEAP32[$17>>2] = $16; $18 = (($$022) + 1)|0; $exitcond = ($18|0)==(128); if ($exitcond) { break; } else { $$022 = $18; } } $19 = (($$02123) + 1)|0; $exitcond24 = ($19|0)==(128); if ($exitcond24) { break; } else { $$02123 = $19; } } _Gfx_RecreateTexture(1790576,$1,0,0); STACKTOP = sp;return; } function _ShadowComponent_DrawCoords($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = +$3; $4 = +$4; $5 = +$5; $6 = +$6; var $$ = 0.0, $$116 = 0.0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$940$0$$sroa_idx41 = 0, $$sroa$940$0$copyload = 0.0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0.0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0, $40 = 0, $41 = 0.0, $42 = 0.0, $43 = 0; var $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0; var label = 0, sp = 0; sp = STACKTOP; $7 = (_lequal($5,$3)|0); $8 = ($7<<24>>24)==(0); if (!($8)) { return; } $9 = (_lequal($6,$4)|0); $10 = ($9<<24>>24)==(0); if (!($10)) { return; } $$sroa$0$0$$sroa_idx = ((($1)) + 4|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$940$0$$sroa_idx41 = ((($1)) + 12|0); $$sroa$940$0$copyload = +HEAPF32[$$sroa$940$0$$sroa_idx41>>2]; $11 = $3 - $$sroa$0$0$copyload; $12 = +HEAPF32[447646]; $13 = $11 * $12; $14 = $13 + 0.5; $15 = $4 - $$sroa$940$0$copyload; $16 = $15 * $12; $17 = $16 + 0.5; $18 = $5 - $$sroa$0$0$copyload; $19 = $18 * $12; $20 = $19 + 0.5; $21 = $6 - $$sroa$940$0$copyload; $22 = $21 * $12; $23 = $22 + 0.5; $24 = $20 <= 0.0; $25 = $23 <= 0.0; $or$cond = $24 | $25; $26 = $14 >= 1.0; $or$cond3 = $26 | $or$cond; $27 = $17 >= 1.0; $or$cond5 = $27 | $or$cond3; if ($or$cond5) { return; } $28 = +HEAPF32[447645]; $29 = $$sroa$0$0$copyload - $28; $30 = $29 < $3; $$ = $30 ? $3 : $29; $31 = $14 >= 0.0; $32 = $31 ? $14 : 0.0; $33 = $$sroa$940$0$copyload - $28; $34 = $33 < $4; $35 = $34 ? $4 : $33; $36 = $17 >= 0.0; $37 = $36 ? $17 : 0.0; $38 = $$sroa$0$0$copyload + $28; $39 = $38 > $5; $$116 = $39 ? $5 : $38; $40 = $20 <= 1.0; $41 = $40 ? $20 : 1.0; $42 = $$sroa$940$0$copyload + $28; $43 = $42 > $6; $44 = $43 ? $6 : $42; $45 = $23 <= 1.0; $46 = $45 ? $23 : 1.0; $47 = HEAP32[$0>>2]|0; $48 = ((($2)) + 6|0); $49 = HEAP8[$48>>0]|0; $50 = $49&255; $51 = $50 << 24; $52 = $51 | 16777215; HEAPF32[$47>>2] = $$; $53 = HEAP32[$2>>2]|0; $54 = ((($47)) + 4|0); HEAP32[$54>>2] = $53; $55 = ((($47)) + 8|0); HEAPF32[$55>>2] = $35; $56 = ((($47)) + 12|0); HEAP32[$56>>2] = $52; $57 = ((($47)) + 16|0); HEAPF32[$57>>2] = $32; $58 = ((($47)) + 20|0); HEAPF32[$58>>2] = $37; $59 = ((($47)) + 24|0); HEAPF32[$59>>2] = $$116; $60 = ((($47)) + 28|0); HEAP32[$60>>2] = $53; $61 = ((($47)) + 32|0); HEAPF32[$61>>2] = $35; $62 = ((($47)) + 36|0); HEAP32[$62>>2] = $52; $63 = ((($47)) + 40|0); HEAPF32[$63>>2] = $41; $64 = ((($47)) + 44|0); HEAPF32[$64>>2] = $37; $65 = ((($47)) + 48|0); HEAPF32[$65>>2] = $$116; $66 = ((($47)) + 52|0); HEAP32[$66>>2] = $53; $67 = ((($47)) + 56|0); HEAPF32[$67>>2] = $44; $68 = ((($47)) + 60|0); HEAP32[$68>>2] = $52; $69 = ((($47)) + 64|0); HEAPF32[$69>>2] = $41; $70 = ((($47)) + 68|0); HEAPF32[$70>>2] = $46; $71 = ((($47)) + 72|0); HEAPF32[$71>>2] = $$; $72 = ((($47)) + 76|0); HEAP32[$72>>2] = $53; $73 = ((($47)) + 80|0); HEAPF32[$73>>2] = $44; $74 = ((($47)) + 84|0); HEAP32[$74>>2] = $52; $75 = ((($47)) + 88|0); HEAPF32[$75>>2] = $32; $76 = ((($47)) + 92|0); HEAPF32[$76>>2] = $46; $77 = ((($47)) + 96|0); HEAP32[$0>>2] = $77; return; } function _lequal($0,$1) { $0 = +$0; $1 = +$1; var $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0 < $1; $3 = $0 - $1; $4 = (+Math_abs((+$3))); $5 = $4 < 0.0010000000474974513; $narrow = $2 | $5; $6 = $narrow&1; return ($6|0); } function _World_ContainsXZ_383($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = ($2>>>0)>($0>>>0); $4 = HEAP32[(1103572)>>2]|0; $5 = ($4>>>0)>($1>>>0); $narrow = $3 & $5; $6 = $narrow&1; return ($6|0); } function _World_GetBlock_384($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $3 = HEAP32[(1103572)>>2]|0; $4 = Math_imul($3, $1)|0; $5 = (($4) + ($2))|0; $6 = HEAP32[(1103564)>>2]|0; $7 = Math_imul($5, $6)|0; $8 = (($7) + ($0))|0; $9 = HEAP32[275888]|0; $10 = (($9) + ($8)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = HEAP32[(1103556)>>2]|0; $14 = (($13) + ($8)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 8; $18 = $17 | $12; $19 = HEAP32[(1103608)>>2]|0; $20 = $18 & $19; $21 = $20&65535; return ($21|0); } function _ShadowComponent_CalcAlpha($0,$1) { $0 = +$0; $1 = $1|0; var $$ = 0.0, $$sink14 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[$1>>2]; $3 = $0 - $2; $4 = !($3 <= 6.0); if ($4) { $10 = ((($1)) + 6|0); HEAP8[$10>>0] = 0; $11 = !($3 <= 16.0); if ($11) { $12 = !($3 <= 32.0); if ($12) { $13 = !($3 <= 96.0); $$ = $13 ? 0.25 : 0.125; $$sink14 = $$; } else { $$sink14 = 0.0625; } } else { $$sink14 = 0.015625; } } else { $5 = $3 * 160.0; $6 = $5 / 6.0; $7 = 160.0 - $6; $8 = (~~(($7))&255); $9 = ((($1)) + 6|0); HEAP8[$9>>0] = $8; $$sink14 = 0.015625; } $14 = $2 + $$sink14; HEAPF32[$1>>2] = $14; return; } function _Collisions_HitHorizontal($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP8[$1>>0]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { $13 = 1; return ($13|0); } $4 = ((($0)) + 7|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(0); if (!($6)) { $13 = 1; return ($13|0); } $7 = ((($0)) + 6|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(0); if (!($9)) { $13 = 1; return ($13|0); } $10 = ((($0)) + 9|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)!=(0); $phitmp = $12&1; $13 = $phitmp; return ($13|0); } function _Collisions_MoveAndWallSlide($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $1 = sp + 24|0; $2 = sp; $3 = HEAP32[$0>>2]|0; $4 = ((($3)) + 36|0); $5 = +HEAPF32[$4>>2]; $6 = $5 == 0.0; if ($6) { $7 = ((($3)) + 40|0); $8 = +HEAPF32[$7>>2]; $9 = $8 == 0.0; if ($9) { $10 = ((($3)) + 44|0); $11 = +HEAPF32[$10>>2]; $12 = $11 == 0.0; if ($12) { STACKTOP = sp;return; } } } $13 = (_Searcher_FindReachableBlocks($3,$1,$2)|0); _Collisions_CollideWithReachableBlocks($0,$13,$1,$2); STACKTOP = sp;return; } function _Collisions_CollideWithReachableBlocks($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$084 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0, $$sroa$5$0$$sroa_idx21 = 0, $$sroa$5$0$copyload = 0, $$sroa$7$0$$sroa_idx24 = 0, $$sroa$7$0$copyload = 0, $10 = 0, $100 = 0.0, $101 = 0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0, $11 = 0, $110 = 0.0; var $111 = 0.0, $112 = 0.0, $113 = 0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0, $126 = 0, $13 = 0, $14 = 0, $15 = 0; var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0; var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0; var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0, $63 = 0.0, $64 = 0, $65 = 0.0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0; var $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0, $9 = 0; var $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0, $98 = 0.0, $99 = 0.0, $exitcond = 0, $or$cond = 0, $or$cond3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $4 = sp + 72|0; $5 = sp + 48|0; $6 = sp + 36|0; $7 = sp + 24|0; $8 = sp + 12|0; $9 = sp + 8|0; $10 = sp + 4|0; $11 = sp; $12 = HEAP32[$0>>2]|0; $13 = ((($12)) + 111|0); $14 = HEAP8[$13>>0]|0; HEAP8[$13>>0] = 0; $15 = ((($0)) + 4|0); $16 = ((($0)) + 5|0); $17 = ((($12)) + 92|0); ;HEAP32[$15>>2]=0|0;HEAP16[$15+4>>1]=0|0; ;HEAP32[$6>>2]=HEAP32[$17>>2]|0;HEAP32[$6+4>>2]=HEAP32[$17+4>>2]|0;HEAP32[$6+8>>2]=HEAP32[$17+8>>2]|0; $18 = ($1|0)>(0); if (!($18)) { STACKTOP = sp;return; } $19 = ((($7)) + 4|0); $20 = ((($7)) + 8|0); $21 = ((($4)) + 12|0); $22 = ((($12)) + 36|0); $23 = ((($8)) + 4|0); $24 = ((($8)) + 8|0); $25 = ((($5)) + 12|0); $26 = ((($2)) + 12|0); $27 = ((($5)) + 4|0); $28 = ((($4)) + 16|0); $29 = ((($5)) + 16|0); $30 = ((($4)) + 4|0); $31 = ((($5)) + 8|0); $32 = ((($4)) + 20|0); $33 = ((($5)) + 20|0); $34 = ((($4)) + 8|0); $35 = ((($5)) + 8|0); $36 = ((($4)) + 20|0); $37 = ((($5)) + 4|0); $38 = ((($4)) + 16|0); $39 = ((($5)) + 20|0); $40 = ((($4)) + 8|0); $41 = ((($5)) + 16|0); $42 = ((($4)) + 4|0); $$084 = 0; while(1) { $43 = HEAP32[5223]|0; $$sroa$0$0$$sroa_idx = (($43) + ($$084<<4)|0); $$sroa$0$0$copyload = HEAP32[$$sroa$0$0$$sroa_idx>>2]|0; $$sroa$5$0$$sroa_idx21 = (((($43) + ($$084<<4)|0)) + 4|0); $$sroa$5$0$copyload = HEAP32[$$sroa$5$0$$sroa_idx21>>2]|0; $$sroa$7$0$$sroa_idx24 = (((($43) + ($$084<<4)|0)) + 8|0); $$sroa$7$0$copyload = HEAP32[$$sroa$7$0$$sroa_idx24>>2]|0; $44 = (3)?($$sroa$0$0$copyload >> 3):($$sroa$0$0$copyload); $45 = (+($44|0)); HEAPF32[$7>>2] = $45; $46 = (4)?($$sroa$5$0$copyload >> 4):($$sroa$5$0$copyload); $47 = (+($46|0)); HEAPF32[$19>>2] = $47; $48 = (3)?($$sroa$7$0$copyload >> 3):($$sroa$7$0$copyload); $49 = (+($48|0)); HEAPF32[$20>>2] = $49; $50 = $$sroa$0$0$copyload & 7; $51 = $$sroa$5$0$copyload << 3; $52 = $51 & 120; $53 = $52 | $50; $54 = $$sroa$7$0$copyload << 7; $55 = $54 & 896; $56 = $53 | $55; $57 = (1125396 + (($56*12)|0)|0); _Vec3_Add_374($4,$57,$7); $58 = (1134612 + (($56*12)|0)|0); _Vec3_Add_374($21,$58,$7); $59 = (_AABB_Intersects($3,$4)|0); $60 = ($59<<24>>24)==(0); do { if (!($60)) { _Searcher_CalcTime($22,$2,$4,$9,$10,$11); $61 = +HEAPF32[$9>>2]; $62 = $61 > 1.0; $63 = +HEAPF32[$10>>2]; $64 = $63 > 1.0; $or$cond = $62 | $64; $65 = +HEAPF32[$11>>2]; $66 = $65 > 1.0; $or$cond3 = $or$cond | $66; if ($or$cond3) { _Platform_LogConst(28180); } ;HEAP32[$8>>2]=HEAP32[$22>>2]|0;HEAP32[$8+4>>2]=HEAP32[$22+4>>2]|0;HEAP32[$8+8>>2]=HEAP32[$22+8>>2]|0; $67 = +HEAPF32[$9>>2]; $68 = +HEAPF32[$8>>2]; $69 = $67 * $68; HEAPF32[$8>>2] = $69; $70 = +HEAPF32[$10>>2]; $71 = +HEAPF32[$23>>2]; $72 = $70 * $71; HEAPF32[$23>>2] = $72; $73 = +HEAPF32[$11>>2]; $74 = +HEAPF32[$24>>2]; $75 = $73 * $74; HEAPF32[$24>>2] = $75; _Vec3_Add_374($5,$2,$8); _Vec3_Add_374($25,$26,$8); $76 = HEAP8[$16>>0]|0; $77 = ($76<<24>>24)==(0); if ($77) { $78 = +HEAPF32[$27>>2]; $79 = $78 + 0.0010000000474974513; $80 = +HEAPF32[$28>>2]; $81 = !($79 >= $80); if (!($81)) { _Collisions_ClipYMax($0,$4,$2,$3,$6); break; } $82 = +HEAPF32[$29>>2]; $83 = $82 + -0.0010000000474974513; $84 = +HEAPF32[$30>>2]; $85 = !($83 <= $84); if (!($85)) { _Collisions_ClipYMin($0,$4,$2,$3,$6); break; } $86 = +HEAPF32[$5>>2]; $87 = $86 + 0.0010000000474974513; $88 = +HEAPF32[$21>>2]; $89 = !($87 >= $88); if (!($89)) { _Collisions_ClipXMax($0,$4,$2,$14,$5,$3,$6); break; } $90 = +HEAPF32[$25>>2]; $91 = $90 + -0.0010000000474974513; $92 = +HEAPF32[$4>>2]; $93 = !($91 <= $92); if (!($93)) { _Collisions_ClipXMin($0,$4,$2,$14,$5,$3,$6); break; } $94 = +HEAPF32[$35>>2]; $95 = $94 + 0.0010000000474974513; $96 = +HEAPF32[$36>>2]; $97 = !($95 >= $96); if (!($97)) { _Collisions_ClipZMax($0,$4,$2,$14,$5,$3,$6); break; } $98 = +HEAPF32[$39>>2]; $99 = $98 + -0.0010000000474974513; $100 = +HEAPF32[$40>>2]; $101 = !($99 <= $100); if ($101) { break; } _Collisions_ClipZMin($0,$4,$2,$14,$5,$3,$6); break; } else { $102 = +HEAPF32[$5>>2]; $103 = $102 + 0.0010000000474974513; $104 = +HEAPF32[$21>>2]; $105 = !($103 >= $104); if (!($105)) { _Collisions_ClipXMax($0,$4,$2,$14,$5,$3,$6); break; } $106 = +HEAPF32[$25>>2]; $107 = $106 + -0.0010000000474974513; $108 = +HEAPF32[$4>>2]; $109 = !($107 <= $108); if (!($109)) { _Collisions_ClipXMin($0,$4,$2,$14,$5,$3,$6); break; } $110 = +HEAPF32[$31>>2]; $111 = $110 + 0.0010000000474974513; $112 = +HEAPF32[$32>>2]; $113 = !($111 >= $112); if (!($113)) { _Collisions_ClipZMax($0,$4,$2,$14,$5,$3,$6); break; } $114 = +HEAPF32[$33>>2]; $115 = $114 + -0.0010000000474974513; $116 = +HEAPF32[$34>>2]; $117 = !($115 <= $116); if (!($117)) { _Collisions_ClipZMin($0,$4,$2,$14,$5,$3,$6); break; } $118 = +HEAPF32[$37>>2]; $119 = $118 + 0.0010000000474974513; $120 = +HEAPF32[$38>>2]; $121 = !($119 >= $120); if (!($121)) { _Collisions_ClipYMax($0,$4,$2,$3,$6); break; } $122 = +HEAPF32[$41>>2]; $123 = $122 + -0.0010000000474974513; $124 = +HEAPF32[$42>>2]; $125 = !($123 <= $124); if ($125) { break; } _Collisions_ClipYMin($0,$4,$2,$3,$6); break; } } } while(0); $126 = (($$084) + 1)|0; $exitcond = ($126|0)==($1|0); if ($exitcond) { break; } else { $$084 = $126; } } STACKTOP = sp;return; } function _Collisions_ClipYMax($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $10 = 0, $11 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = ((($1)) + 16|0); $6 = +HEAPF32[$5>>2]; $7 = $6 + 0.0010000000474974513; $8 = HEAP32[$0>>2]|0; $9 = ((($8)) + 8|0); HEAPF32[$9>>2] = $7; $10 = ((($8)) + 111|0); HEAP8[$10>>0] = 1; _Collisions_ClipY($8,$4,$2,$3); $11 = ((($0)) + 8|0); HEAP8[$11>>0] = 1; return; } function _Collisions_ClipYMin($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $5 = ((($1)) + 4|0); $6 = +HEAPF32[$5>>2]; $7 = ((($4)) + 4|0); $8 = +HEAPF32[$7>>2]; $9 = $6 - $8; $10 = $9 + -0.0010000000474974513; $11 = HEAP32[$0>>2]|0; $12 = ((($11)) + 8|0); HEAPF32[$12>>2] = $10; _Collisions_ClipY($11,$4,$2,$3); $13 = ((($0)) + 5|0); HEAP8[$13>>0] = 1; return; } function _Collisions_ClipXMax($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; var $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $7 = ($3<<24>>24)==(0); if (!($7)) { $8 = (_Collisions_DidSlide($0,$1,$6,$4,$2,$5)|0); $9 = ($8<<24>>24)==(0); if (!($9)) { return; } } $10 = ((($1)) + 12|0); $11 = +HEAPF32[$10>>2]; $12 = +HEAPF32[$6>>2]; $13 = $12 * 0.5; $14 = $11 + $13; $15 = $14 + 0.0010000000474974513; $16 = HEAP32[$0>>2]|0; $17 = ((($16)) + 4|0); HEAPF32[$17>>2] = $15; _Collisions_ClipX($16,$6,$2,$5); $18 = ((($0)) + 7|0); HEAP8[$18>>0] = 1; return; } function _Collisions_ClipXMin($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $7 = ($3<<24>>24)==(0); if (!($7)) { $8 = (_Collisions_DidSlide($0,$1,$6,$4,$2,$5)|0); $9 = ($8<<24>>24)==(0); if (!($9)) { return; } } $10 = +HEAPF32[$1>>2]; $11 = +HEAPF32[$6>>2]; $12 = $11 * 0.5; $13 = $10 - $12; $14 = $13 + -0.0010000000474974513; $15 = HEAP32[$0>>2]|0; $16 = ((($15)) + 4|0); HEAPF32[$16>>2] = $14; _Collisions_ClipX($15,$6,$2,$5); $17 = ((($0)) + 4|0); HEAP8[$17>>0] = 1; return; } function _Collisions_ClipZMax($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; var $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $7 = ($3<<24>>24)==(0); if (!($7)) { $8 = (_Collisions_DidSlide($0,$1,$6,$4,$2,$5)|0); $9 = ($8<<24>>24)==(0); if (!($9)) { return; } } $10 = ((($1)) + 20|0); $11 = +HEAPF32[$10>>2]; $12 = ((($6)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = $13 * 0.5; $15 = $11 + $14; $16 = $15 + 0.0010000000474974513; $17 = HEAP32[$0>>2]|0; $18 = ((($17)) + 12|0); HEAPF32[$18>>2] = $16; _Collisions_ClipZ($17,$6,$2,$5); $19 = ((($0)) + 9|0); HEAP8[$19>>0] = 1; return; } function _Collisions_ClipZMin($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; var $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $7 = ($3<<24>>24)==(0); if (!($7)) { $8 = (_Collisions_DidSlide($0,$1,$6,$4,$2,$5)|0); $9 = ($8<<24>>24)==(0); if (!($9)) { return; } } $10 = ((($1)) + 8|0); $11 = +HEAPF32[$10>>2]; $12 = ((($6)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = $13 * 0.5; $15 = $11 - $14; $16 = $15 + -0.0010000000474974513; $17 = HEAP32[$0>>2]|0; $18 = ((($17)) + 12|0); HEAPF32[$18>>2] = $16; _Collisions_ClipZ($17,$6,$2,$5); $19 = ((($0)) + 6|0); HEAP8[$19>>0] = 1; return; } function _Collisions_DidSlide($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$ = 0.0, $$1 = 0, $$58 = 0.0, $$59 = 0.0, $$60 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0; var $25 = 0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0.0; var $45 = 0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0, $63 = 0.0; var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $6 = sp; $7 = ((($1)) + 16|0); $8 = +HEAPF32[$7>>2]; $9 = ((($4)) + 4|0); $10 = +HEAPF32[$9>>2]; $11 = $8 - $10; $12 = $11 > 0.0; if (!($12)) { $$1 = 0; STACKTOP = sp;return ($$1|0); } $13 = ((($0)) + 12|0); $14 = +HEAPF32[$13>>2]; $15 = $14 + 0.0099999997764825821; $16 = !($11 <= $15); if ($16) { $$1 = 0; STACKTOP = sp;return ($$1|0); } $17 = +HEAPF32[$1>>2]; $18 = ((($1)) + 12|0); $19 = +HEAPF32[$18>>2]; $20 = +HEAPF32[$2>>2]; $21 = $20 * 0.5; $22 = $19 - $21; $23 = $17 > $22; $$ = $23 ? $17 : $22; $24 = $17 + $21; $25 = $19 < $24; $26 = $25 ? $19 : $24; $27 = ((($1)) + 8|0); $28 = +HEAPF32[$27>>2]; $29 = ((($1)) + 20|0); $30 = +HEAPF32[$29>>2]; $31 = ((($2)) + 8|0); $32 = +HEAPF32[$31>>2]; $33 = $32 * 0.5; $34 = $30 - $33; $35 = $28 > $34; $$58 = $35 ? $28 : $34; $36 = $28 + $33; $37 = $30 < $36; $38 = $37 ? $30 : $36; $39 = +HEAPF32[$3>>2]; $40 = $$ + 0.0010000000474974513; $41 = $39 < $40; $$59 = $41 ? $39 : $40; HEAPF32[$6>>2] = $$59; $42 = ((($3)) + 12|0); $43 = +HEAPF32[$42>>2]; $44 = $26 + -0.0010000000474974513; $45 = $43 > $44; $46 = $45 ? $43 : $44; $47 = ((($6)) + 12|0); HEAPF32[$47>>2] = $46; $48 = $8 + 0.0010000000474974513; $49 = ((($6)) + 4|0); HEAPF32[$49>>2] = $48; $50 = ((($2)) + 4|0); $51 = +HEAPF32[$50>>2]; $52 = $48 + $51; $53 = ((($6)) + 16|0); HEAPF32[$53>>2] = $52; $54 = ((($3)) + 8|0); $55 = +HEAPF32[$54>>2]; $56 = $$58 + 0.0010000000474974513; $57 = $55 < $56; $$60 = $57 ? $55 : $56; $58 = ((($6)) + 8|0); HEAPF32[$58>>2] = $$60; $59 = ((($3)) + 20|0); $60 = +HEAPF32[$59>>2]; $61 = $38 + -0.0010000000474974513; $62 = $60 > $61; $63 = $62 ? $60 : $61; $64 = ((($6)) + 20|0); HEAPF32[$64>>2] = $63; $65 = (_Collisions_CanSlideThrough($6)|0); $66 = ($65<<24>>24)==(0); if ($66) { $$1 = 0; STACKTOP = sp;return ($$1|0); } $67 = HEAP32[$49>>2]|0; $68 = HEAP32[$0>>2]|0; $69 = ((($68)) + 8|0); HEAP32[$69>>2] = $67; $70 = ((($68)) + 111|0); HEAP8[$70>>0] = 1; _Collisions_ClipY($68,$2,$4,$5); $$1 = 1; STACKTOP = sp;return ($$1|0); } function _Collisions_ClipZ($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 44|0); HEAPF32[$4>>2] = 0.0; $5 = ((($0)) + 12|0); $6 = +HEAPF32[$5>>2]; $7 = ((($1)) + 8|0); $8 = +HEAPF32[$7>>2]; $9 = $8 * 0.5; $10 = $6 - $9; $11 = ((($2)) + 8|0); HEAPF32[$11>>2] = $10; $12 = ((($3)) + 8|0); HEAPF32[$12>>2] = $10; $13 = +HEAPF32[$7>>2]; $14 = $13 * 0.5; $15 = $6 + $14; $16 = ((($2)) + 20|0); HEAPF32[$16>>2] = $15; $17 = ((($3)) + 20|0); HEAPF32[$17>>2] = $15; return; } function _Collisions_CanSlideThrough($0) { $0 = $0|0; var $$02534 = 0, $$02629 = 0, $$027 = 0, $$030 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0.0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; var $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $1 = sp + 52|0; $2 = sp + 40|0; $3 = sp + 16|0; $4 = sp; _IVec3_Floor($1,$0); $5 = ((($0)) + 12|0); _IVec3_Floor($2,$5); $6 = ((($1)) + 4|0); $7 = HEAP32[$6>>2]|0; $8 = ((($2)) + 4|0); $9 = HEAP32[$8>>2]|0; $10 = ($7|0)>($9|0); if ($10) { $$027 = 1; STACKTOP = sp;return ($$027|0); } $11 = ((($4)) + 4|0); $12 = ((($1)) + 8|0); $13 = ((($2)) + 8|0); $14 = ((($4)) + 8|0); $15 = ((($3)) + 12|0); $$02534 = $7; L4: while(1) { $16 = (+($$02534|0)); HEAPF32[$11>>2] = $16; $17 = HEAP32[$12>>2]|0; $18 = HEAP32[$13>>2]|0; $19 = ($17|0)>($18|0); if (!($19)) { $$030 = $17; while(1) { $20 = (+($$030|0)); HEAPF32[$14>>2] = $20; $21 = HEAP32[$1>>2]|0; $22 = HEAP32[$2>>2]|0; $23 = ($21|0)>($22|0); if (!($23)) { $$02629 = $21; while(1) { $24 = (+($$02629|0)); HEAPF32[$4>>2] = $24; $25 = (_World_GetPhysicsBlock($$02629,$$02534,$$030)|0); $26 = $25&65535; $27 = (1125396 + (($26*12)|0)|0); _Vec3_Add_374($3,$4,$27); $28 = (1134612 + (($26*12)|0)|0); _Vec3_Add_374($15,$4,$28); $29 = (_AABB_Intersects($3,$0)|0); $30 = ($29<<24>>24)==(0); if (!($30)) { $31 = (1115412 + ($26)|0); $32 = HEAP8[$31>>0]|0; $33 = ($32<<24>>24)==(2); if ($33) { $$027 = 0; label = 12; break L4; } } $34 = (($$02629) + 1)|0; $35 = HEAP32[$2>>2]|0; $36 = ($$02629|0)<($35|0); if ($36) { $$02629 = $34; } else { break; } } } $37 = (($$030) + 1)|0; $38 = HEAP32[$13>>2]|0; $39 = ($$030|0)<($38|0); if ($39) { $$030 = $37; } else { break; } } } $40 = (($$02534) + 1)|0; $41 = HEAP32[$8>>2]|0; $42 = ($$02534|0)<($41|0); if ($42) { $$02534 = $40; } else { $$027 = 1; label = 12; break; } } if ((label|0) == 12) { STACKTOP = sp;return ($$027|0); } return (0)|0; } function _Collisions_ClipY($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 40|0); HEAPF32[$4>>2] = 0.0; $5 = ((($0)) + 8|0); $6 = HEAP32[$5>>2]|0; $7 = ((($2)) + 4|0); HEAP32[$7>>2] = $6; $8 = ((($3)) + 4|0); HEAP32[$8>>2] = $6; $9 = +HEAPF32[$5>>2]; $10 = ((($1)) + 4|0); $11 = +HEAPF32[$10>>2]; $12 = $9 + $11; $13 = ((($2)) + 16|0); HEAPF32[$13>>2] = $12; $14 = ((($3)) + 16|0); HEAPF32[$14>>2] = $12; return; } function _Collisions_ClipX($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 36|0); HEAPF32[$4>>2] = 0.0; $5 = ((($0)) + 4|0); $6 = +HEAPF32[$5>>2]; $7 = +HEAPF32[$1>>2]; $8 = $7 * 0.5; $9 = $6 - $8; HEAPF32[$2>>2] = $9; HEAPF32[$3>>2] = $9; $10 = +HEAPF32[$1>>2]; $11 = $10 * 0.5; $12 = $6 + $11; $13 = ((($2)) + 12|0); HEAPF32[$13>>2] = $12; $14 = ((($3)) + 12|0); HEAPF32[$14>>2] = $12; return; } function _PhysicsComp_Init($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; _Mem_Set($0,0,32); $2 = ((($0)) + 1|0); HEAP8[$2>>0] = 1; $3 = ((($0)) + 8|0); HEAP32[$3>>2] = $1; $4 = ((($0)) + 12|0); HEAPF32[$4>>2] = 0.41999998688697815; $5 = ((($0)) + 16|0); HEAPF32[$5>>2] = 0.41999998688697815; $6 = ((($0)) + 20|0); HEAPF32[$6>>2] = 0.41999998688697815; return; } function _PhysicsComp_UpdateVelocityState($0) { $0 = $0|0; var $$sink = 0, $$sink91 = 0.0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0.0, $104 = 0, $105 = 0, $106 = 0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0.0; var $115 = 0.0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0.0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0, $132 = 0; var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0.0, $142 = 0.0, $143 = 0.0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; var $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; var $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; var $55 = 0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0.0, $63 = 0, $64 = 0, $65 = 0.0, $66 = 0, $67 = 0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0, $72 = 0.0; var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0.0; var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0.0, $98 = 0.0, $99 = 0, $or$cond = 0, $phitmp = 0.0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 24|0); $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 1|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); if ($8) { $40 = ((($0)) + 2|0); $41 = HEAP8[$40>>0]|0; $42 = ($41<<24>>24)==(0); if (!($42)) { $43 = (_Entity_TouchesAnyRope($3)|0); $44 = ($43<<24>>24)==(0); if (!($44)) { $45 = ((($3)) + 40|0); $46 = +HEAPF32[$45>>2]; $47 = $46 > 0.019999999552965164; if ($47) { HEAPF32[$45>>2] = 0.019999999552965164; } } } } else { $9 = ((($3)) + 40|0); HEAPF32[$9>>2] = 0.0; $10 = ((($5)) + 36|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(0); if ($12) { $13 = ((($0)) + 2|0); $14 = HEAP8[$13>>0]|0; $15 = ($14<<24>>24)==(0); if ($15) { $16 = ((($5)) + 37|0); $17 = HEAP8[$16>>0]|0; $18 = ($17<<24>>24)!=(0); $19 = $18 << 31 >> 31; $21 = $19; } else { $21 = 1; } } else { $21 = 1; } $20 = (+($21|0)); $22 = $20 * 0.11999999731779099; $23 = $22 + 0.0; HEAPF32[$9>>2] = $23; $24 = ((($5)) + 38|0); $25 = HEAP8[$24>>0]|0; $26 = ($25<<24>>24)==(0); if (!($26)) { $27 = ((($5)) + 13|0); $28 = HEAP8[$27>>0]|0; $29 = ($28<<24>>24)==(0); if (!($29)) { $30 = $22 + $23; HEAPF32[$9>>2] = $30; } } $31 = ((($5)) + 39|0); $32 = HEAP8[$31>>0]|0; $33 = ($32<<24>>24)==(0); if (!($33)) { $34 = ((($5)) + 13|0); $35 = HEAP8[$34>>0]|0; $36 = ($35<<24>>24)==(0); if (!($36)) { $37 = $20 * 0.059999998658895493; $38 = +HEAPF32[$9>>2]; $39 = $37 + $38; HEAPF32[$9>>2] = $39; } } } $48 = ((($0)) + 2|0); $49 = HEAP8[$48>>0]|0; $50 = ($49<<24>>24)==(0); if ($50) { $51 = ((($0)) + 1|0); HEAP8[$51>>0] = 0; STACKTOP = sp;return; } $52 = (_Entity_TouchesAnyWater($3)|0); $53 = (_Entity_TouchesAnyLava($3)|0); $54 = ($53<<24>>24)==(0); $55 = $53 | $52; $56 = ($55<<24>>24)==(0); if ($56) { $111 = HEAP8[$0>>0]|0; $112 = ($111<<24>>24)==(0); if (!($112)) { $113 = ((($3)) + 40|0); $114 = +HEAPF32[$113>>2]; $115 = $114 + 0.039999999105930328; HEAPF32[$113>>2] = $115; $116 = ((($5)) + 38|0); $117 = HEAP8[$116>>0]|0; $118 = ($117<<24>>24)==(0); if (!($118)) { $119 = ((($5)) + 13|0); $120 = HEAP8[$119>>0]|0; $121 = ($120<<24>>24)==(0); if (!($121)) { $122 = $115 + 0.039999999105930328; HEAPF32[$113>>2] = $122; } } $123 = ((($5)) + 39|0); $124 = HEAP8[$123>>0]|0; $125 = ($124<<24>>24)==(0); if (!($125)) { $126 = ((($5)) + 13|0); $127 = HEAP8[$126>>0]|0; $128 = ($127<<24>>24)==(0); if (!($128)) { $129 = +HEAPF32[$113>>2]; $130 = $129 + 0.019999999552965164; HEAPF32[$113>>2] = $130; } } $131 = ((($0)) + 1|0); HEAP8[$131>>0] = 0; STACKTOP = sp;return; } $132 = (_Entity_TouchesAnyRope($3)|0); $133 = ($132<<24>>24)==(0); if ($133) { $145 = ((($3)) + 111|0); $146 = HEAP8[$145>>0]|0; $147 = ($146<<24>>24)==(0); if ($147) { STACKTOP = sp;return; } _PhysicsComp_DoNormalJump($0); STACKTOP = sp;return; } else { $134 = ((($5)) + 38|0); $135 = HEAP8[$134>>0]|0; $136 = ($135<<24>>24)==(0); if ($136) { $143 = 0.10000000149011612; } else { $137 = ((($5)) + 13|0); $138 = HEAP8[$137>>0]|0; $139 = ($138<<24>>24)==(0); $phitmp = $139 ? 0.10000000149011612 : 0.15000000596046448; $143 = $phitmp; } $140 = ((($3)) + 40|0); $141 = +HEAPF32[$140>>2]; $142 = $143 + $141; HEAPF32[$140>>2] = $142; $144 = ((($0)) + 1|0); HEAP8[$144>>0] = 0; STACKTOP = sp;return; } } else { _Entity_GetBounds($3,$1); $57 = ((($1)) + 4|0); $58 = +HEAPF32[$57>>2]; $59 = (_Math_Floor($58)|0); $60 = (($59) + 1)|0; $61 = ((($1)) + 16|0); $62 = +HEAPF32[$61>>2]; $63 = (_Math_Floor($62)|0); $64 = ($59|0)<($63|0); $spec$select = $64 ? $60 : $63; $65 = (+($59|0)); HEAPF32[$57>>2] = $65; HEAPF32[$61>>2] = $65; $66 = (_Entity_TouchesAny($1,9)|0); $67 = ($spec$select|0)<($63|0); $68 = $67 ? $spec$select : $63; $69 = (+($68|0)); HEAPF32[$57>>2] = $69; $70 = ($spec$select|0)>($63|0); $71 = $70 ? $spec$select : $63; $72 = (+($71|0)); HEAPF32[$61>>2] = $72; $73 = (_Entity_TouchesAny($1,9)|0); $74 = ($66<<24>>24)==(0); $75 = ($73<<24>>24)!=(0); $or$cond = $74 | $75; if (!($or$cond)) { $76 = ((($3)) + 8|0); $77 = +HEAPF32[$76>>2]; $78 = (+_Math_Mod1($77)); $79 = !($78 >= 0.40000000596046448); if (!($79)) { $99 = ((($0)) + 28|0); $100 = HEAP32[$99>>2]|0; $101 = (_Collisions_HitHorizontal($100)|0); $102 = ($101<<24>>24)==(0); if ($102) { $104 = ((($0)) + 1|0); $105 = HEAP8[$104>>0]|0; $106 = ($105<<24>>24)==(0); if (!($106)) { $107 = $54 ? 0.10000000149011612 : 0.20000000298023224; $$sink91 = $107; label = 30; } } else { $103 = $54 ? 0.12999999523162842 : 0.30000001192092896; $$sink91 = $103; label = 30; } if ((label|0) == 30) { $$sink = ((($3)) + 40|0); $108 = +HEAPF32[$$sink>>2]; $109 = $$sink91 + $108; HEAPF32[$$sink>>2] = $109; } $110 = ((($0)) + 1|0); HEAP8[$110>>0] = 0; STACKTOP = sp;return; } } $80 = ((($0)) + 1|0); HEAP8[$80>>0] = 1; $81 = ((($3)) + 40|0); $82 = +HEAPF32[$81>>2]; $83 = $82 + 0.039999999105930328; HEAPF32[$81>>2] = $83; $84 = ((($5)) + 38|0); $85 = HEAP8[$84>>0]|0; $86 = ($85<<24>>24)==(0); if (!($86)) { $87 = ((($5)) + 13|0); $88 = HEAP8[$87>>0]|0; $89 = ($88<<24>>24)==(0); if (!($89)) { $90 = $83 + 0.039999999105930328; HEAPF32[$81>>2] = $90; } } $91 = ((($5)) + 39|0); $92 = HEAP8[$91>>0]|0; $93 = ($92<<24>>24)==(0); if ($93) { STACKTOP = sp;return; } $94 = ((($5)) + 13|0); $95 = HEAP8[$94>>0]|0; $96 = ($95<<24>>24)==(0); if ($96) { STACKTOP = sp;return; } $97 = +HEAPF32[$81>>2]; $98 = $97 + 0.019999999552965164; HEAPF32[$81>>2] = $98; STACKTOP = sp;return; } } function _PhysicsComp_TouchesLiquid($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1115412 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(1); $5 = $4&1; return ($5|0); } function _PhysicsComp_DoNormalJump($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0.0; var $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 8|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 24|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 12|0); $6 = +HEAPF32[$5>>2]; $7 = $6 == 0.0; if ($7) { return; } $8 = ((($4)) + 28|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)<(1); if ($10) { return; } $11 = ((($2)) + 40|0); HEAPF32[$11>>2] = $6; $12 = ((($4)) + 38|0); $13 = HEAP8[$12>>0]|0; $14 = ($13<<24>>24)==(0); if (!($14)) { $15 = ((($4)) + 13|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(0); if (!($17)) { $18 = $6 + $6; HEAPF32[$11>>2] = $18; } } $19 = ((($4)) + 39|0); $20 = HEAP8[$19>>0]|0; $21 = ($20<<24>>24)==(0); if (!($21)) { $22 = ((($4)) + 13|0); $23 = HEAP8[$22>>0]|0; $24 = ($23<<24>>24)==(0); if (!($24)) { $25 = $6 * 0.5; $26 = +HEAPF32[$11>>2]; $27 = $25 + $26; HEAPF32[$11>>2] = $27; } } $28 = ((($0)) + 1|0); HEAP8[$28>>0] = 0; return; } function _PhysicsComp_PhysicsTick($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0.0, $$092 = 0.0, $$1 = 0.0, $$byval_copy5 = 0, $$byval_copy6 = 0, $$pr = 0, $10 = 0.0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0; var $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0; var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0; var $51 = 0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0; var $7 = 0, $70 = 0, $71 = 0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0, $85 = 0.0, $86 = 0.0, $87 = 0; var $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0.0, $91 = 0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $brmerge = 0, $phitmp = 0.0, $spec$select = 0.0, $spec$select98 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $$byval_copy6 = sp + 12|0; $$byval_copy5 = sp; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 24|0); $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 34|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); if (!($8)) { $9 = ((($3)) + 111|0); HEAP8[$9>>0] = 0; } $10 = (+_PhysicsComp_GetBaseSpeed($0)); $11 = ((($5)) + 13|0); $12 = HEAP8[$11>>0]|0; $13 = (+_PhysicsComp_GetSpeed($5,8.0,$12)); $14 = $13 / 5.0; $15 = $10 * $14; $16 = (+_PhysicsComp_GetSpeed($5,1.6000000238418579,1)); $17 = $10 * $16; $18 = ((($5)) + 24|0); $19 = +HEAPF32[$18>>2]; $20 = $17 * $19; $21 = $20 < -75.0; $22 = $21 ? -75.0 : $20; $23 = $22 > 75.0; $24 = $23 ? 75.0 : $22; $25 = $15 < $10; $$0 = $25 ? $10 : $15; $26 = ((($5)) + 19|0); $27 = HEAP8[$26>>0]|0; $28 = ($27<<24>>24)==(0); do { if ($28) { $29 = ((($5)) + 1|0); $$092 = $24;$$1 = $$0;$47 = $29; } else { $30 = ((($5)) + 33|0); $31 = HEAP8[$30>>0]|0; $32 = ($31<<24>>24)==(0); $33 = ((($5)) + 1|0); $34 = HEAP8[$33>>0]|0; $35 = ($34<<24>>24)!=(0); $brmerge = $32 | $35; if ($brmerge) { $$092 = $24;$$1 = $$0;$47 = $33; } else { $36 = ((($0)) + 4|0); $37 = HEAP32[$36>>2]|0; $38 = ($37|0)==(1); if ($38) { $39 = $24 * 46.5; $40 = $$0 * 7.5; $$092 = $39;$$1 = $40;$47 = $33; break; } else { $41 = ($37|0)>(1); $42 = $24 * 93.0; $43 = $$0 * 10.0; $spec$select = $41 ? $42 : $24; $spec$select98 = $41 ? $43 : $$0; $$092 = $spec$select;$$1 = $spec$select98;$47 = $33; break; } } } } while(0); $44 = (_Entity_TouchesAnyWater($3)|0); $45 = ($44<<24>>24)==(0); if ($45) { label = 12; } else { $46 = HEAP8[$47>>0]|0; $48 = ($46<<24>>24)==(0); if ($48) { $49 = $$092 * 0.019999999552965164; ;HEAP32[$$byval_copy5>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$1+8>>2]|0; ;HEAP32[$$byval_copy6>>2]=HEAP32[14160>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[14160+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[14160+8>>2]|0; _PhysicsComp_MoveNormal($0,$$byval_copy5,$49,$$byval_copy6,0.019999999552965164,$$1); } else { label = 12; } } do { if ((label|0) == 12) { $50 = (_Entity_TouchesAnyLava($3)|0); $51 = ($50<<24>>24)==(0); if (!($51)) { $52 = HEAP8[$47>>0]|0; $53 = ($52<<24>>24)==(0); if ($53) { $54 = $$092 * 0.019999999552965164; ;HEAP32[$$byval_copy5>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$1+8>>2]|0; ;HEAP32[$$byval_copy6>>2]=HEAP32[14172>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[14172+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[14172+8>>2]|0; _PhysicsComp_MoveNormal($0,$$byval_copy5,$54,$$byval_copy6,0.019999999552965164,$$1); break; } } $55 = (_Entity_TouchesAnyRope($3)|0); $56 = ($55<<24>>24)==(0); $$pr = HEAP8[$47>>0]|0; $57 = ($$pr<<24>>24)==(0); if ($56) { if ($57) { $58 = ((($3)) + 111|0); $59 = HEAP8[$58>>0]|0; $60 = ($59<<24>>24)==(0); $phitmp = $60 ? 0.019999999552965164 : 0.10000000149011612; $108 = 1;$68 = $phitmp; } else { $108 = 0;$68 = 0.10000000149011612; } } else { if ($57) { ;HEAP32[$$byval_copy5>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$1+8>>2]|0; ;HEAP32[$$byval_copy6>>2]=HEAP32[14184>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[14184+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[14184+8>>2]|0; _PhysicsComp_MoveNormal($0,$$byval_copy5,0.034000001847743988,$$byval_copy6,0.034000001847743988,$$1); break; } else { $108 = 0;$68 = 0.10000000149011612; } } $61 = HEAP8[$0>>0]|0; $62 = ($61<<24>>24)==(0); if ($62) { $63 = ((($3)) + 48|0); $64 = HEAP32[$63>>2]|0; $65 = ((($64)) + 48|0); $66 = +HEAPF32[$65>>2]; $72 = $66; } else { $72 = 0.019999999552965164; } $67 = $$092 * $68; $69 = ((($3)) + 48|0); $70 = HEAP32[$69>>2]|0; $71 = ((($70)) + 52|0); if ($108) { ;HEAP32[$$byval_copy5>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$1+8>>2]|0; ;HEAP32[$$byval_copy6>>2]=HEAP32[$71>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$71+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$71+8>>2]|0; _PhysicsComp_MoveNormal($0,$$byval_copy5,$67,$$byval_copy6,$72,$$1); } else { ;HEAP32[$$byval_copy5>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$1+8>>2]|0; ;HEAP32[$$byval_copy6>>2]=HEAP32[$71>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$71+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$71+8>>2]|0; _PhysicsComp_MoveFlying($0,$$byval_copy5,$67,$$byval_copy6,$72,$$1); } $73 = (_PhysicsComp_OnIce($3)|0); $74 = ($73<<24>>24)==(0); if (!($74)) { $75 = HEAP8[$47>>0]|0; $76 = ($75<<24>>24)==(0); if ($76) { $77 = ((($3)) + 36|0); $78 = +HEAPF32[$77>>2]; $79 = (+Math_abs((+$78))); $80 = $79 > 0.25; if (!($80)) { $81 = ((($3)) + 44|0); $82 = +HEAPF32[$81>>2]; $83 = (+Math_abs((+$82))); $84 = $83 > 0.25; if (!($84)) { break; } } $85 = 0.25 / $78; $86 = (+Math_abs((+$85))); $87 = ((($3)) + 44|0); $88 = +HEAPF32[$87>>2]; $89 = 0.25 / $88; $90 = (+Math_abs((+$89))); $91 = $86 < $90; $92 = $91 ? $86 : $90; $93 = $78 * $92; HEAPF32[$77>>2] = $93; $94 = $88 * $92; HEAPF32[$87>>2] = $94; break; } } $95 = ((($3)) + 111|0); $96 = HEAP8[$95>>0]|0; $97 = ($96<<24>>24)==(0); if ($97) { $98 = ((($5)) + 35|0); $99 = HEAP8[$98>>0]|0; $100 = ($99<<24>>24)==(0); if ($100) { break; } } $101 = ((($3)) + 36|0); $102 = HEAP32[$69>>2]|0; $103 = ((($102)) + 64|0); _Vec3_Mul3_394($101,$101,$103); } } while(0); $104 = ((($3)) + 111|0); $105 = HEAP8[$104>>0]|0; $106 = ($105<<24>>24)==(0); if ($106) { STACKTOP = sp;return; } $107 = ((($0)) + 4|0); HEAP32[$107>>2] = 0; STACKTOP = sp;return; } function _PhysicsComp_GetBaseSpeed($0) { $0 = $0|0; var $$0 = 0.0, $1 = 0, $10 = 0, $11 = 0.0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; _Entity_GetBounds($3,$1); HEAP8[$0>>0] = 0; $4 = (+_PhysicsComp_LowestModifier($0,$1,0)); $5 = ((($1)) + 4|0); $6 = +HEAPF32[$5>>2]; $7 = $6 + -0.03125; HEAPF32[$5>>2] = $7; $8 = (+_PhysicsComp_LowestModifier($0,$1,1)); $9 = $4 == 1.0E+9; $10 = $8 == 1.0E+9; $or$cond = $9 & $10; $11 = $9 ? $8 : $4; $$0 = $or$cond ? 1.0 : $11; STACKTOP = sp;return (+$$0); } function _PhysicsComp_GetSpeed($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = $2|0; var $$ = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 1|0); $4 = HEAP8[$3>>0]|0; $5 = ($4<<24>>24)==(0); $6 = $5 ? 1.0 : $1; $7 = (+_HacksComp_CalcSpeedFactor($0,$2)); $8 = $7 + 1.0; $9 = $6 * $8; $10 = ((($0)) + 13|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(0); if (!($12)) { $16 = $9; return (+$16); } $13 = ((($0)) + 40|0); $14 = +HEAPF32[$13>>2]; $15 = $9 < $14; $$ = $15 ? $9 : $14; $16 = $$; return (+$16); } function _PhysicsComp_MoveNormal($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = +$2; $3 = $3|0; $4 = +$4; $5 = +$5; var $$byval_copy1 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $$byval_copy1 = sp; ;HEAP32[$$byval_copy1>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$1+8>>2]|0; _PhysicsComp_MoveHor($0,$$byval_copy1,$2); ;HEAP32[$$byval_copy1>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$3+8>>2]|0; _PhysicsComp_Move($0,$$byval_copy1,$4,$5); STACKTOP = sp;return; } function _PhysicsComp_MoveFlying($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = +$2; $3 = $3|0; $4 = +$4; $5 = +$5; var $$0 = 0.0, $$byval_copy1 = 0, $$old1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0.0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $$byval_copy1 = sp; $6 = ((($0)) + 8|0); $7 = HEAP32[$6>>2]|0; $8 = ((($0)) + 24|0); $9 = HEAP32[$8>>2]|0; ;HEAP32[$$byval_copy1>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$1+8>>2]|0; _PhysicsComp_MoveHor($0,$$byval_copy1,$2); $10 = ((($7)) + 36|0); $11 = +HEAPF32[$10>>2]; $12 = $11 * $11; $13 = ((($7)) + 44|0); $14 = +HEAPF32[$13>>2]; $15 = $14 * $14; $16 = $12 + $15; $17 = (+Math_sqrt((+$16))); $18 = +HEAPF32[$1>>2]; $19 = $18 != 0.0; if ($19) { $$old1 = $17 > 0.0010000000474974513; if ($$old1) { label = 4; } else { $$0 = $5; } } else { $20 = ((($1)) + 8|0); $21 = +HEAPF32[$20>>2]; $22 = $21 != 0.0; $23 = $17 > 0.0010000000474974513; $or$cond = $23 & $22; if ($or$cond) { label = 4; } else { $$0 = $5; } } if ((label|0) == 4) { $24 = ((($7)) + 40|0); HEAPF32[$24>>2] = 0.0; $25 = ((($9)) + 36|0); $26 = HEAP8[$25>>0]|0; $27 = ($26<<24>>24)==(0); if ($27) { $28 = ((($0)) + 2|0); $29 = HEAP8[$28>>0]|0; $30 = ($29<<24>>24)==(0); if (!($30)) { label = 6; } } else { label = 6; } if ((label|0) == 6) { $31 = $17 + 0.0; HEAPF32[$24>>2] = $31; } $32 = ((($9)) + 37|0); $33 = HEAP8[$32>>0]|0; $34 = ($33<<24>>24)==(0); if ($34) { $$0 = 1.0; } else { $35 = +HEAPF32[$24>>2]; $36 = $35 - $17; HEAPF32[$24>>2] = $36; $$0 = 1.0; } } ;HEAP32[$$byval_copy1>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$3+8>>2]|0; _PhysicsComp_Move($0,$$byval_copy1,$4,$$0); STACKTOP = sp;return; } function _PhysicsComp_OnIce($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; $2 = ((($0)) + 4|0); $3 = +HEAPF32[$2>>2]; $4 = (_Math_Floor($3)|0); $5 = ((($0)) + 8|0); $6 = +HEAPF32[$5>>2]; $7 = $6 + -0.0099999997764825821; $8 = (_Math_Floor($7)|0); $9 = ((($0)) + 12|0); $10 = +HEAPF32[$9>>2]; $11 = (_Math_Floor($10)|0); $12 = (_World_GetPhysicsBlock($4,$8,$11)|0); $13 = $12&65535; $14 = (1116180 + ($13)|0); $15 = HEAP8[$14>>0]|0; $16 = ($15<<24>>24)==(3); if ($16) { $$0 = 1; STACKTOP = sp;return ($$0|0); } _Entity_GetBounds($0,$1); $17 = ((($1)) + 4|0); $18 = +HEAPF32[$17>>2]; $19 = $18 + -0.0099999997764825821; HEAPF32[$17>>2] = $19; $20 = ((($1)) + 16|0); HEAPF32[$20>>2] = $19; $21 = (_Entity_TouchesAny($1,10)|0); $$0 = $21; STACKTOP = sp;return ($$0|0); } function _Vec3_Mul3_394($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 * $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 * $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 * $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _PhysicsComp_TouchesSlipperyIce($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1116180 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(4); $5 = $4&1; return ($5|0); } function _PhysicsComp_MoveHor($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = +$2; var $$0 = 0.0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = $3 * $3; $5 = ((($1)) + 8|0); $6 = +HEAPF32[$5>>2]; $7 = $6 * $6; $8 = $4 + $7; $9 = (+Math_sqrt((+$8))); $10 = $9 < 9.9999997473787516E-6; if ($10) { return; } $11 = $9 < 1.0; $$0 = $11 ? 1.0 : $9; $12 = $2 / $$0; $13 = ((($0)) + 8|0); $14 = HEAP32[$13>>2]|0; _Vec3_Mul1_395($1,$1,$12); $15 = ((($14)) + 36|0); _Vec3_Add_374($15,$15,$1); return; } function _PhysicsComp_Move($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = +$2; $3 = +$3; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 8|0); $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 36|0); $7 = ((($5)) + 40|0); $8 = +HEAPF32[$7>>2]; $9 = $8 * $3; HEAPF32[$7>>2] = $9; $10 = ((($0)) + 24|0); $11 = HEAP32[$10>>2]|0; $12 = ((($11)) + 34|0); $13 = HEAP8[$12>>0]|0; $14 = ($13<<24>>24)==(0); if ($14) { $15 = ((($0)) + 28|0); $16 = HEAP32[$15>>2]|0; _Collisions_MoveAndWallSlide($16); } $17 = ((($5)) + 4|0); _Vec3_Add_374($17,$17,$6); $18 = +HEAPF32[$7>>2]; $19 = $18 / $3; HEAPF32[$7>>2] = $19; _Vec3_Mul3_394($6,$6,$1); $20 = +HEAPF32[$7>>2]; $21 = $20 - $2; HEAPF32[$7>>2] = $21; return; } function _Vec3_Mul1_395($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = +$2; var $10 = 0.0, $11 = 0.0, $12 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = $3 * $2; HEAPF32[$0>>2] = $4; $5 = ((($1)) + 4|0); $6 = +HEAPF32[$5>>2]; $7 = $6 * $2; $8 = ((($0)) + 4|0); HEAPF32[$8>>2] = $7; $9 = ((($1)) + 8|0); $10 = +HEAPF32[$9>>2]; $11 = $10 * $2; $12 = ((($0)) + 8|0); HEAPF32[$12>>2] = $11; return; } function _PhysicsComp_LowestModifier($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$03749 = 0, $$03841 = 0, $$039$lcssa = 0.0, $$03948 = 0.0, $$043 = 0, $$1$lcssa = 0.0, $$142 = 0.0, $$2$ = 0.0, $$2$lcssa = 0.0, $$240 = 0.0, $$3 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; var $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; var $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0; var $56 = 0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $8 = 0; var $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $3 = sp + 52|0; $4 = sp + 40|0; $5 = sp + 16|0; $6 = sp; _IVec3_Floor($3,$1); $7 = ((($1)) + 12|0); _IVec3_Floor($4,$7); $8 = HEAP32[$3>>2]|0; $9 = ($8|0)>(0); $10 = $9 ? $8 : 0; HEAP32[$3>>2] = $10; $11 = HEAP32[$4>>2]|0; $12 = HEAP32[(1103576)>>2]|0; $13 = ($11|0)<($12|0); $14 = $13 ? $11 : $12; HEAP32[$4>>2] = $14; $15 = ((($3)) + 4|0); $16 = HEAP32[$15>>2]|0; $17 = ($16|0)>(0); $18 = $17 ? $16 : 0; HEAP32[$15>>2] = $18; $19 = ((($4)) + 4|0); $20 = HEAP32[$19>>2]|0; $21 = HEAP32[(1103580)>>2]|0; $22 = ($20|0)<($21|0); $23 = $22 ? $20 : $21; HEAP32[$19>>2] = $23; $24 = ((($3)) + 8|0); $25 = HEAP32[$24>>2]|0; $26 = ($25|0)>(0); $27 = $26 ? $25 : 0; HEAP32[$24>>2] = $27; $28 = ((($4)) + 8|0); $29 = HEAP32[$28>>2]|0; $30 = HEAP32[(1103584)>>2]|0; $31 = ($29|0)<($30|0); $32 = $31 ? $29 : $30; HEAP32[$28>>2] = $32; $33 = HEAP32[$19>>2]|0; $34 = ($18|0)>($33|0); if ($34) { $$039$lcssa = 1.0E+9; STACKTOP = sp;return (+$$039$lcssa); } $35 = ((($6)) + 4|0); $36 = ((($6)) + 8|0); $37 = ($2<<24>>24)!=(0); $38 = ((($5)) + 12|0); $$03749 = $18;$$03948 = 1.0E+9; while(1) { $39 = (+($$03749|0)); HEAPF32[$35>>2] = $39; $40 = HEAP32[$24>>2]|0; $41 = HEAP32[$28>>2]|0; $42 = ($40|0)>($41|0); if ($42) { $$1$lcssa = $$03948; } else { $$043 = $40;$$142 = $$03948; while(1) { $43 = (+($$043|0)); HEAPF32[$36>>2] = $43; $44 = HEAP32[$3>>2]|0; $45 = HEAP32[$4>>2]|0; $46 = ($44|0)>($45|0); if ($46) { $$2$lcssa = $$142; } else { $$03841 = $44;$$240 = $$142; while(1) { $47 = (+($$03841|0)); HEAPF32[$6>>2] = $47; $48 = (_World_GetBlock_384($$03841,$$03749,$$043)|0); $49 = $48&65535; $50 = ($48<<16>>16)==(0); if ($50) { $$3 = $$240; } else { $51 = (1115412 + ($49)|0); $52 = HEAP8[$51>>0]|0; $53 = ($52<<24>>24)!=(2); $or$cond = $37 | $53; if ($or$cond) { $54 = (1125396 + (($49*12)|0)|0); _Vec3_Add_374($5,$6,$54); $55 = (1134612 + (($49*12)|0)|0); _Vec3_Add_374($38,$6,$55); $56 = (_AABB_Intersects($5,$1)|0); $57 = ($56<<24>>24)==(0); if ($57) { $$3 = $$240; } else { $58 = (1116948 + ($49<<2)|0); $59 = +HEAPF32[$58>>2]; $60 = $$240 < $59; $$2$ = $60 ? $$240 : $59; $61 = (1116180 + ($49)|0); $62 = HEAP8[$61>>0]|0; $63 = ($62<<24>>24)==(1); if ($63) { HEAP8[$0>>0] = 1; $$3 = $$2$; } else { $$3 = $$2$; } } } else { $$3 = $$240; } } $64 = (($$03841) + 1)|0; $65 = HEAP32[$4>>2]|0; $66 = ($$03841|0)<($65|0); if ($66) { $$03841 = $64;$$240 = $$3; } else { $$2$lcssa = $$3; break; } } } $67 = (($$043) + 1)|0; $68 = HEAP32[$28>>2]|0; $69 = ($$043|0)<($68|0); if ($69) { $$043 = $67;$$142 = $$2$lcssa; } else { $$1$lcssa = $$2$lcssa; break; } } } $70 = (($$03749) + 1)|0; $71 = HEAP32[$19>>2]|0; $72 = ($$03749|0)<($71|0); if ($72) { $$03749 = $70;$$03948 = $$1$lcssa; } else { $$039$lcssa = $$1$lcssa; break; } } STACKTOP = sp;return (+$$039$lcssa); } function _PhysicsComp_CalcMaxHeight($0) { $0 = +$0; var $1 = 0.0, $10 = 0, $11 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = $0; $2 = $1 * 0.247483075; $3 = $2 + 0.98993229999999998; $4 = (+_Math_Log($3)); $5 = $4 * 49.498316449999997; $6 = (~~(($5))); $7 = (+_PhysicsComp_YPosAt($6,$0)); $8 = (($6) + 1)|0; $9 = (+_PhysicsComp_YPosAt($8,$0)); $10 = $7 > $9; $11 = $10 ? $7 : $9; return (+$11); } function _PhysicsComp_YPosAt($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (+($0|0)); $3 = $2 * -0.020202700000000001; $4 = (+_Math_Exp($3)); $5 = $1 * 49.0; $6 = -196.0 - $5; $7 = $6; $8 = $4 * $7; $9 = $0 << 2; $10 = (+($9|0)); $11 = $8 - $10; $12 = $1 * 50.0; $13 = $12; $14 = $11 + $13; $15 = $14 + 196.0; return (+$15); } function _PhysicsComp_CalcJumpVelocity($0) { $0 = +$0; var $$0 = 0.0, $$010 = 0.0, $$1 = 0.0, $$2 = 0.0, $$311 = 0.0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = $0 == 0.0; if ($1) { $$010 = 0.0; return (+$$010); } $2 = !($0 >= 256.0); $$0 = $2 ? 0.0 : 10.0; $3 = !($0 >= 512.0); $$1 = $3 ? $$0 : 16.5; $4 = !($0 >= 768.0); $$2 = $4 ? $$1 : 22.5; $5 = (+_PhysicsComp_CalcMaxHeight($$2)); $6 = $0; $7 = !($5 <= $6); if ($7) { $$010 = $$2; return (+$$010); } $$311 = $$2; while(1) { $8 = $$311 + 0.0010000000474974513; $9 = (+_PhysicsComp_CalcMaxHeight($8)); $10 = !($9 <= $6); if ($10) { $$010 = $8; break; } else { $$311 = $8; } } return (+$$010); } function _PhysicsComp_DoEntityPush($0) { $0 = $0|0; var $$032 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0.0; var $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0.0, $43 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $or$cond = 0, $or$cond31 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($1)) + 4|0); HEAPF32[$2>>2] = 0.0; $3 = ((($0)) + 8|0); $4 = ((($0)) + 96|0); $5 = ((($0)) + 4|0); $6 = ((($0)) + 12|0); $7 = ((($1)) + 8|0); $8 = ((($0)) + 36|0); $$032 = 0; while(1) { $9 = (1782744 + ($$032<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0|0); $12 = ($10|0)==($0|0); $or$cond31 = $11 | $12; if (!($or$cond31)) { $13 = ((($10)) + 48|0); $14 = HEAP32[$13>>2]|0; $15 = ((($14)) + 47|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(0); if (!($17)) { $18 = +HEAPF32[$3>>2]; $19 = ((($10)) + 8|0); $20 = +HEAPF32[$19>>2]; $21 = ((($10)) + 96|0); $22 = +HEAPF32[$21>>2]; $23 = $20 + $22; $24 = !($18 <= $23); if (!($24)) { $25 = +HEAPF32[$4>>2]; $26 = $18 + $25; $27 = !($20 <= $26); if (!($27)) { $28 = ((($10)) + 4|0); $29 = +HEAPF32[$28>>2]; $30 = +HEAPF32[$5>>2]; $31 = $29 - $30; HEAPF32[$1>>2] = $31; $32 = ((($10)) + 12|0); $33 = +HEAPF32[$32>>2]; $34 = +HEAPF32[$6>>2]; $35 = $33 - $34; HEAPF32[$7>>2] = $35; $36 = $31 * $31; $37 = $35 * $35; $38 = $36 + $37; $39 = $38 < 0.0020000000949949026; $40 = $38 > 1.0; $or$cond = $39 | $40; if (!($or$cond)) { $41 = 1.0 - $38; $42 = $41 * 0.03125; _Vec3_Normalise($1); _Vec3_Mul1_395($1,$1,$42); _Vec3_Sub($8,$8,$1); } } } } } $43 = (($$032) + 1)|0; $exitcond = ($43|0)==(256); if ($exitcond) { break; } else { $$032 = $43; } } STACKTOP = sp;return; } function _Vec3_Sub($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 - $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 - $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 - $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _SoundComp_Tick($0) { $0 = $0|0; var $$byval_copy = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $$byval_copy = sp + 12|0; $1 = sp; ;HEAP32[$1>>2]=HEAP32[(1784232)>>2]|0;HEAP32[$1+4>>2]=HEAP32[(1784232)+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[(1784232)+8>>2]|0; _SoundComp_GetSound(); $2 = HEAP8[1972826]|0; $3 = ($2<<24>>24)==(0); if ($3) { _Vec3_BigPos($1); } $4 = HEAP8[(1783883)>>0]|0; $5 = ($4<<24>>24)==(0); if ($5) { STACKTOP = sp;return; } ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$1+8>>2]|0; $6 = (_SoundComp_ShouldPlay($$byval_copy)|0); $7 = ($6<<24>>24)==(0); $8 = ($0<<24>>24)!=(0); $or$cond = $8 & $7; if ($or$cond) { STACKTOP = sp;return; } $9 = HEAP8[1972827]|0; _Audio_PlayStepSound($9); ;HEAP32[14196>>2]=HEAP32[$1>>2]|0;HEAP32[14196+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[14196+8>>2]=HEAP32[$1+8>>2]|0; STACKTOP = sp;return; } function _SoundComp_GetSound() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $0 = sp + 24|0; $1 = sp + 12|0; $2 = sp; _Entity_GetBounds(1783772,$0); HEAP8[1972827] = 0; HEAP8[1972826] = 0; (_Entity_TouchesAny($0,11)|0); $3 = HEAP8[1972827]|0; $4 = ($3<<24>>24)==(0); if (!($4)) { STACKTOP = sp;return; } ;HEAP32[$1>>2]=HEAP32[(1784232)>>2]|0;HEAP32[$1+4>>2]=HEAP32[(1784232)+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[(1784232)+8>>2]|0; $5 = ((($1)) + 4|0); $6 = +HEAPF32[$5>>2]; $7 = $6 + -0.0099999997764825821; HEAPF32[$5>>2] = $7; _IVec3_Floor($2,$1); $8 = HEAP32[$2>>2]|0; $9 = ((($2)) + 4|0); $10 = HEAP32[$9>>2]|0; $11 = ((($2)) + 8|0); $12 = HEAP32[$11>>2]|0; $13 = (_World_SafeGetBlock($8,$10,$12)|0); $14 = HEAP32[$9>>2]|0; $15 = (+($14|0)); $16 = $13&65535; $17 = (((1134612 + (($16*12)|0)|0)) + 4|0); $18 = +HEAPF32[$17>>2]; $19 = $18 + $15; $20 = (1122324 + ($16)|0); $21 = HEAP8[$20>>0]|0; $22 = +HEAPF32[$5>>2]; $23 = !($19 >= $22); if (!($23)) { $24 = (1115412 + ($16)|0); $25 = HEAP8[$24>>0]|0; $26 = ($25<<24>>24)!=(2); $27 = ($21<<24>>24)==(0); $or$cond = $27 | $26; if (!($or$cond)) { HEAP8[1972826] = 1; HEAP8[1972827] = $21; STACKTOP = sp;return; } } $28 = HEAP32[$5>>2]|0; $29 = ((($0)) + 4|0); HEAP32[$29>>2] = $28; $30 = ((($0)) + 16|0); HEAP32[$30>>2] = $28; (_Entity_TouchesAny($0,12)|0); STACKTOP = sp;return; } function _Vec3_BigPos($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; ;HEAP32[$0>>2]=HEAP32[14840>>2]|0;HEAP32[$0+4>>2]=HEAP32[14840+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[14840+8>>2]|0; return; } function _SoundComp_ShouldPlay($0) { $0 = $0|0; var $$0 = 0.0, $$0$in = 0.0, $$012 = 0.0, $$012$in = 0.0, $$013 = 0, $$013$in = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0; var $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _Vec3_Sub($1,14196,$0); $2 = +HEAPF32[(1783980)>>2]; $3 = $2 < 0.99900001287460327; if ($3) { $4 = (+_Vec3_LengthSquared($1)); $5 = $4 > 3.0625; $$013$in = $5; $$013 = $$013$in&1; STACKTOP = sp;return ($$013|0); } $6 = HEAP32[(1771060)>>2]|0; $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); $9 = +HEAPF32[(1783988)>>2]; $10 = $9; if ($8) { $15 = (+_Math_Sin($10)); $16 = +HEAPF32[(1783992)>>2]; $17 = $16; $18 = (+_Math_Sin($17)); $$0$in = $18;$$012$in = $15; } else { $11 = (+_Math_Cos($10)); $12 = +HEAPF32[(1783992)>>2]; $13 = $12; $14 = (+_Math_Cos($13)); $$0$in = $14;$$012$in = $11; } $$0 = $$0$in; $$012 = $$012$in; $19 = (_Math_Sign($$012)|0); $20 = (_Math_Sign($$0)|0); $21 = ($19|0)!=($20|0); $$013$in = $21; $$013 = $$013$in&1; STACKTOP = sp;return ($$013|0); } function _Vec3_LengthSquared($0) { $0 = $0|0; var $1 = 0.0, $10 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[$0>>2]; $2 = $1 * $1; $3 = ((($0)) + 4|0); $4 = +HEAPF32[$3>>2]; $5 = $4 * $4; $6 = $2 + $5; $7 = ((($0)) + 8|0); $8 = +HEAPF32[$7>>2]; $9 = $8 * $8; $10 = $6 + $9; return (+$10); } function _Sounds_CheckNonSolid($0) { $0 = $0|0; var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1122324 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if (!($4)) { $5 = (1115412 + ($1)|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(2); if (!($7)) { HEAP8[1972827] = $3; } } $8 = (1120788 + ($1)|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(4); if ($10) { return 0; } HEAP8[1972826] = 1; return 0; } function _Sounds_CheckSolid($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1122324 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if (!($4)) { HEAP8[1972827] = $3; } $5 = (1120788 + ($1)|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(4); if ($7) { return 0; } HEAP8[1972826] = 1; return 0; } function _OnInit_402() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $spec$store$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; (_Options_UNSAFE_Get(28241,$0)|0); $1 = (_EnvRenderer_CalcFlags($0)|0); $2 = ($1|0)==(-1); $spec$store$select = $2 ? 0 : $1; $3 = $spec$store$select & 2; $4 = $3&255; HEAP8[1972829] = $4; $5 = $spec$store$select & 1; $6 = $5&255; HEAP8[1972828] = $6; _TextureEntry_Register(14232); _TextureEntry_Register(14244); _TextureEntry_Register(14256); _TextureEntry_Register(14268); _Event_Register((1792228),0,317); _Event_Register(1791968,0,318); _Event_Register(1792748,0,319); _Event_Register((1796388),0,110); _Event_Register((1793528),0,320); _Event_Register((1793788),0,321); $7 = HEAP32[3583]|0; _Game_SetViewDistance($7); STACKTOP = sp;return; } function _OnFree_403() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; _OnContextLost_407(0); $0 = HEAP32[447647]|0; _Mem_Free($0); HEAP32[447647] = 0; return; } function _OnReset_404() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; _Gfx_SetFog(0); _DeleteVbs(); $1 = HEAP32[447647]|0; _Mem_Free($1); HEAP32[447647] = 0; _IVec3_MaxValue($0); ;HEAP32[1790640>>2]=HEAP32[$0>>2]|0;HEAP32[1790640+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[1790640+8>>2]=HEAP32[$0+8>>2]|0; STACKTOP = sp;return; } function _OnNewMapLoaded_405() { var label = 0, sp = 0; sp = STACKTOP; _OnContextRecreated(0); return; } function _OnContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972828]|0; $2 = ($1<<24>>24)==(0); $3 = $2&1; _Gfx_SetFog($3); _UpdateAll(); return; } function _UpdateAll() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; _UpdateMapSides(); _UpdateMapEdges(); _UpdateClouds(); _UpdateSky(); _UpdateSkybox(); _EnvRenderer_UpdateFog(); _Gfx_DeleteVb(1790592); $0 = HEAP8[(1803128)>>0]|0; $1 = ($0<<24>>24)==(0); if (!($1)) { return; } _Gfx_RecreateDynamicVb(1790592,1,648); _UpdateBorderTextures(); return; } function _UpdateMapSides() { var $$065 = 0, $$sroa$0$0$$sroa_idx45$1 = 0, $$sroa$0$0$$sroa_idx45$2 = 0, $$sroa$0$0$$sroa_idx45$3 = 0, $$sroa$0$0$copyload46 = 0, $$sroa$0$0$copyload46$1 = 0, $$sroa$0$0$copyload46$2 = 0, $$sroa$0$0$copyload46$3 = 0, $$sroa$10$0$$sroa_idx58 = 0, $$sroa$10$0$$sroa_idx58$1 = 0, $$sroa$10$0$$sroa_idx58$2 = 0, $$sroa$10$0$$sroa_idx58$3 = 0, $$sroa$10$0$$sroa_idx59 = 0, $$sroa$10$0$$sroa_idx59$1 = 0, $$sroa$10$0$$sroa_idx59$2 = 0, $$sroa$10$0$$sroa_idx59$3 = 0, $$sroa$10$0$copyload = 0, $$sroa$10$0$copyload$1 = 0, $$sroa$10$0$copyload$2 = 0, $$sroa$10$0$copyload$3 = 0; var $$sroa$10$0$copyload60 = 0, $$sroa$10$0$copyload60$1 = 0, $$sroa$10$0$copyload60$2 = 0, $$sroa$10$0$copyload60$3 = 0, $$sroa$6$0$$sroa_idx49 = 0, $$sroa$6$0$$sroa_idx49$1 = 0, $$sroa$6$0$$sroa_idx49$2 = 0, $$sroa$6$0$$sroa_idx49$3 = 0, $$sroa$6$0$copyload50 = 0, $$sroa$6$0$copyload50$1 = 0, $$sroa$6$0$copyload50$2 = 0, $$sroa$6$0$copyload50$3 = 0, $$sroa$8$0$$sroa_idx53 = 0, $$sroa$8$0$$sroa_idx53$1 = 0, $$sroa$8$0$$sroa_idx53$2 = 0, $$sroa$8$0$$sroa_idx53$3 = 0, $$sroa$8$0$$sroa_idx54 = 0, $$sroa$8$0$$sroa_idx54$1 = 0, $$sroa$8$0$$sroa_idx54$2 = 0, $$sroa$8$0$$sroa_idx54$3 = 0; var $$sroa$8$0$copyload = 0, $$sroa$8$0$copyload$1 = 0, $$sroa$8$0$copyload$2 = 0, $$sroa$8$0$copyload$3 = 0, $$sroa$8$0$copyload55 = 0, $$sroa$8$0$copyload55$1 = 0, $$sroa$8$0$copyload55$2 = 0, $$sroa$8$0$copyload55$3 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0; var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0; var $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $9 = 0, $or$cond = 0, $spec$select = 0, $spec$select67 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $0 = sp; $1 = sp + 64|0; _Gfx_DeleteVb(1790632); $2 = HEAP8[(1103612)>>0]|0; $3 = ($2<<24>>24)!=(0); $4 = HEAP8[(1803128)>>0]|0; $5 = ($4<<24>>24)==(0); $or$cond = $3 & $5; if (!($or$cond)) { STACKTOP = sp;return; } $6 = HEAP16[(1972146)>>1]|0; $7 = $6&65535; $8 = (1120788 + ($7)|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(4); if ($10) { STACKTOP = sp;return; } _CalcBorderRects($0); HEAP32[447659] = 0; $$sroa$8$0$$sroa_idx53 = ((($0)) + 8|0); $$sroa$8$0$copyload = HEAP32[$$sroa$8$0$$sroa_idx53>>2]|0; $$sroa$10$0$$sroa_idx58 = ((($0)) + 12|0); $$sroa$10$0$copyload = HEAP32[$$sroa$10$0$$sroa_idx58>>2]|0; $11 = (_CalcNumVertices($$sroa$8$0$copyload,$$sroa$10$0$copyload)|0); $12 = HEAP32[447659]|0; $13 = (($12) + ($11))|0; HEAP32[447659] = $13; $$sroa$8$0$$sroa_idx53$1 = ((($0)) + 24|0); $$sroa$8$0$copyload$1 = HEAP32[$$sroa$8$0$$sroa_idx53$1>>2]|0; $$sroa$10$0$$sroa_idx58$1 = ((($0)) + 28|0); $$sroa$10$0$copyload$1 = HEAP32[$$sroa$10$0$$sroa_idx58$1>>2]|0; $14 = (_CalcNumVertices($$sroa$8$0$copyload$1,$$sroa$10$0$copyload$1)|0); $15 = HEAP32[447659]|0; $16 = (($15) + ($14))|0; HEAP32[447659] = $16; $$sroa$8$0$$sroa_idx53$2 = ((($0)) + 40|0); $$sroa$8$0$copyload$2 = HEAP32[$$sroa$8$0$$sroa_idx53$2>>2]|0; $$sroa$10$0$$sroa_idx58$2 = ((($0)) + 44|0); $$sroa$10$0$copyload$2 = HEAP32[$$sroa$10$0$$sroa_idx58$2>>2]|0; $17 = (_CalcNumVertices($$sroa$8$0$copyload$2,$$sroa$10$0$copyload$2)|0); $18 = HEAP32[447659]|0; $19 = (($18) + ($17))|0; HEAP32[447659] = $19; $$sroa$8$0$$sroa_idx53$3 = ((($0)) + 56|0); $$sroa$8$0$copyload$3 = HEAP32[$$sroa$8$0$$sroa_idx53$3>>2]|0; $$sroa$10$0$$sroa_idx58$3 = ((($0)) + 60|0); $$sroa$10$0$copyload$3 = HEAP32[$$sroa$10$0$$sroa_idx58$3>>2]|0; $20 = (_CalcNumVertices($$sroa$8$0$copyload$3,$$sroa$10$0$copyload$3)|0); $21 = HEAP32[447659]|0; $22 = (($21) + ($20))|0; HEAP32[447659] = $22; $23 = HEAP32[(1972148)>>2]|0; $24 = HEAP32[(1972152)>>2]|0; $25 = (($24) + ($23))|0; $26 = HEAP32[(1103564)>>2]|0; $27 = HEAP32[(1103572)>>2]|0; $28 = (_CalcNumVertices($26,$27)|0); $29 = HEAP32[447659]|0; $30 = (($29) + ($28))|0; HEAP32[447659] = $30; $31 = HEAP32[(1103564)>>2]|0; $32 = (_Math_AbsI($25)|0); $33 = (_CalcNumVertices($31,$32)|0); $34 = $33 << 1; $35 = HEAP32[447659]|0; $36 = (($35) + ($34))|0; HEAP32[447659] = $36; $37 = HEAP32[(1103572)>>2]|0; $38 = (_Math_AbsI($25)|0); $39 = (_CalcNumVertices($37,$38)|0); $40 = $39 << 1; $41 = HEAP32[447659]|0; $42 = (($41) + ($40))|0; HEAP32[447659] = $42; $43 = (_Gfx_RecreateAndLockVb(1790632,1,$42)|0); HEAP32[$1>>2] = $43; $44 = (1108500 + ($7)|0); $45 = HEAP8[$44>>0]|0; $46 = ($45<<24>>24)==(0); $47 = HEAP32[(1972220)>>2]|0; $48 = $46 ? $47 : -1; $49 = (1123092 + ($7)|0); $50 = HEAP8[$49>>0]|0; $51 = ($50<<24>>24)==(0); if ($51) { $$065 = $48; } else { $52 = (1109268 + ($7<<2)|0); $53 = HEAP32[$52>>2]|0; $54 = (_PackedCol_Tint($48,$53)|0); $$065 = $54; } $55 = (+($25|0)); $56 = (((1143828 + (($7*12)|0)|0)) + 4|0); $57 = (((1125396 + (($7*12)|0)|0)) + 4|0); $$sroa$0$0$copyload46 = HEAP32[$0>>2]|0; $$sroa$6$0$$sroa_idx49 = ((($0)) + 4|0); $$sroa$6$0$copyload50 = HEAP32[$$sroa$6$0$$sroa_idx49>>2]|0; $$sroa$8$0$$sroa_idx54 = ((($0)) + 8|0); $$sroa$8$0$copyload55 = HEAP32[$$sroa$8$0$$sroa_idx54>>2]|0; $$sroa$10$0$$sroa_idx59 = ((($0)) + 12|0); $$sroa$10$0$copyload60 = HEAP32[$$sroa$10$0$$sroa_idx59>>2]|0; $58 = (($$sroa$8$0$copyload55) + ($$sroa$0$0$copyload46))|0; $59 = (($$sroa$10$0$copyload60) + ($$sroa$6$0$copyload50))|0; $60 = +HEAPF32[$56>>2]; $61 = +HEAPF32[$57>>2]; $62 = $60 - $61; _DrawBorderY($$sroa$0$0$copyload46,$$sroa$6$0$copyload50,$58,$59,$55,$$065,0.0,$62,$1); $$sroa$0$0$$sroa_idx45$1 = ((($0)) + 16|0); $$sroa$0$0$copyload46$1 = HEAP32[$$sroa$0$0$$sroa_idx45$1>>2]|0; $$sroa$6$0$$sroa_idx49$1 = ((($0)) + 20|0); $$sroa$6$0$copyload50$1 = HEAP32[$$sroa$6$0$$sroa_idx49$1>>2]|0; $$sroa$8$0$$sroa_idx54$1 = ((($0)) + 24|0); $$sroa$8$0$copyload55$1 = HEAP32[$$sroa$8$0$$sroa_idx54$1>>2]|0; $$sroa$10$0$$sroa_idx59$1 = ((($0)) + 28|0); $$sroa$10$0$copyload60$1 = HEAP32[$$sroa$10$0$$sroa_idx59$1>>2]|0; $63 = (($$sroa$8$0$copyload55$1) + ($$sroa$0$0$copyload46$1))|0; $64 = (($$sroa$10$0$copyload60$1) + ($$sroa$6$0$copyload50$1))|0; $65 = +HEAPF32[$56>>2]; $66 = +HEAPF32[$57>>2]; $67 = $65 - $66; _DrawBorderY($$sroa$0$0$copyload46$1,$$sroa$6$0$copyload50$1,$63,$64,$55,$$065,0.0,$67,$1); $$sroa$0$0$$sroa_idx45$2 = ((($0)) + 32|0); $$sroa$0$0$copyload46$2 = HEAP32[$$sroa$0$0$$sroa_idx45$2>>2]|0; $$sroa$6$0$$sroa_idx49$2 = ((($0)) + 36|0); $$sroa$6$0$copyload50$2 = HEAP32[$$sroa$6$0$$sroa_idx49$2>>2]|0; $$sroa$8$0$$sroa_idx54$2 = ((($0)) + 40|0); $$sroa$8$0$copyload55$2 = HEAP32[$$sroa$8$0$$sroa_idx54$2>>2]|0; $$sroa$10$0$$sroa_idx59$2 = ((($0)) + 44|0); $$sroa$10$0$copyload60$2 = HEAP32[$$sroa$10$0$$sroa_idx59$2>>2]|0; $68 = (($$sroa$8$0$copyload55$2) + ($$sroa$0$0$copyload46$2))|0; $69 = (($$sroa$10$0$copyload60$2) + ($$sroa$6$0$copyload50$2))|0; $70 = +HEAPF32[$56>>2]; $71 = +HEAPF32[$57>>2]; $72 = $70 - $71; _DrawBorderY($$sroa$0$0$copyload46$2,$$sroa$6$0$copyload50$2,$68,$69,$55,$$065,0.0,$72,$1); $$sroa$0$0$$sroa_idx45$3 = ((($0)) + 48|0); $$sroa$0$0$copyload46$3 = HEAP32[$$sroa$0$0$$sroa_idx45$3>>2]|0; $$sroa$6$0$$sroa_idx49$3 = ((($0)) + 52|0); $$sroa$6$0$copyload50$3 = HEAP32[$$sroa$6$0$$sroa_idx49$3>>2]|0; $$sroa$8$0$$sroa_idx54$3 = ((($0)) + 56|0); $$sroa$8$0$copyload55$3 = HEAP32[$$sroa$8$0$$sroa_idx54$3>>2]|0; $$sroa$10$0$$sroa_idx59$3 = ((($0)) + 60|0); $$sroa$10$0$copyload60$3 = HEAP32[$$sroa$10$0$$sroa_idx59$3>>2]|0; $73 = (($$sroa$8$0$copyload55$3) + ($$sroa$0$0$copyload46$3))|0; $74 = (($$sroa$10$0$copyload60$3) + ($$sroa$6$0$copyload50$3))|0; $75 = +HEAPF32[$56>>2]; $76 = +HEAPF32[$57>>2]; $77 = $75 - $76; _DrawBorderY($$sroa$0$0$copyload46$3,$$sroa$6$0$copyload50$3,$73,$74,$55,$$065,0.0,$77,$1); $78 = ($25|0)<(0); $spec$select = $78 ? $25 : 0; $spec$select67 = $78 ? 0 : $25; $79 = HEAP32[(1103564)>>2]|0; $80 = HEAP32[(1103572)>>2]|0; _DrawBorderY(0,0,$79,$80,0.0,$$065,0.0,0.0,$1); $81 = HEAP32[(1103564)>>2]|0; _DrawBorderZ(0,$81,$spec$select,$spec$select67,$$065,$1); $82 = HEAP32[(1103572)>>2]|0; $83 = HEAP32[(1103564)>>2]|0; _DrawBorderZ($82,$83,$spec$select,$spec$select67,$$065,$1); $84 = HEAP32[(1103572)>>2]|0; _DrawBorderX(0,$84,$spec$select,$spec$select67,$$065,$1); $85 = HEAP32[(1103564)>>2]|0; $86 = HEAP32[(1103572)>>2]|0; _DrawBorderX($85,$86,$spec$select,$spec$select67,$$065,$1); $87 = HEAP32[447658]|0; _Gfx_UnlockVb($87); STACKTOP = sp;return; } function _UpdateMapEdges() { var $$042 = 0, $$sroa$0$0$$sroa_idx24$1 = 0, $$sroa$0$0$$sroa_idx24$2 = 0, $$sroa$0$0$$sroa_idx24$3 = 0, $$sroa$0$0$copyload25 = 0, $$sroa$0$0$copyload25$1 = 0, $$sroa$0$0$copyload25$2 = 0, $$sroa$0$0$copyload25$3 = 0, $$sroa$10$0$$sroa_idx37 = 0, $$sroa$10$0$$sroa_idx37$1 = 0, $$sroa$10$0$$sroa_idx37$2 = 0, $$sroa$10$0$$sroa_idx37$3 = 0, $$sroa$10$0$$sroa_idx38 = 0, $$sroa$10$0$$sroa_idx38$1 = 0, $$sroa$10$0$$sroa_idx38$2 = 0, $$sroa$10$0$$sroa_idx38$3 = 0, $$sroa$10$0$copyload = 0, $$sroa$10$0$copyload$1 = 0, $$sroa$10$0$copyload$2 = 0, $$sroa$10$0$copyload$3 = 0; var $$sroa$10$0$copyload39 = 0, $$sroa$10$0$copyload39$1 = 0, $$sroa$10$0$copyload39$2 = 0, $$sroa$10$0$copyload39$3 = 0, $$sroa$6$0$$sroa_idx28 = 0, $$sroa$6$0$$sroa_idx28$1 = 0, $$sroa$6$0$$sroa_idx28$2 = 0, $$sroa$6$0$$sroa_idx28$3 = 0, $$sroa$6$0$copyload29 = 0, $$sroa$6$0$copyload29$1 = 0, $$sroa$6$0$copyload29$2 = 0, $$sroa$6$0$copyload29$3 = 0, $$sroa$8$0$$sroa_idx32 = 0, $$sroa$8$0$$sroa_idx32$1 = 0, $$sroa$8$0$$sroa_idx32$2 = 0, $$sroa$8$0$$sroa_idx32$3 = 0, $$sroa$8$0$$sroa_idx33 = 0, $$sroa$8$0$$sroa_idx33$1 = 0, $$sroa$8$0$$sroa_idx33$2 = 0, $$sroa$8$0$$sroa_idx33$3 = 0; var $$sroa$8$0$copyload = 0, $$sroa$8$0$copyload$1 = 0, $$sroa$8$0$copyload$2 = 0, $$sroa$8$0$copyload$3 = 0, $$sroa$8$0$copyload34 = 0, $$sroa$8$0$copyload34$1 = 0, $$sroa$8$0$copyload34$2 = 0, $$sroa$8$0$copyload34$3 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0; var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0; var $56 = 0.0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0; var $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $0 = sp; $1 = sp + 64|0; _Gfx_DeleteVb(1790624); $2 = HEAP8[(1103612)>>0]|0; $3 = ($2<<24>>24)!=(0); $4 = HEAP8[(1803128)>>0]|0; $5 = ($4<<24>>24)==(0); $or$cond = $3 & $5; if (!($or$cond)) { STACKTOP = sp;return; } $6 = HEAP16[986072]|0; $7 = $6&65535; $8 = (1120788 + ($7)|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(4); if ($10) { STACKTOP = sp;return; } _CalcBorderRects($0); HEAP32[447657] = 0; $$sroa$8$0$$sroa_idx32 = ((($0)) + 8|0); $$sroa$8$0$copyload = HEAP32[$$sroa$8$0$$sroa_idx32>>2]|0; $$sroa$10$0$$sroa_idx37 = ((($0)) + 12|0); $$sroa$10$0$copyload = HEAP32[$$sroa$10$0$$sroa_idx37>>2]|0; $11 = (_CalcNumVertices($$sroa$8$0$copyload,$$sroa$10$0$copyload)|0); $12 = HEAP32[447657]|0; $13 = (($12) + ($11))|0; HEAP32[447657] = $13; $$sroa$8$0$$sroa_idx32$1 = ((($0)) + 24|0); $$sroa$8$0$copyload$1 = HEAP32[$$sroa$8$0$$sroa_idx32$1>>2]|0; $$sroa$10$0$$sroa_idx37$1 = ((($0)) + 28|0); $$sroa$10$0$copyload$1 = HEAP32[$$sroa$10$0$$sroa_idx37$1>>2]|0; $14 = (_CalcNumVertices($$sroa$8$0$copyload$1,$$sroa$10$0$copyload$1)|0); $15 = HEAP32[447657]|0; $16 = (($15) + ($14))|0; HEAP32[447657] = $16; $$sroa$8$0$$sroa_idx32$2 = ((($0)) + 40|0); $$sroa$8$0$copyload$2 = HEAP32[$$sroa$8$0$$sroa_idx32$2>>2]|0; $$sroa$10$0$$sroa_idx37$2 = ((($0)) + 44|0); $$sroa$10$0$copyload$2 = HEAP32[$$sroa$10$0$$sroa_idx37$2>>2]|0; $17 = (_CalcNumVertices($$sroa$8$0$copyload$2,$$sroa$10$0$copyload$2)|0); $18 = HEAP32[447657]|0; $19 = (($18) + ($17))|0; HEAP32[447657] = $19; $$sroa$8$0$$sroa_idx32$3 = ((($0)) + 56|0); $$sroa$8$0$copyload$3 = HEAP32[$$sroa$8$0$$sroa_idx32$3>>2]|0; $$sroa$10$0$$sroa_idx37$3 = ((($0)) + 60|0); $$sroa$10$0$copyload$3 = HEAP32[$$sroa$10$0$$sroa_idx37$3>>2]|0; $20 = (_CalcNumVertices($$sroa$8$0$copyload$3,$$sroa$10$0$copyload$3)|0); $21 = HEAP32[447657]|0; $22 = (($21) + ($20))|0; HEAP32[447657] = $22; $23 = (_Gfx_RecreateAndLockVb(1790624,1,$22)|0); HEAP32[$1>>2] = $23; $24 = (1108500 + ($7)|0); $25 = HEAP8[$24>>0]|0; $26 = ($25<<24>>24)==(0); $27 = HEAP32[(1972204)>>2]|0; $28 = $26 ? $27 : -1; $29 = (1123092 + ($7)|0); $30 = HEAP8[$29>>0]|0; $31 = ($30<<24>>24)==(0); if ($31) { $$042 = $28; } else { $32 = (1109268 + ($7<<2)|0); $33 = HEAP32[$32>>2]|0; $34 = (_PackedCol_Tint($28,$33)|0); $$042 = $34; } $35 = HEAP32[(1972148)>>2]|0; $36 = (+($35|0)); $37 = (1143828 + (($7*12)|0)|0); $38 = (1125396 + (($7*12)|0)|0); $39 = (((1143828 + (($7*12)|0)|0)) + 4|0); $40 = (((1125396 + (($7*12)|0)|0)) + 4|0); $$sroa$0$0$copyload25 = HEAP32[$0>>2]|0; $$sroa$6$0$$sroa_idx28 = ((($0)) + 4|0); $$sroa$6$0$copyload29 = HEAP32[$$sroa$6$0$$sroa_idx28>>2]|0; $$sroa$8$0$$sroa_idx33 = ((($0)) + 8|0); $$sroa$8$0$copyload34 = HEAP32[$$sroa$8$0$$sroa_idx33>>2]|0; $$sroa$10$0$$sroa_idx38 = ((($0)) + 12|0); $$sroa$10$0$copyload39 = HEAP32[$$sroa$10$0$$sroa_idx38>>2]|0; $41 = (($$sroa$8$0$copyload34) + ($$sroa$0$0$copyload25))|0; $42 = (($$sroa$10$0$copyload39) + ($$sroa$6$0$copyload29))|0; $43 = +HEAPF32[$37>>2]; $44 = +HEAPF32[$38>>2]; $45 = $43 - $44; $46 = +HEAPF32[$39>>2]; $47 = +HEAPF32[$40>>2]; $48 = $46 - $47; _DrawBorderY($$sroa$0$0$copyload25,$$sroa$6$0$copyload29,$41,$42,$36,$$042,$45,$48,$1); $$sroa$0$0$$sroa_idx24$1 = ((($0)) + 16|0); $$sroa$0$0$copyload25$1 = HEAP32[$$sroa$0$0$$sroa_idx24$1>>2]|0; $$sroa$6$0$$sroa_idx28$1 = ((($0)) + 20|0); $$sroa$6$0$copyload29$1 = HEAP32[$$sroa$6$0$$sroa_idx28$1>>2]|0; $$sroa$8$0$$sroa_idx33$1 = ((($0)) + 24|0); $$sroa$8$0$copyload34$1 = HEAP32[$$sroa$8$0$$sroa_idx33$1>>2]|0; $$sroa$10$0$$sroa_idx38$1 = ((($0)) + 28|0); $$sroa$10$0$copyload39$1 = HEAP32[$$sroa$10$0$$sroa_idx38$1>>2]|0; $49 = (($$sroa$8$0$copyload34$1) + ($$sroa$0$0$copyload25$1))|0; $50 = (($$sroa$10$0$copyload39$1) + ($$sroa$6$0$copyload29$1))|0; $51 = +HEAPF32[$37>>2]; $52 = +HEAPF32[$38>>2]; $53 = $51 - $52; $54 = +HEAPF32[$39>>2]; $55 = +HEAPF32[$40>>2]; $56 = $54 - $55; _DrawBorderY($$sroa$0$0$copyload25$1,$$sroa$6$0$copyload29$1,$49,$50,$36,$$042,$53,$56,$1); $$sroa$0$0$$sroa_idx24$2 = ((($0)) + 32|0); $$sroa$0$0$copyload25$2 = HEAP32[$$sroa$0$0$$sroa_idx24$2>>2]|0; $$sroa$6$0$$sroa_idx28$2 = ((($0)) + 36|0); $$sroa$6$0$copyload29$2 = HEAP32[$$sroa$6$0$$sroa_idx28$2>>2]|0; $$sroa$8$0$$sroa_idx33$2 = ((($0)) + 40|0); $$sroa$8$0$copyload34$2 = HEAP32[$$sroa$8$0$$sroa_idx33$2>>2]|0; $$sroa$10$0$$sroa_idx38$2 = ((($0)) + 44|0); $$sroa$10$0$copyload39$2 = HEAP32[$$sroa$10$0$$sroa_idx38$2>>2]|0; $57 = (($$sroa$8$0$copyload34$2) + ($$sroa$0$0$copyload25$2))|0; $58 = (($$sroa$10$0$copyload39$2) + ($$sroa$6$0$copyload29$2))|0; $59 = +HEAPF32[$37>>2]; $60 = +HEAPF32[$38>>2]; $61 = $59 - $60; $62 = +HEAPF32[$39>>2]; $63 = +HEAPF32[$40>>2]; $64 = $62 - $63; _DrawBorderY($$sroa$0$0$copyload25$2,$$sroa$6$0$copyload29$2,$57,$58,$36,$$042,$61,$64,$1); $$sroa$0$0$$sroa_idx24$3 = ((($0)) + 48|0); $$sroa$0$0$copyload25$3 = HEAP32[$$sroa$0$0$$sroa_idx24$3>>2]|0; $$sroa$6$0$$sroa_idx28$3 = ((($0)) + 52|0); $$sroa$6$0$copyload29$3 = HEAP32[$$sroa$6$0$$sroa_idx28$3>>2]|0; $$sroa$8$0$$sroa_idx33$3 = ((($0)) + 56|0); $$sroa$8$0$copyload34$3 = HEAP32[$$sroa$8$0$$sroa_idx33$3>>2]|0; $$sroa$10$0$$sroa_idx38$3 = ((($0)) + 60|0); $$sroa$10$0$copyload39$3 = HEAP32[$$sroa$10$0$$sroa_idx38$3>>2]|0; $65 = (($$sroa$8$0$copyload34$3) + ($$sroa$0$0$copyload25$3))|0; $66 = (($$sroa$10$0$copyload39$3) + ($$sroa$6$0$copyload29$3))|0; $67 = +HEAPF32[$37>>2]; $68 = +HEAPF32[$38>>2]; $69 = $67 - $68; $70 = +HEAPF32[$39>>2]; $71 = +HEAPF32[$40>>2]; $72 = $70 - $71; _DrawBorderY($$sroa$0$0$copyload25$3,$$sroa$6$0$copyload29$3,$65,$66,$36,$$042,$69,$72,$1); $73 = HEAP32[447656]|0; _Gfx_UnlockVb($73); STACKTOP = sp;return; } function _UpdateClouds() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteVb(1790616); $0 = HEAP8[(1103612)>>0]|0; $1 = ($0<<24>>24)!=(0); $2 = HEAP8[(1803128)>>0]|0; $3 = HEAP8[1972828]|0; $4 = $3 | $2; $5 = ($4<<24>>24)==(0); $6 = $1 & $5; if (!($6)) { return; } $7 = HEAP32[3582]|0; $8 = (+($7|0)); $9 = $8 * 1.4142135381698608; $10 = (~~(($9))); $11 = (0 - ($10))|0; $12 = HEAP32[(1103564)>>2]|0; $13 = (($12) + ($10))|0; $14 = HEAP32[(1103572)>>2]|0; $15 = (($14) + ($10))|0; $16 = (($13) + ($10))|0; $17 = (($15) + ($10))|0; $18 = (_CalcNumVertices($16,$17)|0); HEAP32[447655] = $18; $19 = (_Gfx_RecreateAndLockVb(1790616,1,$18)|0); $20 = HEAP32[(1972156)>>2]|0; _DrawCloudsY($11,$11,$13,$15,$20,$19); $21 = HEAP32[447654]|0; _Gfx_UnlockVb($21); return; } function _UpdateSky() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteVb(1790608); $0 = HEAP8[(1103612)>>0]|0; $1 = ($0<<24>>24)!=(0); $2 = HEAP8[(1803128)>>0]|0; $3 = HEAP8[1972828]|0; $4 = $3 | $2; $5 = ($4<<24>>24)==(0); $6 = $1 & $5; if (!($6)) { return; } $7 = HEAP32[3582]|0; $8 = (+($7|0)); $9 = $8 * 1.4142135381698608; $10 = (~~(($9))); $11 = (0 - ($10))|0; $12 = HEAP32[(1103564)>>2]|0; $13 = (($12) + ($10))|0; $14 = HEAP32[(1103572)>>2]|0; $15 = (($14) + ($10))|0; $16 = (($13) + ($10))|0; $17 = (($15) + ($10))|0; $18 = (_CalcNumVertices($16,$17)|0); HEAP32[447653] = $18; $19 = (_Gfx_RecreateAndLockVb(1790608,0,$18)|0); $20 = HEAP32[(1103568)>>2]|0; $21 = (($20) + 2)|0; $22 = HEAP32[(1972156)>>2]|0; $23 = ($21|0)>($22|0); $24 = $23 ? $21 : $22; $25 = (($24) + 6)|0; _DrawSkyY($11,$11,$13,$15,$25,$19); $26 = HEAP32[447652]|0; _Gfx_UnlockVb($26); return; } function _UpdateSkybox() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteVb(1790604); $0 = HEAP8[(1803128)>>0]|0; $1 = HEAP8[1972828]|0; $2 = $1 | $0; $3 = ($2<<24>>24)==(0); if (!($3)) { return; } $4 = (_Gfx_RecreateAndLockVb(1790604,1,24)|0); _Mem_Copy($4,2864,576); $5 = HEAP32[(1972200)>>2]|0; $6 = ((($4)) + 12|0); HEAP32[$6>>2] = $5; $7 = ((($4)) + 36|0); HEAP32[$7>>2] = $5; $8 = ((($4)) + 60|0); HEAP32[$8>>2] = $5; $9 = ((($4)) + 84|0); HEAP32[$9>>2] = $5; $10 = ((($4)) + 108|0); HEAP32[$10>>2] = $5; $11 = ((($4)) + 132|0); HEAP32[$11>>2] = $5; $12 = ((($4)) + 156|0); HEAP32[$12>>2] = $5; $13 = ((($4)) + 180|0); HEAP32[$13>>2] = $5; $14 = ((($4)) + 204|0); HEAP32[$14>>2] = $5; $15 = ((($4)) + 228|0); HEAP32[$15>>2] = $5; $16 = ((($4)) + 252|0); HEAP32[$16>>2] = $5; $17 = ((($4)) + 276|0); HEAP32[$17>>2] = $5; $18 = ((($4)) + 300|0); HEAP32[$18>>2] = $5; $19 = ((($4)) + 324|0); HEAP32[$19>>2] = $5; $20 = ((($4)) + 348|0); HEAP32[$20>>2] = $5; $21 = ((($4)) + 372|0); HEAP32[$21>>2] = $5; $22 = ((($4)) + 396|0); HEAP32[$22>>2] = $5; $23 = ((($4)) + 420|0); HEAP32[$23>>2] = $5; $24 = ((($4)) + 444|0); HEAP32[$24>>2] = $5; $25 = ((($4)) + 468|0); HEAP32[$25>>2] = $5; $26 = ((($4)) + 492|0); HEAP32[$26>>2] = $5; $27 = ((($4)) + 516|0); HEAP32[$27>>2] = $5; $28 = ((($4)) + 540|0); HEAP32[$28>>2] = $5; $29 = ((($4)) + 564|0); HEAP32[$29>>2] = $5; $30 = HEAP32[447651]|0; _Gfx_UnlockVb($30); return; } function _EnvRenderer_UpdateFog() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp + 4|0; $1 = sp; $2 = HEAP8[(1103612)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { STACKTOP = sp;return; } _CalcFog($0,$1); $4 = HEAP32[$1>>2]|0; _Gfx_ClearCol($4); $5 = HEAP8[1972828]|0; $6 = ($5<<24>>24)==(0); $7 = +HEAPF32[$0>>2]; if ($6) { _UpdateFogNormal($7,$4); STACKTOP = sp;return; } else { _UpdateFogMinimal($7); STACKTOP = sp;return; } } function _UpdateBorderTextures() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP16[986072]|0; _MakeBorderTex(1790596,$0); $1 = HEAP16[(1972146)>>1]|0; _MakeBorderTex(1790600,$1); return; } function _MakeBorderTex($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1803128)>>0]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { return; } $4 = $1&65535; $5 = ($4*6)|0; $6 = (($5) + 5)|0; $7 = (1162260 + ($6<<1)|0); $8 = HEAP16[$7>>1]|0; _Gfx_DeleteTexture($0); $9 = (_Atlas2D_LoadTile($8)|0); HEAP32[$0>>2] = $9; return; } function _CalcFog($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $storemerge = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $2 = sp + 36|0; $3 = sp + 24|0; $4 = sp; _IVec3_Floor($3,(1771048)); _IVec3_ToVec3($2,$3); $5 = HEAP32[$3>>2]|0; $6 = ((($3)) + 4|0); $7 = HEAP32[$6>>2]|0; $8 = ((($3)) + 8|0); $9 = HEAP32[$8>>2]|0; $10 = (_World_SafeGetBlock($5,$7,$9)|0); $11 = $10&65535; $12 = (1125396 + (($11*12)|0)|0); _Vec3_Add_406($4,$2,$12); $13 = ((($4)) + 12|0); $14 = (1134612 + (($11*12)|0)|0); _Vec3_Add_406($13,$2,$14); $15 = (_AABB_ContainsPoint($4,(1771048))|0); $16 = ($15<<24>>24)==(0); if (!($16)) { $17 = (1112340 + ($11<<2)|0); $18 = +HEAPF32[$17>>2]; $19 = $18 != 0.0; if ($19) { HEAPF32[$0>>2] = $18; $20 = (1109268 + ($11<<2)|0); $21 = HEAP32[$20>>2]|0; $storemerge = $21; HEAP32[$1>>2] = $storemerge; STACKTOP = sp;return; } } HEAPF32[$0>>2] = 0.0; $22 = HEAP32[3582]|0; $23 = (+($22|0)); $24 = (+_CalcBlendFactor($23)); $25 = HEAP32[(1972192)>>2]|0; $26 = HEAP32[(1972188)>>2]|0; $27 = (_PackedCol_Lerp($25,$26,$24)|0); $storemerge = $27; HEAP32[$1>>2] = $storemerge; STACKTOP = sp;return; } function _UpdateFogMinimal($0) { $0 = +$0; var $1 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0 != 0.0; if ($1) { $2 = - $0; $3 = $2; $4 = -2.99573227355399 / $3; $5 = (~~(($4))); $6 = HEAP32[3583]|0; $7 = ($6|0)>($5|0); $8 = $7 ? $5 : $6; _Game_SetViewDistance($8); return; } else { $9 = HEAP32[3583]|0; _Game_SetViewDistance($9); return; } } function _UpdateFogNormal($0,$1) { $0 = +$0; $1 = $1|0; var $10 = 0, $11 = 0.0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = $0 != 0.0; do { if ($2) { _Gfx_SetFogMode(1); _Gfx_SetFogDensity($0); } else { $3 = HEAP32[(1972176)>>2]|0; $4 = ($3|0)==(0); if ($4) { _Gfx_SetFogMode(0); $10 = HEAP32[3582]|0; $11 = (+($10|0)); _Gfx_SetFogEnd($11); break; } else { _Gfx_SetFogMode(1); $5 = HEAP32[3582]|0; $6 = (+($5|0)); $7 = $6 * 0.98999999999999999; $8 = 4.60517018598809 / $7; $9 = $8; _Gfx_SetFogDensity($9); break; } } } while(0); _Gfx_SetFogCol($1); $12 = HEAP32[3583]|0; _Game_SetViewDistance($12); return; } function _Vec3_Add_406($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 + $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 + $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 + $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _CalcBlendFactor($0) { $0 = +$0; var $$0 = 0.0, $$1 = 0.0, $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = $0; $2 = (+_Math_Log($1)); $3 = $2 * 0.25; $4 = $3 * 0.28000000000000003; $5 = $4 + -0.13; $6 = $5 < 0.0; $$0 = $6 ? 0.0 : $5; $7 = $$0 > 1.0; $$1 = $7 ? 1.0 : $$0; $8 = $$1; return (+$8); } function _CalcNumVertices($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[1972829]|0; $3 = ($2<<24>>24)==(0); $4 = $3 ? 2048 : 128; $5 = (_Math_CeilDiv($0,$4)|0); $6 = (_Math_CeilDiv($1,$4)|0); $7 = $5 << 2; $8 = Math_imul($7, $6)|0; return ($8|0); } function _DrawSkyY($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$06672 = 0, $$06973 = 0, $$074 = 0, $$1$lcssa = 0, $$171 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0.0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, $spec$select70 = 0; var label = 0, sp = 0; sp = STACKTOP; $6 = HEAP8[1972829]|0; $7 = ($6<<24>>24)==(0); $8 = $7 ? 2048 : 128; $9 = HEAP32[(1972188)>>2]|0; $10 = ($0|0)<($2|0); if (!($10)) { return; } $11 = ($1|0)<($3|0); $12 = (+($4|0)); $$06973 = $5;$$074 = $0; while(1) { $13 = (($$074) + ($8))|0; if ($11) { $14 = ($13|0)>($2|0); $spec$select = $14 ? $2 : $13; $15 = (+($$074|0)); $16 = (+($spec$select|0)); $$06672 = $1;$$171 = $$06973; while(1) { $17 = (($$06672) + ($8))|0; $18 = ($17|0)>($3|0); $spec$select70 = $18 ? $3 : $17; HEAPF32[$$171>>2] = $15; $19 = ((($$171)) + 4|0); HEAPF32[$19>>2] = $12; $20 = (+($$06672|0)); $21 = ((($$171)) + 8|0); HEAPF32[$21>>2] = $20; $22 = ((($$171)) + 12|0); HEAP32[$22>>2] = $9; $23 = ((($$171)) + 16|0); HEAPF32[$23>>2] = $15; $24 = ((($$171)) + 20|0); HEAPF32[$24>>2] = $12; $25 = (+($spec$select70|0)); $26 = ((($$171)) + 24|0); HEAPF32[$26>>2] = $25; $27 = ((($$171)) + 28|0); HEAP32[$27>>2] = $9; $28 = ((($$171)) + 32|0); HEAPF32[$28>>2] = $16; $29 = ((($$171)) + 36|0); HEAPF32[$29>>2] = $12; $30 = ((($$171)) + 40|0); HEAPF32[$30>>2] = $25; $31 = ((($$171)) + 44|0); HEAP32[$31>>2] = $9; $32 = ((($$171)) + 48|0); HEAPF32[$32>>2] = $16; $33 = ((($$171)) + 52|0); HEAPF32[$33>>2] = $12; $34 = ((($$171)) + 56|0); HEAPF32[$34>>2] = $20; $35 = ((($$171)) + 60|0); HEAP32[$35>>2] = $9; $36 = ((($$171)) + 64|0); $37 = ($17|0)<($3|0); if ($37) { $$06672 = $17;$$171 = $36; } else { $$1$lcssa = $36; break; } } } else { $$1$lcssa = $$06973; } $38 = ($13|0)<($2|0); if ($38) { $$06973 = $$1$lcssa;$$074 = $13; } else { break; } } return; } function _DrawCloudsY($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$0104110 = 0, $$0107111 = 0, $$0112 = 0, $$1$lcssa = 0, $$1109 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0; var $25 = 0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, $spec$select = 0, $spec$select108 = 0; var label = 0, sp = 0; sp = STACKTOP; $6 = HEAP8[1972829]|0; $7 = ($6<<24>>24)==(0); $8 = $7 ? 2048 : 128; $9 = (+($4|0)); $10 = $9 + 0.10000000149011612; $11 = HEAP32[(1972196)>>2]|0; $12 = (0 - ($0))|0; $13 = (_Math_CeilDiv($12,2048)|0); $14 = (+($13|0)); $15 = ($0|0)<($2|0); if (!($15)) { return; } $16 = ($1|0)<($3|0); $$0107111 = $5;$$0112 = $0; while(1) { $17 = (($$0112) + ($8))|0; if ($16) { $18 = ($17|0)>($2|0); $spec$select = $18 ? $2 : $17; $19 = (+($$0112|0)); $20 = $19 * 4.8828125E-4; $21 = $20 + $14; $22 = (+($spec$select|0)); $23 = $22 * 4.8828125E-4; $24 = $23 + $14; $$0104110 = $1;$$1109 = $$0107111; while(1) { $25 = (($$0104110) + ($8))|0; $26 = ($25|0)>($3|0); $spec$select108 = $26 ? $3 : $25; $27 = (+($$0104110|0)); $28 = $27 * 4.8828125E-4; $29 = $28 + $14; $30 = (+($spec$select108|0)); $31 = $30 * 4.8828125E-4; $32 = $31 + $14; HEAPF32[$$1109>>2] = $19; $33 = ((($$1109)) + 4|0); HEAPF32[$33>>2] = $10; $34 = ((($$1109)) + 8|0); HEAPF32[$34>>2] = $27; $35 = ((($$1109)) + 12|0); HEAP32[$35>>2] = $11; $36 = ((($$1109)) + 16|0); HEAPF32[$36>>2] = $21; $37 = ((($$1109)) + 20|0); HEAPF32[$37>>2] = $29; $38 = ((($$1109)) + 24|0); HEAPF32[$38>>2] = $19; $39 = ((($$1109)) + 28|0); HEAPF32[$39>>2] = $10; $40 = ((($$1109)) + 32|0); HEAPF32[$40>>2] = $30; $41 = ((($$1109)) + 36|0); HEAP32[$41>>2] = $11; $42 = ((($$1109)) + 40|0); HEAPF32[$42>>2] = $21; $43 = ((($$1109)) + 44|0); HEAPF32[$43>>2] = $32; $44 = ((($$1109)) + 48|0); HEAPF32[$44>>2] = $22; $45 = ((($$1109)) + 52|0); HEAPF32[$45>>2] = $10; $46 = ((($$1109)) + 56|0); HEAPF32[$46>>2] = $30; $47 = ((($$1109)) + 60|0); HEAP32[$47>>2] = $11; $48 = ((($$1109)) + 64|0); HEAPF32[$48>>2] = $24; $49 = ((($$1109)) + 68|0); HEAPF32[$49>>2] = $32; $50 = ((($$1109)) + 72|0); HEAPF32[$50>>2] = $22; $51 = ((($$1109)) + 76|0); HEAPF32[$51>>2] = $10; $52 = ((($$1109)) + 80|0); HEAPF32[$52>>2] = $27; $53 = ((($$1109)) + 84|0); HEAP32[$53>>2] = $11; $54 = ((($$1109)) + 88|0); HEAPF32[$54>>2] = $24; $55 = ((($$1109)) + 92|0); HEAPF32[$55>>2] = $29; $56 = ((($$1109)) + 96|0); $57 = ($25|0)<($3|0); if ($57) { $$0104110 = $25;$$1109 = $56; } else { $$1$lcssa = $56; break; } } } else { $$1$lcssa = $$0107111; } $58 = ($17|0)<($2|0); if ($58) { $$0107111 = $$1$lcssa;$$0112 = $17; } else { break; } } return; } function _CalcBorderRects($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0; var $factor = 0, $factor16 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $1 = sp + 48|0; $2 = sp + 32|0; $3 = sp + 16|0; $4 = sp; $5 = HEAP32[3582]|0; $6 = (+($5|0)); $7 = $6 * 1.4142135381698608; $8 = (~~(($7))); $9 = (0 - ($8))|0; $10 = HEAP32[(1103564)>>2]|0; $factor = $8 << 1; $11 = (($factor) + ($10))|0; _EnvRenderer_Rect($1,$9,$9,$11,$8); ;HEAP32[$0>>2]=HEAP32[$1>>2]|0;HEAP32[$0+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[$1+8>>2]|0;HEAP32[$0+12>>2]=HEAP32[$1+12>>2]|0; $12 = ((($0)) + 16|0); $13 = HEAP32[(1103572)>>2]|0; $14 = HEAP32[(1103564)>>2]|0; $factor16 = $8 << 1; $15 = (($14) + ($factor16))|0; _EnvRenderer_Rect($2,$9,$13,$15,$8); ;HEAP32[$12>>2]=HEAP32[$2>>2]|0;HEAP32[$12+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$12+8>>2]=HEAP32[$2+8>>2]|0;HEAP32[$12+12>>2]=HEAP32[$2+12>>2]|0; $16 = ((($0)) + 32|0); $17 = HEAP32[(1103572)>>2]|0; _EnvRenderer_Rect($3,$9,0,$8,$17); ;HEAP32[$16>>2]=HEAP32[$3>>2]|0;HEAP32[$16+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$16+8>>2]=HEAP32[$3+8>>2]|0;HEAP32[$16+12>>2]=HEAP32[$3+12>>2]|0; $18 = ((($0)) + 48|0); $19 = HEAP32[(1103564)>>2]|0; $20 = HEAP32[(1103572)>>2]|0; _EnvRenderer_Rect($4,$19,0,$8,$20); ;HEAP32[$18>>2]=HEAP32[$4>>2]|0;HEAP32[$18+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$18+8>>2]=HEAP32[$4+8>>2]|0;HEAP32[$18+12>>2]=HEAP32[$4+12>>2]|0; STACKTOP = sp;return; } function _DrawBorderY($0,$1,$2,$3,$4,$5,$6,$7,$8) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = +$4; $5 = $5|0; $6 = +$6; $7 = +$7; $8 = $8|0; var $$0101$lcssa = 0, $$0101108 = 0, $$0102106 = 0, $$0109 = 0, $$1$lcssa = 0, $$1107 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0; var $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0, $29 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $9 = 0, $spec$select = 0, $spec$select105 = 0, label = 0, sp = 0; sp = STACKTOP; $9 = HEAP8[1972829]|0; $10 = ($9<<24>>24)==(0); $11 = $10 ? 2048 : 128; $12 = HEAP32[$8>>2]|0; $13 = $4 + $7; $14 = ($0|0)<($2|0); if (!($14)) { $$0101$lcssa = $12; HEAP32[$8>>2] = $$0101$lcssa; return; } $15 = ($1|0)<($3|0); $$0101108 = $12;$$0109 = $0; while(1) { $16 = (($$0109) + ($11))|0; if ($15) { $17 = ($16|0)>($2|0); $spec$select = $17 ? $2 : $16; $18 = (+($spec$select|0)); $19 = (+($$0109|0)); $20 = $18 - $19; $21 = $19 + $6; $22 = $18 + $6; $$0102106 = $1;$$1107 = $$0101108; while(1) { $23 = (($$0102106) + ($11))|0; $24 = ($23|0)>($3|0); $spec$select105 = $24 ? $3 : $23; $25 = (+($spec$select105|0)); $26 = (+($$0102106|0)); $27 = $25 - $26; HEAPF32[$$1107>>2] = $21; $28 = ((($$1107)) + 4|0); HEAPF32[$28>>2] = $13; $29 = $26 + $6; $30 = ((($$1107)) + 8|0); HEAPF32[$30>>2] = $29; $31 = ((($$1107)) + 12|0); HEAP32[$31>>2] = $5; $32 = ((($$1107)) + 16|0); HEAPF32[$32>>2] = 0.0; $33 = ((($$1107)) + 20|0); HEAPF32[$33>>2] = 0.0; $34 = ((($$1107)) + 24|0); HEAPF32[$34>>2] = $21; $35 = ((($$1107)) + 28|0); HEAPF32[$35>>2] = $13; $36 = $25 + $6; $37 = ((($$1107)) + 32|0); HEAPF32[$37>>2] = $36; $38 = ((($$1107)) + 36|0); HEAP32[$38>>2] = $5; $39 = ((($$1107)) + 40|0); HEAPF32[$39>>2] = 0.0; $40 = ((($$1107)) + 44|0); HEAPF32[$40>>2] = $27; $41 = ((($$1107)) + 48|0); HEAPF32[$41>>2] = $22; $42 = ((($$1107)) + 52|0); HEAPF32[$42>>2] = $13; $43 = ((($$1107)) + 56|0); HEAPF32[$43>>2] = $36; $44 = ((($$1107)) + 60|0); HEAP32[$44>>2] = $5; $45 = ((($$1107)) + 64|0); HEAPF32[$45>>2] = $20; $46 = ((($$1107)) + 68|0); HEAPF32[$46>>2] = $27; $47 = ((($$1107)) + 72|0); HEAPF32[$47>>2] = $22; $48 = ((($$1107)) + 76|0); HEAPF32[$48>>2] = $13; $49 = ((($$1107)) + 80|0); HEAPF32[$49>>2] = $29; $50 = ((($$1107)) + 84|0); HEAP32[$50>>2] = $5; $51 = ((($$1107)) + 88|0); HEAPF32[$51>>2] = $20; $52 = ((($$1107)) + 92|0); HEAPF32[$52>>2] = 0.0; $53 = ((($$1107)) + 96|0); $54 = ($23|0)<($3|0); if ($54) { $$0102106 = $23;$$1107 = $53; } else { $$1$lcssa = $53; break; } } } else { $$1$lcssa = $$0101108; } $55 = ($16|0)<($2|0); if ($55) { $$0101108 = $$1$lcssa;$$0109 = $16; } else { $$0101$lcssa = $$1$lcssa; break; } } HEAP32[$8>>2] = $$0101$lcssa; return; } function _EnvRenderer_Rect($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$6$0$$sroa_idx6 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[$0>>2] = $1; $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); HEAP32[$$sroa$4$0$$sroa_idx2>>2] = $2; $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); HEAP32[$$sroa$5$0$$sroa_idx4>>2] = $3; $$sroa$6$0$$sroa_idx6 = ((($0)) + 12|0); HEAP32[$$sroa$6$0$$sroa_idx6>>2] = $4; return; } function _DrawBorderZ($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$0$lcssa = 0, $$05 = 0, $$0894 = 0, $$0912 = 0, $$1$lcssa = 0, $$13 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, $spec$select1 = 0, label = 0, sp = 0; sp = STACKTOP; $6 = HEAP8[1972829]|0; $7 = ($6<<24>>24)==(0); $8 = $7 ? 2048 : 128; $9 = HEAP32[$5>>2]|0; $10 = ($1|0)>(0); if (!($10)) { $$0$lcssa = $9; HEAP32[$5>>2] = $$0$lcssa; return; } $11 = ($2|0)<($3|0); $12 = (+($0|0)); $$05 = $9;$$0894 = 0; while(1) { $13 = (($$0894) + ($8))|0; if ($11) { $14 = ($13|0)>($1|0); $spec$select = $14 ? $1 : $13; $15 = (+($spec$select|0)); $16 = (+($$0894|0)); $17 = $15 - $16; $$0912 = $2;$$13 = $$05; while(1) { $18 = (($$0912) + ($8))|0; $19 = ($18|0)>($3|0); $spec$select1 = $19 ? $3 : $18; $20 = (+($spec$select1|0)); $21 = (+($$0912|0)); $22 = $20 - $21; HEAPF32[$$13>>2] = $16; $23 = ((($$13)) + 4|0); HEAPF32[$23>>2] = $21; $24 = ((($$13)) + 8|0); HEAPF32[$24>>2] = $12; $25 = ((($$13)) + 12|0); HEAP32[$25>>2] = $4; $26 = ((($$13)) + 16|0); HEAPF32[$26>>2] = 0.0; $27 = ((($$13)) + 20|0); HEAPF32[$27>>2] = $22; $28 = ((($$13)) + 24|0); HEAPF32[$28>>2] = $16; $29 = ((($$13)) + 28|0); HEAPF32[$29>>2] = $20; $30 = ((($$13)) + 32|0); HEAPF32[$30>>2] = $12; $31 = ((($$13)) + 36|0); HEAP32[$31>>2] = $4; $32 = ((($$13)) + 40|0); HEAPF32[$32>>2] = 0.0; $33 = ((($$13)) + 44|0); HEAPF32[$33>>2] = 0.0; $34 = ((($$13)) + 48|0); HEAPF32[$34>>2] = $15; $35 = ((($$13)) + 52|0); HEAPF32[$35>>2] = $20; $36 = ((($$13)) + 56|0); HEAPF32[$36>>2] = $12; $37 = ((($$13)) + 60|0); HEAP32[$37>>2] = $4; $38 = ((($$13)) + 64|0); HEAPF32[$38>>2] = $17; $39 = ((($$13)) + 68|0); HEAPF32[$39>>2] = 0.0; $40 = ((($$13)) + 72|0); HEAPF32[$40>>2] = $15; $41 = ((($$13)) + 76|0); HEAPF32[$41>>2] = $21; $42 = ((($$13)) + 80|0); HEAPF32[$42>>2] = $12; $43 = ((($$13)) + 84|0); HEAP32[$43>>2] = $4; $44 = ((($$13)) + 88|0); HEAPF32[$44>>2] = $17; $45 = ((($$13)) + 92|0); HEAPF32[$45>>2] = $22; $46 = ((($$13)) + 96|0); $47 = ($18|0)<($3|0); if ($47) { $$0912 = $18;$$13 = $46; } else { $$1$lcssa = $46; break; } } } else { $$1$lcssa = $$05; } $48 = ($13|0)<($1|0); if ($48) { $$05 = $$1$lcssa;$$0894 = $13; } else { $$0$lcssa = $$1$lcssa; break; } } HEAP32[$5>>2] = $$0$lcssa; return; } function _DrawBorderX($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$0$lcssa = 0, $$05 = 0, $$0894 = 0, $$0912 = 0, $$1$lcssa = 0, $$13 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, $spec$select1 = 0, label = 0, sp = 0; sp = STACKTOP; $6 = HEAP8[1972829]|0; $7 = ($6<<24>>24)==(0); $8 = $7 ? 2048 : 128; $9 = HEAP32[$5>>2]|0; $10 = ($1|0)>(0); if (!($10)) { $$0$lcssa = $9; HEAP32[$5>>2] = $$0$lcssa; return; } $11 = ($2|0)<($3|0); $12 = (+($0|0)); $$05 = $9;$$0894 = 0; while(1) { $13 = (($$0894) + ($8))|0; if ($11) { $14 = ($13|0)>($1|0); $spec$select = $14 ? $1 : $13; $15 = (+($spec$select|0)); $16 = (+($$0894|0)); $17 = $15 - $16; $$0912 = $2;$$13 = $$05; while(1) { $18 = (($$0912) + ($8))|0; $19 = ($18|0)>($3|0); $spec$select1 = $19 ? $3 : $18; $20 = (+($spec$select1|0)); $21 = (+($$0912|0)); $22 = $20 - $21; HEAPF32[$$13>>2] = $12; $23 = ((($$13)) + 4|0); HEAPF32[$23>>2] = $21; $24 = ((($$13)) + 8|0); HEAPF32[$24>>2] = $16; $25 = ((($$13)) + 12|0); HEAP32[$25>>2] = $4; $26 = ((($$13)) + 16|0); HEAPF32[$26>>2] = 0.0; $27 = ((($$13)) + 20|0); HEAPF32[$27>>2] = $22; $28 = ((($$13)) + 24|0); HEAPF32[$28>>2] = $12; $29 = ((($$13)) + 28|0); HEAPF32[$29>>2] = $20; $30 = ((($$13)) + 32|0); HEAPF32[$30>>2] = $16; $31 = ((($$13)) + 36|0); HEAP32[$31>>2] = $4; $32 = ((($$13)) + 40|0); HEAPF32[$32>>2] = 0.0; $33 = ((($$13)) + 44|0); HEAPF32[$33>>2] = 0.0; $34 = ((($$13)) + 48|0); HEAPF32[$34>>2] = $12; $35 = ((($$13)) + 52|0); HEAPF32[$35>>2] = $20; $36 = ((($$13)) + 56|0); HEAPF32[$36>>2] = $15; $37 = ((($$13)) + 60|0); HEAP32[$37>>2] = $4; $38 = ((($$13)) + 64|0); HEAPF32[$38>>2] = $17; $39 = ((($$13)) + 68|0); HEAPF32[$39>>2] = 0.0; $40 = ((($$13)) + 72|0); HEAPF32[$40>>2] = $12; $41 = ((($$13)) + 76|0); HEAPF32[$41>>2] = $21; $42 = ((($$13)) + 80|0); HEAPF32[$42>>2] = $15; $43 = ((($$13)) + 84|0); HEAP32[$43>>2] = $4; $44 = ((($$13)) + 88|0); HEAPF32[$44>>2] = $17; $45 = ((($$13)) + 92|0); HEAPF32[$45>>2] = $22; $46 = ((($$13)) + 96|0); $47 = ($18|0)<($3|0); if ($47) { $$0912 = $18;$$13 = $46; } else { $$1$lcssa = $46; break; } } } else { $$1$lcssa = $$05; } $48 = ($13|0)<($1|0); if ($48) { $$05 = $$1$lcssa;$$0894 = $13; } else { $$0$lcssa = $$1$lcssa; break; } } HEAP32[$5>>2] = $$0$lcssa; return; } function _DeleteVbs() { var label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteVb(1790608); _Gfx_DeleteVb(1790616); _Gfx_DeleteVb(1790604); _Gfx_DeleteVb(1790632); _Gfx_DeleteVb(1790624); _Gfx_DeleteVb(1790592); return; } function _IVec3_MaxValue($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; ;HEAP32[$0>>2]=HEAP32[14852>>2]|0;HEAP32[$0+4>>2]=HEAP32[14852+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[14852+8>>2]|0; return; } function _OnContextLost_407($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; _DeleteVbs(); _Gfx_DeleteTexture(1790600); _Gfx_DeleteTexture(1790596); $1 = HEAP8[(1803130)>>0]|0; $2 = ($1<<24>>24)==(0); if (!($2)) { return; } _Gfx_DeleteTexture(1790652); _Gfx_DeleteTexture(1790656); _Gfx_DeleteTexture(1790660); _Gfx_DeleteTexture(1790664); return; } function _EnvRenderer_CalcFlags($0) { $0 = $0|0; var $$ = 0, $$0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_String_CaselessEqualsConst($0,28241)|0); $2 = ($1|0)==(0); if (!($2)) { $$0 = 0; return ($$0|0); } $3 = (_String_CaselessEqualsConst($0,28288)|0); $4 = ($3|0)==(0); if (!($4)) { $$0 = 2; return ($$0|0); } $5 = (_String_CaselessEqualsConst($0,28295)|0); $6 = ($5|0)==(0); if (!($6)) { $$0 = 1; return ($$0|0); } $7 = (_String_CaselessEqualsConst($0,28300)|0); $8 = ($7|0)==(0); if (!($8)) { $$0 = 1; return ($$0|0); } $9 = (_String_CaselessEqualsConst($0,28311)|0); $10 = ($9|0)==(0); $$ = $10 ? -1 : 3; $$0 = $$; return ($$0|0); } function _OnTexturePackChanged($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteTexture(1790656); return; } function _OnTerrainAtlasChanged($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _UpdateBorderTextures(); return; } function _OnViewDistanceChanged($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _UpdateAll(); return; } function _OnEnvVariableChanged($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; L1: do { switch ($1|0) { case 0: { $2 = HEAP16[986072]|0; _MakeBorderTex(1790596,$2); _UpdateMapEdges(); break; } case 1: { $3 = HEAP16[(1972146)>>1]|0; _MakeBorderTex(1790600,$3); _UpdateMapSides(); break; } default: { $4 = $1 | 1; $5 = ($4|0)==(3); if ($5) { _UpdateMapEdges(); _UpdateMapSides(); break L1; } switch ($1|0) { case 15: { _UpdateMapEdges(); break L1; } case 16: { _UpdateMapSides(); break L1; } case 12: { _UpdateSky(); break L1; } case 14: { _EnvRenderer_UpdateFog(); break L1; } case 13: { _UpdateClouds(); break L1; } case 4: { _UpdateSky(); _UpdateClouds(); break L1; } case 17: { _UpdateSkybox(); break L1; } default: { break L1; } } } } } while(0); return; } function _RainPngProcess($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_Game_UpdateTexture(1790660,$0,$1,0)|0); return; } function _SnowPngProcess($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_Game_UpdateTexture(1790664,$0,$1,0)|0); return; } function _SkyboxPngProcess($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_Game_UpdateTexture(1790656,$0,$1,0)|0); return; } function _CloudsPngProcess($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_Game_UpdateTexture(1790652,$0,$1,0)|0); return; } function _EnvRenderer_RenderClouds() { var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[447654]|0; $1 = ($0|0)==(0); $2 = HEAP32[(1972156)>>2]|0; $3 = ($2|0)<(-2000); $or$cond = $1 | $3; if ($or$cond) { return; } $4 = +HEAPF64[(1084992)>>3]; $5 = $4 * 4.8828125E-4; $6 = $5 * 0.60000002384185791; $7 = +HEAPF32[(1972160)>>2]; $8 = $7; $9 = $6 * $8; $10 = $9; _Gfx_EnableTextureOffset($10,0.0); _Gfx_SetAlphaTest(1); $11 = HEAP32[447663]|0; _Gfx_BindTexture($11); _Gfx_SetVertexFormat(1); $12 = HEAP32[447654]|0; _Gfx_BindVb($12); $13 = HEAP32[447655]|0; _Gfx_DrawVb_IndexedTris($13); _Gfx_SetAlphaTest(0); _Gfx_DisableTextureOffset(); return; } function _EnvRenderer_RenderSky() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0.0; var $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0; var $9 = 0.0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $0 = sp; $1 = HEAP32[447652]|0; $2 = ($1|0)==(0); if ($2) { STACKTOP = sp;return; } $3 = (_EnvRenderer_ShouldRenderSkybox()|0); $4 = ($3<<24>>24)==(0); if (!($4)) { STACKTOP = sp;return; } $5 = HEAP32[(1103568)>>2]|0; $6 = (+($5|0)); $7 = $6 + 8.0; $8 = +HEAPF32[(1771052)>>2]; $9 = $8 + 8.0; $10 = $9 > $7; $11 = $10 ? $9 : $7; _Gfx_SetVertexFormat(0); $12 = HEAP32[447652]|0; _Gfx_BindVb($12); $13 = $11 == $7; if ($13) { $14 = HEAP32[447653]|0; _Gfx_DrawVb_IndexedTris($14); STACKTOP = sp;return; } else { dest=$0; src=(1803132); stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $15 = $11 - $7; $16 = ((($0)) + 16|0); $17 = +HEAPF32[$16>>2]; $18 = $15 * $17; $19 = ((($0)) + 48|0); $20 = +HEAPF32[$19>>2]; $21 = $20 + $18; HEAPF32[$19>>2] = $21; $22 = ((($0)) + 20|0); $23 = +HEAPF32[$22>>2]; $24 = $15 * $23; $25 = ((($0)) + 52|0); $26 = +HEAPF32[$25>>2]; $27 = $26 + $24; HEAPF32[$25>>2] = $27; $28 = ((($0)) + 24|0); $29 = +HEAPF32[$28>>2]; $30 = $15 * $29; $31 = ((($0)) + 56|0); $32 = +HEAPF32[$31>>2]; $33 = $32 + $30; HEAPF32[$31>>2] = $33; $34 = ((($0)) + 28|0); $35 = +HEAPF32[$34>>2]; $36 = $15 * $35; $37 = ((($0)) + 60|0); $38 = +HEAPF32[$37>>2]; $39 = $38 + $36; HEAPF32[$37>>2] = $39; _Gfx_LoadMatrix(1,$0); $40 = HEAP32[447653]|0; _Gfx_DrawVb_IndexedTris($40); _Gfx_LoadMatrix(1,(1803132)); STACKTOP = sp;return; } } function _EnvRenderer_ShouldRenderSkybox() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[447664]|0; $1 = ($0|0)!=(0); $2 = HEAP8[1972828]|0; $3 = ($2<<24>>24)==(0); $narrow = $1 & $3; $4 = $narrow&1; return ($4|0); } function _EnvRenderer_RenderSkybox() { var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $0 = sp + 208|0; $1 = sp + 144|0; $2 = sp + 80|0; $3 = sp + 16|0; $4 = sp; $5 = HEAP32[447651]|0; $6 = ($5|0)==(0); if ($6) { STACKTOP = sp;return; } _Gfx_SetDepthWrite(0); $7 = HEAP32[447664]|0; _Gfx_BindTexture($7); _Gfx_SetVertexFormat(1); $8 = +HEAPF64[(1084992)>>3]; $9 = $8 * 2.0; $10 = $9 * 3.1415927410125732; $11 = $10; $12 = +HEAPF32[(1972180)>>2]; $13 = $12 * $11; _Matrix_RotateY($2,$13); $14 = +HEAPF32[(1972184)>>2]; $15 = $14 * $11; _Matrix_RotateX($1,$15); _Matrix_Mul($0,$2,$1); ;HEAP32[$4>>2]=HEAP32[(1771048)>>2]|0;HEAP32[$4+4>>2]=HEAP32[(1771048)+4>>2]|0;HEAP32[$4+8>>2]=HEAP32[(1771048)+8>>2]|0; HEAPF32[(1771048)>>2] = 0.0; HEAPF32[(1771052)>>2] = 0.0; HEAPF32[(1771056)>>2] = 0.0; $16 = HEAP32[(1771060)>>2]|0; $17 = ((($16)) + 8|0); $18 = HEAP32[$17>>2]|0; FUNCTION_TABLE_vi[$18 & 511]($3); _Matrix_Mul($0,$0,$3); ;HEAP32[(1771048)>>2]=HEAP32[$4>>2]|0;HEAP32[(1771048)+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[(1771048)+8>>2]=HEAP32[$4+8>>2]|0; _Gfx_LoadMatrix(1,$0); $19 = HEAP32[447651]|0; _Gfx_BindVb($19); _Gfx_DrawVb_IndexedTris(24); _Gfx_LoadMatrix(1,(1803132)); _Gfx_SetDepthWrite(1); STACKTOP = sp;return; } function _EnvRenderer_OnBlockChanged($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; $5 = $3&65535; $6 = (1120788 + ($5)|0); $7 = HEAP8[$6>>0]|0; $8 = $7 | 1; $9 = ($8<<24>>24)!=(5); $10 = $4&65535; $11 = (1120788 + ($10)|0); $12 = HEAP8[$11>>0]|0; $13 = $12 | 1; $14 = ($13<<24>>24)!=(5); $15 = $9 ^ $14; if (!($15)) { return; } $16 = HEAP32[(1103572)>>2]|0; $17 = Math_imul($16, $0)|0; $18 = (($17) + ($2))|0; $19 = HEAP32[447647]|0; $20 = (($19) + ($18<<1)|0); $21 = HEAP16[$20>>1]|0; $22 = $21 << 16 >> 16; $23 = ($22|0)>($1|0); if ($23) { return; } if ($14) { $24 = $1&65535; HEAP16[$20>>1] = $24; return; } else { (_CalcRainHeightAt($0,$1,$2,$18)|0); return; } } function _CalcRainHeightAt($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$02836 = 0, $$030 = 0, $$037 = 0, $$12938 = 0, $$139 = 0, $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $switch = 0, $switch32 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[(1103572)>>2]|0; $5 = Math_imul($4, $1)|0; $6 = (($5) + ($2))|0; $7 = HEAP32[(1103564)>>2]|0; $8 = Math_imul($6, $7)|0; $9 = (($8) + ($0))|0; $10 = HEAP32[(1103608)>>2]|0; $11 = ($10|0)<(256); $12 = ($1|0)>(-1); L1: do { if ($11) { if ($12) { $13 = HEAP32[275888]|0; $14 = HEAP32[(1103588)>>2]|0; $$02836 = $9;$$037 = $1; while(1) { $15 = (($13) + ($$02836)|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = (1120788 + ($17)|0); $19 = HEAP8[$18>>0]|0; $20 = $19 & -2; $switch = ($20<<24>>24)==(4); if (!($switch)) { break; } $22 = (($$037) + -1)|0; $23 = (($$02836) - ($14))|0; $24 = ($$037|0)>(0); if ($24) { $$02836 = $23;$$037 = $22; } else { $$030 = -1;$$sink = -1; break L1; } } $21 = $$037&65535; $$030 = $$037;$$sink = $21; } else { $$030 = -1;$$sink = -1; } } else { if ($12) { $25 = HEAP32[275888]|0; $26 = HEAP32[(1103556)>>2]|0; $27 = HEAP32[(1103588)>>2]|0; $$12938 = $9;$$139 = $1; while(1) { $28 = (($25) + ($$12938)|0); $29 = HEAP8[$28>>0]|0; $30 = $29&255; $31 = (($26) + ($$12938)|0); $32 = HEAP8[$31>>0]|0; $33 = $32&255; $34 = $33 << 8; $35 = $34 | $30; $36 = (1120788 + ($35)|0); $37 = HEAP8[$36>>0]|0; $38 = $37 & -2; $switch32 = ($38<<24>>24)==(4); if (!($switch32)) { break; } $40 = (($$139) + -1)|0; $41 = (($$12938) - ($27))|0; $42 = ($$139|0)>(0); if ($42) { $$12938 = $41;$$139 = $40; } else { $$030 = -1;$$sink = -1; break L1; } } $39 = $$139&65535; $$030 = $$139;$$sink = $39; } else { $$030 = -1;$$sink = -1; } } } while(0); $43 = HEAP32[447647]|0; $44 = (($43) + ($3<<1)|0); HEAP16[$44>>1] = $$sink; return ($$030|0); } function _EnvRenderer_RenderWeather($0) { $0 = +$0; var $$0$idx217 = 0, $$0$ptr$idx = 0, $$0192216 = 0, $$0195215 = 0, $$0196211 = 0, $$1$add = 0, $$1$idx214 = 0, $$1193213 = 0, $$2$idx = 0, $$2194 = 0, $$add = 0, $$add197 = 0, $$add198 = 0, $$add199 = 0, $$add200 = 0, $$add201 = 0, $$add202 = 0, $1 = 0, $10 = 0, $100 = 0; var $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0; var $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0.0, $136 = 0, $137 = 0; var $138 = 0, $139 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0; var $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0.0; var $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0; var $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0.0, $83 = 0, $84 = 0.0; var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond219 = 0, $or$cond = 0, $or$cond210 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 15568|0; $1 = sp; $2 = sp + 15552|0; $3 = HEAP32[(1972172)>>2]|0; $4 = ($3|0)==(0); if ($4) { STACKTOP = sp;return; } $5 = HEAP32[447647]|0; $6 = ($5|0)==(0|0); if ($6) { _InitWeatherHeightmap(); } $7 = ($3|0)==(1); $8 = HEAP32[447665]|0; $9 = HEAP32[447666]|0; $10 = $7 ? $8 : $9; _Gfx_BindTexture($10); _IVec3_Floor($2,(1771048)); $11 = HEAP32[$2>>2]|0; $12 = HEAP32[447660]|0; $13 = ($11|0)==($12|0); if ($13) { $14 = ((($2)) + 4|0); $15 = HEAP32[$14>>2]|0; $16 = HEAP32[(1790644)>>2]|0; $17 = ($15|0)==($16|0); if ($17) { $18 = ((($2)) + 8|0); $19 = HEAP32[$18>>2]|0; $20 = HEAP32[(1790648)>>2]|0; $21 = ($19|0)==($20|0); $50 = $21; } else { $50 = 0; } } else { $50 = 0; } ;HEAP32[1790640>>2]=HEAP32[$2>>2]|0;HEAP32[1790640+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[1790640+8>>2]=HEAP32[$2+8>>2]|0; $22 = ((($2)) + 4|0); $23 = HEAP32[$22>>2]|0; $24 = (($23) + 64)|0; $25 = HEAP32[(1103568)>>2]|0; $26 = ($25|0)>($24|0); $27 = $26 ? $25 : $24; HEAP32[$22>>2] = $27; $28 = $7 ? 1.0 : 0.20000000298023224; $29 = +HEAPF32[(1972164)>>2]; $30 = $28 * $29; $31 = +HEAPF64[(1084992)>>3]; $32 = $31; $33 = $30 * $32; $34 = +HEAPF64[135622]; $35 = $34 + $0; HEAPF64[135622] = $35; $36 = HEAP32[(1972204)>>2]|0; $37 = ((($2)) + 8|0); $$0$idx217 = 0;$$0192216 = $36;$$0195215 = -4; while(1) { $38 = Math_imul($$0195215, $$0195215)|0; $$0196211 = -4;$$1$idx214 = $$0$idx217;$$1193213 = $$0192216; while(1) { $39 = HEAP32[$2>>2]|0; $40 = (($39) + ($$0195215))|0; $41 = HEAP32[$37>>2]|0; $42 = (($41) + ($$0196211))|0; $43 = (+_GetRainHeight($40,$42)); $44 = HEAP32[$22>>2]|0; $45 = (+($44|0)); $46 = $45 - $43; $47 = !($46 <= 0.0); if ($47) { if ($7) { $48 = +HEAPF64[135622]; $49 = !($48 >= 0.25); $or$cond = $50 & $49; if (!($or$cond)) { $51 = (+($42|0)); $52 = (+($40|0)); _Particles_RainSnowEffect($52,$43,$51); } } $53 = Math_imul($$0196211, $$0196211)|0; $54 = (($53) + ($38))|0; $55 = (+($54|0)); $56 = (+_CalcRainAlphaAt($55)); $57 = $56 < 0.0; $58 = $57 ? 0.0 : $56; $59 = $58 > 255.0; $60 = $59 ? 255.0 : $58; $61 = $$1193213 & 16777215; $62 = (~~(($60))&255); $63 = $62&255; $64 = $63 << 24; $65 = $64 | $61; $66 = $42 & 1; $67 = (+($66|0)); $68 = $67 * 0.5; $69 = $33 + $68; $70 = $40 & 15; $71 = (+($70|0)); $72 = $71 * 0.0625; $73 = $69 - $72; $74 = $43 / 6.0; $75 = $74 + $73; $76 = $43 + $46; $77 = $76 / 6.0; $78 = $77 + $73; $79 = (+($40|0)); $80 = (+($42|0)); $81 = (($40) + 1)|0; $82 = (+($81|0)); $83 = (($42) + 1)|0; $84 = (+($83|0)); $85 = (($1) + (($$1$idx214*24)|0)|0); HEAPF32[$85>>2] = $79; $86 = (((($1) + (($$1$idx214*24)|0)|0)) + 4|0); HEAPF32[$86>>2] = $43; $87 = (((($1) + (($$1$idx214*24)|0)|0)) + 8|0); HEAPF32[$87>>2] = $80; $88 = (((($1) + (($$1$idx214*24)|0)|0)) + 12|0); HEAP32[$88>>2] = $65; $89 = (((($1) + (($$1$idx214*24)|0)|0)) + 16|0); HEAPF32[$89>>2] = 0.0; $90 = (((($1) + (($$1$idx214*24)|0)|0)) + 20|0); HEAPF32[$90>>2] = $75; $$1$add = (($$1$idx214) + 1)|0; $91 = (($1) + (($$1$add*24)|0)|0); HEAPF32[$91>>2] = $79; $92 = (((($1) + (($$1$add*24)|0)|0)) + 4|0); HEAPF32[$92>>2] = $76; $93 = (((($1) + (($$1$add*24)|0)|0)) + 8|0); HEAPF32[$93>>2] = $80; $94 = (((($1) + (($$1$add*24)|0)|0)) + 12|0); HEAP32[$94>>2] = $65; $95 = (((($1) + (($$1$add*24)|0)|0)) + 16|0); HEAPF32[$95>>2] = 0.0; $96 = (((($1) + (($$1$add*24)|0)|0)) + 20|0); HEAPF32[$96>>2] = $78; $$add = (($$1$idx214) + 2)|0; $97 = (($1) + (($$add*24)|0)|0); HEAPF32[$97>>2] = $82; $98 = (((($1) + (($$add*24)|0)|0)) + 4|0); HEAPF32[$98>>2] = $76; $99 = (((($1) + (($$add*24)|0)|0)) + 8|0); HEAPF32[$99>>2] = $84; $100 = (((($1) + (($$add*24)|0)|0)) + 12|0); HEAP32[$100>>2] = $65; $101 = (((($1) + (($$add*24)|0)|0)) + 16|0); HEAPF32[$101>>2] = 1.0; $102 = (((($1) + (($$add*24)|0)|0)) + 20|0); HEAPF32[$102>>2] = $78; $$add197 = (($$1$idx214) + 3)|0; $103 = (($1) + (($$add197*24)|0)|0); HEAPF32[$103>>2] = $82; $104 = (((($1) + (($$add197*24)|0)|0)) + 4|0); HEAPF32[$104>>2] = $43; $105 = (((($1) + (($$add197*24)|0)|0)) + 8|0); HEAPF32[$105>>2] = $84; $106 = (((($1) + (($$add197*24)|0)|0)) + 12|0); HEAP32[$106>>2] = $65; $107 = (((($1) + (($$add197*24)|0)|0)) + 16|0); HEAPF32[$107>>2] = 1.0; $108 = (((($1) + (($$add197*24)|0)|0)) + 20|0); HEAPF32[$108>>2] = $75; $$add198 = (($$1$idx214) + 4)|0; $109 = (($1) + (($$add198*24)|0)|0); HEAPF32[$109>>2] = $82; $110 = (((($1) + (($$add198*24)|0)|0)) + 4|0); HEAPF32[$110>>2] = $43; $111 = (((($1) + (($$add198*24)|0)|0)) + 8|0); HEAPF32[$111>>2] = $80; $112 = (((($1) + (($$add198*24)|0)|0)) + 12|0); HEAP32[$112>>2] = $65; $113 = (((($1) + (($$add198*24)|0)|0)) + 16|0); HEAPF32[$113>>2] = 1.0; $114 = (((($1) + (($$add198*24)|0)|0)) + 20|0); HEAPF32[$114>>2] = $75; $$add199 = (($$1$idx214) + 5)|0; $115 = (($1) + (($$add199*24)|0)|0); HEAPF32[$115>>2] = $82; $116 = (((($1) + (($$add199*24)|0)|0)) + 4|0); HEAPF32[$116>>2] = $76; $117 = (((($1) + (($$add199*24)|0)|0)) + 8|0); HEAPF32[$117>>2] = $80; $118 = (((($1) + (($$add199*24)|0)|0)) + 12|0); HEAP32[$118>>2] = $65; $119 = (((($1) + (($$add199*24)|0)|0)) + 16|0); HEAPF32[$119>>2] = 1.0; $120 = (((($1) + (($$add199*24)|0)|0)) + 20|0); HEAPF32[$120>>2] = $78; $$add200 = (($$1$idx214) + 6)|0; $121 = (($1) + (($$add200*24)|0)|0); HEAPF32[$121>>2] = $79; $122 = (((($1) + (($$add200*24)|0)|0)) + 4|0); HEAPF32[$122>>2] = $76; $123 = (((($1) + (($$add200*24)|0)|0)) + 8|0); HEAPF32[$123>>2] = $84; $124 = (((($1) + (($$add200*24)|0)|0)) + 12|0); HEAP32[$124>>2] = $65; $125 = (((($1) + (($$add200*24)|0)|0)) + 16|0); HEAPF32[$125>>2] = 0.0; $126 = (((($1) + (($$add200*24)|0)|0)) + 20|0); HEAPF32[$126>>2] = $78; $$add201 = (($$1$idx214) + 7)|0; $127 = (($1) + (($$add201*24)|0)|0); HEAPF32[$127>>2] = $79; $128 = (((($1) + (($$add201*24)|0)|0)) + 4|0); HEAPF32[$128>>2] = $43; $129 = (((($1) + (($$add201*24)|0)|0)) + 8|0); HEAPF32[$129>>2] = $84; $130 = (((($1) + (($$add201*24)|0)|0)) + 12|0); HEAP32[$130>>2] = $65; $131 = (((($1) + (($$add201*24)|0)|0)) + 16|0); HEAPF32[$131>>2] = 0.0; $132 = (((($1) + (($$add201*24)|0)|0)) + 20|0); HEAPF32[$132>>2] = $75; $$add202 = (($$1$idx214) + 8)|0; $$2$idx = $$add202;$$2194 = $65; } else { $$2$idx = $$1$idx214;$$2194 = $$1193213; } $133 = (($$0196211) + 1)|0; $exitcond = ($133|0)==(5); if ($exitcond) { break; } else { $$0196211 = $133;$$1$idx214 = $$2$idx;$$1193213 = $$2194; } } $134 = (($$0195215) + 1)|0; $exitcond219 = ($134|0)==(5); if ($exitcond219) { break; } else { $$0$idx217 = $$2$idx;$$0192216 = $$2194;$$0195215 = $134; } } if ($7) { $135 = +HEAPF64[135622]; $136 = !($135 >= 0.25); $or$cond210 = $50 & $136; if (!($or$cond210)) { HEAPF64[135622] = 0.0; } } $137 = ($$2$idx|0)==(0); if ($137) { STACKTOP = sp;return; } _Gfx_SetAlphaTest(0); _Gfx_SetDepthWrite(0); _Gfx_SetVertexFormat(1); $$0$ptr$idx = ($$2$idx*24)|0; $138 = (($$0$ptr$idx|0) / 24)&-1; $139 = HEAP32[447648]|0; _Gfx_UpdateDynamicVb_IndexedTris($139,$1,$138); _Gfx_SetDepthWrite(1); _Gfx_SetAlphaTest(0); STACKTOP = sp;return; } function _InitWeatherHeightmap() { var $$04 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1103564)>>2]|0; $1 = HEAP32[(1103572)>>2]|0; $2 = Math_imul($1, $0)|0; $3 = (_Mem_Alloc($2,2,28322)|0); HEAP32[447647] = $3; $4 = HEAP32[(1103564)>>2]|0; $5 = HEAP32[(1103572)>>2]|0; $6 = Math_imul($5, $4)|0; $7 = ($6|0)>(0); if (!($7)) { return; } $8 = HEAP32[447647]|0; $9 = HEAP32[(1103564)>>2]|0; $10 = HEAP32[(1103572)>>2]|0; $11 = Math_imul($10, $9)|0; $$04 = 0; while(1) { $12 = (($8) + ($$04<<1)|0); HEAP16[$12>>1] = 32767; $13 = (($$04) + 1)|0; $14 = ($13|0)<($11|0); if ($14) { $$04 = $13; } else { break; } } return; } function _GetRainHeight($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_World_ContainsXZ_419($0,$1)|0); $3 = ($2<<24>>24)==(0); if ($3) { $4 = HEAP32[(1972148)>>2]|0; $5 = (+($4|0)); $$0 = $5; return (+$$0); } $6 = HEAP32[(1103572)>>2]|0; $7 = Math_imul($6, $0)|0; $8 = (($7) + ($1))|0; $9 = HEAP32[447647]|0; $10 = (($9) + ($8<<1)|0); $11 = HEAP16[$10>>1]|0; $12 = ($11<<16>>16)==(32767); if ($12) { $13 = HEAP32[(1103580)>>2]|0; $14 = (_CalcRainHeightAt($0,$13,$1,$8)|0); $16 = $14; } else { $15 = $11 << 16 >> 16; $16 = $15; } $17 = ($16|0)==(-1); if ($17) { $$0 = 0.0; return (+$$0); } $18 = (+($16|0)); $19 = (_World_GetBlock_420($0,$16,$1)|0); $20 = $19&65535; $21 = (((1134612 + (($20*12)|0)|0)) + 4|0); $22 = +HEAPF32[$21>>2]; $23 = $22 + $18; $$0 = $23; return (+$$0); } function _CalcRainAlphaAt($0) { $0 = +$0; var $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = $0 * 0.05000000074505806; $2 = $1 * $0; $3 = $0 * 7.0; $4 = $2 - $3; $5 = +HEAPF32[(1972168)>>2]; $6 = $4 * $5; $7 = $6 + 178.0; return (+$7); } function _World_ContainsXZ_419($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = ($2>>>0)>($0>>>0); $4 = HEAP32[(1103572)>>2]|0; $5 = ($4>>>0)>($1>>>0); $narrow = $3 & $5; $6 = $narrow&1; return ($6|0); } function _World_GetBlock_420($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $3 = HEAP32[(1103572)>>2]|0; $4 = Math_imul($3, $1)|0; $5 = (($4) + ($2))|0; $6 = HEAP32[(1103564)>>2]|0; $7 = Math_imul($5, $6)|0; $8 = (($7) + ($0))|0; $9 = HEAP32[275888]|0; $10 = (($9) + ($8)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = HEAP32[(1103556)>>2]|0; $14 = (($13) + ($8)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 8; $18 = $17 | $12; $19 = HEAP32[(1103608)>>2]|0; $20 = $18 & $19; $21 = $20&65535; return ($21|0); } function _EnvRenderer_RenderMapSides() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP16[(1972146)>>1]|0; $1 = HEAP32[447658]|0; $2 = HEAP32[447650]|0; $3 = HEAP32[447659]|0; _RenderBorders($0,$1,$2,$3); return; } function _RenderBorders($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($1|0)==(0); if ($4) { return; } $5 = $0&65535; $6 = (1120788 + ($5)|0); $7 = HEAP8[$6>>0]|0; _Gfx_SetupAlphaState($7); _Gfx_BindTexture($2); _Gfx_SetVertexFormat(1); _Gfx_BindVb($1); _Gfx_DrawVb_IndexedTris($3); $8 = HEAP8[$6>>0]|0; _Gfx_RestoreAlphaState($8); return; } function _EnvRenderer_RenderMapEdges() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $spec$select3 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1972148)>>2]|0; $1 = HEAP32[(1972152)>>2]|0; $2 = (($1) + ($0))|0; $3 = ($2|0)<(0); $spec$select3 = $3 ? $2 : 0; $4 = (+($spec$select3|0)); $5 = +HEAPF32[(1771052)>>2]; $6 = $5 < $4; $7 = HEAP32[447658]|0; $8 = ($7|0)!=(0); $or$cond = $8 & $6; if ($or$cond) { return; } $9 = HEAP16[986072]|0; $10 = HEAP32[447656]|0; $11 = HEAP32[447649]|0; $12 = HEAP32[447657]|0; _RenderBorders($9,$10,$11,$12); return; } function _EnvRenderer_SetMode($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0 & 2; $2 = $1&255; HEAP8[1972829] = $2; $3 = $0 & 1; $4 = $3&255; HEAP8[1972828] = $4; _OnContextRecreated(0); return; } function _Event_Register($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$017 = 0, $$lcssa20 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 256|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if ($5) { $$017 = 0; while(1) { $6 = (($0) + ($$017<<2)|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==($2|0); if ($8) { $9 = (((($0)) + 128|0) + ($$017<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==($1|0); if ($11) { _Logger_Abort(28340); } } $12 = (($$017) + 1)|0; $13 = HEAP32[$3>>2]|0; $14 = ($12|0)<($13|0); if ($14) { $$017 = $12; } else { break; } } $15 = ($13|0)==(32); if ($15) { _Logger_Abort(28402); return; } else { $$lcssa20 = $13; } } else { $$lcssa20 = $4; } $16 = (($0) + ($$lcssa20<<2)|0); HEAP32[$16>>2] = $2; $17 = (((($0)) + 128|0) + ($$lcssa20<<2)|0); HEAP32[$17>>2] = $1; $18 = (($$lcssa20) + 1)|0; HEAP32[$3>>2] = $18; return; } function _Event_Unregister($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$02734 = 0, $$033 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 256|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if (!($5)) { return; } $$02734 = 0;$13 = $4; while(1) { $6 = (($0) + ($$02734<<2)|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==($2|0); if ($8) { $9 = (((($0)) + 128|0) + ($$02734<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==($1|0); if ($11) { break; } } $24 = (($$02734) + 1)|0; $25 = HEAP32[$3>>2]|0; $26 = ($24|0)<($25|0); if ($26) { $$02734 = $24;$13 = $25; } else { label = 10; break; } } if ((label|0) == 10) { return; } $12 = (($13) + -1)|0; $14 = ($$02734|0)<($12|0); if ($14) { $$033 = $$02734; while(1) { $15 = (($$033) + 1)|0; $16 = (($0) + ($15<<2)|0); $17 = HEAP32[$16>>2]|0; $18 = (($0) + ($$033<<2)|0); HEAP32[$18>>2] = $17; $19 = (((($0)) + 128|0) + ($15<<2)|0); $20 = HEAP32[$19>>2]|0; $21 = (((($0)) + 128|0) + ($$033<<2)|0); HEAP32[$21>>2] = $20; $exitcond = ($15|0)==($12|0); if ($exitcond) { break; } else { $$033 = $15; } } } HEAP32[$3>>2] = $12; $22 = (($0) + ($12<<2)|0); HEAP32[$22>>2] = 0; $23 = (((($0)) + 128|0) + ($12<<2)|0); HEAP32[$23>>2] = 0; return; } function _Event_UnregisterAll() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[(1790924)>>2] = 0; HEAP32[(1791184)>>2] = 0; HEAP32[(1791444)>>2] = 0; HEAP32[(1791704)>>2] = 0; HEAP32[(1791964)>>2] = 0; HEAP32[(1792224)>>2] = 0; HEAP32[(1792484)>>2] = 0; HEAP32[(1792744)>>2] = 0; HEAP32[(1793004)>>2] = 0; HEAP32[(1793264)>>2] = 0; HEAP32[(1793524)>>2] = 0; HEAP32[(1793784)>>2] = 0; HEAP32[(1794044)>>2] = 0; HEAP32[(1794304)>>2] = 0; HEAP32[(1794564)>>2] = 0; HEAP32[(1794824)>>2] = 0; HEAP32[(1795344)>>2] = 0; HEAP32[(1795604)>>2] = 0; HEAP32[(1795864)>>2] = 0; HEAP32[(1796124)>>2] = 0; HEAP32[(1796384)>>2] = 0; HEAP32[(1796644)>>2] = 0; HEAP32[(1796904)>>2] = 0; HEAP32[(1797164)>>2] = 0; HEAP32[(1797424)>>2] = 0; HEAP32[(1797684)>>2] = 0; HEAP32[(1797944)>>2] = 0; HEAP32[(1798204)>>2] = 0; HEAP32[(1798464)>>2] = 0; HEAP32[(1798724)>>2] = 0; HEAP32[(1798984)>>2] = 0; HEAP32[(1799244)>>2] = 0; HEAP32[(1799504)>>2] = 0; HEAP32[(1799764)>>2] = 0; HEAP32[(1800024)>>2] = 0; HEAP32[(1800284)>>2] = 0; HEAP32[(1800544)>>2] = 0; HEAP32[(1800804)>>2] = 0; HEAP32[(1801064)>>2] = 0; HEAP32[(1801324)>>2] = 0; HEAP32[(1801584)>>2] = 0; HEAP32[(1801844)>>2] = 0; HEAP32[(1802104)>>2] = 0; HEAP32[(1802364)>>2] = 0; HEAP32[(1802624)>>2] = 0; HEAP32[(1802884)>>2] = 0; return; } function _Event_RaiseVoid($0) { $0 = $0|0; var $$07 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 256|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)>(0); if (!($3)) { return; } $$07 = 0; while(1) { $4 = (($0) + ($$07<<2)|0); $5 = HEAP32[$4>>2]|0; $6 = (((($0)) + 128|0) + ($$07<<2)|0); $7 = HEAP32[$6>>2]|0; FUNCTION_TABLE_vi[$5 & 511]($7); $8 = (($$07) + 1)|0; $9 = HEAP32[$1>>2]|0; $10 = ($8|0)<($9|0); if ($10) { $$07 = $8; } else { break; } } return; } function _Event_RaiseInt($0,$1) { $0 = $0|0; $1 = $1|0; var $$08 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 256|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)>(0); if (!($4)) { return; } $$08 = 0; while(1) { $5 = (($0) + ($$08<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = (((($0)) + 128|0) + ($$08<<2)|0); $8 = HEAP32[$7>>2]|0; FUNCTION_TABLE_vii[$6 & 255]($8,$1); $9 = (($$08) + 1)|0; $10 = HEAP32[$2>>2]|0; $11 = ($9|0)<($10|0); if ($11) { $$08 = $9; } else { break; } } return; } function _Event_RaiseFloat($0,$1) { $0 = $0|0; $1 = +$1; var $$08 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 256|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)>(0); if (!($4)) { return; } $$08 = 0; while(1) { $5 = (($0) + ($$08<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = (((($0)) + 128|0) + ($$08<<2)|0); $8 = HEAP32[$7>>2]|0; FUNCTION_TABLE_vid[$6 & 63]($8,$1); $9 = (($$08) + 1)|0; $10 = HEAP32[$2>>2]|0; $11 = ($9|0)<($10|0); if ($11) { $$08 = $9; } else { break; } } return; } function _Event_RaiseEntry($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 256|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if (!($5)) { return; } $$09 = 0; while(1) { $6 = (($0) + ($$09<<2)|0); $7 = HEAP32[$6>>2]|0; $8 = (((($0)) + 128|0) + ($$09<<2)|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_viii[$7 & 15]($9,$1,$2); $10 = (($$09) + 1)|0; $11 = HEAP32[$3>>2]|0; $12 = ($10|0)<($11|0); if ($12) { $$09 = $10; } else { break; } } return; } function _Event_RaiseBlock($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$09 = 0, $$byval_copy = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $$byval_copy = sp; $4 = ((($0)) + 256|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)>(0); if (!($6)) { STACKTOP = sp;return; } $$09 = 0; while(1) { $7 = (($0) + ($$09<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = (((($0)) + 128|0) + ($$09<<2)|0); $10 = HEAP32[$9>>2]|0; ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$1+8>>2]|0; FUNCTION_TABLE_viiii[$8 & 31]($10,$$byval_copy,$2,$3); $11 = (($$09) + 1)|0; $12 = HEAP32[$4>>2]|0; $13 = ($11|0)<($12|0); if ($13) { $$09 = $11; } else { break; } } STACKTOP = sp;return; } function _Event_RaiseChat($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 256|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if (!($5)) { return; } $$09 = 0; while(1) { $6 = (($0) + ($$09<<2)|0); $7 = HEAP32[$6>>2]|0; $8 = (((($0)) + 128|0) + ($$09<<2)|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_viii[$7 & 15]($9,$1,$2); $10 = (($$09) + 1)|0; $11 = HEAP32[$3>>2]|0; $12 = ($10|0)<($11|0); if ($12) { $$09 = $10; } else { break; } } return; } function _Event_RaiseInput($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 256|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if (!($5)) { return; } $$09 = 0; while(1) { $6 = (($0) + ($$09<<2)|0); $7 = HEAP32[$6>>2]|0; $8 = (((($0)) + 128|0) + ($$09<<2)|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_viii[$7 & 15]($9,$1,$2); $10 = (($$09) + 1)|0; $11 = HEAP32[$3>>2]|0; $12 = ($10|0)<($11|0); if ($12) { $$09 = $10; } else { break; } } return; } function _Event_RaiseString($0,$1) { $0 = $0|0; $1 = $1|0; var $$08 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 256|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)>(0); if (!($4)) { return; } $$08 = 0; while(1) { $5 = (($0) + ($$08<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = (((($0)) + 128|0) + ($$08<<2)|0); $8 = HEAP32[$7>>2]|0; FUNCTION_TABLE_vii[$6 & 255]($8,$1); $9 = (($$08) + 1)|0; $10 = HEAP32[$2>>2]|0; $11 = ($9|0)<($10|0); if ($11) { $$08 = $9; } else { break; } } return; } function _Event_RaiseRawMove($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = +$2; var $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 256|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if (!($5)) { return; } $$09 = 0; while(1) { $6 = (($0) + ($$09<<2)|0); $7 = HEAP32[$6>>2]|0; $8 = (((($0)) + 128|0) + ($$09<<2)|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_vidd[$7 & 3]($9,$1,$2); $10 = (($$09) + 1)|0; $11 = HEAP32[$3>>2]|0; $12 = ($10|0)<($11|0); if ($12) { $$09 = $10; } else { break; } } return; } function _Event_RaisePluginMessage($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 256|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if (!($5)) { return; } $$09 = 0; while(1) { $6 = (($0) + ($$09<<2)|0); $7 = HEAP32[$6>>2]|0; $8 = (((($0)) + 128|0) + ($$09<<2)|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_viii[$7 & 15]($9,$1,$2); $10 = (($$09) + 1)|0; $11 = HEAP32[$3>>2]|0; $12 = ($10|0)<($11|0); if ($12) { $$09 = $10; } else { break; } } return; } function _Math_Mod1($0) { $0 = +$0; var $1 = 0, $2 = 0.0, $3 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (~~(($0))); $2 = (+($1|0)); $3 = $0 - $2; return (+$3); } function _Math_AbsI($0) { $0 = $0|0; var $1 = 0, $ispos = 0, $neg = 0, label = 0, sp = 0; sp = STACKTOP; $ispos = ($0|0)>(-1); $neg = (0 - ($0))|0; $1 = $ispos ? $0 : $neg; return ($1|0); } function _Math_Sin($0) { $0 = +$0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (+Math_sin((+$0))); return (+$1); } function _Math_Cos($0) { $0 = +$0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (+Math_cos((+$0))); return (+$1); } function _Math_SinF($0) { $0 = +$0; var $1 = 0.0, $2 = 0.0, $3 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = $0; $2 = (+_Math_Sin($1)); $3 = $2; return (+$3); } function _Math_CosF($0) { $0 = +$0; var $1 = 0.0, $2 = 0.0, $3 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = $0; $2 = (+_Math_Cos($1)); $3 = $2; return (+$3); } function _Math_Atan2($0,$1) { $0 = +$0; $1 = +$1; var $2 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = (+Math_atan2((+$1),(+$0))); return (+$2); } function _Math_Floor($0) { $0 = +$0; var $1 = 0, $2 = 0.0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (~~(($0))); $2 = (+($1|0)); $3 = $2 > $0; $4 = $3 << 31 >> 31; $5 = (($4) + ($1))|0; return ($5|0); } function _Math_Ceil($0) { $0 = +$0; var $1 = 0, $2 = 0.0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (~~(($0))); $2 = (+($1|0)); $3 = $2 < $0; $4 = $3&1; $5 = (($4) + ($1))|0; return ($5|0); } function _Math_Log2($0) { $0 = $0|0; var $$0 = 0, $$03 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $$0 = 0;$$03 = $0; while(1) { $1 = (1)?($$03 >>> 1):($$03); $2 = ($1|0)==(0); $3 = (($$0) + 1)|0; if ($2) { break; } else { $$0 = $3;$$03 = $1; } } return ($$0|0); } function _Math_CeilDiv($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (($0|0) / ($1|0))&-1; $3 = Math_imul($2, $1)|0; $4 = (($0) - ($3))|0; $5 = ($4|0)!=(0); $6 = $5&1; $7 = (($2) + ($6))|0; return ($7|0); } function _Math_Sign($0) { $0 = +$0; var $$ = 0, $$0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0 > 0.0; $2 = $0 < 0.0; $$ = $2 << 31 >> 31; $$0 = $1 ? 1 : $$; return ($$0|0); } function _Math_Lerp($0,$1,$2) { $0 = +$0; $1 = +$1; $2 = +$2; var $3 = 0.0, $4 = 0.0, $5 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = $1 - $0; $4 = $3 * $2; $5 = $4 + $0; return (+$5); } function _Math_ClampAngle($0) { $0 = +$0; var $$0$lcssa = 0.0, $$05 = 0.0, $$1$lcssa = 0.0, $$14 = 0.0, $1 = 0, $2 = 0.0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = !($0 >= 360.0); if ($1) { $$0$lcssa = $0; } else { $$05 = $0; while(1) { $2 = $$05 + -360.0; $3 = !($2 >= 360.0); if ($3) { $$0$lcssa = $2; break; } else { $$05 = $2; } } } $4 = $$0$lcssa < 0.0; if (!($4)) { $$1$lcssa = $$0$lcssa; return (+$$1$lcssa); } $$14 = $$0$lcssa; while(1) { $5 = $$14 + 360.0; $6 = $5 < 0.0; if ($6) { $$14 = $5; } else { $$1$lcssa = $5; break; } } return (+$$1$lcssa); } function _Math_LerpAngle($0,$1,$2) { $0 = +$0; $1 = +$1; $2 = +$2; var $$010 = 0.0, $10 = 0.0, $11 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, $spec$select = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = $0 > 270.0; $4 = $1 < 90.0; $5 = $3 & $4; $6 = $1 > 270.0; $7 = $0 < 90.0; $8 = $7 & $6; $9 = $0 + -360.0; $spec$select = $5 ? $9 : $0; $10 = $1 + -360.0; $$010 = $8 ? $10 : $1; $11 = (+_Math_Lerp($spec$select,$$010,$2)); return (+$11); } function _Math_NextPowOf2($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $$0 = 1; while(1) { $1 = ($$0|0)<($0|0); $2 = $$0 << 1; if ($1) { $$0 = $2; } else { break; } } return ($$0|0); } function _Math_IsPowOf2($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $narrow = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0|0)!=(0); $2 = (($0) + -1)|0; $3 = $2 & $0; $4 = ($3|0)==(0); $narrow = $1 & $4; $spec$select = $narrow&1; return ($spec$select|0); } function _Math_Log($0) { $0 = +$0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (+Math_log((+$0))); return (+$1); } function _Math_Exp($0) { $0 = +$0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (+Math_exp((+$0))); return (+$1); } function _Random_SeedFromCurrentTime($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_DateTime_CurrentUTC_MS()|0); $2 = (getTempRet0() | 0); _Random_Seed($0,$1); return; } function _Random_Seed($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)<(0); $3 = $2 << 31 >> 31; $4 = $3 & 65535; $5 = $1 ^ -554899859; $6 = $4 ^ 5; $7 = $0; $8 = $7; HEAP32[$8>>2] = $5; $9 = (($7) + 4)|0; $10 = $9; HEAP32[$10>>2] = $6; return; } function _Random_Next($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (0 - ($1))|0; $3 = $2 & $1; $4 = ($3|0)==($1|0); if ($4) { $5 = $0; $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = (($5) + 4)|0; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = (___muldi3(($7|0),($10|0),-554899859,5)|0); $12 = (getTempRet0() | 0); $13 = (_i64Add(($11|0),($12|0),11,0)|0); $14 = (getTempRet0() | 0); $15 = $14 & 65535; $16 = $0; $17 = $16; HEAP32[$17>>2] = $13; $18 = (($16) + 4)|0; $19 = $18; HEAP32[$19>>2] = $15; $20 = (_bitshift64Lshr(($13|0),($15|0),17)|0); $21 = (getTempRet0() | 0); $22 = ($1|0)<(0); $23 = $22 << 31 >> 31; $24 = (___muldi3(($20|0),($21|0),($1|0),($23|0))|0); $25 = (getTempRet0() | 0); $26 = (_bitshift64Lshr(($24|0),($25|0),31)|0); $27 = (getTempRet0() | 0); $$0 = $26; return ($$0|0); } $28 = (($1) + -1)|0; $29 = $0; $30 = $29; $31 = HEAP32[$30>>2]|0; $32 = (($29) + 4)|0; $33 = $32; $34 = HEAP32[$33>>2]|0; $35 = $31;$36 = $34; while(1) { $37 = (___muldi3(($35|0),($36|0),-554899859,5)|0); $38 = (getTempRet0() | 0); $39 = (_i64Add(($37|0),($38|0),11,0)|0); $40 = (getTempRet0() | 0); $41 = $40 & 65535; $42 = (_bitshift64Lshr(($39|0),($41|0),17)|0); $43 = (getTempRet0() | 0); $44 = (($42|0) % ($1|0))&-1; $45 = (($28) - ($44))|0; $46 = (($45) + ($42))|0; $47 = ($46|0)<(0); if ($47) { $35 = $39;$36 = $41; } else { break; } } $48 = $0; $49 = $48; HEAP32[$49>>2] = $39; $50 = (($48) + 4)|0; $51 = $50; HEAP32[$51>>2] = $41; $$0 = $44; return ($$0|0); } function _Random_Float($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $1 = $0; $2 = $1; $3 = HEAP32[$2>>2]|0; $4 = (($1) + 4)|0; $5 = $4; $6 = HEAP32[$5>>2]|0; $7 = (___muldi3(($3|0),($6|0),-554899859,5)|0); $8 = (getTempRet0() | 0); $9 = (_i64Add(($7|0),($8|0),11,0)|0); $10 = (getTempRet0() | 0); $11 = $10 & 65535; $12 = $0; $13 = $12; HEAP32[$13>>2] = $9; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; $16 = (_bitshift64Lshr(($9|0),($11|0),24)|0); $17 = (getTempRet0() | 0); $18 = (+($16|0)); $19 = $18 * 5.9604644775390625E-8; return (+$19); } function _Map_FindImporter($0) { $0 = $0|0; var $$0 = 0, $$Dat_Load = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_String_CaselessEnds($0,14280)|0); $2 = ($1|0)==(0); if (!($2)) { $$0 = 14; return ($$0|0); } $3 = (_String_CaselessEnds($0,14288)|0); $4 = ($3|0)==(0); if (!($4)) { $$0 = 15; return ($$0|0); } $5 = (_String_CaselessEnds($0,14296)|0); $6 = ($5|0)==(0); if (!($6)) { $$0 = 16; return ($$0|0); } $7 = (_String_CaselessEnds($0,14304)|0); $8 = ($7|0)==(0); if (!($8)) { $$0 = 13; return ($$0|0); } $9 = (_String_CaselessEnds($0,14312)|0); $10 = ($9|0)==(0); $$Dat_Load = $10 ? 0 : 13; $$0 = $$Dat_Load; return ($$0|0); } function _Dat_Load($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $switch$split2D = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 44816|0; $1 = sp + 44800|0; $2 = sp + 44744|0; $3 = sp; _Inflate_MakeStream2($2,$3,$0); $4 = (_Map_SkipGZipHeader($0)|0); $5 = ($4|0)==(0); L1: do { if ($5) { $6 = (_Stream_Read($2,$1,5)|0); $7 = ($6|0)==(0); if ($7) { $8 = (_Stream_GetU32_BE($1)|0); $switch$split2D = ($8|0)<(656127880); if ($switch$split2D) { switch ($8|0) { case 16843009: { break; } default: { $$0 = -857812930; break L1; } } $9 = (_Dat_LoadFormat0($2)|0); $$0 = $9; break; } switch ($8|0) { case 656127880: { break; } default: { $$0 = -857812930; break L1; } } $10 = ((($1)) + 4|0); $11 = HEAP8[$10>>0]|0; switch ($11<<24>>24) { case 1: { $12 = (_Dat_LoadFormat1($2)|0); $$0 = $12; break L1; } case 2: { $13 = (_Dat_LoadFormat2($2)|0); $$0 = $13; break L1; } default: { $$0 = -857812929; break L1; } } } else { $$0 = $6; } } else { $$0 = $4; } } while(0); STACKTOP = sp;return ($$0|0); } function _Cw_Load($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 44816|0; $1 = sp + 44744|0; $2 = sp; $3 = sp + 44800|0; _Inflate_MakeStream2($1,$2,$0); $4 = (_Map_SkipGZipHeader($0)|0); $5 = ($4|0)==(0); if ($5) { $6 = ((($1)) + 4|0); $7 = HEAP32[$6>>2]|0; $8 = (FUNCTION_TABLE_iii[$7 & 127]($1,$3)|0); $9 = ($8|0)==(0); if ($9) { $10 = HEAP8[$3>>0]|0; $11 = ($10<<24>>24)==(10); if ($11) { $12 = (_Nbt_ReadTag(10,1,$1,0)|0); $$0 = $12; } else { $$0 = -857812911; } } else { $$0 = $8; } } else { $$0 = $4; } STACKTOP = sp;return ($$0|0); } function _Lvl_Load($0) { $0 = $0|0; var $$0 = 0, $$041$lcssa = 0, $$04148 = 0, $$043$lcssa = 0, $$04347 = 0, $$14445 = 0, $$146 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; var $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0; var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0; var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0; var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $9 = 0, $switch$split2D = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 44832|0; $1 = sp; $2 = sp + 44816|0; $3 = sp + 44760|0; $4 = sp + 20|0; _Inflate_MakeStream2($3,$4,$0); $5 = (_Map_SkipGZipHeader($0)|0); $6 = ($5|0)==(0); if (!($6)) { $$0 = $5; STACKTOP = sp;return ($$0|0); } $7 = (_Stream_Read($3,$1,18)|0); $8 = ($7|0)==(0); if (!($8)) { $$0 = $7; STACKTOP = sp;return ($$0|0); } $9 = (_Stream_GetU16_LE($1)|0); $10 = ($9<<16>>16)==(1874); if (!($10)) { $$0 = -857812931; STACKTOP = sp;return ($$0|0); } $11 = ((($1)) + 2|0); $12 = (_Stream_GetU16_LE($11)|0); $13 = $12&65535; HEAP32[(1103564)>>2] = $13; $14 = ((($1)) + 4|0); $15 = (_Stream_GetU16_LE($14)|0); $16 = $15&65535; HEAP32[(1103572)>>2] = $16; $17 = ((($1)) + 6|0); $18 = (_Stream_GetU16_LE($17)|0); $19 = $18&65535; HEAP32[(1103568)>>2] = $19; $20 = ((($1)) + 8|0); $21 = (_Stream_GetU16_LE($20)|0); $22 = (+($21&65535)); HEAPF32[(1784264)>>2] = $22; $23 = ((($1)) + 10|0); $24 = (_Stream_GetU16_LE($23)|0); $25 = (+($24&65535)); HEAPF32[(1784272)>>2] = $25; $26 = ((($1)) + 12|0); $27 = (_Stream_GetU16_LE($26)|0); $28 = (+($27&65535)); HEAPF32[(1784268)>>2] = $28; $29 = ((($1)) + 14|0); $30 = HEAP8[$29>>0]|0; $31 = (+($30&255)); $32 = $31 * 360.0; $33 = $32 * 0.00390625; HEAPF32[(1784288)>>2] = $33; $34 = ((($1)) + 15|0); $35 = HEAP8[$34>>0]|0; $36 = (+($35&255)); $37 = $36 * 360.0; $38 = $37 * 0.00390625; HEAPF32[(1784292)>>2] = $38; $39 = (_Map_ReadBlocks($3)|0); $40 = ($39|0)==(0); if (!($40)) { $$0 = $39; STACKTOP = sp;return ($$0|0); } $41 = HEAP32[275888]|0; $42 = HEAP32[(1103560)>>2]|0; $43 = $42 & -4; $44 = ($43|0)>(0); if ($44) { $$04148 = 0;$$04347 = $41; while(1) { $45 = HEAP8[$$04347>>0]|0; $46 = $45&255; $47 = (3440 + ($46)|0); $48 = HEAP8[$47>>0]|0; HEAP8[$$04347>>0] = $48; $49 = ((($$04347)) + 1|0); $50 = HEAP8[$49>>0]|0; $51 = $50&255; $52 = (3440 + ($51)|0); $53 = HEAP8[$52>>0]|0; HEAP8[$49>>0] = $53; $54 = ((($$04347)) + 2|0); $55 = HEAP8[$54>>0]|0; $56 = $55&255; $57 = (3440 + ($56)|0); $58 = HEAP8[$57>>0]|0; HEAP8[$54>>0] = $58; $59 = ((($$04347)) + 3|0); $60 = HEAP8[$59>>0]|0; $61 = $60&255; $62 = (3440 + ($61)|0); $63 = HEAP8[$62>>0]|0; HEAP8[$59>>0] = $63; $64 = ((($$04347)) + 4|0); $65 = (($$04148) + 4)|0; $66 = HEAP32[(1103560)>>2]|0; $67 = $66 & -4; $68 = ($65|0)<($67|0); if ($68) { $$04148 = $65;$$04347 = $64; } else { $$041$lcssa = $65;$$043$lcssa = $64; break; } } } else { $$041$lcssa = 0;$$043$lcssa = $41; } $69 = HEAP32[(1103560)>>2]|0; $70 = ($$041$lcssa|0)<($69|0); if ($70) { $$14445 = $$043$lcssa;$$146 = $$041$lcssa; while(1) { $71 = HEAP8[$$14445>>0]|0; $72 = $71&255; $73 = (3440 + ($72)|0); $74 = HEAP8[$73>>0]|0; HEAP8[$$14445>>0] = $74; $75 = ((($$14445)) + 1|0); $76 = (($$146) + 1)|0; $77 = HEAP32[(1103560)>>2]|0; $78 = ($76|0)<($77|0); if ($78) { $$14445 = $75;$$146 = $76; } else { break; } } } $79 = ((($3)) + 4|0); $80 = HEAP32[$79>>2]|0; $81 = (FUNCTION_TABLE_iii[$80 & 127]($3,$2)|0); $switch$split2D = ($81|0)<(0); L23: do { if ($switch$split2D) { switch ($81|0) { case -857812991: { $$0 = 0; break; } default: { break L23; } } STACKTOP = sp;return ($$0|0); } else { switch ($81|0) { case 0: { break; } default: { break L23; } } $82 = HEAP8[$2>>0]|0; $83 = ($82<<24>>24)==(-67); if (!($83)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $84 = (_Lvl_ReadCustomBlocks($3)|0); $85 = ($84|0)==(-857812991); if (!($85)) { $$0 = $84; STACKTOP = sp;return ($$0|0); } _Chat_AddRaw(28443); _Chat_AddRaw(28494); $$0 = 0; STACKTOP = sp;return ($$0|0); } } while(0); $$0 = $81; STACKTOP = sp;return ($$0|0); } function _Fcm_Load($0) { $0 = $0|0; var $$0 = 0, $$02122 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0; var $26 = 0.0, $27 = 0.0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 44880|0; $1 = sp; $2 = sp + 44824|0; $3 = sp + 80|0; _Inflate_MakeStream2($2,$3,$0); $4 = (_Stream_Read($0,$1,79)|0); $5 = ($4|0)==(0); if (!($5)) { $$0 = $4; STACKTOP = sp;return ($$0|0); } $6 = (_Stream_GetU32_LE($1)|0); $7 = ($6|0)==(264417088); if (!($7)) { $$0 = -857812933; STACKTOP = sp;return ($$0|0); } $8 = ((($1)) + 4|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(13); if (!($10)) { $$0 = -857812932; STACKTOP = sp;return ($$0|0); } $11 = ((($1)) + 5|0); $12 = (_Stream_GetU16_LE($11)|0); $13 = $12&65535; HEAP32[(1103564)>>2] = $13; $14 = ((($1)) + 7|0); $15 = (_Stream_GetU16_LE($14)|0); $16 = $15&65535; HEAP32[(1103568)>>2] = $16; $17 = ((($1)) + 9|0); $18 = (_Stream_GetU16_LE($17)|0); $19 = $18&65535; HEAP32[(1103572)>>2] = $19; $20 = ((($1)) + 11|0); $21 = (_Stream_GetU32_LE($20)|0); $22 = (+($21|0)); $23 = $22 * 0.03125; HEAPF32[(1784264)>>2] = $23; $24 = ((($1)) + 15|0); $25 = (_Stream_GetU32_LE($24)|0); $26 = (+($25|0)); $27 = $26 * 0.03125; HEAPF32[(1784268)>>2] = $27; $28 = ((($1)) + 19|0); $29 = (_Stream_GetU32_LE($28)|0); $30 = (+($29|0)); $31 = $30 * 0.03125; HEAPF32[(1784272)>>2] = $31; $32 = ((($1)) + 23|0); $33 = HEAP8[$32>>0]|0; $34 = (+($33&255)); $35 = $34 * 360.0; $36 = $35 * 0.00390625; HEAPF32[(1784288)>>2] = $36; $37 = ((($1)) + 24|0); $38 = HEAP8[$37>>0]|0; $39 = (+($38&255)); $40 = $39 * 360.0; $41 = $40 * 0.00390625; HEAPF32[(1784292)>>2] = $41; $42 = ((($1)) + 33|0); _Mem_Copy((1103592),$42,16); $43 = ((($1)) + 75|0); $44 = (_Stream_GetU32_LE($43)|0); $45 = ($44|0)>(0); L10: do { if ($45) { $$02122 = 0; while(1) { $48 = (_Fcm_ReadString($2)|0); $49 = ($48|0)==(0); if (!($49)) { $$0 = $48; label = 11; break; } $50 = (_Fcm_ReadString($2)|0); $51 = ($50|0)==(0); if (!($51)) { $$0 = $50; label = 11; break; } $52 = (_Fcm_ReadString($2)|0); $53 = ($52|0)==(0); $46 = (($$02122) + 1)|0; if (!($53)) { $$0 = $52; label = 11; break; } $47 = ($46|0)<($44|0); if ($47) { $$02122 = $46; } else { break L10; } } if ((label|0) == 11) { STACKTOP = sp;return ($$0|0); } } } while(0); $54 = (_Map_ReadBlocks($2)|0); $$0 = $54; STACKTOP = sp;return ($$0|0); } function _Fcm_ReadString($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = (_Stream_Read($0,$1,2)|0); $3 = ($2|0)==(0); if (!($3)) { $$0 = $2; STACKTOP = sp;return ($$0|0); } $4 = (_Stream_GetU16_LE($1)|0); $5 = $4&65535; $6 = ((($0)) + 12|0); $7 = HEAP32[$6>>2]|0; $8 = (FUNCTION_TABLE_iii[$7 & 127]($0,$5)|0); $$0 = $8; STACKTOP = sp;return ($$0|0); } function _Map_ReadBlocks($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1103564)>>2]|0; $2 = HEAP32[(1103572)>>2]|0; $3 = Math_imul($2, $1)|0; $4 = HEAP32[(1103568)>>2]|0; $5 = Math_imul($3, $4)|0; HEAP32[(1103560)>>2] = $5; $6 = (_Mem_TryAlloc($5,1)|0); HEAP32[275888] = $6; $7 = ($6|0)==(0|0); if ($7) { $$0 = -857812988; return ($$0|0); } $8 = HEAP32[(1103560)>>2]|0; $9 = (_Stream_Read($0,$6,$8)|0); $$0 = $9; return ($$0|0); } function _Map_SkipGZipHeader($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _GZipHeader_Init($1); $2 = ((($1)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); L1: do { if ($4) { while(1) { $7 = (_GZipHeader_Read($0,$1)|0); $8 = ($7|0)==(0); if (!($8)) { $$0 = $7; break L1; } $5 = HEAP8[$2>>0]|0; $6 = ($5<<24>>24)==(0); if (!($6)) { $$0 = 0; break; } } } else { $$0 = 0; } } while(0); STACKTOP = sp;return ($$0|0); } function _Lvl_ReadCustomBlocks($0) { $0 = $0|0; var $$0 = 0, $$07787 = 0, $$07891 = 0, $$07996 = 0, $$08089 = 0, $$188 = 0, $$pr = 0, $$sink = 0, $$sink107 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0; var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0; var $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $9 = 0, $exitcond = 0, $exitcond102 = 0, $or$cond = 0, $or$cond83 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 4112|0; $1 = sp; $2 = sp + 4096|0; $3 = HEAP32[(1103564)>>2]|0; $4 = $3 & -16; $5 = HEAP32[(1103568)>>2]|0; $6 = $5 & -16; $7 = HEAP32[(1103572)>>2]|0; $8 = $7 & -16; $9 = ($5|0)>(0); if (!($9)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $10 = ((($0)) + 4|0); $$07996 = 0;$11 = $7; L4: while(1) { $12 = ($11|0)>(0); if ($12) { $13 = (($$07996) + 16)|0; $14 = ($13|0)>($6|0); $$07891 = 0; while(1) { $15 = HEAP32[(1103564)>>2]|0; $16 = ($15|0)>(0); if ($16) { $17 = (($$07891) + 16)|0; $18 = ($17|0)>($8|0); $$08089 = 0; while(1) { $19 = HEAP32[$10>>2]|0; $20 = (FUNCTION_TABLE_iii[$19 & 127]($0,$2)|0); $21 = ($20|0)==(0); if (!($21)) { $$0 = $20; label = 27; break L4; } $22 = HEAP8[$2>>0]|0; $23 = ($22<<24>>24)==(1); L15: do { if ($23) { $24 = (_Stream_Read($0,$1,4096)|0); $25 = ($24|0)==(0); if (!($25)) { $$0 = $24; label = 27; break L4; } $26 = HEAP32[(1103572)>>2]|0; $27 = Math_imul($26, $$07996)|0; $28 = (($27) + ($$07891))|0; $29 = HEAP32[(1103564)>>2]|0; $30 = Math_imul($28, $29)|0; $31 = (($30) + ($$08089))|0; $32 = (($$08089) + 16)|0; $33 = ($32|0)>($4|0); $or$cond = $14 | $33; $or$cond83 = $18 | $or$cond; if (!($or$cond83)) { $$07787 = 0; while(1) { $34 = $$07787 & 15; $35 = (8)?($$07787 >>> 8):($$07787); $36 = $35 & 15; $37 = (4)?($$07787 >>> 4):($$07787); $38 = $37 & 15; $39 = HEAP32[(1103572)>>2]|0; $40 = Math_imul($39, $36)|0; $41 = (($40) + ($38))|0; $42 = HEAP32[(1103564)>>2]|0; $43 = Math_imul($41, $42)|0; $44 = $34 | $31; $45 = (($44) + ($43))|0; $46 = HEAP32[275888]|0; $47 = (($46) + ($45)|0); $48 = HEAP8[$47>>0]|0; $49 = ($48<<24>>24)==(-93); if ($49) { $50 = (($1) + ($$07787)|0); $51 = HEAP8[$50>>0]|0; $$sink = $51; } else { $$sink = $48; } HEAP8[$47>>0] = $$sink; $52 = (($$07787) + 1)|0; $exitcond = ($52|0)==(4096); if ($exitcond) { break L15; } else { $$07787 = $52; } } } $$188 = 0; while(1) { $53 = $$188 & 15; $54 = (8)?($$188 >>> 8):($$188); $55 = $54 & 15; $56 = (4)?($$188 >>> 4):($$188); $57 = $56 & 15; $58 = $53 | $$08089; $59 = HEAP32[(1103564)>>2]|0; $60 = ($58|0)<($59|0); if ($60) { $61 = $55 | $$07996; $62 = HEAP32[(1103568)>>2]|0; $63 = ($61|0)<($62|0); if ($63) { $64 = $57 | $$07891; $65 = HEAP32[(1103572)>>2]|0; $66 = ($64|0)<($65|0); if ($66) { $67 = Math_imul($65, $55)|0; $68 = (($67) + ($57))|0; $69 = Math_imul($68, $59)|0; $70 = $53 | $31; $71 = (($70) + ($69))|0; $72 = HEAP32[275888]|0; $73 = (($72) + ($71)|0); $74 = HEAP8[$73>>0]|0; $75 = ($74<<24>>24)==(-93); if ($75) { $76 = (($1) + ($$188)|0); $77 = HEAP8[$76>>0]|0; $$sink107 = $77; } else { $$sink107 = $74; } HEAP8[$73>>0] = $$sink107; } } } $78 = (($$188) + 1)|0; $exitcond102 = ($78|0)==(4096); if ($exitcond102) { break; } else { $$188 = $78; } } } } while(0); $79 = (($$08089) + 16)|0; $80 = HEAP32[(1103564)>>2]|0; $81 = ($79|0)<($80|0); if ($81) { $$08089 = $79; } else { break; } } } $82 = (($$07891) + 16)|0; $83 = HEAP32[(1103572)>>2]|0; $84 = ($82|0)<($83|0); if ($84) { $$07891 = $82; } else { break; } } } $85 = (($$07996) + 16)|0; $86 = HEAP32[(1103568)>>2]|0; $87 = ($85|0)<($86|0); if (!($87)) { $$0 = 0; label = 27; break; } $$pr = HEAP32[(1103572)>>2]|0; $$07996 = $85;$11 = $$pr; } if ((label|0) == 27) { STACKTOP = sp;return ($$0|0); } return (0)|0; } function _Nbt_ReadTag($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$0396 = 0, $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 176|0; $4 = sp; $5 = sp + 165|0; $6 = sp + 160|0; $7 = ($0<<24>>24)==(0); if ($7) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $8 = ((($4)) + 4|0); HEAP8[$8>>0] = $0; HEAP32[$4>>2] = $3; $9 = ((($4)) + 16|0); HEAP32[$9>>2] = 0; $10 = ((($4)) + 92|0); $11 = ((($4)) + 8|0); HEAP32[$11>>2] = $10; $12 = ((($4)) + 12|0); HEAP16[$12>>1] = 0; $13 = ((($4)) + 14|0); HEAP16[$13>>1] = 64; $14 = ($1<<24>>24)==(0); if (!($14)) { $15 = (_Nbt_ReadString($2,$11)|0); $16 = ($15|0)==(0); if (!($16)) { $$0 = $15; STACKTOP = sp;return ($$0|0); } } L8: do { switch ($0<<24>>24) { case 1: { $17 = ((($2)) + 4|0); $18 = HEAP32[$17>>2]|0; $19 = ((($4)) + 20|0); $20 = (FUNCTION_TABLE_iii[$18 & 127]($2,$19)|0); $$1 = $20; label = 26; break; } case 2: { $21 = (_Stream_Read($2,$6,2)|0); $22 = (_Stream_GetU16_BE($6)|0); $23 = ((($4)) + 20|0); HEAP16[$23>>1] = $22; $$1 = $21; label = 26; break; } case 5: case 3: { $24 = ((($4)) + 20|0); $25 = (_Stream_ReadU32_BE($2,$24)|0); $$1 = $25; label = 26; break; } case 6: case 4: { $26 = ((($2)) + 12|0); $27 = HEAP32[$26>>2]|0; $28 = (FUNCTION_TABLE_iii[$27 & 127]($2,8)|0); $$1 = $28; label = 26; break; } case 7: { $29 = (_Stream_ReadU32_BE($2,$9)|0); $30 = ($29|0)==(0); if (!($30)) { $$0 = $29; STACKTOP = sp;return ($$0|0); } $31 = HEAP32[$9>>2]|0; $32 = ($31>>>0)<(65); if ($32) { $33 = ((($4)) + 20|0); $34 = (_Stream_Read($2,$33,$31)|0); $$1 = $34; label = 26; break L8; } $35 = (_Mem_TryAlloc($31,1)|0); $36 = ((($4)) + 20|0); HEAP32[$36>>2] = $35; $37 = ($35|0)==(0|0); if ($37) { $$0 = -857812988; STACKTOP = sp;return ($$0|0); } $38 = HEAP32[$9>>2]|0; $39 = (_Stream_Read($2,$35,$38)|0); $40 = ($39|0)==(0); if (!($40)) { $41 = HEAP32[$36>>2]|0; _Mem_Free($41); $$0 = $39; STACKTOP = sp;return ($$0|0); } break; } case 8: { $42 = ((($4)) + 28|0); $43 = ((($4)) + 20|0); HEAP32[$43>>2] = $42; $44 = ((($4)) + 24|0); HEAP16[$44>>1] = 0; $45 = ((($4)) + 26|0); HEAP16[$45>>1] = 64; $46 = (_Nbt_ReadString($2,$43)|0); $$1 = $46; label = 26; break; } case 9: { $47 = (_Stream_Read($2,$6,5)|0); $48 = ($47|0)==(0); if (!($48)) { $$0 = $47; STACKTOP = sp;return ($$0|0); } $49 = HEAP8[$6>>0]|0; HEAP8[$5>>0] = $49; $50 = ((($6)) + 1|0); $51 = (_Stream_GetU32_BE($50)|0); $52 = ($51|0)==(0); if (!($52)) { $$0396 = 0; while(1) { $55 = HEAP8[$5>>0]|0; $56 = (_Nbt_ReadTag($55,0,$2,$4)|0); $57 = ($56|0)==(0); $53 = (($$0396) + 1)|0; if (!($57)) { $$0 = $56; break; } $54 = ($53>>>0)<($51>>>0); if ($54) { $$0396 = $53; } else { break L8; } } STACKTOP = sp;return ($$0|0); } break; } case 10: { $58 = ((($2)) + 4|0); $59 = HEAP32[$58>>2]|0; $60 = (FUNCTION_TABLE_iii[$59 & 127]($2,$5)|0); $61 = ($60|0)==(0); if (!($61)) { $$0 = $60; STACKTOP = sp;return ($$0|0); } while(1) { $65 = HEAP8[$5>>0]|0; $66 = ($65<<24>>24)==(0); if ($66) { break L8; } $67 = (_Nbt_ReadTag($65,1,$2,$4)|0); $68 = ($67|0)==(0); if (!($68)) { $$0 = $67; label = 30; break; } $62 = HEAP32[$58>>2]|0; $63 = (FUNCTION_TABLE_iii[$62 & 127]($2,$5)|0); $64 = ($63|0)==(0); if (!($64)) { $$0 = $63; label = 30; break; } } if ((label|0) == 30) { STACKTOP = sp;return ($$0|0); } break; } default: { $$0 = -857812912; STACKTOP = sp;return ($$0|0); } } } while(0); if ((label|0) == 26) { $69 = ($$1|0)==(0); if (!($69)) { $$0 = $$1; STACKTOP = sp;return ($$0|0); } } $70 = ((($4)) + 156|0); HEAP32[$70>>2] = 0; _Cw_Callback($4); $71 = HEAP32[$9>>2]|0; $72 = ($71>>>0)<(65); if (!($72)) { $73 = ((($4)) + 20|0); $74 = HEAP32[$73>>2]|0; _Mem_Free($74); } $75 = HEAP32[$70>>2]|0; $$0 = $75; STACKTOP = sp;return ($$0|0); } function _Nbt_ReadString($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 256|0; $2 = sp; $3 = (_Stream_Read($0,$2,2)|0); $4 = ($3|0)==(0); if ($4) { $5 = (_Stream_GetU16_BE($2)|0); $6 = $5&65535; $7 = ($5&65535)>(256); if ($7) { $$0 = -857812910; } else { $8 = (_Stream_Read($0,$2,$6)|0); $9 = ($8|0)==(0); if ($9) { _String_AppendUtf8($1,$2,$6); $$0 = 0; } else { $$0 = $8; } } } else { $$0 = $3; } STACKTOP = sp;return ($$0|0); } function _Cw_Callback($0) { $0 = $0|0; var $$010 = 0, $$pn = 0, $1 = 0, $2 = 0, $trunc = 0, $trunc$clear = 0, label = 0, sp = 0; sp = STACKTOP; $$pn = $0;$trunc = 0; while(1) { $$010 = HEAP32[$$pn>>2]|0; $1 = ($$010|0)==(0|0); $2 = (($trunc) + 1)|0; if ($1) { break; } else { $$pn = $$010;$trunc = $2; } } $trunc$clear = $trunc & 2147483647; switch ($trunc$clear|0) { case 1: { _Cw_Callback_1($0); return; } case 2: { _Cw_Callback_2($0); return; } case 4: { _Cw_Callback_4($0); return; } case 5: { _Cw_Callback_5($0); return; } default: { return; } } } function _Cw_Callback_1($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 8|0); $2 = (_String_CaselessEqualsConst($1,32290)|0); $3 = ($2|0)==(0); if (!($3)) { $4 = (_NbtTag_U16($0)|0); $5 = $4&65535; HEAP32[(1103564)>>2] = $5; return; } $6 = (_String_CaselessEqualsConst($1,32292)|0); $7 = ($6|0)==(0); if (!($7)) { $8 = (_NbtTag_U16($0)|0); $9 = $8&65535; HEAP32[(1103568)>>2] = $9; return; } $10 = (_String_CaselessEqualsConst($1,32294)|0); $11 = ($10|0)==(0); if (!($11)) { $12 = (_NbtTag_U16($0)|0); $13 = $12&65535; HEAP32[(1103572)>>2] = $13; return; } $14 = (_String_CaselessEqualsConst($1,28868)|0); $15 = ($14|0)==(0); if (!($15)) { $16 = ((($0)) + 16|0); $17 = HEAP32[$16>>2]|0; $18 = ($17|0)==(16); if ($18) { $20 = ((($0)) + 20|0); _Mem_Copy((1103592),$20,16); return; } else { $19 = ((($0)) + 156|0); HEAP32[$19>>2] = -857812909; return; } } $21 = (_String_CaselessEqualsConst($1,28873)|0); $22 = ($21|0)==(0); if (!($22)) { $23 = ((($0)) + 16|0); $24 = HEAP32[$23>>2]|0; HEAP32[(1103560)>>2] = $24; $25 = (_Cw_GetBlocks($0)|0); HEAP32[275888] = $25; } $26 = (_String_CaselessEqualsConst($1,28884)|0); $27 = ($26|0)==(0); if ($27) { return; } $28 = (_Cw_GetBlocks($0)|0); _World_SetMapUpper($28); return; } function _Cw_Callback_2($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[$0>>2]|0; $2 = ((($1)) + 8|0); $3 = (_String_CaselessEqualsConst($2,28850)|0); $4 = ($3|0)==(0); if (!($4)) { $5 = ((($0)) + 8|0); $6 = (_String_CaselessEqualsConst($5,28863)|0); $7 = ($6|0)==(0); if ($7) { return; } $8 = (_NbtTag_I32($0)|0); HEAP32[(1103648)>>2] = $8; return; } $9 = HEAP32[$0>>2]|0; $10 = ((($9)) + 8|0); $11 = (_String_CaselessEqualsConst($10,40644)|0); $12 = ($11|0)==(0); if ($12) { return; } $13 = ((($0)) + 8|0); $14 = (_String_CaselessEqualsConst($13,32290)|0); $15 = ($14|0)==(0); if (!($15)) { $16 = (_NbtTag_I16($0)|0); $17 = (+($16<<16>>16)); HEAPF32[(1784264)>>2] = $17; return; } $18 = (_String_CaselessEqualsConst($13,32292)|0); $19 = ($18|0)==(0); if (!($19)) { $20 = (_NbtTag_I16($0)|0); $21 = (+($20<<16>>16)); HEAPF32[(1784268)>>2] = $21; return; } $22 = (_String_CaselessEqualsConst($13,32294)|0); $23 = ($22|0)==(0); if (!($23)) { $24 = (_NbtTag_I16($0)|0); $25 = (+($24<<16>>16)); HEAPF32[(1784272)>>2] = $25; return; } $26 = (_String_CaselessEqualsConst($13,32258)|0); $27 = ($26|0)==(0); if (!($27)) { $28 = (_NbtTag_U8($0)|0); $29 = (+($28&255)); $30 = $29 * 360.0; $31 = $30 * 0.00390625; HEAPF32[(1784288)>>2] = $31; return; } $32 = (_String_CaselessEqualsConst($13,32274)|0); $33 = ($32|0)==(0); if ($33) { return; } $34 = (_NbtTag_U8($0)|0); $35 = (+($34&255)); $36 = $35 * 360.0; $37 = $36 * 0.00390625; HEAPF32[(1784292)>>2] = $37; return; } function _Cw_Callback_4($0) { $0 = $0|0; var $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $14 = 0; var $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0; var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0; var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0; var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0, $83 = 0.0, $84 = 0, $85 = 0, $86 = 0, $87 = 0; var $88 = 0, $89 = 0, $9 = 0, $90 = 0.0, $91 = 0, $92 = 0, $93 = 0.0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = HEAP16[986401]|0; $3 = HEAP32[$0>>2]|0; $4 = HEAP32[$3>>2]|0; $5 = ((($4)) + 8|0); $6 = (_String_CaselessEqualsConst($5,28543)|0); $7 = ($6|0)==(0); if ($7) { STACKTOP = sp;return; } $8 = HEAP32[$0>>2]|0; $9 = HEAP32[$8>>2]|0; $10 = HEAP32[$9>>2]|0; $11 = ((($10)) + 8|0); $12 = (_String_CaselessEqualsConst($11,28547)|0); $13 = ($12|0)==(0); if ($13) { STACKTOP = sp;return; } $14 = HEAP32[$0>>2]|0; $15 = ((($14)) + 8|0); $16 = (_String_CaselessEqualsConst($15,41879)|0); $17 = ($16|0)==(0); if (!($17)) { $18 = ((($0)) + 8|0); $19 = (_String_CaselessEqualsConst($18,28648)|0); $20 = ($19|0)==(0); if (!($20)) { $21 = (_NbtTag_U16($0)|0); $22 = (+($21&65535)); $23 = $22 * 0.03125; HEAPF32[(1784296)>>2] = $23; STACKTOP = sp;return; } } $24 = HEAP32[$0>>2]|0; $25 = ((($24)) + 8|0); $26 = (_String_CaselessEqualsConst($25,41964)|0); $27 = ($26|0)==(0); if (!($27)) { $28 = ((($0)) + 8|0); $29 = (_String_CaselessEqualsConst($28,28657)|0); $30 = ($29|0)==(0); if (!($30)) { $31 = (_NbtTag_U8($0)|0); $32 = $31&255; HEAP32[(1972172)>>2] = $32; STACKTOP = sp;return; } } $33 = HEAP32[$0>>2]|0; $34 = ((($33)) + 8|0); $35 = (_String_CaselessEqualsConst($34,41702)|0); $36 = ($35|0)==(0); if (!($36)) { $37 = ((($0)) + 8|0); $38 = (_String_CaselessEqualsConst($37,28669)|0); $39 = ($38|0)==(0); if (!($39)) { $40 = (_NbtTag_U8($0)|0); $41 = $40&255; HEAP16[(1972146)>>1] = $41; STACKTOP = sp;return; } $42 = (_String_CaselessEqualsConst($37,28679)|0); $43 = ($42|0)==(0); if (!($43)) { $44 = (_NbtTag_U8($0)|0); $45 = $44&255; HEAP16[986072] = $45; STACKTOP = sp;return; } $46 = (_String_CaselessEqualsConst($37,28689)|0); $47 = ($46|0)==(0); if (!($47)) { $48 = (_NbtTag_I16($0)|0); $49 = $48 << 16 >> 16; HEAP32[(1972148)>>2] = $49; STACKTOP = sp;return; } $50 = (_String_CaselessEqualsConst($37,28699)|0); $51 = ($50|0)==(0); if (!($51)) { _NbtTag_String($1,$0); $52 = ((($1)) + 4|0); $53 = HEAP16[$52>>1]|0; $54 = ($53<<16>>16)==(0); if (!($54)) { _Server_RetrieveTexturePack($1); } STACKTOP = sp;return; } } $55 = HEAP32[$0>>2]|0; $56 = ((($55)) + 8|0); $57 = (_String_CaselessEqualsConst($56,42018)|0); $58 = ($57|0)==(0); if (!($58)) { $59 = ((($0)) + 8|0); $60 = (_String_CaselessEqualsConst($59,28679)|0); $61 = ($60|0)==(0); if (!($61)) { $62 = (_NbtTag_U16($0)|0); HEAP16[986072] = $62; STACKTOP = sp;return; } $63 = (_String_CaselessEqualsConst($59,28669)|0); $64 = ($63|0)==(0); if (!($64)) { $65 = (_NbtTag_U16($0)|0); HEAP16[(1972146)>>1] = $65; STACKTOP = sp;return; } $66 = (_String_CaselessEqualsConst($59,28710)|0); $67 = ($66|0)==(0); if (!($67)) { $68 = (_NbtTag_I32($0)|0); HEAP32[(1972148)>>2] = $68; STACKTOP = sp;return; } $69 = (_String_CaselessEqualsConst($59,28721)|0); $70 = ($69|0)==(0); if (!($70)) { $71 = (_NbtTag_I32($0)|0); HEAP32[(1972152)>>2] = $71; STACKTOP = sp;return; } $72 = (_String_CaselessEqualsConst($59,28733)|0); $73 = ($72|0)==(0); if (!($73)) { $74 = (_NbtTag_I32($0)|0); HEAP32[(1972156)>>2] = $74; STACKTOP = sp;return; } $75 = (_String_CaselessEqualsConst($59,28746)|0); $76 = ($75|0)==(0); if (!($76)) { $77 = (+_NbtTag_F32($0)); HEAPF32[(1972160)>>2] = $77; STACKTOP = sp;return; } $78 = (_String_CaselessEqualsConst($59,28758)|0); $79 = ($78|0)==(0); if (!($79)) { $80 = (+_NbtTag_F32($0)); HEAPF32[(1972164)>>2] = $80; STACKTOP = sp;return; } $81 = (_String_CaselessEqualsConst($59,28771)|0); $82 = ($81|0)==(0); if (!($82)) { $83 = (+_NbtTag_F32($0)); HEAPF32[(1972168)>>2] = $83; STACKTOP = sp;return; } $84 = (_String_CaselessEqualsConst($59,28783)|0); $85 = ($84|0)==(0); if (!($85)) { $86 = (_NbtTag_U8($0)|0); $87 = $86&255; HEAP32[(1972176)>>2] = $87; STACKTOP = sp;return; } $88 = (_String_CaselessEqualsConst($59,28790)|0); $89 = ($88|0)==(0); if (!($89)) { $90 = (+_NbtTag_F32($0)); HEAPF32[(1972180)>>2] = $90; STACKTOP = sp;return; } $91 = (_String_CaselessEqualsConst($59,28800)|0); $92 = ($91|0)==(0); if (!($92)) { $93 = (+_NbtTag_F32($0)); HEAPF32[(1972184)>>2] = $93; STACKTOP = sp;return; } } $94 = HEAP32[$0>>2]|0; $95 = ((($94)) + 8|0); $96 = (_String_CaselessEqualsConst($95,41926)|0); $97 = ($96|0)==(0); if (!($97)) { $98 = ((($0)) + 8|0); $99 = (_String_CaselessEqualsConst($98,28810)|0); $100 = ($99|0)==(0); if (!($100)) { $101 = (_Cw_ParseColor(-13159)|0); HEAP32[(1972188)>>2] = $101; STACKTOP = sp;return; } $102 = (_String_CaselessEqualsConst($98,28814)|0); $103 = ($102|0)==(0); if (!($103)) { $104 = (_Cw_ParseColor(-1)|0); HEAP32[(1972196)>>2] = $104; STACKTOP = sp;return; } $105 = (_String_CaselessEqualsConst($98,40775)|0); $106 = ($105|0)==(0); if (!($106)) { $107 = (_Cw_ParseColor(-1)|0); HEAP32[(1972192)>>2] = $107; STACKTOP = sp;return; } $108 = (_String_CaselessEqualsConst($98,28820)|0); $109 = ($108|0)==(0); if (!($109)) { $110 = (_Cw_ParseColor(-1)|0); _Env_SetSunCol($110); STACKTOP = sp;return; } $111 = (_String_CaselessEqualsConst($98,28829)|0); $112 = ($111|0)==(0); if (!($112)) { $113 = (_Cw_ParseColor(-6579301)|0); _Env_SetShadowCol($113); STACKTOP = sp;return; } $114 = (_String_CaselessEqualsConst($98,28837)|0); $115 = ($114|0)==(0); if (!($115)) { $116 = (_Cw_ParseColor(-1)|0); HEAP32[(1972200)>>2] = $116; STACKTOP = sp;return; } } $117 = HEAP32[$0>>2]|0; $118 = ((($117)) + 8|0); $119 = (_String_CaselessEqualsConst($118,41862)|0); $120 = ($119|0)==(0); $121 = HEAP8[1972841]|0; $122 = ($121<<24>>24)==(0); $or$cond = $120 | $122; if ($or$cond) { STACKTOP = sp;return; } $123 = ((($0)) + 8|0); $124 = (_String_CaselessStarts($123,14320)|0); $125 = ($124|0)==(0); if ($125) { STACKTOP = sp;return; } $126 = $2&65535; $127 = (1124628 + ($126)|0); $128 = HEAP8[$127>>0]|0; $129 = ($128<<24>>24)==(0); if ($129) { $130 = (1120788 + ($126)|0); $131 = HEAP8[$130>>0]|0; HEAP8[$127>>0] = $131; HEAP8[$130>>0] = 5; } else { HEAP8[$127>>0] = 0; } _Block_DefineCustom($2,0); $132 = (1171476 + ($126)|0); HEAP8[$132>>0] = 1; $133 = (1172244 + ($126)|0); HEAP8[$133>>0] = 1; _Event_RaiseVoid(1795088); HEAP16[986401] = 0; STACKTOP = sp;return; } function _Cw_Callback_5($0) { $0 = $0|0; var $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0; var $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0; var $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0; var $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0.0, $179 = 0.0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0; var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0.0, $205 = 0.0, $206 = 0; var $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0.0, $211 = 0.0, $212 = 0, $213 = 0, $214 = 0, $215 = 0.0, $216 = 0.0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0.0, $221 = 0.0, $222 = 0, $223 = 0, $224 = 0; var $225 = 0.0, $226 = 0.0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0.0, $231 = 0.0, $232 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0; var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0; var $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0; var $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0; var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $or$cond = 0, $spec$select = 0, $spec$store$select = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = HEAP16[986401]|0; $3 = HEAP32[$0>>2]|0; $4 = HEAP32[$3>>2]|0; $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 8|0); $7 = (_String_CaselessEqualsConst($6,28543)|0); $8 = ($7|0)==(0); if ($8) { STACKTOP = sp;return; } $9 = HEAP32[$0>>2]|0; $10 = HEAP32[$9>>2]|0; $11 = HEAP32[$10>>2]|0; $12 = HEAP32[$11>>2]|0; $13 = ((($12)) + 8|0); $14 = (_String_CaselessEqualsConst($13,28547)|0); $15 = ($14|0)==(0); if ($15) { STACKTOP = sp;return; } $16 = HEAP32[$0>>2]|0; $17 = HEAP32[$16>>2]|0; $18 = ((($17)) + 8|0); $19 = (_String_CaselessEqualsConst($18,41926)|0); $20 = ($19|0)==(0); if (!($20)) { $21 = ((($0)) + 8|0); $22 = (_String_CaselessEqualsConst($21,32278)|0); $23 = ($22|0)==(0); if (!($23)) { $24 = (_NbtTag_U16($0)|0); $25 = $24&65535; HEAP32[450722] = $25; STACKTOP = sp;return; } $26 = (_String_CaselessEqualsConst($21,32256)|0); $27 = ($26|0)==(0); if (!($27)) { $28 = (_NbtTag_U16($0)|0); $29 = $28&65535; HEAP32[450723] = $29; STACKTOP = sp;return; } $30 = (_String_CaselessEqualsConst($21,32246)|0); $31 = ($30|0)==(0); if (!($31)) { $32 = (_NbtTag_U16($0)|0); $33 = $32&65535; HEAP32[450724] = $33; STACKTOP = sp;return; } } $34 = HEAP32[$0>>2]|0; $35 = HEAP32[$34>>2]|0; $36 = ((($35)) + 8|0); $37 = (_String_CaselessEqualsConst($36,41862)|0); $38 = ($37|0)==(0); $39 = HEAP8[1972841]|0; $40 = ($39<<24>>24)==(0); $or$cond = $38 | $40; if ($or$cond) { STACKTOP = sp;return; } $41 = ((($0)) + 8|0); $42 = (_String_CaselessEqualsConst($41,28556)|0); $43 = ($42|0)==(0); if (!($43)) { $44 = (_NbtTag_U8($0)|0); $45 = $44&255; HEAP16[986401] = $45; STACKTOP = sp;return; } $46 = (_String_CaselessEqualsConst($41,28559)|0); $47 = ($46|0)==(0); if (!($47)) { $48 = (_NbtTag_U16($0)|0); HEAP16[986401] = $48; STACKTOP = sp;return; } $49 = (_String_CaselessEqualsConst($41,28563)|0); $50 = ($49|0)==(0); if (!($50)) { $51 = (_NbtTag_U8($0)|0); $52 = $2&65535; $53 = (1115412 + ($52)|0); HEAP8[$53>>0] = $51; STACKTOP = sp;return; } $54 = (_String_CaselessEqualsConst($41,43202)|0); $55 = ($54|0)==(0); if (!($55)) { $56 = (+_NbtTag_F32($0)); $57 = $2&65535; $58 = (1116948 + ($57<<2)|0); HEAPF32[$58>>2] = $56; STACKTOP = sp;return; } $59 = (_String_CaselessEqualsConst($41,28575)|0); $60 = ($59|0)==(0); if (!($60)) { $61 = (_NbtTag_U8($0)|0); $62 = ($61<<24>>24)==(0); $63 = $62&1; $64 = $2&65535; $65 = (1107732 + ($64)|0); HEAP8[$65>>0] = $63; STACKTOP = sp;return; } $66 = (_String_CaselessEqualsConst($41,28590)|0); $67 = ($66|0)==(0); if (!($67)) { $68 = (_NbtTag_U8($0)|0); $69 = ($68<<24>>24)!=(0); $70 = $69&1; $71 = $2&65535; $72 = (1108500 + ($71)|0); HEAP8[$72>>0] = $70; STACKTOP = sp;return; } $73 = (_String_CaselessEqualsConst($41,28601)|0); $74 = ($73|0)==(0); if (!($74)) { $75 = (_NbtTag_U8($0)|0); $76 = $2&65535; $77 = (1120788 + ($76)|0); HEAP8[$77>>0] = $75; STACKTOP = sp;return; } $78 = (_String_CaselessEqualsConst($41,28611)|0); $79 = ($78|0)==(0); if (!($79)) { $80 = (_NbtTag_U8($0)|0); $81 = $2&65535; $82 = (1124628 + ($81)|0); HEAP8[$82>>0] = $80; STACKTOP = sp;return; } $83 = (_String_CaselessEqualsConst($41,28617)|0); $84 = ($83|0)==(0); if (!($84)) { _NbtTag_String($1,$0); _Block_SetName($2,$1); STACKTOP = sp;return; } $85 = (_String_CaselessEqualsConst($41,28622)|0); $86 = ($85|0)==(0); if (!($86)) { $87 = (_NbtTag_U8_Array($0,6)|0); $88 = ($87|0)==(0|0); if ($88) { STACKTOP = sp;return; } $89 = HEAP8[$87>>0]|0; $90 = $89&255; $91 = $2&65535; $92 = ($91*6)|0; $93 = (($92) + 5)|0; $94 = (1162260 + ($93<<1)|0); HEAP16[$94>>1] = $90; $95 = ((($87)) + 1|0); $96 = HEAP8[$95>>0]|0; $97 = $96&255; $98 = (($92) + 4)|0; $99 = (1162260 + ($98<<1)|0); HEAP16[$99>>1] = $97; $100 = ((($87)) + 2|0); $101 = HEAP8[$100>>0]|0; $102 = $101&255; $103 = (1162260 + ($92<<1)|0); HEAP16[$103>>1] = $102; $104 = ((($87)) + 3|0); $105 = HEAP8[$104>>0]|0; $106 = $105&255; $107 = $92 | 1; $108 = (1162260 + ($107<<1)|0); HEAP16[$108>>1] = $106; $109 = ((($87)) + 4|0); $110 = HEAP8[$109>>0]|0; $111 = $110&255; $112 = (($92) + 2)|0; $113 = (1162260 + ($112<<1)|0); HEAP16[$113>>1] = $111; $114 = ((($87)) + 5|0); $115 = HEAP8[$114>>0]|0; $116 = $115&255; $117 = (($92) + 3)|0; $118 = (1162260 + ($117<<1)|0); HEAP16[$118>>1] = $116; $119 = ((($0)) + 16|0); $120 = HEAP32[$119>>2]|0; $121 = ($120>>>0)>(11); if (!($121)) { STACKTOP = sp;return; } $122 = ((($87)) + 6|0); $123 = HEAP8[$122>>0]|0; $124 = $123&255; $125 = $124 << 8; $126 = $89&255; $127 = $125 | $126; $128 = $127&65535; HEAP16[$94>>1] = $128; $129 = ((($87)) + 7|0); $130 = HEAP8[$129>>0]|0; $131 = $130&255; $132 = $131 << 8; $133 = $96&255; $134 = $132 | $133; $135 = $134&65535; HEAP16[$99>>1] = $135; $136 = ((($87)) + 8|0); $137 = HEAP8[$136>>0]|0; $138 = $137&255; $139 = $138 << 8; $140 = $101&255; $141 = $139 | $140; $142 = $141&65535; HEAP16[$103>>1] = $142; $143 = ((($87)) + 9|0); $144 = HEAP8[$143>>0]|0; $145 = $144&255; $146 = $145 << 8; $147 = $105&255; $148 = $146 | $147; $149 = $148&65535; HEAP16[$108>>1] = $149; $150 = ((($87)) + 10|0); $151 = HEAP8[$150>>0]|0; $152 = $151&255; $153 = $152 << 8; $154 = $110&255; $155 = $153 | $154; $156 = $155&65535; HEAP16[$113>>1] = $156; $157 = ((($87)) + 11|0); $158 = HEAP8[$157>>0]|0; $159 = $158&255; $160 = $159 << 8; $161 = $115&255; $162 = $160 | $161; $163 = $162&65535; HEAP16[$118>>1] = $163; STACKTOP = sp;return; } $164 = (_String_CaselessEqualsConst($41,28631)|0); $165 = ($164|0)==(0); if (!($165)) { $166 = (_NbtTag_U8($0)|0); $167 = $2&65535; $168 = (1121556 + ($167)|0); HEAP8[$168>>0] = $166; $169 = (1122324 + ($167)|0); $170 = ($166<<24>>24)==(6); $spec$select = $170 ? 4 : $166; HEAP8[$169>>0] = $spec$select; STACKTOP = sp;return; } $171 = (_String_CaselessEqualsConst($41,40775)|0); $172 = ($171|0)==(0); if (!($172)) { $173 = (_NbtTag_U8_Array($0,4)|0); $174 = ($173|0)==(0|0); if ($174) { STACKTOP = sp;return; } $175 = HEAP8[$173>>0]|0; $176 = $175&255; $177 = (($176) + 1)|0; $178 = (+($177|0)); $179 = $178 * 0.0078125; $180 = $2&65535; $181 = (1112340 + ($180<<2)|0); HEAPF32[$181>>2] = $179; $182 = HEAP8[$173>>0]|0; $183 = ($182<<24>>24)==(-1); $spec$store$select = $183 ? 0.0 : $179; HEAPF32[$181>>2] = $spec$store$select; $184 = ((($173)) + 1|0); $185 = HEAP8[$184>>0]|0; $186 = $185&255; $187 = ((($173)) + 2|0); $188 = HEAP8[$187>>0]|0; $189 = $188&255; $190 = $189 << 8; $191 = ((($173)) + 3|0); $192 = HEAP8[$191>>0]|0; $193 = $192&255; $194 = $193 << 16; $195 = $190 | $186; $196 = $195 | $194; $197 = $196 | -16777216; $198 = (1109268 + ($180<<2)|0); HEAP32[$198>>2] = $197; STACKTOP = sp;return; } $199 = (_String_CaselessEqualsConst($41,28641)|0); $200 = ($199|0)==(0); if ($200) { STACKTOP = sp;return; } $201 = (_NbtTag_U8_Array($0,6)|0); $202 = ($201|0)==(0|0); if ($202) { STACKTOP = sp;return; } $203 = HEAP8[$201>>0]|0; $204 = (+($203<<24>>24)); $205 = $204 * 0.0625; $206 = $2&65535; $207 = (1125396 + (($206*12)|0)|0); HEAPF32[$207>>2] = $205; $208 = ((($201)) + 3|0); $209 = HEAP8[$208>>0]|0; $210 = (+($209<<24>>24)); $211 = $210 * 0.0625; $212 = (1134612 + (($206*12)|0)|0); HEAPF32[$212>>2] = $211; $213 = ((($201)) + 1|0); $214 = HEAP8[$213>>0]|0; $215 = (+($214<<24>>24)); $216 = $215 * 0.0625; $217 = (((1125396 + (($206*12)|0)|0)) + 4|0); HEAPF32[$217>>2] = $216; $218 = ((($201)) + 4|0); $219 = HEAP8[$218>>0]|0; $220 = (+($219<<24>>24)); $221 = $220 * 0.0625; $222 = (((1134612 + (($206*12)|0)|0)) + 4|0); HEAPF32[$222>>2] = $221; $223 = ((($201)) + 2|0); $224 = HEAP8[$223>>0]|0; $225 = (+($224<<24>>24)); $226 = $225 * 0.0625; $227 = (((1125396 + (($206*12)|0)|0)) + 8|0); HEAPF32[$227>>2] = $226; $228 = ((($201)) + 5|0); $229 = HEAP8[$228>>0]|0; $230 = (+($229<<24>>24)); $231 = $230 * 0.0625; $232 = (((1134612 + (($206*12)|0)|0)) + 8|0); HEAPF32[$232>>2] = $231; STACKTOP = sp;return; } function _NbtTag_U16($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP8[$1>>0]|0; switch ($2<<24>>24) { case 2: { $3 = ((($0)) + 20|0); $4 = HEAP16[$3>>1]|0; $$0 = $4; return ($$0|0); } case 1: { $5 = ((($0)) + 20|0); $6 = HEAP8[$5>>0]|0; $7 = $6&255; $$0 = $7; return ($$0|0); } default: { $8 = ((($0)) + 156|0); HEAP32[$8>>2] = -857812895; $$0 = 0; return ($$0|0); } } } function _NbtTag_U8($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP8[$1>>0]|0; $3 = ($2<<24>>24)==(1); if ($3) { $4 = ((($0)) + 20|0); $5 = HEAP8[$4>>0]|0; $$0 = $5; return ($$0|0); } else { $6 = ((($0)) + 156|0); HEAP32[$6>>2] = -857812896; $$0 = 0; return ($$0|0); } } function _NbtTag_F32($0) { $0 = $0|0; var $$0 = 0.0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP8[$1>>0]|0; $3 = ($2<<24>>24)==(5); if ($3) { $4 = ((($0)) + 20|0); $5 = +HEAPF32[$4>>2]; $$0 = $5; return (+$$0); } else { $6 = ((($0)) + 156|0); HEAP32[$6>>2] = -857812893; $$0 = 0.0; return (+$$0); } } function _NbtTag_String($0,$1) { $0 = $0|0; $1 = $1|0; var $$sink3 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 4|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(8); if ($4) { $5 = ((($1)) + 20|0); $$sink3 = $5; } else { $6 = ((($1)) + 156|0); HEAP32[$6>>2] = -857812892; $$sink3 = 1949280; } $7 = $$sink3; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = (($7) + 4)|0; $11 = $10; $12 = HEAP32[$11>>2]|0; $13 = $0; $14 = $13; HEAP32[$14>>2] = $9; $15 = (($13) + 4)|0; $16 = $15; HEAP32[$16>>2] = $12; return; } function _NbtTag_U8_Array($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(7); if (!($4)) { $5 = ((($0)) + 156|0); HEAP32[$5>>2] = -857812891; $$0 = 0; return ($$0|0); } $6 = ((($0)) + 16|0); $7 = HEAP32[$6>>2]|0; $8 = ($7>>>0)<($1>>>0); if ($8) { $9 = ((($0)) + 156|0); HEAP32[$9>>2] = -857812890; $$0 = 0; return ($$0|0); } $10 = ($7>>>0)<(65); $11 = ((($0)) + 20|0); if ($10) { $$0 = $11; return ($$0|0); } else { $12 = HEAP32[$11>>2]|0; $$0 = $12; return ($$0|0); } } function _NbtTag_I16($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP8[$1>>0]|0; switch ($2<<24>>24) { case 2: { $3 = ((($0)) + 20|0); $4 = HEAP16[$3>>1]|0; $$0 = $4; return ($$0|0); } case 1: { $5 = ((($0)) + 20|0); $6 = HEAP8[$5>>0]|0; $7 = $6&255; $$0 = $7; return ($$0|0); } default: { $8 = ((($0)) + 156|0); HEAP32[$8>>2] = -857812895; $$0 = 0; return ($$0|0); } } } function _NbtTag_I32($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP8[$1>>0]|0; switch ($2<<24>>24) { case 3: { $3 = ((($0)) + 20|0); $4 = HEAP32[$3>>2]|0; $$0 = $4; return ($$0|0); } case 2: { $5 = ((($0)) + 20|0); $6 = HEAP16[$5>>1]|0; $7 = $6 << 16 >> 16; $$0 = $7; return ($$0|0); } case 1: { $8 = ((($0)) + 20|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $$0 = $10; return ($$0|0); } default: { $11 = ((($0)) + 156|0); HEAP32[$11>>2] = -857812894; $$0 = 0; return ($$0|0); } } } function _Cw_ParseColor($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond3 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[450722]|0; $2 = HEAP32[450723]|0; $3 = HEAP32[450724]|0; $4 = ($1|0)>(255); $5 = ($2|0)>(255); $or$cond = $4 | $5; $6 = ($3|0)>(255); $or$cond3 = $or$cond | $6; $7 = $1 & 255; $8 = $2 << 8; $9 = $8 & 65280; $10 = $3 << 16; $11 = $7 | $9; $12 = $11 | $10; $13 = $12 | -16777216; $spec$select = $or$cond3 ? $0 : $13; return ($spec$select|0); } function _Cw_GetBlocks($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); $2 = HEAP32[$1>>2]|0; $3 = ($2>>>0)<(65); if ($3) { $4 = (_Mem_Alloc($2,1,28896)|0); $5 = ((($0)) + 20|0); $6 = HEAP32[$1>>2]|0; _Mem_Copy($4,$5,$6); $$0 = $4; return ($$0|0); } else { $7 = ((($0)) + 20|0); $8 = HEAP32[$7>>2]|0; HEAP32[$7>>2] = 0; $$0 = $8; return ($$0|0); } } function _Dat_LoadFormat0($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; _Dat_Format0And1(); HEAP16[986072] = 0; HEAP16[(1972146)>>1] = 0; HEAP32[(1103564)>>2] = 256; HEAP32[(1103568)>>2] = 64; HEAP32[(1103572)>>2] = 256; HEAP32[(1103560)>>2] = 4194304; $1 = (_Mem_TryAlloc(4194304,1)|0); HEAP32[275888] = $1; $2 = ($1|0)==(0|0); if ($2) { $$0 = -857812988; return ($$0|0); } _Mem_Set($1,1,5); $3 = HEAP32[275888]|0; $4 = ((($3)) + 5|0); $5 = (_Stream_Read($0,$4,4194299)|0); $$0 = $5; return ($$0|0); } function _Dat_LoadFormat1($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 112|0; $1 = sp + 48|0; $2 = sp; $3 = sp + 96|0; _Dat_Format0And1(); $4 = (_Java_ReadString($0,$1)|0); $5 = ($4|0)==(0); if (!($5)) { $$0 = $4; STACKTOP = sp;return ($$0|0); } $6 = (_Java_ReadString($0,$2)|0); $7 = ($6|0)==(0); if (!($7)) { $$0 = $6; STACKTOP = sp;return ($$0|0); } $8 = (_Stream_Read($0,$3,14)|0); $9 = ($8|0)==(0); if (!($9)) { $$0 = $8; STACKTOP = sp;return ($$0|0); } $10 = ((($3)) + 8|0); $11 = (_Stream_GetU16_BE($10)|0); $12 = $11&65535; HEAP32[(1103564)>>2] = $12; $13 = ((($3)) + 10|0); $14 = (_Stream_GetU16_BE($13)|0); $15 = $14&65535; HEAP32[(1103572)>>2] = $15; $16 = ((($3)) + 12|0); $17 = (_Stream_GetU16_BE($16)|0); $18 = $17&65535; HEAP32[(1103568)>>2] = $18; $19 = (_Map_ReadBlocks($0)|0); $$0 = $19; STACKTOP = sp;return ($$0|0); } function _Dat_LoadFormat2($0) { $0 = $0|0; var $$031 = 0, $$033 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0; var $62 = 0.0, $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 70512|0; $1 = sp; $2 = sp + 70508|0; $3 = sp + 70456|0; $4 = sp + 70448|0; $5 = sp + 70440|0; $6 = (_Stream_Read($0,$2,4)|0); $7 = ($6|0)==(0); if (!($7)) { $$031 = $6; STACKTOP = sp;return ($$031|0); } HEAP32[450725] = $1; HEAP32[450726] = 0; HEAP32[450727] = 8257536; $8 = (_Stream_GetU16_BE($2)|0); $9 = ($8<<16>>16)==(-21267); if (!($9)) { $$031 = -857812928; STACKTOP = sp;return ($$031|0); } $10 = ((($2)) + 2|0); $11 = (_Stream_GetU16_BE($10)|0); $12 = ($11<<16>>16)==(5); if (!($12)) { $$031 = -857812927; STACKTOP = sp;return ($$031|0); } $13 = (_Java_ReadObject($0,$3)|0); $14 = ($13|0)==(0); if (!($14)) { $$031 = $13; STACKTOP = sp;return ($$031|0); } $15 = HEAP8[$3>>0]|0; $16 = ($15<<24>>24)==(115); if (!($16)) { $$031 = -857812926; STACKTOP = sp;return ($$031|0); } $17 = ((($3)) + 4|0); $18 = HEAP32[$17>>2]|0; $19 = ((($18)) + 52|0); $20 = HEAP32[$19>>2]|0; $21 = ($20|0)>(0); if (!($21)) { $$031 = 0; STACKTOP = sp;return ($$031|0); } $$033 = 0; while(1) { $22 = (((($18)) + 56|0) + (($$033*60)|0)|0); $23 = (((((($18)) + 56|0) + (($$033*60)|0)|0)) + 1|0); _String_FromRaw($5,$23,48); $24 = $5; $25 = $24; $26 = HEAP32[$25>>2]|0; $27 = (($24) + 4)|0; $28 = $27; $29 = HEAP32[$28>>2]|0; $30 = $4; $31 = $30; HEAP32[$31>>2] = $26; $32 = (($30) + 4)|0; $33 = $32; HEAP32[$33>>2] = $29; $34 = (_String_CaselessEqualsConst($4,28911)|0); $35 = ($34|0)==(0); do { if ($35) { $37 = (_String_CaselessEqualsConst($4,28917)|0); $38 = ($37|0)==(0); if (!($38)) { $39 = (_Java_I32($22)|0); HEAP32[(1103572)>>2] = $39; break; } $40 = (_String_CaselessEqualsConst($4,28924)|0); $41 = ($40|0)==(0); if (!($41)) { $42 = (_Java_I32($22)|0); HEAP32[(1103568)>>2] = $42; break; } $43 = (_String_CaselessEqualsConst($4,28930)|0); $44 = ($43|0)==(0); if (!($44)) { $45 = HEAP8[$22>>0]|0; $46 = ($45<<24>>24)==(91); if (!($46)) { _Logger_Abort(28937); } $47 = (((((($18)) + 56|0) + (($$033*60)|0)|0)) + 52|0); $48 = HEAP32[$47>>2]|0; HEAP32[275888] = $48; $49 = (((((($18)) + 56|0) + (($$033*60)|0)|0)) + 56|0); $50 = HEAP32[$49>>2]|0; HEAP32[(1103560)>>2] = $50; break; } $51 = (_String_CaselessEqualsConst($4,28964)|0); $52 = ($51|0)==(0); if (!($52)) { $53 = (_Java_I32($22)|0); $54 = (+($53|0)); HEAPF32[(1784264)>>2] = $54; break; } $55 = (_String_CaselessEqualsConst($4,28971)|0); $56 = ($55|0)==(0); if (!($56)) { $57 = (_Java_I32($22)|0); $58 = (+($57|0)); HEAPF32[(1784268)>>2] = $58; break; } $59 = (_String_CaselessEqualsConst($4,28978)|0); $60 = ($59|0)==(0); if (!($60)) { $61 = (_Java_I32($22)|0); $62 = (+($61|0)); HEAPF32[(1784272)>>2] = $62; } } else { $36 = (_Java_I32($22)|0); HEAP32[(1103564)>>2] = $36; } } while(0); $63 = (($$033) + 1)|0; $64 = HEAP32[$19>>2]|0; $65 = ($63|0)<($64|0); if ($65) { $$033 = $63; } else { $$031 = 0; break; } } STACKTOP = sp;return ($$031|0); } function _Java_ReadObject($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP32[$2>>2]|0; $4 = (FUNCTION_TABLE_iii[$3 & 127]($0,$1)|0); $5 = ($4|0)==(0); if (!($5)) { $$0 = $4; return ($$0|0); } $6 = (_Java_ReadObjectData($0,$1)|0); $$0 = $6; return ($$0|0); } function _Java_I32($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; $2 = ($1<<24>>24)==(73); if (!($2)) { _Logger_Abort(28985); } $3 = ((($0)) + 52|0); $4 = HEAP32[$3>>2]|0; return ($4|0); } function _Java_ReadObjectData($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = HEAP8[$1>>0]|0; switch ($3<<24>>24) { case 116: { $4 = (_Java_ReadNewString($0,$1)|0); $$0 = $4; break; } case 112: { $$0 = 0; break; } case 113: { $5 = (_Stream_ReadU32_BE($0,$2)|0); $$0 = $5; break; } case 115: { $6 = (_Java_ReadNewObject($0,$1)|0); $$0 = $6; break; } case 117: { $7 = (_Java_ReadNewArray($0,$1)|0); $$0 = $7; break; } default: { $$0 = -857812925; } } STACKTOP = sp;return ($$0|0); } function _Java_ReadNewString($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[450727]|0; $3 = (($2) + 1)|0; HEAP32[450727] = $3; $4 = ((($1)) + 4|0); $5 = (_Java_ReadString($0,$4)|0); return ($5|0); } function _Java_ReadNewObject($0,$1) { $0 = $0|0; $1 = $1|0; var $$017 = 0, $$021 = 0, $$021$phi = 0, $$118 = 0, $$118$ph = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 4|0); $3 = (_Java_ReadClassDesc($0,$2)|0); $4 = ($3|0)==(0); if (!($4)) { $$017 = $3; return ($$017|0); } $5 = HEAP32[450727]|0; $6 = (($5) + 1)|0; HEAP32[450727] = $6; $7 = HEAP32[$2>>2]|0; $8 = ((($7)) + 2344|0); HEAP32[$8>>2] = 0; $9 = ((($7)) + 2340|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0|0); if ($11) { $17 = ($7|0)==(0|0); if ($17) { $$017 = 0; return ($$017|0); } else { $$118$ph = $7; } } else { $$021 = $7;$13 = $10; while(1) { $12 = ((($13)) + 2344|0); HEAP32[$12>>2] = $$021; $14 = ((($13)) + 2340|0); $15 = HEAP32[$14>>2]|0; $16 = ($15|0)==(0|0); if ($16) { $$118$ph = $13; break; } else { $$021$phi = $13;$13 = $15;$$021 = $$021$phi; } } } $$118 = $$118$ph; while(1) { $18 = (_Java_ReadClassData($0,$$118)|0); $19 = ($18|0)==(0); if (!($19)) { $$017 = $18; label = 9; break; } $20 = ((($$118)) + 2344|0); $21 = HEAP32[$20>>2]|0; $22 = ($21|0)==(0|0); if ($22) { $$017 = 0; label = 9; break; } else { $$118 = $21; } } if ((label|0) == 9) { return ($$017|0); } return (0)|0; } function _Java_ReadNewArray($0,$1) { $0 = $0|0; $1 = $1|0; var $$026 = 0, $$027 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 8|0; $3 = sp; $4 = ((($1)) + 4|0); $5 = (_Java_ReadClassDesc($0,$4)|0); $6 = ($5|0)==(0); L1: do { if ($6) { $7 = (_Stream_ReadU32_BE($0,$3)|0); $8 = ($7|0)==(0); if ($8) { $9 = HEAP32[$4>>2]|0; $10 = ((($9)) + 1|0); $11 = HEAP8[$10>>0]|0; $12 = HEAP32[450727]|0; $13 = (($12) + 1)|0; HEAP32[450727] = $13; $14 = ($11<<24>>24)==(66); $15 = HEAP32[$3>>2]|0; if ($14) { $22 = ((($1)) + 12|0); HEAP32[$22>>2] = $15; $23 = (_Mem_TryAlloc($15,1)|0); $24 = ((($1)) + 8|0); HEAP32[$24>>2] = $23; $25 = ($23|0)==(0|0); if ($25) { $$026 = -857812988; break; } $26 = HEAP32[$3>>2]|0; $27 = (_Stream_Read($0,$23,$26)|0); $28 = ($27|0)==(0); if ($28) { $$026 = 0; break; } $29 = HEAP32[$24>>2]|0; _Mem_Free($29); $$026 = $27; break; } $16 = ($15|0)==(0); if ($16) { $$026 = 0; } else { $$027 = 0; while(1) { $20 = (_Java_ReadValue($0,$11,$2)|0); $21 = ($20|0)==(0); $18 = (($$027) + 1)|0; if (!($21)) { $$026 = $20; break L1; } $17 = HEAP32[$3>>2]|0; $19 = ($18>>>0)<($17>>>0); if ($19) { $$027 = $18; } else { $$026 = 0; break; } } } } else { $$026 = $7; } } else { $$026 = $5; } } while(0); STACKTOP = sp;return ($$026|0); } function _Java_ReadClassDesc($0,$1) { $0 = $0|0; $1 = $1|0; var $$017 = 0, $$019 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 4|0; $3 = sp; $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = (FUNCTION_TABLE_iii[$5 & 127]($0,$2)|0); $7 = ($6|0)==(0); L1: do { if ($7) { $8 = HEAP8[$2>>0]|0; switch ($8<<24>>24) { case 112: { HEAP32[$1>>2] = 0; $$017 = 0; break L1; } case 113: { $9 = (_Stream_ReadU32_BE($0,$3)|0); $10 = ($9|0)==(0); if (!($10)) { $$017 = $9; break L1; } $11 = HEAP32[450726]|0; $12 = ($11|0)>(0); if (!($12)) { $$017 = -857812918; break L1; } $13 = HEAP32[450725]|0; $14 = HEAP32[$3>>2]|0; $15 = HEAP32[450726]|0; $$019 = 0; while(1) { $16 = (((($13) + (($$019*2348)|0)|0)) + 2336|0); $17 = HEAP32[$16>>2]|0; $18 = ($17|0)==($14|0); if ($18) { break; } $20 = (($$019) + 1)|0; $21 = ($20|0)<($15|0); if ($21) { $$019 = $20; } else { $$017 = -857812918; break L1; } } $19 = (($13) + (($$019*2348)|0)|0); HEAP32[$1>>2] = $19; $$017 = 0; break L1; } case 114: { $22 = HEAP32[450726]|0; $23 = ($22|0)>(29); if ($23) { $$017 = -857812919; break L1; } $24 = HEAP32[450725]|0; $25 = (($22) + 1)|0; HEAP32[450726] = $25; $26 = (($24) + (($22*2348)|0)|0); HEAP32[$1>>2] = $26; $27 = (_Java_ReadNewClassDesc($0,$26)|0); $$017 = $27; break L1; } default: { $$017 = -857812922; break L1; } } } else { $$017 = $6; } } while(0); STACKTOP = sp;return ($$017|0); } function _Java_ReadValue($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $3 = sp; switch ($1<<24>>24) { case 90: case 66: { $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = (FUNCTION_TABLE_iii[$5 & 127]($0,$2)|0); $$0 = $6; break; } case 73: case 70: { $7 = (_Stream_ReadU32_BE($0,$2)|0); $$0 = $7; break; } case 74: case 68: { $8 = ((($0)) + 12|0); $9 = HEAP32[$8>>2]|0; $10 = (FUNCTION_TABLE_iii[$9 & 127]($0,8)|0); $$0 = $10; break; } case 76: { $11 = (_Java_ReadObject($0,$3)|0); $$0 = $11; break; } case 91: { $12 = (_Java_ReadObject($0,$3)|0); $13 = ($12|0)==(0); if ($13) { $14 = ((($2)) + 4|0); HEAP32[$14>>2] = 0; HEAP32[$2>>2] = 0; $15 = HEAP8[$3>>0]|0; $16 = ($15<<24>>24)==(117); if ($16) { $17 = ((($3)) + 4|0); $18 = HEAP32[$17>>2]|0; $19 = ((($18)) + 1|0); $20 = HEAP8[$19>>0]|0; $21 = ($20<<24>>24)==(66); if ($21) { $22 = ((($3)) + 12|0); $23 = HEAP32[$22>>2]|0; HEAP32[$14>>2] = $23; $24 = ((($3)) + 8|0); $25 = HEAP32[$24>>2]|0; HEAP32[$2>>2] = $25; $$0 = 0; } else { $$0 = 0; } } else { $$0 = 0; } } else { $$0 = $12; } break; } default: { $$0 = -857812916; } } STACKTOP = sp;return ($$0|0); } function _Java_ReadNewClassDesc($0,$1) { $0 = $0|0; $1 = $1|0; var $$028 = 0, $$029 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_Java_ReadString($0,$1)|0); $4 = ($3|0)==(0); L1: do { if ($4) { $5 = ((($0)) + 12|0); $6 = HEAP32[$5>>2]|0; $7 = (FUNCTION_TABLE_iii[$6 & 127]($0,8)|0); $8 = ($7|0)==(0); if ($8) { $9 = ((($0)) + 4|0); $10 = HEAP32[$9>>2]|0; $11 = ((($1)) + 48|0); $12 = (FUNCTION_TABLE_iii[$10 & 127]($0,$11)|0); $13 = ($12|0)==(0); if ($13) { $14 = HEAP32[450727]|0; $15 = ((($1)) + 2336|0); HEAP32[$15>>2] = $14; $16 = (($14) + 1)|0; HEAP32[450727] = $16; $17 = (_Stream_Read($0,$2,2)|0); $18 = ($17|0)==(0); if ($18) { $19 = (_Stream_GetU16_BE($2)|0); $20 = $19&65535; $21 = ((($1)) + 52|0); HEAP32[$21>>2] = $20; $22 = ($19&65535)>(38); if ($22) { $$028 = -857812921; } else { $23 = HEAP32[$21>>2]|0; $24 = ($23|0)>(0); if ($24) { $$029 = 0; while(1) { $28 = (((($1)) + 56|0) + (($$029*60)|0)|0); $29 = (_Java_ReadFieldDesc($0,$28)|0); $30 = ($29|0)==(0); $26 = (($$029) + 1)|0; if (!($30)) { $$028 = $29; break L1; } $25 = HEAP32[$21>>2]|0; $27 = ($26|0)<($25|0); if ($27) { $$029 = $26; } else { break; } } } $31 = (_Java_SkipAnnotation($0)|0); $32 = ($31|0)==(0); if ($32) { $33 = ((($1)) + 2340|0); $34 = (_Java_ReadClassDesc($0,$33)|0); $$028 = $34; } else { $$028 = $31; } } } else { $$028 = $17; } } else { $$028 = $12; } } else { $$028 = $7; } } else { $$028 = $3; } } while(0); STACKTOP = sp;return ($$028|0); } function _Java_ReadString($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Stream_Read($0,$1,2)|0); $3 = ($2|0)==(0); if (!($3)) { $$0 = $2; return ($$0|0); } $4 = (_Stream_GetU16_BE($1)|0); _Mem_Set($1,0,48); $5 = ($4&65535)>(48); if ($5) { $$0 = -857812924; return ($$0|0); } $6 = $4&65535; $7 = (_Stream_Read($0,$1,$6)|0); $$0 = $7; return ($$0|0); } function _Java_ReadFieldDesc($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $2 = sp; $3 = ((($0)) + 4|0); $4 = HEAP32[$3>>2]|0; $5 = (FUNCTION_TABLE_iii[$4 & 127]($0,$1)|0); $6 = ($5|0)==(0); L1: do { if ($6) { $7 = ((($1)) + 1|0); $8 = (_Java_ReadString($0,$7)|0); $9 = ($8|0)==(0); if ($9) { $10 = HEAP8[$1>>0]|0; switch ($10<<24>>24) { case 76: case 91: { break; } default: { $$0 = 0; break L1; } } $11 = (_Java_ReadObject($0,$2)|0); $$0 = $11; } else { $$0 = $8; } } else { $$0 = $5; } } while(0); STACKTOP = sp;return ($$0|0); } function _Java_SkipAnnotation($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $1 = sp + 53|0; $2 = sp + 52|0; $3 = sp; $4 = ((($0)) + 12|0); $5 = ((($0)) + 4|0); $6 = HEAP32[$5>>2]|0; $7 = (FUNCTION_TABLE_iii[$6 & 127]($0,$1)|0); $8 = ($7|0)==(0); L1: do { if ($8) { while(1) { $9 = HEAP8[$1>>0]|0; switch ($9<<24>>24) { case 120: { $$0 = 0; break L1; } case 119: { $10 = HEAP32[$5>>2]|0; $11 = (FUNCTION_TABLE_iii[$10 & 127]($0,$2)|0); $12 = ($11|0)==(0); if (!($12)) { $$0 = $11; break L1; } $13 = HEAP32[$4>>2]|0; $14 = HEAP8[$2>>0]|0; $15 = $14&255; $16 = (FUNCTION_TABLE_iii[$13 & 127]($0,$15)|0); $17 = ($16|0)==(0); if (!($17)) { $$0 = $16; break L1; } break; } default: { HEAP8[$3>>0] = $9; $18 = (_Java_ReadObjectData($0,$3)|0); $19 = ($18|0)==(0); if (!($19)) { $$0 = $18; break L1; } } } $20 = HEAP32[$5>>2]|0; $21 = (FUNCTION_TABLE_iii[$20 & 127]($0,$1)|0); $22 = ($21|0)==(0); if (!($22)) { $$0 = $21; break L1; } } } else { $$0 = $7; } } while(0); STACKTOP = sp;return ($$0|0); } function _Java_ReadClassData($0,$1) { $0 = $0|0; $1 = $1|0; var $$016 = 0, $$017 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 48|0); $3 = HEAP8[$2>>0]|0; $4 = $3 & 2; $5 = ($4<<24>>24)==(0); if ($5) { $$016 = -857812917; return ($$016|0); } $6 = ((($1)) + 52|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)>(0); L4: do { if ($8) { $$017 = 0; while(1) { $12 = (((($1)) + 56|0) + (($$017*60)|0)|0); $13 = HEAP8[$12>>0]|0; $14 = (((((($1)) + 56|0) + (($$017*60)|0)|0)) + 52|0); $15 = (_Java_ReadValue($0,$13,$14)|0); $16 = ($15|0)==(0); $10 = (($$017) + 1)|0; if (!($16)) { $$016 = $15; break; } $9 = HEAP32[$6>>2]|0; $11 = ($10|0)<($9|0); if ($11) { $$017 = $10; } else { break L4; } } return ($$016|0); } } while(0); $17 = HEAP8[$2>>0]|0; $18 = $17 & 1; $19 = ($18<<24>>24)==(0); if ($19) { $$016 = 0; return ($$016|0); } $20 = (_Java_SkipAnnotation($0)|0); $$016 = $20; return ($$016|0); } function _Dat_Format0And1() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[1972830] = 1; HEAP32[(1972156)>>2] = -30000; HEAP32[(1972188)>>2] = -13185; HEAP32[(1972192)>>2] = -13185; return; } function _Map_LoadFrom($0) { $0 = $0|0; var $$0 = 0, $$016 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp; $2 = sp + 72|0; $3 = sp + 64|0; $4 = sp + 8|0; _Game_Reset(); HEAP8[1972830] = 0; $5 = (_Stream_OpenFile($4,$0)|0); $6 = ($5|0)==(0); if (!($6)) { _Logger_SysWarn2($5,45056,$0); $$016 = $5; STACKTOP = sp;return ($$016|0); } $7 = (_Map_FindImporter($0)|0); $8 = ($7|0)==(0|0); if ($8) { $$0 = -857812990; } else { $9 = (FUNCTION_TABLE_ii[$7 & 31]($4)|0); $10 = ($9|0)==(0); if ($10) { $$0 = 0; } else { _World_Reset(); $$0 = $9; } } $11 = ((($4)) + 28|0); $12 = HEAP32[$11>>2]|0; (FUNCTION_TABLE_ii[$12 & 31]($4)|0); $13 = ($$0|0)==(0); if (!($13)) { _Logger_SysWarn2($$0,44275,$0); } $14 = HEAP32[275888]|0; $15 = HEAP32[(1103564)>>2]|0; $16 = HEAP32[(1103568)>>2]|0; $17 = HEAP32[(1103572)>>2]|0; _World_SetNewMap($14,$15,$16,$17); $18 = HEAP8[1972830]|0; $19 = ($18<<24>>24)==(0); if (!($19)) { _LocalPlayer_CalcDefaultSpawn(); } _LocalPlayer_MoveToSpawn(); $20 = $0; $21 = $20; $22 = HEAP32[$21>>2]|0; $23 = (($20) + 4)|0; $24 = $23; $25 = HEAP32[$24>>2]|0; $26 = $1; $27 = $26; HEAP32[$27>>2] = $22; $28 = (($26) + 4)|0; $29 = $28; HEAP32[$29>>2] = $25; _Utils_UNSAFE_GetFilename($1); (_String_UNSAFE_Separate($1,46,$2,$3)|0); _String_Copy((1103624),$2); $$016 = $$0; STACKTOP = sp;return ($$016|0); } function _Cw_Save($0) { $0 = $0|0; var $$088 = 0, $$089 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0.0; var $115 = 0, $116 = 0.0, $117 = 0, $118 = 0.0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0.0, $124 = 0, $125 = 0.0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0; var $25 = 0, $26 = 0.0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0; var $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 2048|0; $1 = sp; $2 = (_Nbt_WriteDict($1,29010)|0); $3 = (_Nbt_WriteUInt8($2,29023,1)|0); $4 = (_Nbt_WriteArray($3,28868,16)|0); _Mem_Copy($4,(1103592),16); $5 = ((($4)) + 16|0); $6 = HEAP32[(1103564)>>2]|0; $7 = $6&65535; $8 = (_Nbt_WriteUInt16($5,32290,$7)|0); $9 = HEAP32[(1103568)>>2]|0; $10 = $9&65535; $11 = (_Nbt_WriteUInt16($8,32292,$10)|0); $12 = HEAP32[(1103572)>>2]|0; $13 = $12&65535; $14 = (_Nbt_WriteUInt16($11,32294,$13)|0); $15 = (_Nbt_WriteDict($14,28850)|0); $16 = HEAP32[(1103648)>>2]|0; $17 = (_Nbt_WriteInt32($15,28863,$16)|0); $18 = ((($17)) + 1|0); HEAP8[$17>>0] = 0; $19 = (_Nbt_WriteDict($18,40644)|0); $20 = +HEAPF32[(1783776)>>2]; $21 = (~~(($20))&65535); $22 = (_Nbt_WriteUInt16($19,32290,$21)|0); $23 = +HEAPF32[(1783780)>>2]; $24 = (~~(($23))&65535); $25 = (_Nbt_WriteUInt16($22,32292,$24)|0); $26 = +HEAPF32[(1783784)>>2]; $27 = (~~(($26))&65535); $28 = (_Nbt_WriteUInt16($25,32294,$27)|0); $29 = +HEAPF32[(1784288)>>2]; $30 = $29 * 256.0; $31 = $30 / 360.0; $32 = (~~(($31))&255); $33 = (_Nbt_WriteUInt8($28,32258,$32)|0); $34 = +HEAPF32[(1784292)>>2]; $35 = $34 * 256.0; $36 = $35 / 360.0; $37 = (~~(($36))&255); $38 = (_Nbt_WriteUInt8($33,32274,$37)|0); $39 = ((($38)) + 1|0); HEAP8[$38>>0] = 0; $40 = HEAP32[(1103560)>>2]|0; $41 = (_Nbt_WriteArray($39,28873,$40)|0); $42 = $41; $43 = $1; $44 = (($42) - ($43))|0; $45 = (_Stream_Write($0,$1,$44)|0); $46 = ($45|0)==(0); if (!($46)) { $$088 = $45; STACKTOP = sp;return ($$088|0); } $47 = HEAP32[275888]|0; $48 = HEAP32[(1103560)>>2]|0; $49 = (_Stream_Write($0,$47,$48)|0); $50 = ($49|0)==(0); if (!($50)) { $$088 = $49; STACKTOP = sp;return ($$088|0); } $51 = HEAP32[275888]|0; $52 = HEAP32[(1103556)>>2]|0; $53 = ($51|0)==($52|0); if (!($53)) { $54 = HEAP32[(1103560)>>2]|0; $55 = (_Nbt_WriteArray($1,28884,$54)|0); $56 = $55; $57 = (($56) - ($43))|0; $58 = (_Stream_Write($0,$1,$57)|0); $59 = ($58|0)==(0); if (!($59)) { $$088 = $58; STACKTOP = sp;return ($$088|0); } $60 = HEAP32[(1103556)>>2]|0; $61 = HEAP32[(1103560)>>2]|0; $62 = (_Stream_Write($0,$60,$61)|0); $63 = ($62|0)==(0); if (!($63)) { $$088 = $62; STACKTOP = sp;return ($$088|0); } } $64 = (_Nbt_WriteDict($1,28547)|0); $65 = (_Nbt_WriteDict($64,28543)|0); $66 = (_Nbt_WriteDict($65,41879)|0); $67 = +HEAPF32[(1784296)>>2]; $68 = $67 * 32.0; $69 = (~~(($68))&65535); $70 = (_Nbt_WriteUInt16($66,28648,$69)|0); $71 = ((($70)) + 1|0); HEAP8[$70>>0] = 0; $72 = (_Nbt_WriteDict($71,41964)|0); $73 = HEAP32[(1972172)>>2]|0; $74 = $73&255; $75 = (_Nbt_WriteUInt8($72,28657,$74)|0); $76 = ((($75)) + 1|0); HEAP8[$75>>0] = 0; $77 = (_Nbt_WriteDict($76,41926)|0); $78 = HEAP32[(1972188)>>2]|0; $79 = (_Cw_WriteColor($77,28810,$78)|0); $80 = HEAP32[(1972196)>>2]|0; $81 = (_Cw_WriteColor($79,28814,$80)|0); $82 = HEAP32[(1972192)>>2]|0; $83 = (_Cw_WriteColor($81,40775,$82)|0); $84 = HEAP32[(1972220)>>2]|0; $85 = (_Cw_WriteColor($83,28829,$84)|0); $86 = HEAP32[(1972204)>>2]|0; $87 = (_Cw_WriteColor($85,28820,$86)|0); $88 = HEAP32[(1972200)>>2]|0; $89 = (_Cw_WriteColor($87,28837,$88)|0); $90 = ((($89)) + 1|0); HEAP8[$89>>0] = 0; $91 = (_Nbt_WriteDict($90,41702)|0); $92 = HEAP16[(1972146)>>1]|0; $93 = $92&255; $94 = (_Nbt_WriteUInt8($91,28669,$93)|0); $95 = HEAP16[986072]|0; $96 = $95&255; $97 = (_Nbt_WriteUInt8($94,28679,$96)|0); $98 = HEAP32[(1972148)>>2]|0; $99 = $98&65535; $100 = (_Nbt_WriteUInt16($97,28689,$99)|0); $101 = (_Nbt_WriteString($100,28699,21776)|0); $102 = ((($101)) + 1|0); HEAP8[$101>>0] = 0; $103 = (_Nbt_WriteDict($102,42018)|0); $104 = HEAP16[986072]|0; $105 = (_Nbt_WriteUInt16($103,28679,$104)|0); $106 = HEAP16[(1972146)>>1]|0; $107 = (_Nbt_WriteUInt16($105,28669,$106)|0); $108 = HEAP32[(1972148)>>2]|0; $109 = (_Nbt_WriteInt32($107,28710,$108)|0); $110 = HEAP32[(1972152)>>2]|0; $111 = (_Nbt_WriteInt32($109,28721,$110)|0); $112 = HEAP32[(1972156)>>2]|0; $113 = (_Nbt_WriteInt32($111,28733,$112)|0); $114 = +HEAPF32[(1972160)>>2]; $115 = (_Nbt_WriteFloat($113,28746,$114)|0); $116 = +HEAPF32[(1972164)>>2]; $117 = (_Nbt_WriteFloat($115,28758,$116)|0); $118 = +HEAPF32[(1972168)>>2]; $119 = (_Nbt_WriteFloat($117,28771,$118)|0); $120 = HEAP32[(1972176)>>2]|0; $121 = $120&255; $122 = (_Nbt_WriteUInt8($119,28783,$121)|0); $123 = +HEAPF32[(1972180)>>2]; $124 = (_Nbt_WriteFloat($122,28790,$123)|0); $125 = +HEAPF32[(1972184)>>2]; $126 = (_Nbt_WriteFloat($124,28800,$125)|0); $127 = ((($126)) + 1|0); HEAP8[$126>>0] = 0; $128 = (_Nbt_WriteDict($127,41862)|0); $129 = $128; $130 = (($129) - ($43))|0; $131 = (_Stream_Write($0,$1,$130)|0); $132 = ($131|0)==(0); if (!($132)) { $$088 = $131; STACKTOP = sp;return ($$088|0); } $$089 = 767; while(1) { $133 = $$089&65535; $134 = (_Block_IsCustomDefined($133)|0); $135 = ($134<<24>>24)==(0); if (!($135)) { $136 = (_Cw_WriteBockDef($0,$$089)|0); $137 = ($136|0)==(0); if (!($137)) { $$088 = $136; label = 12; break; } } $138 = (($$089) + -1)|0; $139 = ($$089>>>0)>(1); if ($139) { $$089 = $138; } else { break; } } if ((label|0) == 12) { STACKTOP = sp;return ($$088|0); } $140 = (_Stream_Write($0,1972831,4)|0); $$088 = $140; STACKTOP = sp;return ($$088|0); } function _Nbt_WriteDict($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 1|0); HEAP8[$0>>0] = 10; $3 = (_Nbt_WriteConst($2,$1)|0); return ($3|0); } function _Nbt_WriteUInt8($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 1|0); HEAP8[$0>>0] = 1; $4 = (_Nbt_WriteConst($3,$1)|0); HEAP8[$4>>0] = $2; $5 = ((($4)) + 1|0); return ($5|0); } function _Nbt_WriteArray($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 1|0); HEAP8[$0>>0] = 7; $4 = (_Nbt_WriteConst($3,$1)|0); _Stream_SetU32_BE($4,$2); $5 = ((($4)) + 4|0); return ($5|0); } function _Nbt_WriteUInt16($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 1|0); HEAP8[$0>>0] = 2; $4 = (_Nbt_WriteConst($3,$1)|0); _Stream_SetU16_BE($4,$2); $5 = ((($4)) + 2|0); return ($5|0); } function _Nbt_WriteInt32($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 1|0); HEAP8[$0>>0] = 3; $4 = (_Nbt_WriteConst($3,$1)|0); _Stream_SetU32_BE($4,$2); $5 = ((($4)) + 4|0); return ($5|0); } function _Cw_WriteColor($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_Nbt_WriteDict($0,$1)|0); $4 = $2&65535; $5 = $4 & 255; $6 = (_Nbt_WriteUInt16($3,32278,$5)|0); $7 = (8)?($2 >>> 8):($2); $8 = $7&65535; $9 = $8 & 255; $10 = (_Nbt_WriteUInt16($6,32256,$9)|0); $11 = (16)?($2 >>> 16):($2); $12 = $11&65535; $13 = $12 & 255; $14 = (_Nbt_WriteUInt16($10,32246,$13)|0); $15 = ((($14)) + 1|0); HEAP8[$14>>0] = 0; return ($15|0); } function _Nbt_WriteString($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$018$lcssa = 0, $$01819 = 0, $$020 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 1|0); HEAP8[$0>>0] = 8; $4 = (_Nbt_WriteConst($3,$1)|0); $5 = ((($4)) + 2|0); $6 = ((($2)) + 4|0); $7 = HEAP16[$6>>1]|0; $8 = ($7<<16>>16)==(0); if ($8) { $$018$lcssa = $5; } else { $$01819 = $5;$$020 = 0; while(1) { $9 = HEAP32[$2>>2]|0; $10 = (($9) + ($$020)|0); $11 = HEAP8[$10>>0]|0; $12 = (_Convert_CP437ToUtf8($11,$$01819)|0); $13 = (($$01819) + ($12)|0); $14 = (($$020) + 1)|0; $15 = HEAP16[$6>>1]|0; $16 = $15&65535; $17 = ($14>>>0)<($16>>>0); if ($17) { $$01819 = $13;$$020 = $14; } else { $$018$lcssa = $13; break; } } } $18 = $$018$lcssa; $19 = $4; $20 = (65534 - ($19))|0; $21 = (($20) + ($18))|0; $22 = $21&65535; _Stream_SetU16_BE($4,$22); return ($$018$lcssa|0); } function _Nbt_WriteFloat($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = +$2; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 1|0); HEAP8[$0>>0] = 5; $4 = (_Nbt_WriteConst($3,$1)|0); $5 = (HEAPF32[tempDoublePtr>>2]=$2,HEAP32[tempDoublePtr>>2]|0); _Stream_SetU32_BE($4,$5); $6 = ((($4)) + 4|0); return ($6|0); } function _Cw_WriteBockDef($0,$1) { $0 = $0|0; $1 = $1|0; var $$sink102 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$06$0$$sroa_idx = 0, $$sroa$06$0$copyload = 0.0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$48$0$$sroa_idx9 = 0, $$sroa$48$0$copyload = 0.0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$5$0$copyload = 0.0, $$sroa$511$0$$sroa_idx12 = 0, $$sroa$511$0$copyload = 0.0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0, $103 = 0, $104 = 0, $105 = 0; var $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0.0, $118 = 0, $119 = 0.0, $12 = 0, $120 = 0, $121 = 0, $122 = 0.0, $123 = 0; var $124 = 0, $125 = 0.0, $126 = 0, $127 = 0, $128 = 0.0, $129 = 0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0; var $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0.0, $91 = 0.0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0; var $98 = 0, $99 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 1056|0; $2 = sp; $3 = sp + 1040|0; $4 = sp + 1032|0; $5 = sp + 1024|0; $6 = (1120788 + ($1)|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(5); HEAP32[$4>>2] = $3; $9 = ((($4)) + 4|0); HEAP16[$9>>1] = 0; $10 = ((($4)) + 6|0); HEAP16[$10>>1] = 9; _String_AppendConst($4,28844); $11 = (8)?($1 >>> 8):($1); $12 = $11&255; _String_AppendHex($4,$12); $13 = $1&255; _String_AppendHex($4,$13); $14 = ((($3)) + 9|0); HEAP8[$14>>0] = 0; $15 = (_Nbt_WriteDict($2,$3)|0); $16 = (_Nbt_WriteUInt8($15,28556,$13)|0); $17 = $1&65535; $18 = (_Nbt_WriteUInt16($16,28559,$17)|0); $19 = (1115412 + ($1)|0); $20 = HEAP8[$19>>0]|0; $21 = (_Nbt_WriteUInt8($18,28563,$20)|0); $22 = (1116948 + ($1<<2)|0); $23 = +HEAPF32[$22>>2]; $24 = (_Nbt_WriteFloat($21,43202,$23)|0); $25 = (_Nbt_WriteArray($24,28622,12)|0); $26 = ($1*6)|0; $27 = (($26) + 5)|0; $28 = (1162260 + ($27<<1)|0); $29 = HEAP16[$28>>1]|0; $30 = $29&255; HEAP8[$25>>0] = $30; $31 = (8)?(($29&65535) >>> 8):(($29&65535)); $32 = $31&255; $33 = ((($25)) + 6|0); HEAP8[$33>>0] = $32; $34 = (($26) + 4)|0; $35 = (1162260 + ($34<<1)|0); $36 = HEAP16[$35>>1]|0; $37 = $36&255; $38 = ((($25)) + 1|0); HEAP8[$38>>0] = $37; $39 = (8)?(($36&65535) >>> 8):(($36&65535)); $40 = $39&255; $41 = ((($25)) + 7|0); HEAP8[$41>>0] = $40; $42 = (1162260 + ($26<<1)|0); $43 = HEAP16[$42>>1]|0; $44 = $43&255; $45 = ((($25)) + 2|0); HEAP8[$45>>0] = $44; $46 = (8)?(($43&65535) >>> 8):(($43&65535)); $47 = $46&255; $48 = ((($25)) + 8|0); HEAP8[$48>>0] = $47; $49 = $26 | 1; $50 = (1162260 + ($49<<1)|0); $51 = HEAP16[$50>>1]|0; $52 = $51&255; $53 = ((($25)) + 3|0); HEAP8[$53>>0] = $52; $54 = (8)?(($51&65535) >>> 8):(($51&65535)); $55 = $54&255; $56 = ((($25)) + 9|0); HEAP8[$56>>0] = $55; $57 = (($26) + 2)|0; $58 = (1162260 + ($57<<1)|0); $59 = HEAP16[$58>>1]|0; $60 = $59&255; $61 = ((($25)) + 4|0); HEAP8[$61>>0] = $60; $62 = (8)?(($59&65535) >>> 8):(($59&65535)); $63 = $62&255; $64 = ((($25)) + 10|0); HEAP8[$64>>0] = $63; $65 = (($26) + 3)|0; $66 = (1162260 + ($65<<1)|0); $67 = HEAP16[$66>>1]|0; $68 = $67&255; $69 = ((($25)) + 5|0); HEAP8[$69>>0] = $68; $70 = (8)?(($67&65535) >>> 8):(($67&65535)); $71 = $70&255; $72 = ((($25)) + 11|0); HEAP8[$72>>0] = $71; $73 = ((($25)) + 12|0); $74 = (1107732 + ($1)|0); $75 = HEAP8[$74>>0]|0; $76 = ($75<<24>>24)==(0); $77 = $76&1; $78 = (_Nbt_WriteUInt8($73,28575,$77)|0); $79 = (1121556 + ($1)|0); $80 = HEAP8[$79>>0]|0; $81 = (_Nbt_WriteUInt8($78,28631,$80)|0); $82 = (1108500 + ($1)|0); $83 = HEAP8[$82>>0]|0; $84 = ($83<<24>>24)!=(0); $85 = $84&1; $86 = (_Nbt_WriteUInt8($81,28590,$85)|0); if ($8) { $87 = (_Nbt_WriteUInt8($86,28611,0)|0); $88 = (1124628 + ($1)|0); $$sink102 = $88;$95 = $87; } else { $89 = (((1134612 + (($1*12)|0)|0)) + 4|0); $90 = +HEAPF32[$89>>2]; $91 = $90 * 16.0; $92 = (~~(($91))&255); $93 = (_Nbt_WriteUInt8($86,28611,$92)|0); $$sink102 = $6;$95 = $93; } $94 = HEAP8[$$sink102>>0]|0; $96 = (_Nbt_WriteUInt8($95,28601,$94)|0); $97 = (_Nbt_WriteArray($96,40775,4)|0); $98 = (1112340 + ($1<<2)|0); $99 = +HEAPF32[$98>>2]; $100 = $99 * 128.0; $101 = $100 + -1.0; $102 = (~~(($101))&255); $103 = (1109268 + ($1<<2)|0); $104 = HEAP32[$103>>2]|0; $105 = $99 != 0.0; $106 = $105 ? $102 : 0; HEAP8[$97>>0] = $106; $107 = $104&255; $108 = ((($97)) + 1|0); HEAP8[$108>>0] = $107; $109 = (8)?($104 >>> 8):($104); $110 = $109&255; $111 = ((($97)) + 2|0); HEAP8[$111>>0] = $110; $112 = (16)?($104 >>> 16):($104); $113 = $112&255; $114 = ((($97)) + 3|0); HEAP8[$114>>0] = $113; $115 = ((($97)) + 4|0); $116 = (_Nbt_WriteArray($115,28641,6)|0); $$sroa$06$0$$sroa_idx = (1125396 + (($1*12)|0)|0); $$sroa$06$0$copyload = +HEAPF32[$$sroa$06$0$$sroa_idx>>2]; $$sroa$48$0$$sroa_idx9 = (((1125396 + (($1*12)|0)|0)) + 4|0); $$sroa$48$0$copyload = +HEAPF32[$$sroa$48$0$$sroa_idx9>>2]; $$sroa$511$0$$sroa_idx12 = (((1125396 + (($1*12)|0)|0)) + 8|0); $$sroa$511$0$copyload = +HEAPF32[$$sroa$511$0$$sroa_idx12>>2]; $$sroa$0$0$$sroa_idx = (1134612 + (($1*12)|0)|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$4$0$$sroa_idx2 = (((1134612 + (($1*12)|0)|0)) + 4|0); $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx2>>2]; $$sroa$5$0$$sroa_idx4 = (((1134612 + (($1*12)|0)|0)) + 8|0); $$sroa$5$0$copyload = +HEAPF32[$$sroa$5$0$$sroa_idx4>>2]; $117 = $$sroa$06$0$copyload * 16.0; $118 = (~~(($117))&255); HEAP8[$116>>0] = $118; $119 = $$sroa$48$0$copyload * 16.0; $120 = (~~(($119))&255); $121 = ((($116)) + 1|0); HEAP8[$121>>0] = $120; $122 = $$sroa$511$0$copyload * 16.0; $123 = (~~(($122))&255); $124 = ((($116)) + 2|0); HEAP8[$124>>0] = $123; $125 = $$sroa$0$0$copyload * 16.0; $126 = (~~(($125))&255); $127 = ((($116)) + 3|0); HEAP8[$127>>0] = $126; $128 = $$sroa$4$0$copyload * 16.0; $129 = (~~(($128))&255); $130 = ((($116)) + 4|0); HEAP8[$130>>0] = $129; $131 = $$sroa$5$0$copyload * 16.0; $132 = (~~(($131))&255); $133 = ((($116)) + 5|0); HEAP8[$133>>0] = $132; $134 = ((($116)) + 6|0); _Block_UNSAFE_GetName($5,$17); $135 = $5; $136 = $135; $137 = HEAP32[$136>>2]|0; $138 = (($135) + 4)|0; $139 = $138; $140 = HEAP32[$139>>2]|0; $141 = $4; $142 = $141; HEAP32[$142>>2] = $137; $143 = (($141) + 4)|0; $144 = $143; HEAP32[$144>>2] = $140; $145 = (_Nbt_WriteString($134,28617,$4)|0); $146 = ((($145)) + 1|0); HEAP8[$145>>0] = 0; $147 = $146; $148 = $2; $149 = (($147) - ($148))|0; $150 = (_Stream_Write($0,$2,$149)|0); STACKTOP = sp;return ($150|0); } function _Nbt_WriteConst($0,$1) { $0 = $0|0; $1 = $1|0; var $$0$lcssa = 0, $$01314 = 0, $$015 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $scevgep = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_String_Length($1)|0); $3 = ((($0)) + 1|0); HEAP8[$0>>0] = 0; $4 = $2&255; $5 = ((($0)) + 2|0); HEAP8[$3>>0] = $4; $6 = ($2|0)>(0); if (!($6)) { $$0$lcssa = $5; return ($$0$lcssa|0); } $7 = (($2) + 2)|0; $$01314 = 0;$$015 = $5; while(1) { $8 = (($1) + ($$01314)|0); $9 = HEAP8[$8>>0]|0; $10 = ((($$015)) + 1|0); HEAP8[$$015>>0] = $9; $11 = (($$01314) + 1)|0; $exitcond = ($11|0)==($2|0); if ($exitcond) { break; } else { $$01314 = $11;$$015 = $10; } } $scevgep = (($0) + ($7)|0); $$0$lcssa = $scevgep; return ($$0$lcssa|0); } function _Schematic_Save($0) { $0 = $0|0; var $$02223 = 0, $$2 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 8448|0; $1 = sp + 8192|0; $2 = sp; _memset(($2|0),0,8192)|0; _Mem_Copy($1,3696,78); $3 = ((($1)) + 41|0); $4 = HEAP32[(1103564)>>2]|0; $5 = $4&65535; _Stream_SetU16_BE($3,$5); $6 = ((($1)) + 52|0); $7 = HEAP32[(1103568)>>2]|0; $8 = $7&65535; _Stream_SetU16_BE($6,$8); $9 = ((($1)) + 63|0); $10 = HEAP32[(1103572)>>2]|0; $11 = $10&65535; _Stream_SetU16_BE($9,$11); $12 = ((($1)) + 74|0); $13 = HEAP32[(1103560)>>2]|0; _Stream_SetU32_BE($12,$13); $14 = (_Stream_Write($0,$1,78)|0); $15 = ($14|0)==(0); if (!($15)) { $$2 = $14; STACKTOP = sp;return ($$2|0); } $16 = HEAP32[275888]|0; $17 = HEAP32[(1103560)>>2]|0; $18 = (_Stream_Write($0,$16,$17)|0); $19 = ($18|0)==(0); if (!($19)) { $$2 = $18; STACKTOP = sp;return ($$2|0); } _Mem_Copy($1,29037,11); $20 = ((($1)) + 7|0); $21 = HEAP32[(1103560)>>2]|0; _Stream_SetU32_BE($20,$21); $22 = (_Stream_Write($0,$1,11)|0); $23 = ($22|0)==(0); if (!($23)) { $$2 = $22; STACKTOP = sp;return ($$2|0); } $24 = HEAP32[(1103560)>>2]|0; $25 = ($24|0)>(0); L10: do { if ($25) { $$02223 = 0;$30 = $24; while(1) { $29 = (($30) - ($$02223))|0; $31 = ($29>>>0)<(8192); $32 = $31 ? $29 : 8192; $33 = (_Stream_Write($0,$2,$32)|0); $34 = ($33|0)==(0); $28 = (($$02223) + 8192)|0; if (!($34)) { $$2 = $33; break; } $26 = HEAP32[(1103560)>>2]|0; $27 = ($26|0)>($28|0); if ($27) { $$02223 = $28;$30 = $26; } else { break L10; } } STACKTOP = sp;return ($$2|0); } } while(0); $35 = (_Stream_Write($0,3776,37)|0); $$2 = $35; STACKTOP = sp;return ($$2|0); } function _Dat_Save($0) { $0 = $0|0; var $$0 = 0, $$02627 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = (_Stream_Write($0,29048,9)|0); $3 = ($2|0)==(0); L1: do { if ($3) { $4 = (_WriteClassDesc($0,115,29057,7,3824)|0); $5 = ($4|0)==(0); if ($5) { $$02627 = 0; while(1) { $6 = ($$02627|0)==(6); if ($6) { $18 = (_WriteClassDesc($0,117,29090,0,0)|0); $19 = ($18|0)==(0); if (!($19)) { $$0 = $18; break L1; } $20 = HEAP32[(1103560)>>2]|0; _Stream_SetU32_BE($1,$20); $21 = (_Stream_Write($0,$1,4)|0); $22 = ($21|0)==(0); if (!($22)) { $$0 = $21; break L1; } $23 = (_WriteLevelBlocks($0)|0); $24 = ($23|0)==(0); if (!($24)) { $$0 = $23; break L1; } } else { $7 = (($$02627) + -3)|0; $8 = ($7>>>0)<(3); $9 = (((3824 + (($$02627*12)|0)|0)) + 8|0); $10 = HEAP32[$9>>2]|0; if ($8) { $11 = +HEAPF32[$10>>2]; $15 = $11; } else { $12 = HEAP32[$10>>2]|0; $13 = (+($12|0)); $15 = $13; } $14 = (~~(($15))); _Stream_SetU32_BE($1,$14); $16 = (_Stream_Write($0,$1,4)|0); $17 = ($16|0)==(0); if (!($17)) { $$0 = $16; break L1; } } $25 = (($$02627) + 1)|0; $26 = ($25>>>0)<(7); if ($26) { $$02627 = $25; } else { $$0 = 0; break; } } } else { $$0 = $4; } } else { $$0 = $2; } } while(0); STACKTOP = sp;return ($$0|0); } function _WriteClassDesc($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$0 = 0, $$03133 = 0, $$032 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 256|0; $5 = sp; _memset(($5|0),0,256)|0; HEAP8[$5>>0] = $1; $6 = ((($5)) + 1|0); HEAP8[$6>>0] = 114; $7 = ((($5)) + 2|0); $8 = (_WriteJavaString($7,$2)|0); $9 = (($8) + 12)|0; $10 = (($5) + ($9)|0); HEAP8[$10>>0] = 2; $11 = (($8) + 13)|0; $12 = (($5) + ($11)|0); HEAP8[$12>>0] = 0; $13 = $3&255; $14 = (($8) + 14)|0; $15 = (($5) + ($14)|0); HEAP8[$15>>0] = $13; $16 = (($8) + 15)|0; $17 = (_Stream_Write($0,$5,$16)|0); $18 = ($17|0)==(0); if (!($18)) { $$032 = $17; STACKTOP = sp;return ($$032|0); } $19 = ($3|0)>(0); L4: do { if ($19) { $$03133 = 0; while(1) { $22 = (($4) + (($$03133*12)|0)|0); $23 = HEAP8[$22>>0]|0; HEAP8[$5>>0] = $23; $24 = (((($4) + (($$03133*12)|0)|0)) + 4|0); $25 = HEAP32[$24>>2]|0; $26 = (_WriteJavaString($6,$25)|0); $27 = HEAP8[$22>>0]|0; $28 = ($27<<24>>24)==(91); if ($28) { $29 = (($26) + 5)|0; $30 = (($26) + 4)|0; $31 = (($5) + ($30)|0); $32 = (($26) + 3)|0; $33 = (($5) + ($32)|0); HEAP8[$33>>0] = 116; (_WriteJavaString($31,29090)|0); $$0 = $29; } else { $$0 = $26; } $34 = (($$0) + 3)|0; $35 = (_Stream_Write($0,$5,$34)|0); $36 = ($35|0)==(0); $20 = (($$03133) + 1)|0; if (!($36)) { $$032 = $35; break; } $21 = ($20|0)<($3|0); if ($21) { $$03133 = $20; } else { break L4; } } STACKTOP = sp;return ($$032|0); } } while(0); $37 = (_Stream_Write($0,29093,2)|0); $$032 = $37; STACKTOP = sp;return ($$032|0); } function _WriteLevelBlocks($0) { $0 = $0|0; var $$0$off0 = 0, $$023 = 0, $$02429 = 0, $$02528 = 0, $$1 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $extract$t26 = 0, $spec$store$select = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 65536|0; $1 = sp; $2 = HEAP32[(1103560)>>2]|0; $3 = ($2|0)>(0); if (!($3)) { $$023 = 0; STACKTOP = sp;return ($$023|0); } $$02429 = 0;$$02528 = 0; while(1) { $4 = HEAP32[275888]|0; $5 = (($4) + ($$02528)|0); $6 = HEAP8[$5>>0]|0; $7 = $6&255; $8 = HEAP32[(1103556)>>2]|0; $9 = (($8) + ($$02528)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = $11 << 8; $13 = $12 | $7; $14 = HEAP32[(1103608)>>2]|0; $15 = $13 & $14; $16 = $15&65535; $17 = ($15>>>0)>(65); $spec$store$select = $17 ? 1 : $16; $18 = ($spec$store$select&65535)>(49); $extract$t26 = $spec$store$select&255; if ($18) { $19 = $spec$store$select&65535; $20 = (($19) + -50)|0; $21 = (3920 + ($20)|0); $22 = HEAP8[$21>>0]|0; $$0$off0 = $22; } else { $$0$off0 = $extract$t26; } $23 = (($1) + ($$02429)|0); HEAP8[$23>>0] = $$0$off0; $24 = (($$02429) + 1)|0; $25 = ($$02429|0)<(65535); if ($25) { $$1 = $24; } else { $26 = (_Stream_Write($0,$1,65536)|0); $27 = ($26|0)==(0); if ($27) { $$1 = 0; } else { $$023 = $26; label = 10; break; } } $28 = (($$02528) + 1)|0; $29 = HEAP32[(1103560)>>2]|0; $30 = ($28|0)<($29|0); if ($30) { $$02429 = $$1;$$02528 = $28; } else { break; } } if ((label|0) == 10) { STACKTOP = sp;return ($$023|0); } $31 = ($$1|0)==(0); if ($31) { $$023 = 0; STACKTOP = sp;return ($$023|0); } $32 = (_Stream_Write($0,$1,$$1)|0); $$023 = $32; STACKTOP = sp;return ($$023|0); } function _WriteJavaString($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_String_Length($1)|0); HEAP8[$0>>0] = 0; $3 = $2&255; $4 = ((($0)) + 1|0); HEAP8[$4>>0] = $3; $5 = ((($0)) + 2|0); _Mem_Copy($5,$1,$2); return ($2|0); } function _Game_AddComponent($0) { $0 = $0|0; var $$sink = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[450766]|0; $2 = ($1|0)==(0|0); $3 = HEAP32[450767]|0; $4 = ((($3)) + 20|0); $$sink = $2 ? 1803064 : $4; HEAP32[$$sink>>2] = $0; HEAP32[450767] = $0; $5 = ((($0)) + 20|0); HEAP32[$5>>2] = 0; return; } function _ScheduledTask_Add($0,$1) { $0 = +$0; $1 = $1|0; var $$sroa$0$0$$sroa_idx = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[450768]|0; $3 = HEAP32[3589]|0; $4 = ($2|0)==($3|0); if ($4) { _Utils_Resize(14360,14356,24,6,6); } $5 = HEAP32[3590]|0; $6 = HEAP32[450768]|0; $7 = (($6) + 1)|0; HEAP32[450768] = $7; $$sroa$0$0$$sroa_idx = (($5) + (($6*24)|0)|0); HEAPF64[$$sroa$0$0$$sroa_idx>>3] = 0.0; $$sroa$4$0$$sroa_idx2 = (((($5) + (($6*24)|0)|0)) + 8|0); HEAPF64[$$sroa$4$0$$sroa_idx2>>3] = $0; $$sroa$5$0$$sroa_idx4 = (((($5) + (($6*24)|0)|0)) + 16|0); HEAP32[$$sroa$5$0$$sroa_idx4>>2] = $1; return ($6|0); } function _Game_ToggleFullscreen() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_Window_GetWindowState()|0); $1 = ($0|0)==(1); if ($1) { $2 = (_Window_ExitFullscreen()|0); $3 = ($2|0)==(0); if ($3) { return; } _Logger_SysWarn($2,29162); return; } else { $4 = (_Window_EnterFullscreen()|0); $5 = ($4|0)==(0); if ($5) { return; } _Logger_SysWarn($4,29181); return; } } function _Game_CycleViewDistance() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1803522)>>0]|0; $1 = ($0<<24>>24)!=(0); $2 = $1 ? 22920 : 3968; $3 = $1 ? 4 : 10; $4 = HEAP8[(390404)>>0]|0; $5 = HEAP8[(390405)>>0]|0; $6 = $5 | $4; $7 = ($6<<24>>24)==(0); if ($7) { _CycleViewDistanceForwards($2,$3); return; } else { _CycleViewDistanceBackwards($2,$3); return; } } function _CycleViewDistanceBackwards($0,$1) { $0 = $0|0; $1 = $1|0; var $$010 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (($1) + -1)|0; $3 = ($1|0)>(0); L1: do { if ($3) { $4 = HEAP32[3583]|0; $$010 = $2; while(1) { $7 = (($0) + ($$010<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = $8 << 16 >> 16; $10 = ($4|0)>($9|0); if ($10) { break; } $5 = (($$010) + -1)|0; $6 = ($$010|0)>(0); if ($6) { $$010 = $5; } else { break L1; } } $11 = $8 << 16 >> 16; _Game_UserSetViewDistance($11); return; } } while(0); $12 = (($0) + ($2<<1)|0); $13 = HEAP16[$12>>1]|0; $14 = $13 << 16 >> 16; _Game_UserSetViewDistance($14); return; } function _CycleViewDistanceForwards($0,$1) { $0 = $0|0; $1 = $1|0; var $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)>(0); L1: do { if ($2) { $3 = HEAP32[3583]|0; $$09 = 0; while(1) { $6 = (($0) + ($$09<<1)|0); $7 = HEAP16[$6>>1]|0; $8 = $7 << 16 >> 16; $9 = ($3|0)<($8|0); $4 = (($$09) + 1)|0; if ($9) { break; } $5 = ($4|0)<($1|0); if ($5) { $$09 = $4; } else { break L1; } } $10 = $7 << 16 >> 16; _Game_UserSetViewDistance($10); return; } } while(0); $11 = HEAP16[$0>>1]|0; $12 = $11 << 16 >> 16; _Game_UserSetViewDistance($12); return; } function _Game_UserSetViewDistance($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; HEAP32[3583] = $0; _Options_SetInt(29198,$0); _Game_SetViewDistance($0); return; } function _Game_SetViewDistance($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[3584]|0; $2 = ($1|0)>($0|0); $3 = $2 ? $0 : $1; $4 = HEAP32[3582]|0; $5 = ($3|0)==($4|0); if ($5) { return; } HEAP32[3582] = $3; _Event_RaiseVoid(1792748); _Camera_UpdateProjection(); return; } function _Game_Disconnect($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Event_RaiseVoid((1802368)); _Game_Reset(); _DisconnectScreen_Show($0,$1); return; } function _Game_Reset() { var $$0 = 0, $$05 = 0, $$06 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; _World_NewMap(); $$05 = HEAP32[450766]|0; $0 = ($$05|0)==(0|0); if ($0) { return; } $$06 = $$05; while(1) { $1 = ((($$06)) + 8|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)==(0|0); if (!($3)) { FUNCTION_TABLE_v[$2 & 127](); } $4 = ((($$06)) + 20|0); $$0 = HEAP32[$4>>2]|0; $5 = ($$0|0)==(0|0); if ($5) { break; } else { $$06 = $$0; } } return; } function _Game_UpdateBlock($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_World_GetBlock_615($0,$1,$2)|0); _World_SetBlock($0,$1,$2,$3); $5 = HEAP32[447647]|0; $6 = ($5|0)==(0|0); if (!($6)) { _EnvRenderer_OnBlockChanged($0,$1,$2,$4,$3); } _ClassicLighting_OnBlockChanged($0,$1,$2,$4,$3); _MapRenderer_OnBlockChanged($0,$1,$2,$3); return; } function _World_GetBlock_615($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $3 = HEAP32[(1103572)>>2]|0; $4 = Math_imul($3, $1)|0; $5 = (($4) + ($2))|0; $6 = HEAP32[(1103564)>>2]|0; $7 = Math_imul($5, $6)|0; $8 = (($7) + ($0))|0; $9 = HEAP32[275888]|0; $10 = (($9) + ($8)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = HEAP32[(1103556)>>2]|0; $14 = (($13) + ($8)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 8; $18 = $17 | $12; $19 = HEAP32[(1103608)>>2]|0; $20 = $18 & $19; $21 = $20&65535; return ($21|0); } function _Game_ChangeBlock($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_World_GetBlock_615($0,$1,$2)|0); _Game_UpdateBlock($0,$1,$2,$3); $5 = HEAP32[(1949196)>>2]|0; FUNCTION_TABLE_viiiii[$5 & 3]($0,$1,$2,$4,$3); return; } function _Game_CanPick($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1120788 + ($1)|0); $3 = HEAP8[$2>>0]|0; switch ($3<<24>>24) { case 5: { $$0 = 1; return ($$0|0); } case 4: { $$0 = 0; return ($$0|0); } default: { $4 = (1115412 + ($1)|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)!=(1); $7 = HEAP8[1972835]|0; $8 = ($7<<24>>24)!=(0); $9 = $6 | $8; $10 = $9&1; $$0 = $10; return ($$0|0); } } } function _Game_UpdateTexture($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp; $5 = (_Png_Decode($4,$1)|0); $6 = ($5|0)==(0); if ($6) { $7 = (_Game_ValidateBitmap($2,$4)|0); $8 = ($7<<24>>24)==(0); if ($8) { $12 = 0; } else { $9 = ($3|0)==(0|0); if (!($9)) { $10 = (_Utils_CalcSkinType($4)|0); HEAP8[$3>>0] = $10; } _Gfx_RecreateTexture($0,$4,1,0); $12 = 1; } } else { _Logger_SysWarn2($5,44275,$2); $12 = 0; } $11 = HEAP32[$4>>2]|0; _Mem_Free($11); STACKTOP = sp;return ($12|0); } function _Game_ValidateBitmap($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 4|0; $3 = sp; $4 = HEAP32[450779]|0; HEAP32[$2>>2] = $4; $5 = HEAP32[(1803120)>>2]|0; HEAP32[$3>>2] = $5; $6 = HEAP32[$1>>2]|0; $7 = ($6|0)==(0|0); if ($7) { _Chat_Add1(29207,$0); $$0 = 0; STACKTOP = sp;return ($$0|0); } $8 = ((($1)) + 4|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)>($4|0); if (!($10)) { $11 = ((($1)) + 8|0); $12 = HEAP32[$11>>2]|0; $13 = ($12|0)>($5|0); if (!($13)) { $15 = (_Math_IsPowOf2($9)|0); $16 = ($15<<24>>24)==(0); if (!($16)) { $17 = HEAP32[$11>>2]|0; $18 = (_Math_IsPowOf2($17)|0); $19 = ($18<<24>>24)==(0); if (!($19)) { $$0 = 1; STACKTOP = sp;return ($$0|0); } } _Chat_Add1(29249,$0); _Chat_Add2(29350,$8,$11); $$0 = 0; STACKTOP = sp;return ($$0|0); } } _Chat_Add1(29249,$0); $14 = ((($1)) + 8|0); _Chat_Add4(29291,$8,$14,$2,$3); $$0 = 0; STACKTOP = sp;return ($$0|0); } function _Game_UpdateDimensions() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1972116)>>2]|0; $1 = ($0|0)>(1); $2 = $1 ? $0 : 1; HEAP32[271246] = $2; $3 = HEAP32[(1972120)>>2]|0; $4 = ($3|0)>(1); $5 = $4 ? $3 : 1; HEAP32[(1084988)>>2] = $5; return; } function _Game_SetFpsLimit($0) { $0 = $0|0; var $$0 = 0.0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[450728] = $0; switch ($0|0) { case 4: { $$0 = 6.9444446563720703; break; } case 3: { $$0 = 8.3333330154418945; break; } case 2: { $$0 = 16.666666030883789; break; } case 1: { $$0 = 33.333332061767578; break; } default: { $$0 = 0.0; } } $1 = ($0|0)==(0); $2 = $1&1; _Gfx_SetFpsLimit($2,$$0); return; } function _Game_TakeScreenshot() { var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 720|0; $0 = sp + 704|0; $1 = sp + 608|0; $2 = sp + 672|0; $3 = sp; HEAP8[1972836] = 0; _DateTime_CurrentLocal($2); HEAP32[$0>>2] = $1; $4 = ((($0)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($0)) + 6|0); HEAP16[$5>>1] = 64; $6 = ((($2)) + 4|0); $7 = ((($2)) + 8|0); _String_Format3($0,29408,$2,$6,$7); $8 = ((($2)) + 12|0); $9 = ((($2)) + 16|0); $10 = ((($2)) + 20|0); _String_Format3($0,29431,$8,$9,$10); (_Platform_EncodeUtf8($3,$0)|0); _interop_TakeScreenshot(($3|0)); STACKTOP = sp;return; } function _Game_Free($0) { $0 = $0|0; var $$0 = 0, $$05 = 0, $$06 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[(1803130)>>0] = 0; _Event_UnregisterAll(); HEAP32[450768] = 0; $$05 = HEAP32[450766]|0; $1 = ($$05|0)==(0|0); if (!($1)) { $$06 = $$05; while(1) { $2 = ((($$06)) + 4|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0|0); if (!($4)) { FUNCTION_TABLE_v[$3 & 127](); } $5 = ((($$06)) + 20|0); $$0 = HEAP32[$5>>2]|0; $6 = ($$0|0)==(0|0); if ($6) { break; } else { $$06 = $$0; } } } HEAP32[3701] = 9; _Gfx_Free(); _Options_SaveIfChanged(); _Window_DisableRawMouse(); return; } function _Game_DoFrame() { var $$0 = 0.0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_Stopwatch_Measure()|0); $1 = (getTempRet0() | 0); _Window_ProcessEvents(); $2 = HEAP8[(1972124)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } $4 = 1085008; $5 = $4; $6 = HEAP32[$5>>2]|0; $7 = (($4) + 4)|0; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = (_Stopwatch_ElapsedMicroseconds($6,$9,$0,$1)|0); $11 = (getTempRet0() | 0); $12 = (+($10>>>0)) + (4294967296.0*(+($11>>>0))); $13 = $12 / 1.0E+6; $14 = $13 > 1.0; $$0 = $14 ? 1.0 : $13; $15 = $$0 > 0.0; if (!($15)) { return; } $16 = 1085008; $17 = $16; HEAP32[$17>>2] = $0; $18 = (($16) + 4)|0; $19 = $18; HEAP32[$19>>2] = $1; _Game_RenderFrame($$0); return; } function _Game_RenderFrame($0) { $0 = +$0; var $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$4$0$$sroa_idx8 = 0, $$sroa$4$0$copyload = 0.0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0; var $or$cond = 0, $or$cond3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = HEAP8[(1803128)>>0]|0; $3 = ($2<<24>>24)==(0); do { if (!($3)) { $4 = (_Gfx_TryRestoreContext()|0); $5 = ($4<<24>>24)==(0); if (!($5)) { _Gfx_RecreateContext(); break; } $6 = HEAP32[(1949192)>>2]|0; FUNCTION_TABLE_vi[$6 & 511](0); STACKTOP = sp;return; } } while(0); $7 = HEAP32[450819]|0; _Gfx_BindIb($7); $8 = +HEAPF64[(1084992)>>3]; $9 = $8 + $0; HEAPF64[(1084992)>>3] = $9; HEAP32[450761] = 0; $10 = HEAP32[(1771060)>>2]|0; $11 = ((($10)) + 20|0); $12 = HEAP32[$11>>2]|0; FUNCTION_TABLE_vd[$12 & 1]($0); $13 = HEAP8[(1972125)>>0]|0; $14 = ($13<<24>>24)!=(0); $15 = HEAP32[(1803572)>>2]|0; $16 = ($15|0)!=(0|0); $or$cond = $14 | $16; if (!($or$cond)) { _Gui_ShowPauseMenu(); } $17 = (_KeyBind_IsPressed(24)|0); $18 = ($17<<24>>24)==(0); $19 = HEAP32[(1803572)>>2]|0; $20 = ($19|0)!=(0|0); $or$cond3 = $18 | $20; if (!($or$cond3)) { $21 = HEAP32[(1771076)>>2]|0; (_InputHandler_SetFOV($21)|0); } _PerformScheduledTasks($0); $22 = HEAP32[3590]|0; $23 = HEAP32[450769]|0; $$sroa$0$0$$sroa_idx = (($22) + (($23*24)|0)|0); $$sroa$0$0$copyload = +HEAPF64[$$sroa$0$0$$sroa_idx>>3]; $$sroa$4$0$$sroa_idx8 = (((($22) + (($23*24)|0)|0)) + 8|0); $$sroa$4$0$copyload = +HEAPF64[$$sroa$4$0$$sroa_idx8>>3]; $24 = $$sroa$0$0$copyload / $$sroa$4$0$copyload; $25 = $24; _LocalPlayer_SetInterpPosition($25); $26 = HEAP32[(1771060)>>2]|0; $27 = ((($26)) + 16|0); $28 = HEAP32[$27>>2]|0; FUNCTION_TABLE_vid[$28 & 63]($1,$25); ;HEAP32[(1771048)>>2]=HEAP32[$1>>2]|0;HEAP32[(1771048)+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[(1771048)+8>>2]=HEAP32[$1+8>>2]|0; _EnvRenderer_UpdateFog(); _UpdateViewMatrix(); $29 = HEAP8[(1972127)>>0]|0; $30 = ($29<<24>>24)==(0); if (!($30)) { STACKTOP = sp;return; } _Gfx_Clear(); _Gfx_LoadMatrix(0,(1803196)); _Gfx_LoadMatrix(1,(1803132)); $31 = (_Gui_GetBlocksWorld()|0); $32 = ($31|0)==(0|0); if ($32) { _Game_Render3D($0,$25); } else { _RayTracer_SetInvalid(1802916); } $33 = HEAP32[271246]|0; $34 = HEAP32[(1084988)>>2]|0; _Gfx_Begin2D($33,$34); _Gui_RenderGui($0); _Gfx_End2D(); $35 = HEAP8[1972836]|0; $36 = ($35<<24>>24)==(0); if (!($36)) { _Game_TakeScreenshot(); } _Gfx_EndFrame(); STACKTOP = sp;return; } function _PerformScheduledTasks($0) { $0 = +$0; var $$013 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $1 = HEAP32[450768]|0; $2 = ($1|0)>(0); if (!($2)) { return; } $$013 = 0; while(1) { $3 = HEAP32[3590]|0; $4 = (($3) + (($$013*24)|0)|0); $5 = +HEAPF64[$4>>3]; $6 = $5 + $0; HEAPF64[$4>>3] = $6; $7 = (((($3) + (($$013*24)|0)|0)) + 8|0); $8 = +HEAPF64[$7>>3]; $9 = !($6 >= $8); if (!($9)) { $10 = (((($3) + (($$013*24)|0)|0)) + 16|0); while(1) { $11 = HEAP32[$10>>2]|0; FUNCTION_TABLE_vi[$11 & 511]($4); $12 = +HEAPF64[$7>>3]; $13 = +HEAPF64[$4>>3]; $14 = $13 - $12; HEAPF64[$4>>3] = $14; $15 = !($14 >= $12); if ($15) { break; } } } $16 = (($$013) + 1)|0; $17 = HEAP32[450768]|0; $18 = ($16|0)<($17|0); if ($18) { $$013 = $16; } else { break; } } return; } function _UpdateViewMatrix() { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1771060)>>2]|0; $1 = ((($0)) + 8|0); $2 = HEAP32[$1>>2]|0; FUNCTION_TABLE_vi[$2 & 511]((1803132)); _FrustumCulling_CalcFrustumEquations((1803196),(1803132)); return; } function _Game_Render3D($0,$1) { $0 = +$0; $1 = +$1; var $$sroa$0$0$copyload = 0.0, $$sroa$5$0$copyload = 0.0, $$sroa$6$0$copyload = 0.0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond16 = 0, $or$cond3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_EnvRenderer_ShouldRenderSkybox()|0); $3 = ($2<<24>>24)==(0); if (!($3)) { _EnvRenderer_RenderSkybox(); } _AxisLinesRenderer_Render(); _Entities_RenderModels($0,$1); _Entities_RenderNames(); _Particles_Render($1); $4 = HEAP32[(1771060)>>2]|0; $5 = ((($4)) + 36|0); $6 = HEAP32[$5>>2]|0; FUNCTION_TABLE_vi[$6 & 511](1802916); _EnvRenderer_RenderSky(); _EnvRenderer_RenderClouds(); _MapRenderer_Update($0); _MapRenderer_RenderNormal($0); _EnvRenderer_RenderMapSides(); _Entities_DrawShadows(); $7 = HEAP8[(1803040)>>0]|0; $8 = ($7<<24>>24)==(0); $9 = HEAP8[1972845]|0; $10 = ($9<<24>>24)!=(0); $or$cond = $8 | $10; if (!($or$cond)) { _PickedPosRenderer_Render(1802916,1); } $$sroa$0$0$copyload = +HEAPF32[(1771048)>>2]; $$sroa$5$0$copyload = +HEAPF32[(1771052)>>2]; $$sroa$6$0$copyload = +HEAPF32[(1771056)>>2]; $11 = HEAP32[(1972148)>>2]|0; $12 = (+($11|0)); $13 = $$sroa$5$0$copyload < $12; do { if ($13) { $14 = $$sroa$0$0$copyload < 0.0; $15 = $$sroa$6$0$copyload < 0.0; $or$cond16 = $14 | $15; if (!($or$cond16)) { $16 = HEAP32[(1103564)>>2]|0; $17 = (+($16|0)); $18 = $$sroa$0$0$copyload > $17; if (!($18)) { $19 = HEAP32[(1103572)>>2]|0; $20 = (+($19|0)); $21 = $$sroa$6$0$copyload > $20; if (!($21)) { label = 10; break; } } } _MapRenderer_RenderTranslucent($0); _EnvRenderer_RenderMapEdges(); } else { label = 10; } } while(0); if ((label|0) == 10) { _EnvRenderer_RenderMapEdges(); _MapRenderer_RenderTranslucent($0); } $22 = HEAP8[(1803040)>>0]|0; $23 = ($22<<24>>24)==(0); $24 = HEAP8[1972845]|0; $25 = ($24<<24>>24)!=(0); $or$cond3 = $23 | $25; if (!($or$cond3)) { $26 = HEAP16[(1802976)>>1]|0; $27 = $26&65535; $28 = (1120788 + ($27)|0); $29 = HEAP8[$28>>0]|0; $30 = ($29<<24>>24)==(3); if ($30) { _PickedPosRenderer_Render(1802916,0); } } _Selections_Render(); _Entities_RenderHoveredNames(); _InputHandler_Tick(); $31 = HEAP8[1972845]|0; $32 = ($31<<24>>24)==(0); if (!($32)) { return; } _HeldBlockRenderer_Render($0); return; } function _Game_ShouldClose() { var $$0 = 0, $$0$shrunk = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1949240)>>0]|0; $1 = ($0<<24>>24)==(0); if (!($1)) { $2 = +HEAPF64[(1103616)>>3]; $3 = $2 + 5.0; $4 = +HEAPF64[(1084992)>>3]; $5 = $3 >= $4; $$0$shrunk = $5; $$0 = $$0$shrunk&1; return ($$0|0); } $6 = HEAP8[(390406)>>0]|0; $7 = HEAP8[(390407)>>0]|0; $8 = $7 | $6; $9 = HEAP8[(390410)>>0]|0; $10 = $8 | $9; $11 = HEAP8[(390411)>>0]|0; $12 = $10 | $11; $13 = ($12<<24>>24)==(0); if (!($13)) { $$0$shrunk = 0; $$0 = $$0$shrunk&1; return ($$0|0); } $14 = HEAP8[(390485)>>0]|0; $15 = ($14<<24>>24)==(0); $$0$shrunk = $15; $$0 = $$0$shrunk&1; return ($$0|0); } function _Game_Run($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _Window_Create3D($0,$1); _Window_SetTitle($2); _Game_Load(); _Event_RaiseVoid((1797948)); _Game_RunLoop(); return; } function _Game_Load() { var $$0 = 0, $$05 = 0, $$06 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Game_UpdateDimensions(); $0 = (_Options_GetEnum(38156,0,3936,6)|0); _Game_SetFpsLimit($0); _Gfx_Create(); HEAP32[3701] = 322; _LoadOptions(); _GameVersion_Load(); (_Utils_EnsureDirectory(35747)|0); _Event_Register(1795608,0,323); _Event_Register((1796128),0,324); _Event_Register((1797948),0,325); _Event_Register((1798208),0,326); _Event_Register((1799248),0,327); _Game_AddComponent(22652); _Game_AddComponent(21792); _Game_AddComponent(14712); _Game_AddComponent(13340); _Game_AddComponent(14452); _Game_AddComponent(13260); _Game_AddComponent(13928); _Game_AddComponent(13540); _Game_AddComponent(20840); _Game_AddComponent(14036); _Game_AddComponent(16104); _Game_AddComponent(14060); _Game_AddComponent(14660); _Game_AddComponent(14776); _Game_AddComponent(13128); _Game_AddComponent(14752); _Game_AddComponent(13316); _Game_AddComponent(14816); _Game_AddComponent(14208); _Game_AddComponent(21688); _Game_AddComponent(20968); _Game_AddComponent(14508); _Game_AddComponent(21664); _Game_AddComponent(14580); _Game_AddComponent(20900); _Game_AddComponent(13200); _Game_AddComponent(13224); $$05 = HEAP32[450766]|0; $1 = ($$05|0)==(0|0); if (!($1)) { $$06 = $$05; while(1) { $2 = HEAP32[$$06>>2]|0; $3 = ($2|0)==(0|0); if (!($3)) { FUNCTION_TABLE_v[$2 & 127](); } $4 = ((($$06)) + 20|0); $$0 = HEAP32[$4>>2]|0; $5 = ($$0|0)==(0|0); if ($5) { break; } else { $$06 = $$0; } } } HEAP8[1972846] = 0; (_TexturePack_ExtractCurrent(1)|0); $6 = HEAP8[1972846]|0; $7 = ($6<<24>>24)==(0); if (!($7)) { _Window_ShowDialog(29448,29461); } $8 = (_ScheduledTask_Add(0.050000000000000003,328)|0); HEAP32[450769] = $8; $9 = (_Gfx_WarnIfNecessary()|0); $10 = ($9<<24>>24)==(0); if ($10) { $14 = HEAP32[487297]|0; FUNCTION_TABLE_v[$14 & 127](); return; } $11 = HEAP8[1972828]|0; $12 = $11 | 2; $13 = $12&255; _EnvRenderer_SetMode($13); $14 = HEAP32[487297]|0; FUNCTION_TABLE_v[$14 & 127](); return; } function _Game_RunLoop() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_Stopwatch_Measure()|0); $1 = (getTempRet0() | 0); $2 = 1085008; $3 = $2; HEAP32[$3>>2] = $0; $4 = (($2) + 4)|0; $5 = $4; HEAP32[$5>>2] = $1; return; } function _Game_WarnFunc($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = sp + 8|0; $3 = $0; $4 = $3; $5 = HEAP32[$4>>2]|0; $6 = (($3) + 4)|0; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = $1; $10 = $9; HEAP32[$10>>2] = $5; $11 = (($9) + 4)|0; $12 = $11; HEAP32[$12>>2] = $8; $13 = ((($1)) + 4|0); $14 = HEAP16[$13>>1]|0; $15 = ($14<<16>>16)==(0); if ($15) { STACKTOP = sp;return; } while(1) { _String_UNSAFE_SplitBy($1,10,$2); _Chat_Add1(29632,$2); $16 = HEAP16[$13>>1]|0; $17 = ($16<<16>>16)==(0); if ($17) { break; } } STACKTOP = sp;return; } function _LoadOptions() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_Options_GetBool(29603,0)|0); HEAP8[1972839] = $0; $1 = (_Options_GetBool(29616,0)|0); HEAP8[1972840] = $1; $2 = (_Options_GetBool(36622,1)|0); HEAP8[1972841] = $2; $3 = (_Options_GetBool(36605,1)|0); HEAP8[1972842] = $3; $4 = (_Options_GetBool(36716,0)|0); HEAP8[1972838] = $4; $5 = (_Options_GetBool(38165,1)|0); HEAP8[1972844] = $5; $6 = (_Options_GetInt(29198,8,4096,512)|0); HEAP32[3582] = $6; HEAP32[3583] = $6; $7 = HEAP8[1972839]|0; $8 = ($7<<24>>24)==(0); if (!($8)) { $11 = 0; HEAP8[1972835] = $11; $12 = (_Options_GetBool(36580,1)|0); HEAP8[1972843] = $12; return; } $9 = (_Options_GetBool(37631,0)|0); $10 = ($9<<24>>24)!=(0); $phitmp = $10&1; $11 = $phitmp; HEAP8[1972835] = $11; $12 = (_Options_GetBool(36580,1)|0); HEAP8[1972843] = $12; return; } function _HandleOnNewMap($0) { $0 = $0|0; var $$0 = 0, $$05 = 0, $$06 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $$05 = HEAP32[450766]|0; $1 = ($$05|0)==(0|0); if ($1) { return; } $$06 = $$05; while(1) { $2 = ((($$06)) + 12|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0|0); if (!($4)) { FUNCTION_TABLE_v[$3 & 127](); } $5 = ((($$06)) + 20|0); $$0 = HEAP32[$5>>2]|0; $6 = ($$0|0)==(0|0); if ($6) { break; } else { $$06 = $$0; } } return; } function _HandleOnNewMapLoaded($0) { $0 = $0|0; var $$0 = 0, $$05 = 0, $$06 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $$05 = HEAP32[450766]|0; $1 = ($$05|0)==(0|0); if ($1) { return; } $$06 = $$05; while(1) { $2 = ((($$06)) + 16|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0|0); if (!($4)) { FUNCTION_TABLE_v[$3 & 127](); } $5 = ((($$06)) + 20|0); $$0 = HEAP32[$5>>2]|0; $6 = ($$0|0)==(0|0); if ($6) { break; } else { $$06 = $$0; } } return; } function _Game_OnResize($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Game_UpdateDimensions(); _Gfx_OnWindowResize(); _Camera_UpdateProjection(); return; } function _HandleInactiveChanged($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1972127)>>0]|0; $2 = ($1<<24>>24)==(0); if ($2) { _Chat_AddOf(1949280,361); $3 = HEAP32[450728]|0; _Game_SetFpsLimit($3); _Chat_AddRaw(29569); _emscripten_resume_main_loop(); return; } else { _Chat_AddOf(14444,361); _Gfx_SetFpsLimit(0,1000.0); _emscripten_resume_main_loop(); return; } } function _GameVersion_Load() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_Options_GetInt(29637,4,7,7)|0); $1 = HEAP8[1972839]|0; $2 = ($1<<24>>24)==(0); L1: do { if ($2) { $3 = 14412; } else { switch ($0|0) { case 7: { $3 = 14428; break L1; } case 6: { $3 = 14364; break L1; } case 5: { $3 = 14380; break L1; } case 4: { $3 = 14396; break L1; } default: { $3 = 0; break L1; } } } } while(0); ;HEAP32[1803048>>2]=HEAP32[$3>>2]|0;HEAP32[1803048+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[1803048+8>>2]=HEAP32[$3+8>>2]|0;HEAP32[1803048+12>>2]=HEAP32[$3+12>>2]|0; return; } function _FlatgrassGen_Generate() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; _Gen_Init(); HEAP32[450770] = 29739; $0 = HEAP32[(1103568)>>2]|0; $1 = (($0|0) / 2)&-1; $2 = HEAP32[(1103580)>>2]|0; _FlatgrassGen_MapSet($1,$2,0); HEAP32[450770] = 29758; $3 = HEAP32[(1103568)>>2]|0; $4 = (($3|0) / 2)&-1; $5 = (($4) + -2)|0; _FlatgrassGen_MapSet(0,$5,3); HEAP32[450770] = 29778; $6 = HEAP32[(1103568)>>2]|0; $7 = (($6|0) / 2)&-1; $8 = (($7) + -1)|0; _FlatgrassGen_MapSet($8,$8,2); HEAP8[1972847] = 1; return; } function _Gen_Init() { var label = 0, sp = 0; sp = STACKTOP; HEAPF32[450774] = 0.0; HEAP32[450770] = 1972899; HEAP8[1972847] = 0; return; } function _FlatgrassGen_MapSet($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$024 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1103588)>>2]|0; $4 = HEAP32[450775]|0; $5 = ($0|0)>(0); $6 = $5 ? $0 : 0; $7 = ($1|0)>(0); $8 = $7 ? $1 : 0; HEAPF32[450774] = 0.0; $9 = ($6|0)>($8|0); if ($9) { return; } $10 = (1 - ($6))|0; $11 = (($10) + ($8))|0; $12 = (+($11|0)); $$024 = $6; while(1) { $13 = Math_imul($$024, $3)|0; $14 = (($4) + ($13)|0); _Mem_Set($14,$2,$3); $15 = (($$024) - ($6))|0; $16 = (+($15|0)); $17 = $16 / $12; HEAPF32[450774] = $17; $18 = (($$024) + 1)|0; $19 = ($$024>>>0)<($8>>>0); if ($19) { $$024 = $18; } else { break; } } return; } function _NotchyGen_Generate() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; _Gen_Init(); $0 = HEAP32[(1103564)>>2]|0; $1 = HEAP32[(1103572)>>2]|0; $2 = Math_imul($1, $0)|0; $3 = (_Mem_Alloc($2,2,29799)|0); HEAP32[450776] = $3; $4 = HEAP32[450771]|0; _Random_Seed(1085016,$4); $5 = HEAP32[(1103568)>>2]|0; $6 = (($5|0) / 2)&-1; HEAP32[450777] = $6; HEAP32[450778] = $5; _NotchyGen_CreateHeightmap(); _NotchyGen_CreateStrata(); _NotchyGen_CarveCaves(); _NotchyGen_CarveOreVeins(0.89999997615814208,29813,16); _NotchyGen_CarveOreVeins(0.69999998807907104,29830,15); _NotchyGen_CarveOreVeins(0.5,29847,14); _NotchyGen_FloodFillWaterBorders(); _NotchyGen_FloodFillWater(); _NotchyGen_FloodFillLava(); _NotchyGen_CreateSurfaceLayer(); _NotchyGen_PlantFlowers(); _NotchyGen_PlantMushrooms(); _NotchyGen_PlantTrees(); $7 = HEAP32[450776]|0; _Mem_Free($7); HEAP32[450776] = 0; HEAP8[1972847] = 1; return; } function _NotchyGen_CreateHeightmap() { var $$03641 = 0, $$037 = 0.0, $$03842 = 0, $$043 = 0, $$1 = 0.0, $$139$lcssa = 0, $$13940 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0; var $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 20512|0; $0 = sp + 12304|0; $1 = sp + 4104|0; $2 = sp; _CombinedNoise_Init($0); _CombinedNoise_Init($1); _OctaveNoise_Init($2,6); HEAP32[450770] = 30023; $3 = HEAP32[(1103572)>>2]|0; $4 = ($3|0)>(0); if (!($4)) { STACKTOP = sp;return; } $$03842 = 0;$$043 = 0;$7 = $3; while(1) { $5 = (+($$043|0)); $6 = (+($7|0)); $8 = $5 / $6; HEAPF32[450774] = $8; $9 = HEAP32[(1103564)>>2]|0; $10 = ($9|0)>(0); if ($10) { $11 = $5 * 1.2999999523162842; $$03641 = 0;$$13940 = $$03842; while(1) { $12 = (+($$03641|0)); $13 = $12 * 1.2999999523162842; $14 = (+_CombinedNoise_Calc($0,$13,$11)); $15 = $14 / 6.0; $16 = $15 + -4.0; $17 = (+_OctaveNoise_Calc($2,$12,$5)); $18 = !($17 <= 0.0); if ($18) { $$037 = $16; } else { $19 = (+_CombinedNoise_Calc($1,$13,$11)); $20 = $19 / 5.0; $21 = $20 + 6.0; $22 = $16 > $21; $23 = $22 ? $16 : $21; $$037 = $23; } $24 = $$037 * 0.5; $25 = $24 < 0.0; $26 = $24 * 0.80000001192092896; $$1 = $25 ? $26 : $24; $27 = HEAP32[450777]|0; $28 = (+($27|0)); $29 = $$1 + $28; $30 = (~~(($29))); $31 = HEAP32[450778]|0; $32 = ($31|0)>($30|0); $33 = $32 ? $30 : $31; HEAP32[450778] = $33; $34 = $30&65535; $35 = HEAP32[450776]|0; $36 = (($$13940) + 1)|0; $37 = (($35) + ($$13940<<1)|0); HEAP16[$37>>1] = $34; $38 = (($$03641) + 1)|0; $39 = HEAP32[(1103564)>>2]|0; $40 = ($38|0)<($39|0); if ($40) { $$03641 = $38;$$13940 = $36; } else { $$139$lcssa = $36; break; } } } else { $$139$lcssa = $$03842; } $41 = (($$043) + 1)|0; $42 = HEAP32[(1103572)>>2]|0; $43 = ($41|0)<($42|0); if ($43) { $$03842 = $$139$lcssa;$$043 = $41;$7 = $42; } else { break; } } STACKTOP = sp;return; } function _NotchyGen_CreateStrata() { var $$05764 = 0, $$05871 = 0, $$05963 = 0, $$06175 = 0, $$076 = 0, $$16065 = 0, $$162$lcssa = 0, $$16270 = 0, $$166 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; var $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 4112|0; $0 = sp; $1 = HEAP32[(1103580)>>2]|0; $2 = (_NotchyGen_CreateStrataFast()|0); _OctaveNoise_Init($0,8); HEAP32[450770] = 29995; $3 = HEAP32[(1103572)>>2]|0; $4 = ($3|0)>(0); if (!($4)) { STACKTOP = sp;return; } $$06175 = 0;$$076 = 0;$7 = $3; while(1) { $5 = (+($$076|0)); $6 = (+($7|0)); $8 = $5 / $6; HEAPF32[450774] = $8; $9 = HEAP32[(1103564)>>2]|0; $10 = ($9|0)>(0); if ($10) { $$05871 = 0;$$16270 = $$06175;$31 = $9; while(1) { $11 = (+($$05871|0)); $12 = (+_OctaveNoise_Calc($0,$11,$5)); $13 = $12 / 24.0; $14 = $13 + -4.0; $15 = (~~(($14))); $16 = HEAP32[450776]|0; $17 = (($$16270) + 1)|0; $18 = (($16) + ($$16270<<1)|0); $19 = HEAP16[$18>>1]|0; $20 = $19 << 16 >> 16; $21 = (($20) + ($15))|0; $22 = ($21|0)<($1|0); $23 = $22 ? $21 : $1; $24 = ($1|0)>($20|0); $25 = $24 ? $20 : $1; $26 = ($2|0)>($23|0); if (!($26)) { $27 = HEAP32[(1103572)>>2]|0; $28 = Math_imul($27, $2)|0; $29 = (($28) + ($$076))|0; $30 = Math_imul($29, $31)|0; $32 = (($30) + ($$05871))|0; $$05764 = $2;$$05963 = $32; while(1) { $33 = HEAP32[450775]|0; $34 = (($33) + ($$05963)|0); HEAP8[$34>>0] = 1; $35 = HEAP32[(1103588)>>2]|0; $36 = (($35) + ($$05963))|0; $37 = (($$05764) + 1)|0; $38 = ($$05764|0)<($23|0); if ($38) { $$05764 = $37;$$05963 = $36; } else { break; } } } $39 = ($23|0)>(0); $40 = $39 ? $23 : 0; $41 = (($40) + 1)|0; $42 = ($40|0)<($25|0); if ($42) { $43 = HEAP32[(1103572)>>2]|0; $44 = Math_imul($43, $41)|0; $45 = (($44) + ($$076))|0; $46 = HEAP32[(1103564)>>2]|0; $47 = Math_imul($45, $46)|0; $48 = (($47) + ($$05871))|0; $$16065 = $48;$$166 = $41; while(1) { $49 = HEAP32[450775]|0; $50 = (($49) + ($$16065)|0); HEAP8[$50>>0] = 3; $51 = HEAP32[(1103588)>>2]|0; $52 = (($51) + ($$16065))|0; $53 = (($$166) + 1)|0; $54 = ($$166|0)<($25|0); if ($54) { $$16065 = $52;$$166 = $53; } else { break; } } } $55 = (($$05871) + 1)|0; $56 = HEAP32[(1103564)>>2]|0; $57 = ($55|0)<($56|0); if ($57) { $$05871 = $55;$$16270 = $17;$31 = $56; } else { $$162$lcssa = $17; break; } } } else { $$162$lcssa = $$06175; } $58 = (($$076) + 1)|0; $59 = HEAP32[(1103572)>>2]|0; $60 = ($58|0)<($59|0); if ($60) { $$06175 = $$162$lcssa;$$076 = $58;$7 = $59; } else { break; } } STACKTOP = sp;return; } function _NotchyGen_CarveCaves() { var $$06581 = 0, $$06679 = 0.0, $$06778 = 0.0, $$06877 = 0.0, $$06976 = 0.0, $$07075 = 0.0, $$07174 = 0.0, $$07273 = 0.0, $$080 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0; var $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0; var $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0; var $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0.0; var $73 = 0.0, $74 = 0.0, $75 = 0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0; var $91 = 0, $exitcond = 0, $exitcond85 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1103560)>>2]|0; $1 = (($0|0) / 8192)&-1; HEAP32[450770] = 29981; $2 = ($0|0)>(8191); if (!($2)) { return; } $3 = (+($1|0)); $$06581 = 0; while(1) { $4 = (+($$06581|0)); $5 = $4 / $3; HEAPF32[450774] = $5; $6 = HEAP32[(1103564)>>2]|0; $7 = (_Random_Next(1085016,$6)|0); $8 = HEAP32[(1103568)>>2]|0; $9 = (_Random_Next(1085016,$8)|0); $10 = HEAP32[(1103572)>>2]|0; $11 = (_Random_Next(1085016,$10)|0); $12 = (+_Random_Float(1085016)); $13 = (+_Random_Float(1085016)); $14 = $12 * $13; $15 = $14 * 200.0; $16 = (~~(($15))); $17 = (+_Random_Float(1085016)); $18 = (+_Random_Float(1085016)); $19 = (+_Random_Float(1085016)); $20 = (+_Random_Float(1085016)); $21 = $19 * $20; $22 = ($16|0)>(0); if ($22) { $23 = $18 * 2.0; $24 = $23 * 3.1415927410125732; $25 = $17 * 2.0; $26 = $25 * 3.1415927410125732; $27 = (+($11|0)); $28 = (+($9|0)); $29 = (+($7|0)); $30 = (+($16|0)); $$06679 = $29;$$06778 = $28;$$06877 = $27;$$06976 = $26;$$07075 = 0.0;$$07174 = 0.0;$$07273 = $24;$$080 = 0; while(1) { $31 = (+_Math_SinF($$06976)); $32 = (+_Math_CosF($$07273)); $33 = $31 * $32; $34 = $$06679 + $33; $35 = (+_Math_CosF($$06976)); $36 = (+_Math_CosF($$07273)); $37 = $35 * $36; $38 = $$06877 + $37; $39 = (+_Math_SinF($$07273)); $40 = $$06778 + $39; $41 = $$07075 * 0.20000000298023224; $42 = $$06976 + $41; $43 = $$07075 * 0.89999997615814208; $44 = (+_Random_Float(1085016)); $45 = $43 + $44; $46 = (+_Random_Float(1085016)); $47 = $45 - $46; $48 = $$07273 * 0.5; $49 = $$07174 * 0.25; $50 = $48 + $49; $51 = $$07174 * 0.75; $52 = (+_Random_Float(1085016)); $53 = $51 + $52; $54 = (+_Random_Float(1085016)); $55 = $53 - $54; $56 = (+_Random_Float(1085016)); $57 = $56 < 0.25; if (!($57)) { $58 = (_Random_Next(1085016,4)|0); $59 = (($58) + -2)|0; $60 = (+($59|0)); $61 = $60 * 0.20000000298023224; $62 = $34 + $61; $63 = (~~(($62))); $64 = (_Random_Next(1085016,4)|0); $65 = (($64) + -2)|0; $66 = (+($65|0)); $67 = $66 * 0.20000000298023224; $68 = $40 + $67; $69 = (~~(($68))); $70 = (_Random_Next(1085016,4)|0); $71 = (($70) + -2)|0; $72 = (+($71|0)); $73 = $72 * 0.20000000298023224; $74 = $38 + $73; $75 = (~~(($74))); $76 = HEAP32[(1103568)>>2]|0; $77 = (($76) - ($69))|0; $78 = (+($77|0)); $79 = (+($76|0)); $80 = $78 / $79; $81 = $80 * 3.5; $82 = $81 + 1.0; $83 = $21 * $82; $84 = $83 + 1.2000000476837158; $85 = (+($$080|0)); $86 = $85 * 3.1415927410125732; $87 = $86 / $30; $88 = (+_Math_SinF($87)); $89 = $88 * $84; _NotchyGen_FillOblateSpheroid($63,$69,$75,$89,0); } $90 = (($$080) + 1)|0; $exitcond = ($90|0)==($16|0); if ($exitcond) { break; } else { $$06679 = $34;$$06778 = $40;$$06877 = $38;$$06976 = $42;$$07075 = $47;$$07174 = $55;$$07273 = $50;$$080 = $90; } } } $91 = (($$06581) + 1)|0; $exitcond85 = ($91|0)==($1|0); if ($exitcond85) { break; } else { $$06581 = $91; } } return; } function _NotchyGen_CarveOreVeins($0,$1,$2) { $0 = +$0; $1 = $1|0; $2 = $2|0; var $$05470 = 0, $$05568 = 0.0, $$05667 = 0.0, $$05766 = 0.0, $$05865 = 0.0, $$05964 = 0.0, $$06063 = 0.0, $$06162 = 0.0, $$069 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $20 = 0.0; var $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0; var $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0; var $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $8 = 0, $9 = 0.0, $exitcond = 0, $exitcond74 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1103560)>>2]|0; $4 = (+($3|0)); $5 = $4 * $0; $6 = $5 * 6.103515625E-5; $7 = (~~(($6))); HEAP32[450770] = $1; $8 = ($7|0)>(0); if (!($8)) { return; } $9 = (+($7|0)); $$05470 = 0; while(1) { $10 = (+($$05470|0)); $11 = $10 / $9; HEAPF32[450774] = $11; $12 = HEAP32[(1103564)>>2]|0; $13 = (_Random_Next(1085016,$12)|0); $14 = HEAP32[(1103568)>>2]|0; $15 = (_Random_Next(1085016,$14)|0); $16 = HEAP32[(1103572)>>2]|0; $17 = (_Random_Next(1085016,$16)|0); $18 = (+_Random_Float(1085016)); $19 = (+_Random_Float(1085016)); $20 = $18 * $19; $21 = $20 * 75.0; $22 = $21 * $0; $23 = (~~(($22))); $24 = (+_Random_Float(1085016)); $25 = (+_Random_Float(1085016)); $26 = ($23|0)>(0); if ($26) { $27 = $25 * 2.0; $28 = $27 * 3.1415927410125732; $29 = $24 * 2.0; $30 = $29 * 3.1415927410125732; $31 = (+($17|0)); $32 = (+($15|0)); $33 = (+($13|0)); $34 = (+($23|0)); $$05568 = $33;$$05667 = 0.0;$$05766 = $28;$$05865 = 0.0;$$05964 = $30;$$06063 = $31;$$06162 = $32;$$069 = 0; while(1) { $35 = (+_Math_SinF($$05964)); $36 = (+_Math_CosF($$05766)); $37 = $35 * $36; $38 = $$05568 + $37; $39 = (+_Math_CosF($$05964)); $40 = (+_Math_CosF($$05766)); $41 = $39 * $40; $42 = $$06063 + $41; $43 = (+_Math_SinF($$05766)); $44 = $$06162 + $43; $45 = $$05865 * 0.20000000298023224; $46 = $$05865 * 0.89999997615814208; $47 = (+_Random_Float(1085016)); $48 = $46 + $47; $49 = (+_Random_Float(1085016)); $50 = $48 - $49; $51 = $$05766 * 0.5; $52 = $$05667 * 0.25; $53 = $51 + $52; $54 = $$05667 * 0.89999997615814208; $55 = (+_Random_Float(1085016)); $56 = $54 + $55; $57 = (+_Random_Float(1085016)); $58 = $56 - $57; $59 = (+($$069|0)); $60 = $59 * 3.1415927410125732; $61 = $60 / $34; $62 = (+_Math_SinF($61)); $63 = $62 * $0; $64 = $63 + 1.0; $65 = (~~(($38))); $66 = (~~(($44))); $67 = (~~(($42))); _NotchyGen_FillOblateSpheroid($65,$66,$67,$64,$2); $68 = (($$069) + 1)|0; $exitcond = ($68|0)==($23|0); if ($exitcond) { break; } else { $$05568 = $38;$$05667 = $58;$$05766 = $53;$$05865 = $50;$$05964 = $45;$$06063 = $42;$$06162 = $44;$$069 = $68; } } } $69 = (($$05470) + 1)|0; $exitcond74 = ($69|0)==($7|0); if ($exitcond74) { break; } else { $$05470 = $69; } } return; } function _NotchyGen_FloodFillWaterBorders() { var $$02736 = 0, $$02835 = 0, $$02934 = 0, $$033 = 0, $$13031 = 0, $$132 = 0, $$lcssa = 0, $$pr = 0, $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; var $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[450777]|0; $1 = (($0) + -1)|0; HEAP32[450770] = 29961; $2 = HEAP32[(1103572)>>2]|0; $3 = Math_imul($2, $1)|0; $4 = HEAP32[(1103564)>>2]|0; $5 = ($4|0)>(0); if ($5) { $6 = (($2) + -1)|0; $7 = (($6) + ($3))|0; $8 = Math_imul($7, $4)|0; $9 = Math_imul($3, $4)|0; $$02736 = 0;$$02835 = $8;$$02934 = $9;$12 = $4; while(1) { $10 = (+($$02736|0)); $11 = (+($12|0)); $13 = $10 / $11; $14 = $13 * 0.5; $15 = $14 + 0.0; HEAPF32[450774] = $15; _NotchyGen_FloodFill($$02934,9); _NotchyGen_FloodFill($$02835,9); $16 = (($$02934) + 1)|0; $17 = (($$02835) + 1)|0; $18 = (($$02736) + 1)|0; $19 = HEAP32[(1103564)>>2]|0; $20 = ($18|0)<($19|0); if ($20) { $$02736 = $18;$$02835 = $17;$$02934 = $16;$12 = $19; } else { break; } } $$pr = HEAP32[(1103572)>>2]|0; $$lcssa = $19;$23 = $$pr; } else { $$lcssa = $4;$23 = $2; } $21 = Math_imul($$lcssa, $1)|0; $22 = Math_imul($21, $23)|0; $24 = ($23|0)>(0); if (!($24)) { return; } $25 = (($$lcssa) + -1)|0; $26 = (($25) + ($22))|0; $$033 = 0;$$13031 = $22;$$132 = $26;$29 = $23; while(1) { $27 = (+($$033|0)); $28 = (+($29|0)); $30 = $27 / $28; $31 = $30 * 0.5; $32 = $31 + 0.5; HEAPF32[450774] = $32; _NotchyGen_FloodFill($$13031,9); _NotchyGen_FloodFill($$132,9); $33 = HEAP32[(1103564)>>2]|0; $34 = (($33) + ($$13031))|0; $35 = (($33) + ($$132))|0; $36 = (($$033) + 1)|0; $37 = HEAP32[(1103572)>>2]|0; $38 = ($36|0)<($37|0); if ($38) { $$033 = $36;$$13031 = $34;$$132 = $35;$29 = $37; } else { break; } } return; } function _NotchyGen_FloodFillWater() { var $$017 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0.0; var $7 = 0.0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1103564)>>2]|0; $1 = HEAP32[(1103572)>>2]|0; $2 = Math_imul($1, $0)|0; $3 = (($2|0) / 800)&-1; HEAP32[450770] = 29946; $4 = ($2|0)>(799); if (!($4)) { return; } $5 = (+($3|0)); $$017 = 0; while(1) { $6 = (+($$017|0)); $7 = $6 / $5; HEAPF32[450774] = $7; $8 = HEAP32[(1103564)>>2]|0; $9 = (_Random_Next(1085016,$8)|0); $10 = HEAP32[(1103572)>>2]|0; $11 = (_Random_Next(1085016,$10)|0); $12 = HEAP32[450777]|0; $13 = (_Random_Range_670(1,3)|0); $14 = (($12) - ($13))|0; $15 = HEAP32[(1103572)>>2]|0; $16 = Math_imul($14, $15)|0; $17 = (($16) + ($11))|0; $18 = HEAP32[(1103564)>>2]|0; $19 = Math_imul($17, $18)|0; $20 = (($19) + ($9))|0; _NotchyGen_FloodFill($20,9); $21 = (($$017) + 1)|0; $exitcond = ($21|0)==($3|0); if ($exitcond) { break; } else { $$017 = $21; } } return; } function _NotchyGen_FloodFillLava() { var $$017 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1103564)>>2]|0; $1 = HEAP32[(1103572)>>2]|0; $2 = Math_imul($1, $0)|0; $3 = (($2|0) / 20000)&-1; HEAP32[450770] = 29932; $4 = ($2|0)>(19999); if (!($4)) { return; } $5 = (+($3|0)); $$017 = 0; while(1) { $6 = (+($$017|0)); $7 = $6 / $5; HEAPF32[450774] = $7; $8 = HEAP32[(1103564)>>2]|0; $9 = (_Random_Next(1085016,$8)|0); $10 = HEAP32[(1103572)>>2]|0; $11 = (_Random_Next(1085016,$10)|0); $12 = HEAP32[450777]|0; $13 = (($12) + -3)|0; $14 = (+($13|0)); $15 = (+_Random_Float(1085016)); $16 = $15 * $14; $17 = (+_Random_Float(1085016)); $18 = $17 * $16; $19 = (~~(($18))); $20 = HEAP32[(1103572)>>2]|0; $21 = Math_imul($20, $19)|0; $22 = (($21) + ($11))|0; $23 = HEAP32[(1103564)>>2]|0; $24 = Math_imul($22, $23)|0; $25 = (($24) + ($9))|0; _NotchyGen_FloodFill($25,11); $26 = (($$017) + 1)|0; $exitcond = ($26|0)==($3|0); if ($exitcond) { break; } else { $$017 = $26; } } return; } function _NotchyGen_CreateSurfaceLayer() { var $$03138 = 0, $$03235 = 0, $$039 = 0, $$1$lcssa = 0, $$137 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0.0; var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 8208|0; $0 = sp + 4100|0; $1 = sp; _OctaveNoise_Init($0,8); _OctaveNoise_Init($1,8); HEAP32[450770] = 29915; $2 = HEAP32[(1103572)>>2]|0; $3 = ($2|0)>(0); if (!($3)) { STACKTOP = sp;return; } $$03138 = 0;$$039 = 0;$6 = $2; while(1) { $4 = (+($$039|0)); $5 = (+($6|0)); $7 = $4 / $5; HEAPF32[450774] = $7; $8 = HEAP32[(1103564)>>2]|0; $9 = ($8|0)>(0); if ($9) { $$03235 = 0;$$137 = $$03138;$22 = $8; while(1) { $10 = HEAP32[450776]|0; $11 = (($$137) + 1)|0; $12 = (($10) + ($$137<<1)|0); $13 = HEAP16[$12>>1]|0; $14 = $13 << 16 >> 16; $15 = ($13<<16>>16)>(-1); $16 = HEAP32[(1103568)>>2]|0; $17 = ($16|0)>($14|0); $or$cond = $15 & $17; L10: do { if ($or$cond) { $18 = HEAP32[(1103572)>>2]|0; $19 = Math_imul($18, $14)|0; $20 = (($19) + ($$039))|0; $21 = Math_imul($20, $22)|0; $23 = (($21) + ($$03235))|0; $24 = HEAP32[(1103580)>>2]|0; $25 = ($24|0)>($14|0); L12: do { if ($25) { $26 = HEAP32[450775]|0; $27 = HEAP32[(1103588)>>2]|0; $28 = (($27) + ($23))|0; $29 = (($26) + ($28)|0); $30 = HEAP8[$29>>0]|0; switch ($30<<24>>24) { case 0: { break L12; } case 9: { break; } default: { break L10; } } $31 = (+($$03235|0)); $32 = (+_OctaveNoise_Calc($1,$31,$4)); $33 = $32 > 12.0; if (!($33)) { break L10; } $34 = HEAP32[450775]|0; $35 = (($34) + ($23)|0); HEAP8[$35>>0] = 13; break L10; } } while(0); $36 = HEAP32[450777]|0; $37 = ($36|0)<($14|0); if ($37) { $43 = 2; } else { $38 = (+($$03235|0)); $39 = (+_OctaveNoise_Calc($0,$38,$4)); $40 = $39 > 8.0; if ($40) { $43 = 12; } else { $43 = 2; } } $41 = HEAP32[450775]|0; $42 = (($41) + ($23)|0); HEAP8[$42>>0] = $43; } } while(0); $44 = (($$03235) + 1)|0; $45 = HEAP32[(1103564)>>2]|0; $46 = ($44|0)<($45|0); if ($46) { $$03235 = $44;$$137 = $11;$22 = $45; } else { $$1$lcssa = $11; break; } } } else { $$1$lcssa = $$03138; } $47 = (($$039) + 1)|0; $48 = HEAP32[(1103572)>>2]|0; $49 = ($47|0)<($48|0); if ($49) { $$03138 = $$1$lcssa;$$039 = $47;$6 = $48; } else { break; } } STACKTOP = sp;return; } function _NotchyGen_PlantFlowers() { var $$04551 = 0, $$04653 = 0, $$04754 = 0, $$04850 = 0, $$052 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond55 = 0; var $exitcond56 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1103564)>>2]|0; $1 = HEAP32[(1103572)>>2]|0; $2 = Math_imul($1, $0)|0; $3 = (($2|0) / 3000)&-1; HEAP32[450770] = 29898; $4 = ($2|0)>(2999); if (!($4)) { return; } $5 = (+($3|0)); $$04754 = 0; while(1) { $6 = (+($$04754|0)); $7 = $6 / $5; HEAPF32[450774] = $7; $8 = (_Random_Next(1085016,2)|0); $9 = (($8) + 37)|0; $10 = $9&255; $11 = HEAP32[(1103564)>>2]|0; $12 = (_Random_Next(1085016,$11)|0); $13 = HEAP32[(1103572)>>2]|0; $14 = (_Random_Next(1085016,$13)|0); $$04653 = 0; while(1) { $$04551 = 0;$$04850 = $14;$$052 = $12; while(1) { $15 = (_Random_Next(1085016,6)|0); $16 = (_Random_Next(1085016,6)|0); $17 = (($15) - ($16))|0; $18 = (($17) + ($$052))|0; $19 = (_Random_Next(1085016,6)|0); $20 = (_Random_Next(1085016,6)|0); $21 = (($19) - ($20))|0; $22 = (($21) + ($$04850))|0; $23 = (_World_ContainsXZ_661($18,$22)|0); $24 = ($23<<24>>24)==(0); if (!($24)) { $25 = HEAP32[450776]|0; $26 = HEAP32[(1103564)>>2]|0; $27 = Math_imul($26, $22)|0; $28 = (($27) + ($18))|0; $29 = (($25) + ($28<<1)|0); $30 = HEAP16[$29>>1]|0; $31 = $30 << 16 >> 16; $32 = (($31) + 1)|0; $33 = ($30<<16>>16)>(-1); $34 = HEAP32[(1103568)>>2]|0; $35 = ($32|0)<($34|0); $or$cond = $33 & $35; if ($or$cond) { $36 = HEAP32[(1103572)>>2]|0; $37 = Math_imul($36, $32)|0; $38 = (($37) + ($22))|0; $39 = Math_imul($38, $26)|0; $40 = (($39) + ($18))|0; $41 = HEAP32[450775]|0; $42 = (($41) + ($40)|0); $43 = HEAP8[$42>>0]|0; $44 = ($43<<24>>24)==(0); if ($44) { $45 = HEAP32[(1103588)>>2]|0; $46 = (($40) - ($45))|0; $47 = (($41) + ($46)|0); $48 = HEAP8[$47>>0]|0; $49 = ($48<<24>>24)==(2); if ($49) { HEAP8[$42>>0] = $10; } } } } $50 = (($$04551) + 1)|0; $exitcond = ($50|0)==(5); if ($exitcond) { break; } else { $$04551 = $50;$$04850 = $22;$$052 = $18; } } $51 = (($$04653) + 1)|0; $exitcond55 = ($51|0)==(10); if ($exitcond55) { break; } else { $$04653 = $51; } } $52 = (($$04754) + 1)|0; $exitcond56 = ($52|0)==($3|0); if ($exitcond56) { break; } else { $$04754 = $52; } } return; } function _NotchyGen_PlantMushrooms() { var $$05055 = 0, $$05157 = 0, $$05258 = 0, $$05354 = 0, $$056 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0; var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond59 = 0, $exitcond60 = 0, label = 0; var sp = 0; sp = STACKTOP; $0 = HEAP32[(1103560)>>2]|0; $1 = (($0|0) / 2000)&-1; HEAP32[450770] = 29879; $2 = ($0|0)>(1999); if (!($2)) { return; } $3 = (+($1|0)); $$05258 = 0; while(1) { $4 = (+($$05258|0)); $5 = $4 / $3; HEAPF32[450774] = $5; $6 = (_Random_Next(1085016,2)|0); $7 = (($6) + 39)|0; $8 = $7&255; $9 = HEAP32[(1103564)>>2]|0; $10 = (_Random_Next(1085016,$9)|0); $11 = HEAP32[(1103568)>>2]|0; $12 = (_Random_Next(1085016,$11)|0); $13 = HEAP32[(1103572)>>2]|0; $14 = (_Random_Next(1085016,$13)|0); $$05157 = 0; while(1) { $$05055 = 0;$$05354 = $14;$$056 = $10; while(1) { $15 = (_Random_Next(1085016,6)|0); $16 = (_Random_Next(1085016,6)|0); $17 = (($15) - ($16))|0; $18 = (($17) + ($$056))|0; $19 = (_Random_Next(1085016,6)|0); $20 = (_Random_Next(1085016,6)|0); $21 = (($19) - ($20))|0; $22 = (($21) + ($$05354))|0; $23 = (_World_ContainsXZ_661($18,$22)|0); $24 = ($23<<24>>24)==(0); if (!($24)) { $25 = HEAP32[450776]|0; $26 = HEAP32[(1103564)>>2]|0; $27 = Math_imul($26, $22)|0; $28 = (($27) + ($18))|0; $29 = (($25) + ($28<<1)|0); $30 = HEAP16[$29>>1]|0; $31 = $30 << 16 >> 16; $32 = (($31) + -1)|0; $33 = ($12|0)<($32|0); if ($33) { $34 = HEAP32[(1103572)>>2]|0; $35 = Math_imul($34, $12)|0; $36 = (($35) + ($22))|0; $37 = Math_imul($36, $26)|0; $38 = (($37) + ($18))|0; $39 = HEAP32[450775]|0; $40 = (($39) + ($38)|0); $41 = HEAP8[$40>>0]|0; $42 = ($41<<24>>24)==(0); if ($42) { $43 = HEAP32[(1103588)>>2]|0; $44 = (($38) - ($43))|0; $45 = (($39) + ($44)|0); $46 = HEAP8[$45>>0]|0; $47 = ($46<<24>>24)==(1); if ($47) { HEAP8[$40>>0] = $8; } } } } $48 = (($$05055) + 1)|0; $exitcond = ($48|0)==(5); if ($exitcond) { break; } else { $$05055 = $48;$$05354 = $22;$$056 = $18; } } $49 = (($$05157) + 1)|0; $exitcond59 = ($49|0)==(20); if ($exitcond59) { break; } else { $$05157 = $49; } } $50 = (($$05258) + 1)|0; $exitcond60 = ($50|0)==($1|0); if ($exitcond60) { break; } else { $$05258 = $50; } } return; } function _NotchyGen_PlantTrees() { var $$06573 = 0, $$06674 = 0, $$06775 = 0, $$06872 = 0, $$06971 = 0, $$070 = 0, $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0; var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0; var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0; var $8 = 0.0, $9 = 0.0, $exitcond = 0, $exitcond77 = 0, $exitcond78 = 0, $exitcond79 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 1248|0; $0 = sp + 96|0; $1 = sp; $2 = HEAP32[450775]|0; HEAP32[450772] = $2; HEAP32[450773] = 1085016; $3 = HEAP32[(1103564)>>2]|0; $4 = HEAP32[(1103572)>>2]|0; $5 = Math_imul($4, $3)|0; $6 = (($5|0) / 4000)&-1; HEAP32[450770] = 29864; $7 = ($5|0)>(3999); if (!($7)) { STACKTOP = sp;return; } $8 = (+($6|0)); $$06775 = 0; while(1) { $9 = (+($$06775|0)); $10 = $9 / $8; HEAPF32[450774] = $10; $11 = HEAP32[(1103564)>>2]|0; $12 = (_Random_Next(1085016,$11)|0); $13 = HEAP32[(1103572)>>2]|0; $14 = (_Random_Next(1085016,$13)|0); $$06674 = 0; while(1) { $$06573 = 0;$$06872 = $12;$$06971 = $14; while(1) { $15 = (_Random_Next(1085016,6)|0); $16 = (_Random_Next(1085016,6)|0); $17 = (($15) - ($16))|0; $18 = (($17) + ($$06872))|0; $19 = (_Random_Next(1085016,6)|0); $20 = (_Random_Next(1085016,6)|0); $21 = (($19) - ($20))|0; $22 = (($21) + ($$06971))|0; $23 = (_World_ContainsXZ_661($18,$22)|0); $24 = ($23<<24>>24)==(0); if (!($24)) { $25 = (+_Random_Float(1085016)); $26 = !($25 >= 0.25); if ($26) { $27 = HEAP32[450776]|0; $28 = HEAP32[(1103564)>>2]|0; $29 = Math_imul($28, $22)|0; $30 = (($29) + ($18))|0; $31 = (($27) + ($30<<1)|0); $32 = HEAP16[$31>>1]|0; $33 = $32 << 16 >> 16; $34 = (($33) + 1)|0; $35 = HEAP32[(1103568)>>2]|0; $36 = ($34|0)<($35|0); if ($36) { $37 = (_Random_Next(1085016,3)|0); $38 = (($37) + 5)|0; $39 = ($32<<16>>16)>(-1); if ($39) { $40 = HEAP32[(1103572)>>2]|0; $41 = Math_imul($40, $34)|0; $42 = (($41) + ($22))|0; $43 = HEAP32[(1103564)>>2]|0; $44 = Math_imul($42, $43)|0; $45 = (($44) + ($18))|0; $46 = HEAP32[450775]|0; $47 = HEAP32[(1103588)>>2]|0; $48 = (($45) - ($47))|0; $49 = (($46) + ($48)|0); $50 = HEAP8[$49>>0]|0; $51 = ($50<<24>>24)==(2); if ($51) { $52 = (_TreeGen_CanGrow($18,$34,$22,$38)|0); $53 = ($52<<24>>24)==(0); if (!($53)) { $54 = (_TreeGen_Grow($18,$34,$22,$38,$0,$1)|0); $55 = ($54|0)>(0); if ($55) { $$070 = 0; while(1) { $56 = (((($0) + (($$070*12)|0)|0)) + 4|0); $57 = HEAP32[$56>>2]|0; $58 = HEAP32[(1103572)>>2]|0; $59 = Math_imul($58, $57)|0; $60 = (((($0) + (($$070*12)|0)|0)) + 8|0); $61 = HEAP32[$60>>2]|0; $62 = (($59) + ($61))|0; $63 = HEAP32[(1103564)>>2]|0; $64 = Math_imul($62, $63)|0; $65 = (($0) + (($$070*12)|0)|0); $66 = HEAP32[$65>>2]|0; $67 = (($64) + ($66))|0; $68 = (($1) + ($$070)|0); $69 = HEAP8[$68>>0]|0; $70 = HEAP32[450775]|0; $71 = (($70) + ($67)|0); HEAP8[$71>>0] = $69; $72 = (($$070) + 1)|0; $exitcond = ($72|0)==($54|0); if ($exitcond) { break; } else { $$070 = $72; } } } } } } } } } $73 = (($$06573) + 1)|0; $exitcond77 = ($73|0)==(20); if ($exitcond77) { break; } else { $$06573 = $73;$$06872 = $18;$$06971 = $22; } } $74 = (($$06674) + 1)|0; $exitcond78 = ($74|0)==(20); if ($exitcond78) { break; } else { $$06674 = $74; } } $75 = (($$06775) + 1)|0; $exitcond79 = ($75|0)==($6|0); if ($exitcond79) { break; } else { $$06775 = $75; } } STACKTOP = sp;return; } function _World_ContainsXZ_661($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = ($2>>>0)>($0>>>0); $4 = HEAP32[(1103572)>>2]|0; $5 = ($4>>>0)>($1>>>0); $narrow = $3 & $5; $6 = $narrow&1; return ($6|0); } function _TreeGen_CanGrow($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$05265 = 0, $$05463 = 0, $$056 = 0, $$064 = 0, $$15560 = 0, $$15560$1 = 0, $$15560$2 = 0, $$15560$3 = 0, $$161 = 0, $$161$1 = 0, $$161$2 = 0, $$161$3 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0; var $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0; var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0; var $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, label = 0; var sp = 0; sp = STACKTOP; $4 = (($3) + ($1))|0; $5 = (($4) + -4)|0; $6 = ($5|0)>($1|0); L1: do { if ($6) { $7 = (($2) + -1)|0; $8 = (($0) + -1)|0; $9 = HEAP32[(1103572)>>2]|0; $10 = HEAP32[(1103564)>>2]|0; $11 = HEAP32[450772]|0; $$05265 = $1; L3: while(1) { $12 = Math_imul($9, $$05265)|0; $$064 = $7; while(1) { $13 = (($12) + ($$064))|0; $14 = Math_imul($13, $10)|0; $$05463 = $8; while(1) { $17 = (_World_Contains_666($$05463,$$05265,$$064)|0); $18 = ($17<<24>>24)==(0); if ($18) { $$056 = 0; label = 18; break L3; } $19 = (($14) + ($$05463))|0; $20 = (($11) + ($19)|0); $21 = HEAP8[$20>>0]|0; $22 = ($21<<24>>24)==(0); if (!($22)) { $$056 = 0; label = 18; break L3; } $15 = (($$05463) + 1)|0; $16 = ($$05463|0)>($0|0); if ($16) { break; } else { $$05463 = $15; } } $23 = (($$064) + 1)|0; $24 = ($$064|0)>($2|0); if ($24) { break; } else { $$064 = $23; } } $25 = (($$05265) + 1)|0; $26 = ($25|0)<($5|0); if ($26) { $$05265 = $25; } else { break L1; } } if ((label|0) == 18) { return ($$056|0); } } } while(0); $27 = (($3) + ($1))|0; $28 = ($5|0)<($27|0); if (!($28)) { $$056 = 1; return ($$056|0); } $29 = (($2) + -2)|0; $30 = (($2) + 2)|0; $31 = (($0) + -2)|0; $32 = (($0) + 2)|0; $33 = HEAP32[(1103572)>>2]|0; $34 = HEAP32[(1103564)>>2]|0; $35 = HEAP32[450772]|0; $36 = Math_imul($33, $5)|0; $$161 = $29; L20: while(1) { $37 = (($36) + ($$161))|0; $38 = Math_imul($37, $34)|0; $$15560 = $31; while(1) { $41 = (_World_Contains_666($$15560,$5,$$161)|0); $42 = ($41<<24>>24)==(0); if ($42) { $$056 = 0; label = 18; break L20; } $43 = (($38) + ($$15560))|0; $44 = (($35) + ($43)|0); $45 = HEAP8[$44>>0]|0; $46 = ($45<<24>>24)==(0); if (!($46)) { $$056 = 0; label = 18; break L20; } $39 = (($$15560) + 1)|0; $40 = ($$15560|0)<($32|0); if ($40) { $$15560 = $39; } else { break; } } $47 = (($$161) + 1)|0; $48 = ($$161|0)<($30|0); if ($48) { $$161 = $47; } else { label = 17; break; } } if ((label|0) == 17) { $49 = (($4) + -3)|0; $50 = Math_imul($33, $49)|0; $$161$1 = $29; L29: while(1) { $51 = (($50) + ($$161$1))|0; $52 = Math_imul($51, $34)|0; $$15560$1 = $31; while(1) { $53 = (_World_Contains_666($$15560$1,$49,$$161$1)|0); $54 = ($53<<24>>24)==(0); if ($54) { $$056 = 0; label = 18; break L29; } $55 = (($52) + ($$15560$1))|0; $56 = (($35) + ($55)|0); $57 = HEAP8[$56>>0]|0; $58 = ($57<<24>>24)==(0); if (!($58)) { $$056 = 0; label = 18; break L29; } $59 = (($$15560$1) + 1)|0; $60 = ($$15560$1|0)<($32|0); if ($60) { $$15560$1 = $59; } else { break; } } $61 = (($$161$1) + 1)|0; $62 = ($$161$1|0)<($30|0); if ($62) { $$161$1 = $61; } else { label = 24; break; } } if ((label|0) == 18) { return ($$056|0); } else if ((label|0) == 24) { $63 = (($4) + -2)|0; $64 = Math_imul($33, $63)|0; $$161$2 = $29; L38: while(1) { $65 = (($64) + ($$161$2))|0; $66 = Math_imul($65, $34)|0; $$15560$2 = $31; while(1) { $67 = (_World_Contains_666($$15560$2,$63,$$161$2)|0); $68 = ($67<<24>>24)==(0); if ($68) { $$056 = 0; label = 18; break L38; } $69 = (($66) + ($$15560$2))|0; $70 = (($35) + ($69)|0); $71 = HEAP8[$70>>0]|0; $72 = ($71<<24>>24)==(0); if (!($72)) { $$056 = 0; label = 18; break L38; } $73 = (($$15560$2) + 1)|0; $74 = ($$15560$2|0)<($32|0); if ($74) { $$15560$2 = $73; } else { break; } } $75 = (($$161$2) + 1)|0; $76 = ($$161$2|0)<($30|0); if ($76) { $$161$2 = $75; } else { label = 30; break; } } if ((label|0) == 18) { return ($$056|0); } else if ((label|0) == 30) { $77 = (($4) + -1)|0; $78 = Math_imul($33, $77)|0; $$161$3 = $29; L47: while(1) { $79 = (($78) + ($$161$3))|0; $80 = Math_imul($79, $34)|0; $$15560$3 = $31; while(1) { $81 = (_World_Contains_666($$15560$3,$77,$$161$3)|0); $82 = ($81<<24>>24)==(0); if ($82) { $$056 = 0; label = 18; break L47; } $83 = (($80) + ($$15560$3))|0; $84 = (($35) + ($83)|0); $85 = HEAP8[$84>>0]|0; $86 = ($85<<24>>24)==(0); if (!($86)) { $$056 = 0; label = 18; break L47; } $87 = (($$15560$3) + 1)|0; $88 = ($$15560$3|0)<($32|0); if ($88) { $$15560$3 = $87; } else { break; } } $89 = (($$161$3) + 1)|0; $90 = ($$161$3|0)<($30|0); if ($90) { $$161$3 = $89; } else { $$056 = 1; label = 18; break; } } if ((label|0) == 18) { return ($$056|0); } } } } else if ((label|0) == 18) { return ($$056|0); } return (0)|0; } function _TreeGen_Grow($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$0$lcssa = 0, $$0111133 = 0, $$0111133$1 = 0, $$0113131 = 0, $$0113131$1 = 0, $$0115$lcssa = 0, $$1112123 = 0, $$1116132 = 0, $$1116132$1 = 0, $$1125 = 0, $$2117130 = 0, $$2117130$1 = 0, $$2119 = 0, $$3 = 0, $$3$1 = 0, $$4$lcssa = 0, $$4124 = 0, $$5122 = 0, $$7 = 0, $$7$2 = 0; var $$8$lcssa = 0, $$8118 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0; var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0; var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0.0, $97 = 0, $98 = 0; var $99 = 0, $exitcond = 0, $exitcond143 = 0, $exitcond144 = 0, $exitcond145 = 0, $exitcond145$1 = 0, $exitcond146 = 0, $exitcond146$1 = 0, label = 0, sp = 0; sp = STACKTOP; $6 = (($3) + ($1))|0; $7 = (($6) + -2)|0; $8 = (($3) + ($1))|0; $9 = (($8) + -4)|0; $10 = ($9|0)<($7|0); if ($10) { $$0111133 = -2;$$1116132 = 0; while(1) { $11 = (($$0111133) + ($2))|0; $$0113131 = -2;$$2117130 = $$1116132; while(1) { $12 = (($$0113131) + ($0))|0; $13 = (_Math_AbsI($$0113131)|0); $14 = ($13|0)==(2); if ($14) { $15 = (_Math_AbsI($$0111133)|0); $16 = ($15|0)==(2); if ($16) { $17 = HEAP32[450773]|0; $18 = (+_Random_Float($17)); $19 = !($18 >= 0.5); if ($19) { $$3 = $$2117130; } else { $20 = (($$2117130) + 1)|0; $21 = (($5) + ($$2117130)|0); $22 = (((($4) + (($$2117130*12)|0)|0)) + 8|0); $23 = (((($4) + (($$2117130*12)|0)|0)) + 4|0); $24 = (($4) + (($$2117130*12)|0)|0); HEAP32[$24>>2] = $12; HEAP32[$23>>2] = $9; HEAP32[$22>>2] = $11; HEAP8[$21>>0] = 18; $$3 = $20; } } else { label = 8; } } else { label = 8; } if ((label|0) == 8) { label = 0; $25 = (($4) + (($$2117130*12)|0)|0); HEAP32[$25>>2] = $12; $26 = (((($4) + (($$2117130*12)|0)|0)) + 4|0); HEAP32[$26>>2] = $9; $27 = (((($4) + (($$2117130*12)|0)|0)) + 8|0); HEAP32[$27>>2] = $11; $28 = (($5) + ($$2117130)|0); HEAP8[$28>>0] = 18; $29 = (($$2117130) + 1)|0; $$3 = $29; } $30 = (($$0113131) + 1)|0; $exitcond145 = ($30|0)==(3); if ($exitcond145) { break; } else { $$0113131 = $30;$$2117130 = $$3; } } $31 = (($$0111133) + 1)|0; $exitcond146 = ($31|0)==(3); if ($exitcond146) { break; } else { $$0111133 = $31;$$1116132 = $$3; } } $32 = (($8) + -3)|0; $$0111133$1 = -2;$$1116132$1 = $$3; while(1) { $84 = (($$0111133$1) + ($2))|0; $$0113131$1 = -2;$$2117130$1 = $$1116132$1; while(1) { $85 = (($$0113131$1) + ($0))|0; $86 = (_Math_AbsI($$0113131$1)|0); $87 = ($86|0)==(2); if ($87) { $88 = (_Math_AbsI($$0111133$1)|0); $89 = ($88|0)==(2); if ($89) { $95 = HEAP32[450773]|0; $96 = (+_Random_Float($95)); $97 = !($96 >= 0.5); if ($97) { $$3$1 = $$2117130$1; } else { $98 = (($$2117130$1) + 1)|0; $99 = (($5) + ($$2117130$1)|0); $100 = (((($4) + (($$2117130$1*12)|0)|0)) + 8|0); $101 = (((($4) + (($$2117130$1*12)|0)|0)) + 4|0); $102 = (($4) + (($$2117130$1*12)|0)|0); HEAP32[$102>>2] = $85; HEAP32[$101>>2] = $32; HEAP32[$100>>2] = $84; HEAP8[$99>>0] = 18; $$3$1 = $98; } } else { label = 35; } } else { label = 35; } if ((label|0) == 35) { label = 0; $90 = (($4) + (($$2117130$1*12)|0)|0); HEAP32[$90>>2] = $85; $91 = (((($4) + (($$2117130$1*12)|0)|0)) + 4|0); HEAP32[$91>>2] = $32; $92 = (((($4) + (($$2117130$1*12)|0)|0)) + 8|0); HEAP32[$92>>2] = $84; $93 = (($5) + ($$2117130$1)|0); HEAP8[$93>>0] = 18; $94 = (($$2117130$1) + 1)|0; $$3$1 = $94; } $103 = (($$0113131$1) + 1)|0; $exitcond145$1 = ($103|0)==(3); if ($exitcond145$1) { break; } else { $$0113131$1 = $103;$$2117130$1 = $$3$1; } } $104 = (($$0111133$1) + 1)|0; $exitcond146$1 = ($104|0)==(3); if ($exitcond146$1) { $$0$lcssa = $7;$$0115$lcssa = $$3$1; break; } else { $$0111133$1 = $104;$$1116132$1 = $$3$1; } } } else { $$0$lcssa = $9;$$0115$lcssa = 0; } $33 = (($3) + ($1))|0; $34 = ($$0$lcssa|0)<($33|0); if ($34) { $35 = (($0) + -1)|0; $36 = (($0) + 1)|0; $$1125 = $$0$lcssa;$$4124 = $$0115$lcssa; while(1) { $37 = ($$1125|0)==($7|0); $$1112123 = -1;$$5122 = $$4124; while(1) { $38 = (($$1112123) + ($2))|0; $39 = ($$1112123|0)==(0); if ($39) { $40 = (($4) + (($$5122*12)|0)|0); HEAP32[$40>>2] = $35; $41 = (((($4) + (($$5122*12)|0)|0)) + 4|0); HEAP32[$41>>2] = $$1125; $42 = (((($4) + (($$5122*12)|0)|0)) + 8|0); HEAP32[$42>>2] = $38; $43 = (($5) + ($$5122)|0); HEAP8[$43>>0] = 18; $44 = (($$5122) + 1)|0; $$7 = $44; } else { if ($37) { $45 = HEAP32[450773]|0; $46 = (+_Random_Float($45)); $47 = !($46 >= 0.5); if ($47) { $$7 = $$5122; } else { $48 = (($$5122) + 1)|0; $49 = (($5) + ($$5122)|0); $50 = (((($4) + (($$5122*12)|0)|0)) + 8|0); $51 = (((($4) + (($$5122*12)|0)|0)) + 4|0); $52 = (($4) + (($$5122*12)|0)|0); HEAP32[$52>>2] = $35; HEAP32[$51>>2] = $$1125; HEAP32[$50>>2] = $38; HEAP8[$49>>0] = 18; $$7 = $48; } } else { $$7 = $$5122; } } $65 = (($4) + (($$7*12)|0)|0); HEAP32[$65>>2] = $0; $66 = (((($4) + (($$7*12)|0)|0)) + 4|0); HEAP32[$66>>2] = $$1125; $67 = (((($4) + (($$7*12)|0)|0)) + 8|0); HEAP32[$67>>2] = $38; $68 = (($5) + ($$7)|0); HEAP8[$68>>0] = 18; $69 = (($$7) + 1)|0; if ($39) { $78 = (($4) + (($69*12)|0)|0); HEAP32[$78>>2] = $36; $79 = (((($4) + (($69*12)|0)|0)) + 4|0); HEAP32[$79>>2] = $$1125; $80 = (((($4) + (($69*12)|0)|0)) + 8|0); HEAP32[$80>>2] = $38; $81 = (($5) + ($69)|0); HEAP8[$81>>0] = 18; $82 = (($$7) + 2)|0; $$7$2 = $82; } else { if ($37) { $70 = HEAP32[450773]|0; $71 = (+_Random_Float($70)); $72 = !($71 >= 0.5); if ($72) { $$7$2 = $69; } else { $73 = (($$7) + 2)|0; $74 = (($5) + ($69)|0); $75 = (((($4) + (($69*12)|0)|0)) + 8|0); $76 = (((($4) + (($69*12)|0)|0)) + 4|0); $77 = (($4) + (($69*12)|0)|0); HEAP32[$77>>2] = $36; HEAP32[$76>>2] = $$1125; HEAP32[$75>>2] = $38; HEAP8[$74>>0] = 18; $$7$2 = $73; } } else { $$7$2 = $69; } } $83 = (($$1112123) + 1)|0; $exitcond143 = ($83|0)==(2); if ($exitcond143) { break; } else { $$1112123 = $83;$$5122 = $$7$2; } } $53 = (($$1125) + 1)|0; $exitcond144 = ($53|0)==($33|0); if ($exitcond144) { $$4$lcssa = $$7$2; break; } else { $$1125 = $53;$$4124 = $$7$2; } } } else { $$4$lcssa = $$0115$lcssa; } $54 = (($3) + -1)|0; $55 = ($3|0)>(1); if (!($55)) { $$8$lcssa = $$4$lcssa; return ($$8$lcssa|0); } $56 = (($$4$lcssa) + ($3))|0; $$2119 = 0;$$8118 = $$4$lcssa; while(1) { $57 = (($4) + (($$8118*12)|0)|0); HEAP32[$57>>2] = $0; $58 = (($$2119) + ($1))|0; $59 = (((($4) + (($$8118*12)|0)|0)) + 4|0); HEAP32[$59>>2] = $58; $60 = (((($4) + (($$8118*12)|0)|0)) + 8|0); HEAP32[$60>>2] = $2; $61 = (($5) + ($$8118)|0); HEAP8[$61>>0] = 17; $62 = (($$8118) + 1)|0; $63 = (($$2119) + 1)|0; $exitcond = ($63|0)==($54|0); if ($exitcond) { break; } else { $$2119 = $63;$$8118 = $62; } } $64 = (($56) + -1)|0; $$8$lcssa = $64; return ($$8$lcssa|0); } function _World_Contains_666($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1103564)>>2]|0; $4 = ($3>>>0)>($0>>>0); $5 = HEAP32[(1103568)>>2]|0; $6 = ($5>>>0)>($1>>>0); $or$cond = $4 & $6; $7 = HEAP32[(1103572)>>2]|0; $8 = ($7>>>0)>($2>>>0); $narrow = $or$cond & $8; $9 = $narrow&1; return ($9|0); } function _OctaveNoise_Init($0,$1) { $0 = $0|0; $1 = $1|0; var $$01 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4096|0); HEAP32[$2>>2] = $1; $3 = ($1|0)>(0); if (!($3)) { return; } $$01 = 0; while(1) { $4 = (($0) + ($$01<<9)|0); _ImprovedNoise_Init($4); $5 = (($$01) + 1)|0; $exitcond = ($5|0)==($1|0); if ($exitcond) { break; } else { $$01 = $5; } } return; } function _OctaveNoise_Calc($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = +$2; var $$020$lcssa = 0.0, $$02025 = 0.0, $$02124 = 0.0, $$02223 = 0.0, $$026 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0; var sp = 0; sp = STACKTOP; $3 = ((($0)) + 4096|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if (!($5)) { $$020$lcssa = 0.0; return (+$$020$lcssa); } $6 = HEAP32[$3>>2]|0; $$02025 = 0.0;$$02124 = 1.0;$$02223 = 1.0;$$026 = 0; while(1) { $7 = (($0) + ($$026<<9)|0); $8 = $$02124 * $1; $9 = $$02124 * $2; $10 = (+_ImprovedNoise_Calc($7,$8,$9)); $11 = $$02223 * $10; $12 = $$02025 + $11; $13 = $$02223 * 2.0; $14 = $$02124 * 0.5; $15 = (($$026) + 1)|0; $16 = ($15|0)<($6|0); if ($16) { $$02025 = $12;$$02124 = $14;$$02223 = $13;$$026 = $15; } else { $$020$lcssa = $12; break; } } return (+$$020$lcssa); } function _ImprovedNoise_Calc($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = +$2; var $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0.0, $116 = 0.0, $117 = 0; var $118 = 0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0; var $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0; var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0.0; var $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0; var $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0; var $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0, $98 = 0, $99 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = !($1 >= 0.0); $4 = (~~(($1))); $5 = $3 << 31 >> 31; $6 = (($5) + ($4))|0; $7 = !($2 >= 0.0); $8 = (~~(($2))); $9 = $7 << 31 >> 31; $10 = (($9) + ($8))|0; $11 = $6 & 255; $12 = $10 & 255; $13 = (+($6|0)); $14 = $1 - $13; $15 = (+($10|0)); $16 = $2 - $15; $17 = $14 * $14; $18 = $14 * $17; $19 = $14 * 6.0; $20 = $19 + -15.0; $21 = $14 * $20; $22 = $21 + 10.0; $23 = $18 * $22; $24 = $16 * $16; $25 = $16 * $24; $26 = $16 * 6.0; $27 = $26 + -15.0; $28 = $16 * $27; $29 = $28 + 10.0; $30 = $25 * $29; $31 = (($0) + ($11)|0); $32 = HEAP8[$31>>0]|0; $33 = $32&255; $34 = (($12) + ($33))|0; $35 = (($11) + 1)|0; $36 = (($0) + ($35)|0); $37 = HEAP8[$36>>0]|0; $38 = $37&255; $39 = (($12) + ($38))|0; $40 = (($0) + ($34)|0); $41 = HEAP8[$40>>0]|0; $42 = $41&255; $43 = (($0) + ($42)|0); $44 = HEAP8[$43>>0]|0; $45 = ($44 << 1)&255; $46 = $45 & 30; $47 = $46&255; $48 = ($47)?(1179984418 >>> $47):(1179984418); $49 = $48 & 3; $50 = (($49) + -1)|0; $51 = (+($50|0)); $52 = $14 * $51; $53 = ($47)?(572675338 >>> $47):(572675338); $54 = $53 & 3; $55 = (($54) + -1)|0; $56 = (+($55|0)); $57 = $16 * $56; $58 = $52 + $57; $59 = (($0) + ($39)|0); $60 = HEAP8[$59>>0]|0; $61 = $60&255; $62 = (($0) + ($61)|0); $63 = HEAP8[$62>>0]|0; $64 = ($63 << 1)&255; $65 = $64 & 30; $66 = $65&255; $67 = ($66)?(1179984418 >>> $66):(1179984418); $68 = $67 & 3; $69 = (($68) + -1)|0; $70 = (+($69|0)); $71 = $14 + -1.0; $72 = $71 * $70; $73 = ($66)?(572675338 >>> $66):(572675338); $74 = $73 & 3; $75 = (($74) + -1)|0; $76 = (+($75|0)); $77 = $16 * $76; $78 = $72 + $77; $79 = $78 - $58; $80 = $23 * $79; $81 = $58 + $80; $82 = (($34) + 1)|0; $83 = (($0) + ($82)|0); $84 = HEAP8[$83>>0]|0; $85 = $84&255; $86 = (($0) + ($85)|0); $87 = HEAP8[$86>>0]|0; $88 = ($87 << 1)&255; $89 = $88 & 30; $90 = $89&255; $91 = ($90)?(1179984418 >>> $90):(1179984418); $92 = $91 & 3; $93 = (($92) + -1)|0; $94 = (+($93|0)); $95 = $14 * $94; $96 = ($90)?(572675338 >>> $90):(572675338); $97 = $96 & 3; $98 = (($97) + -1)|0; $99 = (+($98|0)); $100 = $16 + -1.0; $101 = $100 * $99; $102 = $95 + $101; $103 = (($39) + 1)|0; $104 = (($0) + ($103)|0); $105 = HEAP8[$104>>0]|0; $106 = $105&255; $107 = (($0) + ($106)|0); $108 = HEAP8[$107>>0]|0; $109 = ($108 << 1)&255; $110 = $109 & 30; $111 = $110&255; $112 = ($111)?(1179984418 >>> $111):(1179984418); $113 = $112 & 3; $114 = (($113) + -1)|0; $115 = (+($114|0)); $116 = $71 * $115; $117 = ($111)?(572675338 >>> $111):(572675338); $118 = $117 & 3; $119 = (($118) + -1)|0; $120 = (+($119|0)); $121 = $100 * $120; $122 = $116 + $121; $123 = $122 - $102; $124 = $23 * $123; $125 = $102 + $124; $126 = $125 - $81; $127 = $30 * $126; $128 = $81 + $127; return (+$128); } function _ImprovedNoise_Init($0) { $0 = $0|0; var $$03 = 0, $$12 = 0, $$21 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond4 = 0, $exitcond5 = 0; var label = 0, sp = 0; sp = STACKTOP; $$03 = 0; while(1) { $1 = $$03&255; $2 = (($0) + ($$03)|0); HEAP8[$2>>0] = $1; $3 = (($$03) + 1)|0; $exitcond5 = ($3|0)==(256); if ($exitcond5) { break; } else { $$03 = $3; } } $$12 = 0; while(1) { $4 = (_Random_Range_670($$12,256)|0); $5 = (($0) + ($$12)|0); $6 = HEAP8[$5>>0]|0; $7 = (($0) + ($4)|0); $8 = HEAP8[$7>>0]|0; HEAP8[$5>>0] = $8; HEAP8[$7>>0] = $6; $9 = (($$12) + 1)|0; $exitcond4 = ($9|0)==(256); if ($exitcond4) { break; } else { $$12 = $9; } } $$21 = 0; while(1) { $10 = (($0) + ($$21)|0); $11 = HEAP8[$10>>0]|0; $12 = (($$21) + 256)|0; $13 = (($0) + ($12)|0); HEAP8[$13>>0] = $11; $14 = (($$21) + 1)|0; $exitcond = ($14|0)==(256); if ($exitcond) { break; } else { $$21 = $14; } } return; } function _Random_Range_670($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (($1) - ($0))|0; $3 = (_Random_Next(1085016,$2)|0); $4 = (($3) + ($0))|0; return ($4|0); } function _NotchyGen_FloodFill($0,$1) { $0 = $0|0; $1 = $1|0; var $$0$be = 0, $$034 = 0, $$1 = 0, $$2 = 0, $$3 = 0, $$4 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32784|0; $2 = sp + 32772|0; $3 = sp; $4 = sp + 32768|0; HEAP32[$4>>2] = 8192; HEAP32[$2>>2] = $3; $5 = ($0|0)<(0); if ($5) { STACKTOP = sp;return; } HEAP32[$3>>2] = $0; $$034 = 1; while(1) { $6 = HEAP32[$2>>2]|0; $7 = (($$034) + -1)|0; $8 = (($6) + ($7<<2)|0); $9 = HEAP32[$8>>2]|0; $10 = HEAP32[450775]|0; $11 = (($10) + ($9)|0); $12 = HEAP8[$11>>0]|0; $13 = ($12<<24>>24)==(0); if ($13) { HEAP8[$11>>0] = $1; $15 = HEAP32[(1103564)>>2]|0; $16 = (($9|0) / ($15|0))&-1; $17 = Math_imul($16, $15)|0; $18 = (($9) - ($17))|0; $19 = HEAP32[(1103588)>>2]|0; $20 = (($9|0) / ($19|0))&-1; $21 = HEAP32[(1103572)>>2]|0; $22 = (($16|0) % ($21|0))&-1; $23 = HEAP32[$4>>2]|0; $24 = (($23) + -6)|0; $25 = ($$034|0)>($24|0); if ($25) { _Utils_Resize($2,$4,4,8192,8192); } $26 = ($18|0)>(0); if ($26) { $27 = (($9) + -1)|0; $28 = HEAP32[$2>>2]|0; $29 = (($28) + ($7<<2)|0); HEAP32[$29>>2] = $27; $$1 = $$034; } else { $$1 = $7; } $30 = HEAP32[(1103576)>>2]|0; $31 = ($18|0)<($30|0); if ($31) { $32 = (($$1) + 1)|0; $33 = (($9) + 1)|0; $34 = HEAP32[$2>>2]|0; $35 = (($34) + ($$1<<2)|0); HEAP32[$35>>2] = $33; $$2 = $32; } else { $$2 = $$1; } $36 = ($22|0)>(0); if ($36) { $37 = HEAP32[(1103564)>>2]|0; $38 = (($9) - ($37))|0; $39 = HEAP32[$2>>2]|0; $40 = (($$2) + 1)|0; $41 = (($39) + ($$2<<2)|0); HEAP32[$41>>2] = $38; $$3 = $40; } else { $$3 = $$2; } $42 = HEAP32[(1103584)>>2]|0; $43 = ($22|0)<($42|0); if ($43) { $44 = HEAP32[(1103564)>>2]|0; $45 = (($44) + ($9))|0; $46 = HEAP32[$2>>2]|0; $47 = (($$3) + 1)|0; $48 = (($46) + ($$3<<2)|0); HEAP32[$48>>2] = $45; $$4 = $47; } else { $$4 = $$3; } $49 = ($20|0)>(0); if ($49) { $50 = HEAP32[(1103588)>>2]|0; $51 = (($9) - ($50))|0; $52 = HEAP32[$2>>2]|0; $53 = (($$4) + 1)|0; $54 = (($52) + ($$4<<2)|0); HEAP32[$54>>2] = $51; $$0$be = $53; } else { $$0$be = $$4; } } else { $$0$be = $7; } $14 = ($$0$be|0)==(0); if ($14) { break; } else { $$034 = $$0$be; } } $55 = HEAP32[$4>>2]|0; $56 = ($55|0)>(8192); if (!($56)) { STACKTOP = sp;return; } $57 = HEAP32[$2>>2]|0; _Mem_Free($57); STACKTOP = sp;return; } function _NotchyGen_FillOblateSpheroid($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = +$3; $4 = $4|0; var $$ = 0.0, $$08393 = 0, $$08488 = 0, $$087 = 0, $$85 = 0.0, $$86 = 0.0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0; var $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0, $61 = 0; var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = (+($0|0)); $6 = $5 - $3; $7 = $6 > 0.0; $8 = $7 ? $6 : 0.0; $9 = (_Math_Floor($8)|0); $10 = $5 + $3; $11 = HEAP32[(1103576)>>2]|0; $12 = (+($11|0)); $13 = $10 < $12; $$ = $13 ? $10 : $12; $14 = (_Math_Floor($$)|0); $15 = (+($1|0)); $16 = $15 - $3; $17 = $16 > 0.0; $18 = $17 ? $16 : 0.0; $19 = (_Math_Floor($18)|0); $20 = $15 + $3; $21 = HEAP32[(1103580)>>2]|0; $22 = (+($21|0)); $23 = $20 < $22; $$85 = $23 ? $20 : $22; $24 = (_Math_Floor($$85)|0); $25 = (+($2|0)); $26 = $25 - $3; $27 = $26 > 0.0; $28 = $27 ? $26 : 0.0; $29 = (_Math_Floor($28)|0); $30 = $25 + $3; $31 = HEAP32[(1103584)>>2]|0; $32 = (+($31|0)); $33 = $30 < $32; $$86 = $33 ? $30 : $32; $34 = (_Math_Floor($$86)|0); $35 = $3 * $3; $36 = ($19|0)>($24|0); if ($36) { return; } $37 = ($29|0)>($34|0); $38 = ($9|0)>($14|0); $$08393 = $19; while(1) { $39 = (($$08393) - ($1))|0; if (!($37)) { $40 = $39 << 1; $41 = Math_imul($40, $39)|0; $$08488 = $29; while(1) { $42 = (($$08488) - ($2))|0; if (!($38)) { $43 = Math_imul($42, $42)|0; $44 = (($43) + ($41))|0; $$087 = $9; while(1) { $45 = (($$087) - ($0))|0; $46 = Math_imul($45, $45)|0; $47 = (($44) + ($46))|0; $48 = (+($47|0)); $49 = $35 > $48; if ($49) { $50 = HEAP32[(1103572)>>2]|0; $51 = Math_imul($50, $$08393)|0; $52 = (($51) + ($$08488))|0; $53 = HEAP32[(1103564)>>2]|0; $54 = Math_imul($52, $53)|0; $55 = (($54) + ($$087))|0; $56 = HEAP32[450775]|0; $57 = (($56) + ($55)|0); $58 = HEAP8[$57>>0]|0; $59 = ($58<<24>>24)==(1); if ($59) { HEAP8[$57>>0] = $4; } } $60 = (($$087) + 1)|0; $61 = ($$087|0)<($14|0); if ($61) { $$087 = $60; } else { break; } } } $62 = (($$08488) + 1)|0; $63 = ($$08488|0)<($34|0); if ($63) { $$08488 = $62; } else { break; } } } $64 = (($$08393) + 1)|0; $65 = ($$08393|0)<($24|0); if ($65) { $$08393 = $64; } else { break; } } return; } function _NotchyGen_CreateStrataFast() { var $$028 = 0, $$1 = 0, $$126 = 0, $$127 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0; var $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1103588)>>2]|0; HEAPF32[450774] = 0.0; HEAP32[450770] = 30011; $1 = HEAP32[450775]|0; _Mem_Set($1,11,$0); $2 = HEAP32[450778]|0; $3 = (($2) + -14)|0; $4 = ($2|0)<(15); if (!($4)) { $5 = (($2) + -13)|0; $$028 = 1; while(1) { $6 = HEAP32[450775]|0; $7 = Math_imul($$028, $0)|0; $8 = (($6) + ($7)|0); _Mem_Set($8,1,$0); $9 = (+($$028|0)); $10 = HEAP32[(1103568)>>2]|0; $11 = (+($10|0)); $12 = $9 / $11; HEAPF32[450774] = $12; $13 = (($$028) + 1)|0; $exitcond = ($13|0)==($5|0); if ($exitcond) { break; } else { $$028 = $13; } } } $14 = ($3|0)>(0); $15 = $14 ? $3 : 0; $$126 = (($15) + 1)|0; $16 = HEAP32[(1103568)>>2]|0; $17 = ($$126|0)<($16|0); if (!($17)) { $26 = ($3|0)>(1); $27 = $26 ? $3 : 1; return ($27|0); } $$127 = $$126; while(1) { $18 = HEAP32[450775]|0; $19 = Math_imul($$127, $0)|0; $20 = (($18) + ($19)|0); _Mem_Set($20,0,$0); $21 = (+($$127|0)); $22 = HEAP32[(1103568)>>2]|0; $23 = (+($22|0)); $24 = $21 / $23; HEAPF32[450774] = $24; $$1 = (($$127) + 1)|0; $25 = ($$1|0)<($22|0); if ($25) { $$127 = $$1; } else { break; } } $26 = ($3|0)>(1); $27 = $26 ? $3 : 1; return ($27|0); } function _CombinedNoise_Init($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; _OctaveNoise_Init($0,8); $1 = ((($0)) + 4100|0); _OctaveNoise_Init($1,8); return; } function _CombinedNoise_Calc($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = +$2; var $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 4100|0); $4 = (+_OctaveNoise_Calc($3,$1,$2)); $5 = $4 + $1; $6 = (+_OctaveNoise_Calc($0,$5,$2)); return (+$6); } function _OnInit_687() { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; _Event_Register((1793528),0,329); _Event_Register((1793788),0,330); $0 = (_Options_GetBool(39625,0)|0); HEAP8[(1803129)>>0] = $0; $1 = HEAP8[(1803128)>>0]|0; $2 = ($1<<24>>24)==(0); if (!($2)) { return; } _OnContextRecreated_689(0); return; } function _OnContextLost_688($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_FreeState(); return; } function _OnContextRecreated_689($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_RestoreState(); return; } function _Gfx_RestoreState() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp + 4|0; $1 = sp; _InitDefaultResources(); _glEnableVertexAttribArray(0); _glEnableVertexAttribArray(1); HEAP32[3619] = -1; _DirtyUniform(31); $2 = HEAP32[450817]|0; _GL_ClearColor($2); _glBlendFunc(770,771); _glDepthFunc(515); HEAP32[$1>>2] = -1; $3 = ((($0)) + 4|0); HEAP32[$3>>2] = 1; $4 = ((($0)) + 8|0); HEAP32[$4>>2] = 1; HEAP32[$0>>2] = $1; _Gfx_RecreateTexture(1803272,$0,0,0); STACKTOP = sp;return; } function _InitDefaultResources() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 196608|0; $0 = sp; _MakeIndices($0); $1 = (_Gfx_CreateIb($0,98304)|0); HEAP32[450819] = $1; _Gfx_RecreateDynamicVb(1803260,0,4); _Gfx_RecreateDynamicVb(1803264,1,4); STACKTOP = sp;return; } function _DirtyUniform($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(4084)>>2]|0; $2 = $1 | $0; HEAP32[(4084)>>2] = $2; $3 = HEAP32[(4116)>>2]|0; $4 = $3 | $0; HEAP32[(4116)>>2] = $4; $5 = HEAP32[(4148)>>2]|0; $6 = $5 | $0; HEAP32[(4148)>>2] = $6; $7 = HEAP32[(4180)>>2]|0; $8 = $7 | $0; HEAP32[(4180)>>2] = $8; $9 = HEAP32[(4212)>>2]|0; $10 = $9 | $0; HEAP32[(4212)>>2] = $10; $11 = HEAP32[(4244)>>2]|0; $12 = $11 | $0; HEAP32[(4244)>>2] = $12; $13 = HEAP32[(4276)>>2]|0; $14 = $13 | $0; HEAP32[(4276)>>2] = $14; $15 = HEAP32[(4308)>>2]|0; $16 = $15 | $0; HEAP32[(4308)>>2] = $16; $17 = HEAP32[(4340)>>2]|0; $18 = $17 | $0; HEAP32[(4340)>>2] = $18; $19 = HEAP32[(4372)>>2]|0; $20 = $19 | $0; HEAP32[(4372)>>2] = $20; $21 = HEAP32[(4404)>>2]|0; $22 = $21 | $0; HEAP32[(4404)>>2] = $22; $23 = HEAP32[(4436)>>2]|0; $24 = $23 | $0; HEAP32[(4436)>>2] = $24; $25 = HEAP32[(4468)>>2]|0; $26 = $25 | $0; HEAP32[(4468)>>2] = $26; $27 = HEAP32[(4500)>>2]|0; $28 = $27 | $0; HEAP32[(4500)>>2] = $28; $29 = HEAP32[(4532)>>2]|0; $30 = $29 | $0; HEAP32[(4532)>>2] = $30; $31 = HEAP32[(4564)>>2]|0; $32 = $31 | $0; HEAP32[(4564)>>2] = $32; $33 = HEAP32[(4596)>>2]|0; $34 = $33 | $0; HEAP32[(4596)>>2] = $34; $35 = HEAP32[(4628)>>2]|0; $36 = $35 | $0; HEAP32[(4628)>>2] = $36; return; } function _GL_ClearColor($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0 & 255; $2 = (+($1|0)); $3 = $2 / 255.0; $4 = (8)?($0 >>> 8):($0); $5 = $4 & 255; $6 = (+($5|0)); $7 = $6 / 255.0; $8 = (16)?($0 >>> 16):($0); $9 = $8 & 255; $10 = (+($9|0)); $11 = $10 / 255.0; $12 = (24)?($0 >>> 24):($0); $13 = (+($12|0)); $14 = $13 / 255.0; _glClearColor((+$3),(+$7),(+$11),(+$14)); return; } function _Gfx_RecreateTexture($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteTexture($0); $4 = (_Gfx_CreateTexture($1,0,$3)|0); HEAP32[$0>>2] = $4; return; } function _Gfx_DeleteTexture($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = HEAP32[$0>>2]|0; HEAP32[$1>>2] = $2; $3 = ($2|0)==(0); if ($3) { STACKTOP = sp;return; } _glDeleteTextures(1,($1|0)); HEAP32[$0>>2] = 0; STACKTOP = sp;return; } function _Gfx_CreateTexture($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; _glGenTextures(1,($3|0)); $4 = HEAP32[$3>>2]|0; _glBindTexture(3553,($4|0)); _glTexParameteri(3553,10240,9728); $5 = ((($0)) + 4|0); $6 = HEAP32[$5>>2]|0; $7 = (_Math_IsPowOf2($6)|0); $8 = ($7<<24>>24)==(0); if ($8) { label = 3; } else { $9 = ((($0)) + 8|0); $10 = HEAP32[$9>>2]|0; $11 = (_Math_IsPowOf2($10)|0); $12 = ($11<<24>>24)==(0); if ($12) { label = 3; } } if ((label|0) == 3) { _Logger_Abort(30107); } $13 = HEAP8[(1803128)>>0]|0; $14 = ($13<<24>>24)==(0); if (!($14)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $15 = ($2<<24>>24)!=(0); if ($15) { _glTexParameteri(3553,10241,9986); } else { _glTexParameteri(3553,10241,9728); } $16 = HEAP32[$5>>2]|0; $17 = ((($0)) + 8|0); $18 = HEAP32[$17>>2]|0; $19 = HEAP32[$0>>2]|0; _glTexImage2D(3553,0,6408,($16|0),($18|0),0,6408,5121,($19|0)); if ($15) { $20 = HEAP32[$5>>2]|0; _Gfx_DoMipmaps(0,0,$0,$20,0); } $21 = HEAP32[$3>>2]|0; $$0 = $21; STACKTOP = sp;return ($$0|0); } function _Gfx_DoMipmaps($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$04961 = 0, $$05160 = 0, $$05259 = 0, $$05358 = 0, $$054$lcssa = 0, $$05457 = 0, $$05556 = 0, $$062 = 0, $$1 = 0, $$150 = 0, $$lcssa = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; var $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $5 = HEAP32[$2>>2]|0; $6 = ((($2)) + 4|0); $7 = HEAP32[$6>>2]|0; $8 = ((($2)) + 8|0); $9 = HEAP32[$8>>2]|0; $10 = (_CalcMipmapsLevels($7,$9)|0); $11 = ($10|0)<(1); if ($11) { $$054$lcssa = $5;$$lcssa = $5; } else { $12 = HEAP32[$8>>2]|0; $13 = HEAP32[$6>>2]|0; $14 = ($4<<24>>24)==(0); $$04961 = $13;$$05160 = 1;$$05259 = $0;$$05358 = $1;$$05457 = $5;$$05556 = $3;$$062 = $12; while(1) { $15 = (($$05259|0) / 2)&-1; $16 = (($$05358|0) / 2)&-1; $17 = ($$04961|0)>(1); $18 = (($$04961|0) / 2)&-1; $$150 = $17 ? $18 : $$04961; $19 = ($$062|0)>(1); $20 = (($$062|0) / 2)&-1; $$1 = $19 ? $20 : $$062; $21 = Math_imul($$1, $$150)|0; $22 = (_Mem_Alloc($21,4,30150)|0); _GenMipmaps($$150,$$1,$22,$$05457,$$05556); if ($14) { _glTexImage2D(3553,($$05160|0),6408,($$150|0),($$1|0),0,6408,5121,($22|0)); } else { _glTexSubImage2D(3553,($$05160|0),($15|0),($16|0),($$150|0),($$1|0),6408,5121,($22|0)); } $23 = HEAP32[$2>>2]|0; $24 = ($$05457|0)==($23|0); if (!($24)) { _Mem_Free($$05457); } $25 = (($$05160) + 1)|0; $exitcond = ($$05160|0)==($10|0); if ($exitcond) { break; } else { $$04961 = $$150;$$05160 = $25;$$05259 = $15;$$05358 = $16;$$05457 = $22;$$05556 = $$150;$$062 = $$1; } } $$054$lcssa = $22;$$lcssa = $22; } $26 = HEAP32[$2>>2]|0; $27 = ($$054$lcssa|0)==($26|0); if ($27) { return; } _Mem_Free($$lcssa); return; } function _CalcMipmapsLevels($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Math_Log2($0)|0); $3 = (_Math_Log2($1)|0); $4 = ($2|0)>($3|0); $5 = $4 ? $2 : $3; return ($5|0); } function _GenMipmaps($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$05057 = 0, $$05259 = 0, $$05356 = 0, $$058 = 0, $$15162 = 0, $$15461 = 0, $$163 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond67 = 0; var $exitcond68 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = ($4|0)==(1); $6 = ($1|0)>(0); if ($5) { if (!($6)) { return; } $7 = $4 << 1; $$05057 = $3;$$05356 = 0;$$058 = $2; while(1) { $8 = HEAP32[$$05057>>2]|0; $9 = (($$05057) + ($4<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = (_AverageCol($8,$10)|0); HEAP32[$$058>>2] = $11; $12 = (($$058) + ($0<<2)|0); $13 = (($$05057) + ($7<<2)|0); $14 = (($$05356) + 1)|0; $exitcond = ($14|0)==($1|0); if ($exitcond) { break; } else { $$05057 = $13;$$05356 = $14;$$058 = $12; } } return; } if (!($6)) { return; } $15 = ($0|0)>(0); $16 = $4 << 1; $$15162 = $3;$$15461 = 0;$$163 = $2; while(1) { $17 = (($$15162) + ($4<<2)|0); if ($15) { $$05259 = 0; while(1) { $18 = $$05259 << 1; $19 = (($$15162) + ($18<<2)|0); $20 = HEAP32[$19>>2]|0; $21 = $18 | 1; $22 = (($$15162) + ($21<<2)|0); $23 = HEAP32[$22>>2]|0; $24 = (_AverageCol($20,$23)|0); $25 = (($17) + ($18<<2)|0); $26 = HEAP32[$25>>2]|0; $27 = (($17) + ($21<<2)|0); $28 = HEAP32[$27>>2]|0; $29 = (_AverageCol($26,$28)|0); $30 = (_AverageCol($24,$29)|0); $31 = (($$163) + ($$05259<<2)|0); HEAP32[$31>>2] = $30; $32 = (($$05259) + 1)|0; $exitcond67 = ($32|0)==($0|0); if ($exitcond67) { break; } else { $$05259 = $32; } } } $33 = (($$15162) + ($16<<2)|0); $34 = (($$163) + ($0<<2)|0); $35 = (($$15461) + 1)|0; $exitcond68 = ($35|0)==($1|0); if ($exitcond68) { break; } else { $$15162 = $33;$$15461 = $35;$$163 = $34; } } return; } function _AverageCol($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (24)?($0 >>> 24):($0); $3 = (24)?($1 >>> 24):($1); $4 = (($3) + ($2))|0; $5 = ($4|0)==(0); $6 = $5 ? 1 : $4; $7 = $0 & 255; $8 = Math_imul($7, $2)|0; $9 = (8)?($0 >>> 8):($0); $10 = $9 & 255; $11 = Math_imul($10, $2)|0; $12 = (16)?($0 >>> 16):($0); $13 = $12 & 255; $14 = Math_imul($13, $2)|0; $15 = $1 & 255; $16 = Math_imul($15, $3)|0; $17 = (8)?($1 >>> 8):($1); $18 = $17 & 255; $19 = Math_imul($18, $3)|0; $20 = (16)?($1 >>> 16):($1); $21 = $20 & 255; $22 = Math_imul($21, $3)|0; $23 = (($16) + ($8))|0; $24 = (($23>>>0) / ($6>>>0))&-1; $25 = $24 & 255; $26 = (($19) + ($11))|0; $27 = (($26>>>0) / ($6>>>0))&-1; $28 = $27 << 8; $29 = $28 & 65280; $30 = (($22) + ($14))|0; $31 = (($30>>>0) / ($6>>>0))&-1; $32 = $31 << 16; $33 = $32 & 16711680; $34 = (1)?($6 >>> 1):($6); $35 = $34 << 24; $36 = $25 | $35; $37 = $36 | $29; $38 = $37 | $33; return ($38|0); } function _MakeIndices($0) { $0 = $0|0; var $$0192 = 0, $$0201 = 0, $$03 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $$0192 = 0;$$0201 = $0;$$03 = 0; while(1) { $1 = $$0192&65535; HEAP16[$$0201>>1] = $1; $2 = $$0192 | 1; $3 = $2&65535; $4 = ((($$0201)) + 2|0); HEAP16[$4>>1] = $3; $5 = $$0192 | 2; $6 = $5&65535; $7 = ((($$0201)) + 4|0); HEAP16[$7>>1] = $6; $8 = ((($$0201)) + 6|0); HEAP16[$8>>1] = $6; $9 = $$0192 | 3; $10 = $9&65535; $11 = ((($$0201)) + 8|0); HEAP16[$11>>1] = $10; $12 = ((($$0201)) + 10|0); HEAP16[$12>>1] = $1; $13 = ((($$0201)) + 12|0); $14 = (($$0192) + 4)|0; $15 = (($$03) + 6)|0; $16 = ($15>>>0)<(98304); if ($16) { $$0192 = $14;$$0201 = $13;$$03 = $15; } else { break; } } return; } function _Gfx_CreateIb($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_GL_GenAndBind(34963)|0); $3 = $1 << 1; _glBufferData(34963,($3|0),($0|0),35044); return ($2|0); } function _Gfx_RecreateDynamicVb($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteVb($0); $3 = (_Gfx_CreateDynamicVb($1,$2)|0); HEAP32[$0>>2] = $3; return; } function _Gfx_DeleteVb($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = HEAP32[$0>>2]|0; HEAP32[$1>>2] = $2; $3 = ($2|0)==(0); if ($3) { STACKTOP = sp;return; } _glDeleteBuffers(1,($1|0)); HEAP32[$0>>2] = 0; STACKTOP = sp;return; } function _Gfx_CreateDynamicVb($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1803128)>>0]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { $$0 = 0; return ($$0|0); } $4 = (14480 + ($0<<2)|0); $5 = (_GL_GenAndBind(34962)|0); $6 = HEAP32[$4>>2]|0; $7 = Math_imul($6, $1)|0; _glBufferData(34962,($7|0),(0|0),35048); $$0 = $5; return ($$0|0); } function _GL_GenAndBind($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _glGenBuffers(1,($1|0)); $2 = HEAP32[$1>>2]|0; _glBindBuffer(($0|0),($2|0)); $3 = HEAP32[$1>>2]|0; STACKTOP = sp;return ($3|0); } function _Gfx_FreeState() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _FreeDefaultResources(); HEAP32[450820] = 0; $0 = HEAP32[(4088)>>2]|0; _glDeleteProgram(($0|0)); HEAP32[(4088)>>2] = 0; $1 = HEAP32[(4120)>>2]|0; _glDeleteProgram(($1|0)); HEAP32[(4120)>>2] = 0; $2 = HEAP32[(4152)>>2]|0; _glDeleteProgram(($2|0)); HEAP32[(4152)>>2] = 0; $3 = HEAP32[(4184)>>2]|0; _glDeleteProgram(($3|0)); HEAP32[(4184)>>2] = 0; $4 = HEAP32[(4216)>>2]|0; _glDeleteProgram(($4|0)); HEAP32[(4216)>>2] = 0; $5 = HEAP32[(4248)>>2]|0; _glDeleteProgram(($5|0)); HEAP32[(4248)>>2] = 0; $6 = HEAP32[(4280)>>2]|0; _glDeleteProgram(($6|0)); HEAP32[(4280)>>2] = 0; $7 = HEAP32[(4312)>>2]|0; _glDeleteProgram(($7|0)); HEAP32[(4312)>>2] = 0; $8 = HEAP32[(4344)>>2]|0; _glDeleteProgram(($8|0)); HEAP32[(4344)>>2] = 0; $9 = HEAP32[(4376)>>2]|0; _glDeleteProgram(($9|0)); HEAP32[(4376)>>2] = 0; $10 = HEAP32[(4408)>>2]|0; _glDeleteProgram(($10|0)); HEAP32[(4408)>>2] = 0; $11 = HEAP32[(4440)>>2]|0; _glDeleteProgram(($11|0)); HEAP32[(4440)>>2] = 0; $12 = HEAP32[(4472)>>2]|0; _glDeleteProgram(($12|0)); HEAP32[(4472)>>2] = 0; $13 = HEAP32[(4504)>>2]|0; _glDeleteProgram(($13|0)); HEAP32[(4504)>>2] = 0; $14 = HEAP32[(4536)>>2]|0; _glDeleteProgram(($14|0)); HEAP32[(4536)>>2] = 0; $15 = HEAP32[(4568)>>2]|0; _glDeleteProgram(($15|0)); HEAP32[(4568)>>2] = 0; $16 = HEAP32[(4600)>>2]|0; _glDeleteProgram(($16|0)); HEAP32[(4600)>>2] = 0; $17 = HEAP32[(4632)>>2]|0; _glDeleteProgram(($17|0)); HEAP32[(4632)>>2] = 0; _Gfx_DeleteTexture(1803272); return; } function _FreeDefaultResources() { var label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteVb(1803260); _Gfx_DeleteVb(1803264); _Gfx_DeleteIb(1803276); return; } function _Gfx_DeleteIb($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = HEAP32[$0>>2]|0; HEAP32[$1>>2] = $2; $3 = ($2|0)==(0); if ($3) { STACKTOP = sp;return; } _glDeleteBuffers(1,($1|0)); HEAP32[$0>>2] = 0; STACKTOP = sp;return; } function _Gfx_GetFog() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1972849]|0; return ($0|0); } function _Gfx_LoseContext($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803128)>>0]|0; $2 = ($1<<24>>24)==(0); if (!($2)) { return; } HEAP8[(1803128)>>0] = 1; _Platform_Log1(30158,$0); _Event_RaiseVoid((1793528)); return; } function _Gfx_RecreateContext() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1803128)>>0] = 0; _Platform_LogConst(30184); _Event_RaiseVoid((1793788)); return; } function _Gfx_RecreateAndLockVb($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteVb($0); $3 = (_Gfx_CreateVb(0,0)|0); HEAP32[$0>>2] = $3; $4 = (_Gfx_LockVb(0,$1,$2)|0); return ($4|0); } function _Gfx_CreateVb($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_GL_GenAndBind(34962)|0); return ($2|0); } function _Gfx_LockVb($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (14480 + ($1<<2)|0); $4 = HEAP32[$3>>2]|0; $5 = Math_imul($4, $2)|0; $6 = (_FastAllocTempMem($5)|0); return ($6|0); } function _FastAllocTempMem($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[450821]|0; $2 = ($1|0)<($0|0); if ($2) { $3 = HEAP32[450822]|0; _Mem_Free($3); $4 = (_Mem_Alloc($0,1,30212)|0); HEAP32[450822] = $4; } HEAP32[450821] = $0; $5 = HEAP32[450822]|0; return ($5|0); } function _Gfx_UpdateDynamicVb_IndexedTris($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_SetDynamicVbData($0,$1,$2); _Gfx_DrawVb_IndexedTris($2); return; } function _Gfx_SetDynamicVbData($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[450824]|0; $4 = Math_imul($3, $2)|0; _glBindBuffer(34962,($0|0)); _glBufferSubData(34962,0,($4|0),($1|0)); return; } function _Gfx_DrawVb_IndexedTris($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[450823]|0; FUNCTION_TABLE_v[$1 & 127](); $2 = (2)?($0 >> 2):($0); $3 = ($2*6)|0; _glDrawElements(4,($3|0),5123,(0|0)); return; } function _GL_SetupVbColoured() { var label = 0, sp = 0; sp = STACKTOP; _glVertexAttribPointer(0,3,5126,0,16,(0|0)); _glVertexAttribPointer(1,4,5121,1,16,((12)|0)); return; } function _GL_SetupVbTextured() { var label = 0, sp = 0; sp = STACKTOP; _glVertexAttribPointer(0,3,5126,0,24,(0|0)); _glVertexAttribPointer(1,4,5121,1,24,((12)|0)); _glVertexAttribPointer(2,2,5126,0,24,((16)|0)); return; } function _Gfx_Draw2DFlat($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $5 = 0, $6 = 0.0; var $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $5 = sp; $6 = (+($0|0)); HEAPF32[$5>>2] = $6; $7 = (+($1|0)); $8 = ((($5)) + 4|0); HEAPF32[$8>>2] = $7; $9 = ((($5)) + 8|0); HEAPF32[$9>>2] = 0.0; $10 = ((($5)) + 12|0); HEAP32[$10>>2] = $4; $11 = (($2) + ($0))|0; $12 = (+($11|0)); $13 = ((($5)) + 16|0); HEAPF32[$13>>2] = $12; $14 = ((($5)) + 20|0); HEAPF32[$14>>2] = $7; $15 = ((($5)) + 24|0); HEAPF32[$15>>2] = 0.0; $16 = ((($5)) + 28|0); HEAP32[$16>>2] = $4; $17 = ((($5)) + 32|0); HEAPF32[$17>>2] = $12; $18 = (($3) + ($1))|0; $19 = (+($18|0)); $20 = ((($5)) + 36|0); HEAPF32[$20>>2] = $19; $21 = ((($5)) + 40|0); HEAPF32[$21>>2] = 0.0; $22 = ((($5)) + 44|0); HEAP32[$22>>2] = $4; $23 = ((($5)) + 48|0); HEAPF32[$23>>2] = $6; $24 = ((($5)) + 52|0); HEAPF32[$24>>2] = $19; $25 = ((($5)) + 56|0); HEAPF32[$25>>2] = 0.0; $26 = ((($5)) + 60|0); HEAP32[$26>>2] = $4; _Gfx_SetVertexFormat(0); $27 = HEAP32[450815]|0; _Gfx_UpdateDynamicVb_IndexedTris($27,$5,4); STACKTOP = sp;return; } function _Gfx_SetVertexFormat($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $storemerge = 0, $storemerge4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[3619]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[3619] = $0; $3 = (14480 + ($0<<2)|0); $4 = HEAP32[$3>>2]|0; HEAP32[450824] = $4; $5 = ($0|0)==(1); if ($5) { _glEnableVertexAttribArray(2); $storemerge = 331;$storemerge4 = 80; } else { _glDisableVertexAttribArray(2); $storemerge = 332;$storemerge4 = 81; } HEAP32[450823] = $storemerge4; HEAP32[450825] = $storemerge; _SwitchProgram(); return; } function _GL_SetupVbTextured_Range($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0*24)|0; $2 = $1; _glVertexAttribPointer(0,3,5126,0,24,($2|0)); $3 = (($1) + 12)|0; $4 = $3; _glVertexAttribPointer(1,4,5121,1,24,($4|0)); $5 = (($1) + 16)|0; $6 = $5; _glVertexAttribPointer(2,2,5126,0,24,($6|0)); return; } function _GL_SetupVbColoured_Range($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0 << 4; $2 = $1; _glVertexAttribPointer(0,3,5126,0,16,($2|0)); $3 = $1 | 12; $4 = $3; _glVertexAttribPointer(1,4,5121,1,16,($4|0)); return; } function _SwitchProgram() { var $$0 = 0, $$2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, $spec$select = 0, $spec$select13 = 0, $spec$select14 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1972849]|0; $1 = ($0<<24>>24)==(0); if ($1) { $$0 = 0; } else { $2 = HEAP32[3622]|0; $3 = ($2|0)>(0); $spec$select = $3 ? 12 : 6; $$0 = $spec$select; } $4 = HEAP32[3619]|0; $5 = ($4|0)==(1); $6 = (($$0) + 2)|0; $spec$select13 = $5 ? $6 : $$0; $7 = HEAP8[1972850]|0; $8 = ($7<<24>>24)==(0); $9 = (($spec$select13) + 2)|0; $$2 = $8 ? $spec$select13 : $9; $10 = HEAP8[1972851]|0; $11 = ($10<<24>>24)!=(0); $12 = $11&1; $spec$select14 = $$2 | $12; $13 = (4080 + ($spec$select14<<5)|0); $14 = HEAP32[450820]|0; $15 = ($13|0)==($14|0); if ($15) { _ReloadUniforms(); return; } $16 = (((4080 + ($spec$select14<<5)|0)) + 8|0); $17 = HEAP32[$16>>2]|0; $18 = ($17|0)==(0); if ($18) { _CompileProgram($13); } HEAP32[450820] = $13; $19 = HEAP32[$16>>2]|0; _glUseProgram(($19|0)); _ReloadUniforms(); return; } function _ReloadUniforms() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; var $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[450820]|0; $1 = ($0|0)==(0|0); if ($1) { return; } $2 = ((($0)) + 4|0); $3 = HEAP32[$2>>2]|0; $4 = $3 & 1; $5 = ($4|0)==(0); if (!($5)) { $6 = ((($0)) + 12|0); $7 = HEAP32[$6>>2]|0; _glUniformMatrix4fv(($7|0),1,0,(1803304|0)); $8 = HEAP32[$2>>2]|0; $9 = $8 & -2; HEAP32[$2>>2] = $9; } $10 = HEAP32[$2>>2]|0; $11 = $10 & 2; $12 = ($11|0)==(0); if (!($12)) { $13 = HEAP32[$0>>2]|0; $14 = $13 & 4; $15 = ($14|0)==(0); if (!($15)) { $16 = ((($0)) + 16|0); $17 = HEAP32[$16>>2]|0; $18 = +HEAPF32[450842]; $19 = +HEAPF32[450843]; _glUniform2f(($17|0),(+$18),(+$19)); $20 = HEAP32[$2>>2]|0; $21 = $20 & -3; HEAP32[$2>>2] = $21; } } $22 = HEAP32[$2>>2]|0; $23 = $22 & 4; $24 = ($23|0)==(0); if (!($24)) { $25 = HEAP32[$0>>2]|0; $26 = $25 & 24; $27 = ($26|0)==(0); if (!($27)) { $28 = ((($0)) + 20|0); $29 = HEAP32[$28>>2]|0; $30 = HEAP32[450844]|0; $31 = $30 & 255; $32 = (+($31|0)); $33 = $32 / 255.0; $34 = (8)?($30 >>> 8):($30); $35 = $34 & 255; $36 = (+($35|0)); $37 = $36 / 255.0; $38 = (16)?($30 >>> 16):($30); $39 = $38 & 255; $40 = (+($39|0)); $41 = $40 / 255.0; _glUniform3f(($29|0),(+$33),(+$37),(+$41)); $42 = HEAP32[$2>>2]|0; $43 = $42 & -5; HEAP32[$2>>2] = $43; } } $44 = HEAP32[$2>>2]|0; $45 = $44 & 8; $46 = ($45|0)==(0); if (!($46)) { $47 = HEAP32[$0>>2]|0; $48 = $47 & 8; $49 = ($48|0)==(0); if (!($49)) { $50 = ((($0)) + 24|0); $51 = HEAP32[$50>>2]|0; $52 = +HEAPF32[3623]; _glUniform1f(($51|0),(+$52)); $53 = HEAP32[$2>>2]|0; $54 = $53 & -9; HEAP32[$2>>2] = $54; } } $55 = HEAP32[$2>>2]|0; $56 = $55 & 16; $57 = ($56|0)==(0); if ($57) { return; } $58 = HEAP32[$0>>2]|0; $59 = $58 & 16; $60 = ($59|0)==(0); if ($60) { return; } $61 = ((($0)) + 28|0); $62 = HEAP32[$61>>2]|0; $63 = +HEAPF32[3624]; $64 = - $63; _glUniform1f(($62|0),(+$64)); $65 = HEAP32[$2>>2]|0; $66 = $65 & -17; HEAP32[$2>>2] = $66; return; } function _CompileProgram($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 2064|0; $1 = sp; $2 = sp + 2056|0; $3 = sp + 2048|0; $4 = (_glCreateShader(35633)|0); $5 = ($4|0)==(0); if ($5) { _Platform_LogConst(30232); STACKTOP = sp;return; } HEAP32[$2>>2] = $1; $6 = ((($2)) + 4|0); HEAP16[$6>>1] = 0; $7 = ((($2)) + 6|0); HEAP16[$7>>1] = 2048; _GenVertexShader($0,$2); $8 = (_CompileShader($4,$2)|0); $9 = ($8|0)==(0); if ($9) { _ShaderFailed($4); } $10 = (_glCreateShader(35632)|0); $11 = ($10|0)==(0); if ($11) { _Platform_LogConst(30263); _glDeleteShader(($4|0)); STACKTOP = sp;return; } HEAP16[$6>>1] = 0; _GenFragmentShader($0,$2); $12 = (_CompileShader($10,$2)|0); $13 = ($12|0)==(0); if ($13) { $14 = HEAP32[$0>>2]|0; $15 = $14 | 128; HEAP32[$0>>2] = $15; HEAP16[$6>>1] = 0; _GenFragmentShader($0,$2); $16 = (_CompileShader($10,$2)|0); $17 = ($16|0)==(0); if ($17) { _ShaderFailed($10); } } $18 = (_glCreateProgram()|0); $19 = ($18|0)==(0); if ($19) { _Logger_Abort(30296); } $20 = ((($0)) + 8|0); HEAP32[$20>>2] = $18; _glAttachShader(($18|0),($4|0)); _glAttachShader(($18|0),($10|0)); _glBindAttribLocation(($18|0),0,(30321|0)); _glBindAttribLocation(($18|0),1,(30328|0)); _glBindAttribLocation(($18|0),2,(30335|0)); _glLinkProgram(($18|0)); _glGetProgramiv(($18|0),35714,($3|0)); $21 = HEAP32[$3>>2]|0; $22 = ($21|0)==(0); if (!($22)) { _glDetachShader(($18|0),($4|0)); _glDetachShader(($18|0),($10|0)); _glDeleteShader(($4|0)); _glDeleteShader(($10|0)); $23 = (_glGetUniformLocation(($18|0),(30341|0))|0); $24 = ((($0)) + 12|0); HEAP32[$24>>2] = $23; $25 = (_glGetUniformLocation(($18|0),(30345|0))|0); $26 = ((($0)) + 16|0); HEAP32[$26>>2] = $25; $27 = (_glGetUniformLocation(($18|0),(30355|0))|0); $28 = ((($0)) + 20|0); HEAP32[$28>>2] = $27; $29 = (_glGetUniformLocation(($18|0),(30362|0))|0); $30 = ((($0)) + 24|0); HEAP32[$30>>2] = $29; $31 = (_glGetUniformLocation(($18|0),(30369|0))|0); $32 = ((($0)) + 28|0); HEAP32[$32>>2] = $31; STACKTOP = sp;return; } HEAP32[$3>>2] = 0; _glGetProgramiv(($18|0),35716,($3|0)); $33 = HEAP32[$3>>2]|0; $34 = ($33|0)>(0); if ($34) { _glGetProgramInfoLog(($18|0),2047,(0|0),($1|0)); $35 = ((($1)) + 2047|0); HEAP8[$35>>0] = 0; _Window_ShowDialog(30380,$1); } _Logger_Abort(30380); STACKTOP = sp;return; } function _GenVertexShader($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[$0>>2]|0; $3 = $2 & 1; $4 = $2 & 4; _String_AppendConst($1,30996); _String_AppendConst($1,31020); $5 = ($3|0)!=(0); if ($5) { _String_AppendConst($1,31044); _String_AppendConst($1,30456); _String_AppendConst($1,30479); } else { _String_AppendConst($1,30456); } _String_AppendConst($1,31067); $6 = ($4|0)!=(0); if ($6) { _String_AppendConst($1,31086); } _String_AppendConst($1,30602); _String_AppendConst($1,31111); _String_AppendConst($1,31153); if ($5) { _String_AppendConst($1,31174); } if (!($6)) { _String_AppendConst($1,30945); return; } _String_AppendConst($1,31194); _String_AppendConst($1,30945); return; } function _CompileShader($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 8|0; $3 = sp + 4|0; $4 = sp; $5 = HEAP32[$1>>2]|0; HEAP32[$2>>2] = $5; $6 = ((($1)) + 4|0); $7 = HEAP16[$6>>1]|0; $8 = $7&65535; HEAP32[$3>>2] = $8; _glShaderSource(($0|0),1,($2|0),($3|0)); _glCompileShader(($0|0)); _glGetShaderiv(($0|0),35713,($4|0)); $9 = HEAP32[$4>>2]|0; STACKTOP = sp;return ($9|0); } function _ShaderFailed($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 2064|0; $1 = sp; $2 = sp + 2048|0; $3 = ($0|0)==(0); if ($3) { _Logger_Abort(30947); } HEAP32[$2>>2] = 0; _glGetShaderiv(($0|0),35716,($2|0)); $4 = HEAP32[$2>>2]|0; $5 = ($4|0)>(1); if (!($5)) { _Logger_Abort(30971); STACKTOP = sp;return; } _glGetShaderInfoLog(($0|0),2047,(0|0),($1|0)); $6 = ((($1)) + 2047|0); HEAP8[$6>>0] = 0; _Window_ShowDialog(30971,$1); _Logger_Abort(30971); STACKTOP = sp;return; } function _GenFragmentShader($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[$0>>2]|0; $3 = $2 & 1; $4 = $2 & 2; $5 = $2 & 8; $6 = $2 & 16; $7 = $2 & 24; $8 = $2 & 128; $9 = ($8|0)==(0); if ($9) { _String_AppendConst($1,30432); } else { _String_AppendConst($1,30406); } _String_AppendConst($1,30456); $10 = ($3|0)!=(0); if ($10) { _String_AppendConst($1,30479); _String_AppendConst($1,30501); } $11 = ($7|0)!=(0); if ($11) { _String_AppendConst($1,30530); } $12 = ($5|0)!=(0); if ($12) { _String_AppendConst($1,30552); } $13 = ($6|0)!=(0); if ($13) { _String_AppendConst($1,30575); } _String_AppendConst($1,30602); if ($10) { _String_AppendConst($1,30617); } else { _String_AppendConst($1,30670); } $14 = ($4|0)==(0); if (!($14)) { _String_AppendConst($1,30693); } if ($11) { _String_AppendConst($1,30722); } if ($12) { _String_AppendConst($1,30772); } if ($13) { _String_AppendConst($1,30829); } if (!($11)) { _String_AppendConst($1,30922); _String_AppendConst($1,30945); return; } _String_AppendConst($1,30884); _String_AppendConst($1,30922); _String_AppendConst($1,30945); return; } function _Gfx_Draw2DGradient($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $6 = 0; var $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $6 = sp; $7 = (+($0|0)); HEAPF32[$6>>2] = $7; $8 = (+($1|0)); $9 = ((($6)) + 4|0); HEAPF32[$9>>2] = $8; $10 = ((($6)) + 8|0); HEAPF32[$10>>2] = 0.0; $11 = ((($6)) + 12|0); HEAP32[$11>>2] = $4; $12 = (($2) + ($0))|0; $13 = (+($12|0)); $14 = ((($6)) + 16|0); HEAPF32[$14>>2] = $13; $15 = ((($6)) + 20|0); HEAPF32[$15>>2] = $8; $16 = ((($6)) + 24|0); HEAPF32[$16>>2] = 0.0; $17 = ((($6)) + 28|0); HEAP32[$17>>2] = $4; $18 = ((($6)) + 32|0); HEAPF32[$18>>2] = $13; $19 = (($3) + ($1))|0; $20 = (+($19|0)); $21 = ((($6)) + 36|0); HEAPF32[$21>>2] = $20; $22 = ((($6)) + 40|0); HEAPF32[$22>>2] = 0.0; $23 = ((($6)) + 44|0); HEAP32[$23>>2] = $5; $24 = ((($6)) + 48|0); HEAPF32[$24>>2] = $7; $25 = ((($6)) + 52|0); HEAPF32[$25>>2] = $20; $26 = ((($6)) + 56|0); HEAPF32[$26>>2] = 0.0; $27 = ((($6)) + 60|0); HEAP32[$27>>2] = $5; _Gfx_SetVertexFormat(0); $28 = HEAP32[450815]|0; _Gfx_UpdateDynamicVb_IndexedTris($28,$6,4); STACKTOP = sp;return; } function _Gfx_Draw2DTexture($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 112|0; $2 = sp; $3 = sp + 96|0; HEAP32[$3>>2] = $2; _Gfx_Make2DQuad($0,$1,$3); _Gfx_SetVertexFormat(1); $4 = HEAP32[450816]|0; _Gfx_UpdateDynamicVb_IndexedTris($4,$2,4); STACKTOP = sp;return; } function _Gfx_Make2DQuad($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; var $48 = 0, $49 = 0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = (+($4<<16>>16)); $6 = $4 << 16 >> 16; $7 = ((($0)) + 8|0); $8 = HEAP16[$7>>1]|0; $9 = $8&65535; $10 = (($9) + ($6))|0; $11 = (+($10|0)); $12 = ((($0)) + 6|0); $13 = HEAP16[$12>>1]|0; $14 = (+($13<<16>>16)); $15 = $13 << 16 >> 16; $16 = ((($0)) + 10|0); $17 = HEAP16[$16>>1]|0; $18 = $17&65535; $19 = (($18) + ($15))|0; $20 = (+($19|0)); $21 = HEAP32[$2>>2]|0; HEAPF32[$21>>2] = $5; $22 = ((($21)) + 4|0); HEAPF32[$22>>2] = $14; $23 = ((($21)) + 8|0); HEAPF32[$23>>2] = 0.0; $24 = ((($21)) + 12|0); HEAP32[$24>>2] = $1; $25 = ((($0)) + 12|0); $26 = HEAP32[$25>>2]|0; $27 = ((($21)) + 16|0); HEAP32[$27>>2] = $26; $28 = ((($0)) + 16|0); $29 = HEAP32[$28>>2]|0; $30 = ((($21)) + 20|0); HEAP32[$30>>2] = $29; $31 = ((($21)) + 24|0); HEAPF32[$31>>2] = $11; $32 = ((($21)) + 28|0); HEAPF32[$32>>2] = $14; $33 = ((($21)) + 32|0); HEAPF32[$33>>2] = 0.0; $34 = ((($21)) + 36|0); HEAP32[$34>>2] = $1; $35 = ((($0)) + 20|0); $36 = HEAP32[$35>>2]|0; $37 = ((($21)) + 40|0); HEAP32[$37>>2] = $36; $38 = ((($21)) + 44|0); HEAP32[$38>>2] = $29; $39 = ((($21)) + 48|0); HEAPF32[$39>>2] = $11; $40 = ((($21)) + 52|0); HEAPF32[$40>>2] = $20; $41 = ((($21)) + 56|0); HEAPF32[$41>>2] = 0.0; $42 = ((($21)) + 60|0); HEAP32[$42>>2] = $1; $43 = ((($21)) + 64|0); HEAP32[$43>>2] = $36; $44 = ((($0)) + 24|0); $45 = HEAP32[$44>>2]|0; $46 = ((($21)) + 68|0); HEAP32[$46>>2] = $45; $47 = ((($21)) + 72|0); HEAPF32[$47>>2] = $5; $48 = ((($21)) + 76|0); HEAPF32[$48>>2] = $20; $49 = ((($21)) + 80|0); HEAPF32[$49>>2] = 0.0; $50 = ((($21)) + 84|0); HEAP32[$50>>2] = $1; $51 = ((($21)) + 88|0); HEAP32[$51>>2] = $26; $52 = ((($21)) + 92|0); HEAP32[$52>>2] = $45; $53 = ((($21)) + 96|0); HEAP32[$2>>2] = $53; return; } function _Gfx_Begin2D($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $2 = sp; $3 = (+($0|0)); $4 = (+($1|0)); _Gfx_CalcOrthoMatrix($3,$4,$2); _Gfx_LoadMatrix(0,$2); _Gfx_LoadIdentityMatrix(1); _Gfx_SetDepthTest(0); _Gfx_SetAlphaBlending(1); $5 = (_Gfx_GetFog()|0); HEAP8[1972852] = $5; $6 = ($5<<24>>24)==(0); if ($6) { STACKTOP = sp;return; } _Gfx_SetFog(0); STACKTOP = sp;return; } function _Gfx_CalcOrthoMatrix($0,$1,$2) { $0 = +$0; $1 = +$1; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _Matrix_Orthographic($2,0.0,$0,0.0,$1,-1.0E+4,1.0E+4); return; } function _Gfx_LoadMatrix($0,$1) { $0 = $0|0; $1 = $1|0; var dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; switch ($0|0) { case 1: { dest=1803380; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); break; } case 0: { dest=1803444; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); break; } default: { } } _Matrix_Mul(1803304,1803380,1803444); _DirtyUniform(1); _ReloadUniforms(); return; } function _Gfx_LoadIdentityMatrix($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_LoadMatrix($0,21836); return; } function _Gfx_SetDepthTest($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0<<24>>24)==(0); if ($1) { _glDisable(2929); return; } else { _glEnable(2929); return; } } function _Gfx_SetAlphaBlending($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0<<24>>24)==(0); if ($1) { _glDisable(3042); return; } else { _glEnable(3042); return; } } function _Gfx_SetFog($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; HEAP8[1972849] = $0; _SwitchProgram(); return; } function _Gfx_End2D() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; _Gfx_SetDepthTest(1); _Gfx_SetAlphaBlending(0); $0 = HEAP8[1972852]|0; $1 = ($0<<24>>24)==(0); if ($1) { return; } _Gfx_SetFog(1); return; } function _Gfx_SetupAlphaState($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; switch ($0<<24>>24) { case 3: { _Gfx_SetAlphaBlending(1); break; } case 1: { _Gfx_SetAlphaTest(1); break; } case 2: { _Gfx_SetAlphaTest(1); break; } case 5: { _Gfx_SetAlphaTest(1); break; } default: { } } return; } function _Gfx_SetAlphaTest($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; HEAP8[1972851] = $0; _SwitchProgram(); return; } function _Gfx_RestoreAlphaState($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; switch ($0<<24>>24) { case 3: { _Gfx_SetAlphaBlending(0); break; } case 1: { _Gfx_SetAlphaTest(0); break; } case 2: { _Gfx_SetAlphaTest(0); break; } case 5: { _Gfx_SetAlphaTest(0); break; } default: { } } return; } function _Texture_Render($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[$0>>2]|0; _Gfx_BindTexture($1); _Gfx_Draw2DTexture($0,-1); return; } function _Gfx_BindTexture($0) { $0 = $0|0; var $1 = 0, $2 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0|0)==(0); $2 = HEAP32[450818]|0; $spec$select = $1 ? $2 : $0; _glBindTexture(3553,($spec$select|0)); return; } function _Texture_RenderShaded($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[$0>>2]|0; _Gfx_BindTexture($2); _Gfx_Draw2DTexture($0,$1); return; } function _Gfx_Create() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; _GLContext_Create(); _glGetIntegerv(3379,(1803116|0)); $0 = HEAP32[450779]|0; HEAP32[(1803120)>>2] = $0; HEAP8[(1803131)>>0] = 1; HEAP8[(1803128)>>0] = 0; _Gfx_RestoreState(); _GL_UpdateVsync(); return; } function _GL_UpdateVsync() { var $0 = 0, $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1972853]|0; $1 = +HEAPF32[450877]; _GLContext_SetFpsLimit($0,$1); return; } function _Gfx_TryRestoreContext() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_GLContext_TryRestore()|0); return ($0|0); } function _Gfx_Free() { var label = 0, sp = 0; sp = STACKTOP; _Gfx_FreeState(); _GLContext_Free(); return; } function _Gfx_UpdateTexture($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $10 = 0, $11 = 0, $12 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _glBindTexture(3553,($0|0)); $6 = ((($3)) + 4|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==($4|0); if ($8) { $9 = ((($3)) + 8|0); $10 = HEAP32[$9>>2]|0; $11 = HEAP32[$3>>2]|0; _glTexSubImage2D(3553,0,($1|0),($2|0),($7|0),($10|0),6408,5121,($11|0)); } else { _UpdateTextureSlow($1,$2,$3,$4); } $12 = ($5<<24>>24)==(0); if ($12) { return; } _Gfx_DoMipmaps($1,$2,$3,$4,1); return; } function _UpdateTextureSlow($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16384|0; $4 = sp; $5 = ((($2)) + 4|0); $6 = HEAP32[$5>>2]|0; $7 = ((($2)) + 8|0); $8 = HEAP32[$7>>2]|0; $9 = Math_imul($8, $6)|0; $10 = ($9|0)>(4096); if ($10) { $11 = (_Mem_Alloc($9,4,31227)|0); $$0 = $11; } else { $$0 = $4; } $12 = HEAP32[$5>>2]|0; $13 = $12 << 2; $14 = $3 << 2; _CopyTextureData($$0,$13,$2,$14); $15 = HEAP32[$5>>2]|0; $16 = HEAP32[$7>>2]|0; _glTexSubImage2D(3553,0,($0|0),($1|0),($15|0),($16|0),6408,5121,($$0|0)); if (!($10)) { STACKTOP = sp;return; } _Mem_Free($$0); STACKTOP = sp;return; } function _CopyTextureData($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$01619 = 0, $$01718 = 0, $$020 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($2)) + 8|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)>(0); if (!($6)) { return; } $7 = HEAP32[$2>>2]|0; $8 = ((($2)) + 4|0); $$01619 = $0;$$01718 = $7;$$020 = 0; while(1) { $9 = HEAP32[$8>>2]|0; $10 = $9 << 2; _Mem_Copy($$01619,$$01718,$10); $11 = (($$01718) + ($3)|0); $12 = (($$01619) + ($1)|0); $13 = (($$020) + 1)|0; $14 = HEAP32[$4>>2]|0; $15 = ($13|0)<($14|0); if ($15) { $$01619 = $12;$$01718 = $11;$$020 = $13; } else { break; } } return; } function _Gfx_EnableMipmaps() { var label = 0, sp = 0; sp = STACKTOP; return; } function _Gfx_DisableMipmaps() { var label = 0, sp = 0; sp = STACKTOP; return; } function _Gfx_SetFaceCulling($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0<<24>>24)==(0); if ($1) { _glDisable(2884); return; } else { _glEnable(2884); return; } } function _Gfx_SetAlphaArgBlend($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Gfx_ClearCol($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[450817]|0; $2 = ($1|0)==($0|0); if ($2) { return; } _GL_ClearColor($0); HEAP32[450817] = $0; return; } function _Gfx_SetColWriteMask($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; _glColorMask(($0|0),($1|0),($2|0),($3|0)); return; } function _Gfx_SetDepthWrite($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _glDepthMask(($0|0)); return; } function _Gfx_CalcPerspectiveMatrix($0,$1,$2,$3) { $0 = +$0; $1 = +$1; $2 = +$2; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; _Matrix_PerspectiveFieldOfView($3,$0,$1,0.10000000149011612,$2); return; } function _Gfx_GetApiInfo($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 4|0; $2 = sp; HEAP32[$2>>2] = 32; _glGetIntegerv(3414,($1|0)); _String_Format1($0,31250,$2); $3 = (_glGetString(7936)|0); _String_Format1($0,31286,$3); $4 = (_glGetString(7937)|0); _String_Format1($0,31298,$4); $5 = (_glGetString(7938)|0); _String_Format1($0,31312,$5); _AppendVRAMStats($0); _String_Format2($0,31328,1803116,(1803120)); _String_Format1($0,31356,$1); _GLContext_GetApiInfo($0); STACKTOP = sp;return; } function _AppendVRAMStats($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 20|0; $2 = sp + 16|0; $3 = sp + 12|0; $4 = sp + 8|0; $5 = sp; $6 = (_glGetString(7939)|0); _String_FromReadonly($5,$6); $7 = (_String_CaselessContains($5,14500)|0); $8 = ($7|0)==(0); if ($8) { STACKTOP = sp;return; } _glGetIntegerv(36936,($1|0)); _glGetIntegerv(36937,($2|0)); $9 = HEAP32[$1>>2]|0; $10 = ($9|0)<(1); $11 = HEAP32[$2>>2]|0; $12 = ($11|0)<(1); $or$cond = $10 | $12; if ($or$cond) { STACKTOP = sp;return; } $13 = (+($11|0)); $14 = $13 * 9.765625E-4; $15 = (+($9|0)); $16 = $15 * 9.765625E-4; HEAPF32[$3>>2] = $16; HEAPF32[$4>>2] = $14; _String_Format2($0,31379,$3,$4); STACKTOP = sp;return; } function _Gfx_SetFpsLimit($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; HEAPF32[450877] = $1; HEAP8[1972853] = $0; $2 = HEAP8[(1803131)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } _GL_UpdateVsync(); return; } function _Gfx_BeginFrame() { var label = 0, sp = 0; sp = STACKTOP; return; } function _Gfx_Clear() { var label = 0, sp = 0; sp = STACKTOP; _glClear(16640); return; } function _Gfx_EndFrame() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_GLContext_SwapBuffers()|0); $1 = ($0<<24>>24)==(0); if (!($1)) { return; } _Gfx_LoseContext(31440); return; } function _Gfx_OnWindowResize() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; _Game_UpdateDimensions(); $0 = HEAP32[271246]|0; $1 = HEAP32[(1084988)>>2]|0; _glViewport(0,0,($0|0),($1|0)); return; } function _Gfx_BindIb($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _glBindBuffer(34963,($0|0)); return; } function _Gfx_BindVb($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _glBindBuffer(34962,($0|0)); return; } function _Gfx_UnlockVb($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[450821]|0; $2 = HEAP32[450822]|0; _glBufferData(34962,($1|0),($2|0),35044); return; } function _Gfx_LockDynamicVb($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (14480 + ($1<<2)|0); $4 = HEAP32[$3>>2]|0; $5 = Math_imul($4, $2)|0; $6 = (_FastAllocTempMem($5)|0); return ($6|0); } function _Gfx_UnlockDynamicVb($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; _glBindBuffer(34962,($0|0)); $1 = HEAP32[450821]|0; $2 = HEAP32[450822]|0; _glBufferSubData(34962,0,($1|0),($2|0)); return; } function _Gfx_SetFogCol($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[450844]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[450844] = $0; _DirtyUniform(4); _ReloadUniforms(); return; } function _Gfx_SetFogDensity($0) { $0 = +$0; var $1 = 0.0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[3624]; $2 = $1 == $0; if ($2) { return; } HEAPF32[3624] = $0; _DirtyUniform(16); _ReloadUniforms(); return; } function _Gfx_SetFogEnd($0) { $0 = +$0; var $1 = 0.0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[3623]; $2 = $1 == $0; if ($2) { return; } HEAPF32[3623] = $0; _DirtyUniform(8); _ReloadUniforms(); return; } function _Gfx_SetFogMode($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[3622]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[3622] = $0; _SwitchProgram(); return; } function _Gfx_DepthOnlyRendering($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0<<24>>24)==(0); $2 = $1&1; _Gfx_SetColWriteMask($2,$2,$2,$2); return; } function _Gfx_EnableTextureOffset($0,$1) { $0 = +$0; $1 = +$1; var label = 0, sp = 0; sp = STACKTOP; HEAPF32[450842] = $0; HEAPF32[450843] = $1; HEAP8[1972850] = 1; _DirtyUniform(2); _SwitchProgram(); return; } function _Gfx_DisableTextureOffset() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[1972850] = 0; _SwitchProgram(); return; } function _Gfx_WarnIfNecessary() { var label = 0, sp = 0; sp = STACKTOP; return 0; } function _Gfx_DrawVb_Lines($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[450823]|0; FUNCTION_TABLE_v[$1 & 127](); _glDrawArrays(1,0,($0|0)); return; } function _Gfx_DrawVb_IndexedTris_Range($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[450825]|0; FUNCTION_TABLE_vi[$2 & 511]($1); $3 = (2)?($0 >> 2):($0); $4 = ($3*6)|0; _glDrawElements(4,($4|0),5123,(0|0)); return; } function _Gfx_BindVb_Textured($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_BindVb($0); _GL_SetupVbTextured(); return; } function _Gfx_DrawIndexedTris_T2fC4b($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (($1) + ($0))|0; $3 = ($2|0)>(65536); if ($3) { _GL_SetupVbTextured_Range($1); $4 = (2)?($0 >> 2):($0); $5 = ($4*6)|0; _glDrawElements(4,($5|0),5123,(0|0)); _GL_SetupVbTextured(); return; } else { $6 = (2)?($0 >> 2):($0); $7 = ($6*6)|0; $8 = ($1*3)|0; $9 = $8; _glDrawElements(4,($7|0),5123,($9|0)); return; } } function _OnInit_849() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[450878] = 390192; _TextureEntry_Register(14532); _TextureEntry_Register(14544); _TextureEntry_Register(14556); _TextureEntry_Register(14568); _Event_Register(1796648,0,333); _Event_Register((1793528),0,334); _Event_Register((1793788),0,335); _Event_Register(1799768,0,111); _Event_Register((1797948),0,336); _Event_Register((1800808),0,112); $0 = HEAP8[(1949240)>>0]|0; $1 = ($0<<24>>24)==(0); $2 = $1 ? 81 : 80; $3 = (_Options_GetInt(40627,0,2147483647,$2)|0); HEAP32[(1803564)>>2] = $3; _LoadOptions_855(); _Gui_ShowDefault(); return; } function _OnFree_850() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1803516)>>2]|0; $1 = ($0|0)==(0); if ($1) { _OnContextLost_852(0); return; } while(1) { $2 = HEAP32[97548]|0; _Gui_Remove($2); $3 = HEAP32[(1803516)>>2]|0; $4 = ($3|0)==(0); if ($4) { break; } } _OnContextLost_852(0); return; } function _OnReset_851() { var label = 0, sp = 0; sp = STACKTOP; return; } function _Gui_Remove($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gui_RemoveCore($0); _Gui_OnScreensChanged(); return; } function _OnContextLost_852($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; _LoseAllScreens(); $1 = HEAP8[(1803130)>>0]|0; $2 = ($1<<24>>24)==(0); if (!($2)) { return; } _Gfx_DeleteTexture((1803544)); _Gfx_DeleteTexture((1803548)); _Gfx_DeleteTexture((1803552)); _Gfx_DeleteTexture((1803556)); return; } function _LoseAllScreens() { var $$07 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1803516)>>2]|0; $1 = ($0|0)>(0); if (!($1)) { return; } $$07 = 0; while(1) { $2 = (390192 + ($$07<<2)|0); $3 = HEAP32[$2>>2]|0; $4 = HEAP32[$3>>2]|0; $5 = ((($4)) + 56|0); $6 = HEAP32[$5>>2]|0; FUNCTION_TABLE_vi[$6 & 511]($3); $7 = (($$07) + 1)|0; $8 = HEAP32[(1803516)>>2]|0; $9 = ($7|0)<($8|0); if ($9) { $$07 = $7; } else { break; } } return; } function _Gui_RemoveCore($0) { $0 = $0|0; var $$012 = 0, $$lcssa = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_IndexOfScreen($0)|0); $2 = ($1|0)==(-1); if ($2) { return; } $3 = HEAP32[(1803516)>>2]|0; $4 = (($3) + -1)|0; $5 = ($1|0)<($4|0); if ($5) { $6 = HEAP32[(1803516)>>2]|0; $7 = (($6) + -1)|0; $$012 = $1; while(1) { $8 = (($$012) + 1)|0; $9 = (390192 + ($8<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = (390192 + ($$012<<2)|0); HEAP32[$11>>2] = $10; $12 = (1972854 + ($8)|0); $13 = HEAP8[$12>>0]|0; $14 = (1972854 + ($$012)|0); HEAP8[$14>>0] = $13; $15 = ($8|0)<($7|0); if ($15) { $$012 = $8; } else { $$lcssa = $7; break; } } } else { $$lcssa = $4; } HEAP32[(1803516)>>2] = $$lcssa; $16 = HEAP32[$0>>2]|0; $17 = ((($16)) + 56|0); $18 = HEAP32[$17>>2]|0; FUNCTION_TABLE_vi[$18 & 511]($0); $19 = HEAP32[$0>>2]|0; $20 = ((($19)) + 8|0); $21 = HEAP32[$20>>2]|0; FUNCTION_TABLE_vi[$21 & 511]($0); return; } function _Gui_OnScreensChanged() { var label = 0, sp = 0; sp = STACKTOP; _Gui_UpdateInputGrab(); _InputHandler_OnScreensChanged(); return; } function _Gui_UpdateInputGrab() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_Gui_GetInputGrab()|0); HEAP32[(1803572)>>2] = $0; _Camera_CheckFocus(); return; } function _Gui_GetInputGrab() { var $$04 = 0, $$05 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1803516)>>2]|0; $1 = ($0|0)>(0); if (!($1)) { $$04 = 0; return ($$04|0); } $2 = HEAP32[(1803516)>>2]|0; $$05 = 0; while(1) { $5 = (390192 + ($$05<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = ((($6)) + 4|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(0); $3 = (($$05) + 1)|0; if (!($9)) { $$04 = $6; label = 5; break; } $4 = ($3|0)<($2|0); if ($4) { $$05 = $3; } else { $$04 = 0; label = 5; break; } } if ((label|0) == 5) { return ($$04|0); } return (0)|0; } function _IndexOfScreen($0) { $0 = $0|0; var $$05 = 0, $$06 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1803516)>>2]|0; $2 = ($1|0)>(0); if (!($2)) { $$05 = -1; return ($$05|0); } $3 = HEAP32[(1803516)>>2]|0; $$06 = 0; while(1) { $4 = (390192 + ($$06<<2)|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)==($0|0); if ($6) { $$05 = $$06; label = 5; break; } $7 = (($$06) + 1)|0; $8 = ($7|0)<($3|0); if ($8) { $$06 = $7; } else { $$05 = -1; label = 5; break; } } if ((label|0) == 5) { return ($$05|0); } return (0)|0; } function _OnFontChanged($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gui_RefreshAll(); return; } function _OnContextRecreated_853($0) { $0 = $0|0; var $$08 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1803516)>>2]|0; $2 = ($1|0)>(0); if (!($2)) { return; } $$08 = 0; while(1) { $3 = (390192 + ($$08<<2)|0); $4 = HEAP32[$3>>2]|0; $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 60|0); $7 = HEAP32[$6>>2]|0; FUNCTION_TABLE_vi[$7 & 511]($4); $8 = ((($4)) + 7|0); HEAP8[$8>>0] = 1; $9 = (($$08) + 1)|0; $10 = HEAP32[(1803516)>>2]|0; $11 = ($9|0)<($10|0); if ($11) { $$08 = $9; } else { break; } } return; } function _OnKeyPress($0,$1) { $0 = $0|0; $1 = $1|0; var $$08 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond12 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_Convert_TryCodepointToCP437($1,$2)|0); $4 = ($3<<24>>24)!=(0); $5 = HEAP32[(1803516)>>2]|0; $6 = ($5|0)>(0); $or$cond = $4 & $6; if (!($or$cond)) { STACKTOP = sp;return; } $$08 = 0; while(1) { $7 = (390192 + ($$08<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = HEAP32[$8>>2]|0; $10 = ((($9)) + 28|0); $11 = HEAP32[$10>>2]|0; $12 = HEAP8[$2>>0]|0; $13 = (FUNCTION_TABLE_iii[$11 & 127]($8,$12)|0); $14 = ($13|0)==(0); $15 = (($$08) + 1)|0; $16 = HEAP32[(1803516)>>2]|0; $17 = ($15|0)<($16|0); $or$cond12 = $14 & $17; if ($or$cond12) { $$08 = $15; } else { break; } } STACKTOP = sp;return; } function _OnResize($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gui_LayoutAll(); return; } function _OnTextChanged($0,$1) { $0 = $0|0; $1 = $1|0; var $$08 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1803516)>>2]|0; $3 = ($2|0)>(0); if (!($3)) { return; } $$08 = 0; while(1) { $4 = (390192 + ($$08<<2)|0); $5 = HEAP32[$4>>2]|0; $6 = HEAP32[$5>>2]|0; $7 = ((($6)) + 32|0); $8 = HEAP32[$7>>2]|0; $9 = (FUNCTION_TABLE_iii[$8 & 127]($5,$1)|0); $10 = ($9|0)==(0); $11 = (($$08) + 1)|0; $12 = HEAP32[(1803516)>>2]|0; $13 = ($11|0)<($12|0); $or$cond = $10 & $13; if ($or$cond) { $$08 = $11; } else { break; } } return; } function _LoadOptions_855() { var $$pr = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, $phitmp1 = 0, $phitmp2 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1972839]|0; $1 = ($0<<24>>24)==(0); $2 = $1 ? 12 : 10; HEAP32[(1803560)>>2] = $2; $3 = (_Options_GetInt(37855,0,30,$2)|0); HEAP32[(1803524)>>2] = $3; $4 = HEAP8[1972839]|0; $5 = ($4<<24>>24)==(0); if ($5) { $6 = HEAP8[1972870]|0; $7 = ($6<<24>>24)==(0); $8 = $7&1; $9 = (_Options_GetBool(37824,$8)|0); $10 = ($9<<24>>24)!=(0); $phitmp = $10&1; $$pr = HEAP8[1972839]|0; HEAP8[(1803528)>>0] = $phitmp; $11 = ($$pr<<24>>24)==(0); if ($11) { $12 = (_Options_GetBool(39862,1)|0); $13 = ($12<<24>>24)!=(0); $phitmp1 = $13&1; $14 = $phitmp1; } else { $14 = 0; } } else { HEAP8[(1803528)>>0] = 0; $14 = 0; } HEAP8[(1803529)>>0] = $14; $15 = (_Options_GetBool(36695,1)|0); $16 = HEAP8[1972839]|0; $17 = $16 | $15; $18 = ($17<<24>>24)!=(0); $19 = $18&1; HEAP8[(1803520)>>0] = $19; $20 = (_Options_GetBool(36670,0)|0); $21 = HEAP8[1972839]|0; $22 = $21 | $20; $23 = ($22<<24>>24)!=(0); $24 = $23&1; HEAP8[(1803521)>>0] = $24; $25 = (_Options_GetBool(36645,0)|0); $26 = HEAP8[1972839]|0; $27 = $26 | $25; $28 = ($27<<24>>24)!=(0); $29 = $28&1; HEAP8[(1803522)>>0] = $29; $30 = (_Options_GetBool(36558,0)|0); $31 = ($30<<24>>24)==(0); if ($31) { $32 = HEAP8[1972839]|0; $33 = ($32<<24>>24)==(0); if ($33) { $36 = 0; } else { $34 = HEAP8[1972840]|0; $35 = ($34<<24>>24)==(0); $phitmp2 = $35&1; $36 = $phitmp2; } } else { $36 = 1; } HEAP8[(1803523)>>0] = $36; $37 = (_Options_GetBool(38177,1)|0); HEAP8[(1803530)>>0] = $37; $38 = (+_Options_GetFloat(39883,0.25,5.0,1.0)); HEAPF32[(1803540)>>2] = $38; $39 = (+_Options_GetFloat(39902,0.25,5.0,1.0)); HEAPF32[(1803532)>>2] = $39; $40 = (+_Options_GetFloat(37869,0.25,5.0,1.0)); HEAPF32[(1803536)>>2] = $40; $41 = (+_Options_GetFloat(40760,0.25,5.0,1.0)); HEAPF32[(1803568)>>2] = $41; return; } function _Gui_ShowDefault() { var label = 0, sp = 0; sp = STACKTOP; _HUDScreen_Show(); _ChatScreen_Show(); _TouchScreen_Show(); return; } function _Gui_LayoutAll() { var $$08 = 0, $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1803516)>>2]|0; $1 = ($0|0)>(0); if (!($1)) { return; } $$08 = 0; while(1) { $2 = (390192 + ($$08<<2)|0); $3 = HEAP32[$2>>2]|0; $4 = HEAP32[$3>>2]|0; $5 = ((($4)) + 52|0); $6 = HEAP32[$5>>2]|0; FUNCTION_TABLE_vi[$6 & 511]($3); $7 = ((($3)) + 7|0); HEAP8[$7>>0] = 1; $8 = (($$08) + 1)|0; $9 = HEAP32[(1803516)>>2]|0; $10 = ($8|0)<($9|0); if ($10) { $$08 = $8; } else { break; } } return; } function _Gui_RefreshAll() { var label = 0, sp = 0; sp = STACKTOP; _LoseAllScreens(); _OnContextRecreated_853(0); _OnResize(0); return; } function _TouchPngProcess($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_Game_UpdateTexture((1803556),$0,$1,0)|0); return; } function _IconsPngProcess($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_Game_UpdateTexture((1803552),$0,$1,0)|0); return; } function _GuiClassicPngProcess($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_Game_UpdateTexture((1803548),$0,$1,0)|0); return; } function _GuiPngProcess($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_Game_UpdateTexture((1803544),$0,$1,0)|0); return; } function _Gui_Scale($0) { $0 = +$0; var $1 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = $0 * 10.0; $2 = $1 + 0.5; $3 = (~~(($2))); $4 = (+($3|0)); $5 = $4 / 10.0; return (+$5); } function _Gui_GetHotbarScale() { var $0 = 0, $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, label = 0, sp = 0; sp = STACKTOP; $0 = (_GetWindowScale()|0); $1 = (+($0|0)); $2 = +HEAPF32[(1803532)>>2]; $3 = $2 * $1; $4 = (+_Gui_Scale($3)); return (+$4); } function _GetWindowScale() { var $$0 = 0.0, $$09 = 0.0, $0 = 0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1972116)>>2]|0; $1 = (+($0|0)); $2 = $1 / 640.0; $3 = HEAP32[(1972120)>>2]|0; $4 = (+($3|0)); $5 = $4 / 480.0; $6 = HEAP8[1972870]|0; $7 = ($6<<24>>24)==(0); if ($7) { $8 = +HEAPF32[(1972084)>>2]; $9 = $2 / $8; $10 = +HEAPF32[(1972088)>>2]; $11 = $5 / $10; $$0 = $11;$$09 = $9; } else { $$0 = $5;$$09 = $2; } $12 = $$09 < $$0; $13 = $12 ? $$09 : $$0; $14 = (~~(($13))); $15 = (($14) + 1)|0; return ($15|0); } function _Gui_GetInventoryScale() { var $0 = 0, $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, label = 0, sp = 0; sp = STACKTOP; $0 = (_GetWindowScale()|0); $1 = (+($0|0)); $2 = +HEAPF32[(1803540)>>2]; $3 = $2 * 0.5; $4 = $3 * $1; $5 = (+_Gui_Scale($4)); return (+$5); } function _Gui_GetChatScale() { var $0 = 0, $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, label = 0, sp = 0; sp = STACKTOP; $0 = (_GetWindowScale()|0); $1 = (+($0|0)); $2 = +HEAPF32[(1803536)>>2]; $3 = $2 * $1; $4 = (+_Gui_Scale($3)); return (+$4); } function _Gui_MakeTitleFont($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Font_Make($0,16,1); return; } function _Gui_MakeBodyFont($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Font_Make($0,16,0); return; } function _Gui_CalcPos($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; switch ($0<<24>>24) { case 0: { $$0 = $1; break; } case 2: { $4 = (($2) + ($1))|0; $5 = (($3) - ($4))|0; $$0 = $5; break; } case 3: { $6 = (($3|0) / 2)&-1; $7 = (($6) + ($1))|0; $$0 = $7; break; } case 4: { $8 = (($3|0) / 2)&-1; $9 = (($2) + ($1))|0; $10 = (($8) - ($9))|0; $$0 = $10; break; } default: { $11 = (($3) - ($2))|0; $12 = (($11|0) / 2)&-1; $13 = (($12) + ($1))|0; $$0 = $13; } } return ($$0|0); } function _Gui_Contains($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $10 = 0, $11 = 0, $12 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, $or$cond$not = 0, $or$cond11 = 0, label = 0, sp = 0; sp = STACKTOP; $6 = ($4|0)>=($0|0); $7 = ($5|0)>=($1|0); $or$cond$not = $6 & $7; $8 = (($2) + ($0))|0; $9 = ($8|0)>($4|0); $or$cond11 = $9 & $or$cond$not; $10 = (($3) + ($1))|0; $11 = ($10|0)>($5|0); $narrow = $11 & $or$cond11; $12 = $narrow&1; return ($12|0); } function _Gui_ContainsPointers($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$02025 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond$not = 0, $or$cond22 = 0, $or$cond24 = 0; var label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[451036]|0; $5 = ($4|0)>(0); if (!($5)) { $$0 = 0; return ($$0|0); } $6 = (($2) + ($0))|0; $7 = (($3) + ($1))|0; $8 = HEAP32[451036]|0; $$02025 = 0; while(1) { $11 = (390496 + ($$02025<<3)|0); $12 = HEAP32[$11>>2]|0; $13 = (((390496 + ($$02025<<3)|0)) + 4|0); $14 = HEAP32[$13>>2]|0; $15 = ($12|0)>=($0|0); $16 = ($14|0)>=($1|0); $or$cond$not = $15 & $16; $17 = ($12|0)<($6|0); $or$cond22 = $17 & $or$cond$not; $18 = ($14|0)<($7|0); $or$cond24 = $18 & $or$cond22; $9 = (($$02025) + 1)|0; if ($or$cond24) { $$0 = 1; label = 5; break; } $10 = ($9|0)<($8|0); if ($10) { $$02025 = $9; } else { $$0 = 0; label = 5; break; } } if ((label|0) == 5) { return ($$0|0); } return (0)|0; } function _Gui_Refresh($0) { $0 = $0|0; var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[$0>>2]|0; $2 = ((($1)) + 56|0); $3 = HEAP32[$2>>2]|0; FUNCTION_TABLE_vi[$3 & 511]($0); $4 = HEAP32[$0>>2]|0; $5 = ((($4)) + 60|0); $6 = HEAP32[$5>>2]|0; FUNCTION_TABLE_vi[$6 & 511]($0); $7 = HEAP32[$0>>2]|0; $8 = ((($7)) + 52|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_vi[$9 & 511]($0); $10 = ((($0)) + 7|0); HEAP8[$10>>0] = 1; return; } function _Gui_Add($0,$1) { $0 = $0|0; $1 = $1|0; var $$09 = 0, $$09$in = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Gui_RemoveCore($0); $2 = HEAP32[(1803516)>>2]|0; $3 = ($2|0)>(0); if (!($3)) { _Gui_AddCore($0,$1); _Gui_OnScreensChanged(); return; } $$09$in = $2; while(1) { $$09 = (($$09$in) + -1)|0; $4 = (1972854 + ($$09)|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; $7 = ($6|0)==($1|0); if ($7) { $8 = (390192 + ($$09<<2)|0); $9 = HEAP32[$8>>2]|0; _Gui_RemoveCore($9); } $10 = ($$09$in|0)>(1); if ($10) { $$09$in = $$09; } else { break; } } _Gui_AddCore($0,$1); _Gui_OnScreensChanged(); return; } function _Gui_AddCore($0,$1) { $0 = $0|0; $1 = $1|0; var $$03135 = 0, $$03140 = 0, $$037 = 0, $$136 = 0, $$pr = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1803516)>>2]|0; $3 = ($2|0)>(9); if ($3) { _Logger_Abort(31499); $$pr = HEAP32[(1803516)>>2]|0; $4 = $$pr; } else { $4 = $2; } $5 = ($4|0)>(0); L4: do { if ($5) { $6 = HEAP32[(1803516)>>2]|0; $$03140 = 0;$11 = $4; while(1) { $7 = (1972854 + ($$03140)|0); $8 = HEAP8[$7>>0]|0; $9 = $8&255; $10 = ($9|0)<($1|0); if ($10) { break; } $21 = (($$03140) + 1)|0; $22 = ($21|0)<($6|0); if ($22) { $$03140 = $21;$11 = $6; } else { $$03135 = $21;$27 = $6; break L4; } } $12 = ($11|0)>($$03140|0); if ($12) { $$037 = $11; while(1) { $13 = (($$037) + -1)|0; $14 = (390192 + ($13<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = (390192 + ($$037<<2)|0); HEAP32[$16>>2] = $15; $17 = (1972854 + ($13)|0); $18 = HEAP8[$17>>0]|0; $19 = (1972854 + ($$037)|0); HEAP8[$19>>0] = $18; $20 = ($13|0)>($$03140|0); if ($20) { $$037 = $13; } else { $$03135 = $$03140;$27 = $11; break; } } } else { $$03135 = $$03140;$27 = $11; } } else { $$03135 = 0;$27 = $4; } } while(0); $23 = (390192 + ($$03135<<2)|0); HEAP32[$23>>2] = $0; $24 = $1&255; $25 = (1972854 + ($$03135)|0); HEAP8[$25>>0] = $24; $26 = (($27) + 1)|0; HEAP32[(1803516)>>2] = $26; $28 = ((($0)) + 7|0); HEAP8[$28>>0] = 1; $29 = HEAP32[$0>>2]|0; $30 = HEAP32[$29>>2]|0; FUNCTION_TABLE_vi[$30 & 511]($0); $31 = HEAP32[$0>>2]|0; $32 = ((($31)) + 60|0); $33 = HEAP32[$32>>2]|0; FUNCTION_TABLE_vi[$33 & 511]($0); $34 = HEAP32[$0>>2]|0; $35 = ((($34)) + 52|0); $36 = HEAP32[$35>>2]|0; FUNCTION_TABLE_vi[$36 & 511]($0); $37 = HEAP32[451036]|0; $38 = ($37|0)>(0); if (!($38)) { return; } $$136 = 0; while(1) { $39 = HEAP32[$0>>2]|0; $40 = ((($39)) + 44|0); $41 = HEAP32[$40>>2]|0; $42 = (390496 + ($$136<<3)|0); $43 = HEAP32[$42>>2]|0; $44 = (((390496 + ($$136<<3)|0)) + 4|0); $45 = HEAP32[$44>>2]|0; (FUNCTION_TABLE_iiiii[$41 & 63]($0,$$136,$43,$45)|0); $46 = (($$136) + 1)|0; $47 = HEAP32[451036]|0; $48 = ($46|0)<($47|0); if ($48) { $$136 = $46; } else { break; } } return; } function _Gui_GetBlocksWorld() { var $$04 = 0, $$05 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1803516)>>2]|0; $1 = ($0|0)>(0); if (!($1)) { $$04 = 0; return ($$04|0); } $2 = HEAP32[(1803516)>>2]|0; $$05 = 0; while(1) { $5 = (390192 + ($$05<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = ((($6)) + 5|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(0); $3 = (($$05) + 1)|0; if (!($9)) { $$04 = $6; label = 5; break; } $4 = ($3|0)<($2|0); if ($4) { $$05 = $3; } else { $$04 = 0; label = 5; break; } } if ((label|0) == 5) { return ($$04|0); } return (0)|0; } function _Gui_GetClosable() { var $$04 = 0, $$05 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1803516)>>2]|0; $1 = ($0|0)>(0); if (!($1)) { $$04 = 0; return ($$04|0); } $2 = HEAP32[(1803516)>>2]|0; $$05 = 0; while(1) { $5 = (390192 + ($$05<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = ((($6)) + 6|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(0); $3 = (($$05) + 1)|0; if (!($9)) { $$04 = $6; label = 5; break; } $4 = ($3|0)<($2|0); if ($4) { $$05 = $3; } else { $$04 = 0; label = 5; break; } } if ((label|0) == 5) { return ($$04|0); } return (0)|0; } function _Gui_ShowPauseMenu() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1803522)>>0]|0; $1 = ($0<<24>>24)==(0); if ($1) { _PauseScreen_Show(); return; } else { _ClassicPauseScreen_Show(); return; } } function _Gui_RenderGui($0) { $0 = +$0; var $$016 = 0, $$016$in = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $1 = HEAP32[(1803516)>>2]|0; $2 = ($1|0)>(0); if (!($2)) { return; } $$016$in = $1; while(1) { $$016 = (($$016$in) + -1)|0; $3 = (390192 + ($$016<<2)|0); $4 = HEAP32[$3>>2]|0; $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 4|0); $7 = HEAP32[$6>>2]|0; FUNCTION_TABLE_vid[$7 & 63]($4,$0); $8 = ((($4)) + 7|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(0); if (!($10)) { $11 = HEAP32[$4>>2]|0; $12 = ((($11)) + 16|0); $13 = HEAP32[$12>>2]|0; FUNCTION_TABLE_vi[$13 & 511]($4); HEAP8[$8>>0] = 0; } $14 = HEAP32[$4>>2]|0; $15 = ((($14)) + 12|0); $16 = HEAP32[$15>>2]|0; FUNCTION_TABLE_vid[$16 & 63]($4,$0); $17 = ($$016$in|0)>(1); if ($17) { $$016$in = $$016; } else { break; } } return; } function _TextAtlas_Make($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0$lcssa = 0, $$04144 = 0, $$045 = 0, $$143 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; var $63 = 0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0, $73 = 0, $74 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $4 = sp + 16|0; $5 = sp + 32|0; $6 = sp + 8|0; $7 = sp; _Gfx_DeleteTexture($0); _DrawTextArgs_Make($4,$3,$2,1); $8 = (_Drawer2D_TextWidth($4)|0); $9 = ((($0)) + 28|0); HEAP32[$9>>2] = $8; $10 = ((($1)) + 4|0); $11 = HEAP16[$10>>1]|0; $12 = ($11<<16>>16)==(0); if ($12) { $$0$lcssa = $8; } else { $$04144 = 0;$$045 = $8; while(1) { _String_UNSAFE_Substring($6,$1,$$04144,1); $13 = $6; $14 = $13; $15 = HEAP32[$14>>2]|0; $16 = (($13) + 4)|0; $17 = $16; $18 = HEAP32[$17>>2]|0; $19 = $4; $20 = $19; HEAP32[$20>>2] = $15; $21 = (($19) + 4)|0; $22 = $21; HEAP32[$22>>2] = $18; $23 = (_Drawer2D_TextWidth($4)|0); $24 = $23&65535; $25 = (((($0)) + 40|0) + ($$04144<<1)|0); HEAP16[$25>>1] = $24; $26 = $$045&65535; $27 = (((($0)) + 72|0) + ($$04144<<1)|0); HEAP16[$27>>1] = $26; $28 = (($$045) + 1)|0; $29 = (($28) + ($23))|0; $30 = (($$04144) + 1)|0; $31 = HEAP16[$10>>1]|0; $32 = $31&65535; $33 = ($30>>>0)<($32>>>0); if ($33) { $$04144 = $30;$$045 = $29; } else { $$0$lcssa = $29; break; } } } $34 = (_Drawer2D_TextHeight($4)|0); _Context2D_Alloc($5,$$0$lcssa,$34); $35 = $3; $36 = $35; $37 = HEAP32[$36>>2]|0; $38 = (($35) + 4)|0; $39 = $38; $40 = HEAP32[$39>>2]|0; $41 = $4; $42 = $41; HEAP32[$42>>2] = $37; $43 = (($41) + 4)|0; $44 = $43; HEAP32[$44>>2] = $40; _Context2D_DrawText($5,$4,0,0); $45 = HEAP16[$10>>1]|0; $46 = ($45<<16>>16)==(0); if ($46) { _Context2D_MakeTexture($0,$5); _Context2D_Free($5); $64 = ((($5)) + 4|0); $65 = HEAP32[$64>>2]|0; $66 = (+($65|0)); $67 = 1.0 / $66; $68 = ((($0)) + 36|0); HEAPF32[$68>>2] = $67; $69 = HEAP32[$9>>2]|0; $70 = (+($69|0)); $71 = $67 * $70; $72 = ((($0)) + 20|0); HEAPF32[$72>>2] = $71; $73 = $69&65535; $74 = ((($0)) + 8|0); HEAP16[$74>>1] = $73; STACKTOP = sp;return; } $$143 = 0; while(1) { _String_UNSAFE_Substring($7,$1,$$143,1); $47 = $7; $48 = $47; $49 = HEAP32[$48>>2]|0; $50 = (($47) + 4)|0; $51 = $50; $52 = HEAP32[$51>>2]|0; $53 = $4; $54 = $53; HEAP32[$54>>2] = $49; $55 = (($53) + 4)|0; $56 = $55; HEAP32[$56>>2] = $52; $57 = (((($0)) + 72|0) + ($$143<<1)|0); $58 = HEAP16[$57>>1]|0; $59 = $58 << 16 >> 16; _Context2D_DrawText($5,$4,$59,0); $60 = (($$143) + 1)|0; $61 = HEAP16[$10>>1]|0; $62 = $61&65535; $63 = ($60>>>0)<($62>>>0); if ($63) { $$143 = $60; } else { break; } } _Context2D_MakeTexture($0,$5); _Context2D_Free($5); $64 = ((($5)) + 4|0); $65 = HEAP32[$64>>2]|0; $66 = (+($65|0)); $67 = 1.0 / $66; $68 = ((($0)) + 36|0); HEAPF32[$68>>2] = $67; $69 = HEAP32[$9>>2]|0; $70 = (+($69|0)); $71 = $67 * $70; $72 = ((($0)) + 20|0); HEAPF32[$72>>2] = $71; $73 = $69&65535; $74 = ((($0)) + 8|0); HEAP16[$74>>1] = $73; STACKTOP = sp;return; } function _TextAtlas_Free($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteTexture($0); return; } function _TextAtlas_Add($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $3 = sp; ;HEAP32[$3>>2]=HEAP32[$0>>2]|0;HEAP32[$3+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$3+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$3+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$3+16>>2]=HEAP32[$0+16>>2]|0;HEAP32[$3+20>>2]=HEAP32[$0+20>>2]|0;HEAP32[$3+24>>2]=HEAP32[$0+24>>2]|0; $4 = (((($0)) + 40|0) + ($1<<1)|0); $5 = HEAP16[$4>>1]|0; $6 = $5 << 16 >> 16; $7 = ((($0)) + 32|0); $8 = HEAP32[$7>>2]|0; $9 = $8&65535; $10 = ((($3)) + 4|0); HEAP16[$10>>1] = $9; $11 = ((($3)) + 8|0); HEAP16[$11>>1] = $5; $12 = (((($0)) + 72|0) + ($1<<1)|0); $13 = HEAP16[$12>>1]|0; $14 = (+($13<<16>>16)); $15 = ((($0)) + 36|0); $16 = +HEAPF32[$15>>2]; $17 = $16 * $14; $18 = ((($3)) + 12|0); HEAPF32[$18>>2] = $17; $19 = (+($5<<16>>16)); $20 = $16 * $19; $21 = $17 + $20; $22 = ((($3)) + 20|0); HEAPF32[$22>>2] = $21; $23 = (($8) + ($6))|0; HEAP32[$7>>2] = $23; _Gfx_Make2DQuad($3,-1,$2); STACKTOP = sp;return; } function _TextAtlas_AddInt($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $$01315 = 0, $$01315$in = 0, $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $3 = sp; $4 = ($1|0)<(0); if ($4) { $5 = (0 - ($1))|0; _TextAtlas_Add($0,10,$2); $$0 = $5; } else { $$0 = $1; } $6 = (_String_MakeUInt32($$0,$3)|0); $7 = ($6|0)>(0); if (!($7)) { STACKTOP = sp;return; } $$01315$in = $6; while(1) { $$01315 = (($$01315$in) + -1)|0; $8 = (($3) + ($$01315)|0); $9 = HEAP8[$8>>0]|0; $10 = $9 << 24 >> 24; $11 = (($10) + -48)|0; _TextAtlas_Add($0,$11,$2); $12 = ($$01315$in|0)>(1); if ($12) { $$01315$in = $$01315; } else { break; } } STACKTOP = sp;return; } function _Widget_SetLocation($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = ((($0)) + 22|0); HEAP8[$5>>0] = $1; $6 = ((($0)) + 23|0); HEAP8[$6>>0] = $2; $7 = (_Display_ScaleX($3)|0); $8 = ((($0)) + 24|0); HEAP32[$8>>2] = $7; $9 = (_Display_ScaleY($4)|0); $10 = ((($0)) + 28|0); HEAP32[$10>>2] = $9; $11 = HEAP32[$0>>2]|0; $12 = ((($11)) + 8|0); $13 = HEAP32[$12>>2]|0; FUNCTION_TABLE_vi[$13 & 511]($0); return; } function _Widget_CalcPosition($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 22|0); $2 = HEAP8[$1>>0]|0; $3 = ((($0)) + 24|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 12|0); $6 = HEAP32[$5>>2]|0; $7 = HEAP32[(1972116)>>2]|0; $8 = (_Gui_CalcPos($2,$4,$6,$7)|0); $9 = ((($0)) + 4|0); HEAP32[$9>>2] = $8; $10 = ((($0)) + 23|0); $11 = HEAP8[$10>>0]|0; $12 = ((($0)) + 28|0); $13 = HEAP32[$12>>2]|0; $14 = ((($0)) + 16|0); $15 = HEAP32[$14>>2]|0; $16 = HEAP32[(1972120)>>2]|0; $17 = (_Gui_CalcPos($11,$13,$15,$16)|0); $18 = ((($0)) + 8|0); HEAP32[$18>>2] = $17; return; } function _Widget_Reset($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); ;HEAP32[$1>>2]=0|0;HEAP32[$1+4>>2]=0|0;HEAP32[$1+8>>2]=0|0;HEAP32[$1+12>>2]=0|0;HEAP32[$1+16>>2]=0|0;HEAP32[$1+20>>2]=0|0;HEAP32[$1+24>>2]=0|0;HEAP32[$1+28>>2]=0|0; return; } function _Widget_Contains($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 4|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 8|0); $6 = HEAP32[$5>>2]|0; $7 = ((($0)) + 12|0); $8 = HEAP32[$7>>2]|0; $9 = ((($0)) + 16|0); $10 = HEAP32[$9>>2]|0; $11 = (_Gui_Contains($4,$6,$8,$10,$1,$2)|0); return ($11|0); } function _Screen_Render2Widgets($0,$1) { $0 = $0|0; $1 = +$1; var $$01920 = 0, $$021 = 0, $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 16|0); $3 = HEAP32[$2>>2]|0; _Gfx_SetVertexFormat(1); $4 = ((($0)) + 12|0); $5 = HEAP32[$4>>2]|0; _Gfx_BindVb($5); $6 = ((($0)) + 20|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)>(0); if (!($8)) { return; } $$01920 = 0;$$021 = 0; while(1) { $9 = (($3) + ($$01920<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0|0); if ($11) { $$1 = $$021; } else { $12 = HEAP32[$10>>2]|0; $13 = ((($12)) + 40|0); $14 = HEAP32[$13>>2]|0; $15 = (FUNCTION_TABLE_iii[$14 & 127]($10,$$021)|0); $$1 = $15; } $16 = (($$01920) + 1)|0; $17 = HEAP32[$6>>2]|0; $18 = ($16|0)<($17|0); if ($18) { $$01920 = $16;$$021 = $$1; } else { break; } } return; } function _Screen_UpdateVb($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 12|0); $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; _Gfx_RecreateDynamicVb($1,1,$3); return; } function _Screen_LockVb($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 12|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 8|0); $4 = HEAP32[$3>>2]|0; $5 = (_Gfx_LockDynamicVb($2,1,$4)|0); return ($5|0); } function _Screen_DoPointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$03438 = 0, $$03438$in = 0, $$2 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 16|0); $5 = HEAP32[$4>>2]|0; $6 = ((($0)) + 20|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)>(0); if (!($8)) { $$2 = -1; return ($$2|0); } $$03438$in = $7; while(1) { $$03438 = (($$03438$in) + -1)|0; $9 = (($5) + ($$03438<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0|0); if (!($11)) { $12 = (_Widget_Contains($10,$2,$3)|0); $13 = ($12|0)==(0); if (!($13)) { break; } } $23 = ($$03438$in|0)>(1); if ($23) { $$03438$in = $$03438; } else { $$2 = -1; label = 10; break; } } if ((label|0) == 10) { return ($$2|0); } $14 = ((($10)) + 21|0); $15 = HEAP8[$14>>0]|0; $16 = ($15<<24>>24)==(0); if (!($16)) { $$2 = $$03438; return ($$2|0); } $17 = ((($10)) + 32|0); $18 = HEAP32[$17>>2]|0; $19 = ($18|0)==(0|0); if ($19) { $20 = HEAP32[$10>>2]|0; $21 = ((($20)) + 24|0); $22 = HEAP32[$21>>2]|0; (FUNCTION_TABLE_iiiii[$22 & 63]($10,$1,$2,$3)|0); $$2 = $$03438; return ($$2|0); } else { FUNCTION_TABLE_vii[$18 & 255]($0,$10); $$2 = $$03438; return ($$2|0); } } function _Screen_Index($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$01617 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 16|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 20|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)>(0); if (!($6)) { $$0 = -1; return ($$0|0); } $$01617 = 0; while(1) { $7 = (($3) + ($$01617<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==($1|0); if ($9) { $$0 = $$01617; label = 5; break; } $10 = (($$01617) + 1)|0; $11 = HEAP32[$4>>2]|0; $12 = ($10|0)<($11|0); if ($12) { $$01617 = $10; } else { $$0 = -1; label = 5; break; } } if ((label|0) == 5) { return ($$0|0); } return (0)|0; } function _Screen_BuildMesh($0) { $0 = $0|0; var $$020 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($0)) + 16|0); $3 = HEAP32[$2>>2]|0; $4 = (_Screen_LockVb($0)|0); HEAP32[$1>>2] = $4; $5 = ((($0)) + 20|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)>(0); if (!($7)) { $17 = ((($0)) + 12|0); $18 = HEAP32[$17>>2]|0; _Gfx_UnlockDynamicVb($18); STACKTOP = sp;return; } $$020 = 0; while(1) { $8 = (($3) + ($$020<<2)|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)==(0|0); if (!($10)) { $11 = HEAP32[$9>>2]|0; $12 = ((($11)) + 36|0); $13 = HEAP32[$12>>2]|0; FUNCTION_TABLE_vii[$13 & 255]($9,$1); } $14 = (($$020) + 1)|0; $15 = HEAP32[$5>>2]|0; $16 = ($14|0)<($15|0); if ($16) { $$020 = $14; } else { break; } } $17 = ((($0)) + 12|0); $18 = HEAP32[$17>>2]|0; _Gfx_UnlockDynamicVb($18); STACKTOP = sp;return; } function _Screen_Layout($0) { $0 = $0|0; var $$015 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 20|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if (!($5)) { return; } $$015 = 0; while(1) { $6 = (($2) + ($$015<<2)|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==(0|0); if (!($8)) { $9 = HEAP32[$7>>2]|0; $10 = ((($9)) + 8|0); $11 = HEAP32[$10>>2]|0; FUNCTION_TABLE_vi[$11 & 511]($7); } $12 = (($$015) + 1)|0; $13 = HEAP32[$3>>2]|0; $14 = ($12|0)<($13|0); if ($14) { $$015 = $12; } else { break; } } return; } function _Screen_ContextLost($0) { $0 = $0|0; var $$016 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 12|0); _Gfx_DeleteVb($3); $4 = ((($0)) + 20|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)>(0); if (!($6)) { return; } $$016 = 0; while(1) { $7 = (($2) + ($$016<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(0|0); if (!($9)) { $10 = HEAP32[$8>>2]|0; $11 = ((($10)) + 4|0); $12 = HEAP32[$11>>2]|0; FUNCTION_TABLE_vi[$12 & 511]($8); } $13 = (($$016) + 1)|0; $14 = HEAP32[$4>>2]|0; $15 = ($13|0)<($14|0); if ($15) { $$016 = $13; } else { break; } } return; } function _Screen_InputDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$off = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $$off = (($1) + -1)|0; $2 = ($$off>>>0)>(23); $3 = $2&1; return ($3|0); } function _Screen_InputUp($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Screen_PointerUp($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _OnInit_881() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; _Entity_Init(1803576); HEAP32[450894] = 14604; HEAP8[(1803686)>>0] = 1; $0 = (_Options_GetBool(31515,1)|0); HEAP8[1972864] = $0; $1 = HEAP32[(1811004)>>2]|0; $2 = HEAP32[(1811000)>>2]|0; $3 = (($2) + ($1))|0; $4 = (1809300 + ($3<<1)|0); $5 = HEAP16[$4>>1]|0; HEAP16[986402] = $5; _Event_Register((1793268),0,337); _Event_Register((1794568),0,338); _Event_Register(1794048,0,28); return; } function _OnProjectionChanged($0) { $0 = $0|0; var $1 = 0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[271246]|0; $2 = (+($1|0)); $3 = HEAP32[(1084988)>>2]|0; $4 = (+($3|0)); $5 = $2 / $4; $6 = HEAP32[3582]|0; $7 = (+($6|0)); _Gfx_CalcPerspectiveMatrix(1.2217304706573486,$5,$7,1804072); return; } function _DoSwitchBlockAnim($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972865]|0; $2 = ($1<<24>>24)==(0); if ($2) { $8 = HEAP16[986403]|0; $9 = HEAP32[(1811004)>>2]|0; $10 = HEAP32[(1811000)>>2]|0; $11 = (($10) + ($9))|0; $12 = (1809300 + ($11<<1)|0); $13 = HEAP16[$12>>1]|0; $14 = ($8<<16>>16)==($13<<16>>16); if ($14) { return; } _HeldBlockRenderer_ResetAnim(0,0.25); HEAP8[1972867] = 1; HEAP8[1972865] = 1; return; } else { $3 = +HEAPF64[135628]; $4 = +HEAPF64[1638]; $5 = $4 * 0.5; $6 = $3 > $5; if (!($6)) { return; } $7 = $4 - $3; HEAPF64[135628] = $7; return; } } function _OnBlockChanged($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($3<<16>>16)==(0); if ($4) { return; } _HeldBlockRenderer_ClickAnim(0); return; } function _HeldBlockRenderer_ClickAnim($0) { $0 = $0|0; var $1 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0<<24>>24)==(0); $2 = $1 ? 0.25 : 0.34999999999999998; _HeldBlockRenderer_ResetAnim(1,$2); HEAP8[1972865] = 0; HEAP8[1972866] = $0; HEAP8[1972867] = 1; if (!($1)) { return; } $3 = +HEAPF64[1638]; $4 = $3 * 0.5; HEAPF64[135628] = $4; return; } function _HeldBlockRenderer_ResetAnim($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; HEAPF64[135628] = 0.0; HEAPF32[451017] = 0.0; HEAP8[1972867] = 0; HEAP8[1972865] = 0; HEAPF64[1638] = $1; $2 = ($0<<24>>24)==(0); if ($2) { return; } $3 = HEAP32[(1811004)>>2]|0; $4 = HEAP32[(1811000)>>2]|0; $5 = (($4) + ($3))|0; $6 = (1809300 + ($5<<1)|0); $7 = HEAP16[$6>>1]|0; HEAP16[986402] = $7; return; } function _HeldBlockRenderer_GetCol($0) { $0 = $0|0; var $$0 = 0.0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[445943]|0; $2 = ((($1)) + 12|0); $3 = HEAP32[$2>>2]|0; $4 = (FUNCTION_TABLE_ii[$3 & 31](1783772)|0); $5 = +HEAPF32[(1783788)>>2]; $6 = $5 + -90.0; $7 = $6 < 0.0; $8 = $6 + 360.0; $$0 = $7 ? $8 : $6; $9 = $$0 + -180.0; $10 = (+Math_abs((+$9))); $11 = $10 / 180.0; $12 = (+_Math_Lerp(0.89999997615814208,0.69999998807907104,$11)); $13 = (_PackedCol_Scale($4,$12)|0); return ($13|0); } function _HeldBlockRenderer_Render($0) { $0 = +$0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $1 = sp; $2 = HEAP8[1972864]|0; $3 = ($2<<24>>24)==(0); if ($3) { STACKTOP = sp;return; } $4 = +HEAPF32[451017]; HEAPF32[451017] = 0.0; $5 = HEAP32[(1811004)>>2]|0; $6 = HEAP32[(1811000)>>2]|0; $7 = (($6) + ($5))|0; $8 = (1809300 + ($7<<1)|0); $9 = HEAP16[$8>>1]|0; HEAP16[986403] = $9; dest=$1; src=(1803132); stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); _Gfx_LoadMatrix(0,1804072); _SetMatrix(); _ResetHeldState(); _DoAnimation($0,$4); _SetBaseOffset(); $10 = HEAP32[(1771060)>>2]|0; $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(0); if ($12) { _HeldBlockRenderer_RenderModel(); } dest=(1803132); src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); _Gfx_LoadMatrix(0,(1803196)); STACKTOP = sp;return; } function _SetMatrix() { var $0 = 0, $1 = 0.0, $2 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $0 = sp; $1 = (+_Entity_GetEyeHeight(1783772)); $2 = - $1; _Matrix_Translate($0,-0.0,$2,-0.0); _Matrix_Mul((1803132),$0,(1770976)); STACKTOP = sp;return; } function _ResetHeldState() { var $0 = 0.0, $1 = 0.0, $10 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (+_Entity_GetEyeHeight(1783772)); $1 = +HEAPF32[(1771044)>>2]; $2 = 0.0 - $1; HEAPF32[(1803580)>>2] = $2; $3 = +HEAPF32[(1771040)>>2]; $4 = $0 - $3; HEAPF32[(1803584)>>2] = $4; HEAPF32[(1803588)>>2] = $2; HEAPF32[(1803596)>>2] = -45.0; HEAPF32[(1803604)>>2] = -45.0; HEAPF32[(1803592)>>2] = 0.0; HEAPF32[(1803600)>>2] = 0.0; $5 = HEAP16[986403]|0; HEAP16[(1803628)>>1] = $5; $6 = HEAP8[(1783880)>>0]|0; HEAP8[(1803684)>>0] = $6; $7 = HEAP32[(1783884)>>2]|0; HEAP32[(1803688)>>2] = $7; $8 = HEAP32[(1783888)>>2]|0; HEAP32[(1803692)>>2] = $8; $9 = HEAP32[(1783892)>>2]|0; HEAP32[(1803696)>>2] = $9; $10 = HEAP32[(1783896)>>2]|0; HEAP32[(1803700)>>2] = $10; return; } function _DoAnimation($0,$1) { $0 = +$0; $1 = +$1; var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[1972867]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } $4 = HEAP8[1972865]|0; $5 = ($4<<24>>24)==(0); $6 = HEAP8[1972866]|0; $7 = ($6<<24>>24)!=(0); $or$cond = $5 & $7; if ($or$cond) { _HeldBlockRenderer_DigAnimation(); } else { $8 = +HEAPF64[135628]; $9 = +HEAPF64[1638]; $10 = $8 / $9; $11 = $10 * 3.1415927410125732; $12 = (+_Math_Sin($11)); $13 = $12; $14 = $13 * -0.40000000596046448; HEAPF32[451017] = $14; $15 = +HEAPF32[(1803584)>>2]; $16 = $15 + $14; HEAPF32[(1803584)>>2] = $16; $17 = HEAP8[1972865]|0; $18 = ($17<<24>>24)==(0); if (!($18)) { $19 = $14 > $1; if ($19) { $20 = HEAP16[986403]|0; HEAP16[986402] = $20; } $21 = HEAP16[986402]|0; HEAP16[986403] = $21; HEAP16[(1803628)>>1] = $21; } } $22 = +HEAPF64[135628]; $23 = $22 + $0; HEAPF64[135628] = $23; $24 = +HEAPF64[1638]; $25 = $23 > $24; if (!($25)) { return; } _HeldBlockRenderer_ResetAnim(1,0.25); return; } function _SetBaseOffset() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; $1 = HEAP16[986403]|0; $2 = $1&65535; $3 = (1120788 + ($2)|0); $4 = HEAP8[$3>>0]|0; $5 = ($4<<24>>24)==(5); if ($5) { ;HEAP32[$0>>2]=HEAP32[14636>>2]|0;HEAP32[$0+4>>2]=HEAP32[14636+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[14636+8>>2]|0; _Vec3_Add_886($0); STACKTOP = sp;return; } ;HEAP32[$0>>2]=HEAP32[14648>>2]|0;HEAP32[$0+4>>2]=HEAP32[14648+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[14648+8>>2]|0; _Vec3_Add_886($0); $6 = HEAP8[$3>>0]|0; $7 = ($6<<24>>24)==(4); if ($7) { STACKTOP = sp;return; } $8 = (((1134612 + (($2*12)|0)|0)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = (((1125396 + (($2*12)|0)|0)) + 4|0); $11 = +HEAPF32[$10>>2]; $12 = $9 - $11; $13 = 1.0 - $12; $14 = $13 * 0.20000000298023224; $15 = +HEAPF32[(1803584)>>2]; $16 = $15 + $14; HEAPF32[(1803584)>>2] = $16; STACKTOP = sp;return; } function _HeldBlockRenderer_RenderModel() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Gfx_SetFaceCulling(1); _Gfx_SetDepthTest(0); $0 = HEAP16[986403]|0; $1 = $0&65535; $2 = (1120788 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(4); if ($4) { $5 = HEAP32[(1783820)>>2]|0; HEAPF32[(1803656)>>2] = 1.0; HEAPF32[(1803660)>>2] = 1.0; HEAPF32[(1803664)>>2] = 1.0; _Gfx_SetAlphaTest(1); _Model_RenderArm($5,1803576); _Gfx_SetAlphaTest(0); _Gfx_SetDepthTest(1); _Gfx_SetFaceCulling(0); return; } else { $6 = (_Model_Get(14628)|0); HEAPF32[(1803656)>>2] = 0.40000000596046448; HEAPF32[(1803660)>>2] = 0.40000000596046448; HEAPF32[(1803664)>>2] = 0.40000000596046448; $7 = HEAP16[986403]|0; $8 = $7&65535; $9 = (1120788 + ($8)|0); $10 = HEAP8[$9>>0]|0; _Gfx_SetupAlphaState($10); _Model_Render($6,1803576); $11 = HEAP16[986403]|0; $12 = $11&65535; $13 = (1120788 + ($12)|0); $14 = HEAP8[$13>>0]|0; _Gfx_RestoreAlphaState($14); _Gfx_SetDepthTest(1); _Gfx_SetFaceCulling(0); return; } } function _Vec3_Add_886($0) { $0 = $0|0; var $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1803580)>>2]; $2 = +HEAPF32[$0>>2]; $3 = $1 + $2; HEAPF32[(1803580)>>2] = $3; $4 = +HEAPF32[(1803584)>>2]; $5 = ((($0)) + 4|0); $6 = +HEAPF32[$5>>2]; $7 = $4 + $6; HEAPF32[(1803584)>>2] = $7; $8 = +HEAPF32[(1803588)>>2]; $9 = ((($0)) + 8|0); $10 = +HEAPF32[$9>>2]; $11 = $8 + $10; HEAPF32[(1803588)>>2] = $11; return; } function _HeldBlockRenderer_DigAnimation() { var $0 = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0; var $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $5 = 0.0; var $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $0 = +HEAPF64[135628]; $1 = +HEAPF64[1638]; $2 = $0 / $1; $3 = $2; $4 = $3 * 3.1415927410125732; $5 = $4; $6 = (+_Math_Sin($5)); $7 = (+Math_sqrt((+$3))); $8 = $7 * 3.1415927410125732; $9 = $8; $10 = (+_Math_Sin($9)); $11 = $10; $12 = $11 * 0.40000000596046448; $13 = +HEAPF32[(1803580)>>2]; $14 = $13 - $12; HEAPF32[(1803580)>>2] = $14; $15 = $8 * 2.0; $16 = $15; $17 = (+_Math_Sin($16)); $18 = $17; $19 = $18 * 0.20000000298023224; $20 = +HEAPF32[(1803584)>>2]; $21 = $20 + $19; HEAPF32[(1803584)>>2] = $21; $22 = $6; $23 = $22 * 0.20000000298023224; $24 = +HEAPF32[(1803588)>>2]; $25 = $24 - $23; HEAPF32[(1803588)>>2] = $25; $26 = $3 * $3; $27 = $26 * 3.1415927410125732; $28 = $27; $29 = (+_Math_Sin($28)); $30 = (+_Math_Sin($9)); $31 = $30; $32 = $31 * 80.0; $33 = +HEAPF32[(1803604)>>2]; $34 = $33 - $32; HEAPF32[(1803604)>>2] = $34; $35 = (+_Math_Sin($9)); $36 = $35; $37 = $36 * 80.0; $38 = +HEAPF32[(1803596)>>2]; $39 = $38 - $37; HEAPF32[(1803596)>>2] = $39; $40 = $29; $41 = $40 * 20.0; $42 = +HEAPF32[(1803600)>>2]; $43 = $41 + $42; HEAPF32[(1803600)>>2] = $43; return; } function _Http_Init() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; _Http_InitCommon(); $0 = (_interop_IsHttpsOnly()|0); $1 = $0&255; HEAP8[1972868] = $1; $2 = (_DateTime_CurrentUTC_MS()|0); $3 = (getTempRet0() | 0); $4 = 1091304; $5 = $4; HEAP32[$5>>2] = $2; $6 = (($4) + 4)|0; $7 = $6; HEAP32[$7>>2] = $3; _RequestList_Init(1085032); _RequestList_Init(1088168); _RequestList_Init(1091312); return; } function _Http_ClearPending() { var label = 0, sp = 0; sp = STACKTOP; _RequestList_Free(1085032); _RequestList_Free(1088168); return; } function _RequestList_Free($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 8|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 16|0); $4 = ($2|0)==($3|0); if (!($4)) { _Mem_Free($2); } _RequestList_Init($0); return; } function _RequestList_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); HEAP32[$1>>2] = 10; HEAP32[$0>>2] = 0; $2 = ((($0)) + 16|0); $3 = ((($0)) + 8|0); HEAP32[$3>>2] = $2; return; } function _Http_InitCommon() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_Options_GetBool(31531,0)|0); HEAP8[1972869] = $0; (_Options_GetBool(31545,1)|0); _Options_Get(31558,14684,31574); (_ScheduledTask_Add(30.0,339)|0); return; } function _Http_CleanCacheTask($0) { $0 = $0|0; var $$012 = 0, $$012$in = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_DateTime_CurrentUTC_MS()|0); $2 = (getTempRet0() | 0); $3 = HEAP32[272828]|0; $4 = ($3|0)>(0); if (!($4)) { return; } $$012$in = $3; while(1) { $$012 = (($$012$in) + -1)|0; $5 = HEAP32[(1091320)>>2]|0; $6 = (((($5) + (($$012*312)|0)|0)) + 136|0); $7 = $6; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = (($7) + 4)|0; $11 = $10; $12 = HEAP32[$11>>2]|0; $13 = (_i64Add(($9|0),($12|0),10000,0)|0); $14 = (getTempRet0() | 0); $15 = ($14>>>0)<($2>>>0); $16 = ($13>>>0)<($1>>>0); $17 = ($14|0)==($2|0); $18 = $17 & $16; $19 = $15 | $18; if ($19) { $20 = (((($5) + (($$012*312)|0)|0)) + 156|0); $21 = HEAP32[$20>>2]|0; _Mem_Free($21); _RequestList_RemoveAt(1091312,$$012); } $22 = ($$012$in|0)>(1); if ($22) { $$012$in = $$012; } else { break; } } return; } function _RequestList_RemoveAt($0,$1) { $0 = $0|0; $1 = $1|0; var $$010 = 0, $$lcssa = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)<(0); if ($2) { label = 3; } else { $3 = HEAP32[$0>>2]|0; $4 = ($3|0)>($1|0); if (!($4)) { label = 3; } } if ((label|0) == 3) { _Logger_Abort(31614); } $5 = HEAP32[$0>>2]|0; $6 = (($5) + -1)|0; $7 = ($6|0)>($1|0); if (!($7)) { $$lcssa = $6; HEAP32[$0>>2] = $$lcssa; return; } $8 = ((($0)) + 8|0); $$010 = $1; while(1) { $9 = HEAP32[$8>>2]|0; $10 = (($$010) + 1)|0; $11 = (($9) + (($$010*312)|0)|0); $12 = (($9) + (($10*312)|0)|0); _memcpy(($11|0),($12|0),312)|0; $13 = HEAP32[$0>>2]|0; $14 = (($13) + -1)|0; $15 = ($10|0)<($14|0); if ($15) { $$010 = $10; } else { $$lcssa = $14; break; } } HEAP32[$0>>2] = $$lcssa; return; } function _Http_OnFinishedAsync($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp; HEAP32[$4>>2] = $0; $5 = (_RequestList_Find(1088168,$0)|0); $6 = ($5|0)==(-1); if ($6) { _Mem_Free($1); _Platform_Log1(31650,$4); _Http_StartNextDownload(); STACKTOP = sp;return; } $7 = HEAP32[(1088176)>>2]|0; $8 = (($7) + (($5*312)|0)|0); $9 = (((($7) + (($5*312)|0)|0)) + 156|0); HEAP32[$9>>2] = $1; $10 = (((($7) + (($5*312)|0)|0)) + 160|0); HEAP32[$10>>2] = $2; $11 = (((($7) + (($5*312)|0)|0)) + 144|0); HEAP32[$11>>2] = $3; $12 = (((($7) + (($5*312)|0)|0)) + 148|0); HEAP32[$12>>2] = $2; $13 = ($3|0)!=(0); $14 = ($1|0)!=(0|0); $or$cond = $14 | $13; if ($or$cond) { $16 = ($1|0)==(0|0); if (!($16)) { _Platform_Log1(31680,$10); } } else { $15 = (((($7) + (($5*312)|0)|0)) + 152|0); HEAP32[$15>>2] = -857812900; } _Http_FinishRequest($8); _RequestList_RemoveAt(1088168,$5); _Http_StartNextDownload(); STACKTOP = sp;return; } function _Http_OnUpdateProgress($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_RequestList_Find(1088168,$0)|0); $4 = ($3|0)!=(-1); $5 = ($2|0)!=(0); $or$cond = $5 & $4; if (!($or$cond)) { return; } $6 = (+($1|0)); $7 = $6 * 100.0; $8 = (+($2|0)); $9 = $7 / $8; $10 = (~~(($9))); $11 = HEAP32[(1088176)>>2]|0; $12 = (((($11) + (($3*312)|0)|0)) + 132|0); HEAP32[$12>>2] = $10; return; } function _RequestList_Find($0,$1) { $0 = $0|0; $1 = $1|0; var $$07 = 0, $$08 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[$0>>2]|0; $3 = ($2|0)>(0); if (!($3)) { $$07 = -1; return ($$07|0); } $4 = ((($0)) + 8|0); $5 = HEAP32[$4>>2]|0; $$08 = 0; while(1) { $6 = (((($5) + (($$08*312)|0)|0)) + 128|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==($1|0); if ($8) { $$07 = $$08; label = 5; break; } $9 = (($$08) + 1)|0; $10 = HEAP32[$0>>2]|0; $11 = ($9|0)<($10|0); if ($11) { $$08 = $9; } else { $$07 = -1; label = 5; break; } } if ((label|0) == 5) { return ($$07|0); } return (0)|0; } function _Http_FinishRequest($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 152|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)==(0); if ($3) { $4 = ((($0)) + 144|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)==(200); if ($6) { $7 = ((($0)) + 156|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(0|0); if ($9) { label = 4; } else { $11 = ((($0)) + 160|0); $12 = HEAP32[$11>>2]|0; $13 = ($12|0)!=(0); $phitmp = $13&1; $14 = ((($0)) + 301|0); HEAP8[$14>>0] = $phitmp; if (!($13)) { label = 6; } } } else { label = 4; } } else { label = 4; } if ((label|0) == 4) { $10 = ((($0)) + 301|0); HEAP8[$10>>0] = 0; label = 6; } if ((label|0) == 6) { _HttpRequest_Free($0); } $15 = (_DateTime_CurrentUTC_MS()|0); $16 = (getTempRet0() | 0); $17 = ((($0)) + 136|0); $18 = $17; $19 = $18; HEAP32[$19>>2] = $15; $20 = (($18) + 4)|0; $21 = $20; HEAP32[$21>>2] = $16; _RequestList_Append(1091312,$0,0); return; } function _Http_StartNextDownload() { var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 752|0; $0 = sp + 608|0; $1 = sp + 736|0; $2 = sp; $3 = HEAP32[272042]|0; $4 = ($3|0)>(5); $5 = HEAP32[271258]|0; $6 = ($5|0)==(0); $or$cond = $4 | $6; if ($or$cond) { STACKTOP = sp;return; } HEAP32[$1>>2] = $0; $7 = ((($1)) + 4|0); HEAP16[$7>>1] = 0; $8 = ((($1)) + 6|0); HEAP16[$8>>1] = 128; $9 = HEAP32[(1085040)>>2]|0; _Http_GetUrl($9,$1); _Platform_Log1(31709,$1); (_Platform_EncodeUtf8($2,$1)|0); $10 = ((($9)) + 300|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = ((($9)) + 128|0); $14 = HEAP32[$13>>2]|0; $15 = (_interop_DownloadAsync(($2|0),($12|0),($14|0))|0); switch ($15|0) { case 0: { _RequestList_Append(1088168,$9,0); _RequestList_RemoveAt(1085032,0); STACKTOP = sp;return; } case 1: { $$0 = -857812898; break; } default: { $$0 = $15; } } $16 = ((($9)) + 152|0); HEAP32[$16>>2] = $$0; _Http_FinishRequest($9); _RequestList_RemoveAt(1085032,0); _Http_StartNextDownload(); STACKTOP = sp;return; } function _Http_GetUrl($0,$1) { $0 = $0|0; $1 = $1|0; var $$08$lcssa = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 8|0; $3 = sp; _String_FromRaw($2,$0,128); $4 = (_String_CaselessStarts($2,4656)|0); $5 = ($4|0)==(0); if ($5) { $11 = (_String_CaselessStarts($2,(4672))|0); $12 = ($11|0)==(0); if ($12) { _String_Copy($1,$2); STACKTOP = sp;return; } else { $$08$lcssa = 2; } } else { $$08$lcssa = 0; } $6 = (((4656 + ($$08$lcssa<<3)|0)) + 4|0); $7 = HEAP16[$6>>1]|0; $8 = $7&65535; _String_UNSAFE_SubstringAt($3,$2,$8); $9 = $$08$lcssa | 1; $10 = (4656 + ($9<<3)|0); _String_Format2($1,31721,$10,$3); STACKTOP = sp;return; } function _RequestList_Append($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$013 = 0, $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _RequestList_EnsureSpace($0); $3 = $2 & 1; $4 = ($3<<24>>24)==(0); $5 = HEAP32[$0>>2]|0; if ($4) { $$1 = $5; } else { $6 = ($5|0)>(0); if ($6) { $7 = ((($0)) + 8|0); $$013 = $5; while(1) { $8 = HEAP32[$7>>2]|0; $9 = (($$013) + -1)|0; $10 = (($8) + (($$013*312)|0)|0); $11 = (($8) + (($9*312)|0)|0); _memcpy(($10|0),($11|0),312)|0; $12 = ($$013|0)>(1); if ($12) { $$013 = $9; } else { $$1 = 0; break; } } } else { $$1 = 0; } } $13 = ((($0)) + 8|0); $14 = HEAP32[$13>>2]|0; $15 = (($14) + (($$1*312)|0)|0); _memcpy(($15|0),($1|0),312)|0; $16 = HEAP32[$0>>2]|0; $17 = (($16) + 1)|0; HEAP32[$0>>2] = $17; return; } function _RequestList_EnsureSpace($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[$0>>2]|0; $2 = ((($0)) + 4|0); $3 = HEAP32[$2>>2]|0; $4 = ($1|0)<($3|0); if ($4) { return; } $5 = ((($0)) + 8|0); _Utils_Resize($5,$2,312,10,10); return; } function _HttpRequest_Free($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 156|0); $2 = HEAP32[$1>>2]|0; _Mem_Free($2); HEAP32[$1>>2] = 0; $3 = ((($0)) + 160|0); HEAP32[$3>>2] = 0; return; } function _Http_AsyncGetSkin($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 144|0; $2 = sp + 128|0; $3 = sp; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 128; $6 = (_Utils_IsUrlPrefix($0)|0); $7 = ($6<<24>>24)==(0); if ($7) { _String_Format2($2,31808,14684,$0); } else { _String_Copy($2,$0); } $8 = (_Http_AsyncGetData($2,$1)|0); STACKTOP = sp;return ($8|0); } function _Http_AsyncGetData($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Http_Add($0,$1,0,0,0,0,0,0)|0); return ($2|0); } function _Http_Add($0,$1,$2,$3,$4,$5,$6,$7) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; $7 = $7|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 336|0; $8 = sp + 320|0; $9 = sp; $10 = sp + 312|0; HEAP8[$8>>0] = $2; _memset(($9|0),0,312)|0; _String_CopyToRaw($9,128,$0); _Platform_Log2(31818,$0,$8); $11 = HEAP32[451034]|0; $12 = (($11) + 1)|0; HEAP32[451034] = $12; $13 = ((($9)) + 128|0); HEAP32[$13>>2] = $12; $14 = HEAP8[$8>>0]|0; $15 = ((($9)) + 300|0); HEAP8[$15>>0] = $14; $16 = HEAP8[1972868]|0; $17 = ($16<<24>>24)==(0); if (!($17)) { _String_FromRaw($10,$9,128); $18 = (_String_CaselessStarts($10,14692)|0); $19 = ($18|0)==(0); if (!($19)) { _String_InsertAt($10,4,115); } } $20 = HEAP8[1972869]|0; $21 = ($20<<24>>24)==(0); if (!($21)) { _String_FromRaw($10,$9,128); $22 = (_String_CaselessStarts($10,14700)|0); $23 = ($22|0)==(0); if (!($23)) { _String_DeleteAt($10,4); } } $24 = ($3|0)==(0|0); if (!($24)) { $25 = ((($9)) + 172|0); _String_CopyToRaw($25,64,$3); } $26 = ($4|0)==(0|0); if (!($26)) { $27 = ((($9)) + 236|0); _String_CopyToRaw($27,64,$4); } $28 = ($5|0)==(0|0); if ($28) { $32 = ((($9)) + 304|0); HEAP32[$32>>2] = $7; $33 = ((($9)) + 132|0); HEAP32[$33>>2] = -3; _HttpBackend_Add($9,$1); $34 = HEAP32[$13>>2]|0; STACKTOP = sp;return ($34|0); } $29 = (_Mem_Alloc($6,1,31838)|0); $30 = ((($9)) + 156|0); HEAP32[$30>>2] = $29; _Mem_Copy($29,$5,$6); $31 = ((($9)) + 160|0); HEAP32[$31>>2] = $6; $32 = ((($9)) + 304|0); HEAP32[$32>>2] = $7; $33 = ((($9)) + 132|0); HEAP32[$33>>2] = -3; _HttpBackend_Add($9,$1); $34 = HEAP32[$13>>2]|0; STACKTOP = sp;return ($34|0); } function _HttpBackend_Add($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 8|0; $3 = sp + 4|0; $4 = sp; $5 = $1 & 2; $6 = ($5<<24>>24)==(0); if (!($6)) { _String_FromRaw($2,$0,128); $7 = 1091304; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = (($7) + 4)|0; $11 = $10; $12 = HEAP32[$11>>2]|0; HEAP32[$3>>2] = $9; HEAP32[$4>>2] = $12; _String_Format2($2,31852,$4,$3); } _RequestList_Append(1085032,$0,$1); _Http_StartNextDownload(); STACKTOP = sp;return; } function _Http_AsyncGetHeaders($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Http_Add($0,$1,1,0,0,0,0,0)|0); return ($2|0); } function _Http_AsyncGetDataEx($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $5 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = (_Http_Add($0,$1,0,$2,$3,0,0,$4)|0); return ($5|0); } function _Http_GetResult($0,$1) { $0 = $0|0; $1 = $1|0; var $$lobit = 0, $$not = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_RequestList_Find(1091312,$0)|0); $3 = ($2|0)>(-1); if ($3) { $4 = HEAP32[(1091320)>>2]|0; $5 = (($4) + (($2*312)|0)|0); _memcpy(($1|0),($5|0),312)|0; _RequestList_RemoveAt(1091312,$2); } $$lobit = (31)?($2 >>> 31):($2); $6 = $$lobit&255; $$not = $6 ^ 1; return ($$not|0); } function _Http_CheckProgress($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_RequestList_Find(1088168,$0)|0); $2 = ($1|0)==(-1); if ($2) { $$0 = -3; return ($$0|0); } $3 = HEAP32[(1088176)>>2]|0; $4 = (((($3) + (($1*312)|0)|0)) + 132|0); $5 = HEAP32[$4>>2]|0; $$0 = $5; return ($$0|0); } function _Http_TryCancel($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _RequestList_TryFree(1085032,$0); _RequestList_TryFree(1088168,$0); _RequestList_TryFree(1091312,$0); return; } function _RequestList_TryFree($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_RequestList_Find($0,$1)|0); $3 = ($2|0)<(0); if ($3) { return; } $4 = ((($0)) + 8|0); $5 = HEAP32[$4>>2]|0; $6 = (((($5) + (($2*312)|0)|0)) + 156|0); $7 = HEAP32[$6>>2]|0; _Mem_Free($7); _RequestList_RemoveAt($0,$2); return; } function _Http_DescribeError($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _OnInit_1017() { var label = 0, sp = 0; sp = STACKTOP; _Event_Register(1801068,0,113); _Event_Register((1801328),0,114); _Event_Register((1801588),0,115); _Event_Register((1800028),0,2); _Event_Register((1800288),0,116); _Event_Register((1800548),0,37); _Event_Register((1798468),0,340); _Event_Register((1794308),0,341); _KeyBind_Init(); _StoredHotkeys_LoadAll(); _ClearTouches(); return; } function _OnFree_1018() { var label = 0, sp = 0; sp = STACKTOP; _ClearTouches(); HEAP32[(1804156)>>2] = 0; return; } function _ClearTouches() { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[(392852)>>0] = 0; HEAP8[(392876)>>0] = 0; HEAP8[(392900)>>0] = 0; HEAP8[(392924)>>0] = 0; HEAP8[(392948)>>0] = 0; HEAP8[(392972)>>0] = 0; HEAP8[(392996)>>0] = 0; HEAP8[(393020)>>0] = 0; HEAP8[(393044)>>0] = 0; HEAP8[(393068)>>0] = 0; HEAP8[(393092)>>0] = 0; HEAP8[(393116)>>0] = 0; HEAP8[(393140)>>0] = 0; HEAP8[(393164)>>0] = 0; HEAP8[(393188)>>0] = 0; HEAP8[(393212)>>0] = 0; HEAP8[(393236)>>0] = 0; HEAP8[(393260)>>0] = 0; HEAP8[(393284)>>0] = 0; HEAP8[(393308)>>0] = 0; HEAP8[(393332)>>0] = 0; HEAP8[(393356)>>0] = 0; HEAP8[(393380)>>0] = 0; HEAP8[(393404)>>0] = 0; HEAP8[(393428)>>0] = 0; HEAP8[(393452)>>0] = 0; HEAP8[(393476)>>0] = 0; HEAP8[(393500)>>0] = 0; HEAP8[(393524)>>0] = 0; HEAP8[(393548)>>0] = 0; HEAP8[(393572)>>0] = 0; HEAP8[(393596)>>0] = 0; $0 = HEAP8[1972870]|0; $1 = ($0<<24>>24)==(0); $2 = $1&1; HEAP32[451036] = $2; return; } function _OnPointerMove($0,$1) { $0 = $0|0; $1 = $1|0; var $$017 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0; var label = 0, sp = 0; sp = STACKTOP; $2 = (390496 + ($1<<3)|0); $3 = HEAP32[$2>>2]|0; $4 = (((390496 + ($1<<3)|0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = HEAP32[(1803516)>>2]|0; $7 = ($6|0)>(0); if (!($7)) { return; } $8 = 1 << $1; $$017 = 0; while(1) { $9 = (390192 + ($$017<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = ((($10)) + 7|0); HEAP8[$11>>0] = 1; $12 = HEAP32[$10>>2]|0; $13 = ((($12)) + 44|0); $14 = HEAP32[$13>>2]|0; $15 = (FUNCTION_TABLE_iiiii[$14 & 63]($10,$8,$3,$5)|0); $16 = ($15|0)==(0); $17 = (($$017) + 1)|0; $18 = HEAP32[(1803516)>>2]|0; $19 = ($17|0)<($18|0); $or$cond = $16 & $19; if ($or$cond) { $$017 = $17; } else { break; } } return; } function _OnPointerDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$023 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[1972870]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { $4 = (((392848 + (($1*24)|0)|0)) + 4|0); $5 = HEAP8[$4>>0]|0; $6 = $5 & 1; $7 = ($6<<24>>24)==(0); if ($7) { return; } } $8 = (390496 + ($1<<3)|0); $9 = HEAP32[$8>>2]|0; $10 = (((390496 + ($1<<3)|0)) + 4|0); $11 = HEAP32[$10>>2]|0; $12 = HEAP32[(1803516)>>2]|0; $13 = ($12|0)>(0); if (!($13)) { return; } $14 = 1 << $1; $$023 = 0; while(1) { $18 = (390192 + ($$023<<2)|0); $19 = HEAP32[$18>>2]|0; $20 = ((($19)) + 7|0); HEAP8[$20>>0] = 1; $21 = HEAP32[$19>>2]|0; $22 = ((($21)) + 36|0); $23 = HEAP32[$22>>2]|0; $24 = (FUNCTION_TABLE_iiiii[$23 & 63]($19,$14,$9,$11)|0); $25 = ($24|0)==(0); $16 = (($$023) + 1)|0; if (!($25)) { break; } $15 = HEAP32[(1803516)>>2]|0; $17 = ($16|0)<($15|0); if ($17) { $$023 = $16; } else { label = 8; break; } } if ((label|0) == 8) { return; } $26 = (((392848 + (($1*24)|0)|0)) + 4|0); $27 = HEAP8[$26>>0]|0; $28 = $27&255; $29 = $24 & $28; $30 = $29&255; HEAP8[$26>>0] = $30; return; } function _OnPointerUp($0,$1) { $0 = $0|0; $1 = $1|0; var $$019 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _CheckBlockTap($1); $2 = HEAP8[1972870]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { $4 = (((392848 + (($1*24)|0)|0)) + 4|0); $5 = HEAP8[$4>>0]|0; $6 = $5 & 1; $7 = ($6<<24>>24)==(0); if ($7) { return; } } $8 = (390496 + ($1<<3)|0); $9 = HEAP32[$8>>2]|0; $10 = (((390496 + ($1<<3)|0)) + 4|0); $11 = HEAP32[$10>>2]|0; $12 = HEAP32[(1803516)>>2]|0; $13 = ($12|0)>(0); if (!($13)) { return; } $14 = 1 << $1; $$019 = 0; while(1) { $15 = (390192 + ($$019<<2)|0); $16 = HEAP32[$15>>2]|0; $17 = ((($16)) + 7|0); HEAP8[$17>>0] = 1; $18 = HEAP32[$16>>2]|0; $19 = ((($18)) + 40|0); $20 = HEAP32[$19>>2]|0; FUNCTION_TABLE_viiii[$20 & 31]($16,$14,$9,$11); $21 = (($$019) + 1)|0; $22 = HEAP32[(1803516)>>2]|0; $23 = ($21|0)<($22|0); if ($23) { $$019 = $21; } else { break; } } return; } function _OnInputDown($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$024 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond5 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_InputHandler_IsShutdown($1)|0); $4 = ($3<<24>>24)==(0); if (!($4)) { _Window_Close(); return; } $5 = HEAP8[(390771)>>0]|0; $6 = $5&255; $7 = ($6|0)!=($1|0); $8 = ($2<<24>>24)!=(0); $or$cond = $8 | $7; if (!($or$cond)) { HEAP8[1972836] = 1; return; } $9 = HEAP32[(1803516)>>2]|0; $10 = ($9|0)>(0); L9: do { if ($10) { $$024 = 0; while(1) { $14 = (390192 + ($$024<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = ((($15)) + 7|0); HEAP8[$16>>0] = 1; $17 = HEAP32[$15>>2]|0; $18 = ((($17)) + 20|0); $19 = HEAP32[$18>>2]|0; $20 = (FUNCTION_TABLE_iii[$19 & 127]($15,$1)|0); $21 = ($20|0)==(0); $12 = (($$024) + 1)|0; if (!($21)) { break; } $11 = HEAP32[(1803516)>>2]|0; $13 = ($12|0)<($11|0); if ($13) { $$024 = $12; } else { break L9; } } return; } } while(0); $22 = ($1|0)!=(92); $23 = ($1|0)!=(99); $24 = $22 & $23; $25 = HEAP32[(1803572)>>2]|0; $26 = ($25|0)!=(0|0); $or$cond5 = $24 | $26; if (!($or$cond5)) { HEAP8[1972871] = 1; _Gui_ShowPauseMenu(); return; } if ($8) { return; } $27 = (_HandleBlockKey($1)|0); $28 = ($27<<24>>24)==(0); if (!($28)) { return; } $29 = (_HandleCoreKey($1)|0); $30 = ($29<<24>>24)==(0); if (!($30)) { return; } $31 = (_HandleLocalPlayerKey($1)|0); $32 = ($31<<24>>24)==(0); if (!($32)) { return; } _HandleHotkeyDown($1); return; } function _OnInputUp($0,$1) { $0 = $0|0; $1 = $1|0; var $$015 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(390776)>>0]|0; $3 = $2&255; $4 = ($3|0)==($1|0); if ($4) { $5 = HEAP32[(1771072)>>2]|0; _Camera_SetFov($5); } $6 = ($1|0)==(92); if ($6) { $7 = (_Gui_GetClosable()|0); $8 = ($7|0)==(0|0); if (!($8)) { $9 = HEAP8[1972871]|0; $10 = ($9<<24>>24)==(0); if ($10) { _Gui_Remove($7); return; } else { HEAP8[1972871] = 0; return; } } } $11 = HEAP32[(1803516)>>2]|0; $12 = ($11|0)>(0); if ($12) { $$015 = 0; while(1) { $13 = (390192 + ($$015<<2)|0); $14 = HEAP32[$13>>2]|0; $15 = ((($14)) + 7|0); HEAP8[$15>>0] = 1; $16 = HEAP32[$14>>2]|0; $17 = ((($16)) + 24|0); $18 = HEAP32[$17>>2]|0; FUNCTION_TABLE_vii[$18 & 255]($14,$1); $19 = (($$015) + 1)|0; $20 = HEAP32[(1803516)>>2]|0; $21 = ($19|0)<($20|0); if ($21) { $$015 = $19; } else { break; } } } $22 = HEAP32[(1803572)>>2]|0; $23 = ($22|0)==(0|0); if (!($23)) { return; } $24 = HEAP8[(390778)>>0]|0; $25 = $24&255; $26 = ($25|0)==($1|0); if ($26) { _MouseStateRelease(0); } $27 = HEAP8[(390780)>>0]|0; $28 = $27&255; $29 = ($28|0)==($1|0); if ($29) { _MouseStateRelease(1); } $30 = HEAP8[(390779)>>0]|0; $31 = $30&255; $32 = ($31|0)==($1|0); if (!($32)) { return; } _MouseStateRelease(2); return; } function _OnMouseWheel($0,$1) { $0 = $0|0; $1 = +$1; var $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1803516)>>2]|0; $3 = ($2|0)>(0); if (!($3)) { return; } $$09 = 0; while(1) { $4 = (390192 + ($$09<<2)|0); $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 7|0); HEAP8[$6>>0] = 1; $7 = HEAP32[$5>>2]|0; $8 = ((($7)) + 48|0); $9 = HEAP32[$8>>2]|0; $10 = (FUNCTION_TABLE_iid[$9 & 15]($5,$1)|0); $11 = ($10|0)==(0); $12 = (($$09) + 1)|0; $13 = HEAP32[(1803516)>>2]|0; $14 = ($12|0)<($13|0); $or$cond = $11 & $14; if ($or$cond) { $$09 = $12; } else { break; } } return; } function _OnFocusChanged($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1972125)>>0]|0; $2 = ($1<<24>>24)==(0); if (!($2)) { return; } _Input_Clear(); return; } function _InputHandler_CheckZoomFov($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1784310)>>0]|0; $2 = ($1<<24>>24)==(0); $3 = HEAP8[(1784312)>>0]|0; $4 = ($3<<24>>24)==(0); $or$cond = $2 | $4; if (!($or$cond)) { return; } $5 = HEAP32[(1771072)>>2]|0; _Camera_SetFov($5); return; } function _KeyBind_Init() { var label = 0, sp = 0; sp = STACKTOP; ;HEAP32[390752>>2]=HEAP32[5680>>2]|0;HEAP32[390752+4>>2]=HEAP32[5680+4>>2]|0;HEAP32[390752+8>>2]=HEAP32[5680+8>>2]|0;HEAP32[390752+12>>2]=HEAP32[5680+12>>2]|0;HEAP32[390752+16>>2]=HEAP32[5680+16>>2]|0;HEAP32[390752+20>>2]=HEAP32[5680+20>>2]|0;HEAP32[390752+24>>2]=HEAP32[5680+24>>2]|0;HEAP32[390752+28>>2]=HEAP32[5680+28>>2]|0;HEAP16[390752+32>>1]=HEAP16[5680+32>>1]|0;HEAP8[390752+34>>0]=HEAP8[5680+34>>0]|0; _KeyBind_Load(); return; } function _StoredHotkeys_LoadAll() { var $$04 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $0 = sp + 16|0; $1 = sp + 8|0; $2 = sp; $3 = HEAP32[(1828336)>>2]|0; $4 = ($3|0)>(0); if (!($4)) { STACKTOP = sp;return; } $$04 = 0; while(1) { _StringsBuffer_UNSAFE_GetRaw(1828328,$$04,$0); (_String_UNSAFE_Separate($0,61,$1,$2)|0); $5 = (_String_CaselessStarts($1,14736)|0); $6 = ($5|0)==(0); if (!($6)) { _StoredHotkey_Parse($1,$2); } $7 = (($$04) + 1)|0; $8 = HEAP32[(1828336)>>2]|0; $9 = ($7|0)<($8|0); if ($9) { $$04 = $7; } else { break; } } STACKTOP = sp;return; } function _StoredHotkey_Parse($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $2 = sp + 24|0; $3 = sp + 16|0; $4 = sp + 8|0; $5 = sp; $6 = sp + 33|0; $7 = sp + 32|0; $8 = ((($0)) + 4|0); $9 = HEAP16[$8>>1]|0; $10 = $9&65535; $11 = (($10) + 65529)|0; $12 = $11&65535; HEAP16[$8>>1] = $12; $13 = HEAP32[$0>>2]|0; $14 = ((($13)) + 7|0); HEAP32[$0>>2] = $14; $15 = (_String_UNSAFE_Separate($0,38,$2,$3)|0); $16 = ($15|0)==(0); if ($16) { STACKTOP = sp;return; } $17 = (_String_UNSAFE_Separate($1,38,$4,$5)|0); $18 = ($17|0)==(0); if ($18) { STACKTOP = sp;return; } $19 = (_Utils_ParseEnum($2,0,4688,122)|0); $20 = ($19|0)==(0); if ($20) { STACKTOP = sp;return; } $21 = (_Convert_ParseUInt8($3,$6)|0); $22 = ($21<<24>>24)==(0); if ($22) { STACKTOP = sp;return; } $23 = (_Convert_ParseBool($4,$7)|0); $24 = ($23<<24>>24)==(0); if ($24) { STACKTOP = sp;return; } $25 = HEAP8[$6>>0]|0; $26 = HEAP8[$7>>0]|0; _Hotkeys_Add($19,$25,$5,$26); STACKTOP = sp;return; } function _Hotkeys_Add($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$01820 = 0, $$021 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[(1804156)>>2]|0; $5 = ($4|0)>(0); L1: do { if ($5) { $6 = HEAP32[(1804156)>>2]|0; $$01820 = 390800;$$021 = 0; while(1) { $7 = ((($$01820)) + 4|0); $8 = HEAP8[$7>>0]|0; $9 = $8&255; $10 = ($9|0)==($0|0); if ($10) { $11 = ((($$01820)) + 5|0); $12 = HEAP8[$11>>0]|0; $13 = ($12<<24>>24)==($1<<24>>24); if ($13) { break; } } $17 = (($$021) + 1)|0; $18 = ((($$01820)) + 8|0); $19 = ($17|0)<($6|0); if ($19) { $$01820 = $18;$$021 = $17; } else { break L1; } } $14 = HEAP32[$$01820>>2]|0; _Hotkeys_RemoveText($14); $15 = ((($$01820)) + 6|0); HEAP8[$15>>0] = $3; $16 = HEAP32[(1804156)>>2]|0; HEAP32[$$01820>>2] = $16; _StringsBuffer_Add(1804148,$2); return; } } while(0); _Hotkeys_AddNewHotkey($0,$1,$2,$3); return; } function _Hotkeys_RemoveText($0) { $0 = $0|0; var $$011 = 0, $$0910 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1804156)>>2]|0; $2 = ($1|0)>(0); if (!($2)) { _StringsBuffer_Remove(1804148,$0); return; } $3 = HEAP32[(1804156)>>2]|0; $$011 = 0;$$0910 = 390800; while(1) { $4 = HEAP32[$$0910>>2]|0; $5 = ($4|0)<($0|0); if (!($5)) { $6 = (($4) + -1)|0; HEAP32[$$0910>>2] = $6; } $7 = (($$011) + 1)|0; $8 = ((($$0910)) + 8|0); $9 = ($7|0)<($3|0); if ($9) { $$011 = $7;$$0910 = $8; } else { break; } } _StringsBuffer_Remove(1804148,$0); return; } function _Hotkeys_AddNewHotkey($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$sroa$0$0$$sroa_idx = 0, $$sroa$4$0$$sroa_idx = 0, $$sroa$5$0$$sroa_idx = 0, $$sroa$6$0$$sroa_idx = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[(1804156)>>2]|0; $5 = ($4|0)==(256); if ($5) { _Chat_AddRaw(33032); return; } else { $6 = $0&255; $$sroa$0$0$$sroa_idx = (390800 + ($4<<3)|0); HEAP32[$$sroa$0$0$$sroa_idx>>2] = $4; $$sroa$4$0$$sroa_idx = (((390800 + ($4<<3)|0)) + 4|0); HEAP8[$$sroa$4$0$$sroa_idx>>0] = $6; $$sroa$5$0$$sroa_idx = (((390800 + ($4<<3)|0)) + 5|0); HEAP8[$$sroa$5$0$$sroa_idx>>0] = $1; $$sroa$6$0$$sroa_idx = (((390800 + ($4<<3)|0)) + 6|0); HEAP8[$$sroa$6$0$$sroa_idx>>0] = $3; _StringsBuffer_Add(1804148,$2); $7 = HEAP32[(1804156)>>2]|0; $8 = (($7) + -1)|0; _Hotkeys_QuickSort(0,$8); return; } } function _Hotkeys_QuickSort($0,$1) { $0 = $0|0; $1 = $1|0; var $$049$lcssa = 0, $$04958 = 0, $$051$lcssa = 0, $$05157 = 0, $$05460 = 0, $$061 = 0, $$1 = 0, $$150 = 0, $$152 = 0, $$155 = 0, $$2 = 0, $$253 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0; var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0; var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($0|0)<($1|0); if (!($2)) { return; } $$05460 = $1;$$061 = $0; while(1) { $3 = (($$061) + ($$05460))|0; $4 = (1)?($3 >> 1):($3); $5 = (((390800 + ($4<<3)|0)) + 5|0); $6 = HEAP8[$5>>0]|0; $7 = ($$061|0)>($$05460|0); if ($7) { $$049$lcssa = $$05460;$$051$lcssa = $$061; } else { $$04958 = $$05460;$$05157 = $$061; while(1) { $$152 = $$05157; while(1) { $8 = (((390800 + ($$152<<3)|0)) + 5|0); $9 = HEAP8[$8>>0]|0; $10 = ($6&255)<($9&255); $11 = (($$152) + 1)|0; if ($10) { $$152 = $11; } else { break; } } $$150 = $$04958; while(1) { $12 = (((390800 + ($$150<<3)|0)) + 5|0); $13 = HEAP8[$12>>0]|0; $14 = ($6&255)>($13&255); $15 = (($$150) + -1)|0; if ($14) { $$150 = $15; } else { break; } } $16 = (390800 + ($$152<<3)|0); $17 = (390800 + ($$150<<3)|0); $18 = ($$152|0)>($$150|0); if ($18) { $$2 = $$150;$$253 = $$152; } else { $19 = (($$150) + -1)|0; $20 = (($$152) + 1)|0; $21 = $16; $22 = $21; $23 = HEAP32[$22>>2]|0; $24 = (($21) + 4)|0; $25 = $24; $26 = HEAP32[$25>>2]|0; $27 = $17; $28 = $27; $29 = HEAP32[$28>>2]|0; $30 = (($27) + 4)|0; $31 = $30; $32 = HEAP32[$31>>2]|0; $33 = $16; $34 = $33; HEAP32[$34>>2] = $29; $35 = (($33) + 4)|0; $36 = $35; HEAP32[$36>>2] = $32; $37 = $17; $38 = $37; HEAP32[$38>>2] = $23; $39 = (($37) + 4)|0; $40 = $39; HEAP32[$40>>2] = $26; $$2 = $19;$$253 = $20; } $41 = ($$253|0)>($$2|0); if ($41) { $$049$lcssa = $$2;$$051$lcssa = $$253; break; } else { $$04958 = $$2;$$05157 = $$253; } } } $42 = (($$049$lcssa) - ($$061))|0; $43 = (($$05460) - ($$051$lcssa))|0; $44 = ($42|0)>($43|0); if ($44) { $46 = ($$05460|0)>($$051$lcssa|0); if ($46) { _Hotkeys_QuickSort($$051$lcssa,$$05460); $$1 = $$061;$$155 = $$049$lcssa; } else { $$1 = $$061;$$155 = $$049$lcssa; } } else { $45 = ($$049$lcssa|0)>($$061|0); if ($45) { _Hotkeys_QuickSort($$061,$$049$lcssa); $$1 = $$051$lcssa;$$155 = $$05460; } else { $$1 = $$051$lcssa;$$155 = $$05460; } } $47 = ($$1|0)<($$155|0); if ($47) { $$05460 = $$155;$$061 = $$1; } else { break; } } return; } function _KeyBind_Load() { var $$010 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $0 = sp + 72|0; $1 = sp; HEAP32[$0>>2] = $1; $2 = ((($0)) + 4|0); HEAP16[$2>>1] = 0; $3 = ((($0)) + 6|0); HEAP16[$3>>1] = 64; $$010 = 0; while(1) { HEAP16[$2>>1] = 0; $4 = (5984 + ($$010<<2)|0); $5 = HEAP32[$4>>2]|0; _String_Format1($0,33078,$5); $6 = HEAP32[$0>>2]|0; $7 = HEAP16[$2>>1]|0; $8 = $7&65535; $9 = (($6) + ($8)|0); HEAP8[$9>>0] = 0; $10 = HEAP32[$0>>2]|0; $11 = (5680 + ($$010)|0); $12 = HEAP8[$11>>0]|0; $13 = $12&255; $14 = (_Options_GetEnum($10,$13,4688,122)|0); $15 = ($14|0)==(92); if (!($15)) { $16 = (390752 + ($$010)|0); $17 = $14&255; HEAP8[$16>>0] = $17; } $18 = (($$010) + 1)|0; $exitcond = ($18|0)==(35); if ($exitcond) { break; } else { $$010 = $18; } } STACKTOP = sp;return; } function _Input_Clear() { var $$05 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $$05 = 0; while(1) { $0 = (390368 + ($$05)|0); $1 = HEAP8[$0>>0]|0; $2 = ($1<<24>>24)==(0); if (!($2)) { _Input_SetReleased($$05); } $3 = (($$05) + 1)|0; $exitcond = ($3|0)==(122); if ($exitcond) { break; } else { $$05 = $3; } } _ClearTouches(); return; } function _Input_SetReleased($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (390368 + ($0)|0); $2 = HEAP8[$1>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } HEAP8[$1>>0] = 0; _Event_RaiseInt((1800288),$0); $4 = ($0|0)==(119); if (!($4)) { return; } _Pointer_SetPressed(0,0); return; } function _Pointer_SetPressed($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(0); if ($2) { _Event_RaiseInt((1801588),$0); return; } else { _Event_RaiseInt((1801328),$0); return; } } function _MouseStateRelease($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; HEAP32[3686] = -1; _MouseStateChanged($0,0); return; } function _MouseStateChanged($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1949243)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } $4 = ($1<<24>>24)==(0); if (!($4)) { _MouseStateUpdate($0,1); return; } $5 = (1972872 + ($0)|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); if ($7) { return; } _MouseStateUpdate($0,0); return; } function _MouseStateUpdate($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[3686]|0; $3 = ($2|0)==(-1); if ($3) { $4 = (_Entities_GetClosest(1783772)|0); $5 = $4&255; HEAP32[3686] = $5; } $6 = (1972872 + ($0)|0); HEAP8[$6>>0] = $1; $7 = HEAP32[3686]|0; $8 = $7&255; _CPE_SendPlayerClick($0,$1,$8,1802916); return; } function _InputHandler_IsShutdown($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0|0)==(4); if ($1) { $2 = HEAP8[(390408)>>0]|0; $3 = HEAP8[(390409)>>0]|0; $4 = $3 | $2; $5 = ($4<<24>>24)==(0); if (!($5)) { $$0 = 1; return ($$0|0); } } $$0 = 0; return ($$0|0); } function _HandleBlockKey($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1803572)>>2]|0; $2 = ($1|0)==(0|0); if (!($2)) { $$0 = 0; return ($$0|0); } $3 = HEAP8[(390778)>>0]|0; $4 = $3&255; $5 = ($4|0)==($0|0); if ($5) { _MouseStatePress(0); _InputHandler_DeleteBlock(); $$0 = 1; return ($$0|0); } $6 = HEAP8[(390780)>>0]|0; $7 = $6&255; $8 = ($7|0)==($0|0); if ($8) { _MouseStatePress(1); _InputHandler_PlaceBlock(); $$0 = 1; return ($$0|0); } $9 = HEAP8[(390779)>>0]|0; $10 = $9&255; $11 = ($10|0)==($0|0); if (!($11)) { $$0 = 0; return ($$0|0); } _MouseStatePress(2); _InputHandler_PickBlock(); $$0 = 1; return ($$0|0); } function _HandleCoreKey($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(390770)>>0]|0; $2 = $1&255; $3 = ($2|0)==($0|0); if ($3) { $4 = HEAP8[(1803530)>>0]|0; $5 = ($4<<24>>24)==(0); $6 = $5&1; HEAP8[(1803530)>>0] = $6; $$0 = 1; return ($$0|0); } $7 = HEAP8[(390772)>>0]|0; $8 = $7&255; $9 = ($8|0)==($0|0); if ($9) { _Game_ToggleFullscreen(); $$0 = 1; return ($$0|0); } $10 = HEAP8[(390761)>>0]|0; $11 = $10&255; $12 = ($11|0)==($0|0); if ($12) { _Game_CycleViewDistance(); $$0 = 1; return ($$0|0); } $13 = ($0|0)!=(5); $14 = HEAP8[1972839]|0; $15 = ($14<<24>>24)==(0); $or$cond = $13 | $15; if (!($or$cond)) { $16 = HEAP32[(1972172)>>2]|0; $17 = ($16|0)==(0); $18 = $17&1; _Env_SetWeather($18); $$0 = 1; return ($$0|0); } if (!($15)) { $$0 = 0; return ($$0|0); } $19 = (_HandleNonClassicKey($0)|0); $$0 = $19; return ($$0|0); } function _HandleLocalPlayerKey($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(390757)>>0]|0; $2 = $1&255; $3 = ($2|0)==($0|0); if ($3) { $4 = (_LocalPlayer_HandleRespawn()|0); $$0 = $4; return ($$0|0); } $5 = HEAP8[(390758)>>0]|0; $6 = $5&255; $7 = ($6|0)==($0|0); if ($7) { $8 = (_LocalPlayer_HandleSetSpawn()|0); $$0 = $8; return ($$0|0); } $9 = HEAP8[(390766)>>0]|0; $10 = $9&255; $11 = ($10|0)==($0|0); if ($11) { $12 = (_LocalPlayer_HandleFly()|0); $$0 = $12; return ($$0|0); } $13 = HEAP8[(390765)>>0]|0; $14 = $13&255; $15 = ($14|0)==($0|0); if ($15) { $16 = (_LocalPlayer_HandleNoclip()|0); $$0 = $16; return ($$0|0); } $17 = HEAP8[(390756)>>0]|0; $18 = $17&255; $19 = ($18|0)==($0|0); if (!($19)) { $$0 = 0; return ($$0|0); } $20 = (_LocalPlayer_HandleJump()|0); $$0 = $20; return ($$0|0); } function _HandleHotkeyDown($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = (_Hotkeys_FindPartial($0)|0); $3 = ($2|0)==(-1); if ($3) { STACKTOP = sp;return; } $4 = (390800 + ($2<<3)|0); $5 = HEAP32[$4>>2]|0; _StringsBuffer_UNSAFE_Get($1,1804148,$5); $6 = (((390800 + ($2<<3)|0)) + 6|0); $7 = HEAP8[$6>>0]|0; $8 = $7 & 1; $9 = ($8<<24>>24)==(0); if ($9) { _Chat_Send($1,0); STACKTOP = sp;return; } $10 = HEAP32[(1803572)>>2]|0; $11 = ($10|0)==(0|0); if (!($11)) { STACKTOP = sp;return; } _ChatScreen_OpenInput($1); STACKTOP = sp;return; } function _Hotkeys_FindPartial($0) { $0 = $0|0; var $$0 = 0, $$01926 = 0, $$020 = 0, $$1 = 0, $$2 = 0, $$sroa$3$0$$sroa_idx = 0, $$sroa$3$0$copyload = 0, $$sroa$4$0$$sroa_idx = 0, $$sroa$4$0$copyload = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(390406)>>0]|0; $2 = HEAP8[(390407)>>0]|0; $3 = $2 | $1; $4 = ($3<<24>>24)!=(0); $$0 = $4&1; $5 = HEAP8[(390404)>>0]|0; $6 = HEAP8[(390405)>>0]|0; $7 = $6 | $5; $8 = ($7<<24>>24)==(0); $9 = $$0 | 2; $$1 = $8 ? $$0 : $9; $10 = HEAP8[(390408)>>0]|0; $11 = HEAP8[(390409)>>0]|0; $12 = $11 | $10; $13 = ($12<<24>>24)==(0); $14 = $$1 | 4; $$2 = $13 ? $$1 : $14; $15 = HEAP32[(1804156)>>2]|0; $16 = ($15|0)>(0); if (!($16)) { $$020 = -1; return ($$020|0); } $17 = HEAP32[(1804156)>>2]|0; $$01926 = 0; while(1) { $$sroa$4$0$$sroa_idx = (((390800 + ($$01926<<3)|0)) + 5|0); $$sroa$4$0$copyload = HEAP8[$$sroa$4$0$$sroa_idx>>0]|0; $18 = $$sroa$4$0$copyload&255; $19 = $$2 & $18; $20 = ($19|0)==($18|0); if ($20) { $$sroa$3$0$$sroa_idx = (((390800 + ($$01926<<3)|0)) + 4|0); $$sroa$3$0$copyload = HEAP8[$$sroa$3$0$$sroa_idx>>0]|0; $21 = $$sroa$3$0$copyload&255; $22 = ($21|0)==($0|0); if ($22) { $$020 = $$01926; label = 6; break; } } $23 = (($$01926) + 1)|0; $24 = ($23|0)<($17|0); if ($24) { $$01926 = $23; } else { $$020 = -1; label = 6; break; } } if ((label|0) == 6) { return ($$020|0); } return (0)|0; } function _HandleNonClassicKey($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(390774)>>0]|0; $2 = $1&255; $3 = ($2|0)==($0|0); if ($3) { $4 = HEAP8[1972845]|0; $5 = ($4<<24>>24)==(0); $6 = $5&1; HEAP8[1972845] = $6; $$0 = 1; return ($$0|0); } $7 = HEAP8[(390783)>>0]|0; $8 = $7&255; $9 = ($8|0)==($0|0); if ($9) { _InputHandler_Toggle($0,(1770972),33326,33357); $$0 = 1; return ($$0|0); } $10 = HEAP8[(390775)>>0]|0; $11 = $10&255; $12 = ($11|0)==($0|0); if ($12) { _InputHandler_Toggle($0,1972812,33389,33435); $$0 = 1; return ($$0|0); } $13 = HEAP8[(390781)>>0]|0; $14 = $13&255; $15 = ($14|0)==($0|0); if ($15) { _InputHandler_Toggle($0,1972813,33465,33494); $$0 = 1; return ($$0|0); } $16 = HEAP8[(390773)>>0]|0; $17 = $16&255; $18 = ($17|0)==($0|0); if ($18) { _Camera_CycleActive(); $$0 = 1; return ($$0|0); } $19 = HEAP8[(390784)>>0]|0; $20 = $19&255; $21 = ($20|0)==($0|0); if ($21) { $22 = (_Inventory_CheckChangeSelected()|0); $23 = ($22<<24>>24)==(0); if ($23) { $$0 = 1; return ($$0|0); } $24 = HEAP32[(1811004)>>2]|0; $25 = HEAP32[(1811000)>>2]|0; $26 = (($25) + ($24))|0; $27 = (1809300 + ($26<<1)|0); $28 = HEAP16[$27>>1]|0; $29 = ($28<<16>>16)==(0); if ($29) { $$0 = 1; return ($$0|0); } HEAP16[$27>>1] = 0; _Event_RaiseVoid((1794568)); $$0 = 1; return ($$0|0); } $30 = HEAP8[(390785)>>0]|0; $31 = $30&255; $32 = ($31|0)==($0|0); if ($32) { _TexIdsOverlay_Show(); $$0 = 1; return ($$0|0); } $33 = HEAP8[(390786)>>0]|0; $34 = $33&255; $35 = ($34|0)==($0|0); if (!($35)) { $$0 = 0; return ($$0|0); } _InputHandler_Toggle($0,1972835,33524,33559); $$0 = 1; return ($$0|0); } function _InputHandler_Toggle($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP8[$1>>0]|0; $5 = ($4<<24>>24)==(0); $6 = $5&1; HEAP8[$1>>0] = $6; $7 = (4688 + ($0<<2)|0); $8 = HEAP32[$7>>2]|0; if ($5) { _Chat_Add2(33595,$2,$8); return; } else { _Chat_Add2(33626,$3,$8); return; } } function _MouseStatePress($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_DateTime_CurrentUTC_MS()|0); $2 = (getTempRet0() | 0); $3 = 1094448; $4 = $3; HEAP32[$4>>2] = $1; $5 = (($3) + 4)|0; $6 = $5; HEAP32[$6>>2] = $2; HEAP32[3686] = -1; _MouseStateChanged($0,1); return; } function _InputHandler_DeleteBlock() { var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $$byval_copy = sp + 12|0; $0 = sp; _HeldBlockRenderer_ClickAnim(1); ;HEAP32[$0>>2]=HEAP32[1802916>>2]|0;HEAP32[$0+4>>2]=HEAP32[1802916+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[1802916+8>>2]|0; $1 = HEAP8[(1803040)>>0]|0; $2 = ($1<<24>>24)==(0); if ($2) { STACKTOP = sp;return; } $3 = HEAP32[$0>>2]|0; $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = ((($0)) + 8|0); $7 = HEAP32[$6>>2]|0; $8 = (_World_Contains_1019($3,$5,$7)|0); $9 = ($8<<24>>24)==(0); if ($9) { STACKTOP = sp;return; } $10 = (_World_GetBlock_1020($3,$5,$7)|0); $11 = $10&65535; $12 = (1120788 + ($11)|0); $13 = HEAP8[$12>>0]|0; $14 = ($13<<24>>24)==(4); if ($14) { STACKTOP = sp;return; } $15 = (1172244 + ($11)|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(0); if ($17) { STACKTOP = sp;return; } _Game_ChangeBlock($3,$5,$7,0); ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0; _Event_RaiseBlock(1794048,$$byval_copy,$10,0); STACKTOP = sp;return; } function _InputHandler_PlaceBlock() { var $$0 = 0, $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $$byval_copy = sp + 12|0; $0 = sp; ;HEAP32[$0>>2]=HEAP32[(1803028)>>2]|0;HEAP32[$0+4>>2]=HEAP32[(1803028)+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[(1803028)+8>>2]|0; $1 = HEAP8[(1803040)>>0]|0; $2 = ($1<<24>>24)==(0); if ($2) { STACKTOP = sp;return; } $3 = HEAP32[$0>>2]|0; $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = ((($0)) + 8|0); $7 = HEAP32[$6>>2]|0; $8 = (_World_Contains_1019($3,$5,$7)|0); $9 = ($8<<24>>24)==(0); if ($9) { STACKTOP = sp;return; } $10 = (_World_GetBlock_1020($3,$5,$7)|0); $11 = HEAP32[(1811004)>>2]|0; $12 = HEAP32[(1811000)>>2]|0; $13 = (($12) + ($11))|0; $14 = (1809300 + ($13<<1)|0); $15 = HEAP16[$14>>1]|0; $16 = HEAP8[1972813]|0; $17 = ($16<<24>>24)==(0); if ($17) { $$0 = $15; } else { $18 = (_AutoRotate_RotateBlock($15)|0); $$0 = $18; } $19 = (_Game_CanPick($10)|0); $20 = ($19<<24>>24)==(0); if (!($20)) { STACKTOP = sp;return; } $21 = $$0&65535; $22 = (1171476 + ($21)|0); $23 = HEAP8[$22>>0]|0; $24 = ($23<<24>>24)==(0); if ($24) { STACKTOP = sp;return; } $25 = (1120788 + ($21)|0); $26 = HEAP8[$25>>0]|0; $27 = ($26<<24>>24)==(4); if ($27) { $28 = $10&65535; $29 = (1120788 + ($28)|0); $30 = HEAP8[$29>>0]|0; $31 = ($30<<24>>24)==(4); if (!($31)) { STACKTOP = sp;return; } } $32 = $10&65535; $33 = (1115412 + ($32)|0); $34 = HEAP8[$33>>0]|0; $35 = ($34<<24>>24)==(0); if ($35) { $36 = (1172244 + ($32)|0); $37 = HEAP8[$36>>0]|0; $38 = ($37<<24>>24)==(0); if ($38) { STACKTOP = sp;return; } } $39 = (_CheckIsFree($$0)|0); $40 = ($39<<24>>24)==(0); if ($40) { STACKTOP = sp;return; } $41 = HEAP32[$0>>2]|0; $42 = HEAP32[$4>>2]|0; $43 = HEAP32[$6>>2]|0; _Game_ChangeBlock($41,$42,$43,$$0); ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0; _Event_RaiseBlock(1794048,$$byval_copy,$10,$$0); STACKTOP = sp;return; } function _InputHandler_PickBlock() { var $$sroa$0$0$copyload = 0, $$sroa$5$0$copyload = 0, $$sroa$7$0$copyload = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $$sroa$0$0$copyload = HEAP32[450729]|0; $$sroa$5$0$copyload = HEAP32[(1802920)>>2]|0; $$sroa$7$0$copyload = HEAP32[(1802924)>>2]|0; $0 = (_World_Contains_1019($$sroa$0$0$copyload,$$sroa$5$0$copyload,$$sroa$7$0$copyload)|0); $1 = ($0<<24>>24)==(0); if ($1) { return; } $2 = (_World_GetBlock_1020($$sroa$0$0$copyload,$$sroa$5$0$copyload,$$sroa$7$0$copyload)|0); $3 = $2&65535; $4 = (1120788 + ($3)|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(4); if ($6) { return; } $7 = (1171476 + ($3)|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(0); if ($9) { $10 = (1172244 + ($3)|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(0); if ($12) { return; } } _Inventory_PickBlock($2); return; } function _World_Contains_1019($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1103564)>>2]|0; $4 = ($3>>>0)>($0>>>0); $5 = HEAP32[(1103568)>>2]|0; $6 = ($5>>>0)>($1>>>0); $or$cond = $4 & $6; $7 = HEAP32[(1103572)>>2]|0; $8 = ($7>>>0)>($2>>>0); $narrow = $or$cond & $8; $9 = $narrow&1; return ($9|0); } function _World_GetBlock_1020($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $3 = HEAP32[(1103572)>>2]|0; $4 = Math_imul($3, $1)|0; $5 = (($4) + ($2))|0; $6 = HEAP32[(1103564)>>2]|0; $7 = Math_imul($5, $6)|0; $8 = (($7) + ($0))|0; $9 = HEAP32[275888]|0; $10 = (($9) + ($8)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = HEAP32[(1103556)>>2]|0; $14 = (($13) + ($8)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 8; $18 = $17 | $12; $19 = HEAP32[(1103608)>>2]|0; $20 = $18 & $19; $21 = $20&65535; return ($21|0); } function _CheckIsFree($0) { $0 = $0|0; var $$0 = 0, $$byval_copy = 0, $$sroa$0$0$copyload24 = 0, $$sroa$4$0$$sroa_idx3 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$7$0$$sroa_idx7 = 0, $$sroa$7$0$copyload25 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0; var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond28 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 112|0; $$byval_copy = sp + 92|0; $1 = sp + 80|0; $2 = sp + 56|0; $3 = sp + 32|0; $4 = sp; $5 = $0&65535; $6 = (1115412 + ($5)|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(2); if (!($8)) { $$0 = 1; STACKTOP = sp;return ($$0|0); } _IVec3_ToVec3($1,(1803028)); ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$1+8>>2]|0; $9 = (_IntersectsOthers($$byval_copy,$0)|0); $10 = ($9<<24>>24)==(0); if (!($10)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $$sroa$0$0$copyload24 = HEAP32[(1784232)>>2]|0; $$sroa$4$0$copyload = +HEAPF32[(1784236)>>2]; $$sroa$7$0$copyload25 = HEAP32[(1784240)>>2]|0; $11 = (1125396 + (($5*12)|0)|0); _Vec3_Add_1021($2,$1,$11); $12 = ((($2)) + 12|0); $13 = (1134612 + (($5*12)|0)|0); _Vec3_Add_1021($12,$1,$13); _Entity_GetBounds(1783772,$3); $14 = ((($3)) + 4|0); $15 = +HEAPF32[$14>>2]; $16 = $$sroa$4$0$copyload < $15; $17 = $16 ? $$sroa$4$0$copyload : $15; HEAPF32[$14>>2] = $17; $18 = HEAP8[(1784334)>>0]|0; $19 = ($18<<24>>24)==(0); if (!($19)) { $$0 = 1; STACKTOP = sp;return ($$0|0); } $20 = (_AABB_Intersects($3,$2)|0); $21 = ($20<<24>>24)==(0); if ($21) { $$0 = 1; STACKTOP = sp;return ($$0|0); } $22 = HEAP8[(1784317)>>0]|0; $23 = ($22<<24>>24)==(0); $24 = HEAP8[(1784308)>>0]|0; $25 = ($24<<24>>24)==(0); $or$cond = $23 | $25; $26 = HEAP8[(1784310)>>0]|0; $27 = ($26<<24>>24)==(0); $or$cond28 = $or$cond | $27; if (!($or$cond28)) { $28 = (_PushbackPlace($2)|0); $$0 = $28; STACKTOP = sp;return ($$0|0); } $29 = +HEAPF32[$14>>2]; $30 = $29 + 0.25099998712539673; HEAPF32[$14>>2] = $30; $31 = (_AABB_Intersects($3,$2)|0); $32 = ($31<<24>>24)==(0); if (!($32)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $33 = ((($1)) + 4|0); $34 = +HEAPF32[$33>>2]; $35 = (((1134612 + (($5*12)|0)|0)) + 4|0); $36 = +HEAPF32[$35>>2]; $37 = $34 + $36; $38 = $37 + 0.0010000000474974513; $39 = ((($4)) + 28|0); HEAP8[$39>>0] = 1; HEAP32[$4>>2] = $$sroa$0$0$copyload24; $$sroa$4$0$$sroa_idx3 = ((($4)) + 4|0); HEAPF32[$$sroa$4$0$$sroa_idx3>>2] = $38; $$sroa$7$0$$sroa_idx7 = ((($4)) + 8|0); HEAP32[$$sroa$7$0$$sroa_idx7>>2] = $$sroa$7$0$copyload25; $40 = HEAP32[445943]|0; $41 = ((($40)) + 8|0); $42 = HEAP32[$41>>2]|0; FUNCTION_TABLE_vii[$42 & 255](1783772,$4); $$0 = 1; STACKTOP = sp;return ($$0|0); } function _IntersectsOthers($0,$1) { $0 = $0|0; $1 = $1|0; var $$010 = 0, $$011 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $2 = sp + 24|0; $3 = sp; $4 = $1&65535; $5 = (1125396 + (($4*12)|0)|0); _Vec3_Add_1021($2,$0,$5); $6 = ((($2)) + 12|0); $7 = (1134612 + (($4*12)|0)|0); _Vec3_Add_1021($6,$0,$7); $8 = ((($3)) + 4|0); $$011 = 0; while(1) { $9 = (1782744 + ($$011<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0|0); if (!($11)) { _Entity_GetBounds($10,$3); $12 = +HEAPF32[$8>>2]; $13 = $12 + 0.03125; HEAPF32[$8>>2] = $13; $14 = (_AABB_Intersects($3,$2)|0); $15 = ($14<<24>>24)==(0); if (!($15)) { $$010 = 1; label = 5; break; } } $16 = (($$011) + 1)|0; $17 = ($16>>>0)<(255); if ($17) { $$011 = $16; } else { $$010 = 0; label = 5; break; } } if ((label|0) == 5) { STACKTOP = sp;return ($$010|0); } return (0)|0; } function _Vec3_Add_1021($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 + $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 + $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 + $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _PushbackPlace($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0; var $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 56|0; $2 = sp + 32|0; $3 = sp; ;HEAP32[$1>>2]=HEAP32[(1783776)>>2]|0;HEAP32[$1+4>>2]=HEAP32[(1783776)+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[(1783776)+8>>2]|0; $4 = HEAP8[(1803041)>>0]|0; switch ($4<<24>>24) { case 1: { $5 = ((($0)) + 12|0); $6 = +HEAPF32[$5>>2]; $7 = $6 + 0.5; HEAPF32[$1>>2] = $7; break; } case 3: { $8 = ((($0)) + 20|0); $9 = +HEAPF32[$8>>2]; $10 = $9 + 0.5; $11 = ((($1)) + 8|0); HEAPF32[$11>>2] = $10; break; } case 0: { $12 = +HEAPF32[$0>>2]; $13 = $12 + -0.5; HEAPF32[$1>>2] = $13; break; } case 2: { $14 = ((($0)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $15 + -0.5; $17 = ((($1)) + 8|0); HEAPF32[$17>>2] = $16; break; } case 5: { $18 = ((($0)) + 4|0); $19 = +HEAPF32[$18>>2]; $20 = $19 + 1.0; $21 = $20 + 0.0010000000474974513; $22 = ((($1)) + 4|0); HEAPF32[$22>>2] = $21; break; } case 4: { $23 = ((($0)) + 4|0); $24 = +HEAPF32[$23>>2]; $25 = +HEAPF32[(1783868)>>2]; $26 = $24 - $25; $27 = $26 + -0.0010000000474974513; $28 = ((($1)) + 4|0); HEAPF32[$28>>2] = $27; break; } default: { } } $29 = +HEAPF32[$1>>2]; $30 = $29 > 0.0; if (!($30)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $31 = ((($1)) + 4|0); $32 = +HEAPF32[$31>>2]; $33 = !($32 >= 0.0); if ($33) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $34 = ((($1)) + 8|0); $35 = +HEAPF32[$34>>2]; $36 = $35 > 0.0; if (!($36)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $37 = HEAP32[(1103564)>>2]|0; $38 = (+($37|0)); $39 = $29 < $38; if (!($39)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $40 = HEAP32[(1103572)>>2]|0; $41 = (+($40|0)); $42 = $35 < $41; if (!($42)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } _AABB_Make($2,$1,(1783864)); $43 = HEAP8[(1784334)>>0]|0; $44 = ($43<<24>>24)==(0); if ($44) { $45 = (_Entity_TouchesAny($2,17)|0); $46 = ($45<<24>>24)==(0); if (!($46)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } } $47 = ((($3)) + 28|0); HEAP8[$47>>0] = 1; ;HEAP32[$3>>2]=HEAP32[$1>>2]|0;HEAP32[$3+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$3+8>>2]=HEAP32[$1+8>>2]|0; $48 = HEAP32[445943]|0; $49 = ((($48)) + 8|0); $50 = HEAP32[$49>>2]|0; FUNCTION_TABLE_vii[$50 & 255](1783772,$3); $$0 = 1; STACKTOP = sp;return ($$0|0); } function _TouchesSolid($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1115412 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(2); $5 = $4&1; return ($5|0); } function _CheckBlockTap($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_DateTime_CurrentUTC_MS()|0); $2 = (getTempRet0() | 0); $3 = (((392848 + (($0*24)|0)|0)) + 16|0); $4 = $3; $5 = $4; $6 = HEAP32[$5>>2]|0; $7 = (($4) + 4)|0; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = (_i64Add(($6|0),($9|0),250,0)|0); $11 = (getTempRet0() | 0); $12 = ($2>>>0)>($11>>>0); $13 = ($1>>>0)>($10>>>0); $14 = ($2|0)==($11|0); $15 = $14 & $13; $16 = $12 | $15; if ($16) { return; } $17 = (((392848 + (($0*24)|0)|0)) + 4|0); $18 = HEAP8[$17>>0]|0; $19 = ($18<<24>>24)==(7); if (!($19)) { return; } $20 = HEAP32[451035]|0; switch ($20|0) { case 0: { $$0 = 1; break; } case 1: { $$0 = 0; break; } default: { return; } } $21 = (1972872 + ($$0)|0); $22 = HEAP8[$21>>0]|0; _MouseStatePress($$0); $23 = ($$0|0)==(0); if ($23) { _InputHandler_DeleteBlock(); } else { _InputHandler_PlaceBlock(); } $24 = ($22<<24>>24)==(0); if (!($24)) { return; } _MouseStateRelease($$0); return; } function _Input_SetTouchMode($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; HEAP8[1972870] = $0; _ClearTouches(); return; } function _Input_AddTouch($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$022 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_TryUpdateTouch($0,$1,$2)|0); $4 = ($3<<24>>24)==(0); if (!($4)) { return; } $$022 = 0; while(1) { $5 = (((392848 + (($$022*24)|0)|0)) + 4|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); if ($7) { break; } $25 = (($$022) + 1)|0; $26 = ($25>>>0)<(32); if ($26) { $$022 = $25; } else { label = 8; break; } } if ((label|0) == 8) { return; } $8 = (392848 + (($$022*24)|0)|0); HEAP32[$8>>2] = $0; HEAP8[$5>>0] = 7; $9 = (((392848 + (($$022*24)|0)|0)) + 8|0); HEAP32[$9>>2] = $1; $10 = (((392848 + (($$022*24)|0)|0)) + 12|0); HEAP32[$10>>2] = $2; $11 = (_DateTime_CurrentUTC_MS()|0); $12 = (getTempRet0() | 0); $13 = (((392848 + (($$022*24)|0)|0)) + 16|0); $14 = $13; $15 = $14; HEAP32[$15>>2] = $11; $16 = (($14) + 4)|0; $17 = $16; HEAP32[$17>>2] = $12; $18 = 1094448; $19 = $18; HEAP32[$19>>2] = $11; $20 = (($18) + 4)|0; $21 = $20; HEAP32[$21>>2] = $12; $22 = HEAP32[451036]|0; $23 = ($$022|0)==($22|0); if ($23) { $24 = (($22) + 1)|0; HEAP32[451036] = $24; } _Pointer_SetPosition($$022,$1,$2); _Pointer_SetPressed($$022,1); return; } function _TryUpdateTouch($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$021 = 0, $$026 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[451036]|0; $4 = ($3|0)>(0); if (!($4)) { $$021 = 0; return ($$021|0); } $5 = HEAP32[451036]|0; $$026 = 0; while(1) { $6 = (392848 + (($$026*24)|0)|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==($0|0); if ($8) { $9 = (((392848 + (($$026*24)|0)|0)) + 4|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==(0); if (!($11)) { break; } } $29 = (($$026) + 1)|0; $30 = ($29|0)<($5|0); if ($30) { $$026 = $29; } else { $$021 = 0; label = 13; break; } } if ((label|0) == 13) { return ($$021|0); } $12 = HEAP8[1972875]|0; $13 = ($12<<24>>24)==(0); $14 = $10 & 2; $15 = ($14<<24>>24)==(0); $or$cond = $15 | $13; if (!($or$cond)) { $16 = ($10<<24>>24)==(7); if ($16) { $17 = (_MovedFromBeg($$026,$1,$2)|0); $18 = ($17<<24>>24)==(0); if (!($18)) { $19 = HEAP8[$9>>0]|0; $20 = ($19<<24>>24)==(7); if ($20) { HEAP8[$9>>0] = 2; } } } $21 = (390496 + ($$026<<3)|0); $22 = HEAP32[$21>>2]|0; $23 = (($1) - ($22))|0; $24 = (+($23|0)); $25 = (((390496 + ($$026<<3)|0)) + 4|0); $26 = HEAP32[$25>>2]|0; $27 = (($2) - ($26))|0; $28 = (+($27|0)); _Event_RaiseRawMove((1801848),$24,$28); } _Pointer_SetPosition($$026,$1,$2); $$021 = 1; return ($$021|0); } function _Pointer_SetPosition($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (390496 + ($0<<3)|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)==($1|0); if ($5) { $6 = (((390496 + ($0<<3)|0)) + 4|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==($2|0); if ($8) { return; } } HEAP32[$3>>2] = $1; $9 = (((390496 + ($0<<3)|0)) + 4|0); HEAP32[$9>>2] = $2; $10 = HEAP8[1972870]|0; $11 = ($10<<24>>24)==(0); if (!($11)) { $12 = (((392848 + (($0*24)|0)|0)) + 4|0); $13 = HEAP8[$12>>0]|0; $14 = $13 & 1; $15 = ($14<<24>>24)==(0); if ($15) { return; } } _Event_RaiseInt(1801068,$0); return; } function _MovedFromBeg($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (((392848 + (($0*24)|0)|0)) + 8|0); $4 = HEAP32[$3>>2]|0; $5 = (($1) - ($4))|0; $6 = (_Math_AbsI($5)|0); $7 = (_Display_ScaleX(5)|0); $8 = ($6|0)>($7|0); if ($8) { $15 = 1; return ($15|0); } $9 = (((392848 + (($0*24)|0)|0)) + 12|0); $10 = HEAP32[$9>>2]|0; $11 = (($2) - ($10))|0; $12 = (_Math_AbsI($11)|0); $13 = (_Display_ScaleY(5)|0); $14 = ($12|0)>($13|0); $phitmp = $14&1; $15 = $phitmp; return ($15|0); } function _Input_UpdateTouch($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; (_TryUpdateTouch($0,$1,$2)|0); return; } function _Input_RemoveTouch($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$014 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[451036]|0; $4 = ($3|0)>(0); if (!($4)) { return; } $5 = HEAP32[451036]|0; $$014 = 0; while(1) { $6 = (392848 + (($$014*24)|0)|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==($0|0); if ($8) { $9 = (((392848 + (($$014*24)|0)|0)) + 4|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==(0); if (!($11)) { break; } } $16 = (($$014) + 1)|0; $17 = ($16|0)<($5|0); if ($17) { $$014 = $16; } else { label = 8; break; } } if ((label|0) == 8) { return; } _Pointer_SetPosition($$014,$1,$2); _Pointer_SetPressed($$014,0); _Pointer_SetPosition($$014,-100000,-100000); HEAP8[$9>>0] = 0; $12 = (($$014) + 1)|0; $13 = HEAP32[451036]|0; $14 = ($12|0)==($13|0); if (!($14)) { return; } $15 = (($13) + -1)|0; HEAP32[451036] = $15; return; } function _Input_SetPressed($0) { $0 = $0|0; var $$old = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (390368 + ($0)|0); $2 = HEAP8[$1>>0]|0; HEAP8[$1>>0] = 1; _Event_RaiseInput((1800028),$0,$2); switch ($0|0) { case 67: { $3 = HEAP8[(390406)>>0]|0; $4 = HEAP8[(390407)>>0]|0; $5 = $4 | $3; $6 = ($5<<24>>24)==(0); if ($6) { return; } _Event_RaiseInput((1800028),1001,0); return; } case 86: { $7 = HEAP8[(390406)>>0]|0; $8 = HEAP8[(390407)>>0]|0; $9 = $8 | $7; $10 = ($9<<24>>24)==(0); if ($10) { return; } _Event_RaiseInput((1800028),1002,0); return; } case 119: { $$old = ($2<<24>>24)==(0); if (!($$old)) { return; } _Pointer_SetPressed(0,1); return; } default: { return; } } } function _Input_Set($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)==(0); if ($2) { _Input_SetReleased($0); return; } else { _Input_SetPressed($0); return; } } function _Input_SetNonRepeatable($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)==(0); if ($2) { _Input_SetReleased($0); return; } $3 = (390368 + ($0)|0); $4 = HEAP8[$3>>0]|0; $5 = ($4<<24>>24)==(0); if (!($5)) { return; } _Input_SetPressed($0); return; } function _Mouse_ScrollWheel($0) { $0 = +$0; var label = 0, sp = 0; sp = STACKTOP; _Event_RaiseFloat((1800548),$0); return; } function _KeyBind_IsPressed($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (390752 + ($0)|0); $2 = HEAP8[$1>>0]|0; $3 = $2&255; $4 = (390368 + ($3)|0); $5 = HEAP8[$4>>0]|0; return ($5|0); } function _KeyBind_Set($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp + 72|0; $3 = sp; $4 = sp + 64|0; HEAP32[$2>>2] = $3; $5 = ((($2)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($2)) + 6|0); HEAP16[$6>>1] = 64; $7 = (5984 + ($0<<2)|0); $8 = HEAP32[$7>>2]|0; _String_Format1($2,33078,$8); $9 = (4688 + ($1<<2)|0); $10 = HEAP32[$9>>2]|0; _String_FromReadonly($4,$10); _Options_SetString($2,$4); $11 = $1&255; $12 = (390752 + ($0)|0); HEAP8[$12>>0] = $11; STACKTOP = sp;return; } function _Hotkeys_Remove($0,$1) { $0 = $0|0; $1 = $1|0; var $$01826 = 0, $$01925 = 0, $$020 = 0, $$024 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1804156)>>2]|0; $3 = ($2|0)>(0); if (!($3)) { $$020 = 0; return ($$020|0); } $4 = HEAP32[(1804156)>>2]|0; $$01826 = 0;$$01925 = 390800; while(1) { $5 = ((($$01925)) + 4|0); $6 = HEAP8[$5>>0]|0; $7 = $6&255; $8 = ($7|0)==($0|0); if ($8) { $9 = ((($$01925)) + 5|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==($1<<24>>24); if ($11) { break; } } $30 = (($$01826) + 1)|0; $31 = ((($$01925)) + 8|0); $32 = ($30|0)<($4|0); if ($32) { $$01826 = $30;$$01925 = $31; } else { $$020 = 0; label = 9; break; } } if ((label|0) == 9) { return ($$020|0); } $12 = HEAP32[$$01925>>2]|0; _Hotkeys_RemoveText($12); $13 = HEAP32[(1804156)>>2]|0; $14 = ($$01826|0)<($13|0); if (!($14)) { $$020 = 1; return ($$020|0); } $15 = HEAP32[(1804156)>>2]|0; $$024 = $$01826; while(1) { $16 = (390800 + ($$024<<3)|0); $17 = (($$024) + 1)|0; $18 = (390800 + ($17<<3)|0); $19 = $18; $20 = $19; $21 = HEAP32[$20>>2]|0; $22 = (($19) + 4)|0; $23 = $22; $24 = HEAP32[$23>>2]|0; $25 = $16; $26 = $25; HEAP32[$26>>2] = $21; $27 = (($25) + 4)|0; $28 = $27; HEAP32[$28>>2] = $24; $29 = ($17|0)<($15|0); if ($29) { $$024 = $17; } else { $$020 = 1; break; } } return ($$020|0); } function _StoredHotkeys_Load($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $2 = sp + 80|0; $3 = sp + 72|0; $4 = sp + 64|0; $5 = sp; HEAP8[$2>>0] = $1; HEAP32[$3>>2] = $5; $6 = ((($3)) + 4|0); HEAP16[$6>>1] = 0; $7 = ((($3)) + 6|0); HEAP16[$7>>1] = 64; $8 = (4688 + ($0<<2)|0); $9 = HEAP32[$8>>2]|0; _String_Format2($3,33659,$9,$2); $10 = HEAP32[$3>>2]|0; $11 = HEAP16[$6>>1]|0; $12 = $11&65535; $13 = (($10) + ($12)|0); HEAP8[$13>>0] = 0; $14 = HEAP32[$3>>2]|0; (_Options_UNSAFE_Get($14,$4)|0); _StoredHotkey_Parse($3,$4); STACKTOP = sp;return; } function _StoredHotkeys_Remove($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp + 72|0; $3 = sp + 64|0; $4 = sp; HEAP8[$2>>0] = $1; HEAP32[$3>>2] = $4; $5 = ((($3)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($3)) + 6|0); HEAP16[$6>>1] = 64; $7 = (4688 + ($0<<2)|0); $8 = HEAP32[$7>>2]|0; _String_Format2($3,33659,$8,$2); _Options_SetString($3,0); STACKTOP = sp;return; } function _StoredHotkeys_Add($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 224|0; $4 = sp + 209|0; $5 = sp + 208|0; $6 = sp + 200|0; $7 = sp + 128|0; $8 = sp + 192|0; $9 = sp; HEAP8[$4>>0] = $1; HEAP8[$5>>0] = $2; HEAP32[$6>>2] = $7; $10 = ((($6)) + 4|0); HEAP16[$10>>1] = 0; $11 = ((($6)) + 6|0); HEAP16[$11>>1] = 64; HEAP32[$8>>2] = $9; $12 = ((($8)) + 4|0); HEAP16[$12>>1] = 0; $13 = ((($8)) + 6|0); HEAP16[$13>>1] = 128; $14 = (4688 + ($0<<2)|0); $15 = HEAP32[$14>>2]|0; _String_Format2($6,33659,$15,$4); _String_Format2($8,33672,$5,$3); _Options_SetString($6,$8); STACKTOP = sp;return; } function _InputHandler_OnScreensChanged() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_DateTime_CurrentUTC_MS()|0); $1 = (getTempRet0() | 0); $2 = 1094448; $3 = $2; HEAP32[$3>>2] = $0; $4 = (($2) + 4)|0; $5 = $4; HEAP32[$5>>2] = $1; HEAP32[3686] = -1; $6 = HEAP32[(1803572)>>2]|0; $7 = ($6|0)==(0|0); if ($7) { return; } _MouseStateChanged(0,0); _MouseStateChanged(1,0); _MouseStateChanged(2,0); return; } function _InputHandler_Tick() { var $$0 = 0, $$012 = 0, $$013 = 0, $$pr = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $phitmp = 0, $phitmp14 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_DateTime_CurrentUTC_MS()|0); $1 = (getTempRet0() | 0); $2 = 1094448; $3 = $2; $4 = HEAP32[$3>>2]|0; $5 = (($2) + 4)|0; $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = (_i64Subtract(($0|0),($1|0),($4|0),($7|0))|0); $9 = (getTempRet0() | 0); $10 = ($8|0)<(250); if ($10) { return; } $11 = 1094448; $12 = $11; HEAP32[$12>>2] = $0; $13 = (($11) + 4)|0; $14 = $13; HEAP32[$14>>2] = $1; $15 = HEAP32[(1803572)>>2]|0; $16 = ($15|0)==(0|0); if (!($16)) { return; } $17 = (_KeyBind_IsPressed(26)|0); $18 = (_KeyBind_IsPressed(27)|0); $19 = (_KeyBind_IsPressed(28)|0); $20 = HEAP8[1972870]|0; $21 = ($20<<24>>24)==(0); if ($21) { $$0 = $17;$$012 = $18;$$013 = $19; } else { $22 = HEAP32[3677]|0; $23 = ($22|0)==(1); if ($23) { $24 = (_AnyBlockTouches()|0); $25 = ($24<<24>>24)!=(0); $phitmp = $25&1; $$pr = HEAP32[3677]|0; $26 = $$pr;$35 = $phitmp; } else { $26 = $22;$35 = 0; } $27 = ($26|0)==(0); if ($27) { $28 = (_AnyBlockTouches()|0); $29 = ($28<<24>>24)!=(0); $phitmp14 = $29&1; $$0 = $35;$$012 = 0;$$013 = $phitmp14; } else { $$0 = $35;$$012 = 0;$$013 = 0; } } $30 = HEAP8[(1949243)>>0]|0; $31 = ($30<<24>>24)==(0); if (!($31)) { HEAP32[3686] = -1; _MouseStateChanged(0,$$0); _MouseStateChanged(1,$$013); _MouseStateChanged(2,$$012); } $32 = ($$0<<24>>24)==(0); if (!($32)) { _InputHandler_DeleteBlock(); return; } $33 = ($$013<<24>>24)==(0); if (!($33)) { _InputHandler_PlaceBlock(); return; } $34 = ($$012<<24>>24)==(0); if ($34) { return; } _InputHandler_PickBlock(); return; } function _AnyBlockTouches() { var $$05 = 0, $$07 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[451036]|0; $1 = ($0|0)>(0); if (!($1)) { $$05 = 0; return ($$05|0); } $2 = HEAP32[451036]|0; $$07 = 0; while(1) { $5 = (((392848 + (($$07*24)|0)|0)) + 4|0); $6 = HEAP8[$5>>0]|0; $7 = $6 & 4; $8 = ($7<<24>>24)==(0); $3 = (($$07) + 1)|0; if (!($8)) { break; } $4 = ($3|0)<($2|0); if ($4) { $$07 = $3; } else { $$05 = 0; label = 6; break; } } if ((label|0) == 6) { return ($$05|0); } $9 = $6 & 6; HEAP8[$5>>0] = $9; $$05 = 1; return ($$05|0); } function _InputHandler_SetFOV($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1784310)>>0]|0; $2 = ($1<<24>>24)==(0); $3 = HEAP8[(1784312)>>0]|0; $4 = ($3<<24>>24)==(0); $or$cond = $2 | $4; if ($or$cond) { $$0 = 0; return ($$0|0); } HEAP32[(1771076)>>2] = $0; _Camera_SetFov($0); $$0 = 1; return ($$0|0); } function _Input_HandleMouseWheel($0) { $0 = +$0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0; var $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond13 = 0; var label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(390408)>>0]|0; $2 = HEAP8[(390409)>>0]|0; $3 = $2 | $1; $4 = HEAP8[(390406)>>0]|0; $5 = $3 | $4; $6 = HEAP8[(390407)>>0]|0; $7 = $5 | $6; $8 = ($7<<24>>24)==(0); if ($8) { $9 = HEAP8[(390404)>>0]|0; $10 = HEAP8[(390405)>>0]|0; $11 = $10 | $9; $12 = ($11<<24>>24)==(0); if ($12) { $13 = HEAP32[(1771060)>>2]|0; $14 = ((($13)) + 40|0); $15 = HEAP32[$14>>2]|0; $16 = (FUNCTION_TABLE_id[$15 & 3]($0)|0); $17 = ($16<<24>>24)==(0); if (!($17)) { $$0 = 1; return ($$0|0); } } } $18 = (_KeyBind_IsPressed(24)|0); $19 = ($18<<24>>24)==(0); if ($19) { $$0 = 0; return ($$0|0); } $20 = HEAP8[(1784310)>>0]|0; $21 = ($20<<24>>24)==(0); $22 = HEAP8[(1784312)>>0]|0; $23 = ($22<<24>>24)==(0); $or$cond13 = $21 | $23; if ($or$cond13) { $$0 = 0; return ($$0|0); } $24 = +HEAPF32[3687]; $25 = $24 == -1.0; if ($25) { $26 = HEAP32[(1771076)>>2]|0; $27 = (+($26|0)); HEAPF32[3687] = $27; } $28 = $0 * 5.0; $29 = +HEAPF32[3687]; $30 = $29 - $28; $31 = $30 < 1.0; $32 = $31 ? 1.0 : $30; $33 = HEAP32[(1771072)>>2]|0; $34 = (+($33|0)); $35 = $32 > $34; $36 = $35 ? $34 : $32; HEAPF32[3687] = $36; $37 = (~~(($36))); $38 = (_InputHandler_SetFOV($37)|0); $$0 = $38; return ($$0|0); } function _OnInit_1034() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _OnReset_1035(); $0 = HEAP8[(1803054)>>0]|0; HEAP8[(1811009)>>0] = $0; $1 = HEAP32[(1803060)>>2]|0; $2 = HEAP8[$1>>0]|0; $3 = $2&255; HEAP16[904650] = $3; $4 = ((($1)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; HEAP16[(1809302)>>1] = $6; $7 = HEAP32[(1803060)>>2]|0; $8 = ((($7)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; HEAP16[(1809304)>>1] = $10; $11 = ((($7)) + 3|0); $12 = HEAP8[$11>>0]|0; $13 = $12&255; HEAP16[(1809306)>>1] = $13; $14 = HEAP32[(1803060)>>2]|0; $15 = ((($14)) + 4|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; HEAP16[(1809308)>>1] = $17; $18 = ((($14)) + 5|0); $19 = HEAP8[$18>>0]|0; $20 = $19&255; HEAP16[(1809310)>>1] = $20; $21 = HEAP32[(1803060)>>2]|0; $22 = ((($21)) + 6|0); $23 = HEAP8[$22>>0]|0; $24 = $23&255; HEAP16[(1809312)>>1] = $24; $25 = ((($21)) + 7|0); $26 = HEAP8[$25>>0]|0; $27 = $26&255; HEAP16[(1809314)>>1] = $27; $28 = HEAP32[(1803060)>>2]|0; $29 = ((($28)) + 8|0); $30 = HEAP8[$29>>0]|0; $31 = $30&255; HEAP16[(1809316)>>1] = $31; return; } function _OnReset_1035() { var label = 0, sp = 0; sp = STACKTOP; _Inventory_ResetMapping(); HEAP8[(1811008)>>0] = 1; return; } function _Inventory_ResetMapping() { var $$05 = 0, $0 = 0, $1 = 0, $2 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $$05 = 0; while(1) { $0 = (_DefaultMapping($$05)|0); $1 = (1809462 + ($$05<<1)|0); HEAP16[$1>>1] = $0; $2 = (($$05) + 1)|0; $exitcond = ($2|0)==(768); if ($exitcond) { break; } else { $$05 = $2; } } return; } function _DefaultMapping($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972839]|0; $2 = ($1<<24>>24)==(0); if ($2) { $10 = ($0|0)<(65); if (!($10)) { $$0 = 0; return ($$0|0); } $11 = (($0) + 1)|0; $12 = $11&65535; $$0 = $12; return ($$0|0); } else { $3 = HEAP8[(1803055)>>0]|0; $4 = $3&255; $5 = ($4|0)>($0|0); if (!($5)) { $$0 = 0; return ($$0|0); } $6 = HEAP32[(1803056)>>2]|0; $7 = (($6) + ($0)|0); $8 = HEAP8[$7>>0]|0; $9 = $8&255; $$0 = $9; return ($$0|0); } } function _Inventory_CheckChangeSelected() { var $$0 = 0, $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1811008)>>0]|0; $1 = ($0<<24>>24)==(0); if (!($1)) { $$0 = 1; return ($$0|0); } _Chat_AddRaw(33678); $$0 = 0; return ($$0|0); } function _Inventory_SetSelectedIndex($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Inventory_CheckChangeSelected()|0); $2 = ($1<<24>>24)==(0); if ($2) { return; } HEAP32[(1811000)>>2] = $0; _Event_RaiseVoid((1794568)); return; } function _Inventory_SetHotbarIndex($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Inventory_CheckChangeSelected()|0); $2 = ($1<<24>>24)!=(0); $3 = HEAP8[1972839]|0; $4 = ($3<<24>>24)==(0); $or$cond = $2 & $4; if (!($or$cond)) { return; } $5 = ($0*9)|0; HEAP32[(1811004)>>2] = $5; _Event_RaiseVoid((1794568)); return; } function _Inventory_SwitchHotbar() { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1811004)>>2]|0; $1 = ($0|0)==(0); $2 = $1&1; _Inventory_SetHotbarIndex($2); return; } function _Inventory_SetSelectedBlock($0) { $0 = $0|0; var $$lcssa = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Inventory_CheckChangeSelected()|0); $2 = ($1<<24>>24)==(0); if ($2) { return; } $4 = HEAP32[(1811004)>>2]|0; $8 = (1809300 + ($4<<1)|0); $9 = HEAP16[$8>>1]|0; $10 = ($9<<16>>16)==($0<<16>>16); if ($10) { $$lcssa = $8; label = 4; } else { $3 = (($4) + 1)|0; $5 = (1809300 + ($3<<1)|0); $6 = HEAP16[$5>>1]|0; $7 = ($6<<16>>16)==($0<<16>>16); if ($7) { $$lcssa = $5; label = 4; } else { $19 = (($4) + 2)|0; $20 = (1809300 + ($19<<1)|0); $21 = HEAP16[$20>>1]|0; $22 = ($21<<16>>16)==($0<<16>>16); if ($22) { $$lcssa = $20; label = 4; } else { $23 = (($4) + 3)|0; $24 = (1809300 + ($23<<1)|0); $25 = HEAP16[$24>>1]|0; $26 = ($25<<16>>16)==($0<<16>>16); if ($26) { $$lcssa = $24; label = 4; } else { $27 = (($4) + 4)|0; $28 = (1809300 + ($27<<1)|0); $29 = HEAP16[$28>>1]|0; $30 = ($29<<16>>16)==($0<<16>>16); if ($30) { $$lcssa = $28; label = 4; } else { $31 = (($4) + 5)|0; $32 = (1809300 + ($31<<1)|0); $33 = HEAP16[$32>>1]|0; $34 = ($33<<16>>16)==($0<<16>>16); if ($34) { $$lcssa = $32; label = 4; } else { $35 = (($4) + 6)|0; $36 = (1809300 + ($35<<1)|0); $37 = HEAP16[$36>>1]|0; $38 = ($37<<16>>16)==($0<<16>>16); if ($38) { $$lcssa = $36; label = 4; } else { $39 = (($4) + 7)|0; $40 = (1809300 + ($39<<1)|0); $41 = HEAP16[$40>>1]|0; $42 = ($41<<16>>16)==($0<<16>>16); if ($42) { $$lcssa = $40; label = 4; } else { $43 = (($4) + 8)|0; $44 = (1809300 + ($43<<1)|0); $45 = HEAP16[$44>>1]|0; $46 = ($45<<16>>16)==($0<<16>>16); if ($46) { $$lcssa = $44; label = 4; } } } } } } } } } if ((label|0) == 4) { $11 = HEAP32[(1811000)>>2]|0; $12 = (($11) + ($4))|0; $13 = (1809300 + ($12<<1)|0); $14 = HEAP16[$13>>1]|0; HEAP16[$$lcssa>>1] = $14; } $15 = HEAP32[(1811004)>>2]|0; $16 = HEAP32[(1811000)>>2]|0; $17 = (($16) + ($15))|0; $18 = (1809300 + ($17<<1)|0); HEAP16[$18>>1] = $0; _Event_RaiseVoid((1794568)); return; } function _Inventory_PickBlock($0) { $0 = $0|0; var $$031$lcssa = 0, $$130$lcssa = 0, $$229$lcssa = 0, $$lcssa = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0; var $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0; var $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; var $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $or$cond = 0, $spec$select = 0, $spec$select24 = 0, $spec$select25 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Inventory_CheckChangeSelected()|0); $2 = ($1<<24>>24)==(0); if ($2) { return; } $3 = HEAP32[(1811004)>>2]|0; $4 = HEAP32[(1811000)>>2]|0; $5 = (($4) + ($3))|0; $6 = (1809300 + ($5<<1)|0); $7 = HEAP16[$6>>1]|0; $8 = ($7<<16>>16)==($0<<16>>16); if ($8) { return; } $9 = HEAP8[1972839]|0; $10 = ($9<<24>>24)==(0); $11 = HEAP8[1972840]|0; $12 = ($11<<24>>24)!=(0); $or$cond = $10 | $12; $13 = ($0<<16>>16)==(2); $spec$select = $13 ? 3 : $0; $14 = ($spec$select<<16>>16)==(43); $spec$select24 = $14 ? 44 : $spec$select; $spec$select25 = $or$cond ? $0 : $spec$select24; $15 = (1809300 + ($3<<1)|0); $16 = HEAP16[$15>>1]|0; $17 = ($16<<16>>16)==($spec$select25<<16>>16); if ($17) { $$031$lcssa = 0; } else { $18 = (($3) + 1)|0; $19 = (1809300 + ($18<<1)|0); $20 = HEAP16[$19>>1]|0; $21 = ($20<<16>>16)==($spec$select25<<16>>16); if ($21) { $$031$lcssa = 1; } else { $116 = (($3) + 2)|0; $117 = (1809300 + ($116<<1)|0); $118 = HEAP16[$117>>1]|0; $119 = ($118<<16>>16)==($spec$select25<<16>>16); if ($119) { $$031$lcssa = 2; } else { $120 = (($3) + 3)|0; $121 = (1809300 + ($120<<1)|0); $122 = HEAP16[$121>>1]|0; $123 = ($122<<16>>16)==($spec$select25<<16>>16); if ($123) { $$031$lcssa = 3; } else { $124 = (($3) + 4)|0; $125 = (1809300 + ($124<<1)|0); $126 = HEAP16[$125>>1]|0; $127 = ($126<<16>>16)==($spec$select25<<16>>16); if ($127) { $$031$lcssa = 4; } else { $128 = (($3) + 5)|0; $129 = (1809300 + ($128<<1)|0); $130 = HEAP16[$129>>1]|0; $131 = ($130<<16>>16)==($spec$select25<<16>>16); if ($131) { $$031$lcssa = 5; } else { $132 = (($3) + 6)|0; $133 = (1809300 + ($132<<1)|0); $134 = HEAP16[$133>>1]|0; $135 = ($134<<16>>16)==($spec$select25<<16>>16); if ($135) { $$031$lcssa = 6; } else { $136 = (($3) + 7)|0; $137 = (1809300 + ($136<<1)|0); $138 = HEAP16[$137>>1]|0; $139 = ($138<<16>>16)==($spec$select25<<16>>16); if ($139) { $$031$lcssa = 7; } else { $140 = (($3) + 8)|0; $141 = (1809300 + ($140<<1)|0); $142 = HEAP16[$141>>1]|0; $143 = ($142<<16>>16)==($spec$select25<<16>>16); if ($143) { $$031$lcssa = 8; } else { $144 = HEAP8[1972813]|0; $145 = ($144<<24>>24)==(0); L17: do { if (!($145)) { $22 = HEAP32[(1811004)>>2]|0; $23 = (1809300 + ($22<<1)|0); $24 = HEAP16[$23>>1]|0; $25 = (_AutoRotate_BlocksShareGroup($24,$spec$select25)|0); $26 = ($25<<24>>24)==(0); do { if ($26) { $27 = HEAP32[(1811004)>>2]|0; $28 = (($27) + 1)|0; $29 = (1809300 + ($28<<1)|0); $30 = HEAP16[$29>>1]|0; $31 = (_AutoRotate_BlocksShareGroup($30,$spec$select25)|0); $32 = ($31<<24>>24)==(0); if ($32) { $74 = HEAP32[(1811004)>>2]|0; $75 = (($74) + 2)|0; $76 = (1809300 + ($75<<1)|0); $77 = HEAP16[$76>>1]|0; $78 = (_AutoRotate_BlocksShareGroup($77,$spec$select25)|0); $79 = ($78<<24>>24)==(0); if ($79) { $80 = HEAP32[(1811004)>>2]|0; $81 = (($80) + 3)|0; $82 = (1809300 + ($81<<1)|0); $83 = HEAP16[$82>>1]|0; $84 = (_AutoRotate_BlocksShareGroup($83,$spec$select25)|0); $85 = ($84<<24>>24)==(0); if ($85) { $86 = HEAP32[(1811004)>>2]|0; $87 = (($86) + 4)|0; $88 = (1809300 + ($87<<1)|0); $89 = HEAP16[$88>>1]|0; $90 = (_AutoRotate_BlocksShareGroup($89,$spec$select25)|0); $91 = ($90<<24>>24)==(0); if ($91) { $92 = HEAP32[(1811004)>>2]|0; $93 = (($92) + 5)|0; $94 = (1809300 + ($93<<1)|0); $95 = HEAP16[$94>>1]|0; $96 = (_AutoRotate_BlocksShareGroup($95,$spec$select25)|0); $97 = ($96<<24>>24)==(0); if (!($97)) { $$130$lcssa = 5; break; } $98 = HEAP32[(1811004)>>2]|0; $99 = (($98) + 6)|0; $100 = (1809300 + ($99<<1)|0); $101 = HEAP16[$100>>1]|0; $102 = (_AutoRotate_BlocksShareGroup($101,$spec$select25)|0); $103 = ($102<<24>>24)==(0); if (!($103)) { $$130$lcssa = 6; break; } $104 = HEAP32[(1811004)>>2]|0; $105 = (($104) + 7)|0; $106 = (1809300 + ($105<<1)|0); $107 = HEAP16[$106>>1]|0; $108 = (_AutoRotate_BlocksShareGroup($107,$spec$select25)|0); $109 = ($108<<24>>24)==(0); if (!($109)) { $$130$lcssa = 7; break; } $110 = HEAP32[(1811004)>>2]|0; $111 = (($110) + 8)|0; $112 = (1809300 + ($111<<1)|0); $113 = HEAP16[$112>>1]|0; $114 = (_AutoRotate_BlocksShareGroup($113,$spec$select25)|0); $115 = ($114<<24>>24)==(0); if ($115) { break L17; } else { $$130$lcssa = 8; } } else { $$130$lcssa = 4; } } else { $$130$lcssa = 3; } } else { $$130$lcssa = 2; } } else { $$130$lcssa = 1; } } else { $$130$lcssa = 0; } } while(0); _Inventory_SetSelectedIndex($$130$lcssa); _Inventory_SetSelectedBlock($spec$select25); return; } } while(0); $33 = HEAP32[(1811004)>>2]|0; $34 = HEAP32[(1811000)>>2]|0; $35 = (($34) + ($33))|0; $36 = (1809300 + ($35<<1)|0); $37 = HEAP16[$36>>1]|0; $38 = ($37<<16>>16)==(0); if ($38) { _Inventory_SetSelectedBlock($spec$select25); return; } $39 = (1809300 + ($33<<1)|0); $40 = HEAP16[$39>>1]|0; $41 = ($40<<16>>16)==(0); do { if ($41) { $$229$lcssa = 0;$$lcssa = $39; } else { $42 = (($33) + 1)|0; $43 = (1809300 + ($42<<1)|0); $44 = HEAP16[$43>>1]|0; $45 = ($44<<16>>16)==(0); if ($45) { $$229$lcssa = 1;$$lcssa = $43; } else { $46 = (($33) + 2)|0; $47 = (1809300 + ($46<<1)|0); $48 = HEAP16[$47>>1]|0; $49 = ($48<<16>>16)==(0); if ($49) { $$229$lcssa = 2;$$lcssa = $47; } else { $50 = (($33) + 3)|0; $51 = (1809300 + ($50<<1)|0); $52 = HEAP16[$51>>1]|0; $53 = ($52<<16>>16)==(0); if ($53) { $$229$lcssa = 3;$$lcssa = $51; } else { $54 = (($33) + 4)|0; $55 = (1809300 + ($54<<1)|0); $56 = HEAP16[$55>>1]|0; $57 = ($56<<16>>16)==(0); if ($57) { $$229$lcssa = 4;$$lcssa = $55; } else { $58 = (($33) + 5)|0; $59 = (1809300 + ($58<<1)|0); $60 = HEAP16[$59>>1]|0; $61 = ($60<<16>>16)==(0); if ($61) { $$229$lcssa = 5;$$lcssa = $59; break; } $62 = (($33) + 6)|0; $63 = (1809300 + ($62<<1)|0); $64 = HEAP16[$63>>1]|0; $65 = ($64<<16>>16)==(0); if ($65) { $$229$lcssa = 6;$$lcssa = $63; break; } $66 = (($33) + 7)|0; $67 = (1809300 + ($66<<1)|0); $68 = HEAP16[$67>>1]|0; $69 = ($68<<16>>16)==(0); if ($69) { $$229$lcssa = 7;$$lcssa = $67; break; } $70 = (($33) + 8)|0; $71 = (1809300 + ($70<<1)|0); $72 = HEAP16[$71>>1]|0; $73 = ($72<<16>>16)==(0); if ($73) { $$229$lcssa = 8;$$lcssa = $71; break; } _Inventory_SetSelectedBlock($spec$select25); return; } } } } } } while(0); HEAP16[$$lcssa>>1] = $spec$select25; _Inventory_SetSelectedIndex($$229$lcssa); return; } } } } } } } } } _Inventory_SetSelectedIndex($$031$lcssa); return; } function _Inventory_AddDefault($0) { $0 = $0|0; var $$011 = 0, $$011$sink = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0&65535)>(65); L1: do { if ($1) { $2 = $0&65535; $3 = (($2) + -1)|0; $$011$sink = $3; } else { $$011 = 0; while(1) { $4 = (_DefaultMapping($$011)|0); $5 = ($4<<16>>16)==($0<<16>>16); if ($5) { $$011$sink = $$011; break L1; } $6 = (($$011) + 1)|0; $7 = ($6>>>0)<(65); if ($7) { $$011 = $6; } else { break; } } return; } } while(0); $8 = (1809462 + ($$011$sink<<1)|0); HEAP16[$8>>1] = $0; return; } function _Inventory_Remove($0) { $0 = $0|0; var $$06 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $$06 = 0; while(1) { $1 = (1809462 + ($$06<<1)|0); $2 = HEAP16[$1>>1]|0; $3 = ($2<<16>>16)==($0<<16>>16); if ($3) { HEAP16[$1>>1] = 0; } $4 = (($$06) + 1)|0; $exitcond = ($4|0)==(768); if ($exitcond) { break; } else { $$06 = $4; } } return; } function _IsometricDrawer_BeginBatch($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _IsometricDrawer_InitCache(); HEAP32[452753] = -1; HEAP32[452754] = $0; HEAP32[452755] = $0; HEAP32[452756] = $1; _Gfx_LoadMatrix(1,1811028); return; } function _IsometricDrawer_InitCache() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 128|0; $0 = sp + 64|0; $1 = sp; $2 = HEAP8[1972876]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { STACKTOP = sp;return; } HEAP8[1972876] = 1; _PackedCol_GetShaded(-1,1811092,1811096,1811100); _Matrix_RotateY($0,0.78539818525314331); _Matrix_RotateX($1,-0.52359879016876221); _Matrix_Mul(1811028,$0,$1); STACKTOP = sp;return; } function _IsometricDrawer_DrawBatch($0,$1,$2,$3) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; var $$sroa$0$0$copyload = 0.0, $$sroa$06$0$copyload = 0.0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$48$0$$sroa_idx9 = 0, $$sroa$48$0$copyload = 0.0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$5$0$copyload = 0.0, $$sroa$511$0$$sroa_idx12 = 0, $$sroa$511$0$copyload = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0; var $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0; var $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0; var $58 = 0, $59 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = $0&65535; $5 = (1108500 + ($4)|0); $6 = HEAP8[$5>>0]|0; $7 = (1120788 + ($4)|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(4); if ($9) { return; } $10 = $1 / 1.4142135381698608; HEAPF32[452776] = $10; HEAPF32[452777] = $2; HEAPF32[452778] = $3; HEAPF32[452779] = 0.0; _IsometricDrawer_RotateX(); _IsometricDrawer_RotateY(); $11 = +HEAPF32[452777]; $12 = $11 + -0.5; HEAPF32[452777] = $12; $13 = +HEAPF32[452778]; $14 = $13 + -0.5; HEAPF32[452778] = $14; $15 = HEAP8[$7>>0]|0; $16 = ($15<<24>>24)==(5); if ($16) { _IsometricDrawer_SpriteXQuad($0,1); _IsometricDrawer_SpriteZQuad($0,1); _IsometricDrawer_SpriteZQuad($0,0); _IsometricDrawer_SpriteXQuad($0,0); return; } else { $17 = (1125396 + (($4*12)|0)|0); ;HEAP32[(1781656)>>2]=HEAP32[$17>>2]|0;HEAP32[(1781656)+4>>2]=HEAP32[$17+4>>2]|0;HEAP32[(1781656)+8>>2]=HEAP32[$17+8>>2]|0; $18 = +HEAPF32[(1781660)>>2]; $19 = 1.0 - $18; HEAPF32[(1781660)>>2] = $19; $20 = (1134612 + (($4*12)|0)|0); ;HEAP32[(1781668)>>2]=HEAP32[$20>>2]|0;HEAP32[(1781668)+4>>2]=HEAP32[$20+4>>2]|0;HEAP32[(1781668)+8>>2]=HEAP32[$20+8>>2]|0; $21 = +HEAPF32[(1781672)>>2]; $22 = 1.0 - $21; HEAPF32[(1781672)>>2] = $22; $$sroa$06$0$copyload = +HEAPF32[$17>>2]; $$sroa$48$0$$sroa_idx9 = (((1125396 + (($4*12)|0)|0)) + 4|0); $$sroa$48$0$copyload = +HEAPF32[$$sroa$48$0$$sroa_idx9>>2]; $$sroa$511$0$$sroa_idx12 = (((1125396 + (($4*12)|0)|0)) + 8|0); $$sroa$511$0$copyload = +HEAPF32[$$sroa$511$0$$sroa_idx12>>2]; $$sroa$0$0$copyload = +HEAPF32[$20>>2]; $$sroa$4$0$$sroa_idx2 = (((1134612 + (($4*12)|0)|0)) + 4|0); $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx2>>2]; $$sroa$5$0$$sroa_idx4 = (((1134612 + (($4*12)|0)|0)) + 8|0); $$sroa$5$0$copyload = +HEAPF32[$$sroa$5$0$$sroa_idx4>>2]; $23 = $$sroa$06$0$copyload * 2.0; $24 = 1.0 - $23; $25 = $10 * $24; $26 = $12 + $25; HEAPF32[(1781680)>>2] = $26; $27 = $$sroa$0$0$copyload * 2.0; $28 = 1.0 - $27; $29 = $10 * $28; $30 = $12 + $29; HEAPF32[(1781692)>>2] = $30; $31 = $$sroa$48$0$copyload * 2.0; $32 = 1.0 - $31; $33 = $10 * $32; $34 = $14 + $33; HEAPF32[(1781684)>>2] = $34; $35 = $$sroa$4$0$copyload * 2.0; $36 = 1.0 - $35; $37 = $10 * $36; $38 = $14 + $37; HEAPF32[(1781696)>>2] = $38; $39 = $$sroa$511$0$copyload * 2.0; $40 = 1.0 - $39; $41 = $10 * $40; $42 = +HEAPF32[452779]; $43 = $41 + $42; HEAPF32[(1781688)>>2] = $43; $44 = $$sroa$5$0$copyload * 2.0; $45 = 1.0 - $44; $46 = $10 * $45; $47 = $46 + $42; HEAPF32[(1781700)>>2] = $47; $48 = (1123092 + ($4)|0); $49 = HEAP8[$48>>0]|0; HEAP8[1781648] = $49; $50 = (1109268 + ($4<<2)|0); $51 = HEAP32[$50>>2]|0; HEAP32[(1781652)>>2] = $51; $52 = ($6<<24>>24)!=(0); $53 = HEAP32[452773]|0; $54 = $52 ? -1 : $53; $55 = (_IsometricDrawer_GetTexLoc($0,1)|0); _Drawer_XMax(1,$54,$55,1811016); $56 = HEAP32[452774]|0; $57 = $52 ? -1 : $56; $58 = (_IsometricDrawer_GetTexLoc($0,2)|0); _Drawer_ZMin(1,$57,$58,1811016); $59 = (_IsometricDrawer_GetTexLoc($0,5)|0); _Drawer_YMax(1,-1,$59,1811016); return; } } function _IsometricDrawer_RotateX() { var $0 = 0.0, $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, label = 0, sp = 0; sp = STACKTOP; $0 = +HEAPF32[452778]; $1 = $0 * 0.86602538824081421; $2 = +HEAPF32[452779]; $3 = $2 * 0.5; $4 = $1 - $3; $5 = $0 * 0.5; $6 = $2 * 0.86602538824081421; $7 = $5 + $6; HEAPF32[452779] = $7; HEAPF32[452778] = $4; return; } function _IsometricDrawer_RotateY() { var $0 = 0.0, $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, label = 0, sp = 0; sp = STACKTOP; $0 = +HEAPF32[452777]; $1 = $0 * 0.70710676908493042; $2 = +HEAPF32[452779]; $3 = $2 * 0.70710676908493042; $4 = $1 - $3; $5 = $1 + $3; HEAPF32[452779] = $5; HEAPF32[452777] = $4; return; } function _IsometricDrawer_SpriteXQuad($0,$1) { $0 = $0|0; $1 = $1|0; var $$sroa$10$0$$sroa_idx33 = 0, $$sroa$10$0$$sroa_idx34 = 0, $$sroa$10$0$$sroa_idx36 = 0, $$sroa$10$0$$sroa_idx39 = 0, $$sroa$12$0 = 0, $$sroa$12$0$$sroa_idx41 = 0, $$sroa$12$0$$sroa_idx42 = 0, $$sroa$12$0$$sroa_idx44 = 0, $$sroa$12$0$$sroa_idx47 = 0, $$sroa$15$0$$sroa_idx49 = 0, $$sroa$15$0$$sroa_idx50 = 0, $$sroa$15$0$$sroa_idx52 = 0, $$sroa$15$0$$sroa_idx55 = 0, $$sroa$17$0$$sroa_idx57 = 0, $$sroa$17$0$$sroa_idx58 = 0, $$sroa$17$0$$sroa_idx60 = 0, $$sroa$17$0$$sroa_idx63 = 0, $$sroa$7$0$$sroa_idx25 = 0, $$sroa$7$0$$sroa_idx26 = 0, $$sroa$7$0$$sroa_idx28 = 0; var $$sroa$7$0$$sroa_idx31 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0; var $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = $0&65535; $4 = ($3*6)|0; $5 = $4 | 1; $6 = (1162260 + ($5<<1)|0); $7 = HEAP16[$6>>1]|0; _Atlas1D_TexRec($2,$7,1,1811120); $8 = HEAP32[452753]|0; $9 = HEAP32[452780]|0; $10 = ($8|0)==($9|0); if (!($10)) { _IsometricDrawer_Flush(); } $11 = (1123092 + ($3)|0); $12 = HEAP8[$11>>0]|0; $13 = ($12<<24>>24)==(0); if ($13) { $$sroa$12$0 = -1; } else { $14 = (1109268 + ($3<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = (_PackedCol_Tint(-1,$15)|0); $$sroa$12$0 = $16; } $17 = ($1<<24>>24)!=(0); $18 = $17 ? 0.0 : 0.5; HEAPF32[$2>>2] = $18; $19 = $17 ? 0.49968749284744263 : 0.99937498569488525; $20 = ((($2)) + 8|0); HEAPF32[$20>>2] = $19; $21 = +HEAPF32[452776]; $22 = +HEAPF32[452778]; $23 = $21 + $22; $24 = $21 * 1.2000000476837158; $25 = $22 - $24; $26 = $17 ? 0.0 : 1.2000000476837158; $27 = $26 * $21; $28 = +HEAPF32[452779]; $29 = $27 + $28; $30 = $17 ? -1.2000000476837158 : 0.0; $31 = $30 * $21; $32 = $31 + $28; $33 = HEAP32[452777]|0; $34 = ((($2)) + 12|0); $35 = HEAP32[$34>>2]|0; $36 = HEAP32[452754]|0; $37 = ((($36)) + 24|0); HEAP32[452754] = $37; HEAP32[$36>>2] = $33; $$sroa$7$0$$sroa_idx31 = ((($36)) + 4|0); HEAPF32[$$sroa$7$0$$sroa_idx31>>2] = $23; $$sroa$10$0$$sroa_idx39 = ((($36)) + 8|0); HEAPF32[$$sroa$10$0$$sroa_idx39>>2] = $29; $$sroa$12$0$$sroa_idx47 = ((($36)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx47>>2] = $$sroa$12$0; $$sroa$15$0$$sroa_idx55 = ((($36)) + 16|0); HEAPF32[$$sroa$15$0$$sroa_idx55>>2] = $19; $$sroa$17$0$$sroa_idx63 = ((($36)) + 20|0); HEAP32[$$sroa$17$0$$sroa_idx63>>2] = $35; $38 = ((($2)) + 4|0); $39 = HEAP32[$38>>2]|0; $40 = HEAP32[452754]|0; $41 = ((($40)) + 24|0); HEAP32[452754] = $41; HEAP32[$40>>2] = $33; $$sroa$7$0$$sroa_idx28 = ((($40)) + 4|0); HEAPF32[$$sroa$7$0$$sroa_idx28>>2] = $25; $$sroa$10$0$$sroa_idx36 = ((($40)) + 8|0); HEAPF32[$$sroa$10$0$$sroa_idx36>>2] = $29; $$sroa$12$0$$sroa_idx44 = ((($40)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx44>>2] = $$sroa$12$0; $$sroa$15$0$$sroa_idx52 = ((($40)) + 16|0); HEAPF32[$$sroa$15$0$$sroa_idx52>>2] = $19; $$sroa$17$0$$sroa_idx60 = ((($40)) + 20|0); HEAP32[$$sroa$17$0$$sroa_idx60>>2] = $39; $42 = HEAP32[$2>>2]|0; $43 = HEAP32[452754]|0; $44 = ((($43)) + 24|0); HEAP32[452754] = $44; HEAP32[$43>>2] = $33; $$sroa$7$0$$sroa_idx26 = ((($43)) + 4|0); HEAPF32[$$sroa$7$0$$sroa_idx26>>2] = $25; $$sroa$10$0$$sroa_idx34 = ((($43)) + 8|0); HEAPF32[$$sroa$10$0$$sroa_idx34>>2] = $32; $$sroa$12$0$$sroa_idx42 = ((($43)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx42>>2] = $$sroa$12$0; $$sroa$15$0$$sroa_idx50 = ((($43)) + 16|0); HEAP32[$$sroa$15$0$$sroa_idx50>>2] = $42; $$sroa$17$0$$sroa_idx58 = ((($43)) + 20|0); HEAP32[$$sroa$17$0$$sroa_idx58>>2] = $39; $45 = HEAP32[$34>>2]|0; $46 = HEAP32[452754]|0; $47 = ((($46)) + 24|0); HEAP32[452754] = $47; HEAP32[$46>>2] = $33; $$sroa$7$0$$sroa_idx25 = ((($46)) + 4|0); HEAPF32[$$sroa$7$0$$sroa_idx25>>2] = $23; $$sroa$10$0$$sroa_idx33 = ((($46)) + 8|0); HEAPF32[$$sroa$10$0$$sroa_idx33>>2] = $32; $$sroa$12$0$$sroa_idx41 = ((($46)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx41>>2] = $$sroa$12$0; $$sroa$15$0$$sroa_idx49 = ((($46)) + 16|0); HEAP32[$$sroa$15$0$$sroa_idx49>>2] = $42; $$sroa$17$0$$sroa_idx57 = ((($46)) + 20|0); HEAP32[$$sroa$17$0$$sroa_idx57>>2] = $45; STACKTOP = sp;return; } function _IsometricDrawer_SpriteZQuad($0,$1) { $0 = $0|0; $1 = $1|0; var $$sroa$11$0$$sroa_idx33 = 0, $$sroa$11$0$$sroa_idx34 = 0, $$sroa$11$0$$sroa_idx36 = 0, $$sroa$11$0$$sroa_idx39 = 0, $$sroa$12$0 = 0, $$sroa$12$0$$sroa_idx41 = 0, $$sroa$12$0$$sroa_idx42 = 0, $$sroa$12$0$$sroa_idx44 = 0, $$sroa$12$0$$sroa_idx47 = 0, $$sroa$15$0$$sroa_idx49 = 0, $$sroa$15$0$$sroa_idx50 = 0, $$sroa$15$0$$sroa_idx52 = 0, $$sroa$15$0$$sroa_idx55 = 0, $$sroa$17$0$$sroa_idx57 = 0, $$sroa$17$0$$sroa_idx58 = 0, $$sroa$17$0$$sroa_idx60 = 0, $$sroa$17$0$$sroa_idx63 = 0, $$sroa$8$0$$sroa_idx25 = 0, $$sroa$8$0$$sroa_idx26 = 0, $$sroa$8$0$$sroa_idx28 = 0; var $$sroa$8$0$$sroa_idx31 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0; var $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = $0&65535; $4 = ($3*6)|0; $5 = (($4) + 3)|0; $6 = (1162260 + ($5<<1)|0); $7 = HEAP16[$6>>1]|0; _Atlas1D_TexRec($2,$7,1,1811120); $8 = HEAP32[452753]|0; $9 = HEAP32[452780]|0; $10 = ($8|0)==($9|0); if (!($10)) { _IsometricDrawer_Flush(); } $11 = (1123092 + ($3)|0); $12 = HEAP8[$11>>0]|0; $13 = ($12<<24>>24)==(0); if ($13) { $$sroa$12$0 = -1; } else { $14 = (1109268 + ($3<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = (_PackedCol_Tint(-1,$15)|0); $$sroa$12$0 = $16; } $17 = ($1<<24>>24)!=(0); $18 = $17 ? 0.0 : 0.5; HEAPF32[$2>>2] = $18; $19 = $17 ? 0.49968749284744263 : 0.99937498569488525; $20 = ((($2)) + 8|0); HEAPF32[$20>>2] = $19; $21 = +HEAPF32[452776]; $22 = $17 ? 0.0 : 1.2000000476837158; $23 = $22 * $21; $24 = +HEAPF32[452777]; $25 = $23 + $24; $26 = $17 ? -1.2000000476837158 : 0.0; $27 = $26 * $21; $28 = $27 + $24; $29 = +HEAPF32[452778]; $30 = $21 + $29; $31 = $21 * 1.2000000476837158; $32 = $29 - $31; $33 = HEAP32[452779]|0; $34 = ((($2)) + 12|0); $35 = HEAP32[$34>>2]|0; $36 = HEAP32[452754]|0; $37 = ((($36)) + 24|0); HEAP32[452754] = $37; HEAPF32[$36>>2] = $25; $$sroa$8$0$$sroa_idx31 = ((($36)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx31>>2] = $30; $$sroa$11$0$$sroa_idx39 = ((($36)) + 8|0); HEAP32[$$sroa$11$0$$sroa_idx39>>2] = $33; $$sroa$12$0$$sroa_idx47 = ((($36)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx47>>2] = $$sroa$12$0; $$sroa$15$0$$sroa_idx55 = ((($36)) + 16|0); HEAPF32[$$sroa$15$0$$sroa_idx55>>2] = $19; $$sroa$17$0$$sroa_idx63 = ((($36)) + 20|0); HEAP32[$$sroa$17$0$$sroa_idx63>>2] = $35; $38 = ((($2)) + 4|0); $39 = HEAP32[$38>>2]|0; $40 = HEAP32[452754]|0; $41 = ((($40)) + 24|0); HEAP32[452754] = $41; HEAPF32[$40>>2] = $25; $$sroa$8$0$$sroa_idx28 = ((($40)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx28>>2] = $32; $$sroa$11$0$$sroa_idx36 = ((($40)) + 8|0); HEAP32[$$sroa$11$0$$sroa_idx36>>2] = $33; $$sroa$12$0$$sroa_idx44 = ((($40)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx44>>2] = $$sroa$12$0; $$sroa$15$0$$sroa_idx52 = ((($40)) + 16|0); HEAPF32[$$sroa$15$0$$sroa_idx52>>2] = $19; $$sroa$17$0$$sroa_idx60 = ((($40)) + 20|0); HEAP32[$$sroa$17$0$$sroa_idx60>>2] = $39; $42 = HEAP32[$2>>2]|0; $43 = HEAP32[452754]|0; $44 = ((($43)) + 24|0); HEAP32[452754] = $44; HEAPF32[$43>>2] = $28; $$sroa$8$0$$sroa_idx26 = ((($43)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx26>>2] = $32; $$sroa$11$0$$sroa_idx34 = ((($43)) + 8|0); HEAP32[$$sroa$11$0$$sroa_idx34>>2] = $33; $$sroa$12$0$$sroa_idx42 = ((($43)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx42>>2] = $$sroa$12$0; $$sroa$15$0$$sroa_idx50 = ((($43)) + 16|0); HEAP32[$$sroa$15$0$$sroa_idx50>>2] = $42; $$sroa$17$0$$sroa_idx58 = ((($43)) + 20|0); HEAP32[$$sroa$17$0$$sroa_idx58>>2] = $39; $45 = HEAP32[$34>>2]|0; $46 = HEAP32[452754]|0; $47 = ((($46)) + 24|0); HEAP32[452754] = $47; HEAPF32[$46>>2] = $28; $$sroa$8$0$$sroa_idx25 = ((($46)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx25>>2] = $30; $$sroa$11$0$$sroa_idx33 = ((($46)) + 8|0); HEAP32[$$sroa$11$0$$sroa_idx33>>2] = $33; $$sroa$12$0$$sroa_idx41 = ((($46)) + 12|0); HEAP32[$$sroa$12$0$$sroa_idx41>>2] = $$sroa$12$0; $$sroa$15$0$$sroa_idx49 = ((($46)) + 16|0); HEAP32[$$sroa$15$0$$sroa_idx49>>2] = $42; $$sroa$17$0$$sroa_idx57 = ((($46)) + 20|0); HEAP32[$$sroa$17$0$$sroa_idx57>>2] = $45; STACKTOP = sp;return; } function _IsometricDrawer_GetTexLoc($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0&65535; $3 = ($2*6)|0; $4 = $1&255; $5 = (($3) + ($4))|0; $6 = (1162260 + ($5<<1)|0); $7 = HEAP16[$6>>1]|0; $8 = $7&65535; $9 = HEAP32[(1949304)>>2]|0; $10 = ($9)?($8 >>> $9):($8); HEAP32[452780] = $10; $11 = HEAP32[452753]|0; $12 = ($11|0)==($10|0); if ($12) { return ($7|0); } _IsometricDrawer_Flush(); return ($7|0); } function _IsometricDrawer_Flush() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[452753]|0; $1 = ($0|0)==(-1); if (!($1)) { $2 = (1949312 + ($0<<2)|0); $3 = HEAP32[$2>>2]|0; _Gfx_BindTexture($3); $4 = HEAP32[452754]|0; $5 = HEAP32[452755]|0; $6 = $5; $7 = (($4) - ($6))|0; $8 = (($7|0) / 24)&-1; $9 = HEAP32[452756]|0; _Gfx_UpdateDynamicVb_IndexedTris($9,$5,$8); } $10 = HEAP32[452780]|0; HEAP32[452753] = $10; $11 = HEAP32[452755]|0; HEAP32[452754] = $11; return; } function _IsometricDrawer_EndBatch() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[452754]|0; $1 = HEAP32[452755]|0; $2 = ($0|0)==($1|0); if (!($2)) { $3 = HEAP32[452780]|0; HEAP32[452753] = $3; _IsometricDrawer_Flush(); } HEAP32[452753] = -1; _Gfx_LoadIdentityMatrix(1); return; } function _OnInit_1047() { var label = 0, sp = 0; sp = STACKTOP; _ClassicLighting_SetActive(); return; } function _OnReset_1048() { var label = 0, sp = 0; sp = STACKTOP; _ClassicLighting_FreeState(); return; } function _OnNewMapLoaded_1049() { var label = 0, sp = 0; sp = STACKTOP; _ClassicLighting_AllocState(); return; } function _ClassicLighting_SetActive() { var label = 0, sp = 0; sp = STACKTOP; return; } function _ClassicLighting_OnBlockChanged($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = HEAP32[(1103564)>>2]|0; $6 = Math_imul($5, $2)|0; $7 = (($6) + ($0))|0; $8 = HEAP32[452781]|0; $9 = (($8) + ($7<<1)|0); $10 = HEAP16[$9>>1]|0; $11 = $10 << 16 >> 16; $12 = ($10<<16>>16)==(32767); if ($12) { return; } _ClassicLighting_UpdateLighting($0,$1,$2,$3,$4,$7,$11); $13 = HEAP32[452781]|0; $14 = (($13) + ($7<<1)|0); $15 = HEAP16[$14>>1]|0; $16 = $15 << 16 >> 16; $17 = (($16) + 1)|0; $18 = (($11) + 1)|0; _ClassicLighting_RefreshAffected($0,$1,$2,$4,$18,$17); return; } function _ClassicLighting_Refresh() { var $$04 = 0, $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1103564)>>2]|0; $1 = HEAP32[(1103572)>>2]|0; $2 = Math_imul($1, $0)|0; $3 = ($2|0)>(0); if (!($3)) { return; } $4 = HEAP32[452781]|0; $5 = HEAP32[(1103564)>>2]|0; $6 = HEAP32[(1103572)>>2]|0; $7 = Math_imul($6, $5)|0; $$04 = 0; while(1) { $8 = (($4) + ($$04<<1)|0); HEAP16[$8>>1] = 32767; $9 = (($$04) + 1)|0; $10 = ($9|0)<($7|0); if ($10) { $$04 = $9; } else { break; } } return; } function _ClassicLighting_IsLit($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_ClassicLighting_GetLightHeight($0,$2)|0); $4 = ($3|0)<($1|0); $5 = $4&1; return ($5|0); } function _ClassicLighting_Color($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_World_Contains_1052($0,$1,$2)|0); $4 = ($3<<24>>24)==(0); if ($4) { $5 = HEAP32[(1972204)>>2]|0; $$0 = $5; return ($$0|0); } else { $6 = (_ClassicLighting_GetLightHeight($0,$2)|0); $7 = ($6|0)<($1|0); $8 = HEAP32[(1972204)>>2]|0; $9 = HEAP32[(1972220)>>2]|0; $10 = $7 ? $8 : $9; $$0 = $10; return ($$0|0); } } function _ClassicLighting_Color_XSide($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_World_Contains_1052($0,$1,$2)|0); $4 = ($3<<24>>24)==(0); if ($4) { $5 = HEAP32[(1972208)>>2]|0; $$0 = $5; return ($$0|0); } else { $6 = (_ClassicLighting_GetLightHeight($0,$2)|0); $7 = ($6|0)<($1|0); $8 = HEAP32[(1972208)>>2]|0; $9 = HEAP32[(1972224)>>2]|0; $10 = $7 ? $8 : $9; $$0 = $10; return ($$0|0); } } function _ClassicLighting_IsLit_Fast($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[452781]|0; $4 = HEAP32[(1103564)>>2]|0; $5 = Math_imul($4, $2)|0; $6 = (($5) + ($0))|0; $7 = (($3) + ($6<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = $8 << 16 >> 16; $10 = ($9|0)<($1|0); $11 = $10&1; return ($11|0); } function _ClassicLighting_Color_Sprite_Fast($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[452781]|0; $4 = HEAP32[(1103564)>>2]|0; $5 = Math_imul($4, $2)|0; $6 = (($5) + ($0))|0; $7 = (($3) + ($6<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = $8 << 16 >> 16; $10 = ($9|0)<($1|0); $11 = HEAP32[(1972204)>>2]|0; $12 = HEAP32[(1972220)>>2]|0; $13 = $10 ? $11 : $12; return ($13|0); } function _ClassicLighting_Color_YMax_Fast($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[452781]|0; $4 = HEAP32[(1103564)>>2]|0; $5 = Math_imul($4, $2)|0; $6 = (($5) + ($0))|0; $7 = (($3) + ($6<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = $8 << 16 >> 16; $10 = ($9|0)<($1|0); $11 = HEAP32[(1972204)>>2]|0; $12 = HEAP32[(1972220)>>2]|0; $13 = $10 ? $11 : $12; return ($13|0); } function _ClassicLighting_Color_YMin_Fast($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[452781]|0; $4 = HEAP32[(1103564)>>2]|0; $5 = Math_imul($4, $2)|0; $6 = (($5) + ($0))|0; $7 = (($3) + ($6<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = $8 << 16 >> 16; $10 = ($9|0)<($1|0); $11 = HEAP32[(1972216)>>2]|0; $12 = HEAP32[(1972232)>>2]|0; $13 = $10 ? $11 : $12; return ($13|0); } function _ClassicLighting_Color_XSide_Fast($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[452781]|0; $4 = HEAP32[(1103564)>>2]|0; $5 = Math_imul($4, $2)|0; $6 = (($5) + ($0))|0; $7 = (($3) + ($6<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = $8 << 16 >> 16; $10 = ($9|0)<($1|0); $11 = HEAP32[(1972208)>>2]|0; $12 = HEAP32[(1972224)>>2]|0; $13 = $10 ? $11 : $12; return ($13|0); } function _ClassicLighting_Color_ZSide_Fast($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[452781]|0; $4 = HEAP32[(1103564)>>2]|0; $5 = Math_imul($4, $2)|0; $6 = (($5) + ($0))|0; $7 = (($3) + ($6<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = $8 << 16 >> 16; $10 = ($9|0)<($1|0); $11 = HEAP32[(1972212)>>2]|0; $12 = HEAP32[(1972228)>>2]|0; $13 = $10 ? $11 : $12; return ($13|0); } function _ClassicLighting_FreeState() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[452781]|0; _Mem_Free($0); HEAP32[452781] = 0; return; } function _ClassicLighting_AllocState() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1103564)>>2]|0; $1 = HEAP32[(1103572)>>2]|0; $2 = Math_imul($1, $0)|0; $3 = (_Mem_TryAlloc($2,2)|0); HEAP32[452781] = $3; $4 = ($3|0)==(0|0); if ($4) { _World_OutOfMemory(); return; } else { _ClassicLighting_Refresh(); return; } } function _ClassicLighting_LightHint($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 1296|0; $2 = sp; $3 = ($0|0)>(0); $4 = $3 ? $0 : 0; $5 = HEAP32[(1103564)>>2]|0; $6 = (($0) + 18)|0; $7 = ($5|0)<($6|0); $8 = $7 ? $5 : $6; $9 = ($1|0)>(0); $10 = $9 ? $1 : 0; $11 = HEAP32[(1103572)>>2]|0; $12 = (($1) + 18)|0; $13 = ($11|0)<($12|0); $14 = $13 ? $11 : $12; $15 = (($8) - ($4))|0; $16 = (($14) - ($10))|0; $17 = (_Heightmap_InitialCoverage($4,$10,$15,$16,$2)|0); $18 = (_Heightmap_CalculateCoverage($4,$10,$15,$16,$17,$2)|0); $19 = ($18<<24>>24)==(0); if (!($19)) { STACKTOP = sp;return; } _Heightmap_FinishCoverage($4,$10,$15,$16); STACKTOP = sp;return; } function _Heightmap_InitialCoverage($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$0$lcssa = 0, $$03243 = 0, $$03347 = 0, $$03442 = 0, $$03846 = 0, $$048 = 0, $$1$lcssa = 0, $$13641 = 0, $$139$lcssa = 0, $$13940 = 0, $$144 = 0, $$2 = 0, $$237 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; var $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond54 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = ($3|0)>(0); if (!($5)) { $$0$lcssa = 0; return ($$0$lcssa|0); } $6 = ($2|0)>(0); $7 = HEAP32[452781]|0; $$03347 = 0;$$03846 = 0;$$048 = 0; while(1) { if ($6) { $8 = HEAP32[(1103564)>>2]|0; $9 = (($$03347) + ($1))|0; $10 = Math_imul($8, $9)|0; $11 = (($10) + ($0))|0; $$03243 = $11;$$03442 = 0;$$13641 = 0;$$13940 = $$03846;$$144 = $$048; while(1) { $12 = (($$03243) + 1)|0; $13 = (($7) + ($$03243<<1)|0); $14 = HEAP16[$13>>1]|0; $15 = (($4) + ($$13940<<2)|0); HEAP32[$15>>2] = 0; $16 = ($14<<16>>16)==(32767); if ($16) { $17 = (($$144) + 1)|0; $$2 = $17;$$237 = 0; } else { $18 = (($$13940) - ($$13641))|0; $19 = (($4) + ($18<<2)|0); $20 = HEAP32[$19>>2]|0; $21 = (($20) + 1)|0; HEAP32[$19>>2] = $21; $22 = (($$13641) + 1)|0; $$2 = $$144;$$237 = $22; } $23 = (($$13940) + 1)|0; $24 = (($$03442) + 1)|0; $exitcond = ($24|0)==($2|0); if ($exitcond) { break; } else { $$03243 = $12;$$03442 = $24;$$13641 = $$237;$$13940 = $23;$$144 = $$2; } } $25 = (($$03846) + ($2))|0; $$1$lcssa = $$2;$$139$lcssa = $25; } else { $$1$lcssa = $$048;$$139$lcssa = $$03846; } $26 = (($$03347) + 1)|0; $exitcond54 = ($26|0)==($3|0); if ($exitcond54) { $$0$lcssa = $$1$lcssa; break; } else { $$03347 = $26;$$03846 = $$139$lcssa;$$048 = $$1$lcssa; } } return ($$0$lcssa|0); } function _Heightmap_CalculateCoverage($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$0169219 = 0, $$0171208 = 0, $$0173207 = 0, $$0177211 = 0, $$0179210 = 0, $$0183 = 0, $$0191 = 0, $$0192218 = 0, $$0213 = 0, $$1170244 = 0, $$1172 = 0, $$1174 = 0, $$1178236 = 0, $$1180206 = 0, $$1184 = 0, $$1193$lcssa = 0, $$1193209 = 0, $$1238 = 0, $$2175228 = 0, $$2181 = 0; var $$2187205 = 0, $$2194$lcssa = 0, $$2194204 = 0, $$2229 = 0, $$3 = 0, $$3176 = 0, $$3182235 = 0, $$3188 = 0, $$3195 = 0, $$4196243 = 0, $$4227 = 0, $$5 = 0, $$5197$lcssa = 0, $$5197234 = 0, $$6198$lcssa = 0, $$6198225 = 0, $$6226 = 0, $$7 = 0, $$7199 = 0, $10 = 0; var $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0; var $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0; var $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0; var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0; var $98 = 0, $99 = 0, $exitcond = 0, $exitcond252 = 0, label = 0, sp = 0; sp = STACKTOP; $6 = HEAP32[(1103608)>>2]|0; $7 = ($6|0)<(256); $8 = HEAP32[(1103568)>>2]|0; $9 = (($8) + -1)|0; $10 = ($8|0)>(0); if ($7) { if (!($10)) { $$0191 = 0; return ($$0191|0); } $11 = ($3|0)>(0); $12 = ($2|0)>(0); $13 = HEAP32[452781]|0; $$0169219 = $9;$$0192218 = $4; while(1) { $14 = ($$0192218|0)<(1); if ($14) { $$0191 = 1; label = 34; break; } $15 = HEAP32[(1103564)>>2]|0; if ($11) { $16 = Math_imul($15, $1)|0; $17 = (($16) + ($0))|0; $18 = HEAP32[(1103572)>>2]|0; $19 = Math_imul($18, $$0169219)|0; $20 = (($19) + ($1))|0; $21 = Math_imul($20, $15)|0; $22 = (($21) + ($0))|0; $$0177211 = $17;$$0179210 = $22;$$0213 = 0;$$1193209 = $$0192218; while(1) { if ($12) { $23 = Math_imul($$0213, $2)|0; $$0171208 = 0;$$0173207 = $23;$$1180206 = $$0179210;$$2187205 = 0;$$2194204 = $$1193209; while(1) { $24 = (($5) + ($$0173207<<2)|0); $25 = HEAP32[$24>>2]|0; $26 = (($25) + ($$0171208))|0; $27 = (($25) + ($$1180206))|0; $28 = (($25) + ($$0173207))|0; $29 = ($26|0)<($2|0); if ($29) { $30 = HEAP32[275888]|0; $31 = (($30) + ($27)|0); $32 = HEAP8[$31>>0]|0; $33 = $32&255; $34 = (1107732 + ($33)|0); $35 = HEAP8[$34>>0]|0; $36 = ($35<<24>>24)==(0); if ($36) { $$1172 = $26;$$1174 = $28;$$2181 = $27;$$3188 = 0;$$3195 = $$2194204; } else { $37 = (1120020 + ($33)|0); $38 = HEAP8[$37>>0]|0; $39 = $38&255; $40 = (6)?($39 >>> 6):($39); $41 = $40 & 1; $42 = (($$0169219) - ($41))|0; $43 = $42&65535; $44 = (($26) + ($$0177211))|0; $45 = (($13) + ($44<<1)|0); HEAP16[$45>>1] = $43; $46 = (($$2194204) + -1)|0; $47 = (($5) + ($28<<2)|0); HEAP32[$47>>2] = 0; $48 = (($25) + ($$2187205))|0; $49 = (($28) - ($48))|0; $50 = (($5) + ($49<<2)|0); $51 = HEAP32[$50>>2]|0; $52 = (($51) + 1)|0; $53 = (($26) - ($48))|0; $54 = (($53) + ($52))|0; $55 = ($54|0)<($2|0); if ($55) { $56 = (($52) + ($49))|0; $57 = (($5) + ($56<<2)|0); $58 = HEAP32[$57>>2]|0; $59 = ($58|0)==(0); if ($59) { $$0183 = $52;$64 = 0; } else { $60 = (($58) + ($52))|0; $61 = (($52) + ($49))|0; $62 = (($5) + ($61<<2)|0); HEAP32[$62>>2] = 0; $$0183 = $60;$64 = $58; } } else { $$0183 = $52;$64 = 0; } HEAP32[$50>>2] = $$0183; $63 = (($64) + ($26))|0; $65 = (($64) + ($28))|0; $66 = (($64) + ($27))|0; $$1172 = $63;$$1174 = $65;$$2181 = $66;$$3188 = $$0183;$$3195 = $46; } } else { $$1172 = $26;$$1174 = $28;$$2181 = $27;$$3188 = 0;$$3195 = $$2194204; } $67 = (($$1172) + 1)|0; $68 = (($$2181) + 1)|0; $69 = (($$1174) + 1)|0; $70 = ($67|0)<($2|0); if ($70) { $$0171208 = $67;$$0173207 = $69;$$1180206 = $68;$$2187205 = $$3188;$$2194204 = $$3195; } else { $$2194$lcssa = $$3195; break; } } } else { $$2194$lcssa = $$1193209; } $71 = HEAP32[(1103564)>>2]|0; $72 = (($71) + ($$0177211))|0; $73 = (($71) + ($$0179210))|0; $74 = (($$0213) + 1)|0; $exitcond = ($74|0)==($3|0); if ($exitcond) { $$1193$lcssa = $$2194$lcssa; break; } else { $$0177211 = $72;$$0179210 = $73;$$0213 = $74;$$1193209 = $$2194$lcssa; } } } else { $$1193$lcssa = $$0192218; } $75 = (($$0169219) + -1)|0; $76 = ($$0169219|0)>(0); if ($76) { $$0169219 = $75;$$0192218 = $$1193$lcssa; } else { $$0191 = 0; label = 34; break; } } if ((label|0) == 34) { return ($$0191|0); } } else { if (!($10)) { $$0191 = 0; return ($$0191|0); } $77 = ($3|0)>(0); $78 = ($2|0)>(0); $79 = HEAP32[452781]|0; $$1170244 = $9;$$4196243 = $4; while(1) { $80 = ($$4196243|0)<(1); if ($80) { $$0191 = 1; label = 34; break; } $81 = HEAP32[(1103564)>>2]|0; if ($77) { $82 = Math_imul($81, $1)|0; $83 = (($82) + ($0))|0; $84 = HEAP32[(1103572)>>2]|0; $85 = Math_imul($84, $$1170244)|0; $86 = (($85) + ($1))|0; $87 = Math_imul($86, $81)|0; $88 = (($87) + ($0))|0; $$1178236 = $83;$$1238 = 0;$$3182235 = $88;$$5197234 = $$4196243; while(1) { if ($78) { $89 = Math_imul($$1238, $2)|0; $$2175228 = $89;$$2229 = 0;$$4227 = $$3182235;$$6198225 = $$5197234;$$6226 = 0; while(1) { $90 = (($5) + ($$2175228<<2)|0); $91 = HEAP32[$90>>2]|0; $92 = (($91) + ($$2229))|0; $93 = (($91) + ($$4227))|0; $94 = (($91) + ($$2175228))|0; $95 = ($92|0)<($2|0); if ($95) { $96 = HEAP32[275888]|0; $97 = (($96) + ($93)|0); $98 = HEAP8[$97>>0]|0; $99 = $98&255; $100 = HEAP32[(1103556)>>2]|0; $101 = (($100) + ($93)|0); $102 = HEAP8[$101>>0]|0; $103 = $102&255; $104 = $103 << 8; $105 = $104 | $99; $106 = (1107732 + ($105)|0); $107 = HEAP8[$106>>0]|0; $108 = ($107<<24>>24)==(0); if ($108) { $$3 = $92;$$3176 = $94;$$5 = $93;$$7 = 0;$$7199 = $$6198225; } else { $109 = (1120020 + ($105)|0); $110 = HEAP8[$109>>0]|0; $111 = $110&255; $112 = (6)?($111 >>> 6):($111); $113 = $112 & 1; $114 = (($$1170244) - ($113))|0; $115 = $114&65535; $116 = (($92) + ($$1178236))|0; $117 = (($79) + ($116<<1)|0); HEAP16[$117>>1] = $115; $118 = (($$6198225) + -1)|0; $119 = (($5) + ($94<<2)|0); HEAP32[$119>>2] = 0; $120 = (($91) + ($$6226))|0; $121 = (($94) - ($120))|0; $122 = (($5) + ($121<<2)|0); $123 = HEAP32[$122>>2]|0; $124 = (($123) + 1)|0; $125 = (($92) - ($120))|0; $126 = (($125) + ($124))|0; $127 = ($126|0)<($2|0); if ($127) { $128 = (($124) + ($121))|0; $129 = (($5) + ($128<<2)|0); $130 = HEAP32[$129>>2]|0; $131 = ($130|0)==(0); if ($131) { $$1184 = $124;$136 = 0; } else { $132 = (($130) + ($124))|0; $133 = (($124) + ($121))|0; $134 = (($5) + ($133<<2)|0); HEAP32[$134>>2] = 0; $$1184 = $132;$136 = $130; } } else { $$1184 = $124;$136 = 0; } HEAP32[$122>>2] = $$1184; $135 = (($136) + ($92))|0; $137 = (($136) + ($94))|0; $138 = (($136) + ($93))|0; $$3 = $135;$$3176 = $137;$$5 = $138;$$7 = $$1184;$$7199 = $118; } } else { $$3 = $92;$$3176 = $94;$$5 = $93;$$7 = 0;$$7199 = $$6198225; } $139 = (($$3) + 1)|0; $140 = (($$5) + 1)|0; $141 = (($$3176) + 1)|0; $142 = ($139|0)<($2|0); if ($142) { $$2175228 = $141;$$2229 = $139;$$4227 = $140;$$6198225 = $$7199;$$6226 = $$7; } else { $$6198$lcssa = $$7199; break; } } } else { $$6198$lcssa = $$5197234; } $143 = HEAP32[(1103564)>>2]|0; $144 = (($143) + ($$1178236))|0; $145 = (($143) + ($$3182235))|0; $146 = (($$1238) + 1)|0; $exitcond252 = ($146|0)==($3|0); if ($exitcond252) { $$5197$lcssa = $$6198$lcssa; break; } else { $$1178236 = $144;$$1238 = $146;$$3182235 = $145;$$5197234 = $$6198$lcssa; } } } else { $$5197$lcssa = $$4196243; } $147 = (($$1170244) + -1)|0; $148 = ($$1170244|0)>(0); if ($148) { $$1170244 = $147;$$4196243 = $$5197$lcssa; } else { $$0191 = 0; label = 34; break; } } if ((label|0) == 34) { return ($$0191|0); } } return (0)|0; } function _Heightmap_FinishCoverage($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$02022 = 0, $$02124 = 0, $$023 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond28 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($3|0)>(0); if (!($4)) { return; } $5 = HEAP32[(1103564)>>2]|0; $6 = ($2|0)>(0); $7 = HEAP32[452781]|0; $$02124 = 0; while(1) { if ($6) { $8 = (($$02124) + ($1))|0; $9 = Math_imul($5, $8)|0; $10 = (($9) + ($0))|0; $$02022 = $10;$$023 = 0; while(1) { $11 = (($7) + ($$02022<<1)|0); $12 = HEAP16[$11>>1]|0; $13 = ($12<<16>>16)==(32767); if ($13) { HEAP16[$11>>1] = -10; } $14 = (($$023) + 1)|0; $15 = (($$02022) + 1)|0; $exitcond = ($14|0)==($2|0); if ($exitcond) { break; } else { $$02022 = $15;$$023 = $14; } } } $16 = (($$02124) + 1)|0; $exitcond28 = ($16|0)==($3|0); if ($exitcond28) { break; } else { $$02124 = $16; } } return; } function _World_Contains_1052($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1103564)>>2]|0; $4 = ($3>>>0)>($0>>>0); $5 = HEAP32[(1103568)>>2]|0; $6 = ($5>>>0)>($1>>>0); $or$cond = $4 & $6; $7 = HEAP32[(1103572)>>2]|0; $8 = ($7>>>0)>($2>>>0); $narrow = $or$cond & $8; $9 = $narrow&1; return ($9|0); } function _ClassicLighting_GetLightHeight($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = Math_imul($2, $1)|0; $4 = (($3) + ($0))|0; $5 = HEAP32[452781]|0; $6 = (($5) + ($4<<1)|0); $7 = HEAP16[$6>>1]|0; $8 = ($7<<16>>16)==(32767); if ($8) { $9 = HEAP32[(1103568)>>2]|0; $10 = (($9) + -1)|0; $11 = (_ClassicLighting_CalcHeightAt($0,$10,$1,$4)|0); $13 = $11; return ($13|0); } else { $12 = $7 << 16 >> 16; $13 = $12; return ($13|0); } } function _ClassicLighting_CalcHeightAt($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$03643 = 0, $$038 = 0, $$044 = 0, $$13746 = 0, $$147 = 0, $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[(1103572)>>2]|0; $5 = Math_imul($4, $1)|0; $6 = (($5) + ($2))|0; $7 = HEAP32[(1103564)>>2]|0; $8 = Math_imul($6, $7)|0; $9 = (($8) + ($0))|0; $10 = HEAP32[(1103608)>>2]|0; $11 = ($10|0)<(256); $12 = ($1|0)>(-1); L1: do { if ($11) { if ($12) { $13 = HEAP32[275888]|0; $14 = HEAP32[(1103588)>>2]|0; $$03643 = $9;$$044 = $1; while(1) { $15 = (($13) + ($$03643)|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = (1107732 + ($17)|0); $19 = HEAP8[$18>>0]|0; $20 = ($19<<24>>24)==(0); if (!($20)) { break; } $29 = (($$044) + -1)|0; $30 = (($$03643) - ($14))|0; $31 = ($$044|0)>(0); if ($31) { $$03643 = $30;$$044 = $29; } else { $$038 = -10;$$sink = -10; break L1; } } $21 = $16&255; $22 = (1120020 + ($21)|0); $23 = HEAP8[$22>>0]|0; $24 = $23&255; $25 = (6)?($24 >>> 6):($24); $26 = $25 & 1; $27 = (($$044) - ($26))|0; $28 = $27&65535; $$038 = $27;$$sink = $28; } else { $$038 = -10;$$sink = -10; } } else { if ($12) { $32 = HEAP32[275888]|0; $33 = HEAP32[(1103556)>>2]|0; $34 = HEAP32[(1103588)>>2]|0; $$13746 = $9;$$147 = $1; while(1) { $35 = (($32) + ($$13746)|0); $36 = HEAP8[$35>>0]|0; $37 = $36&255; $38 = (($33) + ($$13746)|0); $39 = HEAP8[$38>>0]|0; $40 = $39&255; $41 = $40 << 8; $42 = $41 | $37; $43 = (1107732 + ($42)|0); $44 = HEAP8[$43>>0]|0; $45 = ($44<<24>>24)==(0); if (!($45)) { break; } $53 = (($$147) + -1)|0; $54 = (($$13746) - ($34))|0; $55 = ($$147|0)>(0); if ($55) { $$13746 = $54;$$147 = $53; } else { $$038 = -10;$$sink = -10; break L1; } } $46 = (1120020 + ($42)|0); $47 = HEAP8[$46>>0]|0; $48 = $47&255; $49 = (6)?($48 >>> 6):($48); $50 = $49 & 1; $51 = (($$147) - ($50))|0; $52 = $51&65535; $$038 = $51;$$sink = $52; } else { $$038 = -10;$$sink = -10; } } } while(0); $56 = HEAP32[452781]|0; $57 = (($56) + ($3<<1)|0); HEAP16[$57>>1] = $$sink; return ($$038|0); } function _ClassicLighting_UpdateLighting($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $7 = 0; var $8 = 0, $9 = 0, $or$cond = 0, $or$cond42 = 0, label = 0, sp = 0; sp = STACKTOP; $7 = $3&65535; $8 = (1107732 + ($7)|0); $9 = HEAP8[$8>>0]|0; $10 = $4&65535; $11 = (1107732 + ($10)|0); $12 = HEAP8[$11>>0]|0; $13 = (1120020 + ($7)|0); $14 = HEAP8[$13>>0]|0; $15 = $14&255; $16 = (6)?($15 >>> 6):($15); $17 = $16 & 1; $18 = (1120020 + ($10)|0); $19 = HEAP8[$18>>0]|0; $20 = $19&255; $21 = (6)?($20 >>> 6):($20); $22 = $21 & 1; $23 = ($9<<24>>24)==($12<<24>>24); if ($23) { $24 = ($9<<24>>24)==(0); $25 = ($17|0)==($22|0); $or$cond42 = $24 | $25; if ($or$cond42) { return; } } $26 = (($1) - ($22))|0; $27 = ($26|0)<($6|0); if (!($27)) { $28 = ($12<<24>>24)==(0); if ($28) { (_ClassicLighting_CalcHeightAt($0,$1,$2,$5)|0); return; } else { $29 = $26&65535; $30 = HEAP32[452781]|0; $31 = (($30) + ($5<<1)|0); HEAP16[$31>>1] = $29; return; } } $32 = ($1|0)==($6|0); $33 = ($17|0)==(0); $or$cond = $32 & $33; if (!($or$cond)) { return; } $34 = HEAP32[(1103568)>>2]|0; $35 = (($34) + -1)|0; $36 = ($35|0)==($1|0); if ($36) { $40 = 0; } else { $37 = (($1) + 1)|0; $38 = (_World_GetBlock_1053($0,$37,$2)|0); $40 = $38; } $39 = $40&65535; $41 = (1107732 + ($39)|0); $42 = HEAP8[$41>>0]|0; $43 = ($42<<24>>24)==(0); if (!($43)) { return; } $44 = ($12<<24>>24)==(0); if ($44) { $48 = (($1) + -1)|0; (_ClassicLighting_CalcHeightAt($0,$48,$2,$5)|0); return; } else { $45 = $26&65535; $46 = HEAP32[452781]|0; $47 = (($46) + ($5<<1)|0); HEAP16[$47>>1] = $45; return; } } function _ClassicLighting_RefreshAffected($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0; var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, label = 0, sp = 0; sp = STACKTOP; $6 = (4)?($0 >> 4):($0); $7 = $0 & 15; $8 = (4)?($1 >> 4):($1); $9 = $1 & 15; $10 = (4)?($2 >> 4):($2); $11 = $2 & 15; $12 = ($5|0)<(0); $13 = (4)?($5 >> 4):($5); $14 = $12 ? 0 : $13; $15 = ($4|0)<(0); $16 = (4)?($4 >> 4):($4); $17 = $15 ? 0 : $16; $18 = ($17|0)<($14|0); $19 = $18 ? $17 : $14; $20 = ($17|0)>($14|0); $21 = $20 ? $17 : $14; _ClassicLighting_ResetColumn($6,$8,$10,$19,$21); $22 = ($7|0)==(0); $23 = ($0|0)>(15); $or$cond = $23 & $22; if ($or$cond) { $24 = (($6) + -1)|0; $25 = (($0) + -1)|0; _ClassicLighting_ResetNeighbour($25,$1,$2,$3,$24,$8,$10,$19,$21); } $26 = ($9|0)==(0); $27 = ($1|0)>(15); $or$cond3 = $27 & $26; if ($or$cond3) { $28 = (($1) + -1)|0; $29 = (_World_GetBlock_1053($0,$28,$2)|0); $30 = (_ClassicLighting_Needs($3,$29)|0); $31 = ($30<<24>>24)==(0); if (!($31)) { $32 = (($8) + -1)|0; _MapRenderer_RefreshChunk($6,$32,$10); } } $33 = ($11|0)==(0); $34 = ($2|0)>(15); $or$cond5 = $34 & $33; if ($or$cond5) { $35 = (($10) + -1)|0; $36 = (($2) + -1)|0; _ClassicLighting_ResetNeighbour($0,$1,$36,$3,$6,$8,$35,$19,$21); } $37 = ($7|0)==(15); if ($37) { $38 = HEAP32[(1103632)>>2]|0; $39 = (($38) + -1)|0; $40 = ($6|0)<($39|0); if ($40) { $41 = (($6) + 1)|0; $42 = (($0) + 1)|0; _ClassicLighting_ResetNeighbour($42,$1,$2,$3,$41,$8,$10,$19,$21); } } $43 = ($9|0)==(15); if ($43) { $44 = HEAP32[(1103636)>>2]|0; $45 = (($44) + -1)|0; $46 = ($8|0)<($45|0); if ($46) { $47 = (($1) + 1)|0; $48 = (_World_GetBlock_1053($0,$47,$2)|0); $49 = (_ClassicLighting_Needs($3,$48)|0); $50 = ($49<<24>>24)==(0); if (!($50)) { $51 = (($8) + 1)|0; _MapRenderer_RefreshChunk($6,$51,$10); } } } $52 = ($11|0)==(15); if (!($52)) { return; } $53 = HEAP32[(1103640)>>2]|0; $54 = (($53) + -1)|0; $55 = ($10|0)<($54|0); if (!($55)) { return; } $56 = (($10) + 1)|0; $57 = (($2) + 1)|0; _ClassicLighting_ResetNeighbour($0,$1,$57,$3,$6,$8,$56,$19,$21); return; } function _ClassicLighting_ResetColumn($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$012 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = ($3|0)==($4|0); if ($5) { _MapRenderer_RefreshChunk($0,$1,$2); return; } $6 = ($4|0)<($3|0); if ($6) { return; } $$012 = $4; while(1) { _MapRenderer_RefreshChunk($0,$$012,$2); $7 = (($$012) + -1)|0; $8 = ($$012|0)>($3|0); if ($8) { $$012 = $7; } else { break; } } return; } function _ClassicLighting_ResetNeighbour($0,$1,$2,$3,$4,$5,$6,$7,$8) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; $7 = $7|0; $8 = $8|0; var $$03334 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $9 = ($7|0)==($8|0); if ($9) { $10 = $5 << 4; $11 = HEAP32[(1103572)>>2]|0; $12 = Math_imul($11, $1)|0; $13 = (($12) + ($2))|0; $14 = HEAP32[(1103564)>>2]|0; $15 = Math_imul($13, $14)|0; $16 = (($15) + ($0))|0; $17 = (_ClassicLighting_NeedsNeighour($3,$16,$10,$1,$1)|0); $18 = ($17<<24>>24)==(0); if ($18) { return; } _MapRenderer_RefreshChunk($4,$5,$6); return; } $19 = ($8|0)<($7|0); if ($19) { return; } $$03334 = $8; while(1) { $20 = $$03334 << 4; $21 = $20 | 15; $22 = HEAP32[(1103580)>>2]|0; $23 = ($21|0)>($22|0); $spec$select = $23 ? $22 : $21; $24 = HEAP32[(1103572)>>2]|0; $25 = Math_imul($spec$select, $24)|0; $26 = (($25) + ($2))|0; $27 = HEAP32[(1103564)>>2]|0; $28 = Math_imul($26, $27)|0; $29 = (($28) + ($0))|0; $30 = (_ClassicLighting_NeedsNeighour($3,$29,$20,$spec$select,$1)|0); $31 = ($30<<24>>24)==(0); if (!($31)) { _MapRenderer_RefreshChunk($4,$$03334,$6); } $32 = (($$03334) + -1)|0; $33 = ($$03334|0)>($7|0); if ($33) { $$03334 = $32; } else { break; } } return; } function _World_GetBlock_1053($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $3 = HEAP32[(1103572)>>2]|0; $4 = Math_imul($3, $1)|0; $5 = (($4) + ($2))|0; $6 = HEAP32[(1103564)>>2]|0; $7 = Math_imul($5, $6)|0; $8 = (($7) + ($0))|0; $9 = HEAP32[275888]|0; $10 = (($9) + ($8)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = HEAP32[(1103556)>>2]|0; $14 = (($13) + ($8)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 8; $18 = $17 | $12; $19 = HEAP32[(1103608)>>2]|0; $20 = $18 & $19; $21 = $20&65535; return ($21|0); } function _ClassicLighting_Needs($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0&65535; $3 = (1120788 + ($2)|0); $4 = HEAP8[$3>>0]|0; $5 = ($4<<24>>24)==(0); if (!($5)) { $10 = 1; return ($10|0); } $6 = $1&65535; $7 = (1120788 + ($6)|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)!=(4); $phitmp = $9&1; $10 = $phitmp; return ($10|0); } function _ClassicLighting_NeedsNeighour($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$0 = 0, $$02531 = 0, $$02630 = 0, $$12734 = 0, $$135 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = HEAP32[(1103608)>>2]|0; $6 = ($5|0)<(256); $7 = ($3|0)<($2|0); if ($6) { if ($7) { $$0 = 0; return ($$0|0); } $8 = HEAP32[275888]|0; $9 = HEAP32[(1103588)>>2]|0; $$02531 = $3;$$02630 = $1; while(1) { $10 = (($8) + ($$02630)|0); $11 = HEAP8[$10>>0]|0; $12 = ($$02531|0)==($4|0); if ($12) { $13 = $11&255; $14 = (_ClassicLighting_Needs($0,$13)|0); $15 = $14&255; $21 = $15; } else { $16 = $11&255; $17 = (1120788 + ($16)|0); $18 = HEAP8[$17>>0]|0; $19 = ($18<<24>>24)!=(4); $20 = $19&1; $21 = $20; } $22 = ($21|0)==(0); if (!($22)) { $$0 = 1; label = 16; break; } $23 = (($$02531) + -1)|0; $24 = (($$02630) - ($9))|0; $25 = ($$02531|0)>($2|0); if ($25) { $$02531 = $23;$$02630 = $24; } else { $$0 = 0; label = 16; break; } } if ((label|0) == 16) { return ($$0|0); } } else { if ($7) { $$0 = 0; return ($$0|0); } $26 = HEAP32[275888]|0; $27 = HEAP32[(1103556)>>2]|0; $28 = HEAP32[(1103588)>>2]|0; $$12734 = $1;$$135 = $3; while(1) { $29 = (($26) + ($$12734)|0); $30 = HEAP8[$29>>0]|0; $31 = $30&255; $32 = (($27) + ($$12734)|0); $33 = HEAP8[$32>>0]|0; $34 = $33&255; $35 = $34 << 8; $36 = $35 | $31; $37 = ($$135|0)==($4|0); if ($37) { $38 = $36&65535; $39 = (_ClassicLighting_Needs($0,$38)|0); $40 = $39&255; $45 = $40; } else { $41 = (1120788 + ($36)|0); $42 = HEAP8[$41>>0]|0; $43 = ($42<<24>>24)!=(4); $44 = $43&1; $45 = $44; } $46 = ($45|0)==(0); if (!($46)) { $$0 = 1; label = 16; break; } $47 = (($$135) + -1)|0; $48 = (($$12734) - ($28))|0; $49 = ($$135|0)>($2|0); if ($49) { $$12734 = $48;$$135 = $47; } else { $$0 = 0; label = 16; break; } } if ((label|0) == 16) { return ($$0|0); } } return (0)|0; } function _Logger_DialogWarn($0) { $0 = $0|0; var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 528|0; $1 = sp + 512|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 511; _String_Copy($1,$0); $5 = HEAP32[$1>>2]|0; $6 = HEAP16[$3>>1]|0; $7 = $6&65535; $8 = (($5) + ($7)|0); HEAP8[$8>>0] = 0; $9 = HEAP32[3700]|0; $10 = HEAP32[$1>>2]|0; _Window_ShowDialog($9,$10); STACKTOP = sp;return; } function _Logger_FormatWarn($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp; HEAP32[$4>>2] = $1; $5 = ($1>>>0)<(20000); $6 = $5 ? 33746 : 33763; _String_Format2($0,$6,$4,$2); $7 = HEAP32[$4>>2]|0; _AppendErrorDesc($0,$7,$3); STACKTOP = sp;return; } function _AppendErrorDesc($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 144|0; $3 = sp + 128|0; $4 = sp; HEAP32[$3>>2] = $4; $5 = ((($3)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($3)) + 6|0); HEAP16[$6>>1] = 128; $7 = (_GetCCErrorDesc($1)|0); $8 = ($7|0)==(0|0); if (!($8)) { _String_Format1($0,33780,$7); STACKTOP = sp;return; } $9 = (FUNCTION_TABLE_iii[$2 & 127]($1,$3)|0); $10 = ($9<<24>>24)==(0); if ($10) { STACKTOP = sp;return; } _String_Format1($0,33801,$3); STACKTOP = sp;return; } function _GetCCErrorDesc($0) { $0 = $0|0; var $$0 = 0, label = 0, sp = 0; sp = STACKTOP; do { switch ($0|0) { case -857812991: { $$0 = 34636; break; } case -857812990: { $$0 = 34612; break; } case -857812989: { $$0 = 34595; break; } case -857812988: { $$0 = 45698; break; } case -857812987: { $$0 = 34564; break; } case -857812986: { $$0 = 34537; break; } case -857812982: { $$0 = 34503; break; } case -857812985: { $$0 = 34472; break; } case -857812984: { $$0 = 34455; break; } case -857812983: { $$0 = 34426; break; } case -857812947: { $$0 = 34380; break; } case -857812961: { $$0 = 34354; break; } case -857812960: { $$0 = 34330; break; } case -857812959: { $$0 = 34311; break; } case -857812958: { $$0 = 34292; break; } case -857812954: { $$0 = 34264; break; } case -857812950: { $$0 = 34238; break; } case -857812949: { $$0 = 34222; break; } case -857812948: { $$0 = 34196; break; } case -857812912: { $$0 = 34175; break; } case -857812911: { $$0 = 34154; break; } case -857812910: { $$0 = 34134; break; } case -857812900: { $$0 = 34093; break; } case -857812899: { $$0 = 34058; break; } case -857812898: { $$0 = 34025; break; } case -857812897: { $$0 = 33994; break; } case -857812896: { $$0 = 33972; break; } case -857812895: { $$0 = 33949; break; } case -857812894: { $$0 = 33926; break; } case -857812893: { $$0 = 33901; break; } case -857812892: { $$0 = 33877; break; } case -857812891: { $$0 = 33850; break; } case -857812890: { $$0 = 33822; break; } default: { $$0 = 0; } } } while(0); return ($$0|0); } function _Logger_FormatWarn2($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $5 = sp; HEAP32[$5>>2] = $1; $6 = ($1>>>0)<(20000); $7 = $6 ? 34650 : 34672; _String_Format3($0,$7,$5,$2,$3); $8 = HEAP32[$5>>2]|0; _AppendErrorDesc($0,$8,$4); STACKTOP = sp;return; } function _Logger_SimpleWarn($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Logger_Warn($0,$1,52); return; } function _DescribeSimple($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _Logger_Warn($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $3 = sp + 256|0; $4 = sp; HEAP32[$3>>2] = $4; $5 = ((($3)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($3)) + 6|0); HEAP16[$6>>1] = 256; _Logger_FormatWarn($3,$0,$1,$2); $7 = HEAP32[3701]|0; FUNCTION_TABLE_vi[$7 & 511]($3); STACKTOP = sp;return; } function _Logger_SimpleWarn2($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _Logger_Warn2($0,$1,$2,52); return; } function _Logger_Warn2($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $4 = sp + 256|0; $5 = sp; HEAP32[$4>>2] = $5; $6 = ((($4)) + 4|0); HEAP16[$6>>1] = 0; $7 = ((($4)) + 6|0); HEAP16[$7>>1] = 256; _Logger_FormatWarn2($4,$0,$1,$2,$3); $8 = HEAP32[3701]|0; FUNCTION_TABLE_vi[$8 & 511]($4); STACKTOP = sp;return; } function _Logger_SysWarn($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Logger_Warn($0,$1,51); return; } function _Logger_SysWarn2($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _Logger_Warn2($0,$1,$2,51); return; } function _Logger_Hook() { var label = 0, sp = 0; sp = STACKTOP; return; } function _Logger_Abort2($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _AbortCommon($0,$1); return; } function _AbortCommon($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 3088|0; $2 = sp + 3072|0; $3 = sp + 3080|0; $4 = sp; HEAP32[$2>>2] = $0; HEAP32[$3>>2] = $4; $5 = ((($3)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($3)) + 6|0); HEAP16[$6>>1] = 3070; _String_AppendConst($3,34694); $7 = ($1|0)==(0|0); if (!($7)) { _String_Format1($3,34715,$1); } $8 = HEAP32[$2>>2]|0; $9 = ($8|0)==(0); if ($9) { HEAP32[$2>>2] = 1; } else { _String_Format1($3,34727,$2); } _Logger_Log($3); _String_AppendConst($3,34731); _String_AppendConst($3,34792); _Logger_Log(14808); $10 = HEAP32[$3>>2]|0; $11 = HEAP16[$5>>1]|0; $12 = $11&65535; $13 = (($10) + ($12)|0); HEAP8[$13>>0] = 0; $14 = HEAP32[$3>>2]|0; _Window_ShowDialog(34862,$14); $15 = HEAP32[$2>>2]|0; _Process_Exit($15); STACKTOP = sp;return; } function _Logger_Log($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[$0>>2]|0; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = $3&65535; _Platform_Log($1,$4); return; } function _Logger_Abort($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Logger_Abort2(0,$0); return; } function _OnInit_1122() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; _Event_Register(1791968,0,342); _Event_Register((1796388),0,117); _Event_Register((1795348),0,343); _Event_Register(1792748,0,344); _Event_Register((1793268),0,344); _Event_Register((1793528),0,345); _Event_Register((1793788),0,346); HEAP32[452782] = 87; _IVec3_MaxValue_1135($0); ;HEAP32[1811172>>2]=HEAP32[$0>>2]|0;HEAP32[1811172+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[1811172+8>>2]=HEAP32[$0+8>>2]|0; $1 = (_Options_GetInt(34966,4,1024,30)|0); HEAP32[452796] = $1; _CalcViewDists(); STACKTOP = sp;return; } function _OnNewMap() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; HEAP32[(1085000)>>2] = 0; _DeleteChunks(); _ResetPartCounts(); _IVec3_MaxValue_1135($0); ;HEAP32[1811172>>2]=HEAP32[$0>>2]|0;HEAP32[1811172+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[1811172+8>>2]=HEAP32[$0+8>>2]|0; _FreeChunks(); _FreeParts(); STACKTOP = sp;return; } function _OnNewMapLoaded_1123() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; $1 = HEAP32[(1103644)>>2]|0; HEAP32[452783] = $1; _FreeChunks(); _FreeParts(); _AllocateChunks(); _AllocateParts(); _InitChunks(); _Vec3_BigPos_1124($0); ;HEAP32[1811136>>2]=HEAP32[$0>>2]|0;HEAP32[1811136+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[1811136+8>>2]=HEAP32[$0+8>>2]|0; STACKTOP = sp;return; } function _FreeChunks() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[452787]|0; _Mem_Free($0); $1 = HEAP32[452788]|0; _Mem_Free($1); $2 = HEAP32[452789]|0; _Mem_Free($2); $3 = HEAP32[452790]|0; _Mem_Free($3); HEAP32[452787] = 0; HEAP32[452788] = 0; HEAP32[452789] = 0; HEAP32[452790] = 0; return; } function _FreeParts() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[452791]|0; _Mem_Free($0); HEAP32[452791] = 0; HEAP32[452792] = 0; return; } function _AllocateChunks() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[452783]|0; $1 = (_Mem_Alloc($0,20,34903)|0); HEAP32[452787] = $1; $2 = HEAP32[452783]|0; $3 = (_Mem_Alloc($2,4,34914)|0); HEAP32[452788] = $3; $4 = HEAP32[452783]|0; $5 = (_Mem_Alloc($4,4,34932)|0); HEAP32[452789] = $5; $6 = HEAP32[452783]|0; $7 = (_Mem_Alloc($6,4,34950)|0); HEAP32[452790] = $7; return; } function _AllocateParts() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[452783]|0; $1 = HEAP32[452782]|0; $2 = Math_imul($1, $0)|0; $3 = $2 << 1; $4 = (_Mem_AllocCleared($3,20,34891)|0); HEAP32[452791] = $4; $5 = (($4) + (($2*20)|0)|0); HEAP32[452792] = $5; return; } function _InitChunks() { var $$02334 = 0, $$02428 = 0, $$02526 = 0, $$035 = 0, $$1$lcssa = 0, $$129 = 0, $$2$lcssa = 0, $$227 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1103572)>>2]|0; $1 = ($0|0)>(0); if (!($1)) { return; } $$02334 = 0;$$035 = 0; while(1) { $2 = HEAP32[(1103568)>>2]|0; $3 = ($2|0)>(0); if ($3) { $$02428 = 0;$$129 = $$035; while(1) { $4 = HEAP32[(1103564)>>2]|0; $5 = ($4|0)>(0); if ($5) { $$02526 = 0;$$227 = $$129; while(1) { $6 = HEAP32[452787]|0; $7 = (($6) + (($$227*20)|0)|0); _ChunkInfo_Reset($7,$$02526,$$02428,$$02334); $8 = HEAP32[452787]|0; $9 = (($8) + (($$227*20)|0)|0); $10 = HEAP32[452788]|0; $11 = (($10) + ($$227<<2)|0); HEAP32[$11>>2] = $9; $12 = HEAP32[452789]|0; $13 = (($12) + ($$227<<2)|0); HEAP32[$13>>2] = $9; $14 = HEAP32[452790]|0; $15 = (($14) + ($$227<<2)|0); HEAP32[$15>>2] = 0; $16 = (($$227) + 1)|0; $17 = (($$02526) + 16)|0; $18 = HEAP32[(1103564)>>2]|0; $19 = ($17|0)<($18|0); if ($19) { $$02526 = $17;$$227 = $16; } else { $$2$lcssa = $16; break; } } } else { $$2$lcssa = $$129; } $20 = (($$02428) + 16)|0; $21 = HEAP32[(1103568)>>2]|0; $22 = ($20|0)<($21|0); if ($22) { $$02428 = $20;$$129 = $$2$lcssa; } else { $$1$lcssa = $$2$lcssa; break; } } } else { $$1$lcssa = $$035; } $23 = (($$02334) + 16)|0; $24 = HEAP32[(1103572)>>2]|0; $25 = ($23|0)<($24|0); if ($25) { $$02334 = $23;$$035 = $$1$lcssa; } else { break; } } return; } function _Vec3_BigPos_1124($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; ;HEAP32[$0>>2]=HEAP32[14840>>2]|0;HEAP32[$0+4>>2]=HEAP32[14840+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[14840+8>>2]|0; return; } function _ChunkInfo_Reset($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (($1) + 8)|0; $5 = $4&65535; HEAP16[$0>>1] = $5; $6 = (($2) + 8)|0; $7 = $6&65535; $8 = ((($0)) + 2|0); HEAP16[$8>>1] = $7; $9 = (($3) + 8)|0; $10 = $9&65535; $11 = ((($0)) + 4|0); HEAP16[$11>>1] = $10; $12 = ((($0)) + 8|0); HEAP32[$12>>2] = 0; $13 = ((($0)) + 6|0); $14 = HEAP8[$13>>0]|0; $15 = $14 & -16; $16 = $15 | 1; HEAP8[$13>>0] = $16; $17 = ((($0)) + 7|0); $18 = HEAP8[$17>>0]|0; $19 = $18 & -64; HEAP8[$17>>0] = $19; $20 = ((($0)) + 12|0); HEAP32[$20>>2] = 0; $21 = ((($0)) + 16|0); HEAP32[$21>>2] = 0; return; } function _DeleteChunks() { var $$04 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[452787]|0; $1 = ($0|0)==(0|0); if ($1) { return; } $2 = HEAP32[452783]|0; $3 = ($2|0)>(0); if ($3) { $$04 = 0; while(1) { $4 = HEAP32[452787]|0; $5 = (($4) + (($$04*20)|0)|0); _DeleteChunk($5); $6 = (($$04) + 1)|0; $7 = HEAP32[452783]|0; $8 = ($6|0)<($7|0); if ($8) { $$04 = $6; } else { break; } } } _ResetPartCounts(); return; } function _ResetPartCounts() { var label = 0, sp = 0; sp = STACKTOP; _memset((393616|0),0,2048)|0; _memset((395664|0),0,2048)|0; return; } function _IVec3_MaxValue_1135($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; ;HEAP32[$0>>2]=HEAP32[14852>>2]|0;HEAP32[$0+4>>2]=HEAP32[14852+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[14852+8>>2]|0; return; } function _DeleteChunk($0) { $0 = $0|0; var $$02125 = 0, $$026 = 0, $$12223 = 0, $$124 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 8|0); _Gfx_DeleteVb($1); $2 = ((($0)) + 6|0); $3 = HEAP8[$2>>0]|0; $4 = $3 & -11; HEAP8[$2>>0] = $4; $5 = ((($0)) + 12|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(0|0); if (!($7)) { $8 = HEAP32[452782]|0; $9 = ($8|0)>(0); if ($9) { $10 = HEAP32[452783]|0; $11 = HEAP32[452782]|0; $$02125 = $6;$$026 = 0; while(1) { $12 = HEAP32[$$02125>>2]|0; $13 = ($12|0)<(0); $14 = (393616 + ($$026<<2)|0); if (!($13)) { $15 = HEAP32[$14>>2]|0; $16 = (($15) + -1)|0; HEAP32[$14>>2] = $16; } $17 = (($$026) + 1)|0; $18 = (($$02125) + (($10*20)|0)|0); $19 = ($17|0)<($11|0); if ($19) { $$02125 = $18;$$026 = $17; } else { break; } } } HEAP32[$5>>2] = 0; } $20 = ((($0)) + 16|0); $21 = HEAP32[$20>>2]|0; $22 = ($21|0)==(0|0); if ($22) { return; } $23 = HEAP32[452782]|0; $24 = ($23|0)>(0); if ($24) { $25 = HEAP32[452783]|0; $26 = HEAP32[452782]|0; $$12223 = $21;$$124 = 0; while(1) { $27 = HEAP32[$$12223>>2]|0; $28 = ($27|0)<(0); $29 = (395664 + ($$124<<2)|0); if (!($28)) { $30 = HEAP32[$29>>2]|0; $31 = (($30) + -1)|0; HEAP32[$29>>2] = $31; } $32 = (($$124) + 1)|0; $33 = (($$12223) + (($25*20)|0)|0); $34 = ($32|0)<($26|0); if ($34) { $$12223 = $33;$$124 = $32; } else { break; } } } HEAP32[$20>>2] = 0; return; } function _OnTerrainAtlasChanged_1137($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[452782]|0; $2 = ($1|0)==(0); if (!($2)) { $3 = HEAP32[452799]|0; $4 = HEAP32[(1949296)>>2]|0; $5 = ($3|0)==($4|0); if (!($5)) { _MapRenderer_Refresh(); } } $6 = (_MapRenderer_UsedAtlases()|0); HEAP32[452782] = $6; $7 = HEAP32[(1949296)>>2]|0; HEAP32[452799] = $7; _ResetPartFlags(); return; } function _OnEnvVariableChanged_1138($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (($1) + -15)|0; $3 = ($2>>>0)<(2); if ($3) { _MapRenderer_Refresh(); return; } $4 = $1 | 1; $5 = ($4|0)==(3); if (!($5)) { return; } $6 = HEAP32[442711]|0; $7 = HEAP32[(1972148)>>2]|0; $8 = HEAP32[(1972152)>>2]|0; $9 = (($8) + ($7))|0; $10 = ($9|0)>(0); $spec$select = $10 ? $9 : 0; HEAP32[442710] = $spec$select; $11 = ($7|0)>(0); $12 = $11 ? $7 : 0; HEAP32[442711] = $12; $13 = ($6|0)>($12|0); $14 = $13 ? $6 : $12; _RefreshBorderChunks($14); return; } function _OnBlockDefinitionChanged($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; _MapRenderer_Refresh(); $1 = (_MapRenderer_UsedAtlases()|0); HEAP32[452782] = $1; _ResetPartFlags(); return; } function _OnVisibilityChanged($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _Vec3_BigPos_1124($1); ;HEAP32[1811136>>2]=HEAP32[$1>>2]|0;HEAP32[1811136+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[1811136+8>>2]=HEAP32[$1+8>>2]|0; _CalcViewDists(); STACKTOP = sp;return; } function _DeleteChunks_($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _DeleteChunks(); return; } function _Refresh_($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _MapRenderer_Refresh(); return; } function _CalcViewDists() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[3583]|0; $1 = (_AdjustDist($0)|0); HEAP32[452797] = $1; $2 = HEAP32[3582]|0; $3 = (_AdjustDist($2)|0); HEAP32[452798] = $3; return; } function _AdjustDist($0) { $0 = $0|0; var $1 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0, $spec$store$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0|0)>(16); $spec$store$select = $1 ? $0 : 16; $2 = (+($spec$store$select|0)); $3 = $2 * 1.4142135381698608; $4 = (~~(($3))); $5 = (($4) + 24)|0; $6 = Math_imul($5, $5)|0; return ($6|0); } function _MapRenderer_Refresh() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; _IVec3_MaxValue_1135($0); ;HEAP32[1811172>>2]=HEAP32[$0>>2]|0;HEAP32[1811172+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[1811172+8>>2]=HEAP32[$0+8>>2]|0; $1 = HEAP32[452787]|0; $2 = ($1|0)!=(0|0); $3 = HEAP32[275888]|0; $4 = ($3|0)!=(0|0); $or$cond = $2 & $4; if (!($or$cond)) { _ResetPartCounts(); STACKTOP = sp;return; } _DeleteChunks(); _ResetChunks(); $5 = HEAP32[452782]|0; $6 = (_MapRenderer_UsedAtlases()|0); HEAP32[452782] = $6; $7 = ($6|0)==($5|0); if ($7) { _ResetPartCounts(); STACKTOP = sp;return; } _FreeParts(); _AllocateParts(); _ResetPartCounts(); STACKTOP = sp;return; } function _ResetChunks() { var $$01829 = 0, $$01923 = 0, $$02021 = 0, $$030 = 0, $$1$lcssa = 0, $$124 = 0, $$2$lcssa = 0, $$222 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1103572)>>2]|0; $1 = ($0|0)>(0); if (!($1)) { return; } $$01829 = 0;$$030 = 0; while(1) { $2 = HEAP32[(1103568)>>2]|0; $3 = ($2|0)>(0); if ($3) { $$01923 = 0;$$124 = $$030; while(1) { $4 = HEAP32[(1103564)>>2]|0; $5 = ($4|0)>(0); if ($5) { $$02021 = 0;$$222 = $$124; while(1) { $6 = HEAP32[452787]|0; $7 = (($6) + (($$222*20)|0)|0); _ChunkInfo_Reset($7,$$02021,$$01923,$$01829); $8 = (($$222) + 1)|0; $9 = (($$02021) + 16)|0; $10 = HEAP32[(1103564)>>2]|0; $11 = ($9|0)<($10|0); if ($11) { $$02021 = $9;$$222 = $8; } else { $$2$lcssa = $8; break; } } } else { $$2$lcssa = $$124; } $12 = (($$01923) + 16)|0; $13 = HEAP32[(1103568)>>2]|0; $14 = ($12|0)<($13|0); if ($14) { $$01923 = $12;$$124 = $$2$lcssa; } else { $$1$lcssa = $$2$lcssa; break; } } } else { $$1$lcssa = $$030; } $15 = (($$01829) + 16)|0; $16 = HEAP32[(1103572)>>2]|0; $17 = ($15|0)<($16|0); if ($17) { $$01829 = $15;$$030 = $$1$lcssa; } else { break; } } return; } function _MapRenderer_UsedAtlases() { var $$ = 0, $$010 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $$010 = 0;$3 = 0; while(1) { $0 = (1162260 + ($$010<<1)|0); $1 = HEAP16[$0>>1]|0; $2 = $1&65535; $4 = ($3>>>0)>($2>>>0); $$ = $4 ? $3 : $2; $5 = (($$010) + 1)|0; $6 = $$ & 65535; $exitcond = ($5|0)==(4608); if ($exitcond) { break; } else { $$010 = $5;$3 = $6; } } $7 = HEAP32[(1949304)>>2]|0; $8 = ($7)?($6 >>> $7):($6); $9 = (($8) + 1)|0; return ($9|0); } function _ResetPartFlags() { var label = 0, sp = 0; sp = STACKTOP; _memset((397712|0),1,512)|0; _memset((398224|0),0,512)|0; _memset((398736|0),1,512)|0; _memset((399248|0),0,512)|0; return; } function _RefreshBorderChunks($0) { $0 = $0|0; var $$02435 = 0, $$02531 = 0, $$030 = 0, $$old = 0, $$old28 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond27 = 0, $or$cond29 = 0, $or$cond3 = 0, $or$cond40 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _IVec3_MaxValue_1135($1); ;HEAP32[1811172>>2]=HEAP32[$1>>2]|0;HEAP32[1811172+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[1811172+8>>2]=HEAP32[$1+8>>2]|0; $2 = HEAP32[452787]|0; $3 = ($2|0)!=(0|0); $4 = HEAP32[275888]|0; $5 = ($4|0)!=(0|0); $or$cond = $3 & $5; $6 = HEAP32[(1103640)>>2]|0; $7 = ($6|0)>(0); $or$cond40 = $or$cond & $7; if (!($or$cond40)) { STACKTOP = sp;return; } $$02435 = 0; while(1) { $8 = HEAP32[(1103636)>>2]|0; $9 = ($8|0)>(0); if ($9) { $10 = ($$02435|0)==(0); $$02531 = 0; while(1) { $11 = HEAP32[(1103632)>>2]|0; $12 = ($11|0)>(0); if ($12) { $$old = $$02531 << 4; $$old28 = ($$old|0)<($0|0); $13 = $$02531 << 4; $14 = ($13|0)<($0|0); $$030 = 0;$17 = $11; while(1) { $15 = ($$030|0)==(0); $or$cond3 = $10 | $15; $16 = (($17) + -1)|0; $18 = ($$030|0)==($16|0); $or$cond27 = $or$cond3 | $18; if ($or$cond27) { if ($$old28) { label = 10; } } else { $19 = HEAP32[(1103640)>>2]|0; $20 = (($19) + -1)|0; $21 = ($$02435|0)==($20|0); $or$cond29 = $14 & $21; if ($or$cond29) { label = 10; } } if ((label|0) == 10) { label = 0; _MapRenderer_RefreshChunk($$030,$$02531,$$02435); } $22 = (($$030) + 1)|0; $23 = HEAP32[(1103632)>>2]|0; $24 = ($22|0)<($23|0); if ($24) { $$030 = $22;$17 = $23; } else { break; } } } $25 = (($$02531) + 1)|0; $26 = HEAP32[(1103636)>>2]|0; $27 = ($25|0)<($26|0); if ($27) { $$02531 = $25; } else { break; } } } $28 = (($$02435) + 1)|0; $29 = HEAP32[(1103640)>>2]|0; $30 = ($28|0)<($29|0); if ($30) { $$02435 = $28; } else { break; } } STACKTOP = sp;return; } function _MapRenderer_RefreshChunk($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = $1 | $0; $4 = $3 | $2; $5 = ($4|0)<(0); if ($5) { return; } $6 = HEAP32[(1103632)>>2]|0; $7 = ($6|0)>($0|0); if (!($7)) { return; } $8 = HEAP32[(1103636)>>2]|0; $9 = ($8|0)>($1|0); $10 = HEAP32[(1103640)>>2]|0; $11 = ($10|0)>($2|0); $or$cond = $9 & $11; if (!($or$cond)) { return; } $12 = HEAP32[452787]|0; $13 = Math_imul($8, $2)|0; $14 = (($13) + ($1))|0; $15 = Math_imul($14, $6)|0; $16 = (($15) + ($0))|0; $17 = (((($12) + (($16*20)|0)|0)) + 6|0); $18 = HEAP8[$17>>0]|0; $19 = $18 & 8; $20 = ($19<<24>>24)==(0); if (!($20)) { return; } $21 = $18 & -7; $22 = $21 | 4; HEAP8[$17>>0] = $22; return; } function _MapRenderer_RenderNormal($0) { $0 = +$0; var $$09 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[452787]|0; $2 = ($1|0)==(0|0); if ($2) { return; } _Gfx_SetVertexFormat(1); _Gfx_SetAlphaTest(1); $3 = HEAP32[452782]|0; $4 = ($3|0)>(0); if ($4) { $$09 = 0; while(1) { $5 = (393616 + ($$09<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)<(1); do { if (!($7)) { $8 = (398224 + ($$09)|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(0); if ($10) { $11 = (397712 + ($$09)|0); $12 = HEAP8[$11>>0]|0; $13 = ($12<<24>>24)==(0); if ($13) { break; } } $14 = (1949312 + ($$09<<2)|0); $15 = HEAP32[$14>>2]|0; _Gfx_BindTexture($15); _RenderNormalBatch($$09); $16 = (397712 + ($$09)|0); HEAP8[$16>>0] = 0; } } while(0); $17 = (($$09) + 1)|0; $18 = HEAP32[452782]|0; $19 = ($17|0)<($18|0); if ($19) { $$09 = $17; } else { break; } } } _CheckWeather($0); _Gfx_SetAlphaTest(0); return; } function _RenderNormalBatch($0) { $0 = $0|0; var $$0136 = 0, $$not$demorgan = 0, $$not122$demorgan = 0, $$not123$demorgan = 0, $$not124$demorgan = 0, $$not126$demorgan = 0, $$not127$demorgan = 0, $$sink138 = 0, $$sink141 = 0, $$sink144 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0, $$sroa$16$0$$sroa_idx65 = 0, $$sroa$16$0$copyload = 0, $$sroa$22$0$$sroa_idx72 = 0, $$sroa$22$0$copyload = 0, $$sroa$29$0$$sroa_idx80 = 0, $$sroa$29$0$copyload = 0, $$sroa$35$0$$sroa_idx87 = 0, $$sroa$35$0$copyload = 0; var $$sroa$41$0$$sroa_idx94 = 0, $$sroa$41$0$copyload = 0, $$sroa$6$0$$sroa_idx53 = 0, $$sroa$6$0$copyload = 0, $$sroa$9$0$$sroa_idx57 = 0, $$sroa$9$0$copyload = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $brmerge$demorgan = 0; var $brmerge125$demorgan = 0, $brmerge128$demorgan = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[452783]|0; $2 = Math_imul($1, $0)|0; $3 = HEAP32[452800]|0; $4 = ($3|0)>(0); if (!($4)) { return; } $5 = (398224 + ($0)|0); $$0136 = 0; while(1) { $6 = HEAP32[452789]|0; $7 = (($6) + ($$0136<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = ((($8)) + 12|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0|0); if (!($11)) { $$sroa$0$0$$sroa_idx = (($10) + (($2*20)|0)|0); $$sroa$0$0$copyload = HEAP32[$$sroa$0$0$$sroa_idx>>2]|0; $$sroa$6$0$$sroa_idx53 = (((($10) + (($2*20)|0)|0)) + 4|0); $$sroa$6$0$copyload = HEAP32[$$sroa$6$0$$sroa_idx53>>2]|0; $$sroa$22$0$$sroa_idx72 = (((($10) + (($2*20)|0)|0)) + 12|0); $$sroa$22$0$copyload = HEAP16[$$sroa$22$0$$sroa_idx72>>1]|0; $$sroa$29$0$$sroa_idx80 = (((($10) + (($2*20)|0)|0)) + 14|0); $$sroa$29$0$copyload = HEAP16[$$sroa$29$0$$sroa_idx80>>1]|0; $$sroa$35$0$$sroa_idx87 = (((($10) + (($2*20)|0)|0)) + 16|0); $$sroa$35$0$copyload = HEAP16[$$sroa$35$0$$sroa_idx87>>1]|0; $$sroa$41$0$$sroa_idx94 = (((($10) + (($2*20)|0)|0)) + 18|0); $$sroa$41$0$copyload = HEAP16[$$sroa$41$0$$sroa_idx94>>1]|0; $12 = ($$sroa$0$0$copyload|0)<(0); if (!($12)) { $$sroa$16$0$$sroa_idx65 = (((($10) + (($2*20)|0)|0)) + 10|0); $$sroa$16$0$copyload = HEAP16[$$sroa$16$0$$sroa_idx65>>1]|0; $$sroa$9$0$$sroa_idx57 = (((($10) + (($2*20)|0)|0)) + 8|0); $$sroa$9$0$copyload = HEAP16[$$sroa$9$0$$sroa_idx57>>1]|0; HEAP8[$5>>0] = 1; $13 = ((($8)) + 8|0); $14 = HEAP32[$13>>2]|0; _Gfx_BindVb_Textured($14); $15 = (($$sroa$6$0$copyload) + ($$sroa$0$0$copyload))|0; $16 = ((($8)) + 7|0); $17 = HEAP8[$16>>0]|0; $18 = $17 & 1; $19 = ($18<<24>>24)!=(0); $20 = $$sroa$9$0$copyload&65535; $21 = ($$sroa$9$0$copyload<<16>>16)!=(0); $22 = $17 & 2; $23 = ($22<<24>>24)!=(0); $24 = $$sroa$16$0$copyload&65535; $25 = ($$sroa$16$0$copyload<<16>>16)!=(0); $26 = $25 & $23; $$not$demorgan = $21 & $19; $$not122$demorgan = $25 & $23; $brmerge$demorgan = $$not$demorgan & $$not122$demorgan; do { if ($brmerge$demorgan) { _Gfx_SetFaceCulling(1); $27 = (($20) + ($24))|0; _Gfx_DrawIndexedTris_T2fC4b($27,$15); _Gfx_SetFaceCulling(0); $$sink138 = $27; label = 11; } else { $28 = $21 & $19; if ($28) { _Gfx_DrawIndexedTris_T2fC4b($20,$15); $$sink138 = $20; label = 11; break; } if ($26) { $29 = (($15) + ($20))|0; _Gfx_DrawIndexedTris_T2fC4b($24,$29); $$sink138 = $24; label = 11; } } } while(0); if ((label|0) == 11) { label = 0; $30 = HEAP32[450761]|0; $31 = (($30) + ($$sink138))|0; HEAP32[450761] = $31; } $32 = (($20) + ($24))|0; $33 = (($32) + ($15))|0; $34 = HEAP8[$16>>0]|0; $35 = $34 & 4; $36 = ($35<<24>>24)!=(0); $37 = $$sroa$22$0$copyload&65535; $38 = ($$sroa$22$0$copyload<<16>>16)!=(0); $39 = $34 & 8; $40 = ($39<<24>>24)!=(0); $41 = $$sroa$29$0$copyload&65535; $42 = ($$sroa$29$0$copyload<<16>>16)!=(0); $43 = $42 & $40; $$not123$demorgan = $38 & $36; $$not124$demorgan = $42 & $40; $brmerge125$demorgan = $$not123$demorgan & $$not124$demorgan; do { if ($brmerge125$demorgan) { _Gfx_SetFaceCulling(1); $44 = (($41) + ($37))|0; _Gfx_DrawIndexedTris_T2fC4b($44,$33); _Gfx_SetFaceCulling(0); $$sink141 = $44; label = 18; } else { $45 = $38 & $36; if ($45) { _Gfx_DrawIndexedTris_T2fC4b($37,$33); $$sink141 = $37; label = 18; break; } if ($43) { $46 = (($33) + ($37))|0; _Gfx_DrawIndexedTris_T2fC4b($41,$46); $$sink141 = $41; label = 18; } } } while(0); if ((label|0) == 18) { label = 0; $47 = HEAP32[450761]|0; $48 = (($47) + ($$sink141))|0; HEAP32[450761] = $48; } $49 = (($41) + ($37))|0; $50 = (($49) + ($33))|0; $51 = HEAP8[$16>>0]|0; $52 = $51 & 16; $53 = ($52<<24>>24)!=(0); $54 = $$sroa$35$0$copyload&65535; $55 = ($$sroa$35$0$copyload<<16>>16)!=(0); $56 = $51 & 32; $57 = ($56<<24>>24)!=(0); $58 = $$sroa$41$0$copyload&65535; $59 = ($$sroa$41$0$copyload<<16>>16)!=(0); $60 = $59 & $57; $$not126$demorgan = $55 & $53; $$not127$demorgan = $59 & $57; $brmerge128$demorgan = $$not126$demorgan & $$not127$demorgan; do { if ($brmerge128$demorgan) { _Gfx_SetFaceCulling(1); $61 = (($58) + ($54))|0; _Gfx_DrawIndexedTris_T2fC4b($61,$50); _Gfx_SetFaceCulling(0); $$sink144 = $61; label = 25; } else { $62 = $55 & $53; if ($62) { _Gfx_DrawIndexedTris_T2fC4b($54,$50); $$sink144 = $54; label = 25; break; } if ($60) { $63 = (($50) + ($54))|0; _Gfx_DrawIndexedTris_T2fC4b($58,$63); $$sink144 = $58; label = 25; } } } while(0); if ((label|0) == 25) { label = 0; $64 = HEAP32[450761]|0; $65 = (($64) + ($$sink144))|0; HEAP32[450761] = $65; } $66 = ($$sroa$6$0$copyload|0)==(0); if (!($66)) { $67 = (2)?($$sroa$6$0$copyload >> 2):($$sroa$6$0$copyload); _Gfx_SetFaceCulling(1); $68 = HEAP8[$16>>0]|0; $69 = $68 & 6; $70 = ($69<<24>>24)==(0); if (!($70)) { _Gfx_DrawIndexedTris_T2fC4b($67,$$sroa$0$0$copyload); $71 = HEAP32[450761]|0; $72 = (($71) + ($67))|0; HEAP32[450761] = $72; } $73 = (($67) + ($$sroa$0$0$copyload))|0; $74 = HEAP8[$16>>0]|0; $75 = $74 & 9; $76 = ($75<<24>>24)==(0); if (!($76)) { _Gfx_DrawIndexedTris_T2fC4b($67,$73); $77 = HEAP32[450761]|0; $78 = (($77) + ($67))|0; HEAP32[450761] = $78; } $79 = (($73) + ($67))|0; $80 = HEAP8[$16>>0]|0; $81 = $80 & 5; $82 = ($81<<24>>24)==(0); if (!($82)) { _Gfx_DrawIndexedTris_T2fC4b($67,$79); $83 = HEAP32[450761]|0; $84 = (($83) + ($67))|0; HEAP32[450761] = $84; } $85 = HEAP8[$16>>0]|0; $86 = $85 & 10; $87 = ($86<<24>>24)==(0); if (!($87)) { $88 = (($79) + ($67))|0; _Gfx_DrawIndexedTris_T2fC4b($67,$88); $89 = HEAP32[450761]|0; $90 = (($89) + ($67))|0; HEAP32[450761] = $90; } _Gfx_SetFaceCulling(0); } } } $91 = (($$0136) + 1)|0; $92 = HEAP32[452800]|0; $93 = ($91|0)<($92|0); if ($93) { $$0136 = $91; } else { break; } } return; } function _CheckWeather($0) { $0 = +$0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $phitmp = 0, $phitmp4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _IVec3_Floor($1,(1771048)); $2 = HEAP32[$1>>2]|0; $3 = ((($1)) + 4|0); $4 = HEAP32[$3>>2]|0; $5 = ((($1)) + 8|0); $6 = HEAP32[$5>>2]|0; $7 = (_World_SafeGetBlock($2,$4,$6)|0); $8 = HEAP32[$3>>2]|0; $9 = ($8|0)<(0); if ($9) { $18 = 1; } else { $10 = HEAP32[$1>>2]|0; $11 = HEAP32[$5>>2]|0; $12 = (_World_ContainsXZ_1146($10,$11)|0); $13 = ($12<<24>>24)==(0); $phitmp = $13&1; $18 = $phitmp; } $14 = $7&65535; $15 = (1120788 + ($14)|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(3); if ($17) { $23 = 1; } else { $19 = ($18|0)!=(0); $20 = HEAP32[(1972148)>>2]|0; $21 = ($8|0)<($20|0); $22 = $19 & $21; $phitmp4 = $22&1; $23 = $phitmp4; } HEAP8[1972877] = $23; $24 = ($23<<24>>24)==(0); $25 = HEAP32[(1972172)>>2]|0; $26 = ($25|0)==(0); $or$cond = $24 | $26; if ($or$cond) { STACKTOP = sp;return; } _Gfx_SetAlphaBlending(1); _EnvRenderer_RenderWeather($0); _Gfx_SetAlphaBlending(0); STACKTOP = sp;return; } function _World_ContainsXZ_1146($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = ($2>>>0)>($0>>>0); $4 = HEAP32[(1103572)>>2]|0; $5 = ($4>>>0)>($1>>>0); $narrow = $3 & $5; $6 = $narrow&1; return ($6|0); } function _MapRenderer_RenderTranslucent($0) { $0 = +$0; var $$019 = 0, $$118 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[452787]|0; $2 = ($1|0)==(0|0); if ($2) { return; } $3 = HEAP32[450761]|0; _Gfx_SetVertexFormat(1); _Gfx_SetAlphaBlending(0); _Gfx_DepthOnlyRendering(1); $4 = HEAP32[452782]|0; $5 = ($4|0)>(0); if ($5) { $$019 = 0; while(1) { $6 = (395664 + ($$019<<2)|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)<(1); do { if (!($8)) { $9 = (399248 + ($$019)|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==(0); if ($11) { $12 = (398736 + ($$019)|0); $13 = HEAP8[$12>>0]|0; $14 = ($13<<24>>24)==(0); if ($14) { break; } } _RenderTranslucentBatch($$019); $15 = (398736 + ($$019)|0); HEAP8[$15>>0] = 0; } } while(0); $16 = (($$019) + 1)|0; $17 = HEAP32[452782]|0; $18 = ($16|0)<($17|0); if ($18) { $$019 = $16; } else { break; } } } HEAP32[450761] = $3; _Gfx_SetAlphaBlending(1); _Gfx_DepthOnlyRendering(0); _Gfx_SetDepthWrite(0); $19 = HEAP32[452782]|0; $20 = ($19|0)>(0); if ($20) { $$118 = 0; while(1) { $21 = (395664 + ($$118<<2)|0); $22 = HEAP32[$21>>2]|0; $23 = ($22|0)<(1); if (!($23)) { $24 = (399248 + ($$118)|0); $25 = HEAP8[$24>>0]|0; $26 = ($25<<24>>24)==(0); if (!($26)) { $27 = (1949312 + ($$118<<2)|0); $28 = HEAP32[$27>>2]|0; _Gfx_BindTexture($28); _RenderTranslucentBatch($$118); } } $29 = (($$118) + 1)|0; $30 = HEAP32[452782]|0; $31 = ($29|0)<($30|0); if ($31) { $$118 = $29; } else { break; } } } _Gfx_SetDepthWrite(1); $32 = HEAP8[1972877]|0; $33 = ($32<<24>>24)==(0); $34 = HEAP32[(1972172)>>2]|0; $35 = ($34|0)!=(0); $or$cond = $33 & $35; if ($or$cond) { _Gfx_SetAlphaTest(1); _EnvRenderer_RenderWeather($0); _Gfx_SetAlphaTest(0); } _Gfx_SetAlphaBlending(0); return; } function _RenderTranslucentBatch($0) { $0 = $0|0; var $$0121 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0, $$sroa$12$0$$sroa_idx42 = 0, $$sroa$12$0$copyload = 0, $$sroa$18$0$$sroa_idx49 = 0, $$sroa$18$0$copyload = 0, $$sroa$25$0$$sroa_idx57 = 0, $$sroa$25$0$copyload = 0, $$sroa$31$0$$sroa_idx64 = 0, $$sroa$31$0$copyload = 0, $$sroa$37$0$$sroa_idx71 = 0, $$sroa$37$0$copyload = 0, $$sroa$533$0$$sroa_idx34 = 0, $$sroa$533$0$copyload = 0, $1 = 0, $10 = 0, $100 = 0, $11 = 0, $12 = 0; var $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0; var $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0; var $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0; var $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0; var $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $brmerge$demorgan = 0, $brmerge95$demorgan = 0, $brmerge98$demorgan = 0, $spec$select = 0, $spec$select119 = 0; var $spec$select120 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[452783]|0; $2 = Math_imul($1, $0)|0; $3 = HEAP32[452800]|0; $4 = ($3|0)>(0); if (!($4)) { return; } $5 = (399248 + ($0)|0); $$0121 = 0; while(1) { $6 = HEAP32[452789]|0; $7 = (($6) + ($$0121<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = ((($8)) + 16|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0|0); do { if (!($11)) { $$sroa$0$0$$sroa_idx = (($10) + (($2*20)|0)|0); $$sroa$0$0$copyload = HEAP32[$$sroa$0$0$$sroa_idx>>2]|0; $$sroa$533$0$$sroa_idx34 = (((($10) + (($2*20)|0)|0)) + 8|0); $$sroa$533$0$copyload = HEAP16[$$sroa$533$0$$sroa_idx34>>1]|0; $$sroa$12$0$$sroa_idx42 = (((($10) + (($2*20)|0)|0)) + 10|0); $$sroa$12$0$copyload = HEAP16[$$sroa$12$0$$sroa_idx42>>1]|0; $$sroa$18$0$$sroa_idx49 = (((($10) + (($2*20)|0)|0)) + 12|0); $$sroa$18$0$copyload = HEAP16[$$sroa$18$0$$sroa_idx49>>1]|0; $$sroa$25$0$$sroa_idx57 = (((($10) + (($2*20)|0)|0)) + 14|0); $$sroa$25$0$copyload = HEAP16[$$sroa$25$0$$sroa_idx57>>1]|0; $$sroa$31$0$$sroa_idx64 = (((($10) + (($2*20)|0)|0)) + 16|0); $$sroa$31$0$copyload = HEAP16[$$sroa$31$0$$sroa_idx64>>1]|0; $$sroa$37$0$$sroa_idx71 = (((($10) + (($2*20)|0)|0)) + 18|0); $$sroa$37$0$copyload = HEAP16[$$sroa$37$0$$sroa_idx71>>1]|0; $12 = ($$sroa$0$0$copyload|0)<(0); if (!($12)) { HEAP8[$5>>0] = 1; $13 = ((($8)) + 8|0); $14 = HEAP32[$13>>2]|0; _Gfx_BindVb_Textured($14); $15 = HEAP8[1972877]|0; $16 = ($15<<24>>24)==(0); if ($16) { $17 = ((($8)) + 7|0); $18 = HEAP8[$17>>0]|0; $19 = $18 & 1; $20 = ($19<<24>>24)!=(0); $21 = ($$sroa$533$0$copyload<<16>>16)!=(0); $spec$select = $21 & $20; $22 = $18 & 2; $23 = ($22<<24>>24)==(0); if ($23) { if ($spec$select) { label = 12; } } else { $26 = $spec$select; label = 9; } } else { $24 = ($$sroa$533$0$copyload<<16>>16)!=(0); $26 = $24; label = 9; } do { if ((label|0) == 9) { label = 0; $25 = ($$sroa$12$0$copyload<<16>>16)!=(0); $brmerge$demorgan = $25 & $26; if ($brmerge$demorgan) { $27 = $$sroa$533$0$copyload&65535; $28 = $$sroa$12$0$copyload&65535; $29 = (($28) + ($27))|0; _Gfx_DrawIndexedTris_T2fC4b($29,$$sroa$0$0$copyload); $30 = HEAP32[450761]|0; $31 = (($30) + ($29))|0; HEAP32[450761] = $31; break; } if ($26) { label = 12; } else { $35 = $$sroa$12$0$copyload&65535; if ($25) { $36 = $$sroa$533$0$copyload&65535; $37 = (($$sroa$0$0$copyload) + ($36))|0; _Gfx_DrawIndexedTris_T2fC4b($35,$37); $38 = HEAP32[450761]|0; $39 = (($38) + ($35))|0; HEAP32[450761] = $39; } } } } while(0); if ((label|0) == 12) { label = 0; $32 = $$sroa$533$0$copyload&65535; _Gfx_DrawIndexedTris_T2fC4b($32,$$sroa$0$0$copyload); $33 = HEAP32[450761]|0; $34 = (($33) + ($32))|0; HEAP32[450761] = $34; } $40 = $$sroa$533$0$copyload&65535; $41 = $$sroa$12$0$copyload&65535; $42 = (($$sroa$0$0$copyload) + ($40))|0; $43 = (($42) + ($41))|0; $44 = HEAP8[1972877]|0; $45 = ($44<<24>>24)==(0); if ($45) { $46 = ((($8)) + 7|0); $47 = HEAP8[$46>>0]|0; $48 = $47 & 4; $49 = ($48<<24>>24)!=(0); $50 = ($$sroa$18$0$copyload<<16>>16)!=(0); $spec$select119 = $50 & $49; $51 = $47 & 8; $52 = ($51<<24>>24)==(0); if ($52) { if ($spec$select119) { label = 22; } } else { $55 = $spec$select119; label = 19; } } else { $53 = ($$sroa$18$0$copyload<<16>>16)!=(0); $55 = $53; label = 19; } do { if ((label|0) == 19) { label = 0; $54 = ($$sroa$25$0$copyload<<16>>16)!=(0); $brmerge95$demorgan = $54 & $55; if ($brmerge95$demorgan) { $56 = $$sroa$18$0$copyload&65535; $57 = $$sroa$25$0$copyload&65535; $58 = (($57) + ($56))|0; _Gfx_DrawIndexedTris_T2fC4b($58,$43); $59 = HEAP32[450761]|0; $60 = (($59) + ($58))|0; HEAP32[450761] = $60; break; } if ($55) { label = 22; } else { $64 = $$sroa$25$0$copyload&65535; if ($54) { $65 = $$sroa$18$0$copyload&65535; $66 = (($43) + ($65))|0; _Gfx_DrawIndexedTris_T2fC4b($64,$66); $67 = HEAP32[450761]|0; $68 = (($67) + ($64))|0; HEAP32[450761] = $68; } } } } while(0); if ((label|0) == 22) { label = 0; $61 = $$sroa$18$0$copyload&65535; _Gfx_DrawIndexedTris_T2fC4b($61,$43); $62 = HEAP32[450761]|0; $63 = (($62) + ($61))|0; HEAP32[450761] = $63; } $69 = $$sroa$18$0$copyload&65535; $70 = $$sroa$25$0$copyload&65535; $71 = (($70) + ($69))|0; $72 = (($71) + ($43))|0; $73 = HEAP8[1972877]|0; $74 = ($73<<24>>24)==(0); if ($74) { $75 = ((($8)) + 7|0); $76 = HEAP8[$75>>0]|0; $77 = $76 & 16; $78 = ($77<<24>>24)!=(0); $79 = ($$sroa$31$0$copyload<<16>>16)!=(0); $spec$select120 = $79 & $78; $80 = $76 & 32; $81 = ($80<<24>>24)==(0); if ($81) { if (!($spec$select120)) { break; } } else { $84 = $spec$select120; label = 29; } } else { $82 = ($$sroa$31$0$copyload<<16>>16)!=(0); $84 = $82; label = 29; } if ((label|0) == 29) { label = 0; $83 = ($$sroa$37$0$copyload<<16>>16)!=(0); $brmerge98$demorgan = $83 & $84; if ($brmerge98$demorgan) { $85 = $$sroa$31$0$copyload&65535; $86 = $$sroa$37$0$copyload&65535; $87 = (($86) + ($85))|0; _Gfx_DrawIndexedTris_T2fC4b($87,$72); $88 = HEAP32[450761]|0; $89 = (($88) + ($87))|0; HEAP32[450761] = $89; break; } if (!($84)) { $93 = $$sroa$37$0$copyload&65535; if (!($83)) { break; } $94 = $$sroa$31$0$copyload&65535; $95 = (($72) + ($94))|0; _Gfx_DrawIndexedTris_T2fC4b($93,$95); $96 = HEAP32[450761]|0; $97 = (($96) + ($93))|0; HEAP32[450761] = $97; break; } } $90 = $$sroa$31$0$copyload&65535; _Gfx_DrawIndexedTris_T2fC4b($90,$72); $91 = HEAP32[450761]|0; $92 = (($91) + ($90))|0; HEAP32[450761] = $92; } } } while(0); $98 = (($$0121) + 1)|0; $99 = HEAP32[452800]|0; $100 = ($98|0)<($99|0); if ($100) { $$0121 = $98; } else { break; } } return; } function _MapRenderer_Update($0) { $0 = +$0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[452787]|0; $2 = ($1|0)==(0|0); if ($2) { return; } _UpdateSortOrder(); _UpdateChunks($0); return; } function _UpdateSortOrder() { var $$040 = 0, $$lobit = 0, $$not = 0, $$not34 = 0, $$not37 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $8 = 0, $9 = 0, $exitcond = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; _IVec3_Floor($0,(1771048)); $1 = HEAP32[$0>>2]|0; $2 = $1 & -16; $3 = $2 | 8; HEAP32[$0>>2] = $3; $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = $5 & -16; $7 = $6 | 8; HEAP32[$4>>2] = $7; $8 = ((($0)) + 8|0); $9 = HEAP32[$8>>2]|0; $10 = $9 & -16; $11 = $10 | 8; HEAP32[$8>>2] = $11; $12 = HEAP32[452793]|0; $13 = ($3|0)==($12|0); if ($13) { $14 = HEAP32[(1811176)>>2]|0; $15 = ($7|0)==($14|0); $16 = HEAP32[(1811180)>>2]|0; $17 = ($11|0)==($16|0); $or$cond = $15 & $17; if ($or$cond) { STACKTOP = sp;return; } } ;HEAP32[1811172>>2]=HEAP32[$0>>2]|0;HEAP32[1811172+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[1811172+8>>2]=HEAP32[$0+8>>2]|0; $18 = HEAP32[452783]|0; $19 = ($18|0)==(0); if ($19) { STACKTOP = sp;return; } $20 = ($18|0)>(0); if ($20) { $21 = HEAP32[452788]|0; $22 = HEAP32[452790]|0; $$040 = 0; while(1) { $23 = (($21) + ($$040<<2)|0); $24 = HEAP32[$23>>2]|0; $25 = HEAP16[$24>>1]|0; $26 = $25&65535; $27 = HEAP32[$0>>2]|0; $28 = (($26) - ($27))|0; $29 = ((($24)) + 2|0); $30 = HEAP16[$29>>1]|0; $31 = $30&65535; $32 = HEAP32[$4>>2]|0; $33 = (($31) - ($32))|0; $34 = ((($24)) + 4|0); $35 = HEAP16[$34>>1]|0; $36 = $35&65535; $37 = HEAP32[$8>>2]|0; $38 = (($36) - ($37))|0; $39 = Math_imul($28, $28)|0; $40 = Math_imul($33, $33)|0; $41 = (($40) + ($39))|0; $42 = Math_imul($38, $38)|0; $43 = (($41) + ($42))|0; $44 = (($22) + ($$040<<2)|0); HEAP32[$44>>2] = $43; $$lobit = (31)?($28 >>> 31):($28); $45 = $$lobit&255; $46 = ((($24)) + 7|0); $47 = HEAP8[$46>>0]|0; $$not = $45 & 1; $48 = $47 & -64; $49 = ($28|0)<(1); $50 = $49&1; $51 = ($50 << 1)&255; $52 = (29)?($38 >>> 29):($38); $$not34 = $52&255; $53 = $$not34 & 4; $54 = ($38|0)<(1); $55 = $54&1; $56 = ($55 << 3)&255; $57 = (27)?($33 >>> 27):($33); $$not37 = $57&255; $58 = $$not37 & 16; $59 = ($33|0)<(1); $60 = $59&1; $61 = ($60 << 5)&255; $62 = $51 | $$not; $63 = $62 | $58; $64 = $63 | $61; $65 = $64 | $48; $66 = $65 | $53; $67 = $66 | $56; $68 = $67 ^ 21; HEAP8[$46>>0] = $68; $69 = (($$040) + 1)|0; $exitcond = ($69|0)==($18|0); if ($exitcond) { break; } else { $$040 = $69; } } } $70 = (($18) + -1)|0; _SortMapChunks(0,$70); _ResetPartFlags(); STACKTOP = sp;return; } function _UpdateChunks($0) { $0 = +$0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; HEAP32[$1>>2] = 0; $2 = $0 < 0.043333333333333335; $3 = $2 ? 1 : -1; $4 = HEAP32[3716]|0; $5 = (($4) + ($3))|0; $6 = ($5|0)>(4); $7 = $6 ? $5 : 4; $8 = HEAP32[452796]|0; $9 = ($7|0)>($8|0); $10 = $9 ? $8 : $7; HEAP32[3716] = $10; $11 = (_Vec3_Equals()|0); $12 = ($11<<24>>24)==(0); if ($12) { label = 5; } else { $13 = +HEAPF32[(1783788)>>2]; $14 = +HEAPF32[452801]; $15 = $13 == $14; if ($15) { $16 = +HEAPF32[(1783792)>>2]; $17 = +HEAPF32[452802]; $18 = $16 != $17; if ($18) { label = 5; } else { $19 = (_UpdateChunksStill($1)|0); $21 = $19;$26 = 0; } } else { label = 5; } } if ((label|0) == 5) { $20 = (_UpdateChunksAndVisibility($1)|0); $21 = $20;$26 = 1; } HEAP32[452800] = $21; ;HEAP32[1811136>>2]=HEAP32[(1771048)>>2]|0;HEAP32[1811136+4>>2]=HEAP32[(1771048)+4>>2]|0;HEAP32[1811136+8>>2]=HEAP32[(1771048)+8>>2]|0; $22 = HEAP32[(1783788)>>2]|0; HEAP32[452801] = $22; $23 = HEAP32[(1783792)>>2]|0; HEAP32[452802] = $23; $24 = HEAP32[$1>>2]|0; $25 = ($24|0)!=(0); $or$cond = $26 | $25; if (!($or$cond)) { STACKTOP = sp;return; } _ResetPartFlags(); STACKTOP = sp;return; } function _Vec3_Equals() { var $0 = 0.0, $1 = 0.0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $0 = +HEAPF32[(1771048)>>2]; $1 = +HEAPF32[452784]; $2 = $0 == $1; if (!($2)) { $9 = 0; return ($9|0); } $3 = +HEAPF32[(1771052)>>2]; $4 = +HEAPF32[(1811140)>>2]; $5 = $3 == $4; if (!($5)) { $9 = 0; return ($9|0); } $6 = +HEAPF32[(1771056)>>2]; $7 = +HEAPF32[(1811144)>>2]; $8 = $6 == $7; $phitmp = $8&1; $9 = $phitmp; return ($9|0); } function _UpdateChunksStill($0) { $0 = $0|0; var $$046$lcssa = 0, $$04651 = 0, $$052 = 0, $$1 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0; var $42 = 0.0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; var $60 = 0, $61 = 0, $62 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond48 = 0, $or$cond50 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[452798]|0; $2 = HEAP32[452797]|0; $3 = HEAP32[452783]|0; $4 = ($3|0)>(0); if (!($4)) { $$046$lcssa = 0; return ($$046$lcssa|0); } $5 = (($2) + 512)|0; $$04651 = 0;$$052 = 0; while(1) { $6 = HEAP32[452788]|0; $7 = (($6) + ($$052<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = ((($8)) + 6|0); $10 = HEAP8[$9>>0]|0; $11 = $10 & 2; $12 = ($11<<24>>24)==(0); do { if ($12) { $13 = HEAP32[452790]|0; $14 = (($13) + ($$052<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = ((($8)) + 12|0); $17 = HEAP32[$16>>2]|0; $18 = ($17|0)==(0|0); if ($18) { $19 = ((($8)) + 16|0); $20 = HEAP32[$19>>2]|0; $21 = ($20|0)==(0|0); $23 = $21; } else { $23 = 0; } $22 = ($15|0)<($5|0); $or$cond = $22 | $23; if (!($or$cond)) { _DeleteChunk($8); $$1 = $$04651; break; } $24 = (2)?(($10&255) >>> 2):(($10&255)); $25 = $24 & 1; $26 = $25&255; $27 = $23&1; $28 = $27 | $26; $29 = ($28|0)==(0); $30 = ($15|0)>($2|0); $or$cond48 = $30 | $29; if (!($or$cond48)) { $31 = HEAP32[$0>>2]|0; $32 = HEAP32[3716]|0; $33 = ($31|0)<($32|0); if ($33) { _DeleteChunk($8); _BuildChunk_1151($8,$0); $34 = ($15|0)>($1|0); if ($34) { $46 = 0; } else { $35 = HEAP16[$8>>1]|0; $36 = (+($35&65535)); $37 = ((($8)) + 2|0); $38 = HEAP16[$37>>1]|0; $39 = (+($38&65535)); $40 = ((($8)) + 4|0); $41 = HEAP16[$40>>1]|0; $42 = (+($41&65535)); $43 = (_FrustumCulling_SphereInFrustum($36,$39,$42,14.0)|0); $44 = ($43<<24>>24)!=(0); $46 = $44; } $45 = $46&1; $47 = HEAP8[$9>>0]|0; $48 = $47 & -2; $49 = $48 | $45; HEAP8[$9>>0] = $49; $50 = $47 & 2; $51 = ($50<<24>>24)==(0); $or$cond50 = $46 & $51; if (!($or$cond50)) { $$1 = $$04651; break; } $52 = (($$04651) + 1)|0; $53 = HEAP32[452789]|0; $54 = (($53) + ($$04651<<2)|0); HEAP32[$54>>2] = $8; $$1 = $52; break; } } $55 = $10 & 1; $56 = ($55<<24>>24)==(0); if ($56) { $$1 = $$04651; } else { $57 = (($$04651) + 1)|0; $58 = HEAP32[452789]|0; $59 = (($58) + ($$04651<<2)|0); HEAP32[$59>>2] = $8; $$1 = $57; } } else { $$1 = $$04651; } } while(0); $60 = (($$052) + 1)|0; $61 = HEAP32[452783]|0; $62 = ($60|0)<($61|0); if ($62) { $$04651 = $$1;$$052 = $60; } else { $$046$lcssa = $$1; break; } } return ($$046$lcssa|0); } function _UpdateChunksAndVisibility($0) { $0 = $0|0; var $$042$lcssa = 0, $$04247 = 0, $$048 = 0, $$1 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0; var $42 = 0.0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, $or$cond = 0, $or$cond44 = 0, $or$cond46 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[452798]|0; $2 = HEAP32[452797]|0; $3 = HEAP32[452783]|0; $4 = ($3|0)>(0); if (!($4)) { $$042$lcssa = 0; return ($$042$lcssa|0); } $5 = (($2) + 512)|0; $$04247 = 0;$$048 = 0; while(1) { $6 = HEAP32[452788]|0; $7 = (($6) + ($$048<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = ((($8)) + 6|0); $10 = HEAP8[$9>>0]|0; $11 = $10 & 2; $12 = ($11<<24>>24)==(0); do { if ($12) { $13 = HEAP32[452790]|0; $14 = (($13) + ($$048<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = ((($8)) + 12|0); $17 = HEAP32[$16>>2]|0; $18 = ($17|0)==(0|0); if ($18) { $19 = ((($8)) + 16|0); $20 = HEAP32[$19>>2]|0; $21 = ($20|0)==(0|0); $23 = $21; } else { $23 = 0; } $22 = ($15|0)<($5|0); $or$cond = $22 | $23; if (!($or$cond)) { _DeleteChunk($8); $$1 = $$04247; break; } $24 = (2)?(($10&255) >>> 2):(($10&255)); $25 = $24 & 1; $26 = $25&255; $27 = $23&1; $28 = $27 | $26; $29 = ($28|0)==(0); $30 = ($15|0)>($2|0); $or$cond44 = $30 | $29; if (!($or$cond44)) { $31 = HEAP32[$0>>2]|0; $32 = HEAP32[3716]|0; $33 = ($31|0)<($32|0); if ($33) { _DeleteChunk($8); _BuildChunk_1151($8,$0); } } $34 = ($15|0)>($1|0); if ($34) { $46 = 0; } else { $35 = HEAP16[$8>>1]|0; $36 = (+($35&65535)); $37 = ((($8)) + 2|0); $38 = HEAP16[$37>>1]|0; $39 = (+($38&65535)); $40 = ((($8)) + 4|0); $41 = HEAP16[$40>>1]|0; $42 = (+($41&65535)); $43 = (_FrustumCulling_SphereInFrustum($36,$39,$42,14.0)|0); $44 = ($43<<24>>24)!=(0); $46 = $44; } $45 = $46&1; $47 = HEAP8[$9>>0]|0; $48 = $47 & -2; $49 = $48 | $45; HEAP8[$9>>0] = $49; $50 = $47 & 2; $51 = ($50<<24>>24)==(0); $or$cond46 = $46 & $51; if ($or$cond46) { $52 = (($$04247) + 1)|0; $53 = HEAP32[452789]|0; $54 = (($53) + ($$04247<<2)|0); HEAP32[$54>>2] = $8; $$1 = $52; } else { $$1 = $$04247; } } else { $$1 = $$04247; } } while(0); $55 = (($$048) + 1)|0; $56 = HEAP32[452783]|0; $57 = ($55|0)<($56|0); if ($57) { $$04247 = $$1;$$048 = $55; } else { $$042$lcssa = $$1; break; } } return ($$042$lcssa|0); } function _BuildChunk_1151($0,$1) { $0 = $0|0; $1 = $1|0; var $$02226 = 0, $$027 = 0, $$12324 = 0, $$125 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1085000)>>2]|0; $3 = (($2) + 1)|0; HEAP32[(1085000)>>2] = $3; $4 = HEAP32[$1>>2]|0; $5 = (($4) + 1)|0; HEAP32[$1>>2] = $5; $6 = ((($0)) + 6|0); $7 = HEAP8[$6>>0]|0; $8 = $7 & -5; HEAP8[$6>>0] = $8; _Builder_MakeChunk($0); $9 = ((($0)) + 12|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0|0); if ($11) { $12 = ((($0)) + 16|0); $13 = HEAP32[$12>>2]|0; $14 = ($13|0)==(0|0); if ($14) { $15 = HEAP8[$6>>0]|0; $16 = $15 | 2; HEAP8[$6>>0] = $16; return; } } else { $17 = HEAP32[452782]|0; $18 = ($17|0)>(0); if ($18) { $19 = HEAP32[452783]|0; $20 = HEAP32[452782]|0; $$02226 = $10;$$027 = 0; while(1) { $21 = HEAP32[$$02226>>2]|0; $22 = ($21|0)>(-1); $23 = (393616 + ($$027<<2)|0); if ($22) { $24 = HEAP32[$23>>2]|0; $25 = (($24) + 1)|0; HEAP32[$23>>2] = $25; } $26 = (($$027) + 1)|0; $27 = (($$02226) + (($19*20)|0)|0); $28 = ($26|0)<($20|0); if ($28) { $$02226 = $27;$$027 = $26; } else { break; } } } } $29 = ((($0)) + 16|0); $30 = HEAP32[$29>>2]|0; $31 = ($30|0)!=(0|0); $32 = HEAP32[452782]|0; $33 = ($32|0)>(0); $or$cond = $31 & $33; if (!($or$cond)) { return; } $34 = HEAP32[452783]|0; $35 = HEAP32[452782]|0; $$12324 = $30;$$125 = 0; while(1) { $36 = HEAP32[$$12324>>2]|0; $37 = ($36|0)>(-1); $38 = (395664 + ($$125<<2)|0); if ($37) { $39 = HEAP32[$38>>2]|0; $40 = (($39) + 1)|0; HEAP32[$38>>2] = $40; } $41 = (($$125) + 1)|0; $42 = (($$12324) + (($34*20)|0)|0); $43 = ($41|0)<($35|0); if ($43) { $$12324 = $42;$$125 = $41; } else { break; } } return; } function _SortMapChunks($0,$1) { $0 = $0|0; $1 = $1|0; var $$065$lcssa = 0, $$06576 = 0, $$067$lcssa = 0, $$06775 = 0, $$07078 = 0, $$079 = 0, $$1 = 0, $$166 = 0, $$168 = 0, $$171 = 0, $$2 = 0, $$269 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0; var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[452788]|0; $3 = HEAP32[452790]|0; $4 = ($0|0)<($1|0); if (!($4)) { return; } $$07078 = $1;$$079 = $0; while(1) { $5 = (($$079) + ($$07078))|0; $6 = (1)?($5 >> 1):($5); $7 = (($3) + ($6<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = ($$079|0)>($$07078|0); if ($9) { $$065$lcssa = $$07078;$$067$lcssa = $$079; } else { $$06576 = $$07078;$$06775 = $$079; while(1) { $$168 = $$06775; while(1) { $10 = (($3) + ($$168<<2)|0); $11 = HEAP32[$10>>2]|0; $12 = ($8>>>0)>($11>>>0); $13 = (($$168) + 1)|0; if ($12) { $$168 = $13; } else { break; } } $$166 = $$06576; while(1) { $14 = (($3) + ($$166<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = ($8>>>0)<($15>>>0); $17 = (($$166) + -1)|0; if ($16) { $$166 = $17; } else { break; } } $18 = ($$168|0)>($$166|0); if ($18) { $$2 = $$166;$$269 = $$168; } else { HEAP32[$10>>2] = $15; HEAP32[$14>>2] = $11; $19 = (($2) + ($$168<<2)|0); $20 = HEAP32[$19>>2]|0; $21 = (($2) + ($$166<<2)|0); $22 = HEAP32[$21>>2]|0; HEAP32[$19>>2] = $22; HEAP32[$21>>2] = $20; $23 = (($$168) + 1)|0; $24 = (($$166) + -1)|0; $$2 = $24;$$269 = $23; } $25 = ($$269|0)>($$2|0); if ($25) { $$065$lcssa = $$2;$$067$lcssa = $$269; break; } else { $$06576 = $$2;$$06775 = $$269; } } } $26 = (($$065$lcssa) - ($$079))|0; $27 = (($$07078) - ($$067$lcssa))|0; $28 = ($26|0)>($27|0); if ($28) { $30 = ($$07078|0)>($$067$lcssa|0); if ($30) { _SortMapChunks($$067$lcssa,$$07078); $$1 = $$079;$$171 = $$065$lcssa; } else { $$1 = $$079;$$171 = $$065$lcssa; } } else { $29 = ($$065$lcssa|0)>($$079|0); if ($29) { _SortMapChunks($$079,$$065$lcssa); $$1 = $$067$lcssa;$$171 = $$07078; } else { $$1 = $$067$lcssa;$$171 = $$07078; } } $31 = ($$1|0)<($$171|0); if ($31) { $$07078 = $$171;$$079 = $$1; } else { break; } } return; } function _MapRenderer_OnBlockChanged($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (4)?($0 >> 4):($0); $5 = (4)?($1 >> 4):($1); $6 = (4)?($2 >> 4):($2); $7 = HEAP32[452787]|0; $8 = HEAP32[(1103636)>>2]|0; $9 = Math_imul($8, $6)|0; $10 = (($9) + ($5))|0; $11 = HEAP32[(1103632)>>2]|0; $12 = Math_imul($10, $11)|0; $13 = (($12) + ($4))|0; $14 = $3&65535; $15 = (1120788 + ($14)|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(4); $18 = $17&1; $19 = (((($7) + (($13*20)|0)|0)) + 6|0); $20 = HEAP8[$19>>0]|0; $21 = (3)?(($20&255) >>> 3):(($20&255)); $22 = $21&255; $23 = $22 & $18; $24 = $23&255; $25 = ($24 << 3)&255; $26 = $25 & 8; $27 = $20 & -9; $28 = $26 | $27; HEAP8[$19>>0] = $28; _MapRenderer_RefreshChunk($4,$5,$6); return; } function _Menu_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; (_Screen_DoPointerDown($0,$1,$2,$3)|0); return 1; } function _Menu_PointerMove($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; (_Menu_DoPointerMove($0,$2,$3)|0); return 1; } function _Menu_DoPointerMove($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0345 = 0, $$1354 = 0, $$1354$in = 0, $$2 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 16|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 20|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)>(0); if (!($7)) { $$2 = -1; return ($$2|0); } $$0345 = 0; while(1) { $8 = (($4) + ($$0345<<2)|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)==(0|0); if (!($10)) { $11 = ((($9)) + 20|0); HEAP8[$11>>0] = 0; } $12 = (($$0345) + 1)|0; $exitcond = ($12|0)==($6|0); if ($exitcond) { break; } else { $$0345 = $12; } } $13 = ($6|0)>(0); if (!($13)) { $$2 = -1; return ($$2|0); } $$1354$in = $6; while(1) { $$1354 = (($$1354$in) + -1)|0; $14 = (($4) + ($$1354<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = ($15|0)==(0|0); if (!($16)) { $17 = (_Widget_Contains($15,$1,$2)|0); $18 = ($17|0)==(0); if (!($18)) { break; } } $20 = ($$1354$in|0)>(1); if ($20) { $$1354$in = $$1354; } else { $$2 = -1; label = 12; break; } } if ((label|0) == 12) { return ($$2|0); } $19 = ((($15)) + 20|0); HEAP8[$19>>0] = 1; $$2 = $$1354; return ($$2|0); } function _ListScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1811216)>>0] = 1; HEAP8[(1811218)>>0] = 1; HEAP32[452803] = 14868; _Gui_Add(1811212,50); return; } function _ListScreen_Init($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 6128; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 10; $3 = ((($0)) + 828|0); HEAPF32[$3>>2] = 0.0; $4 = ((($0)) + 832|0); HEAP32[$4>>2] = 0; $5 = ((($0)) + 8|0); HEAP32[$5>>2] = 112; $6 = ((($0)) + 836|0); $7 = ((($0)) + 24|0); $8 = HEAP32[$6>>2]|0; _ButtonWidget_Init($7,300,$8); $9 = ((($0)) + 112|0); $10 = HEAP32[$6>>2]|0; _ButtonWidget_Init($9,300,$10); $11 = ((($0)) + 200|0); $12 = HEAP32[$6>>2]|0; _ButtonWidget_Init($11,300,$12); $13 = ((($0)) + 288|0); $14 = HEAP32[$6>>2]|0; _ButtonWidget_Init($13,300,$14); $15 = ((($0)) + 376|0); $16 = HEAP32[$6>>2]|0; _ButtonWidget_Init($15,300,$16); $17 = ((($0)) + 844|0); $18 = HEAP32[$17>>2]|0; $19 = ($18|0)!=(0|0); $20 = HEAP8[1972870]|0; $21 = ($20<<24>>24)!=(0); $22 = $19 & $21; $23 = $22 ? 140 : 400; $24 = ((($0)) + 728|0); _ButtonWidget_Init($24,$23,$18); $25 = ((($0)) + 640|0); $26 = ((($0)) + 840|0); $27 = HEAP32[$26>>2]|0; _ButtonWidget_Init($25,$23,$27); $28 = HEAP32[$17>>2]|0; $29 = ($28|0)==(0|0); $30 = HEAP32[$1>>2]|0; $31 = ((($30)) + 36|0); if ($29) { HEAP32[$31>>2] = 0; $32 = ((($0)) + 464|0); _ButtonWidget_Init($32,40,118); $33 = ((($0)) + 552|0); _ButtonWidget_Init($33,40,119); $34 = ((($0)) + 860|0); _TextWidget_Init($34); $35 = ((($0)) + 848|0); $36 = HEAP32[$35>>2]|0; FUNCTION_TABLE_vi[$36 & 511]($0); return; } else { HEAP32[$31>>2] = $24; $32 = ((($0)) + 464|0); _ButtonWidget_Init($32,40,118); $33 = ((($0)) + 552|0); _ButtonWidget_Init($33,40,119); $34 = ((($0)) + 860|0); _TextWidget_Init($34); $35 = ((($0)) + 848|0); $36 = HEAP32[$35>>2]|0; FUNCTION_TABLE_vi[$36 & 511]($0); return; } } function _ListScreen_Free($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 928|0); _StringsBuffer_Clear($1); return; } function _ListScreen_Render($0,$1) { $0 = $0|0; $1 = +$1; var label = 0, sp = 0; sp = STACKTOP; _Menu_RenderBounds(); _Screen_Render2Widgets($0,$1); return; } function _ListScreen_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $1 | 16; switch ($2|0) { case 62: { _ListScreen_PageClick($0,0); break; } case 63: { _ListScreen_PageClick($0,1); break; } default: { } } return 1; } function _ListScreen_MouseScroll($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 828|0); $3 = (_Utils_AccumulateWheelDelta($2,$1)|0); $4 = ($3|0)==(0); if ($4) { return 1; } $5 = ((($0)) + 832|0); $6 = HEAP32[$5>>2]|0; $7 = (($6) - ($3))|0; _ListScreen_SetCurrentIndex($0,$7); return 1; } function _ListScreen_Layout($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 24|0); _Widget_SetLocation($1,1,1,0,-100); $2 = ((($0)) + 112|0); _Widget_SetLocation($2,1,1,0,-50); $3 = ((($0)) + 200|0); _Widget_SetLocation($3,1,1,0,0); $4 = ((($0)) + 288|0); _Widget_SetLocation($4,1,1,0,50); $5 = ((($0)) + 376|0); _Widget_SetLocation($5,1,1,0,100); $6 = ((($0)) + 844|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==(0|0); $9 = HEAP8[1972870]|0; $10 = ($9<<24>>24)==(0); $or$cond = $8 | $10; $11 = ((($0)) + 640|0); if ($or$cond) { _Widget_SetLocation($11,1,2,0,25); $13 = ((($0)) + 728|0); _Widget_SetLocation($13,1,2,0,70); } else { _Widget_SetLocation($11,3,2,-150,25); $12 = ((($0)) + 728|0); _Widget_SetLocation($12,4,2,-150,25); } $14 = ((($0)) + 464|0); _Widget_SetLocation($14,1,1,-220,0); $15 = ((($0)) + 552|0); _Widget_SetLocation($15,1,1,220,0); $16 = ((($0)) + 860|0); _Widget_SetLocation($16,1,1,0,-155); return; } function _ListScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; _Screen_ContextLost($0); $1 = ((($0)) + 816|0); _Font_Free($1); return; } function _ListScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; _Screen_UpdateVb($0); $1 = ((($0)) + 816|0); _Gui_MakeTitleFont($1); _ListScreen_RedrawEntries($0); $2 = ((($0)) + 464|0); _ButtonWidget_SetConst($2,34986,$1); $3 = ((($0)) + 552|0); _ButtonWidget_SetConst($3,34988,$1); $4 = ((($0)) + 640|0); _ButtonWidget_SetConst($4,34990,$1); _ListScreen_UpdatePage($0); $5 = ((($0)) + 844|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(0|0); if ($7) { return; } $8 = ((($0)) + 728|0); _ButtonWidget_SetConst($8,34995,$1); return; } function _ListScreen_RedrawEntries($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0; var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 8|0; $2 = sp; $3 = ((($0)) + 832|0); $4 = ((($0)) + 852|0); $5 = HEAP32[$3>>2]|0; _ListScreen_UNSAFE_Get($2,$0,$5); $6 = $2; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = $1; $13 = $12; HEAP32[$13>>2] = $8; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; $16 = (_String_CaselessEqualsConst($1,35018)|0); $17 = $16&255; $18 = ((($0)) + 24|0); $19 = ((($0)) + 45|0); HEAP8[$19>>0] = $17; $20 = HEAP32[$4>>2]|0; FUNCTION_TABLE_viii[$20 & 15]($0,$18,$1); $21 = HEAP32[$3>>2]|0; $22 = (($21) + 1)|0; _ListScreen_UNSAFE_Get($2,$0,$22); $23 = $2; $24 = $23; $25 = HEAP32[$24>>2]|0; $26 = (($23) + 4)|0; $27 = $26; $28 = HEAP32[$27>>2]|0; $29 = $1; $30 = $29; HEAP32[$30>>2] = $25; $31 = (($29) + 4)|0; $32 = $31; HEAP32[$32>>2] = $28; $33 = (_String_CaselessEqualsConst($1,35018)|0); $34 = $33&255; $35 = ((($0)) + 112|0); $36 = ((($0)) + 133|0); HEAP8[$36>>0] = $34; $37 = HEAP32[$4>>2]|0; FUNCTION_TABLE_viii[$37 & 15]($0,$35,$1); $38 = HEAP32[$3>>2]|0; $39 = (($38) + 2)|0; _ListScreen_UNSAFE_Get($2,$0,$39); $40 = $2; $41 = $40; $42 = HEAP32[$41>>2]|0; $43 = (($40) + 4)|0; $44 = $43; $45 = HEAP32[$44>>2]|0; $46 = $1; $47 = $46; HEAP32[$47>>2] = $42; $48 = (($46) + 4)|0; $49 = $48; HEAP32[$49>>2] = $45; $50 = (_String_CaselessEqualsConst($1,35018)|0); $51 = $50&255; $52 = ((($0)) + 200|0); $53 = ((($0)) + 221|0); HEAP8[$53>>0] = $51; $54 = HEAP32[$4>>2]|0; FUNCTION_TABLE_viii[$54 & 15]($0,$52,$1); $55 = HEAP32[$3>>2]|0; $56 = (($55) + 3)|0; _ListScreen_UNSAFE_Get($2,$0,$56); $57 = $2; $58 = $57; $59 = HEAP32[$58>>2]|0; $60 = (($57) + 4)|0; $61 = $60; $62 = HEAP32[$61>>2]|0; $63 = $1; $64 = $63; HEAP32[$64>>2] = $59; $65 = (($63) + 4)|0; $66 = $65; HEAP32[$66>>2] = $62; $67 = (_String_CaselessEqualsConst($1,35018)|0); $68 = $67&255; $69 = ((($0)) + 288|0); $70 = ((($0)) + 309|0); HEAP8[$70>>0] = $68; $71 = HEAP32[$4>>2]|0; FUNCTION_TABLE_viii[$71 & 15]($0,$69,$1); $72 = HEAP32[$3>>2]|0; $73 = (($72) + 4)|0; _ListScreen_UNSAFE_Get($2,$0,$73); $74 = $2; $75 = $74; $76 = HEAP32[$75>>2]|0; $77 = (($74) + 4)|0; $78 = $77; $79 = HEAP32[$78>>2]|0; $80 = $1; $81 = $80; HEAP32[$81>>2] = $76; $82 = (($80) + 4)|0; $83 = $82; HEAP32[$83>>2] = $79; $84 = (_String_CaselessEqualsConst($1,35018)|0); $85 = $84&255; $86 = ((($0)) + 376|0); $87 = ((($0)) + 397|0); HEAP8[$87>>0] = $85; $88 = HEAP32[$4>>2]|0; FUNCTION_TABLE_viii[$88 & 15]($0,$86,$1); STACKTOP = sp;return; } function _ListScreen_UpdatePage($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 936|0); $2 = HEAP32[$1>>2]|0; $3 = (($2) + -5)|0; $4 = ((($0)) + 832|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)<(1); $7 = $6&1; $8 = ((($0)) + 485|0); HEAP8[$8>>0] = $7; $9 = ($5|0)>=($3|0); $10 = $9&1; $11 = ((($0)) + 573|0); HEAP8[$11>>0] = $10; _ListScreen_UpdateTitle($0); return; } function _ListScreen_UpdateTitle($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $spec$store$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 72|0; $2 = sp; $3 = sp + 68|0; $4 = sp + 64|0; HEAP32[$1>>2] = $2; $5 = ((($1)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($1)) + 6|0); HEAP16[$6>>1] = 64; $7 = ((($0)) + 856|0); $8 = HEAP32[$7>>2]|0; _String_AppendConst($1,$8); $9 = HEAP8[1972839]|0; $10 = ($9<<24>>24)==(0); if (!($10)) { $19 = ((($0)) + 860|0); $20 = ((($0)) + 816|0); _TextWidget_Set($19,$1,$20); STACKTOP = sp;return; } $11 = ((($0)) + 832|0); $12 = HEAP32[$11>>2]|0; $13 = (($12|0) / 5)&-1; $14 = (($13) + 1)|0; HEAP32[$3>>2] = $14; $15 = ((($0)) + 936|0); $16 = HEAP32[$15>>2]|0; $17 = (_Math_CeilDiv($16,5)|0); $18 = ($17|0)==(0); $spec$store$select = $18 ? 1 : $17; HEAP32[$4>>2] = $spec$store$select; _String_Format2($1,35002,$3,$4); $19 = ((($0)) + 860|0); $20 = ((($0)) + 816|0); _TextWidget_Set($19,$1,$20); STACKTOP = sp;return; } function _ListScreen_UNSAFE_Get($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($2|0)>(-1); if ($3) { $4 = ((($1)) + 936|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)>($2|0); if ($6) { $7 = ((($1)) + 928|0); _StringsBuffer_UNSAFE_Get($0,$7,$2); return; } } $8 = 13112; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = (($8) + 4)|0; $12 = $11; $13 = HEAP32[$12>>2]|0; $14 = $0; $15 = $14; HEAP32[$15>>2] = $10; $16 = (($14) + 4)|0; $17 = $16; HEAP32[$17>>2] = $13; return; } function _ListScreen_SetCurrentIndex($0,$1) { $0 = $0|0; $1 = $1|0; var $$1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 936|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)>($1|0); $5 = (($3) + -1)|0; $spec$select = $4 ? $1 : $5; $6 = ($spec$select|0)>(0); $$1 = $6 ? $spec$select : 0; $7 = ((($0)) + 832|0); HEAP32[$7>>2] = $$1; _ListScreen_RedrawEntries($0); _ListScreen_UpdatePage($0); return; } function _ListScreen_PageClick($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(0); $3 = $2 ? -5 : 5; $4 = ((($0)) + 832|0); $5 = HEAP32[$4>>2]|0; $6 = (($5) + ($3))|0; _ListScreen_SetCurrentIndex($0,$6); return; } function _Menu_RenderBounds() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1972116)>>2]|0; $1 = HEAP32[(1972120)>>2]|0; _Gfx_Draw2DGradient(0,0,$0,$1,1763186712,-1570622669); return; } function _ListScreen_MoveBackwards($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _ListScreen_PageClick($0,0); return; } function _ListScreen_MoveForwards($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _ListScreen_PageClick($0,1); return; } function _PauseScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1817296)>>0] = 1; HEAP8[(1817298)>>0] = 1; HEAP32[454323] = 14932; _Gui_Add(1817292,50); return; } function _PauseScreen_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 6176; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 9; _Event_Register((1794308),$0,347); $3 = ((($0)) + 28|0); HEAP32[$3>>2] = 6224; $4 = ((($0)) + 24|0); HEAP32[$4>>2] = 6; $5 = ((($0)) + 560|0); _ButtonWidget_Init($5,120,120); _PauseScreenBase_Init($0,300); $6 = HEAP8[(1949240)>>0]|0; $7 = ($6<<24>>24)==(0); if (!($7)) { return; } $8 = ((($0)) + 141|0); HEAP8[$8>>0] = 1; $9 = ((($0)) + 229|0); HEAP8[$9>>0] = 1; return; } function _PauseScreen_Free($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Event_Unregister((1794308),$0,347); return; } function _MenuScreen_Render2($0,$1) { $0 = $0|0; $1 = +$1; var label = 0, sp = 0; sp = STACKTOP; _Menu_RenderBounds(); _Screen_Render2Widgets($0,$1); return; } function _PauseScreen_Layout($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 32|0); $2 = ((($0)) + 28|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 24|0); $5 = HEAP32[$4>>2]|0; _Menu_LayoutButtons($1,$3,$5); $6 = ((($0)) + 648|0); _Menu_LayoutBack($6); $7 = ((($0)) + 560|0); _Widget_SetLocation($7,2,2,5,5); $8 = ((($0)) + 736|0); _Widget_SetLocation($8,1,1,0,-100); return; } function _PauseScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _PauseScreenBase_ContextRecreated($0,$1); $2 = ((($0)) + 560|0); _ButtonWidget_SetConst($2,43104,$1); _PauseScreen_CheckHacksAllowed($0); _Font_Free($1); STACKTOP = sp;return; } function _PauseScreenBase_ContextRecreated($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; _Screen_UpdateVb($0); _Gui_MakeTitleFont($1); $2 = ((($0)) + 32|0); $3 = ((($0)) + 28|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 24|0); $6 = HEAP32[$5>>2]|0; _Menu_SetButtons($2,$1,$4,$6); $7 = ((($0)) + 648|0); _ButtonWidget_SetConst($7,35020,$1); $8 = ((($0)) + 736|0); _TextWidget_SetConst($8,35033,$1); return; } function _PauseScreen_CheckHacksAllowed($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803522)>>0]|0; $2 = ($1<<24>>24)==(0); if (!($2)) { return; } $3 = HEAP8[(1784311)>>0]|0; $4 = ($3<<24>>24)==(0); $5 = $4&1; $6 = ((($0)) + 405|0); HEAP8[$6>>0] = $5; $7 = ((($0)) + 7|0); HEAP8[$7>>0] = 1; return; } function _Menu_SetButtons($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$08 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($3|0)>(0); if (!($4)) { return; } $$08 = 0; while(1) { $5 = (($0) + (($$08*88)|0)|0); $6 = (((($2) + (($$08*12)|0)|0)) + 4|0); $7 = HEAP32[$6>>2]|0; _ButtonWidget_SetConst($5,$7,$1); $8 = (($$08) + 1)|0; $exitcond = ($8|0)==($3|0); if ($exitcond) { break; } else { $$08 = $8; } } return; } function _Menu_LayoutButtons($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$09 = 0, $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($2|0)>(0); if (!($3)) { return; } $$09 = 0; while(1) { $4 = (($0) + (($$09*88)|0)|0); $5 = (($1) + (($$09*12)|0)|0); $6 = HEAP16[$5>>1]|0; $7 = $6 << 16 >> 16; $8 = (((($1) + (($$09*12)|0)|0)) + 2|0); $9 = HEAP16[$8>>1]|0; $10 = $9 << 16 >> 16; _Widget_SetLocation($4,1,1,$7,$10); $11 = (($$09) + 1)|0; $exitcond = ($11|0)==($2|0); if ($exitcond) { break; } else { $$09 = $11; } } return; } function _Menu_LayoutBack($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Widget_SetLocation($0,1,2,0,25); return; } function _PauseScreenBase_Quit($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Window_Close(); return; } function _PauseScreenBase_Init($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 8|0); HEAP32[$2>>2] = 100; $3 = ((($0)) + 32|0); $4 = ((($0)) + 28|0); $5 = HEAP32[$4>>2]|0; $6 = ((($0)) + 24|0); $7 = HEAP32[$6>>2]|0; _Menu_InitButtons($3,$1,$5,$7); $8 = ((($0)) + 648|0); _ButtonWidget_Init($8,400,121); $9 = ((($0)) + 736|0); _TextWidget_Init($9); return; } function _Menu_InitButtons($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$08 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($3|0)>(0); if (!($4)) { return; } $$08 = 0; while(1) { $5 = (($0) + (($$08*88)|0)|0); $6 = (((($2) + (($$08*12)|0)|0)) + 8|0); $7 = HEAP32[$6>>2]|0; _ButtonWidget_Init($5,$1,$7); $8 = (($$08) + 1)|0; $exitcond = ($8|0)==($3|0); if ($exitcond) { break; } else { $$08 = $8; } } return; } function _PauseScreenBase_Game($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Gui_Remove(1817292); return; } function _Menu_SwitchOptions($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _OptionsGroupScreen_Show(); return; } function _Menu_SwitchGenLevel($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _GenLevelScreen_Show(); return; } function _Menu_SwitchLoadLevel($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _LoadLevelScreen_Show(); return; } function _Menu_SwitchSaveLevel($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _SaveLevelScreen_Show(); return; } function _Menu_SwitchTexPacks($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _TexturePackScreen_Show(); return; } function _Menu_SwitchHotkeys($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _HotkeyListScreen_Show(); return; } function _HotkeyListScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[(1812068)>>2] = 35138; HEAP32[(1812056)>>2] = 0; HEAP32[(1812060)>>2] = 348; HEAP32[(1812048)>>2] = 122; HEAP32[(1812052)>>2] = 123; HEAP32[(1812064)>>2] = 3; _ListScreen_Show(); return; } function _HotkeyListScreen_LoadEntries($0) { $0 = $0|0; var $$012 = 0, $$sroa$3$0$$sroa_idx = 0, $$sroa$3$0$copyload = 0, $$sroa$4$0$$sroa_idx = 0, $$sroa$4$0$copyload = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 64|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 64; $5 = HEAP32[(1804156)>>2]|0; $6 = ($5|0)>(0); if (!($6)) { $16 = ((($0)) + 928|0); _StringsBuffer_Add($16,1949280); _StringsBuffer_Sort($16); STACKTOP = sp;return; } $7 = ((($0)) + 928|0); $$012 = 0; while(1) { $$sroa$3$0$$sroa_idx = (((390800 + ($$012<<3)|0)) + 4|0); $$sroa$3$0$copyload = HEAP8[$$sroa$3$0$$sroa_idx>>0]|0; $$sroa$4$0$$sroa_idx = (((390800 + ($$012<<3)|0)) + 5|0); $$sroa$4$0$copyload = HEAP8[$$sroa$4$0$$sroa_idx>>0]|0; HEAP16[$3>>1] = 0; $8 = $$sroa$3$0$copyload&255; $9 = (5184 + ($8<<2)|0); $10 = HEAP32[$9>>2]|0; _String_AppendConst($1,$10); $11 = ($$sroa$4$0$copyload<<24>>24)==(0); if (!($11)) { $12 = $$sroa$4$0$copyload&255; _String_AppendConst($1,35343); _HotkeyListScreen_MakeFlags($12,$1); } _StringsBuffer_Add($7,$1); $13 = (($$012) + 1)|0; $14 = HEAP32[(1804156)>>2]|0; $15 = ($13|0)<($14|0); if ($15) { $$012 = $13; } else { break; } } $16 = ((($0)) + 928|0); _StringsBuffer_Add($16,1949280); _StringsBuffer_Sort($16); STACKTOP = sp;return; } function _HotkeyListScreen_EntryClick($0,$1) { $0 = $0|0; $1 = $1|0; var $$03038 = 0, $$1 = 0, $$lobit = 0, $$lobit$not = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0, $$sroa$4$0$$sroa_idx = 0, $$sroa$4$0$$sroa_idx16 = 0, $$sroa$4$0$copyload = 0, $$sroa$5$0$$sroa_idx = 0, $$sroa$5$0$$sroa_idx18 = 0, $$sroa$5$0$copyload = 0, $$sroa$6$0$$sroa_idx = 0, $$sroa$6$0$$sroa_idx21 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0; var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $spec$select34 = 0, $tmpcast$byval_copy1 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $tmpcast$byval_copy1 = sp + 32|0; $2 = sp + 8|0; $3 = sp; $4 = sp + 24|0; $5 = sp + 16|0; $6 = $2; $7 = $6; HEAP32[$7>>2] = 0; $8 = (($6) + 4)|0; $9 = $8; HEAP32[$9>>2] = 0; _ListScreen_UNSAFE_GetCur($3,$0,$1); $10 = ((($3)) + 4|0); $11 = HEAP16[$10>>1]|0; $12 = ($11<<16>>16)==(0); if ($12) { ;HEAP32[$tmpcast$byval_copy1>>2]=HEAP32[$2>>2]|0;HEAP32[$tmpcast$byval_copy1+4>>2]=HEAP32[$2+4>>2]|0; _EditHotkeyScreen_Show($tmpcast$byval_copy1); STACKTOP = sp;return; } (_String_UNSAFE_Separate($3,43,$4,$5)|0); $13 = (_String_IndexOfConst($5,35167)|0); $$lobit = (31)?($13 >>> 31):($13); $$lobit$not = $$lobit ^ 1; $14 = (_String_IndexOfConst($5,35172)|0); $15 = ($14|0)>(-1); $16 = $$lobit$not | 2; $$1 = $15 ? $16 : $$lobit$not; $17 = (_String_IndexOfConst($5,35178)|0); $18 = ($17|0)>(-1); $19 = $$1 | 4; $spec$select34 = $18 ? $19 : $$1; $20 = (_Utils_ParseEnum($4,0,5184,122)|0); $21 = HEAP32[(1804156)>>2]|0; $22 = ($21|0)>(0); L5: do { if ($22) { $23 = HEAP32[(1804156)>>2]|0; $$03038 = 0; while(1) { $$sroa$4$0$$sroa_idx = (((390800 + ($$03038<<3)|0)) + 4|0); $$sroa$4$0$copyload = HEAP8[$$sroa$4$0$$sroa_idx>>0]|0; $$sroa$5$0$$sroa_idx = (((390800 + ($$03038<<3)|0)) + 5|0); $$sroa$5$0$copyload = HEAP8[$$sroa$5$0$$sroa_idx>>0]|0; $24 = $$sroa$4$0$copyload&255; $25 = ($20|0)==($24|0); $26 = $$sroa$5$0$copyload&255; $27 = ($spec$select34|0)==($26|0); $or$cond = $25 & $27; if ($or$cond) { break; } $29 = (($$03038) + 1)|0; $30 = ($29|0)<($23|0); if ($30) { $$03038 = $29; } else { break L5; } } $$sroa$6$0$$sroa_idx = (((390800 + ($$03038<<3)|0)) + 6|0); $28 = HEAP16[$$sroa$6$0$$sroa_idx>>1]|0; $$sroa$0$0$$sroa_idx = (390800 + ($$03038<<3)|0); $$sroa$0$0$copyload = HEAP32[$$sroa$0$0$$sroa_idx>>2]|0; HEAP32[$2>>2] = $$sroa$0$0$copyload; $$sroa$4$0$$sroa_idx16 = ((($2)) + 4|0); HEAP8[$$sroa$4$0$$sroa_idx16>>0] = $$sroa$4$0$copyload; $$sroa$5$0$$sroa_idx18 = ((($2)) + 5|0); HEAP8[$$sroa$5$0$$sroa_idx18>>0] = $$sroa$5$0$copyload; $$sroa$6$0$$sroa_idx21 = ((($2)) + 6|0); HEAP16[$$sroa$6$0$$sroa_idx21>>1] = $28; } } while(0); ;HEAP32[$tmpcast$byval_copy1>>2]=HEAP32[$2>>2]|0;HEAP32[$tmpcast$byval_copy1+4>>2]=HEAP32[$2+4>>2]|0; _EditHotkeyScreen_Show($tmpcast$byval_copy1); STACKTOP = sp;return; } function _Menu_SwitchPause($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Gui_ShowPauseMenu(); return; } function _HotkeyListScreen_UpdateEntry($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($2)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = ($4<<16>>16)==(0); $6 = ((($0)) + 816|0); if ($5) { _ButtonWidget_SetConst($1,35153,$6); return; } else { _ButtonWidget_Set($1,$2,$6); return; } } function _ListScreen_UNSAFE_GetCur($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_Screen_Index($1,$2)|0); $4 = ((($1)) + 832|0); $5 = HEAP32[$4>>2]|0; $6 = (($5) + ($3))|0; _ListScreen_UNSAFE_Get($0,$1,$6); return; } function _EditHotkeyScreen_Show($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[(1094460)>>0] = 1; HEAP8[(1094462)>>0] = 1; HEAP32[273614] = 14996; $1 = $0; $2 = $1; $3 = HEAP32[$2>>2]|0; $4 = (($1) + 4)|0; $5 = $4; $6 = HEAP32[$5>>2]|0; $7 = (1094488); $8 = $7; HEAP32[$8>>2] = $3; $9 = (($7) + 4)|0; $10 = $9; HEAP32[$10>>2] = $6; $11 = (1094480); $12 = $11; HEAP32[$12>>2] = $3; $13 = (($11) + 4)|0; $14 = $13; HEAP32[$14>>2] = $6; _Gui_Add(1094456,50); return; } function _EditHotkeyScreen_Init($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $storemerge$in = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 16|0; $2 = sp + 8|0; $3 = sp; $4 = ((($0)) + 16|0); HEAP32[$4>>2] = 6304; $5 = ((($0)) + 20|0); HEAP32[$5>>2] = 7; $6 = ((($0)) + 40|0); HEAP32[$6>>2] = -1; $7 = ((($0)) + 8|0); HEAP32[$7>>2] = 80; HEAP32[$1>>2] = 22000; $8 = ((($0)) + 400|0); _ButtonWidget_Init($8,300,124); $9 = ((($0)) + 488|0); _ButtonWidget_Init($9,300,125); $10 = ((($0)) + 576|0); _ButtonWidget_Init($10,300,126); $11 = ((($0)) + 664|0); _ButtonWidget_Init($11,300,127); $12 = ((($0)) + 752|0); _ButtonWidget_Init($12,300,128); $13 = ((($0)) + 36|0); $14 = HEAP8[$13>>0]|0; $15 = ($14<<24>>24)==(0); if ($15) { $storemerge$in = 1949280; } else { $16 = ((($0)) + 32|0); $17 = HEAP32[$16>>2]|0; _StringsBuffer_UNSAFE_Get($3,1804148,$17); $storemerge$in = $3; } $18 = $storemerge$in; $19 = $18; $20 = HEAP32[$19>>2]|0; $21 = (($18) + 4)|0; $22 = $21; $23 = HEAP32[$22>>2]|0; $24 = $2; $25 = $24; HEAP32[$25>>2] = $20; $26 = (($24) + 4)|0; $27 = $26; HEAP32[$27>>2] = $23; $28 = ((($0)) + 96|0); _TextInputWidget_Create($28,500,$2,$1); $29 = ((($0)) + 840|0); _ButtonWidget_Init($29,400,30); $30 = ((($0)) + 392|0); HEAP32[$30>>2] = 35331; STACKTOP = sp;return; } function _EditHotkeyScreen_Update($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0.0, $4 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 296|0); $3 = +HEAPF64[$2>>3]; $4 = $3 + $1; HEAPF64[$2>>3] = $4; return; } function _Menu_CloseKeyboard($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Window_CloseKeyboard(); return; } function _EditHotkeyScreen_Render($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _MenuScreen_Render2($0,$1); $2 = ((($0)) + 48|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 52|0); $5 = HEAP32[$4>>2]|0; $6 = ((($0)) + 60|0); $7 = HEAP32[$6>>2]|0; $8 = ((($0)) + 64|0); $9 = HEAP32[$8>>2]|0; _Gfx_Draw2DFlat($3,$5,$7,$9,-6908266); $10 = HEAP32[$2>>2]|0; $11 = ((($0)) + 56|0); $12 = HEAP32[$11>>2]|0; $13 = HEAP32[$6>>2]|0; $14 = HEAP32[$8>>2]|0; _Gfx_Draw2DFlat($10,$12,$13,$14,-6908266); return; } function _EditHotkeyScreen_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 40|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)>(-1); if (!($4)) { $19 = ((($0)) + 96|0); $20 = HEAP32[$19>>2]|0; $21 = ((($20)) + 12|0); $22 = HEAP32[$21>>2]|0; $23 = (FUNCTION_TABLE_iii[$22 & 127]($19,$1)|0); $24 = ($23|0)==(0); if (!($24)) { $$0 = 1; return ($$0|0); } $25 = (_Screen_InputDown($0,$1)|0); $26 = ($25|0)!=(0); $phitmp = $26&1; $$0 = $phitmp; return ($$0|0); } L8: do { switch ($3|0) { case 0: { $5 = $1&255; $6 = ((($0)) + 28|0); HEAP8[$6>>0] = $5; break; } case 1: { $7 = $1 | 1; switch ($7|0) { case 39: { $8 = ((($0)) + 29|0); $9 = HEAP8[$8>>0]|0; $10 = $9 | 1; HEAP8[$8>>0] = $10; break L8; } case 37: { $11 = ((($0)) + 29|0); $12 = HEAP8[$11>>0]|0; $13 = $12 | 2; HEAP8[$11>>0] = $13; break L8; } default: { $14 = ($7|0)==(41); $15 = ((($0)) + 29|0); if ($14) { $16 = HEAP8[$15>>0]|0; $17 = $16 | 4; HEAP8[$15>>0] = $17; break L8; } else { HEAP8[$15>>0] = 0; break L8; } } } } default: { } } } while(0); $18 = ((($0)) + 44|0); HEAP8[$18>>0] = 1; HEAP32[$2>>2] = -1; _EditHotkeyScreen_UpdateBaseKey($0); _EditHotkeyScreen_UpdateModifiers($0); $$0 = 1; return ($$0|0); } function _EditHotkeyScreen_KeyPress($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 44|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if ($4) { $5 = ((($0)) + 96|0); _InputWidget_Append($5,$1); return 1; } else { HEAP8[$2>>0] = 0; return 1; } } function _EditHotkeyScreen_TextChanged($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 96|0); _InputWidget_SetText($2,$1); return 1; } function _EditHotkeyScreen_Layout($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Display_ScaleX(500)|0); $2 = ((($0)) + 60|0); HEAP32[$2>>2] = $1; $3 = HEAP32[(1972116)>>2]|0; $4 = (_Gui_CalcPos(1,0,$1,$3)|0); $5 = ((($0)) + 48|0); HEAP32[$5>>2] = $4; $6 = (_Display_ScaleY(2)|0); $7 = ((($0)) + 64|0); HEAP32[$7>>2] = $6; $8 = (_Display_ScaleY(-65)|0); $9 = HEAP32[$7>>2]|0; $10 = HEAP32[(1972120)>>2]|0; $11 = (_Gui_CalcPos(1,$8,$9,$10)|0); $12 = ((($0)) + 52|0); HEAP32[$12>>2] = $11; $13 = (_Display_ScaleY(45)|0); $14 = HEAP32[$7>>2]|0; $15 = HEAP32[(1972120)>>2]|0; $16 = (_Gui_CalcPos(1,$13,$14,$15)|0); $17 = ((($0)) + 56|0); HEAP32[$17>>2] = $16; $18 = ((($0)) + 400|0); _Widget_SetLocation($18,1,1,0,-150); $19 = ((($0)) + 488|0); _Widget_SetLocation($19,1,1,0,-100); $20 = ((($0)) + 576|0); _Widget_SetLocation($20,1,1,-100,10); $21 = ((($0)) + 664|0); _Widget_SetLocation($21,1,1,0,80); $22 = ((($0)) + 752|0); _Widget_SetLocation($22,1,1,0,130); $23 = ((($0)) + 96|0); _Widget_SetLocation($23,1,1,0,-35); $24 = ((($0)) + 840|0); _Menu_LayoutBack($24); return; } function _EditHotkeyScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 68|0); _Font_Free($1); $2 = ((($0)) + 80|0); _Font_Free($2); _Screen_ContextLost($0); return; } function _EditHotkeyScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 36|0); $2 = HEAP8[$1>>0]|0; $3 = ($2<<24>>24)!=(0); $4 = ((($0)) + 68|0); _Gui_MakeTitleFont($4); $5 = ((($0)) + 80|0); _Gui_MakeBodyFont($5); _Screen_UpdateVb($0); _EditHotkeyScreen_UpdateBaseKey($0); _EditHotkeyScreen_UpdateModifiers($0); _EditHotkeyScreen_UpdateLeaveOpen($0); $6 = ((($0)) + 664|0); $7 = $3 ? 35182 : 35195; _ButtonWidget_SetConst($6,$7,$4); $8 = ((($0)) + 752|0); $9 = $3 ? 35206 : 42804; _ButtonWidget_SetConst($8,$9,$4); $10 = ((($0)) + 96|0); _TextInputWidget_SetFont($10,$5); $11 = ((($0)) + 840|0); _ButtonWidget_SetConst($11,42804,$4); return; } function _EditHotkeyScreen_UpdateBaseKey($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 64|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 64; $5 = ((($0)) + 40|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(0); if ($7) { _String_AppendConst($1,35306); } else { _String_AppendConst($1,35325); $8 = ((($0)) + 28|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (5184 + ($10<<2)|0); $12 = HEAP32[$11>>2]|0; _String_AppendConst($1,$12); } $13 = ((($0)) + 400|0); $14 = ((($0)) + 68|0); _ButtonWidget_Set($13,$1,$14); STACKTOP = sp;return; } function _EditHotkeyScreen_UpdateModifiers($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 64|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 64; $5 = ((($0)) + 40|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(1); if ($7) { _String_AppendConst($1,35246); } else { _String_AppendConst($1,35271); $8 = ((($0)) + 29|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; _EditHotkeyScreen_MakeFlags($10,$1); } $11 = ((($0)) + 488|0); $12 = ((($0)) + 68|0); _ButtonWidget_Set($11,$1,$12); STACKTOP = sp;return; } function _EditHotkeyScreen_UpdateLeaveOpen($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 64|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 64; _String_AppendConst($1,35220); $5 = ((($0)) + 30|0); $6 = HEAP8[$5>>0]|0; $7 = $6 & 1; $8 = ($7<<24>>24)==(0); $9 = $8 ? 35239 : 35243; _String_AppendConst($1,$9); $10 = ((($0)) + 576|0); $11 = ((($0)) + 68|0); _ButtonWidget_Set($10,$1,$11); STACKTOP = sp;return; } function _EditHotkeyScreen_MakeFlags($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($0|0)==(0); if ($2) { _String_AppendConst($1,35282); } _HotkeyListScreen_MakeFlags($0,$1); return; } function _HotkeyListScreen_MakeFlags($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0 & 1; $3 = ($2|0)==(0); if (!($3)) { _String_AppendConst($1,35288); } $4 = $0 & 2; $5 = ($4|0)==(0); if (!($5)) { _String_AppendConst($1,35294); } $6 = $0 & 4; $7 = ($6|0)==(0); if ($7) { return; } _String_AppendConst($1,35301); return; } function _EditHotkeyScreen_BaseKey($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 40|0); HEAP32[$2>>2] = 0; $3 = ((($0)) + 44|0); HEAP8[$3>>0] = 1; _EditHotkeyScreen_UpdateBaseKey($0); return; } function _EditHotkeyScreen_Modifiers($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 40|0); HEAP32[$2>>2] = 1; $3 = ((($0)) + 44|0); HEAP8[$3>>0] = 1; _EditHotkeyScreen_UpdateModifiers($0); return; } function _EditHotkeyScreen_LeaveOpen($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 40|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)>(-1); if ($4) { HEAP32[$2>>2] = -1; $5 = ((($0)) + 44|0); HEAP8[$5>>0] = 0; _EditHotkeyScreen_UpdateBaseKey($0); _EditHotkeyScreen_UpdateModifiers($0); } $6 = ((($0)) + 30|0); $7 = HEAP8[$6>>0]|0; $8 = $7 ^ 1; HEAP8[$6>>0] = $8; _EditHotkeyScreen_UpdateLeaveOpen($0); return; } function _EditHotkeyScreen_SaveChanges($0,$1) { $0 = $0|0; $1 = $1|0; var $$sroa$10$0$copyload = 0, $$sroa$10$0$copyload12 = 0, $$sroa$14$0$copyload17 = 0, $$sroa$4$0$copyload = 0, $$sroa$4$0$copyload5 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = ((($0)) + 36|0); $$sroa$4$0$copyload = HEAP8[$3>>0]|0; $4 = ((($0)) + 37|0); $$sroa$10$0$copyload = HEAP8[$4>>0]|0; $5 = ($$sroa$4$0$copyload<<24>>24)==(0); $6 = $$sroa$4$0$copyload&255; if (!($5)) { (_Hotkeys_Remove($6,$$sroa$10$0$copyload)|0); _StoredHotkeys_Remove($6,$$sroa$10$0$copyload); } $7 = ((($0)) + 28|0); $$sroa$4$0$copyload5 = HEAP8[$7>>0]|0; $8 = ((($0)) + 29|0); $$sroa$10$0$copyload12 = HEAP8[$8>>0]|0; $9 = ((($0)) + 30|0); $$sroa$14$0$copyload17 = HEAP8[$9>>0]|0; $10 = ($$sroa$4$0$copyload5<<24>>24)==(0); if ($10) { _HotkeyListScreen_Show(); STACKTOP = sp;return; } $11 = ((($0)) + 156|0); $12 = $11; $13 = $12; $14 = HEAP32[$13>>2]|0; $15 = (($12) + 4)|0; $16 = $15; $17 = HEAP32[$16>>2]|0; $18 = $2; $19 = $18; HEAP32[$19>>2] = $14; $20 = (($18) + 4)|0; $21 = $20; HEAP32[$21>>2] = $17; $22 = $$sroa$14$0$copyload17 & 1; $23 = $$sroa$4$0$copyload5&255; _Hotkeys_Add($23,$$sroa$10$0$copyload12,$2,$$sroa$14$0$copyload17); _StoredHotkeys_Add($23,$$sroa$10$0$copyload12,$22,$2); _HotkeyListScreen_Show(); STACKTOP = sp;return; } function _EditHotkeyScreen_RemoveHotkey($0,$1) { $0 = $0|0; $1 = $1|0; var $$sroa$3$0$copyload = 0, $$sroa$6$0$copyload = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); $$sroa$3$0$copyload = HEAP8[$2>>0]|0; $3 = ((($0)) + 37|0); $$sroa$6$0$copyload = HEAP8[$3>>0]|0; $4 = ($$sroa$3$0$copyload<<24>>24)==(0); $5 = $$sroa$3$0$copyload&255; if ($4) { _HotkeyListScreen_Show(); return; } (_Hotkeys_Remove($5,$$sroa$6$0$copyload)|0); _StoredHotkeys_Remove($5,$$sroa$6$0$copyload); _HotkeyListScreen_Show(); return; } function _TexturePackScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[(1812068)>>2] = 35346; HEAP32[(1812056)>>2] = 129; HEAP32[(1812060)>>2] = 349; HEAP32[(1812048)>>2] = 130; HEAP32[(1812052)>>2] = 123; HEAP32[(1812064)>>2] = 4; _ListScreen_Show(); return; } function _TexturePackScreen_UploadFunc($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Window_OpenFileDialog(15076)|0); $3 = ($2|0)==(0); if ($3) { return; } _Logger_SimpleWarn($2,35428); return; } function _TexturePackScreen_LoadEntries($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 928|0); (_Directory_Enum(15060,$1,131)|0); _StringsBuffer_Sort($1); return; } function _TexturePackScreen_EntryClick($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; _ListScreen_UNSAFE_GetCur($2,$0,$1); _TexturePack_SetDefault($2); HEAP16[(21780)>>1] = 0; $3 = (_TexturePack_ExtractCurrent(1)|0); $4 = HEAP32[5238]|0; $5 = ($3|0)==($4|0); if (!($5)) { STACKTOP = sp;return; } _Chat_AddRaw(35368); _ListScreen_Reload($0); STACKTOP = sp;return; } function _ListScreen_UpdateEntry($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 816|0); _ButtonWidget_Set($1,$2,$3); return; } function _ListScreen_Reload($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; _ListScreen_Free($0); $1 = ((($0)) + 848|0); $2 = HEAP32[$1>>2]|0; FUNCTION_TABLE_vi[$2 & 511]($0); $3 = ((($0)) + 832|0); $4 = HEAP32[$3>>2]|0; _ListScreen_SetCurrentIndex($0,$4); return; } function _TexturePackScreen_FilterFiles($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = $0; $4 = $3; $5 = HEAP32[$4>>2]|0; $6 = (($3) + 4)|0; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = $2; $10 = $9; HEAP32[$10>>2] = $5; $11 = (($9) + 4)|0; $12 = $11; HEAP32[$12>>2] = $8; $13 = (_String_CaselessEnds($0,15068)|0); $14 = ($13|0)==(0); if ($14) { STACKTOP = sp;return; } _Utils_UNSAFE_TrimFirstDirectory($2); _StringsBuffer_Add($1,$2); STACKTOP = sp;return; } function _TexturePackScreen_UploadCallback($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = $0; $3 = $2; $4 = HEAP32[$3>>2]|0; $5 = (($2) + 4)|0; $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = $1; $9 = $8; HEAP32[$9>>2] = $4; $10 = (($8) + 4)|0; $11 = $10; HEAP32[$11>>2] = $7; _Utils_UNSAFE_GetFilename($1); _ListScreen_Reload(1811212); _TexturePack_SetDefault($1); (_TexturePack_ExtractCurrent(1)|0); STACKTOP = sp;return; } function _SaveLevelScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1095388)>>0] = 1; HEAP8[(1095390)>>0] = 1; HEAP32[273846] = 15104; _Gui_Add(1095384,50); return; } function _SaveLevelScreen_Init($0) { $0 = $0|0; var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($0)) + 16|0); HEAP32[$2>>2] = 6336; $3 = ((($0)) + 20|0); HEAP32[$3>>2] = 5; $4 = ((($0)) + 8|0); HEAP32[$4>>2] = 48; HEAP32[$1>>2] = 21980; $5 = ((($0)) + 48|0); _ButtonWidget_Init($5,400,132); $6 = ((($0)) + 136|0); _ButtonWidget_Init($6,400,133); $7 = ((($0)) + 224|0); _ButtonWidget_Init($7,400,123); $8 = ((($0)) + 312|0); _TextInputWidget_Create($8,400,(1103624),$1); $9 = ((($0)) + 616|0); _TextWidget_Init($9); $10 = ((($0)) + 608|0); HEAP32[$10>>2] = 35503; STACKTOP = sp;return; } function _SaveLevelScreen_Update($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0.0, $4 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 512|0); $3 = +HEAPF64[$2>>3]; $4 = $3 + $1; HEAPF64[$2>>3] = $4; return; } function _SaveLevelScreen_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 312|0); $3 = HEAP32[$2>>2]|0; $4 = ((($3)) + 12|0); $5 = HEAP32[$4>>2]|0; $6 = (FUNCTION_TABLE_iii[$5 & 127]($2,$1)|0); $7 = ($6|0)==(0); if ($7) { $8 = (_Screen_InputDown($0,$1)|0); $$0 = $8; return ($$0|0); } else { _SaveLevelScreen_RemoveOverwrites($0); $$0 = 1; return ($$0|0); } } function _SaveLevelScreen_KeyPress($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; _SaveLevelScreen_RemoveOverwrites($0); $2 = ((($0)) + 312|0); _InputWidget_Append($2,$1); return 1; } function _SaveLevelScreen_TextChanged($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; _SaveLevelScreen_RemoveOverwrites($0); $2 = ((($0)) + 312|0); _InputWidget_SetText($2,$1); return 1; } function _SaveLevelScreen_Layout($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 312|0); _Widget_SetLocation($1,1,1,0,-30); $2 = ((($0)) + 48|0); _Widget_SetLocation($2,1,1,0,20); $3 = ((($0)) + 616|0); _Widget_SetLocation($3,1,1,0,65); $4 = ((($0)) + 136|0); _Widget_SetLocation($4,1,2,0,70); $5 = ((($0)) + 224|0); _Menu_LayoutBack($5); return; } function _SaveLevelScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 24|0); _Font_Free($1); $2 = ((($0)) + 36|0); _Font_Free($2); _Screen_ContextLost($0); return; } function _SaveLevelScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 24|0); _Gui_MakeTitleFont($1); $2 = ((($0)) + 36|0); _Gui_MakeBodyFont($2); _Screen_UpdateVb($0); _SaveLevelScreen_UpdateSave($0); $3 = ((($0)) + 312|0); _TextInputWidget_SetFont($3,$2); $4 = ((($0)) + 224|0); _ButtonWidget_SetConst($4,42804,$1); $5 = ((($0)) + 136|0); _ButtonWidget_SetConst($5,35467,$1); return; } function _SaveLevelScreen_UpdateSave($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 48|0); $2 = ((($0)) + 124|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0|0); $5 = $4 ? 35476 : 35481; $6 = ((($0)) + 24|0); _ButtonWidget_SetConst($1,$5,$6); return; } function _SaveLevelScreen_RemoveOverwrites($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 124|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)==(0|0); if ($3) { return; } HEAP32[$1>>2] = 0; _SaveLevelScreen_UpdateSave($0); return; } function _SaveLevelScreen_Save($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 288|0; $2 = sp + 272|0; $3 = sp; $4 = sp + 264|0; $5 = ((($0)) + 372|0); $6 = $5; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = $4; $13 = $12; HEAP32[$13>>2] = $8; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; $16 = ((($4)) + 4|0); $17 = HEAP16[$16>>1]|0; $18 = ($17<<16>>16)==(0); if ($18) { $19 = ((($0)) + 616|0); $20 = ((($0)) + 36|0); _TextWidget_SetConst($19,35512,$20); STACKTOP = sp;return; } HEAP32[$2>>2] = $3; $21 = ((($2)) + 4|0); HEAP16[$21>>1] = 0; $22 = ((($2)) + 6|0); HEAP16[$22>>1] = 260; _String_Format1($2,35669,$4); _String_Copy((1103624),$4); $23 = (_File_Exists($2)|0); $24 = ($23|0)==(0); if (!($24)) { $25 = ((($1)) + 76|0); $26 = HEAP32[$25>>2]|0; $27 = ($26|0)==(0|0); if ($27) { HEAP32[$25>>2] = 1972899; _SaveLevelScreen_UpdateSave($0); STACKTOP = sp;return; } } _SaveLevelScreen_RemoveOverwrites($0); $28 = (_SaveLevelScreen_SaveMap($2)|0); $29 = ($28|0)==(0); if (!($29)) { STACKTOP = sp;return; } _Chat_Add1(35563,$2); STACKTOP = sp;return; } function _SaveLevelScreen_File($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $switch$split2D = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; HEAP32[$2>>2] = 6368; $3 = ((($2)) + 4|0); HEAP32[$3>>2] = 6384; $4 = ((($2)) + 8|0); $5 = ((($0)) + 372|0); $6 = $5; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = $4; $13 = $12; HEAP32[$13>>2] = $8; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; $16 = ((($2)) + 16|0); HEAP32[$16>>2] = 350; $17 = (_Window_SaveFileDialog($2)|0); $switch$split2D = ($17|0)<(0); L1: do { if ($switch$split2D) { switch ($17|0) { case -857812980: { break; } default: { break L1; } } $18 = ((($0)) + 616|0); $19 = ((($0)) + 36|0); _TextWidget_SetConst($18,35512,$19); STACKTOP = sp;return; } else { switch ($17|0) { case 0: { break; } default: { break L1; } } STACKTOP = sp;return; } } while(0); _Logger_SimpleWarn($17,35538); STACKTOP = sp;return; } function _SaveLevelScreen_UploadCallback($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_SaveLevelScreen_SaveMap($0)|0); $2 = ($1|0)==(0); if (!($2)) { return; } _Chat_Add1(35563,$0); return; } function _SaveLevelScreen_SaveMap($0) { $0 = $0|0; var $$0 = 0, $$019 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 189440|0; $1 = sp + 189376|0; $2 = sp + 189320|0; $3 = sp; $4 = (_Stream_CreateFile($1,$0)|0); $5 = ($4|0)==(0); if (!($5)) { _Logger_SysWarn2($4,45153,$0); $$019 = $4; STACKTOP = sp;return ($$019|0); } _GZip_MakeStream($2,$3,$1); $6 = (_String_CaselessEnds($0,15168)|0); $7 = ($6|0)==(0); do { if ($7) { $9 = (_String_CaselessEnds($0,15176)|0); $10 = ($9|0)==(0); if ($10) { $12 = (_Cw_Save($2)|0); $$0 = $12; break; } else { $11 = (_Dat_Save($2)|0); $$0 = $11; break; } } else { $8 = (_Schematic_Save($2)|0); $$0 = $8; } } while(0); $13 = ($$0|0)==(0); if (!($13)) { $14 = ((($1)) + 28|0); $15 = HEAP32[$14>>2]|0; (FUNCTION_TABLE_ii[$15 & 31]($1)|0); _Logger_SysWarn2($$0,35582,$0); $$019 = $$0; STACKTOP = sp;return ($$019|0); } $16 = ((($2)) + 28|0); $17 = HEAP32[$16>>2]|0; $18 = (FUNCTION_TABLE_ii[$17 & 31]($2)|0); $19 = ($18|0)==(0); $20 = ((($1)) + 28|0); $21 = HEAP32[$20>>2]|0; $22 = (FUNCTION_TABLE_ii[$21 & 31]($1)|0); if (!($19)) { _Logger_SysWarn2($18,45173,$0); $$019 = $18; STACKTOP = sp;return ($$019|0); } $23 = ($22|0)==(0); if ($23) { $24 = +HEAPF64[(1084992)>>3]; HEAPF64[(1103616)>>3] = $24; _Gui_ShowPauseMenu(); $$019 = 0; STACKTOP = sp;return ($$019|0); } else { _Logger_SysWarn2($22,45173,$0); $$019 = $22; STACKTOP = sp;return ($$019|0); } } function _LoadLevelScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[(1812068)>>2] = 35680; HEAP32[(1812056)>>2] = 134; HEAP32[(1812060)>>2] = 351; HEAP32[(1812048)>>2] = 135; HEAP32[(1812052)>>2] = 123; HEAP32[(1812064)>>2] = 4; _ListScreen_Show(); return; } function _LoadLevelScreen_UploadFunc($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Window_OpenFileDialog(15192)|0); $3 = ($2|0)==(0); if ($3) { return; } _Logger_SimpleWarn($2,35428); return; } function _LoadLevelScreen_LoadEntries($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 928|0); (_Directory_Enum(15184,$1,136)|0); _StringsBuffer_Sort($1); return; } function _LoadLevelScreen_EntryClick($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 288|0; $2 = sp + 272|0; $3 = sp; $4 = sp + 264|0; _ListScreen_UNSAFE_GetCur($4,$0,$1); HEAP32[$2>>2] = $3; $5 = ((($2)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($2)) + 6|0); HEAP16[$6>>1] = 260; _String_Format1($2,35691,$4); $7 = (_Map_LoadFrom($2)|0); $8 = HEAP32[5238]|0; $9 = ($7|0)==($8|0); if (!($9)) { STACKTOP = sp;return; } _Chat_AddRaw(35699); _ListScreen_Reload($0); STACKTOP = sp;return; } function _LoadLevelScreen_FilterFiles($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_Map_FindImporter($0)|0); $4 = $0; $5 = $4; $6 = HEAP32[$5>>2]|0; $7 = (($4) + 4)|0; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = $2; $11 = $10; HEAP32[$11>>2] = $6; $12 = (($10) + 4)|0; $13 = $12; HEAP32[$13>>2] = $9; $14 = ($3|0)==(0|0); if ($14) { STACKTOP = sp;return; } _Utils_UNSAFE_TrimFirstDirectory($2); _StringsBuffer_Add($1,$2); STACKTOP = sp;return; } function _LoadLevelScreen_UploadCallback($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; (_Map_LoadFrom($0)|0); return; } function _GenLevelScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1096076)>>0] = 1; HEAP8[(1096078)>>0] = 1; HEAP32[274018] = 15212; _Gui_Add(1096072,50); return; } function _GenLevelScreen_Init($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 6432; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 12; $3 = ((($0)) + 300|0); HEAP32[$3>>2] = 0; $4 = ((($0)) + 8|0); HEAP32[$4>>2] = 88; $5 = HEAP32[(1103564)>>2]|0; _GenLevelScreen_Make($0,0,$5); $6 = HEAP32[(1103568)>>2]|0; _GenLevelScreen_Make($0,1,$6); $7 = HEAP32[(1103572)>>2]|0; _GenLevelScreen_Make($0,2,$7); _GenLevelScreen_Make($0,3,0); $8 = ((($0)) + 1792|0); _TextWidget_Init($8); $9 = ((($0)) + 36|0); _ButtonWidget_Init($9,200,137); $10 = ((($0)) + 124|0); _ButtonWidget_Init($10,200,138); $11 = ((($0)) + 212|0); _ButtonWidget_Init($11,400,123); return; } function _GenLevelScreen_Update($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 300|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0|0); if ($4) { return; } $5 = ((($3)) + 200|0); $6 = +HEAPF64[$5>>3]; $7 = $6 + $1; HEAPF64[$5>>3] = $7; return; } function _GenLevelScreen_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 300|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0|0); if (!($4)) { $5 = HEAP32[$3>>2]|0; $6 = ((($5)) + 12|0); $7 = HEAP32[$6>>2]|0; $8 = (FUNCTION_TABLE_iii[$7 & 127]($3,$1)|0); $9 = ($8|0)==(0); if (!($9)) { $$0 = 1; return ($$0|0); } } $10 = (_Screen_InputDown($0,$1)|0); $$0 = $10; return ($$0|0); } function _GenLevelScreen_KeyPress($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 300|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0|0); if ($4) { return 1; } _InputWidget_Append($3,$1); return 1; } function _GenLevelScreen_TextChanged($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 300|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0|0); if ($4) { return 1; } _InputWidget_SetText($3,$1); return 1; } function _GenLevelScreen_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_Screen_DoPointerDown($0,$1,$2,$3)|0); $5 = ($4|0)==(-1); $6 = ($4|0)>(3); $or$cond = $5 | $6; if ($or$cond) { return 1; } $7 = ((($0)) + 300|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(0|0); if (!($9)) { $10 = ((($8)) + 142|0); HEAP8[$10>>0] = 0; } $11 = ((($0)) + 304|0); $12 = (($11) + (($4*304)|0)|0); HEAP32[$7>>2] = $12; $13 = (((($11) + (($4*304)|0)|0)) + 60|0); _Window_SetKeyboardText($13); return 1; } function _GenLevelScreen_Layout($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1520|0); $2 = ((($0)) + 304|0); _Widget_SetLocation($2,1,1,0,-80); _Widget_SetLocation($1,4,1,110,-80); $3 = ((($0)) + 608|0); _Widget_SetLocation($3,1,1,0,-40); $4 = ((($0)) + 1588|0); _Widget_SetLocation($4,4,1,110,-40); $5 = ((($0)) + 912|0); _Widget_SetLocation($5,1,1,0,0); $6 = ((($0)) + 1656|0); _Widget_SetLocation($6,4,1,110,0); $7 = ((($0)) + 1216|0); _Widget_SetLocation($7,1,1,0,40); $8 = ((($0)) + 1724|0); _Widget_SetLocation($8,4,1,110,40); $9 = ((($0)) + 1792|0); _Widget_SetLocation($9,1,1,0,-130); $10 = ((($0)) + 36|0); _Widget_SetLocation($10,1,1,-120,100); $11 = ((($0)) + 124|0); _Widget_SetLocation($11,1,1,120,100); $12 = ((($0)) + 212|0); _Menu_LayoutBack($12); return; } function _GenLevelScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 24|0); _Font_Free($1); _Screen_ContextLost($0); return; } function _GenLevelScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _Gui_MakeTitleFont($1); $2 = ((($0)) + 24|0); _Gui_MakeBodyFont($2); _Screen_UpdateVb($0); $3 = ((($0)) + 304|0); _TextInputWidget_SetFont($3,$2); $4 = ((($0)) + 608|0); _TextInputWidget_SetFont($4,$2); $5 = ((($0)) + 912|0); _TextInputWidget_SetFont($5,$2); $6 = ((($0)) + 1216|0); _TextInputWidget_SetFont($6,$2); $7 = ((($0)) + 1520|0); _TextWidget_SetConst($7,35789,$2); $8 = ((($0)) + 1588|0); _TextWidget_SetConst($8,35796,$2); $9 = ((($0)) + 1656|0); _TextWidget_SetConst($9,35804,$2); $10 = ((($0)) + 1724|0); _TextWidget_SetConst($10,35812,$2); $11 = ((($0)) + 1792|0); _TextWidget_SetConst($11,35818,$2); $12 = ((($0)) + 36|0); _ButtonWidget_SetConst($12,35837,$1); $13 = ((($0)) + 124|0); _ButtonWidget_SetConst($13,35847,$1); $14 = ((($0)) + 212|0); _ButtonWidget_SetConst($14,42804,$1); _Font_Free($1); STACKTOP = sp;return; } function _GenLevelScreen_Make($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $3 = sp + 80|0; $4 = sp; $5 = sp + 64|0; $6 = ($1|0)==(3); if ($6) { HEAP32[$5>>2] = 21940; $7 = ((($5)) + 4|0); HEAP32[$7>>2] = -2147483648; $8 = ((($5)) + 8|0); HEAP32[$8>>2] = 2147483647; } else { HEAP32[$5>>2] = 21920; $9 = ((($5)) + 4|0); HEAP32[$9>>2] = 1; $10 = ((($5)) + 8|0); HEAP32[$10>>2] = 8192; $11 = ((($5)) + 12|0); HEAP32[$11>>2] = $2; } HEAP32[$3>>2] = $4; $12 = ((($3)) + 4|0); HEAP16[$12>>1] = 0; $13 = ((($3)) + 6|0); HEAP16[$13>>1] = 64; $14 = HEAP32[$5>>2]|0; $15 = ((($14)) + 16|0); $16 = HEAP32[$15>>2]|0; FUNCTION_TABLE_vii[$16 & 255]($5,$3); $17 = (((($0)) + 304|0) + (($1*304)|0)|0); _TextInputWidget_Create($17,200,$3,$5); $18 = (((((($0)) + 304|0) + (($1*304)|0)|0)) + 142|0); HEAP8[$18>>0] = 0; $19 = (((($0)) + 1520|0) + (($1*68)|0)|0); _TextWidget_Init($19); $20 = (((((($0)) + 1520|0) + (($1*68)|0)|0)) + 64|0); HEAP32[$20>>2] = -2039584; $21 = (((((($0)) + 304|0) + (($1*304)|0)|0)) + 300|0); HEAP32[$21>>2] = 3; STACKTOP = sp;return; } function _GenLevelScreen_Flatgrass($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _GenLevelScreen_Gen($0,0); return; } function _GenLevelScreen_Notchy($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _GenLevelScreen_Gen($0,1); return; } function _GenLevelScreen_Gen($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, $or$cond = 0, $or$cond3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_GenLevelScreen_GetInt($0,0)|0); $3 = (_GenLevelScreen_GetInt($0,1)|0); $4 = (_GenLevelScreen_GetInt($0,2)|0); $5 = (_GenLevelScreen_GetSeedInt($0)|0); $6 = ($2|0)<(0); $7 = $6 << 31 >> 31; $8 = ($3|0)<(0); $9 = $8 << 31 >> 31; $10 = (___muldi3(($3|0),($9|0),($2|0),($7|0))|0); $11 = (getTempRet0() | 0); $12 = ($4|0)<(0); $13 = $12 << 31 >> 31; $14 = (___muldi3(($10|0),($11|0),($4|0),($13|0))|0); $15 = (getTempRet0() | 0); $16 = ($15>>>0)>(0); $17 = ($14>>>0)>(2147483647); $18 = ($15|0)==(0); $19 = $18 & $17; $20 = $16 | $19; if ($20) { _Chat_AddRaw(35855); return; } $21 = ($2|0)!=(0); $22 = ($3|0)!=(0); $or$cond = $21 & $22; $23 = ($4|0)!=(0); $or$cond3 = $or$cond & $23; if ($or$cond3) { HEAP8[1972848] = $1; HEAP32[450771] = $5; _Gui_Remove($0); _Menu_BeginGen($2,$3,$4); return; } else { _Chat_AddRaw(35896); return; } } function _GenLevelScreen_GetInt($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = sp + 8|0; $4 = (((((($0)) + 304|0) + (($1*304)|0)|0)) + 60|0); $5 = $4; $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = (($5) + 4)|0; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = $2; $12 = $11; HEAP32[$12>>2] = $7; $13 = (($11) + 4)|0; $14 = $13; HEAP32[$14>>2] = $10; $15 = (((((($0)) + 304|0) + (($1*304)|0)|0)) + 216|0); $16 = HEAP32[$15>>2]|0; $17 = ((($16)) + 12|0); $18 = HEAP32[$17>>2]|0; $19 = (FUNCTION_TABLE_iii[$18 & 127]($15,$2)|0); $20 = ($19<<24>>24)==(0); if ($20) { $$0 = 0; STACKTOP = sp;return ($$0|0); } (_Convert_ParseInt($2,$3)|0); $21 = HEAP32[$3>>2]|0; $$0 = $21; STACKTOP = sp;return ($$0|0); } function _GenLevelScreen_GetSeedInt($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($0)) + 1280|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { _Random_SeedFromCurrentTime($1); $5 = (_Random_Next($1,2147483647)|0); $$0 = $5; STACKTOP = sp;return ($$0|0); } else { $6 = (_GenLevelScreen_GetInt($0,3)|0); $$0 = $6; STACKTOP = sp;return ($$0|0); } } function _Menu_BeginGen($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _World_NewMap(); _World_SetDimensions($0,$1,$2); _GeneratingScreen_Show(); return; } function _OptionsGroupScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1818100)>>0] = 1; HEAP8[(1818102)>>0] = 1; HEAP32[454524] = 15276; _Gui_Add(1818096,50); return; } function _OptionsGroupScreen_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; _Event_Register((1794308),$0,352); $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 8288; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 10; $3 = ((($0)) + 24|0); HEAP32[$3>>2] = -1; $4 = ((($0)) + 8|0); HEAP32[$4>>2] = 112; $5 = ((($0)) + 40|0); _Menu_InitButtons($5,300,6480,8); $6 = ((($0)) + 744|0); _TextWidget_Init($6); $7 = ((($0)) + 812|0); _ButtonWidget_Init($7,400,123); return; } function _OptionsGroupScreen_Free($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Event_Unregister((1794308),$0,352); return; } function _OptionsGroupScreen_PointerMove($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_Menu_DoPointerMove($0,$2,$3)|0); $5 = ($4|0)==(-1); if ($5) { return 1; } $6 = ((($0)) + 24|0); $7 = HEAP32[$6>>2]|0; $8 = ($4|0)==($7|0); $9 = ($4>>>0)>(7); $or$cond = $9 | $8; if ($or$cond) { return 1; } HEAP32[$6>>2] = $4; _OptionsGroupScreen_UpdateDesc($0); return 1; } function _OptionsGroupScreen_Layout($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 40|0); _Menu_LayoutButtons($1,6480,8); $2 = ((($0)) + 744|0); _Widget_SetLocation($2,1,1,0,100); $3 = ((($0)) + 812|0); _Menu_LayoutBack($3); return; } function _OptionsGroupScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 28|0); _Font_Free($1); _Screen_ContextLost($0); return; } function _OptionsGroupScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _Screen_UpdateVb($0); _Gui_MakeTitleFont($1); $2 = ((($0)) + 28|0); _Gui_MakeBodyFont($2); $3 = ((($0)) + 40|0); _Menu_SetButtons($3,$1,6480,8); $4 = ((($0)) + 812|0); _ButtonWidget_SetConst($4,34990,$1); $5 = ((($0)) + 24|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)>(-1); if ($7) { _OptionsGroupScreen_UpdateDesc($0); } _OptionsGroupScreen_CheckHacksAllowed($0); _Font_Free($1); STACKTOP = sp;return; } function _OptionsGroupScreen_UpdateDesc($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 744|0); $2 = ((($0)) + 24|0); $3 = HEAP32[$2>>2]|0; $4 = (6576 + ($3<<2)|0); $5 = HEAP32[$4>>2]|0; $6 = ((($0)) + 28|0); _TextWidget_SetConst($1,$5,$6); return; } function _OptionsGroupScreen_CheckHacksAllowed($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1784311)>>0]|0; $2 = ($1<<24>>24)==(0); $3 = $2&1; $4 = ((($0)) + 589|0); HEAP8[$4>>0] = $3; $5 = ((($0)) + 7|0); HEAP8[$5>>0] = 1; return; } function _Menu_SwitchMisc($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _MiscOptionsScreen_Show(); return; } function _Menu_SwitchGui($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _GuiOptionsScreen_Show(); return; } function _Menu_SwitchGfx($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _GraphicsOptionsScreen_Show(); return; } function _Menu_SwitchKeysNormal($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _NormalKeyBindingsScreen_Show(); return; } function _Menu_SwitchChat($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _ChatOptionsScreen_Show(); return; } function _Menu_SwitchHacks($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _HacksSettingsScreen_Show(); return; } function _Menu_SwitchEnv($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _EnvSettingsScreen_Show(); return; } function _Menu_SwitchNostalgia($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _NostalgiaScreen_Show(); return; } function _NostalgiaScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; _MenuOptionsScreen_Show(0,0,0,353); return; } function _NostalgiaScreen_InitWidgets($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); HEAP32[$1>>2] = 10; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = (($3) + 112)|0; HEAP32[$2>>2] = $4; $5 = ((($0)) + 48|0); HEAP32[$5>>2] = 354; _MenuOptionsScreen_InitButtons($0,6656,9,139); _TextWidget_Init(1820284); _Widget_SetLocation(1820284,1,1,0,100); $6 = ((($0)) + 16|0); $7 = HEAP32[$6>>2]|0; $8 = ((($7)) + 36|0); HEAP32[$8>>2] = 1820284; return; } function _MenuOptionsScreen_Show($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1819000)>>0] = 1; HEAP8[(1819002)>>0] = 1; HEAP32[454749] = 15340; HEAP32[(1819020)>>2] = $0; HEAP32[(1819024)>>2] = $1; HEAP32[(1819036)>>2] = $2; HEAP32[(1819040)>>2] = $3; HEAP32[(1819044)>>2] = 0; HEAP32[(1819048)>>2] = 0; _Gui_Add(1818996,50); return; } function _MenuOptionsScreen_Init($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 6608; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 11; HEAP32[1652] = 0; HEAP32[(6612)>>2] = 0; HEAP32[(6616)>>2] = 0; $3 = HEAP32[$1>>2]|0; $4 = ((($3)) + 12|0); HEAP32[$4>>2] = 0; $5 = HEAP32[$1>>2]|0; $6 = ((($5)) + 16|0); HEAP32[$6>>2] = 0; $7 = HEAP32[$1>>2]|0; $8 = ((($7)) + 20|0); HEAP32[$8>>2] = 0; $9 = HEAP32[$1>>2]|0; $10 = ((($9)) + 24|0); HEAP32[$10>>2] = 0; $11 = HEAP32[$1>>2]|0; $12 = ((($11)) + 28|0); HEAP32[$12>>2] = 0; $13 = HEAP32[$1>>2]|0; $14 = ((($13)) + 32|0); HEAP32[$14>>2] = 0; $15 = HEAP32[$1>>2]|0; $16 = ((($15)) + 36|0); HEAP32[$16>>2] = 0; $17 = ((($0)) + 8|0); HEAP32[$17>>2] = 12; $18 = ((($0)) + 32|0); HEAP32[$18>>2] = -1; $19 = ((($0)) + 36|0); HEAP32[$19>>2] = -1; $20 = ((($0)) + 44|0); $21 = HEAP32[$20>>2]|0; FUNCTION_TABLE_vi[$21 & 511]($0); $22 = ((($0)) + 88|0); $23 = ((($0)) + 176|0); _TextGroupWidget_Create($22,5,$23,140); $24 = ((($0)) + 124|0); HEAP32[$24>>2] = 0; _Event_Register((1794308),$0,355); return; } function _MenuOptionsScreen_Free($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Event_Unregister((1794308),$0,355); _Gui_RemoveCore(1097936); return; } function _MenuOptionsScreen_Render($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _MenuScreen_Render2($0,$1); $2 = ((($0)) + 88|0); $3 = ((($0)) + 124|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)==(0); if ($5) { return; } $6 = ((($0)) + 92|0); $7 = HEAP32[$6>>2]|0; $8 = (($7) + -5)|0; $9 = ((($0)) + 96|0); $10 = HEAP32[$9>>2]|0; $11 = (($10) + -5)|0; $12 = ((($0)) + 100|0); $13 = HEAP32[$12>>2]|0; $14 = (($13) + 10)|0; $15 = ((($0)) + 104|0); $16 = HEAP32[$15>>2]|0; $17 = (($16) + 10)|0; _Gfx_Draw2DFlat($8,$11,$14,$17,-938208236); $18 = HEAP32[$2>>2]|0; $19 = HEAP32[$18>>2]|0; FUNCTION_TABLE_vid[$19 & 63]($2,$1); return; } function _MenuOptionsScreen_PointerMove($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_Menu_DoPointerMove($0,$2,$3)|0); $5 = ($4|0)==(-1); if ($5) { return 1; } $6 = ((($0)) + 36|0); $7 = HEAP32[$6>>2]|0; $8 = ($4|0)==($7|0); if ($8) { return 1; } $9 = ((($0)) + 28|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0|0); if ($11) { return 1; } $12 = ((($0)) + 40|0); $13 = HEAP32[$12>>2]|0; $14 = ($4|0)<($13|0); if (!($14)) { return 1; } HEAP32[$6>>2] = $4; $15 = ((($0)) + 32|0); $16 = HEAP32[$15>>2]|0; $17 = ($16|0)==(-1); if (!($17)) { return 1; } _MenuOptionsScreen_SelectExtHelp($0,$4); return 1; } function _MenuOptionsScreen_Layout($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; _Screen_Layout($0); $1 = ((($0)) + 1196|0); _Menu_LayoutBack($1); _MenuOptionsScreen_LayoutExtHelp($0); return; } function _MenuOptionsScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 64|0); _Font_Free($1); $2 = ((($0)) + 76|0); _Font_Free($2); _Screen_ContextLost($0); $3 = ((($0)) + 88|0); $4 = HEAP32[$3>>2]|0; $5 = ((($4)) + 4|0); $6 = HEAP32[$5>>2]|0; FUNCTION_TABLE_vi[$6 & 511]($3); return; } function _MenuOptionsScreen_ContextRecreated($0) { $0 = $0|0; var $$020 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $1 = ((($0)) + 64|0); _Gui_MakeTitleFont($1); $2 = ((($0)) + 76|0); _Gui_MakeBodyFont($2); _Screen_UpdateVb($0); $3 = ((($0)) + 56|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if ($5) { $6 = ((($0)) + 16|0); $$020 = 0; while(1) { $7 = HEAP32[$6>>2]|0; $8 = (($7) + ($$020<<2)|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)==(0|0); if (!($10)) { _MenuOptionsScreen_Update($0,$$020); } $11 = (($$020) + 1)|0; $12 = HEAP32[$3>>2]|0; $13 = ($11|0)<($12|0); if ($13) { $$020 = $11; } else { break; } } } $14 = ((($0)) + 1196|0); _ButtonWidget_SetConst($14,34990,$1); $15 = ((($0)) + 48|0); $16 = HEAP32[$15>>2]|0; $17 = ($16|0)==(0|0); if ($17) { $18 = ((($0)) + 88|0); _TextGroupWidget_SetFont($18,$2); _TextGroupWidget_RedrawAll($18); return; } FUNCTION_TABLE_vi[$16 & 511]($0); $18 = ((($0)) + 88|0); _TextGroupWidget_SetFont($18,$2); _TextGroupWidget_RedrawAll($18); return; } function _MenuOptionsScreen_Update($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp + 64|0; $3 = sp; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 64; $6 = (((($0)) + 316|0) + (($1*88)|0)|0); $7 = (((((($0)) + 316|0) + (($1*88)|0)|0)) + 76|0); $8 = HEAP32[$7>>2]|0; _String_AppendConst($2,$8); $9 = (((((($0)) + 316|0) + (($1*88)|0)|0)) + 80|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0|0); if ($11) { $13 = ((($0)) + 64|0); _ButtonWidget_Set($6,$2,$13); STACKTOP = sp;return; } _String_AppendConst($2,36396); $12 = HEAP32[$9>>2]|0; FUNCTION_TABLE_vi[$12 & 511]($2); $13 = ((($0)) + 64|0); _ButtonWidget_Set($6,$2,$13); STACKTOP = sp;return; } function _MenuOptionsScreen_LayoutExtHelp($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 88|0); _Widget_SetLocation($1,0,3,0,100); $2 = HEAP32[(1972116)>>2]|0; $3 = (($2|0) / 2)&-1; $4 = ((($0)) + 100|0); $5 = HEAP32[$4>>2]|0; $6 = (($5|0) / 2)&-1; $7 = (($3) - ($6))|0; $8 = ((($0)) + 112|0); HEAP32[$8>>2] = $7; $9 = HEAP32[$1>>2]|0; $10 = ((($9)) + 8|0); $11 = HEAP32[$10>>2]|0; FUNCTION_TABLE_vi[$11 & 511]($1); return; } function _MenuOptionsScreen_SelectExtHelp($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $2 = sp + 40|0; $3 = sp; _MenuOptionsScreen_FreeExtHelp($0); $4 = ((($0)) + 28|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)==(0|0); if ($6) { STACKTOP = sp;return; } $7 = ((($0)) + 32|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)>(-1); if ($9) { STACKTOP = sp;return; } $10 = (($5) + ($1<<2)|0); $11 = HEAP32[$10>>2]|0; $12 = ($11|0)==(0|0); if ($12) { STACKTOP = sp;return; } _String_FromReadonly($2,$11); $13 = (_String_UNSAFE_Split($2,10,$3,5)|0); $14 = ((($0)) + 88|0); $15 = ((($0)) + 124|0); HEAP32[$15>>2] = $13; $16 = ((($0)) + 1284|0); HEAP32[$16>>2] = $11; _TextGroupWidget_RedrawAll($14); _MenuOptionsScreen_LayoutExtHelp($0); STACKTOP = sp;return; } function _MenuOptionsScreen_FreeExtHelp($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 88|0); $2 = HEAP32[$1>>2]|0; $3 = ((($2)) + 4|0); $4 = HEAP32[$3>>2]|0; FUNCTION_TABLE_vi[$4 & 511]($1); $5 = ((($0)) + 124|0); HEAP32[$5>>2] = 0; return; } function _MenuOptionsScreen_OnHacksChanged($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 52|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)==(0|0); if (!($3)) { FUNCTION_TABLE_vi[$2 & 511]($0); } $4 = ((($0)) + 7|0); HEAP8[$4>>0] = 1; return; } function _MenuOptionsScreen_GetDesc($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $2 = sp + 40|0; $3 = sp; $4 = HEAP32[(1820280)>>2]|0; _String_FromReadonly($2,$4); (_String_UNSAFE_Split($2,10,$3,5)|0); $5 = (($3) + ($1<<3)|0); $6 = $5; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = $0; $13 = $12; HEAP32[$13>>2] = $8; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; STACKTOP = sp;return; } function _NostalgiaScreen_RecreateExtra($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 76|0); _TextWidget_SetConst(1820284,36737,$1); return; } function _NostalgiaScreen_SwitchBack($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1803522)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { _Menu_SwitchOptions($0,$1); return; } else { _Menu_SwitchPause($0,$1); return; } } function _MenuOptionsScreen_InitButtons($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$030 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($2|0)>(0); if (!($4)) { $28 = ((($0)) + 56|0); HEAP32[$28>>2] = $2; $29 = ((($0)) + 1196|0); _ButtonWidget_Init($29,400,$3); return; } $5 = ((($0)) + 16|0); $$030 = 0; while(1) { $6 = (((($0)) + 316|0) + (($$030*88)|0)|0); $7 = (((($1) + (($$030*20)|0)|0)) + 8|0); $8 = HEAP32[$7>>2]|0; $9 = (($1) + (($$030*20)|0)|0); $10 = HEAP16[$9>>1]|0; $11 = $10 << 16 >> 16; $12 = ($11*160)|0; $13 = (((($1) + (($$030*20)|0)|0)) + 2|0); $14 = HEAP16[$13>>1]|0; $15 = $14 << 16 >> 16; _ButtonWidget_Make($6,300,$8,1,1,$12,$15); $16 = (((($1) + (($$030*20)|0)|0)) + 4|0); $17 = HEAP32[$16>>2]|0; $18 = (((((($0)) + 316|0) + (($$030*88)|0)|0)) + 76|0); HEAP32[$18>>2] = $17; $19 = (((($1) + (($$030*20)|0)|0)) + 12|0); $20 = HEAP32[$19>>2]|0; $21 = (((((($0)) + 316|0) + (($$030*88)|0)|0)) + 80|0); HEAP32[$21>>2] = $20; $22 = (((($1) + (($$030*20)|0)|0)) + 16|0); $23 = HEAP32[$22>>2]|0; $24 = (((((($0)) + 316|0) + (($$030*88)|0)|0)) + 84|0); HEAP32[$24>>2] = $23; $25 = HEAP32[$5>>2]|0; $26 = (($25) + ($$030<<2)|0); HEAP32[$26>>2] = $6; $27 = (($$030) + 1)|0; $exitcond = ($27|0)==($2|0); if ($exitcond) { break; } else { $$030 = $27; } } $28 = ((($0)) + 56|0); HEAP32[$28>>2] = $2; $29 = ((($0)) + 1196|0); _ButtonWidget_Init($29,400,$3); return; } function _MenuOptionsScreen_Bool($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp + 72|0; $3 = sp; $4 = sp + 64|0; HEAP32[$2>>2] = $3; $5 = ((($2)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($2)) + 6|0); HEAP16[$6>>1] = 64; $7 = ((($1)) + 80|0); $8 = HEAP32[$7>>2]|0; FUNCTION_TABLE_vi[$8 & 511]($2); $9 = (_String_CaselessEqualsConst($2,35243)|0); $10 = $9 & 255; $11 = ($10|0)==(0); $12 = $11 ? 35243 : 35239; _String_FromReadonly($4,$12); $13 = $4; $14 = $13; $15 = HEAP32[$14>>2]|0; $16 = (($13) + 4)|0; $17 = $16; $18 = HEAP32[$17>>2]|0; $19 = $2; $20 = $19; HEAP32[$20>>2] = $15; $21 = (($19) + 4)|0; $22 = $21; HEAP32[$22>>2] = $18; $23 = (_Screen_Index($0,$1)|0); _MenuOptionsScreen_Set($0,$23,$2); STACKTOP = sp;return; } function _NostalgiaScreen_GetHand($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1826322)>>0]|0; _Menu_GetBool($0,$1); return; } function _NostalgiaScreen_SetHand($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,40789)|0); HEAP8[(1826322)>>0] = $1; return; } function _NostalgiaScreen_GetAnim($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972838]|0; $2 = ($1<<24>>24)==(0); $3 = $2&1; _Menu_GetBool($0,$3); return; } function _NostalgiaScreen_SetAnim($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_String_CaselessEqualsConst($0,35239)|0); $2 = $1&255; HEAP8[1972838] = $2; _Options_SetBool(36716,$2); return; } function _NostalgiaScreen_GetGui($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803520)>>0]|0; _Menu_GetBool($0,$1); return; } function _NostalgiaScreen_SetGui($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,36695)|0); HEAP8[(1803520)>>0] = $1; return; } function _NostalgiaScreen_GetList($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803521)>>0]|0; _Menu_GetBool($0,$1); return; } function _NostalgiaScreen_SetList($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,36670)|0); HEAP8[(1803521)>>0] = $1; return; } function _NostalgiaScreen_GetOpts($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803522)>>0]|0; _Menu_GetBool($0,$1); return; } function _NostalgiaScreen_SetOpts($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,36645)|0); HEAP8[(1803522)>>0] = $1; return; } function _NostalgiaScreen_GetCustom($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972841]|0; _Menu_GetBool($0,$1); return; } function _NostalgiaScreen_SetCustom($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,36622)|0); HEAP8[1972841] = $1; return; } function _NostalgiaScreen_GetCPE($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972842]|0; _Menu_GetBool($0,$1); return; } function _NostalgiaScreen_SetCPE($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,36605)|0); HEAP8[1972842] = $1; return; } function _NostalgiaScreen_GetTexs($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972843]|0; _Menu_GetBool($0,$1); return; } function _NostalgiaScreen_SetTexs($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,36580)|0); HEAP8[1972843] = $1; return; } function _NostalgiaScreen_GetClassicChat($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803523)>>0]|0; _Menu_GetBool($0,$1); return; } function _NostalgiaScreen_SetClassicChat($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,36558)|0); HEAP8[(1803523)>>0] = $1; return; } function _Menu_SetBool($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_String_CaselessEqualsConst($0,35243)|0); $3 = $2&255; _Options_SetBool($1,$3); return ($3|0); } function _Menu_GetBool($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(0); $3 = $2 ? 35239 : 35243; _String_AppendConst($0,$3); return; } function _MenuOptionsScreen_Set($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (((((($0)) + 316|0) + (($1*88)|0)|0)) + 84|0); $4 = HEAP32[$3>>2]|0; FUNCTION_TABLE_vi[$4 & 511]($2); _MenuOptionsScreen_Update($0,$1); return; } function _EnvSettingsScreen_Show() { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[99940] = 21900; HEAP32[(399764)>>2] = -1; HEAP32[(399776)>>2] = 21900; HEAP32[(399780)>>2] = -13159; HEAP32[(399792)>>2] = 21900; HEAP32[(399796)>>2] = -1; HEAP32[(399808)>>2] = 21960; HEAPF32[(399812)>>2] = 0.0; HEAPF32[(399816)>>2] = 1000.0; HEAPF32[(399820)>>2] = 1.0; HEAP32[(399824)>>2] = 21920; HEAP32[(399828)>>2] = -10000; HEAP32[(399832)>>2] = 10000; $0 = HEAP32[(1103568)>>2]|0; $1 = (($0) + 2)|0; HEAP32[(399836)>>2] = $1; HEAP32[(399840)>>2] = 21900; HEAP32[(399844)>>2] = -1; HEAP32[(399856)>>2] = 21900; HEAP32[(399860)>>2] = -6579301; HEAP32[(399872)>>2] = 0; HEAP32[(399876)>>2] = 22640; HEAP32[(399880)>>2] = 3; HEAP32[(399888)>>2] = 21960; HEAPF32[(399892)>>2] = -100.0; HEAPF32[(399896)>>2] = 100.0; HEAPF32[(399900)>>2] = 1.0; HEAP32[(399904)>>2] = 21920; HEAP32[(399908)>>2] = -2048; HEAP32[(399912)>>2] = 2048; $2 = (($0|0) / 2)&-1; HEAP32[(399916)>>2] = $2; _MenuOptionsScreen_Show(399760,0,0,356); return; } function _EnvSettingsScreen_InitWidgets($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); HEAP32[$1>>2] = 10; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = (($3) + 120)|0; HEAP32[$2>>2] = $4; _MenuOptionsScreen_InitButtons($0,6848,10,25); return; } function _MenuOptionsScreen_Input($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp + 64|0; $3 = sp; _MenuOptionsScreen_FreeExtHelp($0); $4 = (_Screen_Index($0,$1)|0); $5 = ((($0)) + 32|0); HEAP32[$5>>2] = $4; HEAP32[$2>>2] = $3; $6 = ((($2)) + 4|0); HEAP16[$6>>1] = 0; $7 = ((($2)) + 6|0); HEAP16[$7>>1] = 64; $8 = ((($1)) + 80|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_vi[$9 & 511]($2); $10 = ((($0)) + 24|0); $11 = HEAP32[$10>>2]|0; $12 = HEAP32[$5>>2]|0; $13 = (($11) + ($12<<4)|0); $14 = HEAP8[1972870]|0; _MenuInputOverlay_Show($13,$2,141,$14); STACKTOP = sp;return; } function _EnvSettingsScreen_GetCloudsColor($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972196)>>2]|0; _PackedCol_ToHex($0,$1); return; } function _EnvSettingsScreen_SetCloudsColor($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_HexCol($0)|0); _Env_SetCloudsCol($1); return; } function _EnvSettingsScreen_GetSkyColor($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972188)>>2]|0; _PackedCol_ToHex($0,$1); return; } function _EnvSettingsScreen_SetSkyColor($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_HexCol($0)|0); _Env_SetSkyCol($1); return; } function _EnvSettingsScreen_GetFogColor($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972192)>>2]|0; _PackedCol_ToHex($0,$1); return; } function _EnvSettingsScreen_SetFogColor($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_HexCol($0)|0); _Env_SetFogCol($1); return; } function _EnvSettingsScreen_GetCloudsSpeed($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1972160)>>2]; _String_AppendFloat($0,$1,2); return; } function _EnvSettingsScreen_SetCloudsSpeed($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (+_Menu_Float($0)); _Env_SetCloudsSpeed($1); return; } function _EnvSettingsScreen_GetCloudsHeight($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972156)>>2]|0; _String_AppendInt($0,$1); return; } function _EnvSettingsScreen_SetCloudsHeight($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_Int($0)|0); _Env_SetCloudsHeight($1); return; } function _EnvSettingsScreen_GetSunColor($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972204)>>2]|0; _PackedCol_ToHex($0,$1); return; } function _EnvSettingsScreen_SetSunColor($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_HexCol($0)|0); _Env_SetSunCol($1); return; } function _EnvSettingsScreen_GetShadowColor($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972220)>>2]|0; _PackedCol_ToHex($0,$1); return; } function _EnvSettingsScreen_SetShadowColor($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_HexCol($0)|0); _Env_SetShadowCol($1); return; } function _MenuOptionsScreen_Enum($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp + 72|0; $3 = sp; $4 = sp + 64|0; $5 = (_Screen_Index($0,$1)|0); HEAP32[$2>>2] = $3; $6 = ((($2)) + 4|0); HEAP16[$6>>1] = 0; $7 = ((($2)) + 6|0); HEAP16[$7>>1] = 64; $8 = ((($1)) + 80|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_vi[$9 & 511]($2); $10 = ((($0)) + 24|0); $11 = HEAP32[$10>>2]|0; $12 = (((($11) + ($5<<4)|0)) + 4|0); $13 = HEAP32[$12>>2]|0; $14 = (((($11) + ($5<<4)|0)) + 8|0); $15 = HEAP32[$14>>2]|0; $16 = (_Utils_ParseEnum($2,0,$13,$15)|0); $17 = (($16) + 1)|0; $18 = (($17|0) % ($15|0))&-1; $19 = (($13) + ($18<<2)|0); $20 = HEAP32[$19>>2]|0; _String_FromReadonly($4,$20); $21 = $4; $22 = $21; $23 = HEAP32[$22>>2]|0; $24 = (($21) + 4)|0; $25 = $24; $26 = HEAP32[$25>>2]|0; $27 = $2; $28 = $27; HEAP32[$28>>2] = $23; $29 = (($27) + 4)|0; $30 = $29; HEAP32[$30>>2] = $26; _MenuOptionsScreen_Set($0,$5,$2); STACKTOP = sp;return; } function _EnvSettingsScreen_GetWeather($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972172)>>2]|0; $2 = (22640 + ($1<<2)|0); $3 = HEAP32[$2>>2]|0; _String_AppendConst($0,$3); return; } function _EnvSettingsScreen_SetWeather($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Utils_ParseEnum($0,0,22640,3)|0); _Env_SetWeather($1); return; } function _EnvSettingsScreen_GetWeatherSpeed($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1972164)>>2]; _String_AppendFloat($0,$1,2); return; } function _EnvSettingsScreen_SetWeatherSpeed($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (+_Menu_Float($0)); _Env_SetWeatherSpeed($1); return; } function _EnvSettingsScreen_GetEdgeHeight($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972148)>>2]|0; _String_AppendInt($0,$1); return; } function _EnvSettingsScreen_SetEdgeHeight($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_Int($0)|0); _Env_SetEdgeHeight($1); return; } function _Menu_Int($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; (_Convert_ParseInt($0,$1)|0); $2 = HEAP32[$1>>2]|0; STACKTOP = sp;return ($2|0); } function _Menu_Float($0) { $0 = $0|0; var $1 = 0, $2 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; (_Convert_ParseFloat($0,$1)|0); $2 = +HEAPF32[$1>>2]; STACKTOP = sp;return (+$2); } function _Menu_HexCol($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; (_PackedCol_TryParseHex($0,$1)|0); $2 = HEAP8[$1>>0]|0; $3 = $2&255; $4 = ((($1)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; $7 = $6 << 8; $8 = ((($1)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = $10 << 16; $12 = $7 | $3; $13 = $12 | $11; $14 = $13 | -16777216; STACKTOP = sp;return ($14|0); } function _MenuOptionsScreen_OnDone($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(0); if (!($2)) { $3 = HEAP32[(1819028)>>2]|0; _MenuOptionsScreen_Set(1818996,$3,$0); HEAP8[(1819003)>>0] = 1; } $4 = HEAP32[(1819028)>>2]|0; _MenuOptionsScreen_SelectExtHelp(1818996,$4); HEAP32[(1819028)>>2] = -1; return; } function _MenuInputOverlay_Show($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1097940)>>0] = 1; HEAP8[(1097942)>>0] = 1; HEAP32[(1098456)>>2] = $0; HEAP32[(1098460)>>2] = $2; HEAP8[(1097960)>>0] = $3; HEAP32[274484] = 15404; HEAP32[(1098464)>>2] = (1098472); HEAP16[(1098468)>>1] = 0; HEAP16[(1098470)>>1] = 64; _String_Copy((1098464),$1); _Gui_Add(1097936,57); return; } function _MenuInputOverlay_Init($0) { $0 = $0|0; var $$sink = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 15468; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 3; $3 = ((($0)) + 8|0); HEAP32[$3>>2] = 32; $4 = ((($0)) + 216|0); $5 = ((($0)) + 528|0); $6 = ((($0)) + 520|0); $7 = HEAP32[$6>>2]|0; _TextInputWidget_Create($4,400,$5,$7); $8 = ((($0)) + 128|0); _ButtonWidget_Init($8,200,142); $9 = ((($0)) + 40|0); $10 = HEAP8[1972870]|0; $11 = ($10<<24>>24)==(0); $12 = $11 ? 40 : 200; _ButtonWidget_Init($9,$12,143); $13 = HEAP32[$6>>2]|0; $14 = HEAP32[$13>>2]|0; $15 = ($14|0)==(21920|0); if ($15) { $$sink = 3; } else { $16 = ($14|0)==(21960|0); if ($16) { $$sink = 1; } else { return; } } $17 = ((($0)) + 516|0); HEAP32[$17>>2] = $$sink; return; } function _MenuInputOverlay_Update($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0.0, $4 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 416|0); $3 = +HEAPF64[$2>>3]; $4 = $3 + $1; HEAPF64[$2>>3] = $4; return; } function _MenuInputOverlay_Free($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 216|0); $2 = HEAP32[$1>>2]|0; $3 = ((($2)) + 4|0); $4 = HEAP32[$3>>2]|0; FUNCTION_TABLE_vi[$4 & 511]($1); $5 = ((($0)) + 40|0); $6 = HEAP32[$5>>2]|0; $7 = ((($6)) + 4|0); $8 = HEAP32[$7>>2]|0; FUNCTION_TABLE_vi[$8 & 511]($5); $9 = ((($0)) + 128|0); $10 = HEAP32[$9>>2]|0; $11 = ((($10)) + 4|0); $12 = HEAP32[$11>>2]|0; FUNCTION_TABLE_vi[$12 & 511]($9); _Window_CloseKeyboard(); return; } function _MenuInputOverlay_Render($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 24|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if (!($4)) { _Menu_RenderBounds(); } _Screen_Render2Widgets($0,$1); return; } function _MenuInputOverlay_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 216|0); $3 = HEAP32[$2>>2]|0; $4 = ((($3)) + 12|0); $5 = HEAP32[$4>>2]|0; $6 = (FUNCTION_TABLE_iii[$5 & 127]($2,$1)|0); $7 = ($6|0)==(0); if (!($7)) { $$0 = 1; return ($$0|0); } switch ($1|0) { case 91: case 116: { _MenuInputOverlay_EnterInput($0); $$0 = 1; return ($$0|0); } default: { $8 = (_Screen_InputDown($0,$1)|0); $$0 = $8; return ($$0|0); } } } function _MenuInputOverlay_KeyPress($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 216|0); _InputWidget_Append($2,$1); return 1; } function _MenuInputOverlay_TextChanged($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 216|0); _InputWidget_SetText($2,$1); return 1; } function _MenuInputOverlay_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_Screen_DoPointerDown($0,$1,$2,$3)|0); $5 = ($4|0)>(-1); if ($5) { $9 = 1; return ($9|0); } $6 = ((($0)) + 24|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)!=(0); $phitmp = $8&1; $9 = $phitmp; return ($9|0); } function _MenuInputOverlay_PointerMove($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_Menu_DoPointerMove($0,$2,$3)|0); $5 = ($4|0)>(-1); if ($5) { $9 = 1; return ($9|0); } $6 = ((($0)) + 24|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)!=(0); $phitmp = $8&1; $9 = $phitmp; return ($9|0); } function _MenuInputOverlay_Layout($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972870]|0; $2 = ($1<<24>>24)==(0); if ($2) { $3 = ((($0)) + 216|0); _Widget_SetLocation($3,1,1,0,110); $4 = ((($0)) + 40|0); _Widget_SetLocation($4,1,1,240,110); $5 = ((($0)) + 128|0); _Widget_SetLocation($5,1,1,0,150); return; } $6 = HEAP8[(1972126)>>0]|0; $7 = ($6<<24>>24)==(2); $8 = ((($0)) + 216|0); if ($7) { _Widget_SetLocation($8,1,2,0,65); $9 = ((($0)) + 40|0); _Widget_SetLocation($9,1,2,120,25); $10 = ((($0)) + 128|0); _Widget_SetLocation($10,1,2,-120,25); return; } else { _Widget_SetLocation($8,1,1,0,110); $11 = ((($0)) + 40|0); _Widget_SetLocation($11,1,1,120,150); $12 = ((($0)) + 128|0); _Widget_SetLocation($12,1,1,-120,150); return; } } function _MenuInputOverlay_ContextLost($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 28|0); _Font_Free($1); _Screen_ContextLost($0); return; } function _MenuInputOverlay_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _Gui_MakeTitleFont($1); $2 = ((($0)) + 28|0); _Gui_MakeBodyFont($2); _Screen_UpdateVb($0); $3 = ((($0)) + 216|0); _TextInputWidget_SetFont($3,$2); $4 = ((($0)) + 40|0); _ButtonWidget_SetConst($4,36908,$1); $5 = ((($0)) + 128|0); _ButtonWidget_SetConst($5,36911,$1); _Font_Free($1); STACKTOP = sp;return; } function _MenuInputOverlay_EnterInput($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 520|0); $2 = HEAP32[$1>>2]|0; $3 = HEAP32[$2>>2]|0; $4 = ((($3)) + 12|0); $5 = HEAP32[$4>>2]|0; $6 = ((($0)) + 276|0); $7 = (FUNCTION_TABLE_iii[$5 & 127]($2,$6)|0); _MenuInputOverlay_Close($0,$7); return; } function _MenuInputOverlay_Close($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; _Gui_Remove(1097936); $2 = ((($0)) + 524|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 276|0); FUNCTION_TABLE_vii[$3 & 255]($4,$1); return; } function _MenuInputOverlay_Default($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp + 64|0; $3 = sp; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 64; $6 = ((($0)) + 520|0); $7 = HEAP32[$6>>2]|0; $8 = HEAP32[$7>>2]|0; $9 = ((($8)) + 16|0); $10 = HEAP32[$9>>2]|0; FUNCTION_TABLE_vii[$10 & 255]($7,$2); $11 = ((($0)) + 216|0); _InputWidget_SetText($11,$2); STACKTOP = sp;return; } function _MenuInputOverlay_OK($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _MenuInputOverlay_EnterInput($0); return; } function _HacksSettingsScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[(399944)>>2] = 36925; HEAP32[(399948)>>2] = 37028; HEAP32[(399964)>>2] = 37143; HEAP32[(399968)>>2] = 37326; HEAP32[(400000)>>2] = 21960; HEAPF32[(400004)>>2] = 0.10000000149011612; HEAPF32[(400008)>>2] = 50.0; HEAPF32[(400012)>>2] = 10.0; HEAP32[(400032)>>2] = 21960; HEAPF32[(400036)>>2] = 0.10000000149011612; HEAPF32[(400040)>>2] = 2048.0; HEAPF32[(400044)>>2] = 1.2330000400543213; HEAP32[(400128)>>2] = 21920; HEAP32[(400132)>>2] = 1; HEAP32[(400136)>>2] = 179; HEAP32[(400140)>>2] = 70; _MenuOptionsScreen_Show(399984,399936,11,357); return; } function _HacksSettingsScreen_InitWidgets($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); HEAP32[$1>>2] = 10; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = (($3) + 120)|0; HEAP32[$2>>2] = $4; $5 = ((($0)) + 52|0); HEAP32[$5>>2] = 358; _MenuOptionsScreen_InitButtons($0,7056,10,25); _HacksSettingsScreen_CheckHacksAllowed($0); return; } function _HacksSettingsScreen_CheckHacksAllowed($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, $narrow20 = 0, $narrow21 = 0, $narrow22 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); $2 = HEAP32[$1>>2]|0; $3 = HEAP8[(1784310)>>0]|0; $4 = ($3<<24>>24)==(0); $5 = HEAP8[(1784313)>>0]|0; $6 = ($5<<24>>24)==(0); $narrow = $4 | $6; $7 = $narrow&1; $8 = ((($2)) + 12|0); $9 = HEAP32[$8>>2]|0; $10 = ((($9)) + 21|0); HEAP8[$10>>0] = $7; $11 = HEAP8[(1784313)>>0]|0; $12 = ($11<<24>>24)==(0); $narrow20 = $4 | $12; $13 = $narrow20&1; $14 = ((($2)) + 16|0); $15 = HEAP32[$14>>2]|0; $16 = ((($15)) + 21|0); HEAP8[$16>>0] = $13; $17 = HEAP8[(1784313)>>0]|0; $18 = ($17<<24>>24)==(0); $narrow21 = $4 | $18; $19 = $narrow21&1; $20 = ((($2)) + 20|0); $21 = HEAP32[$20>>2]|0; $22 = ((($21)) + 21|0); HEAP8[$22>>0] = $19; $23 = HEAP8[(1784317)>>0]|0; $24 = ($23<<24>>24)==(0); $narrow22 = $4 | $24; $25 = $narrow22&1; $26 = ((($2)) + 28|0); $27 = HEAP32[$26>>2]|0; $28 = ((($27)) + 21|0); HEAP8[$28>>0] = $25; _MenuInputOverlay_CheckStillValid($0); return; } function _HacksSettingsScreen_GetHacks($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1784310)>>0]|0; _Menu_GetBool($0,$1); return; } function _HacksSettingsScreen_SetHacks($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,37756)|0); HEAP8[(1784310)>>0] = $1; _HacksComp_Update((1784300)); return; } function _HacksSettingsScreen_GetSpeed($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1784304)>>2]; _String_AppendFloat($0,$1,2); return; } function _HacksSettingsScreen_SetSpeed($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (+_Menu_Float($0)); HEAPF32[(1784304)>>2] = $1; _Options_Set(37734,$0); return; } function _HacksSettingsScreen_GetClipping($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1770973)>>0]|0; _Menu_GetBool($0,$1); return; } function _HacksSettingsScreen_SetClipping($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,37713)|0); HEAP8[(1770973)>>0] = $1; return; } function _HacksSettingsScreen_GetJump($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (+_LocalPlayer_JumpHeight()); _String_AppendFloat($0,$1,3); return; } function _HacksSettingsScreen_SetJump($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 64|0; $2 = sp; $3 = (+_Menu_Float($0)); $4 = (+_PhysicsComp_CalcJumpVelocity($3)); HEAPF32[(1784592)>>2] = $4; HEAPF32[(1784596)>>2] = $4; HEAP32[$1>>2] = $2; $5 = ((($1)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($1)) + 6|0); HEAP16[$6>>1] = 64; _String_AppendFloat($1,$4,8); _Options_Set(37694,$1); STACKTOP = sp;return; } function _HacksSettingsScreen_GetWOMHacks($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1784333)>>0]|0; _Menu_GetBool($0,$1); return; } function _HacksSettingsScreen_SetWOMHacks($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,37674)|0); HEAP8[(1784333)>>0] = $1; return; } function _HacksSettingsScreen_GetFullStep($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1784309)>>0]|0; _Menu_GetBool($0,$1); return; } function _HacksSettingsScreen_SetFullStep($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,37654)|0); HEAP8[(1784309)>>0] = $1; return; } function _HacksSettingsScreen_GetLiquids($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972835]|0; _Menu_GetBool($0,$1); return; } function _HacksSettingsScreen_SetLiquids($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,37631)|0); HEAP8[1972835] = $1; return; } function _HacksSettingsScreen_GetPushback($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1784308)>>0]|0; _Menu_GetBool($0,$1); return; } function _HacksSettingsScreen_SetPushback($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,37609)|0); HEAP8[(1784308)>>0] = $1; return; } function _HacksSettingsScreen_GetSlide($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1784332)>>0]|0; _Menu_GetBool($0,$1); return; } function _HacksSettingsScreen_SetSlide($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,37591)|0); HEAP8[(1784332)>>0] = $1; return; } function _HacksSettingsScreen_GetFOV($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1771068)>>2]|0; _String_AppendInt($0,$1); return; } function _HacksSettingsScreen_SetFOV($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_Int($0)|0); $2 = HEAP32[(1771076)>>2]|0; $3 = ($2|0)>($1|0); if ($3) { HEAP32[(1771076)>>2] = $1; } HEAP32[(1771072)>>2] = $1; _Options_Set(37581,$0); _Camera_SetFov($1); return; } function _MenuInputOverlay_CheckStillValid($0) { $0 = $0|0; var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 32|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)==(-1); if ($3) { return; } $4 = ((($0)) + 16|0); $5 = HEAP32[$4>>2]|0; $6 = (($5) + ($2<<2)|0); $7 = HEAP32[$6>>2]|0; $8 = ((($7)) + 21|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(0); if ($10) { return; } _MenuInputOverlay_Close(1097936,0); return; } function _ChatOptionsScreen_Show() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[100040] = 21960; HEAPF32[(400164)>>2] = 0.25; HEAPF32[(400168)>>2] = 4.0; HEAPF32[(400172)>>2] = 1.0; HEAP32[(400176)>>2] = 21920; HEAP32[(400180)>>2] = 0; HEAP32[(400184)>>2] = 30; $0 = HEAP32[(1803560)>>2]|0; HEAP32[(400188)>>2] = $0; _MenuOptionsScreen_Show(400160,0,0,359); return; } function _ChatOptionsScreen_InitWidgets($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); HEAP32[$1>>2] = 4; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = (($3) + 48)|0; HEAP32[$2>>2] = $4; _MenuOptionsScreen_InitButtons($0,7264,4,25); return; } function _ChatOptionsScreen_GetChatScale($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1803536)>>2]; _String_AppendFloat($0,$1,1); return; } function _ChatOptionsScreen_SetChatScale($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _ChatOptionsScreen_SetScale($0,(1803536),37869); return; } function _ChatOptionsScreen_GetChatlines($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1803524)>>2]|0; _String_AppendInt($0,$1); return; } function _ChatOptionsScreen_SetChatlines($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_Int($0)|0); HEAP32[(1803524)>>2] = $1; _ChatScreen_SetChatlines($1); _Options_Set(37855,$0); return; } function _ChatOptionsScreen_GetLogging($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972819]|0; _Menu_GetBool($0,$1); return; } function _ChatOptionsScreen_SetLogging($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,37842)|0); HEAP8[1972819] = $1; $2 = ($1<<24>>24)==(0); if (!($2)) { return; } _Chat_DisableLogging(); return; } function _ChatOptionsScreen_GetClickable($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803528)>>0]|0; _Menu_GetBool($0,$1); return; } function _ChatOptionsScreen_SetClickable($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,37824)|0); HEAP8[(1803528)>>0] = $1; return; } function _ChatOptionsScreen_SetScale($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = (+_Menu_Float($0)); HEAPF32[$1>>2] = $3; _Options_Set($2,$0); _Gui_LayoutAll(); return; } function _NormalKeyBindingsScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; _KeyBindsScreen_Reset(0,144,250); _KeyBindsScreen_SetLayout(-140,10,6); _KeyBindsScreen_Show(12,37883,7344,37895); return; } function _Menu_SwitchKeysHacks($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _HacksKeyBindingsScreen_Show(); return; } function _KeyBindsScreen_Reset($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; HEAP32[(1820392)>>2] = $0; HEAP32[(1820396)>>2] = $1; HEAP32[(1820400)>>2] = $2; HEAP32[(1820420)>>2] = 1972899; return; } function _KeyBindsScreen_SetLayout($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; HEAP32[(1820404)>>2] = $0; HEAP32[(1820408)>>2] = $1; HEAP32[(1820412)>>2] = $2; return; } function _KeyBindsScreen_Show($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1820356)>>0] = 1; HEAP8[(1820358)>>0] = 1; HEAP32[455088] = 15480; HEAP32[(1820416)>>2] = $3; HEAP32[(1820380)>>2] = $0; HEAP32[(1820388)>>2] = $1; HEAP32[(1820384)>>2] = $2; _Gui_Add(1820352,50); return; } function _KeyBindsScreen_Init($0) { $0 = $0|0; var $$036 = 0, $$135 = 0, $$135$ph = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $brmerge$demorgan = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 7392; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 15; $3 = ((($0)) + 24|0); HEAP32[$3>>2] = -1; $4 = ((($0)) + 8|0); HEAP32[$4>>2] = 188; $5 = ((($0)) + 28|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)>(0); if ($7) { $8 = ((($0)) + 484|0); $9 = ((($0)) + 48|0); $$036 = 0; while(1) { $10 = (($8) + (($$036*88)|0)|0); $11 = HEAP32[$9>>2]|0; _ButtonWidget_Init($10,$11,145); $12 = HEAP32[$1>>2]|0; $13 = (($12) + ($$036<<2)|0); HEAP32[$13>>2] = $10; $14 = (($$036) + 1)|0; $15 = HEAP32[$5>>2]|0; $16 = ($14|0)<($15|0); if ($16) { $$036 = $14; } else { break; } } $17 = ($14>>>0)<(12); if ($17) { $$135$ph = $14; label = 5; } } else { $$135$ph = 0; label = 5; } if ((label|0) == 5) { $$135 = $$135$ph; while(1) { $18 = HEAP32[$1>>2]|0; $19 = (($18) + ($$135<<2)|0); HEAP32[$19>>2] = 0; $20 = (($$135) + 1)|0; $exitcond = ($20|0)==(12); if ($exitcond) { break; } else { $$135 = $20; } } } $21 = ((($0)) + 84|0); _TextWidget_Init($21); $22 = ((($0)) + 152|0); _TextWidget_Init($22); $23 = ((($0)) + 220|0); $24 = HEAP8[(1803522)>>0]|0; $25 = ($24<<24>>24)==(0); $26 = $25 ? 25 : 43; _ButtonWidget_Init($23,400,$26); $27 = ((($0)) + 308|0); $28 = ((($0)) + 40|0); $29 = HEAP32[$28>>2]|0; _ButtonWidget_Init($27,40,$29); $30 = ((($0)) + 396|0); $31 = ((($0)) + 44|0); $32 = HEAP32[$31>>2]|0; _ButtonWidget_Init($30,40,$32); $33 = HEAP32[$28>>2]|0; $34 = ($33|0)==(0|0); $35 = $34&1; $36 = ((($0)) + 329|0); HEAP8[$36>>0] = $35; $37 = HEAP32[$31>>2]|0; $38 = ($37|0)==(0|0); $39 = $38&1; $40 = ((($0)) + 417|0); HEAP8[$40>>0] = $39; $brmerge$demorgan = $34 & $38; if ($brmerge$demorgan) { return; } $41 = HEAP32[$2>>2]|0; $42 = (($41) + 2)|0; HEAP32[$2>>2] = $42; return; } function _KeyBindsScreen_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$019 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 24|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(-1); if ($4) { $5 = (_Screen_InputDown($0,$1)|0); $$0 = $5; return ($$0|0); } $6 = ((($0)) + 36|0); $7 = HEAP32[$6>>2]|0; $8 = (($7) + ($3)|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = ($1|0)==(92); if ($11) { $12 = (5680 + ($10)|0); $13 = HEAP8[$12>>0]|0; $14 = $13&255; $$019 = $14; } else { $$019 = $1; } _KeyBind_Set($10,$$019); $15 = HEAP32[$2>>2]|0; HEAP32[$2>>2] = -1; $16 = ((($0)) + 6|0); HEAP8[$16>>0] = 1; _KeyBindsScreen_Update($0,$15); $$0 = 1; return ($$0|0); } function _KeyBindsScreen_Layout($0) { $0 = $0|0; var $$03839 = 0, $$040 = 0, $$1 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $1 = ((($0)) + 48|0); $2 = HEAP32[$1>>2]|0; $3 = (($2|0) / 2)&-1; $4 = (($3) + 5)|0; $5 = ((($0)) + 52|0); $6 = ((($0)) + 60|0); $7 = HEAP32[$6>>2]|0; $8 = ((($0)) + 28|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)>(0); if ($10) { $11 = HEAP32[$5>>2]|0; $12 = ($7|0)==(-1); $13 = ((($0)) + 484|0); $$03839 = $11;$$040 = 0; while(1) { $14 = ($$040|0)==($7|0); if ($14) { $15 = HEAP32[$5>>2]|0; $$1 = $15; } else { $$1 = $$03839; } $16 = ($$040|0)<($7|0); $17 = $16 ? -1 : 1; $18 = $12 ? 0 : $17; $19 = (($13) + (($$040*88)|0)|0); $20 = Math_imul($18, $4)|0; _Widget_SetLocation($19,1,1,$20,$$1); $21 = (($$1) + 50)|0; $22 = (($$040) + 1)|0; $23 = HEAP32[$8>>2]|0; $24 = ($22|0)<($23|0); if ($24) { $$03839 = $21;$$040 = $22; } else { break; } } } $25 = ((($0)) + 84|0); _Widget_SetLocation($25,1,1,0,-180); $26 = ((($0)) + 152|0); _Widget_SetLocation($26,1,1,0,100); $27 = ((($0)) + 220|0); _Menu_LayoutBack($27); $28 = ((($0)) + 308|0); $29 = HEAP32[$1>>2]|0; $30 = (-35 - ($29))|0; $31 = ((($0)) + 56|0); $32 = HEAP32[$31>>2]|0; _Widget_SetLocation($28,1,1,$30,$32); $33 = ((($0)) + 396|0); $34 = HEAP32[$1>>2]|0; $35 = (($34) + 35)|0; $36 = HEAP32[$31>>2]|0; _Widget_SetLocation($33,1,1,$35,$36); return; } function _KeyBindsScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 72|0); _Font_Free($1); _Screen_ContextLost($0); return; } function _KeyBindsScreen_ContextRecreated($0) { $0 = $0|0; var $$022 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _Screen_UpdateVb($0); $2 = ((($0)) + 72|0); _Gui_MakeTitleFont($2); _Gui_MakeBodyFont($1); $3 = ((($0)) + 28|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if ($5) { $$022 = 0; while(1) { _KeyBindsScreen_Update($0,$$022); $6 = (($$022) + 1)|0; $7 = HEAP32[$3>>2]|0; $8 = ($6|0)<($7|0); if ($8) { $$022 = $6; } else { break; } } } $9 = ((($0)) + 84|0); $10 = ((($0)) + 64|0); $11 = HEAP32[$10>>2]|0; _TextWidget_SetConst($9,$11,$2); $12 = ((($0)) + 152|0); $13 = ((($0)) + 68|0); $14 = HEAP32[$13>>2]|0; _TextWidget_SetConst($12,$14,$1); $15 = ((($0)) + 220|0); _ButtonWidget_SetConst($15,34990,$2); _Font_Free($1); $16 = ((($0)) + 40|0); $17 = HEAP32[$16>>2]|0; $18 = ($17|0)==(0|0); if ($18) { $19 = ((($0)) + 44|0); $20 = HEAP32[$19>>2]|0; $21 = ($20|0)==(0|0); if ($21) { STACKTOP = sp;return; } } $22 = ((($0)) + 308|0); _ButtonWidget_SetConst($22,34986,$2); $23 = ((($0)) + 396|0); _ButtonWidget_SetConst($23,34988,$2); STACKTOP = sp;return; } function _KeyBindsScreen_Update($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp + 64|0; $3 = sp; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 64; $6 = ((($0)) + 24|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==($1|0); $9 = $8 ? 37911 : 37922; $10 = ((($0)) + 32|0); $11 = HEAP32[$10>>2]|0; $12 = (($11) + ($1<<2)|0); $13 = HEAP32[$12>>2]|0; $14 = ((($0)) + 36|0); $15 = HEAP32[$14>>2]|0; $16 = (($15) + ($1)|0); $17 = HEAP8[$16>>0]|0; $18 = $17&255; $19 = (390752 + ($18)|0); $20 = HEAP8[$19>>0]|0; $21 = $20&255; $22 = (5184 + ($21<<2)|0); $23 = HEAP32[$22>>2]|0; _String_Format2($2,$9,$13,$23); $24 = (((($0)) + 484|0) + (($1*88)|0)|0); $25 = ((($0)) + 72|0); _ButtonWidget_Set($24,$2,$25); $26 = ((($0)) + 7|0); HEAP8[$26>>0] = 1; STACKTOP = sp;return; } function _KeyBindsScreen_OnBindingClick($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 24|0); $3 = HEAP32[$2>>2]|0; $4 = (_Screen_Index($0,$1)|0); HEAP32[$2>>2] = $4; $5 = ((($0)) + 6|0); HEAP8[$5>>0] = 0; _KeyBindsScreen_Update($0,$4); $6 = ($3|0)>(-1); if (!($6)) { return; } _KeyBindsScreen_Update($0,$3); return; } function _Menu_SwitchClassicOptions($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _ClassicOptionsScreen_Show(); return; } function _ClassicOptionsScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[(400272)>>2] = 0; HEAP32[(400276)>>2] = 7472; HEAP32[(400280)>>2] = 4; HEAP32[(400352)>>2] = 0; HEAP32[(400356)>>2] = 3936; HEAP32[(400360)>>2] = 6; _MenuOptionsScreen_Show(400240,0,0,360); return; } function _ClassicOptionsScreen_InitWidgets($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); HEAP32[$1>>2] = 10; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = (($3) + 120)|0; HEAP32[$2>>2] = $4; $5 = ((($0)) + 48|0); HEAP32[$5>>2] = 361; _MenuOptionsScreen_InitButtons($0,7488,9,123); $6 = ((($0)) + 1108|0); _ButtonWidget_Make($6,400,146,1,2,0,95); $7 = ((($0)) + 16|0); $8 = HEAP32[$7>>2]|0; $9 = ((($8)) + 36|0); HEAP32[$9>>2] = $6; $10 = HEAP8[(1949240)>>0]|0; $11 = ($10<<24>>24)==(0); if ($11) { _Menu_Remove($0,3); } $12 = HEAP8[1972840]|0; $13 = ($12<<24>>24)==(0); if (!($13)) { return; } _Menu_Remove($0,8); return; } function _ClassicOptionsScreen_RecreateExtra($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1108|0); $2 = ((($0)) + 64|0); _ButtonWidget_SetConst($1,36313,$2); return; } function _Menu_SwitchKeysClassic($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _ClassicKeyBindingsScreen_Show(); return; } function _Menu_Remove($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 16|0); $3 = HEAP32[$2>>2]|0; $4 = (($3) + ($1<<2)|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)==(0|0); if ($6) { HEAP32[$4>>2] = 0; return; } $7 = HEAP32[$5>>2]|0; $8 = ((($7)) + 4|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_vi[$9 & 511]($5); HEAP32[$4>>2] = 0; return; } function _ClassicKeyBindingsScreen_Show() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1972840]|0; $1 = ($0<<24>>24)==(0); if ($1) { _KeyBindsScreen_Reset(0,0,300); } else { _KeyBindsScreen_Reset(0,147,260); } _KeyBindsScreen_SetLayout(-140,-40,5); $2 = HEAP8[1972840]|0; $3 = ($2<<24>>24)==(0); $4 = $3 ? 37929 : 37895; _KeyBindsScreen_Show(10,37938,7680,$4); return; } function _Menu_SwitchKeysClassicHacks($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _ClassicHacksKeyBindingsScreen_Show(); return; } function _ClassicHacksKeyBindingsScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; _KeyBindsScreen_Reset(146,0,260); _KeyBindsScreen_SetLayout(-90,-40,3); _KeyBindsScreen_Show(6,38022,7728,38028); return; } function _ClassicOptionsScreen_GetMusic($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[275919]|0; $2 = ($1|0)>(0); $3 = $2&1; _Menu_GetBool($0,$3); return; } function _ClassicOptionsScreen_SetMusic($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_String_CaselessEqualsConst($0,35243)|0); $2 = ($1|0)==(0); $3 = $2 ? 0 : 100; _Audio_SetMusic($3); $4 = HEAP32[275919]|0; _Options_SetInt(38256,$4); return; } function _ClassicOptionsScreen_GetInvert($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1770974)>>0]|0; _Menu_GetBool($0,$1); return; } function _ClassicOptionsScreen_SetInvert($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,38244)|0); HEAP8[(1770974)>>0] = $1; return; } function _ClassicOptionsScreen_GetViewDist($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[3582]|0; $2 = ($1|0)>(511); if ($2) { _String_AppendConst($0,38222); return; } $3 = ($1|0)>(127); if ($3) { _String_AppendConst($0,38226); return; } $4 = ($1|0)>(31); if ($4) { _String_AppendConst($0,38233); return; } else { _String_AppendConst($0,38239); return; } } function _ClassicOptionsScreen_SetViewDist($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Utils_ParseEnum($0,0,7472,4)|0); switch ($1|0) { case 3: { $4 = 512; break; } case 2: { $4 = 128; break; } default: { $2 = ($1|0)==(1); $3 = $2 ? 32 : 8; $4 = $3; } } _Game_UserSetViewDistance($4); return; } function _ClassicOptionsScreen_GetPhysics($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1766676]|0; _Menu_GetBool($0,$1); return; } function _ClassicOptionsScreen_SetPhysics($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,38202)|0); _Physics_SetEnabled($1); return; } function _ClassicOptionsScreen_GetSounds($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[275918]|0; $2 = ($1|0)>(0); $3 = $2&1; _Menu_GetBool($0,$3); return; } function _ClassicOptionsScreen_SetSounds($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_String_CaselessEqualsConst($0,35243)|0); $2 = ($1|0)==(0); $3 = $2 ? 0 : 100; _Audio_SetSounds($3); $4 = HEAP32[275918]|0; _Options_SetInt(38189,$4); return; } function _ClassicOptionsScreen_GetShowFPS($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803530)>>0]|0; _Menu_GetBool($0,$1); return; } function _ClassicOptionsScreen_SetShowFPS($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,38177)|0); HEAP8[(1803530)>>0] = $1; return; } function _ClassicOptionsScreen_GetViewBob($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972844]|0; _Menu_GetBool($0,$1); return; } function _ClassicOptionsScreen_SetViewBob($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,38165)|0); HEAP8[1972844] = $1; return; } function _MenuOptionsScreen_GetFPS($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[450728]|0; $2 = (3936 + ($1<<2)|0); $3 = HEAP32[$2>>2]|0; _String_AppendConst($0,$3); return; } function _MenuOptionsScreen_SetFPS($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Utils_ParseEnum($0,0,3936,6)|0); _Options_Set(38156,$0); _Game_SetFpsLimit($1); return; } function _ClassicOptionsScreen_GetHacks($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1784310)>>0]|0; _Menu_GetBool($0,$1); return; } function _ClassicOptionsScreen_SetHacks($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,37756)|0); HEAP8[(1784310)>>0] = $1; _HacksComp_Update((1784300)); return; } function _HacksKeyBindingsScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; _KeyBindsScreen_Reset(34,148,260); _KeyBindsScreen_SetLayout(-40,10,4); _KeyBindsScreen_Show(8,38300,7760,38028); return; } function _Menu_SwitchKeysOther($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _OtherKeyBindingsScreen_Show(); return; } function _OtherKeyBindingsScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; _KeyBindsScreen_Reset(144,149,260); _KeyBindsScreen_SetLayout(-140,10,6); _KeyBindsScreen_Show(12,38333,7792,38345); return; } function _Menu_SwitchKeysMouse($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _MouseKeyBindingsScreen_Show(); return; } function _MouseKeyBindingsScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; _KeyBindsScreen_Reset(148,0,260); _KeyBindsScreen_SetLayout(-40,10,-1); HEAP32[(1820420)>>2] = 38496; _KeyBindsScreen_Show(3,38532,15544,38535); return; } function _GraphicsOptionsScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[100104] = 38590; HEAP32[(400420)>>2] = 38636; HEAP32[(400428)>>2] = 38925; HEAP32[(400436)>>2] = 39009; HEAP32[(400440)>>2] = 39306; HEAP32[100112] = 21960; HEAPF32[(400452)>>2] = 1.0; HEAPF32[(400456)>>2] = 100.0; HEAPF32[(400460)>>2] = 20.0; HEAP32[(400464)>>2] = 0; HEAP32[(400468)>>2] = 3936; HEAP32[(400472)>>2] = 6; HEAP32[(400480)>>2] = 21920; HEAP32[(400484)>>2] = 8; HEAP32[(400488)>>2] = 4096; HEAP32[(400492)>>2] = 512; HEAP32[(400528)>>2] = 0; HEAP32[(400532)>>2] = 2816; HEAP32[(400536)>>2] = 5; HEAP32[(400544)>>2] = 0; HEAP32[(400548)>>2] = 2848; HEAP32[(400552)>>2] = 4; _MenuOptionsScreen_Show(400448,400416,8,362); return; } function _GraphicsOptionsScreen_InitWidgets($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); HEAP32[$1>>2] = 8; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = (($3) + 96)|0; HEAP32[$2>>2] = $4; _MenuOptionsScreen_InitButtons($0,7840,8,25); return; } function _GraphicsOptionsScreen_GetCameraMass($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1771064)>>2]; _String_AppendFloat($0,$1,2); return; } function _GraphicsOptionsScreen_SetCameraMass($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (+_Menu_Float($0)); HEAPF32[(1771064)>>2] = $1; _Options_Set(39693,$0); return; } function _GraphicsOptionsScreen_GetViewDist($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[3582]|0; _String_AppendInt($0,$1); return; } function _GraphicsOptionsScreen_SetViewDist($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_Int($0)|0); _Game_UserSetViewDistance($1); return; } function _GraphicsOptionsScreen_GetSmooth($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972814]|0; _Menu_GetBool($0,$1); return; } function _GraphicsOptionsScreen_SetSmooth($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,39674)|0); HEAP8[1972814] = $1; _Builder_ApplyActive(); _MapRenderer_Refresh(); return; } function _GraphicsOptionsScreen_GetCamera($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1770972)>>0]|0; _Menu_GetBool($0,$1); return; } function _GraphicsOptionsScreen_SetCamera($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,39660)|0); HEAP8[(1770972)>>0] = $1; return; } function _GraphicsOptionsScreen_GetNames($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1783768)>>0]|0; $2 = $1&255; $3 = (2816 + ($2<<2)|0); $4 = HEAP32[$3>>2]|0; _String_AppendConst($0,$4); return; } function _GraphicsOptionsScreen_SetNames($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Utils_ParseEnum($0,0,2816,5)|0); $2 = $1&255; HEAP8[(1783768)>>0] = $2; _Options_Set(39650,$0); return; } function _GraphicsOptionsScreen_GetShadows($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1783769)>>0]|0; $2 = $1&255; $3 = (2848 + ($2<<2)|0); $4 = HEAP32[$3>>2]|0; _String_AppendConst($0,$4); return; } function _GraphicsOptionsScreen_SetShadows($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Utils_ParseEnum($0,0,2848,4)|0); $2 = $1&255; HEAP8[(1783769)>>0] = $2; _Options_Set(39637,$0); return; } function _GraphicsOptionsScreen_GetMipmaps($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803129)>>0]|0; _Menu_GetBool($0,$1); return; } function _GraphicsOptionsScreen_SetMipmaps($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,39625)|0); HEAP8[(1803129)>>0] = $1; (_TexturePack_ExtractCurrent(1)|0); return; } function _GuiOptionsScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[(400608)>>2] = 21960; HEAPF32[(400612)>>2] = 0.25; HEAPF32[(400616)>>2] = 4.0; HEAPF32[(400620)>>2] = 1.0; HEAP32[(400624)>>2] = 21960; HEAPF32[(400628)>>2] = 0.25; HEAPF32[(400632)>>2] = 4.0; HEAPF32[(400636)>>2] = 1.0; _MenuOptionsScreen_Show(400576,0,0,363); return; } function _GuiOptionsScreen_InitWidgets($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); HEAP32[$1>>2] = 7; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = (($3) + 84)|0; HEAP32[$2>>2] = $4; _MenuOptionsScreen_InitButtons($0,8000,7,25); return; } function _GuiOptionsScreen_GetShadows($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1781705)>>0]|0; _Menu_GetBool($0,$1); return; } function _GuiOptionsScreen_SetShadows($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,39918)|0); HEAP8[(1781705)>>0] = $1; _Event_RaiseVoid(1796648); return; } function _GuiOptionsScreen_GetShowFPS($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803530)>>0]|0; _Menu_GetBool($0,$1); return; } function _GuiOptionsScreen_SetShowFPS($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,38177)|0); HEAP8[(1803530)>>0] = $1; return; } function _GuiOptionsScreen_GetHotbar($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1803532)>>2]; _String_AppendFloat($0,$1,1); return; } function _GuiOptionsScreen_SetHotbar($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _ChatOptionsScreen_SetScale($0,(1803532),39902); return; } function _GuiOptionsScreen_GetInventory($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1803540)>>2]; _String_AppendFloat($0,$1,1); return; } function _GuiOptionsScreen_SetInventory($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _ChatOptionsScreen_SetScale($0,(1803540),39883); return; } function _GuiOptionsScreen_GetTabAuto($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803529)>>0]|0; _Menu_GetBool($0,$1); return; } function _GuiOptionsScreen_SetTabAuto($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,39862)|0); HEAP8[(1803529)>>0] = $1; return; } function _GuiOptionsScreen_GetUseFont($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1781704]|0; $2 = ($1<<24>>24)==(0); $3 = $2&1; _Menu_GetBool($0,$3); return; } function _GuiOptionsScreen_SetUseFont($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,39844)|0); $2 = ($1<<24>>24)==(0); $3 = $2&1; HEAP8[1781704] = $3; _Event_RaiseVoid(1796648); return; } function _Menu_SwitchFont($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _FontListScreen_Show(); return; } function _FontListScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[(1812068)>>2] = 39805; HEAP32[(1812056)>>2] = 0; HEAP32[(1812060)>>2] = 364; HEAP32[(1812048)>>2] = 150; HEAP32[(1812052)>>2] = 32; HEAP32[(1812064)>>2] = 5; _ListScreen_Show(); return; } function _FontListScreen_LoadEntries($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 928|0); _SysFonts_GetNames($1); $2 = (_SysFonts_UNSAFE_GetDefault()|0); _ListScreen_Select($0,$2); return; } function _FontListScreen_EntryClick($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; _ListScreen_UNSAFE_GetCur($2,$0,$1); _Options_Set(39831,$2); _Font_SetDefault($2); STACKTOP = sp;return; } function _FontListScreen_UpdateEntry($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; $4 = (_String_CaselessEqualsConst($2,35018)|0); $5 = ($4|0)==(0); if (!($5)) { $6 = ((($0)) + 816|0); _ButtonWidget_Set($1,$2,$6); STACKTOP = sp;return; } $7 = (_SysFont_Make($3,$2,16,0)|0); $8 = ($7|0)==(0); if ($8) { _ButtonWidget_Set($1,$2,$3); } else { _Logger_SimpleWarn2($7,39819,$2); $9 = ((($0)) + 816|0); _ButtonWidget_Set($1,$2,$9); } _Font_Free($3); STACKTOP = sp;return; } function _ListScreen_Select($0,$1) { $0 = $0|0; $1 = $1|0; var $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 8|0; $3 = sp; $4 = ((($0)) + 936|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)>(0); if (!($6)) { STACKTOP = sp;return; } $7 = ((($0)) + 928|0); $$09 = 0; while(1) { _StringsBuffer_UNSAFE_Get($3,$7,$$09); $8 = $3; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = (($8) + 4)|0; $12 = $11; $13 = HEAP32[$12>>2]|0; $14 = $2; $15 = $14; HEAP32[$15>>2] = $10; $16 = (($14) + 4)|0; $17 = $16; HEAP32[$17>>2] = $13; $18 = (_String_CaselessEquals($2,$1)|0); $19 = ($18|0)==(0); if (!($19)) { break; } $21 = (($$09) + 1)|0; $22 = HEAP32[$4>>2]|0; $23 = ($21|0)<($22|0); if ($23) { $$09 = $21; } else { label = 6; break; } } if ((label|0) == 6) { STACKTOP = sp;return; } $20 = ((($0)) + 832|0); HEAP32[$20>>2] = $$09; STACKTOP = sp;return; } function _MiscOptionsScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[100176] = 21960; HEAPF32[(400708)>>2] = 1.0; HEAPF32[(400712)>>2] = 1024.0; HEAPF32[(400716)>>2] = 5.0; HEAP32[(400720)>>2] = 21920; HEAP32[(400724)>>2] = 0; HEAP32[(400728)>>2] = 100; HEAP32[(400732)>>2] = 0; HEAP32[(400736)>>2] = 21920; HEAP32[(400740)>>2] = 0; HEAP32[(400744)>>2] = 100; HEAP32[(400748)>>2] = 0; HEAP32[(400800)>>2] = 21920; HEAP32[(400804)>>2] = 1; HEAP32[(400808)>>2] = 200; HEAP32[(400812)>>2] = 30; _MenuOptionsScreen_Show(400704,0,0,365); return; } function _MiscSettingsScreen_InitWidgets($0) { $0 = $0|0; var $$pr = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); HEAP32[$1>>2] = 7; $2 = ((($0)) + 8|0); $3 = HEAP32[$2>>2]|0; $4 = (($3) + 84)|0; HEAP32[$2>>2] = $4; _MenuOptionsScreen_InitButtons($0,8144,7,25); $5 = HEAP8[(1949240)>>0]|0; $6 = ($5<<24>>24)==(0); if (!($6)) { return; } _Menu_Remove($0,0); $$pr = HEAP8[(1949240)>>0]|0; $7 = ($$pr<<24>>24)==(0); if (!($7)) { return; } _Menu_Remove($0,4); return; } function _MiscOptionsScreen_GetReach($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1784296)>>2]; _String_AppendFloat($0,$1,2); return; } function _MiscOptionsScreen_SetReach($0) { $0 = $0|0; var $1 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (+_Menu_Float($0)); HEAPF32[(1784296)>>2] = $1; return; } function _MiscOptionsScreen_GetMusic($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[275919]|0; _String_AppendInt($0,$1); return; } function _MiscOptionsScreen_SetMusic($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; _Options_Set(38256,$0); $1 = (_Menu_Int($0)|0); _Audio_SetMusic($1); return; } function _MiscOptionsScreen_GetSounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[275918]|0; _String_AppendInt($0,$1); return; } function _MiscOptionsScreen_SetSounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; _Options_Set(38189,$0); $1 = (_Menu_Int($0)|0); _Audio_SetSounds($1); return; } function _MiscOptionsScreen_GetViewBob($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972844]|0; _Menu_GetBool($0,$1); return; } function _MiscOptionsScreen_SetViewBob($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,38165)|0); HEAP8[1972844] = $1; return; } function _MiscOptionsScreen_GetPhysics($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1766676]|0; _Menu_GetBool($0,$1); return; } function _MiscOptionsScreen_SetPhysics($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,38202)|0); _Physics_SetEnabled($1); return; } function _MiscOptionsScreen_GetInvert($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1770974)>>0]|0; _Menu_GetBool($0,$1); return; } function _MiscOptionsScreen_SetInvert($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_SetBool($0,38244)|0); HEAP8[(1770974)>>0] = $1; return; } function _MiscOptionsScreen_GetSensitivity($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[442742]|0; _String_AppendInt($0,$1); return; } function _MiscOptionsScreen_SetSensitivity($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Menu_Int($0)|0); HEAP32[442742] = $1; _Options_Set(39999,$0); return; } function _ClassicPauseScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1817296)>>0] = 1; HEAP8[(1817298)>>0] = 1; HEAP32[454323] = 15556; _Gui_Add(1817292,50); return; } function _ClassicPauseScreen_Init($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 8336; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 7; $3 = ((($0)) + 28|0); HEAP32[$3>>2] = 8368; $4 = HEAP8[1972839]|0; $5 = ($4<<24>>24)==(0); $6 = $5 ? 5 : 4; $7 = ((($0)) + 24|0); HEAP32[$7>>2] = $6; $8 = ((($0)) + 384|0); $9 = $5 ? $8 : 0; HEAP32[(8356)>>2] = $9; _PauseScreenBase_Init($0,400); $10 = HEAP8[(1949240)>>0]|0; $11 = ($10<<24>>24)==(0); if (!($11)) { return; } $12 = ((($0)) + 141|0); HEAP8[$12>>0] = 1; $13 = ((($0)) + 317|0); HEAP8[$13>>0] = 1; return; } function _ClassicPauseScreen_Layout($0) { $0 = $0|0; var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 32|0); $2 = ((($0)) + 28|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 24|0); $5 = HEAP32[$4>>2]|0; _Menu_LayoutButtons($1,$3,$5); $6 = ((($0)) + 648|0); $7 = HEAP8[1972839]|0; $8 = ($7<<24>>24)==(0); $9 = $8 ? 25 : 80; _Widget_SetLocation($6,1,2,0,$9); $10 = ((($0)) + 736|0); _Widget_SetLocation($10,1,1,0,-150); return; } function _ClassicPauseScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _PauseScreenBase_ContextRecreated($0,$1); _Font_Free($1); STACKTOP = sp;return; } function _Menu_SwitchClassicGenLevel($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _ClassicGenScreen_Show(); return; } function _ClassicGenScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1821896)>>0] = 1; HEAP8[(1821898)>>0] = 1; HEAP32[455473] = 15620; _Gui_Add(1821892,50); return; } function _ClassicGenScreen_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 8432; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 5; $3 = ((($0)) + 8|0); HEAP32[$3>>2] = 52; $4 = ((($0)) + 376|0); _TextWidget_Init($4); $5 = ((($0)) + 24|0); _ButtonWidget_Init($5,400,151); $6 = ((($0)) + 112|0); _ButtonWidget_Init($6,400,152); $7 = ((($0)) + 200|0); _ButtonWidget_Init($7,400,153); $8 = ((($0)) + 288|0); _ButtonWidget_Init($8,400,123); return; } function _ClassicGenScreen_Layout($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 376|0); _Widget_SetLocation($1,1,1,0,-150); $2 = ((($0)) + 24|0); _Widget_SetLocation($2,1,1,0,-100); $3 = ((($0)) + 112|0); _Widget_SetLocation($3,1,1,0,-50); $4 = ((($0)) + 200|0); _Widget_SetLocation($4,1,1,0,0); $5 = ((($0)) + 288|0); _Widget_SetLocation($5,1,2,0,80); return; } function _ClassicGenScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _Screen_UpdateVb($0); _Gui_MakeTitleFont($1); $2 = ((($0)) + 376|0); _TextWidget_SetConst($2,35818,$1); $3 = ((($0)) + 24|0); _ButtonWidget_SetConst($3,40042,$1); $4 = ((($0)) + 112|0); _ButtonWidget_SetConst($4,40048,$1); $5 = ((($0)) + 200|0); _ButtonWidget_SetConst($5,40055,$1); $6 = ((($0)) + 288|0); _ButtonWidget_SetConst($6,42804,$1); _Font_Free($1); STACKTOP = sp;return; } function _ClassicGenScreen_Small($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _ClassicGenScreen_Gen(128); return; } function _ClassicGenScreen_Medium($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _ClassicGenScreen_Gen(256); return; } function _ClassicGenScreen_Huge($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _ClassicGenScreen_Gen(512); return; } function _ClassicGenScreen_Gen($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _Random_SeedFromCurrentTime($1); HEAP8[1972848] = 1; $2 = (_Random_Next($1,2147483647)|0); HEAP32[450771] = $2; _Gui_Remove(1821892); _Menu_BeginGen($0,64,$0); STACKTOP = sp;return; } function _TexIdsOverlay_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1822340)>>0] = 1; HEAP8[(1822342)>>0] = 1; HEAP32[455584] = 15684; _Gui_Add(1822336,30); return; } function _TexIdsOverlay_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 15764; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 1; $3 = ((($0)) + 8|0); HEAP32[$3>>2] = 7756; $4 = ((($0)) + 144|0); _TextWidget_Init($4); _Event_Register(1791968,$0,366); return; } function _TexIdsOverlay_Free($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Event_Unregister(1791968,$0,366); return; } function _TexIdsOverlay_Render($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Menu_RenderBounds(); _Gfx_SetVertexFormat(1); $2 = ((($0)) + 12|0); $3 = HEAP32[$2>>2]|0; _Gfx_BindVb($3); $4 = ((($0)) + 144|0); $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 40|0); $7 = HEAP32[$6>>2]|0; $8 = (FUNCTION_TABLE_iii[$7 & 127]($4,0)|0); $9 = (_TexIdsOverlay_RenderTerrain($8)|0); $10 = ((($0)) + 40|0); $11 = HEAP32[$10>>2]|0; _Gfx_BindTexture($11); $12 = ((($0)) + 36|0); $13 = HEAP32[$12>>2]|0; _Gfx_DrawVb_IndexedTris_Range($13,$9); return; } function _TexIdsOverlay_BuildMesh($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = (_Screen_LockVb($0)|0); HEAP32[$1>>2] = $2; $3 = ((($0)) + 144|0); $4 = HEAP32[$3>>2]|0; $5 = ((($4)) + 36|0); $6 = HEAP32[$5>>2]|0; FUNCTION_TABLE_vii[$6 & 255]($3,$1); _TexIdsOverlay_BuildTerrain($0,$1); _TexIdsOverlay_BuildText($0,$1); $7 = ((($0)) + 12|0); $8 = HEAP32[$7>>2]|0; _Gfx_UnlockDynamicVb($8); STACKTOP = sp;return; } function _TexIdsOverlay_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(390785)>>0]|0; $3 = $2&255; $4 = ($3|0)==($1|0); if (!($4)) { $$0 = 0; return ($$0|0); } _Gui_Remove($0); $$0 = 1; return ($$0|0); } function _TexIdsOverlay_Layout($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972120)>>2]|0; $2 = (($1|0) / 128)&-1; $3 = $2 << 3; $4 = ($3|0)>(8); $5 = $4 ? $3 : 8; $6 = ($5|0)<(40); $7 = $6 ? $5 : 40; $8 = HEAP32[(1951376)>>2]|0; $9 = Math_imul($7, $8)|0; $10 = HEAP32[(1972116)>>2]|0; $11 = (_Gui_CalcPos(1,0,$9,$10)|0); $12 = ((($0)) + 24|0); HEAP32[$12>>2] = $11; $13 = $7 << 4; $14 = HEAP32[(1972120)>>2]|0; $15 = (_Gui_CalcPos(1,0,$13,$14)|0); $16 = ((($0)) + 28|0); HEAP32[$16>>2] = $15; $17 = ((($0)) + 32|0); HEAP32[$17>>2] = $7; $18 = ((($0)) + 144|0); _Widget_SetLocation($18,1,0,0,0); $19 = HEAP32[$16>>2]|0; $20 = (_Display_ScaleY(30)|0); $21 = (($19) - ($20))|0; $22 = ((($0)) + 172|0); HEAP32[$22>>2] = $21; $23 = HEAP32[$18>>2]|0; $24 = ((($23)) + 8|0); $25 = HEAP32[$24>>2]|0; FUNCTION_TABLE_vi[$25 & 511]($18); return; } function _TexIdsOverlay_ContextLost($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; _Screen_ContextLost($0); $1 = ((($0)) + 40|0); _TextAtlas_Free($1); return; } function _TexIdsOverlay_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 12|0; $2 = sp; _Screen_UpdateVb($0); _Font_Make($1,8,4); _Font_SetPadding($1,1); $3 = ((($0)) + 40|0); _TextAtlas_Make($3,15748,$1,15756); _Font_Free($1); _Gui_MakeTitleFont($2); $4 = ((($0)) + 144|0); _TextWidget_SetConst($4,40060,$2); _Font_Free($2); STACKTOP = sp;return; } function _TexIdsOverlay_BuildTerrain($0,$1) { $0 = $0|0; $1 = $1|0; var $$02833 = 0, $$02931 = 0, $$03032 = 0, $$034 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = ((($0)) + 32|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 24|0); $6 = HEAP32[$5>>2]|0; $7 = ((($2)) + 12|0); HEAPF32[$7>>2] = 0.0; $8 = ((($2)) + 20|0); HEAPF32[$8>>2] = 0.99937498569488525; $9 = $4&65535; $10 = ((($2)) + 8|0); HEAP16[$10>>1] = $9; $11 = ((($2)) + 10|0); HEAP16[$11>>1] = $9; $12 = HEAP32[(1951376)>>2]|0; $13 = ($12|0)>(0); if (!($13)) { STACKTOP = sp;return; } $14 = ((($2)) + 4|0); $15 = ((($0)) + 28|0); $16 = ((($2)) + 6|0); $17 = ((($2)) + 16|0); $18 = ((($2)) + 24|0); $19 = $4 << 4; $$02833 = 0;$$03032 = $6;$$034 = 0; while(1) { $$02931 = 0; while(1) { $20 = $$02931 & 15; $21 = Math_imul($20, $4)|0; $22 = (($21) + ($$03032))|0; $23 = $22&65535; HEAP16[$14>>1] = $23; $24 = HEAP32[$15>>2]|0; $25 = (4)?($$02931 >>> 4):($$02931); $26 = Math_imul($25, $4)|0; $27 = (($24) + ($26))|0; $28 = $27&65535; HEAP16[$16>>1] = $28; $29 = (($$02931) + ($$034))|0; $30 = HEAP32[(1949300)>>2]|0; $31 = $30 & $29; $32 = (+($31|0)); $33 = +HEAPF32[(1949308)>>2]; $34 = $33 * $32; HEAPF32[$17>>2] = $34; $35 = $33 * 0.99937498569488525; $36 = $35 + $34; HEAPF32[$18>>2] = $36; _Gfx_Make2DQuad($2,-1,$1); $37 = (($$02931) + 1)|0; $exitcond = ($37|0)==(256); if ($exitcond) { break; } else { $$02931 = $37; } } $38 = (($$034) + 256)|0; $39 = (($$03032) + ($19))|0; $40 = (($$02833) + 16)|0; $41 = HEAP32[(1951376)>>2]|0; $42 = ($40|0)<($41|0); if ($42) { $$02833 = $40;$$03032 = $39;$$034 = $38; } else { break; } } STACKTOP = sp;return; } function _TexIdsOverlay_BuildText($0,$1) { $0 = $0|0; $1 = $1|0; var $$04248 = 0, $$04451 = 0, $$04550 = 0, $$052 = 0, $$149 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0; var $79 = 0, $8 = 0, $80 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 32|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 40|0); $5 = HEAP32[$1>>2]|0; $6 = HEAP32[(1951376)>>2]|0; $7 = ($6|0)>(0); if (!($7)) { $77 = HEAP32[$1>>2]|0; $78 = (($77) - ($5))|0; $79 = (($78|0) / 24)&-1; $80 = ((($0)) + 36|0); HEAP32[$80>>2] = $79; return; } $8 = ((($0)) + 24|0); $9 = HEAP32[$8>>2]|0; $10 = ((($0)) + 28|0); $11 = ((($0)) + 50|0); $12 = ((($0)) + 46|0); $13 = ((($0)) + 72|0); $14 = $3 << 4; $15 = $3 << 1; $16 = ($3*3)|0; $17 = $3 << 2; $18 = ($3*5)|0; $19 = ($3*6)|0; $20 = ($3*7)|0; $21 = $3 << 3; $22 = ($3*9)|0; $23 = ($3*10)|0; $24 = ($3*11)|0; $25 = ($3*12)|0; $26 = ($3*13)|0; $27 = ($3*14)|0; $28 = ($3*15)|0; $$04451 = 0;$$04550 = $9;$$052 = 0; while(1) { $29 = HEAP32[$10>>2]|0; $30 = HEAP16[$11>>1]|0; $31 = $30&65535; $32 = (($29) + ($3))|0; $33 = (($32) - ($31))|0; $34 = $33&65535; HEAP16[$12>>1] = $34; $35 = (($$04550) + 3)|0; $36 = (($35) + ($3))|0; $37 = (($35) + ($15))|0; $38 = (($35) + ($16))|0; $39 = (($35) + ($17))|0; $40 = (($35) + ($18))|0; $41 = (($35) + ($19))|0; $42 = (($35) + ($20))|0; $43 = (($35) + ($21))|0; $44 = (($35) + ($22))|0; $45 = (($35) + ($23))|0; $46 = (($35) + ($24))|0; $47 = (($35) + ($25))|0; $48 = (($35) + ($26))|0; $49 = (($35) + ($27))|0; $50 = (($35) + ($28))|0; $$04248 = 0;$$149 = $$052; while(1) { HEAP32[$13>>2] = $35; $51 = $$149 | 1; _TextAtlas_AddInt($4,$$149,$1); HEAP32[$13>>2] = $36; $52 = (($51) + 1)|0; _TextAtlas_AddInt($4,$51,$1); HEAP32[$13>>2] = $37; $53 = $$149 | 3; _TextAtlas_AddInt($4,$52,$1); HEAP32[$13>>2] = $38; $54 = (($53) + 1)|0; _TextAtlas_AddInt($4,$53,$1); HEAP32[$13>>2] = $39; $55 = (($53) + 2)|0; _TextAtlas_AddInt($4,$54,$1); HEAP32[$13>>2] = $40; $56 = (($53) + 3)|0; _TextAtlas_AddInt($4,$55,$1); HEAP32[$13>>2] = $41; $57 = $$149 | 7; _TextAtlas_AddInt($4,$56,$1); HEAP32[$13>>2] = $42; $58 = (($57) + 1)|0; _TextAtlas_AddInt($4,$57,$1); HEAP32[$13>>2] = $43; $59 = (($57) + 2)|0; _TextAtlas_AddInt($4,$58,$1); HEAP32[$13>>2] = $44; $60 = (($57) + 3)|0; _TextAtlas_AddInt($4,$59,$1); HEAP32[$13>>2] = $45; $61 = (($57) + 4)|0; _TextAtlas_AddInt($4,$60,$1); HEAP32[$13>>2] = $46; $62 = (($57) + 5)|0; _TextAtlas_AddInt($4,$61,$1); HEAP32[$13>>2] = $47; $63 = (($57) + 6)|0; _TextAtlas_AddInt($4,$62,$1); HEAP32[$13>>2] = $48; $64 = (($57) + 7)|0; _TextAtlas_AddInt($4,$63,$1); HEAP32[$13>>2] = $49; $65 = $$149 | 15; _TextAtlas_AddInt($4,$64,$1); HEAP32[$13>>2] = $50; _TextAtlas_AddInt($4,$65,$1); $66 = (($$149) + 16)|0; $67 = HEAP16[$12>>1]|0; $68 = $67&65535; $69 = (($3) + ($68))|0; $70 = $69&65535; HEAP16[$12>>1] = $70; $71 = (($$04248) + 1)|0; $exitcond = ($71|0)==(16); if ($exitcond) { break; } else { $$04248 = $71;$$149 = $66; } } $72 = (($$052) + 256)|0; $73 = (($$04550) + ($14))|0; $74 = (($$04451) + 16)|0; $75 = HEAP32[(1951376)>>2]|0; $76 = ($74|0)<($75|0); if ($76) { $$04451 = $74;$$04550 = $73;$$052 = $72; } else { break; } } $77 = HEAP32[$1>>2]|0; $78 = (($77) - ($5))|0; $79 = (($78|0) / 24)&-1; $80 = ((($0)) + 36|0); HEAP32[$80>>2] = $79; return; } function _TexIdsOverlay_RenderTerrain($0) { $0 = $0|0; var $$0$lcssa = 0, $$0111 = 0, $$02 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1949296)>>2]|0; $2 = $1 << 2; $3 = HEAP32[487323]|0; $4 = ($3|0)>(0); if (!($4)) { $$0$lcssa = $0; return ($$0$lcssa|0); } $$0111 = 0;$$02 = $0; while(1) { $5 = (1949312 + ($$0111<<2)|0); $6 = HEAP32[$5>>2]|0; _Gfx_BindTexture($6); _Gfx_DrawVb_IndexedTris_Range($2,$$02); $7 = (($$02) + ($2))|0; $8 = (($$0111) + 1)|0; $9 = HEAP32[487323]|0; $10 = ($8|0)<($9|0); if ($10) { $$0111 = $8;$$02 = $7; } else { $$0$lcssa = $7; break; } } return ($$0$lcssa|0); } function _TexIdsOverlay_OnAtlasChanged($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 7|0); HEAP8[$1>>0] = 1; _TexIdsOverlay_Layout($0); return; } function _UrlWarningOverlay_Show($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1822552)>>0] = 1; HEAP8[(1822554)>>0] = 1; HEAP32[455637] = 15768; HEAP32[(1822572)>>2] = (1823028); HEAP16[(1822576)>>1] = 0; HEAP16[(1822578)>>1] = 256; _String_Copy((1822572),$0); _Gui_Add(1822548,40); return; } function _UrlWarningOverlay_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 8464; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 6; $3 = ((($0)) + 8|0); HEAP32[$3>>2] = 40; $4 = ((($0)) + 208|0); _Overlay_InitLabels($4); $5 = ((($0)) + 32|0); _ButtonWidget_Init($5,160,154); $6 = ((($0)) + 120|0); _ButtonWidget_Init($6,160,155); return; } function _UrlWarningOverlay_Layout($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 208|0); _Overlay_LayoutLabels($1); $2 = ((($0)) + 32|0); _Overlay_LayoutMainButtons($2); return; } function _UrlWarningOverlay_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 12|0; $2 = sp; _Screen_UpdateVb($0); _Gui_MakeTitleFont($1); _Gui_MakeBodyFont($2); $3 = ((($0)) + 208|0); _TextWidget_SetConst($3,40100,$1); $4 = ((($0)) + 276|0); $5 = ((($0)) + 24|0); _TextWidget_Set($4,$5,$2); $6 = ((($0)) + 344|0); _TextWidget_SetConst($6,40143,$2); $7 = ((($0)) + 412|0); _TextWidget_SetConst($7,40198,$2); $8 = ((($0)) + 32|0); _ButtonWidget_SetConst($8,40253,$1); $9 = ((($0)) + 120|0); _ButtonWidget_SetConst($9,40257,$1); _Font_Free($1); _Font_Free($2); STACKTOP = sp;return; } function _Overlay_LayoutLabels($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; _Widget_SetLocation($0,1,1,0,-120); $1 = ((($0)) + 68|0); _Widget_SetLocation($1,1,1,0,-50); $2 = ((($0)) + 136|0); _Widget_SetLocation($2,1,1,0,-30); $3 = ((($0)) + 204|0); _Widget_SetLocation($3,1,1,0,-10); return; } function _Overlay_LayoutMainButtons($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; _Widget_SetLocation($0,1,1,-110,30); $1 = ((($0)) + 88|0); _Widget_SetLocation($1,1,1,110,30); return; } function _Overlay_InitLabels($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; _TextWidget_Init($0); $1 = ((($0)) + 68|0); _TextWidget_Init($1); $2 = ((($0)) + 132|0); HEAP32[$2>>2] = -2039584; $3 = ((($0)) + 136|0); _TextWidget_Init($3); $4 = ((($0)) + 200|0); HEAP32[$4>>2] = -2039584; $5 = ((($0)) + 204|0); _TextWidget_Init($5); $6 = ((($0)) + 268|0); HEAP32[$6>>2] = -2039584; return; } function _UrlWarningOverlay_OpenUrl($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 24|0); $3 = (_Process_StartOpen($2)|0); $4 = ($3|0)==(0); if ($4) { _Gui_Remove($0); return; } _Logger_SimpleWarn2($3,40260,$2); _Gui_Remove($0); return; } function _UrlWarningOverlay_AppendUrl($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1803528)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { _Gui_Remove($0); return; } $4 = ((($0)) + 24|0); _ChatScreen_AppendInput($4); _Gui_Remove($0); return; } function _TexPackOverlay_Show($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[(1823288)>>0] = 1; HEAP32[455821] = 15832; HEAP32[(1823316)>>2] = (1823964); HEAP16[(1823320)>>1] = 0; HEAP16[(1823322)>>1] = 65; _String_Copy((1823316),$0); $1 = (_Http_AsyncGetHeaders($0,1)|0); HEAP32[(1823324)>>2] = $1; _Gui_Add(1823284,35); return; } function _TexPackOverlay_Init($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 8496; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 8; $3 = ((($0)) + 8|0); HEAP32[$3>>2] = 64; $4 = ((($0)) + 28|0); HEAP32[$4>>2] = 0; $5 = ((($0)) + 26|0); HEAP8[$5>>0] = 0; $6 = ((($0)) + 24|0); HEAP8[$6>>0] = 0; $7 = ((($0)) + 408|0); _Overlay_InitLabels($7); $8 = ((($0)) + 56|0); _ButtonWidget_Init($8,160,0); $9 = ((($0)) + 144|0); _ButtonWidget_Init($9,160,0); $10 = ((($0)) + 232|0); _ButtonWidget_Init($10,160,0); $11 = ((($0)) + 320|0); _ButtonWidget_Init($11,160,0); return; } function _TexPackOverlay_Update($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 320|0; $2 = sp; $3 = ((($0)) + 40|0); $4 = HEAP32[$3>>2]|0; $5 = (_Http_GetResult($4,$2)|0); $6 = ($5<<24>>24)==(0); if ($6) { STACKTOP = sp;return; } $7 = ((($0)) + 7|0); HEAP8[$7>>0] = 1; $8 = ((($0)) + 26|0); HEAP8[$8>>0] = 1; $9 = ((($2)) + 148|0); $10 = HEAP32[$9>>2]|0; $11 = ((($0)) + 28|0); HEAP32[$11>>2] = $10; _TexPackOverlay_UpdateLine3($0); STACKTOP = sp;return; } function _TexPackOverlay_Layout($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 408|0); _Overlay_LayoutLabels($1); $2 = ((($0)) + 56|0); _Overlay_LayoutMainButtons($2); $3 = ((($0)) + 232|0); _Widget_SetLocation($3,1,1,-110,85); $4 = ((($0)) + 320|0); _Widget_SetLocation($4,1,1,110,85); return; } function _TexPackOverlay_ContextLost($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 44|0); _Font_Free($1); _Screen_ContextLost($0); return; } function _TexPackOverlay_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _Screen_UpdateVb($0); _Gui_MakeTitleFont($1); $2 = ((($0)) + 44|0); _Gui_MakeBodyFont($2); $3 = ((($0)) + 408|0); $4 = ((($0)) + 24|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(0); $7 = $6 ? 40283 : 40334; _TextWidget_SetConst($3,$7,$1); $8 = ((($0)) + 476|0); $9 = HEAP8[$4>>0]|0; $10 = ($9<<24>>24)==(0); $11 = $10 ? 40362 : 40380; _TextWidget_SetConst($8,$11,$2); _TexPackOverlay_UpdateLine2($0); _TexPackOverlay_UpdateLine3($0); $12 = ((($0)) + 56|0); $13 = HEAP8[$4>>0]|0; $14 = ($13<<24>>24)==(0); $15 = $14 ? 40253 : 40446; _ButtonWidget_SetConst($12,$15,$1); $16 = ((($0)) + 144|0); $17 = HEAP8[$4>>0]|0; $18 = ($17<<24>>24)==(0); $19 = $18 ? 40257 : 40455; _ButtonWidget_SetConst($16,$19,$1); $20 = HEAP8[$4>>0]|0; $21 = ($20<<24>>24)==(0); $22 = $21 ? 157 : 156; $23 = ((($0)) + 88|0); HEAP32[$23>>2] = $22; $24 = $21 ? 159 : 158; $25 = ((($0)) + 176|0); HEAP32[$25>>2] = $24; if (!($21)) { $30 = HEAP8[$4>>0]|0; $31 = ($30<<24>>24)==(0); $32 = $31 ? 8 : 6; $33 = ((($0)) + 20|0); HEAP32[$33>>2] = $32; _Font_Free($1); STACKTOP = sp;return; } $26 = ((($0)) + 232|0); _ButtonWidget_SetConst($26,40463,$1); $27 = ((($0)) + 320|0); _ButtonWidget_SetConst($27,40474,$1); $28 = ((($0)) + 264|0); HEAP32[$28>>2] = 157; $29 = ((($0)) + 352|0); HEAP32[$29>>2] = 159; $30 = HEAP8[$4>>0]|0; $31 = ($30<<24>>24)==(0); $32 = $31 ? 8 : 6; $33 = ((($0)) + 20|0); HEAP32[$33>>2] = $32; _Font_Free($1); STACKTOP = sp;return; } function _TexPackOverlay_UpdateLine2($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 16|0; $2 = sp + 8|0; $3 = sp; $4 = 1949280; $5 = $4; $6 = HEAP32[$5>>2]|0; $7 = (($4) + 4)|0; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = $1; $11 = $10; HEAP32[$11>>2] = $6; $12 = (($10) + 4)|0; $13 = $12; HEAP32[$13>>2] = $9; $14 = ((($0)) + 24|0); $15 = HEAP8[$14>>0]|0; $16 = ($15<<24>>24)==(0); if (!($16)) { $52 = ((($0)) + 544|0); $53 = ((($0)) + 44|0); _TextWidget_Set($52,$1,$53); STACKTOP = sp;return; } $17 = ((($0)) + 32|0); $18 = $17; $19 = $18; $20 = HEAP32[$19>>2]|0; $21 = (($18) + 4)|0; $22 = $21; $23 = HEAP32[$22>>2]|0; $24 = $1; $25 = $24; HEAP32[$25>>2] = $20; $26 = (($24) + 4)|0; $27 = $26; HEAP32[$27>>2] = $23; $28 = (_String_CaselessStarts($1,15896)|0); $29 = ($28|0)==(0); if (!($29)) { _String_UNSAFE_SubstringAt($2,$1,8); $30 = $2; $31 = $30; $32 = HEAP32[$31>>2]|0; $33 = (($30) + 4)|0; $34 = $33; $35 = HEAP32[$34>>2]|0; $36 = $1; $37 = $36; HEAP32[$37>>2] = $32; $38 = (($36) + 4)|0; $39 = $38; HEAP32[$39>>2] = $35; } $40 = (_String_CaselessStarts($1,15904)|0); $41 = ($40|0)==(0); if ($41) { $52 = ((($0)) + 544|0); $53 = ((($0)) + 44|0); _TextWidget_Set($52,$1,$53); STACKTOP = sp;return; } _String_UNSAFE_SubstringAt($3,$1,7); $42 = $3; $43 = $42; $44 = HEAP32[$43>>2]|0; $45 = (($42) + 4)|0; $46 = $45; $47 = HEAP32[$46>>2]|0; $48 = $1; $49 = $48; HEAP32[$49>>2] = $44; $50 = (($48) + 4)|0; $51 = $50; HEAP32[$51>>2] = $47; $52 = ((($0)) + 544|0); $53 = ((($0)) + 44|0); _TextWidget_Set($52,$1,$53); STACKTOP = sp;return; } function _TexPackOverlay_UpdateLine3($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 72|0; $2 = sp; $3 = sp + 64|0; $4 = ((($0)) + 24|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(0); if (!($6)) { $7 = ((($0)) + 612|0); $8 = ((($0)) + 44|0); _TextWidget_SetConst($7,40484,$8); STACKTOP = sp;return; } $9 = ((($0)) + 28|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0); if (!($11)) { HEAP32[$1>>2] = $2; $12 = ((($1)) + 4|0); HEAP16[$12>>1] = 0; $13 = ((($1)) + 6|0); HEAP16[$13>>1] = 64; $14 = (+($10>>>0)); $15 = $14 * 9.5367431640625E-7; HEAPF32[$3>>2] = $15; _String_Format1($1,40534,$3); $16 = ((($0)) + 612|0); $17 = ((($0)) + 44|0); _TextWidget_Set($16,$1,$17); STACKTOP = sp;return; } $18 = ((($0)) + 26|0); $19 = HEAP8[$18>>0]|0; $20 = ($19<<24>>24)==(0); $21 = ((($0)) + 612|0); $22 = ((($0)) + 44|0); if ($20) { _TextWidget_SetConst($21,40579,$22); STACKTOP = sp;return; } else { _TextWidget_SetConst($21,40556,$22); STACKTOP = sp;return; } } function _TexPackOverlay_YesClick($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 32|0); _TexturePack_Extract($2); $3 = (_TexPackOverlay_IsAlways($0,$1)|0); $4 = ($3<<24>>24)==(0); if ($4) { _Gui_Remove($0); return; } _TextureCache_Accept($2); _Gui_Remove($0); return; } function _TexPackOverlay_ConfirmNoClick($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 25|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if ($4) { _Gui_Remove($0); return; } $5 = ((($0)) + 32|0); _TextureCache_Deny($5); _Gui_Remove($0); return; } function _TexPackOverlay_NoClick($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_TexPackOverlay_IsAlways($0,$1)|0); $3 = ((($0)) + 25|0); HEAP8[$3>>0] = $2; $4 = ((($0)) + 24|0); HEAP8[$4>>0] = 1; _Gui_Refresh($0); return; } function _TexPackOverlay_GoBackClick($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 24|0); HEAP8[$2>>0] = 0; _Gui_Refresh($0); return; } function _TexPackOverlay_IsAlways($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Screen_Index($0,$1)|0); $3 = ($2|0)>(5); $4 = $3&1; return ($4|0); } function _TouchOnscreenScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1824036)>>0] = 1; HEAP8[(1824038)>>0] = 1; HEAP32[456008] = 15912; _Gui_Add(1824032,45); return; } function _TouchOnscreenScreen_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 8528; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 11; $3 = ((($0)) + 8|0); HEAP32[$3>>2] = 132; $4 = ((($0)) + 28|0); _ButtonWidget_Init($4,400,160); $5 = ((($0)) + 116|0); _ButtonWidget_Init($5,40,161); $6 = ((($0)) + 204|0); _ButtonWidget_Init($6,40,162); _TouchOnscreen_SetPage($0,1); _TouchOnscreen_UpdateColors($0); return; } function _TouchOnscreenScreen_Layout($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 292|0); $2 = ((($0)) + 996|0); $3 = HEAP32[$2>>2]|0; _Menu_LayoutButtons($1,$3,8); $4 = ((($0)) + 28|0); _Menu_LayoutBack($4); $5 = ((($0)) + 116|0); _Widget_SetLocation($5,1,1,-260,0); $6 = ((($0)) + 204|0); _Widget_SetLocation($6,1,1,260,0); return; } function _TouchOnscreenScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1000|0); _Font_Free($1); _Screen_ContextLost($0); return; } function _TouchOnscreenScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1000|0); _Gui_MakeTitleFont($1); _Screen_UpdateVb($0); $2 = ((($0)) + 292|0); $3 = ((($0)) + 996|0); $4 = HEAP32[$3>>2]|0; _Menu_SetButtons($2,$1,$4,8); $5 = ((($0)) + 28|0); _ButtonWidget_SetConst($5,34990,$1); $6 = ((($0)) + 116|0); _ButtonWidget_SetConst($6,34986,$1); $7 = ((($0)) + 204|0); _ButtonWidget_SetConst($7,34988,$1); return; } function _TouchOnscreen_More($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _TouchCtrlsScreen_Show(); return; } function _TouchOnscreen_Left($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _TouchOnscreen_SetPage($0,1); _Gui_Refresh($0); _TouchOnscreen_UpdateColors($0); return; } function _TouchOnscreen_Right($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _TouchOnscreen_SetPage($0,0); _Gui_Refresh($0); _TouchOnscreen_UpdateColors($0); return; } function _TouchOnscreen_SetPage($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)!=(0); $3 = $2 ? 0 : 8; $4 = ((($0)) + 24|0); HEAP32[$4>>2] = $3; $5 = $2 ? 8576 : 8672; $6 = ((($0)) + 996|0); HEAP32[$6>>2] = $5; $7 = ((($0)) + 292|0); _Menu_InitButtons($7,200,$5,8); $8 = ((($0)) + 137|0); HEAP8[$8>>0] = $1; $9 = ($1<<24>>24)==(0); $10 = $9&1; $11 = ((($0)) + 225|0); HEAP8[$11>>0] = $10; return; } function _TouchOnscreen_UpdateColors($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 24|0); $2 = HEAP32[$1>>2]|0; $3 = HEAP32[(1803564)>>2]|0; $4 = 1 << $2; $5 = $3 & $4; $6 = ($5|0)==(0); $7 = $6 ? -8421505 : -1; $8 = ((($0)) + 356|0); HEAP32[$8>>2] = $7; $9 = (($2) + 1)|0; $10 = 1 << $9; $11 = $3 & $10; $12 = ($11|0)==(0); $13 = $12 ? -8421505 : -1; $14 = ((($0)) + 444|0); HEAP32[$14>>2] = $13; $15 = (($2) + 2)|0; $16 = 1 << $15; $17 = $3 & $16; $18 = ($17|0)==(0); $19 = $18 ? -8421505 : -1; $20 = ((($0)) + 532|0); HEAP32[$20>>2] = $19; $21 = (($2) + 3)|0; $22 = 1 << $21; $23 = $3 & $22; $24 = ($23|0)==(0); $25 = $24 ? -8421505 : -1; $26 = ((($0)) + 620|0); HEAP32[$26>>2] = $25; $27 = (($2) + 4)|0; $28 = 1 << $27; $29 = $3 & $28; $30 = ($29|0)==(0); $31 = $30 ? -8421505 : -1; $32 = ((($0)) + 708|0); HEAP32[$32>>2] = $31; $33 = (($2) + 5)|0; $34 = 1 << $33; $35 = $3 & $34; $36 = ($35|0)==(0); $37 = $36 ? -8421505 : -1; $38 = ((($0)) + 796|0); HEAP32[$38>>2] = $37; $39 = (($2) + 6)|0; $40 = 1 << $39; $41 = $3 & $40; $42 = ($41|0)==(0); $43 = $42 ? -8421505 : -1; $44 = ((($0)) + 884|0); HEAP32[$44>>2] = $43; $45 = (($2) + 7)|0; $46 = 1 << $45; $47 = $3 & $46; $48 = ($47|0)==(0); $49 = $48 ? -8421505 : -1; $50 = ((($0)) + 972|0); HEAP32[$50>>2] = $49; return; } function _TouchOnscreen_Any($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $storemerge = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Screen_Index($0,$1)|0); $3 = (($2) + -3)|0; $4 = ((($0)) + 24|0); $5 = HEAP32[$4>>2]|0; $6 = (($3) + ($5))|0; $7 = 1 << $6; $8 = HEAP32[(1803564)>>2]|0; $9 = $7 & $8; $10 = ($9|0)==(0); $11 = $7 | $8; $12 = $7 ^ -1; $13 = $8 & $12; $storemerge = $10 ? $11 : $13; HEAP32[(1803564)>>2] = $storemerge; _Options_SetInt(40627,$storemerge); _TouchOnscreen_UpdateColors($0); _TouchScreen_Refresh(); return; } function _TouchCtrlsScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1825048)>>0] = 1; HEAP8[(1825050)>>0] = 1; HEAP32[456261] = 15976; _Gui_Add(1825044,45); return; } function _TouchCtrlsScreen_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 8832; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 6; $3 = ((($0)) + 8|0); HEAP32[$3>>2] = 72; $4 = ((($0)) + 112|0); _Menu_InitButtons($4,195,8768,4); $5 = ((($0)) + 464|0); _Menu_InitButtons($5,400,(8816),1); $6 = ((($0)) + 24|0); _ButtonWidget_Init($6,400,163); return; } function _TouchCtrlsScreen_Layout($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 112|0); _Menu_LayoutButtons($1,8768,5); $2 = ((($0)) + 24|0); _Menu_LayoutBack($2); return; } function _TouchCtrlsScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 552|0); _Font_Free($1); _Screen_ContextLost($0); return; } function _TouchCtrlsScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 552|0); _Gui_MakeTitleFont($1); _Screen_UpdateVb($0); $2 = ((($0)) + 112|0); _Menu_SetButtons($2,$1,8768,5); $3 = ((($0)) + 24|0); _ButtonWidget_SetConst($3,34990,$1); _TouchCtrls_UpdateTapText($0); _TouchCtrls_UpdateHoldText($0); _TouchCtrls_UpdateSensitivity($0); _TouchCtrls_UpdateScale($0); return; } function _TouchCtrls_UpdateTapText($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 112|0); $2 = HEAP32[451035]|0; $3 = (_GetTapDesc($2)|0); $4 = ((($0)) + 552|0); _ButtonWidget_SetConst($1,$3,$4); $5 = ((($0)) + 7|0); HEAP8[$5>>0] = 1; return; } function _TouchCtrls_UpdateHoldText($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 200|0); $2 = HEAP32[3677]|0; $3 = (_GetHoldDesc($2)|0); $4 = ((($0)) + 552|0); _ButtonWidget_SetConst($1,$3,$4); $5 = ((($0)) + 7|0); HEAP8[$5>>0] = 1; return; } function _TouchCtrls_UpdateSensitivity($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 64|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 64; _String_AppendConst($1,40658); _MiscOptionsScreen_GetSensitivity($1); $5 = ((($0)) + 288|0); $6 = ((($0)) + 552|0); _ButtonWidget_Set($5,$1,$6); $7 = ((($0)) + 7|0); HEAP8[$7>>0] = 1; STACKTOP = sp;return; } function _TouchCtrls_UpdateScale($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 64|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 64; _String_AppendConst($1,40650); $5 = +HEAPF32[(1803568)>>2]; _String_AppendFloat($1,$5,1); $6 = ((($0)) + 376|0); $7 = ((($0)) + 552|0); _ButtonWidget_Set($6,$1,$7); $8 = ((($0)) + 7|0); HEAP8[$8>>0] = 1; STACKTOP = sp;return; } function _GetHoldDesc($0) { $0 = $0|0; var $switch$select = 0, $switch$select3 = 0, $switch$selectcmp = 0, $switch$selectcmp2 = 0, label = 0, sp = 0; sp = STACKTOP; $switch$selectcmp = ($0|0)==(1); $switch$select = $switch$selectcmp ? 40672 : 40685; $switch$selectcmp2 = ($0|0)==(0); $switch$select3 = $switch$selectcmp2 ? 40696 : $switch$select; return ($switch$select3|0); } function _GetTapDesc($0) { $0 = $0|0; var $switch$select = 0, $switch$select3 = 0, $switch$selectcmp = 0, $switch$selectcmp2 = 0, label = 0, sp = 0; sp = STACKTOP; $switch$selectcmp = ($0|0)==(1); $switch$select = $switch$selectcmp ? 40708 : 40720; $switch$selectcmp2 = ($0|0)==(0); $switch$select3 = $switch$selectcmp2 ? 40730 : $switch$select; return ($switch$select3|0); } function _TouchCtrls_Tap($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[451035]|0; $3 = (($2) + 1)|0; $4 = (($3|0) % 3)&-1; HEAP32[451035] = $4; _TouchCtrls_UpdateTapText($0); return; } function _TouchCtrls_Hold($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[3677]|0; $3 = (($2) + 1)|0; $4 = (($3|0) % 3)&-1; HEAP32[3677] = $4; _TouchCtrls_UpdateHoldText($0); return; } function _TouchCtrls_Sensitivity($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp + 64|0; $3 = sp; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 64; HEAP32[456406] = 21920; HEAP32[(1825628)>>2] = 1; HEAP32[(1825632)>>2] = 200; HEAP32[(1825636)>>2] = 30; _MiscOptionsScreen_GetSensitivity($2); _MenuInputOverlay_Show(1825624,$2,164,1); $6 = ((($0)) + 308|0); HEAP8[$6>>0] = 0; STACKTOP = sp;return; } function _TouchCtrls_Scale($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp + 64|0; $3 = sp; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 64; HEAP32[456402] = 21960; HEAPF32[(1825612)>>2] = 0.25; HEAPF32[(1825616)>>2] = 5.0; HEAPF32[(1825620)>>2] = 1.0; $6 = +HEAPF32[(1803568)>>2]; _String_AppendFloat($2,$6,1); _MenuInputOverlay_Show(1825608,$2,165,1); $7 = ((($0)) + 396|0); HEAP8[$7>>0] = 0; STACKTOP = sp;return; } function _TouchCtrls_Onscreen($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _TouchOnscreenScreen_Show(); return; } function _TouchCtrls_ScaleDone($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(0); if ($2) { return; } _ChatOptionsScreen_SetScale($0,(1803568),40760); _TouchCtrls_UpdateScale(1825044); return; } function _TouchCtrls_SensitivityDone($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(0); if ($2) { return; } _MiscOptionsScreen_SetSensitivity($0); _TouchCtrls_UpdateSensitivity(1825044); return; } function _TouchCtrls_More($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _TouchMoreScreen_Show(); return; } function _TouchMoreScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1825644)>>0] = 1; HEAP8[(1825646)>>0] = 1; HEAP32[456410] = 16040; _Gui_Add(1825640,45); return; } function _TouchMoreScreen_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 8944; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 7; $3 = ((($0)) + 8|0); HEAP32[$3>>2] = 84; $4 = ((($0)) + 112|0); _Menu_InitButtons($4,195,8864,4); $5 = ((($0)) + 464|0); _Menu_InitButtons($5,400,(8912),2); $6 = ((($0)) + 24|0); _ButtonWidget_Init($6,400,166); return; } function _TouchMoreScreen_Layout($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 112|0); _Menu_LayoutButtons($1,8864,6); $2 = ((($0)) + 24|0); _Menu_LayoutBack($2); return; } function _TouchMoreScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _Gui_MakeTitleFont($1); _Screen_UpdateVb($0); $2 = ((($0)) + 112|0); _Menu_SetButtons($2,$1,8864,6); $3 = ((($0)) + 24|0); _ButtonWidget_SetConst($3,35020,$1); _Font_Free($1); STACKTOP = sp;return; } function _TouchMore_Take($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Gui_Remove(1825640); HEAP8[1972836] = 1; return; } function _TouchMore_Screen($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Gui_Remove(1825640); _Game_ToggleFullscreen(); return; } function _TouchMore_Chat($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Gui_Remove(1825640); _ChatScreen_OpenInput(1949280); return; } function _TouchMore_Fog($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Game_CycleViewDistance(); return; } function _TouchMore_Ctrls($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _TouchCtrlsScreen_Show(); return; } function _TouchMore_Menu($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Gui_Remove(1825640); _Gui_ShowPauseMenu(); return; } function _TouchMore_Game($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Gui_Remove(1825640); return; } function _OnInit_1408() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[(1826332)>>2] = 873664; HEAP32[(1826336)>>2] = 1536; _RegisterDefaultModels(); _OnContextRecreated_1412(0); $0 = HEAP8[1972839]|0; $1 = (_Options_GetBool(40789,$0)|0); HEAP8[(1826322)>>0] = $1; _Event_Register((1792488),0,6); _Event_Register((1793528),0,367); _Event_Register((1793788),0,368); return; } function _OnFree_1409() { var label = 0, sp = 0; sp = STACKTOP; _OnContextLost_1411(0); _CustomModel_FreeAll(); return; } function _OnReset_1410() { var label = 0, sp = 0; sp = STACKTOP; _CustomModel_FreeAll(); return; } function _CustomModel_FreeAll() { var $$04 = 0, $0 = 0, $1 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $$04 = 0; while(1) { $0 = (400832 + (($$04*7388)|0)|0); _CustomModel_Undefine($0); $1 = (($$04) + 1)|0; $exitcond = ($1|0)==(64); if ($exitcond) { break; } else { $$04 = $1; } } return; } function _CustomModel_Undefine($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 166|0); $2 = HEAP8[$1>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } $4 = ((($0)) + 165|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(0); if (!($6)) { _Model_Unregister($0); } $7 = ((($0)) + 4|0); $8 = HEAP32[$7>>2]|0; _Mem_Free($8); _Mem_Set($0,0,7388); return; } function _Model_Unregister($0) { $0 = $0|0; var $$02022 = 0, $$021 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = HEAP32[456586]|0; $3 = ($2|0)==($0|0); if ($3) { $4 = ((($0)) + 96|0); $5 = HEAP32[$4>>2]|0; HEAP32[456586] = $5; } $6 = ($2|0)==(0|0); if (!($6)) { $7 = ((($0)) + 96|0); $$02022 = $2; while(1) { $8 = ((($$02022)) + 96|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)==($0|0); if ($10) { $11 = HEAP32[$7>>2]|0; HEAP32[$8>>2] = $11; $12 = $11; $13 = $12; } else { $13 = $9; } $14 = ($13|0)==(0|0); if ($14) { break; } else { $$02022 = $13; } } HEAP32[456587] = $$02022; } $$021 = 0; while(1) { $15 = (1782744 + ($$021<<2)|0); $16 = HEAP32[$15>>2]|0; $17 = ($16|0)==(0|0); if (!($17)) { $18 = ((($16)) + 48|0); $19 = HEAP32[$18>>2]|0; $20 = ($19|0)==($0|0); if ($20) { $21 = HEAP32[(1826340)>>2]|0; $22 = HEAP32[$21>>2]|0; _String_FromReadonly($1,$22); _Entity_SetModel($16,$1); } } $23 = (($$021) + 1)|0; $exitcond = ($23|0)==(256); if ($exitcond) { break; } else { $$021 = $23; } } STACKTOP = sp;return; } function _OnContextLost_1411($0) { $0 = $0|0; var $$0 = 0, $$04 = 0, $$05 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteVb((1826328)); $1 = HEAP8[(1803130)>>0]|0; $2 = ($1<<24>>24)==(0); if (!($2)) { return; } $$04 = HEAP32[456588]|0; $3 = ($$04|0)==(0|0); if ($3) { return; } $$05 = $$04; while(1) { $4 = ((($$05)) + 8|0); _Gfx_DeleteTexture($4); $5 = ((($$05)) + 12|0); $$0 = HEAP32[$5>>2]|0; $6 = ($$0|0)==(0|0); if ($6) { break; } else { $$05 = $$0; } } return; } function _RegisterDefaultModels() { var label = 0, sp = 0; sp = STACKTOP; _Model_RegisterTexture(16128); _Model_RegisterTexture(16144); _Model_RegisterTexture(16160); _Model_RegisterTexture(16176); _Model_RegisterTexture(16192); _Model_RegisterTexture(16208); _Model_RegisterTexture(16224); _Model_RegisterTexture(16240); _Model_RegisterTexture(16256); _Model_RegisterTexture(16272); _HumanoidModel_Register(); _MakeModel(16288); HEAP32[(1826340)>>2] = 16288; _ChickenModel_Register(); _CreeperModel_Register(); _PigModel_Register(); _SheepModel_Register(); _NoFurModel_Register(); _SkeletonModel_Register(); _SpiderModel_Register(); _ZombieModel_Register(); _BlockModel_Register(); _ChibiModel_Register(); _HeadModel_Register(); _SittingModel_Register(); _CorpseModel_Register(); _SkinnedCubeModel_Register(); _HoldModel_Register(); return; } function _OnContextRecreated_1412($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1826336)>>2]|0; _Gfx_RecreateDynamicVb((1826328),1,$1); return; } function _Models_TextureChanged($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $$010 = 0, $$09 = 0, $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $$09 = HEAP32[456588]|0; $3 = ($$09|0)==(0|0); if ($3) { return; } $$010 = $$09; while(1) { $4 = HEAP32[$$010>>2]|0; $5 = (_String_CaselessEqualsConst($2,$4)|0); $6 = ($5|0)==(0); if (!($6)) { break; } $9 = ((($$010)) + 12|0); $$0 = HEAP32[$9>>2]|0; $10 = ($$0|0)==(0|0); if ($10) { label = 6; break; } else { $$010 = $$0; } } if ((label|0) == 6) { return; } $7 = ((($$010)) + 8|0); $8 = ((($$010)) + 4|0); (_Game_UpdateTexture($7,$1,$2,$8)|0); return; } function _Model_RegisterTexture($0) { $0 = $0|0; var $$sink = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[456588]|0; $2 = ($1|0)==(0|0); $3 = HEAP32[457077]|0; $4 = ((($3)) + 12|0); $$sink = $2 ? 1826352 : $4; HEAP32[$$sink>>2] = $0; HEAP32[457077] = $0; $5 = ((($0)) + 12|0); HEAP32[$5>>2] = 0; return; } function _HumanoidModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(16288); HEAP32[(16368)>>2] = 369; HEAP8[(16333)>>0] = 1; HEAP8[(16334)>>0] = 1; _Model_Register(16288); return; } function _MakeModel($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1826324)>>2]|0; HEAP32[(1826324)>>2] = $0; $2 = ((($0)) + 12|0); $3 = HEAP32[$2>>2]|0; FUNCTION_TABLE_v[$3 & 127](); $4 = ((($0)) + 42|0); HEAP8[$4>>0] = 1; $5 = ((($0)) + 36|0); HEAP32[$5>>2] = 0; HEAP32[(1826324)>>2] = $1; return; } function _ChickenModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(19608); _Model_Register(19608); return; } function _CreeperModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(19208); _Model_Register(19208); return; } function _PigModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(18808); _Model_Register(18808); return; } function _SheepModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(18708); _Model_Register(18708); return; } function _NoFurModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(18044); _Model_Register(18044); return; } function _SkeletonModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(17644); HEAP32[(17724)>>2] = 370; HEAP8[(17684)>>0] = 5; _Model_Register(17644); return; } function _SpiderModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(17288); _Model_Register(17288); return; } function _ZombieModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(17176); HEAP32[(17256)>>2] = 371; _Model_Register(17176); return; } function _BlockModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(16388); HEAP8[(16431)>>0] = 0; HEAP8[(16432)>>0] = 0; HEAP8[(16435)>>0] = 0; _Model_Register(16388); return; } function _ChibiModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(16952); HEAP32[(17032)>>2] = 372; HEAP8[(16992)>>0] = 3; HEAP8[(16993)>>0] = 6; HEAP8[(16997)>>0] = 1; HEAP8[(16998)>>0] = 1; HEAPF32[(17036)>>2] = 3.0; HEAPF32[(17040)>>2] = 0.5; _Model_Register(16952); return; } function _HeadModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(16816); HEAP8[(16862)>>0] = 1; HEAP8[(16863)>>0] = 0; HEAP32[(16892)>>2] = 7; _Model_Register(16816); return; } function _SittingModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(16680); HEAP32[(16760)>>2] = 369; HEAP8[(16725)>>0] = 1; HEAP8[(16726)>>0] = 1; HEAPF32[(16768)>>2] = 0.5; HEAP32[(16756)>>2] = 8; _Model_Register(16680); return; } function _CorpseModel_Register() { var dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; dest=1827072; src=16288; stop=dest+100|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); HEAP32[456768] = 40833; HEAP32[(1827084)>>2] = 51; HEAP32[(1827088)>>2] = 373; _Model_Register(1827072); return; } function _SkinnedCubeModel_Register() { var label = 0, sp = 0; sp = STACKTOP; _Model_Init(16500); HEAP8[(16546)>>0] = 1; HEAP8[(16547)>>0] = 0; _Model_Register(16500); return; } function _HoldModel_Register() { var dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; dest=1826356; src=16288; stop=dest+100|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); HEAP32[456589] = 40810; HEAP32[(1826368)>>2] = 51; HEAP32[(1826372)>>2] = 374; HEAP32[(1826380)>>2] = 21; _Model_Register(1826356); return; } function _Model_NoParts() { var label = 0, sp = 0; sp = STACKTOP; return; } function _HoldModel_Draw($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $3 = 0.0; var $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; _RecalcProperties($0); $1 = ((($0)) + 204|0); $2 = +HEAPF32[$1>>2]; $3 = $2 * 2.0; $4 = $3; $5 = (+_Math_Sin($4)); $6 = $5; $7 = ((($0)) + 208|0); $8 = +HEAPF32[$7>>2]; $9 = $8 * $6; $10 = $9 * 3.1415927410125732; $11 = $10 * 0.0625; HEAPF32[456614] = $11; $12 = ((($0)) + 264|0); $13 = +HEAPF32[$12>>2]; $14 = 1.0 - $8; $15 = $14 * $13; HEAPF32[456615] = $15; $16 = $11 + 0.5; $17 = $15 + $16; HEAPF32[$12>>2] = $17; $18 = ((($0)) + 268|0); HEAPF32[$18>>2] = 0.0; $19 = HEAP32[(1826340)>>2]|0; _Model_SetupState($19,$0); _HumanModel_Draw($0); $20 = +HEAPF32[456614]; $21 = $20 + 1.0471975803375244; $22 = +HEAPF32[456615]; $23 = $21 + $22; $24 = $23 * 10.0; $25 = $24 * 0.0625; $26 = $25 + 0.12700000405311584; _DrawBlockTransform($0,$26); return; } function _HoldModel_GetEyeY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _RecalcProperties($0); return +1.625; } function _Model_Register($0) { $0 = $0|0; var $$sink = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[456586]|0; $2 = ($1|0)==(0|0); $3 = HEAP32[456587]|0; $4 = ((($3)) + 96|0); $$sink = $2 ? 1826344 : $4; HEAP32[$$sink>>2] = $0; HEAP32[456587] = $0; $5 = ((($0)) + 96|0); HEAP32[$5>>2] = 0; return; } function _RecalcProperties($0) { $0 = $0|0; var $$ = 0, $1 = 0, $10 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 80|0); $2 = +HEAPF32[$1>>2]; $3 = $2 + -0.99989998340606689; $4 = $3 * 1000.0; $5 = (~~(($4))&65535); $6 = ($5<<16>>16)==(0); if ($6) { return; } $7 = ($5&65535)<(768); $8 = ((($0)) + 52|0); $$ = $7 ? $5 : 0; HEAP16[$8>>1] = $$; HEAPF32[$1>>2] = 1.0; $9 = ((($0)) + 84|0); HEAPF32[$9>>2] = 1.0; $10 = ((($0)) + 88|0); HEAPF32[$10>>2] = 1.0; _Entity_UpdateModelBounds($0); return; } function _Model_SetupState($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, $storemerge = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); HEAP32[$2>>2] = 0; $3 = HEAP32[$1>>2]|0; $4 = ((($3)) + 12|0); $5 = HEAP32[$4>>2]|0; $6 = (FUNCTION_TABLE_ii[$5 & 31]($1)|0); HEAP32[456570] = $6; HEAPF32[(1826304)>>2] = 100.0; HEAPF32[(1826308)>>2] = 100.0; $7 = ((($1)) + 110|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(0); if ($9) { $10 = (_PackedCol_Scale($6,0.5)|0); HEAP32[(1826284)>>2] = $10; $11 = (_PackedCol_Scale($6,0.80000001192092896)|0); HEAP32[(1826288)>>2] = $11; $12 = (_PackedCol_Scale($6,0.60000002384185791)|0); $storemerge = $12; } else { HEAP32[(1826284)>>2] = $6; HEAP32[(1826288)>>2] = $6; $storemerge = $6; } HEAP32[(1826296)>>2] = $storemerge; $13 = HEAP32[(1826288)>>2]|0; HEAP32[(1826292)>>2] = $13; HEAP32[(1826300)>>2] = $storemerge; $14 = ((($1)) + 20|0); $15 = +HEAPF32[$14>>2]; $16 = ((($1)) + 28|0); $17 = +HEAPF32[$16>>2]; $18 = $15 - $17; $19 = $18 * 0.01745329238474369; $20 = $19; $21 = (+_Math_Cos($20)); $22 = $21; HEAPF32[(1826312)>>2] = $22; $23 = (+_Math_Sin($20)); $24 = $23; HEAPF32[(1826316)>>2] = $24; HEAP32[(1826324)>>2] = $0; return; } function _HumanModel_Draw($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _HumanModel_DrawCore($0,1826608,1); return; } function _DrawBlockTransform($0,$1) { $0 = $0|0; $1 = +$1; var $$byval_copy = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0, $DrawBlockTransform$pos$byval_copy = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $$byval_copy = sp + 12|0; $DrawBlockTransform$pos$byval_copy = sp; $2 = ((($0)) + 4|0); ;HEAP32[1826464>>2]=HEAP32[$2>>2]|0;HEAP32[1826464+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[1826464+8>>2]=HEAP32[$2+8>>2]|0; $3 = ((($0)) + 200|0); $4 = +HEAPF32[$3>>2]; $5 = +HEAPF32[(1826468)>>2]; $6 = $4 + $5; HEAPF32[(1826468)>>2] = $6; $7 = ((($0)) + 80|0); ;HEAP32[$DrawBlockTransform$pos$byval_copy>>2]=HEAP32[1826464>>2]|0;HEAP32[$DrawBlockTransform$pos$byval_copy+4>>2]=HEAP32[1826464+4>>2]|0;HEAP32[$DrawBlockTransform$pos$byval_copy+8>>2]=HEAP32[1826464+8>>2]|0; ;HEAP32[$$byval_copy>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$7+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$7+8>>2]|0; _Entity_GetTransform($0,$DrawBlockTransform$pos$byval_copy,$$byval_copy,1826476); _Matrix_Mul(1826476,1826476,(1803132)); _Matrix_Translate(1826540,0.33000001311302185,$1,-0.4375); _Matrix_Mul(1826476,1826540,1826476); _Matrix_Scale(1826540,0.3333333432674408,0.3333333432674408,0.3333333432674408); _Matrix_Mul(1826476,1826540,1826476); _Model_SetupState(16388,$0); _Gfx_LoadMatrix(1,1826476); $8 = HEAP32[(16404)>>2]|0; FUNCTION_TABLE_vi[$8 & 511]($0); STACKTOP = sp;return; } function _BlockModel_Draw($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 52|0); $2 = HEAP16[$1>>1]|0; HEAP16[986404] = $2; HEAP32[456651] = 0; $3 = $2&65535; $4 = (1120788 + ($3)|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(4); if ($6) { return; } $7 = (1108500 + ($3)|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(0); if (!($9)) { ;HEAP32[1826280>>2]=4294967295|0;HEAP32[1826280+4>>2]=4294967295|0;HEAP32[1826280+8>>2]=4294967295|0;HEAP32[1826280+12>>2]=4294967295|0;HEAP32[1826280+16>>2]=4294967295|0;HEAP32[1826280+20>>2]=4294967295|0; } $10 = ($5<<24>>24)==(5); $11 = $10&1; _BlockModel_BuildParts($11); if ($10) { _Gfx_SetFaceCulling(1); _BlockModel_DrawParts(); _Gfx_SetFaceCulling(0); return; } else { _BlockModel_DrawParts(); return; } } function _BlockModel_GetNameY($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 52|0); $2 = HEAP16[$1>>1]|0; $3 = $2&65535; $4 = (((1134612 + (($3*12)|0)|0)) + 4|0); $5 = +HEAPF32[$4>>2]; $6 = $5 + 0.075000002980232239; return (+$6); } function _BlockModel_GetEyeY($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 52|0); $2 = HEAP16[$1>>1]|0; $3 = $2&65535; $4 = (((1125396 + (($3*12)|0)|0)) + 4|0); $5 = +HEAPF32[$4>>2]; $6 = (((1134612 + (($3*12)|0)|0)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = $5 + $7; $9 = $8 * 0.5; return (+$9); } function _BlockModel_GetSize($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); $2 = ((($0)) + 52|0); $3 = HEAP16[$2>>1]|0; $4 = $3&65535; $5 = (1134612 + (($4*12)|0)|0); $6 = (1125396 + (($4*12)|0)|0); _Vec3_Sub_1417($1,$5,$6); _Vec3_Sub_1417($1,$1,16488); $7 = +HEAPF32[$1>>2]; $8 = $7 > 0.0078125; $9 = $8 ? $7 : 0.0078125; HEAPF32[$1>>2] = $9; $10 = ((($0)) + 96|0); $11 = +HEAPF32[$10>>2]; $12 = $11 > 0.0078125; $13 = $12 ? $11 : 0.0078125; HEAPF32[$10>>2] = $13; $14 = ((($0)) + 100|0); $15 = +HEAPF32[$14>>2]; $16 = $15 > 0.0078125; $17 = $16 ? $15 : 0.0078125; HEAPF32[$14>>2] = $17; return; } function _BlockModel_GetBounds($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 52|0); $2 = HEAP16[$1>>1]|0; $3 = ((($0)) + 56|0); $4 = $2&65535; $5 = (1125396 + (($4*12)|0)|0); _Vec3_Add_1416($3,$5); $6 = ((($0)) + 68|0); $7 = (1134612 + (($4*12)|0)|0); _Vec3_Add_1416($6,$7); return; } function _Vec3_Add_1416($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0.0, $11 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[$1>>2]; $3 = $2 + -0.5; HEAPF32[$0>>2] = $3; $4 = ((($1)) + 4|0); $5 = +HEAPF32[$4>>2]; $6 = $5 + 0.0; $7 = ((($0)) + 4|0); HEAPF32[$7>>2] = $6; $8 = ((($1)) + 8|0); $9 = +HEAPF32[$8>>2]; $10 = $9 + -0.5; $11 = ((($0)) + 8|0); HEAPF32[$11>>2] = $10; return; } function _Vec3_Sub_1417($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 - $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 - $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 - $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _BlockModel_BuildParts($0) { $0 = $0|0; var $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$012$0$$sroa_idx = 0, $$sroa$012$0$copyload = 0.0, $$sroa$4$0$$sroa_idx8 = 0, $$sroa$4$0$copyload22 = 0, $$sroa$414$0$$sroa_idx15 = 0, $$sroa$414$0$copyload21 = 0, $$sroa$5$0$$sroa_idx10 = 0, $$sroa$5$0$copyload = 0.0, $$sroa$517$0$$sroa_idx18 = 0, $$sroa$517$0$copyload = 0.0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0; var $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0.0; var $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ($0<<24>>24)==(0); if ($2) { $3 = HEAP16[986404]|0; $4 = $3&65535; $5 = (1125396 + (($4*12)|0)|0); ;HEAP32[(1781656)>>2]=HEAP32[$5>>2]|0;HEAP32[(1781656)+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[(1781656)+8>>2]=HEAP32[$5+8>>2]|0; $6 = +HEAPF32[(1781660)>>2]; $7 = 1.0 - $6; HEAPF32[(1781660)>>2] = $7; $8 = (1134612 + (($4*12)|0)|0); ;HEAP32[(1781668)>>2]=HEAP32[$8>>2]|0;HEAP32[(1781668)+4>>2]=HEAP32[$8+4>>2]|0;HEAP32[(1781668)+8>>2]=HEAP32[$8+8>>2]|0; $9 = +HEAPF32[(1781672)>>2]; $10 = 1.0 - $9; HEAPF32[(1781672)>>2] = $10; $11 = (1123092 + ($4)|0); $12 = HEAP8[$11>>0]|0; HEAP8[1781648] = $12; $13 = (1109268 + ($4<<2)|0); $14 = HEAP32[$13>>2]|0; HEAP32[(1781652)>>2] = $14; $15 = HEAP32[(1826332)>>2]|0; HEAP32[$1>>2] = $15; $$sroa$012$0$$sroa_idx = (1143828 + (($4*12)|0)|0); $$sroa$012$0$copyload = +HEAPF32[$$sroa$012$0$$sroa_idx>>2]; $$sroa$414$0$$sroa_idx15 = (((1143828 + (($4*12)|0)|0)) + 4|0); $$sroa$414$0$copyload21 = HEAP32[$$sroa$414$0$$sroa_idx15>>2]|0; $$sroa$517$0$$sroa_idx18 = (((1143828 + (($4*12)|0)|0)) + 8|0); $$sroa$517$0$copyload = +HEAPF32[$$sroa$517$0$$sroa_idx18>>2]; $$sroa$0$0$$sroa_idx = (1153044 + (($4*12)|0)|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$4$0$$sroa_idx8 = (((1153044 + (($4*12)|0)|0)) + 4|0); $$sroa$4$0$copyload22 = HEAP32[$$sroa$4$0$$sroa_idx8>>2]|0; $$sroa$5$0$$sroa_idx10 = (((1153044 + (($4*12)|0)|0)) + 8|0); $$sroa$5$0$copyload = +HEAPF32[$$sroa$5$0$$sroa_idx10>>2]; $16 = $$sroa$012$0$copyload + -0.5; HEAPF32[(1781680)>>2] = $16; HEAP32[(1781684)>>2] = $$sroa$414$0$copyload21; $17 = $$sroa$517$0$copyload + -0.5; HEAPF32[(1781688)>>2] = $17; $18 = $$sroa$0$0$copyload + -0.5; HEAPF32[(1781692)>>2] = $18; HEAP32[(1781696)>>2] = $$sroa$4$0$copyload22; $19 = $$sroa$5$0$copyload + -0.5; HEAPF32[(1781700)>>2] = $19; $20 = (_BlockModel_GetTex(4)|0); $21 = HEAP32[(1826284)>>2]|0; _Drawer_YMin(1,$21,$20,$1); $22 = (_BlockModel_GetTex(2)|0); $23 = HEAP32[(1826292)>>2]|0; _Drawer_ZMin(1,$23,$22,$1); $24 = (_BlockModel_GetTex(1)|0); $25 = HEAP32[(1826300)>>2]|0; _Drawer_XMax(1,$25,$24,$1); $26 = (_BlockModel_GetTex(3)|0); $27 = HEAP32[(1826288)>>2]|0; _Drawer_ZMax(1,$27,$26,$1); $28 = (_BlockModel_GetTex(0)|0); $29 = HEAP32[(1826296)>>2]|0; _Drawer_XMin(1,$29,$28,$1); $30 = (_BlockModel_GetTex(5)|0); $31 = HEAP32[456570]|0; _Drawer_YMax(1,$31,$30,$1); STACKTOP = sp;return; } else { _BlockModel_SpriteXQuad(0,0); _BlockModel_SpriteXQuad(0,1); _BlockModel_SpriteZQuad(0,0); _BlockModel_SpriteZQuad(0,1); _BlockModel_SpriteZQuad(1,0); _BlockModel_SpriteZQuad(1,1); _BlockModel_SpriteXQuad(1,0); _BlockModel_SpriteXQuad(1,1); STACKTOP = sp;return; } } function _BlockModel_DrawParts() { var $$02229 = 0, $$02428 = 0, $$02527 = 0, $$030 = 0, $$1 = 0, $$123 = 0, $$126 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; var $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1826328)>>2]|0; $1 = HEAP32[(1826332)>>2]|0; $2 = HEAP32[456651]|0; $3 = $2 << 2; _Gfx_SetDynamicVbData($0,$1,$3); $4 = HEAP32[456651]|0; $5 = ($4|0)>(0); if (!($5)) { return; } $6 = HEAP32[227632]|0; $$02229 = 0;$$02428 = 0;$$02527 = $6;$$030 = 0; while(1) { $7 = (910528 + ($$02428<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==($$02527|0); if ($9) { $$1 = $$030;$$123 = $$02229;$$126 = $$02527; } else { $10 = (($$030) + ($$02229))|0; $11 = (1949312 + ($$02527<<2)|0); $12 = HEAP32[$11>>2]|0; _Gfx_BindTexture($12); _Gfx_DrawVb_IndexedTris_Range($$030,$$02229); $13 = HEAP32[$7>>2]|0; $$1 = 0;$$123 = $10;$$126 = $13; } $14 = (($$02428) + 1)|0; $15 = (($$1) + 4)|0; $16 = HEAP32[456651]|0; $17 = ($14|0)<($16|0); if ($17) { $$02229 = $$123;$$02428 = $14;$$02527 = $$126;$$030 = $15; } else { break; } } $18 = ($15|0)==(0); if ($18) { return; } $19 = (1949312 + ($$126<<2)|0); $20 = HEAP32[$19>>2]|0; _Gfx_BindTexture($20); _Gfx_DrawVb_IndexedTris_Range($15,$$123); return; } function _BlockModel_SpriteXQuad($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$072 = 0.0, $$073 = 0.0, $$074 = 0.0, $$075 = 0.0, $$sink = 0, $$sroa$11$0$$sroa_idx33 = 0, $$sroa$11$0$$sroa_idx34 = 0, $$sroa$11$0$$sroa_idx36 = 0, $$sroa$11$0$$sroa_idx38 = 0, $$sroa$13$0$$sroa_idx41 = 0, $$sroa$13$0$$sroa_idx42 = 0, $$sroa$13$0$$sroa_idx44 = 0, $$sroa$13$0$$sroa_idx46 = 0, $$sroa$14$0$$sroa_idx49 = 0, $$sroa$14$0$$sroa_idx50 = 0, $$sroa$14$0$$sroa_idx52 = 0, $$sroa$14$0$$sroa_idx54 = 0, $$sroa$16$0$$sroa_idx57 = 0, $$sroa$16$0$$sroa_idx58 = 0; var $$sroa$16$0$$sroa_idx60 = 0, $$sroa$16$0$$sroa_idx62 = 0, $$sroa$8$0$$sroa_idx25 = 0, $$sroa$8$0$$sroa_idx26 = 0, $$sroa$8$0$$sroa_idx28 = 0, $$sroa$8$0$$sroa_idx30 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp + 16|0; $3 = sp; $4 = (_BlockModel_GetTex(1)|0); _Atlas1D_TexRec($3,$4,1,$2); $5 = HEAP32[456570]|0; $6 = HEAP16[986404]|0; $7 = $6&65535; $8 = (1123092 + ($7)|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(0); if ($10) { $$0 = $5; } else { $11 = (1109268 + ($7<<2)|0); $12 = HEAP32[$11>>2]|0; $13 = (_PackedCol_Tint($5,$12)|0); $$0 = $13; } $14 = ($0<<24>>24)==(0); $15 = ($1<<24>>24)!=(0); do { if ($14) { if ($15) { $$072 = 0.0;$$073 = -0.34375;$$074 = 0.0;$$075 = 0.34375;$$sink = $3; break; } else { $17 = ((($3)) + 8|0); $$072 = -0.34375;$$073 = 0.0;$$074 = 0.34375;$$075 = 0.0;$$sink = $17; break; } } else { if ($15) { $16 = ((($3)) + 8|0); $$072 = 0.34375;$$073 = 0.0;$$074 = -0.34375;$$075 = 0.0;$$sink = $16; break; } else { $$072 = 0.0;$$073 = 0.34375;$$074 = 0.0;$$075 = -0.34375;$$sink = $3; break; } } } while(0); HEAPF32[$$sink>>2] = 0.5; $18 = HEAP32[(1826332)>>2]|0; $19 = HEAP32[456651]|0; $20 = $19 << 2; $21 = (($20) + -4)|0; $22 = (($18) + (($21*24)|0)|0); $23 = ((($3)) + 8|0); $24 = HEAP32[$23>>2]|0; $25 = ((($3)) + 12|0); $26 = HEAP32[$25>>2]|0; $27 = ((($22)) + 24|0); HEAPF32[$22>>2] = $$075; $$sroa$8$0$$sroa_idx26 = (((($18) + (($21*24)|0)|0)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx26>>2] = 0.0; $$sroa$11$0$$sroa_idx34 = (((($18) + (($21*24)|0)|0)) + 8|0); HEAPF32[$$sroa$11$0$$sroa_idx34>>2] = $$073; $$sroa$13$0$$sroa_idx42 = (((($18) + (($21*24)|0)|0)) + 12|0); HEAP32[$$sroa$13$0$$sroa_idx42>>2] = $$0; $$sroa$14$0$$sroa_idx50 = (((($18) + (($21*24)|0)|0)) + 16|0); HEAP32[$$sroa$14$0$$sroa_idx50>>2] = $24; $$sroa$16$0$$sroa_idx58 = (((($18) + (($21*24)|0)|0)) + 20|0); HEAP32[$$sroa$16$0$$sroa_idx58>>2] = $26; $28 = ((($3)) + 4|0); $29 = HEAP32[$28>>2]|0; $30 = ((($27)) + 24|0); HEAPF32[$27>>2] = $$075; $$sroa$8$0$$sroa_idx28 = ((($27)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx28>>2] = 1.0; $$sroa$11$0$$sroa_idx36 = ((($27)) + 8|0); HEAPF32[$$sroa$11$0$$sroa_idx36>>2] = $$073; $$sroa$13$0$$sroa_idx44 = ((($27)) + 12|0); HEAP32[$$sroa$13$0$$sroa_idx44>>2] = $$0; $$sroa$14$0$$sroa_idx52 = ((($27)) + 16|0); HEAP32[$$sroa$14$0$$sroa_idx52>>2] = $24; $$sroa$16$0$$sroa_idx60 = ((($27)) + 20|0); HEAP32[$$sroa$16$0$$sroa_idx60>>2] = $29; $31 = HEAP32[$3>>2]|0; $32 = ((($30)) + 24|0); HEAPF32[$30>>2] = $$074; $$sroa$8$0$$sroa_idx30 = ((($30)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx30>>2] = 1.0; $$sroa$11$0$$sroa_idx38 = ((($30)) + 8|0); HEAPF32[$$sroa$11$0$$sroa_idx38>>2] = $$072; $$sroa$13$0$$sroa_idx46 = ((($30)) + 12|0); HEAP32[$$sroa$13$0$$sroa_idx46>>2] = $$0; $$sroa$14$0$$sroa_idx54 = ((($30)) + 16|0); HEAP32[$$sroa$14$0$$sroa_idx54>>2] = $31; $$sroa$16$0$$sroa_idx62 = ((($30)) + 20|0); HEAP32[$$sroa$16$0$$sroa_idx62>>2] = $29; $33 = HEAP32[$25>>2]|0; HEAPF32[$32>>2] = $$074; $$sroa$8$0$$sroa_idx25 = ((($32)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx25>>2] = 0.0; $$sroa$11$0$$sroa_idx33 = ((($32)) + 8|0); HEAPF32[$$sroa$11$0$$sroa_idx33>>2] = $$072; $$sroa$13$0$$sroa_idx41 = ((($32)) + 12|0); HEAP32[$$sroa$13$0$$sroa_idx41>>2] = $$0; $$sroa$14$0$$sroa_idx49 = ((($32)) + 16|0); HEAP32[$$sroa$14$0$$sroa_idx49>>2] = $31; $$sroa$16$0$$sroa_idx57 = ((($32)) + 20|0); HEAP32[$$sroa$16$0$$sroa_idx57>>2] = $33; STACKTOP = sp;return; } function _BlockModel_SpriteZQuad($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$068 = 0.0, $$069 = 0.0, $$sink = 0, $$sroa$11$0$$sroa_idx29 = 0, $$sroa$11$0$$sroa_idx30 = 0, $$sroa$11$0$$sroa_idx32 = 0, $$sroa$11$0$$sroa_idx34 = 0, $$sroa$13$0$$sroa_idx37 = 0, $$sroa$13$0$$sroa_idx38 = 0, $$sroa$13$0$$sroa_idx40 = 0, $$sroa$13$0$$sroa_idx42 = 0, $$sroa$14$0$$sroa_idx45 = 0, $$sroa$14$0$$sroa_idx46 = 0, $$sroa$14$0$$sroa_idx48 = 0, $$sroa$14$0$$sroa_idx50 = 0, $$sroa$16$0$$sroa_idx53 = 0, $$sroa$16$0$$sroa_idx54 = 0, $$sroa$16$0$$sroa_idx56 = 0, $$sroa$16$0$$sroa_idx58 = 0; var $$sroa$8$0$$sroa_idx21 = 0, $$sroa$8$0$$sroa_idx22 = 0, $$sroa$8$0$$sroa_idx24 = 0, $$sroa$8$0$$sroa_idx26 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp + 16|0; $3 = sp; $4 = (_BlockModel_GetTex(3)|0); _Atlas1D_TexRec($3,$4,1,$2); $5 = HEAP32[456570]|0; $6 = HEAP16[986404]|0; $7 = $6&65535; $8 = (1123092 + ($7)|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(0); if ($10) { $$0 = $5; } else { $11 = (1109268 + ($7<<2)|0); $12 = HEAP32[$11>>2]|0; $13 = (_PackedCol_Tint($5,$12)|0); $$0 = $13; } $14 = ($0<<24>>24)==(0); $15 = ($1<<24>>24)!=(0); do { if ($14) { if ($15) { $17 = ((($3)) + 8|0); $$068 = 0.34375;$$069 = 0.0;$$sink = $17; break; } else { $$068 = 0.0;$$069 = 0.34375;$$sink = $3; break; } } else { if ($15) { $$068 = 0.0;$$069 = -0.34375;$$sink = $3; break; } else { $16 = ((($3)) + 8|0); $$068 = -0.34375;$$069 = 0.0;$$sink = $16; break; } } } while(0); HEAPF32[$$sink>>2] = 0.5; $18 = HEAP32[(1826332)>>2]|0; $19 = HEAP32[456651]|0; $20 = $19 << 2; $21 = (($20) + -4)|0; $22 = (($18) + (($21*24)|0)|0); $23 = ((($3)) + 8|0); $24 = HEAP32[$23>>2]|0; $25 = ((($3)) + 12|0); $26 = HEAP32[$25>>2]|0; $27 = ((($22)) + 24|0); HEAPF32[$22>>2] = $$069; $$sroa$8$0$$sroa_idx22 = (((($18) + (($21*24)|0)|0)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx22>>2] = 0.0; $$sroa$11$0$$sroa_idx30 = (((($18) + (($21*24)|0)|0)) + 8|0); HEAPF32[$$sroa$11$0$$sroa_idx30>>2] = $$069; $$sroa$13$0$$sroa_idx38 = (((($18) + (($21*24)|0)|0)) + 12|0); HEAP32[$$sroa$13$0$$sroa_idx38>>2] = $$0; $$sroa$14$0$$sroa_idx46 = (((($18) + (($21*24)|0)|0)) + 16|0); HEAP32[$$sroa$14$0$$sroa_idx46>>2] = $24; $$sroa$16$0$$sroa_idx54 = (((($18) + (($21*24)|0)|0)) + 20|0); HEAP32[$$sroa$16$0$$sroa_idx54>>2] = $26; $28 = ((($3)) + 4|0); $29 = HEAP32[$28>>2]|0; $30 = ((($27)) + 24|0); HEAPF32[$27>>2] = $$069; $$sroa$8$0$$sroa_idx24 = ((($27)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx24>>2] = 1.0; $$sroa$11$0$$sroa_idx32 = ((($27)) + 8|0); HEAPF32[$$sroa$11$0$$sroa_idx32>>2] = $$069; $$sroa$13$0$$sroa_idx40 = ((($27)) + 12|0); HEAP32[$$sroa$13$0$$sroa_idx40>>2] = $$0; $$sroa$14$0$$sroa_idx48 = ((($27)) + 16|0); HEAP32[$$sroa$14$0$$sroa_idx48>>2] = $24; $$sroa$16$0$$sroa_idx56 = ((($27)) + 20|0); HEAP32[$$sroa$16$0$$sroa_idx56>>2] = $29; $31 = HEAP32[$3>>2]|0; $32 = ((($30)) + 24|0); HEAPF32[$30>>2] = $$068; $$sroa$8$0$$sroa_idx26 = ((($30)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx26>>2] = 1.0; $$sroa$11$0$$sroa_idx34 = ((($30)) + 8|0); HEAPF32[$$sroa$11$0$$sroa_idx34>>2] = $$068; $$sroa$13$0$$sroa_idx42 = ((($30)) + 12|0); HEAP32[$$sroa$13$0$$sroa_idx42>>2] = $$0; $$sroa$14$0$$sroa_idx50 = ((($30)) + 16|0); HEAP32[$$sroa$14$0$$sroa_idx50>>2] = $31; $$sroa$16$0$$sroa_idx58 = ((($30)) + 20|0); HEAP32[$$sroa$16$0$$sroa_idx58>>2] = $29; $33 = HEAP32[$25>>2]|0; HEAPF32[$32>>2] = $$068; $$sroa$8$0$$sroa_idx21 = ((($32)) + 4|0); HEAPF32[$$sroa$8$0$$sroa_idx21>>2] = 0.0; $$sroa$11$0$$sroa_idx29 = ((($32)) + 8|0); HEAPF32[$$sroa$11$0$$sroa_idx29>>2] = $$068; $$sroa$13$0$$sroa_idx37 = ((($32)) + 12|0); HEAP32[$$sroa$13$0$$sroa_idx37>>2] = $$0; $$sroa$14$0$$sroa_idx45 = ((($32)) + 16|0); HEAP32[$$sroa$14$0$$sroa_idx45>>2] = $31; $$sroa$16$0$$sroa_idx53 = ((($32)) + 20|0); HEAP32[$$sroa$16$0$$sroa_idx53>>2] = $33; STACKTOP = sp;return; } function _BlockModel_GetTex($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP16[986404]|0; $2 = $1&65535; $3 = ($2*6)|0; $4 = $0&255; $5 = (($3) + ($4))|0; $6 = (1162260 + ($5<<1)|0); $7 = HEAP16[$6>>1]|0; $8 = $7&65535; $9 = HEAP32[(1949304)>>2]|0; $10 = ($9)?($8 >>> $9):($8); $11 = HEAP32[456651]|0; $12 = (($11) + 1)|0; HEAP32[456651] = $12; $13 = (910528 + ($11<<2)|0); HEAP32[$13>>2] = $10; return ($7|0); } function _HumanModel_DrawCore($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0.0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0.0; var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0, $45 = 0.0, $46 = 0.0, $47 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; _Model_ApplyTexture($0); $3 = ($2<<24>>24)!=(0); if ($3) { _Gfx_SetAlphaTest(0); } $4 = HEAP8[(1826321)>>0]|0; $5 = $4 & 3; $6 = $5&255; $7 = ((($0)) + 16|0); $8 = +HEAPF32[$7>>2]; $9 = $8 * -0.01745329238474369; _Model_DrawRotate($9,0.0,0.0,$1,1); $10 = ((($1)) + 16|0); _Model_DrawPart($10); $11 = ((($0)) + 240|0); $12 = +HEAPF32[$11>>2]; $13 = ((($0)) + 244|0); $14 = +HEAPF32[$13>>2]; $15 = (((($1)) + 64|0) + ($6<<7)|0); _Model_DrawRotate($12,0.0,$14,$15,0); $16 = ((($0)) + 248|0); $17 = +HEAPF32[$16>>2]; $18 = ((($0)) + 252|0); $19 = +HEAPF32[$18>>2]; $20 = (((((($1)) + 64|0) + ($6<<7)|0)) + 16|0); _Model_DrawRotate($17,0.0,$19,$20,0); HEAP8[(1826320)>>0] = 1; $21 = ((($0)) + 256|0); $22 = +HEAPF32[$21>>2]; $23 = ((($0)) + 260|0); $24 = +HEAPF32[$23>>2]; $25 = (((((($1)) + 64|0) + ($6<<7)|0)) + 32|0); _Model_DrawRotate($22,0.0,$24,$25,0); $26 = ((($0)) + 264|0); $27 = +HEAPF32[$26>>2]; $28 = ((($0)) + 268|0); $29 = +HEAPF32[$28>>2]; $30 = (((((($1)) + 64|0) + ($6<<7)|0)) + 48|0); _Model_DrawRotate($27,0.0,$29,$30,0); HEAP8[(1826320)>>0] = 0; if ($3) { _Model_UpdateVB(); _Gfx_SetAlphaTest(1); } $31 = ($4<<24>>24)==(0); if ($31) { $45 = +HEAPF32[$7>>2]; $46 = $45 * -0.01745329238474369; $47 = ((($1)) + 32|0); _Model_DrawRotate($46,0.0,0.0,$47,1); _Model_UpdateVB(); return; } $32 = ((($1)) + 48|0); _Model_DrawPart($32); $33 = +HEAPF32[$11>>2]; $34 = +HEAPF32[$13>>2]; $35 = (((((($1)) + 64|0) + ($6<<7)|0)) + 64|0); _Model_DrawRotate($33,0.0,$34,$35,0); $36 = +HEAPF32[$16>>2]; $37 = +HEAPF32[$18>>2]; $38 = (((((($1)) + 64|0) + ($6<<7)|0)) + 80|0); _Model_DrawRotate($36,0.0,$37,$38,0); HEAP8[(1826320)>>0] = 1; $39 = +HEAPF32[$21>>2]; $40 = +HEAPF32[$23>>2]; $41 = (((((($1)) + 64|0) + ($6<<7)|0)) + 96|0); _Model_DrawRotate($39,0.0,$40,$41,0); $42 = +HEAPF32[$26>>2]; $43 = +HEAPF32[$28>>2]; $44 = (((((($1)) + 64|0) + ($6<<7)|0)) + 112|0); _Model_DrawRotate($42,0.0,$43,$44,0); HEAP8[(1826320)>>0] = 0; $45 = +HEAPF32[$7>>2]; $46 = $45 * -0.01745329238474369; $47 = ((($1)) + 32|0); _Model_DrawRotate($46,0.0,0.0,$47,1); _Model_UpdateVB(); return; } function _Model_ApplyTexture($0) { $0 = $0|0; var $$0 = 0, $$in = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $storemerge = 0, $storemerge$in = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1826324)>>2]|0; $2 = ((($1)) + 46|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); $5 = ((($0)) + 112|0); $6 = ((($0)) + 116|0); $$in = $4 ? $6 : $5; $7 = HEAP32[$$in>>2]|0; $8 = ($7|0)==(0); if ($8) { $10 = ((($1)) + 8|0); $11 = HEAP32[$10>>2]|0; $12 = ((($11)) + 8|0); $13 = HEAP32[$12>>2]|0; $14 = ((($11)) + 4|0); $$0 = $13;$storemerge$in = $14; } else { $9 = ((($0)) + 108|0); $$0 = $7;$storemerge$in = $9; } $storemerge = HEAP8[$storemerge$in>>0]|0; HEAP8[(1826321)>>0] = $storemerge; _Gfx_BindTexture($$0); $15 = HEAP8[(1826321)>>0]|0; $16 = ($15<<24>>24)==(0); $17 = ((($0)) + 120|0); $18 = +HEAPF32[$17>>2]; $19 = $18 * 0.015625; HEAPF32[(1826304)>>2] = $19; $20 = ((($0)) + 124|0); $21 = +HEAPF32[$20>>2]; $22 = $16 ? 0.03125 : 0.015625; $23 = $22 * $21; HEAPF32[(1826308)>>2] = $23; return; } function _Model_DrawRotate($0,$1,$2,$3,$4) { $0 = +$0; $1 = +$1; $2 = +$2; $3 = $3|0; $4 = $4|0; var $$0190193 = 0, $$0191192 = 0, $$0194 = 0, $$sroa$0$0 = 0.0, $$sroa$0$0$copyload = 0.0, $$sroa$0$1 = 0.0, $$sroa$33$0 = 0.0, $$sroa$33$0$$sroa_idx28 = 0, $$sroa$33$0$copyload = 0.0, $$sroa$60$0 = 0.0, $$sroa$60$0$$sroa_idx47 = 0, $$sroa$60$0$copyload = 0.0, $$sroa$60$1 = 0.0, $$sroa$90$0$$sroa_idx68 = 0, $$sroa$90$0$copyload = 0, $$sroa$92$0$$sroa_idx71 = 0, $$sroa$92$0$copyload = 0, $10 = 0, $100 = 0.0, $101 = 0.0; var $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0.0; var $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0, $131 = 0.0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0; var $139 = 0.0, $14 = 0.0, $140 = 0.0, $141 = 0.0, $142 = 0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0, $148 = 0, $149 = 0, $15 = 0.0, $150 = 0.0, $151 = 0.0, $152 = 0.0, $153 = 0, $154 = 0.0, $155 = 0.0, $156 = 0.0; var $157 = 0.0, $158 = 0, $159 = 0, $16 = 0.0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0; var $29 = 0.0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0.0; var $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0; var $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0; var $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $5 = HEAP32[(1826324)>>2]|0; $6 = ((($5)) + 4|0); $7 = HEAP32[$6>>2]|0; $8 = HEAP16[$3>>1]|0; $9 = HEAP32[(1826332)>>2]|0; $10 = ((($5)) + 36|0); $11 = HEAP32[$10>>2]|0; $12 = - $0; $13 = $12; $14 = (+_Math_Cos($13)); $15 = $14; $16 = (+_Math_Sin($13)); $17 = $16; $18 = - $1; $19 = $18; $20 = (+_Math_Cos($19)); $21 = $20; $22 = (+_Math_Sin($19)); $23 = $22; $24 = - $2; $25 = $24; $26 = (+_Math_Cos($25)); $27 = $26; $28 = (+_Math_Sin($25)); $29 = $28; $30 = ((($3)) + 4|0); $31 = +HEAPF32[$30>>2]; $32 = ((($3)) + 8|0); $33 = +HEAPF32[$32>>2]; $34 = ((($3)) + 12|0); $35 = +HEAPF32[$34>>2]; $36 = ((($3)) + 2|0); $37 = HEAP16[$36>>1]|0; $38 = $37&65535; $39 = ($37<<16>>16)==(0); if ($39) { $162 = HEAP32[$10>>2]|0; $163 = (($162) + ($38))|0; HEAP32[$10>>2] = $163; return; } $40 = (($9) + (($11*24)|0)|0); $41 = $8&65535; $42 = (($7) + ($41<<4)|0); $43 = ($4<<24>>24)==(0); $$0190193 = 0;$$0191192 = $40;$$0194 = $42; while(1) { $$sroa$0$0$copyload = +HEAPF32[$$0194>>2]; $$sroa$33$0$$sroa_idx28 = ((($$0194)) + 4|0); $$sroa$33$0$copyload = +HEAPF32[$$sroa$33$0$$sroa_idx28>>2]; $$sroa$60$0$$sroa_idx47 = ((($$0194)) + 8|0); $$sroa$60$0$copyload = +HEAPF32[$$sroa$60$0$$sroa_idx47>>2]; $$sroa$90$0$$sroa_idx68 = ((($$0194)) + 12|0); $$sroa$90$0$copyload = HEAP16[$$sroa$90$0$$sroa_idx68>>1]|0; $$sroa$92$0$$sroa_idx71 = ((($$0194)) + 14|0); $$sroa$92$0$copyload = HEAP16[$$sroa$92$0$$sroa_idx71>>1]|0; $44 = $$sroa$0$0$copyload - $31; $45 = $$sroa$33$0$copyload - $33; $46 = $$sroa$60$0$copyload - $35; $47 = HEAP8[(1826320)>>0]|0; switch ($47<<24>>24) { case 0: { $48 = $44 * $27; $49 = $45 * $29; $50 = $48 + $49; $51 = $44 * $29; $52 = $45 * $27; $53 = $52 - $51; $54 = $50 * $21; $55 = $46 * $23; $56 = $54 - $55; $57 = $50 * $23; $58 = $46 * $21; $59 = $58 + $57; $60 = $53 * $15; $61 = $59 * $17; $62 = $60 + $61; $63 = $53 * $17; $64 = $59 * $15; $65 = $64 - $63; $$sroa$0$0 = $56;$$sroa$33$0 = $62;$$sroa$60$0 = $65; break; } case 1: { $66 = $45 * $15; $67 = $46 * $17; $68 = $66 + $67; $69 = $45 * $17; $70 = $46 * $15; $71 = $70 - $69; $72 = $44 * $27; $73 = $68 * $29; $74 = $72 + $73; $75 = $44 * $29; $76 = $68 * $27; $77 = $76 - $75; $78 = $74 * $21; $79 = $71 * $23; $80 = $78 - $79; $81 = $74 * $23; $82 = $71 * $21; $83 = $82 + $81; $$sroa$0$0 = $80;$$sroa$33$0 = $77;$$sroa$60$0 = $83; break; } case 2: { $84 = $44 * $21; $85 = $46 * $23; $86 = $84 - $85; $87 = $44 * $23; $88 = $46 * $21; $89 = $87 + $88; $90 = $86 * $27; $91 = $45 * $29; $92 = $91 + $90; $93 = $86 * $29; $94 = $45 * $27; $95 = $94 - $93; $96 = $95 * $15; $97 = $89 * $17; $98 = $97 + $96; $99 = $95 * $17; $100 = $89 * $15; $101 = $100 - $99; $$sroa$0$0 = $92;$$sroa$33$0 = $98;$$sroa$60$0 = $101; break; } case 3: { $102 = $45 * $15; $103 = $46 * $17; $104 = $102 + $103; $105 = $45 * $17; $106 = $46 * $15; $107 = $106 - $105; $108 = $44 * $21; $109 = $107 * $23; $110 = $108 - $109; $111 = $44 * $23; $112 = $107 * $21; $113 = $111 + $112; $114 = $110 * $27; $115 = $104 * $29; $116 = $115 + $114; $117 = $110 * $29; $118 = $104 * $27; $119 = $118 - $117; $$sroa$0$0 = $116;$$sroa$33$0 = $119;$$sroa$60$0 = $113; break; } default: { $$sroa$0$0 = $44;$$sroa$33$0 = $45;$$sroa$60$0 = $46; } } if ($43) { $$sroa$0$1 = $$sroa$0$0;$$sroa$60$1 = $$sroa$60$0; } else { $120 = +HEAPF32[(1826312)>>2]; $121 = $$sroa$0$0 * $120; $122 = +HEAPF32[(1826316)>>2]; $123 = $$sroa$60$0 * $122; $124 = $121 - $123; $125 = $$sroa$0$0 * $122; $126 = $$sroa$60$0 * $120; $127 = $126 + $125; $$sroa$0$1 = $124;$$sroa$60$1 = $127; } $128 = $31 + $$sroa$0$1; HEAPF32[$$0191192>>2] = $128; $129 = $33 + $$sroa$33$0; $130 = ((($$0191192)) + 4|0); HEAPF32[$130>>2] = $129; $131 = $35 + $$sroa$60$1; $132 = ((($$0191192)) + 8|0); HEAPF32[$132>>2] = $131; $133 = (2)?($$0190193 >>> 2):($$0190193); $134 = (1826280 + ($133<<2)|0); $135 = HEAP32[$134>>2]|0; $136 = ((($$0191192)) + 12|0); HEAP32[$136>>2] = $135; $137 = $$sroa$90$0$copyload&65535; $138 = $137 & 32767; $139 = (+($138|0)); $140 = +HEAPF32[(1826304)>>2]; $141 = $140 * $139; $142 = (15)?($137 >>> 15):($137); $143 = (+($142|0)); $144 = $143 * 0.0099999997764825821; $145 = $144 * $140; $146 = $141 - $145; $147 = ((($$0191192)) + 16|0); HEAPF32[$147>>2] = $146; $148 = $$sroa$92$0$copyload&65535; $149 = $148 & 32767; $150 = (+($149|0)); $151 = +HEAPF32[(1826308)>>2]; $152 = $151 * $150; $153 = (15)?($148 >>> 15):($148); $154 = (+($153|0)); $155 = $154 * 0.0099999997764825821; $156 = $155 * $151; $157 = $152 - $156; $158 = ((($$0191192)) + 20|0); HEAPF32[$158>>2] = $157; $159 = ((($$0194)) + 16|0); $160 = ((($$0191192)) + 24|0); $161 = (($$0190193) + 1)|0; $exitcond = ($161|0)==($38|0); if ($exitcond) { break; } else { $$0190193 = $161;$$0191192 = $160;$$0194 = $159; } } $162 = HEAP32[$10>>2]|0; $163 = (($162) + ($38))|0; HEAP32[$10>>2] = $163; return; } function _Model_DrawPart($0) { $0 = $0|0; var $$03844 = 0, $$03943 = 0, $$045 = 0, $$sroa$0$0$copyload40 = 0, $$sroa$4$0$$sroa_idx9 = 0, $$sroa$4$0$copyload41 = 0, $$sroa$5$0$$sroa_idx11 = 0, $$sroa$5$0$copyload42 = 0, $$sroa$6$0$$sroa_idx13 = 0, $$sroa$6$0$copyload = 0, $$sroa$8$0$$sroa_idx16 = 0, $$sroa$8$0$copyload = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; var $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0; var $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0; var sp = 0; sp = STACKTOP; $1 = HEAP32[(1826324)>>2]|0; $2 = ((($1)) + 36|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 2|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; $7 = ($5<<16>>16)==(0); if ($7) { $46 = (($3) + ($6))|0; HEAP32[$2>>2] = $46; return; } $8 = HEAP32[(1826332)>>2]|0; $9 = (($8) + (($3*24)|0)|0); $10 = ((($1)) + 4|0); $11 = HEAP32[$10>>2]|0; $12 = HEAP16[$0>>1]|0; $13 = $12&65535; $14 = (($11) + ($13<<4)|0); $$03844 = 0;$$03943 = $9;$$045 = $14; while(1) { $$sroa$0$0$copyload40 = HEAP32[$$045>>2]|0; $$sroa$4$0$$sroa_idx9 = ((($$045)) + 4|0); $$sroa$4$0$copyload41 = HEAP32[$$sroa$4$0$$sroa_idx9>>2]|0; $$sroa$5$0$$sroa_idx11 = ((($$045)) + 8|0); $$sroa$5$0$copyload42 = HEAP32[$$sroa$5$0$$sroa_idx11>>2]|0; $$sroa$6$0$$sroa_idx13 = ((($$045)) + 12|0); $$sroa$6$0$copyload = HEAP16[$$sroa$6$0$$sroa_idx13>>1]|0; $$sroa$8$0$$sroa_idx16 = ((($$045)) + 14|0); $$sroa$8$0$copyload = HEAP16[$$sroa$8$0$$sroa_idx16>>1]|0; HEAP32[$$03943>>2] = $$sroa$0$0$copyload40; $15 = ((($$03943)) + 4|0); HEAP32[$15>>2] = $$sroa$4$0$copyload41; $16 = ((($$03943)) + 8|0); HEAP32[$16>>2] = $$sroa$5$0$copyload42; $17 = (2)?($$03844 >>> 2):($$03844); $18 = (1826280 + ($17<<2)|0); $19 = HEAP32[$18>>2]|0; $20 = ((($$03943)) + 12|0); HEAP32[$20>>2] = $19; $21 = $$sroa$6$0$copyload&65535; $22 = $21 & 32767; $23 = (+($22|0)); $24 = +HEAPF32[(1826304)>>2]; $25 = $24 * $23; $26 = (15)?($21 >>> 15):($21); $27 = (+($26|0)); $28 = $27 * 0.0099999997764825821; $29 = $28 * $24; $30 = $25 - $29; $31 = ((($$03943)) + 16|0); HEAPF32[$31>>2] = $30; $32 = $$sroa$8$0$copyload&65535; $33 = $32 & 32767; $34 = (+($33|0)); $35 = +HEAPF32[(1826308)>>2]; $36 = $35 * $34; $37 = (15)?($32 >>> 15):($32); $38 = (+($37|0)); $39 = $38 * 0.0099999997764825821; $40 = $39 * $35; $41 = $36 - $40; $42 = ((($$03943)) + 20|0); HEAPF32[$42>>2] = $41; $43 = ((($$045)) + 16|0); $44 = ((($$03943)) + 24|0); $45 = (($$03844) + 1)|0; $exitcond = ($45|0)==($6|0); if ($exitcond) { break; } else { $$03844 = $45;$$03943 = $44;$$045 = $43; } } $46 = (($3) + ($6))|0; HEAP32[$2>>2] = $46; return; } function _Model_UpdateVB() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1826324)>>2]|0; $1 = HEAP32[(1826328)>>2]|0; $2 = HEAP32[(1826332)>>2]|0; $3 = ((($0)) + 36|0); $4 = HEAP32[$3>>2]|0; _Gfx_UpdateDynamicVb_IndexedTris($1,$2,$4); HEAP32[$3>>2] = 0; return; } function _Model_Init($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $1 = ((($0)) + 43|0); HEAP8[$1>>0] = 1; $2 = ((($0)) + 44|0); HEAP8[$2>>0] = 1; $3 = ((($0)) + 45|0); HEAP8[$3>>0] = 0; $4 = ((($0)) + 46|0); HEAP8[$4>>0] = 0; $5 = ((($0)) + 47|0); HEAP8[$5>>0] = 1; $6 = ((($0)) + 48|0); HEAPF32[$6>>2] = 0.079999998211860657; $7 = ((($0)) + 52|0); HEAPF32[$7>>2] = 0.9100000262260437; $8 = ((($0)) + 56|0); HEAPF32[$8>>2] = 0.98000001907348633; $9 = ((($0)) + 60|0); HEAPF32[$9>>2] = 0.9100000262260437; $10 = ((($0)) + 64|0); HEAPF32[$10>>2] = 0.60000002384185791; $11 = ((($0)) + 68|0); HEAPF32[$11>>2] = 1.0; $12 = ((($0)) + 72|0); HEAPF32[$12>>2] = 0.60000002384185791; $13 = ((($0)) + 84|0); HEAPF32[$13>>2] = 2.0; $14 = ((($0)) + 88|0); HEAPF32[$14>>2] = 1.0; $15 = ((($0)) + 92|0); HEAPF32[$15>>2] = 1.0; $16 = ((($0)) + 40|0); HEAP8[$16>>0] = 6; $17 = ((($0)) + 41|0); HEAP8[$17>>0] = 12; $18 = ((($0)) + 76|0); HEAP32[$18>>2] = 9; $19 = ((($0)) + 80|0); HEAP32[$19>>2] = 375; return; } function _Model_GetTransform($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$byval_copy = 0, $$byval_copy1 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $$byval_copy1 = sp + 12|0; $$byval_copy = sp; $3 = ((($0)) + 80|0); ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$1+8>>2]|0; ;HEAP32[$$byval_copy1>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$3+8>>2]|0; _Entity_GetTransform($0,$$byval_copy,$$byval_copy1,$2); STACKTOP = sp;return; } function _Model_NullFunc($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _SkinnedCubeModel_MakeParts() { var label = 0, sp = 0; sp = STACKTOP; _BoxDesc_BuildBox(1827056,16636); return; } function _SkinnedCubeModel_Draw($0) { $0 = $0|0; var $1 = 0, $2 = 0.0, $3 = 0.0, label = 0, sp = 0; sp = STACKTOP; _Model_ApplyTexture($0); $1 = ((($0)) + 16|0); $2 = +HEAPF32[$1>>2]; $3 = $2 * -0.01745329238474369; _Model_DrawRotate($3,0.0,0.0,1827056,1); _Model_UpdateVB(); return; } function _SkinnedCubeModel_GetNameY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +1.0750000476837158; } function _SkinnedCubeModel_GetEyeY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +0.5; } function _SkinnedCubeModel_GetSize($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); ;HEAP32[$1>>2]=HEAP32[16624>>2]|0;HEAP32[$1+4>>2]=HEAP32[16624+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[16624+8>>2]|0; return; } function _SkinnedCubeModel_GetBounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); ;HEAP32[$1>>2]=HEAP32[16600>>2]|0;HEAP32[$1+4>>2]=HEAP32[16600+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[16600+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[16600+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[16600+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[16600+20>>2]|0; return; } function _BoxDesc_BuildBox($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0, $44 = 0.0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 6|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = ((($1)) + 4|0); $6 = HEAP8[$5>>0]|0; $7 = $6&255; $8 = ((($1)) + 5|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = ((($1)) + 8|0); $12 = +HEAPF32[$11>>2]; $13 = ((($1)) + 12|0); $14 = +HEAPF32[$13>>2]; $15 = ((($1)) + 16|0); $16 = +HEAPF32[$15>>2]; $17 = ((($1)) + 20|0); $18 = +HEAPF32[$17>>2]; $19 = ((($1)) + 24|0); $20 = +HEAPF32[$19>>2]; $21 = ((($1)) + 28|0); $22 = +HEAPF32[$21>>2]; $23 = HEAP16[$1>>1]|0; $24 = $23&65535; $25 = ((($1)) + 2|0); $26 = HEAP16[$25>>1]|0; $27 = $26&65535; $28 = HEAP32[(1826324)>>2]|0; $29 = (($24) + ($4))|0; $30 = (($29) + ($7))|0; $31 = (($27) + ($4))|0; _BoxDesc_YQuad2($28,$12,$18,$22,$16,$20,$30,$27,$29,$31); $32 = (($30) + ($7))|0; _BoxDesc_YQuad2($28,$18,$12,$22,$16,$14,$30,$27,$32,$31); $33 = (($31) + ($10))|0; _BoxDesc_ZQuad2($28,$12,$18,$14,$20,$16,$30,$31,$29,$33); $34 = (($30) + ($4))|0; $35 = (($34) + ($7))|0; _BoxDesc_ZQuad2($28,$18,$12,$14,$20,$22,$35,$31,$34,$33); _BoxDesc_XQuad2($28,$16,$22,$14,$20,$18,$29,$31,$24,$33); _BoxDesc_XQuad2($28,$22,$16,$14,$20,$12,$34,$31,$30,$33); $36 = ((($28)) + 36|0); $37 = HEAP32[$36>>2]|0; $38 = (($37) + -24)|0; $39 = ((($1)) + 32|0); $40 = +HEAPF32[$39>>2]; $41 = ((($1)) + 36|0); $42 = +HEAPF32[$41>>2]; $43 = ((($1)) + 40|0); $44 = +HEAPF32[$43>>2]; _ModelPart_Init($0,$38,24,$40,$42,$44); return; } function _BoxDesc_YQuad2($0,$1,$2,$3,$4,$5,$6,$7,$8,$9) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; $4 = +$4; $5 = +$5; $6 = $6|0; $7 = $7|0; $8 = $8|0; $9 = $9|0; var $$0 = 0, $$039 = 0, $$040 = 0, $$041 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, label = 0, sp = 0; sp = STACKTOP; $10 = ($6|0)>($8|0); $11 = $8 | 32768; $12 = $6 | 32768; $$041 = $10 ? $12 : $6; $$039 = $10 ? $8 : $11; $13 = ($7|0)>($9|0); $14 = $9 | 32768; $15 = $7 | 32768; $$040 = $13 ? $15 : $7; $$0 = $13 ? $9 : $14; $16 = ((($0)) + 4|0); $17 = HEAP32[$16>>2]|0; $18 = ((($0)) + 36|0); $19 = HEAP32[$18>>2]|0; $20 = (($17) + ($19<<4)|0); _ModelVertex_Init($20,$1,$5,$4,$$041,$$0); $21 = HEAP32[$18>>2]|0; $22 = (($21) + 1)|0; HEAP32[$18>>2] = $22; $23 = HEAP32[$16>>2]|0; $24 = (($23) + ($22<<4)|0); _ModelVertex_Init($24,$1,$5,$3,$$041,$$040); $25 = HEAP32[$18>>2]|0; $26 = (($25) + 1)|0; HEAP32[$18>>2] = $26; $27 = HEAP32[$16>>2]|0; $28 = (($27) + ($26<<4)|0); _ModelVertex_Init($28,$2,$5,$3,$$039,$$040); $29 = HEAP32[$18>>2]|0; $30 = (($29) + 1)|0; HEAP32[$18>>2] = $30; $31 = HEAP32[$16>>2]|0; $32 = (($31) + ($30<<4)|0); _ModelVertex_Init($32,$2,$5,$4,$$039,$$0); $33 = HEAP32[$18>>2]|0; $34 = (($33) + 1)|0; HEAP32[$18>>2] = $34; return; } function _BoxDesc_ZQuad2($0,$1,$2,$3,$4,$5,$6,$7,$8,$9) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; $4 = +$4; $5 = +$5; $6 = $6|0; $7 = $7|0; $8 = $8|0; $9 = $9|0; var $$0 = 0, $$039 = 0, $$040 = 0, $$041 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, label = 0, sp = 0; sp = STACKTOP; $10 = ($6|0)>($8|0); $11 = $8 | 32768; $12 = $6 | 32768; $$041 = $10 ? $12 : $6; $$039 = $10 ? $8 : $11; $13 = ($7|0)>($9|0); $14 = $9 | 32768; $15 = $7 | 32768; $$040 = $13 ? $15 : $7; $$0 = $13 ? $9 : $14; $16 = ((($0)) + 4|0); $17 = HEAP32[$16>>2]|0; $18 = ((($0)) + 36|0); $19 = HEAP32[$18>>2]|0; $20 = (($17) + ($19<<4)|0); _ModelVertex_Init($20,$1,$3,$5,$$041,$$0); $21 = HEAP32[$18>>2]|0; $22 = (($21) + 1)|0; HEAP32[$18>>2] = $22; $23 = HEAP32[$16>>2]|0; $24 = (($23) + ($22<<4)|0); _ModelVertex_Init($24,$1,$4,$5,$$041,$$040); $25 = HEAP32[$18>>2]|0; $26 = (($25) + 1)|0; HEAP32[$18>>2] = $26; $27 = HEAP32[$16>>2]|0; $28 = (($27) + ($26<<4)|0); _ModelVertex_Init($28,$2,$4,$5,$$039,$$040); $29 = HEAP32[$18>>2]|0; $30 = (($29) + 1)|0; HEAP32[$18>>2] = $30; $31 = HEAP32[$16>>2]|0; $32 = (($31) + ($30<<4)|0); _ModelVertex_Init($32,$2,$3,$5,$$039,$$0); $33 = HEAP32[$18>>2]|0; $34 = (($33) + 1)|0; HEAP32[$18>>2] = $34; return; } function _BoxDesc_XQuad2($0,$1,$2,$3,$4,$5,$6,$7,$8,$9) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; $4 = +$4; $5 = +$5; $6 = $6|0; $7 = $7|0; $8 = $8|0; $9 = $9|0; var $$0 = 0, $$039 = 0, $$040 = 0, $$041 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, label = 0, sp = 0; sp = STACKTOP; $10 = ($6|0)>($8|0); $11 = $8 | 32768; $12 = $6 | 32768; $$041 = $10 ? $12 : $6; $$039 = $10 ? $8 : $11; $13 = ($7|0)>($9|0); $14 = $9 | 32768; $15 = $7 | 32768; $$040 = $13 ? $15 : $7; $$0 = $13 ? $9 : $14; $16 = ((($0)) + 4|0); $17 = HEAP32[$16>>2]|0; $18 = ((($0)) + 36|0); $19 = HEAP32[$18>>2]|0; $20 = (($17) + ($19<<4)|0); _ModelVertex_Init($20,$5,$3,$1,$$041,$$0); $21 = HEAP32[$18>>2]|0; $22 = (($21) + 1)|0; HEAP32[$18>>2] = $22; $23 = HEAP32[$16>>2]|0; $24 = (($23) + ($22<<4)|0); _ModelVertex_Init($24,$5,$4,$1,$$041,$$040); $25 = HEAP32[$18>>2]|0; $26 = (($25) + 1)|0; HEAP32[$18>>2] = $26; $27 = HEAP32[$16>>2]|0; $28 = (($27) + ($26<<4)|0); _ModelVertex_Init($28,$5,$4,$2,$$039,$$040); $29 = HEAP32[$18>>2]|0; $30 = (($29) + 1)|0; HEAP32[$18>>2] = $30; $31 = HEAP32[$16>>2]|0; $32 = (($31) + ($30<<4)|0); _ModelVertex_Init($32,$5,$3,$2,$$039,$$0); $33 = HEAP32[$18>>2]|0; $34 = (($33) + 1)|0; HEAP32[$18>>2] = $34; return; } function _ModelPart_Init($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = +$3; $4 = +$4; $5 = +$5; var $10 = 0, $11 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $6 = $1&65535; HEAP16[$0>>1] = $6; $7 = $2&65535; $8 = ((($0)) + 2|0); HEAP16[$8>>1] = $7; $9 = ((($0)) + 4|0); HEAPF32[$9>>2] = $3; $10 = ((($0)) + 8|0); HEAPF32[$10>>2] = $4; $11 = ((($0)) + 12|0); HEAPF32[$11>>2] = $5; return; } function _ModelVertex_Init($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; $4 = $4|0; $5 = $5|0; var $10 = 0, $11 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; HEAPF32[$0>>2] = $1; $6 = ((($0)) + 4|0); HEAPF32[$6>>2] = $2; $7 = ((($0)) + 8|0); HEAPF32[$7>>2] = $3; $8 = $4&65535; $9 = ((($0)) + 12|0); HEAP16[$9>>1] = $8; $10 = $5&65535; $11 = ((($0)) + 14|0); HEAP16[$11>>1] = $10; return; } function _CorpseModel_Draw($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 240|0); HEAPF32[$1>>2] = 0.02500000037252903; $2 = ((($0)) + 248|0); HEAPF32[$2>>2] = 0.02500000037252903; $3 = ((($0)) + 256|0); HEAPF32[$3>>2] = 0.02500000037252903; $4 = ((($0)) + 264|0); HEAPF32[$4>>2] = 0.02500000037252903; $5 = ((($0)) + 244|0); HEAPF32[$5>>2] = -0.15000000596046448; $6 = ((($0)) + 252|0); HEAPF32[$6>>2] = 0.15000000596046448; $7 = ((($0)) + 260|0); HEAPF32[$7>>2] = -0.20000000298023224; $8 = ((($0)) + 268|0); HEAPF32[$8>>2] = 0.20000000298023224; _HumanModel_Draw($0); return; } function _HumanModel_DrawArm($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _HumanModel_DrawArmCore(1826608); return; } function _SittingModel_GetTransform($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$byval_copy = 0, $$byval_copy1 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $$byval_copy1 = sp + 12|0; $$byval_copy = sp; $3 = ((($0)) + 80|0); $4 = ((($0)) + 84|0); $5 = +HEAPF32[$4>>2]; $6 = $5 * 0.625; $7 = ((($1)) + 4|0); $8 = +HEAPF32[$7>>2]; $9 = $8 - $6; HEAPF32[$7>>2] = $9; ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$1+8>>2]|0; ;HEAP32[$$byval_copy1>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$3+8>>2]|0; _Entity_GetTransform($0,$$byval_copy,$$byval_copy1,$2); STACKTOP = sp;return; } function _HumanModel_DrawArmCore($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1826321)>>0]|0; $2 = $1 & 3; $3 = $2&255; $4 = (((((($0)) + 64|0) + ($3<<7)|0)) + 48|0); _Model_DrawArmPart($4); $5 = ($1<<24>>24)==(0); if ($5) { _Model_UpdateVB(); return; } $6 = (((((($0)) + 64|0) + ($3<<7)|0)) + 112|0); _Model_DrawArmPart($6); _Model_UpdateVB(); return; } function _Model_DrawArmPart($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = HEAP32[(1826324)>>2]|0; ;HEAP32[$1>>2]=HEAP32[$0>>2]|0;HEAP32[$1+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[$0+12>>2]|0; $3 = ((($2)) + 40|0); $4 = HEAP8[$3>>0]|0; $5 = (+($4&255)); $6 = $5 * 0.0625; $7 = ((($1)) + 4|0); HEAPF32[$7>>2] = $6; $8 = ((($2)) + 41|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (1)?($10 >>> 1):($10); $12 = (($11) + ($10))|0; $13 = (+($12|0)); $14 = $13 * 0.0625; $15 = ((($1)) + 8|0); HEAPF32[$15>>2] = $14; $16 = HEAP8[(1826322)>>0]|0; $17 = ($16<<24>>24)==(0); if ($17) { _Model_DrawRotate(-0.34906584024429321,-1.2217304706573486,2.3561944961547852,$1,0); STACKTOP = sp;return; } else { _Model_DrawRotate(0.0,-1.5707963705062866,2.0943951606750488,$1,0); STACKTOP = sp;return; } } function _SittingModel_Draw($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 240|0); HEAPF32[$1>>2] = 1.5; $2 = ((($0)) + 248|0); HEAPF32[$2>>2] = 1.5; $3 = ((($0)) + 244|0); HEAPF32[$3>>2] = -0.10000000149011612; $4 = ((($0)) + 252|0); HEAPF32[$4>>2] = 0.10000000149011612; _HumanModel_Draw($0); return; } function _HumanModel_GetNameY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +2.03125; } function _SittingModel_GetEyeY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +1; } function _SittingModel_GetSize($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); ;HEAP32[$1>>2]=HEAP32[16804>>2]|0;HEAP32[$1+4>>2]=HEAP32[16804+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[16804+8>>2]|0; return; } function _SittingModel_GetBounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); ;HEAP32[$1>>2]=HEAP32[16780>>2]|0;HEAP32[$1+4>>2]=HEAP32[16780+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[16780+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[16780+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[16780+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[16780+20>>2]|0; return; } function _HeadModel_GetTransform($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$byval_copy = 0, $$byval_copy1 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $$byval_copy1 = sp + 12|0; $$byval_copy = sp; $3 = ((($0)) + 80|0); $4 = ((($0)) + 84|0); $5 = +HEAPF32[$4>>2]; $6 = $5 * 1.5; $7 = ((($1)) + 4|0); $8 = +HEAPF32[$7>>2]; $9 = $8 - $6; HEAPF32[$7>>2] = $9; ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$1+8>>2]|0; ;HEAP32[$$byval_copy1>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$3+8>>2]|0; _Entity_GetTransform($0,$$byval_copy,$$byval_copy1,$2); STACKTOP = sp;return; } function _HeadModel_Draw($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $11 = 0.0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _Model_ApplyTexture($0); ;HEAP32[$1>>2]=HEAP32[1826608>>2]|0;HEAP32[$1+4>>2]=HEAP32[1826608+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[1826608+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[1826608+12>>2]|0; $2 = ((($1)) + 8|0); $3 = +HEAPF32[$2>>2]; $4 = $3 + 0.25; HEAPF32[$2>>2] = $4; $5 = ((($0)) + 16|0); $6 = +HEAPF32[$5>>2]; $7 = $6 * -0.01745329238474369; _Model_DrawRotate($7,0.0,0.0,$1,1); ;HEAP32[$1>>2]=HEAP32[(1826640)>>2]|0;HEAP32[$1+4>>2]=HEAP32[(1826640)+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[(1826640)+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[(1826640)+12>>2]|0; $8 = +HEAPF32[$2>>2]; $9 = $8 + 0.25; HEAPF32[$2>>2] = $9; $10 = +HEAPF32[$5>>2]; $11 = $10 * -0.01745329238474369; _Model_DrawRotate($11,0.0,0.0,$1,1); _Model_UpdateVB(); STACKTOP = sp;return; } function _HeadModel_GetEyeY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +0.375; } function _HeadModel_GetSize($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); ;HEAP32[$1>>2]=HEAP32[16940>>2]|0;HEAP32[$1+4>>2]=HEAP32[16940+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[16940+8>>2]|0; return; } function _HeadModel_GetBounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); ;HEAP32[$1>>2]=HEAP32[16916>>2]|0;HEAP32[$1+4>>2]=HEAP32[16916+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[16916+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[16916+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[16916+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[16916+20>>2]|0; return; } function _ChibiModel_DrawArm($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _HumanModel_DrawArmCore(1827172); return; } function _ChibiModel_MakeParts() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; _ChibiModel_ScalePart((1827188),(1826624)); _ChibiModel_ScalePart((1827220),(1826656)); _ChibiModel_ScaleLimbs((1827236),(1826672)); _ChibiModel_ScaleLimbs((1827364),(1826800)); _ChibiModel_ScaleLimbs((1827492),(1826928)); $0 = HEAP16[913304]|0; $1 = $0&65535; $2 = HEAP32[(1826324)>>2]|0; $3 = ((($2)) + 36|0); HEAP32[$3>>2] = $1; _BoxDesc_BuildBox(1827172,17088); $4 = HEAP16[(1826640)>>1]|0; $5 = $4&65535; $6 = HEAP32[(1826324)>>2]|0; $7 = ((($6)) + 36|0); HEAP32[$7>>2] = $5; _BoxDesc_BuildBox((1827204),17132); return; } function _ChibiModel_Draw($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _HumanModel_DrawCore($0,1827172,1); return; } function _ChibiModel_GetNameY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +1.2625000476837158; } function _ChibiModel_GetEyeY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +0.875; } function _ChibiModel_GetSize($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); ;HEAP32[$1>>2]=HEAP32[17076>>2]|0;HEAP32[$1+4>>2]=HEAP32[17076+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[17076+8>>2]|0; return; } function _ChibiModel_GetBounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); ;HEAP32[$1>>2]=HEAP32[17052>>2]|0;HEAP32[$1+4>>2]=HEAP32[17052+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[17052+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[17052+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[17052+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[17052+20>>2]|0; return; } function _ChibiModel_ScalePart($0,$1) { $0 = $0|0; $1 = $1|0; var $$021 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0.0; var $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1826324)>>2]|0; ;HEAP32[$0>>2]=HEAP32[$1>>2]|0;HEAP32[$0+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[$1+8>>2]|0;HEAP32[$0+12>>2]=HEAP32[$1+12>>2]|0; $3 = ((($0)) + 4|0); $4 = +HEAPF32[$3>>2]; $5 = $4 * 0.5; HEAPF32[$3>>2] = $5; $6 = ((($0)) + 8|0); $7 = +HEAPF32[$6>>2]; $8 = $7 * 0.5; HEAPF32[$6>>2] = $8; $9 = ((($0)) + 12|0); $10 = +HEAPF32[$9>>2]; $11 = $10 * 0.5; HEAPF32[$9>>2] = $11; $12 = HEAP16[$1>>1]|0; $13 = $12&65535; $14 = $12&65535; $15 = ((($1)) + 2|0); $16 = HEAP16[$15>>1]|0; $17 = $16&65535; $18 = (($17) + ($14))|0; $19 = ($18>>>0)>($13>>>0); if (!($19)) { return; } $20 = ((($2)) + 4|0); $$021 = $13; while(1) { $21 = HEAP32[$20>>2]|0; $22 = (($21) + ($$021<<4)|0); $23 = HEAP32[(16292)>>2]|0; $24 = (($23) + ($$021<<4)|0); ;HEAP32[$22>>2]=HEAP32[$24>>2]|0;HEAP32[$22+4>>2]=HEAP32[$24+4>>2]|0;HEAP32[$22+8>>2]=HEAP32[$24+8>>2]|0;HEAP32[$22+12>>2]=HEAP32[$24+12>>2]|0; $25 = HEAP32[$20>>2]|0; $26 = (($25) + ($$021<<4)|0); $27 = +HEAPF32[$26>>2]; $28 = $27 * 0.5; HEAPF32[$26>>2] = $28; $29 = (((($25) + ($$021<<4)|0)) + 4|0); $30 = +HEAPF32[$29>>2]; $31 = $30 * 0.5; HEAPF32[$29>>2] = $31; $32 = (((($25) + ($$021<<4)|0)) + 8|0); $33 = +HEAPF32[$32>>2]; $34 = $33 * 0.5; HEAPF32[$32>>2] = $34; $35 = (($$021) + 1)|0; $36 = HEAP16[$1>>1]|0; $37 = $36&65535; $38 = HEAP16[$15>>1]|0; $39 = $38&65535; $40 = (($39) + ($37))|0; $41 = ($35>>>0)<($40>>>0); if ($41) { $$021 = $35; } else { break; } } return; } function _ChibiModel_ScaleLimbs($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _ChibiModel_ScalePart($0,$1); $2 = ((($0)) + 16|0); $3 = ((($1)) + 16|0); _ChibiModel_ScalePart($2,$3); $4 = ((($0)) + 32|0); $5 = ((($1)) + 32|0); _ChibiModel_ScalePart($4,$5); $6 = ((($0)) + 48|0); $7 = ((($1)) + 48|0); _ChibiModel_ScalePart($6,$7); $8 = ((($0)) + 64|0); $9 = ((($1)) + 64|0); _ChibiModel_ScalePart($8,$9); $10 = ((($0)) + 80|0); $11 = ((($1)) + 80|0); _ChibiModel_ScalePart($10,$11); $12 = ((($0)) + 96|0); $13 = ((($1)) + 96|0); _ChibiModel_ScalePart($12,$13); $14 = ((($0)) + 112|0); $15 = ((($1)) + 112|0); _ChibiModel_ScalePart($14,$15); return; } function _ZombieModel_DrawArm($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _HumanModel_DrawArmCore(1826608); return; } function _ZombieModel_Draw($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 256|0); HEAPF32[$1>>2] = 1.5707963705062866; $2 = ((($0)) + 264|0); HEAPF32[$2>>2] = 1.5707963705062866; _HumanModel_DrawCore($0,1826608,0); return; } function _HumanModel_GetEyeY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +1.625; } function _HumanModel_GetSize($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); ;HEAP32[$1>>2]=HEAP32[17276>>2]|0;HEAP32[$1+4>>2]=HEAP32[17276+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[17276+8>>2]|0; return; } function _ZombieModel_GetBounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); ;HEAP32[$1>>2]=HEAP32[17744>>2]|0;HEAP32[$1+4>>2]=HEAP32[17744+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[17744+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[17744+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[17744+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[17744+20>>2]|0; return; } function _SpiderModel_MakeParts() { var label = 0, sp = 0; sp = STACKTOP; _BoxDesc_BuildBox(1827620,17424); _BoxDesc_BuildBox(1827636,17468); _BoxDesc_BuildBox(1827652,17512); _BoxDesc_BuildBox(1827668,17556); _BoxDesc_BuildBox(1827684,17600); return; } function _SpiderModel_Draw($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0; var $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $5 = 0.0, $6 = 0.0; var $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Model_ApplyTexture($0); $1 = ((($0)) + 16|0); $2 = +HEAPF32[$1>>2]; $3 = $2 * -0.01745329238474369; _Model_DrawRotate($3,0.0,0.0,1827620,1); _Model_DrawPart(1827636); _Model_DrawPart(1827652); $4 = ((($0)) + 204|0); $5 = +HEAPF32[$4>>2]; $6 = $5; $7 = (+_Math_Sin($6)); $8 = $7; $9 = ((($0)) + 208|0); $10 = +HEAPF32[$9>>2]; $11 = $10 * $8; $12 = $11 * 3.1415927410125732; $13 = +HEAPF32[$4>>2]; $14 = $13 * 2.0; $15 = $14; $16 = (+_Math_Cos($15)); $17 = $16; $18 = +HEAPF32[$9>>2]; $19 = $18 * $17; $20 = $19 * 3.1415927410125732; $21 = $20 * 0.0625; $22 = +HEAPF32[$4>>2]; $23 = $22 * 2.0; $24 = $23; $25 = (+_Math_Sin($24)); $26 = $25; $27 = +HEAPF32[$9>>2]; $28 = $27 * $26; $29 = $28 * 3.1415927410125732; $30 = $29 * 0.03125; HEAP8[(1826320)>>0] = 1; $31 = $30 + 0.78539818525314331; $32 = $21 + 0.39269909262657166; _Model_DrawRotate($12,$31,$32,1827668,0); $33 = - $12; $34 = $30 + 0.39269909262657166; _Model_DrawRotate($33,$34,$32,1827668,0); $35 = -0.39269909262657166 - $30; $36 = 0.39269909262657166 - $21; _Model_DrawRotate($12,$35,$36,1827668,0); $37 = -0.78539818525314331 - $30; _Model_DrawRotate($33,$37,$36,1827668,0); $38 = $30 + -0.78539818525314331; $39 = $21 + -0.39269909262657166; _Model_DrawRotate($12,$38,$39,1827684,0); $40 = $30 + -0.39269909262657166; _Model_DrawRotate($33,$40,$39,1827684,0); $41 = 0.39269909262657166 - $30; $42 = -0.39269909262657166 - $21; _Model_DrawRotate($12,$41,$42,1827684,0); $43 = 0.78539818525314331 - $30; _Model_DrawRotate($33,$43,$42,1827684,0); HEAP8[(1826320)>>0] = 0; _Model_UpdateVB(); return; } function _SpiderModel_GetNameY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +1.0125000476837158; } function _SpiderModel_GetEyeY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +0.5; } function _SpiderModel_GetSize($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); ;HEAP32[$1>>2]=HEAP32[17412>>2]|0;HEAP32[$1+4>>2]=HEAP32[17412+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[17412+8>>2]|0; return; } function _SpiderModel_GetBounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); ;HEAP32[$1>>2]=HEAP32[17388>>2]|0;HEAP32[$1+4>>2]=HEAP32[17388+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[17388+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[17388+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[17388+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[17388+20>>2]|0; return; } function _SkeletonModel_DrawArm($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Model_DrawArmPart(1827700); _Model_UpdateVB(); return; } function _SkeletonModel_MakeParts() { var label = 0, sp = 0; sp = STACKTOP; _BoxDesc_BuildBox(1827716,17780); _BoxDesc_BuildBox(1827732,17824); _BoxDesc_BuildBox(1827748,17868); _BoxDesc_BuildBox(1827764,17912); _BoxDesc_BuildBox(1827780,17956); _BoxDesc_BuildBox(1827700,18000); return; } function _SkeletonModel_Draw($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; _Model_ApplyTexture($0); $1 = ((($0)) + 16|0); $2 = +HEAPF32[$1>>2]; $3 = $2 * -0.01745329238474369; _Model_DrawRotate($3,0.0,0.0,1827716,1); _Model_DrawPart(1827732); $4 = ((($0)) + 240|0); $5 = +HEAPF32[$4>>2]; _Model_DrawRotate($5,0.0,0.0,1827748,0); $6 = ((($0)) + 248|0); $7 = +HEAPF32[$6>>2]; _Model_DrawRotate($7,0.0,0.0,1827764,0); $8 = ((($0)) + 260|0); $9 = +HEAPF32[$8>>2]; _Model_DrawRotate(1.5707963705062866,0.0,$9,1827780,0); $10 = ((($0)) + 268|0); $11 = +HEAPF32[$10>>2]; _Model_DrawRotate(1.5707963705062866,0.0,$11,1827700,0); _Model_UpdateVB(); return; } function _SkeletonModel_GetSize($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); ;HEAP32[$1>>2]=HEAP32[17768>>2]|0;HEAP32[$1+4>>2]=HEAP32[17768+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[17768+8>>2]|0; return; } function _SkeletonModel_GetBounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); ;HEAP32[$1>>2]=HEAP32[17744>>2]|0;HEAP32[$1+4>>2]=HEAP32[17744+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[17744+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[17744+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[17744+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[17744+20>>2]|0; return; } function _SheepModel_MakeParts() { var label = 0, sp = 0; sp = STACKTOP; _BoxDesc_BuildBox(1827796,18180); _BoxDesc_BuildRotatedBox(1827812,18224); _BoxDesc_BuildBox(1827828,18268); _BoxDesc_BuildBox(1827844,18312); _BoxDesc_BuildBox(1827860,18356); _BoxDesc_BuildBox(1827876,18400); _BoxDesc_BuildBox(1827892,18444); _BoxDesc_BuildRotatedBox(1827908,18488); _BoxDesc_BuildBox(1827924,18532); _BoxDesc_BuildBox(1827940,18576); _BoxDesc_BuildBox(1827956,18620); _BoxDesc_BuildBox(1827972,18664); return; } function _FurlessModel_Draw($0) { $0 = $0|0; var $1 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; _Model_ApplyTexture($0); $1 = ((($0)) + 16|0); $2 = +HEAPF32[$1>>2]; $3 = $2 * -0.01745329238474369; _Model_DrawRotate($3,0.0,0.0,1827796,1); _Model_DrawPart(1827812); $4 = ((($0)) + 240|0); $5 = +HEAPF32[$4>>2]; _Model_DrawRotate($5,0.0,0.0,1827828,0); $6 = ((($0)) + 248|0); $7 = +HEAPF32[$6>>2]; _Model_DrawRotate($7,0.0,0.0,1827844,0); $8 = +HEAPF32[$6>>2]; _Model_DrawRotate($8,0.0,0.0,1827860,0); $9 = +HEAPF32[$4>>2]; _Model_DrawRotate($9,0.0,0.0,1827876,0); _Model_UpdateVB(); return; } function _SheepModel_GetNameY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +1.4812500476837158; } function _SheepModel_GetEyeY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +1.25; } function _SheepModel_GetSize($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); ;HEAP32[$1>>2]=HEAP32[18168>>2]|0;HEAP32[$1+4>>2]=HEAP32[18168+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[18168+8>>2]|0; return; } function _SheepModel_GetBounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); ;HEAP32[$1>>2]=HEAP32[18144>>2]|0;HEAP32[$1+4>>2]=HEAP32[18144+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[18144+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[18144+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[18144+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[18144+20>>2]|0; return; } function _BoxDesc_BuildRotatedBox($0,$1) { $0 = $0|0; $1 = $1|0; var $$0171 = 0, $$sroa$4$0$$sroa_idx5 = 0, $$sroa$4$0$copyload168 = 0, $$sroa$6$0$$sroa_idx9 = 0, $$sroa$6$0$copyload169 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0.0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 5|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = ((($1)) + 4|0); $6 = HEAP8[$5>>0]|0; $7 = $6&255; $8 = ((($1)) + 6|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = ((($1)) + 8|0); $12 = +HEAPF32[$11>>2]; $13 = ((($1)) + 12|0); $14 = +HEAPF32[$13>>2]; $15 = ((($1)) + 16|0); $16 = +HEAPF32[$15>>2]; $17 = ((($1)) + 20|0); $18 = +HEAPF32[$17>>2]; $19 = ((($1)) + 24|0); $20 = +HEAPF32[$19>>2]; $21 = ((($1)) + 28|0); $22 = +HEAPF32[$21>>2]; $23 = HEAP16[$1>>1]|0; $24 = $23&65535; $25 = ((($1)) + 2|0); $26 = HEAP16[$25>>1]|0; $27 = $26&65535; $28 = HEAP32[(1826324)>>2]|0; $29 = (($24) + ($4))|0; $30 = (($29) + ($7))|0; $31 = (($30) + ($4))|0; $32 = (($27) + ($4))|0; $33 = (($31) + ($7))|0; $34 = (($32) + ($10))|0; _BoxDesc_YQuad2($28,$12,$18,$16,$22,$20,$31,$32,$33,$34); _BoxDesc_YQuad2($28,$18,$12,$16,$22,$14,$29,$32,$30,$34); _BoxDesc_ZQuad2($28,$18,$12,$14,$20,$16,$29,$27,$30,$32); $35 = (($30) + ($7))|0; _BoxDesc_ZQuad2($28,$12,$18,$20,$14,$22,$30,$27,$35,$32); _BoxDesc_XQuad2($28,$20,$14,$22,$16,$18,$24,$32,$29,$34); _BoxDesc_XQuad2($28,$14,$20,$22,$16,$12,$30,$32,$31,$34); $36 = ((($28)) + 36|0); $37 = HEAP32[$36>>2]|0; $38 = (($37) + -8)|0; $39 = ((($28)) + 4|0); $$0171 = $38; while(1) { $40 = HEAP32[$39>>2]|0; $$sroa$4$0$$sroa_idx5 = (((($40) + ($$0171<<4)|0)) + 4|0); $$sroa$4$0$copyload168 = HEAP32[$$sroa$4$0$$sroa_idx5>>2]|0; $$sroa$6$0$$sroa_idx9 = (((($40) + ($$0171<<4)|0)) + 8|0); $$sroa$6$0$copyload169 = HEAP32[$$sroa$6$0$$sroa_idx9>>2]|0; HEAP32[$$sroa$4$0$$sroa_idx5>>2] = $$sroa$6$0$copyload169; HEAP32[$$sroa$6$0$$sroa_idx9>>2] = $$sroa$4$0$copyload168; $41 = (($$0171) + 1)|0; $42 = HEAP32[$36>>2]|0; $43 = ($41|0)<($42|0); if ($43) { $$0171 = $41; } else { break; } } $44 = (($42) + -24)|0; $45 = ((($1)) + 32|0); $46 = +HEAPF32[$45>>2]; $47 = ((($1)) + 36|0); $48 = +HEAPF32[$47>>2]; $49 = ((($1)) + 40|0); $50 = +HEAPF32[$49>>2]; _ModelPart_Init($0,$44,24,$46,$48,$50); return; } function _SheepModel_Draw($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; _FurlessModel_Draw($0); $1 = HEAP32[(16216)>>2]|0; _Gfx_BindTexture($1); $2 = ((($0)) + 16|0); $3 = +HEAPF32[$2>>2]; $4 = $3 * -0.01745329238474369; _Model_DrawRotate($4,0.0,0.0,1827892,1); _Model_DrawPart(1827908); $5 = ((($0)) + 240|0); $6 = +HEAPF32[$5>>2]; _Model_DrawRotate($6,0.0,0.0,1827924,0); $7 = ((($0)) + 248|0); $8 = +HEAPF32[$7>>2]; _Model_DrawRotate($8,0.0,0.0,1827940,0); $9 = +HEAPF32[$7>>2]; _Model_DrawRotate($9,0.0,0.0,1827956,0); $10 = +HEAPF32[$5>>2]; _Model_DrawRotate($10,0.0,0.0,1827972,0); _Model_UpdateVB(); return; } function _PigModel_MakeParts() { var label = 0, sp = 0; sp = STACKTOP; _BoxDesc_BuildBox(1827988,18944); _BoxDesc_BuildRotatedBox(1828004,18988); _BoxDesc_BuildBox(1828020,19032); _BoxDesc_BuildBox(1828036,19076); _BoxDesc_BuildBox(1828052,19120); _BoxDesc_BuildBox(1828068,19164); return; } function _PigModel_Draw($0) { $0 = $0|0; var $1 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; _Model_ApplyTexture($0); $1 = ((($0)) + 16|0); $2 = +HEAPF32[$1>>2]; $3 = $2 * -0.01745329238474369; _Model_DrawRotate($3,0.0,0.0,1827988,1); _Model_DrawPart(1828004); $4 = ((($0)) + 240|0); $5 = +HEAPF32[$4>>2]; _Model_DrawRotate($5,0.0,0.0,1828020,0); $6 = ((($0)) + 248|0); $7 = +HEAPF32[$6>>2]; _Model_DrawRotate($7,0.0,0.0,1828036,0); $8 = +HEAPF32[$6>>2]; _Model_DrawRotate($8,0.0,0.0,1828052,0); $9 = +HEAPF32[$4>>2]; _Model_DrawRotate($9,0.0,0.0,1828068,0); _Model_UpdateVB(); return; } function _PigModel_GetNameY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +1.0750000476837158; } function _PigModel_GetEyeY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +0.75; } function _PigModel_GetSize($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); ;HEAP32[$1>>2]=HEAP32[18932>>2]|0;HEAP32[$1+4>>2]=HEAP32[18932+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[18932+8>>2]|0; return; } function _PigModel_GetBounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); ;HEAP32[$1>>2]=HEAP32[18908>>2]|0;HEAP32[$1+4>>2]=HEAP32[18908+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[18908+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[18908+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[18908+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[18908+20>>2]|0; return; } function _CreeperModel_MakeParts() { var label = 0, sp = 0; sp = STACKTOP; _BoxDesc_BuildBox(1828084,19344); _BoxDesc_BuildBox(1828100,19388); _BoxDesc_BuildBox(1828116,19432); _BoxDesc_BuildBox(1828132,19476); _BoxDesc_BuildBox(1828148,19520); _BoxDesc_BuildBox(1828164,19564); return; } function _CreeperModel_Draw($0) { $0 = $0|0; var $1 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; _Model_ApplyTexture($0); $1 = ((($0)) + 16|0); $2 = +HEAPF32[$1>>2]; $3 = $2 * -0.01745329238474369; _Model_DrawRotate($3,0.0,0.0,1828084,1); _Model_DrawPart(1828100); $4 = ((($0)) + 240|0); $5 = +HEAPF32[$4>>2]; _Model_DrawRotate($5,0.0,0.0,1828116,0); $6 = ((($0)) + 248|0); $7 = +HEAPF32[$6>>2]; _Model_DrawRotate($7,0.0,0.0,1828132,0); $8 = +HEAPF32[$6>>2]; _Model_DrawRotate($8,0.0,0.0,1828148,0); $9 = +HEAPF32[$4>>2]; _Model_DrawRotate($9,0.0,0.0,1828164,0); _Model_UpdateVB(); return; } function _CreeperModel_GetNameY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +1.7000000476837158; } function _CreeperModel_GetEyeY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +1.375; } function _CreeperModel_GetSize($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); ;HEAP32[$1>>2]=HEAP32[19332>>2]|0;HEAP32[$1+4>>2]=HEAP32[19332+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[19332+8>>2]|0; return; } function _CreeperModel_GetBounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); ;HEAP32[$1>>2]=HEAP32[19308>>2]|0;HEAP32[$1+4>>2]=HEAP32[19308+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[19308+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[19308+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[19308+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[19308+20>>2]|0; return; } function _ChickenModel_MakeParts() { var label = 0, sp = 0; sp = STACKTOP; _BoxDesc_BuildBox(1828180,19744); _BoxDesc_BuildBox(1828196,19788); _BoxDesc_BuildBox(1828212,19832); _BoxDesc_BuildRotatedBox(1828228,19876); _BoxDesc_BuildBox(1828244,19920); _BoxDesc_BuildBox(1828260,19964); _ChickenModel_MakeLeg(1828276,-3,0,-2,-1); _ChickenModel_MakeLeg(1828292,0,3,1,2); return; } function _ChickenModel_Draw($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0; var $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[456570]|0; _Model_ApplyTexture($0); $2 = ((($0)) + 16|0); $3 = +HEAPF32[$2>>2]; $4 = $3 * -0.01745329238474369; _Model_DrawRotate($4,0.0,0.0,1828180,1); $5 = +HEAPF32[$2>>2]; $6 = $5 * -0.01745329238474369; _Model_DrawRotate($6,0.0,0.0,1828196,1); $7 = +HEAPF32[$2>>2]; $8 = $7 * -0.01745329238474369; _Model_DrawRotate($8,0.0,0.0,1828212,1); _Model_DrawPart(1828228); $9 = ((($0)) + 256|0); $10 = +HEAPF32[$9>>2]; $11 = (+Math_abs((+$10))); $12 = - $11; _Model_DrawRotate(0.0,0.0,$12,1828244,0); $13 = +HEAPF32[$9>>2]; $14 = (+Math_abs((+$13))); _Model_DrawRotate(0.0,0.0,$14,1828260,0); $15 = (_PackedCol_Scale($1,0.69999998807907104)|0); HEAP32[456570] = $15; $16 = (_PackedCol_Scale($1,0.69999998807907104)|0); HEAP32[(1826284)>>2] = $16; $17 = (_PackedCol_Scale($1,0.69999998807907104)|0); HEAP32[(1826288)>>2] = $17; $18 = (_PackedCol_Scale($1,0.69999998807907104)|0); HEAP32[(1826292)>>2] = $18; $19 = (_PackedCol_Scale($1,0.69999998807907104)|0); HEAP32[(1826296)>>2] = $19; $20 = (_PackedCol_Scale($1,0.69999998807907104)|0); HEAP32[(1826300)>>2] = $20; $21 = ((($0)) + 240|0); $22 = +HEAPF32[$21>>2]; _Model_DrawRotate($22,0.0,0.0,1828276,0); $23 = ((($0)) + 248|0); $24 = +HEAPF32[$23>>2]; _Model_DrawRotate($24,0.0,0.0,1828292,0); _Model_UpdateVB(); return; } function _ChickenModel_GetNameY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +1.0125000476837158; } function _ChickenModel_GetEyeY($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return +0.875; } function _ChickenModel_GetSize($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); ;HEAP32[$1>>2]=HEAP32[19732>>2]|0;HEAP32[$1+4>>2]=HEAP32[19732+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[19732+8>>2]|0; return; } function _ChickenModel_GetBounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); ;HEAP32[$1>>2]=HEAP32[19708>>2]|0;HEAP32[$1+4>>2]=HEAP32[19708+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[19708+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[19708+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[19708+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[19708+20>>2]|0; return; } function _ChickenModel_MakeLeg($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $5 = HEAP32[(1826324)>>2]|0; $6 = (+($2|0)); $7 = $6 * 0.0625; $8 = (+($1|0)); $9 = $8 * 0.0625; _BoxDesc_YQuad2($5,$7,$9,-0.125,0.0625,0.015625,32,0,35,3); $10 = (+($3|0)); $11 = $10 * 0.0625; $12 = (+($4|0)); $13 = $12 * 0.0625; _BoxDesc_ZQuad2($5,$11,$13,0.015625,0.3125,0.0625,36,3,37,8); $14 = ((($5)) + 36|0); $15 = HEAP32[$14>>2]|0; $16 = (($15) + -8)|0; _ModelPart_Init($0,$16,8,0.0,0.3125,0.0625); return; } function _HumanModel_MakeParts() { var label = 0, sp = 0; sp = STACKTOP; _BoxDesc_BuildBox(1826608,20032); _BoxDesc_BuildBox((1826624),20076); _BoxDesc_BuildBox((1826640),20120); _BoxDesc_BuildBox((1826656),20164); _BoxDesc_BuildBox((1826672),20208); _BoxDesc_BuildBox((1826688),20252); _BoxDesc_BuildBox((1826704),20296); _BoxDesc_BuildBox((1826720),20340); _BoxDesc_BuildBox((1826800),20384); ;HEAP32[(1826816)>>2]=HEAP32[(1826688)>>2]|0;HEAP32[(1826816)+4>>2]=HEAP32[(1826688)+4>>2]|0;HEAP32[(1826816)+8>>2]=HEAP32[(1826688)+8>>2]|0;HEAP32[(1826816)+12>>2]=HEAP32[(1826688)+12>>2]|0; _BoxDesc_BuildBox((1826832),20428); ;HEAP32[(1826848)>>2]=HEAP32[(1826720)>>2]|0;HEAP32[(1826848)+4>>2]=HEAP32[(1826720)+4>>2]|0;HEAP32[(1826848)+8>>2]=HEAP32[(1826720)+8>>2]|0;HEAP32[(1826848)+12>>2]=HEAP32[(1826720)+12>>2]|0; ;HEAP32[(1826928)>>2]=HEAP32[(1826800)>>2]|0;HEAP32[(1826928)+4>>2]=HEAP32[(1826800)+4>>2]|0;HEAP32[(1826928)+8>>2]=HEAP32[(1826800)+8>>2]|0;HEAP32[(1826928)+12>>2]=HEAP32[(1826800)+12>>2]|0; ;HEAP32[(1826944)>>2]=HEAP32[(1826816)>>2]|0;HEAP32[(1826944)+4>>2]=HEAP32[(1826816)+4>>2]|0;HEAP32[(1826944)+8>>2]=HEAP32[(1826816)+8>>2]|0;HEAP32[(1826944)+12>>2]=HEAP32[(1826816)+12>>2]|0; _BoxDesc_BuildBox((1826960),20472); _BoxDesc_BuildBox((1826976),20516); _BoxDesc_BuildBox((1826864),20560); _BoxDesc_BuildBox((1826880),20604); _BoxDesc_BuildBox((1826896),20648); _BoxDesc_BuildBox((1826912),20692); ;HEAP32[(1826992)>>2]=HEAP32[(1826864)>>2]|0;HEAP32[(1826992)+4>>2]=HEAP32[(1826864)+4>>2]|0;HEAP32[(1826992)+8>>2]=HEAP32[(1826864)+8>>2]|0;HEAP32[(1826992)+12>>2]=HEAP32[(1826864)+12>>2]|0; ;HEAP32[(1827008)>>2]=HEAP32[(1826880)>>2]|0;HEAP32[(1827008)+4>>2]=HEAP32[(1826880)+4>>2]|0;HEAP32[(1827008)+8>>2]=HEAP32[(1826880)+8>>2]|0;HEAP32[(1827008)+12>>2]=HEAP32[(1826880)+12>>2]|0; _BoxDesc_BuildBox((1827024),20736); _BoxDesc_BuildBox((1827040),20780); return; } function _HumanModel_GetBounds($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); ;HEAP32[$1>>2]=HEAP32[20008>>2]|0;HEAP32[$1+4>>2]=HEAP32[20008+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[20008+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[20008+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[20008+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[20008+20>>2]|0; return; } function _Model_ShouldRender($0) { $0 = $0|0; var $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$4$0$$sroa_idx20 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$7$0$$sroa_idx23 = 0, $$sroa$7$0$copyload = 0.0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0; var $22 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; $$sroa$0$0$$sroa_idx = ((($0)) + 4|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$4$0$$sroa_idx20 = ((($0)) + 8|0); $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx20>>2]; $$sroa$7$0$$sroa_idx23 = ((($0)) + 12|0); $$sroa$7$0$copyload = +HEAPF32[$$sroa$7$0$$sroa_idx23>>2]; _Entity_GetPickingBounds($0,$1); $2 = ((($1)) + 12|0); $3 = +HEAPF32[$2>>2]; $4 = +HEAPF32[$1>>2]; $5 = $3 - $4; $6 = ((($1)) + 16|0); $7 = +HEAPF32[$6>>2]; $8 = ((($1)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 - $9; $11 = ((($1)) + 20|0); $12 = +HEAPF32[$11>>2]; $13 = ((($1)) + 8|0); $14 = +HEAPF32[$13>>2]; $15 = $12 - $14; $16 = $10 > $15; $17 = $16 ? $10 : $15; $18 = $5 > $17; $19 = $18 ? $5 : $17; $20 = $10 * 0.5; $21 = $$sroa$4$0$copyload + $20; $22 = (_FrustumCulling_SphereInFrustum($$sroa$0$0$copyload,$21,$$sroa$7$0$copyload,$19)|0); STACKTOP = sp;return ($22|0); } function _Model_RenderDistance($0) { $0 = $0|0; var $$sroa$0$0$copyload = 0.0, $$sroa$024$0$$sroa_idx = 0, $$sroa$024$0$copyload = 0.0, $$sroa$4$0$copyload = 0.0, $$sroa$426$0$$sroa_idx27 = 0, $$sroa$426$0$copyload = 0.0, $$sroa$5$0$copyload = 0.0, $$sroa$7$0$$sroa_idx30 = 0, $$sroa$7$0$copyload = 0.0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0; var $2 = 0.0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $$sroa$024$0$$sroa_idx = ((($0)) + 4|0); $$sroa$024$0$copyload = +HEAPF32[$$sroa$024$0$$sroa_idx>>2]; $$sroa$426$0$$sroa_idx27 = ((($0)) + 8|0); $$sroa$426$0$copyload = +HEAPF32[$$sroa$426$0$$sroa_idx27>>2]; $$sroa$7$0$$sroa_idx30 = ((($0)) + 12|0); $$sroa$7$0$copyload = +HEAPF32[$$sroa$7$0$$sroa_idx30>>2]; $$sroa$0$0$copyload = +HEAPF32[(1771048)>>2]; $$sroa$4$0$copyload = +HEAPF32[(1771052)>>2]; $$sroa$5$0$copyload = +HEAPF32[(1771056)>>2]; $1 = ((($0)) + 72|0); $2 = +HEAPF32[$1>>2]; $3 = ((($0)) + 60|0); $4 = +HEAPF32[$3>>2]; $5 = $2 - $4; $6 = $5 * 0.5; $7 = $$sroa$426$0$copyload + $6; $8 = $$sroa$0$0$copyload - $$sroa$024$0$copyload; $9 = ((($0)) + 68|0); $10 = +HEAPF32[$9>>2]; $11 = ((($0)) + 56|0); $12 = +HEAPF32[$11>>2]; $13 = $10 - $12; $14 = $13 * 0.5; $15 = (+_Model_MinDist($8,$14)); $16 = $$sroa$4$0$copyload - $7; $17 = (+_Model_MinDist($16,$6)); $18 = $$sroa$5$0$copyload - $$sroa$7$0$copyload; $19 = ((($0)) + 76|0); $20 = +HEAPF32[$19>>2]; $21 = ((($0)) + 64|0); $22 = +HEAPF32[$21>>2]; $23 = $20 - $22; $24 = $23 * 0.5; $25 = (+_Model_MinDist($18,$24)); $26 = $15 * $15; $27 = $17 * $17; $28 = $26 + $27; $29 = $25 * $25; $30 = $28 + $29; return (+$30); } function _Model_MinDist($0,$1) { $0 = +$0; $1 = +$1; var $10 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0 - $1; $3 = (+Math_abs((+$2))); $4 = $0 + $1; $5 = (+Math_abs((+$4))); $6 = $3 < $5; $7 = $6 ? $3 : $5; $8 = (+Math_abs((+$0))); $9 = $8 < $7; $10 = $9 ? $8 : $7; return (+$10); } function _Model_Render($0,$1) { $0 = $0|0; $1 = $1|0; var $$byval_copy = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $$byval_copy = sp + 80|0; $2 = sp + 16|0; $3 = sp; $4 = ((($1)) + 4|0); ;HEAP32[$3>>2]=HEAP32[$4>>2]|0;HEAP32[$3+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$3+8>>2]=HEAP32[$4+8>>2]|0; $5 = ((($0)) + 43|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); if (!($7)) { $8 = ((($1)) + 200|0); $9 = +HEAPF32[$8>>2]; $10 = ((($3)) + 4|0); $11 = +HEAPF32[$10>>2]; $12 = $9 + $11; HEAPF32[$10>>2] = $12; } $13 = HEAP8[1972839]|0; $14 = ($13<<24>>24)==(0); if (!($14)) { $15 = ((($3)) + 4|0); $16 = +HEAPF32[$15>>2]; $17 = $16 + -0.09375; HEAPF32[$15>>2] = $17; } _Model_SetupState($0,$1); _Gfx_SetVertexFormat(1); $18 = ((($0)) + 76|0); $19 = HEAP32[$18>>2]|0; $20 = ((($1)) + 128|0); ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$3+8>>2]|0; FUNCTION_TABLE_viii[$19 & 15]($1,$$byval_copy,$20); _Matrix_Mul($2,$20,(1803132)); _Gfx_LoadMatrix(1,$2); $21 = ((($0)) + 16|0); $22 = HEAP32[$21>>2]|0; FUNCTION_TABLE_vi[$22 & 511]($1); _Gfx_LoadMatrix(1,(1803132)); STACKTOP = sp;return; } function _Model_RenderArm($0,$1) { $0 = $0|0; $1 = $1|0; var $$byval_copy = 0, $$byval_copy1 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0; var $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 176|0; $$byval_copy1 = sp + 156|0; $$byval_copy = sp + 144|0; $2 = sp + 80|0; $3 = sp + 16|0; $4 = sp; $5 = ((($1)) + 4|0); ;HEAP32[$4>>2]=HEAP32[$5>>2]|0;HEAP32[$4+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$4+8>>2]=HEAP32[$5+8>>2]|0; $6 = ((($0)) + 43|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); if (!($8)) { $9 = ((($1)) + 200|0); $10 = +HEAPF32[$9>>2]; $11 = ((($4)) + 4|0); $12 = +HEAPF32[$11>>2]; $13 = $10 + $12; HEAPF32[$11>>2] = $13; } _Model_SetupState($0,$1); _Gfx_SetVertexFormat(1); _Model_ApplyTexture($1); $14 = HEAP8[(1826322)>>0]|0; $15 = ($14<<24>>24)==(0); $16 = ((($0)) + 40|0); $17 = HEAP8[$16>>0]|0; $18 = $17&255; $19 = (0 - ($18))|0; $20 = (+($19|0)); $21 = $20 * 0.0625; if ($15) { $29 = $21 + 0.10000000149011612; $30 = ((($0)) + 41|0); $31 = HEAP8[$30>>0]|0; $32 = $31&255; $33 = (0 - ($32))|0; $34 = (+($33|0)); $35 = $34 * 0.0625; $36 = $35 + -0.25999999046325684; _Matrix_Translate($3,$29,$36,0.0); } else { $22 = ((($0)) + 41|0); $23 = HEAP8[$22>>0]|0; $24 = $23&255; $25 = (0 - ($24))|0; $26 = (+($25|0)); $27 = $26 * 0.0625; $28 = $27 + -0.10000000149011612; _Matrix_Translate($3,$21,$28,0.0); } $37 = ((($1)) + 80|0); ;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$4+8>>2]|0; ;HEAP32[$$byval_copy1>>2]=HEAP32[$37>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$37+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$37+8>>2]|0; _Entity_GetTransform($1,$$byval_copy,$$byval_copy1,$2); _Matrix_Mul($2,$2,(1803132)); _Matrix_Mul($2,$3,$2); _Gfx_LoadMatrix(1,$2); HEAP8[(1826320)>>0] = 2; $38 = ((($0)) + 80|0); $39 = HEAP32[$38>>2]|0; FUNCTION_TABLE_vi[$39 & 511]($1); HEAP8[(1826320)>>0] = 0; _Gfx_LoadMatrix(1,(1803132)); STACKTOP = sp;return; } function _Model_Get($0) { $0 = $0|0; var $$0 = 0, $$010 = 0, $$011 = 0, $$08 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $$010 = HEAP32[456586]|0; $1 = ($$010|0)==(0|0); if ($1) { $$08 = 0; return ($$08|0); } $$011 = $$010; while(1) { $2 = HEAP32[$$011>>2]|0; $3 = (_String_CaselessEqualsConst($0,$2)|0); $4 = ($3|0)==(0); if (!($4)) { break; } $8 = ((($$011)) + 96|0); $$0 = HEAP32[$8>>2]|0; $9 = ($$0|0)==(0|0); if ($9) { $$08 = 0; label = 7; break; } else { $$011 = $$0; } } if ((label|0) == 7) { return ($$08|0); } $5 = ((($$011)) + 42|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); if (!($7)) { $$08 = $$011; return ($$08|0); } _MakeModel($$011); $$08 = $$011; return ($$08|0); } function _CustomModel_BuildPart($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0.0, $100 = 0.0, $101 = 0, $102 = 0.0, $103 = 0, $104 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0; var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0; var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0; var $79 = 0, $8 = 0.0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0; var $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[$1>>2]; $3 = ((($1)) + 4|0); $4 = +HEAPF32[$3>>2]; $5 = ((($1)) + 8|0); $6 = +HEAPF32[$5>>2]; $7 = ((($1)) + 12|0); $8 = +HEAPF32[$7>>2]; $9 = ((($1)) + 16|0); $10 = +HEAPF32[$9>>2]; $11 = ((($1)) + 20|0); $12 = +HEAPF32[$11>>2]; $13 = ((($0)) + 217|0); $14 = HEAP8[$13>>0]|0; $15 = $14&255; $16 = ($15*24)|0; $17 = ((($0)) + 36|0); HEAP32[$17>>2] = $16; $18 = ((($1)) + 84|0); $19 = HEAP8[$18>>0]|0; $20 = $19 & 1; $21 = (((((($0)) + 220|0) + (($15*112)|0)|0)) + 108|0); HEAP8[$21>>0] = $20; $22 = $19 & 2; $23 = (((((($0)) + 220|0) + (($15*112)|0)|0)) + 109|0); HEAP8[$23>>0] = $22; $24 = ((($1)) + 24|0); $25 = HEAP16[$24>>1]|0; $26 = $25&65535; $27 = ((($1)) + 36|0); $28 = HEAP16[$27>>1]|0; $29 = $28&65535; $30 = ((($1)) + 48|0); $31 = HEAP16[$30>>1]|0; $32 = $31&65535; $33 = ((($1)) + 60|0); $34 = HEAP16[$33>>1]|0; $35 = $34&65535; _BoxDesc_YQuad2($0,$2,$8,$12,$6,$10,$26,$29,$32,$35); $36 = ((($1)) + 26|0); $37 = HEAP16[$36>>1]|0; $38 = $37&65535; $39 = ((($1)) + 38|0); $40 = HEAP16[$39>>1]|0; $41 = $40&65535; $42 = ((($1)) + 50|0); $43 = HEAP16[$42>>1]|0; $44 = $43&65535; $45 = ((($1)) + 62|0); $46 = HEAP16[$45>>1]|0; $47 = $46&65535; _BoxDesc_YQuad2($0,$8,$2,$12,$6,$4,$38,$41,$44,$47); $48 = ((($1)) + 28|0); $49 = HEAP16[$48>>1]|0; $50 = $49&65535; $51 = ((($1)) + 40|0); $52 = HEAP16[$51>>1]|0; $53 = $52&65535; $54 = ((($1)) + 52|0); $55 = HEAP16[$54>>1]|0; $56 = $55&65535; $57 = ((($1)) + 64|0); $58 = HEAP16[$57>>1]|0; $59 = $58&65535; _BoxDesc_ZQuad2($0,$2,$8,$4,$10,$6,$50,$53,$56,$59); $60 = ((($1)) + 30|0); $61 = HEAP16[$60>>1]|0; $62 = $61&65535; $63 = ((($1)) + 42|0); $64 = HEAP16[$63>>1]|0; $65 = $64&65535; $66 = ((($1)) + 54|0); $67 = HEAP16[$66>>1]|0; $68 = $67&65535; $69 = ((($1)) + 66|0); $70 = HEAP16[$69>>1]|0; $71 = $70&65535; _BoxDesc_ZQuad2($0,$8,$2,$4,$10,$12,$62,$65,$68,$71); $72 = ((($1)) + 32|0); $73 = HEAP16[$72>>1]|0; $74 = $73&65535; $75 = ((($1)) + 44|0); $76 = HEAP16[$75>>1]|0; $77 = $76&65535; $78 = ((($1)) + 56|0); $79 = HEAP16[$78>>1]|0; $80 = $79&65535; $81 = ((($1)) + 68|0); $82 = HEAP16[$81>>1]|0; $83 = $82&65535; _BoxDesc_XQuad2($0,$6,$12,$4,$10,$8,$74,$77,$80,$83); $84 = ((($1)) + 34|0); $85 = HEAP16[$84>>1]|0; $86 = $85&65535; $87 = ((($1)) + 46|0); $88 = HEAP16[$87>>1]|0; $89 = $88&65535; $90 = ((($1)) + 58|0); $91 = HEAP16[$90>>1]|0; $92 = $91&65535; $93 = ((($1)) + 70|0); $94 = HEAP16[$93>>1]|0; $95 = $94&65535; _BoxDesc_XQuad2($0,$12,$6,$4,$10,$2,$86,$89,$92,$95); $96 = (((($0)) + 220|0) + (($15*112)|0)|0); $97 = HEAP32[$17>>2]|0; $98 = (($97) + -24)|0; $99 = ((($1)) + 72|0); $100 = +HEAPF32[$99>>2]; $101 = ((($1)) + 76|0); $102 = +HEAPF32[$101>>2]; $103 = ((($1)) + 80|0); $104 = +HEAPF32[$103>>2]; _ModelPart_Init($96,$98,24,$100,$102,$104); return; } function _CustomModel_Register($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $models_head$sink = 0, label = 0, sp = 0; sp = STACKTOP; _CheckMaxVertices(); $1 = ((($0)) + 100|0); HEAP32[$0>>2] = $1; $2 = ((($0)) + 8|0); HEAP32[$2>>2] = 1828312; $3 = ((($0)) + 12|0); HEAP32[$3>>2] = 51; $4 = ((($0)) + 16|0); HEAP32[$4>>2] = 376; $5 = ((($0)) + 20|0); HEAP32[$5>>2] = 22; $6 = ((($0)) + 24|0); HEAP32[$6>>2] = 23; $7 = ((($0)) + 28|0); HEAP32[$7>>2] = 377; $8 = ((($0)) + 32|0); HEAP32[$8>>2] = 378; $9 = ((($0)) + 80|0); HEAP32[$9>>2] = 379; $10 = HEAP32[456586]|0; $11 = ($10|0)==(0|0); if ($11) { HEAP32[456586] = $0; $models_head$sink = 1826348; HEAP32[$models_head$sink>>2] = $0; $13 = ((($0)) + 165|0); HEAP8[$13>>0] = 1; return; } else { $12 = ((($0)) + 96|0); HEAP32[$12>>2] = $10; $models_head$sink = 1826344; HEAP32[$models_head$sink>>2] = $0; $13 = ((($0)) + 165|0); HEAP8[$13>>0] = 1; return; } } function _CheckMaxVertices() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1826336)>>2]|0; $1 = ($0>>>0)<(1536); if (!($1)) { return; } _Platform_LogConst(41041); HEAP32[(1826332)>>2] = 873664; HEAP32[(1826336)>>2] = 1536; _Gfx_RecreateDynamicVb((1826328),1,1536); return; } function _CustomModel_Draw($0) { $0 = $0|0; var $$014 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0; var $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1826324)>>2]|0; _Model_ApplyTexture($0); $2 = ((($0)) + 120|0); $3 = +HEAPF32[$2>>2]; $4 = ((($1)) + 212|0); $5 = HEAP16[$4>>1]|0; $6 = (+($5&65535)); $7 = $3 / $6; HEAPF32[(1826304)>>2] = $7; $8 = ((($0)) + 124|0); $9 = +HEAPF32[$8>>2]; $10 = ((($1)) + 214|0); $11 = HEAP16[$10>>1]|0; $12 = (+($11&65535)); $13 = $9 / $12; HEAPF32[(1826308)>>2] = $13; $14 = ((($1)) + 216|0); $15 = HEAP8[$14>>0]|0; $16 = ($15<<24>>24)==(0); if ($16) { _Model_UpdateVB(); HEAP8[(1826320)>>0] = 0; return; } $$014 = 0; while(1) { $17 = (((($1)) + 220|0) + (($$014*112)|0)|0); _CustomModel_DrawPart($17,$1,$0); $18 = (($$014) + 1)|0; $19 = HEAP8[$14>>0]|0; $20 = $19&255; $21 = ($18>>>0)<($20>>>0); if ($21) { $$014 = $18; } else { break; } } _Model_UpdateVB(); HEAP8[(1826320)>>0] = 0; return; } function _CustomModel_GetNameY($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 48|0); $2 = HEAP32[$1>>2]|0; $3 = ((($2)) + 168|0); $4 = +HEAPF32[$3>>2]; return (+$4); } function _CustomModel_GetEyeY($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 48|0); $2 = HEAP32[$1>>2]|0; $3 = ((($2)) + 172|0); $4 = +HEAPF32[$3>>2]; return (+$4); } function _CustomModel_GetCollisionSize($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 92|0); $2 = ((($0)) + 48|0); $3 = HEAP32[$2>>2]|0; $4 = ((($3)) + 176|0); ;HEAP32[$1>>2]=HEAP32[$4>>2]|0;HEAP32[$1+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[$4+8>>2]|0; return; } function _CustomModel_GetPickingBounds($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); $2 = ((($0)) + 48|0); $3 = HEAP32[$2>>2]|0; $4 = ((($3)) + 188|0); ;HEAP32[$1>>2]=HEAP32[$4>>2]|0;HEAP32[$1+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[$4+8>>2]|0;HEAP32[$1+12>>2]=HEAP32[$4+12>>2]|0;HEAP32[$1+16>>2]=HEAP32[$4+16>>2]|0;HEAP32[$1+20>>2]=HEAP32[$4+20>>2]|0; return; } function _CustomModel_DrawArm($0) { $0 = $0|0; var $$014 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0.0, $5 = 0.0; var $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1826324)>>2]|0; $2 = ((($1)) + 212|0); $3 = HEAP16[$2>>1]|0; $4 = (+($3&65535)); $5 = 1.0 / $4; HEAPF32[(1826304)>>2] = $5; $6 = ((($1)) + 214|0); $7 = HEAP16[$6>>1]|0; $8 = (+($7&65535)); $9 = 1.0 / $8; HEAPF32[(1826308)>>2] = $9; $10 = ((($1)) + 216|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(0); if (!($12)) { $$014 = 0; while(1) { $13 = (((((($1)) + 220|0) + (($$014*112)|0)|0)) + 109|0); $14 = HEAP8[$13>>0]|0; $15 = ($14<<24>>24)==(0); if (!($15)) { $16 = (((($1)) + 220|0) + (($$014*112)|0)|0); _Model_DrawArmPart($16); } $17 = (($$014) + 1)|0; $18 = HEAP8[$10>>0]|0; $19 = $18&255; $20 = ($17>>>0)<($19>>>0); if ($20) { $$014 = $17; } else { break; } } } $21 = ((($1)) + 36|0); $22 = HEAP32[$21>>2]|0; $23 = ($22|0)==(0); if ($23) { return; } _Model_UpdateVB(); return; } function _CustomModel_DrawPart($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0113143 = 0, $$0115142 = 0.0, $$0118141 = 0, $$0121140 = 0, $$0125139 = 0.0, $$0128138 = 0.0, $$1119 = 0, $$1119$ph = 0, $$1122 = 0, $$1137 = 0, $$2117 = 0.0, $$2120 = 0, $$2127 = 0.0, $$2130 = 0.0, $$2136 = 0, $$3124 = 0, $$pr = 0, $$sink = 0, $$sink158 = 0.0, $$sink158$in = 0; var $$sink160 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; var $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0, $63 = 0, $64 = 0.0; var $65 = 0.0, $66 = 0.0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond147 = 0; var $exitcond148 = 0, $or$cond = 0, $or$cond131 = 0, $or$cond3 = 0, $or$cond3$not = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 108|0); $4 = HEAP8[$3>>0]|0; $5 = ($4<<24>>24)==(0); if (!($5)) { $6 = HEAP32[456570]|0; HEAP32[235192] = $6; HEAP32[456570] = -1; $7 = HEAP32[(1826284)>>2]|0; HEAP32[(940772)>>2] = $7; HEAP32[(1826284)>>2] = -1; $8 = HEAP32[(1826288)>>2]|0; HEAP32[(940776)>>2] = $8; HEAP32[(1826288)>>2] = -1; $9 = HEAP32[(1826292)>>2]|0; HEAP32[(940780)>>2] = $9; HEAP32[(1826292)>>2] = -1; $10 = HEAP32[(1826296)>>2]|0; HEAP32[(940784)>>2] = $10; HEAP32[(1826296)>>2] = -1; $11 = HEAP32[(1826300)>>2]|0; HEAP32[(940788)>>2] = $11; HEAP32[(1826300)>>2] = -1; } HEAP8[(1826320)>>0] = 3; $12 = ((($0)) + 16|0); $13 = +HEAPF32[$12>>2]; $14 = $13 * 0.01745329238474369; $15 = ((($0)) + 20|0); $16 = +HEAPF32[$15>>2]; $17 = $16 * 0.01745329238474369; $18 = ((($0)) + 24|0); $19 = +HEAPF32[$18>>2]; $20 = $19 * 0.01745329238474369; $21 = ((($1)) + 4|0); $22 = ((($1)) + 4|0); $23 = ((($1)) + 4|0); $24 = ((($0)) + 4|0); $25 = ((($0)) + 8|0); $26 = ((($0)) + 12|0); $$0113143 = 0;$$0115142 = $14;$$0118141 = 0;$$0121140 = 0;$$0125139 = $20;$$0128138 = $17; while(1) { $27 = (((($0)) + 28|0) + (($$0113143*20)|0)|0); $28 = HEAP8[$27>>0]|0; $29 = ($28<<24>>24)==(0); L6: do { if ($29) { $$2117 = $$0115142;$$2120 = $$0118141;$$2127 = $$0125139;$$2130 = $$0128138;$$3124 = $$0121140; } else { $30 = (+_CustomModel_GetAnimationValue($27,$2)); $31 = ($$0118141<<24>>24)==(0); L8: do { if ($31) { $32 = HEAP8[$27>>0]|0; switch ($32<<24>>24) { case 21: case 20: case 19: case 18: case 15: case 14: case 13: case 12: { break; } default: { $$1119 = 0;$37 = $32; break L8; } } $33 = HEAP32[$21>>2]|0; $34 = HEAP16[$0>>1]|0; $35 = $34&65535; $36 = (($33) + ($35<<4)|0); _Mem_Copy(940800,$36,384); $$1119$ph = 1; label = 8; } else { $$1119$ph = $$0118141; label = 8; } } while(0); if ((label|0) == 8) { label = 0; $$pr = HEAP8[$27>>0]|0; $$1119 = $$1119$ph;$37 = $$pr; } switch ($37<<24>>24) { case 19: case 18: case 13: case 12: { $38 = HEAP32[$22>>2]|0; $39 = HEAP16[$0>>1]|0; $40 = $39&65535; $41 = (((((($0)) + 28|0) + (($$0113143*20)|0)|0)) + 1|0); $42 = HEAP8[$41>>0]|0; $$1137 = 0; while(1) { $43 = (($$1137) + ($40))|0; switch ($42<<24>>24) { case 0: { $44 = (($38) + ($43<<4)|0); $$sink = $44; label = 15; break; } case 1: { $45 = (((($38) + ($43<<4)|0)) + 4|0); $$sink = $45; label = 15; break; } case 2: { $46 = (((($38) + ($43<<4)|0)) + 8|0); $$sink = $46; label = 15; break; } default: { } } if ((label|0) == 15) { label = 0; $47 = +HEAPF32[$$sink>>2]; $48 = $30 + $47; HEAPF32[$$sink>>2] = $48; } $49 = (($$1137) + 1)|0; $exitcond147 = ($49|0)==(24); if ($exitcond147) { $$2117 = $$0115142;$$2120 = $$1119;$$2127 = $$0125139;$$2130 = $$0128138;$$3124 = $$0121140; break L6; } else { $$1137 = $49; } } break; } case 21: case 20: case 15: case 14: { $50 = (((((($0)) + 28|0) + (($$0113143*20)|0)|0)) + 1|0); $$2136 = 0; while(1) { $51 = HEAP32[$23>>2]|0; $52 = HEAP16[$0>>1]|0; $53 = $52&65535; $54 = (($$2136) + ($53))|0; $55 = HEAP8[$50>>0]|0; switch ($55<<24>>24) { case 0: { $56 = (($51) + ($54<<4)|0); $$sink158$in = $24;$$sink160 = $56; label = 22; break; } case 1: { $57 = (((($51) + ($54<<4)|0)) + 4|0); $$sink158$in = $25;$$sink160 = $57; label = 22; break; } case 2: { $58 = (((($51) + ($54<<4)|0)) + 8|0); $$sink158$in = $26;$$sink160 = $58; label = 22; break; } default: { } } if ((label|0) == 22) { label = 0; $$sink158 = +HEAPF32[$$sink158$in>>2]; $59 = +HEAPF32[$$sink160>>2]; $60 = (+_Math_Lerp($$sink158,$59,$30)); HEAPF32[$$sink160>>2] = $60; } $61 = (($$2136) + 1)|0; $exitcond = ($61|0)==(24); if ($exitcond) { $$2117 = $$0115142;$$2120 = $$1119;$$2127 = $$0125139;$$2130 = $$0128138;$$3124 = $$0121140; break L6; } else { $$2136 = $61; } } break; } case 1: { $$1122 = 1; break; } default: { $$1122 = $$0121140; } } $62 = (((((($0)) + 28|0) + (($$0113143*20)|0)|0)) + 1|0); $63 = HEAP8[$62>>0]|0; switch ($63<<24>>24) { case 0: { $64 = $$0115142 + $30; $$2117 = $64;$$2120 = $$1119;$$2127 = $$0125139;$$2130 = $$0128138;$$3124 = $$1122; break L6; } case 1: { $65 = $$0128138 + $30; $$2117 = $$0115142;$$2120 = $$1119;$$2127 = $$0125139;$$2130 = $65;$$3124 = $$1122; break L6; } case 2: { $66 = $$0125139 + $30; $$2117 = $$0115142;$$2120 = $$1119;$$2127 = $66;$$2130 = $$0128138;$$3124 = $$1122; break L6; } default: { $$2117 = $$0115142;$$2120 = $$1119;$$2127 = $$0125139;$$2130 = $$0128138;$$3124 = $$1122; break L6; } } } } while(0); $67 = (($$0113143) + 1)|0; $exitcond148 = ($67|0)==(4); if ($exitcond148) { break; } else { $$0113143 = $67;$$0115142 = $$2117;$$0118141 = $$2120;$$0121140 = $$3124;$$0125139 = $$2127;$$0128138 = $$2130; } } $68 = $$2117 != 0.0; $69 = $$2130 != 0.0; $or$cond = $69 | $68; $70 = $$2127 != 0.0; $or$cond3 = $70 | $or$cond; $or$cond3$not = $or$cond3 ^ 1; $71 = ($$3124<<24>>24)==(0); $or$cond131 = $71 & $or$cond3$not; if ($or$cond131) { _Model_DrawPart($0); } else { _Model_DrawRotate($$2117,$$2130,$$2127,$0,$$3124); } $72 = ($$2120<<24>>24)==(0); if (!($72)) { $73 = ((($1)) + 4|0); $74 = HEAP32[$73>>2]|0; $75 = HEAP16[$0>>1]|0; $76 = $75&65535; $77 = (($74) + ($76<<4)|0); _Mem_Copy($77,940800,384); } $78 = HEAP8[$3>>0]|0; $79 = ($78<<24>>24)==(0); if ($79) { return; } ;HEAP32[1826280>>2]=HEAP32[940768>>2]|0;HEAP32[1826280+4>>2]=HEAP32[940768+4>>2]|0;HEAP32[1826280+8>>2]=HEAP32[940768+8>>2]|0;HEAP32[1826280+12>>2]=HEAP32[940768+12>>2]|0;HEAP32[1826280+16>>2]=HEAP32[940768+16>>2]|0;HEAP32[1826280+20>>2]=HEAP32[940768+20>>2]|0; return; } function _CustomModel_GetAnimationValue($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0.0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0.0; var $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0, $45 = 0.0; var $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0.0, $63 = 0; var $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0, $69 = 0.0, $7 = 0.0, $70 = 0.0, $71 = 0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0.0; var $82 = 0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0.0, $87 = 0.0, $88 = 0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0, $92 = 0.0, $93 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[$0>>0]|0; do { switch ($2<<24>>24) { case 1: { $3 = ((($1)) + 16|0); $4 = +HEAPF32[$3>>2]; $5 = $4 * -0.01745329238474369; $$0 = $5; return (+$$0); } case 2: { $6 = ((($1)) + 240|0); $7 = +HEAPF32[$6>>2]; $$0 = $7; return (+$$0); } case 3: { $8 = ((($1)) + 248|0); $9 = +HEAPF32[$8>>2]; $$0 = $9; return (+$$0); } case 4: { HEAP8[(1826320)>>0] = 1; $10 = ((($1)) + 256|0); $11 = +HEAPF32[$10>>2]; $$0 = $11; return (+$$0); } case 5: { HEAP8[(1826320)>>0] = 1; $12 = ((($1)) + 260|0); $13 = +HEAPF32[$12>>2]; $$0 = $13; return (+$$0); } case 6: { HEAP8[(1826320)>>0] = 1; $14 = ((($1)) + 264|0); $15 = +HEAPF32[$14>>2]; $$0 = $15; return (+$$0); } case 7: { HEAP8[(1826320)>>0] = 1; $16 = ((($1)) + 268|0); $17 = +HEAPF32[$16>>2]; $$0 = $17; return (+$$0); } case 8: { $18 = +HEAPF64[(1084992)>>3]; $19 = $18; $20 = ((($0)) + 4|0); $21 = +HEAPF32[$20>>2]; $22 = $21 * $19; $23 = ((($0)) + 8|0); $24 = +HEAPF32[$23>>2]; $25 = $22 + $24; $$0 = $25; return (+$$0); } case 9: { $26 = ((($1)) + 204|0); $27 = +HEAPF32[$26>>2]; $28 = ((($0)) + 4|0); $29 = +HEAPF32[$28>>2]; $30 = $27 * $29; $31 = ((($0)) + 8|0); $32 = +HEAPF32[$31>>2]; $33 = $30 + $32; $$0 = $33; return (+$$0); } case 14: case 12: case 10: { $34 = +HEAPF64[(1084992)>>3]; $35 = $34; $36 = ((($0)) + 4|0); $37 = +HEAPF32[$36>>2]; $38 = $37 * $35; $39 = ((($0)) + 12|0); $40 = +HEAPF32[$39>>2]; $41 = $40 * 6.2831854820251465; $42 = $38 + $41; $43 = (+_Math_SinF($42)); $44 = ((($0)) + 16|0); $45 = +HEAPF32[$44>>2]; $46 = $43 + $45; $47 = ((($0)) + 8|0); $48 = +HEAPF32[$47>>2]; $49 = $46 * $48; $$0 = $49; return (+$$0); } case 15: case 13: case 11: { $50 = ((($1)) + 204|0); $51 = +HEAPF32[$50>>2]; $52 = ((($0)) + 4|0); $53 = +HEAPF32[$52>>2]; $54 = $51 * $53; $55 = ((($0)) + 12|0); $56 = +HEAPF32[$55>>2]; $57 = $56 * 6.2831854820251465; $58 = $54 + $57; $59 = (+_Math_SinF($58)); $60 = ((($0)) + 16|0); $61 = +HEAPF32[$60>>2]; $62 = $59 + $61; $63 = ((($0)) + 8|0); $64 = +HEAPF32[$63>>2]; $65 = $62 * $64; $$0 = $65; return (+$$0); } case 20: case 18: case 16: { $66 = +HEAPF64[(1084992)>>3]; $67 = $66; $68 = ((($0)) + 4|0); $69 = +HEAPF32[$68>>2]; $70 = $69 * $67; $71 = ((($0)) + 12|0); $72 = +HEAPF32[$71>>2]; $73 = $70 + $72; $74 = ((($0)) + 16|0); $75 = +HEAPF32[$74>>2]; $76 = (+_EuclidianMod($73,$75)); $77 = ((($0)) + 8|0); $78 = +HEAPF32[$77>>2]; $79 = $76 * $78; $$0 = $79; return (+$$0); } case 21: case 19: case 17: { $80 = ((($1)) + 204|0); $81 = +HEAPF32[$80>>2]; $82 = ((($0)) + 4|0); $83 = +HEAPF32[$82>>2]; $84 = $81 * $83; $85 = ((($0)) + 12|0); $86 = +HEAPF32[$85>>2]; $87 = $84 + $86; $88 = ((($0)) + 16|0); $89 = +HEAPF32[$88>>2]; $90 = (+_EuclidianMod($87,$89)); $91 = ((($0)) + 8|0); $92 = +HEAPF32[$91>>2]; $93 = $90 * $92; $$0 = $93; return (+$$0); } default: { $$0 = 0.0; return (+$$0); } } } while(0); } function _EuclidianMod($0,$1) { $0 = +$0; $1 = +$1; var $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = $0 / $1; $3 = (_Math_Floor($2)|0); $4 = (+($3|0)); $5 = $4 * $1; $6 = $0 - $5; return (+$6); } function _Options_Load() { var label = 0, sp = 0; sp = STACKTOP; _StringsBuffer_SetLengthBits(1828328,11); (_EntryList_Load(1828328,41100,61,0)|0); (_EntryList_Load(1828328,41120,61,0)|0); return; } function _Options_Reload() { var $$07 = 0, $$07$in = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $0 = sp + 8|0; $1 = sp + 24|0; $2 = sp + 16|0; $3 = sp; $4 = HEAP32[(1828336)>>2]|0; $5 = ($4|0)>(0); if (!($5)) { (_EntryList_Load(1828328,41120,61,18)|0); STACKTOP = sp;return; } $$07$in = $4; while(1) { $$07 = (($$07$in) + -1)|0; _StringsBuffer_UNSAFE_Get($3,1828328,$$07); $6 = $3; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = $0; $13 = $12; HEAP32[$13>>2] = $8; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; (_String_UNSAFE_Separate($0,61,$1,$2)|0); $16 = (_HasChanged($1)|0); $17 = ($16<<24>>24)==(0); if ($17) { _StringsBuffer_Remove(1828328,$$07); } $18 = ($$07$in|0)>(1); if ($18) { $$07$in = $$07; } else { break; } } (_EntryList_Load(1828328,41120,61,18)|0); STACKTOP = sp;return; } function _HasChanged($0) { $0 = $0|0; var $$05 = 0, $$07 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 8|0; $2 = sp; $3 = HEAP32[(1833488)>>2]|0; $4 = ($3|0)>(0); if (!($4)) { $$05 = 0; STACKTOP = sp;return ($$05|0); } $$07 = 0; while(1) { _StringsBuffer_UNSAFE_Get($2,1833480,$$07); $8 = $2; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = (($8) + 4)|0; $12 = $11; $13 = HEAP32[$12>>2]|0; $14 = $1; $15 = $14; HEAP32[$15>>2] = $10; $16 = (($14) + 4)|0; $17 = $16; HEAP32[$17>>2] = $13; $18 = (_String_CaselessEquals($1,$0)|0); $19 = ($18|0)==(0); $6 = (($$07) + 1)|0; if (!($19)) { $$05 = 1; label = 5; break; } $5 = HEAP32[(1833488)>>2]|0; $7 = ($6|0)<($5|0); if ($7) { $$07 = $6; } else { $$05 = 0; label = 5; break; } } if ((label|0) == 5) { STACKTOP = sp;return ($$05|0); } return (0)|0; } function _Options_LoadFilter($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 8|0; $2 = sp; (_String_UNSAFE_Separate($0,61,$1,$2)|0); $3 = (_HasChanged($1)|0); $4 = ($3<<24>>24)==(0); $5 = $4&1; STACKTOP = sp;return ($5|0); } function _Options_SaveIfChanged() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1833488)>>2]|0; $1 = ($0|0)==(0); if ($1) { return; } _Options_Reload(); _SaveOptions(); return; } function _SaveOptions() { var label = 0, sp = 0; sp = STACKTOP; _EntryList_Save(1828328,41120); _StringsBuffer_Clear(1833480); return; } function _Options_UNSAFE_Get($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp + 24|0; $3 = sp + 16|0; $4 = sp + 8|0; $5 = sp; _String_FromReadonly($2,$0); _EntryList_UNSAFE_Get($3,1828328,$2,61); $6 = $3; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = $1; $13 = $12; HEAP32[$13>>2] = $8; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; $16 = ((($1)) + 4|0); $17 = HEAP16[$16>>1]|0; $18 = ($17<<16>>16)==(0); if (!($18)) { $$0 = 1; STACKTOP = sp;return ($$0|0); } $19 = (_String_IndexOfAt($2,0,45)|0); $20 = ($19|0)==(-1); if ($20) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $21 = (($19) + 1)|0; _String_UNSAFE_SubstringAt($4,$2,$21); $22 = $4; $23 = $22; $24 = HEAP32[$23>>2]|0; $25 = (($22) + 4)|0; $26 = $25; $27 = HEAP32[$26>>2]|0; $28 = $2; $29 = $28; HEAP32[$29>>2] = $24; $30 = (($28) + 4)|0; $31 = $30; HEAP32[$31>>2] = $27; _EntryList_UNSAFE_Get($5,1828328,$2,61); $32 = $5; $33 = $32; $34 = HEAP32[$33>>2]|0; $35 = (($32) + 4)|0; $36 = $35; $37 = HEAP32[$36>>2]|0; $38 = $1; $39 = $38; HEAP32[$39>>2] = $34; $40 = (($38) + 4)|0; $41 = $40; HEAP32[$41>>2] = $37; $42 = HEAP16[$16>>1]|0; $43 = ($42<<16>>16)!=(0); $44 = $43&1; $$0 = $44; STACKTOP = sp;return ($$0|0); } function _Options_Get($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; (_Options_UNSAFE_Get($0,$3)|0); $4 = ((($1)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($3)) + 4|0); $6 = HEAP16[$5>>1]|0; $7 = ($6<<16>>16)==(0); if ($7) { _String_AppendConst($1,$2); STACKTOP = sp;return; } else { _String_AppendString($1,$3); STACKTOP = sp;return; } } function _Options_GetInt($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp + 8|0; $5 = sp; $6 = (_Options_UNSAFE_Get($0,$4)|0); $7 = ($6<<24>>24)==(0); if ($7) { $$0 = $3; STACKTOP = sp;return ($$0|0); } $8 = (_Convert_ParseInt($4,$5)|0); $9 = ($8<<24>>24)==(0); if ($9) { $$0 = $3; STACKTOP = sp;return ($$0|0); } $10 = HEAP32[$5>>2]|0; $11 = ($10|0)<($1|0); $12 = $11 ? $1 : $10; $13 = ($12|0)>($2|0); $14 = $13 ? $2 : $12; HEAP32[$5>>2] = $14; $$0 = $14; STACKTOP = sp;return ($$0|0); } function _Options_GetBool($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = sp + 8|0; $4 = (_Options_UNSAFE_Get($0,$2)|0); $5 = ($4<<24>>24)==(0); if ($5) { $$0 = $1; STACKTOP = sp;return ($$0|0); } $6 = (_Convert_ParseBool($2,$3)|0); $7 = ($6<<24>>24)==(0); $8 = HEAP8[$3>>0]|0; $spec$select = $7 ? $1 : $8; $$0 = $spec$select; STACKTOP = sp;return ($$0|0); } function _Options_GetFloat($0,$1,$2,$3) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; var $$0 = 0.0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp + 8|0; $5 = sp; $6 = (_Options_UNSAFE_Get($0,$4)|0); $7 = ($6<<24>>24)==(0); if ($7) { $$0 = $3; STACKTOP = sp;return (+$$0); } $8 = (_Convert_ParseFloat($4,$5)|0); $9 = ($8<<24>>24)==(0); if ($9) { $$0 = $3; STACKTOP = sp;return (+$$0); } $10 = +HEAPF32[$5>>2]; $11 = $10 < $1; $12 = $11 ? $1 : $10; $13 = $12 > $2; $14 = $13 ? $2 : $12; HEAPF32[$5>>2] = $14; $$0 = $14; STACKTOP = sp;return (+$$0); } function _Options_GetEnum($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp; $5 = (_Options_UNSAFE_Get($0,$4)|0); $6 = ($5<<24>>24)==(0); if ($6) { $$0 = $1; } else { $7 = (_Utils_ParseEnum($4,$1,$2,$3)|0); $$0 = $7; } STACKTOP = sp;return ($$0|0); } function _Options_SetBool($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(0); $3 = $2 ? 20824 : 20832; _Options_Set($0,$3); return; } function _Options_Set($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; _String_FromReadonly($2,$0); _Options_SetString($2,$1); STACKTOP = sp;return; } function _Options_SetString($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)==(0|0); if ($2) { label = 3; } else { $3 = ((($1)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = ($4<<16>>16)==(0); if ($5) { label = 3; } else { _EntryList_Set(1828328,$0,$1,61); } } if ((label|0) == 3) { $6 = (_EntryList_Remove(1828328,$0,61)|0); $7 = ($6<<24>>24)==(0); if ($7) { return; } } $8 = (0)==(0); if ($8) { _SaveOptions(); } $9 = (_HasChanged($0)|0); $10 = ($9<<24>>24)==(0); if (!($10)) { return; } _StringsBuffer_Add(1833480,$0); return; } function _Options_SetInt($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp + 24|0; $3 = sp; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 24; _String_AppendInt($2,$1); _Options_Set($0,$2); STACKTOP = sp;return; } function _PackedCol_Scale($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = $0 & 255; $3 = (+($2|0)); $4 = $3 * $1; $5 = (~~(($4))&255); $6 = (8)?($0 >>> 8):($0); $7 = $6 & 255; $8 = (+($7|0)); $9 = $8 * $1; $10 = (~~(($9))&255); $11 = (16)?($0 >>> 16):($0); $12 = $11 & 255; $13 = (+($12|0)); $14 = $13 * $1; $15 = (~~(($14))&255); $16 = $0 & -16777216; $17 = $5&255; $18 = $16 | $17; $19 = $10&255; $20 = $19 << 8; $21 = $18 | $20; $22 = $15&255; $23 = $22 << 16; $24 = $21 | $23; return ($24|0); } function _PackedCol_Lerp($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = +$2; var $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = $0&255; $4 = (+($3&255)); $5 = $1&255; $6 = (+($5&255)); $7 = (+_Math_Lerp($4,$6,$2)); $8 = (~~(($7))&255); $9 = (8)?($0 >>> 8):($0); $10 = $9&255; $11 = (+($10&255)); $12 = (8)?($1 >>> 8):($1); $13 = $12&255; $14 = (+($13&255)); $15 = (+_Math_Lerp($11,$14,$2)); $16 = (~~(($15))&255); $17 = (16)?($0 >>> 16):($0); $18 = $17&255; $19 = (+($18&255)); $20 = (16)?($1 >>> 16):($1); $21 = $20&255; $22 = (+($21&255)); $23 = (+_Math_Lerp($19,$22,$2)); $24 = (~~(($23))&255); $25 = $0 & -16777216; $26 = $8&255; $27 = $25 | $26; $28 = $16&255; $29 = $28 << 8; $30 = $27 | $29; $31 = $24&255; $32 = $31 << 16; $33 = $30 | $32; return ($33|0); } function _PackedCol_Tint($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0 & 255; $3 = $1 & 255; $4 = Math_imul($3, $2)|0; $5 = (($4>>>0) / 255)&-1; $6 = (8)?($0 >>> 8):($0); $7 = $6 & 255; $8 = (8)?($1 >>> 8):($1); $9 = $8 & 255; $10 = Math_imul($9, $7)|0; $11 = (($10>>>0) / 255)&-1; $12 = (16)?($0 >>> 16):($0); $13 = $12 & 255; $14 = (16)?($1 >>> 16):($1); $15 = $14 & 255; $16 = Math_imul($15, $13)|0; $17 = (($16>>>0) / 255)&-1; $18 = $0 & -16777216; $19 = $5 | $18; $20 = $11 << 8; $21 = $19 | $20; $22 = $17 << 16; $23 = $21 | $22; return ($23|0); } function _PackedCol_GetShaded($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_PackedCol_Scale($0,0.60000002384185791)|0); HEAP32[$1>>2] = $4; $5 = (_PackedCol_Scale($0,0.80000001192092896)|0); HEAP32[$2>>2] = $5; $6 = (_PackedCol_Scale($0,0.5)|0); HEAP32[$3>>2] = $6; return; } function _PackedCol_DeHex($0) { $0 = $0|0; var $$off = 0, $$off12 = 0, $$off13 = 0, $$sink = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0 << 24 >> 24; $$off = (($0) + -48)<<24>>24; $2 = ($$off&255)<(10); if ($2) { $$sink = -48; $6 = (($$sink) + ($1))|0; return ($6|0); } $$off12 = (($0) + -97)<<24>>24; $3 = ($$off12&255)<(6); if ($3) { $$sink = -87; $6 = (($$sink) + ($1))|0; return ($6|0); } else { $$off13 = (($0) + -65)<<24>>24; $4 = ($$off13&255)<(6); $5 = (($1) + -55)|0; $spec$select = $4 ? $5 : -1; return ($spec$select|0); } } function _PackedCol_Unhex($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$010 = 0, $$011 = 0, $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($2|0)>(0); if (!($3)) { $$010 = 1; return ($$010|0); } $$011 = 0; while(1) { $6 = (($0) + ($$011)|0); $7 = HEAP8[$6>>0]|0; $8 = (_PackedCol_DeHex($7)|0); $9 = (($1) + ($$011<<2)|0); HEAP32[$9>>2] = $8; $10 = ($8|0)==(-1); $4 = (($$011) + 1)|0; if ($10) { $$010 = 0; label = 5; break; } $5 = ($4|0)<($2|0); if ($5) { $$011 = $4; } else { $$010 = 1; label = 5; break; } } if ((label|0) == 5) { return ($$010|0); } return (0)|0; } function _PackedCol_ToHex($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $1&255; _String_AppendHex($0,$2); $3 = (8)?($1 >>> 8):($1); $4 = $3&255; _String_AppendHex($0,$4); $5 = (16)?($1 >>> 16):($1); $6 = $5&255; _String_AppendHex($0,$6); return; } function _PackedCol_TryParseHex($0,$1) { $0 = $0|0; $1 = $1|0; var $$012 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $spec$select = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = HEAP32[$0>>2]|0; $4 = ((($0)) + 4|0); $5 = HEAP16[$4>>1]|0; $6 = ($5&65535)<(6); if ($6) { $$012 = 0; STACKTOP = sp;return ($$012|0); } $7 = ($5<<16>>16)==(6); if (!($7)) { $8 = HEAP8[$3>>0]|0; $9 = ($8<<24>>24)!=(35); $10 = ($5&65535)>(7); $or$cond = $10 | $9; if ($or$cond) { $$012 = 0; STACKTOP = sp;return ($$012|0); } } $11 = HEAP8[$3>>0]|0; $12 = ($11<<24>>24)==(35); $13 = ((($3)) + 1|0); $spec$select = $12 ? $13 : $3; $14 = (_PackedCol_Unhex($spec$select,$2,6)|0); $15 = ($14<<24>>24)==(0); if ($15) { $$012 = 0; STACKTOP = sp;return ($$012|0); } $16 = HEAP32[$2>>2]|0; $17 = $16 << 4; $18 = ((($2)) + 4|0); $19 = HEAP32[$18>>2]|0; $20 = $17 | $19; $21 = $20&255; HEAP8[$1>>0] = $21; $22 = ((($2)) + 8|0); $23 = HEAP32[$22>>2]|0; $24 = $23 << 4; $25 = ((($2)) + 12|0); $26 = HEAP32[$25>>2]|0; $27 = $24 | $26; $28 = $27&255; $29 = ((($1)) + 1|0); HEAP8[$29>>0] = $28; $30 = ((($2)) + 16|0); $31 = HEAP32[$30>>2]|0; $32 = $31 << 4; $33 = ((($2)) + 20|0); $34 = HEAP32[$33>>2]|0; $35 = $32 | $34; $36 = $35&255; $37 = ((($1)) + 2|0); HEAP8[$37>>0] = $36; $$012 = 1; STACKTOP = sp;return ($$012|0); } function _OnInit_1498() { var label = 0, sp = 0; sp = STACKTOP; (_ScheduledTask_Add(0.050000000000000003,380)|0); _Random_SeedFromCurrentTime(1098536); _OnContextRecreated_1503(0); _TextureEntry_Register(20864); _Event_Register(1794048,0,29); _Event_Register((1793528),0,381); _Event_Register((1793788),0,382); return; } function _OnFree_1499() { var label = 0, sp = 0; sp = STACKTOP; _OnContextLost_1501(0); return; } function _OnReset_1500() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[459658] = 0; HEAP32[459659] = 0; HEAP32[459660] = 0; return; } function _OnContextLost_1501($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteVb(1838644); $1 = HEAP8[(1803130)>>0]|0; $2 = ($1<<24>>24)==(0); if (!($2)) { return; } _Gfx_DeleteTexture(1838648); return; } function _Particles_Tick($0) { $0 = $0|0; var $1 = 0, $2 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 8|0); $2 = +HEAPF64[$1>>3]; _Terrain_Tick($2); _Rain_Tick($2); _Custom_Tick($2); return; } function _OnContextRecreated_1503($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_RecreateDynamicVb(1838644,1,2400); return; } function _OnBreakBlockEffect_Handler($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$byval_copy = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $$byval_copy = sp; ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$1+8>>2]|0; _Particles_BreakBlockEffect($$byval_copy,$2,$3); STACKTOP = sp;return; } function _Particles_BreakBlockEffect($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0163170 = 0, $$0164171 = 0, $$0165172 = 0, $$0166 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0.0, $$sroa$0100$0$$sroa_idx = 0, $$sroa$0100$0$copyload = 0.0, $$sroa$0111$0$$sroa_idx112 = 0, $$sroa$0129$0$copyload = 0.0, $$sroa$12$0$$sroa_idx125 = 0, $$sroa$5$0$$sroa_idx94 = 0, $$sroa$5$0$copyload = 0.0, $$sroa$5103$0$$sroa_idx104 = 0, $$sroa$5103$0$copyload = 0.0, $$sroa$6$0$$sroa_idx116 = 0, $$sroa$6132$0$$sroa_idx133 = 0, $$sroa$6132$0$copyload = 0.0, $$sroa$7$0$$sroa_idx97 = 0, $$sroa$7$0$copyload = 0.0; var $$sroa$7107$0$$sroa_idx108 = 0, $$sroa$7107$0$copyload = 0.0, $$sroa$8$0$$sroa_idx120 = 0, $10 = 0, $100 = 0.0, $101 = 0, $102 = 0.0, $103 = 0.0, $104 = 0, $105 = 0.0, $106 = 0.0, $107 = 0, $108 = 0, $109 = 0.0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0, $113 = 0, $114 = 0; var $115 = 0, $116 = 0, $117 = 0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $20 = 0, $21 = 0.0, $22 = 0; var $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0; var $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0; var $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0, $63 = 0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0.0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0; var $78 = 0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0; var $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $exitcond = 0, $exitcond173 = 0, $exitcond174 = 0, $or$cond = 0, $or$cond167 = 0, $or$cond168 = 0, $or$cond169 = 0, $or$cond3 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $3 = sp + 40|0; $4 = sp + 28|0; $5 = sp + 16|0; $6 = sp; $7 = ($2<<16>>16)==(0); if (!($7)) { STACKTOP = sp;return; } $8 = $1&65535; $9 = (1120788 + ($8)|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==(4); if ($11) { STACKTOP = sp;return; } _IVec3_ToVec3($4,$0); $12 = ($8*6)|0; $13 = (1162260 + ($12<<1)|0); $14 = HEAP16[$13>>1]|0; _Atlas1D_TexRec($6,$14,1,$3); $$sroa$0129$0$copyload = +HEAPF32[$6>>2]; $$sroa$6132$0$$sroa_idx133 = ((($6)) + 4|0); $$sroa$6132$0$copyload = +HEAPF32[$$sroa$6132$0$$sroa_idx133>>2]; $15 = +HEAPF32[(1949308)>>2]; $16 = $15 * 0.0625; $$sroa$0100$0$$sroa_idx = (1125396 + (($8*12)|0)|0); $$sroa$0100$0$copyload = +HEAPF32[$$sroa$0100$0$$sroa_idx>>2]; $$sroa$5103$0$$sroa_idx104 = (((1125396 + (($8*12)|0)|0)) + 4|0); $$sroa$5103$0$copyload = +HEAPF32[$$sroa$5103$0$$sroa_idx104>>2]; $$sroa$7107$0$$sroa_idx108 = (((1125396 + (($8*12)|0)|0)) + 8|0); $$sroa$7107$0$copyload = +HEAPF32[$$sroa$7107$0$$sroa_idx108>>2]; $$sroa$0$0$$sroa_idx = (1134612 + (($8*12)|0)|0); $$sroa$0$0$copyload = +HEAPF32[$$sroa$0$0$$sroa_idx>>2]; $$sroa$5$0$$sroa_idx94 = (((1134612 + (($8*12)|0)|0)) + 4|0); $$sroa$5$0$copyload = +HEAPF32[$$sroa$5$0$$sroa_idx94>>2]; $$sroa$7$0$$sroa_idx97 = (((1134612 + (($8*12)|0)|0)) + 8|0); $$sroa$7$0$copyload = +HEAPF32[$$sroa$7$0$$sroa_idx97>>2]; $17 = $$sroa$0100$0$copyload * 16.0; $18 = (~~(($17))); $19 = $$sroa$0$0$copyload * 16.0; $20 = (~~(($19))); $21 = $$sroa$7107$0$copyload * 16.0; $22 = (~~(($21))); $23 = $$sroa$7$0$copyload * 16.0; $24 = (~~(($23))); $25 = ($18|0)<($22|0); $26 = $25 ? $18 : $22; $27 = $$sroa$5$0$copyload * 16.0; $28 = 16.0 - $27; $29 = (~~(($28))); $30 = ($20|0)<($24|0); $31 = $30 ? $20 : $24; $32 = $$sroa$5103$0$copyload * 16.0; $33 = 16.0 - $32; $34 = (~~(($33))); $35 = ($26|0)<(12); $36 = ($31|0)>(12); $or$cond = $35 & $36; $spec$select = $or$cond ? 12 : $31; $37 = ($29|0)<(12); $38 = ($34|0)>(12); $or$cond3 = $38 & $37; $$0166 = $or$cond3 ? 12 : $34; $39 = (+($31|0)); $40 = $39 * 0.0625; $41 = $$sroa$0129$0$copyload + $40; $42 = (+($34|0)); $43 = $16 * $42; $44 = $$sroa$6132$0$copyload + $43; $45 = ((($5)) + 4|0); $46 = ((($5)) + 8|0); $47 = $16 * 4.0; $48 = $16 * 0.0099999997764825821; $$0165172 = 0; while(1) { $49 = (+($$0165172|0)); $50 = $49 * 0.25; $51 = $50 + 0.125; $52 = $50 + -0.5; $53 = $52 + 0.125; $$0164171 = 0; while(1) { $54 = (+($$0164171|0)); $55 = $54 * 0.25; $56 = $55 + 0.0625; $57 = $55 + 0.125; $$0163170 = 0; while(1) { $58 = (+($$0163170|0)); $59 = $58 * 0.25; $60 = $59 + 0.125; _Vec3_Create3($5,$51,$56,$60); $61 = +HEAPF32[$5>>2]; $62 = $61 < $$sroa$0100$0$copyload; $63 = $61 > $$sroa$0$0$copyload; $or$cond167 = $62 | $63; if (!($or$cond167)) { $64 = +HEAPF32[$45>>2]; $65 = $64 < $$sroa$5103$0$copyload; $66 = $64 > $$sroa$5$0$copyload; $or$cond168 = $65 | $66; if (!($or$cond168)) { $67 = +HEAPF32[$46>>2]; $68 = $67 < $$sroa$7107$0$copyload; $69 = $67 > $$sroa$7$0$copyload; $or$cond169 = $68 | $69; if (!($or$cond169)) { $70 = HEAP32[459659]|0; $71 = ($70|0)==(600); if ($71) { _Terrain_RemoveAt(0); } $72 = HEAP32[459659]|0; $73 = (($72) + 1)|0; HEAP32[459659] = $73; $74 = (+_Random_Float(1098536)); $75 = $74 * 0.40000000596046448; $76 = $75 + -0.20000000298023224; $77 = $53 + $76; $78 = (954496 + ($72<<6)|0); HEAPF32[$78>>2] = $77; $79 = (+_Random_Float(1098536)); $80 = $79 * 0.40000000596046448; $81 = $80 + -0.20000000298023224; $82 = $57 + $81; $83 = (((954496 + ($72<<6)|0)) + 4|0); HEAPF32[$83>>2] = $82; $84 = $59 + -0.5; $85 = $84 + 0.125; $86 = (+_Random_Float(1098536)); $87 = $86 * 0.40000000596046448; $88 = $87 + -0.20000000298023224; $89 = $85 + $88; $90 = (((954496 + ($72<<6)|0)) + 8|0); HEAPF32[$90>>2] = $89; $91 = (_Random_Range_1504($26,$spec$select)|0); $92 = (+($91|0)); $93 = $92 * 0.0625; $94 = $$sroa$0129$0$copyload + $93; $95 = (_Random_Range_1504($29,$$0166)|0); $96 = (+($95|0)); $97 = $16 * $96; $98 = $$sroa$6132$0$copyload + $97; $99 = $94 + 0.25; $100 = $47 + $98; $101 = $99 < $41; $102 = $101 ? $99 : $41; $103 = $102 + -6.2499998603016138E-4; $104 = $100 < $44; $105 = $104 ? $100 : $44; $106 = $105 - $48; $107 = (((954496 + ($72<<6)|0)) + 16|0); _Vec3_Add_1505($107,$4,$5); $108 = (((954496 + ($72<<6)|0)) + 28|0); ;HEAP32[$108>>2]=HEAP32[$107>>2]|0;HEAP32[$108+4>>2]=HEAP32[$107+4>>2]|0;HEAP32[$108+8>>2]=HEAP32[$107+8>>2]|0; $109 = (+_Random_Float(1098536)); $110 = $109 * 1.2000000476837158; $111 = $110 + 0.30000001192092896; $112 = (((954496 + ($72<<6)|0)) + 12|0); HEAPF32[$112>>2] = $111; $$sroa$0111$0$$sroa_idx112 = (((954496 + ($72<<6)|0)) + 44|0); HEAPF32[$$sroa$0111$0$$sroa_idx112>>2] = $94; $$sroa$6$0$$sroa_idx116 = (((954496 + ($72<<6)|0)) + 48|0); HEAPF32[$$sroa$6$0$$sroa_idx116>>2] = $98; $$sroa$8$0$$sroa_idx120 = (((954496 + ($72<<6)|0)) + 52|0); HEAPF32[$$sroa$8$0$$sroa_idx120>>2] = $103; $$sroa$12$0$$sroa_idx125 = (((954496 + ($72<<6)|0)) + 56|0); HEAPF32[$$sroa$12$0$$sroa_idx125>>2] = $106; $113 = (((954496 + ($72<<6)|0)) + 60|0); HEAP16[$113>>1] = $14; $114 = (((954496 + ($72<<6)|0)) + 62|0); HEAP16[$114>>1] = $1; $115 = (_Random_Next(1098536,30)|0); $116 = ($115|0)>(27); $117 = ($115|0)>(24); $118 = $117 ? 10.0 : 8.0; $119 = $116 ? 12.0 : $118; $120 = (((954496 + ($72<<6)|0)) + 40|0); HEAPF32[$120>>2] = $119; } } } $121 = (($$0163170) + 1)|0; $exitcond = ($121|0)==(4); if ($exitcond) { break; } else { $$0163170 = $121; } } $122 = (($$0164171) + 1)|0; $exitcond173 = ($122|0)==(4); if ($exitcond173) { break; } else { $$0164171 = $122; } } $123 = (($$0165172) + 1)|0; $exitcond174 = ($123|0)==(4); if ($exitcond174) { break; } else { $$0165172 = $123; } } STACKTOP = sp;return; } function _Vec3_Create3($0,$1,$2,$3) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, label = 0, sp = 0; sp = STACKTOP; HEAPF32[$0>>2] = $1; $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $2; $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $3; return; } function _Terrain_RemoveAt($0) { $0 = $0|0; var $$04 = 0, $$lcssa = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; $1 = HEAP32[459659]|0; $2 = (($1) + -1)|0; $3 = ($2|0)>($0|0); if (!($3)) { $$lcssa = $2; HEAP32[459659] = $$lcssa; return; } $4 = HEAP32[459659]|0; $5 = (($4) + -1)|0; $$04 = $0; while(1) { $6 = (954496 + ($$04<<6)|0); $7 = (($$04) + 1)|0; $8 = (954496 + ($7<<6)|0); dest=$6; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $9 = ($7|0)<($5|0); if ($9) { $$04 = $7; } else { $$lcssa = $5; break; } } HEAP32[459659] = $$lcssa; return; } function _Random_Range_1504($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (($1) - ($0))|0; $3 = (_Random_Next(1098536,$2)|0); $4 = (($3) + ($0))|0; return ($4|0); } function _Vec3_Add_1505($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 + $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 + $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 + $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _ParticlesPngProcess($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_Game_UpdateTexture(1838648,$0,$1,0)|0); return; } function _Terrain_Tick($0) { $0 = +$0; var $$06 = 0, $$1 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[459659]|0; $2 = ($1|0)>(0); if (!($2)) { return; } $$06 = 0; while(1) { $3 = (954496 + ($$06<<6)|0); $4 = (_TerrainParticle_Tick($3,$0)|0); $5 = ($4<<24>>24)==(0); if ($5) { $$1 = $$06; } else { $6 = (($$06) + -1)|0; _Terrain_RemoveAt($$06); $$1 = $6; } $7 = (($$1) + 1)|0; $8 = HEAP32[459659]|0; $9 = ($7|0)<($8|0); if ($9) { $$06 = $7; } else { break; } } return; } function _Rain_Tick($0) { $0 = +$0; var $$06 = 0, $$1 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[459658]|0; $2 = ($1|0)>(0); if (!($2)) { return; } $$06 = 0; while(1) { $3 = (1024096 + (($$06*44)|0)|0); $4 = (_RainParticle_Tick($3,$0)|0); $5 = ($4<<24>>24)==(0); if ($5) { $$1 = $$06; } else { $6 = (($$06) + -1)|0; _Rain_RemoveAt($$06); $$1 = $6; } $7 = (($$1) + 1)|0; $8 = HEAP32[459658]|0; $9 = ($7|0)<($8|0); if ($9) { $$06 = $7; } else { break; } } return; } function _Custom_Tick($0) { $0 = +$0; var $$06 = 0, $$1 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[459660]|0; $2 = ($1|0)>(0); if (!($2)) { return; } $$06 = 0; while(1) { $3 = (992896 + (($$06*52)|0)|0); $4 = (_CustomParticle_Tick($3,$0)|0); $5 = ($4<<24>>24)==(0); if ($5) { $$1 = $$06; } else { $6 = (($$06) + -1)|0; _Custom_RemoveAt($$06); $$1 = $6; } $7 = (($$1) + 1)|0; $8 = HEAP32[459660]|0; $9 = ($7|0)<($8|0); if ($9) { $$06 = $7; } else { break; } } return; } function _CustomParticle_Tick($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 44|0); $3 = HEAP32[$2>>2]|0; HEAP8[1972878] = 0; $4 = (((941184 + (($3*52)|0)|0)) + 22|0); $5 = HEAP8[$4>>0]|0; HEAP8[1972879] = $5; $6 = (((941184 + (($3*52)|0)|0)) + 40|0); $7 = +HEAPF32[$6>>2]; $8 = (_PhysicsTick($0,$7,19,$1)|0); $9 = ($8<<24>>24)==(0); if (!($9)) { $14 = 1; return ($14|0); } $10 = HEAP8[1972878]|0; $11 = ($10<<24>>24)==(0); if ($11) { $14 = 0; return ($14|0); } $12 = HEAP8[$4>>0]|0; $13 = $12 & 1; $14 = $13; return ($14|0); } function _Custom_RemoveAt($0) { $0 = $0|0; var $$04 = 0, $$lcssa = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; $1 = HEAP32[459660]|0; $2 = (($1) + -1)|0; $3 = ($2|0)>($0|0); if (!($3)) { $$lcssa = $2; HEAP32[459660] = $$lcssa; return; } $4 = HEAP32[459660]|0; $5 = (($4) + -1)|0; $$04 = $0; while(1) { $6 = (992896 + (($$04*52)|0)|0); $7 = (($$04) + 1)|0; $8 = (992896 + (($7*52)|0)|0); dest=$6; src=$8; stop=dest+52|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $9 = ($7|0)<($5|0); if ($9) { $$04 = $7; } else { $$lcssa = $5; break; } } HEAP32[459660] = $$lcssa; return; } function _CustomParticle_CanPass($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1120788 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(2); if ($4) { $5 = HEAP8[1972879]|0; $6 = $5 & 8; $7 = ($6<<24>>24)==(0); if ($7) { $$0 = 1; return ($$0|0); } } $8 = (1115412 + ($1)|0); $9 = HEAP8[$8>>0]|0; switch ($9<<24>>24) { case 2: { $10 = HEAP8[1972879]|0; $11 = $10 & 2; $12 = ($11<<24>>24)==(0); if (!($12)) { $$0 = 0; return ($$0|0); } break; } case 1: { $13 = HEAP8[1972879]|0; $14 = $13 & 4; $15 = ($14<<24>>24)==(0); if (!($15)) { $$0 = 0; return ($$0|0); } break; } default: { } } $$0 = 1; return ($$0|0); } function _PhysicsTick($0,$1,$2,$3) { $0 = $0|0; $1 = +$1; $2 = $2|0; $3 = +$3; var $$0 = 0, $$03639 = 0, $$03639$in = 0, $$141 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp; $5 = ((($0)) + 16|0); $6 = ((($0)) + 28|0); ;HEAP32[$5>>2]=HEAP32[$6>>2]|0;HEAP32[$5+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$5+8>>2]=HEAP32[$6+8>>2]|0; $7 = (_IntersectsBlock($0,$2)|0); $8 = ($7<<24>>24)==(0); if (!($8)) { $$0 = 1; STACKTOP = sp;return ($$0|0); } $9 = $3; $10 = $9 * $1; $11 = ((($0)) + 4|0); $12 = +HEAPF32[$11>>2]; $13 = $12 - $10; HEAPF32[$11>>2] = $13; $14 = ((($0)) + 32|0); $15 = +HEAPF32[$14>>2]; $16 = (_Math_Floor($15)|0); $17 = $9 * 3.0; _Vec3_Mul1_1507($4,$0,$17); _Vec3_Add_1505($6,$6,$4); $18 = +HEAPF32[$14>>2]; $19 = (_Math_Floor($18)|0); $20 = +HEAPF32[$11>>2]; $21 = $20 > 0.0; $22 = ($16|0)<($19|0); L4: do { if ($21) { if ($22) { $$03639$in = $16; while(1) { $$03639 = (($$03639$in) + 1)|0; $23 = (_ClipY($0,$$03639,0,$2)|0); $24 = ($23<<24>>24)!=(0); $25 = ($$03639|0)<($19|0); $or$cond = $24 & $25; if ($or$cond) { $$03639$in = $$03639; } else { break; } } } } else { if (!($22)) { $$141 = $16; while(1) { $28 = (_ClipY($0,$$141,1,$2)|0); $29 = ($28<<24>>24)==(0); if ($29) { break L4; } $26 = (($$141) + -1)|0; $27 = ($$141|0)>($19|0); if ($27) { $$141 = $26; } else { break; } } } } } while(0); $30 = ((($0)) + 12|0); $31 = +HEAPF32[$30>>2]; $32 = $31 - $9; HEAPF32[$30>>2] = $32; $33 = $32 < 0.0; $34 = $33&1; $$0 = $34; STACKTOP = sp;return ($$0|0); } function _IntersectsBlock($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, $or$cond = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 28|0); $3 = +HEAPF32[$2>>2]; $4 = (~~(($3))); $5 = ((($0)) + 32|0); $6 = +HEAPF32[$5>>2]; $7 = (~~(($6))); $8 = ((($0)) + 36|0); $9 = +HEAPF32[$8>>2]; $10 = (~~(($9))); $11 = (_GetBlock($4,$7,$10)|0); $12 = (_Math_Floor($6)|0); $13 = $11&65535; $14 = (((1125396 + (($13*12)|0)|0)) + 4|0); $15 = +HEAPF32[$14>>2]; $16 = +HEAPF32[$5>>2]; $17 = (_Math_Floor($16)|0); $18 = (((1134612 + (($13*12)|0)|0)) + 4|0); $19 = +HEAPF32[$18>>2]; $20 = (FUNCTION_TABLE_ii[$1 & 31]($11)|0); $21 = ($20<<24>>24)==(0); if (!($21)) { $31 = 0; return ($31|0); } $22 = (+($17|0)); $23 = $19 + $22; $24 = (+($12|0)); $25 = $15 + $24; $26 = +HEAPF32[$5>>2]; $27 = $26 >= $25; $28 = $26 < $23; $or$cond = $27 & $28; if (!($or$cond)) { $31 = 0; return ($31|0); } $29 = (_CollidesHor($2,$11)|0); $30 = ($29<<24>>24)!=(0); $phitmp = $30&1; $31 = $phitmp; return ($31|0); } function _Vec3_Mul1_1507($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = +$2; var $10 = 0.0, $11 = 0.0, $12 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = $3 * $2; HEAPF32[$0>>2] = $4; $5 = ((($1)) + 4|0); $6 = +HEAPF32[$5>>2]; $7 = $6 * $2; $8 = ((($0)) + 4|0); HEAPF32[$8>>2] = $7; $9 = ((($1)) + 8|0); $10 = +HEAPF32[$9>>2]; $11 = $10 * $2; $12 = ((($0)) + 8|0); HEAPF32[$12>>2] = $11; return; } function _ClipY($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$sroa$3$0$$sroa_idx7 = 0, $$sroa$3$0$copyload = 0.0, $$sroa$313$0$$sroa_idx14 = 0, $$sroa$313$0$copyload = 0.0, $$v = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0; var $24 = 0.0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0.0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($1|0)<(0); $5 = ((($0)) + 28|0); if ($4) { $6 = ((($0)) + 32|0); HEAPF32[$6>>2] = 0.0010000000474974513; $7 = ((($0)) + 20|0); HEAPF32[$7>>2] = 0.0010000000474974513; HEAPF32[$0>>2] = 0.0; $8 = ((($0)) + 4|0); HEAPF32[$8>>2] = 0.0; $9 = ((($0)) + 8|0); HEAPF32[$9>>2] = 0.0; HEAP8[1972878] = 1; $$0 = 0; return ($$0|0); } $10 = +HEAPF32[$5>>2]; $11 = (~~(($10))); $12 = ((($0)) + 36|0); $13 = +HEAPF32[$12>>2]; $14 = (~~(($13))); $15 = (_GetBlock($11,$1,$14)|0); $16 = (FUNCTION_TABLE_ii[$3 & 31]($15)|0); $17 = ($16<<24>>24)==(0); if (!($17)) { $$0 = 1; return ($$0|0); } $18 = $15&65535; $$sroa$313$0$$sroa_idx14 = (((1125396 + (($18*12)|0)|0)) + 4|0); $$sroa$313$0$copyload = +HEAPF32[$$sroa$313$0$$sroa_idx14>>2]; $$sroa$3$0$$sroa_idx7 = (((1134612 + (($18*12)|0)|0)) + 4|0); $$sroa$3$0$copyload = +HEAPF32[$$sroa$3$0$$sroa_idx7>>2]; $19 = (+($1|0)); $20 = ($2<<24>>24)!=(0); $21 = $20 ? $$sroa$3$0$copyload : $$sroa$313$0$copyload; $22 = $21 + $19; $23 = ((($0)) + 32|0); $24 = +HEAPF32[$23>>2]; $25 = $24 < $22; $26 = $24 > $22; $$v = $20 ? $25 : $26; if (!($$v)) { $$0 = 1; return ($$0|0); } $27 = (_CollidesHor($5,$15)|0); $28 = ($27<<24>>24)==(0); if ($28) { $$0 = 1; return ($$0|0); } $29 = $20 ? 0.0010000000474974513 : -0.0010000000474974513; $30 = $29 + $22; $31 = ((($0)) + 20|0); HEAPF32[$31>>2] = $30; HEAPF32[$23>>2] = $30; HEAPF32[$0>>2] = 0.0; $32 = ((($0)) + 4|0); HEAPF32[$32>>2] = 0.0; $33 = ((($0)) + 8|0); HEAPF32[$33>>2] = 0.0; HEAP8[1972878] = 1; $$0 = 0; return ($$0|0); } function _GetBlock($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_World_Contains_1508($0,$1,$2)|0); $4 = ($3<<24>>24)==(0); if (!($4)) { $5 = (_World_GetBlock_1509($0,$1,$2)|0); $$0 = $5; return ($$0|0); } $6 = HEAP32[(1972148)>>2]|0; $7 = ($6|0)>($1|0); if (!($7)) { $$0 = 0; return ($$0|0); } $8 = HEAP32[(1972152)>>2]|0; $9 = (($8) + ($6))|0; $10 = ($9|0)>($1|0); if ($10) { $12 = HEAP16[(1972146)>>1]|0; $$0 = $12; return ($$0|0); } else { $11 = HEAP16[986072]|0; $$0 = $11; return ($$0|0); } } function _RainParticle_CanPass($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1120788 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = $3 | 1; $5 = ($4<<24>>24)==(5); $6 = $5&1; return ($6|0); } function _TerrainParticle_CanPass($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $phitmp = 0, $switch = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&65535; $2 = (1120788 + ($1)|0); $3 = HEAP8[$2>>0]|0; $4 = $3 & -2; $switch = ($4<<24>>24)==(4); if ($switch) { $8 = 1; return ($8|0); } $5 = (1106964 + ($1)|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)!=(0); $phitmp = $7&1; $8 = $phitmp; return ($8|0); } function _CollidesHor($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0, $3 = 0; var $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $2 = sp + 24|0; $3 = sp + 12|0; $4 = sp; $5 = +HEAPF32[$0>>2]; $6 = (_Math_Floor($5)|0); $7 = (+($6|0)); $8 = ((($0)) + 8|0); $9 = +HEAPF32[$8>>2]; $10 = (_Math_Floor($9)|0); $11 = (+($10|0)); _Vec3_Create3($2,$7,0.0,$11); $12 = $1&65535; $13 = (1125396 + (($12*12)|0)|0); _Vec3_Add_1505($3,$13,$2); $14 = (1134612 + (($12*12)|0)|0); _Vec3_Add_1505($4,$14,$2); $15 = +HEAPF32[$0>>2]; $16 = +HEAPF32[$3>>2]; $17 = !($15 >= $16); if ($17) { $27 = 0; STACKTOP = sp;return ($27|0); } $18 = +HEAPF32[$8>>2]; $19 = ((($3)) + 8|0); $20 = +HEAPF32[$19>>2]; $21 = !($18 >= $20); if ($21) { $27 = 0; STACKTOP = sp;return ($27|0); } $22 = +HEAPF32[$4>>2]; $23 = $15 < $22; if (!($23)) { $27 = 0; STACKTOP = sp;return ($27|0); } $24 = ((($4)) + 8|0); $25 = +HEAPF32[$24>>2]; $26 = $18 < $25; $phitmp = $26&1; $27 = $phitmp; STACKTOP = sp;return ($27|0); } function _World_Contains_1508($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1103564)>>2]|0; $4 = ($3>>>0)>($0>>>0); $5 = HEAP32[(1103568)>>2]|0; $6 = ($5>>>0)>($1>>>0); $or$cond = $4 & $6; $7 = HEAP32[(1103572)>>2]|0; $8 = ($7>>>0)>($2>>>0); $narrow = $or$cond & $8; $9 = $narrow&1; return ($9|0); } function _World_GetBlock_1509($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $3 = HEAP32[(1103572)>>2]|0; $4 = Math_imul($3, $1)|0; $5 = (($4) + ($2))|0; $6 = HEAP32[(1103564)>>2]|0; $7 = Math_imul($5, $6)|0; $8 = (($7) + ($0))|0; $9 = HEAP32[275888]|0; $10 = (($9) + ($8)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = HEAP32[(1103556)>>2]|0; $14 = (($13) + ($8)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 8; $18 = $17 | $12; $19 = HEAP32[(1103608)>>2]|0; $20 = $18 & $19; $21 = $20&65535; return ($21|0); } function _RainParticle_Tick($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[1972878] = 0; $2 = (_PhysicsTick($0,3.5,20,$1)|0); $3 = HEAP8[1972878]|0; $4 = $3 | $2; $5 = ($4<<24>>24)!=(0); $6 = $5&1; return ($6|0); } function _Rain_RemoveAt($0) { $0 = $0|0; var $$04 = 0, $$lcssa = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; $1 = HEAP32[459658]|0; $2 = (($1) + -1)|0; $3 = ($2|0)>($0|0); if (!($3)) { $$lcssa = $2; HEAP32[459658] = $$lcssa; return; } $4 = HEAP32[459658]|0; $5 = (($4) + -1)|0; $$04 = $0; while(1) { $6 = (1024096 + (($$04*44)|0)|0); $7 = (($$04) + 1)|0; $8 = (1024096 + (($7*44)|0)|0); dest=$6; src=$8; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $9 = ($7|0)<($5|0); if ($9) { $$04 = $7; } else { $$lcssa = $5; break; } } HEAP32[459658] = $$lcssa; return; } function _TerrainParticle_Tick($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 62|0); $3 = HEAP16[$2>>1]|0; $4 = $3&65535; $5 = (1763604 + ($4<<2)|0); $6 = +HEAPF32[$5>>2]; $7 = (_PhysicsTick($0,$6,21,$1)|0); return ($7|0); } function _Particle_DoRender($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$sroa$0$0$copyload = 0.0, $$sroa$13$0$$sroa_idx45 = 0, $$sroa$13$0$copyload = 0.0, $$sroa$7$0$$sroa_idx39 = 0, $$sroa$7$0$copyload = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0; var $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0.0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0.0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0, $61 = 0, $62 = 0.0; var $63 = 0, $64 = 0.0, $65 = 0, $66 = 0.0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $5 = +HEAPF32[$0>>2]; $6 = $5 * 0.5; $7 = ((($0)) + 4|0); $8 = +HEAPF32[$7>>2]; $9 = $8 * 0.5; $$sroa$0$0$copyload = +HEAPF32[$1>>2]; $$sroa$7$0$$sroa_idx39 = ((($1)) + 4|0); $$sroa$7$0$copyload = +HEAPF32[$$sroa$7$0$$sroa_idx39>>2]; $$sroa$13$0$$sroa_idx45 = ((($1)) + 8|0); $$sroa$13$0$copyload = +HEAPF32[$$sroa$13$0$$sroa_idx45>>2]; $10 = $9 + $$sroa$7$0$copyload; $11 = +HEAPF32[(1803132)>>2]; $12 = $6 * $11; $13 = +HEAPF32[(1803148)>>2]; $14 = $6 * $13; $15 = +HEAPF32[(1803164)>>2]; $16 = $6 * $15; $17 = +HEAPF32[(1803136)>>2]; $18 = $9 * $17; $19 = +HEAPF32[(1803152)>>2]; $20 = $9 * $19; $21 = +HEAPF32[(1803168)>>2]; $22 = $9 * $21; $23 = $$sroa$0$0$copyload - $12; $24 = $23 - $18; HEAPF32[$4>>2] = $24; $25 = $10 - $14; $26 = $25 - $20; $27 = ((($4)) + 4|0); HEAPF32[$27>>2] = $26; $28 = $$sroa$13$0$copyload - $16; $29 = $28 - $22; $30 = ((($4)) + 8|0); HEAPF32[$30>>2] = $29; $31 = ((($4)) + 12|0); HEAP32[$31>>2] = $3; $32 = HEAP32[$2>>2]|0; $33 = ((($4)) + 16|0); HEAP32[$33>>2] = $32; $34 = ((($2)) + 12|0); $35 = HEAP32[$34>>2]|0; $36 = ((($4)) + 20|0); HEAP32[$36>>2] = $35; $37 = $23 + $18; $38 = ((($4)) + 24|0); HEAPF32[$38>>2] = $37; $39 = $25 + $20; $40 = ((($4)) + 28|0); HEAPF32[$40>>2] = $39; $41 = $28 + $22; $42 = ((($4)) + 32|0); HEAPF32[$42>>2] = $41; $43 = ((($4)) + 36|0); HEAP32[$43>>2] = $3; $44 = ((($4)) + 40|0); HEAP32[$44>>2] = $32; $45 = ((($2)) + 4|0); $46 = HEAP32[$45>>2]|0; $47 = ((($4)) + 44|0); HEAP32[$47>>2] = $46; $48 = $$sroa$0$0$copyload + $12; $49 = $48 + $18; $50 = ((($4)) + 48|0); HEAPF32[$50>>2] = $49; $51 = $10 + $14; $52 = $51 + $20; $53 = ((($4)) + 52|0); HEAPF32[$53>>2] = $52; $54 = $$sroa$13$0$copyload + $16; $55 = $54 + $22; $56 = ((($4)) + 56|0); HEAPF32[$56>>2] = $55; $57 = ((($4)) + 60|0); HEAP32[$57>>2] = $3; $58 = ((($2)) + 8|0); $59 = HEAP32[$58>>2]|0; $60 = ((($4)) + 64|0); HEAP32[$60>>2] = $59; $61 = ((($4)) + 68|0); HEAP32[$61>>2] = $46; $62 = $48 - $18; $63 = ((($4)) + 72|0); HEAPF32[$63>>2] = $62; $64 = $51 - $20; $65 = ((($4)) + 76|0); HEAPF32[$65>>2] = $64; $66 = $54 - $22; $67 = ((($4)) + 80|0); HEAPF32[$67>>2] = $66; $68 = ((($4)) + 84|0); HEAP32[$68>>2] = $3; $69 = ((($4)) + 88|0); HEAP32[$69>>2] = $59; $70 = ((($4)) + 92|0); HEAP32[$70>>2] = $35; return; } function _Particles_Render($0) { $0 = +$0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[459659]|0; $2 = HEAP32[459658]|0; $3 = $2 | $1; $4 = HEAP32[459660]|0; $5 = $3 | $4; $6 = ($5|0)==(0); $7 = HEAP8[(1803128)>>0]|0; $8 = ($7<<24>>24)!=(0); $or$cond5 = $6 | $8; if ($or$cond5) { return; } _Gfx_SetAlphaTest(1); _Gfx_SetVertexFormat(1); _Terrain_Render($0); _Rain_Render($0); _Custom_Render($0); _Gfx_SetAlphaTest(0); return; } function _Terrain_Render($0) { $0 = +$0; var $$03034 = 0, $$033 = 0, $$1 = 0, $$13132 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[459659]|0; $2 = ($1|0)==(0); if ($2) { return; } $3 = HEAP32[459661]|0; $4 = $1 << 2; $5 = (_Gfx_LockDynamicVb($3,1,$4)|0); _Terrain_Update1DCounts(); $6 = HEAP32[459659]|0; $7 = ($6|0)>(0); if ($7) { $$03034 = 0; while(1) { $8 = (954496 + ($$03034<<6)|0); $9 = (((954496 + ($$03034<<6)|0)) + 60|0); $10 = HEAP16[$9>>1]|0; $11 = $10&65535; $12 = HEAP32[(1949304)>>2]|0; $13 = ($12)?($11 >>> $12):($11); $14 = (1050496 + ($13<<1)|0); $15 = HEAP16[$14>>1]|0; $16 = $15&65535; $17 = (($5) + (($16*24)|0)|0); _TerrainParticle_Render($8,$0,$17); $18 = HEAP16[$14>>1]|0; $19 = $18&65535; $20 = (($19) + 4)|0; $21 = $20&65535; HEAP16[$14>>1] = $21; $22 = (($$03034) + 1)|0; $23 = HEAP32[459659]|0; $24 = ($22|0)<($23|0); if ($24) { $$03034 = $22; } else { break; } } } $25 = HEAP32[459661]|0; _Gfx_UnlockDynamicVb($25); $26 = HEAP32[487323]|0; $27 = ($26|0)>(0); if (!($27)) { return; } $$033 = 0;$$13132 = 0; while(1) { $28 = (1051520 + ($$13132<<1)|0); $29 = HEAP16[$28>>1]|0; $30 = $29&65535; $31 = ($29<<16>>16)==(0); if ($31) { $$1 = $$033; } else { $32 = (($$033) + ($30))|0; $33 = (1949312 + ($$13132<<2)|0); $34 = HEAP32[$33>>2]|0; _Gfx_BindTexture($34); _Gfx_DrawVb_IndexedTris_Range($30,$$033); $$1 = $32; } $35 = (($$13132) + 1)|0; $36 = HEAP32[487323]|0; $37 = ($35|0)<($36|0); if ($37) { $$033 = $$1;$$13132 = $35; } else { break; } } return; } function _Rain_Render($0) { $0 = +$0; var $$010 = 0, $$089 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[459658]|0; $2 = ($1|0)==(0); if ($2) { return; } $3 = HEAP32[459661]|0; $4 = $1 << 2; $5 = (_Gfx_LockDynamicVb($3,1,$4)|0); $6 = HEAP32[459658]|0; $7 = ($6|0)>(0); if ($7) { $$010 = 0;$$089 = $5; while(1) { $8 = (1024096 + (($$010*44)|0)|0); _RainParticle_Render($8,$0,$$089); $9 = ((($$089)) + 96|0); $10 = (($$010) + 1)|0; $11 = HEAP32[459658]|0; $12 = ($10|0)<($11|0); if ($12) { $$010 = $10;$$089 = $9; } else { break; } } } $13 = HEAP32[459662]|0; _Gfx_BindTexture($13); $14 = HEAP32[459661]|0; _Gfx_UnlockDynamicVb($14); $15 = HEAP32[459658]|0; $16 = $15 << 2; _Gfx_DrawVb_IndexedTris($16); return; } function _Custom_Render($0) { $0 = +$0; var $$010 = 0, $$089 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[459660]|0; $2 = ($1|0)==(0); if ($2) { return; } $3 = HEAP32[459661]|0; $4 = $1 << 2; $5 = (_Gfx_LockDynamicVb($3,1,$4)|0); $6 = HEAP32[459660]|0; $7 = ($6|0)>(0); if ($7) { $$010 = 0;$$089 = $5; while(1) { $8 = (992896 + (($$010*52)|0)|0); _CustomParticle_Render($8,$0,$$089); $9 = ((($$089)) + 96|0); $10 = (($$010) + 1)|0; $11 = HEAP32[459660]|0; $12 = ($10|0)<($11|0); if ($12) { $$010 = $10;$$089 = $9; } else { break; } } } $13 = HEAP32[459662]|0; _Gfx_BindTexture($13); $14 = HEAP32[459661]|0; _Gfx_UnlockDynamicVb($14); $15 = HEAP32[459660]|0; $16 = $15 << 2; _Gfx_DrawVb_IndexedTris($16); return; } function _CustomParticle_Render($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0, $29 = 0; var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; var $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $3 = sp + 24|0; $4 = sp + 16|0; $5 = sp; $6 = ((($0)) + 44|0); $7 = HEAP32[$6>>2]|0; $8 = (941184 + (($7*52)|0)|0); ;HEAP32[$5>>2]=HEAP32[$8>>2]|0;HEAP32[$5+4>>2]=HEAP32[$8+4>>2]|0;HEAP32[$5+8>>2]=HEAP32[$8+8>>2]|0;HEAP32[$5+12>>2]=HEAP32[$8+12>>2]|0; $9 = ((($0)) + 48|0); $10 = +HEAPF32[$9>>2]; $11 = ((($0)) + 12|0); $12 = +HEAPF32[$11>>2]; $13 = $10 - $12; $14 = (((941184 + (($7*52)|0)|0)) + 20|0); $15 = HEAP8[$14>>0]|0; $16 = (+($15&255)); $17 = $13 / $10; $18 = $17 * $16; $19 = (_Math_Floor($18)|0); $20 = (+($19|0)); $21 = ((($5)) + 8|0); $22 = +HEAPF32[$21>>2]; $23 = +HEAPF32[$5>>2]; $24 = $22 - $23; $25 = $24 * $20; $26 = $23 + $25; HEAPF32[$5>>2] = $26; $27 = $22 + $25; HEAPF32[$21>>2] = $27; $28 = ((($0)) + 16|0); $29 = ((($0)) + 28|0); _Vec3_Lerp($3,$28,$29,$1); $30 = ((($0)) + 40|0); $31 = HEAP32[$30>>2]|0; HEAP32[$4>>2] = $31; $32 = ((($4)) + 4|0); HEAP32[$32>>2] = $31; $33 = +HEAPF32[$3>>2]; $34 = (_Math_Floor($33)|0); $35 = ((($3)) + 4|0); $36 = +HEAPF32[$35>>2]; $37 = (_Math_Floor($36)|0); $38 = ((($3)) + 8|0); $39 = +HEAPF32[$38>>2]; $40 = (_Math_Floor($39)|0); $41 = (((941184 + (($7*52)|0)|0)) + 23|0); $42 = HEAP8[$41>>0]|0; $43 = ($42<<24>>24)==(0); if (!($43)) { $47 = -1; $45 = (((941184 + (($7*52)|0)|0)) + 16|0); $46 = HEAP32[$45>>2]|0; $48 = (_PackedCol_Tint($47,$46)|0); _Particle_DoRender($4,$3,$5,$48,$2); STACKTOP = sp;return; } $44 = (_ClassicLighting_Color($34,$37,$40)|0); $47 = $44; $45 = (((941184 + (($7*52)|0)|0)) + 16|0); $46 = HEAP32[$45>>2]|0; $48 = (_PackedCol_Tint($47,$46)|0); _Particle_DoRender($4,$3,$5,$48,$2); STACKTOP = sp;return; } function _RainParticle_Render($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = $2|0; var $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $3 = sp + 8|0; $4 = sp; $5 = ((($0)) + 16|0); $6 = ((($0)) + 28|0); _Vec3_Lerp($3,$5,$6,$1); $7 = ((($0)) + 40|0); $8 = +HEAPF32[$7>>2]; $9 = $8 * 0.015625; HEAPF32[$4>>2] = $9; $10 = ((($4)) + 4|0); HEAPF32[$10>>2] = $9; $11 = +HEAPF32[$3>>2]; $12 = (_Math_Floor($11)|0); $13 = ((($3)) + 4|0); $14 = +HEAPF32[$13>>2]; $15 = (_Math_Floor($14)|0); $16 = ((($3)) + 8|0); $17 = +HEAPF32[$16>>2]; $18 = (_Math_Floor($17)|0); $19 = (_ClassicLighting_Color($12,$15,$18)|0); _Particle_DoRender($4,$3,20876,$19,$2); STACKTOP = sp;return; } function _Terrain_Update1DCounts() { var $$117 = 0, $$216 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $load_initial = 0, $store_forwarded = 0, label = 0, sp = 0; sp = STACKTOP; _memset((1051520|0),0,1024)|0; _memset((1050496|0),0,1024)|0; $0 = HEAP32[459659]|0; $1 = ($0|0)>(0); if ($1) { $2 = HEAP32[(1949304)>>2]|0; $3 = HEAP32[459659]|0; $$117 = 0; while(1) { $4 = (((954496 + ($$117<<6)|0)) + 60|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; $7 = ($2)?($6 >>> $2):($6); $8 = (1051520 + ($7<<1)|0); $9 = HEAP16[$8>>1]|0; $10 = $9&65535; $11 = (($10) + 4)|0; $12 = $11&65535; HEAP16[$8>>1] = $12; $13 = (($$117) + 1)|0; $14 = ($13|0)<($3|0); if ($14) { $$117 = $13; } else { break; } } } $15 = HEAP32[487323]|0; $16 = ($15|0)>(1); if (!($16)) { return; } $17 = HEAP32[487323]|0; $load_initial = HEAP16[525248]|0; $$216 = 1;$store_forwarded = $load_initial; while(1) { $18 = (($$216) + -1)|0; $19 = $store_forwarded&65535; $20 = (1051520 + ($18<<1)|0); $21 = HEAP16[$20>>1]|0; $22 = $21&65535; $23 = (($22) + ($19))|0; $24 = $23&65535; $25 = (1050496 + ($$216<<1)|0); HEAP16[$25>>1] = $24; $26 = (($$216) + 1)|0; $27 = ($26|0)<($17|0); if ($27) { $$216 = $26;$store_forwarded = $24; } else { break; } } return; } function _TerrainParticle_Render($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = $2|0; var $$0 = 0, $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $3 = sp + 8|0; $4 = sp; $5 = ((($0)) + 16|0); $6 = ((($0)) + 28|0); _Vec3_Lerp($3,$5,$6,$1); $7 = ((($0)) + 40|0); $8 = +HEAPF32[$7>>2]; $9 = $8 * 0.015625; HEAPF32[$4>>2] = $9; $10 = ((($4)) + 4|0); HEAPF32[$10>>2] = $9; $11 = ((($0)) + 62|0); $12 = HEAP16[$11>>1]|0; $13 = $12&65535; $14 = (1108500 + ($13)|0); $15 = HEAP8[$14>>0]|0; $16 = ($15<<24>>24)==(0); if ($16) { $17 = +HEAPF32[$3>>2]; $18 = (_Math_Floor($17)|0); $19 = ((($3)) + 4|0); $20 = +HEAPF32[$19>>2]; $21 = (_Math_Floor($20)|0); $22 = ((($3)) + 8|0); $23 = +HEAPF32[$22>>2]; $24 = (_Math_Floor($23)|0); $25 = (_ClassicLighting_Color_XSide($18,$21,$24)|0); $$0 = $25; } else { $$0 = -1; } $26 = HEAP16[$11>>1]|0; $27 = $26&65535; $28 = (1123092 + ($27)|0); $29 = HEAP8[$28>>0]|0; $30 = ($29<<24>>24)==(0); if ($30) { $$1 = $$0; $34 = ((($0)) + 44|0); _Particle_DoRender($4,$3,$34,$$1,$2); STACKTOP = sp;return; } $31 = (1109268 + ($27<<2)|0); $32 = HEAP32[$31>>2]|0; $33 = (_PackedCol_Tint($$0,$32)|0); $$1 = $33; $34 = ((($0)) + 44|0); _Particle_DoRender($4,$3,$34,$$1,$2); STACKTOP = sp;return; } function _Particles_RainSnowEffect($0,$1,$2) { $0 = +$0; $1 = +$1; $2 = +$2; var $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0.0, $27 = 0.0, $28 = 0, $29 = 0; var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0, $45 = 0.0, $46 = 0.0, $47 = 0.0; var $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; var $66 = 0, $67 = 0, $68 = 0.0, $69 = 0.0, $7 = 0.0, $70 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[459658]|0; $4 = ($3|0)==(600); if ($4) { _Rain_RemoveAt(0); } $5 = HEAP32[459658]|0; $6 = (($5) + 1)|0; HEAP32[459658] = $6; $7 = (+_Random_Float(1098536)); $8 = $7 * 0.80000001192092896; $9 = $8 + -0.40000000596046448; $10 = (1024096 + (($5*44)|0)|0); HEAPF32[$10>>2] = $9; $11 = (+_Random_Float(1098536)); $12 = $11 * 0.80000001192092896; $13 = $12 + -0.40000000596046448; $14 = (((1024096 + (($5*44)|0)|0)) + 8|0); HEAPF32[$14>>2] = $13; $15 = (+_Random_Float(1098536)); $16 = $15 + 0.40000000596046448; $17 = (((1024096 + (($5*44)|0)|0)) + 4|0); HEAPF32[$17>>2] = $16; $18 = (+_Random_Float(1098536)); $19 = $18 + $0; $20 = (((1024096 + (($5*44)|0)|0)) + 16|0); HEAPF32[$20>>2] = $19; $21 = (+_Random_Float(1098536)); $22 = $21 * 0.10000000149011612; $23 = $22 + $1; $24 = $23 + 0.0099999997764825821; $25 = (((1024096 + (($5*44)|0)|0)) + 20|0); HEAPF32[$25>>2] = $24; $26 = (+_Random_Float(1098536)); $27 = $26 + $2; $28 = (((1024096 + (($5*44)|0)|0)) + 24|0); HEAPF32[$28>>2] = $27; $29 = (((1024096 + (($5*44)|0)|0)) + 28|0); ;HEAP32[$29>>2]=HEAP32[$20>>2]|0;HEAP32[$29+4>>2]=HEAP32[$20+4>>2]|0;HEAP32[$29+8>>2]=HEAP32[$20+8>>2]|0; $30 = (((1024096 + (($5*44)|0)|0)) + 12|0); HEAPF32[$30>>2] = 40.0; $31 = (_Random_Next(1098536,30)|0); $32 = ($31|0)>(27); $33 = ($31|0)>(24); $34 = $33 ? 4.0 : 3.0; $35 = $32 ? 2.0 : $34; $36 = (((1024096 + (($5*44)|0)|0)) + 40|0); HEAPF32[$36>>2] = $35; $37 = HEAP32[459658]|0; $38 = ($37|0)==(600); if ($38) { _Rain_RemoveAt(0); } $39 = HEAP32[459658]|0; $40 = (($39) + 1)|0; HEAP32[459658] = $40; $41 = (+_Random_Float(1098536)); $42 = $41 * 0.80000001192092896; $43 = $42 + -0.40000000596046448; $44 = (1024096 + (($39*44)|0)|0); HEAPF32[$44>>2] = $43; $45 = (+_Random_Float(1098536)); $46 = $45 * 0.80000001192092896; $47 = $46 + -0.40000000596046448; $48 = (((1024096 + (($39*44)|0)|0)) + 8|0); HEAPF32[$48>>2] = $47; $49 = (+_Random_Float(1098536)); $50 = $49 + 0.40000000596046448; $51 = (((1024096 + (($39*44)|0)|0)) + 4|0); HEAPF32[$51>>2] = $50; $52 = (+_Random_Float(1098536)); $53 = $52 + $0; $54 = (((1024096 + (($39*44)|0)|0)) + 16|0); HEAPF32[$54>>2] = $53; $55 = (+_Random_Float(1098536)); $56 = $55 * 0.10000000149011612; $57 = $56 + $1; $58 = $57 + 0.0099999997764825821; $59 = (((1024096 + (($39*44)|0)|0)) + 20|0); HEAPF32[$59>>2] = $58; $60 = (+_Random_Float(1098536)); $61 = $60 + $2; $62 = (((1024096 + (($39*44)|0)|0)) + 24|0); HEAPF32[$62>>2] = $61; $63 = (((1024096 + (($39*44)|0)|0)) + 28|0); ;HEAP32[$63>>2]=HEAP32[$54>>2]|0;HEAP32[$63+4>>2]=HEAP32[$54+4>>2]|0;HEAP32[$63+8>>2]=HEAP32[$54+8>>2]|0; $64 = (((1024096 + (($39*44)|0)|0)) + 12|0); HEAPF32[$64>>2] = 40.0; $65 = (_Random_Next(1098536,30)|0); $66 = ($65|0)>(27); $67 = ($65|0)>(24); $68 = $67 ? 4.0 : 3.0; $69 = $66 ? 2.0 : $68; $70 = (((1024096 + (($39*44)|0)|0)) + 40|0); HEAPF32[$70>>2] = $69; return; } function _Particles_CustomEffect($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; $4 = +$4; $5 = +$5; $6 = +$6; var $$051 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0.0; var $49 = 0.0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0.0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0, $68 = 0; var $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0, $78 = 0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0; var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $7 = sp + 24|0; $8 = sp + 12|0; $9 = sp; $10 = (((941184 + (($0*52)|0)|0)) + 21|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = ($11<<24>>24)==(0); if ($13) { STACKTOP = sp;return; } $14 = ((($7)) + 4|0); $15 = ((($7)) + 8|0); $16 = (((941184 + (($0*52)|0)|0)) + 32|0); $17 = ((($9)) + 4|0); $18 = ((($9)) + 8|0); $19 = (((941184 + (($0*52)|0)|0)) + 36|0); $20 = ((($8)) + 4|0); $21 = ((($8)) + 8|0); $22 = (((941184 + (($0*52)|0)|0)) + 44|0); $23 = (((941184 + (($0*52)|0)|0)) + 48|0); $24 = (((941184 + (($0*52)|0)|0)) + 24|0); $25 = (((941184 + (($0*52)|0)|0)) + 28|0); $26 = (((941184 + (($0*52)|0)|0)) + 22|0); $$051 = 0; while(1) { $27 = HEAP32[459660]|0; $28 = ($27|0)==(600); if ($28) { _Custom_RemoveAt(0); } $29 = HEAP32[459660]|0; $30 = (($29) + 1)|0; HEAP32[459660] = $30; $31 = (992896 + (($29*52)|0)|0); $32 = (((992896 + (($29*52)|0)|0)) + 44|0); HEAP32[$32>>2] = $0; $33 = (+_Random_Float(1098536)); $34 = $33 + -0.5; HEAPF32[$7>>2] = $34; $35 = (+_Random_Float(1098536)); $36 = $35 + -0.5; HEAPF32[$14>>2] = $36; $37 = (+_Random_Float(1098536)); $38 = $37 + -0.5; HEAPF32[$15>>2] = $38; _Vec3_Normalise($7); $39 = (+_Random_Float(1098536)); $40 = $39; $41 = (+_Math_Log($40)); $42 = $41 / 3.0; $43 = (+_Math_Exp($42)); $44 = $43; $45 = +HEAPF32[$16>>2]; $46 = $45 * $44; $47 = +HEAPF32[$7>>2]; $48 = $47 * $46; $49 = $48 + $1; $50 = (((992896 + (($29*52)|0)|0)) + 16|0); HEAPF32[$50>>2] = $49; $51 = +HEAPF32[$14>>2]; $52 = $46 * $51; $53 = $52 + $2; $54 = (((992896 + (($29*52)|0)|0)) + 20|0); HEAPF32[$54>>2] = $53; $55 = +HEAPF32[$15>>2]; $56 = $46 * $55; $57 = $56 + $3; $58 = (((992896 + (($29*52)|0)|0)) + 24|0); HEAPF32[$58>>2] = $57; HEAPF32[$9>>2] = $4; HEAPF32[$17>>2] = $5; HEAPF32[$18>>2] = $6; _Vec3_Sub_1516($8,$50,$9); _Vec3_Normalise($8); $59 = +HEAPF32[$8>>2]; $60 = +HEAPF32[$19>>2]; $61 = $59 * $60; HEAPF32[$31>>2] = $61; $62 = +HEAPF32[$20>>2]; $63 = $60 * $62; $64 = (((992896 + (($29*52)|0)|0)) + 4|0); HEAPF32[$64>>2] = $63; $65 = +HEAPF32[$21>>2]; $66 = $60 * $65; $67 = (((992896 + (($29*52)|0)|0)) + 8|0); HEAPF32[$67>>2] = $66; $68 = (((992896 + (($29*52)|0)|0)) + 28|0); ;HEAP32[$68>>2]=HEAP32[$50>>2]|0;HEAP32[$68+4>>2]=HEAP32[$50+4>>2]|0;HEAP32[$68+8>>2]=HEAP32[$50+8>>2]|0; $69 = +HEAPF32[$22>>2]; $70 = +HEAPF32[$23>>2]; $71 = $69 * $70; $72 = (+_Random_Float(1098536)); $73 = $72 + -0.5; $74 = $73 * 2.0; $75 = $71 * $74; $76 = $69 + $75; $77 = (((992896 + (($29*52)|0)|0)) + 12|0); HEAPF32[$77>>2] = $76; $78 = (((992896 + (($29*52)|0)|0)) + 48|0); HEAPF32[$78>>2] = $76; $79 = +HEAPF32[$24>>2]; $80 = +HEAPF32[$25>>2]; $81 = $79 * $80; $82 = (+_Random_Float(1098536)); $83 = $82 + -0.5; $84 = $83 * 2.0; $85 = $81 * $84; $86 = $79 + $85; $87 = (((992896 + (($29*52)|0)|0)) + 40|0); HEAPF32[$87>>2] = $86; $88 = HEAP8[$26>>0]|0; HEAP8[1972879] = $88; $89 = (_IntersectsBlock($31,19)|0); $90 = ($89<<24>>24)==(0); if (!($90)) { $91 = HEAP32[459660]|0; $92 = (($91) + -1)|0; HEAP32[459660] = $92; } $93 = (($$051) + 1)|0; $exitcond = ($93|0)==($12|0); if ($exitcond) { break; } else { $$051 = $93; } } STACKTOP = sp;return; } function _Vec3_Sub_1516($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 - $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 - $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 - $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _AABB_Make($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0.0; var $3 = 0.0, $30 = 0.0, $31 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $4 * 0.5; $6 = $3 - $5; HEAPF32[$0>>2] = $6; $7 = ((($1)) + 4|0); $8 = HEAP32[$7>>2]|0; $9 = ((($0)) + 4|0); HEAP32[$9>>2] = $8; $10 = ((($1)) + 8|0); $11 = +HEAPF32[$10>>2]; $12 = ((($2)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = $13 * 0.5; $15 = $11 - $14; $16 = ((($0)) + 8|0); HEAPF32[$16>>2] = $15; $17 = +HEAPF32[$1>>2]; $18 = +HEAPF32[$2>>2]; $19 = $18 * 0.5; $20 = $17 + $19; $21 = ((($0)) + 12|0); HEAPF32[$21>>2] = $20; $22 = +HEAPF32[$7>>2]; $23 = ((($2)) + 4|0); $24 = +HEAPF32[$23>>2]; $25 = $22 + $24; $26 = ((($0)) + 16|0); HEAPF32[$26>>2] = $25; $27 = +HEAPF32[$10>>2]; $28 = +HEAPF32[$12>>2]; $29 = $28 * 0.5; $30 = $27 + $29; $31 = ((($0)) + 20|0); HEAPF32[$31>>2] = $30; return; } function _AABB_Offset($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; _Vec3_Add_1523($0,$1,$2); $3 = ((($0)) + 12|0); $4 = ((($1)) + 12|0); _Vec3_Add_1523($3,$4,$2); return; } function _Vec3_Add_1523($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 + $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 + $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 + $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _AABB_Intersects($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0.0; var $29 = 0, $3 = 0.0, $30 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 12|0); $3 = +HEAPF32[$2>>2]; $4 = +HEAPF32[$1>>2]; $5 = !($3 >= $4); if ($5) { $30 = 0; return ($30|0); } $6 = +HEAPF32[$0>>2]; $7 = ((($1)) + 12|0); $8 = +HEAPF32[$7>>2]; $9 = !($6 <= $8); if ($9) { $30 = 0; return ($30|0); } $10 = ((($0)) + 16|0); $11 = +HEAPF32[$10>>2]; $12 = ((($1)) + 4|0); $13 = +HEAPF32[$12>>2]; $14 = !($11 >= $13); if ($14) { $30 = 0; return ($30|0); } $15 = ((($0)) + 4|0); $16 = +HEAPF32[$15>>2]; $17 = ((($1)) + 16|0); $18 = +HEAPF32[$17>>2]; $19 = !($16 <= $18); if ($19) { $30 = 0; return ($30|0); } $20 = ((($0)) + 20|0); $21 = +HEAPF32[$20>>2]; $22 = ((($1)) + 8|0); $23 = +HEAPF32[$22>>2]; $24 = !($21 >= $23); if ($24) { $30 = 0; return ($30|0); } $25 = ((($0)) + 8|0); $26 = +HEAPF32[$25>>2]; $27 = ((($1)) + 20|0); $28 = +HEAPF32[$27>>2]; $29 = $26 <= $28; $phitmp = $29&1; $30 = $phitmp; return ($30|0); } function _AABB_ContainsPoint($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0.0; var $7 = 0, $8 = 0.0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[$1>>2]; $3 = +HEAPF32[$0>>2]; $4 = !($2 >= $3); if ($4) { $24 = 0; return ($24|0); } $5 = ((($1)) + 4|0); $6 = +HEAPF32[$5>>2]; $7 = ((($0)) + 4|0); $8 = +HEAPF32[$7>>2]; $9 = !($6 >= $8); if ($9) { $24 = 0; return ($24|0); } $10 = ((($1)) + 8|0); $11 = +HEAPF32[$10>>2]; $12 = ((($0)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = !($11 >= $13); if ($14) { $24 = 0; return ($24|0); } $15 = ((($0)) + 12|0); $16 = +HEAPF32[$15>>2]; $17 = !($2 <= $16); if ($17) { $24 = 0; return ($24|0); } $18 = ((($0)) + 16|0); $19 = +HEAPF32[$18>>2]; $20 = !($6 <= $19); if ($20) { $24 = 0; return ($24|0); } $21 = ((($0)) + 20|0); $22 = +HEAPF32[$21>>2]; $23 = $11 <= $22; $phitmp = $23&1; $24 = $phitmp; return ($24|0); } function _Intersection_RayIntersectsRotatedBox($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $10 = 0, $11 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 112|0; $$byval_copy5 = sp + 96|0; $$byval_copy4 = sp + 84|0; $$byval_copy3 = sp + 72|0; $$byval_copy2 = sp + 60|0; $5 = sp + 36|0; $6 = sp; $7 = sp + 48|0; $8 = sp + 24|0; $9 = ((($2)) + 4|0); _Vec3_Sub_1530($5,$0,$9); ;HEAP32[$$byval_copy5>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$5+8>>2]|0; _Intersection_InverseRotate($7,$$byval_copy5,$2); ;HEAP32[$5>>2]=HEAP32[$7>>2]|0;HEAP32[$5+4>>2]=HEAP32[$7+4>>2]|0;HEAP32[$5+8>>2]=HEAP32[$7+8>>2]|0; _Vec3_Add_1523($0,$5,$9); ;HEAP32[$$byval_copy5>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$1+8>>2]|0; _Intersection_InverseRotate($8,$$byval_copy5,$2); ;HEAP32[$1>>2]=HEAP32[$8>>2]|0;HEAP32[$1+4>>2]=HEAP32[$8+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[$8+8>>2]|0; _Entity_GetPickingBounds($2,$6); $10 = ((($6)) + 12|0); ;HEAP32[$$byval_copy2>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$0+8>>2]|0; ;HEAP32[$$byval_copy3>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$1+8>>2]|0; ;HEAP32[$$byval_copy4>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$6+8>>2]|0; ;HEAP32[$$byval_copy5>>2]=HEAP32[$10>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$10+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$10+8>>2]|0; $11 = (_Intersection_RayIntersectsBox($$byval_copy2,$$byval_copy3,$$byval_copy4,$$byval_copy5,$3,$4)|0); STACKTOP = sp;return ($11|0); } function _Vec3_Sub_1530($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 - $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 - $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 - $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _Intersection_InverseRotate($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$byval_copy2 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $$byval_copy2 = sp + 36|0; $3 = sp + 24|0; $4 = sp + 12|0; $5 = sp; $6 = ((($2)) + 28|0); $7 = +HEAPF32[$6>>2]; $8 = $7 * -0.01745329238474369; ;HEAP32[$$byval_copy2>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$1+8>>2]|0; _Vec3_RotateY($3,$$byval_copy2,$8); ;HEAP32[$1>>2]=HEAP32[$3>>2]|0;HEAP32[$1+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[$3+8>>2]|0; $9 = ((($2)) + 32|0); $10 = +HEAPF32[$9>>2]; $11 = $10 * -0.01745329238474369; ;HEAP32[$$byval_copy2>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$3+8>>2]|0; _Vec3_RotateZ($4,$$byval_copy2,$11); ;HEAP32[$1>>2]=HEAP32[$4>>2]|0;HEAP32[$1+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[$4+8>>2]|0; $12 = ((($2)) + 24|0); $13 = +HEAPF32[$12>>2]; $14 = $13 * -0.01745329238474369; ;HEAP32[$$byval_copy2>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$4+8>>2]|0; _Vec3_RotateX($5,$$byval_copy2,$14); ;HEAP32[$0>>2]=HEAP32[$5>>2]|0;HEAP32[$0+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[$5+8>>2]|0; STACKTOP = sp;return; } function _Intersection_RayIntersectsBox($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$0 = 0, $$059 = 0.0, $$060 = 0.0, $$063 = 0.0, $$064 = 0.0, $$065 = 0.0, $$066 = 0.0, $$1 = 0.0, $$161 = 0.0, $$2 = 0.0, $$262 = 0.0, $$pn67 = 0.0, $$pn68 = 0.0, $$pn70 = 0.0, $$sink = 0, $$sink73 = 0.0, $$sink76 = 0.0, $$sink78 = 0, $$sink80 = 0.0, $$sink82 = 0; var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0.0; var $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0; var $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, $or$cond = 0, $or$cond72 = 0, label = 0, sp = 0; sp = STACKTOP; HEAPF32[$4>>2] = 0.0; HEAPF32[$5>>2] = 0.0; $6 = +HEAPF32[$1>>2]; $7 = 1.0 / $6; $8 = !($7 >= 0.0); if ($8) { $12 = +HEAPF32[$3>>2]; $13 = +HEAPF32[$0>>2]; $14 = $12 - $13; $$pn67 = $14;$$sink = $2;$$sink73 = $13; } else { $9 = +HEAPF32[$2>>2]; $10 = +HEAPF32[$0>>2]; $11 = $9 - $10; $$pn67 = $11;$$sink = $3;$$sink73 = $10; } $15 = +HEAPF32[$$sink>>2]; $16 = $15 - $$sink73; $$059 = $7 * $$pn67; $$060 = $7 * $16; $17 = ((($1)) + 4|0); $18 = +HEAPF32[$17>>2]; $19 = 1.0 / $18; $20 = !($19 >= 0.0); if ($20) { $26 = ((($3)) + 4|0); $27 = +HEAPF32[$26>>2]; $28 = ((($0)) + 4|0); $29 = +HEAPF32[$28>>2]; $30 = $27 - $29; $$pn68 = $30;$$sink76 = $29;$$sink78 = $2; } else { $21 = ((($2)) + 4|0); $22 = +HEAPF32[$21>>2]; $23 = ((($0)) + 4|0); $24 = +HEAPF32[$23>>2]; $25 = $22 - $24; $$pn68 = $25;$$sink76 = $24;$$sink78 = $3; } $31 = ((($$sink78)) + 4|0); $32 = +HEAPF32[$31>>2]; $33 = $32 - $$sink76; $$065 = $19 * $33; $$066 = $19 * $$pn68; $34 = $$059 > $$065; $35 = $$066 > $$060; $or$cond = $35 | $34; if ($or$cond) { $$0 = 0; return ($$0|0); } $36 = $$066 > $$059; $$1 = $36 ? $$066 : $$059; $37 = $$065 < $$060; $$161 = $37 ? $$065 : $$060; $38 = ((($1)) + 8|0); $39 = +HEAPF32[$38>>2]; $40 = 1.0 / $39; $41 = !($40 >= 0.0); if ($41) { $47 = ((($3)) + 8|0); $48 = +HEAPF32[$47>>2]; $49 = ((($0)) + 8|0); $50 = +HEAPF32[$49>>2]; $51 = $48 - $50; $$pn70 = $51;$$sink80 = $50;$$sink82 = $2; } else { $42 = ((($2)) + 8|0); $43 = +HEAPF32[$42>>2]; $44 = ((($0)) + 8|0); $45 = +HEAPF32[$44>>2]; $46 = $43 - $45; $$pn70 = $46;$$sink80 = $45;$$sink82 = $3; } $52 = ((($$sink82)) + 8|0); $53 = +HEAPF32[$52>>2]; $54 = $53 - $$sink80; $$063 = $40 * $54; $$064 = $40 * $$pn70; $55 = $$1 > $$063; $56 = $$064 > $$161; $or$cond72 = $56 | $55; $57 = $$064 > $$1; $$2 = $57 ? $$064 : $$1; if ($or$cond72) { $$0 = 0; return ($$0|0); } $58 = $$2 >= 0.0; $59 = $58&1; $60 = $$063 < $$161; $$262 = $60 ? $$063 : $$161; HEAPF32[$4>>2] = $$2; HEAPF32[$5>>2] = $$262; $$0 = $59; return ($$0|0); } function _Searcher_FindReachableBlocks($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$07993 = 0, $$08085 = 0, $$081$lcssa = 0, $$08192 = 0, $$087 = 0, $$1$lcssa = 0, $$186 = 0, $$2$lcssa = 0, $$284 = 0, $$3 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0.0; var $109 = 0.0, $11 = 0.0, $110 = 0, $111 = 0, $112 = 0.0, $113 = 0, $114 = 0.0, $115 = 0, $116 = 0.0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0; var $127 = 0, $128 = 0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0.0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0; var $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0.0, $150 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0; var $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0, $45 = 0.0, $46 = 0; var $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; var $83 = 0.0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0.0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0.0, $96 = 0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $or$cond = 0, $or$cond3 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $3 = sp + 64|0; $4 = sp + 52|0; $5 = sp + 40|0; $6 = sp + 16|0; $7 = sp + 8|0; $8 = sp + 4|0; $9 = sp; $10 = ((($0)) + 36|0); ;HEAP32[$3>>2]=HEAP32[$10>>2]|0;HEAP32[$3+4>>2]=HEAP32[$10+4>>2]|0;HEAP32[$3+8>>2]=HEAP32[$10+8>>2]|0; _Entity_GetBounds($0,$1); $11 = +HEAPF32[$1>>2]; $12 = +HEAPF32[$3>>2]; $13 = $12 < 0.0; $14 = $13 ? $12 : 0.0; $15 = $11 + $14; HEAPF32[$2>>2] = $15; $16 = ((($1)) + 4|0); $17 = +HEAPF32[$16>>2]; $18 = ((($3)) + 4|0); $19 = +HEAPF32[$18>>2]; $20 = $19 < 0.0; $21 = $20 ? $19 : 0.0; $22 = $17 + $21; $23 = ((($2)) + 4|0); HEAPF32[$23>>2] = $22; $24 = ((($1)) + 8|0); $25 = +HEAPF32[$24>>2]; $26 = ((($3)) + 8|0); $27 = +HEAPF32[$26>>2]; $28 = $27 < 0.0; $29 = $28 ? $27 : 0.0; $30 = $25 + $29; $31 = ((($2)) + 8|0); HEAPF32[$31>>2] = $30; $32 = ((($1)) + 12|0); $33 = +HEAPF32[$32>>2]; $34 = $12 > 0.0; $35 = $34 ? $12 : 0.0; $36 = $35 + $33; $37 = ((($2)) + 12|0); HEAPF32[$37>>2] = $36; $38 = ((($1)) + 16|0); $39 = +HEAPF32[$38>>2]; $40 = $19 > 0.0; $41 = $40 ? $19 : 0.0; $42 = $41 + $39; $43 = ((($2)) + 16|0); HEAPF32[$43>>2] = $42; $44 = ((($1)) + 20|0); $45 = +HEAPF32[$44>>2]; $46 = $27 > 0.0; $47 = $46 ? $27 : 0.0; $48 = $47 + $45; $49 = ((($2)) + 20|0); HEAPF32[$49>>2] = $48; _IVec3_Floor($4,$2); _IVec3_Floor($5,$37); $50 = HEAP32[$5>>2]|0; $51 = HEAP32[$4>>2]|0; $52 = (($50) + 1)|0; $53 = (($52) - ($51))|0; $54 = ((($5)) + 4|0); $55 = HEAP32[$54>>2]|0; $56 = ((($4)) + 4|0); $57 = HEAP32[$56>>2]|0; $58 = (($55) + 1)|0; $59 = (($58) - ($57))|0; $60 = Math_imul($59, $53)|0; $61 = ((($5)) + 8|0); $62 = HEAP32[$61>>2]|0; $63 = ((($4)) + 8|0); $64 = HEAP32[$63>>2]|0; $65 = (($62) + 1)|0; $66 = (($65) - ($64))|0; $67 = Math_imul($60, $66)|0; $68 = HEAP32[5224]|0; $69 = ($67>>>0)>($68>>>0); if ($69) { _Searcher_Free(); HEAP32[5224] = $67; $70 = (_Mem_Alloc($67,16,41146)|0); HEAP32[5223] = $70; } $71 = HEAP32[5223]|0; $72 = HEAP32[$56>>2]|0; $73 = HEAP32[$54>>2]|0; $74 = ($72|0)>($73|0); if ($74) { $$081$lcssa = $71; } else { $75 = ((($6)) + 4|0); $76 = ((($6)) + 8|0); $77 = ((($6)) + 12|0); $78 = ((($6)) + 16|0); $79 = ((($6)) + 20|0); $$07993 = $72;$$08192 = $71; while(1) { $80 = HEAP32[$63>>2]|0; $81 = HEAP32[$61>>2]|0; $82 = ($80|0)>($81|0); if ($82) { $$1$lcssa = $$08192; } else { $83 = (+($$07993|0)); $84 = $$07993 << 4; $$087 = $80;$$186 = $$08192; while(1) { $85 = HEAP32[$4>>2]|0; $86 = HEAP32[$5>>2]|0; $87 = ($85|0)>($86|0); if ($87) { $$2$lcssa = $$186; } else { $88 = (+($$087|0)); $89 = $$087 << 3; $$08085 = $85;$$284 = $$186; while(1) { $90 = (_World_GetPhysicsBlock($$08085,$$07993,$$087)|0); $91 = $90&65535; $92 = (1115412 + ($91)|0); $93 = HEAP8[$92>>0]|0; $94 = ($93<<24>>24)==(2); if ($94) { $95 = (+($$08085|0)); $96 = (1125396 + (($91*12)|0)|0); ;HEAP32[$6>>2]=HEAP32[$96>>2]|0;HEAP32[$6+4>>2]=HEAP32[$96+4>>2]|0;HEAP32[$6+8>>2]=HEAP32[$96+8>>2]|0; $97 = +HEAPF32[$6>>2]; $98 = $97 + $95; HEAPF32[$6>>2] = $98; $99 = +HEAPF32[$75>>2]; $100 = $99 + $83; HEAPF32[$75>>2] = $100; $101 = +HEAPF32[$76>>2]; $102 = $101 + $88; HEAPF32[$76>>2] = $102; $103 = (1134612 + (($91*12)|0)|0); ;HEAP32[$77>>2]=HEAP32[$103>>2]|0;HEAP32[$77+4>>2]=HEAP32[$103+4>>2]|0;HEAP32[$77+8>>2]=HEAP32[$103+8>>2]|0; $104 = +HEAPF32[$77>>2]; $105 = $104 + $95; HEAPF32[$77>>2] = $105; $106 = +HEAPF32[$78>>2]; $107 = $106 + $83; HEAPF32[$78>>2] = $107; $108 = +HEAPF32[$79>>2]; $109 = $108 + $88; HEAPF32[$79>>2] = $109; $110 = (_AABB_Intersects($2,$6)|0); $111 = ($110<<24>>24)==(0); if ($111) { $$3 = $$284; } else { _Searcher_CalcTime($3,$1,$6,$7,$8,$9); $112 = +HEAPF32[$7>>2]; $113 = $112 > 1.0; $114 = +HEAPF32[$8>>2]; $115 = $114 > 1.0; $or$cond = $113 | $115; $116 = +HEAPF32[$9>>2]; $117 = $116 > 1.0; $or$cond3 = $or$cond | $117; if ($or$cond3) { $$3 = $$284; } else { $118 = $$08085 << 3; $119 = $91 & 7; $120 = $119 | $118; HEAP32[$$284>>2] = $120; $121 = (3)?($91 >>> 3):($91); $122 = $121 & 15; $123 = $122 | $84; $124 = ((($$284)) + 4|0); HEAP32[$124>>2] = $123; $125 = (7)?($91 >>> 7):($91); $126 = $125 & 7; $127 = $126 | $89; $128 = ((($$284)) + 8|0); HEAP32[$128>>2] = $127; $129 = $112 * $112; $130 = $114 * $114; $131 = $129 + $130; $132 = $116 * $116; $133 = $131 + $132; $134 = ((($$284)) + 12|0); HEAPF32[$134>>2] = $133; $135 = ((($$284)) + 16|0); $$3 = $135; } } } else { $$3 = $$284; } $136 = (($$08085) + 1)|0; $137 = HEAP32[$5>>2]|0; $138 = ($$08085|0)<($137|0); if ($138) { $$08085 = $136;$$284 = $$3; } else { $$2$lcssa = $$3; break; } } } $139 = (($$087) + 1)|0; $140 = HEAP32[$61>>2]|0; $141 = ($$087|0)<($140|0); if ($141) { $$087 = $139;$$186 = $$2$lcssa; } else { $$1$lcssa = $$2$lcssa; break; } } } $142 = (($$07993) + 1)|0; $143 = HEAP32[$54>>2]|0; $144 = ($$07993|0)<($143|0); if ($144) { $$07993 = $142;$$08192 = $$1$lcssa; } else { $$081$lcssa = $$1$lcssa; break; } } } $145 = HEAP32[5223]|0; $146 = $$081$lcssa; $147 = (($146) - ($145))|0; $148 = (4)?($147 >> 4):($147); $149 = ($147|0)==(0); if ($149) { STACKTOP = sp;return ($148|0); } $150 = (($148) + -1)|0; _Searcher_QuickSort(0,$150); STACKTOP = sp;return ($148|0); } function _Searcher_Free() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[5223]|0; $1 = ($0|0)==(1052544|0); if (!($1)) { _Mem_Free($0); } HEAP32[5223] = 1052544; HEAP32[5224] = 64; return; } function _Searcher_CalcTime($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$sink = 0, $$sink49 = 0, $$sink54 = 0, $$sink56 = 0, $$sink60 = 0, $$sink62 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0; var $24 = 0.0, $25 = 0, $26 = 0.0, $27 = 0.0, $28 = 0, $29 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0.0; var $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0, $6 = 0.0, $60 = 0, $61 = 0.0, $62 = 0; var $63 = 0.0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0, $68 = 0.0, $69 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $6 = +HEAPF32[$0>>2]; $7 = $6 > 0.0; $$sink = $7 ? $2 : $1; $$sink49 = $7 ? $1 : $2; $8 = +HEAPF32[$$sink>>2]; $9 = ((($$sink49)) + 12|0); $10 = +HEAPF32[$9>>2]; $11 = $8 - $10; $12 = ((($0)) + 4|0); $13 = +HEAPF32[$12>>2]; $14 = $13 > 0.0; $$sink56 = $14 ? $2 : $1; $$sink54 = $14 ? $1 : $2; $15 = ((($$sink56)) + 4|0); $16 = +HEAPF32[$15>>2]; $17 = ((($$sink54)) + 16|0); $18 = +HEAPF32[$17>>2]; $19 = $16 - $18; $20 = ((($0)) + 8|0); $21 = +HEAPF32[$20>>2]; $22 = $21 > 0.0; $$sink62 = $22 ? $2 : $1; $$sink60 = $22 ? $1 : $2; $23 = ((($$sink62)) + 8|0); $24 = +HEAPF32[$23>>2]; $25 = ((($$sink60)) + 20|0); $26 = +HEAPF32[$25>>2]; $27 = $24 - $26; $28 = $6 == 0.0; $29 = $11 / $6; $30 = (+Math_abs((+$29))); $31 = $28 ? inf : $30; HEAPF32[$3>>2] = $31; $32 = +HEAPF32[$12>>2]; $33 = $32 == 0.0; $34 = $19 / $32; $35 = (+Math_abs((+$34))); $36 = $33 ? inf : $35; HEAPF32[$4>>2] = $36; $37 = +HEAPF32[$20>>2]; $38 = $37 == 0.0; $39 = $27 / $37; $40 = (+Math_abs((+$39))); $41 = $38 ? inf : $40; HEAPF32[$5>>2] = $41; $42 = ((($1)) + 12|0); $43 = +HEAPF32[$42>>2]; $44 = +HEAPF32[$2>>2]; $45 = !($43 >= $44); if (!($45)) { $46 = +HEAPF32[$1>>2]; $47 = ((($2)) + 12|0); $48 = +HEAPF32[$47>>2]; $49 = !($46 <= $48); if (!($49)) { HEAPF32[$3>>2] = 0.0; } } $50 = ((($1)) + 16|0); $51 = +HEAPF32[$50>>2]; $52 = ((($2)) + 4|0); $53 = +HEAPF32[$52>>2]; $54 = !($51 >= $53); if (!($54)) { $55 = ((($1)) + 4|0); $56 = +HEAPF32[$55>>2]; $57 = ((($2)) + 16|0); $58 = +HEAPF32[$57>>2]; $59 = !($56 <= $58); if (!($59)) { HEAPF32[$4>>2] = 0.0; } } $60 = ((($1)) + 20|0); $61 = +HEAPF32[$60>>2]; $62 = ((($2)) + 8|0); $63 = +HEAPF32[$62>>2]; $64 = !($61 >= $63); if ($64) { return; } $65 = ((($1)) + 8|0); $66 = +HEAPF32[$65>>2]; $67 = ((($2)) + 20|0); $68 = +HEAPF32[$67>>2]; $69 = !($66 <= $68); if ($69) { return; } HEAPF32[$5>>2] = 0.0; return; } function _Searcher_QuickSort($0,$1) { $0 = $0|0; $1 = $1|0; var $$051$lcssa = 0, $$05161 = 0, $$053$lcssa = 0, $$05360 = 0, $$05663 = 0, $$064 = 0, $$1 = 0, $$152 = 0, $$154 = 0, $$157 = 0, $$2 = 0, $$255 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0; var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = HEAP32[5223]|0; $4 = ($0|0)<($1|0); if (!($4)) { STACKTOP = sp;return; } $$05663 = $1;$$064 = $0; while(1) { $5 = (($$064) + ($$05663))|0; $6 = (1)?($5 >> 1):($5); $7 = (((($3) + ($6<<4)|0)) + 12|0); $8 = +HEAPF32[$7>>2]; $9 = ($$064|0)>($$05663|0); if ($9) { $$051$lcssa = $$05663;$$053$lcssa = $$064; } else { $$05161 = $$05663;$$05360 = $$064; while(1) { $$154 = $$05360; while(1) { $10 = (((($3) + ($$154<<4)|0)) + 12|0); $11 = +HEAPF32[$10>>2]; $12 = $8 > $11; $13 = (($$154) + 1)|0; if ($12) { $$154 = $13; } else { break; } } $$152 = $$05161; while(1) { $14 = (((($3) + ($$152<<4)|0)) + 12|0); $15 = +HEAPF32[$14>>2]; $16 = $8 < $15; $17 = (($$152) + -1)|0; if ($16) { $$152 = $17; } else { break; } } $18 = (($3) + ($$154<<4)|0); $19 = (($3) + ($$152<<4)|0); $20 = ($$154|0)>($$152|0); if ($20) { $$2 = $$152;$$255 = $$154; } else { $21 = (($$152) + -1)|0; $22 = (($$154) + 1)|0; ;HEAP32[$2>>2]=HEAP32[$18>>2]|0;HEAP32[$2+4>>2]=HEAP32[$18+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[$18+8>>2]|0;HEAP32[$2+12>>2]=HEAP32[$18+12>>2]|0; ;HEAP32[$18>>2]=HEAP32[$19>>2]|0;HEAP32[$18+4>>2]=HEAP32[$19+4>>2]|0;HEAP32[$18+8>>2]=HEAP32[$19+8>>2]|0;HEAP32[$18+12>>2]=HEAP32[$19+12>>2]|0; ;HEAP32[$19>>2]=HEAP32[$2>>2]|0;HEAP32[$19+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$19+8>>2]=HEAP32[$2+8>>2]|0;HEAP32[$19+12>>2]=HEAP32[$2+12>>2]|0; $$2 = $21;$$255 = $22; } $23 = ($$255|0)>($$2|0); if ($23) { $$051$lcssa = $$2;$$053$lcssa = $$255; break; } else { $$05161 = $$2;$$05360 = $$255; } } } $24 = (($$051$lcssa) - ($$064))|0; $25 = (($$05663) - ($$053$lcssa))|0; $26 = ($24|0)>($25|0); if ($26) { $28 = ($$05663|0)>($$053$lcssa|0); if ($28) { _Searcher_QuickSort($$053$lcssa,$$05663); $$1 = $$064;$$157 = $$051$lcssa; } else { $$1 = $$064;$$157 = $$051$lcssa; } } else { $27 = ($$051$lcssa|0)>($$064|0); if ($27) { _Searcher_QuickSort($$064,$$051$lcssa); $$1 = $$053$lcssa;$$157 = $$05663; } else { $$1 = $$053$lcssa;$$157 = $$05663; } } $29 = ($$1|0)<($$157|0); if ($29) { $$05663 = $$157;$$064 = $$1; } else { break; } } STACKTOP = sp;return; } function _OnInit_1538() { var label = 0, sp = 0; sp = STACKTOP; _OnContextRecreated_1541(0); _Event_Register((1793528),0,383); _Event_Register((1793788),0,384); return; } function _OnFree_1539() { var label = 0, sp = 0; sp = STACKTOP; _OnContextLost_1540(0); return; } function _OnContextLost_1540($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteVb(1838652); return; } function _OnContextRecreated_1541($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_RecreateDynamicVb(1838652,0,96); return; } function _PickedPosRenderer_Render($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1803128)>>0]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { return; } _Gfx_SetAlphaBlending(1); _Gfx_SetDepthWrite(0); _Gfx_SetVertexFormat(0); $4 = ($1<<24>>24)==(0); if ($4) { $5 = HEAP32[459663]|0; _Gfx_BindVb($5); } else { _BuildMesh($0); } _Gfx_DrawVb_IndexedTris(96); _Gfx_SetDepthWrite(1); _Gfx_SetAlphaBlending(0); return; } function _BuildMesh($0) { $0 = $0|0; var $$0 = 0.0, $$035 = 0.0, $$03740 = 0, $$03839 = 0, $$1 = 0.0, $$136 = 0.0, $$2 = 0.0, $$3 = 0.0, $$4 = 0.0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; var $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $1 = sp + 48|0; $2 = sp; $3 = ((($0)) + 36|0); _Vec3_Sub_1544($1,$3); $4 = (+_Vec3_LengthSquared_1545($1)); $5 = $4 < 16.0; $$035 = $5 ? 0.0062500000931322575 : 0.0099999997764825821; $6 = $4 < 4.0; $$136 = $6 ? 0.004999999888241291 : $$035; $7 = $4 < 1024.0; $$0 = $7 ? 0.03125 : 0.0625; $8 = $4 < 256.0; $$1 = $8 ? 0.015625 : $$0; $9 = $4 < 64.0; $$2 = $9 ? 0.010416666977107525 : $$1; $$3 = $5 ? 0.0078125 : $$2; $$4 = $6 ? 0.0052083334885537624 : $$3; $10 = - $$136; _Vec3_Add1_1546($2,$3,$10); $11 = ((($2)) + 12|0); _Vec3_Add1_1546($11,$2,$$4); $12 = ((($2)) + 36|0); $13 = ((($0)) + 48|0); _Vec3_Add1_1546($12,$13,$$136); $14 = ((($2)) + 24|0); $15 = - $$4; _Vec3_Add1_1546($14,$12,$15); $16 = HEAP32[459663]|0; $17 = (_Gfx_LockDynamicVb($16,0,96)|0); $$03740 = $17;$$03839 = 0; while(1) { $18 = (8976 + ($$03839)|0); $19 = HEAP8[$18>>0]|0; $20 = $19&255; $21 = (($2) + (($20*12)|0)|0); $22 = HEAP32[$21>>2]|0; HEAP32[$$03740>>2] = $22; $23 = (($$03839) + 1)|0; $24 = (8976 + ($23)|0); $25 = HEAP8[$24>>0]|0; $26 = $25&255; $27 = (((($2) + (($26*12)|0)|0)) + 4|0); $28 = HEAP32[$27>>2]|0; $29 = ((($$03740)) + 4|0); HEAP32[$29>>2] = $28; $30 = (($$03839) + 2)|0; $31 = (8976 + ($30)|0); $32 = HEAP8[$31>>0]|0; $33 = $32&255; $34 = (((($2) + (($33*12)|0)|0)) + 8|0); $35 = HEAP32[$34>>2]|0; $36 = ((($$03740)) + 8|0); HEAP32[$36>>2] = $35; $37 = ((($$03740)) + 12|0); HEAP32[$37>>2] = 1711276032; $38 = (($$03839) + 3)|0; $39 = ((($$03740)) + 16|0); $40 = ($38>>>0)<(288); if ($40) { $$03740 = $39;$$03839 = $38; } else { break; } } $41 = HEAP32[459663]|0; _Gfx_UnlockDynamicVb($41); STACKTOP = sp;return; } function _Vec3_Sub_1544($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[(1771048)>>2]; $3 = +HEAPF32[$1>>2]; $4 = $2 - $3; HEAPF32[$0>>2] = $4; $5 = +HEAPF32[(1771052)>>2]; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = $5 - $7; $9 = ((($0)) + 4|0); HEAPF32[$9>>2] = $8; $10 = +HEAPF32[(1771056)>>2]; $11 = ((($1)) + 8|0); $12 = +HEAPF32[$11>>2]; $13 = $10 - $12; $14 = ((($0)) + 8|0); HEAPF32[$14>>2] = $13; return; } function _Vec3_LengthSquared_1545($0) { $0 = $0|0; var $1 = 0.0, $10 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[$0>>2]; $2 = $1 * $1; $3 = ((($0)) + 4|0); $4 = +HEAPF32[$3>>2]; $5 = $4 * $4; $6 = $2 + $5; $7 = ((($0)) + 8|0); $8 = +HEAPF32[$7>>2]; $9 = $8 * $8; $10 = $6 + $9; return (+$10); } function _Vec3_Add1_1546($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = +$2; var $10 = 0.0, $11 = 0.0, $12 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = $3 + $2; HEAPF32[$0>>2] = $4; $5 = ((($1)) + 4|0); $6 = +HEAPF32[$5>>2]; $7 = $6 + $2; $8 = ((($0)) + 4|0); HEAPF32[$8>>2] = $7; $9 = ((($1)) + 8|0); $10 = +HEAPF32[$9>>2]; $11 = $10 + $2; $12 = ((($0)) + 8|0); HEAPF32[$12>>2] = $11; return; } function _RayTracer_SetInvalid($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; ;HEAP32[$0>>2]=HEAP32[20924>>2]|0;HEAP32[$0+4>>2]=HEAP32[20924+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[20924+8>>2]|0; $1 = ((($0)) + 112|0); ;HEAP32[$1>>2]=HEAP32[20924>>2]|0;HEAP32[$1+4>>2]=HEAP32[20924+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[20924+8>>2]|0; $2 = ((($0)) + 124|0); HEAP8[$2>>0] = 0; $3 = ((($0)) + 60|0); HEAP16[$3>>1] = 0; $4 = ((($0)) + 125|0); HEAP8[$4>>0] = 6; return; } function _RayTracer_Init($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0, $45 = 0.0, $46 = 0, $47 = 0.0; var $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0, $7 = 0, $8 = 0; var $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 12|0); ;HEAP32[$3>>2]=HEAP32[$1>>2]|0;HEAP32[$3+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$3+8>>2]=HEAP32[$1+8>>2]|0; $4 = ((($0)) + 24|0); ;HEAP32[$4>>2]=HEAP32[$2>>2]|0;HEAP32[$4+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$4+8>>2]=HEAP32[$2+8>>2]|0; _IVec3_Floor($0,$1); $5 = +HEAPF32[$2>>2]; $6 = (_Math_Sign($5)|0); $7 = ((($0)) + 64|0); HEAP32[$7>>2] = $6; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = (_Math_Sign($9)|0); $11 = ((($0)) + 68|0); HEAP32[$11>>2] = $10; $12 = ((($2)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = (_Math_Sign($13)|0); $15 = ((($0)) + 72|0); HEAP32[$15>>2] = $14; $16 = HEAP32[$0>>2]|0; $17 = HEAP32[$7>>2]|0; $18 = ($17|0)>(0); $19 = $18&1; $20 = (($16) + ($19))|0; $21 = ((($0)) + 4|0); $22 = HEAP32[$21>>2]|0; $23 = HEAP32[$11>>2]|0; $24 = ($23|0)>(0); $25 = $24&1; $26 = (($22) + ($25))|0; $27 = ((($0)) + 8|0); $28 = HEAP32[$27>>2]|0; $29 = ($14|0)>(0); $30 = $29&1; $31 = (($28) + ($30))|0; $32 = (+($20|0)); $33 = +HEAPF32[$1>>2]; $34 = $32 - $33; $35 = +HEAPF32[$2>>2]; $36 = (+_RayTracer_Div($34,$35)); $37 = ((($0)) + 76|0); HEAPF32[$37>>2] = $36; $38 = (+($26|0)); $39 = ((($1)) + 4|0); $40 = +HEAPF32[$39>>2]; $41 = $38 - $40; $42 = +HEAPF32[$8>>2]; $43 = (+_RayTracer_Div($41,$42)); $44 = ((($0)) + 80|0); HEAPF32[$44>>2] = $43; $45 = (+($31|0)); $46 = ((($1)) + 8|0); $47 = +HEAPF32[$46>>2]; $48 = $45 - $47; $49 = +HEAPF32[$12>>2]; $50 = (+_RayTracer_Div($48,$49)); $51 = ((($0)) + 84|0); HEAPF32[$51>>2] = $50; $52 = (+($17|0)); $53 = +HEAPF32[$2>>2]; $54 = (+_RayTracer_Div($52,$53)); $55 = ((($0)) + 88|0); HEAPF32[$55>>2] = $54; $56 = (+($23|0)); $57 = +HEAPF32[$8>>2]; $58 = (+_RayTracer_Div($56,$57)); $59 = ((($0)) + 92|0); HEAPF32[$59>>2] = $58; $60 = (+($14|0)); $61 = +HEAPF32[$12>>2]; $62 = (+_RayTracer_Div($60,$61)); $63 = ((($0)) + 96|0); HEAPF32[$63>>2] = $62; return; } function _RayTracer_Div($0,$1) { $0 = +$0; $1 = +$1; var $$0 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = (+Math_abs((+$1))); $3 = $2 < 9.9999999747524271E-7; $4 = $0 / $1; $$0 = $3 ? 1.0E+9 : $4; return (+$$0); } function _RayTracer_Step($0) { $0 = $0|0; var $$sink = 0, $$sink17 = 0, $$sink18 = 0.0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 76|0); $2 = +HEAPF32[$1>>2]; $3 = ((($0)) + 80|0); $4 = +HEAPF32[$3>>2]; $5 = $2 < $4; if ($5) { $6 = ((($0)) + 84|0); $7 = +HEAPF32[$6>>2]; $8 = $2 < $7; if ($8) { $9 = ((($0)) + 64|0); $10 = HEAP32[$9>>2]|0; $11 = HEAP32[$0>>2]|0; $12 = (($11) + ($10))|0; HEAP32[$0>>2] = $12; $13 = ((($0)) + 88|0); $$sink = $13;$$sink17 = $1;$$sink18 = $2; } else { label = 4; } } else { label = 4; } do { if ((label|0) == 4) { $14 = ((($0)) + 84|0); $15 = +HEAPF32[$14>>2]; $16 = $4 < $15; if ($16) { $17 = ((($0)) + 68|0); $18 = HEAP32[$17>>2]|0; $19 = ((($0)) + 4|0); $20 = HEAP32[$19>>2]|0; $21 = (($20) + ($18))|0; HEAP32[$19>>2] = $21; $22 = ((($0)) + 92|0); $$sink = $22;$$sink17 = $3;$$sink18 = $4; break; } else { $23 = ((($0)) + 72|0); $24 = HEAP32[$23>>2]|0; $25 = ((($0)) + 8|0); $26 = HEAP32[$25>>2]|0; $27 = (($26) + ($24))|0; HEAP32[$25>>2] = $27; $28 = ((($0)) + 96|0); $$sink = $28;$$sink17 = $14;$$sink18 = $15; break; } } } while(0); $29 = +HEAPF32[$$sink>>2]; $30 = $$sink18 + $29; HEAPF32[$$sink17>>2] = $30; return; } function _Picking_CalcPickedBlock($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = +$2; $3 = $3|0; var $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_RayTrace($3,$0,$1,$2,22)|0); $5 = ($4<<24>>24)==(0); if (!($5)) { return; } _RayTracer_SetInvalid($3); return; } function _ClipBlock($0) { $0 = $0|0; var $$0 = 0, $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $$byval_copy3 = sp + 56|0; $$byval_copy2 = sp + 44|0; $$byval_copy1 = sp + 32|0; $$byval_copy = sp + 20|0; $1 = sp + 8|0; $2 = sp + 4|0; $3 = sp; $4 = ((($0)) + 60|0); $5 = HEAP16[$4>>1]|0; $6 = (_Game_CanPick($5)|0); $7 = ($6<<24>>24)==(0); if ($7) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $8 = ((($0)) + 12|0); $9 = ((($0)) + 24|0); $10 = ((($0)) + 36|0); $11 = ((($0)) + 48|0); ;HEAP32[$$byval_copy>>2]=HEAP32[$8>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$8+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$8+8>>2]|0; ;HEAP32[$$byval_copy1>>2]=HEAP32[$9>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$9+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$9+8>>2]|0; ;HEAP32[$$byval_copy2>>2]=HEAP32[$10>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$10+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$10+8>>2]|0; ;HEAP32[$$byval_copy3>>2]=HEAP32[$11>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$11+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$11+8>>2]|0; $12 = (_Intersection_RayIntersectsBox($$byval_copy,$$byval_copy1,$$byval_copy2,$$byval_copy3,$2,$3)|0); $13 = ($12<<24>>24)==(0); if ($13) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $14 = +HEAPF32[$2>>2]; _Vec3_Mul1_1555($1,$9,$14); $15 = ((($0)) + 100|0); _Vec3_Add_1552($15,$8,$1); $16 = (+_Vec3_LengthSquared_1557($1)); $17 = +HEAPF32[(1784296)>>2]; $18 = $17 * $17; $19 = !($16 <= $18); if ($19) { _RayTracer_SetInvalid($0); $$0 = 1; STACKTOP = sp;return ($$0|0); } else { _SetAsValid($0); $$0 = 1; STACKTOP = sp;return ($$0|0); } } function _RayTrace($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = +$3; $4 = $4|0; var $$0 = 0, $$09091 = 0, $$byval_copy = 0, $$sink = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0; var $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0.0, $70 = 0, $71 = 0.0, $72 = 0, $73 = 0.0, $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0; var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $$byval_copy = sp + 24|0; $5 = sp + 12|0; $6 = sp; _RayTracer_Init($0,$1,$2); $7 = +HEAPF32[$1>>2]; $8 = ($7 != $7) | (0.0 != 0.0); if ($8) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $9 = ((($1)) + 4|0); $10 = +HEAPF32[$9>>2]; $11 = ($10 != $10) | (0.0 != 0.0); if ($11) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ($13 != $13) | (0.0 != 0.0); if ($14) { $$0 = 0; STACKTOP = sp;return ($$0|0); } _IVec3_Floor($5,$1); $15 = HEAP32[$5>>2]|0; $16 = ((($5)) + 8|0); $17 = HEAP32[$16>>2]|0; $18 = (_World_ContainsXZ_1551($15,$17)|0); $19 = ($18<<24>>24)!=(0); $20 = ((($5)) + 4|0); $21 = HEAP32[$20>>2]|0; $22 = ($21|0)>(-1); $23 = $19 & $22; $24 = $3 * $3; $25 = ((($0)) + 4|0); $26 = ((($0)) + 8|0); $27 = ((($6)) + 4|0); $28 = ((($6)) + 8|0); $29 = ((($0)) + 60|0); $30 = ((($0)) + 36|0); $31 = ((($0)) + 48|0); $32 = ((($0)) + 40|0); $33 = ((($0)) + 52|0); $34 = ((($0)) + 44|0); $35 = ((($0)) + 56|0); $$09091 = 0; while(1) { $36 = HEAP32[$0>>2]|0; $37 = HEAP32[$25>>2]|0; $38 = HEAP32[$26>>2]|0; $39 = (+($36|0)); HEAPF32[$6>>2] = $39; $40 = (+($37|0)); HEAPF32[$27>>2] = $40; $41 = (+($38|0)); HEAPF32[$28>>2] = $41; if ($23) { $42 = (_Picking_GetInside($36,$37,$38)|0); $$sink = $42; } else { ;HEAP32[$$byval_copy>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$5+8>>2]|0; $43 = (_Picking_GetOutside($36,$37,$38,$$byval_copy)|0); $$sink = $43; } $44 = $$sink&65535; HEAP16[$29>>1] = $$sink; $45 = (1143828 + (($44*12)|0)|0); _Vec3_Add_1552($30,$6,$45); $46 = HEAP16[$29>>1]|0; $47 = $46&65535; $48 = (1153044 + (($47*12)|0)|0); _Vec3_Add_1552($31,$6,$48); $49 = +HEAPF32[$1>>2]; $50 = +HEAPF32[$30>>2]; $51 = $49 - $50; $52 = (+Math_abs((+$51))); $53 = +HEAPF32[$31>>2]; $54 = $49 - $53; $55 = (+Math_abs((+$54))); $56 = +HEAPF32[$9>>2]; $57 = +HEAPF32[$32>>2]; $58 = $56 - $57; $59 = (+Math_abs((+$58))); $60 = +HEAPF32[$33>>2]; $61 = $56 - $60; $62 = (+Math_abs((+$61))); $63 = +HEAPF32[$12>>2]; $64 = +HEAPF32[$34>>2]; $65 = $63 - $64; $66 = (+Math_abs((+$65))); $67 = +HEAPF32[$35>>2]; $68 = $63 - $67; $69 = (+Math_abs((+$68))); $70 = $52 < $55; $71 = $70 ? $52 : $55; $72 = $59 < $62; $73 = $72 ? $59 : $62; $74 = $66 < $69; $75 = $74 ? $66 : $69; $76 = $71 * $71; $77 = $73 * $73; $78 = $76 + $77; $79 = $75 * $75; $80 = $78 + $79; $81 = $80 > $24; if ($81) { $$0 = 0; label = 12; break; } $82 = (FUNCTION_TABLE_ii[$4 & 31]($0)|0); $83 = ($82<<24>>24)==(0); if (!($83)) { $$0 = 1; label = 12; break; } _RayTracer_Step($0); $84 = (($$09091) + 1)|0; $85 = ($84>>>0)<(25000); if ($85) { $$09091 = $84; } else { label = 11; break; } } if ((label|0) == 11) { _Logger_Abort(41170); $$0 = 0; STACKTOP = sp;return ($$0|0); } else if ((label|0) == 12) { STACKTOP = sp;return ($$0|0); } return (0)|0; } function _World_ContainsXZ_1551($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = ($2>>>0)>($0>>>0); $4 = HEAP32[(1103572)>>2]|0; $5 = ($4>>>0)>($1>>>0); $narrow = $3 & $5; $6 = $narrow&1; return ($6|0); } function _Picking_GetInside($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $$011 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp12 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_World_ContainsXZ_1551($0,$2)|0); $4 = ($3<<24>>24)==(0); if ($4) { $9 = HEAP32[(1972148)>>2]|0; $10 = HEAP32[(1972152)>>2]|0; $11 = (($10) + ($9))|0; $$0 = $11; } else { $5 = HEAP32[(1103568)>>2]|0; $6 = ($5|0)>($1|0); if (!($6)) { $$011 = 0; return ($$011|0); } $7 = ($1|0)>(-1); if ($7) { $8 = (_World_GetBlock_1556($0,$1,$2)|0); $$011 = $8; return ($$011|0); } else { $$0 = 0; } } $12 = HEAP16[(1972146)>>1]|0; $13 = ($12<<16>>16)==(0); $14 = ($$0|0)>($1|0); $phitmp12 = $14 ? 7 : 0; $15 = $13 ? 0 : $phitmp12; $$011 = $15; return ($$011|0); } function _Picking_GetOutside($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond11 = 0, $or$cond15 = 0, $or$cond3 = 0, $or$cond49 = 0, $or$cond5 = 0, $or$cond51 = 0, $or$cond53 = 0, $or$cond55 = 0; var $or$cond7 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP16[(1972146)>>1]|0; $5 = ($4<<16>>16)!=(0); $6 = (_World_ContainsXZ_1551($0,$2)|0); $7 = ($6<<24>>24)==(0); do { if ($7) { $43 = ($1|0)>(-1); $or$cond7 = $43 & $5; if ($or$cond7) { $44 = HEAP32[(1972148)>>2]|0; $45 = HEAP32[(1972152)>>2]|0; $46 = (($45) + ($44))|0; $47 = ($46|0)>($1|0); if ($47) { $48 = ($0|0)==(-1); if ($48) { $49 = HEAP32[$3>>2]|0; $50 = $49 | $2; $51 = ($50|0)>(-1); $52 = HEAP32[(1103572)>>2]|0; $53 = ($52|0)>($2|0); $or$cond49 = $51 & $53; if ($or$cond49) { $$0 = 7; return ($$0|0); } } $54 = HEAP32[(1103564)>>2]|0; $55 = ($54|0)==($0|0); if ($55) { $56 = HEAP32[$3>>2]|0; $57 = ($56|0)<(0); $58 = ($2|0)>(-1); $or$cond11 = $58 & $57; $59 = HEAP32[(1103572)>>2]|0; $60 = ($59|0)>($2|0); $or$cond51 = $or$cond11 & $60; if ($or$cond51) { $$0 = 7; return ($$0|0); } } $61 = ($2|0)==(-1); if ($61) { $62 = ((($3)) + 8|0); $63 = HEAP32[$62>>2]|0; $64 = $63 | $0; $65 = ($64|0)>(-1); $66 = ($54|0)>($0|0); $or$cond53 = $66 & $65; if ($or$cond53) { $$0 = 7; return ($$0|0); } } $67 = HEAP32[(1103572)>>2]|0; $68 = ($67|0)==($2|0); if ($68) { $69 = ((($3)) + 8|0); $70 = HEAP32[$69>>2]|0; $71 = ($70|0)<(0); $72 = ($0|0)>(-1); $or$cond15 = $72 & $71; $73 = ($54|0)>($0|0); $or$cond55 = $73 & $or$cond15; if ($or$cond55) { $$0 = 7; return ($$0|0); } } } } } else { $8 = HEAP32[(1103568)>>2]|0; $9 = ($8|0)>($1|0); if (!($9)) { $$0 = 0; return ($$0|0); } $10 = ($1|0)==(-1); $or$cond = $10 & $5; if ($or$cond) { $11 = ((($3)) + 4|0); $12 = HEAP32[$11>>2]|0; $13 = ($12|0)>(0); if ($13) { $$0 = 7; } else { break; } return ($$0|0); } $14 = ($1|0)==(0); $or$cond3 = $14 & $5; if ($or$cond3) { $15 = ((($3)) + 4|0); $16 = HEAP32[$15>>2]|0; $17 = ($16|0)<(0); if ($17) { $$0 = 7; return ($$0|0); } } $18 = ($1|0)>(-1); $or$cond5 = $18 & $5; if ($or$cond5) { $19 = HEAP32[(1972148)>>2]|0; $20 = HEAP32[(1972152)>>2]|0; $21 = (($20) + ($19))|0; $22 = ($21|0)>($1|0); if ($22) { $23 = ((($3)) + 4|0); $24 = HEAP32[$23>>2]|0; $25 = ($24|0)<($21|0); if ($25) { $26 = ($0|0)==(0); if ($26) { $27 = HEAP32[$3>>2]|0; $28 = ($27|0)<(0); if ($28) { $$0 = 7; return ($$0|0); } } $29 = ($2|0)==(0); if ($29) { $30 = ((($3)) + 8|0); $31 = HEAP32[$30>>2]|0; $32 = ($31|0)<(0); if ($32) { $$0 = 7; return ($$0|0); } } $33 = HEAP32[(1103576)>>2]|0; $34 = ($33|0)==($0|0); if ($34) { $35 = HEAP32[$3>>2]|0; $36 = ($35|0)>(-1); if ($36) { $$0 = 7; return ($$0|0); } } $37 = HEAP32[(1103584)>>2]|0; $38 = ($37|0)==($2|0); if ($38) { $39 = ((($3)) + 8|0); $40 = HEAP32[$39>>2]|0; $41 = ($40|0)>(-1); if ($41) { $$0 = 7; return ($$0|0); } } } } } if ($18) { $42 = (_World_GetBlock_1556($0,$1,$2)|0); $$0 = $42; return ($$0|0); } } } while(0); $$0 = 0; return ($$0|0); } function _Vec3_Add_1552($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 + $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 + $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 + $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _ClipCamera($0) { $0 = $0|0; var $$0 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $$byval_copy7 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $$byval_copy7 = sp + 56|0; $$byval_copy6 = sp + 44|0; $$byval_copy5 = sp + 32|0; $$byval_copy4 = sp + 20|0; $1 = sp + 8|0; $2 = sp + 4|0; $3 = sp; $4 = ((($0)) + 60|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; $7 = (1120788 + ($6)|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(4); if ($9) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $10 = (1115412 + ($6)|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(2); if (!($12)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $13 = ((($0)) + 12|0); $14 = ((($0)) + 24|0); $15 = ((($0)) + 36|0); $16 = ((($0)) + 48|0); ;HEAP32[$$byval_copy4>>2]=HEAP32[$13>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$13+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$13+8>>2]|0; ;HEAP32[$$byval_copy5>>2]=HEAP32[$14>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$14+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$14+8>>2]|0; ;HEAP32[$$byval_copy6>>2]=HEAP32[$15>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$15+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$15+8>>2]|0; ;HEAP32[$$byval_copy7>>2]=HEAP32[$16>>2]|0;HEAP32[$$byval_copy7+4>>2]=HEAP32[$16+4>>2]|0;HEAP32[$$byval_copy7+8>>2]=HEAP32[$16+8>>2]|0; $17 = (_Intersection_RayIntersectsBox($$byval_copy4,$$byval_copy5,$$byval_copy6,$$byval_copy7,$2,$3)|0); $18 = ($17<<24>>24)==(0); if ($18) { $$0 = 0; STACKTOP = sp;return ($$0|0); } _Vec3_Sub_1554($15,$15); _Vec3_Add_1552($16,$16,20936); ;HEAP32[$$byval_copy4>>2]=HEAP32[$13>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$13+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$13+8>>2]|0; ;HEAP32[$$byval_copy5>>2]=HEAP32[$14>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$14+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$14+8>>2]|0; ;HEAP32[$$byval_copy6>>2]=HEAP32[$15>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$15+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$15+8>>2]|0; ;HEAP32[$$byval_copy7>>2]=HEAP32[$16>>2]|0;HEAP32[$$byval_copy7+4>>2]=HEAP32[$16+4>>2]|0;HEAP32[$$byval_copy7+8>>2]=HEAP32[$16+8>>2]|0; (_Intersection_RayIntersectsBox($$byval_copy4,$$byval_copy5,$$byval_copy6,$$byval_copy7,$2,$3)|0); $19 = +HEAPF32[$2>>2]; _Vec3_Mul1_1555($1,$14,$19); $20 = ((($0)) + 100|0); _Vec3_Add_1552($20,$13,$1); _SetAsValid($0); $$0 = 1; STACKTOP = sp;return ($$0|0); } function _Vec3_Sub_1554($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0.0, $11 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[$1>>2]; $3 = $2 + -0.10000000149011612; HEAPF32[$0>>2] = $3; $4 = ((($1)) + 4|0); $5 = +HEAPF32[$4>>2]; $6 = $5 + -0.10000000149011612; $7 = ((($0)) + 4|0); HEAPF32[$7>>2] = $6; $8 = ((($1)) + 8|0); $9 = +HEAPF32[$8>>2]; $10 = $9 + -0.10000000149011612; $11 = ((($0)) + 8|0); HEAPF32[$11>>2] = $10; return; } function _Vec3_Mul1_1555($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = +$2; var $10 = 0.0, $11 = 0.0, $12 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = $3 * $2; HEAPF32[$0>>2] = $4; $5 = ((($1)) + 4|0); $6 = +HEAPF32[$5>>2]; $7 = $6 * $2; $8 = ((($0)) + 4|0); HEAPF32[$8>>2] = $7; $9 = ((($1)) + 8|0); $10 = +HEAPF32[$9>>2]; $11 = $10 * $2; $12 = ((($0)) + 8|0); HEAPF32[$12>>2] = $11; return; } function _SetAsValid($0) { $0 = $0|0; var $$sink = 0, $$sink30 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0; var $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $1 = ((($0)) + 112|0); ;HEAP32[$1>>2]=HEAP32[$0>>2]|0;HEAP32[$1+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$1+8>>2]=HEAP32[$0+8>>2]|0; $2 = ((($0)) + 124|0); HEAP8[$2>>0] = 1; HEAPF32[459664] = 1.0E+9; $3 = ((($0)) + 100|0); $4 = +HEAPF32[$3>>2]; $5 = ((($0)) + 36|0); $6 = +HEAPF32[$5>>2]; $7 = $4 - $6; _TestAxis($0,$7,0); $8 = +HEAPF32[$3>>2]; $9 = ((($0)) + 48|0); $10 = +HEAPF32[$9>>2]; $11 = $8 - $10; _TestAxis($0,$11,1); $12 = ((($0)) + 104|0); $13 = +HEAPF32[$12>>2]; $14 = ((($0)) + 40|0); $15 = +HEAPF32[$14>>2]; $16 = $13 - $15; _TestAxis($0,$16,4); $17 = +HEAPF32[$12>>2]; $18 = ((($0)) + 52|0); $19 = +HEAPF32[$18>>2]; $20 = $17 - $19; _TestAxis($0,$20,5); $21 = ((($0)) + 108|0); $22 = +HEAPF32[$21>>2]; $23 = ((($0)) + 44|0); $24 = +HEAPF32[$23>>2]; $25 = $22 - $24; _TestAxis($0,$25,2); $26 = +HEAPF32[$21>>2]; $27 = ((($0)) + 56|0); $28 = +HEAPF32[$27>>2]; $29 = $26 - $28; _TestAxis($0,$29,3); $30 = ((($0)) + 125|0); $31 = HEAP8[$30>>0]|0; switch ($31<<24>>24) { case 0: { $$sink = $1;$$sink30 = -1; break; } case 1: { $$sink = $1;$$sink30 = 1; break; } case 2: { $32 = ((($0)) + 120|0); $$sink = $32;$$sink30 = -1; break; } case 3: { $33 = ((($0)) + 120|0); $$sink = $33;$$sink30 = 1; break; } case 4: { $34 = ((($0)) + 116|0); $$sink = $34;$$sink30 = -1; break; } case 5: { $35 = ((($0)) + 116|0); $$sink = $35;$$sink30 = 1; break; } default: { return; } } $36 = HEAP32[$$sink>>2]|0; $37 = (($36) + ($$sink30))|0; HEAP32[$$sink>>2] = $37; return; } function _TestAxis($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = $2|0; var $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (+Math_abs((+$1))); $4 = +HEAPF32[459664]; $5 = !($3 >= $4); if (!($5)) { return; } HEAPF32[459664] = $3; $6 = ((($0)) + 125|0); HEAP8[$6>>0] = $2; return; } function _World_GetBlock_1556($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $3 = HEAP32[(1103572)>>2]|0; $4 = Math_imul($3, $1)|0; $5 = (($4) + ($2))|0; $6 = HEAP32[(1103564)>>2]|0; $7 = Math_imul($5, $6)|0; $8 = (($7) + ($0))|0; $9 = HEAP32[275888]|0; $10 = (($9) + ($8)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = HEAP32[(1103556)>>2]|0; $14 = (($13) + ($8)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 8; $18 = $17 | $12; $19 = HEAP32[(1103608)>>2]|0; $20 = $18 & $19; $21 = $20&65535; return ($21|0); } function _Vec3_LengthSquared_1557($0) { $0 = $0|0; var $1 = 0.0, $10 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[$0>>2]; $2 = $1 * $1; $3 = ((($0)) + 4|0); $4 = +HEAPF32[$3>>2]; $5 = $4 * $4; $6 = $2 + $5; $7 = ((($0)) + 8|0); $8 = +HEAPF32[$7>>2]; $9 = $8 * $8; $10 = $6 + $9; return (+$10); } function _Picking_ClipCameraPos($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = +$2; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond14 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP8[(1770973)>>0]|0; $5 = ($4<<24>>24)!=(0); $6 = HEAP8[(1784334)>>0]|0; $7 = ($6<<24>>24)==(0); $or$cond14 = $5 & $7; if ($or$cond14) { $12 = 1; } else { $8 = HEAP8[(1784316)>>0]|0; $9 = ($8<<24>>24)==(0); $12 = $9; } $10 = HEAP8[(1103612)>>0]|0; $11 = ($10<<24>>24)!=(0); $or$cond = $12 & $11; if ($or$cond) { $13 = (_RayTrace($3,$0,$1,$2,23)|0); $14 = ($13<<24>>24)==(0); if (!($14)) { return; } } _RayTracer_SetInvalid($3); $15 = ((($3)) + 100|0); _Vec3_Mul1_1555($15,$1,$2); _Vec3_Add_1552($15,$0,$15); return; } function _Directory_IterCallback($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $1 = sp + 264|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 260; $5 = (_String_Length($0)|0); _String_AppendUtf8($1,$0,$5); $6 = HEAP32[459667]|0; $7 = HEAP32[459668]|0; FUNCTION_TABLE_vii[$6 & 255]($1,$7); STACKTOP = sp;return; } function _Platform_LogError($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _String_FromReadonly($1,$0); $2 = HEAP32[3701]|0; FUNCTION_TABLE_vi[$2 & 511]($1); STACKTOP = sp;return; } function _main_phase1() { var label = 0, sp = 0; sp = STACKTOP; _interop_LoadIndexedDB(); _interop_AsyncLoadIndexedDB(); return; } function _main_phase2() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[459665]|0; $1 = HEAP32[459666]|0; (_web_main($0,$1)|0); return; } function _Mem_Equal($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$010 = 0, $$012 = 0, $$0811 = 0, $$in = 0, $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($2|0)==(0); if ($3) { $$010 = 1; return ($$010|0); } $$012 = $1;$$0811 = $0;$$in = $2; while(1) { $4 = (($$in) + -1)|0; $5 = HEAP8[$$0811>>0]|0; $6 = HEAP8[$$012>>0]|0; $7 = ($5<<24>>24)==($6<<24>>24); if (!($7)) { $$010 = 0; label = 5; break; } $8 = ((($$012)) + 1|0); $9 = ((($$0811)) + 1|0); $10 = ($4|0)==(0); if ($10) { $$010 = 1; label = 5; break; } else { $$012 = $8;$$0811 = $9;$$in = $4; } } if ((label|0) == 5) { return ($$010|0); } return (0)|0; } function _Mem_Alloc($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_Mem_TryAlloc($0,$1)|0); $4 = ($3|0)==(0|0); if (!($4)) { return ($3|0); } _AbortOnAllocFailed($2); return ($3|0); } function _Mem_TryAlloc($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_CalcMemSize($0,$1)|0); $3 = ($2|0)==(0); if ($3) { $5 = 0; return ($5|0); } $4 = (_malloc($2)|0); $5 = $4; return ($5|0); } function _AbortOnAllocFailed($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $1 = sp + 88|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 84; _String_Format1($1,41241,$0); $5 = HEAP32[$1>>2]|0; $6 = HEAP16[$3>>1]|0; $7 = $6&65535; $8 = (($5) + ($7)|0); HEAP8[$8>>0] = 0; $9 = HEAP32[$1>>2]|0; _Logger_Abort($9); STACKTOP = sp;return; } function _CalcMemSize($0,$1) { $0 = $0|0; $1 = $1|0; var $$ = 0, $2 = 0, $3 = 0, $4 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($0|0)==(0); $3 = Math_imul($1, $0)|0; $4 = ($3>>>0)<($0>>>0); $$ = $4 ? 0 : $3; $spec$select = $2 ? 1 : $$; return ($spec$select|0); } function _Mem_AllocCleared($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_Mem_TryAllocCleared($0,$1)|0); $4 = ($3|0)==(0|0); if (!($4)) { return ($3|0); } _AbortOnAllocFailed($2); return ($3|0); } function _Mem_TryAllocCleared($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_calloc($0,$1)|0); return ($2|0); } function _Mem_Realloc($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_Mem_TryRealloc($0,$1,$2)|0); $5 = ($4|0)==(0|0); if (!($5)) { return ($4|0); } _AbortOnAllocFailed($3); return ($4|0); } function _Mem_TryRealloc($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_CalcMemSize($1,$2)|0); $4 = ($3|0)==(0); if ($4) { $6 = 0; return ($6|0); } $5 = (_realloc($0,$3)|0); $6 = $5; return ($6|0); } function _Platform_Log1($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Platform_Log4($0,$1,0,0,0); return; } function _Platform_Log4($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $10 = 0, $11 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 528|0; $5 = sp + 512|0; $6 = sp; HEAP32[$5>>2] = $6; $7 = ((($5)) + 4|0); HEAP16[$7>>1] = 0; $8 = ((($5)) + 6|0); HEAP16[$8>>1] = 512; _String_Format4($5,$0,$1,$2,$3,$4); $9 = HEAP32[$5>>2]|0; $10 = HEAP16[$7>>1]|0; $11 = $10&65535; _Platform_Log($9,$11); STACKTOP = sp;return; } function _Platform_Log($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _interop_Log(($0|0),($1|0)); return; } function _Platform_Log2($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _Platform_Log4($0,$1,$2,0,0); return; } function _Platform_Log3($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; _Platform_Log4($0,$1,$2,$3,0); return; } function _Platform_LogConst($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_String_Length($0)|0); _Platform_Log($0,$1); return; } function _Stopwatch_ElapsedMS($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_Stopwatch_ElapsedMicroseconds($0,$1,$2,$3)|0); $5 = (getTempRet0() | 0); $6 = ($5>>>0)>(0); $7 = ($4>>>0)>(2147483647); $8 = ($5|0)==(0); $9 = $8 & $7; $10 = $6 | $9; $11 = (($4|0) / 1000)&-1; $$0 = $10 ? 2147483 : $11; return ($$0|0); } function _Stopwatch_ElapsedMicroseconds($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($3>>>0)<($1>>>0); $5 = ($2>>>0)<($0>>>0); $6 = ($3|0)==($1|0); $7 = $6 & $5; $8 = $4 | $7; $9 = (_i64Subtract(($2|0),($3|0),($0|0),($1|0))|0); $10 = (getTempRet0() | 0); $11 = $8 ? 0 : $9; $12 = $8 ? 0 : $10; setTempRet0(($12) | 0); return ($11|0); } function _Mem_Set($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _memset(($0|0),($1|0),($2|0))|0; return; } function _Mem_Copy($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _memcpy(($0|0),($1|0),($2|0))|0; return; } function _Mem_Free($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0|0)==(0|0); if (!($1)) { _free($0); } return; } function _DateTime_CurrentUTC_MS() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; (_gettimeofday(($0|0),(0|0))|0); $1 = HEAP32[$0>>2]|0; $2 = ($1|0)<(0); $3 = $2 << 31 >> 31; $4 = (___muldi3(($1|0),($3|0),1000,0)|0); $5 = (getTempRet0() | 0); $6 = (_i64Add(($4|0),($5|0),304928768,14467)|0); $7 = (getTempRet0() | 0); $8 = ((($0)) + 4|0); $9 = HEAP32[$8>>2]|0; $10 = (($9|0) / 1000)&-1; $11 = ($10|0)<(0); $12 = $11 << 31 >> 31; $13 = (_i64Add(($6|0),($7|0),($10|0),($12|0))|0); $14 = (getTempRet0() | 0); setTempRet0(($14) | 0); STACKTOP = sp;return ($13|0); } function _DateTime_CurrentLocal($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _interop_GetLocalTime(($0|0)); return; } function _Stopwatch_Measure() { var $0 = 0.0, $1 = 0.0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (+_emscripten_get_now()); $1 = $0 * 1000.0; $2 = (~~$1)>>>0; $3 = +Math_abs($1) >= 1.0 ? $1 > 0.0 ? (~~+Math_min(+Math_floor($1 / 4294967296.0), 4294967295.0)) >>> 0 : ~~+Math_ceil(($1 - +(~~$1 >>> 0)) / 4294967296.0) >>> 0 : 0; setTempRet0(($3) | 0); return ($2|0); } function _Directory_GetCachePath($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _String_AppendConst($0,$1); return; } function _Directory_Create($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _File_Exists($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 608|0; $1 = sp; (_Platform_EncodeUtf8($1,$0)|0); $2 = (_interop_FileExists(($1|0))|0); STACKTOP = sp;return ($2|0); } function _Platform_EncodeUtf8($0,$1) { $0 = $0|0; $1 = $1|0; var $$0$lcssa = 0, $$01819 = 0, $$020 = 0, $$lcssa = 0, $$pr = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3&65535)>(260); if ($4) { _Logger_Abort(41277); $$pr = HEAP16[$2>>1]|0; $5 = $$pr; } else { $5 = $3; } $6 = ($5<<16>>16)==(0); if ($6) { $$0$lcssa = 0;$$lcssa = $0; HEAP8[$$lcssa>>0] = 0; return ($$0$lcssa|0); } $$01819 = 0;$$020 = 0;$10 = $0; while(1) { $7 = HEAP32[$1>>2]|0; $8 = (($7) + ($$01819)|0); $9 = HEAP8[$8>>0]|0; $11 = (_Convert_CP437ToUtf8($9,$10)|0); $12 = (($11) + ($$020))|0; $13 = (($$01819) + 1)|0; $14 = HEAP16[$2>>1]|0; $15 = $14&65535; $16 = ($13>>>0)<($15>>>0); $17 = (($0) + ($12)|0); if ($16) { $$01819 = $13;$$020 = $12;$10 = $17; } else { $$0$lcssa = $12;$$lcssa = $17; break; } } HEAP8[$$lcssa>>0] = 0; return ($$0$lcssa|0); } function _Directory_Enum($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 608|0; $3 = sp; (_Platform_EncodeUtf8($3,$0)|0); HEAP32[459668] = $1; HEAP32[459667] = $2; $4 = (_interop_DirectoryIter(($3|0))|0); $5 = (0 - ($4))|0; STACKTOP = sp;return ($5|0); } function _File_Open($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_File_Do($0,$1,0)|0); return ($2|0); } function _File_Do($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 608|0; $3 = sp; (_Platform_EncodeUtf8($3,$1)|0); $4 = (_interop_FileCreate(($3|0),($2|0))|0); $5 = ($4|0)>(-1); if ($5) { HEAP32[$0>>2] = $4; $$0 = 0; STACKTOP = sp;return ($$0|0); } else { HEAP32[$0>>2] = -1; $6 = (0 - ($4))|0; $$0 = $6; STACKTOP = sp;return ($$0|0); } } function _File_Create($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_File_Do($0,$1,578)|0); return ($2|0); } function _File_OpenOrCreate($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_File_Do($0,$1,66)|0); return ($2|0); } function _File_Read($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_interop_FileRead(($0|0),($1|0),($2|0))|0); $5 = ($4|0)>(-1); if ($5) { HEAP32[$3>>2] = $4; $$0 = 0; return ($$0|0); } else { HEAP32[$3>>2] = -1; $6 = (0 - ($4))|0; $$0 = $6; return ($$0|0); } } function _File_Write($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_interop_FileWrite(($0|0),($1|0),($2|0))|0); $5 = ($4|0)>(-1); if ($5) { HEAP32[$3>>2] = $4; $$0 = 0; return ($$0|0); } else { HEAP32[$3>>2] = -1; $6 = (0 - ($4))|0; $$0 = $6; return ($$0|0); } } function _File_Close($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_interop_FileClose(($0|0))|0); $2 = (0 - ($1))|0; return ($2|0); } function _File_Seek($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_interop_FileSeek(($0|0),($1|0),($2|0))|0); $4 = ($3|0)>(-1); $5 = (0 - ($3))|0; $6 = $4 ? 0 : $5; return ($6|0); } function _File_Position($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_interop_FileSeek(($0|0),0,1)|0); $3 = ($2|0)>(-1); if ($3) { HEAP32[$1>>2] = $2; $$0 = 0; return ($$0|0); } else { HEAP32[$1>>2] = -1; $4 = (0 - ($2))|0; $$0 = $4; return ($$0|0); } } function _File_Length($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_interop_FileLength(($0|0))|0); $3 = ($2|0)>(-1); if ($3) { HEAP32[$1>>2] = $2; $$0 = 0; return ($$0|0); } else { HEAP32[$1>>2] = -1; $4 = (0 - ($2))|0; $$0 = $4; return ($$0|0); } } function _Thread_Sleep($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Thread_Create($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return (0|0); } function _Thread_Start2($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; FUNCTION_TABLE_v[$1 & 127](); return; } function _Thread_Detach($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Mutex_Lock($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Mutex_Unlock($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Socket_Available($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_interop_SocketGetPending(($0|0))|0); $3 = ($2|0)>(-1); if ($3) { HEAP32[$1>>2] = $2; $$0 = 0; return ($$0|0); } else { HEAP32[$1>>2] = 0; $4 = (0 - ($2))|0; $$0 = $4; return ($$0|0); } } function _Socket_GetError($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_interop_SocketGetError(($0|0))|0); $3 = ($2|0)>(-1); if ($3) { HEAP32[$1>>2] = $2; $$0 = 0; return ($$0|0); } else { HEAP32[$1>>2] = 0; $4 = (0 - ($2))|0; $$0 = $4; return ($$0|0); } } function _Socket_Connect($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$ = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 608|0; $3 = sp; (_Platform_EncodeUtf8($3,$1)|0); $4 = (_interop_SocketCreate()|0); HEAP32[$0>>2] = $4; $5 = (_interop_SocketConnect(($4|0),($3|0),($2|0))|0); $6 = (0 - ($5))|0; $7 = ($6|0)==(23); $$ = $7 ? -857812989 : $6; STACKTOP = sp;return ($$|0); } function _Socket_Read($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$01518 = 0, $$01617 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[$3>>2] = 0; $4 = ($2|0)==(0); if ($4) { return 0; } $$01518 = $1;$$01617 = $2; while(1) { $5 = (_interop_SocketGetPending(($0|0))|0); $6 = ($5|0)>(0); if (!($6)) { label = 7; break; } $7 = (_interop_SocketRecv(($0|0),($$01518|0),($$01617|0))|0); $8 = ($7|0)>(-1); if (!($8)) { label = 6; break; } $9 = HEAP32[$3>>2]|0; $10 = (($9) + ($7))|0; HEAP32[$3>>2] = $10; $11 = (($$01518) + ($7)|0); $12 = (($$01617) - ($7))|0; $13 = ($12|0)==(0); if ($13) { label = 7; break; } else { $$01518 = $11;$$01617 = $12; } } if ((label|0) == 6) { $14 = ($7|0)==(-6); $15 = (0 - ($7))|0; $spec$select = $14 ? 0 : $15; return ($spec$select|0); } else if ((label|0) == 7) { return 0; } return (0)|0; } function _Socket_Write($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_interop_SocketSend(($0|0),($1|0),($2|0))|0); $5 = ($4|0)>(-1); if ($5) { HEAP32[$3>>2] = $4; $$0 = 0; return ($$0|0); } else { HEAP32[$3>>2] = 0; $6 = (0 - ($4))|0; $$0 = $6; return ($$0|0); } } function _Socket_Close($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; (_interop_SocketClose(($0|0))|0); return; } function _Socket_Poll($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_interop_SocketPoll(($0|0))|0); $4 = ($3|0)>(-1); if ($4) { $5 = ($1|0)==(0); $6 = $5 ? 1 : 2; $7 = $3 & $6; $8 = ($7|0)!=(0); $9 = $8&1; HEAP8[$2>>0] = $9; $$0 = 0; return ($$0|0); } else { HEAP8[$2>>0] = 0; $10 = (0 - ($3))|0; $$0 = $10; return ($$0|0); } } function _Process_Exit($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0|0)==(0); if ($1) { return; } else { _Window_Close(); _exit(($0|0)); // unreachable; } } function _Process_StartOpen($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $spec$store$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 608|0; $1 = sp; (_Platform_EncodeUtf8($1,$0)|0); $2 = (_interop_OpenTab(($1|0))|0); $3 = ($2|0)==(1); $spec$store$select = $3 ? -857812897 : $2; STACKTOP = sp;return ($spec$store$select|0); } function _Platform_DescribeError($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($0>>>0)>(999); if ($2) { $$0 = 0; } else { $3 = (_strerror($0)|0); $4 = ($3|0)==(0|0); if ($4) { $$0 = 0; } else { $5 = (_String_CalcLen($3,600)|0); _String_AppendUtf8($1,$3,$5); $$0 = 1; } } return ($$0|0); } function _Platform_Init() { var label = 0, sp = 0; sp = STACKTOP; _interop_InitCCModule(); _interop_InitFilesystem(); _interop_InitSockets(); return; } function _Platform_GetCommandLineArgs($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$014 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; $4 = (($0) + -1)|0; $5 = ((($1)) + 4|0); $6 = ($4|0)<(5); $7 = $6 ? $4 : 5; $8 = ($0|0)>(1); if (!($8)) { STACKTOP = sp;return ($7|0); } $$014 = 0; while(1) { $9 = (($2) + ($$014<<3)|0); $10 = (($5) + ($$014<<2)|0); $11 = HEAP32[$10>>2]|0; _String_FromReadonly($3,$11); $12 = $3; $13 = $12; $14 = HEAP32[$13>>2]|0; $15 = (($12) + 4)|0; $16 = $15; $17 = HEAP32[$16>>2]|0; $18 = $9; $19 = $18; HEAP32[$19>>2] = $14; $20 = (($18) + 4)|0; $21 = $20; HEAP32[$21>>2] = $17; $22 = (($$014) + 1)|0; $23 = ($22|0)<($7|0); if ($23) { $$014 = $22; } else { break; } } STACKTOP = sp;return ($7|0); } function _Platform_SetDefaultCurrentDirectory($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _main($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; HEAP32[459665] = $0; HEAP32[459666] = $1; _interop_FS_Init(); _interop_DirectorySetWorking((41303|0)); _interop_AsyncDownloadTexturePack((44500|0),(41315|0)); return 0; } function _web_main($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; _SetupProgram($0,$1); $2 = (_RunProgram($0,$1)|0); _Process_Exit($2); return ($2|0); } function _SetupProgram($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; _Platform_Init(); $2 = (_Platform_SetDefaultCurrentDirectory($0,$1)|0); _Options_Load(); _Window_Init(); $3 = ($2|0)==(0); if (!($3)) { _Logger_SysWarn($2,41453); } _Platform_LogConst(41479); HEAP32[(1949248)>>2] = 1053568; HEAP16[(1949252)>>1] = 0; HEAP16[(1949254)>>1] = 64; return; } function _RunProgram($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $2 = sp; $3 = sp + 40|0; $4 = (_Platform_GetCommandLineArgs($0,$1,$2)|0); L1: do { switch ($4|0) { case 0: { _String_AppendConst(14340,41335); _RunGame(); $$0 = 0; break; } case 1: { _String_Copy(14340,$2); _RunGame(); $$0 = 0; break; } default: { $5 = ($4|0)<(4); if ($5) { _WarnMissingArgs($4,$2); $$0 = 1; break L1; } _String_Copy(14340,$2); $6 = ((($2)) + 8|0); _String_Copy(14348,$6); $7 = ((($2)) + 16|0); _String_Copy((1949248),$7); $8 = ((($2)) + 24|0); $9 = (_Convert_ParseUInt16($8,$3)|0); $10 = ($9<<24>>24)==(0); if ($10) { _WarnInvalidArg($8); $$0 = 1; break L1; } else { $11 = HEAP16[$3>>1]|0; $12 = $11&65535; HEAP32[(1949256)>>2] = $12; _RunGame(); $$0 = 0; break L1; } } } } while(0); STACKTOP = sp;return ($$0|0); } function _RunGame() { var $$0 = 0, $$08 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $0 = sp + 64|0; $1 = sp; $2 = HEAP32[(1972100)>>2]|0; $3 = (_Options_GetInt(41407,0,$2,0)|0); $4 = HEAP32[(1972104)>>2]|0; $5 = (_Options_GetInt(41420,0,$4,0)|0); $6 = ($3|0)==(0); $7 = ($5|0)==(0); $or$cond = $6 | $7; if ($or$cond) { $8 = HEAP32[(1972100)>>2]|0; $9 = ($8|0)<(854); $spec$select = $9 ? 640 : 854; $$0 = 480;$$08 = $spec$select; } else { $$0 = $5;$$08 = $3; } HEAP32[$0>>2] = $1; $10 = ((($0)) + 4|0); HEAP16[$10>>1] = 0; $11 = ((($0)) + 6|0); HEAP16[$11>>1] = 64; _String_Format2($0,41434,41442,14340); _Game_Run($$08,$$0,$0); STACKTOP = sp;return; } function _WarnMissingArgs($0,$1) { $0 = $0|0; $1 = $1|0; var $$05 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $2 = sp + 256|0; $3 = sp; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 256; _String_AppendConst($2,41381); $6 = ($0|0)>(0); if (!($6)) { HEAP32[3700] = 41365; _Logger_DialogWarn($2); STACKTOP = sp;return; } $$05 = 0; while(1) { $7 = (($1) + ($$05<<3)|0); _String_AppendString($2,$7); _String_Append($2,32); $8 = (($$05) + 1)|0; $exitcond = ($8|0)==($0|0); if ($exitcond) { break; } else { $$05 = $8; } } HEAP32[3700] = 41365; _Logger_DialogWarn($2); STACKTOP = sp;return; } function _WarnInvalidArg($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $1 = sp + 256|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 256; _String_Format2($1,41344,41352,$0); HEAP32[3700] = 41365; _Logger_DialogWarn($1); STACKTOP = sp;return; } function _OnInit_1642() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1949240)>>0]|0; $1 = ($0<<24>>24)==(0); if (!($1)) { return; } _Protocol_Reset(); return; } function _OnReset_1643() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1949240)>>0]|0; $1 = ($0<<24>>24)==(0); if (!($1)) { return; } _Mem_Set(1838676,0,1536); _Protocol_Reset(); _FreeMapStates(); return; } function _Protocol_Reset() { var label = 0, sp = 0; sp = STACKTOP; _Classic_Reset(); _CPE_Reset(); _BlockDefs_Reset(); _WoM_Reset(); return; } function _FreeMapStates() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1885008)>>2]|0; _Mem_Free($0); HEAP32[(1885008)>>2] = 0; $1 = HEAP32[(1929832)>>2]|0; _Mem_Free($1); HEAP32[(1929832)>>2] = 0; return; } function _Classic_Reset() { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; _Stream_ReadonlyMemory(1929872,0,0); HEAP8[1972892] = 0; HEAP8[1972891] = 0; HEAP32[(1839188)>>2] = 385; $0 = HEAP8[(1803052)>>0]|0; $1 = ($0&255)>(5); $2 = $1 ? 131 : 130; HEAP16[919338] = $2; HEAP32[(1839192)>>2] = 386; HEAP16[(1838678)>>1] = 1; HEAP32[(1839196)>>2] = 387; HEAP16[(1838680)>>1] = 1; HEAP32[(1839200)>>2] = 388; HEAP16[(1838682)>>1] = 1028; HEAP32[(1839204)>>2] = 389; HEAP16[(1838684)>>1] = 7; HEAP32[(1839212)>>2] = 390; HEAP16[(1838688)>>1] = 8; HEAP32[(1839216)>>2] = 391; HEAP16[(1838690)>>1] = 74; HEAP32[(1839220)>>2] = 392; HEAP16[(1838692)>>1] = 10; HEAP32[(1839224)>>2] = 393; HEAP16[(1838694)>>1] = 7; HEAP32[(1839228)>>2] = 394; HEAP16[(1838696)>>1] = 5; HEAP32[(1839232)>>2] = 395; HEAP16[(1838698)>>1] = 4; HEAP32[(1839236)>>2] = 396; HEAP16[(1838700)>>1] = 2; HEAP32[(1839240)>>2] = 397; HEAP16[(1838702)>>1] = 66; HEAP32[(1839244)>>2] = 398; HEAP16[(1838704)>>1] = 65; HEAP32[(1839248)>>2] = 399; HEAP16[(1838706)>>1] = 2; return; } function _CPE_Reset() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[482466] = 0; HEAP32[482467] = 0; HEAP8[1972884] = 0; HEAP8[1972885] = 0; HEAP32[5249] = 2; HEAP32[5248] = 2; HEAP32[5250] = 2; HEAP8[1972886] = 0; HEAP8[1972887] = 0; HEAP8[1972888] = 0; HEAP8[1972883] = 0; HEAP8[1972889] = 0; HEAP8[1972882] = 0; HEAP8[1972837] = 0; HEAP8[1972890] = 0; $0 = HEAP8[1972842]|0; $1 = ($0<<24>>24)==(0); if ($1) { return; } HEAP32[(1839252)>>2] = 400; HEAP16[(1838708)>>1] = 67; HEAP32[(1839256)>>2] = 401; HEAP16[(1838710)>>1] = 69; HEAP32[(1839260)>>2] = 402; HEAP16[(1838712)>>1] = 3; HEAP32[(1839264)>>2] = 403; HEAP16[(1838714)>>1] = 2; HEAP32[(1839268)>>2] = 404; HEAP16[(1838716)>>1] = 3; HEAP32[(1839272)>>2] = 405; HEAP16[(1838718)>>1] = 134; HEAP32[(1839276)>>2] = 406; HEAP16[(1838720)>>1] = 196; HEAP32[(1839280)>>2] = 407; HEAP16[(1838722)>>1] = 130; HEAP32[(1839284)>>2] = 408; HEAP16[(1838724)>>1] = 3; HEAP32[(1839288)>>2] = 409; HEAP16[(1838726)>>1] = 8; HEAP32[(1839292)>>2] = 410; HEAP16[(1838728)>>1] = 86; HEAP32[(1839296)>>2] = 411; HEAP16[(1838730)>>1] = 2; HEAP32[(1839300)>>2] = 412; HEAP16[(1838732)>>1] = 4; HEAP32[(1839304)>>2] = 413; HEAP16[(1838734)>>1] = 66; HEAP32[(1839308)>>2] = 414; HEAP16[(1838736)>>1] = 69; HEAP32[(1839312)>>2] = 415; HEAP16[(1838738)>>1] = 2; HEAP32[(1839316)>>2] = 416; HEAP16[(1838740)>>1] = 8; HEAP32[(1839320)>>2] = 417; HEAP16[(1838742)>>1] = 138; HEAP32[(1839340)>>2] = 418; HEAP16[(1838752)>>1] = 1282; HEAP32[(1839344)>>2] = 419; HEAP16[(1838754)>>1] = 6; HEAP32[(1839348)>>2] = 420; HEAP16[(1838756)>>1] = 65; HEAP32[(1839352)>>2] = 421; HEAP16[(1838758)>>1] = 6; HEAP32[(1839356)>>2] = 422; HEAP16[(1838760)>>1] = 7; HEAP32[(1839360)>>2] = 423; HEAP16[(1838762)>>1] = 4; HEAP32[(1839364)>>2] = 424; HEAP16[(1838764)>>1] = 3; HEAP32[(1839368)>>2] = 425; HEAP16[(1838766)>>1] = 3; HEAP32[(1839372)>>2] = 426; HEAP16[(1838768)>>1] = 9; HEAP32[(1839376)>>2] = 427; HEAP16[(1838770)>>1] = 16; HEAP32[(1839380)>>2] = 428; HEAP16[(1838772)>>1] = 36; HEAP32[(1839384)>>2] = 429; HEAP16[(1838774)>>1] = 26; HEAP32[(1839388)>>2] = 430; HEAP16[(1838776)>>1] = 116; HEAP32[(1839392)>>2] = 431; HEAP16[(1838778)>>1] = 104; HEAP32[(1839396)>>2] = 432; HEAP16[(1838780)>>1] = 2; HEAP32[(1839400)>>2] = 433; HEAP16[(1838782)>>1] = 66; HEAP32[(1839404)>>2] = 434; HEAP16[(1838784)>>1] = 11; return; } function _BlockDefs_Reset() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1972842]|0; $1 = ($0<<24>>24)!=(0); $2 = HEAP8[1972841]|0; $3 = ($2<<24>>24)!=(0); $or$cond = $1 & $3; if (!($or$cond)) { return; } HEAP32[(1839328)>>2] = 435; HEAP16[(1838746)>>1] = 80; HEAP32[(1839332)>>2] = 436; HEAP16[(1838748)>>1] = 2; HEAP32[(1839336)>>2] = 437; HEAP16[(1838750)>>1] = 85; return; } function _WoM_Reset() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[482465] = 0; HEAP8[1972880] = 0; HEAP8[1972881] = 0; return; } function _BlockDefs_DefineBlock($0) { $0 = $0|0; var $$off = 0, $1 = 0, $10 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; HEAP32[$1>>2] = $0; $2 = (_BlockDefs_DefineBlockCommonStart($1,0)|0); $3 = HEAP32[$1>>2]|0; $4 = ((($3)) + 1|0); HEAP32[$1>>2] = $4; $5 = HEAP8[$3>>0]|0; $$off = (($5) + -1)<<24>>24; $6 = ($$off&255)<(16); if ($6) { $7 = $2&65535; $8 = (((1134612 + (($7*12)|0)|0)) + 4|0); $9 = (+($5&255)); $10 = $9 * 0.0625; HEAPF32[$8>>2] = $10; } _BlockDefs_DefineBlockCommonEnd($4,$5,$2); _Block_DefineCustom($2,1); STACKTOP = sp;return; } function _BlockDefs_UndefineBlock($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972882]|0; $2 = ($1<<24>>24)==(0); if ($2) { $5 = HEAP8[$0>>0]|0; $6 = $5&255; $$0 = $6; } else { $3 = (_Stream_GetU16_BE($0)|0); $4 = (($3&65535) % 768)&-1; $$0 = $4; } $7 = $$0&65535; $8 = (1107732 + ($7)|0); $9 = HEAP8[$8>>0]|0; _Block_UndefineCustom($$0); _BlockDefs_OnBlockUpdated($$0,$9); return; } function _BlockDefs_DefineBlockExt($0) { $0 = $0|0; var $$sroa$0$0$$sroa_idx = 0, $$sroa$010$0$$sroa_idx = 0, $$sroa$4$0$$sroa_idx6 = 0, $$sroa$412$0$$sroa_idx13 = 0, $$sroa$5$0$$sroa_idx8 = 0, $$sroa$515$0$$sroa_idx16 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0; var $22 = 0.0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; HEAP32[$1>>2] = $0; $2 = HEAP32[5248]|0; $3 = ($2|0)>(1); $4 = $3&1; $5 = (_BlockDefs_DefineBlockCommonStart($1,$4)|0); $6 = HEAP32[$1>>2]|0; $7 = ((($6)) + 1|0); $8 = HEAP8[$6>>0]|0; $9 = (+($8<<24>>24)); $10 = $9 * 0.0625; $11 = ((($6)) + 2|0); $12 = HEAP8[$7>>0]|0; $13 = (+($12<<24>>24)); $14 = $13 * 0.0625; $15 = ((($6)) + 3|0); $16 = HEAP8[$11>>0]|0; $17 = (+($16<<24>>24)); $18 = $17 * 0.0625; $19 = ((($6)) + 4|0); $20 = HEAP8[$15>>0]|0; $21 = (+($20<<24>>24)); $22 = $21 * 0.0625; $23 = ((($6)) + 5|0); $24 = HEAP8[$19>>0]|0; $25 = (+($24<<24>>24)); $26 = $25 * 0.0625; $27 = ((($6)) + 6|0); $28 = HEAP8[$23>>0]|0; $29 = (+($28<<24>>24)); $30 = $29 * 0.0625; $31 = $5&65535; $$sroa$010$0$$sroa_idx = (1125396 + (($31*12)|0)|0); HEAPF32[$$sroa$010$0$$sroa_idx>>2] = $10; $$sroa$412$0$$sroa_idx13 = (((1125396 + (($31*12)|0)|0)) + 4|0); HEAPF32[$$sroa$412$0$$sroa_idx13>>2] = $14; $$sroa$515$0$$sroa_idx16 = (((1125396 + (($31*12)|0)|0)) + 8|0); HEAPF32[$$sroa$515$0$$sroa_idx16>>2] = $18; $$sroa$0$0$$sroa_idx = (1134612 + (($31*12)|0)|0); HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $22; $$sroa$4$0$$sroa_idx6 = (((1134612 + (($31*12)|0)|0)) + 4|0); HEAPF32[$$sroa$4$0$$sroa_idx6>>2] = $26; $$sroa$5$0$$sroa_idx8 = (((1134612 + (($31*12)|0)|0)) + 8|0); HEAPF32[$$sroa$5$0$$sroa_idx8>>2] = $30; _BlockDefs_DefineBlockCommonEnd($27,1,$5); _Block_DefineCustom($5,0); STACKTOP = sp;return; } function _BlockDefs_DefineBlockCommonStart($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = sp + 8|0; $4 = HEAP32[$0>>2]|0; HEAP32[$3>>2] = $4; $5 = HEAP8[1972882]|0; $6 = ($5<<24>>24)==(0); if ($6) { $11 = ((($4)) + 1|0); HEAP32[$3>>2] = $11; $12 = HEAP8[$4>>0]|0; $13 = $12&255; $$0 = $13; } else { $7 = (_Stream_GetU16_BE($4)|0); $8 = (($7&65535) % 768)&-1; $9 = HEAP32[$3>>2]|0; $10 = ((($9)) + 2|0); HEAP32[$3>>2] = $10; $$0 = $8; } $14 = $$0&65535; $15 = (1107732 + ($14)|0); $16 = HEAP8[$15>>0]|0; _Block_ResetProps($$0); $17 = HEAP32[$3>>2]|0; _UNSAFE_GetString($2,$17); $18 = HEAP32[$3>>2]|0; $19 = ((($18)) + 64|0); HEAP32[$3>>2] = $19; _Block_SetName($$0,$2); $20 = HEAP32[$3>>2]|0; $21 = ((($20)) + 1|0); HEAP32[$3>>2] = $21; $22 = HEAP8[$20>>0]|0; $23 = (1115412 + ($14)|0); HEAP8[$23>>0] = $22; $24 = ((($20)) + 2|0); HEAP32[$3>>2] = $24; $25 = HEAP8[$21>>0]|0; $26 = $25&255; $27 = (($26) + -128)|0; $28 = (+($27|0)); $29 = $28 * 0.015625; $30 = $29; $31 = $30 * 0.69314718055994495; $32 = (+_Math_Exp($31)); $33 = $32; $34 = (1116948 + ($14<<2)|0); HEAPF32[$34>>2] = $33; $35 = (_BlockDefs_Tex($3)|0); $36 = ($14*6)|0; $37 = (($36) + 5)|0; $38 = (1162260 + ($37<<1)|0); HEAP16[$38>>1] = $35; $39 = ($1<<24>>24)==(0); $40 = (_BlockDefs_Tex($3)|0); if ($39) { _Block_SetSide($40,$$0); } else { $41 = (1162260 + ($36<<1)|0); HEAP16[$41>>1] = $40; $42 = (_BlockDefs_Tex($3)|0); $43 = $36 | 1; $44 = (1162260 + ($43<<1)|0); HEAP16[$44>>1] = $42; $45 = (_BlockDefs_Tex($3)|0); $46 = (($36) + 2)|0; $47 = (1162260 + ($46<<1)|0); HEAP16[$47>>1] = $45; $48 = (_BlockDefs_Tex($3)|0); $49 = (($36) + 3)|0; $50 = (1162260 + ($49<<1)|0); HEAP16[$50>>1] = $48; } $51 = (_BlockDefs_Tex($3)|0); $52 = (($36) + 4)|0; $53 = (1162260 + ($52<<1)|0); HEAP16[$53>>1] = $51; $54 = HEAP32[$3>>2]|0; $55 = ((($54)) + 1|0); HEAP32[$3>>2] = $55; $56 = HEAP8[$54>>0]|0; $57 = ($56<<24>>24)==(0); $58 = $57&1; HEAP8[$15>>0] = $58; _BlockDefs_OnBlockUpdated($$0,$16); $59 = HEAP32[$3>>2]|0; $60 = ((($59)) + 1|0); HEAP32[$3>>2] = $60; $61 = HEAP8[$59>>0]|0; $62 = (1122324 + ($14)|0); HEAP8[$62>>0] = $61; $63 = (1121556 + ($14)|0); HEAP8[$63>>0] = $61; $64 = ($61<<24>>24)==(6); if (!($64)) { $65 = ((($59)) + 2|0); HEAP32[$3>>2] = $65; $66 = HEAP8[$60>>0]|0; $67 = ($66<<24>>24)!=(0); $68 = $67&1; $69 = (1108500 + ($14)|0); HEAP8[$69>>0] = $68; $70 = HEAP32[$3>>2]|0; HEAP32[$0>>2] = $70; STACKTOP = sp;return ($$0|0); } HEAP8[$62>>0] = 4; $65 = ((($59)) + 2|0); HEAP32[$3>>2] = $65; $66 = HEAP8[$60>>0]|0; $67 = ($66<<24>>24)!=(0); $68 = $67&1; $69 = (1108500 + ($14)|0); HEAP8[$69>>0] = $68; $70 = HEAP32[$3>>2]|0; HEAP32[$0>>2] = $70; STACKTOP = sp;return ($$0|0); } function _BlockDefs_DefineBlockCommonEnd($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP8[$0>>0]|0; $4 = ($1<<24>>24)==(0); if ($4) { $5 = $2&65535; $6 = (1124628 + ($5)|0); HEAP8[$6>>0] = $3; $$0 = 5; } else { $$0 = $3; } $7 = $2&65535; $8 = (1120788 + ($7)|0); HEAP8[$8>>0] = $$0; $9 = ((($0)) + 1|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==(0); $12 = $10&255; $13 = (($12) + 1)|0; $14 = (+($13|0)); $15 = $14 * 0.0078125; $spec$select = $11 ? 0.0 : $15; $16 = (1112340 + ($7<<2)|0); HEAPF32[$16>>2] = $spec$select; $17 = ((($0)) + 2|0); $18 = HEAP8[$17>>0]|0; $19 = $18&255; $20 = ((($0)) + 3|0); $21 = HEAP8[$20>>0]|0; $22 = $21&255; $23 = $22 << 8; $24 = ((($0)) + 4|0); $25 = HEAP8[$24>>0]|0; $26 = $25&255; $27 = $26 << 16; $28 = $23 | $19; $29 = $28 | $27; $30 = $29 | -16777216; $31 = (1109268 + ($7<<2)|0); HEAP32[$31>>2] = $30; return; } function _UNSAFE_GetString($0,$1) { $0 = $0|0; $1 = $1|0; var $$01216 = 0, $$2 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $$01216 = 63; L1: while(1) { $2 = (($1) + ($$01216)|0); $3 = HEAP8[$2>>0]|0; switch ($3<<24>>24) { case 32: case 0: { break; } default: { label = 3; break L1; } } $5 = (($$01216) + -1)|0; $6 = ($$01216|0)==(0); if ($6) { $$2 = 0; break; } else { $$01216 = $5; } } if ((label|0) == 3) { $4 = (($$01216) + 1)|0; $$2 = $4; } _String_Init_1644($0,$1,$$2); return; } function _BlockDefs_Tex($0) { $0 = $0|0; var $$0 = 0, $$08 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[$0>>2]|0; $2 = HEAP8[1972883]|0; $3 = ($2<<24>>24)==(0); if ($3) { $4 = ((($1)) + 1|0); $5 = HEAP8[$1>>0]|0; $6 = $5&255; $$0 = $4;$$08 = $6; HEAP32[$0>>2] = $$0; return ($$08|0); } else { $7 = (_Stream_GetU16_BE($1)|0); $8 = $7 & 511; $9 = ((($1)) + 2|0); $$0 = $9;$$08 = $8; HEAP32[$0>>2] = $$0; return ($$08|0); } } function _BlockDefs_OnBlockUpdated($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1103612)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } $4 = $0&65535; $5 = (1107732 + ($4)|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==($1<<24>>24); if ($7) { return; } _ClassicLighting_Refresh(); return; } function _String_Init_1644($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = $2&65535; HEAP32[$0>>2] = $1; $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); HEAP16[$$sroa$4$0$$sroa_idx2>>1] = $3; $$sroa$5$0$$sroa_idx4 = ((($0)) + 6|0); HEAP16[$$sroa$5$0$$sroa_idx4>>1] = 64; return; } function _CPE_ExtInfo($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _UNSAFE_GetString($1,$0); $2 = (_String_CaselessStarts($1,21004)|0); $3 = $2&255; HEAP8[1972886] = $3; _Chat_Add1(42147,$1); $4 = ((($0)) + 64|0); $5 = (_Stream_GetU16_BE($4)|0); $6 = $5&65535; $7 = HEAP32[482466]|0; $8 = (($7) + ($6))|0; HEAP32[482466] = $8; _CPE_SendCpeExtInfoReply(); STACKTOP = sp;return; } function _CPE_ExtEntry($0) { $0 = $0|0; var $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0; var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 8|0; $2 = sp; _UNSAFE_GetString($1,$0); $3 = ((($0)) + 67|0); $4 = HEAP8[$3>>0]|0; $5 = $4&255; HEAP32[$2>>2] = $5; _Platform_Log2(41620,$1,$2); $6 = HEAP32[482466]|0; $7 = (($6) + -1)|0; HEAP32[482466] = $7; _CPE_SendCpeExtInfoReply(); $8 = (_String_CaselessEqualsConst($1,41636)|0); $9 = ($8|0)==(0); if (!($9)) { HEAP8[1972884] = 1; STACKTOP = sp;return; } $10 = (_String_CaselessEqualsConst($1,41646)|0); $11 = ($10|0)==(0); if (!($11)) { HEAP8[1972885] = 1; STACKTOP = sp;return; } $12 = (_String_CaselessEqualsConst($1,41659)|0); $13 = ($12|0)==(0); if (!($13)) { HEAP8[(1949242)>>0] = 1; STACKTOP = sp;return; } $14 = (_String_CaselessEqualsConst($1,41673)|0); $15 = ($14|0)==(0); if (!($15)) { HEAP8[1972890] = 1; STACKTOP = sp;return; } $16 = (_String_CaselessEqualsConst($1,41690)|0); $17 = ($16|0)==(0); if (!($17)) { HEAP8[(1949243)>>0] = 1; STACKTOP = sp;return; } $18 = (_String_CaselessEqualsConst($1,41702)|0); $19 = ($18|0)==(0); if (!($19)) { $20 = HEAP32[$2>>2]|0; HEAP32[5249] = $20; $21 = ($20|0)==(1); if ($21) { STACKTOP = sp;return; } $22 = HEAP16[(1838736)>>1]|0; $23 = $22&65535; $24 = (($23) + 4)|0; $25 = $24&65535; HEAP16[(1838736)>>1] = $25; STACKTOP = sp;return; } $26 = (_String_CaselessEqualsConst($1,41719)|0); $27 = ($26|0)==(0); if (!($27)) { HEAP8[(1949244)>>0] = 1; STACKTOP = sp;return; } $28 = (_String_CaselessEqualsConst($1,41734)|0); $29 = ($28|0)==(0); if (!($29)) { HEAP8[(1949245)>>0] = 1; STACKTOP = sp;return; } $30 = (_String_CaselessEqualsConst($1,41744)|0); $31 = ($30|0)==(0); if (!($31)) { $32 = HEAP32[$2>>2]|0; HEAP32[5248] = $32; $33 = ($32|0)==(1); if ($33) { STACKTOP = sp;return; } $34 = HEAP16[(1838750)>>1]|0; $35 = $34&65535; $36 = (($35) + 3)|0; $37 = $36&65535; HEAP16[(1838750)>>1] = $37; STACKTOP = sp;return; } $38 = (_String_CaselessEqualsConst($1,41764)|0); $39 = ($38|0)==(0); if (!($39)) { $40 = HEAP16[(1838692)>>1]|0; $41 = $40&65535; $42 = (($41) + 6)|0; $43 = $42&65535; HEAP16[(1838692)>>1] = $43; $44 = HEAP16[(1838690)>>1]|0; $45 = $44&65535; $46 = (($45) + 6)|0; $47 = $46&65535; HEAP16[(1838690)>>1] = $47; $48 = HEAP16[(1838742)>>1]|0; $49 = $48&65535; $50 = (($49) + 6)|0; $51 = $50&65535; HEAP16[(1838742)>>1] = $51; $52 = HEAP16[(1838768)>>1]|0; $53 = $52&65535; $54 = (($53) + 6)|0; $55 = $54&65535; HEAP16[(1838768)>>1] = $55; $56 = HEAP16[(1838784)>>1]|0; $57 = $56&65535; $58 = (($57) + 6)|0; $59 = $58&65535; HEAP16[(1838784)>>1] = $59; HEAP8[1972887] = 1; STACKTOP = sp;return; } $60 = (_String_CaselessEqualsConst($1,41783)|0); $61 = ($60|0)==(0); if (!($61)) { HEAP8[1972888] = 1; STACKTOP = sp;return; } $62 = (_String_CaselessEqualsConst($1,41794)|0); $63 = ($62|0)==(0); if (!($63)) { $64 = HEAP16[(1838680)>>1]|0; $65 = $64&65535; $66 = (($65) + 4)|0; $67 = $66&65535; HEAP16[(1838680)>>1] = $67; HEAP8[1972889] = 1; STACKTOP = sp;return; } $68 = (_String_CaselessEqualsConst($1,41802)|0); $69 = ($68|0)==(0); if (!($69)) { $70 = HEAP32[$2>>2]|0; $71 = ($70|0)<(2); $72 = $71 ? $70 : 2; HEAP32[5250] = $72; $73 = ($70|0)==(2); if (!($73)) { STACKTOP = sp;return; } HEAP16[(1838778)>>1] = 167; STACKTOP = sp;return; } $74 = (_String_CaselessEqualsConst($1,41815)|0); $75 = ($74|0)==(0); if (!($75)) { STACKTOP = sp;return; } $76 = (_String_CaselessEqualsConst($1,41830)|0); $77 = ($76|0)==(0); if (!($77)) { $78 = HEAP16[(1838746)>>1]|0; $79 = $78&65535; $80 = (($79) + 3)|0; $81 = $80&65535; HEAP16[(1838746)>>1] = $81; $82 = HEAP16[(1838750)>>1]|0; $83 = $82&65535; $84 = (($83) + 6)|0; $85 = $84&65535; HEAP16[(1838750)>>1] = $85; HEAP8[1972883] = 1; STACKTOP = sp;return; } $86 = (_String_CaselessEqualsConst($1,41847)|0); $87 = ($86|0)==(0); $88 = HEAP8[1972841]|0; $89 = ($88<<24>>24)==(0); $or$cond = $87 | $89; if ($or$cond) { STACKTOP = sp;return; } HEAP8[1972882] = 1; $90 = HEAP16[(1838688)>>1]|0; $91 = $90&65535; $92 = (($91) + 1)|0; $93 = $92&65535; HEAP16[(1838688)>>1] = $93; $94 = HEAP16[(1838716)>>1]|0; $95 = $94&65535; $96 = (($95) + 1)|0; $97 = $96&65535; HEAP16[(1838716)>>1] = $97; $98 = HEAP16[(1838732)>>1]|0; $99 = $98&65535; $100 = (($99) + 1)|0; $101 = $100&65535; HEAP16[(1838732)>>1] = $101; $102 = HEAP16[(1838746)>>1]|0; $103 = $102&65535; $104 = (($103) + 1)|0; $105 = $104&65535; HEAP16[(1838746)>>1] = $105; $106 = HEAP16[(1838748)>>1]|0; $107 = $106&65535; $108 = (($107) + 1)|0; $109 = $108&65535; HEAP16[(1838748)>>1] = $109; $110 = HEAP16[(1838750)>>1]|0; $111 = $110&65535; $112 = (($111) + 1)|0; $113 = $112&65535; HEAP16[(1838750)>>1] = $113; $114 = HEAP16[(1838764)>>1]|0; $115 = $114&65535; $116 = (($115) + 2)|0; $117 = $116&65535; HEAP16[(1838764)>>1] = $117; $118 = HEAP16[(1838752)>>1]|0; $119 = $118&65535; $120 = (($119) + 64)|0; $121 = $120&65535; HEAP16[(1838752)>>1] = $121; $122 = HEAP16[(1838766)>>1]|0; $123 = $122&65535; $124 = (($123) + 1)|0; $125 = $124&65535; HEAP16[(1838766)>>1] = $125; STACKTOP = sp;return; } function _CPE_SetClickDistance($0) { $0 = $0|0; var $1 = 0, $2 = 0.0, $3 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Stream_GetU16_BE($0)|0); $2 = (+($1&65535)); $3 = $2 * 0.03125; HEAPF32[(1784296)>>2] = $3; return; } function _CPE_CustomBlockLevel($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; HEAP16[$1>>1] = 275; $2 = HEAP32[(1949208)>>2]|0; FUNCTION_TABLE_vii[$2 & 255]($1,2); HEAP8[1972837] = 1; _Event_RaiseVoid(1795088); STACKTOP = sp;return; } function _CPE_HoldThis($0) { $0 = $0|0; var $$0 = 0, $$05 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972882]|0; $2 = ($1<<24>>24)==(0); if ($2) { $6 = ((($0)) + 1|0); $7 = HEAP8[$0>>0]|0; $8 = $7&255; $$0 = $6;$$05 = $8; } else { $3 = (_Stream_GetU16_BE($0)|0); $4 = (($3&65535) % 768)&-1; $5 = ((($0)) + 2|0); $$0 = $5;$$05 = $4; } $9 = HEAP8[$$0>>0]|0; $10 = ($9<<24>>24)==(0); $11 = $10&1; HEAP8[(1811008)>>0] = 1; _Inventory_SetSelectedBlock($$05); HEAP8[(1811008)>>0] = $11; return; } function _CPE_SetTextHotkey($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = sp + 8|0; $3 = ((($0)) + 64|0); _UNSAFE_GetString($1,$3); $4 = ((($0)) + 128|0); $5 = (_Stream_GetU32_BE($4)|0); $6 = ((($0)) + 132|0); $7 = HEAP8[$6>>0]|0; HEAP8[$2>>0] = $7; $8 = ($5>>>0)>(255); if ($8) { STACKTOP = sp;return; } $9 = (5728 + ($5)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = ($10<<24>>24)==(0); if ($12) { STACKTOP = sp;return; } $13 = (5184 + ($11<<2)|0); $14 = HEAP32[$13>>2]|0; _Platform_Log3(41591,$14,$2,$1); $15 = ((($1)) + 4|0); $16 = HEAP16[$15>>1]|0; $17 = ($16<<16>>16)==(0); if ($17) { $18 = HEAP8[$2>>0]|0; (_Hotkeys_Remove($11,$18)|0); $19 = HEAP8[$2>>0]|0; _StoredHotkeys_Load($11,$19); STACKTOP = sp;return; } $20 = HEAP32[$1>>2]|0; $21 = $16&65535; $22 = (($21) + -1)|0; $23 = (($20) + ($22)|0); $24 = HEAP8[$23>>0]|0; $25 = ($24<<24>>24)==(10); if ($25) { $26 = (($16) + -1)<<16>>16; HEAP16[$15>>1] = $26; $27 = HEAP8[$2>>0]|0; _Hotkeys_Add($11,$27,$1,2); STACKTOP = sp;return; } else { $28 = HEAP8[$2>>0]|0; _Hotkeys_Add($11,$28,$1,3); STACKTOP = sp;return; } } function _CPE_ExtAddPlayerName($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 16|0; $2 = sp + 8|0; $3 = sp; $4 = ((($0)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = ((($0)) + 2|0); _UNSAFE_GetString($1,$6); $7 = ((($0)) + 66|0); _UNSAFE_GetString($2,$7); $8 = ((($0)) + 130|0); _UNSAFE_GetString($3,$8); $9 = ((($0)) + 194|0); $10 = HEAP8[$9>>0]|0; _RemoveEndPlus($1); _RemoveEndPlus($2); $11 = $5&255; $12 = $11 & 7; $13 = 1 << $12; $14 = $13 ^ 255; $15 = (3)?($11 >>> 3):($11); $16 = (1790544 + ($15)|0); $17 = HEAP8[$16>>0]|0; $18 = $17&255; $19 = $14 & $18; $20 = $19&255; HEAP8[$16>>0] = $20; _TabList_Set($5,$1,$2,$3,$10); STACKTOP = sp;return; } function _CPE_ExtAddEntity($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 8|0; $2 = sp; $3 = HEAP8[$0>>0]|0; $4 = ((($0)) + 1|0); _UNSAFE_GetString($1,$4); $5 = ((($0)) + 65|0); _UNSAFE_GetString($2,$5); _CheckName($3,$1,$2); $6 = ((($0)) + 129|0); _AddEntity($6,$3,$1,$2,0); STACKTOP = sp;return; } function _CPE_ExtRemovePlayerName($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1|0); $2 = HEAP8[$1>>0]|0; _TabList_Remove($2); return; } function _CPE_SetEnvCol($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; $2 = ((($0)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if ($4) { $5 = ((($0)) + 3|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); if ($7) { $8 = ((($0)) + 5|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)!=(0); $phitmp = $10&1; $25 = $phitmp; } else { $25 = 1; } } else { $25 = 1; } $11 = ((($0)) + 2|0); $12 = HEAP8[$11>>0]|0; $13 = $12&255; $14 = ((($0)) + 4|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 8; $18 = ((($0)) + 6|0); $19 = HEAP8[$18>>0]|0; $20 = $19&255; $21 = $20 << 16; $22 = $17 | $13; $23 = $22 | $21; $24 = $23 | -16777216; switch ($1<<24>>24) { case 0: { $26 = ($25<<24>>24)==(0); $27 = $26 ? $24 : -13159; _Env_SetSkyCol($27); return; } case 1: { $28 = ($25<<24>>24)==(0); $29 = $28 ? $24 : -1; _Env_SetCloudsCol($29); return; } case 2: { $30 = ($25<<24>>24)==(0); $31 = $30 ? $24 : -1; _Env_SetFogCol($31); return; } case 3: { $32 = ($25<<24>>24)==(0); $33 = $32 ? $24 : -6579301; _Env_SetShadowCol($33); return; } case 4: { $34 = ($25<<24>>24)==(0); $35 = $34 ? $24 : -1; _Env_SetSunCol($35); return; } case 5: { $36 = ($25<<24>>24)==(0); $37 = $36 ? $24 : -1; _Env_SetSkyboxCol($37); return; } default: { return; } } } function _CPE_MakeSelection($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 12|0; $2 = sp; $3 = ((($0)) + 65|0); $4 = (_Stream_GetU16_BE($3)|0); $5 = $4 << 16 >> 16; HEAP32[$1>>2] = $5; $6 = ((($0)) + 67|0); $7 = (_Stream_GetU16_BE($6)|0); $8 = $7 << 16 >> 16; $9 = ((($1)) + 4|0); HEAP32[$9>>2] = $8; $10 = ((($0)) + 69|0); $11 = (_Stream_GetU16_BE($10)|0); $12 = $11 << 16 >> 16; $13 = ((($1)) + 8|0); HEAP32[$13>>2] = $12; $14 = ((($0)) + 71|0); $15 = (_Stream_GetU16_BE($14)|0); $16 = $15 << 16 >> 16; HEAP32[$2>>2] = $16; $17 = ((($0)) + 73|0); $18 = (_Stream_GetU16_BE($17)|0); $19 = $18 << 16 >> 16; $20 = ((($2)) + 4|0); HEAP32[$20>>2] = $19; $21 = ((($0)) + 75|0); $22 = (_Stream_GetU16_BE($21)|0); $23 = $22 << 16 >> 16; $24 = ((($2)) + 8|0); HEAP32[$24>>2] = $23; $25 = ((($0)) + 78|0); $26 = HEAP8[$25>>0]|0; $27 = $26&255; $28 = ((($0)) + 80|0); $29 = HEAP8[$28>>0]|0; $30 = $29&255; $31 = $30 << 8; $32 = $31 | $27; $33 = ((($0)) + 82|0); $34 = HEAP8[$33>>0]|0; $35 = $34&255; $36 = $35 << 16; $37 = $32 | $36; $38 = ((($0)) + 84|0); $39 = HEAP8[$38>>0]|0; $40 = $39&255; $41 = $40 << 24; $42 = $37 | $41; $43 = HEAP8[$0>>0]|0; _Selections_Add($43,$1,$2,$42); STACKTOP = sp;return; } function _CPE_RemoveSelection($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; _Selections_Remove($1); return; } function _CPE_SetBlockPermission($0) { $0 = $0|0; var $$0 = 0, $$06 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972882]|0; $2 = ($1<<24>>24)==(0); if ($2) { $7 = ((($0)) + 1|0); $8 = HEAP8[$0>>0]|0; $9 = $8&255; $$0 = $9;$$06 = $7; } else { $3 = (_Stream_GetU16_BE($0)|0); $4 = (($3&65535) % 768)&-1; $5 = $4&65535; $6 = ((($0)) + 2|0); $$0 = $5;$$06 = $6; } $10 = ((($$06)) + 1|0); $11 = HEAP8[$$06>>0]|0; $12 = ($11<<24>>24)!=(0); $13 = $12&1; $14 = (1171476 + ($$0)|0); HEAP8[$14>>0] = $13; $15 = HEAP8[$10>>0]|0; $16 = ($15<<24>>24)!=(0); $17 = $16&1; $18 = (1172244 + ($$0)|0); HEAP8[$18>>0] = $17; _Event_RaiseVoid(1795088); return; } function _CPE_ChangeModel($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = HEAP8[$0>>0]|0; $3 = ((($0)) + 1|0); _UNSAFE_GetString($1,$3); $4 = $2&255; $5 = (1782744 + ($4<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(0|0); if ($7) { STACKTOP = sp;return; } _Entity_SetModel($6,$1); STACKTOP = sp;return; } function _CPE_EnvSetMapAppearance($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; _CPE_SetMapEnvUrl($0); $1 = ((($0)) + 64|0); $2 = HEAP8[$1>>0]|0; $3 = $2&255; _Env_SetSidesBlock($3); $4 = ((($0)) + 65|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; _Env_SetEdgeBlock($6); $7 = ((($0)) + 66|0); $8 = (_Stream_GetU16_BE($7)|0); $9 = $8 << 16 >> 16; _Env_SetEdgeHeight($9); $10 = HEAP32[5249]|0; $11 = ($10|0)==(1); if ($11) { return; } $12 = ((($0)) + 68|0); $13 = (_Stream_GetU16_BE($12)|0); $14 = $13 << 16 >> 16; _Env_SetCloudsHeight($14); $15 = ((($0)) + 70|0); $16 = (_Stream_GetU16_BE($15)|0); $17 = $16 << 16 >> 16; $18 = ($16<<16>>16)<(1); $19 = $18 ? 32768 : $17; HEAP32[3584] = $19; $20 = HEAP32[3583]|0; _Game_SetViewDistance($20); return; } function _CPE_EnvWeatherType($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; $2 = $1&255; _Env_SetWeather($2); return; } function _CPE_HackControl($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; $2 = ($1<<24>>24)!=(0); $3 = $2&1; HEAP8[(1784314)>>0] = $3; $4 = ((($0)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)!=(0); $7 = $6&1; HEAP8[(1784316)>>0] = $7; $8 = ((($0)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)!=(0); $11 = $10&1; HEAP8[(1784313)>>0] = $11; $12 = ((($0)) + 3|0); $13 = HEAP8[$12>>0]|0; $14 = ($13<<24>>24)!=(0); $15 = $14&1; HEAP8[(1784315)>>0] = $15; $16 = ((($0)) + 4|0); $17 = HEAP8[$16>>0]|0; $18 = ($17<<24>>24)!=(0); $19 = $18&1; HEAP8[(1784312)>>0] = $19; _HacksComp_Update((1784300)); $20 = ((($0)) + 5|0); $21 = (_Stream_GetU16_BE($20)|0); $22 = ($21<<16>>16)==(-1); if ($22) { _LocalPlayer_ResetJumpVelocity(); return; } else { $23 = (+($21&65535)); $24 = $23 * 0.03125; $25 = (+_PhysicsComp_CalcJumpVelocity($24)); HEAPF32[(1784592)>>2] = $25; HEAPF32[(1784600)>>2] = $25; return; } } function _CPE_ExtAddEntity2($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 8|0; $2 = sp; $3 = HEAP8[$0>>0]|0; $4 = ((($0)) + 1|0); _UNSAFE_GetString($1,$4); $5 = ((($0)) + 65|0); _UNSAFE_GetString($2,$5); _CheckName($3,$1,$2); $6 = ((($0)) + 129|0); _AddEntity($6,$3,$1,$2,1); STACKTOP = sp;return; } function _CPE_BulkBlockUpdate($0) { $0 = $0|0; var $$05257 = 0, $$058 = 0, $$156 = 0, $$255 = 0, $$354 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0; var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $8 = 0; var $9 = 0, $exitcond = 0, $exitcond59 = 0, $exitcond60 = 0, $or$cond = 0, $scevgep = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 1536|0; $1 = sp + 512|0; $2 = sp; $3 = ((($0)) + 1|0); $4 = HEAP8[$0>>0]|0; $5 = $4&255; $6 = $5 << 2; $7 = (($6) + 5)|0; $$05257 = 0;$$058 = $3; while(1) { $8 = (_Stream_GetU32_BE($$058)|0); $9 = (($1) + ($$05257<<2)|0); HEAP32[$9>>2] = $8; $10 = ((($$058)) + 4|0); $11 = (($$05257) + 1)|0; $exitcond60 = ($$05257|0)==($5|0); if ($exitcond60) { break; } else { $$05257 = $11;$$058 = $10; } } $scevgep = (($0) + ($7)|0); $12 = $5 << 2; $13 = $12 ^ 1020; $14 = (($scevgep) + ($13)|0); $$156 = 0; while(1) { $15 = (($14) + ($$156)|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = (($2) + ($$156<<1)|0); HEAP16[$18>>1] = $17; $19 = (($$156) + 1)|0; $exitcond59 = ($$156|0)==($5|0); if ($exitcond59) { break; } else { $$156 = $19; } } $20 = ((($14)) + 256|0); $21 = HEAP8[1972882]|0; $22 = ($21<<24>>24)==(0); if (!($22)) { $$255 = 0; while(1) { $23 = (2)?($$255 >>> 2):($$255); $24 = (($20) + ($23)|0); $25 = HEAP8[$24>>0]|0; $26 = $25&255; $27 = $26 << 8; $28 = $27 & 768; $29 = (($2) + ($$255<<1)|0); $30 = HEAP16[$29>>1]|0; $31 = $30&65535; $32 = $28 | $31; $33 = $32&65535; HEAP16[$29>>1] = $33; $34 = $26 << 6; $35 = $34 & 768; $36 = $$255 | 1; $37 = (($2) + ($36<<1)|0); $38 = HEAP16[$37>>1]|0; $39 = $38&65535; $40 = $35 | $39; $41 = $40&65535; HEAP16[$37>>1] = $41; $42 = $26 << 4; $43 = $42 & 768; $44 = $$255 | 2; $45 = (($2) + ($44<<1)|0); $46 = HEAP16[$45>>1]|0; $47 = $46&65535; $48 = $43 | $47; $49 = $48&65535; HEAP16[$45>>1] = $49; $50 = $26 << 2; $51 = $50 & 768; $52 = $$255 | 3; $53 = (($2) + ($52<<1)|0); $54 = HEAP16[$53>>1]|0; $55 = $54&65535; $56 = $51 | $55; $57 = $56&65535; HEAP16[$53>>1] = $57; $58 = (($$255) + 4)|0; $59 = ($58>>>0)>($5>>>0); if ($59) { break; } else { $$255 = $58; } } } $$354 = 0; while(1) { $60 = (($1) + ($$354<<2)|0); $61 = HEAP32[$60>>2]|0; $62 = ($61|0)>(-1); $63 = HEAP32[(1103560)>>2]|0; $64 = ($61|0)<($63|0); $or$cond = $62 & $64; if ($or$cond) { $65 = HEAP32[(1103564)>>2]|0; $66 = (($61|0) / ($65|0))&-1; $67 = Math_imul($66, $65)|0; $68 = (($61) - ($67))|0; $69 = HEAP32[(1103572)>>2]|0; $70 = (($66|0) / ($69|0))&-1; $71 = Math_imul($70, $69)|0; $72 = (($66) - ($71))|0; $73 = (($2) + ($$354<<1)|0); $74 = HEAP16[$73>>1]|0; $75 = (($74&65535) % 768)&-1; _Game_UpdateBlock($68,$70,$72,$75); } $76 = (($$354) + 1)|0; $exitcond = ($$354|0)==($5|0); if ($exitcond) { break; } else { $$354 = $76; } } STACKTOP = sp;return; } function _CPE_SetTextColor($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP8[$1>>0]|0; $3 = $2&255; switch ($2<<24>>24) { case 38: case 37: case -1: case 32: case 0: { return; } default: { } } $4 = ((($0)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; $7 = $6 << 8; $8 = HEAP8[$0>>0]|0; $9 = $8&255; $10 = $7 | $9; $11 = ((($0)) + 2|0); $12 = HEAP8[$11>>0]|0; $13 = $12&255; $14 = $13 << 16; $15 = $10 | $14; $16 = ((($0)) + 3|0); $17 = HEAP8[$16>>0]|0; $18 = $17&255; $19 = $18 << 24; $20 = $15 | $19; $21 = (1781708 + ($3<<2)|0); HEAP32[$21>>2] = $20; _Event_RaiseInt((1797428),$3); return; } function _CPE_SetMapEnvUrl($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _UNSAFE_GetString($1,$0); $2 = ((($1)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if (!($4)) { $5 = (_Utils_IsUrlPrefix($1)|0); $6 = ($5<<24>>24)==(0); if ($6) { _Platform_Log1(41579,$1); STACKTOP = sp;return; } } _Server_RetrieveTexturePack($1); _Platform_Log1(41579,$1); STACKTOP = sp;return; } function _CPE_SetMapEnvProperty($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0.0; var $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1|0); $2 = (_Stream_GetU32_BE($1)|0); $3 = ($2|0)>(-16777215); $4 = $3 ? $2 : -16777215; $5 = ($4|0)<(16777215); $6 = $5 ? $4 : 16777215; $7 = HEAP8[$0>>0]|0; do { switch ($7<<24>>24) { case 0: { $8 = ($6|0)>(0); $9 = $8 ? $6 : 0; $10 = ($9|0)<(767); $11 = $10 ? $9 : 767; $12 = $11&65535; _Env_SetSidesBlock($12); return; } case 1: { $13 = ($6|0)>(0); $14 = $13 ? $6 : 0; $15 = ($14|0)<(767); $16 = $15 ? $14 : 767; $17 = $16&65535; _Env_SetEdgeBlock($17); return; } case 2: { _Env_SetEdgeHeight($6); return; } case 3: { _Env_SetCloudsHeight($6); return; } case 4: { $18 = ($6|0)>(-32767); $19 = $18 ? $6 : -32767; $20 = ($19|0)<(32767); $21 = $20 ? $19 : 32767; $22 = ($21|0)<(1); $23 = $22 ? 32768 : $21; HEAP32[3584] = $23; $24 = HEAP32[3583]|0; _Game_SetViewDistance($24); return; } case 5: { $25 = (+($6|0)); $26 = $25 * 0.00390625; _Env_SetCloudsSpeed($26); return; } case 6: { $27 = (+($6|0)); $28 = $27 * 0.00390625; _Env_SetWeatherSpeed($28); return; } case 7: { $29 = (+($6|0)); $30 = $29 * 0.0078125; _Env_SetWeatherFade($30); return; } case 8: { $31 = ($6|0)!=(0); $32 = $31&1; _Env_SetExpFog($32); return; } case 9: { _Env_SetSidesOffset($6); return; } case 10: { $33 = (+($6|0)); $34 = $33 * 9.765625E-4; _Env_SetSkyboxHorSpeed($34); return; } case 11: { $35 = (+($6|0)); $36 = $35 * 9.765625E-4; _Env_SetSkyboxVerSpeed($36); return; } default: { return; } } } while(0); } function _CPE_SetEntityProperty($0) { $0 = $0|0; var $$ = 0.0, $$0 = 0.0, $$sink = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0.0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; $2 = HEAP8[$0>>0]|0; $3 = ((($0)) + 1|0); $4 = HEAP8[$3>>0]|0; $5 = ((($0)) + 2|0); $6 = (_Stream_GetU32_BE($5)|0); $7 = $2&255; $8 = (1782744 + ($7<<2)|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)==(0|0); if ($10) { STACKTOP = sp;return; } switch ($4<<24>>24) { case 0: { $11 = ((($1)) + 28|0); HEAP8[$11>>0] = -120; $12 = (+($6|0)); $13 = ((($1)) + 20|0); HEAPF32[$13>>2] = $12; break; } case 1: { $14 = ((($1)) + 28|0); HEAP8[$14>>0] = -124; $15 = (+($6|0)); $16 = ((($1)) + 16|0); HEAPF32[$16>>2] = $15; break; } case 2: { $17 = ((($1)) + 28|0); HEAP8[$17>>0] = -112; $18 = (+($6|0)); $19 = ((($1)) + 24|0); HEAPF32[$19>>2] = $18; break; } case 5: case 4: case 3: { $20 = (+($6|0)); $21 = $20 / 1000.0; $22 = ((($9)) + 54|0); $23 = HEAP8[$22>>0]|0; $24 = ($23<<24>>24)==(0); if ($24) { $$0 = $21; } else { $25 = $21 < 0.0099999997764825821; $26 = $25 ? 0.0099999997764825821 : $21; $27 = ((($9)) + 48|0); $28 = HEAP32[$27>>2]|0; $29 = ((($28)) + 84|0); $30 = +HEAPF32[$29>>2]; $31 = $26 > $30; $$ = $31 ? $30 : $26; $$0 = $$; } switch ($4<<24>>24) { case 3: { $32 = ((($9)) + 80|0); $$sink = $32; label = 12; break; } case 4: { $33 = ((($9)) + 84|0); $$sink = $33; label = 12; break; } case 5: { $34 = ((($9)) + 88|0); $$sink = $34; label = 12; break; } default: { } } if ((label|0) == 12) { HEAPF32[$$sink>>2] = $$0; } _Entity_UpdateModelBounds($9); STACKTOP = sp;return; } default: { STACKTOP = sp;return; } } $35 = HEAP32[$9>>2]|0; $36 = ((($35)) + 8|0); $37 = HEAP32[$36>>2]|0; FUNCTION_TABLE_vii[$37 & 255]($9,$1); STACKTOP = sp;return; } function _CPE_TwoWayPing($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; $2 = HEAP8[$0>>0]|0; $3 = ((($0)) + 1|0); $4 = (_Stream_GetU16_BE($3)|0); $5 = $4&65535; $6 = ($2<<24>>24)==(0); if ($6) { _Ping_Update($5); STACKTOP = sp;return; } else { $7 = (_CPE_WriteTwoWayPing($1,1,$5)|0); $8 = HEAP32[(1949208)>>2]|0; $9 = $7; $10 = $1; $11 = (($9) - ($10))|0; FUNCTION_TABLE_vii[$8 & 255]($1,$11); STACKTOP = sp;return; } } function _CPE_SetInventoryOrder($0) { $0 = $0|0; var $$0 = 0, $$010 = 0, $$011 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972882]|0; $2 = ($1<<24>>24)==(0); if ($2) { $6 = ((($0)) + 1|0); $7 = HEAP8[$0>>0]|0; $8 = $7&255; $$010 = $8;$$011 = $6; } else { $3 = (_Stream_GetU16_BE($0)|0); $4 = (($3&65535) % 768)&-1; $5 = ((($0)) + 2|0); $$010 = $4;$$011 = $5; } $9 = HEAP8[1972882]|0; $10 = ($9<<24>>24)==(0); if ($10) { $13 = HEAP8[$$011>>0]|0; $14 = $13&255; $$0 = $14; } else { $11 = (_Stream_GetU16_BE($$011)|0); $12 = (($11&65535) % 768)&-1; $$0 = $12; } _Inventory_Remove($$010); $15 = ($$0<<16>>16)==(0); if ($15) { return; } $16 = $$0&65535; $17 = (($16) + -1)|0; $18 = (1809462 + ($17<<1)|0); HEAP16[$18>>1] = $$010; return; } function _CPE_SetHotbar($0) { $0 = $0|0; var $$0 = 0, $$06 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972882]|0; $2 = ($1<<24>>24)==(0); if ($2) { $6 = ((($0)) + 1|0); $7 = HEAP8[$0>>0]|0; $8 = $7&255; $$0 = $6;$$06 = $8; } else { $3 = (_Stream_GetU16_BE($0)|0); $4 = (($3&65535) % 768)&-1; $5 = ((($0)) + 2|0); $$0 = $5;$$06 = $4; } $9 = HEAP8[$$0>>0]|0; $10 = ($9&255)>(8); if ($10) { return; } $11 = $9&255; $12 = HEAP32[(1811004)>>2]|0; $13 = (($12) + ($11))|0; $14 = (1809300 + ($13<<1)|0); HEAP16[$14>>1] = $$06; return; } function _CPE_SetSpawnPoint($0) { $0 = $0|0; var $$0 = 0, $$024 = 0, $$025 = 0, $$sink = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0.0; var $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972887]|0; $2 = ($1<<24>>24)==(0); if ($2) { $8 = (_Stream_GetU16_BE($0)|0); $9 = $8 << 16 >> 16; $10 = ((($0)) + 2|0); $11 = (_Stream_GetU16_BE($10)|0); $12 = $11 << 16 >> 16; $13 = ((($0)) + 4|0); $14 = (_Stream_GetU16_BE($13)|0); $15 = $14 << 16 >> 16; $$0 = $15;$$024 = $12;$$025 = $9;$$sink = 6; } else { $3 = (_Stream_GetU32_BE($0)|0); $4 = ((($0)) + 4|0); $5 = (_Stream_GetU32_BE($4)|0); $6 = ((($0)) + 8|0); $7 = (_Stream_GetU32_BE($6)|0); $$0 = $7;$$024 = $5;$$025 = $3;$$sink = 12; } $16 = (($0) + ($$sink)|0); $17 = ((($16)) + 1|0); $18 = HEAP8[$16>>0]|0; $19 = (+($18&255)); $20 = $19 * 360.0; $21 = $20 * 0.00390625; HEAPF32[(1784288)>>2] = $21; $22 = HEAP8[$17>>0]|0; $23 = (+($22&255)); $24 = $23 * 360.0; $25 = $24 * 0.00390625; HEAPF32[(1784292)>>2] = $25; $26 = (($$024) + -51)|0; $27 = (+($$025|0)); $28 = $27 * 0.03125; HEAPF32[(1784264)>>2] = $28; $29 = (+($26|0)); $30 = $29 * 0.03125; HEAPF32[(1784268)>>2] = $30; $31 = (+($$0|0)); $32 = $31 * 0.03125; HEAPF32[(1784272)>>2] = $32; return; } function _CPE_VelocityControl($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 12|0); $2 = HEAP8[$1>>0]|0; _CalcVelocity((1783808),$0,$2); $3 = ((($0)) + 4|0); $4 = ((($0)) + 13|0); $5 = HEAP8[$4>>0]|0; _CalcVelocity((1783812),$3,$5); $6 = ((($0)) + 8|0); $7 = ((($0)) + 14|0); $8 = HEAP8[$7>>0]|0; _CalcVelocity((1783816),$6,$8); return; } function _CPE_DefineEffect($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0.0, $61 = 0.0, $62 = 0, $63 = 0; var $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0.0, $81 = 0.0; var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; $2 = $1&255; $3 = ((($0)) + 1|0); $4 = HEAP8[$3>>0]|0; $5 = (+($4&255)); $6 = $5 * 0.00390625; $7 = (941184 + (($2*52)|0)|0); HEAPF32[$7>>2] = $6; $8 = ((($0)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = (+($9&255)); $11 = $10 * 0.00390625; $12 = (((941184 + (($2*52)|0)|0)) + 4|0); HEAPF32[$12>>2] = $11; $13 = ((($0)) + 3|0); $14 = HEAP8[$13>>0]|0; $15 = $14&255; $16 = (($15) + 1)|0; $17 = (+($16|0)); $18 = $17 * 0.00390625; $19 = (((941184 + (($2*52)|0)|0)) + 8|0); HEAPF32[$19>>2] = $18; $20 = ((($0)) + 4|0); $21 = HEAP8[$20>>0]|0; $22 = $21&255; $23 = (($22) + 1)|0; $24 = (+($23|0)); $25 = $24 * 0.00390625; $26 = (((941184 + (($2*52)|0)|0)) + 12|0); HEAPF32[$26>>2] = $25; $27 = ((($0)) + 5|0); $28 = HEAP8[$27>>0]|0; $29 = $28&255; $30 = ((($0)) + 6|0); $31 = HEAP8[$30>>0]|0; $32 = $31&255; $33 = $32 << 8; $34 = ((($0)) + 7|0); $35 = HEAP8[$34>>0]|0; $36 = $35&255; $37 = $36 << 16; $38 = $33 | $29; $39 = $38 | $37; $40 = $39 | -16777216; $41 = (((941184 + (($2*52)|0)|0)) + 16|0); HEAP32[$41>>2] = $40; $42 = ((($0)) + 8|0); $43 = HEAP8[$42>>0]|0; $44 = (((941184 + (($2*52)|0)|0)) + 20|0); HEAP8[$44>>0] = $43; $45 = ((($0)) + 9|0); $46 = HEAP8[$45>>0]|0; $47 = (((941184 + (($2*52)|0)|0)) + 21|0); HEAP8[$47>>0] = $46; $48 = ((($0)) + 10|0); $49 = HEAP8[$48>>0]|0; $50 = (+($49&255)); $51 = $50 * 0.03125; $52 = (((941184 + (($2*52)|0)|0)) + 24|0); HEAPF32[$52>>2] = $51; $53 = ((($0)) + 11|0); $54 = (_Stream_GetU32_BE($53)|0); $55 = (+($54|0)); $56 = $55 / 1.0E+4; $57 = (((941184 + (($2*52)|0)|0)) + 28|0); HEAPF32[$57>>2] = $56; $58 = ((($0)) + 15|0); $59 = (_Stream_GetU16_BE($58)|0); $60 = (+($59&65535)); $61 = $60 * 0.03125; $62 = (((941184 + (($2*52)|0)|0)) + 32|0); HEAPF32[$62>>2] = $61; $63 = ((($0)) + 17|0); $64 = (_Stream_GetU32_BE($63)|0); $65 = (+($64|0)); $66 = $65 / 1.0E+4; $67 = (((941184 + (($2*52)|0)|0)) + 36|0); HEAPF32[$67>>2] = $66; $68 = ((($0)) + 21|0); $69 = (_Stream_GetU32_BE($68)|0); $70 = (+($69|0)); $71 = $70 / 1.0E+4; $72 = (((941184 + (($2*52)|0)|0)) + 40|0); HEAPF32[$72>>2] = $71; $73 = ((($0)) + 25|0); $74 = (_Stream_GetU32_BE($73)|0); $75 = (+($74|0)); $76 = $75 / 1.0E+4; $77 = (((941184 + (($2*52)|0)|0)) + 44|0); HEAPF32[$77>>2] = $76; $78 = ((($0)) + 29|0); $79 = (_Stream_GetU32_BE($78)|0); $80 = (+($79|0)); $81 = $80 / 1.0E+4; $82 = (((941184 + (($2*52)|0)|0)) + 48|0); HEAPF32[$82>>2] = $81; $83 = ((($0)) + 33|0); $84 = HEAP8[$83>>0]|0; $85 = (((941184 + (($2*52)|0)|0)) + 22|0); HEAP8[$85>>0] = $84; $86 = ((($0)) + 34|0); $87 = HEAP8[$86>>0]|0; $88 = (((941184 + (($2*52)|0)|0)) + 23|0); HEAP8[$88>>0] = $87; return; } function _CPE_SpawnEffect($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0, $3 = 0.0; var $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1|0); $2 = (_Stream_GetU32_BE($1)|0); $3 = (+($2|0)); $4 = $3 * 0.03125; $5 = ((($0)) + 5|0); $6 = (_Stream_GetU32_BE($5)|0); $7 = (+($6|0)); $8 = $7 * 0.03125; $9 = ((($0)) + 9|0); $10 = (_Stream_GetU32_BE($9)|0); $11 = (+($10|0)); $12 = $11 * 0.03125; $13 = ((($0)) + 13|0); $14 = (_Stream_GetU32_BE($13)|0); $15 = (+($14|0)); $16 = $15 * 0.03125; $17 = ((($0)) + 17|0); $18 = (_Stream_GetU32_BE($17)|0); $19 = (+($18|0)); $20 = $19 * 0.03125; $21 = ((($0)) + 21|0); $22 = (_Stream_GetU32_BE($21)|0); $23 = (+($22|0)); $24 = $23 * 0.03125; $25 = HEAP8[$0>>0]|0; $26 = $25&255; _Particles_CustomEffect($26,$4,$8,$12,$16,$20,$24); return; } function _CPE_DefineModel($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0; var $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0; var $46 = 0.0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = sp + 8|0; $3 = HEAP8[$0>>0]|0; $4 = $3&255; $5 = (400832 + (($4*7388)|0)|0); $6 = ($3&255)>(63); if ($6) { STACKTOP = sp;return; } _CustomModel_Undefine($5); _Model_Init($5); $7 = ((($0)) + 1|0); _UNSAFE_GetString($1,$7); $8 = (((400832 + (($4*7388)|0)|0)) + 100|0); _String_CopyToRaw($8,65,$1); $9 = ((($0)) + 65|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = $11 & 1; $13 = $12&255; $14 = (((400832 + (($4*7388)|0)|0)) + 43|0); HEAP8[$14>>0] = $13; $15 = $11 & 2; $16 = $15&255; $17 = (((400832 + (($4*7388)|0)|0)) + 47|0); HEAP8[$17>>0] = $16; $18 = $11 & 4; $19 = $18&255; $20 = (((400832 + (($4*7388)|0)|0)) + 46|0); HEAP8[$20>>0] = $19; $21 = $11 & 8; $22 = $21&255; $23 = (((400832 + (($4*7388)|0)|0)) + 45|0); HEAP8[$23>>0] = $22; $24 = ((($0)) + 66|0); $25 = (+_GetFloat($24)); $26 = (((400832 + (($4*7388)|0)|0)) + 168|0); HEAPF32[$26>>2] = $25; $27 = ((($0)) + 70|0); $28 = (+_GetFloat($27)); $29 = (((400832 + (($4*7388)|0)|0)) + 172|0); HEAPF32[$29>>2] = $28; $30 = ((($0)) + 74|0); $31 = (+_GetFloat($30)); $32 = (((400832 + (($4*7388)|0)|0)) + 176|0); HEAPF32[$32>>2] = $31; $33 = ((($0)) + 78|0); $34 = (+_GetFloat($33)); $35 = (((400832 + (($4*7388)|0)|0)) + 180|0); HEAPF32[$35>>2] = $34; $36 = ((($0)) + 82|0); $37 = (+_GetFloat($36)); $38 = (((400832 + (($4*7388)|0)|0)) + 184|0); HEAPF32[$38>>2] = $37; $39 = ((($0)) + 86|0); $40 = (+_GetFloat($39)); $41 = (((400832 + (($4*7388)|0)|0)) + 188|0); HEAPF32[$41>>2] = $40; $42 = ((($0)) + 90|0); $43 = (+_GetFloat($42)); $44 = (((400832 + (($4*7388)|0)|0)) + 192|0); HEAPF32[$44>>2] = $43; $45 = ((($0)) + 94|0); $46 = (+_GetFloat($45)); $47 = (((400832 + (($4*7388)|0)|0)) + 196|0); HEAPF32[$47>>2] = $46; $48 = ((($0)) + 98|0); $49 = (+_GetFloat($48)); $50 = (((400832 + (($4*7388)|0)|0)) + 200|0); HEAPF32[$50>>2] = $49; $51 = ((($0)) + 102|0); $52 = (+_GetFloat($51)); $53 = (((400832 + (($4*7388)|0)|0)) + 204|0); HEAPF32[$53>>2] = $52; $54 = ((($0)) + 106|0); $55 = (+_GetFloat($54)); $56 = (((400832 + (($4*7388)|0)|0)) + 208|0); HEAPF32[$56>>2] = $55; $57 = ((($0)) + 110|0); $58 = (_Stream_GetU16_BE($57)|0); $59 = (((400832 + (($4*7388)|0)|0)) + 212|0); HEAP16[$59>>1] = $58; $60 = ((($0)) + 112|0); $61 = (_Stream_GetU16_BE($60)|0); $62 = (((400832 + (($4*7388)|0)|0)) + 214|0); HEAP16[$62>>1] = $61; $63 = ((($0)) + 114|0); $64 = HEAP8[$63>>0]|0; $65 = ($64&255)>(64); if ($65) { HEAP32[$2>>2] = 64; _Chat_Add2(41512,$1,$2); STACKTOP = sp;return; } else { $66 = $64&255; $67 = (((400832 + (($4*7388)|0)|0)) + 216|0); HEAP8[$67>>0] = $64; $68 = ($66*24)|0; $69 = (_Mem_AllocCleared($68,16,41558)|0); $70 = (((400832 + (($4*7388)|0)|0)) + 4|0); HEAP32[$70>>2] = $69; $71 = (((400832 + (($4*7388)|0)|0)) + 166|0); HEAP8[$71>>0] = 1; STACKTOP = sp;return; } } function _CPE_DefineModelPart($0) { $0 = $0|0; var $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0.0, $106 = 0, $107 = 0, $108 = 0.0, $109 = 0, $11 = 0, $110 = 0, $111 = 0.0, $112 = 0, $113 = 0, $114 = 0.0, $115 = 0, $116 = 0; var $117 = 0.0, $118 = 0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0; var $135 = 0, $136 = 0.0, $137 = 0, $138 = 0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0, $142 = 0.0, $143 = 0, $144 = 0, $145 = 0.0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0.0, $150 = 0, $151 = 0, $152 = 0; var $153 = 0, $154 = 0.0, $155 = 0, $156 = 0, $157 = 0.0, $158 = 0, $159 = 0, $16 = 0, $160 = 0.0, $161 = 0, $162 = 0, $163 = 0.0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0.0, $170 = 0; var $171 = 0, $172 = 0.0, $173 = 0, $174 = 0, $175 = 0.0, $176 = 0, $177 = 0, $178 = 0.0, $179 = 0, $18 = 0, $180 = 0, $181 = 0.0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0; var $19 = 0, $190 = 0.0, $191 = 0, $192 = 0, $193 = 0.0, $194 = 0, $195 = 0, $196 = 0.0, $197 = 0, $198 = 0, $199 = 0.0, $2 = 0, $20 = 0.0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $21 = 0, $22 = 0; var $23 = 0.0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0; var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0; var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0; var $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $1 = sp; $2 = HEAP8[$0>>0]|0; $3 = $2&255; $4 = (400832 + (($3*7388)|0)|0); $5 = ($2&255)>(63); if ($5) { STACKTOP = sp;return; } $6 = (((400832 + (($3*7388)|0)|0)) + 166|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); if ($8) { STACKTOP = sp;return; } $9 = (((400832 + (($3*7388)|0)|0)) + 217|0); $10 = HEAP8[$9>>0]|0; $11 = (((400832 + (($3*7388)|0)|0)) + 216|0); $12 = HEAP8[$11>>0]|0; $13 = ($10&255)<($12&255); if (!($13)) { STACKTOP = sp;return; } $14 = ((($0)) + 1|0); $15 = (+_GetFloat($14)); HEAPF32[$1>>2] = $15; $16 = ((($0)) + 5|0); $17 = (+_GetFloat($16)); $18 = ((($1)) + 4|0); HEAPF32[$18>>2] = $17; $19 = ((($0)) + 9|0); $20 = (+_GetFloat($19)); $21 = ((($1)) + 8|0); HEAPF32[$21>>2] = $20; $22 = ((($0)) + 13|0); $23 = (+_GetFloat($22)); $24 = ((($1)) + 12|0); HEAPF32[$24>>2] = $23; $25 = ((($0)) + 17|0); $26 = (+_GetFloat($25)); $27 = ((($1)) + 16|0); HEAPF32[$27>>2] = $26; $28 = ((($0)) + 21|0); $29 = (+_GetFloat($28)); $30 = ((($1)) + 20|0); HEAPF32[$30>>2] = $29; $31 = ((($0)) + 25|0); $32 = (_Stream_GetU16_BE($31)|0); $33 = ((($1)) + 24|0); HEAP16[$33>>1] = $32; $34 = ((($0)) + 27|0); $35 = (_Stream_GetU16_BE($34)|0); $36 = ((($1)) + 36|0); HEAP16[$36>>1] = $35; $37 = ((($0)) + 29|0); $38 = (_Stream_GetU16_BE($37)|0); $39 = ((($1)) + 48|0); HEAP16[$39>>1] = $38; $40 = ((($0)) + 31|0); $41 = (_Stream_GetU16_BE($40)|0); $42 = ((($1)) + 60|0); HEAP16[$42>>1] = $41; $43 = ((($0)) + 33|0); $44 = (_Stream_GetU16_BE($43)|0); $45 = ((($1)) + 26|0); HEAP16[$45>>1] = $44; $46 = ((($0)) + 35|0); $47 = (_Stream_GetU16_BE($46)|0); $48 = ((($1)) + 38|0); HEAP16[$48>>1] = $47; $49 = ((($0)) + 37|0); $50 = (_Stream_GetU16_BE($49)|0); $51 = ((($1)) + 50|0); HEAP16[$51>>1] = $50; $52 = ((($0)) + 39|0); $53 = (_Stream_GetU16_BE($52)|0); $54 = ((($1)) + 62|0); HEAP16[$54>>1] = $53; $55 = ((($0)) + 41|0); $56 = (_Stream_GetU16_BE($55)|0); $57 = ((($1)) + 28|0); HEAP16[$57>>1] = $56; $58 = ((($0)) + 43|0); $59 = (_Stream_GetU16_BE($58)|0); $60 = ((($1)) + 40|0); HEAP16[$60>>1] = $59; $61 = ((($0)) + 45|0); $62 = (_Stream_GetU16_BE($61)|0); $63 = ((($1)) + 52|0); HEAP16[$63>>1] = $62; $64 = ((($0)) + 47|0); $65 = (_Stream_GetU16_BE($64)|0); $66 = ((($1)) + 64|0); HEAP16[$66>>1] = $65; $67 = ((($0)) + 49|0); $68 = (_Stream_GetU16_BE($67)|0); $69 = ((($1)) + 30|0); HEAP16[$69>>1] = $68; $70 = ((($0)) + 51|0); $71 = (_Stream_GetU16_BE($70)|0); $72 = ((($1)) + 42|0); HEAP16[$72>>1] = $71; $73 = ((($0)) + 53|0); $74 = (_Stream_GetU16_BE($73)|0); $75 = ((($1)) + 54|0); HEAP16[$75>>1] = $74; $76 = ((($0)) + 55|0); $77 = (_Stream_GetU16_BE($76)|0); $78 = ((($1)) + 66|0); HEAP16[$78>>1] = $77; $79 = ((($0)) + 57|0); $80 = (_Stream_GetU16_BE($79)|0); $81 = ((($1)) + 32|0); HEAP16[$81>>1] = $80; $82 = ((($0)) + 59|0); $83 = (_Stream_GetU16_BE($82)|0); $84 = ((($1)) + 44|0); HEAP16[$84>>1] = $83; $85 = ((($0)) + 61|0); $86 = (_Stream_GetU16_BE($85)|0); $87 = ((($1)) + 56|0); HEAP16[$87>>1] = $86; $88 = ((($0)) + 63|0); $89 = (_Stream_GetU16_BE($88)|0); $90 = ((($1)) + 68|0); HEAP16[$90>>1] = $89; $91 = ((($0)) + 65|0); $92 = (_Stream_GetU16_BE($91)|0); $93 = ((($1)) + 34|0); HEAP16[$93>>1] = $92; $94 = ((($0)) + 67|0); $95 = (_Stream_GetU16_BE($94)|0); $96 = ((($1)) + 46|0); HEAP16[$96>>1] = $95; $97 = ((($0)) + 69|0); $98 = (_Stream_GetU16_BE($97)|0); $99 = ((($1)) + 58|0); HEAP16[$99>>1] = $98; $100 = ((($0)) + 71|0); $101 = (_Stream_GetU16_BE($100)|0); $102 = ((($1)) + 70|0); HEAP16[$102>>1] = $101; $103 = $10&255; $104 = ((($0)) + 73|0); $105 = (+_GetFloat($104)); $106 = ((($1)) + 72|0); HEAPF32[$106>>2] = $105; $107 = ((($0)) + 77|0); $108 = (+_GetFloat($107)); $109 = ((($1)) + 76|0); HEAPF32[$109>>2] = $108; $110 = ((($0)) + 81|0); $111 = (+_GetFloat($110)); $112 = ((($1)) + 80|0); HEAPF32[$112>>2] = $111; $113 = ((($0)) + 85|0); $114 = (+_GetFloat($113)); $115 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 16|0); HEAPF32[$115>>2] = $114; $116 = ((($0)) + 89|0); $117 = (+_GetFloat($116)); $118 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 20|0); HEAPF32[$118>>2] = $117; $119 = ((($0)) + 93|0); $120 = (+_GetFloat($119)); $121 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 24|0); HEAPF32[$121>>2] = $120; $122 = HEAP32[5250]|0; switch ($122|0) { case 1: { $123 = ((($0)) + 102|0); $124 = HEAP8[$123>>0]|0; $125 = ((($1)) + 84|0); HEAP8[$125>>0] = $124; break; } case 2: { $126 = ((($0)) + 165|0); $127 = HEAP8[$126>>0]|0; $128 = ((($1)) + 84|0); HEAP8[$128>>0] = $127; $129 = ((($0)) + 97|0); $130 = ((($0)) + 98|0); $131 = HEAP8[$129>>0]|0; $132 = $131 & 63; $133 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 28|0); HEAP8[$133>>0] = $132; $134 = (6)?(($131&255) >>> 6):(($131&255)); $135 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 29|0); HEAP8[$135>>0] = $134; $136 = (+_GetFloat($130)); $137 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 32|0); HEAPF32[$137>>2] = $136; $138 = ((($0)) + 102|0); $139 = (+_GetFloat($138)); $140 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 36|0); HEAPF32[$140>>2] = $139; $141 = ((($0)) + 106|0); $142 = (+_GetFloat($141)); $143 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 40|0); HEAPF32[$143>>2] = $142; $144 = ((($0)) + 110|0); $145 = (+_GetFloat($144)); $146 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 44|0); HEAPF32[$146>>2] = $145; $147 = ((($0)) + 114|0); $148 = ((($0)) + 115|0); $149 = HEAP8[$147>>0]|0; $150 = $149 & 63; $151 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 48|0); HEAP8[$151>>0] = $150; $152 = (6)?(($149&255) >>> 6):(($149&255)); $153 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 49|0); HEAP8[$153>>0] = $152; $154 = (+_GetFloat($148)); $155 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 52|0); HEAPF32[$155>>2] = $154; $156 = ((($0)) + 119|0); $157 = (+_GetFloat($156)); $158 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 56|0); HEAPF32[$158>>2] = $157; $159 = ((($0)) + 123|0); $160 = (+_GetFloat($159)); $161 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 60|0); HEAPF32[$161>>2] = $160; $162 = ((($0)) + 127|0); $163 = (+_GetFloat($162)); $164 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 64|0); HEAPF32[$164>>2] = $163; $165 = ((($0)) + 131|0); $166 = ((($0)) + 132|0); $167 = HEAP8[$165>>0]|0; $168 = $167 & 63; $169 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 68|0); HEAP8[$169>>0] = $168; $170 = (6)?(($167&255) >>> 6):(($167&255)); $171 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 69|0); HEAP8[$171>>0] = $170; $172 = (+_GetFloat($166)); $173 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 72|0); HEAPF32[$173>>2] = $172; $174 = ((($0)) + 136|0); $175 = (+_GetFloat($174)); $176 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 76|0); HEAPF32[$176>>2] = $175; $177 = ((($0)) + 140|0); $178 = (+_GetFloat($177)); $179 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 80|0); HEAPF32[$179>>2] = $178; $180 = ((($0)) + 144|0); $181 = (+_GetFloat($180)); $182 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 84|0); HEAPF32[$182>>2] = $181; $183 = ((($0)) + 148|0); $184 = ((($0)) + 149|0); $185 = HEAP8[$183>>0]|0; $186 = $185 & 63; $187 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 88|0); HEAP8[$187>>0] = $186; $188 = (6)?(($185&255) >>> 6):(($185&255)); $189 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 89|0); HEAP8[$189>>0] = $188; $190 = (+_GetFloat($184)); $191 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 92|0); HEAPF32[$191>>2] = $190; $192 = ((($0)) + 153|0); $193 = (+_GetFloat($192)); $194 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 96|0); HEAPF32[$194>>2] = $193; $195 = ((($0)) + 157|0); $196 = (+_GetFloat($195)); $197 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 100|0); HEAPF32[$197>>2] = $196; $198 = ((($0)) + 161|0); $199 = (+_GetFloat($198)); $200 = ((((((400832 + (($3*7388)|0)|0)) + 220|0) + (($103*112)|0)|0)) + 104|0); HEAPF32[$200>>2] = $199; break; } default: { } } _CustomModel_BuildPart($4,$1); $201 = HEAP8[$9>>0]|0; $202 = (($201) + 1)<<24>>24; HEAP8[$9>>0] = $202; $203 = HEAP8[$11>>0]|0; $204 = ($202<<24>>24)==($203<<24>>24); if (!($204)) { STACKTOP = sp;return; } _CustomModel_Register($4); STACKTOP = sp;return; } function _CPE_UndefineModel($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; $2 = ($1&255)<(64); if (!($2)) { return; } $3 = $1&255; $4 = (400832 + (($3*7388)|0)|0); _CustomModel_Undefine($4); return; } function _CPE_PluginMessage($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; $2 = ((($0)) + 1|0); _Event_RaisePluginMessage((1802628),$1,$2); return; } function _CPE_ExtEntityTeleport($0) { $0 = $0|0; var $$1 = 0, $$1$in = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1|0); $2 = HEAP8[$0>>0]|0; $3 = ((($0)) + 2|0); $4 = HEAP8[$1>>0]|0; $5 = $4&255; $6 = $5 & 1; $7 = $5 << 4; $8 = $7 & 96; $9 = $8 | $6; $10 = $5 & 16; $11 = ($10|0)==(0); $12 = $9 | 6; $$1$in = $11 ? $9 : $12; $$1 = $$1$in&255; $13 = $5 & 32; $14 = $13&255; $15 = ($14 << 2)&255; $16 = $15 | $$1; _Classic_ReadAbsoluteLocation($3,$2,$16); return; } function _Classic_ReadAbsoluteLocation($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$025 = 0, $$026 = 0, $$027 = 0, $$1 = 0, $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0.0; var $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, $spec$select$v = 0, $trunc = 0, $trunc$clear = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $3 = sp; $4 = HEAP8[1972887]|0; $5 = ($4<<24>>24)==(0); if ($5) { $11 = (_Stream_GetU16_BE($0)|0); $12 = $11 << 16 >> 16; $13 = ((($0)) + 2|0); $14 = (_Stream_GetU16_BE($13)|0); $15 = $14 << 16 >> 16; $16 = ((($0)) + 4|0); $17 = (_Stream_GetU16_BE($16)|0); $18 = $17 << 16 >> 16; $$025 = $18;$$026 = $15;$$027 = $12;$$sink = 6; } else { $6 = (_Stream_GetU32_BE($0)|0); $7 = ((($0)) + 4|0); $8 = (_Stream_GetU32_BE($7)|0); $9 = ((($0)) + 8|0); $10 = (_Stream_GetU32_BE($9)|0); $$025 = $10;$$026 = $8;$$027 = $6;$$sink = 12; } $19 = (($0) + ($$sink)|0); $trunc = $2 & 96; $trunc$clear = $trunc & 127; switch ($trunc$clear<<24>>24) { case 0: case 32: { $20 = ($1<<24>>24)==(-1); $spec$select$v = $20 ? -29 : -51; $spec$select = (($$026) + ($spec$select$v))|0; $$1 = $spec$select; break; } default: { $$1 = $$026; } } $21 = ((($3)) + 28|0); HEAP8[$21>>0] = $2; $22 = (+($$027|0)); $23 = $22 * 0.03125; HEAPF32[$3>>2] = $23; $24 = (+($$1|0)); $25 = $24 * 0.03125; $26 = ((($3)) + 4|0); HEAPF32[$26>>2] = $25; $27 = (+($$025|0)); $28 = $27 * 0.03125; $29 = ((($3)) + 8|0); HEAPF32[$29>>2] = $28; $30 = ((($19)) + 1|0); $31 = HEAP8[$19>>0]|0; $32 = (+($31&255)); $33 = $32 * 360.0; $34 = $33 * 0.00390625; $35 = ((($3)) + 16|0); HEAPF32[$35>>2] = $34; $36 = HEAP8[$30>>0]|0; $37 = (+($36&255)); $38 = $37 * 360.0; $39 = $38 * 0.00390625; $40 = ((($3)) + 12|0); HEAPF32[$40>>2] = $39; $41 = ($1<<24>>24)==(-1); if (!($41)) { _UpdateLocation($1,$3); STACKTOP = sp;return; } HEAP8[1972891] = 1; _UpdateLocation($1,$3); STACKTOP = sp;return; } function _UpdateLocation($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0&255; $3 = (1782744 + ($2<<2)|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)==(0|0); if ($5) { return; } $6 = HEAP32[$4>>2]|0; $7 = ((($6)) + 8|0); $8 = HEAP32[$7>>2]|0; FUNCTION_TABLE_vii[$8 & 255]($4,$1); return; } function _GetFloat($0) { $0 = $0|0; var $1 = 0, $2 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Stream_GetU32_BE($0)|0); $2 = (HEAP32[tempDoublePtr>>2]=$1,+HEAPF32[tempDoublePtr>>2]); return (+$2); } function _CalcVelocity($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$pr = 0.0, $$pr17 = 0.0, $$sink = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = (_Stream_GetU32_BE($1)|0); $4 = (+($3|0)); $5 = $4 / 1.0E+4; $6 = (+Math_abs((+$5))); $7 = (_Math_Sign($4)|0); $8 = (+($7|0)); $9 = (+_PhysicsComp_CalcJumpVelocity($6)); $10 = $9 * $8; switch ($2<<24>>24) { case 0: { $11 = +HEAPF32[$0>>2]; $12 = $10 + $11; HEAPF32[$0>>2] = $12; $14 = $12; break; } case 1: { HEAPF32[$0>>2] = $10; $14 = $10; break; } default: { $$pr = +HEAPF32[$0>>2]; $14 = $$pr; } } $13 = $14 < -1024.0; if ($13) { $$sink = -1024.0; } else { $$pr17 = +HEAPF32[$0>>2]; $15 = $$pr17 > 1024.0; if ($15) { $$sink = 1024.0; } else { return; } } HEAPF32[$0>>2] = $$sink; return; } function _CPE_WriteTwoWayPing($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 1|0); HEAP8[$0>>0] = 43; $4 = ((($0)) + 2|0); HEAP8[$3>>0] = $1; $5 = $2&65535; _Stream_SetU16_BE($4,$5); $6 = ((($0)) + 4|0); return ($6|0); } function _CheckName($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $3 = sp + 64|0; $4 = sp; _RemoveEndPlus($1); $5 = ($0<<24>>24)==(-1); if ($5) { HEAP32[$3>>2] = $4; $6 = ((($3)) + 4|0); HEAP16[$6>>1] = 0; $7 = ((($3)) + 6|0); HEAP16[$7>>1] = 64; _String_AppendColorless($3,$1); $8 = (_String_Equals($3,14340)|0); $9 = ($8|0)==(0); if ($9) { _String_Copy($1,14340); } } $10 = ((($2)) + 4|0); $11 = HEAP16[$10>>1]|0; $12 = ($11<<16>>16)==(0); if (!($12)) { _RemoveEndPlus($2); STACKTOP = sp;return; } _String_Copy($2,$1); _RemoveEndPlus($2); STACKTOP = sp;return; } function _AddEntity($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = $1&255; $6 = ($1<<24>>24)!=(-1); if ($6) { $7 = (1782744 + ($5<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(0|0); if (!($9)) { _Entities_Remove($1); } $10 = (167344 + (($5*872)|0)|0); _NetPlayer_Init($10); HEAP32[$7>>2] = $10; _Event_RaiseInt(1790668,$5); $$0 = $10; } else { $$0 = 1783772; } _Entity_SetSkin($$0,$3); _Entity_SetName($$0,$2); $11 = ($4<<24>>24)==(0); if ($11) { return; } _Classic_ReadAbsoluteLocation($0,$1,7); if ($6) { return; } ;HEAP32[(1784264)>>2]=HEAP32[(1783776)>>2]|0;HEAP32[(1784264)+4>>2]=HEAP32[(1783776)+4>>2]|0;HEAP32[(1784264)+8>>2]=HEAP32[(1783776)+8>>2]|0; $12 = HEAP32[(1783792)>>2]|0; HEAP32[(1784288)>>2] = $12; $13 = HEAP32[(1783788)>>2]|0; HEAP32[(1784292)>>2] = $13; return; } function _RemoveEndPlus($0) { $0 = $0|0; var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP16[$1>>1]|0; $3 = ($2<<16>>16)==(0); if ($3) { return; } $4 = HEAP32[$0>>2]|0; $5 = $2&65535; $6 = (($5) + -1)|0; $7 = (($4) + ($6)|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(43); if (!($9)) { return; } $10 = (($2) + -1)<<16>>16; HEAP16[$1>>1] = $10; return; } function _CPE_SendCpeExtInfoReply() { var $$01116 = 0, $$1 = 0, $$3 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, $exitcond = 0, $spec$select = 0, $spec$select14 = 0, $spec$select15 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp + 8|0; $1 = sp; $2 = HEAP32[482466]|0; $3 = ($2|0)==(0); if (!($3)) { STACKTOP = sp;return; } $4 = HEAP8[1972841]|0; $5 = ($4<<24>>24)==(0); $spec$select = $5 ? 34 : 37; _CPE_SendExtInfo($spec$select); $$01116 = 0; while(1) { $6 = (9264 + ($$01116<<2)|0); $7 = HEAP32[$6>>2]|0; _String_FromReadonly($1,$7); $8 = $1; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = (($8) + 4)|0; $12 = $11; $13 = HEAP32[$12>>2]|0; $14 = $0; $15 = $14; HEAP32[$15>>2] = $10; $16 = (($14) + 4)|0; $17 = $16; HEAP32[$17>>2] = $13; $18 = (_String_CaselessEqualsConst($0,41659)|0); $19 = ($18|0)==(0); $spec$select14 = $19 ? 1 : 2; $20 = (_String_CaselessEqualsConst($0,41702)|0); $21 = ($20|0)==(0); $22 = HEAP32[5249]|0; $$1 = $21 ? $spec$select14 : $22; $23 = (_String_CaselessEqualsConst($0,41744)|0); $24 = ($23|0)==(0); $25 = HEAP32[5248]|0; $spec$select15 = $24 ? $$1 : $25; $26 = (_String_CaselessEqualsConst($0,41802)|0); $27 = ($26|0)==(0); $28 = HEAP32[5250]|0; $$3 = $27 ? $spec$select15 : $28; $29 = HEAP8[1972841]|0; $30 = ($29<<24>>24)==(0); if ($30) { $31 = (_String_CaselessEqualsConst($0,41744)|0); $32 = ($31|0)==(0); if ($32) { $33 = (_String_CaselessEqualsConst($0,41862)|0); $34 = ($33|0)==(0); if ($34) { $35 = (_String_CaselessEqualsConst($0,41847)|0); $36 = ($35|0)==(0); if ($36) { label = 7; } } } } else { label = 7; } if ((label|0) == 7) { label = 0; _CPE_SendExtEntry($0,$$3); } $37 = (($$01116) + 1)|0; $exitcond = ($37|0)==(37); if ($exitcond) { break; } else { $$01116 = $37; } } STACKTOP = sp;return; } function _CPE_SendExtInfo($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp; HEAP8[$1>>0] = 16; $2 = ((($1)) + 1|0); _WriteString($2,(1949228)); $3 = ((($1)) + 65|0); $4 = $0&65535; _Stream_SetU16_BE($3,$4); $5 = HEAP32[(1949208)>>2]|0; FUNCTION_TABLE_vii[$5 & 255]($1,67); STACKTOP = sp;return; } function _CPE_SendExtEntry($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp; HEAP8[$2>>0] = 17; $3 = ((($2)) + 1|0); _WriteString($3,$0); $4 = ((($2)) + 65|0); _Stream_SetU32_BE($4,$1); $5 = HEAP32[(1949208)>>2]|0; FUNCTION_TABLE_vii[$5 & 255]($2,69); STACKTOP = sp;return; } function _WriteString($0,$1) { $0 = $0|0; $1 = $1|0; var $$0$lcssa23 = 0, $$019 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $scevgep = 0, $spec$select17 = 0, $spec$store$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3&65535)<(64); $spec$select17 = $4 ? $3 : 64; $5 = $spec$select17&65535; $6 = ($spec$select17<<16>>16)==(0); if ($6) { $$0$lcssa23 = 0; } else { $$019 = 0; while(1) { $7 = HEAP32[$1>>2]|0; $8 = (($7) + ($$019)|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(38); $spec$store$select = $10 ? 37 : $9; $11 = (($0) + ($$019)|0); HEAP8[$11>>0] = $spec$store$select; $12 = (($$019) + 1)|0; $13 = ($12>>>0)<($5>>>0); if ($13) { $$019 = $12; } else { break; } } if ($4) { $$0$lcssa23 = $5; } else { return; } } $scevgep = (($0) + ($$0$lcssa23)|0); $14 = (64 - ($$0$lcssa23))|0; _memset(($scevgep|0),32,($14|0))|0; return; } function _Classic_Handshake($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; HEAP16[(1949216)>>1] = 0; HEAP16[(1949224)>>1] = 0; $2 = ((($0)) + 1|0); HEAP32[$1>>2] = $2; _ReadString($1,(1949212)); _ReadString($1,(1949220)); _Chat_SetLogName((1949212)); $3 = HEAP32[$1>>2]|0; $4 = HEAP8[$3>>0]|0; _UpdateUserType($4); _String_Copy((1784344),(1949212)); _String_AppendString((1784344),(1949220)); _HacksComp_RecheckFlags((1784300)); STACKTOP = sp;return; } function _Classic_Ping($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Classic_LevelInit($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972892]|0; $2 = ($1<<24>>24)==(0); if (!($2)) { return; } _Classic_StartLoading(); $3 = HEAP8[1972889]|0; $4 = ($3<<24>>24)==(0); if ($4) { return; } $5 = (_Stream_GetU32_BE($0)|0); HEAP32[482482] = $5; _MapState_SkipHeader(1840212); _MapState_SkipHeader(1885036); return; } function _Classic_LevelDataChunk($0) { $0 = $0|0; var $$0 = 0, $$pr = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $switch$split2D = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972892]|0; $2 = ($1<<24>>24)==(0); if ($2) { _Classic_StartLoading(); } $3 = (_Stream_GetU16_BE($0)|0); $4 = $3&65535; $5 = ((($0)) + 2|0); HEAP32[(1929904)>>2] = $5; HEAP32[(1929916)>>2] = $5; HEAP32[(1929908)>>2] = $4; HEAP32[(1929912)>>2] = $4; $6 = HEAP8[1972882]|0; $7 = ($6<<24>>24)==(0); if ($7) { label = 5; } else { $8 = ((($0)) + 1026|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(0); if ($10) { label = 5; } else { $$0 = 1885036; } } if ((label|0) == 5) { $$0 = 1840212; } $11 = ((($$0)) + 44801|0); $12 = HEAP8[$11>>0]|0; $13 = ($12<<24>>24)==(0); do { if ($13) { $14 = ((($$0)) + 44800|0); $15 = (_GZipHeader_Read(1929872,$14)|0); $switch$split2D = ($15|0)<(0); if ($switch$split2D) { switch ($15|0) { case -857812991: { label = 9; break; } default: { } } } else { switch ($15|0) { case 0: { label = 9; break; } default: { } } } if ((label|0) == 9) { $$pr = HEAP8[$11>>0]|0; $16 = ($$pr<<24>>24)==(0); if ($16) { break; } else { label = 10; break; } } _DisconnectInvalidMap($15); return; } else { label = 10; } } while(0); if ((label|0) == 10) { $17 = (_MapState_Read($$0)|0); $18 = ($17|0)==(0); if (!($18)) { _DisconnectInvalidMap($17); return; } } $19 = HEAP32[482482]|0; $20 = ($19|0)==(0); if ($20) { $25 = 0.0; } else { $21 = (+($19|0)); $22 = HEAP32[(1885024)>>2]|0; $23 = (+($22|0)); $24 = $23 / $21; $25 = $24; } _Event_RaiseFloat((1795868),$25); return; } function _Classic_LevelFinalise($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 4|0; $2 = sp; $3 = (_Stopwatch_Measure()|0); $4 = (getTempRet0() | 0); $5 = 1098544; $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = (($5) + 4)|0; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = (_Stopwatch_ElapsedMS($7,$10,$3,$4)|0); HEAP32[$2>>2] = $11; _Platform_Log1(42215,$2); HEAP8[1972892] = 0; _WoM_CheckSendWomID(); $12 = HEAP8[(1929856)>>0]|0; $13 = ($12<<24>>24)==(0); if (!($13)) { _FreeMapStates(); } $14 = (_Stream_GetU16_BE($0)|0); $15 = $14&65535; $16 = ((($0)) + 2|0); $17 = (_Stream_GetU16_BE($16)|0); $18 = $17&65535; $19 = ((($0)) + 4|0); $20 = (_Stream_GetU16_BE($19)|0); $21 = $20&65535; $22 = Math_imul($18, $15)|0; $23 = Math_imul($22, $21)|0; HEAP32[$1>>2] = $23; $24 = HEAP32[(1885008)>>2]|0; $25 = ($24|0)==(0|0); if ($25) { _Chat_AddRaw(42236); _Chat_AddRaw(42286); } $26 = HEAP32[482482]|0; $27 = HEAP32[$1>>2]|0; $28 = ($26|0)==($27|0); if (!($28)) { _Chat_AddRaw(42236); _Chat_Add2(42336,1929928,$1); _FreeMapStates(); } $29 = HEAP8[1972882]|0; $30 = ($29<<24>>24)!=(0); $31 = HEAP32[(1929832)>>2]|0; $32 = ($31|0)!=(0|0); $or$cond = $30 & $32; if (!($or$cond)) { HEAP32[(1929832)>>2] = 0; $33 = HEAP32[(1885008)>>2]|0; _World_SetNewMap($33,$15,$18,$21); HEAP32[(1885008)>>2] = 0; STACKTOP = sp;return; } _World_SetMapUpper($31); HEAP32[(1929832)>>2] = 0; $33 = HEAP32[(1885008)>>2]|0; _World_SetNewMap($33,$15,$18,$21); HEAP32[(1885008)>>2] = 0; STACKTOP = sp;return; } function _Classic_SetBlock($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Stream_GetU16_BE($0)|0); $2 = $1&65535; $3 = ((($0)) + 2|0); $4 = (_Stream_GetU16_BE($3)|0); $5 = $4&65535; $6 = ((($0)) + 4|0); $7 = (_Stream_GetU16_BE($6)|0); $8 = $7&65535; $9 = ((($0)) + 6|0); $10 = HEAP8[1972882]|0; $11 = ($10<<24>>24)==(0); if ($11) { $14 = HEAP8[$9>>0]|0; $15 = $14&255; $$0 = $15; } else { $12 = (_Stream_GetU16_BE($9)|0); $13 = (($12&65535) % 768)&-1; $$0 = $13; } $16 = (_World_Contains_1694($2,$5,$8)|0); $17 = ($16<<24>>24)==(0); if ($17) { return; } _Game_UpdateBlock($2,$5,$8,$$0); return; } function _Classic_AddEntity($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 160|0; $1 = sp + 136|0; $2 = sp + 144|0; $3 = sp + 64|0; $4 = sp + 128|0; $5 = sp; HEAP32[$2>>2] = $3; $6 = ((($2)) + 4|0); HEAP16[$6>>1] = 0; $7 = ((($2)) + 6|0); HEAP16[$7>>1] = 64; HEAP32[$4>>2] = $5; $8 = ((($4)) + 4|0); HEAP16[$8>>1] = 0; $9 = ((($4)) + 6|0); HEAP16[$9>>1] = 64; $10 = ((($0)) + 1|0); HEAP32[$1>>2] = $10; $11 = HEAP8[$0>>0]|0; _ReadString($1,$2); _CheckName($11,$2,$4); $12 = HEAP32[$1>>2]|0; _AddEntity($12,$11,$2,$4,1); _TabList_Set($11,$2,$2,21036,0); $13 = $11&255; $14 = $13 & 7; $15 = 1 << $14; $16 = (3)?($13 >>> 3):($13); $17 = (1790544 + ($16)|0); $18 = HEAP8[$17>>0]|0; $19 = $18&255; $20 = $15 | $19; $21 = $20&255; HEAP8[$17>>0] = $21; STACKTOP = sp;return; } function _Classic_EntityTeleport($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1|0); $2 = HEAP8[$0>>0]|0; _Classic_ReadAbsoluteLocation($1,$2,-89); return; } function _Classic_RelPosAndOrientationUpdate($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0.0; var $28 = 0.0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; $2 = HEAP8[$0>>0]|0; $3 = ((($1)) + 28|0); HEAP8[$3>>0] = -57; $4 = ((($0)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = (+($5<<24>>24)); $7 = $6 * 0.03125; HEAPF32[$1>>2] = $7; $8 = ((($0)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = (+($9<<24>>24)); $11 = $10 * 0.03125; $12 = ((($1)) + 4|0); HEAPF32[$12>>2] = $11; $13 = ((($0)) + 3|0); $14 = HEAP8[$13>>0]|0; $15 = (+($14<<24>>24)); $16 = $15 * 0.03125; $17 = ((($1)) + 8|0); HEAPF32[$17>>2] = $16; $18 = ((($0)) + 4|0); $19 = HEAP8[$18>>0]|0; $20 = (+($19&255)); $21 = $20 * 360.0; $22 = $21 * 0.00390625; $23 = ((($1)) + 16|0); HEAPF32[$23>>2] = $22; $24 = ((($0)) + 5|0); $25 = HEAP8[$24>>0]|0; $26 = (+($25&255)); $27 = $26 * 360.0; $28 = $27 * 0.00390625; $29 = ((($1)) + 12|0); HEAPF32[$29>>2] = $28; _UpdateLocation($2,$1); STACKTOP = sp;return; } function _Classic_RelPositionUpdate($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; $2 = HEAP8[$0>>0]|0; $3 = ((($1)) + 28|0); HEAP8[$3>>0] = -63; $4 = ((($0)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = (+($5<<24>>24)); $7 = $6 * 0.03125; HEAPF32[$1>>2] = $7; $8 = ((($0)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = (+($9<<24>>24)); $11 = $10 * 0.03125; $12 = ((($1)) + 4|0); HEAPF32[$12>>2] = $11; $13 = ((($0)) + 3|0); $14 = HEAP8[$13>>0]|0; $15 = (+($14<<24>>24)); $16 = $15 * 0.03125; $17 = ((($1)) + 8|0); HEAPF32[$17>>2] = $16; _UpdateLocation($2,$1); STACKTOP = sp;return; } function _Classic_OrientationUpdate($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp; $2 = HEAP8[$0>>0]|0; $3 = ((($1)) + 28|0); HEAP8[$3>>0] = -122; $4 = ((($0)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = (+($5&255)); $7 = $6 * 360.0; $8 = $7 * 0.00390625; $9 = ((($1)) + 16|0); HEAPF32[$9>>2] = $8; $10 = ((($0)) + 2|0); $11 = HEAP8[$10>>0]|0; $12 = (+($11&255)); $13 = $12 * 360.0; $14 = $13 * 0.00390625; $15 = ((($1)) + 12|0); HEAPF32[$15>>2] = $14; _UpdateLocation($2,$1); STACKTOP = sp;return; } function _Classic_RemoveEntity($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; _Protocol_RemoveEntity($1); return; } function _Classic_Message($0) { $0 = $0|0; var $$0 = 0, $$1 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $1 = sp + 88|0; $2 = sp + 80|0; $3 = sp; $4 = sp + 72|0; $5 = ((($0)) + 1|0); HEAP32[$1>>2] = $5; $6 = HEAP8[$0>>0]|0; HEAP32[$2>>2] = $3; $7 = ((($2)) + 4|0); HEAP16[$7>>1] = 0; $8 = ((($2)) + 6|0); HEAP16[$8>>1] = 66; $9 = HEAP8[1972885]|0; $10 = ($9<<24>>24)==(0); if ($10) { $11 = ($6<<24>>24)==(-1); if ($11) { _String_AppendConst($2,42177); $$0 = 0; } else { $$0 = 0; } } else { $$0 = $6; } _ReadString($1,$2); $12 = (_String_CaselessStarts($2,21020)|0); $13 = ($12|0)==(0); if ($13) { $$1 = $$0; } else { _String_UNSAFE_SubstringAt($4,$2,13); $14 = $4; $15 = $14; $16 = HEAP32[$15>>2]|0; $17 = (($14) + 4)|0; $18 = $17; $19 = HEAP32[$18>>2]|0; $20 = $2; $21 = $20; HEAP32[$21>>2] = $16; $22 = (($20) + 4)|0; $23 = $22; HEAP32[$23>>2] = $19; $$1 = 3; } $24 = (_String_CaselessStarts($2,21028)|0); $25 = ($24|0)==(0); if (!($25)) { STACKTOP = sp;return; } $26 = $$1&255; _Chat_AddOf($2,$26); STACKTOP = sp;return; } function _Classic_Kick($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _UNSAFE_GetString($1,$0); _Game_Disconnect(21012,$1); STACKTOP = sp;return; } function _Classic_SetPermission($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; _UpdateUserType($1); _HacksComp_RecheckFlags((1784300)); return; } function _UpdateUserType($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0&255)>(99); $2 = ($0<<24>>24)>(-1); $3 = $1 & $2; $4 = $3&1; HEAP8[(1784300)>>0] = $4; $5 = HEAP8[1972890]|0; $6 = ($5<<24>>24)==(0); if (!($6)) { return; } HEAP8[(1172251)>>0] = $4; _memset(((1171483)|0),($4|0),5)|0; return; } function _ReadString($0,$1) { $0 = $0|0; $1 = $1|0; var $$01822 = 0, $$2 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[$0>>2]|0; $$01822 = 63; L1: while(1) { $3 = (($2) + ($$01822)|0); $4 = HEAP8[$3>>0]|0; switch ($4<<24>>24) { case 32: case 0: { break; } default: { label = 3; break L1; } } $6 = (($$01822) + -1)|0; $7 = ($$01822|0)==(0); if ($7) { $$2 = 0; break; } else { $$01822 = $6; } } if ((label|0) == 3) { $5 = (($$01822) + 1)|0; $$2 = $5; } _String_AppendAll($1,$2,$$2); $8 = ((($2)) + 64|0); HEAP32[$0>>2] = $8; return; } function _Protocol_RemoveEntity($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&255; $2 = (1782744 + ($1<<2)|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0|0); $5 = ($0<<24>>24)==(-1); $or$cond = $5 | $4; if ($or$cond) { return; } _Entities_Remove($0); return; } function _World_Contains_1694($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1103564)>>2]|0; $4 = ($3>>>0)>($0>>>0); $5 = HEAP32[(1103568)>>2]|0; $6 = ($5>>>0)>($1>>>0); $or$cond = $4 & $6; $7 = HEAP32[(1103572)>>2]|0; $8 = ($7>>>0)>($2>>>0); $narrow = $or$cond & $8; $9 = $narrow&1; return ($9|0); } function _WoM_CheckSendWomID() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1972880]|0; $1 = ($0<<24>>24)==(0); $2 = HEAP8[1972881]|0; $3 = ($2<<24>>24)!=(0); $or$cond = $1 | $3; if ($or$cond) { return; } _Chat_Send(21044,0); HEAP8[1972881] = 1; return; } function _Classic_StartLoading() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; _World_NewMap(); _LoadingScreen_Show((1949212),(1949220)); _WoM_CheckMotd(); HEAP8[1972891] = 0; HEAP8[1972892] = 1; $0 = (_Stopwatch_Measure()|0); $1 = (getTempRet0() | 0); $2 = 1098544; $3 = $2; HEAP32[$3>>2] = $0; $4 = (($2) + 4)|0; $5 = $4; HEAP32[$5>>2] = $1; HEAP32[482482] = 0; _MapState_Init(1840212); _MapState_Init(1885036); return; } function _DisconnectInvalidMap($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 64|0; $2 = sp + 72|0; $3 = sp; HEAP32[$1>>2] = $0; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 64; _String_Format1($2,42491,$1); _Game_Disconnect(21052,$2); STACKTOP = sp;return; } function _MapState_Read($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($0)) + 44820|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if (!($4)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $5 = ((($0)) + 44816|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)<(4); if ($7) { $8 = (4 - ($6))|0; $9 = ((($0)) + 44740|0); $10 = HEAP32[$9>>2]|0; $11 = (((($0)) + 44808|0) + ($6)|0); $12 = (FUNCTION_TABLE_iiiii[$10 & 63]($9,$11,$8,$1)|0); $13 = HEAP32[$1>>2]|0; $14 = HEAP32[$5>>2]|0; $15 = (($14) + ($13))|0; HEAP32[$5>>2] = $15; $16 = ($12|0)==(0); if (!($16)) { $$0 = $12; STACKTOP = sp;return ($$0|0); } $17 = ($15|0)<(4); if ($17) { $$0 = 0; STACKTOP = sp;return ($$0|0); } } $18 = HEAP32[482482]|0; $19 = ($18|0)==(0); if ($19) { $20 = ((($0)) + 44808|0); $21 = (_Stream_GetU32_BE($20)|0); HEAP32[482482] = $21; } $22 = ((($0)) + 44796|0); $23 = HEAP32[$22>>2]|0; $24 = ($23|0)==(0|0); if ($24) { $25 = HEAP32[482482]|0; $26 = (_Mem_TryAlloc($25,1)|0); HEAP32[$22>>2] = $26; $27 = ($26|0)==(0|0); if ($27) { _Window_ShowDialog(45698,42421); HEAP8[$2>>0] = 1; $$0 = 0; STACKTOP = sp;return ($$0|0); } } $28 = HEAP32[482482]|0; $29 = ((($0)) + 44812|0); $30 = HEAP32[$29>>2]|0; $31 = (($28) - ($30))|0; $32 = ((($0)) + 44740|0); $33 = HEAP32[$32>>2]|0; $34 = HEAP32[$22>>2]|0; $35 = (($34) + ($30)|0); $36 = (FUNCTION_TABLE_iiiii[$33 & 63]($32,$35,$31,$1)|0); $37 = HEAP32[$1>>2]|0; $38 = HEAP32[$29>>2]|0; $39 = (($38) + ($37))|0; HEAP32[$29>>2] = $39; $$0 = $36; STACKTOP = sp;return ($$0|0); } function _WoM_CheckMotd() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond$not = 0, $or$cond3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $0 = sp + 80|0; $1 = sp; $2 = sp + 72|0; $3 = sp + 64|0; $4 = (1949220); $5 = $4; $6 = HEAP32[$5>>2]|0; $7 = (($4) + 4)|0; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = $2; $11 = $10; HEAP32[$11>>2] = $6; $12 = (($10) + 4)|0; $13 = $12; HEAP32[$13>>2] = $9; $14 = ((($2)) + 4|0); $15 = HEAP16[$14>>1]|0; $16 = ($15<<16>>16)==(0); if ($16) { STACKTOP = sp;return; } $17 = (_String_IndexOfConst($2,42533)|0); $18 = HEAP8[1972839]|0; $19 = ($18<<24>>24)!=(0); $20 = HEAP8[1972840]|0; $21 = ($20<<24>>24)==(0); $or$cond$not = $19 & $21; $22 = ($17|0)==(-1); $or$cond3 = $22 | $or$cond$not; if ($or$cond3) { STACKTOP = sp;return; } $23 = (($17) + 4)|0; _String_UNSAFE_SubstringAt($3,$2,$23); HEAP32[$0>>2] = $1; $24 = ((($0)) + 4|0); HEAP16[$24>>1] = 0; $25 = ((($0)) + 6|0); HEAP16[$25>>1] = 64; _String_Format1($0,42538,$3); $26 = (_Http_AsyncGetData($0,1)|0); HEAP32[482465] = $26; HEAP8[1972880] = 1; STACKTOP = sp;return; } function _MapState_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 44740|0); _Inflate_MakeStream2($1,$0,1929872); $2 = ((($0)) + 44800|0); _GZipHeader_Init($2); $3 = ((($0)) + 44812|0); HEAP32[$3>>2] = 0; $4 = ((($0)) + 44796|0); HEAP32[$4>>2] = 0; $5 = ((($0)) + 44816|0); HEAP32[$5>>2] = 0; $6 = ((($0)) + 44820|0); HEAP8[$6>>0] = 0; return; } function _MapState_SkipHeader($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 44801|0); HEAP8[$1>>0] = 1; $2 = ((($0)) + 44816|0); HEAP32[$2>>2] = 4; return; } function _Classic_SendChat($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp; HEAP8[$2>>0] = 13; $3 = HEAP8[(1949244)>>0]|0; $4 = ($3<<24>>24)==(0); $5 = $4 ? -1 : $1; $6 = ((($2)) + 1|0); HEAP8[$6>>0] = $5; $7 = ((($2)) + 2|0); _WriteString($7,$0); $8 = HEAP32[(1949208)>>2]|0; FUNCTION_TABLE_vii[$8 & 255]($2,66); STACKTOP = sp;return; } function _Classic_SendSetBlock($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $5 = sp; $6 = ((($5)) + 1|0); HEAP8[$5>>0] = 5; $7 = $0&65535; _Stream_SetU16_BE($6,$7); $8 = ((($5)) + 3|0); $9 = $1&65535; _Stream_SetU16_BE($8,$9); $10 = ((($5)) + 5|0); $11 = $2&65535; _Stream_SetU16_BE($10,$11); $12 = ((($5)) + 7|0); $13 = ((($5)) + 8|0); HEAP8[$12>>0] = $3; $14 = HEAP8[1972882]|0; $15 = ($14<<24>>24)==(0); if ($15) { $17 = $4&255; $18 = ((($5)) + 9|0); HEAP8[$13>>0] = $17; $$0 = $18; } else { _Stream_SetU16_BE($13,$4); $16 = ((($5)) + 10|0); $$0 = $16; } $19 = HEAP32[(1949208)>>2]|0; $20 = $$0; $21 = $5; $22 = (($20) - ($21))|0; FUNCTION_TABLE_vii[$19 & 255]($5,$22); STACKTOP = sp;return; } function _Classic_SendLogin() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 144|0; $0 = sp; HEAP8[$0>>0] = 0; $1 = HEAP8[(1803052)>>0]|0; $2 = ((($0)) + 1|0); HEAP8[$2>>0] = $1; $3 = ((($0)) + 2|0); _WriteString($3,14340); $4 = ((($0)) + 66|0); _WriteString($4,14348); $5 = HEAP8[1972842]|0; $6 = ($5<<24>>24)==(0); $7 = $6 ? 0 : 66; $8 = ((($0)) + 130|0); HEAP8[$8>>0] = $7; $9 = HEAP32[(1949208)>>2]|0; $10 = HEAP8[(1803052)>>0]|0; $11 = ($10&255)>(5); $12 = $11 ? 131 : 130; FUNCTION_TABLE_vii[$9 & 255]($0,$12); STACKTOP = sp;return; } function _CPE_SendPlayerClick($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$sink = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp; HEAP8[$4>>0] = 34; $5 = $0&255; $6 = ((($4)) + 1|0); HEAP8[$6>>0] = $5; $7 = ($1<<24>>24)==(0); $8 = $7&1; $9 = ((($4)) + 2|0); HEAP8[$9>>0] = $8; $10 = ((($4)) + 3|0); $11 = +HEAPF32[(1783792)>>2]; $12 = $11 * 65536.0; $13 = $12 / 360.0; $14 = (~~(($13))); $15 = $14&65535; _Stream_SetU16_BE($10,$15); $16 = ((($4)) + 5|0); $17 = +HEAPF32[(1783788)>>2]; $18 = $17 * 65536.0; $19 = $18 / 360.0; $20 = (~~(($19))); $21 = $20&65535; _Stream_SetU16_BE($16,$21); $22 = ((($4)) + 7|0); HEAP8[$22>>0] = $2; $23 = ((($4)) + 8|0); $24 = HEAP32[$3>>2]|0; $25 = $24&65535; _Stream_SetU16_BE($23,$25); $26 = ((($4)) + 10|0); $27 = ((($3)) + 4|0); $28 = HEAP32[$27>>2]|0; $29 = $28&65535; _Stream_SetU16_BE($26,$29); $30 = ((($4)) + 12|0); $31 = ((($3)) + 8|0); $32 = HEAP32[$31>>2]|0; $33 = $32&65535; _Stream_SetU16_BE($30,$33); $34 = ((($4)) + 14|0); HEAP8[$34>>0] = -1; $35 = ((($3)) + 125|0); $36 = HEAP8[$35>>0]|0; switch ($36<<24>>24) { case 1: { $$sink = 0; break; } case 0: { $$sink = 1; break; } case 5: { $$sink = 2; break; } case 4: { $$sink = 3; break; } case 3: { $$sink = 4; break; } case 2: { $$sink = 5; break; } default: { $37 = HEAP32[(1949208)>>2]|0; FUNCTION_TABLE_vii[$37 & 255]($4,15); STACKTOP = sp;return; } } HEAP8[$34>>0] = $$sink; $37 = HEAP32[(1949208)>>2]|0; FUNCTION_TABLE_vii[$37 & 255]($4,15); STACKTOP = sp;return; } function _Protocol_Tick() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 256|0; $0 = sp; $1 = (_Classic_Tick($0)|0); $2 = (_CPE_Tick($1)|0); _WoM_Tick(); $3 = ($2|0)==($0|0); if ($3) { STACKTOP = sp;return; } $4 = $2; $5 = $0; $6 = (($4) - ($5))|0; $7 = HEAP32[(1949208)>>2]|0; FUNCTION_TABLE_vii[$7 & 255]($0,$6); STACKTOP = sp;return; } function _Classic_Tick($0) { $0 = $0|0; var $$0 = 0, $$byval_copy = 0, $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $$byval_copy = sp; $1 = HEAP8[1972891]|0; $2 = ($1<<24>>24)==(0); if ($2) { $$0 = $0; STACKTOP = sp;return ($$0|0); } $3 = +HEAPF32[(1783792)>>2]; $4 = +HEAPF32[(1783788)>>2]; ;HEAP32[$$byval_copy>>2]=HEAP32[(1784232)>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[(1784232)+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[(1784232)+8>>2]|0; $5 = (_Classic_WritePosition($0,$$byval_copy,$3,$4)|0); $$0 = $5; STACKTOP = sp;return ($$0|0); } function _CPE_Tick($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[482467]|0; $2 = (($1) + 1)|0; HEAP32[482467] = $2; $3 = ($1|0)<(19); $4 = HEAP8[1972888]|0; $5 = ($4<<24>>24)==(0); $or$cond = $3 | $5; if ($or$cond) { $$0 = $0; return ($$0|0); } $6 = (_Ping_NextPingId()|0); $7 = (_CPE_WriteTwoWayPing($0,0,$6)|0); HEAP32[482467] = 0; $$0 = $7; return ($$0|0); } function _WoM_Tick() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 320|0; $0 = sp; $1 = HEAP32[482465]|0; $2 = (_Http_GetResult($1,$0)|0); $3 = ($2<<24>>24)==(0); if ($3) { STACKTOP = sp;return; } $4 = ((($0)) + 301|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(0); if ($6) { STACKTOP = sp;return; } _WoM_ParseConfig($0); $7 = ((($0)) + 156|0); $8 = HEAP32[$7>>2]|0; _Mem_Free($8); STACKTOP = sp;return; } function _WoM_ParseConfig($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 224|0; $1 = sp + 208|0; $2 = sp; $3 = sp + 152|0; $4 = sp + 144|0; $5 = sp + 136|0; $6 = sp + 128|0; HEAP32[$1>>2] = $2; $7 = ((($1)) + 4|0); HEAP16[$7>>1] = 0; $8 = ((($1)) + 6|0); HEAP16[$8>>1] = 128; $9 = ((($0)) + 156|0); $10 = HEAP32[$9>>2]|0; $11 = ((($0)) + 160|0); $12 = HEAP32[$11>>2]|0; _Stream_ReadonlyMemory($3,$10,$12); $13 = (_Stream_ReadLine($3,$1)|0); $14 = ($13|0)==(0); if (!($14)) { STACKTOP = sp;return; } while(1) { $15 = HEAP32[$1>>2]|0; $16 = HEAP16[$7>>1]|0; $17 = $16&65535; _Platform_Log($15,$17); $18 = (_String_UNSAFE_Separate($1,61,$4,$5)|0); $19 = ($18|0)==(0); do { if (!($19)) { $22 = (_String_CaselessEqualsConst($4,42548)|0); $23 = ($22|0)==(0); if (!($23)) { $24 = (_WoM_ParseCol($5,-1)|0); _Env_SetCloudsCol($24); break; } $25 = (_String_CaselessEqualsConst($4,42566)|0); $26 = ($25|0)==(0); if (!($26)) { $27 = (_WoM_ParseCol($5,-13159)|0); _Env_SetSkyCol($27); break; } $28 = (_String_CaselessEqualsConst($4,42582)|0); $29 = ($28|0)==(0); if (!($29)) { $30 = (_WoM_ParseCol($5,-1)|0); _Env_SetFogCol($30); break; } $31 = (_String_CaselessEqualsConst($4,42598)|0); $32 = ($31|0)==(0); if ($32) { $36 = (_String_CaselessEqualsConst($4,42616)|0); $37 = ($36|0)==(0); $38 = HEAP8[1972885]|0; $39 = ($38<<24>>24)!=(0); $or$cond = $37 | $39; if ($or$cond) { break; } _Chat_AddOf($5,2); break; } else { $33 = (_Convert_ParseInt($5,$6)|0); $34 = ($33<<24>>24)==(0); if ($34) { break; } $35 = HEAP32[$6>>2]|0; _Env_SetEdgeHeight($35); break; } } } while(0); $20 = (_Stream_ReadLine($3,$1)|0); $21 = ($20|0)==(0); if (!($21)) { break; } } STACKTOP = sp;return; } function _WoM_ParseCol($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_Convert_ParseInt($0,$2)|0); $4 = ($3<<24>>24)==(0); if ($4) { $$0 = $1; STACKTOP = sp;return ($$0|0); } $5 = HEAP32[$2>>2]|0; $6 = (16)?($5 >>> 16):($5); $7 = $6 & 255; $8 = $5 & 65280; $9 = $5 << 16; $10 = $8 | $9; $11 = $10 | $7; $12 = $11 | -16777216; $$0 = $12; STACKTOP = sp;return ($$0|0); } function _Classic_WritePosition($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = +$2; $3 = +$3; var $$0 = 0, $$pn = 0, $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0.0; var $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0, $45 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 1|0); HEAP8[$0>>0] = 8; $5 = HEAP8[1972884]|0; $6 = ($5<<24>>24)==(0); if ($6) { $14 = 255; } else { $7 = HEAP32[(1811004)>>2]|0; $8 = HEAP32[(1811000)>>2]|0; $9 = (($8) + ($7))|0; $10 = (1809300 + ($9<<1)|0); $11 = HEAP16[$10>>1]|0; $14 = $11; } $12 = HEAP8[1972882]|0; $13 = ($12<<24>>24)==(0); if ($13) { $15 = $14&255; HEAP8[$4>>0] = $15; $$pn = $0; } else { _Stream_SetU16_BE($4,$14); $$pn = $4; } $$0 = ((($$pn)) + 2|0); $16 = +HEAPF32[$1>>2]; $17 = $16 * 32.0; $18 = (~~(($17))); $19 = ((($1)) + 4|0); $20 = +HEAPF32[$19>>2]; $21 = $20 * 32.0; $22 = (~~(($21))); $23 = (($22) + 51)|0; $24 = ((($1)) + 8|0); $25 = +HEAPF32[$24>>2]; $26 = $25 * 32.0; $27 = (~~(($26))); $28 = HEAP8[1972887]|0; $29 = ($28<<24>>24)==(0); if ($29) { $32 = $18&65535; _Stream_SetU16_BE($$0,$32); $33 = ((($$pn)) + 4|0); $34 = $23&65535; _Stream_SetU16_BE($33,$34); $35 = ((($$pn)) + 6|0); $36 = $27&65535; _Stream_SetU16_BE($35,$36); $$sink = 8; } else { _Stream_SetU32_BE($$0,$18); $30 = ((($$pn)) + 6|0); _Stream_SetU32_BE($30,$23); $31 = ((($$pn)) + 10|0); _Stream_SetU32_BE($31,$27); $$sink = 14; } $37 = (($$pn) + ($$sink)|0); $38 = $2 * 256.0; $39 = $38 / 360.0; $40 = (~~(($39))&255); $41 = ((($37)) + 1|0); HEAP8[$37>>0] = $40; $42 = $3 * 256.0; $43 = $42 / 360.0; $44 = (~~(($43))&255); $45 = ((($37)) + 2|0); HEAP8[$41>>0] = $44; return ($45|0); } function _Screen_FInput($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _Screen_FKeyPress($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _Screen_FText($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _Screen_FMouseScroll($0,$1) { $0 = $0|0; $1 = +$1; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _Screen_FPointer($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _Screen_TInput($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return 1; } function _Screen_TKeyPress($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return 1; } function _Screen_TText($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return 1; } function _Screen_TMouseScroll($0,$1) { $0 = $0|0; $1 = +$1; var label = 0, sp = 0; sp = STACKTOP; return 1; } function _Screen_TPointer($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; return 1; } function _Screen_NullFunc($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Screen_NullUpdate($0,$1) { $0 = $0|0; $1 = +$1; var label = 0, sp = 0; sp = STACKTOP; return; } function _HUDScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[274638] = 21060; HEAP32[482485] = 1098552; _Gui_Add(1098552,10); return; } function _HUDScreen_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 304|0); _HotbarWidget_Create($1); $2 = ((($0)) + 36|0); _TextWidget_Init($2); $3 = ((($0)) + 104|0); _TextWidget_Init($3); _Event_Register((1794828),$0,438); return; } function _HUDScreen_Update($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 288|0); $3 = HEAP32[$2>>2]|0; $4 = (($3) + 1)|0; HEAP32[$2>>2] = $4; $5 = ((($0)) + 280|0); $6 = +HEAPF64[$5>>3]; $7 = $6 + $1; HEAPF64[$5>>3] = $7; $8 = $7 < 1.0; if ($8) { return; } _HUDScreen_UpdateLine1($0); HEAPF64[$5>>3] = 0.0; HEAP32[$2>>2] = 0; HEAP32[(1085000)>>2] = 0; return; } function _HUDScreen_Free($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Event_Unregister((1794828),$0,438); return; } function _HUDScreen_Render($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[1972845]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { return; } $4 = HEAP8[(1803530)>>0]|0; $5 = ($4<<24>>24)==(0); if (!($5)) { $6 = ((($0)) + 36|0); $7 = HEAP32[$6>>2]|0; $8 = HEAP32[$7>>2]|0; FUNCTION_TABLE_vid[$8 & 63]($6,$1); } $9 = HEAP8[1972839]|0; $10 = ($9<<24>>24)==(0); if ($10) { $14 = (_IsOnlyChatActive()|0); $15 = ($14<<24>>24)==(0); $16 = HEAP8[(1803530)>>0]|0; $17 = ($16<<24>>24)==(0); $or$cond = $15 | $17; if (!($or$cond)) { $18 = (_HUDScreen_HasHacksChanged($0)|0); $19 = ($18<<24>>24)==(0); if (!($19)) { _HUDScreen_UpdateHackState($0); } _HUDScreen_DrawPosition($0); $20 = ((($0)) + 104|0); $21 = HEAP32[$20>>2]|0; $22 = HEAP32[$21>>2]|0; FUNCTION_TABLE_vid[$22 & 63]($20,$1); } } else { $11 = ((($0)) + 104|0); $12 = HEAP32[$11>>2]|0; $13 = HEAP32[$12>>2]|0; FUNCTION_TABLE_vid[$13 & 63]($11,$1); } $23 = (_Gui_GetBlocksWorld()|0); $24 = ($23|0)==(0|0); if (!($24)) { return; } $25 = ((($0)) + 304|0); $26 = HEAP32[$25>>2]|0; $27 = HEAP32[$26>>2]|0; FUNCTION_TABLE_vid[$27 & 63]($25,$1); return; } function _HUDScreen_BuildMesh($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _HUDScreen_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 304|0); $3 = HEAP32[$2>>2]|0; $4 = ((($3)) + 12|0); $5 = HEAP32[$4>>2]|0; $6 = (FUNCTION_TABLE_iii[$5 & 127]($2,$1)|0); return ($6|0); } function _HUDScreen_InputUp($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_InventoryScreen_IsHotbarActive()|0); $3 = ($2<<24>>24)==(0); if ($3) { return; } $4 = ((($0)) + 304|0); $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 16|0); $7 = HEAP32[$6>>2]|0; FUNCTION_TABLE_vii[$7 & 255]($4,$1); return; } function _HUDscreen_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP8[1972870]|0; $5 = ($4<<24>>24)!=(0); $6 = HEAP32[(1803572)>>2]|0; $7 = ($6|0)!=(0|0); $or$cond = $5 | $7; if (!($or$cond)) { $$0 = 0; return ($$0|0); } $8 = ((($0)) + 304|0); $9 = HEAP32[$8>>2]|0; $10 = ((($9)) + 24|0); $11 = HEAP32[$10>>2]|0; $12 = (FUNCTION_TABLE_iiiii[$11 & 63]($8,$1,$2,$3)|0); $$0 = $12; return ($$0|0); } function _HUDScreen_PointerUp($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP8[1972870]|0; $5 = ($4<<24>>24)==(0); if ($5) { return; } $6 = ((($0)) + 304|0); $7 = HEAP32[$6>>2]|0; $8 = ((($7)) + 28|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_viiii[$9 & 31]($6,$1,$2,$3); return; } function _HUDScreen_PointerMove($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP8[1972870]|0; $5 = ($4<<24>>24)==(0); if ($5) { $$0 = 0; return ($$0|0); } $6 = ((($0)) + 304|0); $7 = HEAP32[$6>>2]|0; $8 = ((($7)) + 32|0); $9 = HEAP32[$8>>2]|0; $10 = (FUNCTION_TABLE_iiiii[$9 & 63]($6,$1,$2,$3)|0); $$0 = $10; return ($$0|0); } function _HUDscreen_MouseScroll($0,$1) { $0 = $0|0; $1 = +$1; var $$0 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Input_HandleMouseWheel($1)|0); $3 = ($2<<24>>24)!=(0); $4 = HEAP8[(1811008)>>0]|0; $5 = ($4<<24>>24)==(0); $or$cond = $3 | $5; if ($or$cond) { $$0 = 0; return ($$0|0); } $6 = ((($0)) + 304|0); $7 = HEAP32[$6>>2]|0; $8 = ((($7)) + 20|0); $9 = HEAP32[$8>>2]|0; $10 = (FUNCTION_TABLE_iid[$9 & 15]($6,$1)|0); $$0 = $10; return ($$0|0); } function _HUDScreen_Layout($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 36|0); $2 = ((($0)) + 104|0); _Widget_SetLocation($1,0,0,2,2); $3 = ((($0)) + 44|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 52|0); $6 = HEAP32[$5>>2]|0; $7 = (($6) + ($4))|0; $8 = $7&65535; $9 = ((($0)) + 178|0); HEAP16[$9>>1] = $8; _Widget_SetLocation($2,0,0,2,0); $10 = HEAP8[1972839]|0; $11 = ($10<<24>>24)==(0); if ($11) { $18 = ((($0)) + 182|0); $19 = HEAP16[$18>>1]|0; $20 = $19&65535; $21 = (($7) + ($20))|0; $22 = ((($0)) + 132|0); HEAP32[$22>>2] = $21; (_HUDScreen_LayoutHotbar()|0); $23 = HEAP32[$2>>2]|0; $24 = ((($23)) + 8|0); $25 = HEAP32[$24>>2]|0; FUNCTION_TABLE_vi[$25 & 511]($2); return; } else { $12 = ((($0)) + 64|0); $13 = HEAP32[$12>>2]|0; $14 = ((($0)) + 132|0); HEAP32[$14>>2] = $13; HEAP32[$12>>2] = $7; $15 = HEAP32[$1>>2]|0; $16 = ((($15)) + 8|0); $17 = HEAP32[$16>>2]|0; FUNCTION_TABLE_vi[$17 & 511]($1); (_HUDScreen_LayoutHotbar()|0); $23 = HEAP32[$2>>2]|0; $24 = ((($23)) + 8|0); $25 = HEAP32[$24>>2]|0; FUNCTION_TABLE_vi[$25 & 511]($2); return; } } function _HUDScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 24|0); _Font_Free($1); $2 = ((($0)) + 172|0); _TextAtlas_Free($2); $3 = ((($0)) + 304|0); $4 = HEAP32[$3>>2]|0; $5 = ((($4)) + 4|0); $6 = HEAP32[$5>>2]|0; FUNCTION_TABLE_vi[$6 & 511]($3); $7 = ((($0)) + 36|0); $8 = HEAP32[$7>>2]|0; $9 = ((($8)) + 4|0); $10 = HEAP32[$9>>2]|0; FUNCTION_TABLE_vi[$10 & 511]($7); $11 = ((($0)) + 104|0); $12 = HEAP32[$11>>2]|0; $13 = ((($12)) + 4|0); $14 = HEAP32[$13>>2]|0; FUNCTION_TABLE_vi[$14 & 511]($11); return; } function _HUDScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 24|0); _Font_Make($1,16,4); _Font_SetPadding($1,2); $2 = ((($0)) + 304|0); _HotbarWidget_SetFont($2,$1); _HUDScreen_Update($0,1.0); $3 = ((($0)) + 172|0); _TextAtlas_Make($3,21124,$1,21132); $4 = HEAP8[1972839]|0; $5 = ($4<<24>>24)==(0); if ($5) { _HUDScreen_UpdateHackState($0); return; } else { $6 = ((($0)) + 104|0); $7 = HEAP32[450762]|0; _TextWidget_SetConst($6,$7,$1); return; } } function _HUDScreen_UpdateHackState($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 144|0; $1 = sp + 136|0; $2 = sp; $3 = sp + 128|0; $4 = HEAP8[(1784313)>>0]|0; $5 = (+_HacksComp_CalcSpeedFactor((1784300),$4)); HEAPF32[$3>>2] = $5; $6 = ((($0)) + 296|0); HEAPF32[$6>>2] = $5; $7 = HEAP32[(1771068)>>2]|0; $8 = ((($0)) + 300|0); HEAP32[$8>>2] = $7; $9 = ((($0)) + 292|0); HEAP8[$9>>0] = 0; HEAP32[$1>>2] = $2; $10 = ((($1)) + 4|0); HEAP16[$10>>1] = 0; $11 = ((($1)) + 6|0); HEAP16[$11>>1] = 128; $12 = HEAP32[(1771072)>>2]|0; $13 = ($7|0)==($12|0); if (!($13)) { _String_Format1($1,42628,(1771068)); } $14 = HEAP8[(1784335)>>0]|0; $15 = ($14<<24>>24)==(0); if (!($15)) { _String_AppendConst($1,42642); } $16 = +HEAPF32[$3>>2]; $17 = $16 != 0.0; if ($17) { _String_Format1($1,42652,$3); } $18 = HEAP8[(1784334)>>0]|0; $19 = ($18<<24>>24)==(0); if ($19) { $20 = ((($0)) + 104|0); $21 = ((($0)) + 24|0); _TextWidget_Set($20,$1,$21); STACKTOP = sp;return; } _String_AppendConst($1,42666); $20 = ((($0)) + 104|0); $21 = ((($0)) + 24|0); _TextWidget_Set($20,$1,$21); STACKTOP = sp;return; } function _HUDScreen_LayoutHotbar() { var $0 = 0.0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (+_Gui_GetHotbarScale()); HEAPF32[(1098968)>>2] = $0; $1 = HEAP32[(1098856)>>2]|0; $2 = ((($1)) + 8|0); $3 = HEAP32[$2>>2]|0; FUNCTION_TABLE_vi[$3 & 511]((1098856)); $4 = HEAP32[(1098872)>>2]|0; return ($4|0); } function _InventoryScreen_IsHotbarActive() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1803572)>>2]|0; $1 = ($0|0)==(0|0); $2 = ($0|0)==(1929944|0); $3 = $1 | $2; $4 = $3&1; return ($4|0); } function _IsOnlyChatActive() { var $$010 = 0, $$08 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1803516)>>2]|0; $1 = ($0|0)>(0); if (!($1)) { $$08 = 1; return ($$08|0); } $2 = HEAP32[482946]|0; $3 = HEAP32[(1803516)>>2]|0; $$010 = 0; while(1) { $6 = (390192 + ($$010<<2)|0); $7 = HEAP32[$6>>2]|0; $8 = ((($7)) + 4|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(0); $11 = ($7|0)==($2|0); $or$cond = $10 | $11; $4 = (($$010) + 1)|0; if (!($or$cond)) { $$08 = 0; label = 5; break; } $5 = ($4|0)<($3|0); if ($5) { $$010 = $4; } else { $$08 = 1; label = 5; break; } } if ((label|0) == 5) { return ($$08|0); } return (0)|0; } function _HUDScreen_HasHacksChanged($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1784313)>>0]|0; $2 = (+_HacksComp_CalcSpeedFactor((1784300),$1)); $3 = ((($0)) + 296|0); $4 = +HEAPF32[$3>>2]; $5 = $2 != $4; if ($5) { $13 = 1; return ($13|0); } $6 = HEAP32[(1771068)>>2]|0; $7 = ((($0)) + 300|0); $8 = HEAP32[$7>>2]|0; $9 = ($6|0)==($8|0); if (!($9)) { $13 = 1; return ($13|0); } $10 = ((($0)) + 292|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)!=(0); $phitmp = $12&1; $13 = $phitmp; return ($13|0); } function _HUDScreen_DrawPosition($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 6192|0; $1 = sp; $2 = sp + 6184|0; $3 = sp + 6156|0; $4 = sp + 6144|0; HEAP32[$2>>2] = $1; $5 = ((($0)) + 172|0); ;HEAP32[$3>>2]=HEAP32[$5>>2]|0;HEAP32[$3+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$3+8>>2]=HEAP32[$5+8>>2]|0;HEAP32[$3+12>>2]=HEAP32[$5+12>>2]|0;HEAP32[$3+16>>2]=HEAP32[$5+16>>2]|0;HEAP32[$3+20>>2]=HEAP32[$5+20>>2]|0;HEAP32[$3+24>>2]=HEAP32[$5+24>>2]|0; $6 = ((($3)) + 4|0); HEAP16[$6>>1] = 2; $7 = ((($0)) + 200|0); $8 = HEAP32[$7>>2]|0; $9 = $8&65535; $10 = ((($3)) + 8|0); HEAP16[$10>>1] = $9; _Gfx_Make2DQuad($3,-1,$2); _IVec3_Floor($4,(1783776)); $11 = HEAP32[$7>>2]|0; $12 = (($11) + 2)|0; $13 = ((($0)) + 204|0); HEAP32[$13>>2] = $12; _TextAtlas_Add($5,13,$2); $14 = HEAP32[$4>>2]|0; _TextAtlas_AddInt($5,$14,$2); _TextAtlas_Add($5,11,$2); $15 = ((($4)) + 4|0); $16 = HEAP32[$15>>2]|0; _TextAtlas_AddInt($5,$16,$2); _TextAtlas_Add($5,11,$2); $17 = ((($4)) + 8|0); $18 = HEAP32[$17>>2]|0; _TextAtlas_AddInt($5,$18,$2); _TextAtlas_Add($5,14,$2); $19 = HEAP32[$5>>2]|0; _Gfx_BindTexture($19); $20 = HEAP32[$2>>2]|0; $21 = $1; $22 = (($20) - ($21))|0; $23 = (($22|0) / 24)&-1; $24 = HEAP32[(1826328)>>2]|0; _Gfx_UpdateDynamicVb_IndexedTris($24,$1,$23); STACKTOP = sp;return; } function _HUDScreen_HacksChanged($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 292|0); HEAP8[$1>>0] = 1; return; } function _HUDScreen_UpdateLine1($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 160|0; $1 = sp + 144|0; $2 = sp; $3 = sp + 136|0; $4 = sp + 132|0; $5 = sp + 128|0; $6 = ((($0)) + 288|0); $7 = HEAP32[$6>>2]|0; $8 = (+($7|0)); $9 = ((($0)) + 280|0); $10 = +HEAPF64[$9>>3]; $11 = $8 / $10; $12 = (~~(($11))); HEAP32[$5>>2] = $12; HEAP32[$1>>2] = $2; $13 = ((($1)) + 4|0); HEAP16[$13>>1] = 0; $14 = ((($1)) + 6|0); HEAP16[$14>>1] = 128; _String_Format1($1,42706,$5); $15 = HEAP8[(1803530)>>0]|0; $16 = ($15<<24>>24)==(0); if ($16) { $17 = ((($0)) + 72|0); $18 = HEAP32[$17>>2]|0; $19 = ($18|0)==(0); if (!($19)) { STACKTOP = sp;return; } } $20 = HEAP8[1972839]|0; $21 = ($20<<24>>24)==(0); if ($21) { $22 = HEAP32[(1085000)>>2]|0; $23 = ($22|0)==(0); if (!($23)) { _String_Format1($1,42732,(1085000)); } $24 = HEAP32[450761]|0; $25 = (2)?($24 >> 2):($24); $26 = ($25*6)|0; HEAP32[$3>>2] = $26; _String_Format1($1,42746,$3); $27 = (_Ping_AveragePingMS()|0); HEAP32[$4>>2] = $27; $28 = ($27|0)==(0); if (!($28)) { _String_Format1($1,42758,$4); } } else { _String_Format1($1,42715,(1085000)); } $29 = ((($0)) + 36|0); $30 = ((($0)) + 24|0); _TextWidget_Set($29,$1,$30); STACKTOP = sp;return; } function _TabListOverlay_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[482947] = 21140; HEAP8[(1931830)>>0] = 0; _Gui_Add(1931788,17); return; } function _TabListOverlay_Init($0) { $0 = $0|0; var $$demorgan = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 40|0); HEAP8[$1>>0] = 1; $2 = HEAP8[(1803521)>>0]|0; $3 = ($2<<24>>24)!=(0); $4 = HEAP8[(1949242)>>0]|0; $5 = ($4<<24>>24)==(0); $narrow = $3 | $5; $6 = $narrow&1; $7 = ((($0)) + 41|0); HEAP8[$7>>0] = $6; $$demorgan = $3 | $5; $8 = $$demorgan ? 0 : 10; $9 = ((($0)) + 48|0); HEAP32[$9>>2] = $8; $10 = ((($0)) + 52|0); _TextWidget_Init($10); _Event_Register(1791188,$0,167); _Event_Register((1791448),$0,168); _Event_Register((1791708),$0,169); return; } function _TabListOverlay_Free($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 40|0); HEAP8[$1>>0] = 0; _Event_Unregister(1791188,$0,167); _Event_Unregister((1791448),$0,168); _Event_Unregister((1791708),$0,169); return; } function _TabListOverlay_Render($0,$1) { $0 = $0|0; $1 = +$1; var $$031 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = ((($0)) + 52|0); $4 = HEAP8[1972845]|0; $5 = ($4<<24>>24)==(0); if (!($5)) { STACKTOP = sp;return; } $6 = (_IsOnlyChatActive()|0); $7 = ($6<<24>>24)==(0); if ($7) { STACKTOP = sp;return; } $8 = ((($0)) + 24|0); $9 = HEAP32[$8>>2]|0; $10 = ((($0)) + 28|0); $11 = HEAP32[$10>>2]|0; $12 = ((($0)) + 32|0); $13 = HEAP32[$12>>2]|0; $14 = ((($0)) + 36|0); $15 = HEAP32[$14>>2]|0; _Gfx_Draw2DGradient($9,$11,$13,$15,-1275068416,-852348366); $16 = HEAP32[$3>>2]|0; $17 = HEAP32[$16>>2]|0; FUNCTION_TABLE_vid[$17 & 63]($3,$1); $18 = ((($0)) + 44|0); $19 = HEAP32[$18>>2]|0; $20 = ($19|0)>(0); if (!($20)) { STACKTOP = sp;return; } $21 = HEAP32[(1803572)>>2]|0; $22 = ((($0)) + 1160|0); $23 = ($21|0)==(0|0); $24 = ((($0)) + 136|0); $25 = ((($2)) + 4|0); $26 = ((($2)) + 6|0); $27 = ((($2)) + 8|0); $28 = ((($2)) + 10|0); $$031 = 0; while(1) { $29 = (($22) + (($$031*28)|0)|0); $30 = HEAP32[$29>>2]|0; $31 = ($30|0)==(0); if (!($31)) { ;HEAP32[$2>>2]=HEAP32[$29>>2]|0;HEAP32[$2+4>>2]=HEAP32[$29+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[$29+8>>2]|0;HEAP32[$2+12>>2]=HEAP32[$29+12>>2]|0;HEAP32[$2+16>>2]=HEAP32[$29+16>>2]|0;HEAP32[$2+20>>2]=HEAP32[$29+20>>2]|0;HEAP32[$2+24>>2]=HEAP32[$29+24>>2]|0; if (!($23)) { $32 = (($24) + ($$031<<1)|0); $33 = HEAP16[$32>>1]|0; $34 = ($33<<16>>16)==(-1); if (!($34)) { $35 = HEAP16[$25>>1]|0; $36 = $35 << 16 >> 16; $37 = HEAP16[$26>>1]|0; $38 = $37 << 16 >> 16; $39 = HEAP16[$27>>1]|0; $40 = $39&65535; $41 = HEAP16[$28>>1]|0; $42 = $41&65535; $43 = (_Gui_ContainsPointers($36,$38,$40,$42)|0); $44 = ($43|0)==(0); if (!($44)) { $45 = HEAP16[$25>>1]|0; $46 = $45&65535; $47 = (($46) + 4)|0; $48 = $47&65535; HEAP16[$25>>1] = $48; } } } _Texture_Render($2); } $49 = (($$031) + 1)|0; $50 = HEAP32[$18>>2]|0; $51 = ($49|0)<($50|0); if ($51) { $$031 = $49; } else { break; } } STACKTOP = sp;return; } function _TabListOverlay_BuildMesh($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _TabListOverlay_KeyUp($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(390763)>>0]|0; $3 = $2&255; $4 = ($3|0)==($1|0); if (!($4)) { return; } $5 = ((($0)) + 42|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); if (!($7)) { return; } _Gui_Remove($0); return; } function _TabListOverlay_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$030 = 0, $$031 = 0, $$sroa$3$0$$sroa_idx8 = 0, $$sroa$3$0$copyload = 0, $$sroa$4$0$$sroa_idx10 = 0, $$sroa$4$0$copyload = 0, $$sroa$5$0$$sroa_idx12 = 0, $$sroa$5$0$copyload = 0, $$sroa$6$0$$sroa_idx14 = 0, $$sroa$6$0$copyload = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $4 = sp + 264|0; $5 = sp; $6 = sp + 256|0; $7 = HEAP8[(1099108)>>0]|0; $8 = ($7<<24>>24)==(0); if ($8) { $$030 = 0; STACKTOP = sp;return ($$030|0); } HEAP32[$4>>2] = $5; $9 = ((($4)) + 4|0); HEAP16[$9>>1] = 0; $10 = ((($4)) + 6|0); HEAP16[$10>>1] = 256; $11 = ((($0)) + 44|0); $12 = HEAP32[$11>>2]|0; $13 = ($12|0)>(0); if (!($13)) { $$030 = 0; STACKTOP = sp;return ($$030|0); } $14 = ((($0)) + 1160|0); $15 = ((($0)) + 136|0); $$031 = 0; while(1) { $16 = (($14) + (($$031*28)|0)|0); $17 = HEAP32[$16>>2]|0; $18 = ($17|0)==(0); if (!($18)) { $19 = (($15) + ($$031<<1)|0); $20 = HEAP16[$19>>1]|0; $21 = ($20<<16>>16)==(-1); if (!($21)) { $$sroa$3$0$$sroa_idx8 = (((($14) + (($$031*28)|0)|0)) + 4|0); $$sroa$3$0$copyload = HEAP16[$$sroa$3$0$$sroa_idx8>>1]|0; $$sroa$4$0$$sroa_idx10 = (((($14) + (($$031*28)|0)|0)) + 6|0); $$sroa$4$0$copyload = HEAP16[$$sroa$4$0$$sroa_idx10>>1]|0; $$sroa$5$0$$sroa_idx12 = (((($14) + (($$031*28)|0)|0)) + 8|0); $$sroa$5$0$copyload = HEAP16[$$sroa$5$0$$sroa_idx12>>1]|0; $$sroa$6$0$$sroa_idx14 = (((($14) + (($$031*28)|0)|0)) + 10|0); $$sroa$6$0$copyload = HEAP16[$$sroa$6$0$$sroa_idx14>>1]|0; $22 = $$sroa$3$0$copyload << 16 >> 16; $23 = $$sroa$4$0$copyload << 16 >> 16; $24 = $$sroa$5$0$copyload&65535; $25 = $$sroa$6$0$copyload&65535; $26 = (_Gui_Contains($22,$23,$24,$25,$2,$3)|0); $27 = ($26|0)==(0); if (!($27)) { break; } } } $34 = (($$031) + 1)|0; $35 = HEAP32[$11>>2]|0; $36 = ($34|0)<($35|0); if ($36) { $$031 = $34; } else { $$030 = 0; label = 9; break; } } if ((label|0) == 9) { STACKTOP = sp;return ($$030|0); } $28 = HEAP16[$19>>1]|0; $29 = $28&65535; $30 = (1784624 + ($29<<1)|0); $31 = HEAP16[$30>>1]|0; $32 = $31&65535; $33 = (($32) + -3)|0; _StringsBuffer_UNSAFE_Get($6,(1785392),$33); _String_Format1($4,42790,$6); _ChatScreen_AppendInput($4); $$030 = 1; STACKTOP = sp;return ($$030|0); } function _TabListOverlay_Layout($0) { $0 = $0|0; var $$ = 0, $$080$lcssa = 0, $$08088 = 0, $$081$lcssa = 0, $$08187 = 0, $$08285 = 0, $$089 = 0, $$186 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0; var $57 = 0, $58 = 0, $59 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond95 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 44|0); $2 = HEAP32[$1>>2]|0; $3 = (_Math_CeilDiv($2,16)|0); $4 = ($3|0)>(0); if ($4) { $$08088 = 0;$$08187 = 0;$$089 = 0; while(1) { $5 = (_TabListOverlay_GetColumnWidth($0,$$089)|0); $6 = (($5) + ($$08187))|0; $7 = (_TabListOverlay_GetColumnHeight($0,$$089)|0); $8 = ($$08088|0)>($7|0); $9 = $8 ? $$08088 : $7; $10 = (($$089) + 1)|0; $exitcond95 = ($10|0)==($3|0); if ($exitcond95) { $$080$lcssa = $9;$$081$lcssa = $6; break; } else { $$08088 = $9;$$08187 = $6;$$089 = $10; } } } else { $$080$lcssa = 0;$$081$lcssa = 0; } $11 = (_Display_ScaleX(480)|0); $12 = ($$081$lcssa|0)>($11|0); $13 = $12 ? $$081$lcssa : $11; $14 = (_Display_ScaleX(10)|0); $15 = (_Display_ScaleY(10)|0); $16 = $14 << 1; $17 = (($13) + ($16))|0; $18 = $15 << 1; $19 = (($18) + ($$080$lcssa))|0; $20 = HEAP32[(1972120)>>2]|0; $21 = (($20|0) / 4)&-1; $22 = (($19|0) / 2)&-1; $23 = (($21) - ($22))|0; $24 = HEAP32[(1972116)>>2]|0; $25 = (_Gui_CalcPos(1,0,$17,$24)|0); $26 = ((($0)) + 24|0); HEAP32[$26>>2] = $25; $27 = ($23|0)>(0); $28 = $27 ? $23 : 0; $29 = (0 - ($28))|0; $30 = HEAP32[(1972120)>>2]|0; $31 = (_Gui_CalcPos(1,$29,$19,$30)|0); $32 = ((($0)) + 28|0); HEAP32[$32>>2] = $31; $33 = (($31) + ($15))|0; $34 = ($3|0)>(0); if ($34) { $35 = HEAP32[$26>>2]|0; $36 = (($35) + ($14))|0; $$08285 = $36;$$186 = 0; while(1) { _TabListOverlay_SetColumnPos($0,$$186,$$08285,$33); $37 = (_TabListOverlay_GetColumnWidth($0,$$186)|0); $38 = (($37) + ($$08285))|0; $39 = (($$186) + 1)|0; $exitcond = ($39|0)==($3|0); if ($exitcond) { break; } else { $$08285 = $38;$$186 = $39; } } } $40 = ((($0)) + 52|0); $41 = ((($0)) + 68|0); $42 = HEAP32[$41>>2]|0; $43 = HEAP32[$32>>2]|0; $44 = (($42) + ($15))|0; $45 = (($43) - ($44))|0; HEAP32[$32>>2] = $45; $46 = ((($0)) + 32|0); HEAP32[$46>>2] = $17; $47 = (_Display_ScaleY(300)|0); $48 = HEAP32[$41>>2]|0; $49 = (($48) + ($19))|0; $50 = ($47|0)>($49|0); $$ = $50 ? $47 : $49; $51 = ((($0)) + 36|0); HEAP32[$51>>2] = $$; $52 = ((($0)) + 74|0); HEAP8[$52>>0] = 1; $53 = HEAP32[$32>>2]|0; $54 = (($15|0) / 2)&-1; $55 = (($53) + ($54))|0; $56 = ((($0)) + 80|0); HEAP32[$56>>2] = $55; $57 = HEAP32[$40>>2]|0; $58 = ((($57)) + 8|0); $59 = HEAP32[$58>>2]|0; FUNCTION_TABLE_vi[$59 & 511]($40); return; } function _TabListOverlay_ContextLost($0) { $0 = $0|0; var $$010 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 44|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)>(0); if ($3) { $4 = ((($0)) + 1160|0); $$010 = 0; while(1) { $5 = (($4) + (($$010*28)|0)|0); _Gfx_DeleteTexture($5); $6 = (($$010) + 1)|0; $7 = HEAP32[$1>>2]|0; $8 = ($6|0)<($7|0); if ($8) { $$010 = $6; } else { break; } } } $9 = ((($0)) + 52|0); $10 = HEAP32[$9>>2]|0; $11 = ((($10)) + 4|0); $12 = HEAP32[$11>>2]|0; FUNCTION_TABLE_vi[$12 & 511]($9); $13 = ((($0)) + 120|0); _Font_Free($13); return; } function _TabListOverlay_ContextRecreated($0) { $0 = $0|0; var $$017 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1781704]|0; $2 = ($1<<24>>24)==(0); $3 = $2 ? 11 : 16; $4 = ((($0)) + 120|0); _Font_Make($4,$3,4); $5 = ((($0)) + 44|0); HEAP32[$5>>2] = 0; $6 = ((($0)) + 52|0); _TextWidget_SetConst($6,42771,$4); _Font_SetPadding($4,1); $$017 = 0; while(1) { $7 = (1784624 + ($$017<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = ($8<<16>>16)==(0); if (!($9)) { $10 = $$017&255; _TabListOverlay_AddName($0,$10,-1); } $11 = (($$017) + 1)|0; $exitcond = ($11|0)==(256); if ($exitcond) { break; } else { $$017 = $11; } } _TabListOverlay_SortAndLayout($0); return; } function _TabListOverlay_AddName($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; $4 = ($2|0)==(-1); if ($4) { $5 = ((($0)) + 44|0); $6 = HEAP32[$5>>2]|0; $7 = (($6) + 1)|0; HEAP32[$5>>2] = $7; $$0 = $6; } else { $$0 = $2; } $8 = $1&255; $9 = (1784624 + ($8<<1)|0); $10 = HEAP16[$9>>1]|0; $11 = $10&65535; $12 = (($11) + -2)|0; _StringsBuffer_UNSAFE_Get($3,(1785392),$12); $13 = $1&255; $14 = (((($0)) + 136|0) + ($$0<<1)|0); HEAP16[$14>>1] = $13; $15 = (((($0)) + 1160|0) + (($$0*28)|0)|0); _TabListOverlay_DrawText($15,$0,$3); STACKTOP = sp;return; } function _TabListOverlay_SortAndLayout($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _TabListOverlay_SortEntries($0); _TabListOverlay_Layout($0); return; } function _TabListOverlay_SortEntries($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $storemerge = 0, $storemerge1718 = 0, $storemerge19 = 0, $storemerge20 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($0)) + 44|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0); if ($4) { STACKTOP = sp;return; } $5 = ((($0)) + 41|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); if (!($7)) { HEAP32[(1931920)>>2] = 53; $8 = (($3) + -1)|0; _TabListOverlay_QuickSort(0,$8); STACKTOP = sp;return; } $storemerge19 = (($3) + -1)|0; HEAP32[$1>>2] = $storemerge19; $9 = ($3|0)>(0); if ($9) { $storemerge20 = $storemerge19; while(1) { $10 = (((($0)) + 136|0) + ($storemerge20<<1)|0); $11 = HEAP16[$10>>1]|0; $12 = ($11<<16>>16)==(-1); if ($12) { _TabListOverlay_DeleteAt($0,$storemerge20); } $storemerge = (($storemerge20) + -1)|0; $13 = ($storemerge20|0)>(0); if ($13) { $storemerge20 = $storemerge; } else { break; } } HEAP32[$1>>2] = -1; } HEAP32[(1931920)>>2] = 54; $14 = HEAP32[$2>>2]|0; $15 = (($14) + -1)|0; _TabListOverlay_QuickSort(0,$15); HEAP32[(1931920)>>2] = 53; HEAP32[$1>>2] = 0; $16 = HEAP32[$2>>2]|0; $17 = ($16|0)>(0); if (!($17)) { STACKTOP = sp;return; } $storemerge1718 = 0; while(1) { $18 = (((($0)) + 136|0) + ($storemerge1718<<1)|0); $19 = HEAP16[$18>>1]|0; $20 = $19&65535; _TabListOverlay_AddGroup($0,$20,$1); $21 = HEAP32[$1>>2]|0; $22 = (_TabListOverlay_GetGroupCount($0,$20,$21)|0); $23 = (($22) + ($21))|0; $24 = (($23) + -1)|0; _TabListOverlay_QuickSort($21,$24); $25 = (($22) + ($21))|0; HEAP32[$1>>2] = $25; $26 = HEAP32[$2>>2]|0; $27 = ($25|0)<($26|0); if ($27) { $storemerge1718 = $25; } else { break; } } STACKTOP = sp;return; } function _TabListOverlay_PlayerCompare($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 160|0; $2 = sp + 152|0; $3 = sp + 64|0; $4 = sp + 144|0; $5 = sp; $6 = sp + 136|0; $7 = sp + 128|0; $8 = (1785136 + ($0)|0); $9 = HEAP8[$8>>0]|0; $10 = (1785136 + ($1)|0); $11 = HEAP8[$10>>0]|0; $12 = ($9<<24>>24)==($11<<24>>24); if ($12) { HEAP32[$2>>2] = $3; $15 = ((($2)) + 4|0); HEAP16[$15>>1] = 0; $16 = ((($2)) + 6|0); HEAP16[$16>>1] = 64; $17 = (1784624 + ($0<<1)|0); $18 = HEAP16[$17>>1]|0; $19 = $18&65535; $20 = (($19) + -2)|0; _StringsBuffer_UNSAFE_Get($6,(1785392),$20); _String_AppendColorless($2,$6); HEAP32[$4>>2] = $5; $21 = ((($4)) + 4|0); HEAP16[$21>>1] = 0; $22 = ((($4)) + 6|0); HEAP16[$22>>1] = 64; $23 = (1784624 + ($1<<1)|0); $24 = HEAP16[$23>>1]|0; $25 = $24&65535; $26 = (($25) + -2)|0; _StringsBuffer_UNSAFE_Get($7,(1785392),$26); _String_AppendColorless($4,$7); $27 = (_String_Compare($2,$4)|0); $$0 = $27; STACKTOP = sp;return ($$0|0); } else { $13 = ($9&255)<($11&255); $14 = $13 ? -1 : 1; $$0 = $14; STACKTOP = sp;return ($$0|0); } } function _TabListOverlay_QuickSort($0,$1) { $0 = $0|0; $1 = $1|0; var $$068$lcssa = 0, $$06878 = 0, $$070$lcssa = 0, $$07077 = 0, $$07380 = 0, $$081 = 0, $$1 = 0, $$169 = 0, $$171 = 0, $$174 = 0, $$2 = 0, $$272 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0; var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0; var $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = HEAP32[(1931920)>>2]|0; $4 = ($0|0)<($1|0); if (!($4)) { STACKTOP = sp;return; } $$07380 = $1;$$081 = $0; while(1) { $5 = (($$081) + ($$07380))|0; $6 = (($5|0) / 2)&-1; $7 = (1931924 + ($6<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = $8&65535; $10 = ($$081|0)>($$07380|0); if ($10) { $$068$lcssa = $$07380;$$070$lcssa = $$081; } else { $$06878 = $$07380;$$07077 = $$081; while(1) { $$171 = $$07077; while(1) { $11 = (1931924 + ($$171<<1)|0); $12 = HEAP16[$11>>1]|0; $13 = $12&65535; $14 = (FUNCTION_TABLE_iii[$3 & 127]($9,$13)|0); $15 = ($14|0)>(0); $16 = (($$171) + 1)|0; if ($15) { $$171 = $16; } else { break; } } $$169 = $$06878; while(1) { $17 = (1931924 + ($$169<<1)|0); $18 = HEAP16[$17>>1]|0; $19 = $18&65535; $20 = (FUNCTION_TABLE_iii[$3 & 127]($9,$19)|0); $21 = ($20|0)<(0); $22 = (($$169) + -1)|0; if ($21) { $$169 = $22; } else { break; } } $23 = ($$171|0)>($$169|0); if ($23) { $$2 = $$169;$$272 = $$171; } else { $24 = HEAP16[$11>>1]|0; $25 = HEAP16[$17>>1]|0; HEAP16[$11>>1] = $25; HEAP16[$17>>1] = $24; $26 = (1932948 + (($$171*28)|0)|0); ;HEAP32[$2>>2]=HEAP32[$26>>2]|0;HEAP32[$2+4>>2]=HEAP32[$26+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[$26+8>>2]|0;HEAP32[$2+12>>2]=HEAP32[$26+12>>2]|0;HEAP32[$2+16>>2]=HEAP32[$26+16>>2]|0;HEAP32[$2+20>>2]=HEAP32[$26+20>>2]|0;HEAP32[$2+24>>2]=HEAP32[$26+24>>2]|0; $27 = (1932948 + (($$169*28)|0)|0); ;HEAP32[$26>>2]=HEAP32[$27>>2]|0;HEAP32[$26+4>>2]=HEAP32[$27+4>>2]|0;HEAP32[$26+8>>2]=HEAP32[$27+8>>2]|0;HEAP32[$26+12>>2]=HEAP32[$27+12>>2]|0;HEAP32[$26+16>>2]=HEAP32[$27+16>>2]|0;HEAP32[$26+20>>2]=HEAP32[$27+20>>2]|0;HEAP32[$26+24>>2]=HEAP32[$27+24>>2]|0; ;HEAP32[$27>>2]=HEAP32[$2>>2]|0;HEAP32[$27+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$27+8>>2]=HEAP32[$2+8>>2]|0;HEAP32[$27+12>>2]=HEAP32[$2+12>>2]|0;HEAP32[$27+16>>2]=HEAP32[$2+16>>2]|0;HEAP32[$27+20>>2]=HEAP32[$2+20>>2]|0;HEAP32[$27+24>>2]=HEAP32[$2+24>>2]|0; $28 = (($$171) + 1)|0; $29 = (($$169) + -1)|0; $$2 = $29;$$272 = $28; } $30 = ($$272|0)>($$2|0); if ($30) { $$068$lcssa = $$2;$$070$lcssa = $$272; break; } else { $$06878 = $$2;$$07077 = $$272; } } } $31 = (($$068$lcssa) - ($$081))|0; $32 = (($$07380) - ($$070$lcssa))|0; $33 = ($31|0)>($32|0); if ($33) { $35 = ($$07380|0)>($$070$lcssa|0); if ($35) { _TabListOverlay_QuickSort($$070$lcssa,$$07380); $$1 = $$081;$$174 = $$068$lcssa; } else { $$1 = $$081;$$174 = $$068$lcssa; } } else { $34 = ($$068$lcssa|0)>($$081|0); if ($34) { _TabListOverlay_QuickSort($$081,$$068$lcssa); $$1 = $$070$lcssa;$$174 = $$07380; } else { $$1 = $$070$lcssa;$$174 = $$07380; } } $36 = ($$1|0)<($$174|0); if ($36) { $$07380 = $$174;$$081 = $$1; } else { break; } } STACKTOP = sp;return; } function _TabListOverlay_DeleteAt($0,$1) { $0 = $0|0; $1 = $1|0; var $$017 = 0, $$lcssa = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (((($0)) + 1160|0) + (($1*28)|0)|0); _Gfx_DeleteTexture($2); $3 = ((($0)) + 44|0); $4 = HEAP32[$3>>2]|0; $5 = (($4) + -1)|0; $6 = ($5|0)>($1|0); if (!($6)) { $$lcssa = $5; HEAP32[$3>>2] = $$lcssa; $16 = (((($0)) + 136|0) + ($$lcssa<<1)|0); HEAP16[$16>>1] = 0; $17 = (((($0)) + 1160|0) + (($$lcssa*28)|0)|0); HEAP32[$17>>2] = 0; return; } $$017 = $1; while(1) { $7 = (($$017) + 1)|0; $8 = (((($0)) + 136|0) + ($7<<1)|0); $9 = HEAP16[$8>>1]|0; $10 = (((($0)) + 136|0) + ($$017<<1)|0); HEAP16[$10>>1] = $9; $11 = (((($0)) + 1160|0) + (($$017*28)|0)|0); $12 = (((($0)) + 1160|0) + (($7*28)|0)|0); ;HEAP32[$11>>2]=HEAP32[$12>>2]|0;HEAP32[$11+4>>2]=HEAP32[$12+4>>2]|0;HEAP32[$11+8>>2]=HEAP32[$12+8>>2]|0;HEAP32[$11+12>>2]=HEAP32[$12+12>>2]|0;HEAP32[$11+16>>2]=HEAP32[$12+16>>2]|0;HEAP32[$11+20>>2]=HEAP32[$12+20>>2]|0;HEAP32[$11+24>>2]=HEAP32[$12+24>>2]|0; $13 = HEAP32[$3>>2]|0; $14 = (($13) + -1)|0; $15 = ($7|0)<($14|0); if ($15) { $$017 = $7; } else { $$lcssa = $14; break; } } HEAP32[$3>>2] = $$lcssa; $16 = (((($0)) + 136|0) + ($$lcssa<<1)|0); HEAP16[$16>>1] = 0; $17 = (((($0)) + 1160|0) + (($$lcssa*28)|0)|0); HEAP32[$17>>2] = 0; return; } function _TabListOverlay_GroupCompare($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 8|0; $3 = sp; $4 = (1784624 + ($0<<1)|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; $7 = (($6) + -1)|0; _StringsBuffer_UNSAFE_Get($2,(1785392),$7); $8 = (1784624 + ($1<<1)|0); $9 = HEAP16[$8>>1]|0; $10 = $9&65535; $11 = (($10) + -1)|0; _StringsBuffer_UNSAFE_Get($3,(1785392),$11); $12 = (_String_Compare($2,$3)|0); STACKTOP = sp;return ($12|0); } function _TabListOverlay_AddGroup($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$021 = 0, $$lcssa = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; $4 = (1784624 + ($1<<1)|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; $7 = (($6) + -1)|0; _StringsBuffer_UNSAFE_Get($3,(1785392),$7); $8 = HEAP32[$2>>2]|0; $9 = ($8|0)<(511); if ($9) { $$021 = 511; while(1) { $10 = (($$021) + -1)|0; $11 = (((($0)) + 136|0) + ($10<<1)|0); $12 = HEAP16[$11>>1]|0; $13 = (((($0)) + 136|0) + ($$021<<1)|0); HEAP16[$13>>1] = $12; $14 = (((($0)) + 1160|0) + (($$021*28)|0)|0); $15 = (((($0)) + 1160|0) + (($10*28)|0)|0); ;HEAP32[$14>>2]=HEAP32[$15>>2]|0;HEAP32[$14+4>>2]=HEAP32[$15+4>>2]|0;HEAP32[$14+8>>2]=HEAP32[$15+8>>2]|0;HEAP32[$14+12>>2]=HEAP32[$15+12>>2]|0;HEAP32[$14+16>>2]=HEAP32[$15+16>>2]|0;HEAP32[$14+20>>2]=HEAP32[$15+20>>2]|0;HEAP32[$14+24>>2]=HEAP32[$15+24>>2]|0; $16 = HEAP32[$2>>2]|0; $17 = ($10|0)>($16|0); if ($17) { $$021 = $10; } else { $$lcssa = $16; break; } } } else { $$lcssa = $8; } $18 = (((($0)) + 136|0) + ($$lcssa<<1)|0); HEAP16[$18>>1] = -1; $19 = (((($0)) + 1160|0) + (($$lcssa*28)|0)|0); HEAP32[$19>>2] = 0; $20 = (((($0)) + 1160|0) + (($$lcssa*28)|0)|0); _TabListOverlay_DrawText($20,$0,$3); $21 = HEAP32[$2>>2]|0; $22 = (($21) + 1)|0; HEAP32[$2>>2] = $22; $23 = ((($0)) + 44|0); $24 = HEAP32[$23>>2]|0; $25 = (($24) + 1)|0; HEAP32[$23>>2] = $25; STACKTOP = sp;return; } function _TabListOverlay_GetGroupCount($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0$lcssa = 0, $$013 = 0, $$0812 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $3 = sp + 16|0; $4 = sp + 8|0; $5 = sp; $6 = (1784624 + ($1<<1)|0); $7 = HEAP16[$6>>1]|0; $8 = $7&65535; $9 = (($8) + -1)|0; _StringsBuffer_UNSAFE_Get($3,(1785392),$9); $10 = ((($0)) + 44|0); $11 = HEAP32[$10>>2]|0; $12 = ($11|0)>($2|0); if (!($12)) { $$0$lcssa = 0; STACKTOP = sp;return ($$0$lcssa|0); } $$013 = 0;$$0812 = $2; while(1) { $13 = (((($0)) + 136|0) + ($$0812<<1)|0); $14 = HEAP16[$13>>1]|0; $15 = $14&65535; $16 = (1784624 + ($15<<1)|0); $17 = HEAP16[$16>>1]|0; $18 = $17&65535; $19 = (($18) + -1)|0; _StringsBuffer_UNSAFE_Get($5,(1785392),$19); $20 = $5; $21 = $20; $22 = HEAP32[$21>>2]|0; $23 = (($20) + 4)|0; $24 = $23; $25 = HEAP32[$24>>2]|0; $26 = $4; $27 = $26; HEAP32[$27>>2] = $22; $28 = (($26) + 4)|0; $29 = $28; HEAP32[$29>>2] = $25; $30 = (_String_CaselessEquals($3,$4)|0); $31 = ($30|0)==(0); if ($31) { $$0$lcssa = $$013; label = 5; break; } $32 = (($$0812) + 1)|0; $33 = (($$013) + 1)|0; $34 = HEAP32[$10>>2]|0; $35 = ($32|0)<($34|0); if ($35) { $$013 = $33;$$0812 = $32; } else { $$0$lcssa = $33; label = 5; break; } } if ((label|0) == 5) { STACKTOP = sp;return ($$0$lcssa|0); } return (0)|0; } function _TabListOverlay_DrawText($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $3 = sp + 64|0; $4 = sp; $5 = sp + 72|0; $6 = HEAP8[1972839]|0; $7 = ($6<<24>>24)==(0); $8 = HEAP8[1972840]|0; $9 = ($8<<24>>24)!=(0); $or$cond = $7 | $9; if ($or$cond) { $12 = $2; $13 = $12; $14 = HEAP32[$13>>2]|0; $15 = (($12) + 4)|0; $16 = $15; $17 = HEAP32[$16>>2]|0; $18 = $3; $19 = $18; HEAP32[$19>>2] = $14; $20 = (($18) + 4)|0; $21 = $20; HEAP32[$21>>2] = $17; } else { HEAP32[$3>>2] = $4; $10 = ((($3)) + 4|0); HEAP16[$10>>1] = 0; $11 = ((($3)) + 6|0); HEAP16[$11>>1] = 64; _String_AppendColorless($3,$2); } $22 = ((($1)) + 120|0); $23 = ((($1)) + 41|0); $24 = HEAP8[$23>>0]|0; $25 = ($24<<24>>24)==(0); $26 = $25&1; _DrawTextArgs_Make($5,$3,$22,$26); _Drawer2D_MakeTextTexture($0,$5); STACKTOP = sp;return; } function _TabListOverlay_GetColumnWidth($0,$1) { $0 = $0|0; $1 = $1|0; var $$ = 0, $$0$ = 0, $$0$lcssa = 0, $$01920 = 0, $$021 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $1 << 4; $3 = ((($0)) + 44|0); $4 = HEAP32[$3>>2]|0; $5 = (($2) + 16)|0; $6 = ($4|0)<($5|0); $$ = $6 ? $4 : $5; $7 = ($2|0)<($$|0); if ($7) { $$01920 = $2;$$021 = 0; while(1) { $8 = (((((($0)) + 1160|0) + (($$01920*28)|0)|0)) + 8|0); $9 = HEAP16[$8>>1]|0; $10 = $9&65535; $11 = ($$021|0)>($10|0); $$0$ = $11 ? $$021 : $10; $12 = (($$01920) + 1)|0; $13 = ($12|0)<($$|0); if ($13) { $$01920 = $12;$$021 = $$0$; } else { break; } } $phitmp = (($$0$) + 5)|0; $$0$lcssa = $phitmp; } else { $$0$lcssa = 5; } $14 = ((($0)) + 48|0); $15 = HEAP32[$14>>2]|0; $16 = (($$0$lcssa) + ($15))|0; return ($16|0); } function _TabListOverlay_GetColumnHeight($0,$1) { $0 = $0|0; $1 = $1|0; var $$ = 0, $$0$lcssa = 0, $$01617 = 0, $$018 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $1 << 4; $3 = ((($0)) + 44|0); $4 = HEAP32[$3>>2]|0; $5 = (($2) + 16)|0; $6 = ($4|0)<($5|0); $$ = $6 ? $4 : $5; $7 = ($2|0)<($$|0); if (!($7)) { $$0$lcssa = 0; return ($$0$lcssa|0); } $$01617 = $2;$$018 = 0; while(1) { $8 = (((((($0)) + 1160|0) + (($$01617*28)|0)|0)) + 10|0); $9 = HEAP16[$8>>1]|0; $10 = $9&65535; $11 = (($$018) + 1)|0; $12 = (($11) + ($10))|0; $13 = (($$01617) + 1)|0; $14 = ($13|0)<($$|0); if ($14) { $$01617 = $13;$$018 = $12; } else { $$0$lcssa = $12; break; } } return ($$0$lcssa|0); } function _TabListOverlay_SetColumnPos($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$ = 0, $$04850 = 0, $$051 = 0, $$sroa$4$0 = 0, $$sroa$4$0$$sroa_idx14 = 0, $$sroa$7$0$$sroa_idx18 = 0, $$sroa$826$0$$sroa_idx27 = 0, $$sroa$826$0$copyload = 0, $$sroa$9 = 0, $$sroa$9$0$$sroa_idx = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $$sroa$9 = sp; $4 = $1 << 4; $5 = ((($0)) + 44|0); $6 = HEAP32[$5>>2]|0; $7 = (($4) + 16)|0; $8 = ($6|0)<($7|0); $$ = $8 ? $6 : $7; $9 = ($4|0)<($$|0); if (!($9)) { STACKTOP = sp;return; } $10 = $2&65535; $11 = ((($0)) + 41|0); $12 = ((($0)) + 48|0); $$04850 = $4;$$051 = $3; while(1) { $$sroa$4$0$$sroa_idx14 = (((((($0)) + 1160|0) + (($$04850*28)|0)|0)) + 4|0); $$sroa$7$0$$sroa_idx18 = (((((($0)) + 1160|0) + (($$04850*28)|0)|0)) + 6|0); $$sroa$826$0$$sroa_idx27 = (((((($0)) + 1160|0) + (($$04850*28)|0)|0)) + 10|0); $$sroa$826$0$copyload = HEAP16[$$sroa$826$0$$sroa_idx27>>1]|0; $$sroa$9$0$$sroa_idx = (((((($0)) + 1160|0) + (($$04850*28)|0)|0)) + 12|0); ;HEAP32[$$sroa$9>>2]=HEAP32[$$sroa$9$0$$sroa_idx>>2]|0;HEAP32[$$sroa$9+4>>2]=HEAP32[$$sroa$9$0$$sroa_idx+4>>2]|0;HEAP32[$$sroa$9+8>>2]=HEAP32[$$sroa$9$0$$sroa_idx+8>>2]|0;HEAP32[$$sroa$9+12>>2]=HEAP32[$$sroa$9$0$$sroa_idx+12>>2]|0; $13 = (($$051) + 65526)|0; $14 = $13&65535; $15 = $$sroa$826$0$copyload&65535; $16 = (($$051) + 1)|0; $17 = (($16) + ($15))|0; $18 = HEAP8[$11>>0]|0; $19 = ($18<<24>>24)==(0); if ($19) { $20 = (((($0)) + 136|0) + ($$04850<<1)|0); $21 = HEAP16[$20>>1]|0; $22 = ($21<<16>>16)==(-1); if ($22) { $$sroa$4$0 = $10; } else { $23 = HEAP32[$12>>2]|0; $24 = (($23) + ($2))|0; $25 = $24&65535; $$sroa$4$0 = $25; } } else { $$sroa$4$0 = $10; } HEAP16[$$sroa$4$0$$sroa_idx14>>1] = $$sroa$4$0; HEAP16[$$sroa$7$0$$sroa_idx18>>1] = $14; ;HEAP32[$$sroa$9$0$$sroa_idx>>2]=HEAP32[$$sroa$9>>2]|0;HEAP32[$$sroa$9$0$$sroa_idx+4>>2]=HEAP32[$$sroa$9+4>>2]|0;HEAP32[$$sroa$9$0$$sroa_idx+8>>2]=HEAP32[$$sroa$9+8>>2]|0;HEAP32[$$sroa$9$0$$sroa_idx+12>>2]=HEAP32[$$sroa$9+12>>2]|0; $26 = (($$04850) + 1)|0; $27 = ($26|0)<($$|0); if ($27) { $$04850 = $26;$$051 = $17; } else { break; } } STACKTOP = sp;return; } function _ChatScreen_AppendInput($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _InputWidget_AppendText((1099408),$0); return; } function _TabListOverlay_Add($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $1&255; _TabListOverlay_AddName($0,$2,-1); _TabListOverlay_SortAndLayout($0); return; } function _TabListOverlay_Update($0,$1) { $0 = $0|0; $1 = $1|0; var $$016 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 44|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)>(0); if (!($4)) { return; } $5 = ((($0)) + 136|0); $$016 = 0; while(1) { $6 = (($5) + ($$016<<1)|0); $7 = HEAP16[$6>>1]|0; $8 = $7&65535; $9 = ($8|0)==($1|0); if ($9) { break; } $13 = (($$016) + 1)|0; $14 = HEAP32[$2>>2]|0; $15 = ($13|0)<($14|0); if ($15) { $$016 = $13; } else { label = 6; break; } } if ((label|0) == 6) { return; } $10 = ((($0)) + 1160|0); $11 = (($10) + (($$016*28)|0)|0); _Gfx_DeleteTexture($11); $12 = $1&255; _TabListOverlay_AddName($0,$12,$$016); _TabListOverlay_SortAndLayout($0); return; } function _TabListOverlay_Remove($0,$1) { $0 = $0|0; $1 = $1|0; var $$013 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 44|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)>(0); if (!($4)) { return; } $5 = ((($0)) + 136|0); $$013 = 0; while(1) { $6 = (($5) + ($$013<<1)|0); $7 = HEAP16[$6>>1]|0; $8 = $7&65535; $9 = ($8|0)==($1|0); if ($9) { break; } $10 = (($$013) + 1)|0; $11 = HEAP32[$2>>2]|0; $12 = ($10|0)<($11|0); if ($12) { $$013 = $10; } else { label = 6; break; } } if ((label|0) == 6) { return; } _TabListOverlay_DeleteAt($0,$$013); _TabListOverlay_SortAndLayout($0); return; } function _ChatScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[(1099148)>>2] = -3; HEAP32[274776] = 21204; HEAP32[482946] = 1099104; _Gui_Add(1099104,15); return; } function _ChatScreen_Init($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 304|0); _ChatInputWidget_Create($1); $2 = ((($0)) + 360|0); HEAP32[$2>>2] = 439; $3 = ((($0)) + 1264|0); $4 = ((($0)) + 48|0); _SpecialInputWidget_Create($3,$4,$1); $5 = ((($0)) + 912|0); $6 = ((($0)) + 2792|0); _TextGroupWidget_Create($5,5,$6,170); $7 = ((($0)) + 1000|0); $8 = ((($0)) + 2932|0); _TextGroupWidget_Create($7,3,$8,171); $9 = ((($0)) + 1088|0); $10 = HEAP32[(1803524)>>2]|0; $11 = ((($0)) + 3072|0); _TextGroupWidget_Create($9,$10,$11,172); $12 = ((($0)) + 1176|0); $13 = ((($0)) + 3016|0); _TextGroupWidget_Create($12,2,$13,173); $14 = ((($0)) + 96|0); _TextWidget_Init($14); $15 = ((($0)) + 164|0); _TextWidget_Init($15); $16 = ((($0)) + 232|0); _TextWidget_Init($16); $17 = ((($0)) + 960|0); HEAP8[$17>>0] = 1; $18 = ((($0)) + 961|0); HEAP8[$18>>0] = 1; $19 = ((($0)) + 1224|0); HEAP8[$19>>0] = 1; $20 = ((($0)) + 1225|0); HEAP8[$20>>0] = 1; $21 = HEAP8[1972839]|0; $22 = ($21<<24>>24)==(0); $23 = $22&1; $24 = ((($0)) + 1166|0); HEAP8[$24>>0] = $23; $25 = HEAP32[(1771252)>>2]|0; $26 = HEAP32[(1803524)>>2]|0; $27 = (($25) - ($26))|0; $28 = ((($0)) + 32|0); HEAP32[$28>>2] = $27; _Event_Register((1796908),$0,10); _Event_Register((1797428),$0,174); $29 = ((($0)) + 2528|0); _ButtonWidget_Init($29,100,0); $30 = ((($0)) + 2616|0); _ButtonWidget_Init($30,100,0); $31 = ((($0)) + 2704|0); _ButtonWidget_Init($31,100,0); return; } function _ChatScreen_Free($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Event_Unregister((1796908),$0,10); _Event_Unregister((1797428),$0,174); return; } function _ChatScreen_Render($0,$1) { $0 = $0|0; $1 = +$1; var $$pr = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0; var label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[1972845]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { $4 = ((($0)) + 4|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(0); if (!($6)) { $7 = ((($0)) + 304|0); $8 = HEAP32[$7>>2]|0; $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_vid[$9 & 63]($7,$1); } $$pr = HEAP8[1972845]|0; $10 = ($$pr<<24>>24)==(0); if (!($10)) { return; } } $11 = HEAP8[(1931828)>>0]|0; $12 = ($11<<24>>24)==(0); if ($12) { $13 = (_Gui_GetBlocksWorld()|0); $14 = ($13|0)==(0|0); if ($14) { _ChatScreen_DrawCrosshairs(); } } $15 = ((($0)) + 4|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(0); $18 = HEAP8[(1803523)>>0]|0; $19 = ($18<<24>>24)!=(0); $or$cond = $17 | $19; if (!($or$cond)) { _ChatScreen_DrawChatBackground($0); } _ChatScreen_DrawChat($0,$1); return; } function _ChatScreen_BuildMesh($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _ChatScreen_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$off = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $or$cond = 0, $or$cond29 = 0, $or$cond5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(390763)>>0]|0; $3 = $2&255; $4 = ($2<<24>>24)==(95); $5 = HEAP8[(1803529)>>0]|0; $6 = ($5<<24>>24)!=(0); $or$cond = $4 & $6; if ($or$cond) { $7 = ((($0)) + 4|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)!=(0); $11 = $9; } else { $11 = 0; } $10 = ($3|0)!=($1|0); $or$cond29 = $10 | $11; if (!($or$cond29)) { $12 = HEAP8[(1931828)>>0]|0; $13 = HEAP8[(1949240)>>0]|0; $14 = $13 | $12; $15 = ($14<<24>>24)==(0); if (!($15)) { $$0 = 1; return ($$0|0); } _TabListOverlay_Show(); $$0 = 1; return ($$0|0); } $16 = ((($0)) + 28|0); HEAP8[$16>>0] = 0; $17 = ((($0)) + 4|0); $18 = HEAP8[$17>>0]|0; $19 = ($18<<24>>24)==(0); if (!($19)) { $20 = HEAP8[(390762)>>0]|0; $21 = $20&255; $22 = ($21|0)==($1|0); $23 = ($1|0)==(116); $or$cond5 = $23 | $22; L13: do { if ($or$cond5) { _ChatScreen_EnterChatInput($0,0); } else { switch ($1|0) { case 62: { $24 = HEAP32[(1803524)>>2]|0; $25 = (0 - ($24))|0; _ChatScreen_ScrollChatBy($0,$25); break L13; } case 63: { $26 = HEAP32[(1803524)>>2]|0; _ChatScreen_ScrollChatBy($0,$26); break L13; } default: { $27 = ((($0)) + 304|0); $28 = HEAP32[$27>>2]|0; $29 = ((($28)) + 12|0); $30 = HEAP32[$29>>2]|0; (FUNCTION_TABLE_iii[$30 & 127]($27,$1)|0); break L13; } } } } while(0); $$off = (($1) + -1)|0; $31 = ($$off>>>0)>(23); $32 = $31&1; $$0 = $32; return ($$0|0); } $33 = HEAP8[(390759)>>0]|0; $34 = $33&255; $35 = ($34|0)==($1|0); if ($35) { _ChatScreen_OpenInput(1949280); $$0 = 1; return ($$0|0); } $36 = ($1|0)==(30); if ($36) { _ChatScreen_OpenInput(21268); $$0 = 1; return ($$0|0); } $37 = HEAP8[(390760)>>0]|0; $38 = $37&255; $39 = ($38|0)==($1|0); if (!($39)) { $$0 = 0; return ($$0|0); } _InventoryScreen_Show(); $$0 = 1; return ($$0|0); } function _ChatScreen_KeyUp($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if ($4) { return; } $5 = HEAP32[(1803572)>>2]|0; $6 = ($5|0)==($0|0); if (!($6)) { return; } $7 = ($1|0)==(92); if ($7) { _ChatScreen_EnterChatInput($0,1); } $8 = HEAP8[(1949245)>>0]|0; $9 = ($8<<24>>24)==(0); if ($9) { return; } $10 = HEAP8[(390769)>>0]|0; $11 = $10&255; $12 = ($11|0)!=($1|0); $13 = HEAP8[(1972125)>>0]|0; $14 = ($13<<24>>24)==(0); $or$cond = $12 | $14; if ($or$cond) { return; } _ChatScreen_ToggleAltInput($0); return; } function _ChatScreen_KeyPress($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if ($4) { $$0 = 0; return ($$0|0); } $5 = ((($0)) + 28|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); if ($7) { $8 = ((($0)) + 304|0); _InputWidget_Append($8,$1); $$0 = 1; return ($$0|0); } else { HEAP8[$5>>0] = 0; $$0 = 0; return ($$0|0); } } function _ChatScreen_TextChanged($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if ($4) { $$0 = 0; return ($$0|0); } $5 = ((($0)) + 304|0); _InputWidget_SetText($5,$1); $$0 = 1; return ($$0|0); } function _ChatScreen_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $4 = sp + 256|0; $5 = sp; $6 = HEAP8[1972845]|0; $7 = ($6<<24>>24)==(0); if (!($7)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $8 = ((($0)) + 4|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(0); $11 = HEAP8[1972870]|0; $12 = ($11<<24>>24)!=(0); if ($10) { if (!($12)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } HEAP32[$4>>2] = $5; $13 = ((($4)) + 4|0); HEAP16[$13>>1] = 0; $14 = ((($4)) + 6|0); HEAP16[$14>>1] = 256; $15 = ((($0)) + 1088|0); $16 = (_TextGroupWidget_GetSelected($15,$4,$2,$3)|0); $17 = (_Utils_IsUrlPrefix($4)|0); $18 = ($17<<24>>24)==(0); if ($18) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $19 = ((($0)) + 32|0); $20 = HEAP32[$19>>2]|0; $21 = (($20) + ($16))|0; $22 = $21 & 31; $23 = (165664 + ($22<<3)|0); $24 = +HEAPF64[$23>>3]; $25 = $24 + 10.0; $26 = +HEAPF64[(1084992)>>3]; $27 = $25 < $26; if ($27) { $$0 = 0; STACKTOP = sp;return ($$0|0); } _UrlWarningOverlay_Show($4); $$0 = 1; STACKTOP = sp;return ($$0|0); } if ($12) { $28 = ((($0)) + 2528|0); $29 = (_Widget_Contains($28,$2,$3)|0); $30 = ($29|0)==(0); if (!($30)) { _ChatScreen_EnterChatInput($0,0); $$0 = 1; STACKTOP = sp;return ($$0|0); } $31 = ((($0)) + 2616|0); $32 = (_Widget_Contains($31,$2,$3)|0); $33 = ($32|0)==(0); if (!($33)) { _ChatScreen_EnterChatInput($0,1); $$0 = 1; STACKTOP = sp;return ($$0|0); } $34 = ((($0)) + 2704|0); $35 = (_Widget_Contains($34,$2,$3)|0); $36 = ($35|0)==(0); if (!($36)) { _ChatScreen_ToggleAltInput($0); $$0 = 1; STACKTOP = sp;return ($$0|0); } } $37 = ((($0)) + 1088|0); $38 = (_Widget_Contains($37,$2,$3)|0); $39 = ($38|0)==(0); if ($39) { $40 = ((($0)) + 1264|0); $41 = ((($0)) + 1284|0); $42 = HEAP8[$41>>0]|0; $43 = ($42<<24>>24)==(0); if (!($43)) { $44 = (_Widget_Contains($40,$2,$3)|0); $45 = ($44|0)==(0); if (!($45)) { $46 = HEAP32[$40>>2]|0; $47 = ((($46)) + 24|0); $48 = HEAP32[$47>>2]|0; (FUNCTION_TABLE_iiiii[$48 & 63]($40,$1,$2,$3)|0); _ChatScreen_UpdateChatYOffsets($0); $$0 = 1; STACKTOP = sp;return ($$0|0); } } $49 = ((($0)) + 304|0); $50 = HEAP32[$49>>2]|0; $51 = ((($50)) + 24|0); $52 = HEAP32[$51>>2]|0; (FUNCTION_TABLE_iiiii[$52 & 63]($49,$1,$2,$3)|0); $$0 = 1; STACKTOP = sp;return ($$0|0); } $53 = (_TextGroupWidget_UsedHeight($37)|0); $54 = ((($0)) + 1096|0); $55 = HEAP32[$54>>2]|0; $56 = ((($0)) + 1104|0); $57 = HEAP32[$56>>2]|0; $58 = (($55) - ($53))|0; $59 = (($58) + ($57))|0; $60 = ((($0)) + 1092|0); $61 = HEAP32[$60>>2]|0; $62 = ((($0)) + 1100|0); $63 = HEAP32[$62>>2]|0; $64 = (_Gui_Contains($61,$59,$63,$53,$2,$3)|0); $65 = ($64|0)==(0); if ($65) { $$0 = 0; STACKTOP = sp;return ($$0|0); } HEAP32[$4>>2] = $5; $66 = ((($4)) + 4|0); HEAP16[$66>>1] = 0; $67 = ((($4)) + 6|0); HEAP16[$67>>1] = 256; (_TextGroupWidget_GetSelected($37,$4,$2,$3)|0); $68 = HEAP16[$66>>1]|0; $69 = ($68<<16>>16)==(0); if ($69) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $70 = (_Utils_IsUrlPrefix($4)|0); $71 = ($70<<24>>24)==(0); if (!($71)) { _UrlWarningOverlay_Show($4); $$0 = 1; STACKTOP = sp;return ($$0|0); } $72 = HEAP8[(1803528)>>0]|0; $73 = ($72<<24>>24)==(0); if ($73) { $$0 = 1; STACKTOP = sp;return ($$0|0); } _ChatScreen_AppendInput($4); $$0 = 1; STACKTOP = sp;return ($$0|0); } function _ChatScreen_MouseScroll($0,$1) { $0 = $0|0; $1 = +$1; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if ($4) { $$0 = 0; return ($$0|0); } $5 = ((($0)) + 24|0); $6 = (_Utils_AccumulateWheelDelta($5,$1)|0); $7 = (0 - ($6))|0; _ChatScreen_ScrollChatBy($0,$7); $$0 = 1; return ($$0|0); } function _ChatScreen_Layout($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_ChatScreen_ChatUpdateFont($0)|0); $2 = ($1<<24>>24)==(0); if (!($2)) { _ChatScreen_Redraw($0); } $3 = (_Display_ScaleX(5)|0); $4 = ((($0)) + 36|0); HEAP32[$4>>2] = $3; $5 = (_Display_ScaleY(5)|0); $6 = ((($0)) + 40|0); HEAP32[$6>>2] = $5; $7 = ((($0)) + 304|0); _Widget_SetLocation($7,0,2,5,5); $8 = ((($0)) + 1264|0); _Widget_SetLocation($8,0,2,5,5); $9 = ((($0)) + 912|0); _Widget_SetLocation($9,2,0,0,0); $10 = ((($0)) + 1000|0); _Widget_SetLocation($10,2,2,0,0); $11 = ((($0)) + 1088|0); _Widget_SetLocation($11,0,2,10,0); $12 = ((($0)) + 1176|0); _Widget_SetLocation($12,0,2,10,0); _ChatScreen_UpdateChatYOffsets($0); $13 = (_HUDScreen_LayoutHotbar()|0); $14 = (_Display_ScaleY(15)|0); $15 = (($14) + ($13))|0; $16 = ((($0)) + 1028|0); HEAP32[$16>>2] = $15; $17 = HEAP32[$10>>2]|0; $18 = ((($17)) + 8|0); $19 = HEAP32[$18>>2]|0; FUNCTION_TABLE_vi[$19 & 511]($10); $20 = ((($0)) + 96|0); _Widget_SetLocation($20,1,1,0,0); $21 = HEAP32[(1972120)>>2]|0; $22 = (($21|0) / -4)&-1; $23 = ((($0)) + 124|0); HEAP32[$23>>2] = $22; $24 = HEAP32[$20>>2]|0; $25 = ((($24)) + 8|0); $26 = HEAP32[$25>>2]|0; FUNCTION_TABLE_vi[$26 & 511]($20); $27 = ((($0)) + 164|0); _Widget_SetLocation($27,1,1,0,0); $28 = HEAP32[(1972120)>>2]|0; $29 = (($28|0) / -16)&-1; $30 = ((($0)) + 192|0); HEAP32[$30>>2] = $29; $31 = HEAP32[$27>>2]|0; $32 = ((($31)) + 8|0); $33 = HEAP32[$32>>2]|0; FUNCTION_TABLE_vi[$33 & 511]($27); $34 = ((($0)) + 232|0); _Widget_SetLocation($34,1,1,0,0); $35 = HEAP32[(1972120)>>2]|0; $36 = (($35|0) / 20)&-1; $37 = ((($0)) + 260|0); HEAP32[$37>>2] = $36; $38 = HEAP32[$34>>2]|0; $39 = ((($38)) + 8|0); $40 = HEAP32[$39>>2]|0; FUNCTION_TABLE_vi[$40 & 511]($34); $41 = HEAP8[(1972126)>>0]|0; $42 = ($41<<24>>24)==(2); $43 = ((($0)) + 2528|0); if ($42) { _Widget_SetLocation($43,2,2,10,60); $44 = ((($0)) + 2616|0); _Widget_SetLocation($44,2,2,10,10); $45 = ((($0)) + 2704|0); _Widget_SetLocation($45,2,2,10,110); return; } else { _Widget_SetLocation($43,2,0,10,10); $46 = ((($0)) + 2616|0); _Widget_SetLocation($46,2,0,10,60); $47 = ((($0)) + 2704|0); _Widget_SetLocation($47,2,0,10,110); return; } } function _ChatScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _ChatScreen_FreeChatFonts($0); $1 = ((($0)) + 1088|0); $2 = HEAP32[$1>>2]|0; $3 = ((($2)) + 4|0); $4 = HEAP32[$3>>2]|0; FUNCTION_TABLE_vi[$4 & 511]($1); $5 = ((($0)) + 304|0); $6 = HEAP32[$5>>2]|0; $7 = ((($6)) + 4|0); $8 = HEAP32[$7>>2]|0; FUNCTION_TABLE_vi[$8 & 511]($5); $9 = ((($0)) + 1264|0); $10 = HEAP32[$9>>2]|0; $11 = ((($10)) + 4|0); $12 = HEAP32[$11>>2]|0; FUNCTION_TABLE_vi[$12 & 511]($9); $13 = ((($0)) + 912|0); $14 = HEAP32[$13>>2]|0; $15 = ((($14)) + 4|0); $16 = HEAP32[$15>>2]|0; FUNCTION_TABLE_vi[$16 & 511]($13); $17 = ((($0)) + 1000|0); $18 = HEAP32[$17>>2]|0; $19 = ((($18)) + 4|0); $20 = HEAP32[$19>>2]|0; FUNCTION_TABLE_vi[$20 & 511]($17); $21 = ((($0)) + 1176|0); $22 = HEAP32[$21>>2]|0; $23 = ((($22)) + 4|0); $24 = HEAP32[$23>>2]|0; FUNCTION_TABLE_vi[$24 & 511]($21); $25 = ((($0)) + 96|0); $26 = HEAP32[$25>>2]|0; $27 = ((($26)) + 4|0); $28 = HEAP32[$27>>2]|0; FUNCTION_TABLE_vi[$28 & 511]($25); $29 = ((($0)) + 164|0); $30 = HEAP32[$29>>2]|0; $31 = ((($30)) + 4|0); $32 = HEAP32[$31>>2]|0; FUNCTION_TABLE_vi[$32 & 511]($29); $33 = ((($0)) + 232|0); $34 = HEAP32[$33>>2]|0; $35 = ((($34)) + 4|0); $36 = HEAP32[$35>>2]|0; FUNCTION_TABLE_vi[$36 & 511]($33); $37 = ((($0)) + 2704|0); $38 = HEAP32[$37>>2]|0; $39 = ((($38)) + 4|0); $40 = HEAP32[$39>>2]|0; FUNCTION_TABLE_vi[$40 & 511]($37); $41 = ((($0)) + 2528|0); $42 = HEAP32[$41>>2]|0; $43 = ((($42)) + 4|0); $44 = HEAP32[$43>>2]|0; FUNCTION_TABLE_vi[$44 & 511]($41); $45 = ((($0)) + 2616|0); $46 = HEAP32[$45>>2]|0; $47 = ((($46)) + 4|0); $48 = HEAP32[$47>>2]|0; FUNCTION_TABLE_vi[$48 & 511]($45); return; } function _ChatScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; (_ChatScreen_ChatUpdateFont($0)|0); _ChatScreen_Redraw($0); $2 = HEAP8[1972870]|0; $3 = ($2<<24>>24)==(0); if ($3) { STACKTOP = sp;return; } _Gui_MakeTitleFont($1); $4 = ((($0)) + 2704|0); _ButtonWidget_SetConst($4,42794,$1); $5 = ((($0)) + 2528|0); _ButtonWidget_SetConst($5,42799,$1); $6 = ((($0)) + 2616|0); _ButtonWidget_SetConst($6,42804,$1); _Font_Free($1); STACKTOP = sp;return; } function _ChatScreen_ChatUpdateFont($0) { $0 = $0|0; var $$0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0; var $27 = 0.0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (+_Gui_GetChatScale()); $2 = $1 * 8.0; $3 = (~~(($2))); $4 = ($3|0)>(8); $5 = $4 ? $3 : 8; $6 = ($5|0)<(60); $7 = $6 ? $5 : 60; $8 = (_Display_ScaleY($7)|0); $9 = ((($0)) + 48|0); $10 = ((($0)) + 52|0); $11 = HEAP16[$10>>1]|0; $12 = $11&65535; $13 = ($8|0)==($12|0); if ($13) { $$0 = 0; return ($$0|0); } _ChatScreen_FreeChatFonts($0); _Font_Make($9,$7,4); $14 = (+_Gui_GetChatScale()); $15 = $14 * 16.0; $16 = (~~(($15))); $17 = ($16|0)>(8); $18 = $17 ? $16 : 8; $19 = ($18|0)<(60); $20 = $19 ? $18 : 60; $21 = ((($0)) + 60|0); _Font_Make($21,$20,0); $22 = ((($0)) + 72|0); $23 = (+($20|0)); $24 = $23 * 1.3300000000000001; $25 = (~~(($24))); _Font_Make($22,$25,0); $26 = ((($0)) + 84|0); $27 = $23 * 0.67000000000000004; $28 = (~~(($27))); _Font_Make($26,$28,0); $29 = ((($0)) + 304|0); _ChatInputWidget_SetFont($29,$9); $30 = ((($0)) + 912|0); _TextGroupWidget_SetFont($30,$9); $31 = ((($0)) + 1000|0); _TextGroupWidget_SetFont($31,$9); $32 = ((($0)) + 1088|0); _TextGroupWidget_SetFont($32,$9); $33 = ((($0)) + 1176|0); _TextGroupWidget_SetFont($33,$9); $$0 = 1; return ($$0|0); } function _ChatScreen_Redraw($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1088|0); _TextGroupWidget_RedrawAll($1); $2 = ((($0)) + 96|0); $3 = ((($0)) + 60|0); _TextWidget_Set($2,13516,$3); $4 = ((($0)) + 164|0); $5 = ((($0)) + 72|0); _TextWidget_Set($4,13524,$5); $6 = ((($0)) + 232|0); $7 = ((($0)) + 84|0); _TextWidget_Set($6,13532,$7); $8 = ((($0)) + 912|0); _TextGroupWidget_RedrawAll($8); $9 = ((($0)) + 1000|0); _TextGroupWidget_RedrawAll($9); $10 = ((($0)) + 1176|0); _TextGroupWidget_RedrawAll($10); $11 = ((($0)) + 4|0); $12 = HEAP8[$11>>0]|0; $13 = ($12<<24>>24)==(0); if ($13) { $15 = ((($0)) + 1264|0); _SpecialInputWidget_Redraw($15); return; } $14 = ((($0)) + 304|0); _InputWidget_UpdateText($14); $15 = ((($0)) + 1264|0); _SpecialInputWidget_Redraw($15); return; } function _ChatScreen_FreeChatFonts($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 48|0); _Font_Free($1); $2 = ((($0)) + 60|0); _Font_Free($2); $3 = ((($0)) + 72|0); _Font_Free($3); $4 = ((($0)) + 84|0); _Font_Free($4); return; } function _ChatScreen_UpdateChatYOffsets($0) { $0 = $0|0; var $$ = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; (_HUDScreen_LayoutHotbar()|0); $1 = ((($0)) + 312|0); $2 = HEAP32[$1>>2]|0; $3 = HEAP32[(1098864)>>2]|0; $4 = ($2|0)<($3|0); $$ = $4 ? $2 : $3; $5 = ((($0)) + 332|0); $6 = HEAP32[$5>>2]|0; $7 = HEAP32[(1972120)>>2]|0; $8 = (($6) - ($$))|0; $9 = (($8) + ($7))|0; $10 = ((($0)) + 1264|0); $11 = ((($0)) + 1292|0); HEAP32[$11>>2] = $9; $12 = HEAP32[$10>>2]|0; $13 = ((($12)) + 8|0); $14 = HEAP32[$13>>2]|0; FUNCTION_TABLE_vi[$14 & 511]($10); $15 = ((($0)) + 1284|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(0); $18 = $17 ? 10 : 5; $19 = HEAP32[(1972120)>>2]|0; $20 = ((($0)) + 1272|0); $21 = HEAP32[$20>>2]|0; $22 = (($19) - ($21))|0; $23 = (($22) + ($18))|0; $24 = ((($0)) + 1176|0); $25 = ((($0)) + 1204|0); HEAP32[$25>>2] = $23; $26 = HEAP32[$24>>2]|0; $27 = ((($26)) + 8|0); $28 = HEAP32[$27>>2]|0; FUNCTION_TABLE_vi[$28 & 511]($24); $29 = HEAP32[$25>>2]|0; $30 = ((($0)) + 1192|0); $31 = HEAP32[$30>>2]|0; $32 = (($31) + ($29))|0; $33 = ((($0)) + 1088|0); $34 = ((($0)) + 1116|0); HEAP32[$34>>2] = $32; $35 = HEAP32[$33>>2]|0; $36 = ((($35)) + 8|0); $37 = HEAP32[$36>>2]|0; FUNCTION_TABLE_vi[$37 & 511]($33); return; } function _ChatScreen_ScrollChatBy($0,$1) { $0 = $0|0; $1 = $1|0; var $$011 = 0, $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 32|0); $3 = HEAP32[$2>>2]|0; $4 = (($3) + ($1))|0; $5 = (_ChatScreen_ClampChatIndex($4)|0); $6 = (($5) - ($3))|0; $7 = ($6|0)==(0); if ($7) { return; } $8 = ((($0)) + 1088|0); $9 = ((($0)) + 1088|0); $$011 = $6; while(1) { $10 = ($$011|0)<(0); $11 = HEAP32[$2>>2]|0; if ($10) { $12 = (($11) + -1)|0; HEAP32[$2>>2] = $12; $13 = (($$011) + 1)|0; _TextGroupWidget_ShiftDown($8); $$1 = $13; } else { $14 = (($11) + 1)|0; HEAP32[$2>>2] = $14; $15 = (($$011) + -1)|0; _TextGroupWidget_ShiftUp($9); $$1 = $15; } $16 = ($$1|0)==(0); if ($16) { break; } else { $$011 = $$1; } } return; } function _ChatScreen_ClampChatIndex($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1771252)>>2]|0; $2 = HEAP32[(1803524)>>2]|0; $3 = (($1) - ($2))|0; $4 = ($3|0)<(0); $5 = $4 ? $3 : 0; $6 = ($5|0)>($0|0); $7 = $6 ? $5 : $0; $8 = ($7|0)>($3|0); $9 = $8 ? $3 : $7; return ($9|0); } function _ChatScreen_EnterChatInput($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); HEAP8[$2>>0] = 0; _Gui_UpdateInputGrab(); _Window_CloseKeyboard(); $3 = ($1<<24>>24)==(0); if (!($3)) { $4 = ((($0)) + 304|0); _InputWidget_Clear($4); } $5 = ((($0)) + 304|0); $6 = ((($0)) + 352|0); $7 = HEAP32[$6>>2]|0; FUNCTION_TABLE_vi[$7 & 511]($5); $8 = ((($0)) + 1264|0); _SpecialInputWidget_SetActive($8,0); _ChatScreen_UpdateChatYOffsets($0); $9 = HEAP32[(1771252)>>2]|0; $10 = HEAP32[(1803524)>>2]|0; $11 = (($9) - ($10))|0; $12 = ((($0)) + 32|0); $13 = HEAP32[$12>>2]|0; $14 = ($13|0)==($11|0); if ($14) { return; } HEAP32[$12>>2] = $11; $15 = ((($0)) + 1088|0); _TextGroupWidget_RedrawAll($15); return; } function _ChatScreen_ToggleAltInput($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1264|0); $2 = ((($0)) + 1284|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); $5 = $4&1; _SpecialInputWidget_SetActive($1,$5); _ChatScreen_UpdateChatYOffsets($0); return; } function _ChatScreen_OpenInput($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; HEAP8[(1099132)>>0] = 1; HEAP8[(1099108)>>0] = 1; _Gui_UpdateInputGrab(); _OpenKeyboardArgs_Init($1,$0,256); $2 = ((($1)) + 8|0); HEAP32[$2>>2] = 42867; _Window_OpenKeyboard($1); $3 = ((($1)) + 12|0); $4 = HEAP8[$3>>0]|0; HEAP8[(1099429)>>0] = $4; _String_Copy((1099468),$0); _InputWidget_UpdateText((1099408)); STACKTOP = sp;return; } function _InventoryScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1929948)>>0] = 1; HEAP8[(1929950)>>0] = 1; HEAP32[482486] = 21276; _Gui_Add(1929944,20); return; } function _InventoryScreen_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1768|0); _TextWidget_Init($1); $2 = ((($0)) + 36|0); _TableWidget_Create($2); $3 = HEAP8[(1811009)>>0]|0; $4 = $3&255; $5 = ((($0)) + 76|0); HEAP32[$5>>2] = $4; $6 = ((($0)) + 1764|0); HEAP32[$6>>2] = 440; _TableWidget_RecreateBlocks($2); $7 = ((($0)) + 1837|0); HEAP8[$7>>0] = 1; _Event_Register(1795088,$0,441); _Event_Register((1795348),$0,441); return; } function _InventoryScreen_Free($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Event_Unregister(1795088,$0,441); _Event_Unregister((1795348),$0,441); return; } function _InventoryScreen_Render($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 1837|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if (!($4)) { _InventoryScreen_MoveToSelected($0); } $5 = ((($0)) + 36|0); $6 = HEAP32[$5>>2]|0; $7 = HEAP32[$6>>2]|0; FUNCTION_TABLE_vid[$7 & 63]($5,$1); $8 = ((($0)) + 1768|0); $9 = HEAP32[$8>>2]|0; $10 = HEAP32[$9>>2]|0; FUNCTION_TABLE_vid[$10 & 63]($8,$1); return; } function _InventoryScreen_BuildMesh($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _InventoryScreen_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); $3 = HEAP8[(390760)>>0]|0; $4 = $3&255; $5 = ($4|0)==($1|0); if ($5) { $6 = ((($0)) + 1836|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); if (!($8)) { _Gui_Remove($0); $$0 = 1; return ($$0|0); } } $9 = ($1|0)==(91); if ($9) { $10 = ((($0)) + 92|0); $11 = HEAP32[$10>>2]|0; $12 = ($11|0)==(-1); if (!($12)) { $13 = ((($0)) + 120|0); $14 = (($13) + ($11<<1)|0); $15 = HEAP16[$14>>1]|0; _Inventory_SetSelectedBlock($15); _Gui_Remove($0); $$0 = 1; return ($$0|0); } } $16 = HEAP32[$2>>2]|0; $17 = ((($16)) + 12|0); $18 = HEAP32[$17>>2]|0; $19 = (FUNCTION_TABLE_iii[$18 & 127]($2,$1)|0); $20 = ($19|0)==(0); if (!($20)) { $$0 = 1; return ($$0|0); } $21 = HEAP32[(1098856)>>2]|0; $22 = ((($21)) + 12|0); $23 = HEAP32[$22>>2]|0; $24 = (FUNCTION_TABLE_iii[$23 & 127]((1098856),$1)|0); $$0 = $24; return ($$0|0); } function _InventoryScreen_KeyUp($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(390760)>>0]|0; $3 = $2&255; $4 = ($3|0)==($1|0); if (!($4)) { return; } $5 = ((($0)) + 1836|0); HEAP8[$5>>0] = 1; return; } function _InventoryScreen_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 36|0); $5 = ((($0)) + 1712|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==($1|0); if ($7) { return 1; } $8 = HEAP32[482485]|0; $9 = (_HUDscreen_PointerDown($8,$1,$2,$3)|0); $10 = ($9|0)==(0); if (!($10)) { return 1; } $11 = HEAP32[$4>>2]|0; $12 = ((($11)) + 24|0); $13 = HEAP32[$12>>2]|0; $14 = (FUNCTION_TABLE_iiiii[$13 & 63]($4,$1,$2,$3)|0); $15 = $14&255; $16 = ($15<<24>>24)==(0); if (!($16)) { $17 = ((($0)) + 112|0); $18 = HEAP8[$17>>0]|0; $19 = ($18<<24>>24)==(0); if ($19) { return 1; } } $20 = HEAP8[(390406)>>0]|0; $21 = HEAP8[(390407)>>0]|0; $22 = $21 | $20; $23 = ($22<<24>>24)==(0); if (!($23)) { return 1; } $24 = HEAP8[(390404)>>0]|0; $25 = HEAP8[(390405)>>0]|0; $26 = $25 | $24; $27 = ($26<<24>>24)==(0); if (!($27)) { return 1; } _Gui_Remove($0); return 1; } function _InventoryScreen_PointerUp($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 36|0); $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 28|0); $7 = HEAP32[$6>>2]|0; FUNCTION_TABLE_viiii[$7 & 31]($4,$1,$2,$3); return; } function _InventoryScreen_PointerMove($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 36|0); $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 32|0); $7 = HEAP32[$6>>2]|0; $8 = (FUNCTION_TABLE_iiiii[$7 & 63]($4,$1,$2,$3)|0); return ($8|0); } function _InventoryScreen_MouseScroll($0,$1) { $0 = $0|0; $1 = +$1; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(390408)>>0]|0; $3 = HEAP8[(390409)>>0]|0; $4 = $3 | $2; $5 = HEAP8[(390406)>>0]|0; $6 = $4 | $5; $7 = HEAP8[(390407)>>0]|0; $8 = $6 | $7; $9 = ($8<<24>>24)==(0); if (!($9)) { $$0 = 0; return ($$0|0); } $10 = HEAP8[(390404)>>0]|0; $11 = HEAP8[(390405)>>0]|0; $12 = $11 | $10; $13 = ($12<<24>>24)==(0); if (!($13)) { $$0 = 0; return ($$0|0); } $14 = ((($0)) + 36|0); $15 = HEAP32[$14>>2]|0; $16 = ((($15)) + 20|0); $17 = HEAP32[$16>>2]|0; $18 = (FUNCTION_TABLE_iid[$17 & 15]($14,$1)|0); $$0 = $18; return ($$0|0); } function _InventoryScreen_Layout($0) { $0 = $0|0; var $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (+_Gui_GetInventoryScale()); $2 = ((($0)) + 36|0); $3 = ((($0)) + 116|0); HEAPF32[$3>>2] = $1; _Widget_SetLocation($2,1,1,0,0); $4 = ((($0)) + 1768|0); _Widget_SetLocation($4,1,0,0,0); $5 = ((($0)) + 44|0); $6 = HEAP32[$5>>2]|0; $7 = ((($0)) + 1784|0); $8 = HEAP32[$7>>2]|0; $9 = (($6) + -3)|0; $10 = (($9) - ($8))|0; $11 = ((($0)) + 1796|0); HEAP32[$11>>2] = $10; $12 = HEAP32[$4>>2]|0; $13 = ((($12)) + 8|0); $14 = HEAP32[$13>>2]|0; FUNCTION_TABLE_vi[$14 & 511]($4); return; } function _InventoryScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 24|0); _Font_Free($1); $2 = ((($0)) + 36|0); $3 = HEAP32[$2>>2]|0; $4 = ((($3)) + 4|0); $5 = HEAP32[$4>>2]|0; FUNCTION_TABLE_vi[$5 & 511]($2); $6 = ((($0)) + 1768|0); $7 = HEAP32[$6>>2]|0; $8 = ((($7)) + 4|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_vi[$9 & 511]($6); return; } function _InventoryScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 24|0); _Gui_MakeBodyFont($1); $2 = ((($0)) + 36|0); _TableWidget_Recreate($2); return; } function _InventoryScreen_MoveToSelected($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 36|0); $2 = HEAP32[(1811004)>>2]|0; $3 = HEAP32[(1811000)>>2]|0; $4 = (($3) + ($2))|0; $5 = (1809300 + ($4<<1)|0); $6 = HEAP16[$5>>1]|0; _TableWidget_SetBlockTo($1,$6); _TableWidget_Recreate($1); $7 = ((($0)) + 1837|0); HEAP8[$7>>0] = 0; $8 = ((($0)) + 92|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)==(-1); if (!($10)) { return; } $11 = HEAP32[(1811004)>>2]|0; $12 = HEAP32[(1811000)>>2]|0; $13 = (($12) + ($11))|0; $14 = (1809300 + ($13<<1)|0); $15 = HEAP16[$14>>1]|0; _InventoryScreen_UpdateTitle($0,$15); return; } function _InventoryScreen_UpdateTitle($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 144|0; $2 = sp + 128|0; $3 = sp; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 128; _InventoryScreen_GetTitleText($2,$1); $6 = ((($0)) + 1768|0); $7 = ((($0)) + 24|0); _TextWidget_Set($6,$2,$7); STACKTOP = sp;return; } function _InventoryScreen_GetTitleText($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = sp + 8|0; $4 = $1&65535; HEAP32[$3>>2] = $4; $5 = HEAP8[1972839]|0; $6 = ($5<<24>>24)==(0); $7 = HEAP8[1972840]|0; $8 = ($7<<24>>24)!=(0); $or$cond = $6 | $8; if (!($or$cond)) { _String_AppendConst($0,42811); STACKTOP = sp;return; } $9 = ($1<<16>>16)==(0); if ($9) { STACKTOP = sp;return; } _Block_UNSAFE_GetName($2,$1); _String_AppendString($0,$2); $10 = HEAP8[1972839]|0; $11 = ($10<<24>>24)==(0); if (!($11)) { STACKTOP = sp;return; } _String_Format1($0,42824,$3); $12 = (1171476 + ($4)|0); $13 = HEAP8[$12>>0]|0; $14 = ($13<<24>>24)==(0); if ($14) { _String_AppendConst($0,42834); } $15 = (1172244 + ($4)|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(0); if ($17) { _String_AppendConst($0,42849); } _String_Append($0,41); STACKTOP = sp;return; } function _InventoryScreen_OnBlockChanged($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 36|0); _TableWidget_OnInventoryChanged($1); return; } function _InventoryScreen_OnUpdateTitle($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _InventoryScreen_UpdateTitle(1929944,$0); return; } function _ChatScreen_DrawCrosshairs() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $0 = HEAP32[(1803552)>>2]|0; $1 = ($0|0)==(0); if ($1) { return; } $2 = HEAP32[(1972120)>>2]|0; $3 = (+($2|0)); $4 = $3 / 480.0; $5 = (+_Gui_Scale($4)); $6 = $5 * 16.0; $7 = (~~(($6))); $8 = HEAP32[(1803552)>>2]|0; HEAP32[5335] = $8; $9 = HEAP32[(1972116)>>2]|0; $10 = (($9|0) / 2)&-1; $11 = (($10) - ($7))|0; $12 = $11&65535; HEAP16[(21344)>>1] = $12; $13 = HEAP32[(1972120)>>2]|0; $14 = (($13|0) / 2)&-1; $15 = (($14) - ($7))|0; $16 = $15&65535; HEAP16[(21346)>>1] = $16; $17 = $7 << 1; $18 = $17&65535; HEAP16[(21348)>>1] = $18; HEAP16[(21350)>>1] = $18; _Texture_Render(21340); return; } function _ChatScreen_DrawChatBackground($0) { $0 = $0|0; var $$ = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 1088|0); $2 = (_TextGroupWidget_UsedHeight($1)|0); $3 = ((($0)) + 1188|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 1100|0); $6 = HEAP32[$5>>2]|0; $7 = ((($0)) + 1192|0); $8 = HEAP32[$7>>2]|0; $9 = (($8) + ($2))|0; $10 = ($9|0)>(0); if (!($10)) { return; } $11 = ($4|0)>($6|0); $$ = $11 ? $4 : $6; $12 = ((($0)) + 1096|0); $13 = HEAP32[$12>>2]|0; $14 = ((($0)) + 1104|0); $15 = HEAP32[$14>>2]|0; $16 = ((($0)) + 1092|0); $17 = HEAP32[$16>>2]|0; $18 = ((($0)) + 36|0); $19 = HEAP32[$18>>2]|0; $20 = (($17) - ($19))|0; $21 = ((($0)) + 40|0); $22 = HEAP32[$21>>2]|0; $23 = (($13) - ($2))|0; $24 = (($23) + ($15))|0; $25 = (($24) - ($22))|0; $26 = $19 << 1; $27 = (($26) + ($$))|0; $28 = $22 << 1; $29 = (($28) + ($9))|0; _Gfx_Draw2DFlat($20,$25,$27,$29,2130706432); return; } function _ChatScreen_DrawChat($0,$1) { $0 = $0|0; $1 = +$1; var $$072 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0.0; var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0; var $98 = 0, $99 = 0, $or$cond = 0, $or$cond3$not = 0, $or$cond71 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; _ChatScreen_UpdateTexpackStatus($0); $3 = HEAP8[1972839]|0; $4 = ($3<<24>>24)==(0); $5 = HEAP8[1972840]|0; $6 = ($5<<24>>24)!=(0); $or$cond = $4 | $6; if ($or$cond) { $7 = ((($0)) + 912|0); $8 = HEAP32[$7>>2]|0; $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_vid[$9 & 63]($7,$1); } $10 = ((($0)) + 1000|0); $11 = HEAP32[$10>>2]|0; $12 = HEAP32[$11>>2]|0; FUNCTION_TABLE_vid[$12 & 63]($10,$1); $13 = ((($0)) + 1176|0); $14 = HEAP32[$13>>2]|0; $15 = HEAP32[$14>>2]|0; FUNCTION_TABLE_vid[$15 & 63]($13,$1); $16 = +HEAPF64[(1084992)>>3]; $17 = ((($0)) + 4|0); $18 = HEAP8[$17>>0]|0; $19 = ($18<<24>>24)==(0); if ($19) { $23 = ((($0)) + 1124|0); $24 = HEAP32[$23>>2]|0; $25 = ($24|0)>(0); if ($25) { $26 = ((($0)) + 1168|0); $27 = ((($0)) + 32|0); $$072 = 0; while(1) { $28 = HEAP32[$26>>2]|0; $29 = (($28) + (($$072*28)|0)|0); ;HEAP32[$2>>2]=HEAP32[$29>>2]|0;HEAP32[$2+4>>2]=HEAP32[$29+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[$29+8>>2]|0;HEAP32[$2+12>>2]=HEAP32[$29+12>>2]|0;HEAP32[$2+16>>2]=HEAP32[$29+16>>2]|0;HEAP32[$2+20>>2]=HEAP32[$29+20>>2]|0;HEAP32[$2+24>>2]=HEAP32[$29+24>>2]|0; $30 = HEAP32[$27>>2]|0; $31 = (($30) + ($$072))|0; $32 = HEAP32[$2>>2]|0; $33 = ($32|0)!=(0); $34 = ($31|0)>(-1); $or$cond3$not = $34 & $33; $35 = HEAP32[(1771252)>>2]|0; $36 = ($31|0)<($35|0); $or$cond71 = $or$cond3$not & $36; if ($or$cond71) { $37 = $31 & 31; $38 = (165664 + ($37<<3)|0); $39 = +HEAPF64[$38>>3]; $40 = $39 + 10.0; $41 = !($40 >= $16); if (!($41)) { _Texture_Render($2); } } $42 = (($$072) + 1)|0; $43 = HEAP32[$23>>2]|0; $44 = ($42|0)<($43|0); if ($44) { $$072 = $42; } else { break; } } } } else { $20 = ((($0)) + 1088|0); $21 = HEAP32[$20>>2]|0; $22 = HEAP32[$21>>2]|0; FUNCTION_TABLE_vid[$22 & 63]($20,$1); } $45 = ((($0)) + 96|0); $46 = ((($0)) + 132|0); $47 = HEAP32[$46>>2]|0; $48 = ($47|0)==(0); if (!($48)) { $49 = +HEAPF64[135619]; $50 = $49 + 5.0; $51 = $16 > $50; if ($51) { $52 = HEAP32[$45>>2]|0; $53 = ((($52)) + 4|0); $54 = HEAP32[$53>>2]|0; FUNCTION_TABLE_vi[$54 & 511]($45); } } $55 = ((($0)) + 164|0); $56 = ((($0)) + 200|0); $57 = HEAP32[$56>>2]|0; $58 = ($57|0)==(0); if (!($58)) { $59 = +HEAPF64[135620]; $60 = $59 + 5.0; $61 = $16 > $60; if ($61) { $62 = HEAP32[$55>>2]|0; $63 = ((($62)) + 4|0); $64 = HEAP32[$63>>2]|0; FUNCTION_TABLE_vi[$64 & 511]($55); } } $65 = ((($0)) + 232|0); $66 = ((($0)) + 268|0); $67 = HEAP32[$66>>2]|0; $68 = ($67|0)==(0); if (!($68)) { $69 = +HEAPF64[135621]; $70 = $69 + 5.0; $71 = $16 > $70; if ($71) { $72 = HEAP32[$65>>2]|0; $73 = ((($72)) + 4|0); $74 = HEAP32[$73>>2]|0; FUNCTION_TABLE_vi[$74 & 511]($65); } } $75 = HEAP32[$45>>2]|0; $76 = HEAP32[$75>>2]|0; FUNCTION_TABLE_vid[$76 & 63]($45,$1); $77 = HEAP32[$55>>2]|0; $78 = HEAP32[$77>>2]|0; FUNCTION_TABLE_vid[$78 & 63]($55,$1); $79 = HEAP32[$65>>2]|0; $80 = HEAP32[$79>>2]|0; FUNCTION_TABLE_vid[$80 & 63]($65,$1); $81 = HEAP8[$17>>0]|0; $82 = ($81<<24>>24)==(0); if ($82) { STACKTOP = sp;return; } $83 = ((($0)) + 304|0); $84 = HEAP32[$83>>2]|0; $85 = HEAP32[$84>>2]|0; FUNCTION_TABLE_vid[$85 & 63]($83,$1); $86 = ((($0)) + 1264|0); $87 = ((($0)) + 1284|0); $88 = HEAP8[$87>>0]|0; $89 = ($88<<24>>24)==(0); if (!($89)) { $90 = HEAP32[$86>>2]|0; $91 = HEAP32[$90>>2]|0; FUNCTION_TABLE_vid[$91 & 63]($86,$1); } $92 = HEAP8[1972870]|0; $93 = ($92<<24>>24)==(0); if ($93) { STACKTOP = sp;return; } $94 = ((($0)) + 2704|0); $95 = HEAP32[$94>>2]|0; $96 = HEAP32[$95>>2]|0; FUNCTION_TABLE_vid[$96 & 63]($94,$1); $97 = ((($0)) + 2528|0); $98 = HEAP32[$97>>2]|0; $99 = HEAP32[$98>>2]|0; FUNCTION_TABLE_vid[$99 & 63]($97,$1); $100 = ((($0)) + 2616|0); $101 = HEAP32[$100>>2]|0; $102 = HEAP32[$101>>2]|0; FUNCTION_TABLE_vid[$102 & 63]($100,$1); STACKTOP = sp;return; } function _ChatScreen_UpdateTexpackStatus($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 72|0; $2 = sp + 64|0; $3 = sp; $4 = HEAP32[487845]|0; $5 = (_Http_CheckProgress($4)|0); HEAP32[$1>>2] = $5; $6 = ((($0)) + 44|0); $7 = HEAP32[$6>>2]|0; $8 = ($5|0)==($7|0); if ($8) { STACKTOP = sp;return; } HEAP32[$6>>2] = $5; HEAP32[$2>>2] = $3; $9 = ((($2)) + 4|0); HEAP16[$9>>1] = 0; $10 = ((($2)) + 6|0); HEAP16[$10>>1] = 64; switch ($5|0) { case -2: { _String_AppendConst($2,42878); break; } case -1: { _String_AppendConst($2,42906); break; } default: { $11 = ($5>>>0)<(101); if ($11) { _String_Format1($2,42933,$1); } } } _Chat_AddOf($2,360); STACKTOP = sp;return; } function _ChatScreen_ChatReceived($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$off = 0, $$off40 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP8[(1803128)>>0]|0; $4 = ($3<<24>>24)==(0); if (!($4)) { return; } $5 = ($2|0)==(0); if ($5) { $6 = ((($0)) + 32|0); $7 = HEAP32[$6>>2]|0; $8 = (($7) + 1)|0; HEAP32[$6>>2] = $8; $9 = HEAP32[(1803524)>>2]|0; $10 = ($9|0)==(0); if ($10) { return; } $11 = ((($0)) + 1088|0); _TextGroupWidget_ShiftUp($11); return; } $$off = (($2) + -1)|0; $12 = ($$off>>>0)<(3); if ($12) { $13 = ((($0)) + 912|0); $14 = (($2) + 1)|0; _TextGroupWidget_Redraw($13,$14); return; } $$off40 = (($2) + -11)|0; $15 = ($$off40>>>0)<(3); if ($15) { $16 = ((($0)) + 1000|0); $17 = (13 - ($2))|0; _TextGroupWidget_Redraw($16,$17); return; } switch ($2|0) { case 100: { $18 = ((($0)) + 96|0); $19 = ((($0)) + 60|0); _TextWidget_Set($18,$1,$19); return; } case 101: { $20 = ((($0)) + 164|0); $21 = ((($0)) + 72|0); _TextWidget_Set($20,$1,$21); return; } case 102: { $22 = ((($0)) + 232|0); $23 = ((($0)) + 84|0); _TextWidget_Set($22,$1,$23); return; } default: { $24 = $2 & -2; switch ($24|0) { case 256: { $25 = ((($0)) + 1176|0); $26 = (($2) + -256)|0; _TextGroupWidget_Redraw($25,$26); _ChatScreen_UpdateChatYOffsets($0); return; } case 360: { $27 = (($2) + -360)|0; $28 = ((($0)) + 912|0); _TextGroupWidget_Redraw($28,$27); return; } default: { return; } } } } } function _ChatScreen_ColCodeChanged($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1803128)>>0]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { return; } $4 = ((($0)) + 1264|0); _SpecialInputWidget_UpdateCols($4); $5 = ((($0)) + 1088|0); $6 = $1&255; _TextGroupWidget_RedrawAllWithCol($5,$6); $7 = ((($0)) + 912|0); _TextGroupWidget_RedrawAllWithCol($7,$6); $8 = ((($0)) + 1000|0); _TextGroupWidget_RedrawAllWithCol($8,$6); $9 = ((($0)) + 1176|0); _TextGroupWidget_RedrawAllWithCol($9,$6); $10 = ((($0)) + 304|0); $11 = ((($0)) + 504|0); $12 = +HEAPF64[$11>>3]; _InputWidget_UpdateText($10); HEAPF64[$11>>3] = $12; return; } function _ChatScreen_OnInputTextChanged($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _ChatScreen_UpdateChatYOffsets(1099104); return; } function _ChatScreen_GetStatus($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (1968 + ($1<<3)|0); $3 = $2; $4 = $3; $5 = HEAP32[$4>>2]|0; $6 = (($3) + 4)|0; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = $0; $10 = $9; HEAP32[$10>>2] = $5; $11 = (($9) + 4)|0; $12 = $11; HEAP32[$12>>2] = $8; return; } function _ChatScreen_GetBottomRight($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (2 - ($1))|0; $3 = (2016 + ($2<<3)|0); $4 = $3; $5 = $4; $6 = HEAP32[$5>>2]|0; $7 = (($4) + 4)|0; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = $0; $11 = $10; HEAP32[$11>>2] = $6; $12 = (($10) + 4)|0; $13 = $12; HEAP32[$13>>2] = $9; return; } function _ChatScreen_GetChat($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1099136)>>2]|0; $3 = (($2) + ($1))|0; $4 = ($3|0)>(-1); $5 = HEAP32[(1771252)>>2]|0; $6 = ($3|0)<($5|0); $or$cond = $4 & $6; if ($or$cond) { _StringsBuffer_UNSAFE_Get($0,1771244,$3); return; } else { $7 = 1949280; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = (($7) + 4)|0; $11 = $10; $12 = HEAP32[$11>>2]|0; $13 = $0; $14 = $13; HEAP32[$14>>2] = $9; $15 = (($13) + 4)|0; $16 = $15; HEAP32[$16>>2] = $12; return; } } function _ChatScreen_GetClientStatus($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (2048 + ($1<<3)|0); $3 = $2; $4 = $3; $5 = HEAP32[$4>>2]|0; $6 = (($3) + 4)|0; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = $0; $10 = $9; HEAP32[$10>>2] = $5; $11 = (($9) + 4)|0; $12 = $11; HEAP32[$12>>2] = $8; return; } function _ChatScreen_SetChatlines($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1100192)>>2]|0; $2 = ((($1)) + 4|0); $3 = HEAP32[$2>>2]|0; FUNCTION_TABLE_vi[$3 & 511]((1100192)); $4 = HEAP32[(1100228)>>2]|0; $5 = (($4) - ($0))|0; $6 = HEAP32[(1099136)>>2]|0; $7 = (($5) + ($6))|0; HEAP32[(1099136)>>2] = $7; HEAP32[(1100228)>>2] = $0; _TextGroupWidget_RedrawAll((1100192)); return; } function _LoadingScreen_Show($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; HEAP32[486821] = 21368; _LoadingScreen_ShowCommon($0,$1); return; } function _LoadingScreen_ShowCommon($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[(1947496)>>2] = 0; HEAPF32[(1947320)>>2] = 0.0; HEAP32[(1947480)>>2] = (1947500); HEAP16[(1947484)>>1] = 0; HEAP16[(1947486)>>1] = 64; _String_AppendString((1947480),$0); HEAP32[(1947488)>>2] = (1947564); HEAP16[(1947492)>>1] = 0; HEAP16[(1947494)>>1] = 64; _String_AppendString((1947488),$1); HEAP8[(1947288)>>0] = 1; HEAP8[(1947289)>>0] = 1; $2 = HEAP8[1972839]|0; $3 = ($2<<24>>24)==(0); $4 = $3 ? 5 : 55; _Gui_Add(1947284,$4); return; } function _LoadingScreen_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); _TextWidget_Init($1); $2 = ((($0)) + 128|0); _TextWidget_Init($2); $3 = ((($0)) + 16|0); HEAP32[$3>>2] = 21432; $4 = ((($0)) + 20|0); HEAP32[$4>>2] = 2; _LoadingScreen_CalcMaxVertices($0); _Gfx_SetFog(0); _Event_Register((1795868),$0,38); _Event_Register((1796128),$0,442); return; } function _LoadingScreen_Free($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Event_Unregister((1795868),$0,38); _Event_Unregister((1796128),$0,442); return; } function _LoadingScreen_Render($0,$1) { $0 = $0|0; $1 = +$1; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Gfx_SetVertexFormat(1); $2 = ((($0)) + 12|0); $3 = HEAP32[$2>>2]|0; _Gfx_BindVb($3); $4 = ((($0)) + 40|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)==(0); if ($6) { $$0 = 0; } else { $7 = HEAP16[(1162306)>>1]|0; $8 = $7&65535; $9 = HEAP32[(1949304)>>2]|0; $10 = ($9)?($8 >>> $9):($8); $11 = (1949312 + ($10<<2)|0); $12 = HEAP32[$11>>2]|0; _Gfx_BindTexture($12); $13 = HEAP32[$4>>2]|0; $14 = $13 << 2; _Gfx_DrawVb_IndexedTris($14); $15 = HEAP32[$4>>2]|0; $16 = $15 << 2; $$0 = $16; } $17 = ((($0)) + 60|0); $18 = HEAP32[$17>>2]|0; $19 = ((($18)) + 40|0); $20 = HEAP32[$19>>2]|0; $21 = (FUNCTION_TABLE_iii[$20 & 127]($17,$$0)|0); $22 = ((($0)) + 128|0); $23 = HEAP32[$22>>2]|0; $24 = ((($23)) + 40|0); $25 = HEAP32[$24>>2]|0; (FUNCTION_TABLE_iii[$25 & 127]($22,$21)|0); $26 = ((($0)) + 52|0); $27 = HEAP32[$26>>2]|0; $28 = (+($27|0)); $29 = ((($0)) + 36|0); $30 = +HEAPF32[$29>>2]; $31 = $30 * $28; $32 = (~~(($31))); $33 = ((($0)) + 44|0); $34 = HEAP32[$33>>2]|0; $35 = ((($0)) + 48|0); $36 = HEAP32[$35>>2]|0; $37 = ((($0)) + 56|0); $38 = HEAP32[$37>>2]|0; _Gfx_Draw2DFlat($34,$36,$27,$38,-8355712); $39 = HEAP32[$33>>2]|0; $40 = HEAP32[$35>>2]|0; $41 = HEAP32[$37>>2]|0; _Gfx_Draw2DFlat($39,$40,$32,$41,-8323200); return; } function _LoadingScreen_BuildMesh($0) { $0 = $0|0; var $$021 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $1 = sp + 48|0; $2 = sp + 20|0; $3 = sp + 16|0; $4 = sp; $5 = (_Screen_LockVb($0)|0); HEAP32[$1>>2] = $5; $6 = HEAP16[(1162306)>>1]|0; $7 = ((($2)) + 4|0); HEAP16[$7>>1] = 0; $8 = ((($2)) + 6|0); HEAP16[$8>>1] = 0; $9 = HEAP32[(1972116)>>2]|0; $10 = $9&65535; $11 = ((($2)) + 8|0); HEAP16[$11>>1] = $10; $12 = ((($2)) + 10|0); HEAP16[$12>>1] = 64; $13 = ((($2)) + 12|0); _Atlas1D_TexRec($4,$6,1,$3); ;HEAP32[$13>>2]=HEAP32[$4>>2]|0;HEAP32[$13+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$13+8>>2]=HEAP32[$4+8>>2]|0;HEAP32[$13+12>>2]=HEAP32[$4+12>>2]|0; $14 = HEAP32[(1972116)>>2]|0; $15 = (+($14|0)); $16 = $15 * 0.015625; $17 = ((($2)) + 20|0); HEAPF32[$17>>2] = $16; $18 = ((($0)) + 40|0); $19 = HEAP32[$18>>2]|0; $20 = ($19|0)>(0); if ($20) { $$021 = 0; while(1) { $21 = $$021 << 6; $22 = $21&65535; HEAP16[$8>>1] = $22; _Gfx_Make2DQuad($2,-12566464,$1); $23 = (($$021) + 1)|0; $24 = HEAP32[$18>>2]|0; $25 = ($23|0)<($24|0); if ($25) { $$021 = $23; } else { break; } } } $26 = ((($0)) + 60|0); $27 = HEAP32[$26>>2]|0; $28 = ((($27)) + 36|0); $29 = HEAP32[$28>>2]|0; FUNCTION_TABLE_vii[$29 & 255]($26,$1); $30 = ((($0)) + 128|0); $31 = HEAP32[$30>>2]|0; $32 = ((($31)) + 36|0); $33 = HEAP32[$32>>2]|0; FUNCTION_TABLE_vii[$33 & 255]($30,$1); $34 = ((($0)) + 12|0); $35 = HEAP32[$34>>2]|0; _Gfx_UnlockDynamicVb($35); STACKTOP = sp;return; } function _LoadingScreen_Layout($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); _Widget_SetLocation($1,1,1,0,-31); $2 = ((($0)) + 128|0); _Widget_SetLocation($2,1,1,0,17); $3 = (_Display_ScaleY(34)|0); $4 = (_Display_ScaleX(200)|0); $5 = ((($0)) + 52|0); HEAP32[$5>>2] = $4; $6 = HEAP32[(1972116)>>2]|0; $7 = (_Gui_CalcPos(1,0,$4,$6)|0); $8 = ((($0)) + 44|0); HEAP32[$8>>2] = $7; $9 = (_Display_ScaleY(4)|0); $10 = ((($0)) + 56|0); HEAP32[$10>>2] = $9; $11 = HEAP32[(1972120)>>2]|0; $12 = (_Gui_CalcPos(1,$3,$9,$11)|0); $13 = ((($0)) + 48|0); HEAP32[$13>>2] = $12; $14 = ((($0)) + 40|0); $15 = HEAP32[$14>>2]|0; _LoadingScreen_CalcMaxVertices($0); $16 = HEAP32[$14>>2]|0; $17 = ($15|0)==($16|0); if ($17) { return; } _Screen_UpdateVb($0); return; } function _LoadingScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 24|0); _Font_Free($1); _Screen_ContextLost($0); return; } function _LoadingScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 24|0); _Gui_MakeBodyFont($1); _LoadingScreen_SetTitle($0); _LoadingScreen_SetMessage($0); _Screen_UpdateVb($0); return; } function _LoadingScreen_SetTitle($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); $2 = ((($0)) + 196|0); $3 = ((($0)) + 24|0); _TextWidget_Set($1,$2,$3); $4 = ((($0)) + 7|0); HEAP8[$4>>0] = 1; return; } function _LoadingScreen_SetMessage($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 128|0); $2 = ((($0)) + 204|0); $3 = ((($0)) + 24|0); _TextWidget_Set($1,$2,$3); $4 = ((($0)) + 7|0); HEAP8[$4>>0] = 1; return; } function _LoadingScreen_CalcMaxVertices($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972120)>>2]|0; $2 = (_Math_CeilDiv($1,64)|0); $3 = ((($0)) + 40|0); HEAP32[$3>>2] = $2; $4 = $2 << 2; $5 = (($4) + 8)|0; $6 = ((($0)) + 8|0); HEAP32[$6>>2] = $5; return; } function _LoadingScreen_MapLoading($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); HEAPF32[$2>>2] = $1; return; } function _LoadingScreen_MapLoaded($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gui_Remove($0); return; } function _GeneratingScreen_Show() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[486821] = 21440; _LoadingScreen_ShowCommon(21504,21512); return; } function _GeneratingScreen_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[1972847] = 0; _LoadingScreen_Init($0); $1 = HEAP32[(1103560)>>2]|0; $2 = (_Mem_TryAlloc($1,1)|0); HEAP32[450775] = $2; $3 = ($2|0)==(0|0); do { if ($3) { _Window_ShowDialog(45698,43031); HEAP8[1972847] = 1; } else { $4 = HEAP8[1972848]|0; $5 = ($4<<24>>24)==(0); if ($5) { $7 = (_Thread_Create(83)|0); _Thread_Start2($7,83); break; } else { $6 = (_Thread_Create(82)|0); _Thread_Start2($6,82); break; } } } while(0); _Event_Register(1791968,0,443); return; } function _GeneratingScreen_Update($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[450770]|0; $3 = ((($0)) + 212|0); $4 = HEAP32[$3>>2]|0; $5 = ($2|0)==($4|0); if ($5) { return; } HEAP32[$3>>2] = $2; $6 = ((($0)) + 204|0); $7 = ((($0)) + 208|0); HEAP16[$7>>1] = 0; _String_AppendConst($6,$2); _LoadingScreen_SetMessage($0); return; } function _GeneratingScreen_Free($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _LoadingScreen_Free($0); _Event_Unregister(1791968,0,443); return; } function _GeneratingScreen_Render($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0.0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[450774]; $3 = ((($0)) + 36|0); HEAPF32[$3>>2] = $2; _LoadingScreen_Render($0,$1); $4 = HEAP8[1972847]|0; $5 = ($4<<24>>24)==(0); if ($5) { return; } _GeneratingScreen_EndGeneration(); return; } function _GeneratingScreen_EndGeneration() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[1972847] = 0; $0 = HEAP32[450775]|0; $1 = HEAP32[(1103564)>>2]|0; $2 = HEAP32[(1103568)>>2]|0; $3 = HEAP32[(1103572)>>2]|0; _World_SetNewMap($0,$1,$2,$3); $4 = HEAP32[450775]|0; $5 = ($4|0)==(0|0); if ($5) { _Chat_AddRaw(43001); return; } else { HEAP32[450775] = 0; $6 = HEAP32[450771]|0; HEAP32[(1103648)>>2] = $6; _LocalPlayer_CalcDefaultSpawn(); _LocalPlayer_MoveToSpawn(); return; } } function _GeneratingScreen_AtlasChanged($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1947291)>>0] = 1; return; } function _DisconnectScreen_Show($0,$1) { $0 = $0|0; $1 = $1|0; var $$026 = 0, $$026$in = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $2 = sp + 64|0; $3 = sp; HEAP8[(1103020)>>0] = 1; HEAP8[(1103021)>>0] = 1; HEAP32[(1103520)>>2] = (1103392); HEAP16[(1103524)>>1] = 0; HEAP16[(1103526)>>1] = 64; _String_AppendString((1103520),$0); HEAP32[(1103528)>>2] = (1103456); HEAP16[(1103532)>>1] = 0; HEAP16[(1103534)>>1] = 64; _String_AppendString((1103528),$1); HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 64; _String_AppendColorless($2,$1); $6 = (_String_CaselessStarts($2,21520)|0); $7 = ($6|0)==(0); if ($7) { $8 = (_String_CaselessStarts($2,21528)|0); $9 = ($8|0)==(0); $phitmp = $9&1; $10 = $phitmp; } else { $10 = 0; } HEAP8[(1103048)>>0] = $10; HEAP32[275754] = 21536; _Gui_Add(1103016,60); $11 = HEAP32[(1803516)>>2]|0; $12 = ($11|0)>(0); if (!($12)) { STACKTOP = sp;return; } $$026$in = $11; while(1) { $$026 = (($$026$in) + -1)|0; $13 = (390192 + ($$026<<2)|0); $14 = HEAP32[$13>>2]|0; $15 = ($14|0)==(1103016|0); if (!($15)) { _Gui_Remove($14); } $16 = ($$026$in|0)>(1); if ($16) { $$026$in = $$026; } else { break; } } STACKTOP = sp;return; } function _DisconnectScreen_Init($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 240|0); _TextWidget_Init($1); $2 = ((($0)) + 308|0); _TextWidget_Init($2); $3 = ((($0)) + 40|0); _ButtonWidget_Init($3,300,175); $4 = ((($0)) + 128|0); _ButtonWidget_Init($4,300,176); $5 = ((($0)) + 32|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); $8 = $7&1; $9 = ((($0)) + 61|0); HEAP8[$9>>0] = $8; $10 = ((($0)) + 8|0); HEAP32[$10>>2] = 32; $11 = HEAP32[450728]|0; $12 = ($11|0)==(0); $13 = $12&1; _Gfx_SetFpsLimit($13,200.0); $14 = +HEAPF64[(1084992)>>3]; $15 = ((($0)) + 24|0); HEAPF64[$15>>3] = $14; $16 = ((($0)) + 36|0); HEAP32[$16>>2] = 5; $17 = ((($0)) + 16|0); HEAP32[$17>>2] = 9424; $18 = ((($0)) + 20|0); HEAP32[$18>>2] = 4; return; } function _DisconnectScreen_Update($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0; var $8 = 0.0, $9 = 0, $spec$store$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 32|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if ($4) { return; } $5 = +HEAPF64[(1084992)>>3]; $6 = ((($0)) + 24|0); $7 = +HEAPF64[$6>>3]; $8 = $5 - $7; $9 = (~~(($8))); $10 = (5 - ($9))|0; $11 = ($10|0)>(0); $spec$store$select = $11 ? $10 : 0; $12 = ((($0)) + 36|0); $13 = HEAP32[$12>>2]|0; $14 = ($13|0)==($spec$store$select|0); if ($14) { $15 = ((($0)) + 60|0); $16 = HEAP8[$15>>0]|0; $17 = ((($0)) + 33|0); $18 = HEAP8[$17>>0]|0; $19 = ($16<<24>>24)==($18<<24>>24); if ($19) { return; } } _DisconnectScreen_UpdateReconnect($0); HEAP32[$12>>2] = $spec$store$select; $20 = ((($0)) + 60|0); $21 = HEAP8[$20>>0]|0; $22 = ((($0)) + 33|0); HEAP8[$22>>0] = $21; $23 = ((($0)) + 7|0); HEAP8[$23>>0] = 1; return; } function _DisconnectScreen_Free($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[450728]|0; _Game_SetFpsLimit($1); return; } function _DisconnectScreen_Render($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1972116)>>2]|0; $3 = HEAP32[(1972120)>>2]|0; _Gfx_Draw2DGradient(0,0,$2,$3,-14671808,-15724464); _Screen_Render2Widgets($0,$1); return; } function _DisconnectScreen_Layout($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 240|0); _Widget_SetLocation($1,1,1,0,-30); $2 = ((($0)) + 308|0); _Widget_SetLocation($2,1,1,0,10); $3 = ((($0)) + 40|0); _Widget_SetLocation($3,1,1,0,80); $4 = ((($0)) + 128|0); _Widget_SetLocation($4,1,1,0,130); return; } function _DisconnectScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 216|0); _Font_Free($1); $2 = ((($0)) + 228|0); _Font_Free($2); _Screen_ContextLost($0); return; } function _DisconnectScreen_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; _Screen_UpdateVb($0); $1 = ((($0)) + 216|0); _Gui_MakeTitleFont($1); $2 = ((($0)) + 228|0); _Gui_MakeBodyFont($2); $3 = ((($0)) + 240|0); $4 = ((($0)) + 504|0); _TextWidget_Set($3,$4,$1); $5 = ((($0)) + 308|0); $6 = ((($0)) + 512|0); _TextWidget_Set($5,$6,$2); _DisconnectScreen_UpdateReconnect($0); $7 = ((($0)) + 128|0); _ButtonWidget_SetConst($7,43104,$1); return; } function _DisconnectScreen_UpdateReconnect($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 72|0; $2 = sp; $3 = sp + 64|0; HEAP32[$1>>2] = $2; $4 = ((($1)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($1)) + 6|0); HEAP16[$5>>1] = 64; $6 = ((($0)) + 32|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); if (!($8)) { $9 = +HEAPF64[(1084992)>>3]; $10 = ((($0)) + 24|0); $11 = +HEAPF64[$10>>3]; $12 = $9 - $11; $13 = (~~(($12))); $14 = (5 - ($13))|0; HEAP32[$3>>2] = $14; $15 = ($14|0)>(0); if ($15) { _String_Format1($1,43114,$3); } $16 = HEAP32[$3>>2]|0; $17 = ($16|0)>(0); $18 = $17&1; $19 = ((($0)) + 61|0); HEAP8[$19>>0] = $18; } $20 = HEAP16[$4>>1]|0; $21 = ($20<<16>>16)==(0); if (!($21)) { $22 = ((($0)) + 40|0); $23 = ((($0)) + 216|0); _ButtonWidget_Set($22,$1,$23); STACKTOP = sp;return; } _String_AppendConst($1,43130); $22 = ((($0)) + 40|0); $23 = ((($0)) + 216|0); _ButtonWidget_Set($22,$1,$23); STACKTOP = sp;return; } function _DisconnectScreen_OnReconnect($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; _Gui_Remove($0); _Gui_ShowDefault(); $2 = HEAP32[487297]|0; FUNCTION_TABLE_v[$2 & 127](); return; } function _DisconnectScreen_OnQuit($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Window_Close(); return; } function _TouchScreen_Refresh() { var label = 0, sp = 0; sp = STACKTOP; _Screen_ContextLost(1947628); _TouchScreen_InitButtons(1947628); _Gui_Refresh(1947628); return; } function _TouchScreen_InitButtons($0) { $0 = $0|0; var $$055 = 0, $$1 = 0, $$15154 = 0, $$253 = 0, $$sink = 0, $$sink59 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); $2 = HEAP32[$1>>2]|0; HEAP32[$2>>2] = 0; $3 = HEAP32[$1>>2]|0; $4 = ((($3)) + 4|0); HEAP32[$4>>2] = 0; $5 = HEAP32[$1>>2]|0; $6 = ((($5)) + 8|0); HEAP32[$6>>2] = 0; $7 = HEAP32[$1>>2]|0; $8 = ((($7)) + 12|0); HEAP32[$8>>2] = 0; $9 = HEAP32[$1>>2]|0; $10 = ((($9)) + 16|0); HEAP32[$10>>2] = 0; $11 = HEAP32[$1>>2]|0; $12 = ((($11)) + 20|0); HEAP32[$12>>2] = 0; $13 = HEAP32[$1>>2]|0; $14 = ((($13)) + 24|0); HEAP32[$14>>2] = 0; $15 = HEAP32[$1>>2]|0; $16 = ((($15)) + 28|0); HEAP32[$16>>2] = 0; $17 = HEAP32[$1>>2]|0; $18 = ((($17)) + 32|0); HEAP32[$18>>2] = 0; $19 = HEAP32[$1>>2]|0; $20 = ((($19)) + 36|0); HEAP32[$20>>2] = 0; $21 = HEAP32[$1>>2]|0; $22 = ((($21)) + 40|0); HEAP32[$22>>2] = 0; $23 = HEAP32[$1>>2]|0; $24 = ((($23)) + 44|0); HEAP32[$24>>2] = 0; $25 = HEAP32[$1>>2]|0; $26 = ((($25)) + 48|0); HEAP32[$26>>2] = 0; $27 = HEAP32[$1>>2]|0; $28 = ((($27)) + 52|0); HEAP32[$28>>2] = 0; $29 = HEAP32[$1>>2]|0; $30 = ((($29)) + 56|0); HEAP32[$30>>2] = 0; $31 = ((($0)) + 16|0); $$055 = 0;$$15154 = 0; while(1) { $32 = HEAP32[(1803564)>>2]|0; $33 = 1 << $$15154; $34 = $32 & $33; $35 = ($34|0)==(0); if ($35) { $$1 = $$055; } else { $36 = (9440 + ($$15154<<4)|0); $37 = (((($0)) + 140|0) + (($$055*88)|0)|0); $38 = (((9440 + ($$15154<<4)|0)) + 8|0); $39 = HEAP32[$38>>2]|0; _ButtonWidget_Init($37,100,$39); $40 = (((9440 + ($$15154<<4)|0)) + 12|0); $41 = HEAP32[$40>>2]|0; $42 = ($41|0)==(0|0); if (!($42)) { $43 = (((((($0)) + 140|0) + (($$055*88)|0)|0)) + 21|0); $44 = HEAP8[$41>>0]|0; $45 = ($44<<24>>24)==(0); $46 = $45&1; HEAP8[$43>>0] = $46; } $47 = (((($0)) + 88|0) + ($$055<<2)|0); HEAP32[$47>>2] = $36; $48 = HEAP32[$31>>2]|0; $49 = (($48) + ($$055<<2)|0); HEAP32[$49>>2] = $37; $50 = (($$055) + 1)|0; $$1 = $50; } $51 = (($$15154) + 1)|0; $exitcond = ($51|0)==(13); if ($exitcond) { break; } else { $$055 = $$1;$$15154 = $51; } } $52 = ((($0)) + 28|0); HEAP32[$52>>2] = $$1; $53 = HEAP8[(1784335)>>0]|0; $54 = HEAP8[(1784334)>>0]|0; $55 = $54 | $53; $56 = ($55<<24>>24)==(0); $57 = ((($0)) + 24|0); $$sink59 = $56 ? 9648 : 9664; $$sink = $56 ? 1 : 2; HEAP32[$57>>2] = $$sink59; $58 = ((($0)) + 32|0); HEAP32[$58>>2] = $$sink; $59 = ((($0)) + 32|0); $60 = ((($0)) + 16|0); $$253 = 0; while(1) { $61 = (((($0)) + 1284|0) + (($$253*88)|0)|0); $62 = HEAP32[$60>>2]|0; $63 = (($$253) + 13)|0; $64 = (($62) + ($63<<2)|0); HEAP32[$64>>2] = $61; $65 = HEAP32[$57>>2]|0; $66 = (((($65) + ($$253<<4)|0)) + 8|0); $67 = HEAP32[$66>>2]|0; _ButtonWidget_Init($61,60,$67); $68 = (((((($0)) + 1284|0) + (($$253*88)|0)|0)) + 64|0); HEAP32[$68>>2] = -587202561; $69 = (($$253) + 1)|0; $70 = HEAP32[$59>>2]|0; $71 = ($69|0)<($70|0); if ($71) { $$253 = $69; } else { break; } } return; } function _TouchScreen_BindClick($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Screen_Index($0,$1)|0); $3 = (($2) + -13)|0; $4 = ((($0)) + 24|0); $5 = HEAP32[$4>>2]|0; $6 = (((($5) + ($3<<4)|0)) + 4|0); $7 = HEAP8[$6>>0]|0; $8 = $7&255; $9 = (390752 + ($8)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; _Input_Set($11,1); return; } function _TouchScreen_ChatClick($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _ChatScreen_OpenInput(1949280); return; } function _TouchScreen_TabClick($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1931828)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { _TabListOverlay_Show(); HEAP8[(1931830)>>0] = 1; return; } else { _Gui_Remove(1931788); return; } } function _TouchScreen_RespawnClick($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_LocalPlayer_HandleRespawn()|0); return; } function _TouchScreen_SetSpawnClick($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_LocalPlayer_HandleSetSpawn()|0); return; } function _TouchScreen_FlyClick($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_LocalPlayer_HandleFly()|0); return; } function _TouchScreen_NoclipClick($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; (_LocalPlayer_HandleNoclip()|0); return; } function _TouchScreen_SpeedClick($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1784310)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } $4 = HEAP8[(1784338)>>0]|0; $5 = ($4<<24>>24)==(0); $6 = $5&1; HEAP8[(1784338)>>0] = $6; return; } function _TouchScreen_HalfClick($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1784310)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } $4 = HEAP8[(1784339)>>0]|0; $5 = ($4<<24>>24)==(0); $6 = $5&1; HEAP8[(1784339)>>0] = $6; return; } function _TouchScreen_CameraClick($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Camera_CycleActive(); return; } function _TouchScreen_DeleteClick($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _InputHandler_DeleteBlock(); return; } function _TouchScreen_PickClick($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _InputHandler_PickBlock(); return; } function _TouchScreen_PlaceClick($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _InputHandler_PlaceBlock(); return; } function _TouchScreen_SwitchClick($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _Inventory_SwitchHotbar(); return; } function _TouchScreen_Show() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[486907] = 21600; $0 = HEAP8[1972870]|0; $1 = ($0<<24>>24)==(0); if ($1) { return; } _Gui_Add(1947628,25); return; } function _TouchScreen_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 16|0); HEAP32[$1>>2] = 9696; $2 = ((($0)) + 20|0); HEAP32[$2>>2] = 17; $3 = ((($0)) + 8|0); HEAP32[$3>>2] = 224; _Event_Register((1794828),$0,444); _Event_Register((1794308),$0,444); _TouchScreen_InitButtons($0); $4 = ((($0)) + 1460|0); _ButtonWidget_Init($4,40,177); $5 = ((($0)) + 1524|0); HEAP32[$5>>2] = -587202561; $6 = ((($0)) + 48|0); _ThumbstickWidget_Init($6); HEAP32[482483] = 178; HEAP32[(1784620)>>2] = 1929932; return; } function _TouchScreen_Free($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Event_Unregister((1794828),$0,444); _Event_Unregister((1794308),$0,444); return; } function _TouchScreen_Render($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1803572)>>2]|0; $3 = ($2|0)==(0|0); if (!($3)) { return; } _Screen_Render2Widgets($0,$1); return; } function _TouchScreen_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$022 = 0, $$023 = 0, $$lobit = 0, $$lobit$not = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[(1803572)>>2]|0; $5 = ($4|0)==(0|0); if (!($5)) { $$022 = 0; return ($$022|0); } $6 = (_Screen_DoPointerDown($0,$1,$2,$3)|0); $7 = ($6|0)<(13); if ($7) { $$lobit = (31)?($6 >>> 31):($6); $$lobit$not = $$lobit ^ 1; $$022 = $$lobit$not; return ($$022|0); } $8 = ((($0)) + 16|0); $9 = HEAP32[$8>>2]|0; $10 = (($9) + ($6<<2)|0); $11 = HEAP32[$10>>2]|0; $12 = ((($11)) + 20|0); $13 = HEAP8[$12>>0]|0; $14 = $13&255; $15 = $14 | $1; $16 = $15&255; HEAP8[$12>>0] = $16; $17 = ((($0)) + 1284|0); $18 = ((($0)) + 32|0); $19 = HEAP32[$18>>2]|0; $20 = ($19|0)>(0); if (!($20)) { $$022 = 1; return ($$022|0); } $$023 = 0; while(1) { $24 = (($17) + (($$023*88)|0)|0); $25 = ($11|0)==($24|0); $22 = (($$023) + 1)|0; if ($25) { $$022 = 3; label = 8; break; } $21 = HEAP32[$18>>2]|0; $23 = ($22|0)<($21|0); if ($23) { $$023 = $22; } else { $$022 = 1; label = 8; break; } } if ((label|0) == 8) { return ($$022|0); } return (0)|0; } function _TouchScreen_PointerUp($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$021 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = $1 ^ -1; $5 = ((($0)) + 68|0); $6 = HEAP8[$5>>0]|0; $7 = $6&255; $8 = $7 & $4; $9 = $8&255; HEAP8[$5>>0] = $9; $10 = ((($0)) + 1480|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = $12 & $4; $14 = $13&255; HEAP8[$10>>0] = $14; $15 = ((($0)) + 32|0); $16 = HEAP32[$15>>2]|0; $17 = ($16|0)>(0); if (!($17)) { return; } $18 = ((($0)) + 1284|0); $$021 = 0; while(1) { $19 = (((($18) + (($$021*88)|0)|0)) + 20|0); $20 = HEAP8[$19>>0]|0; $21 = $20&255; $22 = $21 & $1; $23 = ($22|0)==(0); if (!($23)) { break; } $37 = (($$021) + 1)|0; $38 = HEAP32[$15>>2]|0; $39 = ($37|0)<($38|0); if ($39) { $$021 = $37; } else { label = 8; break; } } if ((label|0) == 8) { return; } $24 = ((($0)) + 24|0); $25 = HEAP32[$24>>2]|0; $26 = (((($25) + ($$021<<4)|0)) + 4|0); $27 = HEAP8[$26>>0]|0; $28 = ($27&255)<(35); if ($28) { $29 = $27&255; $30 = (390752 + ($29)|0); $31 = HEAP8[$30>>0]|0; $32 = $31&255; _Input_Set($32,0); } $33 = HEAP8[$19>>0]|0; $34 = $33&255; $35 = $34 & $4; $36 = $35&255; HEAP8[$19>>0] = $36; return; } function _TouchScreen_Layout($0) { $0 = $0|0; var $$06065 = 0, $$06264 = 0, $$067 = 0, $$161 = 0, $$163 = 0, $$166 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $6 = 0; var $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1803568)>>2]; $2 = (_HUDScreen_LayoutHotbar()|0); $3 = ((($0)) + 32|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if ($5) { $6 = ((($0)) + 24|0); $7 = ((($0)) + 1284|0); $8 = $1 * 60.0; $9 = (~~(($8))); $$067 = 0; while(1) { $10 = HEAP32[$6>>2]|0; $11 = (($7) + (($$067*88)|0)|0); $12 = (((($10) + ($$067<<4)|0)) + 5|0); $13 = HEAP8[$12>>0]|0; $14 = $13&255; $15 = (((($10) + ($$067<<4)|0)) + 6|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; _Widget_SetLocation($11,2,2,$14,$17); $18 = (((($7) + (($$067*88)|0)|0)) + 28|0); $19 = HEAP32[$18>>2]|0; $20 = (($19) + ($2))|0; HEAP32[$18>>2] = $20; $21 = (_Display_ScaleX($9)|0); $22 = (((($7) + (($$067*88)|0)|0)) + 68|0); HEAP32[$22>>2] = $21; $23 = (_Display_ScaleY($9)|0); $24 = (((($7) + (($$067*88)|0)|0)) + 72|0); HEAP32[$24>>2] = $23; $25 = HEAP32[$11>>2]|0; $26 = ((($25)) + 8|0); $27 = HEAP32[$26>>2]|0; FUNCTION_TABLE_vi[$27 & 511]($11); $28 = (($$067) + 1)|0; $29 = HEAP32[$3>>2]|0; $30 = ($28|0)<($29|0); if ($30) { $$067 = $28; } else { break; } } } $31 = ((($0)) + 28|0); $32 = HEAP32[$31>>2]|0; $33 = ($32|0)>(0); if (!($33)) { $49 = ((($0)) + 1460|0); _Widget_SetLocation($49,1,0,0,10); $50 = ((($0)) + 48|0); _Widget_SetLocation($50,0,2,30,5); $51 = ((($0)) + 76|0); $52 = HEAP32[$51>>2]|0; $53 = (($52) + ($2))|0; HEAP32[$51>>2] = $53; $54 = ((($0)) + 84|0); HEAPF32[$54>>2] = $1; $55 = HEAP32[$50>>2]|0; $56 = ((($55)) + 8|0); $57 = HEAP32[$56>>2]|0; FUNCTION_TABLE_vi[$57 & 511]($50); return; } $34 = ((($0)) + 140|0); $35 = ((($0)) + 1292|0); $$06065 = 10;$$06264 = 10;$$166 = 0; while(1) { $36 = (($34) + (($$166*88)|0)|0); _Widget_SetLocation($36,2,0,$$06264,$$06065); $37 = (((($34) + (($$166*88)|0)|0)) + 8|0); $38 = HEAP32[$37>>2]|0; $39 = (((($34) + (($$166*88)|0)|0)) + 16|0); $40 = HEAP32[$39>>2]|0; $41 = (($40) + ($38))|0; $42 = HEAP32[$35>>2]|0; $43 = ($41|0)>($42|0); $44 = (($$06264) + 110)|0; if ($43) { _Widget_SetLocation($36,2,0,$44,10); $$161 = 10;$$163 = $44; } else { $$161 = $$06065;$$163 = $$06264; } $45 = (($$166) + 1)|0; $46 = (($$161) + 40)|0; $47 = HEAP32[$31>>2]|0; $48 = ($45|0)<($47|0); if ($48) { $$06065 = $46;$$06264 = $$163;$$166 = $45; } else { break; } } $49 = ((($0)) + 1460|0); _Widget_SetLocation($49,1,0,0,10); $50 = ((($0)) + 48|0); _Widget_SetLocation($50,0,2,30,5); $51 = ((($0)) + 76|0); $52 = HEAP32[$51>>2]|0; $53 = (($52) + ($2))|0; HEAP32[$51>>2] = $53; $54 = ((($0)) + 84|0); HEAPF32[$54>>2] = $1; $55 = HEAP32[$50>>2]|0; $56 = ((($55)) + 8|0); $57 = HEAP32[$56>>2]|0; FUNCTION_TABLE_vi[$57 & 511]($50); return; } function _TouchScreen_ContextLost($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 36|0); _Font_Free($1); _Screen_ContextLost($0); return; } function _TouchScreen_ContextRecreated($0) { $0 = $0|0; var $$027 = 0, $$126 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Screen_UpdateVb($0); $1 = ((($0)) + 36|0); _Gui_MakeTitleFont($1); $2 = ((($0)) + 28|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)>(0); if ($4) { $5 = ((($0)) + 88|0); $6 = ((($0)) + 140|0); $$027 = 0; while(1) { $7 = (($5) + ($$027<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = (($6) + (($$027*88)|0)|0); $10 = HEAP32[$8>>2]|0; _ButtonWidget_SetConst($9,$10,$1); $11 = (($$027) + 1)|0; $12 = HEAP32[$2>>2]|0; $13 = ($11|0)<($12|0); if ($13) { $$027 = $11; } else { break; } } } $14 = ((($0)) + 32|0); $15 = HEAP32[$14>>2]|0; $16 = ($15|0)>(0); if (!($16)) { $26 = ((($0)) + 1460|0); _ButtonWidget_SetConst($26,45274,$1); return; } $17 = ((($0)) + 24|0); $18 = ((($0)) + 1284|0); $$126 = 0; while(1) { $19 = HEAP32[$17>>2]|0; $20 = (($18) + (($$126*88)|0)|0); $21 = (($19) + ($$126<<4)|0); $22 = HEAP32[$21>>2]|0; _ButtonWidget_SetConst($20,$22,$1); $23 = (($$126) + 1)|0; $24 = HEAP32[$14>>2]|0; $25 = ($23|0)<($24|0); if ($25) { $$126 = $23; } else { break; } } $26 = ((($0)) + 1460|0); _ButtonWidget_SetConst($26,45274,$1); return; } function _TouchScreen_HacksChanged($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _TouchScreen_Refresh(); return; } function _TouchScreen_MoreClick($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _TouchMoreScreen_Show(); return; } function _TouchScreen_GetMovement($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _ThumbstickWidget_GetMovement((1947676),$0,$1); return; } function _OnInit_1800() { var label = 0, sp = 0; sp = STACKTOP; _Event_Register((1793528),0,445); _Event_Register((1793788),0,446); return; } function _OnFree_1801() { var label = 0, sp = 0; sp = STACKTOP; _Selections_ContextLost(0); return; } function _OnReset_1802() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[487294] = 0; return; } function _Selections_ContextLost($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_DeleteVb(1949180); _Gfx_DeleteVb(1949184); return; } function _Selections_ContextRecreated($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972893]|0; $2 = ($1<<24>>24)==(0); if ($2) { return; } _Gfx_RecreateDynamicVb(1949180,0,6144); _Gfx_RecreateDynamicVb(1949184,0,6144); return; } function _Selections_Add($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $4 = sp; _IVec3_ToVec3($4,$1); $5 = ((($4)) + 12|0); _IVec3_ToVec3($5,$2); $6 = ((($4)) + 24|0); HEAP32[$6>>2] = $3; _Selections_Remove($0); $7 = HEAP32[487294]|0; $8 = (1053632 + (($7*36)|0)|0); dest=$8; src=$4; stop=dest+36|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $9 = (1062848 + ($7)|0); HEAP8[$9>>0] = $0; $10 = (($7) + 1)|0; HEAP32[487294] = $10; STACKTOP = sp;return; } function _Selections_Remove($0) { $0 = $0|0; var $$015 = 0, $$114 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0; var dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; $1 = HEAP32[487294]|0; $2 = ($1|0)>(0); if (!($2)) { return; } $3 = HEAP32[487294]|0; $$015 = 0;$8 = $1; while(1) { $4 = (1062848 + ($$015)|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==($0<<24>>24); if ($6) { break; } $16 = (($$015) + 1)|0; $17 = ($16|0)<($3|0); if ($17) { $$015 = $16;$8 = $3; } else { label = 9; break; } } if ((label|0) == 9) { return; } $7 = (($8) + -1)|0; $9 = ($$015|0)<($7|0); if ($9) { $$114 = $$015; while(1) { $10 = (1053632 + (($$114*36)|0)|0); $11 = (($$114) + 1)|0; $12 = (1053632 + (($11*36)|0)|0); dest=$10; src=$12; stop=dest+36|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $13 = (1062848 + ($11)|0); $14 = HEAP8[$13>>0]|0; $15 = (1062848 + ($$114)|0); HEAP8[$15>>0] = $14; $exitcond = ($11|0)==($7|0); if ($exitcond) { break; } else { $$114 = $11; } } } HEAP32[487294] = $7; return; } function _Selections_Render() { var $$02130 = 0, $$026 = 0, $$12225 = 0, $$124 = 0, $$223 = 0, $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $$byval_copy = sp + 12|0; $0 = sp; $1 = HEAP32[487294]|0; $2 = ($1|0)==(0); if ($2) { STACKTOP = sp;return; } ;HEAP32[$0>>2]=HEAP32[(1771048)>>2]|0;HEAP32[$0+4>>2]=HEAP32[(1771048)+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[(1771048)+8>>2]|0; $3 = ($1|0)>(0); if ($3) { $$02130 = 0; while(1) { $4 = (1053632 + (($$02130*36)|0)|0); ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0; _CalcDists($4,$$byval_copy); $5 = (($$02130) + 1)|0; $exitcond = ($5|0)==($1|0); if ($exitcond) { break; } else { $$02130 = $5; } } } $6 = (($1) + -1)|0; _Selections_QuickSort(0,$6); $7 = HEAP32[487295]|0; $8 = ($7|0)==(0); if ($8) { HEAP8[1972893] = 1; _Selections_ContextRecreated(0); } $9 = HEAP32[487294]|0; $10 = ($9*24)|0; _Gfx_SetVertexFormat(0); $11 = HEAP32[487296]|0; $12 = (_Gfx_LockDynamicVb($11,0,$10)|0); $13 = HEAP32[487294]|0; $14 = ($13|0)>(0); if ($14) { $15 = HEAP32[487294]|0; $$026 = $12;$$12225 = 0; while(1) { $16 = (1053632 + (($$12225*36)|0)|0); _BuildEdges($16,$$026); $17 = (($$12225) + 1)|0; $18 = ((($$026)) + 384|0); $19 = ($17|0)<($15|0); if ($19) { $$026 = $18;$$12225 = $17; } else { break; } } } $20 = HEAP32[487296]|0; _Gfx_UnlockDynamicVb($20); _Gfx_DrawVb_Lines($10); $21 = HEAP32[487295]|0; $22 = (_Gfx_LockDynamicVb($21,0,$10)|0); $23 = HEAP32[487294]|0; $24 = ($23|0)>(0); if ($24) { $25 = HEAP32[487294]|0; $$124 = $22;$$223 = 0; while(1) { $26 = (1053632 + (($$223*36)|0)|0); _BuildFaces($26,$$124); $27 = (($$223) + 1)|0; $28 = ((($$124)) + 384|0); $29 = ($27|0)<($25|0); if ($29) { $$124 = $28;$$223 = $27; } else { break; } } } $30 = HEAP32[487295]|0; _Gfx_UnlockDynamicVb($30); _Gfx_SetDepthWrite(0); _Gfx_SetAlphaBlending(1); _Gfx_DrawVb_IndexedTris($10); _Gfx_SetDepthWrite(1); _Gfx_SetAlphaBlending(0); STACKTOP = sp;return; } function _CalcDists($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0.0; var $29 = 0.0, $3 = 0.0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0, $45 = 0.0, $46 = 0.0; var $47 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[$1>>2]; $3 = +HEAPF32[$0>>2]; $4 = $2 - $3; $5 = $4 * $4; $6 = ((($0)) + 12|0); $7 = +HEAPF32[$6>>2]; $8 = $2 - $7; $9 = $8 * $8; $10 = ((($1)) + 4|0); $11 = +HEAPF32[$10>>2]; $12 = ((($0)) + 4|0); $13 = +HEAPF32[$12>>2]; $14 = $11 - $13; $15 = $14 * $14; $16 = ((($0)) + 16|0); $17 = +HEAPF32[$16>>2]; $18 = $11 - $17; $19 = $18 * $18; $20 = ((($1)) + 8|0); $21 = +HEAPF32[$20>>2]; $22 = ((($0)) + 8|0); $23 = +HEAPF32[$22>>2]; $24 = $21 - $23; $25 = $24 * $24; $26 = ((($0)) + 20|0); $27 = +HEAPF32[$26>>2]; $28 = $21 - $27; $29 = $28 * $28; $30 = $5 < $9; $31 = $30 ? $5 : $9; $32 = $15 < $19; $33 = $32 ? $15 : $19; $34 = $31 + $33; $35 = $25 < $29; $36 = $35 ? $25 : $29; $37 = $34 + $36; $38 = ((($0)) + 28|0); HEAPF32[$38>>2] = $37; $39 = $5 > $9; $40 = $39 ? $5 : $9; $41 = $15 > $19; $42 = $41 ? $15 : $19; $43 = $40 + $42; $44 = $25 > $29; $45 = $44 ? $25 : $29; $46 = $43 + $45; $47 = ((($0)) + 32|0); HEAPF32[$47>>2] = $46; return; } function _Selections_QuickSort($0,$1) { $0 = $0|0; $1 = $1|0; var $$062$lcssa = 0, $$06272 = 0, $$064$lcssa = 0, $$06471 = 0, $$06774 = 0, $$075 = 0, $$1 = 0, $$163 = 0, $$165 = 0, $$168 = 0, $$2 = 0, $$266 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0; var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $2 = sp; $3 = ($0|0)<($1|0); if (!($3)) { STACKTOP = sp;return; } $$06774 = $1;$$075 = $0; while(1) { $4 = (($$075) + ($$06774))|0; $5 = (1)?($4 >> 1):($4); $6 = (1053632 + (($5*36)|0)|0); $7 = ($$075|0)>($$06774|0); if ($7) { $$062$lcssa = $$06774;$$064$lcssa = $$075; } else { $$06272 = $$06774;$$06471 = $$075; while(1) { $$165 = $$06471; while(1) { $8 = (1053632 + (($$165*36)|0)|0); $9 = (_CompareDists($6,$8)|0); $10 = ($9|0)>(0); $11 = (($$165) + 1)|0; if ($10) { $$165 = $11; } else { break; } } $$163 = $$06272; while(1) { $12 = (1053632 + (($$163*36)|0)|0); $13 = (_CompareDists($6,$12)|0); $14 = ($13|0)<(0); $15 = (($$163) + -1)|0; if ($14) { $$163 = $15; } else { break; } } $16 = ($$165|0)>($$163|0); if ($16) { $$2 = $$163;$$266 = $$165; } else { dest=$2; src=$8; stop=dest+36|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); dest=$8; src=$12; stop=dest+36|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); dest=$12; src=$2; stop=dest+36|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $17 = (1062848 + ($$165)|0); $18 = HEAP8[$17>>0]|0; $19 = (1062848 + ($$163)|0); $20 = HEAP8[$19>>0]|0; HEAP8[$17>>0] = $20; HEAP8[$19>>0] = $18; $21 = (($$165) + 1)|0; $22 = (($$163) + -1)|0; $$2 = $22;$$266 = $21; } $23 = ($$266|0)>($$2|0); if ($23) { $$062$lcssa = $$2;$$064$lcssa = $$266; break; } else { $$06272 = $$2;$$06471 = $$266; } } } $24 = (($$062$lcssa) - ($$075))|0; $25 = (($$06774) - ($$064$lcssa))|0; $26 = ($24|0)>($25|0); if ($26) { $28 = ($$06774|0)>($$064$lcssa|0); if ($28) { _Selections_QuickSort($$064$lcssa,$$06774); $$1 = $$075;$$168 = $$062$lcssa; } else { $$1 = $$075;$$168 = $$062$lcssa; } } else { $27 = ($$062$lcssa|0)>($$075|0); if ($27) { _Selections_QuickSort($$075,$$062$lcssa); $$1 = $$064$lcssa;$$168 = $$06774; } else { $$1 = $$064$lcssa;$$168 = $$06774; } } $29 = ($$1|0)<($$168|0); if ($29) { $$06774 = $$168;$$075 = $$1; } else { break; } } STACKTOP = sp;return; } function _BuildEdges($0,$1) { $0 = $0|0; $1 = $1|0; var $$02627 = 0, $$028 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = ((($0)) + 28|0); $4 = +HEAPF32[$3>>2]; $5 = $4 < 1024.0; $6 = $5 ? 0.03125 : 0.0625; $7 = - $6; _Vec3_Add1_1809($2,$0,$7); $8 = ((($2)) + 12|0); $9 = ((($0)) + 12|0); _Vec3_Add1_1809($8,$9,$6); $10 = ((($0)) + 24|0); $11 = HEAP32[$10>>2]|0; $12 = $11 ^ 16777215; $$02627 = 0;$$028 = $1; while(1) { $13 = (9808 + ($$02627)|0); $14 = HEAP8[$13>>0]|0; $15 = $14&255; $16 = $15 & 1; $17 = (($2) + (($16*12)|0)|0); $18 = HEAP32[$17>>2]|0; HEAP32[$$028>>2] = $18; $19 = (1)?($15 >>> 1):($15); $20 = $19 & 1; $21 = (((($2) + (($20*12)|0)|0)) + 4|0); $22 = HEAP32[$21>>2]|0; $23 = ((($$028)) + 4|0); HEAP32[$23>>2] = $22; $24 = (2)?($15 >>> 2):($15); $25 = (((($2) + (($24*12)|0)|0)) + 8|0); $26 = HEAP32[$25>>2]|0; $27 = ((($$028)) + 8|0); HEAP32[$27>>2] = $26; $28 = ((($$028)) + 12|0); HEAP32[$28>>2] = $12; $29 = (($$02627) + 1)|0; $30 = ((($$028)) + 16|0); $exitcond = ($29|0)==(24); if ($exitcond) { break; } else { $$02627 = $29;$$028 = $30; } } STACKTOP = sp;return; } function _BuildFaces($0,$1) { $0 = $0|0; $1 = $1|0; var $$02425 = 0, $$026 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = ((($0)) + 28|0); $4 = +HEAPF32[$3>>2]; $5 = $4 < 1024.0; $6 = $5 ? 0.03125 : 0.0625; $7 = - $6; _Vec3_Add1_1809($2,$0,$7); $8 = ((($2)) + 12|0); $9 = ((($0)) + 12|0); _Vec3_Add1_1809($8,$9,$6); $10 = ((($0)) + 24|0); $11 = HEAP32[$10>>2]|0; $$02425 = 0;$$026 = $1; while(1) { $12 = (9776 + ($$02425)|0); $13 = HEAP8[$12>>0]|0; $14 = $13&255; $15 = $14 & 1; $16 = (($2) + (($15*12)|0)|0); $17 = HEAP32[$16>>2]|0; HEAP32[$$026>>2] = $17; $18 = (1)?($14 >>> 1):($14); $19 = $18 & 1; $20 = (((($2) + (($19*12)|0)|0)) + 4|0); $21 = HEAP32[$20>>2]|0; $22 = ((($$026)) + 4|0); HEAP32[$22>>2] = $21; $23 = (2)?($14 >>> 2):($14); $24 = (((($2) + (($23*12)|0)|0)) + 8|0); $25 = HEAP32[$24>>2]|0; $26 = ((($$026)) + 8|0); HEAP32[$26>>2] = $25; $27 = ((($$026)) + 12|0); HEAP32[$27>>2] = $11; $28 = (($$02425) + 1)|0; $29 = ((($$026)) + 16|0); $exitcond = ($28|0)==(24); if ($exitcond) { break; } else { $$02425 = $28;$$026 = $29; } } STACKTOP = sp;return; } function _Vec3_Add1_1809($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = +$2; var $10 = 0.0, $11 = 0.0, $12 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = $3 + $2; HEAPF32[$0>>2] = $4; $5 = ((($1)) + 4|0); $6 = +HEAPF32[$5>>2]; $7 = $6 + $2; $8 = ((($0)) + 4|0); HEAPF32[$8>>2] = $7; $9 = ((($1)) + 8|0); $10 = +HEAPF32[$9>>2]; $11 = $10 + $2; $12 = ((($0)) + 8|0); HEAPF32[$12>>2] = $11; return; } function _CompareDists($0,$1) { $0 = $0|0; $1 = $1|0; var $$ = 0, $$0 = 0.0, $$012 = 0.0, $$013 = 0, $10 = 0.0, $11 = 0, $12 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 28|0); $3 = +HEAPF32[$2>>2]; $4 = ((($1)) + 28|0); $5 = +HEAPF32[$4>>2]; $6 = $3 == $5; if ($6) { $7 = ((($0)) + 32|0); $8 = +HEAPF32[$7>>2]; $9 = ((($1)) + 32|0); $10 = +HEAPF32[$9>>2]; $$0 = $10;$$012 = $8; } else { $$0 = $5;$$012 = $3; } $11 = $$012 < $$0; $12 = $$012 > $$0; $$ = $12 << 31 >> 31; $$013 = $11 ? 1 : $$; return ($$013|0); } function _OnInit_1812() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[(1949212)>>2] = 1063344; HEAP16[(1949216)>>1] = 0; HEAP16[(1949218)>>1] = 64; HEAP32[(1949220)>>2] = 1063408; HEAP16[(1949224)>>1] = 0; HEAP16[(1949226)>>1] = 64; HEAP32[(1949228)>>2] = 1063472; HEAP16[(1949232)>>1] = 0; HEAP16[(1949234)>>1] = 64; $0 = HEAP16[(1949252)>>1]|0; $1 = ($0<<16>>16)==(0); if ($1) { _SPConnection_Init(); } else { _MPConnection_Init(); } $2 = HEAP32[(1949192)>>2]|0; (_ScheduledTask_Add(0.016666666666666666,$2)|0); _String_AppendConst((1949228),43247); $3 = HEAP8[1972870]|0; $4 = ($3<<24>>24)==(0); if ($4) { return; } HEAP16[(1949232)>>1] = 0; _String_AppendConst((1949228),43268); return; } function _OnFree_1813() { var label = 0, sp = 0; sp = STACKTOP; HEAP16[(1949252)>>1] = 0; _OnClose(); return; } function _OnReset_1814() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1949240)>>0]|0; $1 = ($0<<24>>24)==(0); if (!($1)) { return; } HEAP32[487315] = 0; _OnClose(); return; } function _OnNewMap_1815() { var $$04 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1949240)>>0]|0; $1 = ($0<<24>>24)==(0); if (!($1)) { return; } $$04 = 0; while(1) { $2 = $$04&255; _Protocol_RemoveEntity($2); $3 = (($$04) + 1)|0; $exitcond = ($3|0)==(256); if ($exitcond) { break; } else { $$04 = $3; } } return; } function _OnClose() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1949240)>>0]|0; $1 = ($0<<24>>24)==(0); if (!($1)) { _Physics_Free(); return; } _Ping_Reset(); $2 = HEAP8[(1949241)>>0]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { return; } $4 = HEAP32[487316]|0; _Socket_Close($4); HEAP8[(1949241)>>0] = 1; return; } function _Ping_Reset() { var label = 0, sp = 0; sp = STACKTOP; _Mem_Set(1063104,0,240); HEAP32[487317] = 0; return; } function _SPConnection_Init() { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; _Server_ResetState(); _Physics_Init(); HEAP32[487297] = 84; HEAP32[(1949192)>>2] = 447; HEAP32[(1949196)>>2] = 1; HEAP32[(1949200)>>2] = 448; HEAP32[(1949208)>>2] = 179; $0 = HEAP8[1972839]|0; $1 = ($0<<24>>24)==(0); $2 = $1&1; HEAP8[(1949245)>>0] = $2; HEAP8[(1949244)>>0] = 1; HEAP8[(1949240)>>0] = 1; return; } function _MPConnection_Init() { var label = 0, sp = 0; sp = STACKTOP; _Server_ResetState(); HEAP8[(1949240)>>0] = 0; HEAP32[487297] = 85; HEAP32[(1949192)>>2] = 449; HEAP32[(1949196)>>2] = 2; HEAP32[(1949200)>>2] = 450; HEAP32[(1949208)>>2] = 180; HEAP32[487318] = 1063536; return; } function _Server_ResetState() { var label = 0, sp = 0; sp = STACKTOP; ;HEAP8[(1949241)>>0]=0|0;HEAP8[(1949241)+1>>0]=0|0;HEAP8[(1949241)+2>>0]=0|0;HEAP8[(1949241)+3>>0]=0|0;HEAP8[(1949241)+4>>0]=0|0; return; } function _MPConnection_BeginConnect() { var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $switch$split2D = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $0 = sp + 64|0; $1 = sp; HEAP32[$0>>2] = $1; $2 = ((($0)) + 4|0); HEAP16[$2>>1] = 0; $3 = ((($0)) + 6|0); HEAP16[$3>>1] = 64; HEAP8[(1171476)>>0] = 0; ;HEAP8[(1171483)>>0]=0|0;HEAP8[(1171483)+1>>0]=0|0;HEAP8[(1171483)+2>>0]=0|0;HEAP8[(1171483)+3>>0]=0|0;HEAP8[(1171483)+4>>0]=0|0; ;HEAP8[(1172251)>>0]=0|0;HEAP8[(1172251)+1>>0]=0|0;HEAP8[(1172251)+2>>0]=0|0;HEAP8[(1172251)+3>>0]=0|0;HEAP8[(1172251)+4>>0]=0|0; $4 = HEAP32[(1949256)>>2]|0; $5 = (_Socket_Connect(1949264,(1949248),$4)|0); $switch$split2D = ($5|0)<(0); L1: do { if ($switch$split2D) { switch ($5|0) { case -857812989: { break; } default: { label = 3; break L1; } } _MPConnection_Fail(21760); STACKTOP = sp;return; } else { switch ($5|0) { case 0: { break; } default: { label = 3; } } } } while(0); if ((label|0) == 3) { $6 = HEAP32[5239]|0; $7 = ($5|0)==($6|0); $8 = HEAP32[5240]|0; $9 = ($5|0)==($8|0); $or$cond = $7 | $9; if (!($or$cond)) { _MPConnection_FailConnect($5); STACKTOP = sp;return; } } HEAP8[(1949241)>>0] = 0; HEAP8[1972894] = 1; $10 = +HEAPF64[(1084992)>>3]; $11 = $10 + 15.0; HEAPF64[137943] = $11; _String_Format2($0,43678,(1949248),(1949256)); _LoadingScreen_Show($0,1949280); STACKTOP = sp;return; } function _MPConnection_Tick($0) { $0 = $0|0; var $$0 = 0, $$02733 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0; var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $8 = 0, $9 = 0.0, $exitcond = 0, $or$cond = 0, $or$cond29 = 0; var $or$cond31 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 144|0; $1 = sp + 136|0; $2 = sp; $3 = sp + 132|0; $4 = sp + 128|0; $5 = HEAP8[(1949241)>>0]|0; $6 = ($5<<24>>24)==(0); if (!($6)) { STACKTOP = sp;return; } $7 = HEAP8[1972894]|0; $8 = ($7<<24>>24)==(0); if (!($8)) { _MPConnection_TickConnect(); STACKTOP = sp;return; } $9 = +HEAPF64[137942]; $10 = $9 + 30.0; $11 = +HEAPF64[(1084992)>>3]; $12 = $10 < $11; if ($12) { _MPConnection_CheckDisconnection(); } $13 = HEAP8[(1949241)>>0]|0; $14 = ($13<<24>>24)==(0); if (!($14)) { STACKTOP = sp;return; } HEAP32[$3>>2] = 0; $15 = HEAP32[487316]|0; $16 = (_Socket_Available($15,$3)|0); HEAP32[$4>>2] = $16; $17 = HEAP32[487318]|0; $18 = ($16|0)==(0); $19 = HEAP32[$3>>2]|0; $20 = ($19|0)!=(0); $or$cond = $18 & $20; if ($or$cond) { $21 = HEAP32[487316]|0; $22 = (_Socket_Read($21,$17,16384,$3)|0); HEAP32[$4>>2] = $22; $23 = ($22|0)==(0); if (!($23)) { $24 = HEAP32[5239]|0; $25 = ($22|0)==($24|0); $26 = HEAP32[5240]|0; $27 = ($22|0)==($26|0); $or$cond31 = $25 | $27; if ($or$cond31) { STACKTOP = sp;return; } } $28 = HEAP32[$3>>2]|0; $29 = (($17) + ($28)|0); $$0 = $29; } else { $$0 = $17; } $30 = HEAP32[$4>>2]|0; $31 = ($30|0)==(0); if (!($31)) { HEAP32[$1>>2] = $2; $32 = ((($1)) + 4|0); HEAP16[$32>>1] = 0; $33 = ((($1)) + 6|0); HEAP16[$33>>1] = 128; _String_Format3($1,43296,(1949248),(1949256),$4); _Logger_Log($1); _Game_Disconnect(21712,21720); STACKTOP = sp;return; } HEAP32[487318] = 1063536; $34 = ($$0>>>0)>(1063536>>>0); L25: do { if ($34) { $36 = 1063536; while(1) { $35 = HEAP8[$36>>0]|0; $37 = HEAP8[1972886]|0; $38 = ($37<<24>>24)!=(0); $39 = HEAP8[1972895]|0; $40 = ($39<<24>>24)==(32); $or$cond29 = $38 & $40; L29: do { if ($or$cond29) { switch ($35<<24>>24) { case -1: case 0: { break; } default: { label = 18; break L29; } } _Platform_LogConst(43326); $41 = HEAP32[487318]|0; $42 = ((($41)) + 1|0); HEAP32[487318] = $42; _LocalPlayer_ResetJumpVelocity(); } else { label = 18; } } while(0); if ((label|0) == 18) { label = 0; $43 = $35&255; $44 = (1838676 + ($43<<1)|0); $45 = HEAP16[$44>>1]|0; $46 = $45&65535; $47 = (($36) + ($46)|0); $48 = ($47>>>0)>($$0>>>0); if ($48) { break L25; } $49 = (1839188 + ($43<<2)|0); $50 = HEAP32[$49>>2]|0; $51 = ($50|0)==(0|0); if ($51) { break; } HEAP8[1972895] = $35; $52 = +HEAPF64[(1084992)>>3]; HEAPF64[137942] = $52; $53 = ((($36)) + 1|0); FUNCTION_TABLE_vi[$50 & 511]($53); $54 = HEAP16[$44>>1]|0; $55 = $54&65535; $56 = HEAP32[487318]|0; $57 = (($56) + ($55)|0); HEAP32[487318] = $57; } $58 = HEAP32[487318]|0; $59 = ($58>>>0)<($$0>>>0); if ($59) { $36 = $58; } else { break L25; } } _DisconnectInvalidOpcode($35); STACKTOP = sp;return; } } while(0); $60 = HEAP32[487318]|0; $61 = $$0; $62 = (($61) - ($60))|0; $63 = ($62|0)>(0); if ($63) { $64 = HEAP32[487318]|0; $$02733 = 0; while(1) { $65 = (($64) + ($$02733)|0); $66 = HEAP8[$65>>0]|0; $67 = (1063536 + ($$02733)|0); HEAP8[$67>>0] = $66; $68 = (($$02733) + 1)|0; $exitcond = ($68|0)==($62|0); if ($exitcond) { break; } else { $$02733 = $68; } } } $69 = (1063536 + ($62)|0); HEAP32[487318] = $69; $70 = HEAP32[487315]|0; $71 = ($70|0)==(0); if (!($71)) { _Platform_Log1(43375,1949260); _MPConnection_Disconnect(); } $72 = HEAP32[487319]|0; $73 = (($72) + 1)|0; HEAP32[487319] = $73; $74 = (($72|0) % 3)&-1; $75 = ($74|0)==(0); if (!($75)) { STACKTOP = sp;return; } _TexturePack_CheckPending(); _Protocol_Tick(); STACKTOP = sp;return; } function _MPConnection_SendBlock($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $10 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = ($4<<16>>16)==(0); if ($5) { $6 = HEAP32[(1811004)>>2]|0; $7 = HEAP32[(1811000)>>2]|0; $8 = (($7) + ($6))|0; $9 = (1809300 + ($8<<1)|0); $10 = HEAP16[$9>>1]|0; _Classic_SendSetBlock($0,$1,$2,0,$10); return; } else { _Classic_SendSetBlock($0,$1,$2,1,$4); return; } } function _MPConnection_SendChat($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 8|0; $2 = sp; $3 = ((($0)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = ($4<<16>>16)!=(0); $6 = HEAP8[1972894]|0; $7 = ($6<<24>>24)==(0); $or$cond = $5 & $7; if (!($or$cond)) { STACKTOP = sp;return; } $8 = $0; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = (($8) + 4)|0; $12 = $11; $13 = HEAP32[$12>>2]|0; $14 = $1; $15 = $14; HEAP32[$15>>2] = $10; $16 = (($14) + 4)|0; $17 = $16; HEAP32[$17>>2] = $13; $18 = ((($1)) + 4|0); $19 = HEAP16[$18>>1]|0; $20 = ($19&65535)>(64); if ($20) { while(1) { _Classic_SendChat($1,1); _String_UNSAFE_SubstringAt($2,$1,64); $21 = $2; $22 = $21; $23 = HEAP32[$22>>2]|0; $24 = (($21) + 4)|0; $25 = $24; $26 = HEAP32[$25>>2]|0; $27 = $1; $28 = $27; HEAP32[$28>>2] = $23; $29 = (($27) + 4)|0; $30 = $29; HEAP32[$30>>2] = $26; $31 = HEAP16[$18>>1]|0; $32 = ($31&65535)>(64); if (!($32)) { break; } } } _Classic_SendChat($1,0); STACKTOP = sp;return; } function _MPConnection_SendData($0,$1) { $0 = $0|0; $1 = $1|0; var $$0$ph25 = 0, $$015$ph24 = 0, $$016$ph23 = 0, $$022$lcssa = 0, $$02241 = 0, $$lcssa = 0, $$lcssa37 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond18 = 0, $or$cond36 = 0, $or$cond40 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = HEAP8[(1949241)>>0]|0; $4 = ($3<<24>>24)!=(0); $5 = ($1|0)==(0); $or$cond36 = $4 | $5; if ($or$cond36) { STACKTOP = sp;return; } $6 = HEAP32[5239]|0; $7 = HEAP32[5240]|0; $$0$ph25 = 0;$$015$ph24 = $0;$$016$ph23 = $1; while(1) { $8 = HEAP32[487316]|0; $9 = (_Socket_Write($8,$$015$ph24,$$016$ph23,$2)|0); $10 = ($9|0)!=(0); $11 = ($$0$ph25|0)<(1000); $or$cond40 = $11 & $10; L6: do { if ($or$cond40) { $$02241 = $$0$ph25;$12 = $9;$25 = $10; while(1) { $13 = ($12|0)==($6|0); $14 = ($12|0)==($7|0); $or$cond18 = $13 | $14; if (!($or$cond18)) { $$022$lcssa = $$02241;$$lcssa = $25;$$lcssa37 = $12; break L6; } $15 = (($$02241) + 1)|0; $16 = HEAP32[487316]|0; $17 = (_Socket_Write($16,$$015$ph24,$$016$ph23,$2)|0); $18 = ($17|0)!=(0); $19 = ($$02241|0)<(999); $or$cond = $19 & $18; if ($or$cond) { $$02241 = $15;$12 = $17;$25 = $18; } else { $$022$lcssa = $15;$$lcssa = $18;$$lcssa37 = $17; break; } } } else { $$022$lcssa = $$0$ph25;$$lcssa = $10;$$lcssa37 = $9; } } while(0); if ($$lcssa) { label = 8; break; } $20 = HEAP32[$2>>2]|0; $21 = ($20|0)==(0); if ($21) { label = 10; break; } $22 = (($$015$ph24) + ($20)|0); $23 = (($$016$ph23) - ($20))|0; $24 = ($23|0)==(0); if ($24) { label = 12; break; } else { $$0$ph25 = $$022$lcssa;$$015$ph24 = $22;$$016$ph23 = $23; } } if ((label|0) == 8) { HEAP32[487315] = $$lcssa37; STACKTOP = sp;return; } else if ((label|0) == 10) { HEAP32[487315] = -857812989; STACKTOP = sp;return; } else if ((label|0) == 12) { STACKTOP = sp;return; } } function _MPConnection_TickConnect() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; $1 = sp + 4|0; HEAP32[$0>>2] = 0; $2 = HEAP32[487316]|0; (_Socket_GetError($2,$0)|0); $3 = HEAP32[$0>>2]|0; $4 = ($3|0)==(0); if (!($4)) { _MPConnection_FailConnect($3); STACKTOP = sp;return; } $5 = HEAP32[487316]|0; (_Socket_Poll($5,1,$1)|0); $6 = +HEAPF64[(1084992)>>3]; $7 = HEAP8[$1>>0]|0; $8 = ($7<<24>>24)==(0); if (!($8)) { _MPConnection_FinishConnect(); STACKTOP = sp;return; } $9 = +HEAPF64[137943]; $10 = $6 > $9; if ($10) { _MPConnection_FailConnect(0); STACKTOP = sp;return; } else { $11 = $9 - $6; $12 = $11; $13 = $12 / 15.0; _Event_RaiseFloat((1795868),$13); STACKTOP = sp;return; } } function _MPConnection_CheckDisconnection() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; $1 = sp + 4|0; HEAP32[$0>>2] = 0; $2 = HEAP32[487316]|0; $3 = (_Socket_Available($2,$0)|0); $4 = HEAP32[487316]|0; $5 = (_Socket_Poll($4,0,$1)|0); $6 = HEAP32[487315]|0; $7 = $5 | $3; $8 = $7 | $6; $9 = ($8|0)==(0); if ($9) { $10 = HEAP32[$0>>2]|0; $11 = ($10|0)!=(0); $12 = HEAP8[$1>>0]|0; $13 = ($12<<24>>24)==(0); $or$cond = $11 | $13; if ($or$cond) { STACKTOP = sp;return; } } _MPConnection_Disconnect(); STACKTOP = sp;return; } function _DisconnectInvalidOpcode($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $1 = sp + 72|0; $2 = sp + 64|0; $3 = sp; HEAP8[$1>>0] = $0; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 64; _String_Format2($2,43446,$1,1972895); _Game_Disconnect(21744,$2); STACKTOP = sp;return; } function _MPConnection_Disconnect() { var label = 0, sp = 0; sp = STACKTOP; _Game_Disconnect(21728,21736); return; } function _MPConnection_FailConnect($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 144|0; $1 = sp + 128|0; $2 = sp + 136|0; $3 = sp; HEAP32[$1>>2] = $0; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 128; $6 = ($0|0)==(0); if ($6) { _MPConnection_Fail(21752); STACKTOP = sp;return; } _String_Format3($2,43563,(1949248),(1949256),$1); _Logger_Log($2); _MPConnection_Fail(21752); STACKTOP = sp;return; } function _MPConnection_FinishConnect() { var $0 = 0.0, label = 0, sp = 0; sp = STACKTOP; HEAP8[1972894] = 0; _Event_RaiseVoid(1802108); _Event_RaiseFloat((1795868),0.0); HEAP32[487318] = 1063536; _Classic_SendLogin(); $0 = +HEAPF64[(1084992)>>3]; HEAPF64[137942] = $0; return; } function _MPConnection_Fail($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 144|0; $1 = sp + 128|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 128; HEAP8[1972894] = 0; _String_Format2($1,43594,(1949248),(1949256)); _Game_Disconnect($1,$0); _OnClose(); STACKTOP = sp;return; } function _SPConnection_BeginConnect() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp + 8|0; $1 = sp; _Chat_SetLogName(21768); $2 = HEAP8[1972842]|0; HEAP8[1972837] = $2; $3 = 14340; $4 = $3; $5 = HEAP32[$4>>2]|0; $6 = (($3) + 4)|0; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = $0; $10 = $9; HEAP32[$10>>2] = $5; $11 = (($9) + 4)|0; $12 = $11; HEAP32[$12>>2] = $8; $13 = (_String_IndexOfAt($0,0,47)|0); $14 = ($13|0)>(-1); if ($14) { label = 3; } else { $15 = (_String_IndexOfAt($0,0,92)|0); $16 = ($15|0)>(-1); if ($16) { label = 3; } } if ((label|0) == 3) { $17 = (_File_Exists($0)|0); $18 = ($17|0)==(0); if (!($18)) { (_Map_LoadFrom($0)|0); STACKTOP = sp;return; } } _Random_SeedFromCurrentTime($1); _World_NewMap(); _World_SetDimensions(128,64,128); HEAP8[1972848] = 1; $19 = (_Random_Next($1,2147483647)|0); HEAP32[450771] = $19; _GeneratingScreen_Show(); STACKTOP = sp;return; } function _SPConnection_Tick($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1949241)>>0]|0; $2 = ($1<<24>>24)==(0); if (!($2)) { return; } $3 = HEAP32[487319]|0; $4 = (($3) + 1)|0; HEAP32[487319] = $4; $5 = (($3|0) % 3)&-1; $6 = ($5|0)==(0); if (!($6)) { return; } _Physics_Tick(); _TexturePack_CheckPending(); return; } function _SPConnection_SendBlock($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var label = 0, sp = 0; sp = STACKTOP; _Physics_OnBlockChanged($0,$1,$2,$3,$4); return; } function _SPConnection_SendChat($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 24|0; $2 = sp + 16|0; $3 = sp + 8|0; $4 = sp; $5 = ((($0)) + 4|0); $6 = HEAP16[$5>>1]|0; $7 = ($6<<16>>16)==(0); if ($7) { STACKTOP = sp;return; } HEAP8[1972896] = 0; $8 = $0; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = (($8) + 4)|0; $12 = $11; $13 = HEAP32[$12>>2]|0; $14 = $1; $15 = $14; HEAP32[$15>>2] = $10; $16 = (($14) + 4)|0; $17 = $16; HEAP32[$17>>2] = $13; $18 = ((($1)) + 4|0); $19 = HEAP16[$18>>1]|0; $20 = ($19&65535)>(64); if ($20) { while(1) { _String_UNSAFE_Substring($3,$1,0,64); $21 = $3; $22 = $21; $23 = HEAP32[$22>>2]|0; $24 = (($21) + 4)|0; $25 = $24; $26 = HEAP32[$25>>2]|0; $27 = $2; $28 = $27; HEAP32[$28>>2] = $23; $29 = (($27) + 4)|0; $30 = $29; HEAP32[$30>>2] = $26; _SPConnection_AddPart($2); _String_UNSAFE_SubstringAt($4,$1,64); $31 = $4; $32 = $31; $33 = HEAP32[$32>>2]|0; $34 = (($31) + 4)|0; $35 = $34; $36 = HEAP32[$35>>2]|0; $37 = $1; $38 = $37; HEAP32[$38>>2] = $33; $39 = (($37) + 4)|0; $40 = $39; HEAP32[$40>>2] = $36; $41 = HEAP16[$18>>1]|0; $42 = ($41&65535)>(64); if (!($42)) { break; } } } _SPConnection_AddPart($1); STACKTOP = sp;return; } function _SPConnection_SendData($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _SPConnection_AddPart($0) { $0 = $0|0; var $$07 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 144|0; $1 = sp + 128|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 128; $5 = HEAP8[1972896]|0; $6 = (_Drawer2D_IsWhiteColor($5)|0); $7 = ($6<<24>>24)==(0); if ($7) { _String_Append($1,38); $8 = HEAP8[1972896]|0; _String_Append($1,$8); } _String_AppendString($1,$0); $9 = HEAP16[$3>>1]|0; $10 = ($9<<16>>16)==(0); if (!($10)) { $$07 = 0; while(1) { $11 = HEAP32[$1>>2]|0; $12 = (($11) + ($$07)|0); $13 = HEAP8[$12>>0]|0; $14 = ($13<<24>>24)==(37); if ($14) { HEAP8[$12>>0] = 38; } $15 = (($$07) + 1)|0; $16 = HEAP16[$3>>1]|0; $17 = $16&65535; $18 = ($15>>>0)<($17>>>0); if ($18) { $$07 = $15; } else { break; } } } _String_UNSAFE_TrimEnd($1); $19 = HEAP16[$3>>1]|0; $20 = $19&65535; $21 = (_Drawer2D_LastColor($1,$20)|0); $22 = ($21<<24>>24)==(0); if ($22) { _Chat_Add($1); STACKTOP = sp;return; } HEAP8[1972896] = $21; _Chat_Add($1); STACKTOP = sp;return; } function _Server_RetrieveTexturePack($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972843]|0; $2 = ($1<<24>>24)==(0); if ($2) { return; } $3 = (_TextureCache_HasDenied($0)|0); $4 = ($3<<24>>24)==(0); if (!($4)) { return; } $5 = ((($0)) + 4|0); $6 = HEAP16[$5>>1]|0; $7 = ($6<<16>>16)==(0); if (!($7)) { $8 = (_TextureCache_HasAccepted($0)|0); $9 = ($8<<24>>24)==(0); if ($9) { _TexPackOverlay_Show($0); return; } } _TexturePack_Extract($0); return; } function _Ping_NextPingId() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[487317]|0; $1 = (((1063104 + (($0*24)|0)|0)) + 16|0); $2 = HEAP16[$1>>1]|0; $3 = $2&65535; $4 = (($3) + 1)|0; $5 = (($0) + 1)|0; $6 = (($5>>>0) % 10)&-1; $7 = $4&65535; $8 = (((1063104 + (($6*24)|0)|0)) + 16|0); HEAP16[$8>>1] = $7; $9 = (_DateTime_CurrentUTC_MS()|0); $10 = (getTempRet0() | 0); $11 = (1063104 + (($6*24)|0)|0); $12 = $11; $13 = $12; HEAP32[$13>>2] = $9; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $10; $16 = (((1063104 + (($6*24)|0)|0)) + 8|0); $17 = $16; $18 = $17; HEAP32[$18>>2] = 0; $19 = (($17) + 4)|0; $20 = $19; HEAP32[$20>>2] = 0; HEAP32[487317] = $6; return ($4|0); } function _Ping_Update($0) { $0 = $0|0; var $$07$lcssa = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP16[(1063120)>>1]|0; $2 = $1&65535; $3 = ($2|0)==($0|0); if ($3) { $$07$lcssa = 0; } else { $11 = HEAP16[(1063144)>>1]|0; $12 = $11&65535; $13 = ($12|0)==($0|0); if ($13) { $$07$lcssa = 1; } else { $14 = HEAP16[(1063168)>>1]|0; $15 = $14&65535; $16 = ($15|0)==($0|0); if ($16) { $$07$lcssa = 2; } else { $17 = HEAP16[(1063192)>>1]|0; $18 = $17&65535; $19 = ($18|0)==($0|0); if ($19) { $$07$lcssa = 3; } else { $20 = HEAP16[(1063216)>>1]|0; $21 = $20&65535; $22 = ($21|0)==($0|0); if ($22) { $$07$lcssa = 4; } else { $23 = HEAP16[(1063240)>>1]|0; $24 = $23&65535; $25 = ($24|0)==($0|0); if ($25) { $$07$lcssa = 5; } else { $26 = HEAP16[(1063264)>>1]|0; $27 = $26&65535; $28 = ($27|0)==($0|0); if ($28) { $$07$lcssa = 6; } else { $29 = HEAP16[(1063288)>>1]|0; $30 = $29&65535; $31 = ($30|0)==($0|0); if ($31) { $$07$lcssa = 7; } else { $32 = HEAP16[(1063312)>>1]|0; $33 = $32&65535; $34 = ($33|0)==($0|0); if ($34) { $$07$lcssa = 8; } else { $35 = HEAP16[(1063336)>>1]|0; $36 = $35&65535; $37 = ($36|0)==($0|0); if ($37) { $$07$lcssa = 9; } else { return; } } } } } } } } } } $4 = (_DateTime_CurrentUTC_MS()|0); $5 = (getTempRet0() | 0); $6 = (((1063104 + (($$07$lcssa*24)|0)|0)) + 8|0); $7 = $6; $8 = $7; HEAP32[$8>>2] = $4; $9 = (($7) + 4)|0; $10 = $9; HEAP32[$10>>2] = $5; return; } function _Ping_AveragePingMS() { var $$025 = 0, $$1$1 = 0, $$1$2 = 0, $$1$3 = 0, $$1$4 = 0, $$1$5 = 0, $$1$6 = 0, $$1$7 = 0, $$1$8 = 0, $$1$9 = 0, $$129$1 = 0, $$129$2 = 0, $$129$3 = 0, $$129$4 = 0, $$129$5 = 0, $$129$6 = 0, $$129$7 = 0, $$129$8 = 0, $$129$9 = 0, $0 = 0; var $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0; var $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0; var $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0; var $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0; var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0; var $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0; var $98 = 0, $99 = 0, $not$or$cond = 0, $not$or$cond$1 = 0, $not$or$cond$2 = 0, $not$or$cond$3 = 0, $not$or$cond$4 = 0, $not$or$cond$5 = 0, $not$or$cond$6 = 0, $not$or$cond$7 = 0, $not$or$cond$8 = 0, $not$or$cond$9 = 0, $not$or$cond$9$demorgan33 = 0, $not$or$cond$demorgan = 0, $not$or$cond$demorgan$1 = 0, $not$or$cond$demorgan$2 = 0, $not$or$cond$demorgan$3 = 0, $not$or$cond$demorgan$4 = 0, $not$or$cond$demorgan$5 = 0, $not$or$cond$demorgan$6 = 0; var $not$or$cond$demorgan$7 = 0, $not$or$cond$demorgan$8 = 0, $or$cond = 0, $or$cond$1 = 0, $or$cond$2 = 0, $or$cond$3 = 0, $or$cond$4 = 0, $or$cond$5 = 0, $or$cond$6 = 0, $or$cond$7 = 0, $or$cond$8 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = 1063104; $1 = $0; $2 = HEAP32[$1>>2]|0; $3 = (($0) + 4)|0; $4 = $3; $5 = HEAP32[$4>>2]|0; $6 = (1063112); $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = ($2|0)==(0); $13 = ($5|0)==(0); $14 = $12 & $13; $15 = ($8|0)==(0); $16 = ($11|0)==(0); $17 = $15 & $16; $not$or$cond$demorgan = $14 | $17; $not$or$cond = $not$or$cond$demorgan ^ 1; $18 = $not$or$cond&1; $19 = (1063128); $20 = $19; $21 = HEAP32[$20>>2]|0; $22 = (($19) + 4)|0; $23 = $22; $24 = HEAP32[$23>>2]|0; $25 = (1063136); $26 = $25; $27 = HEAP32[$26>>2]|0; $28 = (($25) + 4)|0; $29 = $28; $30 = HEAP32[$29>>2]|0; $31 = ($21|0)==(0); $32 = ($24|0)==(0); $33 = $31 & $32; $34 = ($27|0)==(0); $35 = ($30|0)==(0); $36 = $34 & $35; $not$or$cond$demorgan$1 = $33 | $36; $not$or$cond$1 = $not$or$cond$demorgan$1 ^ 1; $37 = $not$or$cond$1&1; $$129$1 = (($18) + ($37))|0; $38 = (1063152); $39 = $38; $40 = HEAP32[$39>>2]|0; $41 = (($38) + 4)|0; $42 = $41; $43 = HEAP32[$42>>2]|0; $44 = (1063160); $45 = $44; $46 = HEAP32[$45>>2]|0; $47 = (($44) + 4)|0; $48 = $47; $49 = HEAP32[$48>>2]|0; $50 = ($40|0)==(0); $51 = ($43|0)==(0); $52 = $50 & $51; $53 = ($46|0)==(0); $54 = ($49|0)==(0); $55 = $53 & $54; $not$or$cond$demorgan$2 = $52 | $55; $not$or$cond$2 = $not$or$cond$demorgan$2 ^ 1; $56 = $not$or$cond$2&1; $$129$2 = (($$129$1) + ($56))|0; $57 = (1063176); $58 = $57; $59 = HEAP32[$58>>2]|0; $60 = (($57) + 4)|0; $61 = $60; $62 = HEAP32[$61>>2]|0; $63 = (1063184); $64 = $63; $65 = HEAP32[$64>>2]|0; $66 = (($63) + 4)|0; $67 = $66; $68 = HEAP32[$67>>2]|0; $69 = ($59|0)==(0); $70 = ($62|0)==(0); $71 = $69 & $70; $72 = ($65|0)==(0); $73 = ($68|0)==(0); $74 = $72 & $73; $not$or$cond$demorgan$3 = $71 | $74; $not$or$cond$3 = $not$or$cond$demorgan$3 ^ 1; $75 = $not$or$cond$3&1; $$129$3 = (($$129$2) + ($75))|0; $76 = (1063200); $77 = $76; $78 = HEAP32[$77>>2]|0; $79 = (($76) + 4)|0; $80 = $79; $81 = HEAP32[$80>>2]|0; $82 = (1063208); $83 = $82; $84 = HEAP32[$83>>2]|0; $85 = (($82) + 4)|0; $86 = $85; $87 = HEAP32[$86>>2]|0; $88 = ($78|0)==(0); $89 = ($81|0)==(0); $90 = $88 & $89; $91 = ($84|0)==(0); $92 = ($87|0)==(0); $93 = $91 & $92; $not$or$cond$demorgan$4 = $90 | $93; $not$or$cond$4 = $not$or$cond$demorgan$4 ^ 1; $94 = $not$or$cond$4&1; $$129$4 = (($$129$3) + ($94))|0; $95 = (1063224); $96 = $95; $97 = HEAP32[$96>>2]|0; $98 = (($95) + 4)|0; $99 = $98; $100 = HEAP32[$99>>2]|0; $101 = (1063232); $102 = $101; $103 = HEAP32[$102>>2]|0; $104 = (($101) + 4)|0; $105 = $104; $106 = HEAP32[$105>>2]|0; $107 = ($97|0)==(0); $108 = ($100|0)==(0); $109 = $107 & $108; $110 = ($103|0)==(0); $111 = ($106|0)==(0); $112 = $110 & $111; $not$or$cond$demorgan$5 = $109 | $112; $not$or$cond$5 = $not$or$cond$demorgan$5 ^ 1; $113 = $not$or$cond$5&1; $$129$5 = (($$129$4) + ($113))|0; $114 = (1063248); $115 = $114; $116 = HEAP32[$115>>2]|0; $117 = (($114) + 4)|0; $118 = $117; $119 = HEAP32[$118>>2]|0; $120 = (1063256); $121 = $120; $122 = HEAP32[$121>>2]|0; $123 = (($120) + 4)|0; $124 = $123; $125 = HEAP32[$124>>2]|0; $126 = ($116|0)==(0); $127 = ($119|0)==(0); $128 = $126 & $127; $129 = ($122|0)==(0); $130 = ($125|0)==(0); $131 = $129 & $130; $not$or$cond$demorgan$6 = $128 | $131; $not$or$cond$6 = $not$or$cond$demorgan$6 ^ 1; $132 = $not$or$cond$6&1; $$129$6 = (($$129$5) + ($132))|0; $133 = (1063272); $134 = $133; $135 = HEAP32[$134>>2]|0; $136 = (($133) + 4)|0; $137 = $136; $138 = HEAP32[$137>>2]|0; $139 = (1063280); $140 = $139; $141 = HEAP32[$140>>2]|0; $142 = (($139) + 4)|0; $143 = $142; $144 = HEAP32[$143>>2]|0; $145 = ($135|0)==(0); $146 = ($138|0)==(0); $147 = $145 & $146; $148 = ($141|0)==(0); $149 = ($144|0)==(0); $150 = $148 & $149; $not$or$cond$demorgan$7 = $147 | $150; $not$or$cond$7 = $not$or$cond$demorgan$7 ^ 1; $151 = $not$or$cond$7&1; $$129$7 = (($$129$6) + ($151))|0; $152 = (1063296); $153 = $152; $154 = HEAP32[$153>>2]|0; $155 = (($152) + 4)|0; $156 = $155; $157 = HEAP32[$156>>2]|0; $158 = (1063304); $159 = $158; $160 = HEAP32[$159>>2]|0; $161 = (($158) + 4)|0; $162 = $161; $163 = HEAP32[$162>>2]|0; $164 = ($154|0)==(0); $165 = ($157|0)==(0); $166 = $164 & $165; $167 = ($160|0)==(0); $168 = ($163|0)==(0); $169 = $167 & $168; $not$or$cond$demorgan$8 = $166 | $169; $not$or$cond$8 = $not$or$cond$demorgan$8 ^ 1; $170 = $not$or$cond$8&1; $$129$8 = (($$129$7) + ($170))|0; $171 = (1063320); $172 = $171; $173 = HEAP32[$172>>2]|0; $174 = (($171) + 4)|0; $175 = $174; $176 = HEAP32[$175>>2]|0; $177 = (1063328); $178 = $177; $179 = HEAP32[$178>>2]|0; $180 = (($177) + 4)|0; $181 = $180; $182 = HEAP32[$181>>2]|0; $183 = ($173|0)==(0); $184 = ($176|0)==(0); $185 = $183 & $184; $186 = ($179|0)==(0); $187 = ($182|0)==(0); $188 = $186 & $187; $not$or$cond$9$demorgan33 = $185 | $188; $not$or$cond$9 = $not$or$cond$9$demorgan33 ^ 1; $189 = $not$or$cond$9&1; $$129$9 = (($$129$8) + ($189))|0; $190 = ($$129$9|0)==(0); if ($190) { $$025 = 0; return ($$025|0); } $191 = (_i64Subtract(($179|0),($182|0),($173|0),($176|0))|0); $192 = (getTempRet0() | 0); $193 = $not$or$cond$9$demorgan33 ? 0 : $191; $or$cond$8 = $166 | $169; $194 = (_i64Subtract(($160|0),($163|0),($154|0),($157|0))|0); $195 = (getTempRet0() | 0); $196 = $or$cond$8 ? 0 : $194; $or$cond$7 = $147 | $150; $197 = (_i64Subtract(($141|0),($144|0),($135|0),($138|0))|0); $198 = (getTempRet0() | 0); $199 = $or$cond$7 ? 0 : $197; $or$cond$6 = $128 | $131; $200 = (_i64Subtract(($122|0),($125|0),($116|0),($119|0))|0); $201 = (getTempRet0() | 0); $202 = $or$cond$6 ? 0 : $200; $or$cond$5 = $109 | $112; $203 = (_i64Subtract(($103|0),($106|0),($97|0),($100|0))|0); $204 = (getTempRet0() | 0); $205 = $or$cond$5 ? 0 : $203; $or$cond$4 = $90 | $93; $206 = (_i64Subtract(($84|0),($87|0),($78|0),($81|0))|0); $207 = (getTempRet0() | 0); $208 = $or$cond$4 ? 0 : $206; $or$cond$3 = $71 | $74; $209 = (_i64Subtract(($65|0),($68|0),($59|0),($62|0))|0); $210 = (getTempRet0() | 0); $211 = $or$cond$3 ? 0 : $209; $or$cond$2 = $52 | $55; $212 = (_i64Subtract(($46|0),($49|0),($40|0),($43|0))|0); $213 = (getTempRet0() | 0); $214 = $or$cond$2 ? 0 : $212; $or$cond$1 = $33 | $36; $215 = (_i64Subtract(($27|0),($30|0),($21|0),($24|0))|0); $216 = (getTempRet0() | 0); $217 = $or$cond$1 ? 0 : $215; $or$cond = $14 | $17; $218 = (_i64Subtract(($8|0),($11|0),($2|0),($5|0))|0); $219 = (getTempRet0() | 0); $220 = $or$cond ? 0 : $218; $$1$1 = (($217) + ($220))|0; $$1$2 = (($214) + ($$1$1))|0; $$1$3 = (($211) + ($$1$2))|0; $$1$4 = (($208) + ($$1$3))|0; $$1$5 = (($205) + ($$1$4))|0; $$1$6 = (($202) + ($$1$5))|0; $$1$7 = (($199) + ($$1$6))|0; $$1$8 = (($196) + ($$1$7))|0; $$1$9 = (($193) + ($$1$8))|0; $221 = (($$1$9|0) / 2)&-1; $222 = (($221|0) / ($$129$9|0))&-1; $$025 = $222; return ($$025|0); } function _Stream_Read($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $$01011 = 0, $$0912 = 0, $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; $4 = ($2|0)==(0); L1: do { if ($4) { $$0 = 0; } else { $$01011 = $1;$$0912 = $2; while(1) { $5 = HEAP32[$0>>2]|0; $6 = (FUNCTION_TABLE_iiiii[$5 & 63]($0,$$01011,$$0912,$3)|0); $7 = ($6|0)==(0); if (!($7)) { $$0 = $6; break L1; } $8 = HEAP32[$3>>2]|0; $9 = ($8|0)==(0); if ($9) { $$0 = -857812991; break L1; } $10 = (($$01011) + ($8)|0); $11 = (($$0912) - ($8))|0; $12 = ($11|0)==(0); if ($12) { $$0 = 0; break; } else { $$01011 = $10;$$0912 = $11; } } } } while(0); STACKTOP = sp;return ($$0|0); } function _Stream_Write($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $$01011 = 0, $$0912 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; $4 = ((($0)) + 8|0); $5 = ($2|0)==(0); L1: do { if ($5) { $$0 = 0; } else { $$01011 = $1;$$0912 = $2; while(1) { $6 = HEAP32[$4>>2]|0; $7 = (FUNCTION_TABLE_iiiii[$6 & 63]($0,$$01011,$$0912,$3)|0); $8 = ($7|0)==(0); if (!($8)) { $$0 = $7; break L1; } $9 = HEAP32[$3>>2]|0; $10 = ($9|0)==(0); if ($10) { $$0 = -857812991; break L1; } $11 = (($$01011) + ($9)|0); $12 = (($$0912) - ($9))|0; $13 = ($12|0)==(0); if ($13) { $$0 = 0; break; } else { $$01011 = $11;$$0912 = $12; } } } } while(0); STACKTOP = sp;return ($$0|0); } function _Stream_Init($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[$0>>2] = 32; $1 = ((($0)) + 4|0); HEAP32[$1>>2] = 55; $2 = ((($0)) + 8|0); HEAP32[$2>>2] = 33; $3 = ((($0)) + 12|0); HEAP32[$3>>2] = 56; $4 = ((($0)) + 16|0); HEAP32[$4>>2] = 57; $5 = ((($0)) + 20|0); HEAP32[$5>>2] = 58; $6 = ((($0)) + 24|0); HEAP32[$6>>2] = 58; $7 = ((($0)) + 28|0); HEAP32[$7>>2] = 24; return; } function _Stream_DefaultRead($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; return -857812990; } function _Stream_DefaultReadU8($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = HEAP32[$0>>2]|0; $4 = (FUNCTION_TABLE_iiiii[$3 & 63]($0,$1,1,$2)|0); $5 = ($4|0)==(0); if (!($5)) { $9 = $4; STACKTOP = sp;return ($9|0); } $6 = HEAP32[$2>>2]|0; $7 = ($6|0)==(0); $8 = $7 ? -857812991 : 0; $9 = $8; STACKTOP = sp;return ($9|0); } function _Stream_DefaultWrite($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; return -857812990; } function _Stream_DefaultSkip($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$01112 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 3600|0; $2 = sp; $3 = sp + 3584|0; $4 = ($1|0)==(0); L1: do { if ($4) { $$0 = 0; } else { $$01112 = $1; while(1) { $7 = ($$01112>>>0)<(3584); $8 = $7 ? $$01112 : 3584; $9 = HEAP32[$0>>2]|0; $10 = (FUNCTION_TABLE_iiiii[$9 & 63]($0,$2,$8,$3)|0); $11 = ($10|0)==(0); if (!($11)) { $$0 = $10; break L1; } $12 = HEAP32[$3>>2]|0; $13 = ($12|0)==(0); $5 = (($$01112) - ($12))|0; if ($13) { $$0 = -857812991; break L1; } $6 = ($5|0)==(0); if ($6) { $$0 = 0; break; } else { $$01112 = $5; } } } } while(0); STACKTOP = sp;return ($$0|0); } function _Stream_DefaultSeek($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return -857812990; } function _Stream_DefaultGet($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return -857812990; } function _Stream_DefaultClose($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _Stream_OpenFile($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_File_Open($2,$1)|0); $4 = HEAP32[$2>>2]|0; _Stream_FromFile($0,$4); STACKTOP = sp;return ($3|0); } function _Stream_FromFile($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; _Stream_Init($0); $2 = ((($0)) + 32|0); HEAP32[$2>>2] = $1; HEAP32[$0>>2] = 34; $3 = ((($0)) + 8|0); HEAP32[$3>>2] = 35; $4 = ((($0)) + 28|0); HEAP32[$4>>2] = 25; $5 = ((($0)) + 12|0); HEAP32[$5>>2] = 59; $6 = ((($0)) + 16|0); HEAP32[$6>>2] = 60; $7 = ((($0)) + 20|0); HEAP32[$7>>2] = 61; $8 = ((($0)) + 24|0); HEAP32[$8>>2] = 62; return; } function _Stream_FileRead($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 32|0); $5 = HEAP32[$4>>2]|0; $6 = (_File_Read($5,$1,$2,$3)|0); return ($6|0); } function _Stream_FileWrite($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 32|0); $5 = HEAP32[$4>>2]|0; $6 = (_File_Write($5,$1,$2,$3)|0); return ($6|0); } function _Stream_FileClose($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 32|0); $2 = HEAP32[$1>>2]|0; $3 = (_File_Close($2)|0); HEAP32[$1>>2] = 0; return ($3|0); } function _Stream_FileSkip($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 32|0); $3 = HEAP32[$2>>2]|0; $4 = (_File_Seek($3,$1,1)|0); return ($4|0); } function _Stream_FileSeek($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 32|0); $3 = HEAP32[$2>>2]|0; $4 = (_File_Seek($3,$1,0)|0); return ($4|0); } function _Stream_FilePosition($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 32|0); $3 = HEAP32[$2>>2]|0; $4 = (_File_Position($3,$1)|0); return ($4|0); } function _Stream_FileLength($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 32|0); $3 = HEAP32[$2>>2]|0; $4 = (_File_Length($3,$1)|0); return ($4|0); } function _Stream_CreateFile($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_File_Create($2,$1)|0); $4 = HEAP32[$2>>2]|0; _Stream_FromFile($0,$4); STACKTOP = sp;return ($3|0); } function _Stream_AppendFile($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_File_OpenOrCreate($2,$1)|0); $4 = ($3|0)==(0); if ($4) { $5 = HEAP32[$2>>2]|0; $6 = (_File_Seek($5,0,2)|0); $7 = ($6|0)==(0); if ($7) { $8 = HEAP32[$2>>2]|0; _Stream_FromFile($0,$8); $$0 = 0; } else { $$0 = $6; } } else { $$0 = $3; } STACKTOP = sp;return ($$0|0); } function _Stream_WriteAllTo($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $3 = sp; $4 = (_Stream_CreateFile($3,$0)|0); $5 = ($4|0)==(0); if (!($5)) { $$0 = $4; STACKTOP = sp;return ($$0|0); } $6 = (_Stream_Write($3,$1,$2)|0); $7 = ((($3)) + 28|0); $8 = HEAP32[$7>>2]|0; $9 = (FUNCTION_TABLE_ii[$8 & 31]($3)|0); $10 = ($6|0)==(0); $11 = $10 ? $9 : $6; $$0 = $11; STACKTOP = sp;return ($$0|0); } function _Stream_ReadonlyPortion($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Stream_Init($0); HEAP32[$0>>2] = 36; $3 = ((($0)) + 4|0); HEAP32[$3>>2] = 63; $4 = ((($0)) + 12|0); HEAP32[$4>>2] = 64; $5 = ((($0)) + 20|0); HEAP32[$5>>2] = 65; $6 = ((($0)) + 24|0); HEAP32[$6>>2] = 66; $7 = ((($0)) + 32|0); HEAP32[$7>>2] = $1; $8 = ((($0)) + 36|0); HEAP32[$8>>2] = $2; $9 = ((($0)) + 40|0); HEAP32[$9>>2] = $2; return; } function _Stream_PortionRead($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$ = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 32|0); $5 = ((($0)) + 36|0); $6 = HEAP32[$5>>2]|0; $7 = ($6>>>0)>($2>>>0); $$ = $7 ? $2 : $6; $8 = HEAP32[$4>>2]|0; $9 = HEAP32[$8>>2]|0; $10 = (FUNCTION_TABLE_iiiii[$9 & 63]($8,$1,$$,$3)|0); $11 = HEAP32[$3>>2]|0; $12 = HEAP32[$5>>2]|0; $13 = (($12) - ($11))|0; HEAP32[$5>>2] = $13; return ($10|0); } function _Stream_PortionReadU8($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0); if ($4) { $$0 = -857812991; return ($$0|0); } $5 = ((($0)) + 32|0); $6 = HEAP32[$5>>2]|0; $7 = (($3) + -1)|0; HEAP32[$2>>2] = $7; $8 = ((($6)) + 4|0); $9 = HEAP32[$8>>2]|0; $10 = (FUNCTION_TABLE_iii[$9 & 127]($6,$1)|0); $$0 = $10; return ($$0|0); } function _Stream_PortionSkip($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); $3 = HEAP32[$2>>2]|0; $4 = ($3>>>0)<($1>>>0); if ($4) { $$0 = -857812989; return ($$0|0); } $5 = ((($0)) + 32|0); $6 = HEAP32[$5>>2]|0; $7 = ((($6)) + 12|0); $8 = HEAP32[$7>>2]|0; $9 = (FUNCTION_TABLE_iii[$8 & 127]($6,$1)|0); $10 = ($9|0)==(0); if (!($10)) { $$0 = $9; return ($$0|0); } $11 = HEAP32[$2>>2]|0; $12 = (($11) - ($1))|0; HEAP32[$2>>2] = $12; $$0 = 0; return ($$0|0); } function _Stream_PortionPosition($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 40|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 36|0); $5 = HEAP32[$4>>2]|0; $6 = (($3) - ($5))|0; HEAP32[$1>>2] = $6; return 0; } function _Stream_PortionLength($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 40|0); $3 = HEAP32[$2>>2]|0; HEAP32[$1>>2] = $3; return 0; } function _Stream_ReadonlyMemory($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Stream_Init($0); HEAP32[$0>>2] = 37; $3 = ((($0)) + 4|0); HEAP32[$3>>2] = 67; $4 = ((($0)) + 12|0); HEAP32[$4>>2] = 68; $5 = ((($0)) + 16|0); HEAP32[$5>>2] = 69; $6 = ((($0)) + 20|0); HEAP32[$6>>2] = 70; $7 = ((($0)) + 24|0); HEAP32[$7>>2] = 71; $8 = ((($0)) + 32|0); HEAP32[$8>>2] = $1; $9 = ((($0)) + 36|0); HEAP32[$9>>2] = $2; $10 = ((($0)) + 40|0); HEAP32[$10>>2] = $2; $11 = ((($0)) + 44|0); HEAP32[$11>>2] = $1; return; } function _Stream_MemoryRead($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$ = 0, $10 = 0, $11 = 0, $12 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 36|0); $5 = HEAP32[$4>>2]|0; $6 = ($5>>>0)>($2>>>0); $$ = $6 ? $2 : $5; $7 = ((($0)) + 32|0); $8 = HEAP32[$7>>2]|0; _Mem_Copy($1,$8,$$); $9 = HEAP32[$7>>2]|0; $10 = (($9) + ($$)|0); HEAP32[$7>>2] = $10; $11 = HEAP32[$4>>2]|0; $12 = (($11) - ($$))|0; HEAP32[$4>>2] = $12; HEAP32[$3>>2] = $$; return 0; } function _Stream_MemoryReadU8($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0); if ($4) { $$0 = -857812991; return ($$0|0); } $5 = ((($0)) + 32|0); $6 = HEAP32[$5>>2]|0; $7 = HEAP8[$6>>0]|0; HEAP8[$1>>0] = $7; $8 = HEAP32[$5>>2]|0; $9 = ((($8)) + 1|0); HEAP32[$5>>2] = $9; $10 = HEAP32[$2>>2]|0; $11 = (($10) + -1)|0; HEAP32[$2>>2] = $11; $$0 = 0; return ($$0|0); } function _Stream_MemorySkip($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); $3 = HEAP32[$2>>2]|0; $4 = ($3>>>0)<($1>>>0); $5 = ((($0)) + 32|0); if ($4) { $$0 = -857812989; return ($$0|0); } $6 = (($3) - ($1))|0; $7 = HEAP32[$5>>2]|0; $8 = (($7) + ($1)|0); HEAP32[$5>>2] = $8; HEAP32[$2>>2] = $6; $$0 = 0; return ($$0|0); } function _Stream_MemorySeek($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 40|0); $3 = HEAP32[$2>>2]|0; $4 = ($3>>>0)>($1>>>0); if (!($4)) { $$0 = -857812989; return ($$0|0); } $5 = ((($0)) + 36|0); $6 = (($3) - ($1))|0; $7 = ((($0)) + 32|0); $8 = ((($0)) + 44|0); $9 = HEAP32[$8>>2]|0; $10 = (($9) + ($1)|0); HEAP32[$7>>2] = $10; HEAP32[$5>>2] = $6; $$0 = 0; return ($$0|0); } function _Stream_MemoryPosition($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 40|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 36|0); $5 = HEAP32[$4>>2]|0; $6 = (($3) - ($5))|0; HEAP32[$1>>2] = $6; return 0; } function _Stream_MemoryLength($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 40|0); $3 = HEAP32[$2>>2]|0; HEAP32[$1>>2] = $3; return 0; } function _Stream_ReadonlyBuffered($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Stream_Init($0); HEAP32[$0>>2] = 38; $4 = ((($0)) + 4|0); HEAP32[$4>>2] = 72; $5 = ((($0)) + 16|0); HEAP32[$5>>2] = 73; $6 = ((($0)) + 36|0); HEAP32[$6>>2] = 0; $7 = ((($0)) + 52|0); HEAP32[$7>>2] = 0; $8 = ((($0)) + 32|0); HEAP32[$8>>2] = $2; $9 = ((($0)) + 44|0); HEAP32[$9>>2] = $2; $10 = ((($0)) + 40|0); HEAP32[$10>>2] = $3; $11 = ((($0)) + 48|0); HEAP32[$11>>2] = $1; return; } function _Stream_BufferedRead($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$ = 0, $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp; $5 = ((($0)) + 32|0); $6 = ((($0)) + 36|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==(0); do { if ($8) { $9 = ((($0)) + 48|0); $10 = HEAP32[$9>>2]|0; $11 = ((($0)) + 44|0); $12 = HEAP32[$11>>2]|0; HEAP32[$5>>2] = $12; $13 = HEAP32[$10>>2]|0; $14 = ((($0)) + 40|0); $15 = HEAP32[$14>>2]|0; $16 = (FUNCTION_TABLE_iiiii[$13 & 63]($10,$12,$15,$4)|0); $17 = ($16|0)==(0); if ($17) { $18 = HEAP32[$4>>2]|0; HEAP32[$6>>2] = $18; $19 = ((($0)) + 52|0); $20 = HEAP32[$19>>2]|0; $21 = (($20) + ($18))|0; HEAP32[$19>>2] = $21; break; } else { $$0 = $16; STACKTOP = sp;return ($$0|0); } } } while(0); $22 = HEAP32[$6>>2]|0; $23 = ($22>>>0)>($2>>>0); $$ = $23 ? $2 : $22; $24 = HEAP32[$5>>2]|0; _Mem_Copy($1,$24,$$); $25 = HEAP32[$5>>2]|0; $26 = (($25) + ($$)|0); HEAP32[$5>>2] = $26; $27 = HEAP32[$6>>2]|0; $28 = (($27) - ($$))|0; HEAP32[$6>>2] = $28; HEAP32[$3>>2] = $$; $$0 = 0; STACKTOP = sp;return ($$0|0); } function _Stream_BufferedReadU8($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0); if ($4) { $5 = (_Stream_DefaultReadU8($0,$1)|0); $$0 = $5; return ($$0|0); } else { $6 = ((($0)) + 32|0); $7 = HEAP32[$6>>2]|0; $8 = HEAP8[$7>>0]|0; HEAP8[$1>>0] = $8; $9 = HEAP32[$6>>2]|0; $10 = ((($9)) + 1|0); HEAP32[$6>>2] = $10; $11 = HEAP32[$2>>2]|0; $12 = (($11) + -1)|0; HEAP32[$2>>2] = $12; $$0 = 0; return ($$0|0); } } function _Stream_BufferedSeek($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 32|0); $3 = ((($0)) + 36|0); $4 = HEAP32[$3>>2]|0; $5 = HEAP32[$2>>2]|0; $6 = ((($0)) + 44|0); $7 = HEAP32[$6>>2]|0; $8 = $7; $9 = (($5) - ($8))|0; $10 = (($9) + ($4))|0; $11 = ((($0)) + 52|0); $12 = HEAP32[$11>>2]|0; $13 = (($12) - ($10))|0; $14 = ($13>>>0)<=($1>>>0); $15 = ($12>>>0)>($1>>>0); $or$cond = $15 & $14; if ($or$cond) { $16 = (($1) - ($13))|0; $17 = (($7) + ($16)|0); HEAP32[$2>>2] = $17; $18 = (($10) - ($16))|0; HEAP32[$3>>2] = $18; $$0 = 0; return ($$0|0); } $19 = ((($0)) + 48|0); $20 = HEAP32[$19>>2]|0; $21 = ((($20)) + 16|0); $22 = HEAP32[$21>>2]|0; $23 = (FUNCTION_TABLE_iii[$22 & 127]($20,$1)|0); $24 = ($23|0)==(0); if (!($24)) { $$0 = $23; return ($$0|0); } $25 = HEAP32[$6>>2]|0; HEAP32[$2>>2] = $25; HEAP32[$3>>2] = 0; HEAP32[$11>>2] = $1; $$0 = 0; return ($$0|0); } function _Stream_GetU16_LE($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; $2 = $1&255; $3 = ((($0)) + 1|0); $4 = HEAP8[$3>>0]|0; $5 = $4&255; $6 = $5 << 8; $7 = $6 | $2; $8 = $7&65535; return ($8|0); } function _Stream_GetU16_BE($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; $2 = $1&255; $3 = $2 << 8; $4 = ((($0)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; $7 = $3 | $6; $8 = $7&65535; return ($8|0); } function _Stream_GetU32_LE($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; $2 = $1&255; $3 = ((($0)) + 1|0); $4 = HEAP8[$3>>0]|0; $5 = $4&255; $6 = $5 << 8; $7 = $6 | $2; $8 = ((($0)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = $10 << 16; $12 = $7 | $11; $13 = ((($0)) + 3|0); $14 = HEAP8[$13>>0]|0; $15 = $14&255; $16 = $15 << 24; $17 = $12 | $16; return ($17|0); } function _Stream_GetU32_BE($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[$0>>0]|0; $2 = $1&255; $3 = $2 << 24; $4 = ((($0)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; $7 = $6 << 16; $8 = $7 | $3; $9 = ((($0)) + 2|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = $11 << 8; $13 = $8 | $12; $14 = ((($0)) + 3|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $13 | $16; return ($17|0); } function _Stream_SetU16_BE($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (8)?(($1&65535) >>> 8):(($1&65535)); $3 = $2&255; HEAP8[$0>>0] = $3; $4 = $1&255; $5 = ((($0)) + 1|0); HEAP8[$5>>0] = $4; return; } function _Stream_SetU32_LE($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $1&255; HEAP8[$0>>0] = $2; $3 = (8)?($1 >>> 8):($1); $4 = $3&255; $5 = ((($0)) + 1|0); HEAP8[$5>>0] = $4; $6 = (16)?($1 >>> 16):($1); $7 = $6&255; $8 = ((($0)) + 2|0); HEAP8[$8>>0] = $7; $9 = (24)?($1 >>> 24):($1); $10 = $9&255; $11 = ((($0)) + 3|0); HEAP8[$11>>0] = $10; return; } function _Stream_SetU32_BE($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (24)?($1 >>> 24):($1); $3 = $2&255; HEAP8[$0>>0] = $3; $4 = (16)?($1 >>> 16):($1); $5 = $4&255; $6 = ((($0)) + 1|0); HEAP8[$6>>0] = $5; $7 = (8)?($1 >>> 8):($1); $8 = $7&255; $9 = ((($0)) + 2|0); HEAP8[$9>>0] = $8; $10 = $1&255; $11 = ((($0)) + 3|0); HEAP8[$11>>0] = $10; return; } function _Stream_ReadU32_LE($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_Stream_Read($0,$2,4)|0); $4 = ($3|0)==(0); if ($4) { $5 = (_Stream_GetU32_LE($2)|0); HEAP32[$1>>2] = $5; $$0 = 0; } else { $$0 = $3; } STACKTOP = sp;return ($$0|0); } function _Stream_ReadU32_BE($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_Stream_Read($0,$2,4)|0); $4 = ($3|0)==(0); if ($4) { $5 = (_Stream_GetU32_BE($2)|0); HEAP32[$1>>2] = $5; $$0 = 0; } else { $$0 = $3; } STACKTOP = sp;return ($$0|0); } function _Stream_ReadLine($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$014 = 0, $$015 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $switch$split22D = 0, $switch$split2D = 0, $switch$split52D = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = sp + 8|0; $4 = ((($1)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($0)) + 4|0); $$015 = 0; L1: while(1) { $$0 = 0; while(1) { $6 = HEAP32[$5>>2]|0; $7 = (($3) + ($$0)|0); $8 = (FUNCTION_TABLE_iii[$6 & 127]($0,$7)|0); $switch$split2D = ($8|0)<(0); if ($switch$split2D) { label = 10; break L1; } switch ($8|0) { case 0: { break; } default: { $$014 = $8; label = 9; break L1; } } $9 = (($$0) + 1)|0; $10 = (_Convert_Utf8ToCodepoint($2,$3,$9)|0); $11 = ($10|0)==(0); if ($11) { $$0 = $9; } else { break; } } $12 = HEAP32[$2>>2]|0; $switch$split22D = ($12|0)<(13); L8: do { if ($switch$split22D) { switch ($12|0) { case 10: { $$014 = 0; label = 9; break L1; } default: { label = 7; } } } else { $switch$split52D = ($12|0)<(65279); if ($switch$split52D) { switch ($12|0) { case 13: { break L8; } default: { label = 7; break L8; } } } else { switch ($12|0) { case 65279: { break L8; } default: { label = 7; break L8; } } } } } while(0); if ((label|0) == 7) { label = 0; $13 = (_Convert_CodepointToCP437($12)|0); _String_Append($1,$13); } $$015 = 1; } if ((label|0) == 9) { STACKTOP = sp;return ($$014|0); } else if ((label|0) == 10) { switch ($8|0) { case -857812991: { break; } default: { $$014 = $8; STACKTOP = sp;return ($$014|0); } } $14 = ($$015|0)==(0); $15 = $14 ? -857812991 : 0; $$014 = $15; STACKTOP = sp;return ($$014|0); } return (0)|0; } function _Stream_WriteLine($0,$1) { $0 = $0|0; $1 = $1|0; var $$0$lcssa = 0, $$02632 = 0, $$027 = 0, $$033 = 0, $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 2064|0; $2 = sp; $3 = ((($1)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = ($4<<16>>16)==(0); L1: do { if ($5) { $$0$lcssa = 0; } else { $$02632 = 0;$$033 = 0; while(1) { $6 = ($$033|0)>(2047); if ($6) { $7 = (_Stream_Write($0,$2,$$033)|0); $8 = ($7|0)==(0); if ($8) { $$1 = 0; } else { $$027 = $7; break; } } else { $$1 = $$033; } $9 = (($2) + ($$1)|0); $10 = HEAP32[$1>>2]|0; $11 = (($10) + ($$02632)|0); $12 = HEAP8[$11>>0]|0; $13 = (_Convert_CP437ToUtf8($12,$9)|0); $14 = (($13) + ($$1))|0; $15 = (($$02632) + 1)|0; $16 = HEAP16[$3>>1]|0; $17 = $16&65535; $18 = ($15>>>0)<($17>>>0); if ($18) { $$02632 = $15;$$033 = $14; } else { $$0$lcssa = $14; break L1; } } STACKTOP = sp;return ($$027|0); } } while(0); $19 = (($2) + ($$0$lcssa)|0); HEAP8[$19>>0] = 10; $20 = (($$0$lcssa) + 1)|0; $21 = (_Stream_Write($0,$2,$20)|0); $$027 = $21; STACKTOP = sp;return ($$027|0); } function _String_CalcLen($0,$1) { $0 = $0|0; $1 = $1|0; var $$0$lcssa = 0, $$067 = 0, $$08 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)>(0); L1: do { if ($2) { $$067 = $0;$$08 = 0; while(1) { $3 = HEAP8[$$067>>0]|0; $4 = ($3<<24>>24)==(0); if ($4) { $$0$lcssa = $$08; break L1; } $5 = ((($$067)) + 1|0); $6 = (($$08) + 1)|0; $7 = ($6|0)<($1|0); if ($7) { $$067 = $5;$$08 = $6; } else { $$0$lcssa = $6; break; } } } else { $$0$lcssa = 0; } } while(0); return ($$0$lcssa|0); } function _String_Length($0) { $0 = $0|0; var $$0$lcssa = 0, $$056 = 0, $$07 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $$056 = $0;$$07 = 0; while(1) { $1 = HEAP8[$$056>>0]|0; $2 = ($1<<24>>24)==(0); if ($2) { $$0$lcssa = $$07; label = 4; break; } $3 = ((($$056)) + 1|0); $4 = (($$07) + 1)|0; $5 = ($4>>>0)<(65535); if ($5) { $$056 = $3;$$07 = $4; } else { $$0$lcssa = 65535; label = 4; break; } } if ((label|0) == 4) { return ($$0$lcssa|0); } return (0)|0; } function _String_FromRaw($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_String_CalcLen($1,$2)|0); _String_Init_1893($0,$1,$3,$2); return; } function _String_Init_1893($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = $2&65535; $5 = $3&65535; HEAP32[$0>>2] = $1; $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); HEAP16[$$sroa$4$0$$sroa_idx2>>1] = $4; $$sroa$5$0$$sroa_idx4 = ((($0)) + 6|0); HEAP16[$$sroa$5$0$$sroa_idx4>>1] = $5; return; } function _String_FromReadonly($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_String_Length($1)|0); _String_Init_1893($0,$1,$2,$2); return; } function _String_Copy($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); HEAP16[$2>>1] = 0; _String_AppendString($0,$1); return; } function _String_AppendString($0,$1) { $0 = $0|0; $1 = $1|0; var $$06 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { return; } $$06 = 0; while(1) { $5 = HEAP32[$1>>2]|0; $6 = (($5) + ($$06)|0); $7 = HEAP8[$6>>0]|0; _String_Append($0,$7); $8 = (($$06) + 1)|0; $9 = HEAP16[$2>>1]|0; $10 = $9&65535; $11 = ($8>>>0)<($10>>>0); if ($11) { $$06 = $8; } else { break; } } return; } function _String_Append($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ((($0)) + 6|0); $5 = HEAP16[$4>>1]|0; $6 = ($3<<16>>16)==($5<<16>>16); if ($6) { return; } $7 = (($3) + 1)<<16>>16; $8 = $3&65535; $9 = HEAP32[$0>>2]|0; HEAP16[$2>>1] = $7; $10 = (($9) + ($8)|0); HEAP8[$10>>0] = $1; return; } function _String_CopyToRaw($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$ = 0, $$017 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($2)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = $4&65535; $6 = ($5|0)>($1|0); $$ = $6 ? $1 : $5; $7 = ($$|0)>(0); if ($7) { $$017 = 0; while(1) { $8 = HEAP32[$2>>2]|0; $9 = (($8) + ($$017)|0); $10 = HEAP8[$9>>0]|0; $11 = (($0) + ($$017)|0); HEAP8[$11>>0] = $10; $12 = (($$017) + 1)|0; $13 = ($12|0)<($$|0); if ($13) { $$017 = $12; } else { break; } } } $14 = ($5|0)<($1|0); if (!($14)) { return; } $15 = (($0) + ($$)|0); HEAP8[$15>>0] = 0; return; } function _String_UNSAFE_Substring($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($2|0)<(0); if ($4) { label = 3; } else { $5 = ((($1)) + 4|0); $6 = HEAP16[$5>>1]|0; $7 = $6&65535; $8 = ($7|0)<($2|0); if ($8) { label = 3; } } if ((label|0) == 3) { _Logger_Abort(43732); } $9 = ($3|0)<(0); if ($9) { label = 6; } else { $10 = ((($1)) + 4|0); $11 = HEAP16[$10>>1]|0; $12 = $11&65535; $13 = ($12|0)<($3|0); if ($13) { label = 6; } } if ((label|0) == 6) { _Logger_Abort(43766); } $14 = (($3) + ($2))|0; $15 = ((($1)) + 4|0); $16 = HEAP16[$15>>1]|0; $17 = $16&65535; $18 = ($14|0)>($17|0); if (!($18)) { $19 = HEAP32[$1>>2]|0; $20 = (($19) + ($2)|0); _String_Init_1893($0,$20,$3,$3); return; } _Logger_Abort(43800); $19 = HEAP32[$1>>2]|0; $20 = (($19) + ($2)|0); _String_Init_1893($0,$20,$3,$3); return; } function _String_UNSAFE_SubstringAt($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($2|0)<(0); if ($3) { label = 3; } else { $4 = ((($1)) + 4|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; $7 = ($6|0)<($2|0); if ($7) { label = 3; } } if ((label|0) == 3) { _Logger_Abort(43833); } $8 = HEAP32[$1>>2]|0; $9 = (($8) + ($2)|0); $10 = ((($1)) + 4|0); $11 = HEAP16[$10>>1]|0; $12 = $11&65535; $13 = (($12) - ($2))|0; $14 = $13&65535; HEAP32[$0>>2] = $9; $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); HEAP16[$$sroa$4$0$$sroa_idx2>>1] = $14; $$sroa$5$0$$sroa_idx4 = ((($0)) + 6|0); HEAP16[$$sroa$5$0$$sroa_idx4>>1] = $14; return; } function _String_UNSAFE_Split($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0$lcssa = 0, $$03033 = 0, $$034 = 0, $$132 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $exitcond = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp; $5 = ((($0)) + 4|0); $6 = ($3|0)>(0); L1: do { if ($6) { $$03033 = 0;$$034 = 0; while(1) { $7 = HEAP16[$5>>1]|0; $8 = $7&65535; $9 = ($$03033|0)>($8|0); if ($9) { $$0$lcssa = $$034; break L1; } $10 = (_String_IndexOfAt($0,$$03033,$1)|0); $11 = ($10|0)==(-1); $spec$select = $11 ? $8 : $10; $12 = (($2) + ($$034<<3)|0); $13 = (($spec$select) - ($$03033))|0; _String_UNSAFE_Substring($4,$0,$$03033,$13); $14 = $4; $15 = $14; $16 = HEAP32[$15>>2]|0; $17 = (($14) + 4)|0; $18 = $17; $19 = HEAP32[$18>>2]|0; $20 = $12; $21 = $20; HEAP32[$21>>2] = $16; $22 = (($20) + 4)|0; $23 = $22; HEAP32[$23>>2] = $19; $24 = (($spec$select) + 1)|0; $25 = (($$034) + 1)|0; $26 = ($25|0)<($3|0); if ($26) { $$03033 = $24;$$034 = $25; } else { $$0$lcssa = $25; break; } } } else { $$0$lcssa = 0; } } while(0); $27 = ($$0$lcssa|0)<($3|0); if (!($27)) { STACKTOP = sp;return ($$0$lcssa|0); } $$132 = $$0$lcssa; while(1) { $28 = (($2) + ($$132<<3)|0); $29 = 1949280; $30 = $29; $31 = HEAP32[$30>>2]|0; $32 = (($29) + 4)|0; $33 = $32; $34 = HEAP32[$33>>2]|0; $35 = $28; $36 = $35; HEAP32[$36>>2] = $31; $37 = (($35) + 4)|0; $38 = $37; HEAP32[$38>>2] = $34; $39 = (($$132) + 1)|0; $exitcond = ($39|0)==($3|0); if ($exitcond) { break; } else { $$132 = $39; } } STACKTOP = sp;return ($$0$lcssa|0); } function _String_IndexOfAt($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$08 = 0, $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = $4&65535; $6 = ($5|0)>($1|0); if (!($6)) { $$08 = -1; return ($$08|0); } $7 = HEAP32[$0>>2]|0; $$09 = $1; while(1) { $8 = (($7) + ($$09)|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==($2<<24>>24); if ($10) { $$08 = $$09; label = 5; break; } $11 = (($$09) + 1)|0; $12 = HEAP16[$3>>1]|0; $13 = $12&65535; $14 = ($11|0)<($13|0); if ($14) { $$09 = $11; } else { $$08 = -1; label = 5; break; } } if ((label|0) == 5) { return ($$08|0); } return (0)|0; } function _String_UNSAFE_SplitBy($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp + 8|0; $4 = sp; $5 = (_String_IndexOfAt($0,0,$1)|0); $6 = ($5|0)==(-1); if ($6) { $7 = $0; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = (($7) + 4)|0; $11 = $10; $12 = HEAP32[$11>>2]|0; $13 = $2; $14 = $13; HEAP32[$14>>2] = $9; $15 = (($13) + 4)|0; $16 = $15; HEAP32[$16>>2] = $12; $17 = 1949280; $18 = $17; $19 = HEAP32[$18>>2]|0; $20 = (($17) + 4)|0; $21 = $20; $22 = HEAP32[$21>>2]|0; $23 = $0; $24 = $23; HEAP32[$24>>2] = $19; $25 = (($23) + 4)|0; $26 = $25; HEAP32[$26>>2] = $22; STACKTOP = sp;return; } else { _String_UNSAFE_Substring($3,$0,0,$5); $27 = $3; $28 = $27; $29 = HEAP32[$28>>2]|0; $30 = (($27) + 4)|0; $31 = $30; $32 = HEAP32[$31>>2]|0; $33 = $2; $34 = $33; HEAP32[$34>>2] = $29; $35 = (($33) + 4)|0; $36 = $35; HEAP32[$36>>2] = $32; $37 = (($5) + 1)|0; _String_UNSAFE_SubstringAt($4,$0,$37); $38 = $4; $39 = $38; $40 = HEAP32[$39>>2]|0; $41 = (($38) + 4)|0; $42 = $41; $43 = HEAP32[$42>>2]|0; $44 = $0; $45 = $44; HEAP32[$45>>2] = $40; $46 = (($44) + 4)|0; $47 = $46; HEAP32[$47>>2] = $43; STACKTOP = sp;return; } } function _String_UNSAFE_Separate($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp + 8|0; $5 = sp; $6 = (_String_IndexOfAt($0,0,$1)|0); $7 = ($6|0)==(-1); if ($7) { $8 = $0; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = (($8) + 4)|0; $12 = $11; $13 = HEAP32[$12>>2]|0; $14 = $2; $15 = $14; HEAP32[$15>>2] = $10; $16 = (($14) + 4)|0; $17 = $16; HEAP32[$17>>2] = $13; $18 = 1949280; $19 = $18; $20 = HEAP32[$19>>2]|0; $21 = (($18) + 4)|0; $22 = $21; $23 = HEAP32[$22>>2]|0; $24 = $3; $25 = $24; HEAP32[$25>>2] = $20; $26 = (($24) + 4)|0; $27 = $26; HEAP32[$27>>2] = $23; $$0 = 0; STACKTOP = sp;return ($$0|0); } _String_UNSAFE_Substring($4,$0,0,$6); $28 = $4; $29 = $28; $30 = HEAP32[$29>>2]|0; $31 = (($28) + 4)|0; $32 = $31; $33 = HEAP32[$32>>2]|0; $34 = $2; $35 = $34; HEAP32[$35>>2] = $30; $36 = (($34) + 4)|0; $37 = $36; HEAP32[$37>>2] = $33; $38 = (($6) + 1)|0; _String_UNSAFE_SubstringAt($5,$0,$38); $39 = $5; $40 = $39; $41 = HEAP32[$40>>2]|0; $42 = (($39) + 4)|0; $43 = $42; $44 = HEAP32[$43>>2]|0; $45 = $3; $46 = $45; HEAP32[$46>>2] = $41; $47 = (($45) + 4)|0; $48 = $47; HEAP32[$48>>2] = $44; _String_UNSAFE_TrimEnd($2); _String_UNSAFE_TrimStart($3); $49 = ((($2)) + 4|0); $50 = HEAP16[$49>>1]|0; $51 = ($50<<16>>16)==(0); if ($51) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $52 = ((($3)) + 4|0); $53 = HEAP16[$52>>1]|0; $54 = ($53<<16>>16)!=(0); $phitmp = $54&1; $$0 = $phitmp; STACKTOP = sp;return ($$0|0); } function _String_UNSAFE_TrimEnd($0) { $0 = $0|0; var $$07 = 0, $$07$in = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP16[$1>>1]|0; $3 = ($2<<16>>16)==(0); if ($3) { return; } $4 = $2&65535; $$07$in = $4; while(1) { $$07 = (($$07$in) + -1)|0; $5 = HEAP32[$0>>2]|0; $6 = (($5) + ($$07)|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(32); if (!($8)) { label = 5; break; } $9 = HEAP16[$1>>1]|0; $10 = (($9) + -1)<<16>>16; HEAP16[$1>>1] = $10; $11 = ($$07$in|0)>(1); if ($11) { $$07$in = $$07; } else { label = 5; break; } } if ((label|0) == 5) { return; } } function _String_UNSAFE_TrimStart($0) { $0 = $0|0; var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP16[$1>>1]|0; $3 = ($2<<16>>16)==(0); if ($3) { return; } $9 = $2; while(1) { $4 = HEAP32[$0>>2]|0; $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(32); if (!($6)) { label = 5; break; } $7 = ((($4)) + 1|0); HEAP32[$0>>2] = $7; $8 = (($9) + -1)<<16>>16; HEAP16[$1>>1] = $8; $10 = ($8<<16>>16)==(0); if ($10) { label = 5; break; } else { $9 = $8; } } if ((label|0) == 5) { return; } } function _String_Equals($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ((($1)) + 4|0); $5 = HEAP16[$4>>1]|0; $6 = ($3<<16>>16)==($5<<16>>16); if (!($6)) { $12 = 0; return ($12|0); } $7 = $3&65535; $8 = HEAP32[$0>>2]|0; $9 = HEAP32[$1>>2]|0; $10 = (_Mem_Equal($8,$9,$7)|0); $11 = ($10|0)!=(0); $phitmp = $11&1; $12 = $phitmp; return ($12|0); } function _String_CaselessEquals($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$018 = 0, $$01923 = 0, $$020 = 0, $$off = 0, $$off22 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ((($1)) + 4|0); $5 = HEAP16[$4>>1]|0; $6 = ($3<<16>>16)==($5<<16>>16); if (!($6)) { $$020 = 0; return ($$020|0); } $7 = $3&65535; $8 = ($3<<16>>16)==(0); if ($8) { $$020 = 1; return ($$020|0); } $9 = HEAP32[$0>>2]|0; $10 = HEAP32[$1>>2]|0; $$01923 = 0; while(1) { $13 = (($9) + ($$01923)|0); $14 = HEAP8[$13>>0]|0; $15 = $14&255; $$off = (($14) + -65)<<24>>24; $16 = ($$off&255)<(26); $17 = (($15) + 32)|0; $18 = $17&255; $$018 = $16 ? $18 : $14; $19 = (($10) + ($$01923)|0); $20 = HEAP8[$19>>0]|0; $21 = $20&255; $$off22 = (($20) + -65)<<24>>24; $22 = ($$off22&255)<(26); $23 = (($21) + 32)|0; $24 = $23&255; $$0 = $22 ? $24 : $20; $25 = ($$018<<24>>24)==($$0<<24>>24); $11 = (($$01923) + 1)|0; if (!($25)) { $$020 = 0; label = 6; break; } $12 = ($11>>>0)<($7>>>0); if ($12) { $$01923 = $11; } else { $$020 = 1; label = 6; break; } } if ((label|0) == 6) { return ($$020|0); } return (0)|0; } function _String_CaselessEqualsConst($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$019 = 0, $$02026 = 0, $$021 = 0, $$lcssa = 0, $$off = 0, $$off24 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond23 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); do { if ($4) { $$lcssa = 0; } else { $5 = HEAP32[$0>>2]|0; $$02026 = 0; while(1) { $10 = (($5) + ($$02026)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $$off = (($11) + -65)<<24>>24; $13 = ($$off&255)<(26); $14 = (($12) + 32)|0; $15 = $14&255; $$019 = $13 ? $15 : $11; $16 = (($1) + ($$02026)|0); $17 = HEAP8[$16>>0]|0; $18 = $17&255; $$off24 = (($17) + -65)<<24>>24; $19 = ($$off24&255)<(26); $20 = (($18) + 32)|0; $21 = $20&255; $$0 = $19 ? $21 : $17; $22 = ($$019<<24>>24)!=($$0<<24>>24); $23 = ($$0<<24>>24)==(0); $or$cond23 = $22 | $23; $8 = (($$02026) + 1)|0; if ($or$cond23) { $$021 = 0; label = 7; break; } $6 = HEAP16[$2>>1]|0; $7 = $6&65535; $9 = ($8>>>0)<($7>>>0); if ($9) { $$02026 = $8; } else { label = 5; break; } } if ((label|0) == 5) { $24 = $6&65535; $$lcssa = $24; break; } else if ((label|0) == 7) { return ($$021|0); } } } while(0); $25 = (($1) + ($$lcssa)|0); $26 = HEAP8[$25>>0]|0; $27 = ($26<<24>>24)==(0); $28 = $27&1; $$021 = $28; return ($$021|0); } function _String_AppendBool($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(0); $3 = $2 ? 43857 : 43863; _String_AppendConst($0,$3); return; } function _String_AppendConst($0,$1) { $0 = $0|0; $1 = $1|0; var $$04 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[$1>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } $$04 = $1;$4 = $2; while(1) { _String_Append($0,$4); $5 = ((($$04)) + 1|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); if ($7) { break; } else { $$04 = $5;$4 = $6; } } return; } function _String_MakeUInt32($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$07 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $$0 = 0;$$07 = $0; while(1) { $2 = (($$07>>>0) / 10)&-1; $3 = ($2*10)|0; $4 = (($$07) - ($3))|0; $5 = $4 | 48; $6 = $5&255; $7 = (($1) + ($$0)|0); HEAP8[$7>>0] = $6; $8 = (($$0) + 1)|0; $9 = ($$07>>>0)>(9); if ($9) { $$0 = $8;$$07 = $2; } else { break; } } return ($8|0); } function _String_AppendInt($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)<(0); if ($2) { $3 = (0 - ($1))|0; _String_Append($0,45); $$0 = $3; } else { $$0 = $1; } _String_AppendUInt32($0,$$0); return; } function _String_AppendUInt32($0,$1) { $0 = $0|0; $1 = $1|0; var $$09 = 0, $$09$in = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = (_String_MakeUInt32($1,$2)|0); $4 = ($3|0)>(0); if (!($4)) { STACKTOP = sp;return; } $$09$in = $3; while(1) { $$09 = (($$09$in) + -1)|0; $5 = (($2) + ($$09)|0); $6 = HEAP8[$5>>0]|0; _String_Append($0,$6); $7 = ($$09$in|0)>(1); if ($7) { $$09$in = $$09; } else { break; } } STACKTOP = sp;return; } function _String_AppendPaddedInt($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$117 = 0, $$117$in = 0, $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $3 = sp; $4 = ($2|0)>(0); if ($4) { _memset(($3|0),48,($2|0))|0; } $5 = (_String_MakeUInt32($1,$3)|0); $6 = ($5|0)<($2|0); $spec$select = $6 ? $2 : $5; $7 = ($spec$select|0)>(0); if (!($7)) { STACKTOP = sp;return; } $$117$in = $spec$select; while(1) { $$117 = (($$117$in) + -1)|0; $8 = (($3) + ($$117)|0); $9 = HEAP8[$8>>0]|0; _String_Append($0,$9); $10 = ($$117$in|0)>(1); if ($10) { $$117$in = $$117; } else { break; } } STACKTOP = sp;return; } function _String_AppendFloat($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = $2|0; var $$023 = 0.0, $$02425 = 0, $$026 = 0.0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = $1 < 0.0; if ($3) { $4 = - $1; _String_Append($0,45); $$023 = $4; } else { $$023 = $1; } $5 = (~~(($$023))); _String_AppendUInt32($0,$5); $6 = $$023; $7 = (+($5|0)); $8 = $6 - $7; $9 = $8 == 0.0; if ($9) { return; } _String_Append($0,46); $10 = ($2|0)>(0); if (!($10)) { return; } $$02425 = 0;$$026 = $8; while(1) { $11 = $$026 * 10.0; $12 = (~~(($11))); $13 = (($12|0) % 10)&-1; $14 = (($13) + 48)|0; $15 = $14&255; _String_Append($0,$15); $16 = (($$02425) + 1)|0; $exitcond = ($16|0)==($2|0); if ($exitcond) { break; } else { $$02425 = $16;$$026 = $11; } } return; } function _String_AppendHex($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (4)?(($1&255) >>> 4):(($1&255)); $3 = $2&255; $4 = ($1&255)<(160); $5 = $3 | 48; $6 = (($3) + 55)|0; $7 = $4 ? $5 : $6; $8 = $7&255; $9 = $1 & 15; $10 = $9&255; $11 = ($9&255)<(10); $12 = $10 | 48; $13 = (($10) + 55)|0; $14 = $11 ? $12 : $13; $15 = $14&255; _String_Append($0,$8); _String_Append($0,$15); return; } function _String_AppendAll($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$09 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($2|0)>(0); if (!($3)) { return; } $$09 = 0; while(1) { $4 = (($1) + ($$09)|0); $5 = HEAP8[$4>>0]|0; _String_Append($0,$5); $6 = (($$09) + 1)|0; $exitcond = ($6|0)==($2|0); if ($exitcond) { break; } else { $$09 = $6; } } return; } function _String_AppendColorless($0,$1) { $0 = $0|0; $1 = $1|0; var $$09 = 0, $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { return; } $$09 = 0; while(1) { $5 = HEAP32[$1>>2]|0; $6 = (($5) + ($$09)|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(38); if ($8) { $9 = (($$09) + 1)|0; $$1 = $9; } else { _String_Append($0,$7); $$1 = $$09; } $10 = (($$1) + 1)|0; $11 = HEAP16[$2>>1]|0; $12 = $11&65535; $13 = ($10|0)<($12|0); if ($13) { $$09 = $10; } else { break; } } return; } function _String_LastIndexOfAt($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$08 = 0, $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = $4&65535; $6 = $1 ^ -1; $7 = (($6) + ($5))|0; $8 = ($7|0)>(-1); if (!($8)) { $$08 = -1; return ($$08|0); } $9 = HEAP32[$0>>2]|0; $$09 = $7; while(1) { $10 = (($9) + ($$09)|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==($2<<24>>24); if ($12) { $$08 = $$09; label = 5; break; } $13 = (($$09) + -1)|0; $14 = ($$09|0)>(0); if ($14) { $$09 = $13; } else { $$08 = -1; label = 5; break; } } if ((label|0) == 5) { return ($$08|0); } return (0)|0; } function _String_InsertAt($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$017 = 0, $$lcssa = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($1|0)<(0); if ($3) { label = 3; } else { $4 = ((($0)) + 4|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; $7 = ($6|0)<($1|0); if ($7) { label = 3; } } if ((label|0) == 3) { _Logger_Abort(43868); } $8 = ((($0)) + 4|0); $9 = HEAP16[$8>>1]|0; $10 = ((($0)) + 6|0); $11 = HEAP16[$10>>1]|0; $12 = ($9<<16>>16)==($11<<16>>16); if ($12) { _Logger_Abort(43901); } $13 = HEAP16[$8>>1]|0; $14 = $13&65535; $15 = ($14|0)>($1|0); $16 = HEAP32[$0>>2]|0; if (!($15)) { $$lcssa = $16; $24 = (($$lcssa) + ($1)|0); HEAP8[$24>>0] = $2; $25 = HEAP16[$8>>1]|0; $26 = (($25) + 1)<<16>>16; HEAP16[$8>>1] = $26; return; } $$017 = $14;$19 = $16; while(1) { $17 = (($$017) + -1)|0; $18 = (($19) + ($17)|0); $20 = HEAP8[$18>>0]|0; $21 = (($19) + ($$017)|0); HEAP8[$21>>0] = $20; $22 = ($17|0)>($1|0); $23 = HEAP32[$0>>2]|0; if ($22) { $$017 = $17;$19 = $23; } else { $$lcssa = $23; break; } } $24 = (($$lcssa) + ($1)|0); HEAP8[$24>>0] = $2; $25 = HEAP16[$8>>1]|0; $26 = (($25) + 1)<<16>>16; HEAP16[$8>>1] = $26; return; } function _String_DeleteAt($0,$1) { $0 = $0|0; $1 = $1|0; var $$015 = 0, $$lcssa = 0, $$lcssa13 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)<(0); if ($2) { label = 3; } else { $3 = ((($0)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = $4&65535; $6 = ($5|0)>($1|0); if (!($6)) { label = 3; } } if ((label|0) == 3) { _Logger_Abort(43942); } $7 = ((($0)) + 4|0); $8 = HEAP16[$7>>1]|0; $9 = $8&65535; $10 = (($9) + -1)|0; $11 = ($10|0)>($1|0); $12 = HEAP32[$0>>2]|0; if ($11) { $$015 = $1;$15 = $12; while(1) { $13 = (($$015) + 1)|0; $14 = (($15) + ($13)|0); $16 = HEAP8[$14>>0]|0; $17 = (($15) + ($$015)|0); HEAP8[$17>>0] = $16; $18 = HEAP16[$7>>1]|0; $19 = $18&65535; $20 = (($19) + -1)|0; $21 = ($13|0)<($20|0); $22 = HEAP32[$0>>2]|0; if ($21) { $$015 = $13;$15 = $22; } else { $$lcssa = $22;$$lcssa13 = $20; break; } } } else { $$lcssa = $12;$$lcssa13 = $10; } $23 = (($$lcssa) + ($$lcssa13)|0); HEAP8[$23>>0] = 0; $24 = HEAP16[$7>>1]|0; $25 = (($24) + -1)<<16>>16; HEAP16[$7>>1] = $25; return; } function _String_IndexOfConst($0,$1) { $0 = $0|0; $1 = $1|0; var $$01926 = 0, $$020 = 0, $$023 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { $$020 = -1; return ($$020|0); } $5 = $3&65535; $6 = HEAP8[$1>>0]|0; $7 = ($6<<24>>24)==(0); $$01926 = 0;$14 = $5; L4: while(1) { if ($7) { $$020 = 0; label = 9; break; } $$023 = 0;$19 = $6; while(1) { $12 = (($$023) + ($$01926))|0; $13 = ($12>>>0)<($14>>>0); if (!($13)) { break; } $15 = HEAP32[$0>>2]|0; $16 = (($15) + ($12)|0); $17 = HEAP8[$16>>0]|0; $18 = ($17<<24>>24)==($19<<24>>24); $9 = (($$023) + 1)|0; if (!($18)) { break; } $8 = (($1) + ($9)|0); $10 = HEAP8[$8>>0]|0; $11 = ($10<<24>>24)==(0); if ($11) { $$020 = $$01926; label = 9; break L4; } else { $$023 = $9;$19 = $10; } } $20 = (($$01926) + 1)|0; $21 = HEAP16[$2>>1]|0; $22 = $21&65535; $23 = ($20>>>0)<($22>>>0); if ($23) { $$01926 = $20;$14 = $22; } else { $$020 = -1; label = 9; break; } } if ((label|0) == 9) { return ($$020|0); } return (0)|0; } function _String_CaselessContains($0,$1) { $0 = $0|0; $1 = $1|0; var $$0$lcssa = 0, $$02742 = 0, $$028 = 0, $$029 = 0, $$030 = 0, $$033 = 0, $$lcssa = 0, $$off = 0, $$off32 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { $$030 = 0; return ($$030|0); } $5 = $3&65535; $6 = ((($1)) + 4|0); $7 = HEAP16[$6>>1]|0; $8 = $7&65535; $9 = ($7<<16>>16)==(0); $$02742 = 0;$16 = $5; while(1) { L6: do { if ($9) { $$0$lcssa = 0;$$lcssa = 0; } else { $$033 = 0;$38 = $8; while(1) { $14 = (($$033) + ($$02742))|0; $15 = ($14>>>0)<($16>>>0); if (!($15)) { $$0$lcssa = $$033;$$lcssa = $38; break L6; } $17 = HEAP32[$0>>2]|0; $18 = (($17) + ($14)|0); $19 = HEAP8[$18>>0]|0; $20 = $19&255; $$off = (($19) + -65)<<24>>24; $21 = ($$off&255)<(26); $22 = (($20) + 32)|0; $23 = $22&255; $$029 = $21 ? $23 : $19; $24 = HEAP32[$1>>2]|0; $25 = (($24) + ($$033)|0); $26 = HEAP8[$25>>0]|0; $27 = $26&255; $$off32 = (($26) + -65)<<24>>24; $28 = ($$off32&255)<(26); $29 = (($27) + 32)|0; $30 = $29&255; $$028 = $28 ? $30 : $26; $31 = ($$029<<24>>24)==($$028<<24>>24); if (!($31)) { $$0$lcssa = $$033;$$lcssa = $38; break L6; } $32 = (($$033) + 1)|0; $33 = HEAP16[$6>>1]|0; $34 = $33&65535; $35 = ($32>>>0)<($34>>>0); if ($35) { $$033 = $32;$38 = $34; } else { break; } } $36 = $33&65535; $$0$lcssa = $32;$$lcssa = $36; } } while(0); $37 = ($$0$lcssa|0)==($$lcssa|0); $12 = (($$02742) + 1)|0; if ($37) { $$030 = 1; label = 11; break; } $10 = HEAP16[$2>>1]|0; $11 = $10&65535; $13 = ($12>>>0)<($11>>>0); if ($13) { $$02742 = $12;$16 = $11; } else { $$030 = 0; label = 11; break; } } if ((label|0) == 11) { return ($$030|0); } return (0)|0; } function _String_CaselessStarts($0,$1) { $0 = $0|0; $1 = $1|0; var $$018 = 0, $$019 = 0, $$020 = 0, $$023 = 0, $$off = 0, $$off22 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ((($1)) + 4|0); $5 = HEAP16[$4>>1]|0; $6 = ($3&65535)<($5&65535); if ($6) { $$020 = 0; return ($$020|0); } $7 = $5&65535; $8 = ($5<<16>>16)==(0); if ($8) { $$020 = 1; return ($$020|0); } $9 = HEAP32[$0>>2]|0; $10 = HEAP32[$1>>2]|0; $$023 = 0; while(1) { $13 = (($9) + ($$023)|0); $14 = HEAP8[$13>>0]|0; $15 = $14&255; $$off = (($14) + -65)<<24>>24; $16 = ($$off&255)<(26); $17 = (($15) + 32)|0; $18 = $17&255; $$019 = $16 ? $18 : $14; $19 = (($10) + ($$023)|0); $20 = HEAP8[$19>>0]|0; $21 = $20&255; $$off22 = (($20) + -65)<<24>>24; $22 = ($$off22&255)<(26); $23 = (($21) + 32)|0; $24 = $23&255; $$018 = $22 ? $24 : $20; $25 = ($$019<<24>>24)==($$018<<24>>24); $11 = (($$023) + 1)|0; if (!($25)) { $$020 = 0; label = 6; break; } $12 = ($11>>>0)<($7>>>0); if ($12) { $$023 = $11; } else { $$020 = 1; label = 6; break; } } if ((label|0) == 6) { return ($$020|0); } return (0)|0; } function _String_CaselessEnds($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$02227 = 0, $$023 = 0, $$024 = 0, $$off = 0, $$off26 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = $3&65535; $5 = ((($1)) + 4|0); $6 = HEAP16[$5>>1]|0; $7 = $6&65535; $8 = (($4) - ($7))|0; $9 = ($8|0)<(0); if ($9) { $$0 = 0; return ($$0|0); } $10 = ($6<<16>>16)==(0); if ($10) { $$0 = 1; return ($$0|0); } $11 = HEAP32[$0>>2]|0; $12 = HEAP32[$1>>2]|0; $$02227 = 0; while(1) { $15 = (($$02227) + ($8))|0; $16 = (($11) + ($15)|0); $17 = HEAP8[$16>>0]|0; $18 = $17&255; $$off = (($17) + -65)<<24>>24; $19 = ($$off&255)<(26); $20 = (($18) + 32)|0; $21 = $20&255; $$024 = $19 ? $21 : $17; $22 = (($12) + ($$02227)|0); $23 = HEAP8[$22>>0]|0; $24 = $23&255; $$off26 = (($23) + -65)<<24>>24; $25 = ($$off26&255)<(26); $26 = (($24) + 32)|0; $27 = $26&255; $$023 = $25 ? $27 : $23; $28 = ($$024<<24>>24)==($$023<<24>>24); $13 = (($$02227) + 1)|0; if (!($28)) { $$0 = 0; label = 6; break; } $14 = ($13>>>0)<($7>>>0); if ($14) { $$02227 = $13; } else { $$0 = 1; label = 6; break; } } if ((label|0) == 6) { return ($$0|0); } return (0)|0; } function _String_Compare($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$02530 = 0, $$026 = 0, $$027 = 0, $$off = 0, $$off29 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ((($1)) + 4|0); $5 = HEAP16[$4>>1]|0; $6 = $3&65535; $7 = $5&65535; $8 = ($3&65535)<($5&65535); $9 = $8 ? $3 : $5; $10 = $9&65535; $11 = ($9<<16>>16)==(0); L1: do { if (!($11)) { $12 = HEAP32[$0>>2]|0; $13 = HEAP32[$1>>2]|0; $$02530 = 0; while(1) { $16 = (($12) + ($$02530)|0); $17 = HEAP8[$16>>0]|0; $18 = $17&255; $$off = (($17) + -65)<<24>>24; $19 = ($$off&255)<(26); $20 = (($18) + 32)|0; $21 = $20&255; $$027 = $19 ? $21 : $17; $22 = (($13) + ($$02530)|0); $23 = HEAP8[$22>>0]|0; $24 = $23&255; $$off29 = (($23) + -65)<<24>>24; $25 = ($$off29&255)<(26); $26 = (($24) + 32)|0; $27 = $26&255; $$026 = $25 ? $27 : $23; $28 = ($$027<<24>>24)==($$026<<24>>24); $14 = (($$02530) + 1)|0; if (!($28)) { break; } $15 = ($14>>>0)<($10>>>0); if ($15) { $$02530 = $14; } else { break L1; } } $29 = $$027&255; $30 = $$026&255; $31 = (($29) - ($30))|0; $$0 = $31; return ($$0|0); } } while(0); $32 = (($6) - ($7))|0; $$0 = $32; return ($$0|0); } function _String_Format1($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _String_Format4($0,$1,$2,0,0,0); return; } function _String_Format4($0,$1,$2,$3,$4,$5) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; var $$0 = 0, $$048 = 0, $$1 = 0, $$149 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0.0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $6 = sp; HEAP32[$6>>2] = $2; $7 = ((($6)) + 4|0); HEAP32[$7>>2] = $3; $8 = ((($6)) + 8|0); HEAP32[$8>>2] = $4; $9 = ((($6)) + 12|0); HEAP32[$9>>2] = $5; $$0 = 0;$$048 = 0; L1: while(1) { $10 = (($1) + ($$048)|0); $11 = HEAP8[$10>>0]|0; L3: do { switch ($11<<24>>24) { case 0: { break L1; } case 37: { $12 = (($$0) + 1)|0; $13 = (($6) + ($$0<<2)|0); $14 = HEAP32[$13>>2]|0; $15 = (($$048) + 1)|0; $16 = (($1) + ($15)|0); $17 = HEAP8[$16>>0]|0; $18 = $17 << 24 >> 24; do { switch ($18|0) { case 98: { $19 = HEAP8[$14>>0]|0; $20 = $19&255; _String_AppendInt($0,$20); $$1 = $12;$$149 = $15; break L3; } case 105: { $21 = HEAP32[$14>>2]|0; _String_AppendInt($0,$21); $$1 = $12;$$149 = $15; break L3; } case 102: { $22 = (($$048) + 2)|0; $23 = (($1) + ($22)|0); $24 = HEAP8[$23>>0]|0; $25 = $24 << 24 >> 24; $26 = (($25) + -48)|0; $27 = +HEAPF32[$14>>2]; _String_AppendFloat($0,$27,$26); $$1 = $12;$$149 = $22; break L3; } case 112: { $28 = (($$048) + 2)|0; $29 = (($1) + ($28)|0); $30 = HEAP8[$29>>0]|0; $31 = $30 << 24 >> 24; $32 = (($31) + -48)|0; $33 = HEAP32[$14>>2]|0; _String_AppendPaddedInt($0,$33,$32); $$1 = $12;$$149 = $28; break L3; } case 116: { $34 = HEAP8[$14>>0]|0; _String_AppendBool($0,$34); $$1 = $12;$$149 = $15; break L3; } case 99: { _String_AppendConst($0,$14); $$1 = $12;$$149 = $15; break L3; } case 115: { _String_AppendString($0,$14); $$1 = $12;$$149 = $15; break L3; } case 114: { $35 = HEAP8[$14>>0]|0; _String_Append($0,$35); $$1 = $12;$$149 = $15; break L3; } case 120: { $36 = HEAP32[$14>>2]|0; _String_Hex32($0,$36); $$1 = $12;$$149 = $15; break L3; } case 104: { $37 = HEAP32[$14>>2]|0; _String_Hex32($0,$37); $$1 = $12;$$149 = $15; break L3; } case 37: { _String_Append($0,37); $$1 = $12;$$149 = $15; break L3; } default: { _Logger_Abort(43975); $$1 = $12;$$149 = $15; break L3; } } } while(0); } default: { _String_Append($0,$11); $$1 = $$0;$$149 = $$048; } } } while(0); $38 = (($$149) + 1)|0; $$0 = $$1;$$048 = $38; } STACKTOP = sp;return; } function _String_Hex32($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (24)?($1 >>> 24):($1); $3 = $2&255; _String_AppendHex($0,$3); $4 = (16)?($1 >>> 16):($1); $5 = $4&255; _String_AppendHex($0,$5); $6 = (8)?($1 >>> 8):($1); $7 = $6&255; _String_AppendHex($0,$7); $8 = $1&255; _String_AppendHex($0,$8); return; } function _String_Format2($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; _String_Format4($0,$1,$2,$3,0,0); return; } function _String_Format3($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var label = 0, sp = 0; sp = STACKTOP; _String_Format4($0,$1,$2,$3,$4,0); return; } function _Convert_CP437ToUnicode($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&255; $2 = ($0&255)<(32); if ($2) { $3 = (9840 + ($1<<1)|0); $4 = HEAP16[$3>>1]|0; $$0 = $4; return ($$0|0); } $5 = ($0&255)<(127); if ($5) { $6 = $0&255; $$0 = $6; return ($$0|0); } else { $7 = (($1) + -127)|0; $8 = (9904 + ($7<<1)|0); $9 = HEAP16[$8>>1]|0; $$0 = $9; return ($$0|0); } } function _Convert_CodepointToCP437($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; (_Convert_TryCodepointToCP437($0,$1)|0); $2 = HEAP8[$1>>0]|0; STACKTOP = sp;return ($2|0); } function _Convert_TryCodepointToCP437($0,$1) { $0 = $0|0; $1 = $1|0; var $$018 = 0, $$019 = 0, $$023 = 0, $$122 = 0, $$off = 0, $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $$off = (($0) + -32)|0; $2 = ($$off>>>0)<(95); L1: do { if ($2) { $3 = $0&255; $$018 = 1;$$sink = $3; } else { $4 = ($0>>>0)>(126975); if ($4) { $5 = (_ReduceEmoji($0)|0); $$019 = $5; } else { $$019 = $0; } $$023 = 0; while(1) { $6 = (9840 + ($$023<<1)|0); $7 = HEAP16[$6>>1]|0; $8 = $7&65535; $9 = ($$019|0)==($8|0); if ($9) { label = 7; break; } $11 = (($$023) + 1)|0; $12 = ($11>>>0)<(32); if ($12) { $$023 = $11; } else { break; } } if ((label|0) == 7) { $10 = $$023&255; $$018 = 1;$$sink = $10; break; } $$122 = 0; while(1) { $13 = (9904 + ($$122<<1)|0); $14 = HEAP16[$13>>1]|0; $15 = $14&65535; $16 = ($$019|0)==($15|0); if ($16) { break; } $19 = (($$122) + 1)|0; $20 = ($19>>>0)<(129); if ($20) { $$122 = $19; } else { $$018 = 0;$$sink = 63; break L1; } } $17 = (($$122) + 127)|0; $18 = $17&255; $$018 = 1;$$sink = $18; } } while(0); HEAP8[$1>>0] = $$sink; return ($$018|0); } function _ReduceEmoji($0) { $0 = $0|0; var $$0 = 0, label = 0, sp = 0; sp = STACKTOP; switch ($0|0) { case 127774: { $$0 = 9788; break; } case 127925: { $$0 = 9835; break; } case 128578: { $$0 = 9786; break; } case 128512: case 128513: case 128515: { $$0 = 9786; break; } case 128516: case 128518: case 128522: { $$0 = 9786; break; } default: { $$0 = $0; } } return ($$0|0); } function _Convert_Utf8ToCodepoint($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[$0>>2] = 0; $3 = ($2|0)==(0); if ($3) { $$0 = 0; return ($$0|0); } $4 = HEAP8[$1>>0]|0; $5 = $4&255; $6 = ($4<<24>>24)>(-1); if ($6) { HEAP32[$0>>2] = $5; $$0 = 1; return ($$0|0); } $7 = $5 & 224; $8 = ($7|0)==(192); if ($8) { $9 = ($2>>>0)<(2); if ($9) { $$0 = 0; return ($$0|0); } $10 = $5 << 6; $11 = $10 & 1984; $12 = ((($1)) + 1|0); $13 = HEAP8[$12>>0]|0; $14 = $13 & 63; $15 = $14&255; $16 = $11 | $15; HEAP32[$0>>2] = $16; $$0 = 2; return ($$0|0); } $17 = $5 & 240; $18 = ($17|0)==(224); if ($18) { $19 = ($2>>>0)<(3); if ($19) { $$0 = 0; return ($$0|0); } $20 = $5 << 12; $21 = $20 & 61440; $22 = ((($1)) + 1|0); $23 = HEAP8[$22>>0]|0; $24 = $23 & 63; $25 = $24&255; $26 = $25 << 6; $27 = $26 | $21; $28 = ((($1)) + 2|0); $29 = HEAP8[$28>>0]|0; $30 = $29 & 63; $31 = $30&255; $32 = $27 | $31; HEAP32[$0>>2] = $32; $$0 = 3; return ($$0|0); } else { $33 = ($2>>>0)<(4); if ($33) { $$0 = 0; return ($$0|0); } $34 = $5 << 18; $35 = $34 & 1835008; $36 = ((($1)) + 1|0); $37 = HEAP8[$36>>0]|0; $38 = $37 & 63; $39 = $38&255; $40 = $39 << 12; $41 = $40 | $35; $42 = ((($1)) + 2|0); $43 = HEAP8[$42>>0]|0; $44 = $43 & 63; $45 = $44&255; $46 = $45 << 6; $47 = $41 | $46; $48 = ((($1)) + 3|0); $49 = HEAP8[$48>>0]|0; $50 = $49 & 63; $51 = $50&255; $52 = $47 | $51; HEAP32[$0>>2] = $52; $$0 = 4; return ($$0|0); } } function _Convert_CP437ToUtf8($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($0<<24>>24)<(32); $3 = ($0<<24>>24)==(127); $or$cond = $2 | $3; if ($or$cond) { $4 = (_Convert_CP437ToUnicode($0)|0); $5 = (_Convert_UnicodeToUtf8($4,$1)|0); $$0 = $5; return ($$0|0); } else { HEAP8[$1>>0] = $0; $$0 = 1; return ($$0|0); } } function _Convert_UnicodeToUtf8($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = $0&65535; $3 = ($0&65535)<(128); if ($3) { $4 = $0&255; HEAP8[$1>>0] = $4; $$0 = 1; return ($$0|0); } $5 = ($0&65535)<(2048); if ($5) { $6 = (6)?($2 >>> 6):($2); $7 = $6 & 31; $8 = $7 | 192; $9 = $8&255; HEAP8[$1>>0] = $9; $10 = $2 & 63; $11 = $10 | 128; $12 = $11&255; $13 = ((($1)) + 1|0); HEAP8[$13>>0] = $12; $$0 = 2; return ($$0|0); } else { $14 = (12)?($2 >>> 12):($2); $15 = $14 | 224; $16 = $15&255; HEAP8[$1>>0] = $16; $17 = (6)?($2 >>> 6):($2); $18 = $17 & 63; $19 = $18 | 128; $20 = $19&255; $21 = ((($1)) + 1|0); HEAP8[$21>>0] = $20; $22 = $2 & 63; $23 = $22 | 128; $24 = $23&255; $25 = ((($1)) + 2|0); HEAP8[$25>>0] = $24; $$0 = 3; return ($$0|0); } } function _String_AppendUtf8($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$01213 = 0, $$014 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; $4 = sp + 4|0; $5 = ($2|0)>(0); if (!($5)) { STACKTOP = sp;return; } $$01213 = $1;$$014 = $2; while(1) { $6 = (_Convert_Utf8ToCodepoint($3,$$01213,$$014)|0); $7 = ($6|0)==(0); if ($7) { label = 7; break; } $8 = HEAP32[$3>>2]|0; $9 = (_Convert_TryCodepointToCP437($8,$4)|0); $10 = ($9<<24>>24)==(0); if (!($10)) { $11 = HEAP8[$4>>0]|0; _String_Append($0,$11); } $12 = (($$01213) + ($6)|0); $13 = (($$014) - ($6))|0; $14 = ($13|0)>(0); if ($14) { $$01213 = $12;$$014 = $13; } else { label = 7; break; } } if ((label|0) == 7) { STACKTOP = sp;return; } } function _Convert_ParseUInt8($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; HEAP8[$1>>0] = 0; $3 = (_Convert_ParseInt($0,$2)|0); $4 = ($3<<24>>24)==(0); $5 = HEAP32[$2>>2]|0; $6 = ($5>>>0)>(255); $7 = $4 | $6; if ($7) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $8 = $5&255; HEAP8[$1>>0] = $8; $$0 = 1; STACKTOP = sp;return ($$0|0); } function _Convert_ParseInt($0,$1) { $0 = $0|0; $1 = $1|0; var $$018 = 0, $$020 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 10|0; $3 = sp; HEAP32[$1>>2] = 0; $4 = (_Convert_TryParseDigits($0,$2,$3,10)|0); $5 = ($4<<24>>24)==(0); if ($5) { $$020 = 0; STACKTOP = sp;return ($$020|0); } $6 = HEAP8[$2>>0]|0; $7 = ($6<<24>>24)==(0); if ($7) { $10 = (_Convert_CompareDigits($3,44017)|0); $$018 = $10; } else { $8 = (_Convert_CompareDigits($3,44006)|0); $9 = ($8|0)==(0); if ($9) { HEAP32[$1>>2] = -2147483648; $$020 = 1; STACKTOP = sp;return ($$020|0); } else { $$018 = $8; } } $11 = ($$018|0)>(0); if ($11) { $$020 = 0; STACKTOP = sp;return ($$020|0); } $12 = HEAP8[$3>>0]|0; $13 = $12 << 24 >> 24; $14 = ($13*10)|0; $15 = ((($3)) + 1|0); $16 = HEAP8[$15>>0]|0; $17 = $16 << 24 >> 24; $18 = (($14) + -528)|0; $19 = (($18) + ($17))|0; $20 = ($19*10)|0; $21 = ((($3)) + 2|0); $22 = HEAP8[$21>>0]|0; $23 = $22 << 24 >> 24; $24 = (($20) + -48)|0; $25 = (($24) + ($23))|0; $26 = ($25*10)|0; $27 = ((($3)) + 3|0); $28 = HEAP8[$27>>0]|0; $29 = $28 << 24 >> 24; $30 = (($26) + -48)|0; $31 = (($30) + ($29))|0; $32 = ($31*10)|0; $33 = ((($3)) + 4|0); $34 = HEAP8[$33>>0]|0; $35 = $34 << 24 >> 24; $36 = (($32) + -48)|0; $37 = (($36) + ($35))|0; $38 = ($37*10)|0; $39 = ((($3)) + 5|0); $40 = HEAP8[$39>>0]|0; $41 = $40 << 24 >> 24; $42 = (($38) + -48)|0; $43 = (($42) + ($41))|0; $44 = ($43*10)|0; $45 = ((($3)) + 6|0); $46 = HEAP8[$45>>0]|0; $47 = $46 << 24 >> 24; $48 = (($44) + -48)|0; $49 = (($48) + ($47))|0; $50 = ($49*10)|0; $51 = ((($3)) + 7|0); $52 = HEAP8[$51>>0]|0; $53 = $52 << 24 >> 24; $54 = (($50) + -48)|0; $55 = (($54) + ($53))|0; $56 = ($55*10)|0; $57 = ((($3)) + 8|0); $58 = HEAP8[$57>>0]|0; $59 = $58 << 24 >> 24; $60 = (($56) + -48)|0; $61 = (($60) + ($59))|0; $62 = ($61*10)|0; $63 = ((($3)) + 9|0); $64 = HEAP8[$63>>0]|0; $65 = $64 << 24 >> 24; $66 = (($62) + -48)|0; $67 = (($66) + ($65))|0; $68 = (0 - ($67))|0; $spec$select = $7 ? $67 : $68; HEAP32[$1>>2] = $spec$select; $$020 = 1; STACKTOP = sp;return ($$020|0); } function _Convert_TryParseDigits($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$03043 = 0, $$03043$in = 0, $$031 = 0, $$033$lcssa = 0, $$03342 = 0, $$2 = 0, $$23540 = 0, $$off = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond36 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[$1>>0] = 0; $4 = ((($0)) + 4|0); $5 = HEAP16[$4>>1]|0; $6 = ($5<<16>>16)==(0); if ($6) { $$2 = 0; return ($$2|0); } $7 = (($3) + -1)|0; $8 = (($2) + ($7)|0); $9 = HEAP32[$0>>2]|0; $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==(45); if ($11) { HEAP8[$1>>0] = 1; $$031 = 1; } else { $$031 = 0; } $12 = HEAP32[$0>>2]|0; $13 = HEAP8[$12>>0]|0; $14 = ($13<<24>>24)==(43); $spec$select = $14 ? 1 : $$031; $15 = HEAP16[$4>>1]|0; $16 = $15&65535; $17 = ($spec$select>>>0)<($16>>>0); L7: do { if ($17) { $$03043$in = $16;$$03342 = $8; while(1) { $$03043 = (($$03043$in) + -1)|0; $18 = HEAP32[$0>>2]|0; $19 = (($18) + ($$03043)|0); $20 = HEAP8[$19>>0]|0; $$off = (($20) + -48)<<24>>24; $21 = ($$off&255)>(9); $22 = ($$03342>>>0)<($2>>>0); $or$cond36 = $22 | $21; if ($or$cond36) { $$2 = 0; break; } $23 = ((($$03342)) + -1|0); HEAP8[$$03342>>0] = $20; $24 = ($$03043|0)>($spec$select|0); if ($24) { $$03043$in = $$03043;$$03342 = $23; } else { $$033$lcssa = $23; break L7; } } return ($$2|0); } else { $$033$lcssa = $8; } } while(0); $25 = ($$033$lcssa>>>0)<($2>>>0); if ($25) { $$2 = 1; return ($$2|0); } $$23540 = $$033$lcssa; while(1) { $26 = ((($$23540)) + -1|0); HEAP8[$$23540>>0] = 48; $27 = ($26>>>0)<($2>>>0); if ($27) { $$2 = 1; break; } else { $$23540 = $26; } } return ($$2|0); } function _Convert_CompareDigits($0,$1) { $0 = $0|0; $1 = $1|0; var $$012 = 0, $$013 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[$1>>0]|0; $3 = ($2<<24>>24)==(0); L1: do { if ($3) { $$012 = 0; } else { $$013 = 0;$11 = $2; while(1) { $8 = (($0) + ($$013)|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)>($11<<24>>24); if ($10) { $$012 = 1; break L1; } $12 = ($9<<24>>24)<($11<<24>>24); $5 = (($$013) + 1)|0; if ($12) { $$012 = -1; break L1; } $4 = (($1) + ($5)|0); $6 = HEAP8[$4>>0]|0; $7 = ($6<<24>>24)==(0); if ($7) { $$012 = 0; break; } else { $$013 = $5;$11 = $6; } } } } while(0); return ($$012|0); } function _Convert_ParseUInt16($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; HEAP16[$1>>1] = 0; $3 = (_Convert_ParseInt($0,$2)|0); $4 = ($3<<24>>24)==(0); $5 = HEAP32[$2>>2]|0; $6 = ($5>>>0)>(65535); $7 = $4 | $6; if ($7) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $8 = $5&65535; HEAP16[$1>>1] = $8; $$0 = 1; STACKTOP = sp;return ($$0|0); } function _Convert_ParseFloat($0,$1) { $0 = $0|0; $1 = $1|0; var $$05584 = 0.0, $$057$lcssa = 0.0, $$05783 = 0.0, $$05982 = 0.0, $$05986 = 0.0, $$148 = 0, $$24987 = 0, $$451 = 0, $$5 = 0, $$55285 = 0, $$off = 0, $$off73 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0; var $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0.0; var $36 = 0.0, $37 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select64 = 0, $spec$select66 = 0.0, label = 0, sp = 0; sp = STACKTOP; HEAPF32[$1>>2] = 0.0; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { $$5 = 0; return ($$5|0); } $5 = HEAP32[$0>>2]|0; $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(45); $spec$select64 = $7&1; $8 = ($6<<24>>24)==(43); $9 = $7 ? 2 : 1; $$148 = $8 ? $9 : $spec$select64; $10 = $3&65535; $11 = ($$148>>>0)<($10>>>0); L4: do { if ($11) { $$05986 = 0.0;$$24987 = $$148; L6: while(1) { $12 = (($5) + ($$24987)|0); $13 = HEAP8[$12>>0]|0; switch ($13<<24>>24) { case 44: case 46: { label = 6; break L6; } default: { } } $$off73 = (($13) + -48)<<24>>24; $14 = ($$off73&255)>(9); if ($14) { $$5 = 0; label = 13; break; } $16 = $$05986 * 10.0; $17 = $13 << 24 >> 24; $18 = (($17) + -48)|0; $19 = (+($18|0)); $20 = $16 + $19; $21 = (($$24987) + 1)|0; $22 = ($21>>>0)<($10>>>0); if ($22) { $$05986 = $20;$$24987 = $21; } else { $$05982 = $20;$$451 = $21; break L4; } } if ((label|0) == 6) { $15 = (($$24987) + 1)|0; $$05982 = $$05986;$$451 = $15; break; } else if ((label|0) == 13) { return ($$5|0); } } else { $$05982 = 0.0;$$451 = $$148; } } while(0); $23 = ($$451|0)<($10|0); L14: do { if ($23) { $$05584 = 10.0;$$05783 = 0.0;$$55285 = $$451; while(1) { $24 = (($5) + ($$55285)|0); $25 = HEAP8[$24>>0]|0; $$off = (($25) + -48)<<24>>24; $26 = ($$off&255)>(9); if ($26) { $$5 = 0; break; } $27 = $25 << 24 >> 24; $28 = (($27) + -48)|0; $29 = (+($28|0)); $30 = $29 / $$05584; $31 = $$05783 + $30; $32 = $$05584 * 10.0; $33 = (($$55285) + 1)|0; $34 = ($33|0)<($10|0); if ($34) { $$05584 = $32;$$05783 = $31;$$55285 = $33; } else { $$057$lcssa = $31; break L14; } } return ($$5|0); } else { $$057$lcssa = 0.0; } } while(0); $35 = $$05982 + $$057$lcssa; $36 = - $35; $spec$select66 = $7 ? $36 : $35; $37 = $spec$select66; HEAPF32[$1>>2] = $37; $$5 = 1; return ($$5|0); } function _Convert_ParseBool($0,$1) { $0 = $0|0; $1 = $1|0; var $$ = 0, $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_String_CaselessEqualsConst($0,43863)|0); $3 = ($2|0)==(0); if ($3) { $4 = (_String_CaselessEqualsConst($0,43857)|0); $5 = ($4|0)!=(0); HEAP8[$1>>0] = 0; $$ = $5&1; $$0 = $$; return ($$0|0); } else { HEAP8[$1>>0] = 1; $$0 = 1; return ($$0|0); } } function _StringsBuffer_Init($0) { $0 = $0|0; var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 8|0); HEAP32[$1>>2] = 0; $2 = ((($0)) + 12|0); HEAP32[$2>>2] = 0; $3 = ((($0)) + 24|0); HEAP32[$0>>2] = $3; $4 = ((($0)) + 4120|0); $5 = ((($0)) + 4|0); HEAP32[$5>>2] = $4; $6 = ((($0)) + 16|0); HEAP32[$6>>2] = 4096; $7 = ((($0)) + 20|0); HEAP32[$7>>2] = 256; $8 = ((($0)) + 5144|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)==(0); if (!($10)) { return; } _StringsBuffer_SetLengthBits($0,9); return; } function _StringsBuffer_SetLengthBits($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 5144|0); HEAP32[$2>>2] = $1; $3 = 1 << $1; $4 = (($3) + -1)|0; $5 = ((($0)) + 5148|0); HEAP32[$5>>2] = $4; return; } function _StringsBuffer_Clear($0) { $0 = $0|0; var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 20|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)==(0); if ($3) { return; } $4 = HEAP32[$0>>2]|0; $5 = ((($0)) + 24|0); $6 = ($4|0)==($5|0); if (!($6)) { _Mem_Free($4); } $7 = ((($0)) + 4|0); $8 = HEAP32[$7>>2]|0; $9 = ((($0)) + 4120|0); $10 = ($8|0)==($9|0); if (!($10)) { _Mem_Free($8); } _StringsBuffer_Init($0); return; } function _StringsBuffer_UNSAFE_Get($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($2|0)<(0); if ($3) { label = 3; } else { $4 = ((($1)) + 8|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)>($2|0); if (!($6)) { label = 3; } } if ((label|0) == 3) { _Logger_Abort(44028); } $7 = ((($1)) + 4|0); $8 = HEAP32[$7>>2]|0; $9 = (($8) + ($2<<2)|0); $10 = HEAP32[$9>>2]|0; $11 = ((($1)) + 5144|0); $12 = HEAP32[$11>>2]|0; $13 = ($12)?($10 >>> $12):($10); $14 = ((($1)) + 5148|0); $15 = HEAP32[$14>>2]|0; $16 = $15 & $10; $17 = HEAP32[$1>>2]|0; $18 = (($17) + ($13)|0); _String_Init_1893($0,$18,$16,$16); return; } function _StringsBuffer_UNSAFE_GetRaw($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 4|0); $4 = HEAP32[$3>>2]|0; $5 = (($4) + ($1<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = HEAP32[$0>>2]|0; $8 = ((($0)) + 5144|0); $9 = HEAP32[$8>>2]|0; $10 = ($9)?($6 >>> $9):($6); $11 = (($7) + ($10)|0); HEAP32[$2>>2] = $11; $12 = ((($0)) + 5148|0); $13 = HEAP32[$12>>2]|0; $14 = $13 & $6; $15 = $14&65535; $16 = ((($2)) + 4|0); HEAP16[$16>>1] = $15; $17 = ((($2)) + 6|0); HEAP16[$17>>1] = 0; return; } function _StringsBuffer_Add($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 20|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0); if ($4) { _StringsBuffer_Init($0); } $5 = ((($0)) + 8|0); $6 = HEAP32[$5>>2]|0; $7 = HEAP32[$2>>2]|0; $8 = ($6|0)==($7|0); if ($8) { $9 = ((($0)) + 4|0); _Utils_Resize($9,$2,4,256,512); } $10 = ((($1)) + 4|0); $11 = HEAP16[$10>>1]|0; $12 = $11&65535; $13 = ((($0)) + 5148|0); $14 = HEAP32[$13>>2]|0; $15 = ($14|0)<($12|0); if ($15) { _Logger_Abort(44071); } $16 = ((($0)) + 12|0); $17 = HEAP32[$16>>2]|0; $18 = HEAP16[$10>>1]|0; $19 = $18&65535; $20 = (($17) + ($19))|0; $21 = ((($0)) + 16|0); $22 = HEAP32[$21>>2]|0; $23 = ($20|0)<($22|0); if (!($23)) { _Utils_Resize($0,$21,1,4096,8192); } $24 = HEAP32[$0>>2]|0; $25 = (($24) + ($17)|0); $26 = HEAP32[$1>>2]|0; $27 = HEAP16[$10>>1]|0; $28 = $27&65535; _Mem_Copy($25,$26,$28); $29 = HEAP16[$10>>1]|0; $30 = $29&65535; $31 = ((($0)) + 5144|0); $32 = HEAP32[$31>>2]|0; $33 = $17 << $32; $34 = $33 | $30; $35 = ((($0)) + 4|0); $36 = HEAP32[$35>>2]|0; $37 = HEAP32[$5>>2]|0; $38 = (($36) + ($37<<2)|0); HEAP32[$38>>2] = $34; $39 = HEAP32[$5>>2]|0; $40 = (($39) + 1)|0; HEAP32[$5>>2] = $40; $41 = HEAP32[$16>>2]|0; $42 = (($41) + ($30))|0; HEAP32[$16>>2] = $42; return; } function _StringsBuffer_Remove($0,$1) { $0 = $0|0; $1 = $1|0; var $$049 = 0, $$147 = 0, $$lcssa = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)<(0); if ($2) { label = 3; } else { $3 = ((($0)) + 8|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>($1|0); if (!($5)) { label = 3; } } if ((label|0) == 3) { _Logger_Abort(44115); } $6 = ((($0)) + 4|0); $7 = HEAP32[$6>>2]|0; $8 = (($7) + ($1<<2)|0); $9 = HEAP32[$8>>2]|0; $10 = ((($0)) + 5144|0); $11 = HEAP32[$10>>2]|0; $12 = ($11)?($9 >>> $11):($9); $13 = ((($0)) + 5148|0); $14 = HEAP32[$13>>2]|0; $15 = $14 & $9; $16 = (($15) + ($12))|0; $17 = ((($0)) + 12|0); $18 = HEAP32[$17>>2]|0; $19 = ($16>>>0)<($18>>>0); if ($19) { $$049 = $16; while(1) { $20 = HEAP32[$0>>2]|0; $21 = (($20) + ($$049)|0); $22 = HEAP8[$21>>0]|0; $23 = (($$049) - ($15))|0; $24 = (($20) + ($23)|0); HEAP8[$24>>0] = $22; $25 = (($$049) + 1)|0; $26 = HEAP32[$17>>2]|0; $27 = ($25>>>0)<($26>>>0); if ($27) { $$049 = $25; } else { break; } } } $28 = HEAP32[$10>>2]|0; $29 = $15 << $28; $30 = ((($0)) + 8|0); $31 = HEAP32[$30>>2]|0; $32 = (($31) + -1)|0; $33 = ($32>>>0)>($1>>>0); if (!($33)) { $$lcssa = $32; HEAP32[$30>>2] = $$lcssa; $44 = HEAP32[$17>>2]|0; $45 = (($44) - ($15))|0; HEAP32[$17>>2] = $45; return; } $34 = HEAP32[$6>>2]|0; $$147 = $1; while(1) { $35 = (($$147) + 1)|0; $36 = (($34) + ($35<<2)|0); $37 = HEAP32[$36>>2]|0; $38 = (($34) + ($$147<<2)|0); $39 = ($37>>>0)<($9>>>0); $40 = $39 ? 0 : $29; $spec$select = (($37) - ($40))|0; HEAP32[$38>>2] = $spec$select; $41 = HEAP32[$30>>2]|0; $42 = (($41) + -1)|0; $43 = ($35>>>0)<($42>>>0); if ($43) { $$147 = $35; } else { $$lcssa = $42; break; } } HEAP32[$30>>2] = $$lcssa; $44 = HEAP32[$17>>2]|0; $45 = (($44) - ($15))|0; HEAP32[$17>>2] = $45; return; } function _StringsBuffer_Sort($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[487322] = $0; $1 = ((($0)) + 8|0); $2 = HEAP32[$1>>2]|0; $3 = (($2) + -1)|0; _StringsBuffer_QuickSort(0,$3); return; } function _StringsBuffer_QuickSort($0,$1) { $0 = $0|0; $1 = $1|0; var $$0$lcssa = 0, $$051$lcssa = 0, $$05161 = 0, $$05465 = 0, $$05664 = 0, $$062 = 0, $$1 = 0, $$152 = 0, $$155 = 0, $$157 = 0, $$2 = 0, $$253 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0; var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp + 16|0; $3 = sp + 8|0; $4 = sp; $5 = HEAP32[487322]|0; $6 = ((($5)) + 4|0); $7 = HEAP32[$6>>2]|0; $8 = ($0|0)<($1|0); if (!($8)) { STACKTOP = sp;return; } $$05465 = $0;$$05664 = $1; while(1) { $9 = (($$05465) + ($$05664))|0; $10 = (1)?($9 >> 1):($9); _StringsBuffer_UNSAFE_Get($2,$5,$10); $11 = ($$05465|0)>($$05664|0); if ($11) { $$0$lcssa = $$05664;$$051$lcssa = $$05465; } else { $$05161 = $$05465;$$062 = $$05664; while(1) { $$152 = $$05161; while(1) { _StringsBuffer_UNSAFE_Get($3,$5,$$152); $12 = (_String_Compare($2,$3)|0); $13 = ($12|0)>(0); $14 = (($$152) + 1)|0; if ($13) { $$152 = $14; } else { break; } } $$1 = $$062; while(1) { _StringsBuffer_UNSAFE_Get($4,$5,$$1); $15 = (_String_Compare($2,$4)|0); $16 = ($15|0)<(0); $17 = (($$1) + -1)|0; if ($16) { $$1 = $17; } else { break; } } $18 = ($$152|0)>($$1|0); $19 = (($7) + ($$152<<2)|0); $20 = (($7) + ($$1<<2)|0); if ($18) { $$2 = $$1;$$253 = $$152; } else { $21 = (($$1) + -1)|0; $22 = (($$152) + 1)|0; $23 = HEAP32[$19>>2]|0; $24 = HEAP32[$20>>2]|0; HEAP32[$19>>2] = $24; HEAP32[$20>>2] = $23; $$2 = $21;$$253 = $22; } $25 = ($$253|0)>($$2|0); if ($25) { $$0$lcssa = $$2;$$051$lcssa = $$253; break; } else { $$05161 = $$253;$$062 = $$2; } } } $26 = (($$0$lcssa) - ($$05465))|0; $27 = (($$05664) - ($$051$lcssa))|0; $28 = ($26|0)>($27|0); if ($28) { $30 = ($$05664|0)>($$051$lcssa|0); if ($30) { _StringsBuffer_QuickSort($$051$lcssa,$$05664); $$155 = $$05465;$$157 = $$0$lcssa; } else { $$155 = $$05465;$$157 = $$0$lcssa; } } else { $29 = ($$0$lcssa|0)>($$05465|0); if ($29) { _StringsBuffer_QuickSort($$05465,$$0$lcssa); $$155 = $$051$lcssa;$$157 = $$05664; } else { $$155 = $$051$lcssa;$$157 = $$05664; } } $31 = ($$155|0)<($$157|0); if ($31) { $$05465 = $$155;$$05664 = $$157; } else { break; } } STACKTOP = sp;return; } function _WordWrap_Do($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$04864 = 0, $$049$lcssa = 0, $$04957 = 0, $$05060 = 0, $$161 = 0, $$2$ph = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $8 = 0, $9 = 0, $exitcond = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $4 = sp + 16|0; $5 = sp + 8|0; $6 = sp; $7 = ($2|0)>(0); if (!($7)) { STACKTOP = sp;return; } $$04864 = 0; while(1) { $8 = (($1) + ($$04864<<3)|0); $9 = 1949280; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = (($9) + 4)|0; $13 = $12; $14 = HEAP32[$13>>2]|0; $15 = $8; $16 = $15; HEAP32[$16>>2] = $11; $17 = (($15) + 4)|0; $18 = $17; HEAP32[$18>>2] = $14; $19 = (($$04864) + 1)|0; $exitcond = ($19|0)==($2|0); if ($exitcond) { break; } else { $$04864 = $19; } } $20 = ($2|0)>(0); if (!($20)) { STACKTOP = sp;return; } $21 = ((($0)) + 4|0); $22 = ($3|0)<(0); $$05060 = 0;$$161 = 0; while(1) { $23 = (($$05060) + ($3))|0; $24 = HEAP16[$21>>1]|0; $25 = $24&65535; $26 = ($23|0)<($25|0); if (!($26)) { break; } L13: do { if ($22) { $$049$lcssa = $23; } else { $27 = HEAP32[$0>>2]|0; $$04957 = $23; while(1) { $28 = (($27) + ($$04957)|0); $29 = HEAP8[$28>>0]|0; $30 = (_WordWrap_IsWrapper($29)|0); $31 = ($30<<24>>24)==(0); if (!($31)) { $$049$lcssa = $$04957; break L13; } $32 = (($$04957) + -1)|0; $33 = ($$04957|0)>($$05060|0); if ($33) { $$04957 = $32; } else { $$049$lcssa = $32; break; } } } } while(0); $34 = (($$049$lcssa) + 1)|0; $35 = ($$049$lcssa|0)>=($$05060|0); $36 = ($34|0)<($23|0); $or$cond = $35 & $36; $37 = (($1) + ($$161<<3)|0); if ($or$cond) { $48 = (($34) - ($$05060))|0; _String_UNSAFE_Substring($6,$0,$$05060,$48); $49 = $6; $50 = $49; $51 = HEAP32[$50>>2]|0; $52 = (($49) + 4)|0; $53 = $52; $54 = HEAP32[$53>>2]|0; $55 = $37; $56 = $55; HEAP32[$56>>2] = $51; $57 = (($55) + 4)|0; $58 = $57; HEAP32[$58>>2] = $54; $$2$ph = $34; } else { _String_UNSAFE_Substring($5,$0,$$05060,$3); $38 = $5; $39 = $38; $40 = HEAP32[$39>>2]|0; $41 = (($38) + 4)|0; $42 = $41; $43 = HEAP32[$42>>2]|0; $44 = $37; $45 = $44; HEAP32[$45>>2] = $40; $46 = (($44) + 4)|0; $47 = $46; HEAP32[$47>>2] = $43; $$2$ph = $23; } $70 = (($$161) + 1)|0; $71 = ($70|0)<($2|0); if ($71) { $$05060 = $$2$ph;$$161 = $70; } else { label = 16; break; } } if ((label|0) == 16) { STACKTOP = sp;return; } $59 = (($1) + ($$161<<3)|0); _String_UNSAFE_SubstringAt($4,$0,$$05060); $60 = $4; $61 = $60; $62 = HEAP32[$61>>2]|0; $63 = (($60) + 4)|0; $64 = $63; $65 = HEAP32[$64>>2]|0; $66 = $59; $67 = $66; HEAP32[$67>>2] = $62; $68 = (($66) + 4)|0; $69 = $68; HEAP32[$69>>2] = $65; STACKTOP = sp;return; } function _WordWrap_IsWrapper($0) { $0 = $0|0; var $1 = 0, $2 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; switch ($0<<24>>24) { case 47: case 60: case 62: case 45: case 32: case 0: { $2 = 1; break; } default: { $1 = ($0<<24>>24)==(92); $phitmp = $1&1; $2 = $phitmp; } } return ($2|0); } function _WordWrap_GetCoords($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$02731 = 0, $$02830 = 0, $$pr = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $5 = ($0|0)==(-1); $spec$select = $5 ? 2147483647 : $0; HEAP32[$3>>2] = -1; HEAP32[$4>>2] = 0; $6 = ($2|0)>(0); L1: do { if ($6) { $$02731 = 0;$$02830 = 0; while(1) { $9 = (((($1) + ($$02830<<3)|0)) + 4|0); $10 = HEAP16[$9>>1]|0; $11 = ($10<<16>>16)==(0); if ($11) { label = 7; break L1; } $12 = $10&65535; HEAP32[$4>>2] = $$02830; $13 = (($$02731) + ($12))|0; $14 = ($spec$select|0)<($13|0); $7 = (($$02830) + 1)|0; if ($14) { break; } $8 = ($7|0)<($2|0); if ($8) { $$02731 = $13;$$02830 = $7; } else { label = 7; break L1; } } $15 = (($spec$select) - ($$02731))|0; HEAP32[$3>>2] = $15; $16 = $15; } else { label = 7; } } while(0); if ((label|0) == 7) { $$pr = HEAP32[$3>>2]|0; $16 = $$pr; } $17 = ($16|0)==(-1); if (!($17)) { return; } $18 = HEAP32[$4>>2]|0; $19 = (((($1) + ($18<<3)|0)) + 4|0); $20 = HEAP16[$19>>1]|0; $21 = $20&65535; HEAP32[$3>>2] = $21; return; } function _WordWrap_GetBackLength($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$016$lcssa = 0, $$01620 = 0, $$1$lcssa = 0, $$117 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)<(1); if ($2) { $$0 = 0; return ($$0|0); } $3 = ((($0)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = $4&65535; $6 = ($5|0)>($1|0); if (!($6)) { _Logger_Abort(44161); } $7 = HEAP32[$0>>2]|0; $$01620 = $1; while(1) { $8 = (($7) + ($$01620)|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(32); if (!($10)) { $$016$lcssa = $$01620; break; } $11 = (($$01620) + -1)|0; $12 = ($$01620|0)>(1); if ($12) { $$01620 = $11; } else { $$016$lcssa = $11; break; } } $13 = ($$016$lcssa|0)>(0); L11: do { if ($13) { $14 = HEAP32[$0>>2]|0; $$117 = $$016$lcssa; while(1) { $15 = (($14) + ($$117)|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(32); if ($17) { $$1$lcssa = $$117; break L11; } $18 = (($$117) + -1)|0; $19 = ($$117|0)>(1); if ($19) { $$117 = $18; } else { $$1$lcssa = $18; break; } } } else { $$1$lcssa = $$016$lcssa; } } while(0); $20 = (($1) - ($$1$lcssa))|0; $$0 = $20; return ($$0|0); } function _WordWrap_GetForwardLength($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$019$lcssa = 0, $$01924 = 0, $$1$lcssa = 0, $$121 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = $3&65535; $5 = ($1|0)==(-1); if ($5) { $$0 = 0; return ($$0|0); } $6 = ($4|0)>($1|0); if (!($6)) { _Logger_Abort(44211); } $7 = ($4|0)>($1|0); L7: do { if ($7) { $8 = HEAP32[$0>>2]|0; $$01924 = $1; while(1) { $9 = (($8) + ($$01924)|0); $10 = HEAP8[$9>>0]|0; $11 = ($10<<24>>24)==(32); if ($11) { $$019$lcssa = $$01924; break L7; } $12 = (($$01924) + 1)|0; $13 = ($12|0)<($4|0); if ($13) { $$01924 = $12; } else { $$019$lcssa = $12; break; } } } else { $$019$lcssa = $1; } } while(0); $14 = ($$019$lcssa|0)<($4|0); L13: do { if ($14) { $15 = HEAP32[$0>>2]|0; $$121 = $$019$lcssa; while(1) { $16 = (($15) + ($$121)|0); $17 = HEAP8[$16>>0]|0; $18 = ($17<<24>>24)==(32); if (!($18)) { $$1$lcssa = $$121; break L13; } $19 = (($$121) + 1)|0; $20 = ($19|0)<($4|0); if ($20) { $$121 = $19; } else { $$1$lcssa = $19; break; } } } else { $$1$lcssa = $$019$lcssa; } } while(0); $21 = (($$1$lcssa) - ($1))|0; $$0 = $21; return ($$0|0); } function _OnInit_2024() { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; _Event_Register((1792488),0,11); _Event_Register((1793528),0,451); _Event_Register((1793788),0,452); HEAP16[(21788)>>1] = 0; $1 = (_Options_UNSAFE_Get(44521,$0)|0); $2 = ($1<<24>>24)==(0); if ($2) { _String_AppendString(21784,13120); } else { _String_Format1(21784,44536,$0); } HEAP32[487846] = 0; _TextureEntry_Register(21824); (_Utils_EnsureDirectory(44548)|0); (_Utils_EnsureDirectory(44483)|0); _TextureCache_Init(); STACKTOP = sp;return; } function _OnFree_2025() { var label = 0, sp = 0; sp = STACKTOP; _OnContextLost_2041(0); _Atlas2D_Free(); HEAP16[(21780)>>1] = 0; HEAP32[487846] = 0; return; } function _OnReset_2026() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP16[(21780)>>1]|0; $1 = ($0<<16>>16)==(0); if ($1) { return; } HEAP16[(21780)>>1] = 0; (_TexturePack_ExtractCurrent(0)|0); return; } function _TexturePack_ExtractCurrent($0) { $0 = $0|0; var $$0 = 0, $$1 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $1 = sp; $2 = sp + 8|0; $3 = 21776; $4 = $3; $5 = HEAP32[$4>>2]|0; $6 = (($3) + 4)|0; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = $1; $10 = $9; HEAP32[$10>>2] = $5; $11 = (($9) + 4)|0; $12 = $11; HEAP32[$12>>2] = $8; $13 = HEAP8[1972897]|0; $14 = ($13<<24>>24)!=(0); $15 = ($0<<24>>24)==(0); $or$cond = $15 & $14; if ($or$cond) { $$0 = 0; } else { $16 = (_ExtractDefault()|0); HEAP8[1972897] = 1; $$0 = $16; } $17 = ((($1)) + 4|0); $18 = HEAP16[$17>>1]|0; $19 = ($18<<16>>16)==(0); if ($19) { $$1 = $$0; STACKTOP = sp;return ($$1|0); } $20 = (_OpenCachedData($1,$2)|0); $21 = ($20<<24>>24)==(0); if ($21) { $$1 = $$0; STACKTOP = sp;return ($$1|0); } $22 = (_ExtractFrom($2,$1)|0); HEAP8[1972897] = 0; $23 = ((($2)) + 28|0); $24 = HEAP32[$23>>2]|0; (FUNCTION_TABLE_ii[$24 & 31]($2)|0); $$1 = $22; STACKTOP = sp;return ($$1|0); } function _ExtractDefault() { var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; $1 = HEAP8[1972839]|0; $2 = ($1<<24>>24)==(0); $3 = 21784; $4 = $3; $5 = HEAP32[$4>>2]|0; $6 = (($3) + 4)|0; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = 13120; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = (($9) + 4)|0; $13 = $12; $14 = HEAP32[$13>>2]|0; $15 = $2 ? $5 : $11; $16 = $2 ? $8 : $14; $17 = $0; $18 = $17; HEAP32[$18>>2] = $15; $19 = (($17) + 4)|0; $20 = $19; HEAP32[$20>>2] = $16; $21 = (_ExtractFromFile(13120)|0); $22 = (_String_CaselessEquals($0,13120)|0); $23 = ($22|0)==(0); if (!($23)) { $$0 = $21; STACKTOP = sp;return ($$0|0); } $24 = (_ExtractFromFile($0)|0); $$0 = $24; STACKTOP = sp;return ($$0|0); } function _OpenCachedData($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $2 = sp + 264|0; $3 = sp; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 260; _MakeCachePath($2,$0); $6 = (_Stream_OpenFile($1,$2)|0); $7 = HEAP32[5238]|0; $8 = ($6|0)==($7|0); if ($8) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $9 = ($6|0)==(0); if ($9) { $$0 = 1; STACKTOP = sp;return ($$0|0); } _Logger_SysWarn2($6,44465,$0); $$0 = 0; STACKTOP = sp;return ($$0|0); } function _ExtractFrom($0,$1) { $0 = $0|0; $1 = $1|0; var $$011 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $switch$split2D = 0, label = 0, sp = 0; sp = STACKTOP; _Event_RaiseVoid((1792228)); $2 = HEAP8[(1803128)>>0]|0; $3 = ($2<<24>>24)==(0); L1: do { if ($3) { HEAP8[1972898] = 0; $4 = (_ExtractPng($0)|0); $switch$split2D = ($4|0)<(0); L3: do { if ($switch$split2D) { switch ($4|0) { case -857812961: { break; } default: { break L3; } } $5 = (_Zip_Extract($0,26,1)|0); $6 = ($5|0)==(0); if ($6) { $$011 = 0; break L1; } _Logger_SysWarn2($5,44264,$1); $$011 = $5; break L1; } else { switch ($4|0) { case 0: { $$011 = $4; break L1; } default: { } } } } while(0); _Logger_SysWarn2($4,44275,$1); $$011 = $4; } else { HEAP8[1972898] = 1; $$011 = 0; } } while(0); return ($$011|0); } function _ExtractPng($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = (_Png_Decode($1,$0)|0); $3 = ($2|0)==(0); if ($3) { $4 = (_Atlas_TryChange($1)|0); $5 = ($4<<24>>24)==(0); if (!($5)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } } $6 = HEAP32[$1>>2]|0; _Mem_Free($6); $$0 = $2; STACKTOP = sp;return ($$0|0); } function _SelectZipEntry($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return 1; } function _ProcessZipEntry($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; $4 = $0; $5 = $4; $6 = HEAP32[$5>>2]|0; $7 = (($4) + 4)|0; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = $3; $11 = $10; HEAP32[$11>>2] = $6; $12 = (($10) + 4)|0; $13 = $12; HEAP32[$13>>2] = $9; _Utils_UNSAFE_GetFilename($3); _Event_RaiseEntry((1792488),$1,$3); STACKTOP = sp;return 0; } function _Atlas_TryChange($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_Game_ValidateBitmap(21816,$0)|0); $2 = ($1<<24>>24)==(0); if ($2) { $$0 = 0; return ($$0|0); } $3 = ((($0)) + 8|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 4|0); $6 = HEAP32[$5>>2]|0; $7 = ($4|0)<($6|0); if ($7) { _Chat_AddRaw(44284); _Chat_AddRaw(44335); $$0 = 0; return ($$0|0); } $8 = ($6|0)<(16); if ($8) { _Chat_AddRaw(44284); _Chat_AddRaw(44373); $$0 = 0; return ($$0|0); } $9 = HEAP8[(1803128)>>0]|0; $10 = ($9<<24>>24)==(0); if (!($10)) { $$0 = 0; return ($$0|0); } _Atlas1D_Free(); _Atlas2D_Free(); _Atlas_Update($0); _Event_RaiseVoid(1791968); $$0 = 1; return ($$0|0); } function _Atlas1D_Free() { var $$04 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[487323]|0; $1 = ($0|0)>(0); if (!($1)) { return; } $$04 = 0; while(1) { $2 = (1949312 + ($$04<<2)|0); _Gfx_DeleteTexture($2); $3 = (($$04) + 1)|0; $4 = HEAP32[487323]|0; $5 = ($3|0)<($4|0); if ($5) { $$04 = $3; } else { break; } } return; } function _Atlas2D_Free() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[487840]|0; _Mem_Free($0); HEAP32[487840] = 0; HEAP32[(1951376)>>2] = 0; return; } function _Atlas_Update($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; ;HEAP32[1951360>>2]=HEAP32[$0>>2]|0;HEAP32[1951360+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[1951360+8>>2]=HEAP32[$0+8>>2]|0; $1 = ((($0)) + 4|0); $2 = HEAP32[$1>>2]|0; $3 = (($2|0) / 16)&-1; HEAP32[(1951372)>>2] = $3; $4 = ((($0)) + 8|0); $5 = HEAP32[$4>>2]|0; $6 = (($5|0) / ($3|0))&-1; $7 = ($6|0)<(32); $8 = $7 ? $6 : 32; HEAP32[(1951376)>>2] = $8; _Atlas_Update1D(); _Atlas_Convert2DTo1D(); return; } function _Atlas_Update1D() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1803120)>>2]|0; $1 = ($0|0)<(4096); $2 = $1 ? $0 : 4096; $3 = HEAP32[(1951372)>>2]|0; $4 = (($2|0) / ($3|0))&-1; $5 = HEAP32[(1951376)>>2]|0; $6 = $5 << 4; $7 = ($4|0)<($6|0); $8 = $7 ? $4 : $6; HEAP32[(1949296)>>2] = $8; $9 = (_Math_CeilDiv($6,$8)|0); HEAP32[487323] = $9; $10 = HEAP32[(1949296)>>2]|0; $11 = (+($10|0)); $12 = 1.0 / $11; HEAPF32[(1949308)>>2] = $12; $13 = (($10) + -1)|0; HEAP32[(1949300)>>2] = $13; $14 = (_Math_Log2($10)|0); HEAP32[(1949304)>>2] = $14; return; } function _Atlas_Convert2DTo1D() { var $$02833 = 0, $$02932 = 0, $$031 = 0, $$1$lcssa = 0, $$130 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $0 = sp + 16|0; $1 = sp + 12|0; $2 = sp; $3 = HEAP32[(1951372)>>2]|0; $4 = HEAP32[(1949296)>>2]|0; HEAP32[$0>>2] = $4; $5 = HEAP32[487323]|0; HEAP32[$1>>2] = $5; _Platform_Log2(44411,$1,$0); $6 = HEAP32[$0>>2]|0; $7 = Math_imul($6, $3)|0; _Bitmap_Allocate($2,$3,$7); $8 = HEAP32[$1>>2]|0; $9 = ($8|0)>(0); if (!($9)) { $26 = HEAP32[$2>>2]|0; _Mem_Free($26); STACKTOP = sp;return; } $$02833 = 0;$$02932 = 0; while(1) { $10 = HEAP32[$0>>2]|0; $11 = ($10|0)>(0); if ($11) { $$031 = 0;$$130 = $$02932; while(1) { $12 = $$130 & 15; $13 = Math_imul($12, $3)|0; $14 = (4)?($$130 >> 4):($$130); $15 = Math_imul($14, $3)|0; $16 = Math_imul($$031, $3)|0; _Bitmap_UNSAFE_CopyBlock($13,$15,0,$16,1951360,$2,$3); $17 = (($$031) + 1)|0; $18 = (($$130) + 1)|0; $19 = HEAP32[$0>>2]|0; $20 = ($17|0)<($19|0); if ($20) { $$031 = $17;$$130 = $18; } else { $$1$lcssa = $18; break; } } } else { $$1$lcssa = $$02932; } $21 = (1949312 + ($$02833<<2)|0); $22 = HEAP8[(1803129)>>0]|0; _Gfx_RecreateTexture($21,$2,3,$22); $23 = (($$02833) + 1)|0; $24 = HEAP32[$1>>2]|0; $25 = ($23|0)<($24|0); if ($25) { $$02833 = $23;$$02932 = $$1$lcssa; } else { break; } } $26 = HEAP32[$2>>2]|0; _Mem_Free($26); STACKTOP = sp;return; } function _MakeCachePath($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp + 24|0; $3 = sp; HEAP32[$2>>2] = $3; $4 = ((($2)) + 4|0); HEAP16[$4>>1] = 0; $5 = ((($2)) + 6|0); HEAP16[$5>>1] = 24; _HashUrl($2,$1); _Directory_GetCachePath($0,44483); _String_Format1($0,44496,$2); STACKTOP = sp;return; } function _HashUrl($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[$1>>2]|0; $3 = ((($1)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = $4&65535; $6 = (_Utils_CRC32($2,$5)|0); _String_AppendUInt32($0,$6); return; } function _ExtractFromFile($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $1 = sp; $2 = (_Stream_OpenFile($1,$0)|0); $3 = ($2|0)==(0); if ($3) { $13 = (_ExtractFrom($1,$0)|0); $14 = ((($1)) + 28|0); $15 = HEAP32[$14>>2]|0; (FUNCTION_TABLE_ii[$15 & 31]($1)|0); $$0 = $13; STACKTOP = sp;return ($$0|0); } $4 = HEAP32[5238]|0; $5 = ($2|0)==($4|0); if ($5) { $6 = (_String_CaselessEquals($0,13120)|0); $7 = ($6|0)!=(0); $phitmp = $7&1; $11 = $phitmp; } else { $11 = 0; } $8 = HEAP8[1972846]|0; $9 = $8&255; $10 = $11 | $9; $12 = $10&255; HEAP8[1972846] = $12; _Logger_SysWarn2($2,45056,$0); $$0 = $2; STACKTOP = sp;return ($$0|0); } function _OnContextLost_2041($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803130)>>0]|0; $2 = ($1<<24>>24)==(0); if (!($2)) { return; } _Atlas1D_Free(); return; } function _OnFileChanged($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $$08 = 0, $$09 = 0, $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $$08 = HEAP32[487846]|0; $3 = ($$08|0)==(0|0); if ($3) { return; } $$09 = $$08; while(1) { $4 = HEAP32[$$09>>2]|0; $5 = (_String_CaselessEqualsConst($2,$4)|0); $6 = ($5|0)==(0); if (!($6)) { break; } $9 = ((($$09)) + 8|0); $$0 = HEAP32[$9>>2]|0; $10 = ($$0|0)==(0|0); if ($10) { label = 6; break; } else { $$09 = $$0; } } if ((label|0) == 6) { return; } $7 = ((($$09)) + 4|0); $8 = HEAP32[$7>>2]|0; FUNCTION_TABLE_vii[$8 & 255]($1,$2); return; } function _OnContextRecreated_2042($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803130)>>0]|0; $2 = ($1<<24>>24)!=(0); $3 = HEAP8[1972898]|0; $4 = ($3<<24>>24)==(0); $or$cond = $2 & $4; if ($or$cond) { return; } (_TexturePack_ExtractCurrent(1)|0); return; } function _TextureEntry_Register($0) { $0 = $0|0; var $$sink = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[487846]|0; $2 = ($1|0)==(0|0); $3 = HEAP32[492999]|0; $4 = ((($3)) + 8|0); $$sink = $2 ? 1951384 : $4; HEAP32[$$sink>>2] = $0; HEAP32[492999] = $0; $5 = ((($0)) + 8|0); HEAP32[$5>>2] = 0; return; } function _TextureCache_Init() { var label = 0, sp = 0; sp = STACKTOP; (_EntryList_UNSAFE_Load(1951388,44557)|0); (_EntryList_UNSAFE_Load(1956540,44587)|0); (_EntryList_UNSAFE_Load(1961692,44615)|0); (_EntryList_UNSAFE_Load(1966844,44638)|0); return; } function _TerrainPngProcess($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_Png_Decode($2,$0)|0); $4 = ($3|0)==(0); if (!($4)) { _Logger_SysWarn2($3,44275,$1); $5 = HEAP32[$2>>2]|0; _Mem_Free($5); STACKTOP = sp;return; } $6 = (_Atlas_TryChange($2)|0); $7 = ($6<<24>>24)==(0); if (!($7)) { STACKTOP = sp;return; } $8 = HEAP32[$2>>2]|0; _Mem_Free($8); STACKTOP = sp;return; } function _Atlas1D_TexRec($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$sroa$4$0$$sroa_idx3 = 0, $$sroa$6$0$$sroa_idx5 = 0, $$sroa$7$0$$sroa_idx7 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $4 = $1&65535; $5 = HEAP32[(1949300)>>2]|0; $6 = $5 & $4; $7 = HEAP32[(1949304)>>2]|0; $8 = ($7)?($4 >>> $7):($4); HEAP32[$3>>2] = $8; $9 = (+($6|0)); $10 = +HEAPF32[(1949308)>>2]; $11 = $10 * $9; $12 = (($2) + -1)|0; $13 = (+($12|0)); $14 = $13 + 0.99937498569488525; $15 = $10 * 0.99937498569488525; $16 = $11 + $15; HEAPF32[$0>>2] = 0.0; $$sroa$4$0$$sroa_idx3 = ((($0)) + 4|0); HEAPF32[$$sroa$4$0$$sroa_idx3>>2] = $11; $$sroa$6$0$$sroa_idx5 = ((($0)) + 8|0); HEAPF32[$$sroa$6$0$$sroa_idx5>>2] = $14; $$sroa$7$0$$sroa_idx7 = ((($0)) + 12|0); HEAPF32[$$sroa$7$0$$sroa_idx7>>2] = $16; return; } function _Atlas2D_LoadTile($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16400|0; $1 = sp; $2 = sp + 16384|0; $3 = HEAP32[(1951372)>>2]|0; $4 = ($3|0)>(64); if ($4) { _Bitmap_Allocate($2,$3,$3); $5 = (_Atlas_LoadTile_Raw($0,$2)|0); $6 = HEAP32[$2>>2]|0; _Mem_Free($6); $$0 = $5; STACKTOP = sp;return ($$0|0); } else { $7 = ((($2)) + 4|0); HEAP32[$7>>2] = $3; $8 = ((($2)) + 8|0); HEAP32[$8>>2] = $3; HEAP32[$2>>2] = $1; $9 = (_Atlas_LoadTile_Raw($0,$2)|0); $$0 = $9; STACKTOP = sp;return ($$0|0); } } function _Atlas_LoadTile_Raw($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1951372)>>2]|0; $3 = $0&65535; $4 = (4)?($3 >>> 4):($3); $5 = HEAP32[(1951376)>>2]|0; $6 = ($4|0)<($5|0); if (!($6)) { $$0 = 0; return ($$0|0); } $7 = Math_imul($2, $4)|0; $8 = $3 & 15; $9 = Math_imul($2, $8)|0; _Bitmap_UNSAFE_CopyBlock($9,$7,0,0,1951360,$1,$2); $10 = HEAP8[(1803129)>>0]|0; $11 = (_Gfx_CreateTexture($1,0,$10)|0); $$0 = $11; return ($$0|0); } function _TextureCache_HasAccepted($0) { $0 = $0|0; var $$lobit = 0, $$not = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_EntryList_Find(1951388,$0,32)|0); $$lobit = (31)?($1 >>> 31):($1); $2 = $$lobit&255; $$not = $2 ^ 1; return ($$not|0); } function _TextureCache_HasDenied($0) { $0 = $0|0; var $$lobit = 0, $$not = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_EntryList_Find(1956540,$0,32)|0); $$lobit = (31)?($1 >>> 31):($1); $2 = $$lobit&255; $$not = $2 ^ 1; return ($$not|0); } function _TextureCache_Accept($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _EntryList_Set(1951388,$0,1949280,32); _EntryList_Save(1951388,44557); return; } function _TextureCache_Deny($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _EntryList_Set(1956540,$0,1949280,32); _EntryList_Save(1956540,44587); return; } function _TextureCache_ClearDenied() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[(1956548)>>2]|0; _StringsBuffer_Clear(1956540); _EntryList_Save(1956540,44587); return ($0|0); } function _TexturePack_SetDefault($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; HEAP16[(21788)>>1] = 0; _String_Format1(21784,44536,$0); _Options_Set(44521,$0); return; } function _TexturePack_CheckPending() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 320|0; $0 = sp; $1 = HEAP32[487845]|0; $2 = (_Http_GetResult($1,$0)|0); $3 = ($2<<24>>24)==(0); L1: do { if (!($3)) { $4 = ((($0)) + 301|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(0); if (!($6)) { _ApplyDownloaded($0); $7 = ((($0)) + 156|0); $8 = HEAP32[$7>>2]|0; _Mem_Free($8); break; } $9 = ((($0)) + 152|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0); if (!($11)) { _Logger_Warn($10,44668,74); break; } $12 = ((($0)) + 144|0); $13 = HEAP32[$12>>2]|0; switch ($13|0) { case 304: case 200: { break L1; } case 404: { _Chat_AddRaw(44700); _Chat_AddRaw(44759); break L1; } case 403: case 401: { _Chat_Add1(44820,$12); _Chat_AddRaw(44883); break L1; } default: { _Chat_Add1(44935,$12); break L1; } } } } while(0); STACKTOP = sp;return; } function _ApplyDownloaded($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $1 = sp + 8|0; $2 = sp; _String_FromRaw($2,$0,128); _UpdateCache($0); $3 = (_String_Equals(21776,$2)|0); $4 = ($3|0)==(0); if ($4) { STACKTOP = sp;return; } $5 = ((($0)) + 156|0); $6 = HEAP32[$5>>2]|0; $7 = ((($0)) + 160|0); $8 = HEAP32[$7>>2]|0; _Stream_ReadonlyMemory($1,$6,$8); (_ExtractFrom($1,$2)|0); HEAP8[1972897] = 0; STACKTOP = sp;return; } function _UpdateCache($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 288|0; $1 = sp + 280|0; $2 = sp + 272|0; $3 = sp; $4 = sp + 264|0; _String_FromRaw($2,$0,128); $5 = ((($0)) + 236|0); _String_FromRaw($1,$5,64); _SetCachedTag($2,1961692,$1,44615); $6 = ((($0)) + 172|0); _String_FromRaw($4,$6,64); $7 = $4; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = (($7) + 4)|0; $11 = $10; $12 = HEAP32[$11>>2]|0; $13 = $1; $14 = $13; HEAP32[$14>>2] = $9; $15 = (($13) + 4)|0; $16 = $15; HEAP32[$16>>2] = $12; _SetCachedTag($2,1966844,$1,44638); HEAP32[$1>>2] = $3; $17 = ((($1)) + 4|0); HEAP16[$17>>1] = 0; $18 = ((($1)) + 6|0); HEAP16[$18>>1] = 260; _MakeCachePath($1,$2); $19 = ((($0)) + 156|0); $20 = HEAP32[$19>>2]|0; $21 = ((($0)) + 160|0); $22 = HEAP32[$21>>2]|0; $23 = (_Stream_WriteAllTo($1,$20,$22)|0); $24 = ($23|0)==(0); if ($24) { STACKTOP = sp;return; } _Logger_SysWarn2($23,44983,$2); STACKTOP = sp;return; } function _SetCachedTag($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $4 = sp + 24|0; $5 = sp; $6 = ((($2)) + 4|0); $7 = HEAP16[$6>>1]|0; $8 = ($7<<16>>16)==(0); if ($8) { STACKTOP = sp;return; } HEAP32[$4>>2] = $5; $9 = ((($4)) + 4|0); HEAP16[$9>>1] = 0; $10 = ((($4)) + 6|0); HEAP16[$10>>1] = 24; _HashUrl($4,$0); _EntryList_Set($1,$4,$2,32); _EntryList_Save($1,$3); STACKTOP = sp;return; } function _TexturePack_Extract($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP16[$1>>1]|0; $3 = ($2<<16>>16)==(0); if (!($3)) { _DownloadAsync($0); } $4 = (_String_Equals($0,21776)|0); $5 = ($4|0)==(0); if (!($5)) { return; } _String_Copy(21776,$0); (_TexturePack_ExtractCurrent(0)|0); return; } function _DownloadAsync($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $1 = sp + 24|0; $2 = sp + 16|0; $3 = sp + 8|0; $4 = sp; $5 = 1949280; $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = (($5) + 4)|0; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = $1; $12 = $11; HEAP32[$12>>2] = $7; $13 = (($11) + 4)|0; $14 = $13; HEAP32[$14>>2] = $10; $15 = $2; $16 = $15; HEAP32[$16>>2] = $7; $17 = (($15) + 4)|0; $18 = $17; HEAP32[$18>>2] = $10; $19 = (_IsCached($0)|0); $20 = ($19|0)==(0); if ($20) { $41 = HEAP32[487845]|0; _Http_TryCancel($41); $42 = (_Http_AsyncGetDataEx($0,1,$2,$1,0)|0); HEAP32[487845] = $42; STACKTOP = sp;return; } _GetCachedLastModified($3,$0); $21 = $3; $22 = $21; $23 = HEAP32[$22>>2]|0; $24 = (($21) + 4)|0; $25 = $24; $26 = HEAP32[$25>>2]|0; $27 = $2; $28 = $27; HEAP32[$28>>2] = $23; $29 = (($27) + 4)|0; $30 = $29; HEAP32[$30>>2] = $26; _GetCachedETag($4,$0); $31 = $4; $32 = $31; $33 = HEAP32[$32>>2]|0; $34 = (($31) + 4)|0; $35 = $34; $36 = HEAP32[$35>>2]|0; $37 = $1; $38 = $37; HEAP32[$38>>2] = $33; $39 = (($37) + 4)|0; $40 = $39; HEAP32[$40>>2] = $36; $41 = HEAP32[487845]|0; _Http_TryCancel($41); $42 = (_Http_AsyncGetDataEx($0,1,$2,$1,0)|0); HEAP32[487845] = $42; STACKTOP = sp;return; } function _IsCached($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $1 = sp + 264|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 260; _MakeCachePath($1,$0); $5 = (_File_Exists($1)|0); STACKTOP = sp;return ($5|0); } function _GetCachedLastModified($0,$1) { $0 = $0|0; $1 = $1|0; var $$06 = 0, $$off = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; _GetCachedTag($2,$1,1966844); $3 = ((($2)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = ($4<<16>>16)==(0); L1: do { if (!($5)) { $6 = HEAP32[$2>>2]|0; $7 = HEAP16[$3>>1]|0; $8 = $7&65535; $$06 = 0; while(1) { $11 = (($6) + ($$06)|0); $12 = HEAP8[$11>>0]|0; $$off = (($12) + -48)<<24>>24; $13 = ($$off&255)>(9); $9 = (($$06) + 1)|0; if ($13) { break; } $10 = ($9>>>0)<($8>>>0); if ($10) { $$06 = $9; } else { break L1; } } $14 = $2; $15 = $14; $16 = HEAP32[$15>>2]|0; $17 = (($14) + 4)|0; $18 = $17; $19 = HEAP32[$18>>2]|0; $20 = $0; $21 = $20; HEAP32[$21>>2] = $16; $22 = (($20) + 4)|0; $23 = $22; HEAP32[$23>>2] = $19; STACKTOP = sp;return; } } while(0); HEAP16[$3>>1] = 0; $24 = $2; $25 = $24; $26 = HEAP32[$25>>2]|0; $27 = (($24) + 4)|0; $28 = $27; $29 = HEAP32[$28>>2]|0; $30 = $0; $31 = $30; HEAP32[$31>>2] = $26; $32 = (($30) + 4)|0; $33 = $32; HEAP32[$33>>2] = $29; STACKTOP = sp;return; } function _GetCachedETag($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _GetCachedTag($0,$1,1961692); return; } function _GetCachedTag($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $3 = sp + 24|0; $4 = sp; HEAP32[$3>>2] = $4; $5 = ((($3)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($3)) + 6|0); HEAP16[$6>>1] = 24; _HashUrl($3,$1); _EntryList_UNSAFE_Get($0,$2,$3,32); STACKTOP = sp;return; } function _Utils_ParseEnum($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$08 = 0, $$09 = 0, $10 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($3|0)>(0); if (!($4)) { $$08 = $1; return ($$08|0); } $$09 = 0; while(1) { $5 = (($2) + ($$09<<2)|0); $6 = HEAP32[$5>>2]|0; $7 = (_String_CaselessEqualsConst($0,$6)|0); $8 = ($7|0)==(0); if (!($8)) { $$08 = $$09; label = 5; break; } $9 = (($$09) + 1)|0; $10 = ($9|0)<($3|0); if ($10) { $$09 = $9; } else { $$08 = $1; label = 5; break; } } if ((label|0) == 5) { return ($$08|0); } return (0)|0; } function _Utils_IsUrlPrefix($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (_String_IndexOfConst($0,44991)|0); $2 = ($1|0)==(0); if ($2) { $5 = 1; return ($5|0); } $3 = (_String_IndexOfConst($0,44999)|0); $4 = ($3|0)==(0); $phitmp = $4&1; $5 = $phitmp; return ($5|0); } function _Utils_EnsureDirectory($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; _String_FromReadonly($1,$0); $2 = (_Directory_Create($1)|0); $3 = ($2|0)==(0); $4 = HEAP32[5241]|0; $5 = ($2|0)==($4|0); $or$cond = $3 | $5; if ($or$cond) { $$0 = 1; STACKTOP = sp;return ($$0|0); } _Logger_SysWarn2($2,45008,$1); $$0 = 0; STACKTOP = sp;return ($$0|0); } function _Utils_UNSAFE_GetFilename($0) { $0 = $0|0; var $$013 = 0, $$013$in = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { STACKTOP = sp;return; } $5 = $3&65535; $6 = HEAP32[$0>>2]|0; $$013$in = $5; L4: while(1) { $$013 = (($$013$in) + -1)|0; $7 = (($6) + ($$013)|0); $8 = HEAP8[$7>>0]|0; switch ($8<<24>>24) { case 92: case 47: { break L4; } default: { } } $19 = ($$013$in|0)>(1); if ($19) { $$013$in = $$013; } else { label = 6; break; } } if ((label|0) == 6) { STACKTOP = sp;return; } _String_UNSAFE_SubstringAt($1,$0,$$013$in); $9 = $1; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = (($9) + 4)|0; $13 = $12; $14 = HEAP32[$13>>2]|0; $15 = $0; $16 = $15; HEAP32[$16>>2] = $11; $17 = (($15) + 4)|0; $18 = $17; HEAP32[$18>>2] = $14; STACKTOP = sp;return; } function _Utils_UNSAFE_TrimFirstDirectory($0) { $0 = $0|0; var $$011 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($0)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { STACKTOP = sp;return; } $5 = HEAP32[$0>>2]|0; $$011 = 0; L4: while(1) { $6 = (($5) + ($$011)|0); $7 = HEAP8[$6>>0]|0; switch ($7<<24>>24) { case 92: case 47: { break L4; } default: { } } $19 = (($$011) + 1)|0; $20 = HEAP16[$2>>1]|0; $21 = $20&65535; $22 = ($19>>>0)<($21>>>0); if ($22) { $$011 = $19; } else { label = 6; break; } } if ((label|0) == 6) { STACKTOP = sp;return; } $8 = (($$011) + 1)|0; _String_UNSAFE_SubstringAt($1,$0,$8); $9 = $1; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = (($9) + 4)|0; $13 = $12; $14 = HEAP32[$13>>2]|0; $15 = $0; $16 = $15; HEAP32[$16>>2] = $11; $17 = (($15) + 4)|0; $18 = $17; HEAP32[$18>>2] = $14; STACKTOP = sp;return; } function _Utils_AccumulateWheelDelta($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[$0>>2]; $3 = $2 + $1; $4 = (~~(($3))); $5 = (+($4|0)); $6 = $3 - $5; HEAPF32[$0>>2] = $6; return ($4|0); } function _Utils_CalcSkinType($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp23 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 8|0); $4 = HEAP32[$3>>2]|0; $5 = $4 << 1; $6 = ($2|0)==($5|0); if ($6) { $$0 = 0; return ($$0|0); } $7 = ($2|0)==($4|0); if (!($7)) { $$0 = -16; return ($$0|0); } $8 = (($2|0) / 64)&-1; $9 = HEAP32[$0>>2]|0; $10 = ($8*20)|0; $11 = Math_imul($10, $2)|0; $12 = (($9) + ($11<<2)|0); $13 = ($8*54)|0; $14 = (($12) + ($13<<2)|0); $15 = HEAP32[$14>>2]|0; $16 = ($15|0)>(-1); if ($16) { $$0 = 2; return ($$0|0); } $17 = $8 << 1; $18 = ($8*12)|0; $19 = (_IsAllBlack($0,$13,$10,$17,$18)|0); $20 = ($19<<24>>24)==(0); if ($20) { $$0 = 1; return ($$0|0); } $21 = $8 << 2; $22 = $8 << 4; $23 = ($8*50)|0; $24 = (_IsAllBlack($0,$23,$22,$17,$21)|0); $25 = ($24<<24>>24)==(0); $phitmp23 = $25 ? 1 : 2; $$0 = $phitmp23; return ($$0|0); } function _IsAllBlack($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$02226 = 0, $$02325 = 0, $$2 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $5 = (($4) + ($2))|0; $6 = ($4|0)>(0); if (!($6)) { $$2 = 1; return ($$2|0); } $7 = HEAP32[$0>>2]|0; $8 = ((($0)) + 4|0); $9 = HEAP32[$8>>2]|0; $10 = (($3) + ($1))|0; $11 = ($3|0)>(0); $$02226 = $2; L4: while(1) { $12 = Math_imul($9, $$02226)|0; $13 = (($7) + ($12<<2)|0); if ($11) { $$02325 = $1; while(1) { $16 = (($13) + ($$02325<<2)|0); $17 = HEAP32[$16>>2]|0; $18 = ($17|0)==(-16777216); $14 = (($$02325) + 1)|0; if (!($18)) { $$2 = 0; label = 8; break L4; } $15 = ($14|0)<($10|0); if ($15) { $$02325 = $14; } else { break; } } } $19 = (($$02226) + 1)|0; $20 = ($19|0)<($5|0); if ($20) { $$02226 = $19; } else { $$2 = 1; label = 8; break; } } if ((label|0) == 8) { return ($$2|0); } return (0)|0; } function _Utils_CRC32($0,$1) { $0 = $0|0; $1 = $1|0; var $$011 = 0, $$09$lcssa = 0, $$09$masked = 0, $$0910 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)==(0); if ($2) { $$09$lcssa = 0; return ($$09$lcssa|0); } $$011 = 0;$$0910 = -1; while(1) { $3 = (($0) + ($$011)|0); $4 = HEAP8[$3>>0]|0; $5 = $4&255; $$09$masked = $$0910 & 255; $6 = $$09$masked ^ $5; $7 = (10176 + ($6<<2)|0); $8 = HEAP32[$7>>2]|0; $9 = (8)?($$0910 >>> 8):($$0910); $10 = $8 ^ $9; $11 = (($$011) + 1)|0; $exitcond = ($11|0)==($1|0); if ($exitcond) { break; } else { $$011 = $11;$$0910 = $10; } } $phitmp = $10 ^ -1; $$09$lcssa = $phitmp; return ($$09$lcssa|0); } function _Utils_Resize($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $10 = 0, $11 = 0, $12 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $storemerge = 0, label = 0, sp = 0; sp = STACKTOP; $5 = HEAP32[$1>>2]|0; $6 = (($5) + ($4))|0; HEAP32[$1>>2] = $6; $7 = ($5|0)>($3|0); if ($7) { $11 = HEAP32[$0>>2]|0; $12 = (_Mem_Realloc($11,$6,$2,45041)|0); $storemerge = $12; HEAP32[$0>>2] = $storemerge; return; } else { $8 = (_Mem_Alloc($6,$2,45027)|0); $9 = HEAP32[$0>>2]|0; $10 = Math_imul($5, $2)|0; _Mem_Copy($8,$9,$10); $storemerge = $8; HEAP32[$0>>2] = $storemerge; return; } } function _EntryList_Load($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, $switch$split2D = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 3232|0; $4 = sp + 3216|0; $5 = sp + 2048|0; $6 = sp + 3072|0; $7 = sp + 3208|0; $8 = sp + 3200|0; $9 = sp + 3192|0; $10 = sp; $11 = sp + 3136|0; $12 = sp + 3080|0; _String_FromReadonly($6,$1); $13 = ((($0)) + 5148|0); $14 = HEAP32[$13>>2]|0; $15 = ($14|0)==(0); $spec$select = $15 ? 511 : $14; $16 = (_Stream_OpenFile($11,$6)|0); $17 = HEAP32[5238]|0; $18 = ($16|0)==($17|0); if ($18) { $$0 = $16; STACKTOP = sp;return ($$0|0); } $19 = ($16|0)==(0); if (!($19)) { _Logger_SysWarn2($16,45056,$6); $$0 = $16; STACKTOP = sp;return ($$0|0); } _Stream_ReadonlyBuffered($12,$11,$10,2048); $20 = ((($4)) + 4|0); $21 = ((($4)) + 6|0); $22 = ($3|0)==(0|0); $23 = ($2<<24>>24)==(0); L8: while(1) { HEAP32[$4>>2] = $5; HEAP16[$20>>1] = 0; HEAP16[$21>>1] = 1024; $24 = (_Stream_ReadLine($12,$4)|0); $switch$split2D = ($24|0)<(0); if ($switch$split2D) { label = 18; break; } switch ($24|0) { case 0: { break; } default: { label = 6; break L8; } } _String_UNSAFE_TrimStart($4); _String_UNSAFE_TrimEnd($4); $25 = HEAP16[$20>>1]|0; $26 = ($25<<16>>16)==(0); do { if (!($26)) { if (!($22)) { $27 = (FUNCTION_TABLE_ii[$3 & 31]($4)|0); $28 = ($27<<24>>24)==(0); if ($28) { break; } } $29 = HEAP16[$20>>1]|0; $30 = $29&65535; $31 = ($spec$select|0)<($30|0); if ($31) { HEAP32[$9>>2] = $30; HEAP16[$20>>1] = 0; _String_Format2($4,45077,$9,$1); $32 = HEAP32[3701]|0; FUNCTION_TABLE_vi[$32 & 511]($4); break; } if ($23) { _StringsBuffer_Add($0,$4); break; } else { (_String_UNSAFE_Separate($4,$2,$7,$8)|0); _EntryList_Set($0,$7,$8,$2); break; } } } while(0); } if ((label|0) == 18) { switch ($24|0) { case -857812991: { break; } default: { label = 6; } } } if ((label|0) == 6) { _Logger_SysWarn2($24,45064,$6); } $33 = ((($11)) + 28|0); $34 = HEAP32[$33>>2]|0; (FUNCTION_TABLE_ii[$34 & 31]($11)|0); $$0 = $24; STACKTOP = sp;return ($$0|0); } function _EntryList_Set($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 3088|0; $4 = sp + 3080|0; $5 = sp + 3072|0; $6 = sp; HEAP8[$4>>0] = $3; HEAP32[$5>>2] = $6; $7 = ((($5)) + 4|0); HEAP16[$7>>1] = 0; $8 = ((($5)) + 6|0); HEAP16[$8>>1] = 3072; $9 = ((($2)) + 4|0); $10 = HEAP16[$9>>1]|0; $11 = ($10<<16>>16)==(0); if ($11) { _String_Copy($5,$1); } else { _String_Format3($5,45146,$1,$4,$2); } $12 = HEAP8[$4>>0]|0; (_EntryList_Remove($0,$1,$12)|0); _StringsBuffer_Add($0,$5); STACKTOP = sp;return; } function _EntryList_Remove($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$08$lcssa = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_EntryList_Find($0,$1,$2)|0); $4 = ($3|0)==(-1); if ($4) { $$08$lcssa = 0; return ($$08$lcssa|0); } $5 = $3; while(1) { _StringsBuffer_Remove($0,$5); $6 = (_EntryList_Find($0,$1,$2)|0); $7 = ($6|0)==(-1); if ($7) { $$08$lcssa = 1; break; } else { $5 = $6; } } return ($$08$lcssa|0); } function _EntryList_Find($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$08 = 0, $$09 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $3 = sp + 16|0; $4 = sp + 8|0; $5 = sp; $6 = ((($0)) + 8|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)>(0); if (!($8)) { $$08 = -1; STACKTOP = sp;return ($$08|0); } $$09 = 0; while(1) { _StringsBuffer_UNSAFE_GetRaw($0,$$09,$3); (_String_UNSAFE_Separate($3,$2,$4,$5)|0); $9 = (_String_CaselessEquals($1,$4)|0); $10 = ($9|0)==(0); if (!($10)) { $$08 = $$09; label = 5; break; } $11 = (($$09) + 1)|0; $12 = HEAP32[$6>>2]|0; $13 = ($11|0)<($12|0); if ($13) { $$09 = $11; } else { $$08 = -1; label = 5; break; } } if ((label|0) == 5) { STACKTOP = sp;return ($$08|0); } return (0)|0; } function _EntryList_UNSAFE_Load($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_EntryList_Load($0,$1,0,0)|0); return ($2|0); } function _EntryList_Save($0,$1) { $0 = $0|0; $1 = $1|0; var $$014 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 336|0; $2 = sp + 328|0; $3 = sp + 320|0; $4 = sp; $5 = sp + 264|0; HEAP32[$2>>2] = $4; $6 = ((($2)) + 4|0); HEAP16[$6>>1] = 0; $7 = ((($2)) + 6|0); HEAP16[$7>>1] = 260; _String_AppendConst($2,$1); $8 = (_Stream_CreateFile($5,$2)|0); $9 = ($8|0)==(0); if (!($9)) { _Logger_SysWarn2($8,45153,$2); STACKTOP = sp;return; } $10 = ((($0)) + 8|0); $11 = HEAP32[$10>>2]|0; $12 = ($11|0)>(0); L5: do { if ($12) { $$014 = 0; while(1) { _StringsBuffer_UNSAFE_GetRaw($0,$$014,$3); $16 = (_Stream_WriteLine($5,$3)|0); $17 = ($16|0)==(0); $14 = (($$014) + 1)|0; if (!($17)) { break; } $13 = HEAP32[$10>>2]|0; $15 = ($14|0)<($13|0); if ($15) { $$014 = $14; } else { break L5; } } _Logger_SysWarn2($16,45162,$2); } } while(0); $18 = ((($5)) + 28|0); $19 = HEAP32[$18>>2]|0; $20 = (FUNCTION_TABLE_ii[$19 & 31]($5)|0); $21 = ($20|0)==(0); if ($21) { STACKTOP = sp;return; } _Logger_SysWarn2($20,45173,$2); STACKTOP = sp;return; } function _EntryList_UNSAFE_Get($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$07 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $4 = sp + 16|0; $5 = sp + 8|0; $6 = sp; $7 = ((($1)) + 8|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)>(0); L1: do { if ($9) { $$07 = 0; while(1) { _StringsBuffer_UNSAFE_GetRaw($1,$$07,$4); (_String_UNSAFE_Separate($4,$3,$5,$6)|0); $13 = (_String_CaselessEquals($2,$5)|0); $14 = ($13|0)==(0); $11 = (($$07) + 1)|0; if (!($14)) { break; } $10 = HEAP32[$7>>2]|0; $12 = ($11|0)<($10|0); if ($12) { $$07 = $11; } else { break L1; } } $15 = $6; $16 = $15; $17 = HEAP32[$16>>2]|0; $18 = (($15) + 4)|0; $19 = $18; $20 = HEAP32[$19>>2]|0; $21 = $0; $22 = $21; HEAP32[$22>>2] = $17; $23 = (($21) + 4)|0; $24 = $23; HEAP32[$24>>2] = $20; STACKTOP = sp;return; } } while(0); $25 = 1949280; $26 = $25; $27 = HEAP32[$26>>2]|0; $28 = (($25) + 4)|0; $29 = $28; $30 = HEAP32[$29>>2]|0; $31 = $0; $32 = $31; HEAP32[$32>>2] = $27; $33 = (($31) + 4)|0; $34 = $33; HEAP32[$34>>2] = $30; STACKTOP = sp;return; } function _Vec3_Lerp($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = +$3; var $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = +HEAPF32[$2>>2]; $5 = +HEAPF32[$1>>2]; $6 = $4 - $5; $7 = $6 * $3; $8 = $5 + $7; HEAPF32[$0>>2] = $8; $9 = ((($2)) + 4|0); $10 = +HEAPF32[$9>>2]; $11 = ((($1)) + 4|0); $12 = +HEAPF32[$11>>2]; $13 = $10 - $12; $14 = $13 * $3; $15 = $12 + $14; $16 = ((($0)) + 4|0); HEAPF32[$16>>2] = $15; $17 = ((($2)) + 8|0); $18 = +HEAPF32[$17>>2]; $19 = ((($1)) + 8|0); $20 = +HEAPF32[$19>>2]; $21 = $18 - $20; $22 = $21 * $3; $23 = $20 + $22; $24 = ((($0)) + 8|0); HEAPF32[$24>>2] = $23; return; } function _Vec3_Normalise($0) { $0 = $0|0; var $1 = 0.0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[$0>>2]; $2 = $1 * $1; $3 = ((($0)) + 4|0); $4 = +HEAPF32[$3>>2]; $5 = $4 * $4; $6 = $2 + $5; $7 = ((($0)) + 8|0); $8 = +HEAPF32[$7>>2]; $9 = $8 * $8; $10 = $6 + $9; $11 = $10 != 0.0; if (!($11)) { return; } $12 = (+Math_sqrt((+$10))); $13 = 1.0 / $12; $14 = $1 * $13; HEAPF32[$0>>2] = $14; $15 = $4 * $13; HEAPF32[$3>>2] = $15; $16 = $8 * $13; HEAPF32[$7>>2] = $16; return; } function _Vec3_TransformY($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = $2|0; var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; $3 = ((($2)) + 16|0); $4 = +HEAPF32[$3>>2]; $5 = $4 * $1; $6 = ((($2)) + 48|0); $7 = +HEAPF32[$6>>2]; $8 = $5 + $7; HEAPF32[$0>>2] = $8; $9 = ((($2)) + 20|0); $10 = +HEAPF32[$9>>2]; $11 = $10 * $1; $12 = ((($2)) + 52|0); $13 = +HEAPF32[$12>>2]; $14 = $11 + $13; $15 = ((($0)) + 4|0); HEAPF32[$15>>2] = $14; $16 = ((($2)) + 24|0); $17 = +HEAPF32[$16>>2]; $18 = $17 * $1; $19 = ((($2)) + 56|0); $20 = +HEAPF32[$19>>2]; $21 = $18 + $20; $22 = ((($0)) + 8|0); HEAPF32[$22>>2] = $21; return; } function _Vec3_RotateX($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = +$2; var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = $2; $4 = (+_Math_Cos($3)); $5 = $4; $6 = (+_Math_Sin($3)); $7 = $6; $8 = +HEAPF32[$1>>2]; $9 = ((($1)) + 4|0); $10 = +HEAPF32[$9>>2]; $11 = $10 * $5; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = $13 * $7; $15 = $11 + $14; $16 = $10 * $7; $17 = $13 * $5; $18 = $17 - $16; _Vec3_Create3_2139($0,$8,$15,$18); return; } function _Vec3_Create3_2139($0,$1,$2,$3) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, label = 0, sp = 0; sp = STACKTOP; HEAPF32[$0>>2] = $1; $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $2; $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $3; return; } function _Vec3_RotateY($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = +$2; var $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = $2; $4 = (+_Math_Cos($3)); $5 = $4; $6 = (+_Math_Sin($3)); $7 = $6; $8 = +HEAPF32[$1>>2]; $9 = $8 * $5; $10 = ((($1)) + 8|0); $11 = +HEAPF32[$10>>2]; $12 = $11 * $7; $13 = $9 - $12; $14 = ((($1)) + 4|0); $15 = +HEAPF32[$14>>2]; $16 = $8 * $7; $17 = $11 * $5; $18 = $16 + $17; _Vec3_Create3_2139($0,$13,$15,$18); return; } function _Vec3_RotateY3($0,$1,$2,$3,$4) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; $4 = +$4; var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $5 = $4; $6 = (+_Math_Cos($5)); $7 = $6; $8 = (+_Math_Sin($5)); $9 = $8; $10 = $7 * $1; $11 = $9 * $3; $12 = $10 - $11; $13 = $9 * $1; $14 = $7 * $3; $15 = $14 + $13; _Vec3_Create3_2139($0,$12,$2,$15); return; } function _Vec3_RotateZ($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = +$2; var $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = $2; $4 = (+_Math_Cos($3)); $5 = $4; $6 = (+_Math_Sin($3)); $7 = $6; $8 = +HEAPF32[$1>>2]; $9 = $8 * $5; $10 = ((($1)) + 4|0); $11 = +HEAPF32[$10>>2]; $12 = $11 * $7; $13 = $9 + $12; $14 = $8 * $7; $15 = $11 * $5; $16 = $15 - $14; $17 = ((($1)) + 8|0); $18 = +HEAPF32[$17>>2]; _Vec3_Create3_2139($0,$13,$16,$18); return; } function _IVec3_Floor($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $2 = 0.0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = +HEAPF32[$1>>2]; $3 = (_Math_Floor($2)|0); HEAP32[$0>>2] = $3; $4 = ((($1)) + 4|0); $5 = +HEAPF32[$4>>2]; $6 = (_Math_Floor($5)|0); $7 = ((($0)) + 4|0); HEAP32[$7>>2] = $6; $8 = ((($1)) + 8|0); $9 = +HEAPF32[$8>>2]; $10 = (_Math_Floor($9)|0); $11 = ((($0)) + 8|0); HEAP32[$11>>2] = $10; return; } function _IVec3_ToVec3($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0.0, $11 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[$1>>2]|0; $3 = (+($2|0)); HEAPF32[$0>>2] = $3; $4 = ((($1)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = (+($5|0)); $7 = ((($0)) + 4|0); HEAPF32[$7>>2] = $6; $8 = ((($1)) + 8|0); $9 = HEAP32[$8>>2]|0; $10 = (+($9|0)); $11 = ((($0)) + 8|0); HEAPF32[$11>>2] = $10; return; } function _IVec3_Min($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$ = 0, $$15 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[$1>>2]|0; $4 = HEAP32[$2>>2]|0; $5 = ($3|0)<($4|0); $$ = $5 ? $3 : $4; HEAP32[$0>>2] = $$; $6 = ((($1)) + 4|0); $7 = HEAP32[$6>>2]|0; $8 = ((($2)) + 4|0); $9 = HEAP32[$8>>2]|0; $10 = ($7|0)<($9|0); $11 = $10 ? $7 : $9; $12 = ((($0)) + 4|0); HEAP32[$12>>2] = $11; $13 = ((($1)) + 8|0); $14 = HEAP32[$13>>2]|0; $15 = ((($2)) + 8|0); $16 = HEAP32[$15>>2]|0; $17 = ($14|0)<($16|0); $$15 = $17 ? $14 : $16; $18 = ((($0)) + 8|0); HEAP32[$18>>2] = $$15; return; } function _IVec3_Max($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$ = 0, $$15 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[$1>>2]|0; $4 = HEAP32[$2>>2]|0; $5 = ($3|0)>($4|0); $$ = $5 ? $3 : $4; HEAP32[$0>>2] = $$; $6 = ((($1)) + 4|0); $7 = HEAP32[$6>>2]|0; $8 = ((($2)) + 4|0); $9 = HEAP32[$8>>2]|0; $10 = ($7|0)>($9|0); $11 = $10 ? $7 : $9; $12 = ((($0)) + 4|0); HEAP32[$12>>2] = $11; $13 = ((($1)) + 8|0); $14 = HEAP32[$13>>2]|0; $15 = ((($2)) + 8|0); $16 = HEAP32[$15>>2]|0; $17 = ($14|0)>($16|0); $$15 = $17 ? $14 : $16; $18 = ((($0)) + 8|0); HEAP32[$18>>2] = $$15; return; } function _Vec3_GetDirVector($0,$1,$2) { $0 = $0|0; $1 = +$1; $2 = +$2; var $10 = 0.0, $11 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = (+_Math_CosF($2)); $4 = (+_Math_SinF($1)); $5 = $3 * $4; $6 = (+_Math_SinF($2)); $7 = - $6; $8 = (+_Math_CosF($2)); $9 = (+_Math_CosF($1)); $10 = $8 * $9; $11 = - $10; _Vec3_Create3_2139($0,$5,$7,$11); return; } function _Matrix_RotateX($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; $2 = $1; $3 = (+_Math_Cos($2)); $4 = $3; $5 = (+_Math_Sin($2)); $6 = $5; dest=$0; src=21836; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $7 = ((($0)) + 20|0); HEAPF32[$7>>2] = $4; $8 = ((($0)) + 24|0); HEAPF32[$8>>2] = $6; $9 = - $6; $10 = ((($0)) + 36|0); HEAPF32[$10>>2] = $9; $11 = ((($0)) + 40|0); HEAPF32[$11>>2] = $4; return; } function _Matrix_RotateY($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; $2 = $1; $3 = (+_Math_Cos($2)); $4 = $3; $5 = (+_Math_Sin($2)); $6 = $5; dest=$0; src=21836; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); HEAPF32[$0>>2] = $4; $7 = - $6; $8 = ((($0)) + 8|0); HEAPF32[$8>>2] = $7; $9 = ((($0)) + 32|0); HEAPF32[$9>>2] = $6; $10 = ((($0)) + 40|0); HEAPF32[$10>>2] = $4; return; } function _Matrix_RotateZ($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; $2 = $1; $3 = (+_Math_Cos($2)); $4 = $3; $5 = (+_Math_Sin($2)); $6 = $5; dest=$0; src=21836; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); HEAPF32[$0>>2] = $4; $7 = ((($0)) + 4|0); HEAPF32[$7>>2] = $6; $8 = - $6; $9 = ((($0)) + 16|0); HEAPF32[$9>>2] = $8; $10 = ((($0)) + 20|0); HEAPF32[$10>>2] = $4; return; } function _Matrix_Translate($0,$1,$2,$3) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; var $4 = 0, $5 = 0, $6 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; dest=$0; src=21836; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $4 = ((($0)) + 48|0); HEAPF32[$4>>2] = $1; $5 = ((($0)) + 52|0); HEAPF32[$5>>2] = $2; $6 = ((($0)) + 56|0); HEAPF32[$6>>2] = $3; return; } function _Matrix_Scale($0,$1,$2,$3) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; var $4 = 0, $5 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; dest=$0; src=21836; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); HEAPF32[$0>>2] = $1; $4 = ((($0)) + 20|0); HEAPF32[$4>>2] = $2; $5 = ((($0)) + 40|0); HEAPF32[$5>>2] = $3; return; } function _Matrix_Mul($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0.0; var $118 = 0.0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0, $135 = 0; var $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0.0, $143 = 0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0.0, $15 = 0.0, $150 = 0.0, $151 = 0, $152 = 0.0, $153 = 0.0; var $154 = 0.0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0.0, $159 = 0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0, $168 = 0.0, $169 = 0.0, $17 = 0.0, $170 = 0.0, $171 = 0.0; var $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0, $176 = 0.0, $177 = 0.0, $178 = 0.0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0.0, $182 = 0.0, $183 = 0, $184 = 0.0, $185 = 0.0, $186 = 0.0, $187 = 0.0, $188 = 0.0, $189 = 0.0, $19 = 0.0; var $190 = 0.0, $191 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0.0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0; var $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0.0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0.0; var $55 = 0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0.0, $63 = 0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0.0, $70 = 0.0, $71 = 0.0, $72 = 0.0; var $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0; var $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = ((($1)) + 4|0); $5 = +HEAPF32[$4>>2]; $6 = ((($1)) + 8|0); $7 = +HEAPF32[$6>>2]; $8 = ((($1)) + 12|0); $9 = +HEAPF32[$8>>2]; $10 = ((($1)) + 16|0); $11 = +HEAPF32[$10>>2]; $12 = ((($1)) + 20|0); $13 = +HEAPF32[$12>>2]; $14 = ((($1)) + 24|0); $15 = +HEAPF32[$14>>2]; $16 = ((($1)) + 28|0); $17 = +HEAPF32[$16>>2]; $18 = ((($1)) + 32|0); $19 = +HEAPF32[$18>>2]; $20 = ((($1)) + 36|0); $21 = +HEAPF32[$20>>2]; $22 = ((($1)) + 40|0); $23 = +HEAPF32[$22>>2]; $24 = ((($1)) + 44|0); $25 = +HEAPF32[$24>>2]; $26 = ((($1)) + 48|0); $27 = +HEAPF32[$26>>2]; $28 = ((($1)) + 52|0); $29 = +HEAPF32[$28>>2]; $30 = ((($1)) + 56|0); $31 = +HEAPF32[$30>>2]; $32 = ((($1)) + 60|0); $33 = +HEAPF32[$32>>2]; $34 = +HEAPF32[$2>>2]; $35 = ((($2)) + 4|0); $36 = +HEAPF32[$35>>2]; $37 = ((($2)) + 8|0); $38 = +HEAPF32[$37>>2]; $39 = ((($2)) + 12|0); $40 = +HEAPF32[$39>>2]; $41 = ((($2)) + 16|0); $42 = +HEAPF32[$41>>2]; $43 = ((($2)) + 20|0); $44 = +HEAPF32[$43>>2]; $45 = ((($2)) + 24|0); $46 = +HEAPF32[$45>>2]; $47 = ((($2)) + 28|0); $48 = +HEAPF32[$47>>2]; $49 = ((($2)) + 32|0); $50 = +HEAPF32[$49>>2]; $51 = ((($2)) + 36|0); $52 = +HEAPF32[$51>>2]; $53 = ((($2)) + 40|0); $54 = +HEAPF32[$53>>2]; $55 = ((($2)) + 44|0); $56 = +HEAPF32[$55>>2]; $57 = ((($2)) + 48|0); $58 = +HEAPF32[$57>>2]; $59 = ((($2)) + 52|0); $60 = +HEAPF32[$59>>2]; $61 = ((($2)) + 56|0); $62 = +HEAPF32[$61>>2]; $63 = ((($2)) + 60|0); $64 = +HEAPF32[$63>>2]; $65 = $3 * $34; $66 = $5 * $42; $67 = $65 + $66; $68 = $7 * $50; $69 = $67 + $68; $70 = $9 * $58; $71 = $69 + $70; HEAPF32[$0>>2] = $71; $72 = $3 * $36; $73 = $5 * $44; $74 = $72 + $73; $75 = $7 * $52; $76 = $74 + $75; $77 = $9 * $60; $78 = $76 + $77; $79 = ((($0)) + 4|0); HEAPF32[$79>>2] = $78; $80 = $3 * $38; $81 = $5 * $46; $82 = $80 + $81; $83 = $7 * $54; $84 = $82 + $83; $85 = $9 * $62; $86 = $84 + $85; $87 = ((($0)) + 8|0); HEAPF32[$87>>2] = $86; $88 = $3 * $40; $89 = $5 * $48; $90 = $88 + $89; $91 = $7 * $56; $92 = $90 + $91; $93 = $9 * $64; $94 = $92 + $93; $95 = ((($0)) + 12|0); HEAPF32[$95>>2] = $94; $96 = $11 * $34; $97 = $13 * $42; $98 = $96 + $97; $99 = $15 * $50; $100 = $98 + $99; $101 = $17 * $58; $102 = $100 + $101; $103 = ((($0)) + 16|0); HEAPF32[$103>>2] = $102; $104 = $11 * $36; $105 = $13 * $44; $106 = $104 + $105; $107 = $15 * $52; $108 = $106 + $107; $109 = $17 * $60; $110 = $108 + $109; $111 = ((($0)) + 20|0); HEAPF32[$111>>2] = $110; $112 = $11 * $38; $113 = $13 * $46; $114 = $112 + $113; $115 = $15 * $54; $116 = $114 + $115; $117 = $17 * $62; $118 = $116 + $117; $119 = ((($0)) + 24|0); HEAPF32[$119>>2] = $118; $120 = $11 * $40; $121 = $13 * $48; $122 = $120 + $121; $123 = $15 * $56; $124 = $122 + $123; $125 = $17 * $64; $126 = $124 + $125; $127 = ((($0)) + 28|0); HEAPF32[$127>>2] = $126; $128 = $19 * $34; $129 = $21 * $42; $130 = $128 + $129; $131 = $23 * $50; $132 = $130 + $131; $133 = $25 * $58; $134 = $132 + $133; $135 = ((($0)) + 32|0); HEAPF32[$135>>2] = $134; $136 = $19 * $36; $137 = $21 * $44; $138 = $136 + $137; $139 = $23 * $52; $140 = $138 + $139; $141 = $25 * $60; $142 = $140 + $141; $143 = ((($0)) + 36|0); HEAPF32[$143>>2] = $142; $144 = $19 * $38; $145 = $21 * $46; $146 = $144 + $145; $147 = $23 * $54; $148 = $146 + $147; $149 = $25 * $62; $150 = $148 + $149; $151 = ((($0)) + 40|0); HEAPF32[$151>>2] = $150; $152 = $19 * $40; $153 = $21 * $48; $154 = $152 + $153; $155 = $23 * $56; $156 = $154 + $155; $157 = $25 * $64; $158 = $156 + $157; $159 = ((($0)) + 44|0); HEAPF32[$159>>2] = $158; $160 = $27 * $34; $161 = $29 * $42; $162 = $160 + $161; $163 = $31 * $50; $164 = $162 + $163; $165 = $33 * $58; $166 = $164 + $165; $167 = ((($0)) + 48|0); HEAPF32[$167>>2] = $166; $168 = $27 * $36; $169 = $29 * $44; $170 = $168 + $169; $171 = $31 * $52; $172 = $170 + $171; $173 = $33 * $60; $174 = $172 + $173; $175 = ((($0)) + 52|0); HEAPF32[$175>>2] = $174; $176 = $27 * $38; $177 = $29 * $46; $178 = $176 + $177; $179 = $31 * $54; $180 = $178 + $179; $181 = $33 * $62; $182 = $180 + $181; $183 = ((($0)) + 56|0); HEAPF32[$183>>2] = $182; $184 = $27 * $40; $185 = $29 * $48; $186 = $184 + $185; $187 = $31 * $56; $188 = $186 + $187; $189 = $33 * $64; $190 = $188 + $189; $191 = ((($0)) + 60|0); HEAPF32[$191>>2] = $190; return; } function _Matrix_Orthographic($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; $4 = +$4; $5 = +$5; $6 = +$6; var $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0; var dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; dest=$0; src=21836; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $7 = $2 - $1; $8 = 2.0 / $7; HEAPF32[$0>>2] = $8; $9 = $3 - $4; $10 = 2.0 / $9; $11 = ((($0)) + 20|0); HEAPF32[$11>>2] = $10; $12 = $6 - $5; $13 = -2.0 / $12; $14 = ((($0)) + 40|0); HEAPF32[$14>>2] = $13; $15 = $1 + $2; $16 = - $15; $17 = $16 / $7; $18 = ((($0)) + 48|0); HEAPF32[$18>>2] = $17; $19 = $3 + $4; $20 = - $19; $21 = $20 / $9; $22 = ((($0)) + 52|0); HEAPF32[$22>>2] = $21; $23 = $5 + $6; $24 = - $23; $25 = $24 / $12; $26 = ((($0)) + 56|0); HEAPF32[$26>>2] = $25; return; } function _Matrix_PerspectiveFieldOfView($0,$1,$2,$3,$4) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = +$3; $4 = +$4; var $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0; var $9 = 0.0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; $5 = $1 * 0.5; $6 = $5; $7 = (+_Tan_Simple($6)); $8 = $7; $9 = $8 * $3; dest=$0; src=21836; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $10 = ((($0)) + 60|0); HEAPF32[$10>>2] = 0.0; $11 = $9 * $2; $12 = $3 / $11; HEAPF32[$0>>2] = $12; $13 = $3 / $9; $14 = ((($0)) + 20|0); HEAPF32[$14>>2] = $13; $15 = $4 * 2.0; $16 = $15 * $3; $17 = - $16; $18 = $4 - $3; $19 = $17 / $18; $20 = ((($0)) + 56|0); HEAPF32[$20>>2] = $19; $21 = $3 + $4; $22 = - $21; $23 = $22 / $18; $24 = ((($0)) + 40|0); HEAPF32[$24>>2] = $23; $25 = ((($0)) + 44|0); HEAPF32[$25>>2] = -1.0; return; } function _Tan_Simple($0) { $0 = +$0; var $1 = 0.0, $2 = 0.0, $3 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = (+_Math_Sin($0)); $2 = (+_Math_Cos($0)); $3 = $1 / $2; return (+$3); } function _Matrix_LookRot($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 192|0; $3 = sp + 128|0; $4 = sp + 64|0; $5 = sp; $6 = ((($2)) + 4|0); $7 = +HEAPF32[$6>>2]; _Matrix_RotateX($3,$7); $8 = +HEAPF32[$2>>2]; _Matrix_RotateY($4,$8); $9 = +HEAPF32[$1>>2]; $10 = - $9; $11 = ((($1)) + 4|0); $12 = +HEAPF32[$11>>2]; $13 = - $12; $14 = ((($1)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = - $15; _Matrix_Translate($5,$10,$13,$16); _Matrix_Mul($0,$4,$3); _Matrix_Mul($0,$5,$0); STACKTOP = sp;return; } function _FrustumCulling_SphereInFrustum($0,$1,$2,$3) { $0 = +$0; $1 = +$1; $2 = +$2; $3 = +$3; var $$ = 0, $$0 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0.0; var $28 = 0.0, $29 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0.0; var $47 = 0.0, $48 = 0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $4 = +HEAPF32[493000]; $5 = $4 * $0; $6 = +HEAPF32[493001]; $7 = $6 * $1; $8 = $5 + $7; $9 = +HEAPF32[493002]; $10 = $9 * $2; $11 = $8 + $10; $12 = +HEAPF32[493003]; $13 = $12 + $11; $14 = - $3; $15 = !($13 <= $14); if (!($15)) { $$0 = 0; return ($$0|0); } $16 = +HEAPF32[493004]; $17 = $16 * $0; $18 = +HEAPF32[493005]; $19 = $18 * $1; $20 = $17 + $19; $21 = +HEAPF32[493006]; $22 = $21 * $2; $23 = $20 + $22; $24 = +HEAPF32[493007]; $25 = $24 + $23; $26 = !($25 <= $14); if (!($26)) { $$0 = 0; return ($$0|0); } $27 = +HEAPF32[493008]; $28 = $27 * $0; $29 = +HEAPF32[493009]; $30 = $29 * $1; $31 = $28 + $30; $32 = +HEAPF32[493010]; $33 = $32 * $2; $34 = $31 + $33; $35 = +HEAPF32[493011]; $36 = $35 + $34; $37 = !($36 <= $14); if (!($37)) { $$0 = 0; return ($$0|0); } $38 = +HEAPF32[493012]; $39 = $38 * $0; $40 = +HEAPF32[493013]; $41 = $40 * $1; $42 = $39 + $41; $43 = +HEAPF32[493014]; $44 = $43 * $2; $45 = $42 + $44; $46 = +HEAPF32[493015]; $47 = $46 + $45; $48 = !($47 <= $14); if (!($48)) { $$0 = 0; return ($$0|0); } $49 = +HEAPF32[493016]; $50 = $49 * $0; $51 = +HEAPF32[493017]; $52 = $51 * $1; $53 = $50 + $52; $54 = +HEAPF32[493018]; $55 = $54 * $2; $56 = $53 + $55; $57 = +HEAPF32[493019]; $58 = $57 + $56; $59 = !($58 <= $14); $$ = $59&1; $$0 = $$; return ($$0|0); } function _FrustumCulling_CalcFrustumEquations($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0.0; var $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0.0; var $47 = 0.0, $48 = 0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $2 = sp; _Matrix_Mul($2,$1,$0); $3 = ((($2)) + 12|0); $4 = +HEAPF32[$3>>2]; $5 = +HEAPF32[$2>>2]; $6 = $4 - $5; HEAPF32[493000] = $6; $7 = ((($2)) + 28|0); $8 = +HEAPF32[$7>>2]; $9 = ((($2)) + 16|0); $10 = +HEAPF32[$9>>2]; $11 = $8 - $10; HEAPF32[493001] = $11; $12 = ((($2)) + 44|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 32|0); $15 = +HEAPF32[$14>>2]; $16 = $13 - $15; HEAPF32[493002] = $16; $17 = ((($2)) + 60|0); $18 = +HEAPF32[$17>>2]; $19 = ((($2)) + 48|0); $20 = +HEAPF32[$19>>2]; $21 = $18 - $20; HEAPF32[493003] = $21; _FrustumCulling_Normalise(1972000,1972004,1972008,1972012); $22 = $4 + $5; HEAPF32[493004] = $22; $23 = $8 + $10; HEAPF32[493005] = $23; $24 = $13 + $15; HEAPF32[493006] = $24; $25 = $18 + $20; HEAPF32[493007] = $25; _FrustumCulling_Normalise(1972016,1972020,1972024,1972028); $26 = ((($2)) + 4|0); $27 = +HEAPF32[$26>>2]; $28 = $4 + $27; HEAPF32[493008] = $28; $29 = ((($2)) + 20|0); $30 = +HEAPF32[$29>>2]; $31 = $8 + $30; HEAPF32[493009] = $31; $32 = ((($2)) + 36|0); $33 = +HEAPF32[$32>>2]; $34 = $13 + $33; HEAPF32[493010] = $34; $35 = ((($2)) + 52|0); $36 = +HEAPF32[$35>>2]; $37 = $18 + $36; HEAPF32[493011] = $37; _FrustumCulling_Normalise(1972032,1972036,1972040,1972044); $38 = $4 - $27; HEAPF32[493012] = $38; $39 = $8 - $30; HEAPF32[493013] = $39; $40 = $13 - $33; HEAPF32[493014] = $40; $41 = $18 - $36; HEAPF32[493015] = $41; _FrustumCulling_Normalise(1972048,1972052,1972056,1972060); $42 = ((($2)) + 8|0); $43 = +HEAPF32[$42>>2]; $44 = $4 - $43; HEAPF32[493016] = $44; $45 = ((($2)) + 24|0); $46 = +HEAPF32[$45>>2]; $47 = $8 - $46; HEAPF32[493017] = $47; $48 = ((($2)) + 40|0); $49 = +HEAPF32[$48>>2]; $50 = $13 - $49; HEAPF32[493018] = $50; $51 = ((($2)) + 56|0); $52 = +HEAPF32[$51>>2]; $53 = $18 - $52; HEAPF32[493019] = $53; _FrustumCulling_Normalise(1972064,1972068,1972072,1972076); STACKTOP = sp;return; } function _FrustumCulling_Normalise($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $4 = +HEAPF32[$0>>2]; $5 = +HEAPF32[$1>>2]; $6 = +HEAPF32[$2>>2]; $7 = $4 * $4; $8 = $5 * $5; $9 = $7 + $8; $10 = $6 * $6; $11 = $9 + $10; $12 = (+Math_sqrt((+$11))); $13 = $4 / $12; HEAPF32[$0>>2] = $13; $14 = +HEAPF32[$1>>2]; $15 = $14 / $12; HEAPF32[$1>>2] = $15; $16 = +HEAPF32[$2>>2]; $17 = $16 / $12; HEAPF32[$2>>2] = $17; $18 = +HEAPF32[$3>>2]; $19 = $18 / $12; HEAPF32[$3>>2] = $19; return; } function _Hex_Range($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _String_AppendConst($1,45181); return; } function _Hex_ValidChar($0,$1) { $0 = $0|0; $1 = $1|0; var $$off7 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $$off7 = (($1) + -48)<<24>>24; $2 = ($$off7&255)<(10); if ($2) { return 1; } else { $3 = $1 & -33; $4 = (($3) + -65)<<24>>24; $5 = ($4&255)<(6); $spec$select = $5&1; return ($spec$select|0); } } function _Hex_ValidString($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3&65535)<(7); $5 = $4&1; return ($5|0); } function _Hex_ValidValue($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_PackedCol_TryParseHex($1,$2)|0); STACKTOP = sp;return ($3|0); } function _Hex_Default($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP32[$2>>2]|0; _PackedCol_ToHex($1,$3); return; } function _Int_Range($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = ((($0)) + 8|0); _String_Format2($1,45203,$2,$3); return; } function _Int_ValidChar($0,$1) { $0 = $0|0; $1 = $1|0; var $$off = 0, $2 = 0, $3 = 0, $4 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $$off = (($1) + -48)<<24>>24; $2 = ($$off&255)<(10); $3 = ($1<<24>>24)==(45); $narrow = $3 | $2; $4 = $narrow&1; return ($4|0); } function _Int_ValidString($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = ((($1)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = ($4<<16>>16)==(1); if ($5) { $6 = HEAP32[$1>>2]|0; $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(45); if ($8) { $$0 = 1; STACKTOP = sp;return ($$0|0); } } $9 = (_Convert_ParseInt($1,$2)|0); $$0 = $9; STACKTOP = sp;return ($$0|0); } function _Int_ValidValue($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = ((($0)) + 4|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 8|0); $6 = HEAP32[$5>>2]|0; $7 = (_Convert_ParseInt($1,$2)|0); $8 = ($7<<24>>24)==(0); if ($8) { $12 = 0; STACKTOP = sp;return ($12|0); } $9 = HEAP32[$2>>2]|0; $10 = ($4|0)<=($9|0); $11 = ($9|0)<=($6|0); $narrow = $11 & $10; $spec$select = $narrow&1; $12 = $spec$select; STACKTOP = sp;return ($12|0); } function _Int_Default($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 12|0); $3 = HEAP32[$2>>2]|0; _String_AppendInt($1,$3); return; } function _Seed_Range($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _String_AppendConst($1,45215); return; } function _Seed_NoDefault($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Float_Range($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = ((($0)) + 8|0); _String_Format2($1,45230,$2,$3); return; } function _Float_ValidChar($0,$1) { $0 = $0|0; $1 = $1|0; var $$off = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $$off = (($1) + -48)<<24>>24; $2 = ($$off&255)<(10); $3 = (($1) + -45)<<24>>24; $4 = ($3&255)<(2); $5 = $4 | $2; $6 = ($1<<24>>24)==(44); $narrow = $6 | $5; $7 = $narrow&1; return ($7|0); } function _Float_ValidString($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = ((($1)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = ($4<<16>>16)==(1); if ($5) { $6 = HEAP32[$1>>2]|0; $7 = HEAP8[$6>>0]|0; $8 = (_Float_ValidChar($0,$7)|0); $9 = ($8<<24>>24)==(0); if (!($9)) { $$0 = 1; STACKTOP = sp;return ($$0|0); } } $10 = (_Convert_ParseFloat($1,$2)|0); $$0 = $10; STACKTOP = sp;return ($$0|0); } function _Float_ValidValue($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = ((($0)) + 4|0); $4 = +HEAPF32[$3>>2]; $5 = ((($0)) + 8|0); $6 = +HEAPF32[$5>>2]; $7 = (_Convert_ParseFloat($1,$2)|0); $8 = ($7<<24>>24)==(0); if ($8) { $12 = 0; } else { $9 = +HEAPF32[$2>>2]; $10 = !($4 <= $9); if ($10) { $12 = 0; } else { $11 = $9 <= $6; $phitmp = $11&1; $12 = $phitmp; } } STACKTOP = sp;return ($12|0); } function _Float_Default($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 12|0); $3 = +HEAPF32[$2>>2]; _String_AppendFloat($1,$3,3); return; } function _Path_Range($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _String_AppendConst($1,45244); return; } function _Path_ValidChar($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; switch ($1<<24>>24) { case 34: case 124: case 62: case 60: case 58: case 42: case 63: case 92: case 47: { $3 = 0; break; } default: { $2 = ($1<<24>>24)!=(46); $phitmp = $2&1; $3 = $phitmp; } } return ($3|0); } function _Path_ValidString($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return 1; } function _String_Range($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _String_AppendConst($1,45259); return; } function _String_ValidChar($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)!=(38); $3 = $2&1; return ($3|0); } function _String_ValidString($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3&65535)<(65); $5 = $4&1; return ($5|0); } function _TextWidget_Init($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; _Widget_Reset($0); HEAP32[$0>>2] = 22020; $1 = ((($0)) + 64|0); HEAP32[$1>>2] = -1; return; } function _TextWidget_Render($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0); if ($4) { return; } $5 = ((($0)) + 64|0); $6 = HEAP32[$5>>2]|0; _Texture_RenderShaded($2,$6); return; } function _TextWidget_Free($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 36|0); _Gfx_DeleteTexture($1); return; } function _TextWidget_Reposition($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; _Widget_CalcPosition($0); $1 = ((($0)) + 4|0); $2 = HEAP32[$1>>2]|0; $3 = $2&65535; $4 = ((($0)) + 40|0); HEAP16[$4>>1] = $3; $5 = ((($0)) + 8|0); $6 = HEAP32[$5>>2]|0; $7 = $6&65535; $8 = ((($0)) + 42|0); HEAP16[$8>>1] = $7; return; } function _Widget_InputDown($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _Widget_InputUp($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Widget_MouseScroll($0,$1) { $0 = $0|0; $1 = +$1; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _Widget_Pointer($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _Widget_PointerUp($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Widget_PointerMove($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var label = 0, sp = 0; sp = STACKTOP; return 0; } function _TextWidget_BuildMesh($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); $3 = ((($0)) + 64|0); $4 = HEAP32[$3>>2]|0; _Gfx_Make2DQuad($2,$4,$1); return; } function _TextWidget_Render2($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(0); if (!($4)) { _Gfx_BindTexture($3); _Gfx_DrawVb_IndexedTris_Range(4,$1); } $5 = (($1) + 4)|0; return ($5|0); } function _TextWidget_Set($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; $4 = ((($0)) + 36|0); _Gfx_DeleteTexture($4); _DrawTextArgs_Make($3,$1,$2,1); _Drawer2D_MakeTextTexture($4,$3); $5 = ((($0)) + 46|0); $6 = HEAP16[$5>>1]|0; $7 = ($6<<16>>16)==(0); if ($7) { $8 = (_Font_CalcHeight($2,1)|0); $9 = $8&65535; HEAP16[$5>>1] = $9; } $10 = ((($0)) + 44|0); $11 = HEAP16[$10>>1]|0; $12 = $11&65535; $13 = ((($0)) + 12|0); HEAP32[$13>>2] = $12; $14 = HEAP16[$5>>1]|0; $15 = $14&65535; $16 = ((($0)) + 16|0); HEAP32[$16>>2] = $15; $17 = HEAP32[$0>>2]|0; $18 = ((($17)) + 8|0); $19 = HEAP32[$18>>2]|0; FUNCTION_TABLE_vi[$19 & 511]($0); STACKTOP = sp;return; } function _TextWidget_SetConst($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; _String_FromReadonly($3,$1); _TextWidget_Set($0,$3,$2); STACKTOP = sp;return; } function _ButtonWidget_Make($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; $5 = $5|0; $6 = $6|0; var label = 0, sp = 0; sp = STACKTOP; _ButtonWidget_Init($0,$1,$2); _Widget_SetLocation($0,$3,$4,$5,$6); return; } function _ButtonWidget_Init($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Widget_Reset($0); HEAP32[$0>>2] = 22064; $3 = ((($0)) + 64|0); HEAP32[$3>>2] = -1; $4 = ((($0)) + 76|0); HEAP32[$4>>2] = 0; $5 = (_Display_ScaleX($1)|0); $6 = ((($0)) + 68|0); HEAP32[$6>>2] = $5; $7 = (_Display_ScaleY(40)|0); $8 = ((($0)) + 72|0); HEAP32[$8>>2] = $7; $9 = ((($0)) + 32|0); HEAP32[$9>>2] = $2; return; } function _ButtonWidget_Render($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = ((($0)) + 20|0); $4 = HEAP8[$3>>0]|0; $5 = ($4<<24>>24)==(0); if ($5) { ;HEAP32[$2>>2]=HEAP32[22136>>2]|0;HEAP32[$2+4>>2]=HEAP32[22136+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[22136+8>>2]|0;HEAP32[$2+12>>2]=HEAP32[22136+12>>2]|0;HEAP32[$2+16>>2]=HEAP32[22136+16>>2]|0;HEAP32[$2+20>>2]=HEAP32[22136+20>>2]|0;HEAP32[$2+24>>2]=HEAP32[22136+24>>2]|0; } else { ;HEAP32[$2>>2]=HEAP32[22108>>2]|0;HEAP32[$2+4>>2]=HEAP32[22108+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[22108+8>>2]|0;HEAP32[$2+12>>2]=HEAP32[22108+12>>2]|0;HEAP32[$2+16>>2]=HEAP32[22108+16>>2]|0;HEAP32[$2+20>>2]=HEAP32[22108+20>>2]|0;HEAP32[$2+24>>2]=HEAP32[22108+24>>2]|0; } $6 = ((($0)) + 21|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); if (!($8)) { ;HEAP32[$2>>2]=HEAP32[22164>>2]|0;HEAP32[$2+4>>2]=HEAP32[22164+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[22164+8>>2]|0;HEAP32[$2+12>>2]=HEAP32[22164+12>>2]|0;HEAP32[$2+16>>2]=HEAP32[22164+16>>2]|0;HEAP32[$2+20>>2]=HEAP32[22164+20>>2]|0;HEAP32[$2+24>>2]=HEAP32[22164+24>>2]|0; } $9 = HEAP8[(1803520)>>0]|0; $10 = ($9<<24>>24)==(0); $11 = HEAP32[(1803548)>>2]|0; $12 = HEAP32[(1803544)>>2]|0; $13 = $10 ? $12 : $11; HEAP32[$2>>2] = $13; $14 = ((($0)) + 4|0); $15 = HEAP32[$14>>2]|0; $16 = $15&65535; $17 = ((($2)) + 4|0); HEAP16[$17>>1] = $16; $18 = ((($0)) + 12|0); $19 = HEAP32[$18>>2]|0; $20 = $19&65535; $21 = ((($2)) + 8|0); HEAP16[$21>>1] = $20; $22 = ((($0)) + 8|0); $23 = HEAP32[$22>>2]|0; $24 = $23&65535; $25 = ((($2)) + 6|0); HEAP16[$25>>1] = $24; $26 = ((($0)) + 16|0); $27 = HEAP32[$26>>2]|0; $28 = $27&65535; $29 = ((($2)) + 10|0); HEAP16[$29>>1] = $28; $30 = ($19|0)>(399); if ($30) { _Texture_Render($2); } else { $31 = (+($19|0)); $32 = $31 / 400.0; $33 = +HEAPF32[(1972084)>>2]; $34 = $33 * 2.0; $35 = $32 / $34; _Gfx_BindTexture($13); $36 = HEAP32[$18>>2]|0; $37 = (($36|0) / 2)&-1; $38 = $37&65535; HEAP16[$21>>1] = $38; $39 = ((($2)) + 12|0); HEAPF32[$39>>2] = 0.0; $40 = $35 * 0.78125; $41 = ((($2)) + 20|0); HEAPF32[$41>>2] = $40; $42 = ((($0)) + 64|0); $43 = HEAP32[$42>>2]|0; _Gfx_Draw2DTexture($2,$43); $44 = HEAP32[$18>>2]|0; $45 = (($44|0) / 2)&-1; $46 = HEAP16[$17>>1]|0; $47 = $46&65535; $48 = (($45) + ($47))|0; $49 = $48&65535; HEAP16[$17>>1] = $49; $50 = 1.0 - $35; $51 = $50 * 0.78125; HEAPF32[$39>>2] = $51; HEAPF32[$41>>2] = 0.78125; $52 = HEAP32[$42>>2]|0; _Gfx_Draw2DTexture($2,$52); } $53 = ((($0)) + 36|0); $54 = HEAP32[$53>>2]|0; $55 = ($54|0)==(0); if ($55) { STACKTOP = sp;return; } $56 = HEAP8[$6>>0]|0; $57 = ($56<<24>>24)==(0); if ($57) { $58 = HEAP8[$3>>0]|0; $59 = ($58<<24>>24)==(0); $60 = $59 ? -2039584 : -6225921; $61 = $60; } else { $61 = -6250336; } _Texture_RenderShaded($53,$61); STACKTOP = sp;return; } function _ButtonWidget_Free($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 36|0); _Gfx_DeleteTexture($1); return; } function _ButtonWidget_Reposition($0) { $0 = $0|0; var $$ = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 44|0); $2 = HEAP16[$1>>1]|0; $3 = $2&65535; $4 = ((($0)) + 68|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)<($3|0); $$ = $6 ? $3 : $5; $7 = ((($0)) + 12|0); HEAP32[$7>>2] = $$; $8 = ((($0)) + 46|0); $9 = HEAP16[$8>>1]|0; $10 = $9&65535; $11 = ((($0)) + 72|0); $12 = HEAP32[$11>>2]|0; $13 = ($12|0)<($10|0); $14 = $13 ? $10 : $12; $15 = ((($0)) + 16|0); HEAP32[$15>>2] = $14; _Widget_CalcPosition($0); $16 = ((($0)) + 4|0); $17 = HEAP32[$16>>2]|0; $18 = HEAP32[$7>>2]|0; $19 = (($18|0) / 2)&-1; $20 = HEAP16[$1>>1]|0; $21 = (1)?(($20&65535) >>> 1):(($20&65535)); $22 = $21&65535; $23 = (($19) + ($17))|0; $24 = (($23) - ($22))|0; $25 = $24&65535; $26 = ((($0)) + 40|0); HEAP16[$26>>1] = $25; $27 = ((($0)) + 8|0); $28 = HEAP32[$27>>2]|0; $29 = HEAP32[$15>>2]|0; $30 = (($29|0) / 2)&-1; $31 = HEAP16[$8>>1]|0; $32 = (1)?(($31&65535) >>> 1):(($31&65535)); $33 = $32&65535; $34 = (($30) + ($28))|0; $35 = (($34) - ($33))|0; $36 = $35&65535; $37 = ((($0)) + 42|0); HEAP16[$37>>1] = $36; return; } function _ButtonWidget_BuildMesh($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; var $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = ((($0)) + 20|0); $4 = HEAP8[$3>>0]|0; $5 = ($4<<24>>24)==(0); if ($5) { ;HEAP32[$2>>2]=HEAP32[22136>>2]|0;HEAP32[$2+4>>2]=HEAP32[22136+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[22136+8>>2]|0;HEAP32[$2+12>>2]=HEAP32[22136+12>>2]|0;HEAP32[$2+16>>2]=HEAP32[22136+16>>2]|0;HEAP32[$2+20>>2]=HEAP32[22136+20>>2]|0;HEAP32[$2+24>>2]=HEAP32[22136+24>>2]|0; } else { ;HEAP32[$2>>2]=HEAP32[22108>>2]|0;HEAP32[$2+4>>2]=HEAP32[22108+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[22108+8>>2]|0;HEAP32[$2+12>>2]=HEAP32[22108+12>>2]|0;HEAP32[$2+16>>2]=HEAP32[22108+16>>2]|0;HEAP32[$2+20>>2]=HEAP32[22108+20>>2]|0;HEAP32[$2+24>>2]=HEAP32[22108+24>>2]|0; } $6 = ((($0)) + 21|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); if (!($8)) { ;HEAP32[$2>>2]=HEAP32[22164>>2]|0;HEAP32[$2+4>>2]=HEAP32[22164+4>>2]|0;HEAP32[$2+8>>2]=HEAP32[22164+8>>2]|0;HEAP32[$2+12>>2]=HEAP32[22164+12>>2]|0;HEAP32[$2+16>>2]=HEAP32[22164+16>>2]|0;HEAP32[$2+20>>2]=HEAP32[22164+20>>2]|0;HEAP32[$2+24>>2]=HEAP32[22164+24>>2]|0; } $9 = ((($0)) + 4|0); $10 = HEAP32[$9>>2]|0; $11 = $10&65535; $12 = ((($2)) + 4|0); HEAP16[$12>>1] = $11; $13 = ((($0)) + 12|0); $14 = HEAP32[$13>>2]|0; $15 = $14&65535; $16 = ((($2)) + 8|0); HEAP16[$16>>1] = $15; $17 = ((($0)) + 8|0); $18 = HEAP32[$17>>2]|0; $19 = $18&65535; $20 = ((($2)) + 6|0); HEAP16[$20>>1] = $19; $21 = ((($0)) + 16|0); $22 = HEAP32[$21>>2]|0; $23 = $22&65535; $24 = ((($2)) + 10|0); HEAP16[$24>>1] = $23; $25 = ($14|0)>(399); if ($25) { $26 = ((($0)) + 64|0); $27 = HEAP32[$26>>2]|0; _Gfx_Make2DQuad($2,$27,$1); $28 = HEAP32[$1>>2]|0; $29 = ((($28)) + 96|0); HEAP32[$1>>2] = $29; } else { $30 = (+($14|0)); $31 = $30 / 400.0; $32 = +HEAPF32[(1972084)>>2]; $33 = $32 * 2.0; $34 = $31 / $33; $35 = (($14|0) / 2)&-1; $36 = $35&65535; HEAP16[$16>>1] = $36; $37 = ((($2)) + 12|0); HEAPF32[$37>>2] = 0.0; $38 = $34 * 0.78125; $39 = ((($2)) + 20|0); HEAPF32[$39>>2] = $38; $40 = ((($0)) + 64|0); $41 = HEAP32[$40>>2]|0; _Gfx_Make2DQuad($2,$41,$1); $42 = HEAP32[$13>>2]|0; $43 = (($42|0) / 2)&-1; $44 = HEAP16[$12>>1]|0; $45 = $44&65535; $46 = (($43) + ($45))|0; $47 = $46&65535; HEAP16[$12>>1] = $47; $48 = 1.0 - $34; $49 = $48 * 0.78125; HEAPF32[$37>>2] = $49; HEAPF32[$39>>2] = 0.78125; $50 = HEAP32[$40>>2]|0; _Gfx_Make2DQuad($2,$50,$1); } $51 = HEAP8[$6>>0]|0; $52 = ($51<<24>>24)==(0); if (!($52)) { $57 = -6250336; $56 = ((($0)) + 36|0); _Gfx_Make2DQuad($56,$57,$1); STACKTOP = sp;return; } $53 = HEAP8[$3>>0]|0; $54 = ($53<<24>>24)==(0); $55 = $54 ? -2039584 : -6225921; $57 = $55; $56 = ((($0)) + 36|0); _Gfx_Make2DQuad($56,$57,$1); STACKTOP = sp;return; } function _ButtonWidget_Render2($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1803520)>>0]|0; $3 = ($2<<24>>24)==(0); $4 = HEAP32[(1803548)>>2]|0; $5 = HEAP32[(1803544)>>2]|0; $6 = $3 ? $5 : $4; _Gfx_BindTexture($6); $7 = ((($0)) + 12|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)>(399); $10 = $9 ? 4 : 8; _Gfx_DrawVb_IndexedTris_Range($10,$1); $11 = ((($0)) + 36|0); $12 = HEAP32[$11>>2]|0; $13 = ($12|0)==(0); if ($13) { $15 = (($1) + 12)|0; return ($15|0); } $14 = (($1) + 8)|0; _Gfx_BindTexture($12); _Gfx_DrawVb_IndexedTris_Range(4,$14); $15 = (($1) + 12)|0; return ($15|0); } function _ButtonWidget_Set($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; $4 = ((($0)) + 36|0); _Gfx_DeleteTexture($4); _DrawTextArgs_Make($3,$1,$2,1); _Drawer2D_MakeTextTexture($4,$3); $5 = ((($0)) + 46|0); $6 = HEAP16[$5>>1]|0; $7 = ($6<<16>>16)==(0); if ($7) { $8 = (_Font_CalcHeight($2,1)|0); $9 = $8&65535; HEAP16[$5>>1] = $9; } $10 = HEAP32[$0>>2]|0; $11 = ((($10)) + 8|0); $12 = HEAP32[$11>>2]|0; FUNCTION_TABLE_vi[$12 & 511]($0); STACKTOP = sp;return; } function _ButtonWidget_SetConst($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; _String_FromReadonly($3,$1); _ButtonWidget_Set($0,$3,$2); STACKTOP = sp;return; } function _ScrollbarWidget_Create($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; _Widget_Reset($0); HEAP32[$0>>2] = 22192; $1 = (_Display_ScaleX(22)|0); $2 = ((($0)) + 12|0); HEAP32[$2>>2] = $1; $3 = (_Display_ScaleX(2)|0); $4 = ((($0)) + 64|0); HEAP32[$4>>2] = $3; $5 = (_Display_ScaleY(2)|0); $6 = ((($0)) + 68|0); HEAP32[$6>>2] = $5; $7 = (_Display_ScaleX(3)|0); $8 = ((($0)) + 72|0); HEAP32[$8>>2] = $7; $9 = (_Display_ScaleY(-5)|0); $10 = ((($0)) + 76|0); HEAP32[$10>>2] = $9; $11 = (_Display_ScaleY(-1)|0); $12 = ((($0)) + 80|0); HEAP32[$12>>2] = $11; $13 = (_Display_ScaleY(3)|0); $14 = ((($0)) + 84|0); HEAP32[$14>>2] = $13; $15 = ((($0)) + 36|0); ;HEAP32[$15>>2]=0|0;HEAP32[$15+4>>2]=0|0;HEAP32[$15+8>>2]=0|0;HEAP32[$15+12>>2]=0|0;HEAP32[$15+16>>2]=0|0;HEAP32[$15+20>>2]=0|0; $16 = HEAP8[1972870]|0; $17 = ($16<<24>>24)==(0); if ($17) { return; } $18 = (_Display_ScaleX(15)|0); $19 = ((($0)) + 60|0); HEAP32[$19>>2] = $18; return; } function _ScrollbarWidget_Render($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 4|0; $3 = sp; $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = ((($0)) + 12|0); $7 = HEAP32[$6>>2]|0; $8 = ((($0)) + 8|0); $9 = HEAP32[$8>>2]|0; $10 = ((($0)) + 16|0); $11 = HEAP32[$10>>2]|0; _Gfx_Draw2DFlat($5,$9,$7,$11,-603321846); _ScrollbarWidget_GetScrollbarCoords($0,$2,$3); $12 = ((($0)) + 64|0); $13 = HEAP32[$12>>2]|0; $14 = (($13) + ($5))|0; $15 = HEAP32[$8>>2]|0; $16 = HEAP32[$2>>2]|0; $17 = (($16) + ($15))|0; HEAP32[$2>>2] = $17; $18 = $13 << 1; $19 = (($7) - ($18))|0; $20 = HEAP32[$3>>2]|0; $21 = (_Gui_ContainsPointers($14,$17,$19,$20)|0); $22 = $21 & 255; $23 = ($22|0)==(0); $24 = $23 ? -597400476 : -595953030; _Gfx_Draw2DFlat($14,$17,$19,$20,$24); $25 = ($20|0)<(20); if ($25) { STACKTOP = sp;return; } $26 = ((($0)) + 72|0); $27 = HEAP32[$26>>2]|0; $28 = (($27) + ($14))|0; $29 = (1)?($20 >>> 1):($20); $30 = (($29) + ($17))|0; HEAP32[$2>>2] = $30; $31 = $27 << 1; $32 = (($19) - ($31))|0; $33 = ((($0)) + 76|0); $34 = HEAP32[$33>>2]|0; $35 = (($34) + ($30))|0; $36 = ((($0)) + 68|0); $37 = HEAP32[$36>>2]|0; _Gfx_Draw2DFlat($28,$35,$32,$37,-603321846); $38 = ((($0)) + 80|0); $39 = HEAP32[$38>>2]|0; $40 = (($39) + ($30))|0; $41 = HEAP32[$36>>2]|0; _Gfx_Draw2DFlat($28,$40,$32,$41,-603321846); $42 = ((($0)) + 84|0); $43 = HEAP32[$42>>2]|0; $44 = (($43) + ($30))|0; $45 = HEAP32[$36>>2]|0; _Gfx_Draw2DFlat($28,$44,$32,$45,-603321846); STACKTOP = sp;return; } function _Widget_NullFunc($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _ScrollbarWidget_MouseScroll($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 48|0); $3 = (_Utils_AccumulateWheelDelta($2,$1)|0); $4 = ((($0)) + 36|0); $5 = HEAP32[$4>>2]|0; $6 = (($5) - ($3))|0; HEAP32[$4>>2] = $6; _ScrollbarWidget_ClampTopRow($0); return 1; } function _ScrollbarWidget_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp + 4|0; $5 = sp; $6 = ((($0)) + 56|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==($1|0); if ($8) { $$0 = 1; STACKTOP = sp;return ($$0|0); } $9 = ((($0)) + 4|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)>($2|0); if ($11) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $12 = ((($0)) + 12|0); $13 = HEAP32[$12>>2]|0; $14 = (($13) + ($10))|0; $15 = ((($0)) + 60|0); $16 = HEAP32[$15>>2]|0; $17 = (($14) + ($16))|0; $18 = ($17|0)>($2|0); $19 = ($7|0)==(0); $or$cond = $19 & $18; if (!($or$cond)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $20 = ((($0)) + 8|0); $21 = HEAP32[$20>>2]|0; $22 = (($3) - ($21))|0; _ScrollbarWidget_GetScrollbarCoords($0,$4,$5); $23 = HEAP32[$4>>2]|0; $24 = ($22|0)<($23|0); do { if ($24) { $25 = ((($0)) + 44|0); $26 = HEAP32[$25>>2]|0; $27 = ((($0)) + 36|0); $28 = HEAP32[$27>>2]|0; $29 = (($28) - ($26))|0; HEAP32[$27>>2] = $29; } else { $30 = HEAP32[$5>>2]|0; $31 = (($30) + ($23))|0; $32 = ($22|0)<($31|0); if ($32) { HEAP32[$6>>2] = $1; $38 = (($22) - ($23))|0; $39 = ((($0)) + 52|0); HEAP32[$39>>2] = $38; break; } else { $33 = ((($0)) + 44|0); $34 = HEAP32[$33>>2]|0; $35 = ((($0)) + 36|0); $36 = HEAP32[$35>>2]|0; $37 = (($36) + ($34))|0; HEAP32[$35>>2] = $37; break; } } } while(0); _ScrollbarWidget_ClampTopRow($0); $$0 = 1; STACKTOP = sp;return ($$0|0); } function _ScrollbarWidget_PointerUp($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 56|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)==($1|0); if (!($6)) { return; } HEAP32[$4>>2] = 0; $7 = ((($0)) + 52|0); HEAP32[$7>>2] = 0; return; } function _ScrollbarWidget_PointerMove($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 56|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)==($1|0); if (!($6)) { $$0 = 0; return ($$0|0); } $7 = ((($0)) + 8|0); $8 = HEAP32[$7>>2]|0; $9 = (($3) - ($8))|0; $10 = (+_ScrollbarWidget_GetScale($0)); $11 = ((($0)) + 52|0); $12 = HEAP32[$11>>2]|0; $13 = (($9) - ($12))|0; $14 = (+($13|0)); $15 = $14 / $10; $16 = (~~(($15))); $17 = ((($0)) + 36|0); HEAP32[$17>>2] = $16; _ScrollbarWidget_ClampTopRow($0); $$0 = 1; return ($$0|0); } function _ScrollbarWidget_GetScale($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $11 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 40|0); $2 = HEAP32[$1>>2]|0; $3 = (+($2|0)); $4 = ((($0)) + 16|0); $5 = HEAP32[$4>>2]|0; $6 = ((($0)) + 68|0); $7 = HEAP32[$6>>2]|0; $8 = $7 << 1; $9 = (($5) - ($8))|0; $10 = (+($9|0)); $11 = $10 / $3; return (+$11); } function _ScrollbarWidget_ClampTopRow($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 40|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 44|0); $4 = HEAP32[$3>>2]|0; $5 = (($2) - ($4))|0; $6 = ((($0)) + 36|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)<($5|0); $9 = $8 ? $7 : $5; $10 = ($9|0)<(0); $11 = $8 ^ 1; $12 = $10 | $11; if (!($12)) { return; } $spec$select = $10 ? 0 : $9; HEAP32[$6>>2] = $spec$select; return; } function _ScrollbarWidget_GetScrollbarCoords($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$ = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0.0; var $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (+_ScrollbarWidget_GetScale($0)); $4 = ((($0)) + 36|0); $5 = HEAP32[$4>>2]|0; $6 = (+($5|0)); $7 = $3 * $6; $8 = (_Math_Ceil($7)|0); $9 = ((($0)) + 68|0); $10 = HEAP32[$9>>2]|0; $11 = (($10) + ($8))|0; HEAP32[$1>>2] = $11; $12 = ((($0)) + 44|0); $13 = HEAP32[$12>>2]|0; $14 = (+($13|0)); $15 = $3 * $14; $16 = (_Math_Ceil($15)|0); HEAP32[$2>>2] = $16; $17 = HEAP32[$1>>2]|0; $18 = (($17) + ($16))|0; $19 = ((($0)) + 16|0); $20 = HEAP32[$19>>2]|0; $21 = HEAP32[$9>>2]|0; $22 = (($20) - ($21))|0; $23 = ($18|0)<($22|0); $$ = $23 ? $18 : $22; $24 = (($$) - ($17))|0; HEAP32[$2>>2] = $24; return; } function _HotbarWidget_Create($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $scevgep = 0, label = 0, sp = 0; sp = STACKTOP; _Widget_Reset($0); HEAP32[$0>>2] = 22236; $1 = ((($0)) + 22|0); HEAP8[$1>>0] = 1; $2 = ((($0)) + 23|0); HEAP8[$2>>0] = 2; $3 = ((($0)) + 112|0); HEAPF32[$3>>2] = 1.0; $scevgep = ((($0)) + 148|0); ;HEAP32[$scevgep>>2]=4294967295|0;HEAP32[$scevgep+4>>2]=4294967295|0;HEAP32[$scevgep+8>>2]=4294967295|0;HEAP32[$scevgep+12>>2]=4294967295|0;HEAP32[$scevgep+16>>2]=4294967295|0;HEAP32[$scevgep+20>>2]=4294967295|0;HEAP32[$scevgep+24>>2]=4294967295|0;HEAP32[$scevgep+28>>2]=4294967295|0; return; } function _HotbarWidget_Render($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $100 = 0.0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $12 = 0.0, $13 = 0.0, $14 = 0; var $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0; var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0; var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0.0; var $7 = 0, $70 = 0.0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0.0, $8 = 0.0, $80 = 0.0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0; var $88 = 0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0.0, label = 0, sp = 0; sp = STACKTOP; _HotbarWidget_RenderHotbarOutline($0); _HotbarWidget_RenderHotbarBlocks($0); $2 = HEAP8[1972870]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = (+($5|0)); $7 = ((($0)) + 100|0); $8 = +HEAPF32[$7>>2]; $9 = $8 + $6; $10 = ((($0)) + 92|0); $11 = +HEAPF32[$10>>2]; $12 = $11 * 8.0; $13 = $9 + $12; $14 = (~~(($13))); $15 = ((($0)) + 120|0); $16 = ((($0)) + 128|0); $17 = HEAP16[$16>>1]|0; $18 = (1)?(($17&65535) >>> 1):(($17&65535)); $19 = $18&65535; $20 = (($14) - ($19))|0; $21 = $20&65535; $22 = ((($0)) + 124|0); HEAP16[$22>>1] = $21; $23 = ((($0)) + 8|0); $24 = HEAP32[$23>>2]|0; $25 = ((($0)) + 16|0); $26 = HEAP32[$25>>2]|0; $27 = (($26|0) / 2)&-1; $28 = (($27) + ($24))|0; $29 = ((($0)) + 130|0); $30 = HEAP16[$29>>1]|0; $31 = (1)?(($30&65535) >>> 1):(($30&65535)); $32 = $31&65535; $33 = (($28) - ($32))|0; $34 = $33&65535; $35 = ((($0)) + 126|0); HEAP16[$35>>1] = $34; _Texture_Render($15); $36 = ((($0)) + 148|0); $37 = HEAP32[$36>>2]|0; $38 = ($37|0)==(-1); if (!($38)) { $39 = ((($0)) + 184|0); $40 = +HEAPF64[$39>>3]; $41 = $40 + $1; HEAPF64[$39>>3] = $41; $42 = $41 > 1.0; if ($42) { HEAP32[$36>>2] = -1; HEAPF64[$39>>3] = 0.0; $43 = HEAP32[(1811004)>>2]|0; $44 = (1809300 + ($43<<1)|0); HEAP16[$44>>1] = 0; } } $45 = ((($0)) + 152|0); $46 = HEAP32[$45>>2]|0; $47 = ($46|0)==(-1); if (!($47)) { $48 = ((($0)) + 192|0); $49 = +HEAPF64[$48>>3]; $50 = $49 + $1; HEAPF64[$48>>3] = $50; $51 = $50 > 1.0; if ($51) { HEAP32[$45>>2] = -1; HEAPF64[$48>>3] = 0.0; $52 = HEAP32[(1811004)>>2]|0; $53 = (($52) + 1)|0; $54 = (1809300 + ($53<<1)|0); HEAP16[$54>>1] = 0; } } $55 = ((($0)) + 156|0); $56 = HEAP32[$55>>2]|0; $57 = ($56|0)==(-1); if (!($57)) { $58 = ((($0)) + 200|0); $59 = +HEAPF64[$58>>3]; $60 = $59 + $1; HEAPF64[$58>>3] = $60; $61 = $60 > 1.0; if ($61) { HEAP32[$55>>2] = -1; HEAPF64[$58>>3] = 0.0; $62 = HEAP32[(1811004)>>2]|0; $63 = (($62) + 2)|0; $64 = (1809300 + ($63<<1)|0); HEAP16[$64>>1] = 0; } } $65 = ((($0)) + 160|0); $66 = HEAP32[$65>>2]|0; $67 = ($66|0)==(-1); if (!($67)) { $68 = ((($0)) + 208|0); $69 = +HEAPF64[$68>>3]; $70 = $69 + $1; HEAPF64[$68>>3] = $70; $71 = $70 > 1.0; if ($71) { HEAP32[$65>>2] = -1; HEAPF64[$68>>3] = 0.0; $72 = HEAP32[(1811004)>>2]|0; $73 = (($72) + 3)|0; $74 = (1809300 + ($73<<1)|0); HEAP16[$74>>1] = 0; } } $75 = ((($0)) + 164|0); $76 = HEAP32[$75>>2]|0; $77 = ($76|0)==(-1); if (!($77)) { $78 = ((($0)) + 216|0); $79 = +HEAPF64[$78>>3]; $80 = $79 + $1; HEAPF64[$78>>3] = $80; $81 = $80 > 1.0; if ($81) { HEAP32[$75>>2] = -1; HEAPF64[$78>>3] = 0.0; $82 = HEAP32[(1811004)>>2]|0; $83 = (($82) + 4)|0; $84 = (1809300 + ($83<<1)|0); HEAP16[$84>>1] = 0; } } $85 = ((($0)) + 168|0); $86 = HEAP32[$85>>2]|0; $87 = ($86|0)==(-1); if (!($87)) { $88 = ((($0)) + 224|0); $89 = +HEAPF64[$88>>3]; $90 = $89 + $1; HEAPF64[$88>>3] = $90; $91 = $90 > 1.0; if ($91) { HEAP32[$85>>2] = -1; HEAPF64[$88>>3] = 0.0; $92 = HEAP32[(1811004)>>2]|0; $93 = (($92) + 5)|0; $94 = (1809300 + ($93<<1)|0); HEAP16[$94>>1] = 0; } } $95 = ((($0)) + 172|0); $96 = HEAP32[$95>>2]|0; $97 = ($96|0)==(-1); if (!($97)) { $98 = ((($0)) + 232|0); $99 = +HEAPF64[$98>>3]; $100 = $99 + $1; HEAPF64[$98>>3] = $100; $101 = $100 > 1.0; if ($101) { HEAP32[$95>>2] = -1; HEAPF64[$98>>3] = 0.0; $102 = HEAP32[(1811004)>>2]|0; $103 = (($102) + 6)|0; $104 = (1809300 + ($103<<1)|0); HEAP16[$104>>1] = 0; } } $105 = ((($0)) + 176|0); $106 = HEAP32[$105>>2]|0; $107 = ($106|0)==(-1); if ($107) { return; } $108 = ((($0)) + 240|0); $109 = +HEAPF64[$108>>3]; $110 = $109 + $1; HEAPF64[$108>>3] = $110; $111 = $110 > 1.0; if (!($111)) { return; } HEAP32[$105>>2] = -1; HEAPF64[$108>>3] = 0.0; $112 = HEAP32[(1811004)>>2]|0; $113 = (($112) + 7)|0; $114 = (1809300 + ($113<<1)|0); HEAP16[$114>>1] = 0; return; } function _HotbarWidget_Free($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972870]|0; $2 = ($1<<24>>24)==(0); if ($2) { return; } $3 = ((($0)) + 120|0); _Gfx_DeleteTexture($3); return; } function _HotbarWidget_Reposition($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0.0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 112|0); $2 = +HEAPF32[$1>>2]; $3 = +HEAPF32[(1972084)>>2]; $4 = $2 * $3; $5 = +HEAPF32[(1972088)>>2]; $6 = $2 * $5; $7 = $4 * 182.0; $8 = (~~(($7))); $9 = ((($0)) + 12|0); HEAP32[$9>>2] = $8; $10 = $6 * 22.0; $11 = (_Math_Floor($10)|0); $12 = ((($0)) + 16|0); HEAP32[$12>>2] = $11; _Widget_CalcPosition($0); $13 = $4 * 24.0; $14 = (_Math_Ceil($13)|0); $15 = (+($14|0)); $16 = ((($0)) + 96|0); HEAPF32[$16>>2] = $15; $17 = $4 * 13.5; $18 = ((($0)) + 104|0); HEAPF32[$18>>2] = $17; $19 = $4 * 11.100000381469727; $20 = ((($0)) + 100|0); HEAPF32[$20>>2] = $19; $21 = $4 * 20.0; $22 = ((($0)) + 92|0); HEAPF32[$22>>2] = $21; $23 = ((($0)) + 4|0); $24 = HEAP32[$23>>2]|0; $25 = $24&65535; $26 = ((($0)) + 68|0); HEAP16[$26>>1] = $25; $27 = ((($0)) + 8|0); $28 = HEAP32[$27>>2]|0; $29 = $28&65535; $30 = ((($0)) + 70|0); HEAP16[$30>>1] = $29; $31 = HEAP32[$9>>2]|0; $32 = $31&65535; $33 = ((($0)) + 72|0); HEAP16[$33>>1] = $32; $34 = HEAP32[$12>>2]|0; $35 = $34&65535; $36 = ((($0)) + 74|0); HEAP16[$36>>1] = $35; $37 = ((($0)) + 76|0); HEAPF32[$37>>2] = 0.0; $38 = ((($0)) + 80|0); HEAPF32[$38>>2] = 0.0; $39 = ((($0)) + 84|0); HEAPF32[$39>>2] = 0.7109375; $40 = ((($0)) + 88|0); HEAPF32[$40>>2] = 0.0859375; $41 = $6 * 23.0; $42 = (~~(($41))); $43 = (($28) - ($42))|0; $44 = (($43) + ($34))|0; $45 = ((($0)) + 40|0); HEAP16[$45>>1] = 0; $46 = $44&65535; $47 = ((($0)) + 42|0); HEAP16[$47>>1] = $46; $48 = (~~(($15))); $49 = $48&65535; $50 = ((($0)) + 44|0); HEAP16[$50>>1] = $49; $51 = ((($0)) + 46|0); HEAP16[$51>>1] = $35; $52 = ((($0)) + 48|0); HEAPF32[$52>>2] = 0.0; $53 = ((($0)) + 52|0); HEAPF32[$53>>2] = 0.0859375; $54 = ((($0)) + 56|0); HEAPF32[$54>>2] = 0.09375; $55 = ((($0)) + 60|0); HEAPF32[$55>>2] = 0.171875; return; } function _HotbarWidget_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$off = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $$off = (($1) + -49)|0; $2 = ($$off>>>0)>(8); if ($2) { $$0 = 0; return ($$0|0); } $3 = (_KeyBind_IsPressed(30)|0); $4 = ($3<<24>>24)==(0); if ($4) { _Inventory_SetSelectedIndex($$off); $$0 = 1; return ($$0|0); } else { _Inventory_SetHotbarIndex($$off); $5 = ((($0)) + 116|0); HEAP8[$5>>0] = 1; $$0 = 1; return ($$0|0); } } function _HotbarWidget_InputUp($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(390782)>>0]|0; $3 = $2&255; $4 = ($3|0)==($1|0); if (!($4)) { return; } $5 = ((($0)) + 116|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); if (!($7)) { HEAP8[$5>>0] = 0; return; } $8 = HEAP8[(1972125)>>0]|0; $9 = ($8<<24>>24)==(0); if ($9) { return; } _Inventory_SwitchHotbar(); return; } function _HotbarWidget_MouseScroll($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_KeyBind_IsPressed(30)|0); $3 = ($2<<24>>24)==(0); if ($3) { $8 = HEAP32[(1811000)>>2]|0; $9 = (_HotbarWidget_ScrolledIndex($0,$1,$8,-1)|0); _Inventory_SetSelectedIndex($9); return 1; } else { $4 = HEAP32[(1811004)>>2]|0; $5 = (($4|0) / 9)&-1; $6 = (_HotbarWidget_ScrolledIndex($0,$1,$5,1)|0); _Inventory_SetHotbarIndex($6); $7 = ((($0)) + 116|0); HEAP8[$7>>0] = 1; return 1; } } function _HotbarWidget_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$03638$lcssa = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0.0, $70 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = (_Widget_Contains($0,$2,$3)|0); $5 = ($4|0)==(0); if ($5) { $$0 = 0; return ($$0|0); } $6 = ((($0)) + 92|0); $7 = +HEAPF32[$6>>2]; $8 = (~~(($7))); $9 = ((($0)) + 16|0); $10 = HEAP32[$9>>2]|0; $11 = ((($0)) + 4|0); $12 = ((($0)) + 8|0); $13 = HEAP32[$11>>2]|0; $14 = HEAP32[$12>>2]|0; $15 = (_Gui_Contains($13,$14,$8,$10,$2,$3)|0); $16 = ($15|0)==(0); if ($16) { $24 = HEAP32[$11>>2]|0; $25 = (($24) + ($8))|0; $26 = HEAP32[$12>>2]|0; $27 = (_Gui_Contains($25,$26,$8,$10,$2,$3)|0); $28 = ($27|0)==(0); if ($28) { $29 = HEAP32[$11>>2]|0; $30 = $8 << 1; $31 = (($29) + ($30))|0; $32 = HEAP32[$12>>2]|0; $33 = (_Gui_Contains($31,$32,$8,$10,$2,$3)|0); $34 = ($33|0)==(0); if ($34) { $35 = HEAP32[$11>>2]|0; $36 = ($8*3)|0; $37 = (($35) + ($36))|0; $38 = HEAP32[$12>>2]|0; $39 = (_Gui_Contains($37,$38,$8,$10,$2,$3)|0); $40 = ($39|0)==(0); if ($40) { $41 = HEAP32[$11>>2]|0; $42 = $8 << 2; $43 = (($41) + ($42))|0; $44 = HEAP32[$12>>2]|0; $45 = (_Gui_Contains($43,$44,$8,$10,$2,$3)|0); $46 = ($45|0)==(0); if ($46) { $47 = HEAP32[$11>>2]|0; $48 = ($8*5)|0; $49 = (($47) + ($48))|0; $50 = HEAP32[$12>>2]|0; $51 = (_Gui_Contains($49,$50,$8,$10,$2,$3)|0); $52 = ($51|0)==(0); if ($52) { $53 = HEAP32[$11>>2]|0; $54 = ($8*6)|0; $55 = (($53) + ($54))|0; $56 = HEAP32[$12>>2]|0; $57 = (_Gui_Contains($55,$56,$8,$10,$2,$3)|0); $58 = ($57|0)==(0); if ($58) { $59 = HEAP32[$11>>2]|0; $60 = ($8*7)|0; $61 = (($59) + ($60))|0; $62 = HEAP32[$12>>2]|0; $63 = (_Gui_Contains($61,$62,$8,$10,$2,$3)|0); $64 = ($63|0)==(0); if ($64) { $65 = HEAP32[$11>>2]|0; $66 = $8 << 3; $67 = (($65) + ($66))|0; $68 = HEAP32[$12>>2]|0; $69 = (_Gui_Contains($67,$68,$8,$10,$2,$3)|0); $70 = ($69|0)==(0); if ($70) { $$0 = 0; return ($$0|0); } else { $$03638$lcssa = 8; } } else { $$03638$lcssa = 7; } } else { $$03638$lcssa = 6; } } else { $$03638$lcssa = 5; } } else { $$03638$lcssa = 4; } } else { $$03638$lcssa = 3; } } else { $$03638$lcssa = 2; } } else { $$03638$lcssa = 1; } } else { $$03638$lcssa = 0; } $17 = HEAP8[1972870]|0; $18 = ($17<<24>>24)==(0); do { if (!($18)) { $19 = ($$03638$lcssa|0)==(8); if (!($19)) { $20 = ((($0)) + 148|0); $21 = (($20) + ($$03638$lcssa<<2)|0); HEAP32[$21>>2] = $1; $22 = ((($0)) + 184|0); $23 = (($22) + ($$03638$lcssa<<3)|0); HEAPF64[$23>>3] = 0.0; break; } _InventoryScreen_Show(); $$0 = 1; return ($$0|0); } } while(0); _Inventory_SetSelectedIndex($$03638$lcssa); $$0 = 1; return ($$0|0); } function _HotbarWidget_PointerUp($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 148|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)==($1|0); if ($6) { $7 = ((($0)) + 184|0); HEAP32[$4>>2] = -1; HEAPF64[$7>>3] = 0.0; } $8 = ((($0)) + 152|0); $9 = HEAP32[$8>>2]|0; $10 = ($9|0)==($1|0); if ($10) { $11 = ((($0)) + 192|0); HEAP32[$8>>2] = -1; HEAPF64[$11>>3] = 0.0; } $12 = ((($0)) + 156|0); $13 = HEAP32[$12>>2]|0; $14 = ($13|0)==($1|0); if ($14) { $15 = ((($0)) + 200|0); HEAP32[$12>>2] = -1; HEAPF64[$15>>3] = 0.0; } $16 = ((($0)) + 160|0); $17 = HEAP32[$16>>2]|0; $18 = ($17|0)==($1|0); if ($18) { $19 = ((($0)) + 208|0); HEAP32[$16>>2] = -1; HEAPF64[$19>>3] = 0.0; } $20 = ((($0)) + 164|0); $21 = HEAP32[$20>>2]|0; $22 = ($21|0)==($1|0); if ($22) { $23 = ((($0)) + 216|0); HEAP32[$20>>2] = -1; HEAPF64[$23>>3] = 0.0; } $24 = ((($0)) + 168|0); $25 = HEAP32[$24>>2]|0; $26 = ($25|0)==($1|0); if ($26) { $27 = ((($0)) + 224|0); HEAP32[$24>>2] = -1; HEAPF64[$27>>3] = 0.0; } $28 = ((($0)) + 172|0); $29 = HEAP32[$28>>2]|0; $30 = ($29|0)==($1|0); if ($30) { $31 = ((($0)) + 232|0); HEAP32[$28>>2] = -1; HEAPF64[$31>>3] = 0.0; } $32 = ((($0)) + 176|0); $33 = HEAP32[$32>>2]|0; $34 = ($33|0)==($1|0); if (!($34)) { return; } $35 = ((($0)) + 240|0); HEAP32[$32>>2] = -1; HEAPF64[$35>>3] = 0.0; return; } function _HotbarWidget_PointerMove($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$016 = 0, $$018$lcssa = 0, $$lcssa = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 148|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)==($1|0); if ($6) { $7 = (_Widget_Contains($0,$2,$3)|0); $8 = ($7|0)==(0); if ($8) { $$018$lcssa = 0;$$lcssa = $4; } else { label = 4; } } else { label = 4; } do { if ((label|0) == 4) { $11 = ((($0)) + 152|0); $12 = HEAP32[$11>>2]|0; $13 = ($12|0)==($1|0); if ($13) { $14 = (_Widget_Contains($0,$2,$3)|0); $15 = ($14|0)==(0); if ($15) { $$018$lcssa = 1;$$lcssa = $11; break; } } $16 = ((($0)) + 156|0); $17 = HEAP32[$16>>2]|0; $18 = ($17|0)==($1|0); if ($18) { $19 = (_Widget_Contains($0,$2,$3)|0); $20 = ($19|0)==(0); if ($20) { $$018$lcssa = 2;$$lcssa = $16; break; } } $21 = ((($0)) + 160|0); $22 = HEAP32[$21>>2]|0; $23 = ($22|0)==($1|0); if ($23) { $24 = (_Widget_Contains($0,$2,$3)|0); $25 = ($24|0)==(0); if ($25) { $$018$lcssa = 3;$$lcssa = $21; break; } } $26 = ((($0)) + 164|0); $27 = HEAP32[$26>>2]|0; $28 = ($27|0)==($1|0); if ($28) { $29 = (_Widget_Contains($0,$2,$3)|0); $30 = ($29|0)==(0); if ($30) { $$018$lcssa = 4;$$lcssa = $26; break; } } $31 = ((($0)) + 168|0); $32 = HEAP32[$31>>2]|0; $33 = ($32|0)==($1|0); if ($33) { $34 = (_Widget_Contains($0,$2,$3)|0); $35 = ($34|0)==(0); if ($35) { $$018$lcssa = 5;$$lcssa = $31; break; } } $36 = ((($0)) + 172|0); $37 = HEAP32[$36>>2]|0; $38 = ($37|0)==($1|0); if ($38) { $39 = (_Widget_Contains($0,$2,$3)|0); $40 = ($39|0)==(0); if ($40) { $$018$lcssa = 6;$$lcssa = $36; break; } } $41 = ((($0)) + 176|0); $42 = HEAP32[$41>>2]|0; $43 = ($42|0)==($1|0); if (!($43)) { $$016 = 0; return ($$016|0); } $44 = (_Widget_Contains($0,$2,$3)|0); $45 = ($44|0)==(0); if ($45) { $$018$lcssa = 7;$$lcssa = $41; } else { $$016 = 0; return ($$016|0); } } } while(0); HEAP32[$$lcssa>>2] = -1; $9 = ((($0)) + 184|0); $10 = (($9) + ($$018$lcssa<<3)|0); HEAPF64[$10>>3] = 0.0; $$016 = 1; return ($$016|0); } function _HotbarWidget_ScrolledIndex($0,$1,$2,$3) { $0 = $0|0; $1 = +$1; $2 = $2|0; $3 = $3|0; var $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 108|0); $5 = (_Utils_AccumulateWheelDelta($4,$1)|0); $6 = Math_imul($5, $3)|0; $7 = (($6|0) % 9)&-1; $8 = (($7) + ($2))|0; $9 = ($8|0)<(0); $10 = (($8) + 9)|0; $spec$select = $9 ? $10 : $8; $11 = ($spec$select|0)>(8); $12 = (($spec$select) + -9)|0; $$1 = $11 ? $12 : $spec$select; return ($$1|0); } function _HotbarWidget_RenderHotbarOutline($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0; var $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(1803520)>>0]|0; $2 = ($1<<24>>24)==(0); $3 = HEAP32[(1803548)>>2]|0; $4 = HEAP32[(1803544)>>2]|0; $5 = $2 ? $4 : $3; $6 = ((($0)) + 64|0); HEAP32[$6>>2] = $5; _Texture_Render($6); $7 = ((($0)) + 4|0); $8 = HEAP32[$7>>2]|0; $9 = (+($8|0)); $10 = ((($0)) + 100|0); $11 = +HEAPF32[$10>>2]; $12 = $11 + $9; $13 = ((($0)) + 92|0); $14 = +HEAPF32[$13>>2]; $15 = HEAP32[(1811000)>>2]|0; $16 = (+($15|0)); $17 = $14 * $16; $18 = $12 + $17; $19 = (~~(($18))); $20 = ((($0)) + 36|0); HEAP32[$20>>2] = $5; $21 = (+($19|0)); $22 = ((($0)) + 96|0); $23 = +HEAPF32[$22>>2]; $24 = $23 * 0.5; $25 = $21 - $24; $26 = (~~(($25))); $27 = $26&65535; $28 = ((($0)) + 40|0); HEAP16[$28>>1] = $27; _Gfx_Draw2DTexture($20,-1); return; } function _HotbarWidget_RenderHotbarBlocks($0) { $0 = $0|0; var $$021 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 3456|0; $1 = sp; $2 = HEAP32[(1826328)>>2]|0; _IsometricDrawer_BeginBatch($1,$2); $3 = ((($0)) + 104|0); $4 = +HEAPF32[$3>>2]; $5 = $4 * 0.5; $6 = ((($0)) + 8|0); $7 = ((($0)) + 16|0); $8 = ((($0)) + 100|0); $9 = ((($0)) + 4|0); $10 = ((($0)) + 92|0); $$021 = 0; while(1) { $11 = ($$021|0)!=(8); $12 = HEAP8[1972870]|0; $13 = ($12<<24>>24)==(0); $or$cond = $11 | $13; if (!($or$cond)) { label = 4; break; } $14 = HEAP32[$6>>2]|0; $15 = HEAP32[$7>>2]|0; $16 = (($15|0) / 2)&-1; $17 = (($16) + ($14))|0; $18 = +HEAPF32[$8>>2]; $19 = HEAP32[$9>>2]|0; $20 = (+($19|0)); $21 = $18 + $20; $22 = +HEAPF32[$10>>2]; $23 = (+($$021|0)); $24 = $22 * $23; $25 = $21 + $24; $26 = (~~(($25))); $27 = HEAP32[(1811004)>>2]|0; $28 = (($27) + ($$021))|0; $29 = (1809300 + ($28<<1)|0); $30 = HEAP16[$29>>1]|0; $31 = (+($26|0)); $32 = (+($17|0)); _IsometricDrawer_DrawBatch($30,$5,$31,$32); $33 = (($$021) + 1)|0; $exitcond = ($33|0)==(9); if ($exitcond) { label = 4; break; } else { $$021 = $33; } } if ((label|0) == 4) { _IsometricDrawer_EndBatch(); STACKTOP = sp;return; } } function _HotbarWidget_SetFont($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = HEAP8[1972870]|0; $4 = ($3<<24>>24)==(0); if ($4) { STACKTOP = sp;return; } _DrawTextArgs_Make($2,22280,$1,1); $5 = ((($0)) + 120|0); _Drawer2D_MakeTextTexture($5,$2); STACKTOP = sp;return; } function _TableWidget_RecreateBlocks($0) { $0 = $0|0; var $$03337 = 0, $$040 = 0, $$1$lcssa42 = 0, $$1$lcssa43 = 0, $$134 = 0, $$138 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, $spec$select35 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[1972837]|0; $2 = ($1<<24>>24)==(0); $3 = $2 ? 49 : 767; $4 = ((($0)) + 36|0); HEAP32[$4>>2] = 0; $5 = ((($0)) + 40|0); $6 = HEAP32[$5>>2]|0; $$040 = 0;$21 = 0; while(1) { $7 = (($6) + ($$040))|0; $8 = ($7>>>0)<(768); $spec$select = $8 ? $7 : 768; $9 = ($$040|0)<($spec$select|0); if ($9) { $$03337 = 1;$$138 = $$040; while(1) { $10 = (1809462 + ($$138<<1)|0); $11 = HEAP16[$10>>1]|0; $12 = $11&65535; $13 = ($3>>>0)<($12>>>0); if ($13) { $$134 = $$03337; } else { $14 = HEAP32[$4>>2]|0; $15 = (($14) + 1)|0; HEAP32[$4>>2] = $15; $16 = (((($0)) + 84|0) + ($14<<1)|0); HEAP16[$16>>1] = $11; $17 = ($11<<16>>16)==(0); $spec$select35 = $17 ? $$03337 : 0; $$134 = $spec$select35; } $18 = (($$138) + 1)|0; $19 = ($18|0)<($spec$select|0); if ($19) { $$03337 = $$134;$$138 = $18; } else { break; } } $20 = ($$134<<24>>24)==(0); if ($20) { $$1$lcssa43 = $spec$select; } else { $$1$lcssa42 = $spec$select; label = 8; } } else { $$1$lcssa42 = $$040; label = 8; } if ((label|0) == 8) { label = 0; HEAP32[$4>>2] = $21; $$1$lcssa43 = $$1$lcssa42; } $22 = ($$1$lcssa43>>>0)<(768); $23 = HEAP32[$4>>2]|0; if ($22) { $$040 = $$1$lcssa43;$21 = $23; } else { break; } } $24 = (_Math_CeilDiv($23,$6)|0); $25 = ((($0)) + 44|0); HEAP32[$25>>2] = $24; $26 = HEAP32[$0>>2]|0; $27 = ((($26)) + 8|0); $28 = HEAP32[$27>>2]|0; FUNCTION_TABLE_vi[$28 & 511]($0); return; } function _TableWidget_Recreate($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[$0>>2]|0; $2 = ((($1)) + 4|0); $3 = HEAP32[$2>>2]|0; FUNCTION_TABLE_vi[$3 & 511]($0); $4 = ((($0)) + 72|0); _Gfx_RecreateDynamicVb($4,1,1280); _TableWidget_RecreateTitle($0); return; } function _TableWidget_RecreateTitle($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 52|0); $4 = HEAP32[$3>>2]|0; $5 = ($2|0)==($4|0); if ($5) { return; } $6 = ((($0)) + 36|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==(0); if ($8) { return; } HEAP32[$3>>2] = $2; $9 = ($2|0)==(-1); if ($9) { $14 = 0; } else { $10 = (((($0)) + 84|0) + ($2<<1)|0); $11 = HEAP16[$10>>1]|0; $14 = $11; } $12 = ((($0)) + 1728|0); $13 = HEAP32[$12>>2]|0; FUNCTION_TABLE_vi[$13 & 511]($14); return; } function _TableWidget_Create($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _Widget_Reset($0); HEAP32[$0>>2] = 22288; $1 = ((($0)) + 52|0); HEAP32[$1>>2] = -1000; $2 = ((($0)) + 1620|0); _ScrollbarWidget_Create($2); $3 = ((($0)) + 22|0); HEAP8[$3>>0] = 1; $4 = ((($0)) + 23|0); HEAP8[$4>>0] = 1; $5 = ((($0)) + 1708|0); HEAP32[$5>>2] = -20; $6 = ((($0)) + 1712|0); HEAP32[$6>>2] = -20; $7 = ((($0)) + 80|0); HEAPF32[$7>>2] = 1.0; $8 = (_Display_ScaleX(15)|0); $9 = ((($0)) + 1716|0); HEAP32[$9>>2] = $8; $10 = (_Display_ScaleY(35)|0); $11 = ((($0)) + 1720|0); HEAP32[$11>>2] = $10; $12 = (_Display_ScaleX(15)|0); $13 = ((($0)) + 1724|0); HEAP32[$13>>2] = $12; return; } function _TableWidget_Render($0,$1) { $0 = $0|0; $1 = +$1; var $$069 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0.0, $63 = 0; var $64 = 0, $65 = 0.0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0.0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0; var $82 = 0, $83 = 0.0, $84 = 0, $85 = 0, $86 = 0, $87 = 0.0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 30736|0; $2 = sp; $3 = sp + 30724|0; $4 = sp + 30720|0; $5 = (_Table_X($0)|0); $6 = (_Table_Y($0)|0); $7 = (_Table_Width($0)|0); $8 = (_Table_Height($0)|0); _Gfx_Draw2DGradient($5,$6,$7,$8,-1474158046,-899139271); $9 = ((($0)) + 48|0); $10 = HEAP32[$9>>2]|0; $11 = ((($0)) + 44|0); $12 = HEAP32[$11>>2]|0; $13 = ($10|0)<($12|0); if ($13) { $14 = ((($0)) + 1620|0); $15 = HEAP32[$14>>2]|0; $16 = HEAP32[$15>>2]|0; FUNCTION_TABLE_vid[$16 & 63]($14,$1); } $17 = ((($0)) + 60|0); $18 = HEAP32[$17>>2]|0; $19 = ((($0)) + 64|0); $20 = HEAP32[$19>>2]|0; $21 = ((($0)) + 56|0); $22 = HEAP32[$21>>2]|0; $23 = ($22|0)==(-1); $24 = HEAP8[1972839]|0; $25 = ($24<<24>>24)==(0); $or$cond = $23 | $25; if (!($or$cond)) { $26 = ((($0)) + 84|0); $27 = (($26) + ($22<<1)|0); $28 = HEAP16[$27>>1]|0; $29 = ($28<<16>>16)==(0); if (!($29)) { (_TableWidget_GetCoords($0,$22,$3,$4)|0); $30 = (+($18|0)); $31 = $30 * 0.10000000149011612; $32 = $31 * 2.0; $33 = $32 + $30; $34 = (~~(($33))); $35 = HEAP32[$3>>2]|0; $36 = (+($35|0)); $37 = $36 - $31; $38 = (~~(($37))); $39 = HEAP32[$4>>2]|0; $40 = (+($39|0)); $41 = $40 - $31; $42 = (~~(($41))); _Gfx_Draw2DGradient($38,$42,$34,$34,-1895825409,-1056964609); } } _Gfx_SetVertexFormat(1); $43 = ((($0)) + 72|0); $44 = HEAP32[$43>>2]|0; _IsometricDrawer_BeginBatch($2,$44); $45 = ((($0)) + 36|0); $46 = HEAP32[$45>>2]|0; $47 = ($46|0)>(0); if ($47) { $48 = ((($0)) + 84|0); $49 = (+($18|0)); $50 = $49 * 0.69999998807907104; $51 = $50 * 0.5; $52 = (($18|0) / 2)&-1; $53 = (($20|0) / 2)&-1; $$069 = 0; while(1) { $54 = (_TableWidget_GetCoords($0,$$069,$3,$4)|0); $55 = ($54<<24>>24)==(0); if (!($55)) { $56 = HEAP32[$21>>2]|0; $57 = ($$069|0)==($56|0); if (!($57)) { $58 = (($48) + ($$069<<1)|0); $59 = HEAP16[$58>>1]|0; $60 = HEAP32[$3>>2]|0; $61 = (($60) + ($52))|0; $62 = (+($61|0)); $63 = HEAP32[$4>>2]|0; $64 = (($63) + ($53))|0; $65 = (+($64|0)); _IsometricDrawer_DrawBatch($59,$51,$62,$65); } } $66 = (($$069) + 1)|0; $67 = HEAP32[$45>>2]|0; $68 = ($66|0)<($67|0); if ($68) { $$069 = $66; } else { break; } } } $69 = HEAP32[$21>>2]|0; $70 = ($69|0)==(-1); if ($70) { _IsometricDrawer_EndBatch(); STACKTOP = sp;return; } (_TableWidget_GetCoords($0,$69,$3,$4)|0); $71 = ((($0)) + 84|0); $72 = (($71) + ($69<<1)|0); $73 = HEAP16[$72>>1]|0; $74 = (+($18|0)); $75 = ((($0)) + 68|0); $76 = +HEAPF32[$75>>2]; $77 = $76 + $74; $78 = $77 * 0.69999998807907104; $79 = $78 * 0.5; $80 = HEAP32[$3>>2]|0; $81 = (($18|0) / 2)&-1; $82 = (($80) + ($81))|0; $83 = (+($82|0)); $84 = HEAP32[$4>>2]|0; $85 = (($20|0) / 2)&-1; $86 = (($84) + ($85))|0; $87 = (+($86|0)); _IsometricDrawer_DrawBatch($73,$79,$83,$87); _IsometricDrawer_EndBatch(); STACKTOP = sp;return; } function _TableWidget_Free($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 72|0); _Gfx_DeleteVb($1); $2 = ((($0)) + 52|0); HEAP32[$2>>2] = -1000; return; } function _TableWidget_Reposition($0) { $0 = $0|0; var $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 80|0); $2 = +HEAPF32[$1>>2]; $3 = (+Math_sqrt((+$2))); $4 = $3 * 50.0; $5 = (~~(($4))); $6 = (_Display_ScaleX($5)|0); $7 = ((($0)) + 60|0); HEAP32[$7>>2] = $6; $8 = (_Display_ScaleY($5)|0); $9 = ((($0)) + 64|0); HEAP32[$9>>2] = $8; $10 = $3 * 25.0; $11 = ((($0)) + 68|0); HEAPF32[$11>>2] = $10; $12 = ((($0)) + 44|0); $13 = HEAP32[$12>>2]|0; $14 = ($13|0)<(8); $spec$select = $14 ? $13 : 8; $15 = ((($0)) + 48|0); HEAP32[$15>>2] = $spec$select; $16 = ((($0)) + 40|0); $17 = ((($0)) + 12|0); $18 = ((($0)) + 16|0); while(1) { $19 = HEAP32[$7>>2]|0; $20 = HEAP32[$16>>2]|0; $21 = Math_imul($20, $19)|0; HEAP32[$17>>2] = $21; $22 = HEAP32[$9>>2]|0; $23 = HEAP32[$15>>2]|0; $24 = Math_imul($23, $22)|0; HEAP32[$18>>2] = $24; _Widget_CalcPosition($0); $25 = HEAP8[1972839]|0; $26 = ($25<<24>>24)==(0); if (!($26)) { break; } $27 = (_Table_Y($0)|0); $28 = ($27|0)>(-1); if ($28) { break; } $29 = HEAP32[$15>>2]|0; $30 = (($29) + -1)|0; HEAP32[$15>>2] = $30; $31 = ($29|0)>(2); if (!($31)) { break; } } $32 = (_Table_X($0)|0); $33 = (_Table_Width($0)|0); $34 = (($33) + ($32))|0; $35 = ((($0)) + 1624|0); HEAP32[$35>>2] = $34; $36 = (_Table_Y($0)|0); $37 = ((($0)) + 1628|0); HEAP32[$37>>2] = $36; $38 = (_Table_Height($0)|0); $39 = ((($0)) + 1636|0); HEAP32[$39>>2] = $38; $40 = HEAP32[$12>>2]|0; $41 = ((($0)) + 1660|0); HEAP32[$41>>2] = $40; $42 = HEAP32[$15>>2]|0; $43 = ((($0)) + 1664|0); HEAP32[$43>>2] = $42; return; } function _TableWidget_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 56|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(-1); L1: do { if ($4) { $$0 = 0; } else { switch ($1|0) { case 46: case 105: { _TableWidget_ScrollRelative($0,-1); $$0 = 1; break L1; } case 47: case 107: { _TableWidget_ScrollRelative($0,1); $$0 = 1; break L1; } case 44: case 109: { $5 = ((($0)) + 40|0); $6 = HEAP32[$5>>2]|0; $7 = (0 - ($6))|0; _TableWidget_ScrollRelative($0,$7); $$0 = 1; break L1; } case 45: case 103: { $8 = ((($0)) + 40|0); $9 = HEAP32[$8>>2]|0; _TableWidget_ScrollRelative($0,$9); $$0 = 1; break L1; } default: { $$0 = 0; break L1; } } } } while(0); return ($$0|0); } function _TableWidget_MouseScroll($0,$1) { $0 = $0|0; $1 = +$1; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$store$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_Table_X($0)|0); $3 = (_Table_Y($0)|0); $4 = (_Table_Width($0)|0); $5 = ((($0)) + 1620|0); $6 = ((($0)) + 1632|0); $7 = HEAP32[$6>>2]|0; $8 = (($7) + ($4))|0; $9 = (_Table_Height($0)|0); $10 = (_Gui_ContainsPointers($2,$3,$8,$9)|0); $11 = $10&255; $12 = ($11<<24>>24)==(0); if ($12) { $$0 = 0; return ($$0|0); } $13 = ((($0)) + 1656|0); $14 = HEAP32[$13>>2]|0; $15 = HEAP32[$5>>2]|0; $16 = ((($15)) + 20|0); $17 = HEAP32[$16>>2]|0; (FUNCTION_TABLE_iid[$17 & 15]($5,$1)|0); $18 = ((($0)) + 56|0); $19 = HEAP32[$18>>2]|0; $20 = ($19|0)==(-1); if ($20) { $$0 = 1; return ($$0|0); } $21 = HEAP32[$13>>2]|0; $22 = (($21) - ($14))|0; $23 = ((($0)) + 40|0); $24 = HEAP32[$23>>2]|0; $25 = Math_imul($22, $24)|0; $26 = (($25) + ($19))|0; $27 = ((($0)) + 36|0); $28 = HEAP32[$27>>2]|0; $29 = ($26|0)<($28|0); $spec$store$select = $29 ? $26 : -1; HEAP32[$18>>2] = $spec$store$select; _TableWidget_RecreateTitle($0); $$0 = 1; return ($$0|0); } function _TableWidget_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$ = 0, $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 76|0); HEAP8[$4>>0] = 0; $5 = ((($0)) + 1620|0); $6 = HEAP32[$5>>2]|0; $7 = ((($6)) + 24|0); $8 = HEAP32[$7>>2]|0; $9 = (FUNCTION_TABLE_iiiii[$8 & 63]($5,$1,$2,$3)|0); $10 = ($9|0)==(0); if (!($10)) { $$0 = 1; return ($$0|0); } $11 = ((($0)) + 56|0); $12 = HEAP32[$11>>2]|0; $13 = ($12|0)==(-1); if (!($13)) { $14 = ((($0)) + 84|0); $15 = (($14) + ($12<<1)|0); $16 = HEAP16[$15>>1]|0; $17 = ($16<<16>>16)==(0); if (!($17)) { _Inventory_SetSelectedBlock($16); HEAP8[$4>>0] = 1; $$0 = 1; return ($$0|0); } } $18 = (_Table_X($0)|0); $19 = (_Table_Y($0)|0); $20 = (_Table_Width($0)|0); $21 = (_Table_Height($0)|0); $22 = (_Gui_Contains($18,$19,$20,$21,$2,$3)|0); $23 = ($22|0)!=(0); $$ = $23&1; $$0 = $$; return ($$0|0); } function _TableWidget_PointerUp($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 1620|0); $5 = HEAP32[$4>>2]|0; $6 = ((($5)) + 28|0); $7 = HEAP32[$6>>2]|0; FUNCTION_TABLE_viiii[$7 & 31]($4,$1,$2,$3); return; } function _TableWidget_PointerMove($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$047 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp + 4|0; $5 = sp; $6 = ((($0)) + 1620|0); $7 = HEAP32[$6>>2]|0; $8 = ((($7)) + 32|0); $9 = HEAP32[$8>>2]|0; $10 = (FUNCTION_TABLE_iiiii[$9 & 63]($6,$1,$2,$3)|0); $11 = ($10|0)==(0); if (!($11)) { STACKTOP = sp;return 1; } $12 = ((($0)) + 1708|0); $13 = HEAP32[$12>>2]|0; $14 = ($13|0)==($2|0); if ($14) { $15 = ((($0)) + 1712|0); $16 = HEAP32[$15>>2]|0; $17 = ($16|0)==($3|0); if ($17) { STACKTOP = sp;return 1; } } HEAP32[$12>>2] = $2; $18 = ((($0)) + 1712|0); HEAP32[$18>>2] = $3; $19 = ((($0)) + 56|0); HEAP32[$19>>2] = -1; $20 = ((($0)) + 60|0); $21 = HEAP32[$20>>2]|0; $22 = ((($0)) + 64|0); $23 = HEAP32[$22>>2]|0; $24 = ((($0)) + 48|0); $25 = HEAP32[$24>>2]|0; $26 = Math_imul($25, $23)|0; $27 = ((($0)) + 4|0); $28 = HEAP32[$27>>2]|0; $29 = ((($0)) + 8|0); $30 = HEAP32[$29>>2]|0; $31 = (($30) + 3)|0; $32 = ((($0)) + 12|0); $33 = HEAP32[$32>>2]|0; $34 = (($26) + -6)|0; $35 = (_Gui_Contains($28,$31,$33,$34,$2,$3)|0); $36 = ($35|0)==(0); L8: do { if (!($36)) { $37 = ((($0)) + 36|0); $38 = HEAP32[$37>>2]|0; $39 = ($38|0)>(0); if ($39) { $$047 = 0; while(1) { (_TableWidget_GetCoords($0,$$047,$4,$5)|0); $40 = HEAP32[$4>>2]|0; $41 = HEAP32[$5>>2]|0; $42 = (_Gui_Contains($40,$41,$21,$23,$2,$3)|0); $43 = ($42|0)==(0); if (!($43)) { break; } $44 = (($$047) + 1)|0; $45 = HEAP32[$37>>2]|0; $46 = ($44|0)<($45|0); if ($46) { $$047 = $44; } else { break L8; } } HEAP32[$19>>2] = $$047; } } } while(0); _TableWidget_RecreateTitle($0); STACKTOP = sp;return 1; } function _TableWidget_GetCoords($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 40|0); $5 = HEAP32[$4>>2]|0; $6 = (($1|0) / ($5|0))&-1; $7 = Math_imul($6, $5)|0; $8 = (($1) - ($7))|0; $9 = ((($0)) + 1656|0); $10 = HEAP32[$9>>2]|0; $11 = (($6) - ($10))|0; $12 = ((($0)) + 4|0); $13 = HEAP32[$12>>2]|0; $14 = ((($0)) + 60|0); $15 = HEAP32[$14>>2]|0; $16 = Math_imul($15, $8)|0; $17 = (($16) + ($13))|0; HEAP32[$2>>2] = $17; $18 = ((($0)) + 8|0); $19 = HEAP32[$18>>2]|0; $20 = ((($0)) + 64|0); $21 = HEAP32[$20>>2]|0; $22 = Math_imul($21, $11)|0; $23 = (($19) + 3)|0; $24 = (($23) + ($22))|0; HEAP32[$3>>2] = $24; $25 = ($11|0)>(-1); if (!($25)) { $29 = 0; return ($29|0); } $26 = ((($0)) + 48|0); $27 = HEAP32[$26>>2]|0; $28 = ($11|0)<($27|0); $phitmp = $28&1; $29 = $phitmp; return ($29|0); } function _Table_X($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 1716|0); $4 = HEAP32[$3>>2]|0; $5 = (($2) - ($4))|0; return ($5|0); } function _Table_Y($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 8|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 1720|0); $4 = HEAP32[$3>>2]|0; $5 = (($2) - ($4))|0; return ($5|0); } function _Table_Width($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 40|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 60|0); $4 = HEAP32[$3>>2]|0; $5 = Math_imul($4, $2)|0; $6 = ((($0)) + 1716|0); $7 = HEAP32[$6>>2]|0; $8 = $7 << 1; $9 = (($8) + ($5))|0; return ($9|0); } function _Table_Height($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 48|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 64|0); $4 = HEAP32[$3>>2]|0; $5 = Math_imul($4, $2)|0; $6 = ((($0)) + 1720|0); $7 = HEAP32[$6>>2]|0; $8 = (($5) + ($7))|0; $9 = ((($0)) + 1724|0); $10 = HEAP32[$9>>2]|0; $11 = (($8) + ($10))|0; return ($11|0); } function _TableWidget_ScrollRelative($0,$1) { $0 = $0|0; $1 = $1|0; var $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0; var sp = 0; sp = STACKTOP; $2 = ((($0)) + 56|0); $3 = HEAP32[$2>>2]|0; $4 = (($3) + ($1))|0; $5 = ($4|0)<(0); $spec$select = $5 ? $3 : $4; $6 = ((($0)) + 36|0); $7 = HEAP32[$6>>2]|0; $8 = ($spec$select|0)<($7|0); $9 = $8 ? 0 : $1; $$1 = (($spec$select) - ($9))|0; HEAP32[$2>>2] = $$1; $10 = ((($0)) + 40|0); $11 = HEAP32[$10>>2]|0; $12 = (($$1|0) / ($11|0))&-1; $13 = (($3|0) / ($11|0))&-1; $14 = (($12) - ($13))|0; $15 = ((($0)) + 1620|0); $16 = ((($0)) + 1656|0); $17 = HEAP32[$16>>2]|0; $18 = (($14) + ($17))|0; HEAP32[$16>>2] = $18; _ScrollbarWidget_ClampTopRow($15); _TableWidget_RecreateTitle($0); _TableWidget_MoveCursorToSelected($0); return; } function _TableWidget_MoveCursorToSelected($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 4|0; $2 = sp; $3 = ((($0)) + 56|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)==(-1); if ($5) { STACKTOP = sp;return; } (_TableWidget_GetCoords($0,$4,$1,$2)|0); $6 = ((($0)) + 60|0); $7 = HEAP32[$6>>2]|0; $8 = (($7|0) / 2)&-1; $9 = HEAP32[$1>>2]|0; $10 = (($9) + ($8))|0; HEAP32[$1>>2] = $10; $11 = ((($0)) + 64|0); $12 = HEAP32[$11>>2]|0; $13 = (($12|0) / 2)&-1; $14 = HEAP32[$2>>2]|0; $15 = (($14) + ($13))|0; HEAP32[$2>>2] = $15; STACKTOP = sp;return; } function _TableWidget_SetBlockTo($0,$1) { $0 = $0|0; $1 = $1|0; var $$020 = 0, $$neg19 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 56|0); HEAP32[$2>>2] = -1; $3 = ((($0)) + 36|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if ($5) { $6 = HEAP32[$3>>2]|0; $$020 = 0; while(1) { $7 = (((($0)) + 84|0) + ($$020<<1)|0); $8 = HEAP16[$7>>1]|0; $9 = ($8<<16>>16)==($1<<16>>16); if ($9) { HEAP32[$2>>2] = $$020; } $10 = (($$020) + 1)|0; $11 = ($10|0)<($6|0); if ($11) { $$020 = $10; } else { break; } } } $12 = ($1<<16>>16)==(0); if ($12) { HEAP32[$2>>2] = -1; } $13 = HEAP32[$2>>2]|0; $14 = ((($0)) + 40|0); $15 = HEAP32[$14>>2]|0; $16 = (($13|0) / ($15|0))&-1; $17 = ((($0)) + 1620|0); $18 = ((($0)) + 1656|0); $19 = ((($0)) + 48|0); $20 = HEAP32[$19>>2]|0; $$neg19 = (($16) + 1)|0; $21 = (($$neg19) - ($20))|0; HEAP32[$18>>2] = $21; _ScrollbarWidget_ClampTopRow($17); _TableWidget_MoveCursorToSelected($0); _TableWidget_RecreateTitle($0); return; } function _TableWidget_OnInventoryChanged($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _TableWidget_RecreateBlocks($0); $1 = ((($0)) + 56|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 36|0); $4 = HEAP32[$3>>2]|0; $5 = ($2|0)<($4|0); if (!($5)) { $6 = (($4) + -1)|0; HEAP32[$1>>2] = $6; } $7 = ((($0)) + 1708|0); HEAP32[$7>>2] = -1; $8 = ((($0)) + 1712|0); HEAP32[$8>>2] = -1; $9 = HEAP32[$1>>2]|0; $10 = ((($0)) + 40|0); $11 = HEAP32[$10>>2]|0; $12 = (($9|0) / ($11|0))&-1; $13 = ((($0)) + 1620|0); $14 = ((($0)) + 1656|0); HEAP32[$14>>2] = $12; _ScrollbarWidget_ClampTopRow($13); _TableWidget_RecreateTitle($0); return; } function _InputWidget_Clear($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 64|0); HEAP16[$1>>1] = 0; $2 = 1949280; $3 = $2; $4 = HEAP32[$3>>2]|0; $5 = (($2) + 4)|0; $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = ((($0)) + 68|0); $9 = $8; $10 = $9; HEAP32[$10>>2] = $4; $11 = (($9) + 4)|0; $12 = $11; HEAP32[$12>>2] = $7; $13 = ((($0)) + 76|0); $14 = $13; $15 = $14; HEAP32[$15>>2] = $4; $16 = (($14) + 4)|0; $17 = $16; HEAP32[$17>>2] = $7; $18 = ((($0)) + 84|0); $19 = $18; $20 = $19; HEAP32[$20>>2] = $4; $21 = (($19) + 4)|0; $22 = $21; HEAP32[$22>>2] = $7; $23 = ((($0)) + 156|0); HEAP32[$23>>2] = -1; $24 = ((($0)) + 108|0); _Gfx_DeleteTexture($24); return; } function _InputWidget_AppendText($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_InputWidget_DoAppendText($0,$1)|0); $3 = ($2|0)==(0); if ($3) { return; } _InputWidget_UpdateText($0); return; } function _InputWidget_DoAppendText($0,$1) { $0 = $0|0; $1 = $1|0; var $$0$lcssa = 0, $$01011 = 0, $$012 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 4|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { $$0$lcssa = 0; return ($$0$lcssa|0); } $$01011 = 0;$$012 = 0; while(1) { $5 = HEAP32[$1>>2]|0; $6 = (($5) + ($$01011)|0); $7 = HEAP8[$6>>0]|0; $8 = (_InputWidget_TryAppendChar($0,$7)|0); $9 = ($8<<24>>24)!=(0); $10 = $9&1; $spec$select = (($$012) + ($10))|0; $11 = (($$01011) + 1)|0; $12 = HEAP16[$2>>1]|0; $13 = $12&65535; $14 = ($11>>>0)<($13>>>0); if ($14) { $$01011 = $11;$$012 = $spec$select; } else { $$0$lcssa = $spec$select; break; } } return ($$0$lcssa|0); } function _InputWidget_UpdateText($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 40|0); $2 = HEAP32[$1>>2]|0; $3 = (FUNCTION_TABLE_i[$2 & 3]()|0); $4 = ($3|0)>(1); if ($4) { $5 = ((($0)) + 60|0); $6 = ((($0)) + 68|0); _WordWrap_Do($5,$6,$3,64); } else { $7 = ((($0)) + 68|0); $8 = ((($0)) + 60|0); $9 = $8; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = (($9) + 4)|0; $13 = $12; $14 = HEAP32[$13>>2]|0; $15 = $7; $16 = $15; HEAP32[$16>>2] = $11; $17 = (($15) + 4)|0; $18 = $17; HEAP32[$18>>2] = $14; } $19 = ((($0)) + 108|0); _Gfx_DeleteTexture($19); _InputWidget_CalculateLineSizes($0); $20 = ((($0)) + 44|0); $21 = HEAP32[$20>>2]|0; FUNCTION_TABLE_vi[$21 & 511]($0); _InputWidget_UpdateCaret($0); $22 = ((($0)) + 60|0); _Window_SetKeyboardText($22); $23 = ((($0)) + 56|0); $24 = HEAP32[$23>>2]|0; $25 = ($24|0)==(0|0); if ($25) { return; } FUNCTION_TABLE_vi[$24 & 511]($0); return; } function _InputWidget_CalculateLineSizes($0) { $0 = $0|0; var $$113 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 96|0; $1 = sp + 80|0; $2 = sp; $3 = sp + 64|0; $4 = ((($0)) + 96|0); $5 = $4; $6 = $5; HEAP32[$6>>2] = 0; $7 = (($5) + 4)|0; $8 = $7; HEAP32[$8>>2] = 0; $9 = ((($0)) + 136|0); $10 = HEAP32[$9>>2]|0; $11 = ((($0)) + 92|0); HEAP32[$11>>2] = $10; $12 = ((($0)) + 36|0); $13 = HEAP32[$12>>2]|0; _DrawTextArgs_MakeEmpty($3,$13,1); HEAP32[$1>>2] = $2; $14 = ((($1)) + 4|0); HEAP16[$14>>1] = 0; $15 = ((($1)) + 6|0); HEAP16[$15>>1] = 64; $16 = ((($0)) + 40|0); $17 = HEAP32[$16>>2]|0; $18 = (FUNCTION_TABLE_i[$17 & 3]()|0); $19 = ($18|0)>(0); if (!($19)) { STACKTOP = sp;return; } $$113 = 0; while(1) { HEAP16[$14>>1] = 0; _InputWidget_FormatLine($0,$$113,$1); $20 = $1; $21 = $20; $22 = HEAP32[$21>>2]|0; $23 = (($20) + 4)|0; $24 = $23; $25 = HEAP32[$24>>2]|0; $26 = $3; $27 = $26; HEAP32[$27>>2] = $22; $28 = (($26) + 4)|0; $29 = $28; HEAP32[$29>>2] = $25; $30 = (_Drawer2D_TextWidth($3)|0); $31 = (((($0)) + 92|0) + ($$113<<2)|0); $32 = HEAP32[$31>>2]|0; $33 = (($32) + ($30))|0; HEAP32[$31>>2] = $33; $34 = (($$113) + 1)|0; $35 = HEAP32[$16>>2]|0; $36 = (FUNCTION_TABLE_i[$35 & 3]()|0); $37 = ($34|0)<($36|0); if ($37) { $$113 = $34; } else { break; } } STACKTOP = sp;return; } function _InputWidget_UpdateCaret($0) { $0 = $0|0; var $$0 = 0, $$1 = 0, $$sink = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; var $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0; var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 112|0; $1 = sp + 96|0; $2 = sp; $3 = sp + 80|0; $4 = sp + 72|0; $5 = sp + 64|0; $6 = ((($0)) + 168|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==(0); if ($8) { $9 = ((($0)) + 36|0); $10 = HEAP32[$9>>2]|0; _DrawTextArgs_Make($3,22332,$10,1); _Drawer2D_MakeTextTexture($6,$3); $11 = ((($0)) + 176|0); $12 = HEAP16[$11>>1]|0; $13 = $12&65535; $14 = ($13*3)|0; $15 = (2)?($14 >>> 2):($14); $16 = ((($0)) + 144|0); HEAP32[$16>>2] = $15; } $17 = ((($0)) + 40|0); $18 = HEAP32[$17>>2]|0; $19 = (FUNCTION_TABLE_i[$18 & 3]()|0); $20 = $19 << 6; $21 = ((($0)) + 156|0); $22 = HEAP32[$21>>2]|0; $23 = ($22|0)<($20|0); if (!($23)) { HEAP32[$21>>2] = -1; } $24 = HEAP32[$21>>2]|0; $25 = ((($0)) + 68|0); $26 = HEAP32[$17>>2]|0; $27 = (FUNCTION_TABLE_i[$26 & 3]()|0); $28 = ((($0)) + 148|0); $29 = ((($0)) + 152|0); _WordWrap_GetCoords($24,$25,$27,$28,$29); $30 = ((($0)) + 36|0); $31 = HEAP32[$30>>2]|0; _DrawTextArgs_MakeEmpty($3,$31,0); $32 = ((($0)) + 200|0); HEAPF64[$32>>3] = 0.0; $33 = ((($0)) + 144|0); $34 = HEAP32[$33>>2]|0; $35 = $34&65535; $36 = ((($0)) + 176|0); HEAP16[$36>>1] = $35; $37 = HEAP32[$28>>2]|0; $38 = ($37|0)==(64); if ($38) { $39 = HEAP32[$29>>2]|0; $40 = (((($0)) + 92|0) + ($39<<2)|0); $41 = HEAP32[$40>>2]|0; $$1 = $41; } else { HEAP32[$1>>2] = $2; $42 = ((($1)) + 4|0); HEAP16[$42>>1] = 0; $43 = ((($1)) + 6|0); HEAP16[$43>>1] = 64; $44 = HEAP32[$29>>2]|0; _InputWidget_FormatLine($0,$44,$1); $45 = HEAP32[$28>>2]|0; _String_UNSAFE_Substring($4,$1,0,$45); $46 = $4; $47 = $46; $48 = HEAP32[$47>>2]|0; $49 = (($46) + 4)|0; $50 = $49; $51 = HEAP32[$50>>2]|0; $52 = $3; $53 = $52; HEAP32[$53>>2] = $48; $54 = (($52) + 4)|0; $55 = $54; HEAP32[$55>>2] = $51; $56 = (_Drawer2D_TextWidth($3)|0); $57 = HEAP32[$29>>2]|0; $58 = ($57|0)==(0); if ($58) { $59 = ((($0)) + 136|0); $60 = HEAP32[$59>>2]|0; $61 = (($60) + ($56))|0; $$0 = $61; } else { $$0 = $56; } $62 = HEAP32[$28>>2]|0; $63 = HEAP16[$42>>1]|0; $64 = $63&65535; $65 = ($62|0)<($64|0); if ($65) { _String_UNSAFE_Substring($5,$1,$62,1); $66 = $5; $67 = $66; $68 = HEAP32[$67>>2]|0; $69 = (($66) + 4)|0; $70 = $69; $71 = HEAP32[$70>>2]|0; $72 = $3; $73 = $72; HEAP32[$73>>2] = $68; $74 = (($72) + 4)|0; $75 = $74; HEAP32[$75>>2] = $71; $76 = ((($3)) + 12|0); HEAP8[$76>>0] = 1; $77 = (_Drawer2D_TextWidth($3)|0); $78 = $77&65535; HEAP16[$36>>1] = $78; $$1 = $$0; } else { $$1 = $$0; } } $79 = ((($0)) + 4|0); $80 = HEAP32[$79>>2]|0; $81 = ((($0)) + 141|0); $82 = HEAP8[$81>>0]|0; $83 = $82&255; $84 = (($80) + ($$1))|0; $85 = (($84) + ($83))|0; $86 = $85&65535; $87 = ((($0)) + 172|0); HEAP16[$87>>1] = $86; $88 = ((($0)) + 114|0); $89 = HEAP16[$88>>1]|0; $90 = $89&65535; $91 = ((($0)) + 160|0); $92 = HEAP32[$91>>2]|0; $93 = (($92) + ($90))|0; $94 = HEAP32[$29>>2]|0; $95 = ((($0)) + 104|0); $96 = HEAP32[$95>>2]|0; $97 = Math_imul($96, $94)|0; $98 = (($93) + ($97))|0; $99 = $98&65535; $100 = ((($0)) + 174|0); HEAP16[$100>>1] = $99; $101 = HEAP32[$28>>2]|0; $102 = (_InputWidget_GetLastCol($0,$101,$94)|0); $103 = ($102<<24>>24)==(0); if ($103) { $107 = (_PackedCol_Scale(-1,0.80000001192092896)|0); $$sink = $107; $108 = ((($0)) + 164|0); HEAP32[$108>>2] = $$sink; STACKTOP = sp;return; } else { $104 = $102&255; $105 = (1781708 + ($104<<2)|0); $106 = HEAP32[$105>>2]|0; $$sink = $106; $108 = ((($0)) + 164|0); HEAP32[$108>>2] = $$sink; STACKTOP = sp;return; } } function _InputWidget_FormatLine($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $$01011 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; $4 = (((($0)) + 68|0) + ($1<<3)|0); $5 = $4; $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = (($5) + 4)|0; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = $3; $12 = $11; HEAP32[$12>>2] = $7; $13 = (($11) + 4)|0; $14 = $13; HEAP32[$14>>2] = $10; $15 = ((($0)) + 140|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(0); if ($17) { _String_AppendString($2,$3); STACKTOP = sp;return; } $18 = ((($3)) + 4|0); $19 = HEAP16[$18>>1]|0; $20 = ($19<<16>>16)==(0); if ($20) { STACKTOP = sp;return; } $$01011 = 0; while(1) { $21 = HEAP32[$3>>2]|0; $22 = (($21) + ($$01011)|0); $23 = HEAP8[$22>>0]|0; $24 = ($23<<24>>24)==(37); if ($24) { $25 = (($$01011) + 1)|0; $26 = (_Drawer2D_ValidColorCodeAt($3,$25)|0); $27 = ($26<<24>>24)==(0); $spec$select = $27 ? $23 : 38; $$0 = $spec$select; } else { $$0 = $23; } _String_Append($2,$$0); $28 = (($$01011) + 1)|0; $29 = HEAP16[$18>>1]|0; $30 = $29&65535; $31 = ($28>>>0)<($30>>>0); if ($31) { $$01011 = $28; } else { break; } } STACKTOP = sp;return; } function _InputWidget_GetLastCol($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $$01013 = 0, $$01112 = 0, $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; $3 = sp + 64|0; $4 = sp; HEAP32[$3>>2] = $4; $5 = ((($3)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($3)) + 6|0); HEAP16[$6>>1] = 64; $7 = ($2|0)>(-1); if (!($7)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $$01013 = $2;$$01112 = $1; while(1) { HEAP16[$5>>1] = 0; _InputWidget_FormatLine($0,$$01013,$3); $8 = (_Drawer2D_LastColor($3,$$01112)|0); $9 = ($8<<24>>24)==(0); if (!($9)) { $$0 = $8; label = 7; break; } $10 = ($$01013|0)>(0); if ($10) { $11 = (($$01013) + -1)|0; $12 = (((((($0)) + 68|0) + ($11<<3)|0)) + 4|0); $13 = HEAP16[$12>>1]|0; $14 = $13&65535; $$1 = $14; } else { $$1 = $$01112; } $15 = (($$01013) + -1)|0; $16 = ($$01013|0)>(0); if ($16) { $$01013 = $15;$$01112 = $$1; } else { $$0 = 0; label = 7; break; } } if ((label|0) == 7) { STACKTOP = sp;return ($$0|0); } return (0)|0; } function _InputWidget_TryAppendChar($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 40|0); $3 = HEAP32[$2>>2]|0; $4 = (FUNCTION_TABLE_i[$3 & 3]()|0); $5 = $4 << 6; $6 = ((($0)) + 64|0); $7 = HEAP16[$6>>1]|0; $8 = $7&65535; $9 = ($5|0)>($8|0); if (!($9)) { $$0 = 0; return ($$0|0); } $10 = ((($0)) + 52|0); $11 = HEAP32[$10>>2]|0; $12 = (FUNCTION_TABLE_iii[$11 & 127]($0,$1)|0); $13 = ($12<<24>>24)==(0); if ($13) { $$0 = 0; return ($$0|0); } _InputWidget_AppendChar($0,$1); $$0 = 1; return ($$0|0); } function _InputWidget_AppendChar($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$store$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 156|0); $3 = HEAP32[$2>>2]|0; $4 = ($3|0)==(-1); $5 = ((($0)) + 60|0); if ($4) { $6 = ((($0)) + 64|0); $7 = HEAP16[$6>>1]|0; $8 = $7&65535; _String_InsertAt($5,$8,$1); return; } else { _String_InsertAt($5,$3,$1); $9 = HEAP32[$2>>2]|0; $10 = (($9) + 1)|0; $11 = ((($0)) + 64|0); $12 = HEAP16[$11>>1]|0; $13 = $12&65535; $14 = ($10|0)<($13|0); $spec$store$select = $14 ? $10 : -1; HEAP32[$2>>2] = $spec$store$select; return; } } function _InputWidget_Append($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_InputWidget_TryAppendChar($0,$1)|0); $3 = ($2<<24>>24)==(0); if ($3) { return; } _InputWidget_UpdateText($0); return; } function _InputWidget_SetText($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _InputWidget_Clear($0); (_InputWidget_DoAppendText($0,$1)|0); _InputWidget_UpdateText($0); return; } function _TextInputWidget_Create($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; _InputWidget_Reset($0); HEAP32[$0>>2] = 22340; $4 = (_Display_ScaleX($1)|0); $5 = ((($0)) + 208|0); HEAP32[$5>>2] = $4; $6 = (_Display_ScaleY(30)|0); $7 = ((($0)) + 212|0); HEAP32[$7>>2] = $6; $8 = ((($0)) + 216|0); ;HEAP32[$8>>2]=HEAP32[$3>>2]|0;HEAP32[$8+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$8+8>>2]=HEAP32[$3+8>>2]|0;HEAP32[$8+12>>2]=HEAP32[$3+12>>2]|0; $9 = ((($0)) + 140|0); HEAP8[$9>>0] = 0; $10 = ((($0)) + 141|0); HEAP8[$10>>0] = 3; $11 = HEAP8[1972870]|0; $12 = ($11<<24>>24)==(0); $13 = $12&1; $14 = ((($0)) + 142|0); HEAP8[$14>>0] = $13; $15 = ((($0)) + 40|0); HEAP32[$15>>2] = 1; $16 = ((($0)) + 44|0); HEAP32[$16>>2] = 453; $17 = ((($0)) + 48|0); HEAP32[$17>>2] = 454; $18 = ((($0)) + 52|0); HEAP32[$18>>2] = 75; $19 = ((($0)) + 232|0); $20 = ((($0)) + 60|0); HEAP32[$20>>2] = $19; $21 = ((($0)) + 64|0); HEAP16[$21>>1] = 0; $22 = ((($0)) + 66|0); HEAP16[$22>>1] = 64; _String_Copy($20,$2); $23 = ((($0)) + 296|0); HEAP32[$23>>2] = 1972899; $24 = ((($0)) + 300|0); HEAP32[$24>>2] = 0; return; } function _InputWidget_Reset($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; _Widget_Reset($0); $1 = ((($0)) + 156|0); HEAP32[$1>>2] = -1; $2 = (_Display_ScaleY(2)|0); $3 = ((($0)) + 160|0); HEAP32[$3>>2] = $2; $4 = ((($0)) + 56|0); HEAP32[$4>>2] = 0; return; } function _TextInputWidget_GetMaxLines() { var label = 0, sp = 0; sp = STACKTOP; return 1; } function _TextInputWidget_RemakeTexture($0) { $0 = $0|0; var $$ = 0, $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 112|0; $1 = sp + 80|0; $2 = sp; $3 = sp + 64|0; $4 = sp + 88|0; $5 = ((($0)) + 60|0); $6 = ((($0)) + 36|0); $7 = HEAP32[$6>>2]|0; _DrawTextArgs_Make($3,$5,$7,0); $8 = (_Drawer2D_TextWidth($3)|0); $9 = ((($0)) + 104|0); $10 = HEAP32[$9>>2]|0; $11 = ((($0)) + 200|0); HEAPF64[$11>>3] = 0.0; HEAP32[$1>>2] = $2; $12 = ((($1)) + 4|0); HEAP16[$12>>1] = 0; $13 = ((($1)) + 6|0); HEAP16[$13>>1] = 64; $14 = ((($0)) + 216|0); $15 = HEAP32[$14>>2]|0; $16 = HEAP32[$15>>2]|0; FUNCTION_TABLE_vii[$16 & 255]($14,$1); $17 = ((($0)) + 208|0); $18 = HEAP32[$17>>2]|0; $19 = ($8|0)>($18|0); $$ = $19 ? $8 : $18; $20 = ((($0)) + 12|0); HEAP32[$20>>2] = $$; $21 = ((($0)) + 212|0); $22 = HEAP32[$21>>2]|0; $23 = ($10|0)>($22|0); $24 = $23 ? $10 : $22; $25 = ((($0)) + 16|0); HEAP32[$25>>2] = $24; _Context2D_Alloc($4,$$,$24); $26 = ($10|0)<($22|0); if ($26) { $27 = (($24|0) / 2)&-1; $28 = (($10|0) / 2)&-1; $29 = (($27) - ($28))|0; $$0 = $29; } else { $$0 = 0; } $30 = (($$0) + 2)|0; $31 = ((($0)) + 160|0); HEAP32[$31>>2] = $30; _Context2D_Clear($4,-937550306,0,0,$$,$24); $32 = ((($0)) + 141|0); $33 = HEAP8[$32>>0]|0; $34 = $33&255; _Context2D_DrawText($4,$3,$34,$$0); $35 = $1; $36 = $35; $37 = HEAP32[$36>>2]|0; $38 = (($35) + 4)|0; $39 = $38; $40 = HEAP32[$39>>2]|0; $41 = $3; $42 = $41; HEAP32[$42>>2] = $37; $43 = (($41) + 4)|0; $44 = $43; HEAP32[$44>>2] = $40; $45 = (_Drawer2D_TextWidth($3)|0); $46 = (($$) - ($45))|0; $47 = (($8) + 3)|0; $48 = ($47|0)<($46|0); if ($48) { _Context2D_DrawText($4,$3,$46,$$0); } $49 = ((($0)) + 108|0); _Context2D_MakeTexture($49,$4); _Context2D_Free($4); $50 = HEAP32[$0>>2]|0; $51 = ((($50)) + 8|0); $52 = HEAP32[$51>>2]|0; FUNCTION_TABLE_vi[$52 & 511]($0); $53 = ((($0)) + 4|0); $54 = HEAP32[$53>>2]|0; $55 = $54&65535; $56 = ((($0)) + 112|0); HEAP16[$56>>1] = $55; $57 = ((($0)) + 8|0); $58 = HEAP32[$57>>2]|0; $59 = $58&65535; $60 = ((($0)) + 114|0); HEAP16[$60>>1] = $59; STACKTOP = sp;return; } function _InputWidget_OnPressedEnter($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; _InputWidget_Clear($0); $1 = ((($0)) + 104|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 16|0); HEAP32[$3>>2] = $2; $4 = HEAP32[$0>>2]|0; $5 = ((($4)) + 8|0); $6 = HEAP32[$5>>2]|0; FUNCTION_TABLE_vi[$6 & 511]($0); return; } function _TextInputWidget_AllowedChar($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1<<24>>24)==(38); if ($2) { $$0 = 0; return ($$0|0); } $3 = ((($0)) + 216|0); $4 = HEAP32[$3>>2]|0; $5 = ((($4)) + 4|0); $6 = HEAP32[$5>>2]|0; $7 = (FUNCTION_TABLE_iii[$6 & 127]($3,$1)|0); $8 = ($7<<24>>24)==(0); if ($8) { $$0 = 0; return ($$0|0); } $9 = ((($0)) + 40|0); $10 = HEAP32[$9>>2]|0; $11 = (FUNCTION_TABLE_i[$10 & 3]()|0); $12 = $11 << 6; $13 = ((($0)) + 64|0); $14 = HEAP16[$13>>1]|0; $15 = $14&65535; $16 = ($12|0)==($15|0); if ($16) { $$0 = 0; return ($$0|0); } $17 = ((($0)) + 60|0); _InputWidget_AppendChar($0,$1); $18 = HEAP32[$3>>2]|0; $19 = ((($18)) + 8|0); $20 = HEAP32[$19>>2]|0; $21 = (FUNCTION_TABLE_iii[$20 & 127]($3,$17)|0); _InputWidget_DeleteChar($0); $$0 = $21; return ($$0|0); } function _InputWidget_DeleteChar($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); $2 = ((($0)) + 64|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { return; } $5 = ((($0)) + 156|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(-1); if ($7) { $8 = $3&65535; $9 = (($8) + -1)|0; _String_DeleteAt($1,$9); return; } $10 = ($6|0)>(0); $11 = (($6) + -1)|0; if (!($10)) { return; } HEAP32[$5>>2] = $11; _String_DeleteAt($1,$11); return; } function _TextInputWidget_Render($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 108|0); _Texture_Render($2); _InputWidget_RenderCaret($0,$1); return; } function _InputWidget_Free($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 108|0); _Gfx_DeleteTexture($1); $2 = ((($0)) + 168|0); _Gfx_DeleteTexture($2); return; } function _InputWidget_Reposition($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 4|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 8|0); $4 = HEAP32[$3>>2]|0; _Widget_CalcPosition($0); $5 = HEAP32[$1>>2]|0; $6 = (($5) - ($2))|0; $7 = ((($0)) + 172|0); $8 = HEAP16[$7>>1]|0; $9 = $8&65535; $10 = (($6) + ($9))|0; $11 = $10&65535; HEAP16[$7>>1] = $11; $12 = HEAP32[$3>>2]|0; $13 = (($12) - ($4))|0; $14 = ((($0)) + 174|0); $15 = HEAP16[$14>>1]|0; $16 = $15&65535; $17 = (($13) + ($16))|0; $18 = $17&65535; HEAP16[$14>>1] = $18; $19 = ((($0)) + 112|0); $20 = HEAP16[$19>>1]|0; $21 = $20&65535; $22 = (($6) + ($21))|0; $23 = $22&65535; HEAP16[$19>>1] = $23; $24 = ((($0)) + 114|0); $25 = HEAP16[$24>>1]|0; $26 = $25&65535; $27 = (($13) + ($26))|0; $28 = $27&65535; HEAP16[$24>>1] = $28; return; } function _InputWidget_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; switch ($1|0) { case 46: { _InputWidget_LeftKey($0); break; } case 47: { _InputWidget_RightKey($0); break; } case 94: { _InputWidget_BackspaceKey($0); break; } case 59: { _InputWidget_DeleteKey($0); break; } case 60: { _InputWidget_HomeKey($0); break; } case 61: { _InputWidget_EndKey($0); break; } default: { $2 = (_InputWidget_OtherKey($0,$1)|0); $3 = ($2<<24>>24)==(0); if ($3) { $$0 = 0; return ($$0|0); } } } $$0 = 1; return ($$0|0); } function _TextInputWidget_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp; $5 = ((($0)) + 60|0); $6 = ((($0)) + 300|0); $7 = HEAP32[$6>>2]|0; _OpenKeyboardArgs_Init($4,$5,$7); $8 = ((($0)) + 296|0); $9 = HEAP32[$8>>2]|0; $10 = ((($4)) + 8|0); HEAP32[$10>>2] = $9; _Window_OpenKeyboard($4); $11 = ((($0)) + 142|0); HEAP8[$11>>0] = 1; (_InputWidget_PointerDown($0,$1,$2,$3)|0); STACKTOP = sp;return 1; } function _TextInputWidget_BuildMesh($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 108|0); _Gfx_Make2DQuad($2,-1,$1); $3 = ((($0)) + 168|0); $4 = ((($0)) + 164|0); $5 = HEAP32[$4>>2]|0; _Gfx_Make2DQuad($3,$5,$1); return; } function _TextInputWidget_Render2($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 108|0); $3 = HEAP32[$2>>2]|0; _Gfx_BindTexture($3); _Gfx_DrawVb_IndexedTris_Range(4,$1); $4 = (($1) + 4)|0; $5 = ((($0)) + 142|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); if ($7) { $15 = (($1) + 8)|0; return ($15|0); } $8 = ((($0)) + 200|0); $9 = +HEAPF64[$8>>3]; $10 = $9; $11 = (+_Math_Mod1($10)); $12 = $11 < 0.5; if (!($12)) { $15 = (($1) + 8)|0; return ($15|0); } $13 = ((($0)) + 168|0); $14 = HEAP32[$13>>2]|0; _Gfx_BindTexture($14); _Gfx_DrawVb_IndexedTris_Range(4,$4); $15 = (($1) + 8)|0; return ($15|0); } function _InputWidget_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$046 = 0, $$04757 = 0, $$04856 = 0, $$04954 = 0, $$1 = 0, $$lcssa = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 112|0; $4 = sp + 96|0; $5 = sp; $6 = sp + 80|0; $7 = sp + 72|0; $8 = sp + 64|0; $9 = ((($0)) + 112|0); $10 = HEAP16[$9>>1]|0; $11 = $10 << 16 >> 16; $12 = (($2) - ($11))|0; $13 = ((($0)) + 114|0); $14 = HEAP16[$13>>1]|0; $15 = $14 << 16 >> 16; $16 = (($3) - ($15))|0; $17 = ((($0)) + 36|0); $18 = HEAP32[$17>>2]|0; _DrawTextArgs_MakeEmpty($6,$18,1); $19 = ((($0)) + 104|0); $20 = HEAP32[$19>>2]|0; HEAP32[$4>>2] = $5; $21 = ((($4)) + 4|0); HEAP16[$21>>1] = 0; $22 = ((($4)) + 6|0); HEAP16[$22>>1] = 64; $23 = ((($0)) + 40|0); $24 = HEAP32[$23>>2]|0; $25 = (FUNCTION_TABLE_i[$24 & 3]()|0); $26 = ($25|0)>(0); L1: do { if ($26) { $27 = ((($0)) + 136|0); $$04757 = 0;$$04856 = 0; L3: while(1) { HEAP16[$21>>1] = 0; _InputWidget_FormatLine($0,$$04856,$4); $28 = HEAP16[$21>>1]|0; $29 = ($28<<16>>16)==(0); if ($29) { $$1 = $$04757; } else { $30 = HEAP16[$21>>1]|0; $31 = ($30<<16>>16)==(0); if ($31) { $$lcssa = 0; } else { $32 = ($$04856|0)==(0); $33 = Math_imul($$04856, $20)|0; $$04954 = 0; while(1) { _String_UNSAFE_Substring($7,$4,0,$$04954); $34 = $7; $35 = $34; $36 = HEAP32[$35>>2]|0; $37 = (($34) + 4)|0; $38 = $37; $39 = HEAP32[$38>>2]|0; $40 = $6; $41 = $40; HEAP32[$41>>2] = $36; $42 = (($40) + 4)|0; $43 = $42; HEAP32[$43>>2] = $39; $44 = (_Drawer2D_TextWidth($6)|0); if ($32) { $45 = HEAP32[$27>>2]|0; $46 = (($45) + ($44))|0; $$046 = $46; } else { $$046 = $44; } _String_UNSAFE_Substring($8,$4,$$04954,1); $47 = $8; $48 = $47; $49 = HEAP32[$48>>2]|0; $50 = (($47) + 4)|0; $51 = $50; $52 = HEAP32[$51>>2]|0; $53 = $6; $54 = $53; HEAP32[$54>>2] = $49; $55 = (($53) + 4)|0; $56 = $55; HEAP32[$56>>2] = $52; $57 = (_Drawer2D_TextWidth($6)|0); $58 = (_Gui_Contains($$046,$33,$57,$20,$12,$16)|0); $59 = ($58|0)==(0); if (!($59)) { break L3; } $62 = (($$04954) + 1)|0; $63 = HEAP16[$21>>1]|0; $64 = $63&65535; $65 = ($62>>>0)<($64>>>0); if ($65) { $$04954 = $62; } else { break; } } $66 = $63&65535; $$lcssa = $66; } $67 = (($$lcssa) + ($$04757))|0; $$1 = $67; } $68 = (($$04856) + 1)|0; $69 = HEAP32[$23>>2]|0; $70 = (FUNCTION_TABLE_i[$69 & 3]()|0); $71 = ($68|0)<($70|0); if ($71) { $$04757 = $$1;$$04856 = $68; } else { break L1; } } $60 = (($$04954) + ($$04757))|0; $61 = ((($0)) + 156|0); HEAP32[$61>>2] = $60; _InputWidget_UpdateCaret($0); STACKTOP = sp;return 1; } } while(0); $72 = ((($0)) + 156|0); HEAP32[$72>>2] = -1; _InputWidget_UpdateCaret($0); STACKTOP = sp;return 1; } function _InputWidget_LeftKey($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(390406)>>0]|0; $2 = HEAP8[(390407)>>0]|0; $3 = $2 | $1; $4 = ($3<<24>>24)==(0); if (!($4)) { $5 = ((($0)) + 156|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(-1); if ($7) { $8 = ((($0)) + 64|0); $9 = HEAP16[$8>>1]|0; $10 = $9&65535; $11 = (($10) + -1)|0; HEAP32[$5>>2] = $11; } $12 = ((($0)) + 60|0); $13 = HEAP32[$5>>2]|0; $14 = (_WordWrap_GetBackLength($12,$13)|0); $15 = HEAP32[$5>>2]|0; $16 = (($15) - ($14))|0; HEAP32[$5>>2] = $16; _InputWidget_UpdateCaret($0); return; } $17 = ((($0)) + 64|0); $18 = HEAP16[$17>>1]|0; $19 = $18&65535; $20 = ($18<<16>>16)==(0); if ($20) { return; } $21 = ((($0)) + 156|0); $22 = HEAP32[$21>>2]|0; $23 = ($22|0)==(-1); if ($23) { HEAP32[$21>>2] = $19; } $24 = HEAP32[$21>>2]|0; $25 = (($24) + -1)|0; $26 = ($24|0)<(1); $spec$select = $26 ? 0 : $25; HEAP32[$21>>2] = $spec$select; _InputWidget_UpdateCaret($0); return; } function _InputWidget_RightKey($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, $spec$store$select = 0, $spec$store$select15 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(390406)>>0]|0; $2 = HEAP8[(390407)>>0]|0; $3 = $2 | $1; $4 = ($3<<24>>24)==(0); if (!($4)) { $5 = ((($0)) + 60|0); $6 = ((($0)) + 156|0); $7 = HEAP32[$6>>2]|0; $8 = (_WordWrap_GetForwardLength($5,$7)|0); $9 = HEAP32[$6>>2]|0; $10 = (($9) + ($8))|0; $11 = ((($0)) + 64|0); $12 = HEAP16[$11>>1]|0; $13 = $12&65535; $14 = ($10|0)<($13|0); $spec$store$select = $14 ? $10 : -1; HEAP32[$6>>2] = $spec$store$select; _InputWidget_UpdateCaret($0); return; } $15 = ((($0)) + 64|0); $16 = HEAP16[$15>>1]|0; $17 = ($16<<16>>16)==(0); if ($17) { return; } $18 = ((($0)) + 156|0); $19 = HEAP32[$18>>2]|0; $20 = ($19|0)==(-1); $21 = (($19) + 1)|0; if ($20) { return; } $22 = $16&65535; $23 = ($21|0)<($22|0); $spec$store$select15 = $23 ? $21 : -1; HEAP32[$18>>2] = $spec$store$select15; _InputWidget_UpdateCaret($0); return; } function _InputWidget_BackspaceKey($0) { $0 = $0|0; var $$035 = 0, $$lcssa = 0, $$pr = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, $exitcond = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP8[(390406)>>0]|0; $2 = HEAP8[(390407)>>0]|0; $3 = $2 | $1; $4 = ($3<<24>>24)==(0); if ($4) { $34 = ((($0)) + 64|0); $35 = HEAP16[$34>>1]|0; $36 = ($35<<16>>16)==(0); if ($36) { return; } $37 = ((($0)) + 156|0); $38 = HEAP32[$37>>2]|0; $39 = ($38|0)==(0); if ($39) { return; } _InputWidget_DeleteChar($0); _InputWidget_UpdateText($0); return; } $5 = ((($0)) + 156|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(-1); if ($7) { $8 = ((($0)) + 64|0); $9 = HEAP16[$8>>1]|0; $10 = $9&65535; $11 = (($10) + -1)|0; HEAP32[$5>>2] = $11; } $12 = ((($0)) + 60|0); $13 = HEAP32[$5>>2]|0; $14 = (_WordWrap_GetBackLength($12,$13)|0); $15 = ($14|0)==(0); if ($15) { return; } $16 = HEAP32[$5>>2]|0; $17 = (($16) - ($14))|0; $18 = ($17|0)>(0); $spec$select = $18 ? $17 : 0; HEAP32[$5>>2] = $spec$select; $19 = ($14|0)<(0); if ($19) { $$lcssa = $spec$select; } else { $$035 = 0;$20 = $spec$select; while(1) { _String_DeleteAt($12,$20); $21 = (($$035) + 1)|0; $22 = HEAP32[$5>>2]|0; $exitcond = ($$035|0)==($14|0); if ($exitcond) { $$lcssa = $22; break; } else { $$035 = $21;$20 = $22; } } } $23 = ((($0)) + 64|0); $24 = HEAP16[$23>>1]|0; $25 = $24&65535; $26 = ($$lcssa|0)<($25|0); if ($26) { $$pr = HEAP32[$5>>2]|0; $27 = ($$pr|0)==(-1); if ($27) { label = 11; } else { $29 = ($$pr|0)>(-1); if ($29) { $30 = HEAP32[$12>>2]|0; $31 = (($30) + ($$pr)|0); $32 = HEAP8[$31>>0]|0; $33 = ($32<<24>>24)==(32); if (!($33)) { _String_InsertAt($12,$$pr,32); } } } } else { HEAP32[$5>>2] = -1; label = 11; } if ((label|0) == 11) { $28 = ($24<<16>>16)==(0); if (!($28)) { _String_InsertAt($12,$25,32); } } _InputWidget_UpdateText($0); return; } function _InputWidget_DeleteKey($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 60|0); $2 = ((($0)) + 64|0); $3 = HEAP16[$2>>1]|0; $4 = ($3<<16>>16)==(0); if ($4) { return; } $5 = ((($0)) + 156|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)==(-1); if ($7) { return; } _String_DeleteAt($1,$6); $8 = HEAP32[$5>>2]|0; $9 = HEAP16[$2>>1]|0; $10 = $9&65535; $11 = ($8|0)<($10|0); if (!($11)) { HEAP32[$5>>2] = -1; } _InputWidget_UpdateText($0); return; } function _InputWidget_HomeKey($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 64|0); $2 = HEAP16[$1>>1]|0; $3 = ($2<<16>>16)==(0); if ($3) { return; } $4 = ((($0)) + 156|0); HEAP32[$4>>2] = 0; _InputWidget_UpdateCaret($0); return; } function _InputWidget_EndKey($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 156|0); HEAP32[$1>>2] = -1; _InputWidget_UpdateCaret($0); return; } function _InputWidget_OtherKey($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 40|0); $3 = HEAP32[$2>>2]|0; $4 = (FUNCTION_TABLE_i[$3 & 3]()|0); switch ($1|0) { case 1002: { $5 = $4 << 6; $6 = ((($0)) + 64|0); $7 = HEAP16[$6>>1]|0; $8 = $7&65535; $9 = ($5|0)>($8|0); if (!($9)) { $$0 = 0; return ($$0|0); } _InputWidget_CopyFromClipboard($0); $$0 = 1; return ($$0|0); } case 1001: { $10 = ((($0)) + 64|0); $11 = HEAP16[$10>>1]|0; $12 = ($11<<16>>16)==(0); if ($12) { $$0 = 1; return ($$0|0); } $13 = ((($0)) + 60|0); _Clipboard_SetText($13); $$0 = 1; return ($$0|0); } default: { $$0 = 0; return ($$0|0); } } } function _InputWidget_CopyFromClipboard($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 2064|0; $1 = sp + 2048|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 2048; _Clipboard_GetText($1); _InputWidget_AppendText($0,$1); STACKTOP = sp;return; } function _InputWidget_RenderCaret($0,$1) { $0 = $0|0; $1 = +$1; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 142|0); $3 = HEAP8[$2>>0]|0; $4 = ($3<<24>>24)==(0); if ($4) { return; } $5 = ((($0)) + 200|0); $6 = +HEAPF64[$5>>3]; $7 = $6 + $1; HEAPF64[$5>>3] = $7; $8 = $7; $9 = (+_Math_Mod1($8)); $10 = $9 < 0.5; if (!($10)) { return; } $11 = ((($0)) + 168|0); $12 = ((($0)) + 164|0); $13 = HEAP32[$12>>2]|0; _Texture_RenderShaded($11,$13); return; } function _TextInputWidget_SetFont($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 36|0); HEAP32[$2>>2] = $1; $3 = (_Font_CalcHeight($1,0)|0); $4 = ((($0)) + 104|0); HEAP32[$4>>2] = $3; _InputWidget_UpdateText($0); return; } function _ChatInputWidget_Create($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; _InputWidget_Reset($0); $1 = HEAP32[(1776476)>>2]|0; $2 = ((($0)) + 208|0); HEAP32[$2>>2] = $1; HEAP32[$0>>2] = 22384; $3 = HEAP8[1972839]|0; $4 = ($3<<24>>24)==(0); $5 = $4&1; $6 = ((($0)) + 140|0); HEAP8[$6>>0] = $5; $7 = ((($0)) + 142|0); HEAP8[$7>>0] = 1; $8 = ((($0)) + 141|0); HEAP8[$8>>0] = 5; $9 = ((($0)) + 40|0); HEAP32[$9>>2] = 2; $10 = ((($0)) + 44|0); HEAP32[$10>>2] = 455; $11 = ((($0)) + 48|0); HEAP32[$11>>2] = 456; $12 = ((($0)) + 52|0); HEAP32[$12>>2] = 76; $13 = ((($0)) + 220|0); $14 = ((($0)) + 60|0); HEAP32[$14>>2] = $13; $15 = ((($0)) + 64|0); HEAP16[$15>>1] = 0; $16 = ((($0)) + 66|0); HEAP16[$16>>1] = 192; $17 = ((($0)) + 412|0); $18 = ((($0)) + 212|0); HEAP32[$18>>2] = $17; $19 = ((($0)) + 216|0); HEAP16[$19>>1] = 0; $20 = ((($0)) + 218|0); HEAP16[$20>>1] = 192; return; } function _ChatInputWidget_GetMaxLines() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1972839]|0; $1 = ($0<<24>>24)==(0); $2 = HEAP8[(1949244)>>0]|0; $3 = ($2<<24>>24)!=(0); $4 = $1 & $3; $5 = $4 ? 3 : 1; return ($5|0); } function _ChatInputWidget_RemakeTexture($0) { $0 = $0|0; var $$040$lcssa = 0, $$040$lcssa50 = 0, $$040$lcssa51 = 0, $$04044 = 0, $$041$ = 0, $$041$lcssa = 0, $$04143 = 0, $$045 = 0, $$1 = 0, $$142 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; var $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 68|0); $2 = ((($0)) + 40|0); $3 = HEAP32[$2>>2]|0; $4 = (FUNCTION_TABLE_i[$3 & 3]()|0); $5 = ($4|0)>(0); if ($5) { $6 = ((($0)) + 104|0); $7 = ((($0)) + 92|0); $$04044 = 0;$$04143 = 0;$$045 = 0; while(1) { $8 = (((($1) + ($$045<<3)|0)) + 4|0); $9 = HEAP16[$8>>1]|0; $10 = ($9<<16>>16)==(0); if ($10) { $$040$lcssa = $$04044;$$041$lcssa = $$04143; break; } $11 = HEAP32[$6>>2]|0; $12 = (($11) + ($$04044))|0; $13 = (($7) + ($$045<<2)|0); $14 = HEAP32[$13>>2]|0; $15 = ($$04143|0)>($14|0); $$041$ = $15 ? $$04143 : $14; $16 = (($$045) + 1)|0; $17 = HEAP32[$2>>2]|0; $18 = (FUNCTION_TABLE_i[$17 & 3]()|0); $19 = ($16|0)<($18|0); if ($19) { $$04044 = $12;$$04143 = $$041$;$$045 = $16; } else { $$040$lcssa = $12;$$041$lcssa = $$041$; break; } } $20 = ($$041$lcssa|0)==(0); if ($20) { $$040$lcssa51 = $$040$lcssa; label = 6; } else { $$040$lcssa50 = $$040$lcssa;$$142 = $$041$lcssa; } } else { $$040$lcssa51 = 0; label = 6; } if ((label|0) == 6) { $21 = ((($0)) + 136|0); $22 = HEAP32[$21>>2]|0; $$040$lcssa50 = $$040$lcssa51;$$142 = $22; } $23 = ($$040$lcssa50|0)==(0); if ($23) { $24 = ((($0)) + 104|0); $25 = HEAP32[$24>>2]|0; $$1 = $25; } else { $$1 = $$040$lcssa50; } $26 = ((($0)) + 21|0); $27 = HEAP8[$26>>0]|0; $28 = ($27<<24>>24)==(0); if ($28) { _ChatInputWidget_MakeTexture($0,$$142,$$1); } else { $29 = ((($0)) + 108|0); _Gfx_DeleteTexture($29); } $30 = ((($0)) + 200|0); HEAPF64[$30>>3] = 0.0; $31 = ((($0)) + 12|0); HEAP32[$31>>2] = $$142; $32 = ((($0)) + 16|0); HEAP32[$32>>2] = $$1; $33 = HEAP32[$0>>2]|0; $34 = ((($33)) + 8|0); $35 = HEAP32[$34>>2]|0; FUNCTION_TABLE_vi[$35 & 511]($0); $36 = ((($0)) + 4|0); $37 = HEAP32[$36>>2]|0; $38 = ((($0)) + 141|0); $39 = HEAP8[$38>>0]|0; $40 = $39&255; $41 = (($37) + ($40))|0; $42 = $41&65535; $43 = ((($0)) + 112|0); HEAP16[$43>>1] = $42; $44 = ((($0)) + 8|0); $45 = HEAP32[$44>>2]|0; $46 = $45&65535; $47 = ((($0)) + 114|0); HEAP16[$47>>1] = $46; return; } function _ChatInputWidget_OnPressedEnter($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($0)) + 60|0); $3 = $2; $4 = $3; $5 = HEAP32[$4>>2]|0; $6 = (($3) + 4)|0; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = $1; $10 = $9; HEAP32[$10>>2] = $5; $11 = (($9) + 4)|0; $12 = $11; HEAP32[$12>>2] = $8; _String_UNSAFE_TrimEnd($1); $13 = ((($1)) + 4|0); $14 = HEAP16[$13>>1]|0; $15 = ($14<<16>>16)==(0); if (!($15)) { _Chat_Send($1,1); } $16 = ((($0)) + 216|0); HEAP16[$16>>1] = 0; $17 = HEAP32[(1776476)>>2]|0; $18 = ((($0)) + 208|0); HEAP32[$18>>2] = $17; _Chat_AddOf(1949280,257); _InputWidget_OnPressedEnter($0); STACKTOP = sp;return; } function _InputWidget_AllowedChar($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[(1949245)>>0]|0; $3 = ($2<<24>>24)==(0); if (!($3)) { $8 = 1; return ($8|0); } $4 = $1 << 24 >> 24; $5 = (_Convert_CP437ToUnicode($1)|0); $6 = $5&65535; $7 = ($6|0)==($4|0); $phitmp = $7&1; $8 = $phitmp; return ($8|0); } function _ChatInputWidget_MakeTexture($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 128|0; $3 = sp + 88|0; $4 = sp; $5 = sp + 72|0; $6 = sp + 96|0; _Context2D_Alloc($6,$1,$2); $7 = ((($0)) + 36|0); $8 = HEAP32[$7>>2]|0; _DrawTextArgs_Make($5,22428,$8,1); _Context2D_DrawText($6,$5,0,0); HEAP32[$3>>2] = $4; $9 = ((($3)) + 4|0); HEAP16[$9>>1] = 0; $10 = ((($3)) + 6|0); HEAP16[$10>>1] = 66; $11 = ((($0)) + 136|0); $12 = ((($0)) + 104|0); $13 = ((($0)) + 72|0); $14 = HEAP16[$13>>1]|0; $15 = ($14<<16>>16)==(0); if ($15) { $34 = ((($0)) + 108|0); _Context2D_MakeTexture($34,$6); _Context2D_Free($6); STACKTOP = sp;return; } HEAP16[$9>>1] = 0; $16 = (_InputWidget_GetLastCol($0,0,0)|0); $17 = (_Drawer2D_IsWhiteColor($16)|0); $18 = ($17<<24>>24)==(0); if ($18) { _String_Append($3,38); _String_Append($3,$16); } _InputWidget_FormatLine($0,0,$3); $19 = $3; $20 = $19; $21 = HEAP32[$20>>2]|0; $22 = (($19) + 4)|0; $23 = $22; $24 = HEAP32[$23>>2]|0; $25 = $5; $26 = $25; HEAP32[$26>>2] = $21; $27 = (($25) + 4)|0; $28 = $27; HEAP32[$28>>2] = $24; $29 = HEAP32[$11>>2]|0; _Context2D_DrawText($6,$5,$29,0); $30 = HEAP32[$12>>2]|0; $31 = ((($0)) + 80|0); $32 = HEAP16[$31>>1]|0; $33 = ($32<<16>>16)==(0); if ($33) { $34 = ((($0)) + 108|0); _Context2D_MakeTexture($34,$6); _Context2D_Free($6); STACKTOP = sp;return; } HEAP16[$9>>1] = 0; $35 = (_InputWidget_GetLastCol($0,0,1)|0); $36 = (_Drawer2D_IsWhiteColor($35)|0); $37 = ($36<<24>>24)==(0); if ($37) { _String_Append($3,38); _String_Append($3,$35); } _InputWidget_FormatLine($0,1,$3); $38 = $3; $39 = $38; $40 = HEAP32[$39>>2]|0; $41 = (($38) + 4)|0; $42 = $41; $43 = HEAP32[$42>>2]|0; $44 = $5; $45 = $44; HEAP32[$45>>2] = $40; $46 = (($44) + 4)|0; $47 = $46; HEAP32[$47>>2] = $43; _Context2D_DrawText($6,$5,0,$30); $48 = HEAP32[$12>>2]|0; $49 = (($48) + ($30))|0; $50 = ((($0)) + 88|0); $51 = HEAP16[$50>>1]|0; $52 = ($51<<16>>16)==(0); if ($52) { $34 = ((($0)) + 108|0); _Context2D_MakeTexture($34,$6); _Context2D_Free($6); STACKTOP = sp;return; } HEAP16[$9>>1] = 0; $53 = (_InputWidget_GetLastCol($0,0,2)|0); $54 = (_Drawer2D_IsWhiteColor($53)|0); $55 = ($54<<24>>24)==(0); if ($55) { _String_Append($3,38); _String_Append($3,$53); } _InputWidget_FormatLine($0,2,$3); $56 = $3; $57 = $56; $58 = HEAP32[$57>>2]|0; $59 = (($56) + 4)|0; $60 = $59; $61 = HEAP32[$60>>2]|0; $62 = $5; $63 = $62; HEAP32[$63>>2] = $58; $64 = (($62) + 4)|0; $65 = $64; HEAP32[$65>>2] = $61; _Context2D_DrawText($6,$5,0,$49); $34 = ((($0)) + 108|0); _Context2D_MakeTexture($34,$6); _Context2D_Free($6); STACKTOP = sp;return; } function _ChatInputWidget_Render($0,$1) { $0 = $0|0; $1 = +$1; var $$ = 0, $$$1 = 0, $$$2 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0; var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0; var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0; var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0; var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 21|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(0); if (!($6)) { return; } $7 = ((($0)) + 8|0); $8 = HEAP32[$7>>2]|0; $9 = ((($0)) + 152|0); $10 = ((($0)) + 148|0); $11 = $3 << 2; $12 = ((($0)) + 141|0); $13 = ((($0)) + 104|0); $14 = ((($0)) + 92|0); $15 = ((($0)) + 176|0); $16 = ((($0)) + 156|0); $17 = ((($0)) + 92|0); $18 = HEAP32[$9>>2]|0; $19 = ($18|0)==(0); do { if ($19) { $22 = HEAP32[$10>>2]|0; $23 = ($22|0)==(64); if ($23) { $24 = HEAP32[$14>>2]|0; $102 = $24; } else { $25 = HEAP32[$16>>2]|0; $26 = ($25|0)==(-1); $27 = HEAP32[$17>>2]|0; if ($26) { $102 = $27; } else { $32 = $27;$33 = 0; break; } } $28 = HEAP16[$15>>1]|0; $29 = $28&65535; $32 = $102;$33 = $29; } else { $20 = ((($0)) + 92|0); $21 = HEAP32[$20>>2]|0; $32 = $21;$33 = 0; } } while(0); $31 = (($33) + ($32))|0; $34 = HEAP32[(1972116)>>2]|0; $35 = (($34) - ($11))|0; $36 = ($31|0)>($35|0); $$ = $36 ? $31 : $35; $37 = HEAP8[$12>>0]|0; $38 = $37&255; $39 = $38 << 1; $40 = (($$) + ($39))|0; $41 = HEAP32[$13>>2]|0; _Gfx_Draw2DFlat($3,$8,$40,$41,2130706432); $42 = HEAP32[$13>>2]|0; $43 = (($42) + ($8))|0; $44 = ((($0)) + 80|0); $45 = HEAP16[$44>>1]|0; $46 = ($45<<16>>16)==(0); if (!($46)) { $47 = HEAP32[$9>>2]|0; $48 = ($47|0)==(1); do { if ($48) { $51 = HEAP32[$10>>2]|0; $52 = ($51|0)==(64); if ($52) { $57 = ((($0)) + 96|0); $58 = HEAP32[$57>>2]|0; $103 = $58; } else { $53 = HEAP32[$16>>2]|0; $54 = ($53|0)==(-1); $55 = ((($0)) + 96|0); $56 = HEAP32[$55>>2]|0; if ($54) { $103 = $56; } else { $62 = $56;$63 = 0; break; } } $59 = HEAP16[$15>>1]|0; $60 = $59&65535; $62 = $103;$63 = $60; } else { $49 = ((($0)) + 96|0); $50 = HEAP32[$49>>2]|0; $62 = $50;$63 = 0; } } while(0); $61 = (($63) + ($62))|0; $64 = HEAP32[(1972116)>>2]|0; $65 = (($64) - ($11))|0; $66 = ($61|0)>($65|0); $$$1 = $66 ? $61 : $65; $67 = HEAP8[$12>>0]|0; $68 = $67&255; $69 = $68 << 1; $70 = (($$$1) + ($69))|0; $71 = HEAP32[$13>>2]|0; _Gfx_Draw2DFlat($3,$43,$70,$71,2130706432); $72 = HEAP32[$13>>2]|0; $73 = (($72) + ($43))|0; $74 = ((($0)) + 88|0); $75 = HEAP16[$74>>1]|0; $76 = ($75<<16>>16)==(0); if (!($76)) { $77 = HEAP32[$9>>2]|0; $78 = ($77|0)==(2); do { if ($78) { $81 = HEAP32[$10>>2]|0; $82 = ($81|0)==(64); if ($82) { $87 = ((($0)) + 100|0); $88 = HEAP32[$87>>2]|0; $104 = $88; } else { $83 = HEAP32[$16>>2]|0; $84 = ($83|0)==(-1); $85 = ((($0)) + 100|0); $86 = HEAP32[$85>>2]|0; if ($84) { $104 = $86; } else { $92 = $86;$93 = 0; break; } } $89 = HEAP16[$15>>1]|0; $90 = $89&65535; $92 = $104;$93 = $90; } else { $79 = ((($0)) + 100|0); $80 = HEAP32[$79>>2]|0; $92 = $80;$93 = 0; } } while(0); $91 = (($93) + ($92))|0; $94 = HEAP32[(1972116)>>2]|0; $95 = (($94) - ($11))|0; $96 = ($91|0)>($95|0); $$$2 = $96 ? $91 : $95; $97 = HEAP8[$12>>0]|0; $98 = $97&255; $99 = $98 << 1; $100 = (($$$2) + ($99))|0; $101 = HEAP32[$13>>2]|0; _Gfx_Draw2DFlat($3,$73,$100,$101,2130706432); } } $30 = ((($0)) + 108|0); _Texture_Render($30); _InputWidget_RenderCaret($0,$1); return; } function _ChatInputWidget_KeyDown($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; switch ($1|0) { case 95: { _ChatInputWidget_TabKey($0); $$0 = 1; break; } case 44: { _ChatInputWidget_UpKey($0); $$0 = 1; break; } case 45: { _ChatInputWidget_DownKey($0); $$0 = 1; break; } default: { $2 = (_InputWidget_KeyDown($0,$1)|0); $$0 = $2; } } return ($$0|0); } function _ChatInputWidget_TabKey($0) { $0 = $0|0; var $$0$lcssa = 0, $$04553 = 0, $$04659 = 0, $$060 = 0, $$154 = 0, $$pr = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0; var $111 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0; var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond65 = 0, $or$cond = 0; var $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 384|0; $1 = sp + 368|0; $2 = sp + 256|0; $3 = sp; $4 = sp + 352|0; $5 = sp + 344|0; $6 = sp + 360|0; $7 = sp + 336|0; $8 = sp + 328|0; $9 = sp + 320|0; $10 = ((($0)) + 156|0); $11 = HEAP32[$10>>2]|0; $12 = ($11|0)==(-1); if ($12) { $13 = ((($0)) + 64|0); $14 = HEAP16[$13>>1]|0; $15 = $14&65535; $16 = (($15) + -1)|0; $19 = $16; } else { $19 = $11; } $17 = ((($0)) + 60|0); $18 = HEAP32[$17>>2]|0; $20 = ($19|0)>(-1); if (!($20)) { STACKTOP = sp;return; } $$060 = $19; while(1) { $21 = (($18) + ($$060)|0); $22 = HEAP8[$21>>0]|0; $23 = (_ChatInputWidget_IsNameChar($22)|0); $24 = ($23<<24>>24)==(0); if ($24) { $$0$lcssa = $$060; break; } $25 = (($$060) + -1)|0; $26 = ($$060|0)>(0); if ($26) { $$060 = $25; } else { $$0$lcssa = $25; break; } } $27 = (($$0$lcssa) + 1)|0; $28 = ($19|0)>(-1); $29 = ($$0$lcssa|0)<($19|0); $or$cond = $28 & $29; if (!($or$cond)) { STACKTOP = sp;return; } $30 = (($19) + 1)|0; $31 = (($30) - ($27))|0; _String_UNSAFE_Substring($4,$17,$27,$31); _Chat_AddOf(1949280,257); HEAP32[$6>>2] = 0; $$04659 = 0; while(1) { $32 = (1784624 + ($$04659<<1)|0); $33 = HEAP16[$32>>1]|0; $34 = ($33<<16>>16)==(0); if (!($34)) { $35 = $33&65535; $36 = (($35) + -3)|0; _StringsBuffer_UNSAFE_Get($7,(1785392),$36); $37 = $7; $38 = $37; $39 = HEAP32[$38>>2]|0; $40 = (($37) + 4)|0; $41 = $40; $42 = HEAP32[$41>>2]|0; $43 = $5; $44 = $43; HEAP32[$44>>2] = $39; $45 = (($43) + 4)|0; $46 = $45; HEAP32[$46>>2] = $42; $47 = (_String_CaselessContains($5,$4)|0); $48 = ($47|0)==(0); if (!($48)) { $49 = $$04659&255; $50 = HEAP32[$6>>2]|0; $51 = (($50) + 1)|0; HEAP32[$6>>2] = $51; $52 = (($3) + ($50)|0); HEAP8[$52>>0] = $49; } } $53 = (($$04659) + 1)|0; $exitcond65 = ($53|0)==(256); if ($exitcond65) { break; } else { $$04659 = $53; } } $54 = HEAP32[$6>>2]|0; $55 = ($54|0)==(1); if ($55) { $56 = HEAP32[$10>>2]|0; $57 = ($56|0)==(-1); $spec$select = $57 ? $30 : $19; $58 = (($spec$select) - ($27))|0; $59 = ($58|0)>(0); if ($59) { $$04553 = 0; while(1) { _String_DeleteAt($17,$27); $60 = (($$04553) + 1)|0; $exitcond = ($60|0)==($58|0); if ($exitcond) { break; } else { $$04553 = $60; } } $$pr = HEAP32[$10>>2]|0; $61 = $$pr; } else { $61 = $56; } $62 = ($61|0)==(-1); if (!($62)) { $63 = (($61) - ($58))|0; HEAP32[$10>>2] = $63; } $64 = HEAP8[$3>>0]|0; $65 = $64&255; $66 = (1784624 + ($65<<1)|0); $67 = HEAP16[$66>>1]|0; $68 = $67&65535; $69 = (($68) + -3)|0; _StringsBuffer_UNSAFE_Get($8,(1785392),$69); $70 = $8; $71 = $70; $72 = HEAP32[$71>>2]|0; $73 = (($70) + 4)|0; $74 = $73; $75 = HEAP32[$74>>2]|0; $76 = $5; $77 = $76; HEAP32[$77>>2] = $72; $78 = (($76) + 4)|0; $79 = $78; HEAP32[$79>>2] = $75; _InputWidget_AppendText($0,$5); STACKTOP = sp;return; } else { $80 = ($54|0)>(1); if (!($80)) { STACKTOP = sp;return; } HEAP32[$1>>2] = $2; $81 = ((($1)) + 4|0); HEAP16[$81>>1] = 0; $82 = ((($1)) + 6|0); HEAP16[$82>>1] = 64; _String_Format1($1,45283,$6); $83 = HEAP32[$6>>2]|0; $84 = ($83|0)>(0); L37: do { if ($84) { $85 = ((($5)) + 4|0); $$154 = 0; while(1) { $86 = (($3) + ($$154)|0); $87 = HEAP8[$86>>0]|0; $88 = $87&255; $89 = (1784624 + ($88<<1)|0); $90 = HEAP16[$89>>1]|0; $91 = $90&65535; $92 = (($91) + -3)|0; _StringsBuffer_UNSAFE_Get($9,(1785392),$92); $93 = $9; $94 = $93; $95 = HEAP32[$94>>2]|0; $96 = (($93) + 4)|0; $97 = $96; $98 = HEAP32[$97>>2]|0; $99 = $5; $100 = $99; HEAP32[$100>>2] = $95; $101 = (($99) + 4)|0; $102 = $101; HEAP32[$102>>2] = $98; $103 = HEAP16[$81>>1]|0; $104 = $103&65535; $105 = HEAP16[$85>>1]|0; $106 = $105&65535; $107 = (($106) + ($104))|0; $108 = ($107>>>0)>(63); if ($108) { break L37; } _String_AppendString($1,$5); _String_Append($1,32); $109 = (($$154) + 1)|0; $110 = HEAP32[$6>>2]|0; $111 = ($109|0)<($110|0); if ($111) { $$154 = $109; } else { break; } } } } while(0); _Chat_AddOf($1,257); STACKTOP = sp;return; } } function _ChatInputWidget_UpKey($0) { $0 = $0|0; var $$pr = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = HEAP8[(390406)>>0]|0; $3 = HEAP8[(390407)>>0]|0; $4 = $3 | $2; $5 = ($4<<24>>24)==(0); if (!($5)) { $6 = ((($0)) + 156|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==(-1); if ($8) { $9 = ((($0)) + 64|0); $10 = HEAP16[$9>>1]|0; $11 = $10&65535; $12 = $11; } else { $12 = $7; } $13 = ($12|0)<(64); if ($13) { STACKTOP = sp;return; } $14 = (($12) + -64)|0; HEAP32[$6>>2] = $14; _InputWidget_UpdateCaret($0); STACKTOP = sp;return; } $15 = ((($0)) + 208|0); $16 = HEAP32[$15>>2]|0; $17 = HEAP32[(1776476)>>2]|0; $18 = ($16|0)==($17|0); if ($18) { $19 = ((($0)) + 212|0); $20 = ((($0)) + 60|0); _String_Copy($19,$20); $$pr = HEAP32[(1776476)>>2]|0; $21 = $$pr; } else { $21 = $17; } $22 = ($21|0)==(0); if ($22) { STACKTOP = sp;return; } $23 = HEAP32[$15>>2]|0; $24 = (($23) + -1)|0; HEAP32[$15>>2] = $24; $25 = ((($0)) + 60|0); $26 = ((($0)) + 64|0); HEAP16[$26>>1] = 0; $27 = ($23|0)<(1); if ($27) { HEAP32[$15>>2] = 0; } $28 = HEAP32[$15>>2]|0; _StringsBuffer_UNSAFE_Get($1,1776468,$28); _String_AppendString($25,$1); $29 = ((($0)) + 156|0); HEAP32[$29>>2] = -1; _InputWidget_UpdateText($0); STACKTOP = sp;return; } function _ChatInputWidget_DownKey($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, $spec$store$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = HEAP8[(390406)>>0]|0; $3 = HEAP8[(390407)>>0]|0; $4 = $3 | $2; $5 = ($4<<24>>24)==(0); if (!($5)) { $6 = ((($0)) + 156|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==(-1); if ($8) { STACKTOP = sp;return; } $9 = (($7) + 64)|0; $10 = ((($0)) + 64|0); $11 = HEAP16[$10>>1]|0; $12 = $11&65535; $13 = ($9|0)<($12|0); $spec$store$select = $13 ? $9 : -1; HEAP32[$6>>2] = $spec$store$select; _InputWidget_UpdateCaret($0); STACKTOP = sp;return; } $14 = HEAP32[(1776476)>>2]|0; $15 = ($14|0)==(0); if ($15) { STACKTOP = sp;return; } $16 = ((($0)) + 208|0); $17 = HEAP32[$16>>2]|0; $18 = (($17) + 1)|0; HEAP32[$16>>2] = $18; $19 = ((($0)) + 60|0); $20 = ((($0)) + 64|0); HEAP16[$20>>1] = 0; $21 = ($18|0)<($14|0); if ($21) { _StringsBuffer_UNSAFE_Get($1,1776468,$18); _String_AppendString($19,$1); } else { HEAP32[$16>>2] = $14; $22 = ((($0)) + 212|0); _String_AppendString($19,$22); } $23 = ((($0)) + 156|0); HEAP32[$23>>2] = -1; _InputWidget_UpdateText($0); STACKTOP = sp;return; } function _ChatInputWidget_IsNameChar($0) { $0 = $0|0; var $$off9 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; switch ($0<<24>>24) { case 46: case 95: { return 1; } default: { } } $$off9 = (($0) + -48)<<24>>24; $1 = ($$off9&255)<(10); if ($1) { return 1; } else { $2 = $0 & -33; $3 = (($2) + -65)<<24>>24; $4 = ($3&255)<(26); $spec$select = $4&1; return ($spec$select|0); } } function _ChatInputWidget_SetFont($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; _DrawTextArgs_Make($2,22428,$1,1); $3 = ((($0)) + 36|0); HEAP32[$3>>2] = $1; $4 = (_Drawer2D_TextWidth($2)|0); $5 = ((($0)) + 136|0); HEAP32[$5>>2] = $4; $6 = (_Drawer2D_TextHeight($2)|0); $7 = ((($0)) + 104|0); HEAP32[$7>>2] = $6; $8 = ((($0)) + 168|0); _Gfx_DeleteTexture($8); STACKTOP = sp;return; } function _TextGroupWidget_ShiftUp($0) { $0 = $0|0; var $$014 = 0, $$lcssa = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 80|0); $2 = HEAP32[$1>>2]|0; _Gfx_DeleteTexture($2); $3 = ((($0)) + 36|0); $4 = HEAP32[$3>>2]|0; $5 = (($4) + -1)|0; $6 = ($4|0)>(1); $7 = HEAP32[$1>>2]|0; if (!($6)) { $$lcssa = $7; $13 = (($$lcssa) + (($5*28)|0)|0); HEAP32[$13>>2] = 0; _TextGroupWidget_Redraw($0,$5); return; } $$014 = 0;$9 = $7; while(1) { $8 = (($9) + (($$014*28)|0)|0); $10 = (($$014) + 1)|0; $11 = (($9) + (($10*28)|0)|0); ;HEAP32[$8>>2]=HEAP32[$11>>2]|0;HEAP32[$8+4>>2]=HEAP32[$11+4>>2]|0;HEAP32[$8+8>>2]=HEAP32[$11+8>>2]|0;HEAP32[$8+12>>2]=HEAP32[$11+12>>2]|0;HEAP32[$8+16>>2]=HEAP32[$11+16>>2]|0;HEAP32[$8+20>>2]=HEAP32[$11+20>>2]|0;HEAP32[$8+24>>2]=HEAP32[$11+24>>2]|0; $12 = HEAP32[$1>>2]|0; $exitcond = ($10|0)==($5|0); if ($exitcond) { $$lcssa = $12; break; } else { $$014 = $10;$9 = $12; } } $13 = (($$lcssa) + (($5*28)|0)|0); HEAP32[$13>>2] = 0; _TextGroupWidget_Redraw($0,$5); return; } function _TextGroupWidget_Redraw($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $2 = sp; $3 = sp + 40|0; $4 = sp + 8|0; ;HEAP32[$4>>2]=0|0;HEAP32[$4+4>>2]=0|0;HEAP32[$4+8>>2]=0|0;HEAP32[$4+12>>2]=0|0;HEAP32[$4+16>>2]=0|0;HEAP32[$4+20>>2]=0|0;HEAP32[$4+24>>2]=0|0; $5 = ((($0)) + 80|0); $6 = HEAP32[$5>>2]|0; $7 = (($6) + (($1*28)|0)|0); _Gfx_DeleteTexture($7); _TextGroupWidget_UNSAFE_Get($2,$0,$1); $8 = (_Drawer2D_IsEmptyText($2)|0); $9 = ($8<<24>>24)==(0); if ($9) { $10 = ((($0)) + 44|0); $11 = HEAP32[$10>>2]|0; _DrawTextArgs_Make($3,$2,$11,1); $12 = ((($0)) + 78|0); $13 = HEAP8[$12>>0]|0; $14 = ($13<<24>>24)==(0); if ($14) { label = 5; } else { $15 = (_TextGroupWidget_MightHaveUrls($0)|0); $16 = ($15<<24>>24)==(0); if ($16) { label = 5; } else { _TextGroupWidget_DrawAdvanced($0,$4,$3,$1,$2); } } if ((label|0) == 5) { _Drawer2D_MakeTextTexture($4,$3); } $17 = HEAP32[$10>>2]|0; $18 = ((($17)) + 4|0); $19 = HEAP16[$18>>1]|0; $20 = $19&65535; _Drawer2D_ReducePadding_Tex($4,$20,3); } else { $21 = (((($0)) + 48|0) + ($1)|0); $22 = HEAP8[$21>>0]|0; $23 = ($22<<24>>24)==(0); if ($23) { $24 = ((($0)) + 40|0); $25 = HEAP32[$24>>2]|0; $phitmp = $25&65535; $27 = $phitmp; } else { $27 = 0; } $26 = ((($4)) + 10|0); HEAP16[$26>>1] = $27; } $28 = ((($0)) + 22|0); $29 = HEAP8[$28>>0]|0; $30 = ((($0)) + 24|0); $31 = HEAP32[$30>>2]|0; $32 = ((($4)) + 8|0); $33 = HEAP16[$32>>1]|0; $34 = $33&65535; $35 = HEAP32[(1972116)>>2]|0; $36 = (_Gui_CalcPos($29,$31,$34,$35)|0); $37 = $36&65535; $38 = ((($4)) + 4|0); HEAP16[$38>>1] = $37; $39 = HEAP32[$5>>2]|0; $40 = (($39) + (($1*28)|0)|0); ;HEAP32[$40>>2]=HEAP32[$4>>2]|0;HEAP32[$40+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$40+8>>2]=HEAP32[$4+8>>2]|0;HEAP32[$40+12>>2]=HEAP32[$4+12>>2]|0;HEAP32[$40+16>>2]=HEAP32[$4+16>>2]|0;HEAP32[$40+20>>2]=HEAP32[$4+20>>2]|0;HEAP32[$40+24>>2]=HEAP32[$4+24>>2]|0; $41 = HEAP32[$0>>2]|0; $42 = ((($41)) + 8|0); $43 = HEAP32[$42>>2]|0; FUNCTION_TABLE_vi[$43 & 511]($0); STACKTOP = sp;return; } function _TextGroupWidget_UNSAFE_Get($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($1)) + 84|0); $4 = HEAP32[$3>>2]|0; FUNCTION_TABLE_vii[$4 & 255]($0,$2); return; } function _TextGroupWidget_MightHaveUrls($0) { $0 = $0|0; var $$06 = 0, $$08 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp + 8|0; $2 = sp; $3 = ((($0)) + 36|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if (!($5)) { $$06 = 0; STACKTOP = sp;return ($$06|0); } $$08 = 0; while(1) { _TextGroupWidget_UNSAFE_Get($2,$0,$$08); $9 = $2; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = (($9) + 4)|0; $13 = $12; $14 = HEAP32[$13>>2]|0; $15 = $1; $16 = $15; HEAP32[$16>>2] = $11; $17 = (($15) + 4)|0; $18 = $17; HEAP32[$18>>2] = $14; $19 = (_String_IndexOfAt($1,0,47)|0); $20 = ($19|0)>(-1); $7 = (($$08) + 1)|0; if ($20) { $$06 = 1; label = 5; break; } $6 = HEAP32[$3>>2]|0; $8 = ($7|0)<($6|0); if ($8) { $$08 = $7; } else { $$06 = 0; label = 5; break; } } if ((label|0) == 5) { STACKTOP = sp;return ($$06|0); } return (0)|0; } function _TextGroupWidget_DrawAdvanced($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$05763 = 0, $$05862 = 0, $$061 = 0, $$160 = 0, $$sroa$4$0$$sroa_idx33 = 0, $$sroa$4$0$copyload34 = 0, $$sroa$5$0$$sroa_idx36 = 0, $$sroa$5$0$$sroa_idx37 = 0, $$sroa$5$0$copyload = 0, $$sroa$5$0$copyload38 = 0, $$sroa$7$0$$sroa_idx41 = 0, $$sroa$7$0$$sroa_idx42 = 0, $$sroa$7$0$copyload = 0, $$sroa$7$0$copyload43 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0; var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0; var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; var $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond67 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 3248|0; $5 = sp + 320|0; $6 = sp + 112|0; $7 = sp; $8 = sp + 3216|0; $9 = sp + 3208|0; $10 = sp + 3200|0; $11 = (_Drawer2D_TextHeight($2)|0); $12 = (_TextGroupWidget_Reduce($0,$5,$3,$6)|0); $13 = ($12|0)>(0); if (!($13)) { _Context2D_Alloc($8,0,$11); _Context2D_MakeTexture($1,$8); _Context2D_Free($8); STACKTOP = sp;return; } $$05763 = 0;$$05862 = 0; while(1) { $$sroa$5$0$$sroa_idx36 = (((($6) + ($$05763<<3)|0)) + 4|0); $$sroa$5$0$copyload = HEAP16[$$sroa$5$0$$sroa_idx36>>1]|0; $$sroa$7$0$$sroa_idx41 = (((($6) + ($$05763<<3)|0)) + 6|0); $$sroa$7$0$copyload = HEAP16[$$sroa$7$0$$sroa_idx41>>1]|0; $14 = $$sroa$5$0$copyload << 16 >> 16; $15 = $$sroa$7$0$copyload << 16 >> 16; _String_UNSAFE_Substring($9,$4,$14,$15); $16 = $9; $17 = $16; $18 = HEAP32[$17>>2]|0; $19 = (($16) + 4)|0; $20 = $19; $21 = HEAP32[$20>>2]|0; $22 = $2; $23 = $22; HEAP32[$23>>2] = $18; $24 = (($22) + 4)|0; $25 = $24; HEAP32[$25>>2] = $21; $26 = (_Drawer2D_TextWidth($2)|0); $27 = (($7) + ($$05763<<2)|0); HEAP32[$27>>2] = $26; $28 = (($26) + ($$05862))|0; $29 = (($$05763) + 1)|0; $exitcond67 = ($29|0)==($12|0); if ($exitcond67) { break; } else { $$05763 = $29;$$05862 = $28; } } _Context2D_Alloc($8,$28,$11); $30 = ($12|0)>(0); if (!($30)) { _Context2D_MakeTexture($1,$8); _Context2D_Free($8); STACKTOP = sp;return; } $31 = ((($2)) + 8|0); $$061 = 0;$$160 = 0; while(1) { $$sroa$4$0$$sroa_idx33 = (((($6) + ($$160<<3)|0)) + 2|0); $$sroa$4$0$copyload34 = HEAP16[$$sroa$4$0$$sroa_idx33>>1]|0; $$sroa$5$0$$sroa_idx37 = (((($6) + ($$160<<3)|0)) + 4|0); $$sroa$5$0$copyload38 = HEAP16[$$sroa$5$0$$sroa_idx37>>1]|0; $$sroa$7$0$$sroa_idx42 = (((($6) + ($$160<<3)|0)) + 6|0); $$sroa$7$0$copyload43 = HEAP16[$$sroa$7$0$$sroa_idx42>>1]|0; $32 = $$sroa$5$0$copyload38 << 16 >> 16; $33 = $$sroa$7$0$copyload43 << 16 >> 16; _String_UNSAFE_Substring($10,$4,$32,$33); $34 = $10; $35 = $34; $36 = HEAP32[$35>>2]|0; $37 = (($34) + 4)|0; $38 = $37; $39 = HEAP32[$38>>2]|0; $40 = $2; $41 = $40; HEAP32[$41>>2] = $36; $42 = (($40) + 4)|0; $43 = $42; HEAP32[$43>>2] = $39; $44 = ($$sroa$4$0$copyload34<<16>>16)<(0); if ($44) { $45 = HEAP32[$31>>2]|0; $46 = ((($45)) + 6|0); $47 = HEAP16[$46>>1]|0; $48 = $47 | 2; HEAP16[$46>>1] = $48; _Context2D_DrawText($8,$2,$$061,0); $49 = HEAP32[$31>>2]|0; $50 = ((($49)) + 6|0); $51 = HEAP16[$50>>1]|0; $52 = $51 & -3; HEAP16[$50>>1] = $52; } else { _Context2D_DrawText($8,$2,$$061,0); } $53 = (($7) + ($$160<<2)|0); $54 = HEAP32[$53>>2]|0; $55 = (($54) + ($$061))|0; $56 = (($$160) + 1)|0; $exitcond = ($56|0)==($12|0); if ($exitcond) { break; } else { $$061 = $55;$$160 = $56; } } _Context2D_MakeTexture($1,$8); _Context2D_Free($8); STACKTOP = sp;return; } function _TextGroupWidget_Reduce($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$049$lcssa = 0, $$04952 = 0, $$05051 = 0, $$1 = 0, $$byval_copy1 = 0, $$sroa$0$0$copyload = 0, $$sroa$4$0$$sroa_idx31 = 0, $$sroa$4$0$copyload = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0; var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; var $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 288|0; $$byval_copy1 = sp + 272|0; $4 = sp + 256|0; $5 = sp + 128|0; $6 = sp; $7 = sp + 264|0; $8 = sp + 248|0; HEAP32[$4>>2] = $3; $9 = ((($0)) + 36|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)>(0); if ($11) { $$sroa$4$0$$sroa_idx31 = ((($8)) + 4|0); $$04952 = 0;$$05051 = 0; while(1) { _TextGroupWidget_UNSAFE_Get($8,$0,$$05051); $$sroa$0$0$copyload = HEAP32[$8>>2]|0; $$sroa$4$0$copyload = HEAP16[$$sroa$4$0$$sroa_idx31>>1]|0; $12 = (($5) + ($$05051<<2)|0); HEAP32[$12>>2] = -1; $13 = (($6) + ($$05051<<2)|0); HEAP32[$13>>2] = -1; $14 = ($$sroa$4$0$copyload<<16>>16)==(0); $15 = $$sroa$4$0$copyload&65535; $16 = (($$04952) + ($15))|0; if ($14) { $$1 = $$04952; } else { $17 = (($1) + ($$04952)|0); HEAP32[$12>>2] = $$04952; _Mem_Copy($17,$$sroa$0$0$copyload,$15); HEAP32[$13>>2] = $16; $$1 = $16; } $18 = (($$05051) + 1)|0; $19 = HEAP32[$9>>2]|0; $20 = ($18|0)<($19|0); if ($20) { $$04952 = $$1;$$05051 = $18; } else { $$049$lcssa = $$1; break; } } } else { $$049$lcssa = 0; } $21 = ((($7)) + 2|0); $22 = (($5) + ($2<<2)|0); $23 = (($6) + ($2<<2)|0); $$0 = 0; while(1) { $24 = (_TextGroupWidget_NextUrl($1,$$049$lcssa,$$0)|0); $25 = $$0&65535; HEAP16[$7>>1] = $25; $26 = (($24) - ($$0))|0; $27 = $26&65535; HEAP16[$21>>1] = $27; $28 = HEAP32[$22>>2]|0; $29 = HEAP32[$23>>2]|0; ;HEAP16[$$byval_copy1>>1]=HEAP16[$7>>1]|0;HEAP16[$$byval_copy1+2>>1]=HEAP16[$7+2>>1]|0;HEAP16[$$byval_copy1+4>>1]=HEAP16[$7+4>>1]|0;HEAP16[$$byval_copy1+6>>1]=HEAP16[$7+6>>1]|0; _TextGroupWidget_Output($$byval_copy1,$28,$29,$4); $30 = ($24|0)==($$049$lcssa|0); if ($30) { break; } $31 = HEAP32[$9>>2]|0; $32 = (_TextGroupWidget_UrlEnd($1,$$049$lcssa,$5,$31,$24)|0); $33 = $24&65535; HEAP16[$7>>1] = $33; $34 = (($32) - ($24))|0; $35 = $34 | 32768; $36 = $35&65535; HEAP16[$21>>1] = $36; ;HEAP16[$$byval_copy1>>1]=HEAP16[$7>>1]|0;HEAP16[$$byval_copy1+2>>1]=HEAP16[$7+2>>1]|0;HEAP16[$$byval_copy1+4>>1]=HEAP16[$7+4>>1]|0;HEAP16[$$byval_copy1+6>>1]=HEAP16[$7+6>>1]|0; _TextGroupWidget_Output($$byval_copy1,$28,$29,$4); $$0 = $32; } $37 = HEAP32[$4>>2]|0; $38 = $3; $39 = (($37) - ($38))|0; $40 = (3)?($39 >> 3):($39); STACKTOP = sp;return ($40|0); } function _TextGroupWidget_NextUrl($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$043 = 0, $$04450 = 0, $$049 = 0, $$1 = 0, $$1$v = 0, $$14548 = 0, $$2 = 0, $$3 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($2|0)<($1|0); if (!($3)) { $$043 = $1; return ($$043|0); } $$04450 = $2; L4: while(1) { $4 = (($0) + ($$04450)|0); $5 = HEAP8[$4>>0]|0; L6: do { switch ($5<<24>>24) { case 38: case 104: { $6 = (($1) - ($$04450))|0; $7 = ($6|0)<(7); if ($7) { $$043 = $1; label = 18; break L4; } $$049 = $6;$$14548 = $$04450; while(1) { $8 = (($0) + ($$14548)|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(38); if (!($10)) { break; } $11 = (($$049) + -2)|0; $12 = (($$14548) + 2)|0; $13 = ($$049|0)>(3); if ($13) { $$049 = $11;$$14548 = $12; } else { $$3 = $12; break L6; } } $14 = ($$049|0)<(7); if ($14) { $$3 = $$14548; } else { $15 = (($0) + ($$14548)|0); $16 = HEAP8[$15>>0]|0; $17 = ($16<<24>>24)==(104); if ($17) { $18 = (($$14548) + 1)|0; $19 = (($0) + ($18)|0); $20 = HEAP8[$19>>0]|0; $21 = ($20<<24>>24)==(116); if ($21) { $22 = (($$14548) + 2)|0; $23 = (($0) + ($22)|0); $24 = HEAP8[$23>>0]|0; $25 = ($24<<24>>24)==(116); if ($25) { $26 = (($$14548) + 3)|0; $27 = (($0) + ($26)|0); $28 = HEAP8[$27>>0]|0; $29 = ($28<<24>>24)==(112); if ($29) { $30 = (($$14548) + 4)|0; $31 = (($0) + ($30)|0); $32 = HEAP8[$31>>0]|0; $33 = ($32<<24>>24)==(115); $34 = (($$14548) + 5)|0; $$2 = $33 ? $34 : $30; $$1$v = $33 ? -5 : -4; $$1 = (($$1$v) + ($$049))|0; $35 = ($$1|0)>(2); if ($35) { $36 = (($0) + ($$2)|0); $37 = HEAP8[$36>>0]|0; $38 = ($37<<24>>24)==(58); if ($38) { $39 = (($$2) + 1)|0; $40 = (($0) + ($39)|0); $41 = HEAP8[$40>>0]|0; $42 = ($41<<24>>24)==(47); if ($42) { $43 = (($$2) + 2)|0; $44 = (($0) + ($43)|0); $45 = HEAP8[$44>>0]|0; $46 = ($45<<24>>24)==(47); if ($46) { $$043 = $$04450; label = 18; break L4; } else { $$3 = $$2; } } else { $$3 = $$2; } } else { $$3 = $$2; } } else { $$3 = $$2; } } else { $$3 = $$14548; } } else { $$3 = $$14548; } } else { $$3 = $$14548; } } else { $$3 = $$14548; } } break; } default: { $$3 = $$04450; } } } while(0); $47 = (($$3) + 1)|0; $48 = ($47|0)<($1|0); if ($48) { $$04450 = $47; } else { $$043 = $1; label = 18; break; } } if ((label|0) == 18) { return ($$043|0); } return (0)|0; } function _TextGroupWidget_Output($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$pr = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; var $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP16[$0>>1]|0; $5 = $4 << 16 >> 16; $6 = ($5|0)<($2|0); if (!($6)) { return; } $7 = ((($0)) + 2|0); $8 = HEAP16[$7>>1]|0; $9 = ($8<<16>>16)==(0); if ($9) { return; } $10 = ((($0)) + 4|0); HEAP16[$10>>1] = $4; $11 = $8 & 32767; $12 = ((($0)) + 6|0); HEAP16[$12>>1] = $11; $13 = ($5|0)<($1|0); do { if ($13) { $14 = $11&65535; $15 = (($14) + ($5))|0; $16 = ($15|0)>($1|0); if ($16) { $17 = (($1) - ($5))|0; $18 = $4&65535; $19 = (($17) + ($18))|0; $20 = $19&65535; HEAP16[$10>>1] = $20; $21 = (($14) - ($17))|0; $22 = $21&65535; HEAP16[$12>>1] = $22; break; } else { return; } } } while(0); $23 = HEAP16[$10>>1]|0; $24 = $23 << 16 >> 16; $25 = HEAP16[$12>>1]|0; $26 = $25 << 16 >> 16; $27 = (($24) - ($2))|0; $28 = (($27) + ($26))|0; $29 = ($28|0)>(0); if ($29) { $30 = (0 - ($27))|0; $31 = $30&65535; HEAP16[$12>>1] = $31; $35 = $31; } else { $$pr = HEAP16[$12>>1]|0; $35 = $$pr; } $32 = $23&65535; $33 = (($32) - ($1))|0; $34 = $33&65535; HEAP16[$10>>1] = $34; $36 = ($35<<16>>16)==(0); if ($36) { return; } $37 = HEAP32[$3>>2]|0; $38 = ((($37)) + 8|0); $39 = $0; $40 = $39; $41 = HEAPU16[$40>>1]|(HEAPU16[$40+2>>1]<<16); $42 = (($39) + 4)|0; $43 = $42; $44 = HEAPU16[$43>>1]|(HEAPU16[$43+2>>1]<<16); $45 = $37; $46 = $45; HEAP16[$46>>1]=$41&65535;HEAP16[$46+2>>1]=$41>>>16; $47 = (($45) + 4)|0; $48 = $47; HEAP16[$48>>1]=$44&65535;HEAP16[$48+2>>1]=$44>>>16; HEAP32[$3>>2] = $38; return; } function _TextGroupWidget_UrlEnd($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $$035$lcssa = 0, $$03546 = 0, $$036$lcssa = 0, $$03643 = 0, $$03645 = 0, $$03744 = 0, $$038$lcssa = 0, $$03849 = 0, $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0; var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = ($4|0)<($1|0); if (!($5)) { $$038$lcssa = $4; return ($$038$lcssa|0); } $6 = ($3|0)>(0); $$03849 = $4; L4: while(1) { $7 = (($0) + ($$03849)|0); $8 = HEAP8[$7>>0]|0; $9 = ($8<<24>>24)==(32); if ($9) { $$038$lcssa = $$03849; label = 17; break; } L7: do { if ($6) { $$03744 = 0; while(1) { $12 = (($2) + ($$03744<<2)|0); $13 = HEAP32[$12>>2]|0; $14 = ($$03849|0)==($13|0); $10 = (($$03744) + 1)|0; if ($14) { break; } $11 = ($10|0)<($3|0); if ($11) { $$03744 = $10; } else { $$1 = $$03849; break L7; } } $15 = ($$03849|0)==($4|0); if ($15) { $$1 = $$03849; } else { $16 = ($8<<24>>24)==(62); if (!($16)) { $$038$lcssa = $$03849; label = 17; break L4; } $17 = (($$03849) + 1)|0; $18 = (($1) - ($17))|0; $19 = ($18|0)>(1); L15: do { if ($19) { $$03546 = $18;$$03645 = $17; while(1) { $20 = (($0) + ($$03645)|0); $21 = HEAP8[$20>>0]|0; $22 = ($21<<24>>24)==(38); if (!($22)) { $$03643 = $$03645; break L15; } $23 = (($$03546) + -2)|0; $24 = (($$03645) + 2)|0; $25 = ($$03546|0)>(3); if ($25) { $$03546 = $23;$$03645 = $24; } else { $$035$lcssa = $23;$$036$lcssa = $24; label = 14; break; } } } else { $$035$lcssa = $18;$$036$lcssa = $17; label = 14; } } while(0); if ((label|0) == 14) { label = 0; $26 = ($$035$lcssa|0)==(0); if ($26) { $$038$lcssa = $$03849; label = 17; break L4; } else { $$03643 = $$036$lcssa; } } $27 = (($0) + ($$03643)|0); $28 = HEAP8[$27>>0]|0; $29 = ($28<<24>>24)==(32); if ($29) { $$1 = $$03643; } else { $$038$lcssa = $$03849; label = 17; break L4; } } } else { $$1 = $$03849; } } while(0); $30 = (($$1) + 1)|0; $31 = ($30|0)<($1|0); if ($31) { $$03849 = $30; } else { $$038$lcssa = $30; label = 17; break; } } if ((label|0) == 17) { return ($$038$lcssa|0); } return (0)|0; } function _TextGroupWidget_ShiftDown($0) { $0 = $0|0; var $$013 = 0, $$lcssa = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 36|0); $2 = HEAP32[$1>>2]|0; $3 = (($2) + -1)|0; $4 = ((($0)) + 80|0); $5 = HEAP32[$4>>2]|0; $6 = (($5) + (($3*28)|0)|0); _Gfx_DeleteTexture($6); $7 = ($2|0)>(1); $8 = HEAP32[$4>>2]|0; if (!($7)) { $$lcssa = $8; HEAP32[$$lcssa>>2] = 0; _TextGroupWidget_Redraw($0,0); return; } $$013 = $3;$10 = $8; while(1) { $9 = (($10) + (($$013*28)|0)|0); $11 = (($$013) + -1)|0; $12 = (($10) + (($11*28)|0)|0); ;HEAP32[$9>>2]=HEAP32[$12>>2]|0;HEAP32[$9+4>>2]=HEAP32[$12+4>>2]|0;HEAP32[$9+8>>2]=HEAP32[$12+8>>2]|0;HEAP32[$9+12>>2]=HEAP32[$12+12>>2]|0;HEAP32[$9+16>>2]=HEAP32[$12+16>>2]|0;HEAP32[$9+20>>2]=HEAP32[$12+20>>2]|0;HEAP32[$9+24>>2]=HEAP32[$12+24>>2]|0; $13 = ($$013|0)>(1); $14 = HEAP32[$4>>2]|0; if ($13) { $$013 = $11;$10 = $14; } else { $$lcssa = $14; break; } } HEAP32[$$lcssa>>2] = 0; _TextGroupWidget_Redraw($0,0); return; } function _TextGroupWidget_UsedHeight($0) { $0 = $0|0; var $$0$lcssa = 0, $$017$lcssa = 0, $$01720 = 0, $$019 = 0, $$118 = 0, $$lcssa = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 80|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 36|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); L1: do { if ($5) { $$01720 = 0;$18 = $4; while(1) { $6 = (($2) + (($$01720*28)|0)|0); $7 = HEAP32[$6>>2]|0; $8 = ($7|0)==(0); if (!($8)) { $$017$lcssa = $$01720;$$lcssa = $18; break L1; } $9 = (($$01720) + 1)|0; $10 = HEAP32[$3>>2]|0; $11 = ($9|0)<($10|0); if ($11) { $$01720 = $9;$18 = $10; } else { $$017$lcssa = $9;$$lcssa = $10; break; } } } else { $$017$lcssa = 0;$$lcssa = $4; } } while(0); $12 = ($$017$lcssa|0)<($$lcssa|0); if (!($12)) { $$0$lcssa = 0; return ($$0$lcssa|0); } $$019 = 0;$$118 = $$017$lcssa; while(1) { $13 = (((($2) + (($$118*28)|0)|0)) + 10|0); $14 = HEAP16[$13>>1]|0; $15 = $14&65535; $16 = (($$019) + ($15))|0; $17 = (($$118) + 1)|0; $exitcond = ($17|0)==($$lcssa|0); if ($exitcond) { $$0$lcssa = $16; break; } else { $$019 = $16;$$118 = $17; } } return ($$0$lcssa|0); } function _TextGroupWidget_GetSelected($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$031 = 0, $$034 = 0, $$sroa$3$0$$sroa_idx9 = 0, $$sroa$3$0$copyload = 0, $$sroa$4$0$$sroa_idx11 = 0, $$sroa$4$0$copyload = 0, $$sroa$5$0$$sroa_idx13 = 0, $$sroa$5$0$copyload = 0, $$sroa$6$0$$sroa_idx15 = 0, $$sroa$6$0$copyload = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp; $5 = ((($0)) + 36|0); $6 = HEAP32[$5>>2]|0; $7 = ($6|0)>(0); if (!($7)) { $$031 = -1; STACKTOP = sp;return ($$031|0); } $8 = ((($0)) + 80|0); $$034 = 0; while(1) { $9 = HEAP32[$8>>2]|0; $10 = (($9) + (($$034*28)|0)|0); $11 = HEAP32[$10>>2]|0; $12 = ($11|0)==(0); if (!($12)) { $$sroa$3$0$$sroa_idx9 = (((($9) + (($$034*28)|0)|0)) + 4|0); $$sroa$3$0$copyload = HEAP16[$$sroa$3$0$$sroa_idx9>>1]|0; $$sroa$4$0$$sroa_idx11 = (((($9) + (($$034*28)|0)|0)) + 6|0); $$sroa$4$0$copyload = HEAP16[$$sroa$4$0$$sroa_idx11>>1]|0; $$sroa$5$0$$sroa_idx13 = (((($9) + (($$034*28)|0)|0)) + 8|0); $$sroa$5$0$copyload = HEAP16[$$sroa$5$0$$sroa_idx13>>1]|0; $$sroa$6$0$$sroa_idx15 = (((($9) + (($$034*28)|0)|0)) + 10|0); $$sroa$6$0$copyload = HEAP16[$$sroa$6$0$$sroa_idx15>>1]|0; $13 = $$sroa$3$0$copyload << 16 >> 16; $14 = $$sroa$4$0$copyload << 16 >> 16; $15 = $$sroa$5$0$copyload&65535; $16 = $$sroa$6$0$copyload&65535; $17 = (_Gui_Contains($13,$14,$15,$16,$2,$3)|0); $18 = ($17|0)==(0); if (!($18)) { break; } } $21 = (($$034) + 1)|0; $22 = HEAP32[$5>>2]|0; $23 = ($21|0)<($22|0); if ($23) { $$034 = $21; } else { $$031 = -1; label = 8; break; } } if ((label|0) == 8) { STACKTOP = sp;return ($$031|0); } $19 = (_TextGroupWidget_GetUrl($0,$1,$$034,$2)|0); $20 = ($19<<24>>24)==(0); if (!($20)) { $$031 = $$034; STACKTOP = sp;return ($$031|0); } _TextGroupWidget_UNSAFE_Get($4,$0,$$034); _String_AppendString($1,$4); $$031 = $$034; STACKTOP = sp;return ($$031|0); } function _TextGroupWidget_GetUrl($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$0 = 0, $$03746 = 0, $$03845 = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0, $$sroa$10$0$$sroa_idx24 = 0, $$sroa$10$0$copyload = 0, $$sroa$4$0$$sroa_idx17 = 0, $$sroa$4$0$copyload = 0, $$sroa$9$0$$sroa_idx22 = 0, $$sroa$9$0$copyload = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; var $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond$not = 0, $or$cond44 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 3136|0; $4 = sp + 208|0; $5 = sp; $6 = sp + 3112|0; $7 = sp + 3104|0; $8 = sp + 3096|0; $9 = sp + 3088|0; ;HEAP32[$6>>2]=0|0;HEAP32[$6+4>>2]=0|0;HEAP32[$6+8>>2]=0|0;HEAP32[$6+12>>2]=0|0; $10 = ((($0)) + 80|0); $11 = HEAP32[$10>>2]|0; $12 = (((($11) + (($2*28)|0)|0)) + 4|0); $13 = HEAP16[$12>>1]|0; $14 = $13 << 16 >> 16; $15 = (($3) - ($14))|0; $16 = ((($6)) + 12|0); HEAP8[$16>>0] = 1; _TextGroupWidget_UNSAFE_Get($7,$0,$2); $17 = HEAP8[1972839]|0; $18 = ($17<<24>>24)==(0); if (!($18)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $19 = (_TextGroupWidget_Reduce($0,$4,$2,$5)|0); $20 = ($19|0)>(0); if (!($20)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $21 = ((($0)) + 44|0); $22 = ((($6)) + 8|0); $$03746 = 0;$$03845 = 0; while(1) { $$sroa$0$0$$sroa_idx = (($5) + ($$03845<<3)|0); $$sroa$0$0$copyload = HEAP16[$$sroa$0$0$$sroa_idx>>1]|0; $$sroa$4$0$$sroa_idx17 = (((($5) + ($$03845<<3)|0)) + 2|0); $$sroa$4$0$copyload = HEAP16[$$sroa$4$0$$sroa_idx17>>1]|0; $$sroa$9$0$$sroa_idx22 = (((($5) + ($$03845<<3)|0)) + 4|0); $$sroa$9$0$copyload = HEAP16[$$sroa$9$0$$sroa_idx22>>1]|0; $$sroa$10$0$$sroa_idx24 = (((($5) + ($$03845<<3)|0)) + 6|0); $$sroa$10$0$copyload = HEAP16[$$sroa$10$0$$sroa_idx24>>1]|0; $25 = $$sroa$9$0$copyload << 16 >> 16; $26 = $$sroa$10$0$copyload << 16 >> 16; _String_UNSAFE_Substring($9,$7,$25,$26); $27 = $9; $28 = $27; $29 = HEAP32[$28>>2]|0; $30 = (($27) + 4)|0; $31 = $30; $32 = HEAP32[$31>>2]|0; $33 = $6; $34 = $33; HEAP32[$34>>2] = $29; $35 = (($33) + 4)|0; $36 = $35; HEAP32[$36>>2] = $32; $37 = HEAP32[$21>>2]|0; HEAP32[$22>>2] = $37; $38 = (_Drawer2D_TextWidth($6)|0); $39 = ($$sroa$4$0$copyload<<16>>16)<(0); $40 = ($15|0)>=($$03746|0); $or$cond$not = $40 & $39; $41 = (($38) + ($$03746))|0; $42 = ($15|0)<($41|0); $or$cond44 = $or$cond$not & $42; $23 = (($$03845) + 1)|0; if ($or$cond44) { break; } $24 = ($23|0)<($19|0); if ($24) { $$03746 = $41;$$03845 = $23; } else { $$0 = 0; label = 7; break; } } if ((label|0) == 7) { STACKTOP = sp;return ($$0|0); } $43 = $$sroa$4$0$copyload & 32767; $44 = $43&65535; $45 = $$sroa$0$0$copyload << 16 >> 16; $46 = (($4) + ($45)|0); _String_Init_2263($8,$46,$44,$44); _TextGroupWidget_FormatUrl($1,$8); $$0 = 1; STACKTOP = sp;return ($$0|0); } function _String_Init_2263($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = $2&65535; $5 = $3&65535; HEAP32[$0>>2] = $1; $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); HEAP16[$$sroa$4$0$$sroa_idx2>>1] = $4; $$sroa$5$0$$sroa_idx4 = ((($0)) + 6|0); HEAP16[$$sroa$5$0$$sroa_idx4>>1] = $5; return; } function _TextGroupWidget_FormatUrl($0,$1) { $0 = $0|0; $1 = $1|0; var $$016 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _String_AppendColorless($0,$1); $2 = HEAP32[$0>>2]|0; $3 = ((($0)) + 4|0); $4 = HEAP16[$3>>1]|0; $5 = ($4&65535)>(1); if (!($5)) { return; } $6 = $4&65535; $7 = (($6) + -2)|0; $$016 = $7; while(1) { $8 = (($2) + ($$016)|0); $9 = HEAP8[$8>>0]|0; $10 = ($9<<24>>24)==(62); if ($10) { $11 = (($$016) + 1)|0; $12 = (($2) + ($11)|0); $13 = HEAP8[$12>>0]|0; $14 = ($13<<24>>24)==(32); if ($14) { _String_DeleteAt($0,$11); _String_DeleteAt($0,$$016); } } $15 = (($$016) + -1)|0; $16 = ($$016|0)>(0); if ($16) { $$016 = $15; } else { break; } } return; } function _TextGroupWidget_RedrawAll($0) { $0 = $0|0; var $$05 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 36|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)>(0); if (!($3)) { return; } $$05 = 0; while(1) { _TextGroupWidget_Redraw($0,$$05); $4 = (($$05) + 1)|0; $5 = HEAP32[$1>>2]|0; $6 = ($4|0)<($5|0); if ($6) { $$05 = $4; } else { break; } } return; } function _TextGroupWidget_RedrawAllWithCol($0,$1) { $0 = $0|0; $1 = $1|0; var $$02123 = 0, $$022 = 0, $$sroa$0$0$copyload = 0, $$sroa$5$0$$sroa_idx13 = 0, $$sroa$5$0$copyload = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = ((($0)) + 36|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if (!($5)) { STACKTOP = sp;return; } $$sroa$5$0$$sroa_idx13 = ((($2)) + 4|0); $$02123 = 0; while(1) { _TextGroupWidget_UNSAFE_Get($2,$0,$$02123); $$sroa$0$0$copyload = HEAP32[$2>>2]|0; $$sroa$5$0$copyload = HEAP16[$$sroa$5$0$$sroa_idx13>>1]|0; $6 = ($$sroa$5$0$copyload<<16>>16)==(0); L6: do { if (!($6)) { $7 = $$sroa$5$0$copyload&65535; $8 = (($7) + -1)|0; $9 = ($$sroa$5$0$copyload<<16>>16)==(1); if (!($9)) { $$022 = 0; while(1) { $10 = (($$sroa$0$0$copyload) + ($$022)|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(38); if ($12) { $13 = (($$022) + 1)|0; $14 = (($$sroa$0$0$copyload) + ($13)|0); $15 = HEAP8[$14>>0]|0; $16 = ($15<<24>>24)==($1<<24>>24); if ($16) { break; } } $17 = (($$022) + 1)|0; $18 = ($17|0)<($8|0); if ($18) { $$022 = $17; } else { break L6; } } _TextGroupWidget_Redraw($0,$$02123); } } } while(0); $19 = (($$02123) + 1)|0; $20 = HEAP32[$3>>2]|0; $21 = ($19|0)<($20|0); if ($21) { $$02123 = $19; } else { break; } } STACKTOP = sp;return; } function _TextGroupWidget_SetFont($0,$1) { $0 = $0|0; $1 = $1|0; var $$014 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0; var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = (_Font_CalcHeight($1,1)|0); HEAP32[$2>>2] = $3; $4 = ((($1)) + 4|0); $5 = HEAP16[$4>>1]|0; $6 = $5&65535; _Drawer2D_ReducePadding_Height($2,$6,3); $7 = HEAP32[$2>>2]|0; $8 = ((($0)) + 40|0); HEAP32[$8>>2] = $7; $9 = ((($0)) + 36|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)>(0); if ($11) { $12 = $7&65535; $13 = ((($0)) + 80|0); $$014 = 0; while(1) { $14 = (((($0)) + 48|0) + ($$014)|0); $15 = HEAP8[$14>>0]|0; $16 = ($15<<24>>24)==(0); $17 = $16 ? $12 : 0; $18 = HEAP32[$13>>2]|0; $19 = (((($18) + (($$014*28)|0)|0)) + 10|0); HEAP16[$19>>1] = $17; $20 = (($$014) + 1)|0; $21 = HEAP32[$9>>2]|0; $22 = ($20|0)<($21|0); if ($22) { $$014 = $20; } else { break; } } } $23 = ((($0)) + 44|0); HEAP32[$23>>2] = $1; $24 = HEAP32[$0>>2]|0; $25 = ((($24)) + 8|0); $26 = HEAP32[$25>>2]|0; FUNCTION_TABLE_vi[$26 & 511]($0); STACKTOP = sp;return; } function _TextGroupWidget_Create($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; _Widget_Reset($0); HEAP32[$0>>2] = 22436; $4 = ((($0)) + 36|0); HEAP32[$4>>2] = $1; $5 = ((($0)) + 80|0); HEAP32[$5>>2] = $2; $6 = ((($0)) + 84|0); HEAP32[$6>>2] = $3; return; } function _TextGroupWidget_Render($0,$1) { $0 = $0|0; $1 = +$1; var $$013 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 80|0); $3 = HEAP32[$2>>2]|0; $4 = ((($0)) + 36|0); $5 = HEAP32[$4>>2]|0; $6 = ($5|0)>(0); if (!($6)) { return; } $$013 = 0; while(1) { $7 = (($3) + (($$013*28)|0)|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(0); if (!($9)) { _Texture_Render($7); } $10 = (($$013) + 1)|0; $11 = HEAP32[$4>>2]|0; $12 = ($10|0)<($11|0); if ($12) { $$013 = $10; } else { break; } } return; } function _TextGroupWidget_Free($0) { $0 = $0|0; var $$08 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 36|0); $2 = HEAP32[$1>>2]|0; $3 = ($2|0)>(0); if (!($3)) { return; } $4 = ((($0)) + 80|0); $$08 = 0; while(1) { $5 = HEAP32[$4>>2]|0; $6 = (($5) + (($$08*28)|0)|0); _Gfx_DeleteTexture($6); $7 = (($$08) + 1)|0; $8 = HEAP32[$1>>2]|0; $9 = ($7|0)<($8|0); if ($9) { $$08 = $7; } else { break; } } return; } function _TextGroupWidget_Reposition($0) { $0 = $0|0; var $$0$lcssa = 0, $$044$ = 0, $$044$lcssa = 0, $$04450 = 0, $$04548 = 0, $$04649 = 0, $$051 = 0, $$147 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 80|0); $2 = HEAP32[$1>>2]|0; $3 = ((($0)) + 36|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)>(0); if ($5) { $6 = HEAP32[$3>>2]|0; $$04450 = 0;$$04649 = 0;$$051 = 0; while(1) { $7 = (((($2) + (($$04649*28)|0)|0)) + 8|0); $8 = HEAP16[$7>>1]|0; $9 = $8&65535; $10 = ($$04450|0)>($9|0); $$044$ = $10 ? $$04450 : $9; $11 = (((($2) + (($$04649*28)|0)|0)) + 10|0); $12 = HEAP16[$11>>1]|0; $13 = $12&65535; $14 = (($$051) + ($13))|0; $15 = (($$04649) + 1)|0; $16 = ($15|0)<($6|0); if ($16) { $$04450 = $$044$;$$04649 = $15;$$051 = $14; } else { $$0$lcssa = $14;$$044$lcssa = $$044$; break; } } } else { $$0$lcssa = 0;$$044$lcssa = 0; } $17 = ((($0)) + 12|0); HEAP32[$17>>2] = $$044$lcssa; $18 = ((($0)) + 16|0); HEAP32[$18>>2] = $$0$lcssa; _Widget_CalcPosition($0); $19 = HEAP32[$3>>2]|0; $20 = ($19|0)>(0); if (!($20)) { return; } $21 = ((($0)) + 8|0); $22 = HEAP32[$21>>2]|0; $23 = ((($0)) + 22|0); $24 = ((($0)) + 24|0); $$04548 = $22;$$147 = 0; while(1) { $25 = HEAP8[$23>>0]|0; $26 = HEAP32[$24>>2]|0; $27 = (((($2) + (($$147*28)|0)|0)) + 8|0); $28 = HEAP16[$27>>1]|0; $29 = $28&65535; $30 = HEAP32[(1972116)>>2]|0; $31 = (_Gui_CalcPos($25,$26,$29,$30)|0); $32 = $31&65535; $33 = (((($2) + (($$147*28)|0)|0)) + 4|0); HEAP16[$33>>1] = $32; $34 = $$04548&65535; $35 = (((($2) + (($$147*28)|0)|0)) + 6|0); HEAP16[$35>>1] = $34; $36 = (((($2) + (($$147*28)|0)|0)) + 10|0); $37 = HEAP16[$36>>1]|0; $38 = $37&65535; $39 = (($$04548) + ($38))|0; $40 = (($$147) + 1)|0; $41 = HEAP32[$3>>2]|0; $42 = ($40|0)<($41|0); if ($42) { $$04548 = $39;$$147 = $40; } else { break; } } return; } function _SpecialInputWidget_Redraw($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 44|0); $2 = HEAP32[$1>>2]|0; $3 = (((($0)) + 92|0) + (($2*28)|0)|0); _SpecialInputWidget_Make($0,$3); $4 = ((($0)) + 48|0); HEAP8[$4>>0] = 0; $5 = HEAP32[$0>>2]|0; $6 = ((($5)) + 8|0); $7 = HEAP32[$6>>2]|0; FUNCTION_TABLE_vi[$7 & 511]($0); return; } function _SpecialInputWidget_Make($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = (_SpecialInputWidget_MeasureTitles($0)|0); $4 = ((($0)) + 88|0); $5 = HEAP32[$4>>2]|0; $6 = (_SpecialInputWidget_MeasureContent($0,$1)|0); $7 = (_SpecialInputWidget_ContentHeight($0,$1)|0); $8 = ($3|0)>($6|0); $9 = $8 ? $3 : $6; $10 = (($7) + ($5))|0; $11 = ((($0)) + 56|0); _Gfx_DeleteTexture($11); _Context2D_Alloc($2,$9,$10); _SpecialInputWidget_DrawTitles($0,$2); _Context2D_Clear($2,-937550306,0,$5,$9,$7); _SpecialInputWidget_DrawContent($0,$1,$2,$5); _Context2D_MakeTexture($11,$2); _Context2D_Free($2); STACKTOP = sp;return; } function _SpecialInputWidget_MeasureTitles($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ((($0)) + 84|0); $3 = HEAP32[$2>>2]|0; _DrawTextArgs_MakeEmpty($1,$3,0); $4 = ((($0)) + 104|0); $5 = $4; $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = (($5) + 4)|0; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = $1; $12 = $11; HEAP32[$12>>2] = $7; $13 = (($11) + 4)|0; $14 = $13; HEAP32[$14>>2] = $10; $15 = (_Drawer2D_TextWidth($1)|0); $16 = (($15) + 10)|0; $17 = ((($0)) + 100|0); HEAP32[$17>>2] = $16; $18 = ((($0)) + 132|0); $19 = $18; $20 = $19; $21 = HEAP32[$20>>2]|0; $22 = (($19) + 4)|0; $23 = $22; $24 = HEAP32[$23>>2]|0; $25 = $1; $26 = $25; HEAP32[$26>>2] = $21; $27 = (($25) + 4)|0; $28 = $27; HEAP32[$28>>2] = $24; $29 = (_Drawer2D_TextWidth($1)|0); $30 = (($29) + 10)|0; $31 = ((($0)) + 128|0); HEAP32[$31>>2] = $30; $32 = (($30) + ($16))|0; $33 = ((($0)) + 160|0); $34 = $33; $35 = $34; $36 = HEAP32[$35>>2]|0; $37 = (($34) + 4)|0; $38 = $37; $39 = HEAP32[$38>>2]|0; $40 = $1; $41 = $40; HEAP32[$41>>2] = $36; $42 = (($40) + 4)|0; $43 = $42; HEAP32[$43>>2] = $39; $44 = (_Drawer2D_TextWidth($1)|0); $45 = (($44) + 10)|0; $46 = ((($0)) + 156|0); HEAP32[$46>>2] = $45; $47 = (($45) + ($32))|0; $48 = ((($0)) + 188|0); $49 = $48; $50 = $49; $51 = HEAP32[$50>>2]|0; $52 = (($49) + 4)|0; $53 = $52; $54 = HEAP32[$53>>2]|0; $55 = $1; $56 = $55; HEAP32[$56>>2] = $51; $57 = (($55) + 4)|0; $58 = $57; HEAP32[$58>>2] = $54; $59 = (_Drawer2D_TextWidth($1)|0); $60 = (($59) + 10)|0; $61 = ((($0)) + 184|0); HEAP32[$61>>2] = $60; $62 = (($60) + ($47))|0; $63 = ((($0)) + 216|0); $64 = $63; $65 = $64; $66 = HEAP32[$65>>2]|0; $67 = (($64) + 4)|0; $68 = $67; $69 = HEAP32[$68>>2]|0; $70 = $1; $71 = $70; HEAP32[$71>>2] = $66; $72 = (($70) + 4)|0; $73 = $72; HEAP32[$73>>2] = $69; $74 = (_Drawer2D_TextWidth($1)|0); $75 = (($74) + 10)|0; $76 = ((($0)) + 212|0); HEAP32[$76>>2] = $75; $77 = (($75) + ($62))|0; $78 = (_Drawer2D_TextHeight($1)|0); $79 = ((($0)) + 88|0); HEAP32[$79>>2] = $78; STACKTOP = sp;return ($77|0); } function _SpecialInputWidget_MeasureContent($0,$1) { $0 = $0|0; $1 = $1|0; var $$0$lcssa = 0, $$02425 = 0, $$026 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = ((($0)) + 84|0); $4 = HEAP32[$3>>2]|0; _DrawTextArgs_MakeEmpty($2,$4,0); $5 = ((($1)) + 4|0); $6 = HEAP32[$5>>2]|0; $7 = $6&65535; $8 = ((($2)) + 4|0); HEAP16[$8>>1] = $7; $9 = (_Drawer2D_TextHeight($2)|0); $10 = ((($1)) + 24|0); $11 = HEAP16[$10>>1]|0; $12 = ($11<<16>>16)==(0); if ($12) { $$0$lcssa = 5; } else { $13 = ((($1)) + 20|0); $$02425 = 0;$$026 = 0; while(1) { $14 = HEAP32[$13>>2]|0; $15 = (($14) + ($$02425)|0); HEAP32[$2>>2] = $15; $16 = (_Drawer2D_TextWidth($2)|0); $17 = ($$026|0)>($16|0); $18 = $17 ? $$026 : $16; $19 = HEAP32[$5>>2]|0; $20 = (($19) + ($$02425))|0; $21 = HEAP16[$10>>1]|0; $22 = $21&65535; $23 = ($20|0)<($22|0); if ($23) { $$02425 = $20;$$026 = $18; } else { break; } } $phitmp = (($18) + 5)|0; $$0$lcssa = $phitmp; } $24 = ((($0)) + 36|0); HEAP32[$24>>2] = $$0$lcssa; $25 = (($9) + 5)|0; $26 = ((($0)) + 40|0); HEAP32[$26>>2] = $25; $27 = HEAP32[$1>>2]|0; $28 = Math_imul($27, $$0$lcssa)|0; STACKTOP = sp;return ($28|0); } function _SpecialInputWidget_ContentHeight($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($1)) + 24|0); $3 = HEAP16[$2>>1]|0; $4 = $3&65535; $5 = ((($1)) + 4|0); $6 = HEAP32[$5>>2]|0; $7 = (($4|0) / ($6|0))&-1; $8 = HEAP32[$1>>2]|0; $9 = (_Math_CeilDiv($7,$8)|0); $10 = ((($0)) + 40|0); $11 = HEAP32[$10>>2]|0; $12 = Math_imul($11, $9)|0; return ($12|0); } function _SpecialInputWidget_DrawTitles($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp; $3 = ((($0)) + 84|0); $4 = HEAP32[$3>>2]|0; _DrawTextArgs_MakeEmpty($2,$4,0); $5 = ((($0)) + 44|0); $6 = ((($0)) + 88|0); $7 = ((($0)) + 104|0); $8 = $7; $9 = $8; $10 = HEAP32[$9>>2]|0; $11 = (($8) + 4)|0; $12 = $11; $13 = HEAP32[$12>>2]|0; $14 = $2; $15 = $14; HEAP32[$15>>2] = $10; $16 = (($14) + 4)|0; $17 = $16; HEAP32[$17>>2] = $13; $18 = HEAP32[$5>>2]|0; $19 = ($18|0)==(0); $20 = $19 ? -937550306 : 2130706432; $21 = ((($0)) + 100|0); $22 = HEAP32[$21>>2]|0; $23 = HEAP32[$6>>2]|0; _Context2D_Clear($1,$20,0,0,$22,$23); _Context2D_DrawText($1,$2,5,0); $24 = ((($0)) + 132|0); $25 = $24; $26 = $25; $27 = HEAP32[$26>>2]|0; $28 = (($25) + 4)|0; $29 = $28; $30 = HEAP32[$29>>2]|0; $31 = $2; $32 = $31; HEAP32[$32>>2] = $27; $33 = (($31) + 4)|0; $34 = $33; HEAP32[$34>>2] = $30; $35 = HEAP32[$5>>2]|0; $36 = ($35|0)==(1); $37 = $36 ? -937550306 : 2130706432; $38 = ((($0)) + 128|0); $39 = HEAP32[$38>>2]|0; $40 = HEAP32[$6>>2]|0; _Context2D_Clear($1,$37,$22,0,$39,$40); $41 = (($22) + 5)|0; _Context2D_DrawText($1,$2,$41,0); $42 = (($39) + ($22))|0; $43 = ((($0)) + 160|0); $44 = $43; $45 = $44; $46 = HEAP32[$45>>2]|0; $47 = (($44) + 4)|0; $48 = $47; $49 = HEAP32[$48>>2]|0; $50 = $2; $51 = $50; HEAP32[$51>>2] = $46; $52 = (($50) + 4)|0; $53 = $52; HEAP32[$53>>2] = $49; $54 = HEAP32[$5>>2]|0; $55 = ($54|0)==(2); $56 = $55 ? -937550306 : 2130706432; $57 = ((($0)) + 156|0); $58 = HEAP32[$57>>2]|0; $59 = HEAP32[$6>>2]|0; _Context2D_Clear($1,$56,$42,0,$58,$59); $60 = (($42) + 5)|0; _Context2D_DrawText($1,$2,$60,0); $61 = (($58) + ($42))|0; $62 = ((($0)) + 188|0); $63 = $62; $64 = $63; $65 = HEAP32[$64>>2]|0; $66 = (($63) + 4)|0; $67 = $66; $68 = HEAP32[$67>>2]|0; $69 = $2; $70 = $69; HEAP32[$70>>2] = $65; $71 = (($69) + 4)|0; $72 = $71; HEAP32[$72>>2] = $68; $73 = HEAP32[$5>>2]|0; $74 = ($73|0)==(3); $75 = $74 ? -937550306 : 2130706432; $76 = ((($0)) + 184|0); $77 = HEAP32[$76>>2]|0; $78 = HEAP32[$6>>2]|0; _Context2D_Clear($1,$75,$61,0,$77,$78); $79 = (($61) + 5)|0; _Context2D_DrawText($1,$2,$79,0); $80 = (($77) + ($61))|0; $81 = ((($0)) + 216|0); $82 = $81; $83 = $82; $84 = HEAP32[$83>>2]|0; $85 = (($82) + 4)|0; $86 = $85; $87 = HEAP32[$86>>2]|0; $88 = $2; $89 = $88; HEAP32[$89>>2] = $84; $90 = (($88) + 4)|0; $91 = $90; HEAP32[$91>>2] = $87; $92 = HEAP32[$5>>2]|0; $93 = ($92|0)==(4); $94 = $93 ? -937550306 : 2130706432; $95 = ((($0)) + 212|0); $96 = HEAP32[$95>>2]|0; $97 = HEAP32[$6>>2]|0; _Context2D_Clear($1,$94,$80,0,$96,$97); $98 = (($80) + 5)|0; _Context2D_DrawText($1,$2,$98,0); STACKTOP = sp;return; } function _SpecialInputWidget_DrawContent($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $$029 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; var $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $4 = sp; $5 = HEAP32[$1>>2]|0; $6 = ((($0)) + 84|0); $7 = HEAP32[$6>>2]|0; _DrawTextArgs_MakeEmpty($4,$7,0); $8 = ((($1)) + 4|0); $9 = HEAP32[$8>>2]|0; $10 = $9&65535; $11 = ((($4)) + 4|0); HEAP16[$11>>1] = $10; $12 = ((($1)) + 24|0); $13 = HEAP16[$12>>1]|0; $14 = ($13<<16>>16)==(0); if ($14) { STACKTOP = sp;return; } $15 = ((($1)) + 20|0); $16 = ((($0)) + 36|0); $17 = ((($0)) + 40|0); $$029 = 0; while(1) { $18 = HEAP32[$15>>2]|0; $19 = (($18) + ($$029)|0); HEAP32[$4>>2] = $19; $20 = HEAP32[$8>>2]|0; $21 = (($$029|0) / ($20|0))&-1; $22 = (($21|0) / ($5|0))&-1; $23 = Math_imul($22, $5)|0; $24 = (($21) - ($23))|0; $25 = HEAP32[$16>>2]|0; $26 = Math_imul($25, $24)|0; $27 = HEAP32[$17>>2]|0; $28 = Math_imul($27, $22)|0; $29 = (($28) + ($3))|0; _Context2D_DrawText($2,$4,$26,$29); $30 = HEAP32[$8>>2]|0; $31 = (($30) + ($$029))|0; $32 = HEAP16[$12>>1]|0; $33 = $32&65535; $34 = ($31|0)<($33|0); if ($34) { $$029 = $31; } else { break; } } STACKTOP = sp;return; } function _SpecialInputWidget_UpdateCols($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; _SpecialInputWidget_UpdateColString($0); $1 = ((($0)) + 112|0); $2 = ((($0)) + 232|0); $3 = $2; $4 = $3; $5 = HEAP32[$4>>2]|0; $6 = (($3) + 4)|0; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = $1; $10 = $9; HEAP32[$10>>2] = $5; $11 = (($9) + 4)|0; $12 = $11; HEAP32[$12>>2] = $8; $13 = ((($0)) + 44|0); $14 = HEAP32[$13>>2]|0; $15 = ($14|0)==(0); if (!($15)) { return; } $16 = ((($0)) + 20|0); $17 = HEAP8[$16>>0]|0; $18 = ($17<<24>>24)==(0); if ($18) { $19 = ((($0)) + 48|0); HEAP8[$19>>0] = 1; return; } else { _SpecialInputWidget_Redraw($0); return; } } function _SpecialInputWidget_UpdateColString($0) { $0 = $0|0; var $$0$off = 0, $$016 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 240|0); $2 = ((($0)) + 232|0); HEAP32[$2>>2] = $1; $3 = ((($0)) + 236|0); HEAP16[$3>>1] = 0; $4 = ((($0)) + 238|0); HEAP16[$4>>1] = 1024; $$016 = 0; while(1) { $$0$off = (($$016) + -65)|0; $5 = ($$0$off>>>0)<(6); if (!($5)) { $6 = (1781708 + ($$016<<2)|0); $7 = HEAP32[$6>>2]|0; $8 = ($7>>>0)>(16777215); if ($8) { _String_Append($2,38); $9 = $$016&255; _String_Append($2,$9); _String_Append($2,37); _String_Append($2,$9); } } $10 = (($$016) + 1)|0; $exitcond = ($10|0)==(256); if ($exitcond) { break; } else { $$016 = $10; } } return; } function _SpecialInputWidget_SetActive($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 20|0); HEAP8[$2>>0] = $1; $3 = ($1<<24>>24)==(0); if (!($3)) { $4 = ((($0)) + 48|0); $5 = HEAP8[$4>>0]|0; $6 = ($5<<24>>24)==(0); if (!($6)) { _SpecialInputWidget_Redraw($0); } } $7 = HEAP32[$0>>2]|0; $8 = ((($7)) + 8|0); $9 = HEAP32[$8>>2]|0; FUNCTION_TABLE_vi[$9 & 511]($0); return; } function _SpecialInputWidget_Create($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; _Widget_Reset($0); HEAP32[$0>>2] = 22480; $3 = ((($0)) + 23|0); HEAP8[$3>>0] = 2; $4 = ((($0)) + 84|0); HEAP32[$4>>2] = $1; $5 = ((($0)) + 52|0); HEAP32[$5>>2] = $2; _SpecialInputWidget_InitTabs($0); return; } function _SpecialInputWidget_InitTabs($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; _SpecialInputWidget_UpdateColString($0); $1 = ((($0)) + 92|0); $2 = ((($0)) + 232|0); _SpecialInputTab_Init($1,22524,10,4,$2); $3 = ((($0)) + 120|0); _SpecialInputTab_Init($3,22532,16,1,22540); $4 = ((($0)) + 148|0); _SpecialInputTab_Init($4,22548,17,1,22556); $5 = ((($0)) + 176|0); _SpecialInputTab_Init($5,22564,17,1,22572); $6 = ((($0)) + 204|0); _SpecialInputTab_Init($6,22580,16,1,22588); return; } function _SpecialInputTab_Init($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; $4 = $4|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $5 = ((($0)) + 12|0); $6 = $1; $7 = $6; $8 = HEAP32[$7>>2]|0; $9 = (($6) + 4)|0; $10 = $9; $11 = HEAP32[$10>>2]|0; $12 = $5; $13 = $12; HEAP32[$13>>2] = $8; $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = $11; $16 = ((($0)) + 8|0); HEAP32[$16>>2] = 0; $17 = ((($0)) + 20|0); $18 = $4; $19 = $18; $20 = HEAP32[$19>>2]|0; $21 = (($18) + 4)|0; $22 = $21; $23 = HEAP32[$22>>2]|0; $24 = $17; $25 = $24; HEAP32[$25>>2] = $20; $26 = (($24) + 4)|0; $27 = $26; HEAP32[$27>>2] = $23; HEAP32[$0>>2] = $2; $28 = ((($0)) + 4|0); HEAP32[$28>>2] = $3; return; } function _SpecialInputWidget_Render($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ((($0)) + 56|0); _Texture_Render($2); return; } function _SpecialInputWidget_Free($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 56|0); _Gfx_DeleteTexture($1); return; } function _SpecialInputWidget_Reposition($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 64|0); $2 = HEAP16[$1>>1]|0; $3 = $2&65535; $4 = ((($0)) + 12|0); HEAP32[$4>>2] = $3; $5 = ((($0)) + 20|0); $6 = HEAP8[$5>>0]|0; $7 = ($6<<24>>24)==(0); if ($7) { $12 = 0; } else { $8 = ((($0)) + 66|0); $9 = HEAP16[$8>>1]|0; $10 = $9&65535; $12 = $10; } $11 = ((($0)) + 16|0); HEAP32[$11>>2] = $12; _Widget_CalcPosition($0); $13 = ((($0)) + 4|0); $14 = HEAP32[$13>>2]|0; $15 = $14&65535; $16 = ((($0)) + 60|0); HEAP16[$16>>1] = $15; $17 = ((($0)) + 8|0); $18 = HEAP32[$17>>2]|0; $19 = $18&65535; $20 = ((($0)) + 62|0); HEAP16[$20>>1] = $19; return; } function _SpecialInputWidget_PointerDown($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = (($2) - ($5))|0; $7 = ((($0)) + 8|0); $8 = HEAP32[$7>>2]|0; $9 = (($3) - ($8))|0; $10 = (_SpecialInputWidget_IntersectsTitle($0,$6,$9)|0); $11 = ($10<<24>>24)==(0); if ($11) { _SpecialInputWidget_IntersectsBody($0,$6,$9); return 1; } else { _SpecialInputWidget_Redraw($0); return 1; } } function _SpecialInputWidget_IntersectsTitle($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$018 = 0, $$01921$lcssa = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 88|0); $4 = ((($0)) + 100|0); $5 = HEAP32[$4>>2]|0; $6 = HEAP32[$3>>2]|0; $7 = (_Gui_Contains(0,0,$5,$6,$1,$2)|0); $8 = ($7|0)==(0); if ($8) { $10 = ((($0)) + 128|0); $11 = HEAP32[$10>>2]|0; $12 = HEAP32[$3>>2]|0; $13 = (_Gui_Contains($5,0,$11,$12,$1,$2)|0); $14 = ($13|0)==(0); if ($14) { $15 = (($11) + ($5))|0; $16 = ((($0)) + 156|0); $17 = HEAP32[$16>>2]|0; $18 = HEAP32[$3>>2]|0; $19 = (_Gui_Contains($15,0,$17,$18,$1,$2)|0); $20 = ($19|0)==(0); if ($20) { $21 = (($17) + ($15))|0; $22 = ((($0)) + 184|0); $23 = HEAP32[$22>>2]|0; $24 = HEAP32[$3>>2]|0; $25 = (_Gui_Contains($21,0,$23,$24,$1,$2)|0); $26 = ($25|0)==(0); if ($26) { $27 = (($23) + ($21))|0; $28 = ((($0)) + 212|0); $29 = HEAP32[$28>>2]|0; $30 = HEAP32[$3>>2]|0; $31 = (_Gui_Contains($27,0,$29,$30,$1,$2)|0); $32 = ($31|0)==(0); if ($32) { $$018 = 0; return ($$018|0); } else { $$01921$lcssa = 4; } } else { $$01921$lcssa = 3; } } else { $$01921$lcssa = 2; } } else { $$01921$lcssa = 1; } } else { $$01921$lcssa = 0; } $9 = ((($0)) + 44|0); HEAP32[$9>>2] = $$01921$lcssa; $$018 = 1; return ($$018|0); } function _SpecialInputWidget_IntersectsBody($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$sroa$0$0$$sroa_idx = 0, $$sroa$0$0$copyload = 0, $$sroa$4$0$$sroa_idx4 = 0, $$sroa$4$0$copyload = 0, $$sroa$69$0$$sroa_idx10 = 0, $$sroa$69$0$copyload = 0, $$sroa$7$0$$sroa_idx12 = 0, $$sroa$7$0$copyload = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0; var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp; $4 = ((($0)) + 44|0); $5 = HEAP32[$4>>2]|0; $$sroa$0$0$$sroa_idx = (((($0)) + 92|0) + (($5*28)|0)|0); $$sroa$0$0$copyload = HEAP32[$$sroa$0$0$$sroa_idx>>2]|0; $$sroa$4$0$$sroa_idx4 = (((((($0)) + 92|0) + (($5*28)|0)|0)) + 4|0); $$sroa$4$0$copyload = HEAP32[$$sroa$4$0$$sroa_idx4>>2]|0; $$sroa$69$0$$sroa_idx10 = (((((($0)) + 92|0) + (($5*28)|0)|0)) + 20|0); $$sroa$69$0$copyload = HEAP32[$$sroa$69$0$$sroa_idx10>>2]|0; $$sroa$7$0$$sroa_idx12 = (((((($0)) + 92|0) + (($5*28)|0)|0)) + 24|0); $$sroa$7$0$copyload = HEAP16[$$sroa$7$0$$sroa_idx12>>1]|0; $6 = ((($0)) + 88|0); $7 = HEAP32[$6>>2]|0; $8 = (($2) - ($7))|0; $9 = ((($0)) + 36|0); $10 = HEAP32[$9>>2]|0; $11 = (($1|0) / ($10|0))&-1; $12 = ((($0)) + 40|0); $13 = HEAP32[$12>>2]|0; $14 = (($8|0) / ($13|0))&-1; $15 = Math_imul($14, $$sroa$0$0$copyload)|0; $16 = (($15) + ($11))|0; $17 = Math_imul($16, $$sroa$4$0$copyload)|0; $18 = $$sroa$7$0$copyload&65535; $19 = ($17|0)<($18|0); if (!($19)) { STACKTOP = sp;return; } $20 = (($$sroa$69$0$copyload) + ($17)|0); _String_Init_2263($3,$20,$$sroa$4$0$copyload,0); $21 = HEAP32[$4>>2]|0; $22 = ($21|0)==(0); if ($22) { $23 = ((($3)) + 4|0); HEAP16[$23>>1] = 2; } $24 = ((($0)) + 52|0); $25 = HEAP32[$24>>2]|0; _InputWidget_AppendText($25,$3); STACKTOP = sp;return; } function _ThumbstickWidget_Init($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; _Widget_Reset($0); HEAP32[$0>>2] = 22596; $1 = ((($0)) + 36|0); HEAPF32[$1>>2] = 1.0; return; } function _ThumbstickWidget_Reposition($0) { $0 = $0|0; var $1 = 0, $10 = 0, $11 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 36|0); $2 = +HEAPF32[$1>>2]; $3 = $2 * 128.0; $4 = (~~(($3))); $5 = (_Display_ScaleX($4)|0); $6 = ((($0)) + 12|0); HEAP32[$6>>2] = $5; $7 = +HEAPF32[$1>>2]; $8 = $7 * 128.0; $9 = (~~(($8))); $10 = (_Display_ScaleY($9)|0); $11 = ((($0)) + 16|0); HEAP32[$11>>2] = $10; _Widget_CalcPosition($0); return; } function _ThumbstickWidget_BuildMesh($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $2 = sp; $3 = ((($0)) + 4|0); $4 = HEAP32[$3>>2]|0; $5 = $4&65535; $6 = ((($2)) + 4|0); HEAP16[$6>>1] = $5; $7 = ((($0)) + 12|0); $8 = HEAP32[$7>>2]|0; $9 = $8&65535; $10 = ((($2)) + 8|0); HEAP16[$10>>1] = $9; $11 = ((($0)) + 16|0); $12 = HEAP32[$11>>2]|0; $13 = (($12|0) / 2)&-1; $14 = $13&65535; $15 = ((($2)) + 10|0); HEAP16[$15>>1] = $14; $16 = ((($2)) + 12|0); HEAPF32[$16>>2] = 0.0; $17 = ((($2)) + 20|0); HEAPF32[$17>>2] = 1.0; $18 = ((($2)) + 16|0); HEAPF32[$18>>2] = 0.0; $19 = ((($2)) + 24|0); HEAPF32[$19>>2] = 0.5; _ThumbstickWidget_BuildGroup($0,$2,$1); HEAPF32[$18>>2] = 0.5; HEAPF32[$19>>2] = 1.0; _ThumbstickWidget_BuildGroup($0,$2,$1); STACKTOP = sp;return; } function _ThumbstickWidget_Render2($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (_ThumbstickWidget_CalcDirs($0)|0); $3 = HEAP32[(1803556)>>2]|0; $4 = ($3|0)==(0); if ($4) { $24 = (($1) + 32)|0; return ($24|0); } _Gfx_BindTexture($3); $5 = $2 << 4; $6 = $5 & 16; $7 = $6 ^ 16; $8 = (($7) + ($1))|0; _Gfx_DrawVb_IndexedTris_Range(4,$8); $9 = $2 << 3; $10 = $9 & 16; $11 = $10 ^ 16; $12 = (($1) + 4)|0; $13 = (($12) + ($11))|0; _Gfx_DrawVb_IndexedTris_Range(4,$13); $14 = $2 << 2; $15 = $14 & 16; $16 = $15 ^ 16; $17 = (($1) + 8)|0; $18 = (($17) + ($16))|0; _Gfx_DrawVb_IndexedTris_Range(4,$18); $19 = $2 << 1; $20 = $19 & 16; $21 = $20 ^ 16; $22 = (($1) + 12)|0; $23 = (($22) + ($21))|0; _Gfx_DrawVb_IndexedTris_Range(4,$23); $24 = (($1) + 32)|0; return ($24|0); } function _ThumbstickWidget_CalcDirs($0) { $0 = $0|0; var $$04048 = 0, $$049 = 0, $$2 = 0, $$4 = 0, $$neg43 = 0, $$neg44 = 0, $$neg46 = 0, $$neg47 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; var $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $spec$select = 0, $spec$select41 = 0, $spec$select42 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ((($0)) + 20|0); $2 = ((($0)) + 4|0); $3 = ((($0)) + 12|0); $4 = ((($0)) + 8|0); $5 = ((($0)) + 16|0); $$04048 = 0;$$049 = 0; while(1) { $6 = HEAP8[$1>>0]|0; $7 = $6&255; $8 = 1 << $$049; $9 = $8 & $7; $10 = ($9|0)==(0); if ($10) { $$4 = $$04048; } else { $11 = (390496 + ($$049<<3)|0); $12 = HEAP32[$11>>2]|0; $13 = HEAP32[$2>>2]|0; $14 = HEAP32[$3>>2]|0; $$neg43 = (($14|0) / -2)&-1; $$neg44 = (($12) - ($13))|0; $15 = (($$neg44) + ($$neg43))|0; $16 = (((390496 + ($$049<<3)|0)) + 4|0); $17 = HEAP32[$16>>2]|0; $18 = HEAP32[$4>>2]|0; $19 = HEAP32[$5>>2]|0; $$neg46 = (($19|0) / -2)&-1; $$neg47 = (($17) - ($18))|0; $20 = (($$neg47) + ($$neg46))|0; $21 = (+($15|0)); $22 = (+($20|0)); $23 = (+_Math_Atan2($21,$22)); $24 = $23 * 57.2957763671875; $25 = $24 >= 30.0; $26 = $24 <= 150.0; $or$cond = $25 & $26; $27 = $or$cond&1; $spec$select = $$04048 | $27; $28 = $24 >= -60.0; $29 = $24 <= 60.0; $or$cond3 = $28 & $29; $30 = $spec$select | 4; $$2 = $or$cond3 ? $30 : $spec$select; $31 = $24 >= -150.0; $32 = $24 <= -30.0; $or$cond5 = $31 & $32; $33 = $$2 | 2; $spec$select41 = $or$cond5 ? $33 : $$2; $34 = $24 < -120.0; $35 = $24 > 120.0; $or$cond7 = $34 | $35; $36 = $spec$select41 | 8; $spec$select42 = $or$cond7 ? $36 : $spec$select41; $$4 = $spec$select42; } $37 = (($$049) + 1)|0; $exitcond = ($37|0)==(32); if ($exitcond) { break; } else { $$04048 = $$4;$$049 = $37; } } return ($$4|0); } function _ThumbstickWidget_BuildGroup($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; $3 = ((($0)) + 8|0); $4 = HEAP32[$3>>2]|0; $5 = ((($0)) + 16|0); $6 = HEAP32[$5>>2]|0; $7 = (($6|0) / 2)&-1; $8 = (($7) + ($4))|0; $9 = $8&65535; $10 = ((($1)) + 6|0); HEAP16[$10>>1] = $9; _Gfx_Make2DQuad($1,-1,$2); $11 = HEAP32[$3>>2]|0; $12 = $11&65535; HEAP16[$10>>1] = $12; $13 = ((($1)) + 16|0); $14 = HEAP32[$13>>2]|0; $15 = ((($1)) + 24|0); $16 = HEAP32[$15>>2]|0; HEAP32[$13>>2] = $16; HEAP32[$15>>2] = $14; _Gfx_Make2DQuad($1,-1,$2); _Gfx_Make2DQuad($1,-1,$2); $17 = ((($0)) + 12|0); $18 = HEAP32[$17>>2]|0; _ThumbstickWidget_Rotate($0,$2,$18); $19 = HEAP32[$13>>2]|0; $20 = HEAP32[$15>>2]|0; HEAP32[$13>>2] = $20; HEAP32[$15>>2] = $19; _Gfx_Make2DQuad($1,-1,$2); $21 = HEAP32[$17>>2]|0; $22 = (($21|0) / 2)&-1; _ThumbstickWidget_Rotate($0,$2,$22); return; } function _ThumbstickWidget_Rotate($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0.0; var $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0; var $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0.0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[$1>>2]|0; $4 = ((($0)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = (+($5|0)); $7 = ((($0)) + 8|0); $8 = HEAP32[$7>>2]|0; $9 = (+($8|0)); $10 = (($5) + ($2))|0; $11 = ((($3)) + -96|0); $12 = +HEAPF32[$11>>2]; $13 = $12 - $6; $14 = (~~(($13))); $15 = ((($3)) + -92|0); $16 = +HEAPF32[$15>>2]; $17 = $16 - $9; $18 = (~~(($17))); $19 = (($10) - ($18))|0; $20 = (+($19|0)); HEAPF32[$11>>2] = $20; $21 = (($8) + ($14))|0; $22 = (+($21|0)); HEAPF32[$15>>2] = $22; $23 = ((($3)) + -72|0); $24 = +HEAPF32[$23>>2]; $25 = $24 - $6; $26 = (~~(($25))); $27 = ((($3)) + -68|0); $28 = +HEAPF32[$27>>2]; $29 = $28 - $9; $30 = (~~(($29))); $31 = (($10) - ($30))|0; $32 = (+($31|0)); HEAPF32[$23>>2] = $32; $33 = (($8) + ($26))|0; $34 = (+($33|0)); HEAPF32[$27>>2] = $34; $35 = ((($3)) + -48|0); $36 = +HEAPF32[$35>>2]; $37 = $36 - $6; $38 = (~~(($37))); $39 = ((($3)) + -44|0); $40 = +HEAPF32[$39>>2]; $41 = $40 - $9; $42 = (~~(($41))); $43 = (($10) - ($42))|0; $44 = (+($43|0)); HEAPF32[$35>>2] = $44; $45 = (($8) + ($38))|0; $46 = (+($45|0)); HEAPF32[$39>>2] = $46; $47 = ((($3)) + -24|0); $48 = +HEAPF32[$47>>2]; $49 = $48 - $6; $50 = (~~(($49))); $51 = ((($3)) + -20|0); $52 = +HEAPF32[$51>>2]; $53 = $52 - $9; $54 = (~~(($53))); $55 = (($10) - ($54))|0; $56 = (+($55|0)); HEAPF32[$47>>2] = $56; $57 = (($8) + ($50))|0; $58 = (+($57|0)); HEAPF32[$51>>2] = $58; return; } function _ThumbstickWidget_GetMovement($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_ThumbstickWidget_CalcDirs($0)|0); $4 = $3 & 8; $5 = ($4|0)==(0); if (!($5)) { $6 = +HEAPF32[$1>>2]; $7 = $6 + -1.0; HEAPF32[$1>>2] = $7; } $8 = $3 & 4; $9 = ($8|0)==(0); if (!($9)) { $10 = +HEAPF32[$1>>2]; $11 = $10 + 1.0; HEAPF32[$1>>2] = $11; } $12 = $3 & 2; $13 = ($12|0)==(0); if (!($13)) { $14 = +HEAPF32[$2>>2]; $15 = $14 + -1.0; HEAPF32[$2>>2] = $15; } $16 = $3 & 1; $17 = ($16|0)==(0); if ($17) { return; } $18 = +HEAPF32[$2>>2]; $19 = $18 + 1.0; HEAPF32[$2>>2] = $19; return; } function _Window_GotClipboardText($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; _Window_StoreClipboardText($0); _Event_RaiseInput((1800028),1002,0); return; } function _Window_OnFileUploaded($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $1 = sp + 264|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 260; $5 = (_String_Length($0)|0); _String_AppendUtf8($1,$0,$5); $6 = HEAP32[493034]|0; FUNCTION_TABLE_vi[$6 & 511]($1); HEAP32[493034] = 0; STACKTOP = sp;return; } function _Window_OnTextChanged($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 816|0; $1 = sp + 800|0; $2 = sp; HEAP32[$1>>2] = $2; $3 = ((($1)) + 4|0); HEAP16[$3>>1] = 0; $4 = ((($1)) + 6|0); HEAP16[$4>>1] = 800; $5 = (_String_CalcLen($0,3200)|0); _String_AppendUtf8($1,$0,$5); _Event_RaiseString((1800808),$1); STACKTOP = sp;return; } function _Window_RequestClipboardText() { var label = 0, sp = 0; sp = STACKTOP; _Event_RaiseInput((1800028),1001,0); return; } function _Window_StoreClipboardText($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[493032] = 1084352; HEAP16[(1972132)>>1] = 0; HEAP16[(1972134)>>1] = 512; $1 = (_String_CalcLen($0,2048)|0); _String_AppendUtf8(1972128,$0,$1); return; } function _Display_ScaleX($0) { $0 = $0|0; var $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (+($0|0)); $2 = +HEAPF32[(1972084)>>2]; $3 = $2 * $1; $4 = (~~(($3))); return ($4|0); } function _Display_ScaleY($0) { $0 = $0|0; var $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (+($0|0)); $2 = +HEAPF32[(1972088)>>2]; $3 = $2 * $1; $4 = (~~(($3))); return ($4|0); } function _Window_ShowDialog($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP8[1972875]|0; $3 = ($2<<24>>24)==(0); if ($3) { _ShowDialogCore($0,$1); return; } else { _Window_DisableRawMouse(); _ShowDialogCore($0,$1); _Window_EnableRawMouse(); return; } } function _Window_DisableRawMouse() { var label = 0, sp = 0; sp = STACKTOP; _RegrabMouse(); (_emscripten_exit_pointerlock()|0); HEAP8[1972875] = 0; return; } function _ShowDialogCore($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _interop_ShowDialog(($0|0),($1|0)); return; } function _Window_EnableRawMouse() { var label = 0, sp = 0; sp = STACKTOP; _RegrabMouse(); HEAP8[1972875] = 1; return; } function _RegrabMouse() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[(1972125)>>0]|0; $1 = ($0<<24>>24)!=(0); $2 = HEAP8[(1972124)>>0]|0; $3 = ($2<<24>>24)!=(0); $or$cond = $1 & $3; if (!($or$cond)) { return; } _CentreMousePosition(); return; } function _CentreMousePosition() { var label = 0, sp = 0; sp = STACKTOP; _Cursor_GetRawPos(); return; } function _Cursor_GetRawPos() { var label = 0, sp = 0; sp = STACKTOP; return; } function _OpenKeyboardArgs_Init($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[$0>>2] = $1; $3 = ((($0)) + 4|0); HEAP32[$3>>2] = $2; $4 = ((($0)) + 8|0); HEAP32[$4>>2] = 1972899; $5 = ((($0)) + 12|0); HEAP8[$5>>0] = 0; return; } function _Window_Init() { var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; _emscripten_set_main_loop((86|0),0,0); $0 = (_GetScreenWidth()|0); HEAP32[(1972100)>>2] = $0; $1 = (_GetScreenHeight()|0); HEAP32[(1972104)>>2] = $1; HEAP32[493020] = 24; $2 = (+_emscripten_get_device_pixel_ratio()); $3 = $2; HEAPF32[(1972084)>>2] = $3; HEAPF32[(1972088)>>2] = $3; _interop_AddClipboardListeners(); $4 = (_interop_IsAndroid()|0); $5 = (_interop_IsIOS()|0); $6 = ($5|0)==(0); $7 = $5 | $4; $8 = ($7|0)!=(0); $9 = $8&1; _Input_SetTouchMode($9); $10 = $6 ? 1 : 2; HEAP8[(1972126)>>0] = $10; $11 = HEAP8[1972870]|0; $12 = ($11<<24>>24)==(0); if ($12) { return; } _interop_ForceTouchPageLayout(); return; } function _GetScreenWidth() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_interop_ScreenWidth()|0); $1 = (_RawDpiScale($0)|0); return ($1|0); } function _GetScreenHeight() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_interop_ScreenHeight()|0); $1 = (_RawDpiScale($0)|0); return ($1|0); } function _RawDpiScale($0) { $0 = $0|0; var $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (+($0|0)); $2 = (+_emscripten_get_device_pixel_ratio()); $3 = $2 * $1; $4 = (~~(($3))); return ($4|0); } function _DoCreateWindow() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[(1972124)>>0] = 1; HEAP8[(1972125)>>0] = 1; _HookEvents(); $0 = (_interop_CanvasWidth()|0); HEAP32[(1972116)>>2] = $0; $1 = (_interop_CanvasHeight()|0); HEAP32[(1972120)>>2] = $1; _interop_InitContainer(); return; } function _HookEvents() { var label = 0, sp = 0; sp = STACKTOP; (_emscripten_set_wheel_callback_on_thread(((2)|0),(0|0),0,(2|0),((2)|0))|0); (_emscripten_set_mousedown_callback_on_thread((45504|0),(0|0),0,(3|0),((2)|0))|0); (_emscripten_set_mouseup_callback_on_thread((45504|0),(0|0),0,(3|0),((2)|0))|0); (_emscripten_set_mousemove_callback_on_thread((45504|0),(0|0),0,(4|0),((2)|0))|0); (_emscripten_set_fullscreenchange_callback_on_thread((45504|0),(0|0),0,(5|0),((2)|0))|0); (_emscripten_set_focus_callback_on_thread(((2)|0),(0|0),0,(6|0),((2)|0))|0); (_emscripten_set_blur_callback_on_thread(((2)|0),(0|0),0,(6|0),((2)|0))|0); (_emscripten_set_resize_callback_on_thread(((2)|0),(0|0),0,(7|0),((2)|0))|0); (_emscripten_set_beforeunload_callback_on_thread((0|0),(8|0),((1)|0))|0); (_emscripten_set_visibilitychange_callback_on_thread((0|0),0,(9|0),((2)|0))|0); (_emscripten_set_keydown_callback_on_thread(((2)|0),(0|0),0,(10|0),((2)|0))|0); (_emscripten_set_keyup_callback_on_thread(((2)|0),(0|0),0,(11|0),((2)|0))|0); (_emscripten_set_keypress_callback_on_thread(((2)|0),(0|0),0,(12|0),((2)|0))|0); (_emscripten_set_touchstart_callback_on_thread(((2)|0),(0|0),0,(13|0),((2)|0))|0); (_emscripten_set_touchmove_callback_on_thread(((2)|0),(0|0),0,(14|0),((2)|0))|0); (_emscripten_set_touchend_callback_on_thread(((2)|0),(0|0),0,(15|0),((2)|0))|0); (_emscripten_set_touchcancel_callback_on_thread(((2)|0),(0|0),0,(15|0),((2)|0))|0); return; } function _OnMouseWheel_2313($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($1)) + 80|0); $4 = +HEAPF64[$3>>3]; $5 = $4; $6 = (_Math_Sign($5)|0); $7 = (0 - ($6))|0; $8 = (+($7|0)); _Mouse_ScrollWheel($8); _DeferredEnableRawMouse(); return 1; } function _OnMouseButton($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($0|0)==(5); $4 = ((($1)) + 40|0); $5 = HEAP16[$4>>1]|0; switch ($5<<16>>16) { case 0: { $6 = $3&1; _Input_Set(119,$6); break; } case 1: { $7 = $3&1; _Input_Set(121,$7); break; } case 2: { $8 = $3&1; _Input_Set(120,$8); break; } case 3: { $9 = $3&1; _Input_Set(117,$9); break; } case 4: { $10 = $3&1; _Input_Set(118,$10); break; } default: { } } _DeferredEnableRawMouse(); return 1; } function _OnMouseMove($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp + 4|0; $4 = sp; $5 = ((($1)) + 42|0); $6 = HEAP16[$5>>1]|0; $7 = $6&65535; $8 = $7 & 1; _Input_SetNonRepeatable(119,$8); $9 = $7 & 2; _Input_SetNonRepeatable(120,$9); $10 = $7 & 4; _Input_SetNonRepeatable(121,$10); $11 = ((($1)) + 52|0); $12 = HEAP32[$11>>2]|0; HEAP32[$3>>2] = $12; $13 = ((($1)) + 56|0); $14 = HEAP32[$13>>2]|0; HEAP32[$4>>2] = $14; _RescaleXY($3,$4); $15 = HEAP32[$3>>2]|0; $16 = HEAP32[$4>>2]|0; _Pointer_SetPosition(0,$15,$16); $17 = HEAP8[1972875]|0; $18 = ($17<<24>>24)==(0); if ($18) { STACKTOP = sp;return 1; } $19 = ((($1)) + 44|0); $20 = HEAP32[$19>>2]|0; $21 = (+($20|0)); $22 = ((($1)) + 48|0); $23 = HEAP32[$22>>2]|0; $24 = (+($23|0)); _Event_RaiseRawMove((1801848),$21,$24); STACKTOP = sp;return 1; } function _OnFullscreenChange($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _UpdateWindowBounds(); HEAP8[1972901] = 1; return 0; } function _OnFocus($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($0|0)==(13); $4 = $3&1; HEAP8[(1972125)>>0] = $4; _Event_RaiseVoid((1798468)); return 1; } function _OnResize_2315($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _UpdateWindowBounds(); HEAP8[1972901] = 1; return 1; } if (CCModule && !CCModule.OnResize) { CCModule.OnResize = _OnResize_2315; } function _OnBeforeUnload($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_Game_ShouldClose()|0); $4 = ($3<<24>>24)==(0); if ($4) { (_emscripten_exit_pointerlock()|0); $$0 = 45512; return ($$0|0); } else { _Window_Close(); $$0 = 0; return ($$0|0); } } function _OnVisibilityChanged_2316($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($1)) + 4|0); $4 = HEAP32[$3>>2]|0; $5 = ($4|0)==(0); $6 = HEAP8[(1972127)>>0]|0; $7 = $6&255; $8 = $5&1; $9 = ($7|0)==($8|0); if ($9) { return 0; } $10 = $5&1; HEAP8[(1972127)>>0] = $10; _Event_RaiseVoid((1799248)); return 0; } function _OnKeyDown($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $$0$shrunk = 0, $$off = 0, $$off26 = 0, $$off27 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, $or$cond = 0, $or$cond30 = 0, $or$cond38 = 0, $or$cond40 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($1)) + 156|0); $4 = HEAP32[$3>>2]|0; $5 = ((($1)) + 64|0); $6 = HEAP32[$5>>2]|0; $7 = (_MapNativeKey($4,$6)|0); $8 = ($7|0)!=(94); $9 = HEAP8[1972870]|0; $10 = ($9<<24>>24)==(0); $or$cond = $8 | $10; $11 = HEAP8[1972900]|0; $12 = ($11<<24>>24)==(0); $or$cond30 = $or$cond | $12; if (!($or$cond30)) { $$0$shrunk = 0; $$0 = $$0$shrunk&1; return ($$0|0); } $13 = ($7|0)==(0); if ($13) { _DeferredEnableRawMouse(); $$0$shrunk = 0; $$0 = $$0$shrunk&1; return ($$0|0); } _Input_SetPressed($7); _DeferredEnableRawMouse(); $14 = HEAP8[(390408)>>0]|0; $15 = HEAP8[(390409)>>0]|0; $16 = $15 | $14; $17 = ($16<<24>>24)==(0); if (!($17)) { $$0$shrunk = 1; $$0 = $$0$shrunk&1; return ($$0|0); } $18 = HEAP8[(390410)>>0]|0; $19 = HEAP8[(390411)>>0]|0; $20 = $19 | $18; $21 = ($20<<24>>24)==(0); if (!($21)) { $22 = ($7|0)!=(67); $23 = ($7|0)!=(86); $24 = $22 & $23; $$0$shrunk = $24; $$0 = $$0$shrunk&1; return ($$0|0); } $25 = HEAP8[(390406)>>0]|0; $26 = HEAP8[(390407)>>0]|0; $27 = $26 | $25; $28 = ($27<<24>>24)==(0); if (!($28)) { $29 = ($7|0)!=(67); $30 = ($7|0)!=(86); $31 = $29 & $30; $$0$shrunk = $31; $$0 = $$0$shrunk&1; return ($$0|0); } $32 = ($7|0)==(93); if ($32) { $33 = HEAP8[1972900]|0; $34 = ($33<<24>>24)==(0); $$0$shrunk = $34; $$0 = $$0$shrunk&1; return ($$0|0); } else { $$off = (($7) + -1)|0; $35 = ($$off>>>0)<(24); $36 = $7 & -4; $37 = ($36|0)==(44); $or$cond38 = $35 | $37; $$off26 = (($7) + -58)|0; $38 = ($$off26>>>0)<(7); $or$cond40 = $38 | $or$cond38; $$off27 = (($7) + -91)|0; $39 = ($$off27>>>0)<(10); $spec$select = $39 | $or$cond40; $$0$shrunk = $spec$select; $$0 = $$0$shrunk&1; return ($$0|0); } } function _OnKeyUp($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ((($1)) + 156|0); $4 = HEAP32[$3>>2]|0; $5 = ((($1)) + 64|0); $6 = HEAP32[$5>>2]|0; $7 = (_MapNativeKey($4,$6)|0); $8 = ($7|0)!=(0); if ($8) { _Input_SetReleased($7); } _DeferredEnableRawMouse(); $9 = $8&1; return ($9|0); } function _OnKeyPress_2317($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; _DeferredEnableRawMouse(); $3 = HEAP8[1972870]|0; $4 = ($3<<24>>24)==(0); $5 = HEAP8[1972900]|0; $6 = ($5<<24>>24)==(0); $or$cond = $4 | $6; if (!($or$cond)) { $$0 = 0; return ($$0|0); } $7 = ((($1)) + 80|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(0); if (!($9)) { $$0 = 0; return ($$0|0); } $10 = ((($1)) + 152|0); $11 = HEAP32[$10>>2]|0; _Event_RaiseInt(1799768,$11); $$0 = 1; return ($$0|0); } function _OnTouchStart($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$011 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp + 4|0; $4 = sp; $5 = HEAP8[(1972125)>>0]|0; $6 = ($5<<24>>24)==(0); if ($6) { HEAP8[(1972125)>>0] = 1; _Event_RaiseVoid((1798468)); } $7 = HEAP32[$1>>2]|0; $8 = ($7|0)>(0); if (!($8)) { STACKTOP = sp;return 1; } $$011 = 0; while(1) { $9 = (((((($1)) + 20|0) + (($$011*52)|0)|0)) + 28|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0); if (!($11)) { $12 = (((((($1)) + 20|0) + (($$011*52)|0)|0)) + 36|0); $13 = HEAP32[$12>>2]|0; HEAP32[$3>>2] = $13; $14 = (((((($1)) + 20|0) + (($$011*52)|0)|0)) + 40|0); $15 = HEAP32[$14>>2]|0; HEAP32[$4>>2] = $15; _interop_AdjustXY(($3|0),($4|0)); _RescaleXY($3,$4); $16 = (((($1)) + 20|0) + (($$011*52)|0)|0); $17 = HEAP32[$16>>2]|0; $18 = HEAP32[$3>>2]|0; $19 = HEAP32[$4>>2]|0; _Input_AddTouch($17,$18,$19); } $20 = (($$011) + 1)|0; $21 = HEAP32[$1>>2]|0; $22 = ($20|0)<($21|0); if ($22) { $$011 = $20; } else { break; } } STACKTOP = sp;return 1; } function _OnTouchMove($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$011 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp + 4|0; $4 = sp; $5 = HEAP32[$1>>2]|0; $6 = ($5|0)>(0); if (!($6)) { STACKTOP = sp;return 1; } $$011 = 0; while(1) { $7 = (((((($1)) + 20|0) + (($$011*52)|0)|0)) + 28|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(0); if (!($9)) { $10 = (((((($1)) + 20|0) + (($$011*52)|0)|0)) + 36|0); $11 = HEAP32[$10>>2]|0; HEAP32[$3>>2] = $11; $12 = (((((($1)) + 20|0) + (($$011*52)|0)|0)) + 40|0); $13 = HEAP32[$12>>2]|0; HEAP32[$4>>2] = $13; _interop_AdjustXY(($3|0),($4|0)); _RescaleXY($3,$4); $14 = (((($1)) + 20|0) + (($$011*52)|0)|0); $15 = HEAP32[$14>>2]|0; $16 = HEAP32[$3>>2]|0; $17 = HEAP32[$4>>2]|0; _Input_UpdateTouch($15,$16,$17); } $18 = (($$011) + 1)|0; $19 = HEAP32[$1>>2]|0; $20 = ($18|0)<($19|0); if ($20) { $$011 = $18; } else { break; } } STACKTOP = sp;return 1; } function _OnTouchEnd($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$011 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; var $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $3 = sp + 4|0; $4 = sp; $5 = HEAP32[$1>>2]|0; $6 = ($5|0)>(0); if (!($6)) { $21 = HEAP8[1972900]|0; $22 = $21 ^ 1; $23 = $22&255; STACKTOP = sp;return ($23|0); } $$011 = 0; while(1) { $7 = (((((($1)) + 20|0) + (($$011*52)|0)|0)) + 28|0); $8 = HEAP32[$7>>2]|0; $9 = ($8|0)==(0); if (!($9)) { $10 = (((((($1)) + 20|0) + (($$011*52)|0)|0)) + 36|0); $11 = HEAP32[$10>>2]|0; HEAP32[$3>>2] = $11; $12 = (((((($1)) + 20|0) + (($$011*52)|0)|0)) + 40|0); $13 = HEAP32[$12>>2]|0; HEAP32[$4>>2] = $13; _interop_AdjustXY(($3|0),($4|0)); _RescaleXY($3,$4); $14 = (((($1)) + 20|0) + (($$011*52)|0)|0); $15 = HEAP32[$14>>2]|0; $16 = HEAP32[$3>>2]|0; $17 = HEAP32[$4>>2]|0; _Input_RemoveTouch($15,$16,$17); } $18 = (($$011) + 1)|0; $19 = HEAP32[$1>>2]|0; $20 = ($18|0)<($19|0); if ($20) { $$011 = $18; } else { break; } } $21 = HEAP8[1972900]|0; $22 = $21 ^ 1; $23 = $22&255; STACKTOP = sp;return ($23|0); } function _RescaleXY($0,$1) { $0 = $0|0; $1 = $1|0; var $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0; var sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $2 = sp + 8|0; $3 = sp; (_emscripten_get_element_css_size((45504|0),($2|0),($3|0))|0); $4 = +HEAPF64[$2>>3]; $5 = $4 != 0.0; $6 = +HEAPF64[$3>>3]; $7 = $6 != 0.0; $or$cond = $5 & $7; if (!($or$cond)) { STACKTOP = sp;return; } $8 = HEAP32[$0>>2]|0; $9 = HEAP32[(1972116)>>2]|0; $10 = Math_imul($9, $8)|0; $11 = (+($10|0)); $12 = $11 / $4; $13 = (~~(($12))); HEAP32[$0>>2] = $13; $14 = HEAP32[$1>>2]|0; $15 = HEAP32[(1972120)>>2]|0; $16 = Math_imul($15, $14)|0; $17 = (+($16|0)); $18 = $17 / $6; $19 = (~~(($18))); HEAP32[$1>>2] = $19; STACKTOP = sp;return; } function _DeferredEnableRawMouse() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $0 = sp; $1 = HEAP8[1972875]|0; $2 = ($1<<24>>24)==(0); if ($2) { STACKTOP = sp;return; } HEAP32[$0>>2] = 0; (_emscripten_get_pointerlock_status(($0|0))|0); $3 = HEAP32[$0>>2]|0; $4 = ($3|0)==(0); if (!($4)) { STACKTOP = sp;return; } (_emscripten_request_pointerlock((45504|0),0)|0); STACKTOP = sp;return; } function _MapNativeKey($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $$off = 0, $$off22 = 0, $$off23 = 0, $$off24 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $$off = (($0) + -48)|0; $2 = ($$off>>>0)<(10); $$off22 = (($0) + -65)|0; $3 = ($$off22>>>0)<(26); $or$cond = $2 | $3; L1: do { if ($or$cond) { $$0 = $0; } else { $$off23 = (($0) + -112)|0; $4 = ($$off23>>>0)<(24); if ($4) { $5 = (($0) + -111)|0; $$0 = $5; break; } $$off24 = (($0) + -96)|0; $6 = ($$off24>>>0)<(10); if ($6) { $7 = (($0) + 5)|0; $$0 = $7; break; } do { switch ($0|0) { case 8: { $$0 = 94; break L1; } case 9: { $$0 = 95; break L1; } case 13: { $8 = ($1|0)==(3); $9 = $8 ? 116 : 91; $$0 = $9; break L1; } case 16: { $10 = ($1|0)==(2); $11 = $10 ? 37 : 36; $$0 = $11; break L1; } case 17: { $12 = ($1|0)==(2); $13 = $12 ? 39 : 38; $$0 = $13; break L1; } case 18: { $14 = ($1|0)==(2); $15 = $14 ? 41 : 40; $$0 = $15; break L1; } case 19: { $$0 = 99; break L1; } case 20: { $$0 = 96; break L1; } case 27: { $$0 = 92; break L1; } case 32: { $$0 = 93; break L1; } case 33: { $$0 = 62; break L1; } case 34: { $$0 = 63; break L1; } case 35: { $$0 = 61; break L1; } case 36: { $$0 = 60; break L1; } case 37: { $$0 = 46; break L1; } case 38: { $$0 = 44; break L1; } case 39: { $$0 = 47; break L1; } case 40: { $$0 = 45; break L1; } case 44: { $$0 = 98; break L1; } case 45: { $$0 = 58; break L1; } case 46: { $$0 = 59; break L1; } case 59: { $$0 = 31; break L1; } case 61: { $$0 = 27; break L1; } case 91: { $16 = ($1|0)==(2); $17 = $16 ? 43 : 42; $$0 = $17; break L1; } case 106: { $$0 = 112; break L1; } case 107: { $$0 = 114; break L1; } case 109: { $$0 = 113; break L1; } case 110: { $$0 = 115; break L1; } case 111: { $$0 = 111; break L1; } case 144: { $$0 = 100; break L1; } case 145: { $$0 = 97; break L1; } case 173: { $$0 = 26; break L1; } case 188: { $$0 = 33; break L1; } case 190: { $$0 = 34; break L1; } case 191: { $$0 = 30; break L1; } case 192: { $$0 = 25; break L1; } case 219: { $$0 = 28; break L1; } case 220: { $$0 = 35; break L1; } case 221: { $$0 = 29; break L1; } case 222: { $$0 = 32; break L1; } case 186: { $$0 = 31; break L1; } case 187: { $$0 = 27; break L1; } case 189: { $$0 = 26; break L1; } default: { $$0 = 0; break L1; } } } while(0); } } while(0); return ($$0|0); } function _Window_Close() { var label = 0, sp = 0; sp = STACKTOP; HEAP8[(1972124)>>0] = 0; _Event_RaiseVoid((1798208)); (_Window_ExitFullscreen()|0); _Window_SetSize(0,0); _UnhookEvents(); _emscripten_cancel_main_loop(); return; } function _Window_ExitFullscreen() { var label = 0, sp = 0; sp = STACKTOP; (_emscripten_exit_fullscreen()|0); _UpdateWindowBounds(); return 0; } function _Window_SetSize($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; (_emscripten_set_canvas_element_size((45504|0),($0|0),($1|0))|0); $2 = (+($0|0)); $3 = +HEAPF32[(1972084)>>2]; $4 = $2 / $3; $5 = $4; $6 = (+($1|0)); $7 = +HEAPF32[(1972088)>>2]; $8 = $6 / $7; $9 = $8; (_emscripten_set_element_css_size((45504|0),(+$5),(+$9))|0); _UpdateWindowBounds(); return; } function _UnhookEvents() { var label = 0, sp = 0; sp = STACKTOP; (_emscripten_set_wheel_callback_on_thread(((2)|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_mousedown_callback_on_thread((45504|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_mouseup_callback_on_thread((45504|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_mousemove_callback_on_thread((45504|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_focus_callback_on_thread(((2)|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_blur_callback_on_thread(((2)|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_resize_callback_on_thread(((2)|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_beforeunload_callback_on_thread((0|0),(0|0),((1)|0))|0); (_emscripten_set_visibilitychange_callback_on_thread((0|0),0,(0|0),((2)|0))|0); (_emscripten_set_keydown_callback_on_thread(((2)|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_keyup_callback_on_thread(((2)|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_keypress_callback_on_thread(((2)|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_touchstart_callback_on_thread(((2)|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_touchmove_callback_on_thread(((2)|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_touchend_callback_on_thread(((2)|0),(0|0),0,(0|0),((2)|0))|0); (_emscripten_set_touchcancel_callback_on_thread(((2)|0),(0|0),0,(0|0),((2)|0))|0); return; } function _UpdateWindowBounds() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_interop_CanvasWidth()|0); $1 = (_interop_CanvasHeight()|0); $2 = HEAP32[(1972116)>>2]|0; $3 = ($0|0)==($2|0); $4 = HEAP32[(1972120)>>2]|0; $5 = ($1|0)==($4|0); $or$cond = $3 & $5; if ($or$cond) { return; } HEAP32[(1972116)>>2] = $0; HEAP32[(1972120)>>2] = $1; _Event_RaiseVoid((1797948)); return; } function _Window_Create3D($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; _DoCreateWindow(); return; } function _Window_SetTitle($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 608|0; $1 = sp; (_Platform_EncodeUtf8($1,$0)|0); _interop_SetPageTitle(($1|0)); STACKTOP = sp;return; } function _Clipboard_GetText($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; _interop_TryGetClipboardText(); $1 = HEAP8[1972870]|0; $2 = ($1<<24>>24)==(0); $3 = HEAP8[1972900]|0; $4 = ($3<<24>>24)==(0); $or$cond = $2 | $4; if (!($or$cond)) { HEAP16[(1972132)>>1] = 0; } _String_Copy($0,1972128); HEAP16[(1972132)>>1] = 0; return; } function _Clipboard_SetText($0) { $0 = $0|0; var $1 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 608|0; $1 = sp; (_Platform_EncodeUtf8($1,$0)|0); _interop_TrySetClipboardText(($1|0)); STACKTOP = sp;return; } function _Window_GetWindowState() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 288|0; $0 = sp; _memset(($0|0),0,280)|0; (_emscripten_get_fullscreen_status(($0|0))|0); $1 = HEAP32[$0>>2]|0; $2 = ($1|0)!=(0); $3 = $2&1; STACKTOP = sp;return ($3|0); } function _Window_EnterFullscreen() { var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$store$select = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $0 = sp; HEAP32[$0>>2] = 1; $1 = ((($0)) + 4|0); HEAP32[$1>>2] = 2; $2 = ((($0)) + 8|0); HEAP32[$2>>2] = 0; $3 = ((($0)) + 12|0); HEAP32[$3>>2] = 16; $4 = ((($0)) + 16|0); HEAP32[$4>>2] = 0; $5 = (_interop_GetContainerID()|0); $6 = ($5|0)==(0); $7 = $6 ? 45504 : 45569; $8 = (_emscripten_request_fullscreen_strategy(($7|0),1,($0|0))|0); $9 = ($8|0)==(-1); $spec$store$select = $9 ? -857812990 : $8; $10 = ($spec$store$select|0)==(0); if (!($10)) { $$0 = $spec$store$select; STACKTOP = sp;return ($$0|0); } _interop_EnterFullscreen(); $$0 = 0; STACKTOP = sp;return ($$0|0); } function _OnCanvasResize($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _UpdateWindowBounds(); HEAP8[1972901] = 1; return 0; } function _Window_Show() { var label = 0, sp = 0; sp = STACKTOP; return; } function _Window_ProcessEvents() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP8[1972901]|0; $1 = ($0<<24>>24)==(0); if ($1) { return; } HEAP8[1972901] = 0; $2 = HEAP8[(1972124)>>0]|0; $3 = ($2<<24>>24)==(0); if ($3) { return; } $4 = (_Window_GetWindowState()|0); $5 = ($4|0)==(1); if ($5) { _SetFullscreenBounds(); } else { _interop_RequestCanvasResize(); } _UpdateWindowBounds(); return; } function _SetFullscreenBounds() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_GetScreenWidth()|0); $1 = (_GetScreenHeight()|0); (_emscripten_set_canvas_element_size((45504|0),($0|0),($1|0))|0); return; } function _Cursor_SetPosition($0,$1) { $0 = $0|0; $1 = $1|0; var label = 0, sp = 0; sp = STACKTOP; return; } function _Window_OpenFileDialog($0) { $0 = $0|0; var $$012 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 1040|0; $1 = sp + 1024|0; $2 = sp; $3 = ((($0)) + 4|0); $4 = HEAP32[$3>>2]|0; HEAP32[$1>>2] = $2; $5 = ((($1)) + 4|0); HEAP16[$5>>1] = 0; $6 = ((($1)) + 6|0); HEAP16[$6>>1] = 1023; $7 = HEAP32[$4>>2]|0; $8 = ($7|0)==(0|0); if (!($8)) { $$012 = 0;$11 = $4; while(1) { $9 = ($$012|0)==(0); if (!($9)) { _String_Append($1,44); } $10 = HEAP32[$11>>2]|0; _String_AppendConst($1,$10); $12 = (($$012) + 1)|0; $13 = (($4) + ($12<<2)|0); $14 = HEAP32[$13>>2]|0; $15 = ($14|0)==(0|0); if ($15) { break; } else { $$012 = $12;$11 = $13; } } } $16 = HEAP32[$1>>2]|0; $17 = HEAP16[$5>>1]|0; $18 = $17&65535; $19 = (($16) + ($18)|0); HEAP8[$19>>0] = 0; $20 = ((($0)) + 8|0); $21 = HEAP32[$20>>2]|0; HEAP32[493034] = $21; $22 = HEAP32[$1>>2]|0; $23 = ((($0)) + 12|0); $24 = HEAP32[$23>>2]|0; $25 = ((($0)) + 16|0); $26 = HEAP32[$25>>2]|0; _interop_OpenFileDialog(($22|0),($24|0),($26|0)); STACKTOP = sp;return 0; } function _Window_SaveFileDialog($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 272|0; $1 = sp + 264|0; $2 = sp; $3 = ((($0)) + 12|0); $4 = HEAP16[$3>>1]|0; $5 = ($4<<16>>16)==(0); if ($5) { $$0 = -857812980; STACKTOP = sp;return ($$0|0); } $6 = ((($0)) + 8|0); $7 = ((($0)) + 16|0); $8 = HEAP32[$7>>2]|0; HEAP32[493034] = $8; HEAP32[$1>>2] = $2; $9 = ((($1)) + 4|0); HEAP16[$9>>1] = 0; $10 = ((($1)) + 6|0); HEAP16[$10>>1] = 260; $11 = HEAP32[$0>>2]|0; $12 = HEAP32[$11>>2]|0; _String_Format2($1,45584,$6,$12); $13 = HEAP16[$9>>1]|0; $14 = $13&65535; $15 = (($2) + ($14)|0); HEAP8[$15>>0] = 0; $16 = HEAP32[$0>>2]|0; $17 = ((($0)) + 4|0); $18 = HEAP32[$17>>2]|0; $19 = (_interop_DownloadFile(($2|0),($16|0),($18|0))|0); $$0 = $19; STACKTOP = sp;return ($$0|0); } function _Window_OpenKeyboard($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 608|0; $1 = sp; HEAP8[1972900] = 1; $2 = HEAP8[1972870]|0; $3 = ($2<<24>>24)==(0); if ($3) { STACKTOP = sp;return; } $4 = HEAP32[$0>>2]|0; (_Platform_EncodeUtf8($1,$4)|0); _Platform_LogConst(45589); $5 = ((($0)) + 4|0); $6 = HEAP32[$5>>2]|0; $7 = ((($0)) + 8|0); $8 = HEAP32[$7>>2]|0; _interop_OpenKeyboard(($1|0),($6|0),($8|0)); $9 = ((($0)) + 12|0); HEAP8[$9>>0] = 1; STACKTOP = sp;return; } function _Window_SetKeyboardText($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 608|0; $1 = sp; $2 = HEAP8[1972870]|0; $3 = ($2<<24>>24)==(0); if ($3) { STACKTOP = sp;return; } (_Platform_EncodeUtf8($1,$0)|0); _interop_SetKeyboardText(($1|0)); STACKTOP = sp;return; } function _Window_CloseKeyboard() { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP8[1972900] = 0; $0 = HEAP8[1972870]|0; $1 = ($0<<24>>24)==(0); if ($1) { return; } _interop_CloseKeyboard(); return; } function _Window_UpdateRawMouse() { var label = 0, sp = 0; sp = STACKTOP; return; } function _GLContext_Create() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 64|0; $0 = sp; _emscripten_webgl_init_context_attributes(($0|0)); HEAP32[$0>>2] = 0; $1 = ((($0)) + 4|0); HEAP32[$1>>2] = 1; $2 = ((($0)) + 8|0); HEAP32[$2>>2] = 0; $3 = ((($0)) + 12|0); HEAP32[$3>>2] = 0; $4 = (_emscripten_webgl_create_context((45504|0),($0|0))|0); HEAP32[493035] = $4; $5 = ($4|0)==(0); if ($5) { _Window_ShowDialog(45601,45619); } $6 = HEAP32[493035]|0; (_emscripten_webgl_make_context_current(($6|0))|0); (_emscripten_set_webglcontextlost_callback_on_thread((45504|0),(0|0),0,(17|0),((2)|0))|0); STACKTOP = sp;return; } function _GLContext_OnLost($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var label = 0, sp = 0; sp = STACKTOP; _Gfx_LoseContext(45655); return 1; } function _GLContext_Update() { var label = 0, sp = 0; sp = STACKTOP; return; } function _GLContext_TryRestore() { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_emscripten_is_webgl_context_lost(0)|0); $1 = ($0|0)==(0); $2 = $1&1; return ($2|0); } function _GLContext_Free() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[493035]|0; (_emscripten_webgl_destroy_context(($0|0))|0); (_emscripten_set_webglcontextlost_callback_on_thread((45504|0),(0|0),0,(0|0),((2)|0))|0); return; } function _GLContext_SwapBuffers() { var label = 0, sp = 0; sp = STACKTOP; return 1; } function _GLContext_SetFpsLimit($0,$1) { $0 = $0|0; $1 = +$1; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($0<<24>>24)==(0); if ($2) { $3 = (~~(($1))); (_emscripten_set_main_loop_timing(0,($3|0))|0); return; } else { (_emscripten_set_main_loop_timing(1,1)|0); return; } } function _GLContext_GetApiInfo($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 608|0; $1 = sp; _interop_GetGpuRenderer(($1|0),600); $2 = (_String_CalcLen($1,600)|0); $3 = ($2|0)==(0); if ($3) { STACKTOP = sp;return; } _String_AppendConst($0,45674); _String_AppendUtf8($0,$1,$2); STACKTOP = sp;return; } function _World_Reset() { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[275888]|0; $1 = HEAP32[(1103556)>>2]|0; $2 = ($0|0)==($1|0); if (!($2)) { _Mem_Free($1); } HEAP32[(1103556)>>2] = 0; HEAP32[(1103608)>>2] = 255; $3 = HEAP32[275888]|0; _Mem_Free($3); HEAP32[275888] = 0; HEAP32[(1103624)>>2] = 1084864; HEAP16[(1103628)>>1] = 0; HEAP16[(1103630)>>1] = 64; _World_SetDimensions(0,0,0); HEAP8[(1103612)>>0] = 0; HEAPF64[(1103616)>>3] = -200.0; HEAP32[(1103648)>>2] = 0; _Env_Reset(); return; } function _World_SetDimensions($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; HEAP32[(1103564)>>2] = $0; HEAP32[(1103568)>>2] = $1; HEAP32[(1103572)>>2] = $2; $3 = Math_imul($2, $0)|0; $4 = Math_imul($3, $1)|0; HEAP32[(1103560)>>2] = $4; $5 = Math_imul($2, $0)|0; HEAP32[(1103588)>>2] = $5; $6 = (($0) + -1)|0; HEAP32[(1103576)>>2] = $6; $7 = (($1) + -1)|0; HEAP32[(1103580)>>2] = $7; $8 = (($2) + -1)|0; HEAP32[(1103584)>>2] = $8; $9 = (($0) + 15)|0; $10 = (4)?($9 >> 4):($9); HEAP32[(1103632)>>2] = $10; $11 = (($1) + 15)|0; $12 = (4)?($11 >> 4):($11); HEAP32[(1103636)>>2] = $12; $13 = (($2) + 15)|0; $14 = (4)?($13 >> 4):($13); HEAP32[(1103640)>>2] = $14; $15 = Math_imul($12, $10)|0; $16 = Math_imul($15, $14)|0; HEAP32[(1103644)>>2] = $16; return; } function _Env_Reset() { var label = 0, sp = 0; sp = STACKTOP; HEAP32[(1972148)>>2] = -1; HEAP32[(1972152)>>2] = -2; HEAP32[(1972156)>>2] = -1; HEAP16[986072] = 9; HEAP16[(1972146)>>1] = 7; HEAPF32[(1972160)>>2] = 1.0; HEAPF32[(1972164)>>2] = 1.0; HEAPF32[(1972168)>>2] = 1.0; HEAPF32[(1972180)>>2] = 0.0; HEAPF32[(1972184)>>2] = 0.0; HEAP32[(1972220)>>2] = -6579301; _PackedCol_GetShaded(-6579301,(1972224),(1972228),(1972232)); HEAP32[(1972204)>>2] = -1; _PackedCol_GetShaded(-1,(1972208),(1972212),(1972216)); HEAP32[(1972188)>>2] = -13159; HEAP32[(1972192)>>2] = -1; HEAP32[(1972196)>>2] = -1; HEAP32[(1972200)>>2] = -1; HEAP32[(1972172)>>2] = 0; HEAP32[(1972176)>>2] = 0; return; } function _World_NewMap() { var label = 0, sp = 0; sp = STACKTOP; _World_Reset(); _Event_RaiseVoid(1795608); return; } function _World_SetNewMap($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, $spec$select8 = 0, $spec$select9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = ($0|0)==(0|0); $spec$select = $4 ? 0 : $1; $spec$select8 = $4 ? 0 : $2; $spec$select9 = $4 ? 0 : $3; _World_SetDimensions($spec$select,$spec$select8,$spec$select9); HEAP32[275888] = $0; HEAP16[(1103628)>>1] = 0; $5 = HEAP32[(1103560)>>2]|0; $6 = ($5|0)==(0); if ($6) { HEAP32[275888] = 0; } $7 = HEAP32[(1103556)>>2]|0; $8 = ($7|0)==(0|0); if ($8) { $9 = HEAP32[275888]|0; HEAP32[(1103556)>>2] = $9; HEAP32[(1103608)>>2] = 255; } $10 = HEAP32[(1972148)>>2]|0; $11 = ($10|0)==(-1); if ($11) { $12 = (($spec$select8|0) / 2)&-1; HEAP32[(1972148)>>2] = $12; } $13 = HEAP32[(1972156)>>2]|0; $14 = ($13|0)==(-1); if (!($14)) { _GenerateNewUuid(); HEAP8[(1103612)>>0] = 1; _Event_RaiseVoid((1796128)); return; } $15 = (($spec$select8) + 2)|0; HEAP32[(1972156)>>2] = $15; _GenerateNewUuid(); HEAP8[(1103612)>>0] = 1; _Event_RaiseVoid((1796128)); return; } function _GenerateNewUuid() { var $$08 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $0 = sp; _Random_SeedFromCurrentTime($0); $1 = HEAP16[(14344)>>1]|0; $2 = ($1<<16>>16)==(0); if (!($2)) { $$08 = 0; while(1) { $3 = HEAP32[3585]|0; $4 = (($3) + ($$08)|0); $5 = HEAP8[$4>>0]|0; $6 = $5 << 24 >> 24; $7 = (($6) + 3)|0; (_Random_Next($0,$7)|0); $8 = (($$08) + 1)|0; $9 = HEAP16[(14344)>>1]|0; $10 = $9&65535; $11 = ($8>>>0)<($10>>>0); if ($11) { $$08 = $8; } else { break; } } } $12 = (_Random_Next($0,256)|0); $13 = $12&255; HEAP8[(1103592)>>0] = $13; $14 = (_Random_Next($0,256)|0); $15 = $14&255; HEAP8[(1103593)>>0] = $15; $16 = (_Random_Next($0,256)|0); $17 = $16&255; HEAP8[(1103594)>>0] = $17; $18 = (_Random_Next($0,256)|0); $19 = $18&255; HEAP8[(1103595)>>0] = $19; $20 = (_Random_Next($0,256)|0); $21 = $20&255; HEAP8[(1103596)>>0] = $21; $22 = (_Random_Next($0,256)|0); $23 = $22&255; HEAP8[(1103597)>>0] = $23; $24 = (_Random_Next($0,256)|0); $25 = $24&255; HEAP8[(1103598)>>0] = $25; $26 = (_Random_Next($0,256)|0); $27 = $26&255; HEAP8[(1103599)>>0] = $27; $28 = (_Random_Next($0,256)|0); $29 = $28&255; HEAP8[(1103600)>>0] = $29; $30 = (_Random_Next($0,256)|0); $31 = $30&255; HEAP8[(1103601)>>0] = $31; $32 = (_Random_Next($0,256)|0); $33 = $32&255; HEAP8[(1103602)>>0] = $33; $34 = (_Random_Next($0,256)|0); $35 = $34&255; HEAP8[(1103603)>>0] = $35; $36 = (_Random_Next($0,256)|0); $37 = $36&255; HEAP8[(1103604)>>0] = $37; $38 = (_Random_Next($0,256)|0); $39 = $38&255; HEAP8[(1103605)>>0] = $39; $40 = (_Random_Next($0,256)|0); $41 = $40&255; HEAP8[(1103606)>>0] = $41; $42 = (_Random_Next($0,256)|0); $43 = $42&255; HEAP8[(1103607)>>0] = $43; $44 = HEAP8[(1103598)>>0]|0; $45 = $44 & 15; $46 = $45 | 64; HEAP8[(1103598)>>0] = $46; $47 = HEAP8[(1103600)>>0]|0; $48 = $47 & 63; $49 = $48 | -128; HEAP8[(1103600)>>0] = $49; STACKTOP = sp;return; } function _World_SetMapUpper($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; HEAP32[(1103556)>>2] = $0; HEAP32[(1103608)>>2] = 1023; return; } function _World_OutOfMemory() { var label = 0, sp = 0; sp = STACKTOP; _Window_ShowDialog(45698,45712); _World_Reset(); return; } function _World_SetBlock($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $4 = HEAP32[(1103572)>>2]|0; $5 = Math_imul($4, $1)|0; $6 = (($5) + ($2))|0; $7 = HEAP32[(1103564)>>2]|0; $8 = Math_imul($6, $7)|0; $9 = (($8) + ($0))|0; $10 = $3&255; $11 = HEAP32[275888]|0; $12 = (($11) + ($9)|0); HEAP8[$12>>0] = $10; $13 = HEAP32[275888]|0; $14 = HEAP32[(1103556)>>2]|0; $15 = ($13|0)==($14|0); if (!($15)) { $17 = (8)?(($3&65535) >>> 8):(($3&65535)); $18 = $17&255; $19 = (($14) + ($9)|0); HEAP8[$19>>0] = $18; return; } $16 = ($3&65535)<(256); if ($16) { return; } _LazyInitUpper($9,$3); return; } function _LazyInitUpper($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103560)>>2]|0; $3 = (_Mem_TryAllocCleared($2,1)|0); $4 = ($3|0)==(0|0); if ($4) { _World_OutOfMemory(); return; } else { _World_SetMapUpper($3); $5 = (8)?(($1&65535) >>> 8):(($1&65535)); $6 = $5&255; $7 = HEAP32[(1103556)>>2]|0; $8 = (($7) + ($0)|0); HEAP8[$8>>0] = $6; return; } } function _World_GetPhysicsBlock($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$0 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = ($1|0)<(0); if ($3) { $$0 = 7; } else { $4 = (_World_ContainsXZ_2406($0,$2)|0); $5 = ($4<<24>>24)==(0); if ($5) { $$0 = 7; } else { $6 = HEAP32[(1103568)>>2]|0; $7 = ($6|0)>($1|0); if ($7) { $8 = (_World_GetBlock_2407($0,$1,$2)|0); $$0 = $8; } else { $$0 = 0; } } } return ($$0|0); } function _World_ContainsXZ_2406($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $narrow = 0, label = 0, sp = 0; sp = STACKTOP; $2 = HEAP32[(1103564)>>2]|0; $3 = ($2>>>0)>($0>>>0); $4 = HEAP32[(1103572)>>2]|0; $5 = ($4>>>0)>($1>>>0); $narrow = $3 & $5; $6 = $narrow&1; return ($6|0); } function _World_GetBlock_2407($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; var sp = 0; sp = STACKTOP; $3 = HEAP32[(1103572)>>2]|0; $4 = Math_imul($3, $1)|0; $5 = (($4) + ($2))|0; $6 = HEAP32[(1103564)>>2]|0; $7 = Math_imul($5, $6)|0; $8 = (($7) + ($0))|0; $9 = HEAP32[275888]|0; $10 = (($9) + ($8)|0); $11 = HEAP8[$10>>0]|0; $12 = $11&255; $13 = HEAP32[(1103556)>>2]|0; $14 = (($13) + ($8)|0); $15 = HEAP8[$14>>0]|0; $16 = $15&255; $17 = $16 << 8; $18 = $17 | $12; $19 = HEAP32[(1103608)>>2]|0; $20 = $18 & $19; $21 = $20&65535; return ($21|0); } function _World_SafeGetBlock($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; sp = STACKTOP; $3 = (_World_Contains_2410($0,$1,$2)|0); $4 = ($3<<24>>24)==(0); if ($4) { $6 = 0; return ($6|0); } $5 = (_World_GetBlock_2407($0,$1,$2)|0); $6 = $5; return ($6|0); } function _World_Contains_2410($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $narrow = 0, $or$cond = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[(1103564)>>2]|0; $4 = ($3>>>0)>($0>>>0); $5 = HEAP32[(1103568)>>2]|0; $6 = ($5>>>0)>($1>>>0); $or$cond = $4 & $6; $7 = HEAP32[(1103572)>>2]|0; $8 = ($7>>>0)>($2>>>0); $narrow = $or$cond & $8; $9 = $narrow&1; return ($9|0); } function _Env_SetEdgeBlock($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0<<16>>16)==(255); if ($1) { $2 = (_Block_IsCustomDefined(255)|0); $3 = ($2<<24>>24)==(0); $spec$select = $3 ? 9 : $0; $$0 = $spec$select; } else { $$0 = $0; } $4 = HEAP16[986072]|0; $5 = ($$0<<16>>16)==($4<<16>>16); if ($5) { return; } HEAP16[986072] = $$0; _Event_RaiseInt((1796388),0); return; } function _Env_SetSidesBlock($0) { $0 = $0|0; var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0<<16>>16)==(255); if ($1) { $2 = (_Block_IsCustomDefined(255)|0); $3 = ($2<<24>>24)==(0); $spec$select = $3 ? 7 : $0; $$0 = $spec$select; } else { $$0 = $0; } $4 = HEAP16[(1972146)>>1]|0; $5 = ($$0<<16>>16)==($4<<16>>16); if ($5) { return; } HEAP16[(1972146)>>1] = $$0; _Event_RaiseInt((1796388),1); return; } function _Env_SetEdgeHeight($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972148)>>2]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[(1972148)>>2] = $0; _Event_RaiseInt((1796388),2); return; } function _Env_SetSidesOffset($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972152)>>2]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[(1972152)>>2] = $0; _Event_RaiseInt((1796388),3); return; } function _Env_SetCloudsHeight($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972156)>>2]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[(1972156)>>2] = $0; _Event_RaiseInt((1796388),4); return; } function _Env_SetCloudsSpeed($0) { $0 = +$0; var $1 = 0.0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1972160)>>2]; $2 = $1 != $0; if (!($2)) { return; } HEAPF32[(1972160)>>2] = $0; _Event_RaiseInt((1796388),5); return; } function _Env_SetWeatherSpeed($0) { $0 = +$0; var $1 = 0.0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1972164)>>2]; $2 = $1 != $0; if (!($2)) { return; } HEAPF32[(1972164)>>2] = $0; _Event_RaiseInt((1796388),6); return; } function _Env_SetWeatherFade($0) { $0 = +$0; var $1 = 0.0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1972168)>>2]; $2 = $1 != $0; if (!($2)) { return; } HEAPF32[(1972168)>>2] = $0; _Event_RaiseInt((1796388),7); return; } function _Env_SetWeather($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972172)>>2]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[(1972172)>>2] = $0; _Event_RaiseInt((1796388),8); return; } function _Env_SetExpFog($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = $0&255; $2 = HEAP32[(1972176)>>2]|0; $3 = ($2|0)==($1|0); if ($3) { return; } HEAP32[(1972176)>>2] = $1; _Event_RaiseInt((1796388),9); return; } function _Env_SetSkyboxHorSpeed($0) { $0 = +$0; var $1 = 0.0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1972180)>>2]; $2 = $1 != $0; if (!($2)) { return; } HEAPF32[(1972180)>>2] = $0; _Event_RaiseInt((1796388),10); return; } function _Env_SetSkyboxVerSpeed($0) { $0 = +$0; var $1 = 0.0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = +HEAPF32[(1972184)>>2]; $2 = $1 != $0; if (!($2)) { return; } HEAPF32[(1972184)>>2] = $0; _Event_RaiseInt((1796388),11); return; } function _Env_SetSkyCol($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972188)>>2]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[(1972188)>>2] = $0; _Event_RaiseInt((1796388),12); return; } function _Env_SetFogCol($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972192)>>2]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[(1972192)>>2] = $0; _Event_RaiseInt((1796388),14); return; } function _Env_SetCloudsCol($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972196)>>2]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[(1972196)>>2] = $0; _Event_RaiseInt((1796388),13); return; } function _Env_SetSkyboxCol($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = HEAP32[(1972200)>>2]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[(1972200)>>2] = $0; _Event_RaiseInt((1796388),17); return; } function _Env_SetSunCol($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; _PackedCol_GetShaded($0,(1972208),(1972212),(1972216)); $1 = HEAP32[(1972204)>>2]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[(1972204)>>2] = $0; _Event_RaiseInt((1796388),15); return; } function _Env_SetShadowCol($0) { $0 = $0|0; var $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; _PackedCol_GetShaded($0,(1972224),(1972228),(1972232)); $1 = HEAP32[(1972220)>>2]|0; $2 = ($1|0)==($0|0); if ($2) { return; } HEAP32[(1972220)>>2] = $0; _Event_RaiseInt((1796388),16); return; } function _Respawn_HighestSolidY($0) { $0 = $0|0; var $$05062 = 0, $$05154 = 0, $$052$lcssa = 0.0, $$05261 = 0.0, $$056 = 0, $$1$lcssa = 0.0, $$155 = 0.0, $$2$lcssa = 0.0, $$253 = 0.0, $$3 = 0.0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0; var $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; var $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $1 = sp + 16|0; $2 = sp; $3 = +HEAPF32[$0>>2]; $4 = (_Math_Floor($3)|0); $5 = ((($0)) + 12|0); $6 = +HEAPF32[$5>>2]; $7 = (_Math_Floor($6)|0); $8 = ((($0)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = (_Math_Floor($9)|0); $11 = ((($0)) + 16|0); $12 = +HEAPF32[$11>>2]; $13 = (_Math_Floor($12)|0); $14 = ((($0)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = (_Math_Floor($15)|0); $17 = ((($0)) + 20|0); $18 = +HEAPF32[$17>>2]; $19 = (_Math_Floor($18)|0); $20 = ($10|0)>($13|0); if ($20) { $$052$lcssa = -1.0E+5; STACKTOP = sp;return (+$$052$lcssa); } $21 = ((($2)) + 4|0); $22 = ($16|0)>($19|0); $23 = ((($2)) + 8|0); $24 = ($4|0)>($7|0); $25 = ((($1)) + 12|0); $26 = ((($1)) + 16|0); $$05062 = $10;$$05261 = -1.0E+5; while(1) { $27 = (+($$05062|0)); HEAPF32[$21>>2] = $27; if ($22) { $$1$lcssa = $$05261; } else { $$056 = $16;$$155 = $$05261; while(1) { $28 = (+($$056|0)); HEAPF32[$23>>2] = $28; if ($24) { $$2$lcssa = $$155; } else { $$05154 = $4;$$253 = $$155; while(1) { $29 = (+($$05154|0)); HEAPF32[$2>>2] = $29; $30 = (_World_SafeGetBlock($$05154,$$05062,$$056)|0); $31 = $30&65535; $32 = (1125396 + (($31*12)|0)|0); _Vec3_Add_2449($1,$2,$32); $33 = (1134612 + (($31*12)|0)|0); _Vec3_Add_2449($25,$2,$33); $34 = (1115412 + ($31)|0); $35 = HEAP8[$34>>0]|0; $36 = ($35<<24>>24)==(2); if ($36) { $37 = (_AABB_Intersects($0,$1)|0); $38 = ($37<<24>>24)==(0); if ($38) { $$3 = $$253; } else { $39 = +HEAPF32[$26>>2]; $40 = $39 > $$253; if ($40) { $$3 = $39; } else { $$3 = $$253; } } } else { $$3 = $$253; } $41 = (($$05154) + 1)|0; $42 = ($$05154|0)<($7|0); if ($42) { $$05154 = $41;$$253 = $$3; } else { $$2$lcssa = $$3; break; } } } $43 = (($$056) + 1)|0; $44 = ($$056|0)<($19|0); if ($44) { $$056 = $43;$$155 = $$2$lcssa; } else { $$1$lcssa = $$2$lcssa; break; } } } $45 = (($$05062) + 1)|0; $46 = ($$05062|0)<($13|0); if ($46) { $$05062 = $45;$$05261 = $$1$lcssa; } else { $$052$lcssa = $$1$lcssa; break; } } STACKTOP = sp;return (+$$052$lcssa); } function _Vec3_Add_2449($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; sp = STACKTOP; $3 = +HEAPF32[$1>>2]; $4 = +HEAPF32[$2>>2]; $5 = $3 + $4; HEAPF32[$0>>2] = $5; $6 = ((($1)) + 4|0); $7 = +HEAPF32[$6>>2]; $8 = ((($2)) + 4|0); $9 = +HEAPF32[$8>>2]; $10 = $7 + $9; $11 = ((($0)) + 4|0); HEAPF32[$11>>2] = $10; $12 = ((($1)) + 8|0); $13 = +HEAPF32[$12>>2]; $14 = ((($2)) + 8|0); $15 = +HEAPF32[$14>>2]; $16 = $13 + $15; $17 = ((($0)) + 8|0); HEAPF32[$17>>2] = $16; return; } function _Respawn_FindSpawnPosition($0,$1,$2,$3) { $0 = $0|0; $1 = +$1; $2 = +$2; $3 = $3|0; var $$08 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0, $22 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0; var label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $4 = sp + 24|0; $5 = sp; HEAPF32[$4>>2] = $1; $6 = HEAP32[(1103568)>>2]|0; $7 = (+($6|0)); $8 = $7 + 0.0010000000474974513; $9 = ((($4)) + 4|0); HEAPF32[$9>>2] = $8; $10 = ((($4)) + 8|0); HEAPF32[$10>>2] = $2; _AABB_Make($5,$4,$3); HEAPF32[$9>>2] = 0.0; $11 = HEAP32[(1103568)>>2]|0; $12 = ($11|0)>(-1); L1: do { if ($12) { $13 = ((($5)) + 4|0); $14 = ((($5)) + 16|0); $$08 = $11; while(1) { $15 = (+_Respawn_HighestSolidY($5)); $16 = $15 != -1.0E+5; if ($16) { break; } $17 = +HEAPF32[$13>>2]; $18 = $17 + -1.0; HEAPF32[$13>>2] = $18; $19 = +HEAPF32[$14>>2]; $20 = $19 + -1.0; HEAPF32[$14>>2] = $20; $21 = (($$08) + -1)|0; $22 = ($$08|0)>(0); if ($22) { $$08 = $21; } else { break L1; } } HEAPF32[$9>>2] = $15; } } while(0); ;HEAP32[$0>>2]=HEAP32[$4>>2]|0;HEAP32[$0+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[$4+8>>2]|0; STACKTOP = sp;return; } function _malloc($0) { $0 = $0|0; var $$0 = 0, $$0$i = 0, $$0$i$i = 0, $$0$i$i$i = 0, $$0$i20$i = 0, $$0169$i = 0, $$0170$i = 0, $$0171$i = 0, $$0192 = 0, $$0194 = 0, $$02014$i$i = 0, $$0202$lcssa$i$i = 0, $$02023$i$i = 0, $$0206$i$i = 0, $$0207$i$i = 0, $$024372$i = 0, $$0259$i$i = 0, $$02604$i$i = 0, $$0261$lcssa$i$i = 0, $$02613$i$i = 0; var $$0267$i$i = 0, $$0268$i$i = 0, $$0318$i = 0, $$032012$i = 0, $$0321$lcssa$i = 0, $$032111$i = 0, $$0323$i = 0, $$0329$i = 0, $$0335$i = 0, $$0336$i = 0, $$0338$i = 0, $$0339$i = 0, $$0344$i = 0, $$1174$i = 0, $$1174$i$be = 0, $$1174$i$ph = 0, $$1176$i = 0, $$1176$i$be = 0, $$1176$i$ph = 0, $$124471$i = 0; var $$1263$i$i = 0, $$1263$i$i$be = 0, $$1263$i$i$ph = 0, $$1265$i$i = 0, $$1265$i$i$be = 0, $$1265$i$i$ph = 0, $$1319$i = 0, $$1324$i = 0, $$1340$i = 0, $$1346$i = 0, $$1346$i$be = 0, $$1346$i$ph = 0, $$1350$i = 0, $$1350$i$be = 0, $$1350$i$ph = 0, $$2234243136$i = 0, $$2247$ph$i = 0, $$2253$ph$i = 0, $$2331$i = 0, $$3$i = 0; var $$3$i$i = 0, $$3$i198 = 0, $$3$i198211 = 0, $$3326$i = 0, $$3348$i = 0, $$4$lcssa$i = 0, $$415$i = 0, $$415$i$ph = 0, $$4236$i = 0, $$4327$lcssa$i = 0, $$432714$i = 0, $$432714$i$ph = 0, $$4333$i = 0, $$533413$i = 0, $$533413$i$ph = 0, $$723947$i = 0, $$748$i = 0, $$pre = 0, $$pre$i = 0, $$pre$i$i = 0; var $$pre$i16$i = 0, $$pre$i195 = 0, $$pre$i204 = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i17$iZ2D = 0, $$pre$phi$i205Z2D = 0, $$pre$phi$iZ2D = 0, $$pre$phiZ2D = 0, $$sink = 0, $$sink320 = 0, $$sink321 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0; var $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0; var $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0; var $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0; var $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0; var $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0; var $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0; var $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0; var $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0; var $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0; var $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0; var $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0; var $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0; var $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0; var $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0; var $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0; var $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0; var $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0; var $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0; var $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0; var $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0; var $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0; var $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0; var $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0; var $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0; var $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0; var $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0; var $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0; var $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0; var $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0; var $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0; var $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0; var $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0; var $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0; var $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0; var $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0; var $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0; var $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0; var $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0; var $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0; var $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0; var $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0; var $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0; var $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0; var $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0; var $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0; var $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0; var $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0; var $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0; var $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $99 = 0, $cond$i = 0, $cond$i$i = 0, $cond$i203 = 0, $not$$i = 0, $or$cond$i = 0, $or$cond$i199 = 0, $or$cond1$i = 0, $or$cond1$i197 = 0, $or$cond11$i = 0, $or$cond2$i = 0; var $or$cond5$i = 0, $or$cond50$i = 0, $or$cond51$i = 0, $or$cond6$i = 0, $or$cond7$i = 0, $or$cond8$i = 0, $or$cond8$not$i = 0, $spec$select$i = 0, $spec$select$i201 = 0, $spec$select1$i = 0, $spec$select2$i = 0, $spec$select4$i = 0, $spec$select49$i = 0, $spec$select9$i = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; $1 = sp; $2 = ($0>>>0)<(245); do { if ($2) { $3 = ($0>>>0)<(11); $4 = (($0) + 11)|0; $5 = $4 & -8; $6 = $3 ? 16 : $5; $7 = (3)?($6 >>> 3):($6); $8 = HEAP32[493059]|0; $9 = ($7)?($8 >>> $7):($8); $10 = $9 & 3; $11 = ($10|0)==(0); if (!($11)) { $12 = $9 & 1; $13 = $12 ^ 1; $14 = (($13) + ($7))|0; $15 = $14 << 1; $16 = (1972276 + ($15<<2)|0); $17 = ((($16)) + 8|0); $18 = HEAP32[$17>>2]|0; $19 = ((($18)) + 8|0); $20 = HEAP32[$19>>2]|0; $21 = ($20|0)==($16|0); if ($21) { $22 = 1 << $14; $23 = $22 ^ -1; $24 = $8 & $23; HEAP32[493059] = $24; } else { $25 = ((($20)) + 12|0); HEAP32[$25>>2] = $16; HEAP32[$17>>2] = $20; } $26 = $14 << 3; $27 = $26 | 3; $28 = ((($18)) + 4|0); HEAP32[$28>>2] = $27; $29 = (($18) + ($26)|0); $30 = ((($29)) + 4|0); $31 = HEAP32[$30>>2]|0; $32 = $31 | 1; HEAP32[$30>>2] = $32; $$0 = $19; STACKTOP = sp;return ($$0|0); } $33 = HEAP32[(1972244)>>2]|0; $34 = ($6>>>0)>($33>>>0); if ($34) { $35 = ($9|0)==(0); if (!($35)) { $36 = $9 << $7; $37 = 2 << $7; $38 = (0 - ($37))|0; $39 = $37 | $38; $40 = $36 & $39; $41 = (0 - ($40))|0; $42 = $40 & $41; $43 = (($42) + -1)|0; $44 = (12)?($43 >>> 12):($43); $45 = $44 & 16; $46 = ($45)?($43 >>> $45):($43); $47 = (5)?($46 >>> 5):($46); $48 = $47 & 8; $49 = $48 | $45; $50 = ($48)?($46 >>> $48):($46); $51 = (2)?($50 >>> 2):($50); $52 = $51 & 4; $53 = $49 | $52; $54 = ($52)?($50 >>> $52):($50); $55 = (1)?($54 >>> 1):($54); $56 = $55 & 2; $57 = $53 | $56; $58 = ($56)?($54 >>> $56):($54); $59 = (1)?($58 >>> 1):($58); $60 = $59 & 1; $61 = $57 | $60; $62 = ($60)?($58 >>> $60):($58); $63 = (($61) + ($62))|0; $64 = $63 << 1; $65 = (1972276 + ($64<<2)|0); $66 = ((($65)) + 8|0); $67 = HEAP32[$66>>2]|0; $68 = ((($67)) + 8|0); $69 = HEAP32[$68>>2]|0; $70 = ($69|0)==($65|0); if ($70) { $71 = 1 << $63; $72 = $71 ^ -1; $73 = $8 & $72; HEAP32[493059] = $73; $90 = $73; } else { $74 = ((($69)) + 12|0); HEAP32[$74>>2] = $65; HEAP32[$66>>2] = $69; $90 = $8; } $75 = $63 << 3; $76 = (($75) - ($6))|0; $77 = $6 | 3; $78 = ((($67)) + 4|0); HEAP32[$78>>2] = $77; $79 = (($67) + ($6)|0); $80 = $76 | 1; $81 = ((($79)) + 4|0); HEAP32[$81>>2] = $80; $82 = (($67) + ($75)|0); HEAP32[$82>>2] = $76; $83 = ($33|0)==(0); if (!($83)) { $84 = HEAP32[(1972256)>>2]|0; $85 = (3)?($33 >>> 3):($33); $86 = $85 << 1; $87 = (1972276 + ($86<<2)|0); $88 = 1 << $85; $89 = $90 & $88; $91 = ($89|0)==(0); if ($91) { $92 = $90 | $88; HEAP32[493059] = $92; $$pre = ((($87)) + 8|0); $$0194 = $87;$$pre$phiZ2D = $$pre; } else { $93 = ((($87)) + 8|0); $94 = HEAP32[$93>>2]|0; $$0194 = $94;$$pre$phiZ2D = $93; } HEAP32[$$pre$phiZ2D>>2] = $84; $95 = ((($$0194)) + 12|0); HEAP32[$95>>2] = $84; $96 = ((($84)) + 8|0); HEAP32[$96>>2] = $$0194; $97 = ((($84)) + 12|0); HEAP32[$97>>2] = $87; } HEAP32[(1972244)>>2] = $76; HEAP32[(1972256)>>2] = $79; $$0 = $68; STACKTOP = sp;return ($$0|0); } $98 = HEAP32[(1972240)>>2]|0; $99 = ($98|0)==(0); if ($99) { $$0192 = $6; } else { $100 = (0 - ($98))|0; $101 = $98 & $100; $102 = (($101) + -1)|0; $103 = (12)?($102 >>> 12):($102); $104 = $103 & 16; $105 = ($104)?($102 >>> $104):($102); $106 = (5)?($105 >>> 5):($105); $107 = $106 & 8; $108 = $107 | $104; $109 = ($107)?($105 >>> $107):($105); $110 = (2)?($109 >>> 2):($109); $111 = $110 & 4; $112 = $108 | $111; $113 = ($111)?($109 >>> $111):($109); $114 = (1)?($113 >>> 1):($113); $115 = $114 & 2; $116 = $112 | $115; $117 = ($115)?($113 >>> $115):($113); $118 = (1)?($117 >>> 1):($117); $119 = $118 & 1; $120 = $116 | $119; $121 = ($119)?($117 >>> $119):($117); $122 = (($120) + ($121))|0; $123 = (1972540 + ($122<<2)|0); $124 = HEAP32[$123>>2]|0; $125 = ((($124)) + 4|0); $126 = HEAP32[$125>>2]|0; $127 = $126 & -8; $128 = (($127) - ($6))|0; $$0169$i = $124;$$0170$i = $124;$$0171$i = $128; while(1) { $129 = ((($$0169$i)) + 16|0); $130 = HEAP32[$129>>2]|0; $131 = ($130|0)==(0|0); if ($131) { $132 = ((($$0169$i)) + 20|0); $133 = HEAP32[$132>>2]|0; $134 = ($133|0)==(0|0); if ($134) { break; } else { $136 = $133; } } else { $136 = $130; } $135 = ((($136)) + 4|0); $137 = HEAP32[$135>>2]|0; $138 = $137 & -8; $139 = (($138) - ($6))|0; $140 = ($139>>>0)<($$0171$i>>>0); $spec$select$i = $140 ? $139 : $$0171$i; $spec$select1$i = $140 ? $136 : $$0170$i; $$0169$i = $136;$$0170$i = $spec$select1$i;$$0171$i = $spec$select$i; } $141 = (($$0170$i) + ($6)|0); $142 = ($141>>>0)>($$0170$i>>>0); if ($142) { $143 = ((($$0170$i)) + 24|0); $144 = HEAP32[$143>>2]|0; $145 = ((($$0170$i)) + 12|0); $146 = HEAP32[$145>>2]|0; $147 = ($146|0)==($$0170$i|0); do { if ($147) { $152 = ((($$0170$i)) + 20|0); $153 = HEAP32[$152>>2]|0; $154 = ($153|0)==(0|0); if ($154) { $155 = ((($$0170$i)) + 16|0); $156 = HEAP32[$155>>2]|0; $157 = ($156|0)==(0|0); if ($157) { $$3$i = 0; break; } else { $$1174$i$ph = $156;$$1176$i$ph = $155; } } else { $$1174$i$ph = $153;$$1176$i$ph = $152; } $$1174$i = $$1174$i$ph;$$1176$i = $$1176$i$ph; while(1) { $158 = ((($$1174$i)) + 20|0); $159 = HEAP32[$158>>2]|0; $160 = ($159|0)==(0|0); if ($160) { $161 = ((($$1174$i)) + 16|0); $162 = HEAP32[$161>>2]|0; $163 = ($162|0)==(0|0); if ($163) { break; } else { $$1174$i$be = $162;$$1176$i$be = $161; } } else { $$1174$i$be = $159;$$1176$i$be = $158; } $$1174$i = $$1174$i$be;$$1176$i = $$1176$i$be; } HEAP32[$$1176$i>>2] = 0; $$3$i = $$1174$i; } else { $148 = ((($$0170$i)) + 8|0); $149 = HEAP32[$148>>2]|0; $150 = ((($149)) + 12|0); HEAP32[$150>>2] = $146; $151 = ((($146)) + 8|0); HEAP32[$151>>2] = $149; $$3$i = $146; } } while(0); $164 = ($144|0)==(0|0); do { if (!($164)) { $165 = ((($$0170$i)) + 28|0); $166 = HEAP32[$165>>2]|0; $167 = (1972540 + ($166<<2)|0); $168 = HEAP32[$167>>2]|0; $169 = ($$0170$i|0)==($168|0); if ($169) { HEAP32[$167>>2] = $$3$i; $cond$i = ($$3$i|0)==(0|0); if ($cond$i) { $170 = 1 << $166; $171 = $170 ^ -1; $172 = $98 & $171; HEAP32[(1972240)>>2] = $172; break; } } else { $173 = ((($144)) + 16|0); $174 = HEAP32[$173>>2]|0; $175 = ($174|0)==($$0170$i|0); $176 = ((($144)) + 20|0); $$sink = $175 ? $173 : $176; HEAP32[$$sink>>2] = $$3$i; $177 = ($$3$i|0)==(0|0); if ($177) { break; } } $178 = ((($$3$i)) + 24|0); HEAP32[$178>>2] = $144; $179 = ((($$0170$i)) + 16|0); $180 = HEAP32[$179>>2]|0; $181 = ($180|0)==(0|0); if (!($181)) { $182 = ((($$3$i)) + 16|0); HEAP32[$182>>2] = $180; $183 = ((($180)) + 24|0); HEAP32[$183>>2] = $$3$i; } $184 = ((($$0170$i)) + 20|0); $185 = HEAP32[$184>>2]|0; $186 = ($185|0)==(0|0); if (!($186)) { $187 = ((($$3$i)) + 20|0); HEAP32[$187>>2] = $185; $188 = ((($185)) + 24|0); HEAP32[$188>>2] = $$3$i; } } } while(0); $189 = ($$0171$i>>>0)<(16); if ($189) { $190 = (($$0171$i) + ($6))|0; $191 = $190 | 3; $192 = ((($$0170$i)) + 4|0); HEAP32[$192>>2] = $191; $193 = (($$0170$i) + ($190)|0); $194 = ((($193)) + 4|0); $195 = HEAP32[$194>>2]|0; $196 = $195 | 1; HEAP32[$194>>2] = $196; } else { $197 = $6 | 3; $198 = ((($$0170$i)) + 4|0); HEAP32[$198>>2] = $197; $199 = $$0171$i | 1; $200 = ((($141)) + 4|0); HEAP32[$200>>2] = $199; $201 = (($141) + ($$0171$i)|0); HEAP32[$201>>2] = $$0171$i; $202 = ($33|0)==(0); if (!($202)) { $203 = HEAP32[(1972256)>>2]|0; $204 = (3)?($33 >>> 3):($33); $205 = $204 << 1; $206 = (1972276 + ($205<<2)|0); $207 = 1 << $204; $208 = $207 & $8; $209 = ($208|0)==(0); if ($209) { $210 = $207 | $8; HEAP32[493059] = $210; $$pre$i = ((($206)) + 8|0); $$0$i = $206;$$pre$phi$iZ2D = $$pre$i; } else { $211 = ((($206)) + 8|0); $212 = HEAP32[$211>>2]|0; $$0$i = $212;$$pre$phi$iZ2D = $211; } HEAP32[$$pre$phi$iZ2D>>2] = $203; $213 = ((($$0$i)) + 12|0); HEAP32[$213>>2] = $203; $214 = ((($203)) + 8|0); HEAP32[$214>>2] = $$0$i; $215 = ((($203)) + 12|0); HEAP32[$215>>2] = $206; } HEAP32[(1972244)>>2] = $$0171$i; HEAP32[(1972256)>>2] = $141; } $216 = ((($$0170$i)) + 8|0); $$0 = $216; STACKTOP = sp;return ($$0|0); } else { $$0192 = $6; } } } else { $$0192 = $6; } } else { $217 = ($0>>>0)>(4294967231); if ($217) { $$0192 = -1; } else { $218 = (($0) + 11)|0; $219 = $218 & -8; $220 = HEAP32[(1972240)>>2]|0; $221 = ($220|0)==(0); if ($221) { $$0192 = $219; } else { $222 = (0 - ($219))|0; $223 = (8)?($218 >>> 8):($218); $224 = ($223|0)==(0); if ($224) { $$0335$i = 0; } else { $225 = ($219>>>0)>(16777215); if ($225) { $$0335$i = 31; } else { $226 = (($223) + 1048320)|0; $227 = (16)?($226 >>> 16):($226); $228 = $227 & 8; $229 = $223 << $228; $230 = (($229) + 520192)|0; $231 = (16)?($230 >>> 16):($230); $232 = $231 & 4; $233 = $232 | $228; $234 = $229 << $232; $235 = (($234) + 245760)|0; $236 = (16)?($235 >>> 16):($235); $237 = $236 & 2; $238 = $233 | $237; $239 = (14 - ($238))|0; $240 = $234 << $237; $241 = (15)?($240 >>> 15):($240); $242 = (($239) + ($241))|0; $243 = $242 << 1; $244 = (($242) + 7)|0; $245 = ($244)?($219 >>> $244):($219); $246 = $245 & 1; $247 = $246 | $243; $$0335$i = $247; } } $248 = (1972540 + ($$0335$i<<2)|0); $249 = HEAP32[$248>>2]|0; $250 = ($249|0)==(0|0); L79: do { if ($250) { $$2331$i = 0;$$3$i198 = 0;$$3326$i = $222; label = 61; } else { $251 = ($$0335$i|0)==(31); $252 = (1)?($$0335$i >>> 1):($$0335$i); $253 = (25 - ($252))|0; $254 = $251 ? 0 : $253; $255 = $219 << $254; $$0318$i = 0;$$0323$i = $222;$$0329$i = $249;$$0336$i = $255;$$0339$i = 0; while(1) { $256 = ((($$0329$i)) + 4|0); $257 = HEAP32[$256>>2]|0; $258 = $257 & -8; $259 = (($258) - ($219))|0; $260 = ($259>>>0)<($$0323$i>>>0); if ($260) { $261 = ($259|0)==(0); if ($261) { $$415$i$ph = $$0329$i;$$432714$i$ph = 0;$$533413$i$ph = $$0329$i; label = 65; break L79; } else { $$1319$i = $$0329$i;$$1324$i = $259; } } else { $$1319$i = $$0318$i;$$1324$i = $$0323$i; } $262 = ((($$0329$i)) + 20|0); $263 = HEAP32[$262>>2]|0; $264 = (31)?($$0336$i >>> 31):($$0336$i); $265 = (((($$0329$i)) + 16|0) + ($264<<2)|0); $266 = HEAP32[$265>>2]|0; $267 = ($263|0)==(0|0); $268 = ($263|0)==($266|0); $or$cond1$i197 = $267 | $268; $$1340$i = $or$cond1$i197 ? $$0339$i : $263; $269 = ($266|0)==(0|0); $spec$select4$i = $$0336$i << 1; if ($269) { $$2331$i = $$1340$i;$$3$i198 = $$1319$i;$$3326$i = $$1324$i; label = 61; break; } else { $$0318$i = $$1319$i;$$0323$i = $$1324$i;$$0329$i = $266;$$0336$i = $spec$select4$i;$$0339$i = $$1340$i; } } } } while(0); if ((label|0) == 61) { $270 = ($$2331$i|0)==(0|0); $271 = ($$3$i198|0)==(0|0); $or$cond$i199 = $270 & $271; if ($or$cond$i199) { $272 = 2 << $$0335$i; $273 = (0 - ($272))|0; $274 = $272 | $273; $275 = $274 & $220; $276 = ($275|0)==(0); if ($276) { $$0192 = $219; break; } $277 = (0 - ($275))|0; $278 = $275 & $277; $279 = (($278) + -1)|0; $280 = (12)?($279 >>> 12):($279); $281 = $280 & 16; $282 = ($281)?($279 >>> $281):($279); $283 = (5)?($282 >>> 5):($282); $284 = $283 & 8; $285 = $284 | $281; $286 = ($284)?($282 >>> $284):($282); $287 = (2)?($286 >>> 2):($286); $288 = $287 & 4; $289 = $285 | $288; $290 = ($288)?($286 >>> $288):($286); $291 = (1)?($290 >>> 1):($290); $292 = $291 & 2; $293 = $289 | $292; $294 = ($292)?($290 >>> $292):($290); $295 = (1)?($294 >>> 1):($294); $296 = $295 & 1; $297 = $293 | $296; $298 = ($296)?($294 >>> $296):($294); $299 = (($297) + ($298))|0; $300 = (1972540 + ($299<<2)|0); $301 = HEAP32[$300>>2]|0; $$3$i198211 = 0;$$4333$i = $301; } else { $$3$i198211 = $$3$i198;$$4333$i = $$2331$i; } $302 = ($$4333$i|0)==(0|0); if ($302) { $$4$lcssa$i = $$3$i198211;$$4327$lcssa$i = $$3326$i; } else { $$415$i$ph = $$3$i198211;$$432714$i$ph = $$3326$i;$$533413$i$ph = $$4333$i; label = 65; } } if ((label|0) == 65) { $$415$i = $$415$i$ph;$$432714$i = $$432714$i$ph;$$533413$i = $$533413$i$ph; while(1) { $303 = ((($$533413$i)) + 4|0); $304 = HEAP32[$303>>2]|0; $305 = $304 & -8; $306 = (($305) - ($219))|0; $307 = ($306>>>0)<($$432714$i>>>0); $spec$select$i201 = $307 ? $306 : $$432714$i; $spec$select2$i = $307 ? $$533413$i : $$415$i; $308 = ((($$533413$i)) + 16|0); $309 = HEAP32[$308>>2]|0; $310 = ($309|0)==(0|0); if ($310) { $311 = ((($$533413$i)) + 20|0); $312 = HEAP32[$311>>2]|0; $313 = $312; } else { $313 = $309; } $314 = ($313|0)==(0|0); if ($314) { $$4$lcssa$i = $spec$select2$i;$$4327$lcssa$i = $spec$select$i201; break; } else { $$415$i = $spec$select2$i;$$432714$i = $spec$select$i201;$$533413$i = $313; } } } $315 = ($$4$lcssa$i|0)==(0|0); if ($315) { $$0192 = $219; } else { $316 = HEAP32[(1972244)>>2]|0; $317 = (($316) - ($219))|0; $318 = ($$4327$lcssa$i>>>0)<($317>>>0); if ($318) { $319 = (($$4$lcssa$i) + ($219)|0); $320 = ($319>>>0)>($$4$lcssa$i>>>0); if ($320) { $321 = ((($$4$lcssa$i)) + 24|0); $322 = HEAP32[$321>>2]|0; $323 = ((($$4$lcssa$i)) + 12|0); $324 = HEAP32[$323>>2]|0; $325 = ($324|0)==($$4$lcssa$i|0); do { if ($325) { $330 = ((($$4$lcssa$i)) + 20|0); $331 = HEAP32[$330>>2]|0; $332 = ($331|0)==(0|0); if ($332) { $333 = ((($$4$lcssa$i)) + 16|0); $334 = HEAP32[$333>>2]|0; $335 = ($334|0)==(0|0); if ($335) { $$3348$i = 0; break; } else { $$1346$i$ph = $334;$$1350$i$ph = $333; } } else { $$1346$i$ph = $331;$$1350$i$ph = $330; } $$1346$i = $$1346$i$ph;$$1350$i = $$1350$i$ph; while(1) { $336 = ((($$1346$i)) + 20|0); $337 = HEAP32[$336>>2]|0; $338 = ($337|0)==(0|0); if ($338) { $339 = ((($$1346$i)) + 16|0); $340 = HEAP32[$339>>2]|0; $341 = ($340|0)==(0|0); if ($341) { break; } else { $$1346$i$be = $340;$$1350$i$be = $339; } } else { $$1346$i$be = $337;$$1350$i$be = $336; } $$1346$i = $$1346$i$be;$$1350$i = $$1350$i$be; } HEAP32[$$1350$i>>2] = 0; $$3348$i = $$1346$i; } else { $326 = ((($$4$lcssa$i)) + 8|0); $327 = HEAP32[$326>>2]|0; $328 = ((($327)) + 12|0); HEAP32[$328>>2] = $324; $329 = ((($324)) + 8|0); HEAP32[$329>>2] = $327; $$3348$i = $324; } } while(0); $342 = ($322|0)==(0|0); do { if ($342) { $425 = $220; } else { $343 = ((($$4$lcssa$i)) + 28|0); $344 = HEAP32[$343>>2]|0; $345 = (1972540 + ($344<<2)|0); $346 = HEAP32[$345>>2]|0; $347 = ($$4$lcssa$i|0)==($346|0); if ($347) { HEAP32[$345>>2] = $$3348$i; $cond$i203 = ($$3348$i|0)==(0|0); if ($cond$i203) { $348 = 1 << $344; $349 = $348 ^ -1; $350 = $220 & $349; HEAP32[(1972240)>>2] = $350; $425 = $350; break; } } else { $351 = ((($322)) + 16|0); $352 = HEAP32[$351>>2]|0; $353 = ($352|0)==($$4$lcssa$i|0); $354 = ((($322)) + 20|0); $$sink320 = $353 ? $351 : $354; HEAP32[$$sink320>>2] = $$3348$i; $355 = ($$3348$i|0)==(0|0); if ($355) { $425 = $220; break; } } $356 = ((($$3348$i)) + 24|0); HEAP32[$356>>2] = $322; $357 = ((($$4$lcssa$i)) + 16|0); $358 = HEAP32[$357>>2]|0; $359 = ($358|0)==(0|0); if (!($359)) { $360 = ((($$3348$i)) + 16|0); HEAP32[$360>>2] = $358; $361 = ((($358)) + 24|0); HEAP32[$361>>2] = $$3348$i; } $362 = ((($$4$lcssa$i)) + 20|0); $363 = HEAP32[$362>>2]|0; $364 = ($363|0)==(0|0); if ($364) { $425 = $220; } else { $365 = ((($$3348$i)) + 20|0); HEAP32[$365>>2] = $363; $366 = ((($363)) + 24|0); HEAP32[$366>>2] = $$3348$i; $425 = $220; } } } while(0); $367 = ($$4327$lcssa$i>>>0)<(16); L128: do { if ($367) { $368 = (($$4327$lcssa$i) + ($219))|0; $369 = $368 | 3; $370 = ((($$4$lcssa$i)) + 4|0); HEAP32[$370>>2] = $369; $371 = (($$4$lcssa$i) + ($368)|0); $372 = ((($371)) + 4|0); $373 = HEAP32[$372>>2]|0; $374 = $373 | 1; HEAP32[$372>>2] = $374; } else { $375 = $219 | 3; $376 = ((($$4$lcssa$i)) + 4|0); HEAP32[$376>>2] = $375; $377 = $$4327$lcssa$i | 1; $378 = ((($319)) + 4|0); HEAP32[$378>>2] = $377; $379 = (($319) + ($$4327$lcssa$i)|0); HEAP32[$379>>2] = $$4327$lcssa$i; $380 = (3)?($$4327$lcssa$i >>> 3):($$4327$lcssa$i); $381 = ($$4327$lcssa$i>>>0)<(256); if ($381) { $382 = $380 << 1; $383 = (1972276 + ($382<<2)|0); $384 = HEAP32[493059]|0; $385 = 1 << $380; $386 = $384 & $385; $387 = ($386|0)==(0); if ($387) { $388 = $384 | $385; HEAP32[493059] = $388; $$pre$i204 = ((($383)) + 8|0); $$0344$i = $383;$$pre$phi$i205Z2D = $$pre$i204; } else { $389 = ((($383)) + 8|0); $390 = HEAP32[$389>>2]|0; $$0344$i = $390;$$pre$phi$i205Z2D = $389; } HEAP32[$$pre$phi$i205Z2D>>2] = $319; $391 = ((($$0344$i)) + 12|0); HEAP32[$391>>2] = $319; $392 = ((($319)) + 8|0); HEAP32[$392>>2] = $$0344$i; $393 = ((($319)) + 12|0); HEAP32[$393>>2] = $383; break; } $394 = (8)?($$4327$lcssa$i >>> 8):($$4327$lcssa$i); $395 = ($394|0)==(0); if ($395) { $$0338$i = 0; } else { $396 = ($$4327$lcssa$i>>>0)>(16777215); if ($396) { $$0338$i = 31; } else { $397 = (($394) + 1048320)|0; $398 = (16)?($397 >>> 16):($397); $399 = $398 & 8; $400 = $394 << $399; $401 = (($400) + 520192)|0; $402 = (16)?($401 >>> 16):($401); $403 = $402 & 4; $404 = $403 | $399; $405 = $400 << $403; $406 = (($405) + 245760)|0; $407 = (16)?($406 >>> 16):($406); $408 = $407 & 2; $409 = $404 | $408; $410 = (14 - ($409))|0; $411 = $405 << $408; $412 = (15)?($411 >>> 15):($411); $413 = (($410) + ($412))|0; $414 = $413 << 1; $415 = (($413) + 7)|0; $416 = ($415)?($$4327$lcssa$i >>> $415):($$4327$lcssa$i); $417 = $416 & 1; $418 = $417 | $414; $$0338$i = $418; } } $419 = (1972540 + ($$0338$i<<2)|0); $420 = ((($319)) + 28|0); HEAP32[$420>>2] = $$0338$i; $421 = ((($319)) + 16|0); $422 = ((($421)) + 4|0); HEAP32[$422>>2] = 0; HEAP32[$421>>2] = 0; $423 = 1 << $$0338$i; $424 = $425 & $423; $426 = ($424|0)==(0); if ($426) { $427 = $425 | $423; HEAP32[(1972240)>>2] = $427; HEAP32[$419>>2] = $319; $428 = ((($319)) + 24|0); HEAP32[$428>>2] = $419; $429 = ((($319)) + 12|0); HEAP32[$429>>2] = $319; $430 = ((($319)) + 8|0); HEAP32[$430>>2] = $319; break; } $431 = HEAP32[$419>>2]|0; $432 = ((($431)) + 4|0); $433 = HEAP32[$432>>2]|0; $434 = $433 & -8; $435 = ($434|0)==($$4327$lcssa$i|0); L145: do { if ($435) { $$0321$lcssa$i = $431; } else { $436 = ($$0338$i|0)==(31); $437 = (1)?($$0338$i >>> 1):($$0338$i); $438 = (25 - ($437))|0; $439 = $436 ? 0 : $438; $440 = $$4327$lcssa$i << $439; $$032012$i = $440;$$032111$i = $431; while(1) { $447 = (31)?($$032012$i >>> 31):($$032012$i); $448 = (((($$032111$i)) + 16|0) + ($447<<2)|0); $443 = HEAP32[$448>>2]|0; $449 = ($443|0)==(0|0); if ($449) { break; } $441 = $$032012$i << 1; $442 = ((($443)) + 4|0); $444 = HEAP32[$442>>2]|0; $445 = $444 & -8; $446 = ($445|0)==($$4327$lcssa$i|0); if ($446) { $$0321$lcssa$i = $443; break L145; } else { $$032012$i = $441;$$032111$i = $443; } } HEAP32[$448>>2] = $319; $450 = ((($319)) + 24|0); HEAP32[$450>>2] = $$032111$i; $451 = ((($319)) + 12|0); HEAP32[$451>>2] = $319; $452 = ((($319)) + 8|0); HEAP32[$452>>2] = $319; break L128; } } while(0); $453 = ((($$0321$lcssa$i)) + 8|0); $454 = HEAP32[$453>>2]|0; $455 = ((($454)) + 12|0); HEAP32[$455>>2] = $319; HEAP32[$453>>2] = $319; $456 = ((($319)) + 8|0); HEAP32[$456>>2] = $454; $457 = ((($319)) + 12|0); HEAP32[$457>>2] = $$0321$lcssa$i; $458 = ((($319)) + 24|0); HEAP32[$458>>2] = 0; } } while(0); $459 = ((($$4$lcssa$i)) + 8|0); $$0 = $459; STACKTOP = sp;return ($$0|0); } else { $$0192 = $219; } } else { $$0192 = $219; } } } } } } while(0); $460 = HEAP32[(1972244)>>2]|0; $461 = ($460>>>0)<($$0192>>>0); if (!($461)) { $462 = (($460) - ($$0192))|0; $463 = HEAP32[(1972256)>>2]|0; $464 = ($462>>>0)>(15); if ($464) { $465 = (($463) + ($$0192)|0); HEAP32[(1972256)>>2] = $465; HEAP32[(1972244)>>2] = $462; $466 = $462 | 1; $467 = ((($465)) + 4|0); HEAP32[$467>>2] = $466; $468 = (($463) + ($460)|0); HEAP32[$468>>2] = $462; $469 = $$0192 | 3; $470 = ((($463)) + 4|0); HEAP32[$470>>2] = $469; } else { HEAP32[(1972244)>>2] = 0; HEAP32[(1972256)>>2] = 0; $471 = $460 | 3; $472 = ((($463)) + 4|0); HEAP32[$472>>2] = $471; $473 = (($463) + ($460)|0); $474 = ((($473)) + 4|0); $475 = HEAP32[$474>>2]|0; $476 = $475 | 1; HEAP32[$474>>2] = $476; } $477 = ((($463)) + 8|0); $$0 = $477; STACKTOP = sp;return ($$0|0); } $478 = HEAP32[(1972248)>>2]|0; $479 = ($478>>>0)>($$0192>>>0); if ($479) { $480 = (($478) - ($$0192))|0; HEAP32[(1972248)>>2] = $480; $481 = HEAP32[(1972260)>>2]|0; $482 = (($481) + ($$0192)|0); HEAP32[(1972260)>>2] = $482; $483 = $480 | 1; $484 = ((($482)) + 4|0); HEAP32[$484>>2] = $483; $485 = $$0192 | 3; $486 = ((($481)) + 4|0); HEAP32[$486>>2] = $485; $487 = ((($481)) + 8|0); $$0 = $487; STACKTOP = sp;return ($$0|0); } $488 = HEAP32[493177]|0; $489 = ($488|0)==(0); if ($489) { HEAP32[(1972716)>>2] = 4096; HEAP32[(1972712)>>2] = 4096; HEAP32[(1972720)>>2] = -1; HEAP32[(1972724)>>2] = -1; HEAP32[(1972728)>>2] = 0; HEAP32[(1972680)>>2] = 0; $490 = $1; $491 = $490 & -16; $492 = $491 ^ 1431655768; HEAP32[493177] = $492; $496 = 4096; } else { $$pre$i195 = HEAP32[(1972716)>>2]|0; $496 = $$pre$i195; } $493 = (($$0192) + 48)|0; $494 = (($$0192) + 47)|0; $495 = (($496) + ($494))|0; $497 = (0 - ($496))|0; $498 = $495 & $497; $499 = ($498>>>0)>($$0192>>>0); if (!($499)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $500 = HEAP32[(1972676)>>2]|0; $501 = ($500|0)==(0); if (!($501)) { $502 = HEAP32[(1972668)>>2]|0; $503 = (($502) + ($498))|0; $504 = ($503>>>0)<=($502>>>0); $505 = ($503>>>0)>($500>>>0); $or$cond1$i = $504 | $505; if ($or$cond1$i) { $$0 = 0; STACKTOP = sp;return ($$0|0); } } $506 = HEAP32[(1972680)>>2]|0; $507 = $506 & 4; $508 = ($507|0)==(0); L178: do { if ($508) { $509 = HEAP32[(1972260)>>2]|0; $510 = ($509|0)==(0|0); L180: do { if ($510) { label = 128; } else { $$0$i20$i = (1972684); while(1) { $511 = HEAP32[$$0$i20$i>>2]|0; $512 = ($511>>>0)>($509>>>0); if (!($512)) { $513 = ((($$0$i20$i)) + 4|0); $514 = HEAP32[$513>>2]|0; $515 = (($511) + ($514)|0); $516 = ($515>>>0)>($509>>>0); if ($516) { break; } } $517 = ((($$0$i20$i)) + 8|0); $518 = HEAP32[$517>>2]|0; $519 = ($518|0)==(0|0); if ($519) { label = 128; break L180; } else { $$0$i20$i = $518; } } $542 = (($495) - ($478))|0; $543 = $542 & $497; $544 = ($543>>>0)<(2147483647); if ($544) { $545 = ((($$0$i20$i)) + 4|0); $546 = (_sbrk(($543|0))|0); $547 = HEAP32[$$0$i20$i>>2]|0; $548 = HEAP32[$545>>2]|0; $549 = (($547) + ($548)|0); $550 = ($546|0)==($549|0); if ($550) { $551 = ($546|0)==((-1)|0); if ($551) { $$2234243136$i = $543; } else { $$723947$i = $543;$$748$i = $546; label = 145; break L178; } } else { $$2247$ph$i = $546;$$2253$ph$i = $543; label = 136; } } else { $$2234243136$i = 0; } } } while(0); do { if ((label|0) == 128) { $520 = (_sbrk(0)|0); $521 = ($520|0)==((-1)|0); if ($521) { $$2234243136$i = 0; } else { $522 = $520; $523 = HEAP32[(1972712)>>2]|0; $524 = (($523) + -1)|0; $525 = $524 & $522; $526 = ($525|0)==(0); $527 = (($524) + ($522))|0; $528 = (0 - ($523))|0; $529 = $527 & $528; $530 = (($529) - ($522))|0; $531 = $526 ? 0 : $530; $spec$select49$i = (($531) + ($498))|0; $532 = HEAP32[(1972668)>>2]|0; $533 = (($spec$select49$i) + ($532))|0; $534 = ($spec$select49$i>>>0)>($$0192>>>0); $535 = ($spec$select49$i>>>0)<(2147483647); $or$cond$i = $534 & $535; if ($or$cond$i) { $536 = HEAP32[(1972676)>>2]|0; $537 = ($536|0)==(0); if (!($537)) { $538 = ($533>>>0)<=($532>>>0); $539 = ($533>>>0)>($536>>>0); $or$cond2$i = $538 | $539; if ($or$cond2$i) { $$2234243136$i = 0; break; } } $540 = (_sbrk(($spec$select49$i|0))|0); $541 = ($540|0)==($520|0); if ($541) { $$723947$i = $spec$select49$i;$$748$i = $520; label = 145; break L178; } else { $$2247$ph$i = $540;$$2253$ph$i = $spec$select49$i; label = 136; } } else { $$2234243136$i = 0; } } } } while(0); do { if ((label|0) == 136) { $552 = (0 - ($$2253$ph$i))|0; $553 = ($$2247$ph$i|0)!=((-1)|0); $554 = ($$2253$ph$i>>>0)<(2147483647); $or$cond7$i = $554 & $553; $555 = ($493>>>0)>($$2253$ph$i>>>0); $or$cond6$i = $555 & $or$cond7$i; if (!($or$cond6$i)) { $565 = ($$2247$ph$i|0)==((-1)|0); if ($565) { $$2234243136$i = 0; break; } else { $$723947$i = $$2253$ph$i;$$748$i = $$2247$ph$i; label = 145; break L178; } } $556 = HEAP32[(1972716)>>2]|0; $557 = (($494) - ($$2253$ph$i))|0; $558 = (($557) + ($556))|0; $559 = (0 - ($556))|0; $560 = $558 & $559; $561 = ($560>>>0)<(2147483647); if (!($561)) { $$723947$i = $$2253$ph$i;$$748$i = $$2247$ph$i; label = 145; break L178; } $562 = (_sbrk(($560|0))|0); $563 = ($562|0)==((-1)|0); if ($563) { (_sbrk(($552|0))|0); $$2234243136$i = 0; break; } else { $564 = (($560) + ($$2253$ph$i))|0; $$723947$i = $564;$$748$i = $$2247$ph$i; label = 145; break L178; } } } while(0); $566 = HEAP32[(1972680)>>2]|0; $567 = $566 | 4; HEAP32[(1972680)>>2] = $567; $$4236$i = $$2234243136$i; label = 143; } else { $$4236$i = 0; label = 143; } } while(0); if ((label|0) == 143) { $568 = ($498>>>0)<(2147483647); if ($568) { $569 = (_sbrk(($498|0))|0); $570 = (_sbrk(0)|0); $571 = ($569|0)!=((-1)|0); $572 = ($570|0)!=((-1)|0); $or$cond5$i = $571 & $572; $573 = ($569>>>0)<($570>>>0); $or$cond8$i = $573 & $or$cond5$i; $574 = $570; $575 = $569; $576 = (($574) - ($575))|0; $577 = (($$0192) + 40)|0; $578 = ($576>>>0)>($577>>>0); $spec$select9$i = $578 ? $576 : $$4236$i; $or$cond8$not$i = $or$cond8$i ^ 1; $579 = ($569|0)==((-1)|0); $not$$i = $578 ^ 1; $580 = $579 | $not$$i; $or$cond50$i = $580 | $or$cond8$not$i; if (!($or$cond50$i)) { $$723947$i = $spec$select9$i;$$748$i = $569; label = 145; } } } if ((label|0) == 145) { $581 = HEAP32[(1972668)>>2]|0; $582 = (($581) + ($$723947$i))|0; HEAP32[(1972668)>>2] = $582; $583 = HEAP32[(1972672)>>2]|0; $584 = ($582>>>0)>($583>>>0); if ($584) { HEAP32[(1972672)>>2] = $582; } $585 = HEAP32[(1972260)>>2]|0; $586 = ($585|0)==(0|0); L215: do { if ($586) { $587 = HEAP32[(1972252)>>2]|0; $588 = ($587|0)==(0|0); $589 = ($$748$i>>>0)<($587>>>0); $or$cond11$i = $588 | $589; if ($or$cond11$i) { HEAP32[(1972252)>>2] = $$748$i; } HEAP32[(1972684)>>2] = $$748$i; HEAP32[(1972688)>>2] = $$723947$i; HEAP32[(1972696)>>2] = 0; $590 = HEAP32[493177]|0; HEAP32[(1972272)>>2] = $590; HEAP32[(1972268)>>2] = -1; HEAP32[(1972288)>>2] = (1972276); HEAP32[(1972284)>>2] = (1972276); HEAP32[(1972296)>>2] = (1972284); HEAP32[(1972292)>>2] = (1972284); HEAP32[(1972304)>>2] = (1972292); HEAP32[(1972300)>>2] = (1972292); HEAP32[(1972312)>>2] = (1972300); HEAP32[(1972308)>>2] = (1972300); HEAP32[(1972320)>>2] = (1972308); HEAP32[(1972316)>>2] = (1972308); HEAP32[(1972328)>>2] = (1972316); HEAP32[(1972324)>>2] = (1972316); HEAP32[(1972336)>>2] = (1972324); HEAP32[(1972332)>>2] = (1972324); HEAP32[(1972344)>>2] = (1972332); HEAP32[(1972340)>>2] = (1972332); HEAP32[(1972352)>>2] = (1972340); HEAP32[(1972348)>>2] = (1972340); HEAP32[(1972360)>>2] = (1972348); HEAP32[(1972356)>>2] = (1972348); HEAP32[(1972368)>>2] = (1972356); HEAP32[(1972364)>>2] = (1972356); HEAP32[(1972376)>>2] = (1972364); HEAP32[(1972372)>>2] = (1972364); HEAP32[(1972384)>>2] = (1972372); HEAP32[(1972380)>>2] = (1972372); HEAP32[(1972392)>>2] = (1972380); HEAP32[(1972388)>>2] = (1972380); HEAP32[(1972400)>>2] = (1972388); HEAP32[(1972396)>>2] = (1972388); HEAP32[(1972408)>>2] = (1972396); HEAP32[(1972404)>>2] = (1972396); HEAP32[(1972416)>>2] = (1972404); HEAP32[(1972412)>>2] = (1972404); HEAP32[(1972424)>>2] = (1972412); HEAP32[(1972420)>>2] = (1972412); HEAP32[(1972432)>>2] = (1972420); HEAP32[(1972428)>>2] = (1972420); HEAP32[(1972440)>>2] = (1972428); HEAP32[(1972436)>>2] = (1972428); HEAP32[(1972448)>>2] = (1972436); HEAP32[(1972444)>>2] = (1972436); HEAP32[(1972456)>>2] = (1972444); HEAP32[(1972452)>>2] = (1972444); HEAP32[(1972464)>>2] = (1972452); HEAP32[(1972460)>>2] = (1972452); HEAP32[(1972472)>>2] = (1972460); HEAP32[(1972468)>>2] = (1972460); HEAP32[(1972480)>>2] = (1972468); HEAP32[(1972476)>>2] = (1972468); HEAP32[(1972488)>>2] = (1972476); HEAP32[(1972484)>>2] = (1972476); HEAP32[(1972496)>>2] = (1972484); HEAP32[(1972492)>>2] = (1972484); HEAP32[(1972504)>>2] = (1972492); HEAP32[(1972500)>>2] = (1972492); HEAP32[(1972512)>>2] = (1972500); HEAP32[(1972508)>>2] = (1972500); HEAP32[(1972520)>>2] = (1972508); HEAP32[(1972516)>>2] = (1972508); HEAP32[(1972528)>>2] = (1972516); HEAP32[(1972524)>>2] = (1972516); HEAP32[(1972536)>>2] = (1972524); HEAP32[(1972532)>>2] = (1972524); $591 = (($$723947$i) + -40)|0; $592 = ((($$748$i)) + 8|0); $593 = $592; $594 = $593 & 7; $595 = ($594|0)==(0); $596 = (0 - ($593))|0; $597 = $596 & 7; $598 = $595 ? 0 : $597; $599 = (($$748$i) + ($598)|0); $600 = (($591) - ($598))|0; HEAP32[(1972260)>>2] = $599; HEAP32[(1972248)>>2] = $600; $601 = $600 | 1; $602 = ((($599)) + 4|0); HEAP32[$602>>2] = $601; $603 = (($$748$i) + ($591)|0); $604 = ((($603)) + 4|0); HEAP32[$604>>2] = 40; $605 = HEAP32[(1972724)>>2]|0; HEAP32[(1972264)>>2] = $605; } else { $$024372$i = (1972684); while(1) { $606 = HEAP32[$$024372$i>>2]|0; $607 = ((($$024372$i)) + 4|0); $608 = HEAP32[$607>>2]|0; $609 = (($606) + ($608)|0); $610 = ($$748$i|0)==($609|0); if ($610) { label = 154; break; } $611 = ((($$024372$i)) + 8|0); $612 = HEAP32[$611>>2]|0; $613 = ($612|0)==(0|0); if ($613) { break; } else { $$024372$i = $612; } } if ((label|0) == 154) { $614 = ((($$024372$i)) + 4|0); $615 = ((($$024372$i)) + 12|0); $616 = HEAP32[$615>>2]|0; $617 = $616 & 8; $618 = ($617|0)==(0); if ($618) { $619 = ($606>>>0)<=($585>>>0); $620 = ($$748$i>>>0)>($585>>>0); $or$cond51$i = $620 & $619; if ($or$cond51$i) { $621 = (($608) + ($$723947$i))|0; HEAP32[$614>>2] = $621; $622 = HEAP32[(1972248)>>2]|0; $623 = (($622) + ($$723947$i))|0; $624 = ((($585)) + 8|0); $625 = $624; $626 = $625 & 7; $627 = ($626|0)==(0); $628 = (0 - ($625))|0; $629 = $628 & 7; $630 = $627 ? 0 : $629; $631 = (($585) + ($630)|0); $632 = (($623) - ($630))|0; HEAP32[(1972260)>>2] = $631; HEAP32[(1972248)>>2] = $632; $633 = $632 | 1; $634 = ((($631)) + 4|0); HEAP32[$634>>2] = $633; $635 = (($585) + ($623)|0); $636 = ((($635)) + 4|0); HEAP32[$636>>2] = 40; $637 = HEAP32[(1972724)>>2]|0; HEAP32[(1972264)>>2] = $637; break; } } } $638 = HEAP32[(1972252)>>2]|0; $639 = ($$748$i>>>0)<($638>>>0); if ($639) { HEAP32[(1972252)>>2] = $$748$i; } $640 = (($$748$i) + ($$723947$i)|0); $$124471$i = (1972684); while(1) { $641 = HEAP32[$$124471$i>>2]|0; $642 = ($641|0)==($640|0); if ($642) { label = 162; break; } $643 = ((($$124471$i)) + 8|0); $644 = HEAP32[$643>>2]|0; $645 = ($644|0)==(0|0); if ($645) { break; } else { $$124471$i = $644; } } if ((label|0) == 162) { $646 = ((($$124471$i)) + 12|0); $647 = HEAP32[$646>>2]|0; $648 = $647 & 8; $649 = ($648|0)==(0); if ($649) { HEAP32[$$124471$i>>2] = $$748$i; $650 = ((($$124471$i)) + 4|0); $651 = HEAP32[$650>>2]|0; $652 = (($651) + ($$723947$i))|0; HEAP32[$650>>2] = $652; $653 = ((($$748$i)) + 8|0); $654 = $653; $655 = $654 & 7; $656 = ($655|0)==(0); $657 = (0 - ($654))|0; $658 = $657 & 7; $659 = $656 ? 0 : $658; $660 = (($$748$i) + ($659)|0); $661 = ((($640)) + 8|0); $662 = $661; $663 = $662 & 7; $664 = ($663|0)==(0); $665 = (0 - ($662))|0; $666 = $665 & 7; $667 = $664 ? 0 : $666; $668 = (($640) + ($667)|0); $669 = $668; $670 = $660; $671 = (($669) - ($670))|0; $672 = (($660) + ($$0192)|0); $673 = (($671) - ($$0192))|0; $674 = $$0192 | 3; $675 = ((($660)) + 4|0); HEAP32[$675>>2] = $674; $676 = ($585|0)==($668|0); L238: do { if ($676) { $677 = HEAP32[(1972248)>>2]|0; $678 = (($677) + ($673))|0; HEAP32[(1972248)>>2] = $678; HEAP32[(1972260)>>2] = $672; $679 = $678 | 1; $680 = ((($672)) + 4|0); HEAP32[$680>>2] = $679; } else { $681 = HEAP32[(1972256)>>2]|0; $682 = ($681|0)==($668|0); if ($682) { $683 = HEAP32[(1972244)>>2]|0; $684 = (($683) + ($673))|0; HEAP32[(1972244)>>2] = $684; HEAP32[(1972256)>>2] = $672; $685 = $684 | 1; $686 = ((($672)) + 4|0); HEAP32[$686>>2] = $685; $687 = (($672) + ($684)|0); HEAP32[$687>>2] = $684; break; } $688 = ((($668)) + 4|0); $689 = HEAP32[$688>>2]|0; $690 = $689 & 3; $691 = ($690|0)==(1); if ($691) { $692 = $689 & -8; $693 = (3)?($689 >>> 3):($689); $694 = ($689>>>0)<(256); L246: do { if ($694) { $695 = ((($668)) + 8|0); $696 = HEAP32[$695>>2]|0; $697 = ((($668)) + 12|0); $698 = HEAP32[$697>>2]|0; $699 = ($698|0)==($696|0); if ($699) { $700 = 1 << $693; $701 = $700 ^ -1; $702 = HEAP32[493059]|0; $703 = $702 & $701; HEAP32[493059] = $703; break; } else { $704 = ((($696)) + 12|0); HEAP32[$704>>2] = $698; $705 = ((($698)) + 8|0); HEAP32[$705>>2] = $696; break; } } else { $706 = ((($668)) + 24|0); $707 = HEAP32[$706>>2]|0; $708 = ((($668)) + 12|0); $709 = HEAP32[$708>>2]|0; $710 = ($709|0)==($668|0); do { if ($710) { $715 = ((($668)) + 16|0); $716 = ((($715)) + 4|0); $717 = HEAP32[$716>>2]|0; $718 = ($717|0)==(0|0); if ($718) { $719 = HEAP32[$715>>2]|0; $720 = ($719|0)==(0|0); if ($720) { $$3$i$i = 0; break; } else { $$1263$i$i$ph = $719;$$1265$i$i$ph = $715; } } else { $$1263$i$i$ph = $717;$$1265$i$i$ph = $716; } $$1263$i$i = $$1263$i$i$ph;$$1265$i$i = $$1265$i$i$ph; while(1) { $721 = ((($$1263$i$i)) + 20|0); $722 = HEAP32[$721>>2]|0; $723 = ($722|0)==(0|0); if ($723) { $724 = ((($$1263$i$i)) + 16|0); $725 = HEAP32[$724>>2]|0; $726 = ($725|0)==(0|0); if ($726) { break; } else { $$1263$i$i$be = $725;$$1265$i$i$be = $724; } } else { $$1263$i$i$be = $722;$$1265$i$i$be = $721; } $$1263$i$i = $$1263$i$i$be;$$1265$i$i = $$1265$i$i$be; } HEAP32[$$1265$i$i>>2] = 0; $$3$i$i = $$1263$i$i; } else { $711 = ((($668)) + 8|0); $712 = HEAP32[$711>>2]|0; $713 = ((($712)) + 12|0); HEAP32[$713>>2] = $709; $714 = ((($709)) + 8|0); HEAP32[$714>>2] = $712; $$3$i$i = $709; } } while(0); $727 = ($707|0)==(0|0); if ($727) { break; } $728 = ((($668)) + 28|0); $729 = HEAP32[$728>>2]|0; $730 = (1972540 + ($729<<2)|0); $731 = HEAP32[$730>>2]|0; $732 = ($731|0)==($668|0); do { if ($732) { HEAP32[$730>>2] = $$3$i$i; $cond$i$i = ($$3$i$i|0)==(0|0); if (!($cond$i$i)) { break; } $733 = 1 << $729; $734 = $733 ^ -1; $735 = HEAP32[(1972240)>>2]|0; $736 = $735 & $734; HEAP32[(1972240)>>2] = $736; break L246; } else { $737 = ((($707)) + 16|0); $738 = HEAP32[$737>>2]|0; $739 = ($738|0)==($668|0); $740 = ((($707)) + 20|0); $$sink321 = $739 ? $737 : $740; HEAP32[$$sink321>>2] = $$3$i$i; $741 = ($$3$i$i|0)==(0|0); if ($741) { break L246; } } } while(0); $742 = ((($$3$i$i)) + 24|0); HEAP32[$742>>2] = $707; $743 = ((($668)) + 16|0); $744 = HEAP32[$743>>2]|0; $745 = ($744|0)==(0|0); if (!($745)) { $746 = ((($$3$i$i)) + 16|0); HEAP32[$746>>2] = $744; $747 = ((($744)) + 24|0); HEAP32[$747>>2] = $$3$i$i; } $748 = ((($743)) + 4|0); $749 = HEAP32[$748>>2]|0; $750 = ($749|0)==(0|0); if ($750) { break; } $751 = ((($$3$i$i)) + 20|0); HEAP32[$751>>2] = $749; $752 = ((($749)) + 24|0); HEAP32[$752>>2] = $$3$i$i; } } while(0); $753 = (($668) + ($692)|0); $754 = (($692) + ($673))|0; $$0$i$i = $753;$$0259$i$i = $754; } else { $$0$i$i = $668;$$0259$i$i = $673; } $755 = ((($$0$i$i)) + 4|0); $756 = HEAP32[$755>>2]|0; $757 = $756 & -2; HEAP32[$755>>2] = $757; $758 = $$0259$i$i | 1; $759 = ((($672)) + 4|0); HEAP32[$759>>2] = $758; $760 = (($672) + ($$0259$i$i)|0); HEAP32[$760>>2] = $$0259$i$i; $761 = (3)?($$0259$i$i >>> 3):($$0259$i$i); $762 = ($$0259$i$i>>>0)<(256); if ($762) { $763 = $761 << 1; $764 = (1972276 + ($763<<2)|0); $765 = HEAP32[493059]|0; $766 = 1 << $761; $767 = $765 & $766; $768 = ($767|0)==(0); if ($768) { $769 = $765 | $766; HEAP32[493059] = $769; $$pre$i16$i = ((($764)) + 8|0); $$0267$i$i = $764;$$pre$phi$i17$iZ2D = $$pre$i16$i; } else { $770 = ((($764)) + 8|0); $771 = HEAP32[$770>>2]|0; $$0267$i$i = $771;$$pre$phi$i17$iZ2D = $770; } HEAP32[$$pre$phi$i17$iZ2D>>2] = $672; $772 = ((($$0267$i$i)) + 12|0); HEAP32[$772>>2] = $672; $773 = ((($672)) + 8|0); HEAP32[$773>>2] = $$0267$i$i; $774 = ((($672)) + 12|0); HEAP32[$774>>2] = $764; break; } $775 = (8)?($$0259$i$i >>> 8):($$0259$i$i); $776 = ($775|0)==(0); do { if ($776) { $$0268$i$i = 0; } else { $777 = ($$0259$i$i>>>0)>(16777215); if ($777) { $$0268$i$i = 31; break; } $778 = (($775) + 1048320)|0; $779 = (16)?($778 >>> 16):($778); $780 = $779 & 8; $781 = $775 << $780; $782 = (($781) + 520192)|0; $783 = (16)?($782 >>> 16):($782); $784 = $783 & 4; $785 = $784 | $780; $786 = $781 << $784; $787 = (($786) + 245760)|0; $788 = (16)?($787 >>> 16):($787); $789 = $788 & 2; $790 = $785 | $789; $791 = (14 - ($790))|0; $792 = $786 << $789; $793 = (15)?($792 >>> 15):($792); $794 = (($791) + ($793))|0; $795 = $794 << 1; $796 = (($794) + 7)|0; $797 = ($796)?($$0259$i$i >>> $796):($$0259$i$i); $798 = $797 & 1; $799 = $798 | $795; $$0268$i$i = $799; } } while(0); $800 = (1972540 + ($$0268$i$i<<2)|0); $801 = ((($672)) + 28|0); HEAP32[$801>>2] = $$0268$i$i; $802 = ((($672)) + 16|0); $803 = ((($802)) + 4|0); HEAP32[$803>>2] = 0; HEAP32[$802>>2] = 0; $804 = HEAP32[(1972240)>>2]|0; $805 = 1 << $$0268$i$i; $806 = $804 & $805; $807 = ($806|0)==(0); if ($807) { $808 = $804 | $805; HEAP32[(1972240)>>2] = $808; HEAP32[$800>>2] = $672; $809 = ((($672)) + 24|0); HEAP32[$809>>2] = $800; $810 = ((($672)) + 12|0); HEAP32[$810>>2] = $672; $811 = ((($672)) + 8|0); HEAP32[$811>>2] = $672; break; } $812 = HEAP32[$800>>2]|0; $813 = ((($812)) + 4|0); $814 = HEAP32[$813>>2]|0; $815 = $814 & -8; $816 = ($815|0)==($$0259$i$i|0); L291: do { if ($816) { $$0261$lcssa$i$i = $812; } else { $817 = ($$0268$i$i|0)==(31); $818 = (1)?($$0268$i$i >>> 1):($$0268$i$i); $819 = (25 - ($818))|0; $820 = $817 ? 0 : $819; $821 = $$0259$i$i << $820; $$02604$i$i = $821;$$02613$i$i = $812; while(1) { $828 = (31)?($$02604$i$i >>> 31):($$02604$i$i); $829 = (((($$02613$i$i)) + 16|0) + ($828<<2)|0); $824 = HEAP32[$829>>2]|0; $830 = ($824|0)==(0|0); if ($830) { break; } $822 = $$02604$i$i << 1; $823 = ((($824)) + 4|0); $825 = HEAP32[$823>>2]|0; $826 = $825 & -8; $827 = ($826|0)==($$0259$i$i|0); if ($827) { $$0261$lcssa$i$i = $824; break L291; } else { $$02604$i$i = $822;$$02613$i$i = $824; } } HEAP32[$829>>2] = $672; $831 = ((($672)) + 24|0); HEAP32[$831>>2] = $$02613$i$i; $832 = ((($672)) + 12|0); HEAP32[$832>>2] = $672; $833 = ((($672)) + 8|0); HEAP32[$833>>2] = $672; break L238; } } while(0); $834 = ((($$0261$lcssa$i$i)) + 8|0); $835 = HEAP32[$834>>2]|0; $836 = ((($835)) + 12|0); HEAP32[$836>>2] = $672; HEAP32[$834>>2] = $672; $837 = ((($672)) + 8|0); HEAP32[$837>>2] = $835; $838 = ((($672)) + 12|0); HEAP32[$838>>2] = $$0261$lcssa$i$i; $839 = ((($672)) + 24|0); HEAP32[$839>>2] = 0; } } while(0); $968 = ((($660)) + 8|0); $$0 = $968; STACKTOP = sp;return ($$0|0); } } $$0$i$i$i = (1972684); while(1) { $840 = HEAP32[$$0$i$i$i>>2]|0; $841 = ($840>>>0)>($585>>>0); if (!($841)) { $842 = ((($$0$i$i$i)) + 4|0); $843 = HEAP32[$842>>2]|0; $844 = (($840) + ($843)|0); $845 = ($844>>>0)>($585>>>0); if ($845) { break; } } $846 = ((($$0$i$i$i)) + 8|0); $847 = HEAP32[$846>>2]|0; $$0$i$i$i = $847; } $848 = ((($844)) + -47|0); $849 = ((($848)) + 8|0); $850 = $849; $851 = $850 & 7; $852 = ($851|0)==(0); $853 = (0 - ($850))|0; $854 = $853 & 7; $855 = $852 ? 0 : $854; $856 = (($848) + ($855)|0); $857 = ((($585)) + 16|0); $858 = ($856>>>0)<($857>>>0); $859 = $858 ? $585 : $856; $860 = ((($859)) + 8|0); $861 = ((($859)) + 24|0); $862 = (($$723947$i) + -40)|0; $863 = ((($$748$i)) + 8|0); $864 = $863; $865 = $864 & 7; $866 = ($865|0)==(0); $867 = (0 - ($864))|0; $868 = $867 & 7; $869 = $866 ? 0 : $868; $870 = (($$748$i) + ($869)|0); $871 = (($862) - ($869))|0; HEAP32[(1972260)>>2] = $870; HEAP32[(1972248)>>2] = $871; $872 = $871 | 1; $873 = ((($870)) + 4|0); HEAP32[$873>>2] = $872; $874 = (($$748$i) + ($862)|0); $875 = ((($874)) + 4|0); HEAP32[$875>>2] = 40; $876 = HEAP32[(1972724)>>2]|0; HEAP32[(1972264)>>2] = $876; $877 = ((($859)) + 4|0); HEAP32[$877>>2] = 27; ;HEAP32[$860>>2]=HEAP32[(1972684)>>2]|0;HEAP32[$860+4>>2]=HEAP32[(1972684)+4>>2]|0;HEAP32[$860+8>>2]=HEAP32[(1972684)+8>>2]|0;HEAP32[$860+12>>2]=HEAP32[(1972684)+12>>2]|0; HEAP32[(1972684)>>2] = $$748$i; HEAP32[(1972688)>>2] = $$723947$i; HEAP32[(1972696)>>2] = 0; HEAP32[(1972692)>>2] = $860; $879 = $861; while(1) { $878 = ((($879)) + 4|0); HEAP32[$878>>2] = 7; $880 = ((($879)) + 8|0); $881 = ($880>>>0)<($844>>>0); if ($881) { $879 = $878; } else { break; } } $882 = ($859|0)==($585|0); if (!($882)) { $883 = $859; $884 = $585; $885 = (($883) - ($884))|0; $886 = HEAP32[$877>>2]|0; $887 = $886 & -2; HEAP32[$877>>2] = $887; $888 = $885 | 1; $889 = ((($585)) + 4|0); HEAP32[$889>>2] = $888; HEAP32[$859>>2] = $885; $890 = (3)?($885 >>> 3):($885); $891 = ($885>>>0)<(256); if ($891) { $892 = $890 << 1; $893 = (1972276 + ($892<<2)|0); $894 = HEAP32[493059]|0; $895 = 1 << $890; $896 = $894 & $895; $897 = ($896|0)==(0); if ($897) { $898 = $894 | $895; HEAP32[493059] = $898; $$pre$i$i = ((($893)) + 8|0); $$0206$i$i = $893;$$pre$phi$i$iZ2D = $$pre$i$i; } else { $899 = ((($893)) + 8|0); $900 = HEAP32[$899>>2]|0; $$0206$i$i = $900;$$pre$phi$i$iZ2D = $899; } HEAP32[$$pre$phi$i$iZ2D>>2] = $585; $901 = ((($$0206$i$i)) + 12|0); HEAP32[$901>>2] = $585; $902 = ((($585)) + 8|0); HEAP32[$902>>2] = $$0206$i$i; $903 = ((($585)) + 12|0); HEAP32[$903>>2] = $893; break; } $904 = (8)?($885 >>> 8):($885); $905 = ($904|0)==(0); if ($905) { $$0207$i$i = 0; } else { $906 = ($885>>>0)>(16777215); if ($906) { $$0207$i$i = 31; } else { $907 = (($904) + 1048320)|0; $908 = (16)?($907 >>> 16):($907); $909 = $908 & 8; $910 = $904 << $909; $911 = (($910) + 520192)|0; $912 = (16)?($911 >>> 16):($911); $913 = $912 & 4; $914 = $913 | $909; $915 = $910 << $913; $916 = (($915) + 245760)|0; $917 = (16)?($916 >>> 16):($916); $918 = $917 & 2; $919 = $914 | $918; $920 = (14 - ($919))|0; $921 = $915 << $918; $922 = (15)?($921 >>> 15):($921); $923 = (($920) + ($922))|0; $924 = $923 << 1; $925 = (($923) + 7)|0; $926 = ($925)?($885 >>> $925):($885); $927 = $926 & 1; $928 = $927 | $924; $$0207$i$i = $928; } } $929 = (1972540 + ($$0207$i$i<<2)|0); $930 = ((($585)) + 28|0); HEAP32[$930>>2] = $$0207$i$i; $931 = ((($585)) + 20|0); HEAP32[$931>>2] = 0; HEAP32[$857>>2] = 0; $932 = HEAP32[(1972240)>>2]|0; $933 = 1 << $$0207$i$i; $934 = $932 & $933; $935 = ($934|0)==(0); if ($935) { $936 = $932 | $933; HEAP32[(1972240)>>2] = $936; HEAP32[$929>>2] = $585; $937 = ((($585)) + 24|0); HEAP32[$937>>2] = $929; $938 = ((($585)) + 12|0); HEAP32[$938>>2] = $585; $939 = ((($585)) + 8|0); HEAP32[$939>>2] = $585; break; } $940 = HEAP32[$929>>2]|0; $941 = ((($940)) + 4|0); $942 = HEAP32[$941>>2]|0; $943 = $942 & -8; $944 = ($943|0)==($885|0); L325: do { if ($944) { $$0202$lcssa$i$i = $940; } else { $945 = ($$0207$i$i|0)==(31); $946 = (1)?($$0207$i$i >>> 1):($$0207$i$i); $947 = (25 - ($946))|0; $948 = $945 ? 0 : $947; $949 = $885 << $948; $$02014$i$i = $949;$$02023$i$i = $940; while(1) { $956 = (31)?($$02014$i$i >>> 31):($$02014$i$i); $957 = (((($$02023$i$i)) + 16|0) + ($956<<2)|0); $952 = HEAP32[$957>>2]|0; $958 = ($952|0)==(0|0); if ($958) { break; } $950 = $$02014$i$i << 1; $951 = ((($952)) + 4|0); $953 = HEAP32[$951>>2]|0; $954 = $953 & -8; $955 = ($954|0)==($885|0); if ($955) { $$0202$lcssa$i$i = $952; break L325; } else { $$02014$i$i = $950;$$02023$i$i = $952; } } HEAP32[$957>>2] = $585; $959 = ((($585)) + 24|0); HEAP32[$959>>2] = $$02023$i$i; $960 = ((($585)) + 12|0); HEAP32[$960>>2] = $585; $961 = ((($585)) + 8|0); HEAP32[$961>>2] = $585; break L215; } } while(0); $962 = ((($$0202$lcssa$i$i)) + 8|0); $963 = HEAP32[$962>>2]|0; $964 = ((($963)) + 12|0); HEAP32[$964>>2] = $585; HEAP32[$962>>2] = $585; $965 = ((($585)) + 8|0); HEAP32[$965>>2] = $963; $966 = ((($585)) + 12|0); HEAP32[$966>>2] = $$0202$lcssa$i$i; $967 = ((($585)) + 24|0); HEAP32[$967>>2] = 0; } } } while(0); $969 = HEAP32[(1972248)>>2]|0; $970 = ($969>>>0)>($$0192>>>0); if ($970) { $971 = (($969) - ($$0192))|0; HEAP32[(1972248)>>2] = $971; $972 = HEAP32[(1972260)>>2]|0; $973 = (($972) + ($$0192)|0); HEAP32[(1972260)>>2] = $973; $974 = $971 | 1; $975 = ((($973)) + 4|0); HEAP32[$975>>2] = $974; $976 = $$0192 | 3; $977 = ((($972)) + 4|0); HEAP32[$977>>2] = $976; $978 = ((($972)) + 8|0); $$0 = $978; STACKTOP = sp;return ($$0|0); } } $979 = (___errno_location()|0); HEAP32[$979>>2] = 12; $$0 = 0; STACKTOP = sp;return ($$0|0); } function _free($0) { $0 = $0|0; var $$0194$i = 0, $$0194$in$i = 0, $$0346381 = 0, $$0347$lcssa = 0, $$0347380 = 0, $$0359 = 0, $$0366 = 0, $$1 = 0, $$1345 = 0, $$1350 = 0, $$1350$be = 0, $$1350$ph = 0, $$1353 = 0, $$1353$be = 0, $$1353$ph = 0, $$1361 = 0, $$1361$be = 0, $$1361$ph = 0, $$1365 = 0, $$1365$be = 0; var $$1365$ph = 0, $$2 = 0, $$3 = 0, $$3363 = 0, $$pre = 0, $$pre$phiZ2D = 0, $$sink = 0, $$sink395 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0; var $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0; var $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0; var $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0; var $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0; var $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0; var $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0; var $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0; var $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0; var $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0; var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0; var $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0; var $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0; var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $cond371 = 0, $cond372 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = ($0|0)==(0|0); if ($1) { return; } $2 = ((($0)) + -8|0); $3 = HEAP32[(1972252)>>2]|0; $4 = ((($0)) + -4|0); $5 = HEAP32[$4>>2]|0; $6 = $5 & -8; $7 = (($2) + ($6)|0); $8 = $5 & 1; $9 = ($8|0)==(0); do { if ($9) { $10 = HEAP32[$2>>2]|0; $11 = $5 & 3; $12 = ($11|0)==(0); if ($12) { return; } $13 = (0 - ($10))|0; $14 = (($2) + ($13)|0); $15 = (($10) + ($6))|0; $16 = ($14>>>0)<($3>>>0); if ($16) { return; } $17 = HEAP32[(1972256)>>2]|0; $18 = ($17|0)==($14|0); if ($18) { $79 = ((($7)) + 4|0); $80 = HEAP32[$79>>2]|0; $81 = $80 & 3; $82 = ($81|0)==(3); if (!($82)) { $$1 = $14;$$1345 = $15;$87 = $14; break; } $83 = (($14) + ($15)|0); $84 = ((($14)) + 4|0); $85 = $15 | 1; $86 = $80 & -2; HEAP32[(1972244)>>2] = $15; HEAP32[$79>>2] = $86; HEAP32[$84>>2] = $85; HEAP32[$83>>2] = $15; return; } $19 = (3)?($10 >>> 3):($10); $20 = ($10>>>0)<(256); if ($20) { $21 = ((($14)) + 8|0); $22 = HEAP32[$21>>2]|0; $23 = ((($14)) + 12|0); $24 = HEAP32[$23>>2]|0; $25 = ($24|0)==($22|0); if ($25) { $26 = 1 << $19; $27 = $26 ^ -1; $28 = HEAP32[493059]|0; $29 = $28 & $27; HEAP32[493059] = $29; $$1 = $14;$$1345 = $15;$87 = $14; break; } else { $30 = ((($22)) + 12|0); HEAP32[$30>>2] = $24; $31 = ((($24)) + 8|0); HEAP32[$31>>2] = $22; $$1 = $14;$$1345 = $15;$87 = $14; break; } } $32 = ((($14)) + 24|0); $33 = HEAP32[$32>>2]|0; $34 = ((($14)) + 12|0); $35 = HEAP32[$34>>2]|0; $36 = ($35|0)==($14|0); do { if ($36) { $41 = ((($14)) + 16|0); $42 = ((($41)) + 4|0); $43 = HEAP32[$42>>2]|0; $44 = ($43|0)==(0|0); if ($44) { $45 = HEAP32[$41>>2]|0; $46 = ($45|0)==(0|0); if ($46) { $$3 = 0; break; } else { $$1350$ph = $45;$$1353$ph = $41; } } else { $$1350$ph = $43;$$1353$ph = $42; } $$1350 = $$1350$ph;$$1353 = $$1353$ph; while(1) { $47 = ((($$1350)) + 20|0); $48 = HEAP32[$47>>2]|0; $49 = ($48|0)==(0|0); if ($49) { $50 = ((($$1350)) + 16|0); $51 = HEAP32[$50>>2]|0; $52 = ($51|0)==(0|0); if ($52) { break; } else { $$1350$be = $51;$$1353$be = $50; } } else { $$1350$be = $48;$$1353$be = $47; } $$1350 = $$1350$be;$$1353 = $$1353$be; } HEAP32[$$1353>>2] = 0; $$3 = $$1350; } else { $37 = ((($14)) + 8|0); $38 = HEAP32[$37>>2]|0; $39 = ((($38)) + 12|0); HEAP32[$39>>2] = $35; $40 = ((($35)) + 8|0); HEAP32[$40>>2] = $38; $$3 = $35; } } while(0); $53 = ($33|0)==(0|0); if ($53) { $$1 = $14;$$1345 = $15;$87 = $14; } else { $54 = ((($14)) + 28|0); $55 = HEAP32[$54>>2]|0; $56 = (1972540 + ($55<<2)|0); $57 = HEAP32[$56>>2]|0; $58 = ($57|0)==($14|0); if ($58) { HEAP32[$56>>2] = $$3; $cond371 = ($$3|0)==(0|0); if ($cond371) { $59 = 1 << $55; $60 = $59 ^ -1; $61 = HEAP32[(1972240)>>2]|0; $62 = $61 & $60; HEAP32[(1972240)>>2] = $62; $$1 = $14;$$1345 = $15;$87 = $14; break; } } else { $63 = ((($33)) + 16|0); $64 = HEAP32[$63>>2]|0; $65 = ($64|0)==($14|0); $66 = ((($33)) + 20|0); $$sink = $65 ? $63 : $66; HEAP32[$$sink>>2] = $$3; $67 = ($$3|0)==(0|0); if ($67) { $$1 = $14;$$1345 = $15;$87 = $14; break; } } $68 = ((($$3)) + 24|0); HEAP32[$68>>2] = $33; $69 = ((($14)) + 16|0); $70 = HEAP32[$69>>2]|0; $71 = ($70|0)==(0|0); if (!($71)) { $72 = ((($$3)) + 16|0); HEAP32[$72>>2] = $70; $73 = ((($70)) + 24|0); HEAP32[$73>>2] = $$3; } $74 = ((($69)) + 4|0); $75 = HEAP32[$74>>2]|0; $76 = ($75|0)==(0|0); if ($76) { $$1 = $14;$$1345 = $15;$87 = $14; } else { $77 = ((($$3)) + 20|0); HEAP32[$77>>2] = $75; $78 = ((($75)) + 24|0); HEAP32[$78>>2] = $$3; $$1 = $14;$$1345 = $15;$87 = $14; } } } else { $$1 = $2;$$1345 = $6;$87 = $2; } } while(0); $88 = ($87>>>0)<($7>>>0); if (!($88)) { return; } $89 = ((($7)) + 4|0); $90 = HEAP32[$89>>2]|0; $91 = $90 & 1; $92 = ($91|0)==(0); if ($92) { return; } $93 = $90 & 2; $94 = ($93|0)==(0); if ($94) { $95 = HEAP32[(1972260)>>2]|0; $96 = ($95|0)==($7|0); if ($96) { $97 = HEAP32[(1972248)>>2]|0; $98 = (($97) + ($$1345))|0; HEAP32[(1972248)>>2] = $98; HEAP32[(1972260)>>2] = $$1; $99 = $98 | 1; $100 = ((($$1)) + 4|0); HEAP32[$100>>2] = $99; $101 = HEAP32[(1972256)>>2]|0; $102 = ($$1|0)==($101|0); if (!($102)) { return; } HEAP32[(1972256)>>2] = 0; HEAP32[(1972244)>>2] = 0; return; } $103 = HEAP32[(1972256)>>2]|0; $104 = ($103|0)==($7|0); if ($104) { $105 = HEAP32[(1972244)>>2]|0; $106 = (($105) + ($$1345))|0; HEAP32[(1972244)>>2] = $106; HEAP32[(1972256)>>2] = $87; $107 = $106 | 1; $108 = ((($$1)) + 4|0); HEAP32[$108>>2] = $107; $109 = (($87) + ($106)|0); HEAP32[$109>>2] = $106; return; } $110 = $90 & -8; $111 = (($110) + ($$1345))|0; $112 = (3)?($90 >>> 3):($90); $113 = ($90>>>0)<(256); do { if ($113) { $114 = ((($7)) + 8|0); $115 = HEAP32[$114>>2]|0; $116 = ((($7)) + 12|0); $117 = HEAP32[$116>>2]|0; $118 = ($117|0)==($115|0); if ($118) { $119 = 1 << $112; $120 = $119 ^ -1; $121 = HEAP32[493059]|0; $122 = $121 & $120; HEAP32[493059] = $122; break; } else { $123 = ((($115)) + 12|0); HEAP32[$123>>2] = $117; $124 = ((($117)) + 8|0); HEAP32[$124>>2] = $115; break; } } else { $125 = ((($7)) + 24|0); $126 = HEAP32[$125>>2]|0; $127 = ((($7)) + 12|0); $128 = HEAP32[$127>>2]|0; $129 = ($128|0)==($7|0); do { if ($129) { $134 = ((($7)) + 16|0); $135 = ((($134)) + 4|0); $136 = HEAP32[$135>>2]|0; $137 = ($136|0)==(0|0); if ($137) { $138 = HEAP32[$134>>2]|0; $139 = ($138|0)==(0|0); if ($139) { $$3363 = 0; break; } else { $$1361$ph = $138;$$1365$ph = $134; } } else { $$1361$ph = $136;$$1365$ph = $135; } $$1361 = $$1361$ph;$$1365 = $$1365$ph; while(1) { $140 = ((($$1361)) + 20|0); $141 = HEAP32[$140>>2]|0; $142 = ($141|0)==(0|0); if ($142) { $143 = ((($$1361)) + 16|0); $144 = HEAP32[$143>>2]|0; $145 = ($144|0)==(0|0); if ($145) { break; } else { $$1361$be = $144;$$1365$be = $143; } } else { $$1361$be = $141;$$1365$be = $140; } $$1361 = $$1361$be;$$1365 = $$1365$be; } HEAP32[$$1365>>2] = 0; $$3363 = $$1361; } else { $130 = ((($7)) + 8|0); $131 = HEAP32[$130>>2]|0; $132 = ((($131)) + 12|0); HEAP32[$132>>2] = $128; $133 = ((($128)) + 8|0); HEAP32[$133>>2] = $131; $$3363 = $128; } } while(0); $146 = ($126|0)==(0|0); if (!($146)) { $147 = ((($7)) + 28|0); $148 = HEAP32[$147>>2]|0; $149 = (1972540 + ($148<<2)|0); $150 = HEAP32[$149>>2]|0; $151 = ($150|0)==($7|0); if ($151) { HEAP32[$149>>2] = $$3363; $cond372 = ($$3363|0)==(0|0); if ($cond372) { $152 = 1 << $148; $153 = $152 ^ -1; $154 = HEAP32[(1972240)>>2]|0; $155 = $154 & $153; HEAP32[(1972240)>>2] = $155; break; } } else { $156 = ((($126)) + 16|0); $157 = HEAP32[$156>>2]|0; $158 = ($157|0)==($7|0); $159 = ((($126)) + 20|0); $$sink395 = $158 ? $156 : $159; HEAP32[$$sink395>>2] = $$3363; $160 = ($$3363|0)==(0|0); if ($160) { break; } } $161 = ((($$3363)) + 24|0); HEAP32[$161>>2] = $126; $162 = ((($7)) + 16|0); $163 = HEAP32[$162>>2]|0; $164 = ($163|0)==(0|0); if (!($164)) { $165 = ((($$3363)) + 16|0); HEAP32[$165>>2] = $163; $166 = ((($163)) + 24|0); HEAP32[$166>>2] = $$3363; } $167 = ((($162)) + 4|0); $168 = HEAP32[$167>>2]|0; $169 = ($168|0)==(0|0); if (!($169)) { $170 = ((($$3363)) + 20|0); HEAP32[$170>>2] = $168; $171 = ((($168)) + 24|0); HEAP32[$171>>2] = $$3363; } } } } while(0); $172 = $111 | 1; $173 = ((($$1)) + 4|0); HEAP32[$173>>2] = $172; $174 = (($87) + ($111)|0); HEAP32[$174>>2] = $111; $175 = HEAP32[(1972256)>>2]|0; $176 = ($$1|0)==($175|0); if ($176) { HEAP32[(1972244)>>2] = $111; return; } else { $$2 = $111; } } else { $177 = $90 & -2; HEAP32[$89>>2] = $177; $178 = $$1345 | 1; $179 = ((($$1)) + 4|0); HEAP32[$179>>2] = $178; $180 = (($87) + ($$1345)|0); HEAP32[$180>>2] = $$1345; $$2 = $$1345; } $181 = (3)?($$2 >>> 3):($$2); $182 = ($$2>>>0)<(256); if ($182) { $183 = $181 << 1; $184 = (1972276 + ($183<<2)|0); $185 = HEAP32[493059]|0; $186 = 1 << $181; $187 = $185 & $186; $188 = ($187|0)==(0); if ($188) { $189 = $185 | $186; HEAP32[493059] = $189; $$pre = ((($184)) + 8|0); $$0366 = $184;$$pre$phiZ2D = $$pre; } else { $190 = ((($184)) + 8|0); $191 = HEAP32[$190>>2]|0; $$0366 = $191;$$pre$phiZ2D = $190; } HEAP32[$$pre$phiZ2D>>2] = $$1; $192 = ((($$0366)) + 12|0); HEAP32[$192>>2] = $$1; $193 = ((($$1)) + 8|0); HEAP32[$193>>2] = $$0366; $194 = ((($$1)) + 12|0); HEAP32[$194>>2] = $184; return; } $195 = (8)?($$2 >>> 8):($$2); $196 = ($195|0)==(0); if ($196) { $$0359 = 0; } else { $197 = ($$2>>>0)>(16777215); if ($197) { $$0359 = 31; } else { $198 = (($195) + 1048320)|0; $199 = (16)?($198 >>> 16):($198); $200 = $199 & 8; $201 = $195 << $200; $202 = (($201) + 520192)|0; $203 = (16)?($202 >>> 16):($202); $204 = $203 & 4; $205 = $204 | $200; $206 = $201 << $204; $207 = (($206) + 245760)|0; $208 = (16)?($207 >>> 16):($207); $209 = $208 & 2; $210 = $205 | $209; $211 = (14 - ($210))|0; $212 = $206 << $209; $213 = (15)?($212 >>> 15):($212); $214 = (($211) + ($213))|0; $215 = $214 << 1; $216 = (($214) + 7)|0; $217 = ($216)?($$2 >>> $216):($$2); $218 = $217 & 1; $219 = $218 | $215; $$0359 = $219; } } $220 = (1972540 + ($$0359<<2)|0); $221 = ((($$1)) + 28|0); HEAP32[$221>>2] = $$0359; $222 = ((($$1)) + 16|0); $223 = ((($$1)) + 20|0); HEAP32[$223>>2] = 0; HEAP32[$222>>2] = 0; $224 = HEAP32[(1972240)>>2]|0; $225 = 1 << $$0359; $226 = $224 & $225; $227 = ($226|0)==(0); L112: do { if ($227) { $228 = $224 | $225; HEAP32[(1972240)>>2] = $228; HEAP32[$220>>2] = $$1; $229 = ((($$1)) + 24|0); HEAP32[$229>>2] = $220; $230 = ((($$1)) + 12|0); HEAP32[$230>>2] = $$1; $231 = ((($$1)) + 8|0); HEAP32[$231>>2] = $$1; } else { $232 = HEAP32[$220>>2]|0; $233 = ((($232)) + 4|0); $234 = HEAP32[$233>>2]|0; $235 = $234 & -8; $236 = ($235|0)==($$2|0); L115: do { if ($236) { $$0347$lcssa = $232; } else { $237 = ($$0359|0)==(31); $238 = (1)?($$0359 >>> 1):($$0359); $239 = (25 - ($238))|0; $240 = $237 ? 0 : $239; $241 = $$2 << $240; $$0346381 = $241;$$0347380 = $232; while(1) { $248 = (31)?($$0346381 >>> 31):($$0346381); $249 = (((($$0347380)) + 16|0) + ($248<<2)|0); $244 = HEAP32[$249>>2]|0; $250 = ($244|0)==(0|0); if ($250) { break; } $242 = $$0346381 << 1; $243 = ((($244)) + 4|0); $245 = HEAP32[$243>>2]|0; $246 = $245 & -8; $247 = ($246|0)==($$2|0); if ($247) { $$0347$lcssa = $244; break L115; } else { $$0346381 = $242;$$0347380 = $244; } } HEAP32[$249>>2] = $$1; $251 = ((($$1)) + 24|0); HEAP32[$251>>2] = $$0347380; $252 = ((($$1)) + 12|0); HEAP32[$252>>2] = $$1; $253 = ((($$1)) + 8|0); HEAP32[$253>>2] = $$1; break L112; } } while(0); $254 = ((($$0347$lcssa)) + 8|0); $255 = HEAP32[$254>>2]|0; $256 = ((($255)) + 12|0); HEAP32[$256>>2] = $$1; HEAP32[$254>>2] = $$1; $257 = ((($$1)) + 8|0); HEAP32[$257>>2] = $255; $258 = ((($$1)) + 12|0); HEAP32[$258>>2] = $$0347$lcssa; $259 = ((($$1)) + 24|0); HEAP32[$259>>2] = 0; } } while(0); $260 = HEAP32[(1972268)>>2]|0; $261 = (($260) + -1)|0; HEAP32[(1972268)>>2] = $261; $262 = ($261|0)==(0); if (!($262)) { return; } $$0194$in$i = (1972692); while(1) { $$0194$i = HEAP32[$$0194$in$i>>2]|0; $263 = ($$0194$i|0)==(0|0); $264 = ((($$0194$i)) + 8|0); if ($263) { break; } else { $$0194$in$i = $264; } } HEAP32[(1972268)>>2] = -1; return; } function _calloc($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($0|0)==(0); if ($2) { $$0 = 0; } else { $3 = Math_imul($1, $0)|0; $4 = $1 | $0; $5 = ($4>>>0)>(65535); if ($5) { $6 = (($3>>>0) / ($0>>>0))&-1; $7 = ($6|0)==($1|0); $spec$select = $7 ? $3 : -1; $$0 = $spec$select; } else { $$0 = $3; } } $8 = (_malloc($$0)|0); $9 = ($8|0)==(0|0); if ($9) { return ($8|0); } $10 = ((($8)) + -4|0); $11 = HEAP32[$10>>2]|0; $12 = $11 & 3; $13 = ($12|0)==(0); if ($13) { return ($8|0); } (_memset(($8|0),0,($$0|0))|0); return ($8|0); } function _realloc($0,$1) { $0 = $0|0; $1 = $1|0; var $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0; var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($0|0)==(0|0); if ($2) { $3 = (_malloc($1)|0); $$1 = $3; return ($$1|0); } $4 = ($1>>>0)>(4294967231); if ($4) { $5 = (___errno_location()|0); HEAP32[$5>>2] = 12; $$1 = 0; return ($$1|0); } $6 = ($1>>>0)<(11); $7 = (($1) + 11)|0; $8 = $7 & -8; $9 = $6 ? 16 : $8; $10 = ((($0)) + -8|0); $11 = (_try_realloc_chunk($10,$9)|0); $12 = ($11|0)==(0|0); if (!($12)) { $13 = ((($11)) + 8|0); $$1 = $13; return ($$1|0); } $14 = (_malloc($1)|0); $15 = ($14|0)==(0|0); if ($15) { $$1 = 0; return ($$1|0); } $16 = ((($0)) + -4|0); $17 = HEAP32[$16>>2]|0; $18 = $17 & -8; $19 = $17 & 3; $20 = ($19|0)==(0); $21 = $20 ? 8 : 4; $22 = (($18) - ($21))|0; $23 = ($22>>>0)<($1>>>0); $24 = $23 ? $22 : $1; (_memcpy(($14|0),($0|0),($24|0))|0); _free($0); $$1 = $14; return ($$1|0); } function _try_realloc_chunk($0,$1) { $0 = $0|0; $1 = $1|0; var $$1245 = 0, $$1245$be = 0, $$1245$ph = 0, $$1248 = 0, $$1248$be = 0, $$1248$ph = 0, $$2 = 0, $$3 = 0, $$sink = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0; var $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0; var $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0; var $146 = 0, $147 = 0, $148 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0; var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0; var $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0; var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0; var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $cond = 0, $storemerge = 0, $storemerge1 = 0, label = 0; var sp = 0; sp = STACKTOP; $2 = ((($0)) + 4|0); $3 = HEAP32[$2>>2]|0; $4 = $3 & -8; $5 = (($0) + ($4)|0); $6 = $3 & 3; $7 = ($6|0)==(0); if ($7) { $8 = ($1>>>0)<(256); if ($8) { $$2 = 0; return ($$2|0); } $9 = (($1) + 4)|0; $10 = ($4>>>0)<($9>>>0); if (!($10)) { $11 = (($4) - ($1))|0; $12 = HEAP32[(1972716)>>2]|0; $13 = $12 << 1; $14 = ($11>>>0)>($13>>>0); if (!($14)) { $$2 = $0; return ($$2|0); } } $$2 = 0; return ($$2|0); } $15 = ($4>>>0)<($1>>>0); if (!($15)) { $16 = (($4) - ($1))|0; $17 = ($16>>>0)>(15); if (!($17)) { $$2 = $0; return ($$2|0); } $18 = (($0) + ($1)|0); $19 = $3 & 1; $20 = $19 | $1; $21 = $20 | 2; HEAP32[$2>>2] = $21; $22 = ((($18)) + 4|0); $23 = $16 | 3; HEAP32[$22>>2] = $23; $24 = ((($5)) + 4|0); $25 = HEAP32[$24>>2]|0; $26 = $25 | 1; HEAP32[$24>>2] = $26; _dispose_chunk($18,$16); $$2 = $0; return ($$2|0); } $27 = HEAP32[(1972260)>>2]|0; $28 = ($27|0)==($5|0); if ($28) { $29 = HEAP32[(1972248)>>2]|0; $30 = (($29) + ($4))|0; $31 = ($30>>>0)>($1>>>0); $32 = (($30) - ($1))|0; $33 = (($0) + ($1)|0); if (!($31)) { $$2 = 0; return ($$2|0); } $34 = $32 | 1; $35 = ((($33)) + 4|0); $36 = $3 & 1; $37 = $36 | $1; $38 = $37 | 2; HEAP32[$2>>2] = $38; HEAP32[$35>>2] = $34; HEAP32[(1972260)>>2] = $33; HEAP32[(1972248)>>2] = $32; $$2 = $0; return ($$2|0); } $39 = HEAP32[(1972256)>>2]|0; $40 = ($39|0)==($5|0); if ($40) { $41 = HEAP32[(1972244)>>2]|0; $42 = (($41) + ($4))|0; $43 = ($42>>>0)<($1>>>0); if ($43) { $$2 = 0; return ($$2|0); } $44 = (($42) - ($1))|0; $45 = ($44>>>0)>(15); if ($45) { $46 = (($0) + ($1)|0); $47 = (($0) + ($42)|0); $48 = $3 & 1; $49 = $48 | $1; $50 = $49 | 2; HEAP32[$2>>2] = $50; $51 = ((($46)) + 4|0); $52 = $44 | 1; HEAP32[$51>>2] = $52; HEAP32[$47>>2] = $44; $53 = ((($47)) + 4|0); $54 = HEAP32[$53>>2]|0; $55 = $54 & -2; HEAP32[$53>>2] = $55; $storemerge = $46;$storemerge1 = $44; } else { $56 = $3 & 1; $57 = $56 | $42; $58 = $57 | 2; HEAP32[$2>>2] = $58; $59 = (($0) + ($42)|0); $60 = ((($59)) + 4|0); $61 = HEAP32[$60>>2]|0; $62 = $61 | 1; HEAP32[$60>>2] = $62; $storemerge = 0;$storemerge1 = 0; } HEAP32[(1972244)>>2] = $storemerge1; HEAP32[(1972256)>>2] = $storemerge; $$2 = $0; return ($$2|0); } $63 = ((($5)) + 4|0); $64 = HEAP32[$63>>2]|0; $65 = $64 & 2; $66 = ($65|0)==(0); if (!($66)) { $$2 = 0; return ($$2|0); } $67 = $64 & -8; $68 = (($67) + ($4))|0; $69 = ($68>>>0)<($1>>>0); if ($69) { $$2 = 0; return ($$2|0); } $70 = (($68) - ($1))|0; $71 = (3)?($64 >>> 3):($64); $72 = ($64>>>0)<(256); do { if ($72) { $73 = ((($5)) + 8|0); $74 = HEAP32[$73>>2]|0; $75 = ((($5)) + 12|0); $76 = HEAP32[$75>>2]|0; $77 = ($76|0)==($74|0); if ($77) { $78 = 1 << $71; $79 = $78 ^ -1; $80 = HEAP32[493059]|0; $81 = $80 & $79; HEAP32[493059] = $81; break; } else { $82 = ((($74)) + 12|0); HEAP32[$82>>2] = $76; $83 = ((($76)) + 8|0); HEAP32[$83>>2] = $74; break; } } else { $84 = ((($5)) + 24|0); $85 = HEAP32[$84>>2]|0; $86 = ((($5)) + 12|0); $87 = HEAP32[$86>>2]|0; $88 = ($87|0)==($5|0); do { if ($88) { $93 = ((($5)) + 16|0); $94 = ((($93)) + 4|0); $95 = HEAP32[$94>>2]|0; $96 = ($95|0)==(0|0); if ($96) { $97 = HEAP32[$93>>2]|0; $98 = ($97|0)==(0|0); if ($98) { $$3 = 0; break; } else { $$1245$ph = $97;$$1248$ph = $93; } } else { $$1245$ph = $95;$$1248$ph = $94; } $$1245 = $$1245$ph;$$1248 = $$1248$ph; while(1) { $99 = ((($$1245)) + 20|0); $100 = HEAP32[$99>>2]|0; $101 = ($100|0)==(0|0); if ($101) { $102 = ((($$1245)) + 16|0); $103 = HEAP32[$102>>2]|0; $104 = ($103|0)==(0|0); if ($104) { break; } else { $$1245$be = $103;$$1248$be = $102; } } else { $$1245$be = $100;$$1248$be = $99; } $$1245 = $$1245$be;$$1248 = $$1248$be; } HEAP32[$$1248>>2] = 0; $$3 = $$1245; } else { $89 = ((($5)) + 8|0); $90 = HEAP32[$89>>2]|0; $91 = ((($90)) + 12|0); HEAP32[$91>>2] = $87; $92 = ((($87)) + 8|0); HEAP32[$92>>2] = $90; $$3 = $87; } } while(0); $105 = ($85|0)==(0|0); if (!($105)) { $106 = ((($5)) + 28|0); $107 = HEAP32[$106>>2]|0; $108 = (1972540 + ($107<<2)|0); $109 = HEAP32[$108>>2]|0; $110 = ($109|0)==($5|0); if ($110) { HEAP32[$108>>2] = $$3; $cond = ($$3|0)==(0|0); if ($cond) { $111 = 1 << $107; $112 = $111 ^ -1; $113 = HEAP32[(1972240)>>2]|0; $114 = $113 & $112; HEAP32[(1972240)>>2] = $114; break; } } else { $115 = ((($85)) + 16|0); $116 = HEAP32[$115>>2]|0; $117 = ($116|0)==($5|0); $118 = ((($85)) + 20|0); $$sink = $117 ? $115 : $118; HEAP32[$$sink>>2] = $$3; $119 = ($$3|0)==(0|0); if ($119) { break; } } $120 = ((($$3)) + 24|0); HEAP32[$120>>2] = $85; $121 = ((($5)) + 16|0); $122 = HEAP32[$121>>2]|0; $123 = ($122|0)==(0|0); if (!($123)) { $124 = ((($$3)) + 16|0); HEAP32[$124>>2] = $122; $125 = ((($122)) + 24|0); HEAP32[$125>>2] = $$3; } $126 = ((($121)) + 4|0); $127 = HEAP32[$126>>2]|0; $128 = ($127|0)==(0|0); if (!($128)) { $129 = ((($$3)) + 20|0); HEAP32[$129>>2] = $127; $130 = ((($127)) + 24|0); HEAP32[$130>>2] = $$3; } } } } while(0); $131 = ($70>>>0)<(16); if ($131) { $132 = $3 & 1; $133 = $132 | $68; $134 = $133 | 2; HEAP32[$2>>2] = $134; $135 = (($0) + ($68)|0); $136 = ((($135)) + 4|0); $137 = HEAP32[$136>>2]|0; $138 = $137 | 1; HEAP32[$136>>2] = $138; $$2 = $0; return ($$2|0); } else { $139 = (($0) + ($1)|0); $140 = $3 & 1; $141 = $140 | $1; $142 = $141 | 2; HEAP32[$2>>2] = $142; $143 = ((($139)) + 4|0); $144 = $70 | 3; HEAP32[$143>>2] = $144; $145 = (($0) + ($68)|0); $146 = ((($145)) + 4|0); $147 = HEAP32[$146>>2]|0; $148 = $147 | 1; HEAP32[$146>>2] = $148; _dispose_chunk($139,$70); $$2 = $0; return ($$2|0); } } function _dispose_chunk($0,$1) { $0 = $0|0; $1 = $1|0; var $$03649 = 0, $$0365$lcssa = 0, $$03658 = 0, $$0376 = 0, $$0383 = 0, $$1 = 0, $$1363 = 0, $$1371 = 0, $$1371$be = 0, $$1371$ph = 0, $$1374 = 0, $$1374$be = 0, $$1374$ph = 0, $$1378 = 0, $$1378$be = 0, $$1378$ph = 0, $$1382 = 0, $$1382$be = 0, $$1382$ph = 0, $$2 = 0; var $$3 = 0, $$3380 = 0, $$pre = 0, $$pre$phiZ2D = 0, $$sink = 0, $$sink24 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0; var $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0; var $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0; var $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0; var $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0; var $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0; var $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0; var $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0; var $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0; var $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0; var $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0; var $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0; var $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $cond = 0, $cond4 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (($0) + ($1)|0); $3 = ((($0)) + 4|0); $4 = HEAP32[$3>>2]|0; $5 = $4 & 1; $6 = ($5|0)==(0); do { if ($6) { $7 = HEAP32[$0>>2]|0; $8 = $4 & 3; $9 = ($8|0)==(0); if ($9) { return; } $10 = (0 - ($7))|0; $11 = (($0) + ($10)|0); $12 = (($7) + ($1))|0; $13 = HEAP32[(1972256)>>2]|0; $14 = ($13|0)==($11|0); if ($14) { $75 = ((($2)) + 4|0); $76 = HEAP32[$75>>2]|0; $77 = $76 & 3; $78 = ($77|0)==(3); if (!($78)) { $$1 = $11;$$1363 = $12; break; } $79 = ((($11)) + 4|0); $80 = $12 | 1; $81 = $76 & -2; HEAP32[(1972244)>>2] = $12; HEAP32[$75>>2] = $81; HEAP32[$79>>2] = $80; HEAP32[$2>>2] = $12; return; } $15 = (3)?($7 >>> 3):($7); $16 = ($7>>>0)<(256); if ($16) { $17 = ((($11)) + 8|0); $18 = HEAP32[$17>>2]|0; $19 = ((($11)) + 12|0); $20 = HEAP32[$19>>2]|0; $21 = ($20|0)==($18|0); if ($21) { $22 = 1 << $15; $23 = $22 ^ -1; $24 = HEAP32[493059]|0; $25 = $24 & $23; HEAP32[493059] = $25; $$1 = $11;$$1363 = $12; break; } else { $26 = ((($18)) + 12|0); HEAP32[$26>>2] = $20; $27 = ((($20)) + 8|0); HEAP32[$27>>2] = $18; $$1 = $11;$$1363 = $12; break; } } $28 = ((($11)) + 24|0); $29 = HEAP32[$28>>2]|0; $30 = ((($11)) + 12|0); $31 = HEAP32[$30>>2]|0; $32 = ($31|0)==($11|0); do { if ($32) { $37 = ((($11)) + 16|0); $38 = ((($37)) + 4|0); $39 = HEAP32[$38>>2]|0; $40 = ($39|0)==(0|0); if ($40) { $41 = HEAP32[$37>>2]|0; $42 = ($41|0)==(0|0); if ($42) { $$3 = 0; break; } else { $$1371$ph = $41;$$1374$ph = $37; } } else { $$1371$ph = $39;$$1374$ph = $38; } $$1371 = $$1371$ph;$$1374 = $$1374$ph; while(1) { $43 = ((($$1371)) + 20|0); $44 = HEAP32[$43>>2]|0; $45 = ($44|0)==(0|0); if ($45) { $46 = ((($$1371)) + 16|0); $47 = HEAP32[$46>>2]|0; $48 = ($47|0)==(0|0); if ($48) { break; } else { $$1371$be = $47;$$1374$be = $46; } } else { $$1371$be = $44;$$1374$be = $43; } $$1371 = $$1371$be;$$1374 = $$1374$be; } HEAP32[$$1374>>2] = 0; $$3 = $$1371; } else { $33 = ((($11)) + 8|0); $34 = HEAP32[$33>>2]|0; $35 = ((($34)) + 12|0); HEAP32[$35>>2] = $31; $36 = ((($31)) + 8|0); HEAP32[$36>>2] = $34; $$3 = $31; } } while(0); $49 = ($29|0)==(0|0); if ($49) { $$1 = $11;$$1363 = $12; } else { $50 = ((($11)) + 28|0); $51 = HEAP32[$50>>2]|0; $52 = (1972540 + ($51<<2)|0); $53 = HEAP32[$52>>2]|0; $54 = ($53|0)==($11|0); if ($54) { HEAP32[$52>>2] = $$3; $cond = ($$3|0)==(0|0); if ($cond) { $55 = 1 << $51; $56 = $55 ^ -1; $57 = HEAP32[(1972240)>>2]|0; $58 = $57 & $56; HEAP32[(1972240)>>2] = $58; $$1 = $11;$$1363 = $12; break; } } else { $59 = ((($29)) + 16|0); $60 = HEAP32[$59>>2]|0; $61 = ($60|0)==($11|0); $62 = ((($29)) + 20|0); $$sink = $61 ? $59 : $62; HEAP32[$$sink>>2] = $$3; $63 = ($$3|0)==(0|0); if ($63) { $$1 = $11;$$1363 = $12; break; } } $64 = ((($$3)) + 24|0); HEAP32[$64>>2] = $29; $65 = ((($11)) + 16|0); $66 = HEAP32[$65>>2]|0; $67 = ($66|0)==(0|0); if (!($67)) { $68 = ((($$3)) + 16|0); HEAP32[$68>>2] = $66; $69 = ((($66)) + 24|0); HEAP32[$69>>2] = $$3; } $70 = ((($65)) + 4|0); $71 = HEAP32[$70>>2]|0; $72 = ($71|0)==(0|0); if ($72) { $$1 = $11;$$1363 = $12; } else { $73 = ((($$3)) + 20|0); HEAP32[$73>>2] = $71; $74 = ((($71)) + 24|0); HEAP32[$74>>2] = $$3; $$1 = $11;$$1363 = $12; } } } else { $$1 = $0;$$1363 = $1; } } while(0); $82 = ((($2)) + 4|0); $83 = HEAP32[$82>>2]|0; $84 = $83 & 2; $85 = ($84|0)==(0); if ($85) { $86 = HEAP32[(1972260)>>2]|0; $87 = ($86|0)==($2|0); if ($87) { $88 = HEAP32[(1972248)>>2]|0; $89 = (($88) + ($$1363))|0; HEAP32[(1972248)>>2] = $89; HEAP32[(1972260)>>2] = $$1; $90 = $89 | 1; $91 = ((($$1)) + 4|0); HEAP32[$91>>2] = $90; $92 = HEAP32[(1972256)>>2]|0; $93 = ($$1|0)==($92|0); if (!($93)) { return; } HEAP32[(1972256)>>2] = 0; HEAP32[(1972244)>>2] = 0; return; } $94 = HEAP32[(1972256)>>2]|0; $95 = ($94|0)==($2|0); if ($95) { $96 = HEAP32[(1972244)>>2]|0; $97 = (($96) + ($$1363))|0; HEAP32[(1972244)>>2] = $97; HEAP32[(1972256)>>2] = $$1; $98 = $97 | 1; $99 = ((($$1)) + 4|0); HEAP32[$99>>2] = $98; $100 = (($$1) + ($97)|0); HEAP32[$100>>2] = $97; return; } $101 = $83 & -8; $102 = (($101) + ($$1363))|0; $103 = (3)?($83 >>> 3):($83); $104 = ($83>>>0)<(256); do { if ($104) { $105 = ((($2)) + 8|0); $106 = HEAP32[$105>>2]|0; $107 = ((($2)) + 12|0); $108 = HEAP32[$107>>2]|0; $109 = ($108|0)==($106|0); if ($109) { $110 = 1 << $103; $111 = $110 ^ -1; $112 = HEAP32[493059]|0; $113 = $112 & $111; HEAP32[493059] = $113; break; } else { $114 = ((($106)) + 12|0); HEAP32[$114>>2] = $108; $115 = ((($108)) + 8|0); HEAP32[$115>>2] = $106; break; } } else { $116 = ((($2)) + 24|0); $117 = HEAP32[$116>>2]|0; $118 = ((($2)) + 12|0); $119 = HEAP32[$118>>2]|0; $120 = ($119|0)==($2|0); do { if ($120) { $125 = ((($2)) + 16|0); $126 = ((($125)) + 4|0); $127 = HEAP32[$126>>2]|0; $128 = ($127|0)==(0|0); if ($128) { $129 = HEAP32[$125>>2]|0; $130 = ($129|0)==(0|0); if ($130) { $$3380 = 0; break; } else { $$1378$ph = $129;$$1382$ph = $125; } } else { $$1378$ph = $127;$$1382$ph = $126; } $$1378 = $$1378$ph;$$1382 = $$1382$ph; while(1) { $131 = ((($$1378)) + 20|0); $132 = HEAP32[$131>>2]|0; $133 = ($132|0)==(0|0); if ($133) { $134 = ((($$1378)) + 16|0); $135 = HEAP32[$134>>2]|0; $136 = ($135|0)==(0|0); if ($136) { break; } else { $$1378$be = $135;$$1382$be = $134; } } else { $$1378$be = $132;$$1382$be = $131; } $$1378 = $$1378$be;$$1382 = $$1382$be; } HEAP32[$$1382>>2] = 0; $$3380 = $$1378; } else { $121 = ((($2)) + 8|0); $122 = HEAP32[$121>>2]|0; $123 = ((($122)) + 12|0); HEAP32[$123>>2] = $119; $124 = ((($119)) + 8|0); HEAP32[$124>>2] = $122; $$3380 = $119; } } while(0); $137 = ($117|0)==(0|0); if (!($137)) { $138 = ((($2)) + 28|0); $139 = HEAP32[$138>>2]|0; $140 = (1972540 + ($139<<2)|0); $141 = HEAP32[$140>>2]|0; $142 = ($141|0)==($2|0); if ($142) { HEAP32[$140>>2] = $$3380; $cond4 = ($$3380|0)==(0|0); if ($cond4) { $143 = 1 << $139; $144 = $143 ^ -1; $145 = HEAP32[(1972240)>>2]|0; $146 = $145 & $144; HEAP32[(1972240)>>2] = $146; break; } } else { $147 = ((($117)) + 16|0); $148 = HEAP32[$147>>2]|0; $149 = ($148|0)==($2|0); $150 = ((($117)) + 20|0); $$sink24 = $149 ? $147 : $150; HEAP32[$$sink24>>2] = $$3380; $151 = ($$3380|0)==(0|0); if ($151) { break; } } $152 = ((($$3380)) + 24|0); HEAP32[$152>>2] = $117; $153 = ((($2)) + 16|0); $154 = HEAP32[$153>>2]|0; $155 = ($154|0)==(0|0); if (!($155)) { $156 = ((($$3380)) + 16|0); HEAP32[$156>>2] = $154; $157 = ((($154)) + 24|0); HEAP32[$157>>2] = $$3380; } $158 = ((($153)) + 4|0); $159 = HEAP32[$158>>2]|0; $160 = ($159|0)==(0|0); if (!($160)) { $161 = ((($$3380)) + 20|0); HEAP32[$161>>2] = $159; $162 = ((($159)) + 24|0); HEAP32[$162>>2] = $$3380; } } } } while(0); $163 = $102 | 1; $164 = ((($$1)) + 4|0); HEAP32[$164>>2] = $163; $165 = (($$1) + ($102)|0); HEAP32[$165>>2] = $102; $166 = HEAP32[(1972256)>>2]|0; $167 = ($$1|0)==($166|0); if ($167) { HEAP32[(1972244)>>2] = $102; return; } else { $$2 = $102; } } else { $168 = $83 & -2; HEAP32[$82>>2] = $168; $169 = $$1363 | 1; $170 = ((($$1)) + 4|0); HEAP32[$170>>2] = $169; $171 = (($$1) + ($$1363)|0); HEAP32[$171>>2] = $$1363; $$2 = $$1363; } $172 = (3)?($$2 >>> 3):($$2); $173 = ($$2>>>0)<(256); if ($173) { $174 = $172 << 1; $175 = (1972276 + ($174<<2)|0); $176 = HEAP32[493059]|0; $177 = 1 << $172; $178 = $176 & $177; $179 = ($178|0)==(0); if ($179) { $180 = $176 | $177; HEAP32[493059] = $180; $$pre = ((($175)) + 8|0); $$0383 = $175;$$pre$phiZ2D = $$pre; } else { $181 = ((($175)) + 8|0); $182 = HEAP32[$181>>2]|0; $$0383 = $182;$$pre$phiZ2D = $181; } HEAP32[$$pre$phiZ2D>>2] = $$1; $183 = ((($$0383)) + 12|0); HEAP32[$183>>2] = $$1; $184 = ((($$1)) + 8|0); HEAP32[$184>>2] = $$0383; $185 = ((($$1)) + 12|0); HEAP32[$185>>2] = $175; return; } $186 = (8)?($$2 >>> 8):($$2); $187 = ($186|0)==(0); if ($187) { $$0376 = 0; } else { $188 = ($$2>>>0)>(16777215); if ($188) { $$0376 = 31; } else { $189 = (($186) + 1048320)|0; $190 = (16)?($189 >>> 16):($189); $191 = $190 & 8; $192 = $186 << $191; $193 = (($192) + 520192)|0; $194 = (16)?($193 >>> 16):($193); $195 = $194 & 4; $196 = $195 | $191; $197 = $192 << $195; $198 = (($197) + 245760)|0; $199 = (16)?($198 >>> 16):($198); $200 = $199 & 2; $201 = $196 | $200; $202 = (14 - ($201))|0; $203 = $197 << $200; $204 = (15)?($203 >>> 15):($203); $205 = (($202) + ($204))|0; $206 = $205 << 1; $207 = (($205) + 7)|0; $208 = ($207)?($$2 >>> $207):($$2); $209 = $208 & 1; $210 = $209 | $206; $$0376 = $210; } } $211 = (1972540 + ($$0376<<2)|0); $212 = ((($$1)) + 28|0); HEAP32[$212>>2] = $$0376; $213 = ((($$1)) + 16|0); $214 = ((($$1)) + 20|0); HEAP32[$214>>2] = 0; HEAP32[$213>>2] = 0; $215 = HEAP32[(1972240)>>2]|0; $216 = 1 << $$0376; $217 = $215 & $216; $218 = ($217|0)==(0); if ($218) { $219 = $215 | $216; HEAP32[(1972240)>>2] = $219; HEAP32[$211>>2] = $$1; $220 = ((($$1)) + 24|0); HEAP32[$220>>2] = $211; $221 = ((($$1)) + 12|0); HEAP32[$221>>2] = $$1; $222 = ((($$1)) + 8|0); HEAP32[$222>>2] = $$1; return; } $223 = HEAP32[$211>>2]|0; $224 = ((($223)) + 4|0); $225 = HEAP32[$224>>2]|0; $226 = $225 & -8; $227 = ($226|0)==($$2|0); L104: do { if ($227) { $$0365$lcssa = $223; } else { $228 = ($$0376|0)==(31); $229 = (1)?($$0376 >>> 1):($$0376); $230 = (25 - ($229))|0; $231 = $228 ? 0 : $230; $232 = $$2 << $231; $$03649 = $232;$$03658 = $223; while(1) { $239 = (31)?($$03649 >>> 31):($$03649); $240 = (((($$03658)) + 16|0) + ($239<<2)|0); $235 = HEAP32[$240>>2]|0; $241 = ($235|0)==(0|0); if ($241) { break; } $233 = $$03649 << 1; $234 = ((($235)) + 4|0); $236 = HEAP32[$234>>2]|0; $237 = $236 & -8; $238 = ($237|0)==($$2|0); if ($238) { $$0365$lcssa = $235; break L104; } else { $$03649 = $233;$$03658 = $235; } } HEAP32[$240>>2] = $$1; $242 = ((($$1)) + 24|0); HEAP32[$242>>2] = $$03658; $243 = ((($$1)) + 12|0); HEAP32[$243>>2] = $$1; $244 = ((($$1)) + 8|0); HEAP32[$244>>2] = $$1; return; } } while(0); $245 = ((($$0365$lcssa)) + 8|0); $246 = HEAP32[$245>>2]|0; $247 = ((($246)) + 12|0); HEAP32[$247>>2] = $$1; HEAP32[$245>>2] = $$1; $248 = ((($$1)) + 8|0); HEAP32[$248>>2] = $246; $249 = ((($$1)) + 12|0); HEAP32[$249>>2] = $$0365$lcssa; $250 = ((($$1)) + 24|0); HEAP32[$250>>2] = 0; return; } function ___errno_location() { var label = 0, sp = 0; sp = STACKTOP; return (1972796|0); } function _pthread_self() { var label = 0, sp = 0; sp = STACKTOP; return (22676|0); } function ___lctrans_impl($0,$1) { $0 = $0|0; $1 = $1|0; var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)==(0|0); if ($2) { $$0 = 0; } else { $3 = HEAP32[$1>>2]|0; $4 = ((($1)) + 4|0); $5 = HEAP32[$4>>2]|0; $6 = (___mo_lookup($3,$5,$0)|0); $$0 = $6; } $7 = ($$0|0)==(0|0); $8 = $7 ? $0 : $$0; return ($8|0); } function ___mo_lookup($0,$1,$2) { $0 = $0|0; $1 = $1|0; $2 = $2|0; var $$090 = 0, $$094 = 0, $$191 = 0, $$195 = 0, $$4 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond102 = 0, $or$cond104 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $3 = HEAP32[$0>>2]|0; $4 = (($3) + 1794895138)|0; $5 = ((($0)) + 8|0); $6 = HEAP32[$5>>2]|0; $7 = (_swapc($6,$4)|0); $8 = ((($0)) + 12|0); $9 = HEAP32[$8>>2]|0; $10 = (_swapc($9,$4)|0); $11 = ((($0)) + 16|0); $12 = HEAP32[$11>>2]|0; $13 = (_swapc($12,$4)|0); $14 = (2)?($1 >>> 2):($1); $15 = ($7>>>0)<($14>>>0); L1: do { if ($15) { $16 = $7 << 2; $17 = (($1) - ($16))|0; $18 = ($10>>>0)<($17>>>0); $19 = ($13>>>0)<($17>>>0); $or$cond = $18 & $19; if ($or$cond) { $20 = $13 | $10; $21 = $20 & 3; $22 = ($21|0)==(0); if ($22) { $23 = (2)?($10 >>> 2):($10); $24 = (2)?($13 >>> 2):($13); $$090 = 0;$$094 = $7; while(1) { $25 = (1)?($$094 >>> 1):($$094); $26 = (($$090) + ($25))|0; $27 = $26 << 1; $28 = (($27) + ($23))|0; $29 = (($0) + ($28<<2)|0); $30 = HEAP32[$29>>2]|0; $31 = (_swapc($30,$4)|0); $32 = (($28) + 1)|0; $33 = (($0) + ($32<<2)|0); $34 = HEAP32[$33>>2]|0; $35 = (_swapc($34,$4)|0); $36 = ($35>>>0)<($1>>>0); $37 = (($1) - ($35))|0; $38 = ($31>>>0)<($37>>>0); $or$cond102 = $36 & $38; if (!($or$cond102)) { $$4 = 0; break L1; } $39 = (($35) + ($31))|0; $40 = (($0) + ($39)|0); $41 = HEAP8[$40>>0]|0; $42 = ($41<<24>>24)==(0); if (!($42)) { $$4 = 0; break L1; } $43 = (($0) + ($35)|0); $44 = (_strcmp($2,$43)|0); $45 = ($44|0)==(0); if ($45) { break; } $62 = ($$094|0)==(1); $63 = ($44|0)<(0); if ($62) { $$4 = 0; break L1; } $$191 = $63 ? $$090 : $26; $64 = (($$094) - ($25))|0; $$195 = $63 ? $25 : $64; $$090 = $$191;$$094 = $$195; } $46 = (($27) + ($24))|0; $47 = (($0) + ($46<<2)|0); $48 = HEAP32[$47>>2]|0; $49 = (_swapc($48,$4)|0); $50 = (($46) + 1)|0; $51 = (($0) + ($50<<2)|0); $52 = HEAP32[$51>>2]|0; $53 = (_swapc($52,$4)|0); $54 = ($53>>>0)<($1>>>0); $55 = (($1) - ($53))|0; $56 = ($49>>>0)<($55>>>0); $or$cond104 = $54 & $56; if ($or$cond104) { $57 = (($0) + ($53)|0); $58 = (($53) + ($49))|0; $59 = (($0) + ($58)|0); $60 = HEAP8[$59>>0]|0; $61 = ($60<<24>>24)==(0); $spec$select = $61 ? $57 : 0; $$4 = $spec$select; } else { $$4 = 0; } } else { $$4 = 0; } } else { $$4 = 0; } } else { $$4 = 0; } } while(0); return ($$4|0); } function _swapc($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, $3 = 0, $spec$select = 0, label = 0, sp = 0; sp = STACKTOP; $2 = ($1|0)==(0); $3 = (_llvm_bswap_i32(($0|0))|0); $spec$select = $2 ? $0 : $3; return ($spec$select|0); } function _strcmp($0,$1) { $0 = $0|0; $1 = $1|0; var $$011 = 0, $$0710 = 0, $$lcssa = 0, $$lcssa8 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond9 = 0, label = 0; var sp = 0; sp = STACKTOP; $2 = HEAP8[$0>>0]|0; $3 = HEAP8[$1>>0]|0; $4 = ($2<<24>>24)!=($3<<24>>24); $5 = ($2<<24>>24)==(0); $or$cond9 = $5 | $4; if ($or$cond9) { $$lcssa = $3;$$lcssa8 = $2; } else { $$011 = $1;$$0710 = $0; while(1) { $6 = ((($$0710)) + 1|0); $7 = ((($$011)) + 1|0); $8 = HEAP8[$6>>0]|0; $9 = HEAP8[$7>>0]|0; $10 = ($8<<24>>24)!=($9<<24>>24); $11 = ($8<<24>>24)==(0); $or$cond = $11 | $10; if ($or$cond) { $$lcssa = $9;$$lcssa8 = $8; break; } else { $$011 = $7;$$0710 = $6; } } } $12 = $$lcssa8&255; $13 = $$lcssa&255; $14 = (($12) - ($13))|0; return ($14|0); } function _strerror($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (___pthread_self_875()|0); $2 = ((($1)) + 188|0); $3 = HEAP32[$2>>2]|0; $4 = (___strerror_l($0,$3)|0); return ($4|0); } function ___pthread_self_875() { var $0 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_pthread_self()|0); return ($0|0); } function ___strerror_l($0,$1) { $0 = $0|0; $1 = $1|0; var $$012$lcssa = 0, $$01214 = 0, $$016 = 0, $$113 = 0, $$115 = 0, $$115$ph = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; var $9 = 0, label = 0, sp = 0; sp = STACKTOP; $$016 = 0; while(1) { $2 = (11200 + ($$016)|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = ($4|0)==($0|0); if ($5) { label = 4; break; } $6 = (($$016) + 1)|0; $7 = ($6|0)==(87); if ($7) { $$115$ph = 87; label = 5; break; } else { $$016 = $6; } } if ((label|0) == 4) { $8 = ($$016|0)==(0); if ($8) { $$012$lcssa = 11296; } else { $$115$ph = $$016; label = 5; } } if ((label|0) == 5) { $$01214 = 11296;$$115 = $$115$ph; while(1) { $$113 = $$01214; while(1) { $9 = HEAP8[$$113>>0]|0; $10 = ($9<<24>>24)==(0); $11 = ((($$113)) + 1|0); if ($10) { break; } else { $$113 = $11; } } $12 = (($$115) + -1)|0; $13 = ($12|0)==(0); if ($13) { $$012$lcssa = $11; break; } else { $$01214 = $11;$$115 = $12; } } } $14 = ((($1)) + 20|0); $15 = HEAP32[$14>>2]|0; $16 = (___lctrans($$012$lcssa,$15)|0); return ($16|0); } function ___lctrans($0,$1) { $0 = $0|0; $1 = $1|0; var $2 = 0, label = 0, sp = 0; sp = STACKTOP; $2 = (___lctrans_impl($0,$1)|0); return ($2|0); } function ___muldsi3($a, $b) { $a = $a | 0; $b = $b | 0; var $1 = 0, $2 = 0, $3 = 0, $6 = 0, $8 = 0, $11 = 0, $12 = 0; $1 = $a & 65535; $2 = $b & 65535; $3 = Math_imul($2, $1) | 0; $6 = $a >>> 16; $8 = ($3 >>> 16) + (Math_imul($2, $6) | 0) | 0; $11 = $b >>> 16; $12 = Math_imul($11, $1) | 0; return (setTempRet0(((($8 >>> 16) + (Math_imul($11, $6) | 0) | 0) + ((($8 & 65535) + $12 | 0) >>> 16) | 0) | 0), 0 | ($8 + $12 << 16 | $3 & 65535)) | 0; } function ___muldi3($a$0, $a$1, $b$0, $b$1) { $a$0 = $a$0 | 0; $a$1 = $a$1 | 0; $b$0 = $b$0 | 0; $b$1 = $b$1 | 0; var $x_sroa_0_0_extract_trunc = 0, $y_sroa_0_0_extract_trunc = 0, $1$0 = 0, $1$1 = 0, $2 = 0; $x_sroa_0_0_extract_trunc = $a$0; $y_sroa_0_0_extract_trunc = $b$0; $1$0 = ___muldsi3($x_sroa_0_0_extract_trunc, $y_sroa_0_0_extract_trunc) | 0; $1$1 = (getTempRet0() | 0); $2 = Math_imul($a$1, $y_sroa_0_0_extract_trunc) | 0; return (setTempRet0((((Math_imul($b$1, $x_sroa_0_0_extract_trunc) | 0) + $2 | 0) + $1$1 | $1$1 & 0) | 0), 0 | $1$0 & -1) | 0; } function _bitshift64Lshr(low, high, bits) { low = low|0; high = high|0; bits = bits|0; var ander = 0; if ((bits|0) < 32) { ander = ((1 << bits) - 1)|0; setTempRet0((high >>> bits) | 0); return (low >>> bits) | ((high&ander) << (32 - bits)); } setTempRet0((0) | 0); return (high >>> (bits - 32))|0; } function _i64Add(a, b, c, d) { /* x = a + b*2^32 y = c + d*2^32 result = l + h*2^32 */ a = a|0; b = b|0; c = c|0; d = d|0; var l = 0, h = 0; l = (a + c)>>>0; h = (b + d + (((l>>>0) < (a>>>0))|0))>>>0; // Add carry from low word to high word on overflow. return ((setTempRet0((h) | 0),l|0)|0); } function _i64Subtract(a, b, c, d) { a = a|0; b = b|0; c = c|0; d = d|0; var l = 0, h = 0; l = (a - c)>>>0; h = (b - d)>>>0; h = (b - d - (((c>>>0) > (a>>>0))|0))>>>0; // Borrow one from high word to low word on underflow. return ((setTempRet0((h) | 0),l|0)|0); } function _llvm_bswap_i32(x) { x = x|0; return (((x&0xff)<<24) | (((x>>8)&0xff)<<16) | (((x>>16)&0xff)<<8) | (x>>>24))|0; } function _memcpy(dest, src, num) { dest = dest|0; src = src|0; num = num|0; var ret = 0; var aligned_dest_end = 0; var block_aligned_dest_end = 0; var dest_end = 0; // Test against a benchmarked cutoff limit for when HEAPU8.set() becomes faster to use. if ((num|0) >= 8192) { _emscripten_memcpy_big(dest|0, src|0, num|0)|0; return dest|0; } ret = dest|0; dest_end = (dest + num)|0; if ((dest&3) == (src&3)) { // The initial unaligned < 4-byte front. while (dest & 3) { if ((num|0) == 0) return ret|0; HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); dest = (dest+1)|0; src = (src+1)|0; num = (num-1)|0; } aligned_dest_end = (dest_end & -4)|0; block_aligned_dest_end = (aligned_dest_end - 64)|0; while ((dest|0) <= (block_aligned_dest_end|0) ) { HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); HEAP32[(((dest)+(4))>>2)]=((HEAP32[(((src)+(4))>>2)])|0); HEAP32[(((dest)+(8))>>2)]=((HEAP32[(((src)+(8))>>2)])|0); HEAP32[(((dest)+(12))>>2)]=((HEAP32[(((src)+(12))>>2)])|0); HEAP32[(((dest)+(16))>>2)]=((HEAP32[(((src)+(16))>>2)])|0); HEAP32[(((dest)+(20))>>2)]=((HEAP32[(((src)+(20))>>2)])|0); HEAP32[(((dest)+(24))>>2)]=((HEAP32[(((src)+(24))>>2)])|0); HEAP32[(((dest)+(28))>>2)]=((HEAP32[(((src)+(28))>>2)])|0); HEAP32[(((dest)+(32))>>2)]=((HEAP32[(((src)+(32))>>2)])|0); HEAP32[(((dest)+(36))>>2)]=((HEAP32[(((src)+(36))>>2)])|0); HEAP32[(((dest)+(40))>>2)]=((HEAP32[(((src)+(40))>>2)])|0); HEAP32[(((dest)+(44))>>2)]=((HEAP32[(((src)+(44))>>2)])|0); HEAP32[(((dest)+(48))>>2)]=((HEAP32[(((src)+(48))>>2)])|0); HEAP32[(((dest)+(52))>>2)]=((HEAP32[(((src)+(52))>>2)])|0); HEAP32[(((dest)+(56))>>2)]=((HEAP32[(((src)+(56))>>2)])|0); HEAP32[(((dest)+(60))>>2)]=((HEAP32[(((src)+(60))>>2)])|0); dest = (dest+64)|0; src = (src+64)|0; } while ((dest|0) < (aligned_dest_end|0) ) { HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); dest = (dest+4)|0; src = (src+4)|0; } } else { // In the unaligned copy case, unroll a bit as well. aligned_dest_end = (dest_end - 4)|0; while ((dest|0) < (aligned_dest_end|0) ) { HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); HEAP8[(((dest)+(1))>>0)]=((HEAP8[(((src)+(1))>>0)])|0); HEAP8[(((dest)+(2))>>0)]=((HEAP8[(((src)+(2))>>0)])|0); HEAP8[(((dest)+(3))>>0)]=((HEAP8[(((src)+(3))>>0)])|0); dest = (dest+4)|0; src = (src+4)|0; } } // The remaining unaligned < 4 byte tail. while ((dest|0) < (dest_end|0)) { HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); dest = (dest+1)|0; src = (src+1)|0; } return ret|0; } function _memset(ptr, value, num) { ptr = ptr|0; value = value|0; num = num|0; var end = 0, aligned_end = 0, block_aligned_end = 0, value4 = 0; end = (ptr + num)|0; value = value & 0xff; if ((num|0) >= 67 /* 64 bytes for an unrolled loop + 3 bytes for unaligned head*/) { while ((ptr&3) != 0) { HEAP8[((ptr)>>0)]=value; ptr = (ptr+1)|0; } aligned_end = (end & -4)|0; value4 = value | (value << 8) | (value << 16) | (value << 24); block_aligned_end = (aligned_end - 64)|0; while((ptr|0) <= (block_aligned_end|0)) { HEAP32[((ptr)>>2)]=value4; HEAP32[(((ptr)+(4))>>2)]=value4; HEAP32[(((ptr)+(8))>>2)]=value4; HEAP32[(((ptr)+(12))>>2)]=value4; HEAP32[(((ptr)+(16))>>2)]=value4; HEAP32[(((ptr)+(20))>>2)]=value4; HEAP32[(((ptr)+(24))>>2)]=value4; HEAP32[(((ptr)+(28))>>2)]=value4; HEAP32[(((ptr)+(32))>>2)]=value4; HEAP32[(((ptr)+(36))>>2)]=value4; HEAP32[(((ptr)+(40))>>2)]=value4; HEAP32[(((ptr)+(44))>>2)]=value4; HEAP32[(((ptr)+(48))>>2)]=value4; HEAP32[(((ptr)+(52))>>2)]=value4; HEAP32[(((ptr)+(56))>>2)]=value4; HEAP32[(((ptr)+(60))>>2)]=value4; ptr = (ptr + 64)|0; } while ((ptr|0) < (aligned_end|0) ) { HEAP32[((ptr)>>2)]=value4; ptr = (ptr+4)|0; } } // The remaining bytes. while ((ptr|0) < (end|0)) { HEAP8[((ptr)>>0)]=value; ptr = (ptr+1)|0; } return (end-num)|0; } function _sbrk(increment) { increment = increment|0; var oldDynamicTop = 0; var oldDynamicTopOnChange = 0; var newDynamicTop = 0; var totalMemory = 0; oldDynamicTop = HEAP32[DYNAMICTOP_PTR>>2]|0; newDynamicTop = oldDynamicTop + increment | 0; if (((increment|0) > 0 & (newDynamicTop|0) < (oldDynamicTop|0)) // Detect and fail if we would wrap around signed 32-bit int. | (newDynamicTop|0) < 0) { // Also underflow, sbrk() should be able to be used to subtract. ___setErrNo(12); return -1; } totalMemory = _emscripten_get_heap_size()|0; if ((newDynamicTop|0) > (totalMemory|0)) { if ((_emscripten_resize_heap(newDynamicTop|0)|0) == 0) { ___setErrNo(12); return -1; } } HEAP32[DYNAMICTOP_PTR>>2] = newDynamicTop|0; return oldDynamicTop|0; } function dynCall_di(index,a1) { index = index|0; a1=a1|0; return +FUNCTION_TABLE_di[index&31](a1|0); } function dynCall_i(index) { index = index|0; return FUNCTION_TABLE_i[index&3]()|0; } function dynCall_id(index,a1) { index = index|0; a1=+a1; return FUNCTION_TABLE_id[index&3](+a1)|0; } function dynCall_ii(index,a1) { index = index|0; a1=a1|0; return FUNCTION_TABLE_ii[index&31](a1|0)|0; } function dynCall_iid(index,a1,a2) { index = index|0; a1=a1|0; a2=+a2; return FUNCTION_TABLE_iid[index&15](a1|0,+a2)|0; } function dynCall_iii(index,a1,a2) { index = index|0; a1=a1|0; a2=a2|0; return FUNCTION_TABLE_iii[index&127](a1|0,a2|0)|0; } function dynCall_iiii(index,a1,a2,a3) { index = index|0; a1=a1|0; a2=a2|0; a3=a3|0; return FUNCTION_TABLE_iiii[index&31](a1|0,a2|0,a3|0)|0; } function dynCall_iiiii(index,a1,a2,a3,a4) { index = index|0; a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; return FUNCTION_TABLE_iiiii[index&63](a1|0,a2|0,a3|0,a4|0)|0; } function dynCall_iiiiiii(index,a1,a2,a3,a4,a5,a6) { index = index|0; a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; a5=a5|0; a6=a6|0; return FUNCTION_TABLE_iiiiiii[index&3](a1|0,a2|0,a3|0,a4|0,a5|0,a6|0)|0; } function dynCall_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7) { index = index|0; a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; a5=a5|0; a6=a6|0; a7=a7|0; return FUNCTION_TABLE_iiiiiiii[index&7](a1|0,a2|0,a3|0,a4|0,a5|0,a6|0,a7|0)|0; } function dynCall_v(index) { index = index|0; FUNCTION_TABLE_v[index&127](); } function dynCall_vd(index,a1) { index = index|0; a1=+a1; FUNCTION_TABLE_vd[index&1](+a1); } function dynCall_vdd(index,a1,a2) { index = index|0; a1=+a1; a2=+a2; FUNCTION_TABLE_vdd[index&1](+a1,+a2); } function dynCall_vi(index,a1) { index = index|0; a1=a1|0; FUNCTION_TABLE_vi[index&511](a1|0); } function dynCall_vid(index,a1,a2) { index = index|0; a1=a1|0; a2=+a2; FUNCTION_TABLE_vid[index&63](a1|0,+a2); } function dynCall_vidd(index,a1,a2,a3) { index = index|0; a1=a1|0; a2=+a2; a3=+a3; FUNCTION_TABLE_vidd[index&3](a1|0,+a2,+a3); } function dynCall_vii(index,a1,a2) { index = index|0; a1=a1|0; a2=a2|0; FUNCTION_TABLE_vii[index&255](a1|0,a2|0); } function dynCall_viii(index,a1,a2,a3) { index = index|0; a1=a1|0; a2=a2|0; a3=a3|0; FUNCTION_TABLE_viii[index&15](a1|0,a2|0,a3|0); } function dynCall_viiii(index,a1,a2,a3,a4) { index = index|0; a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; FUNCTION_TABLE_viiii[index&31](a1|0,a2|0,a3|0,a4|0); } function dynCall_viiiii(index,a1,a2,a3,a4,a5) { index = index|0; a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; a5=a5|0; FUNCTION_TABLE_viiiii[index&3](a1|0,a2|0,a3|0,a4|0,a5|0); } function b0(p0) { p0 = p0|0; abort(0);return +0; } function b1() { ; abort(1);return 0; } function b2(p0) { p0 = +p0; abort(2);return 0; } function b3(p0) { p0 = p0|0; abort(3);return 0; } function b4(p0,p1) { p0 = p0|0;p1 = +p1; abort(4);return 0; } function b5(p0,p1) { p0 = p0|0;p1 = p1|0; abort(5);return 0; } function b6(p0,p1,p2) { p0 = p0|0;p1 = p1|0;p2 = p2|0; abort(6);return 0; } function b7(p0,p1,p2,p3) { p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0; abort(7);return 0; } function b8(p0,p1,p2,p3,p4,p5) { p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0;p4 = p4|0;p5 = p5|0; abort(8);return 0; } function b9(p0,p1,p2,p3,p4,p5,p6) { p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0;p4 = p4|0;p5 = p5|0;p6 = p6|0; abort(9);return 0; } function b10() { ; abort(10); } function b11(p0) { p0 = +p0; abort(11); } function b12(p0,p1) { p0 = +p0;p1 = +p1; abort(12); } function b13(p0) { p0 = p0|0; abort(13); } function b14(p0,p1) { p0 = p0|0;p1 = +p1; abort(14); } function b15(p0,p1,p2) { p0 = p0|0;p1 = +p1;p2 = +p2; abort(15); } function b16(p0,p1) { p0 = p0|0;p1 = p1|0; abort(16); } function b17(p0,p1,p2) { p0 = p0|0;p1 = p1|0;p2 = p2|0; abort(17); } function b18(p0,p1,p2,p3) { p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0; abort(18); } function b19(p0,p1,p2,p3,p4) { p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0;p4 = p4|0; abort(19); } // EMSCRIPTEN_END_FUNCS var FUNCTION_TABLE_di = [b0,_HumanModel_GetNameY,_HumanModel_GetEyeY,_BlockModel_GetNameY,_BlockModel_GetEyeY,_SkinnedCubeModel_GetNameY,_SkinnedCubeModel_GetEyeY,_SittingModel_GetEyeY,_HeadModel_GetEyeY,_ChibiModel_GetNameY,_ChibiModel_GetEyeY,_SpiderModel_GetNameY,_SpiderModel_GetEyeY,_SheepModel_GetNameY,_SheepModel_GetEyeY,_PigModel_GetNameY,_PigModel_GetEyeY,_CreeperModel_GetNameY,_CreeperModel_GetEyeY,_ChickenModel_GetNameY,_ChickenModel_GetEyeY,_HoldModel_GetEyeY,_CustomModel_GetNameY,_CustomModel_GetEyeY,b0,b0,b0,b0,b0 ,b0,b0,b0]; var FUNCTION_TABLE_i = [b1,_TextInputWidget_GetMaxLines,_ChatInputWidget_GetMaxLines,b1]; var FUNCTION_TABLE_id = [b2,_FirstPersonCamera_Zoom,_ThirdPersonCamera_Zoom,b2]; var FUNCTION_TABLE_ii = [b3,_Entity_GetColor,_HeldBlockRenderer_GetCol,_Deflate_StreamClose,_GZip_StreamClose,_IsRopeCollide,_IsLavaCollide,_IsWaterCollide,_LocalPlayer_IsSolidCollide,_PhysicsComp_TouchesLiquid,_PhysicsComp_TouchesSlipperyIce,_Sounds_CheckNonSolid,_Sounds_CheckSolid,_Dat_Load,_Cw_Load,_Lvl_Load,_Fcm_Load,_TouchesSolid,_Options_LoadFilter,_CustomParticle_CanPass,_RainParticle_CanPass,_TerrainParticle_CanPass,_ClipBlock,_ClipCamera,_Stream_DefaultClose,_Stream_FileClose,_SelectZipEntry,b3,b3 ,b3,b3,b3]; var FUNCTION_TABLE_iid = [b4,_ListScreen_MouseScroll,_Screen_TMouseScroll,_HUDscreen_MouseScroll,_Screen_FMouseScroll,_ChatScreen_MouseScroll,_InventoryScreen_MouseScroll,_Widget_MouseScroll,_ScrollbarWidget_MouseScroll,_HotbarWidget_MouseScroll,_TableWidget_MouseScroll,b4,b4,b4,b4,b4]; var FUNCTION_TABLE_iii = [b5,_ListScreen_KeyDown,_Screen_TKeyPress,_Screen_TText,_Screen_InputDown,_EditHotkeyScreen_KeyDown,_EditHotkeyScreen_KeyPress,_EditHotkeyScreen_TextChanged,_SaveLevelScreen_KeyDown,_SaveLevelScreen_KeyPress,_SaveLevelScreen_TextChanged,_GenLevelScreen_KeyDown,_GenLevelScreen_KeyPress,_GenLevelScreen_TextChanged,_MenuInputOverlay_KeyDown,_MenuInputOverlay_KeyPress,_MenuInputOverlay_TextChanged,_KeyBindsScreen_KeyDown,_TexIdsOverlay_KeyDown,_Screen_FKeyPress,_Screen_FText,_HUDScreen_KeyDown,_Screen_FInput,_ChatScreen_KeyDown,_ChatScreen_KeyPress,_ChatScreen_TextChanged,_InventoryScreen_KeyDown,_Screen_TInput,_Hex_ValidChar ,_Hex_ValidString,_Hex_ValidValue,_Int_ValidChar,_Int_ValidString,_Int_ValidValue,_Float_ValidChar,_Float_ValidString,_Float_ValidValue,_Path_ValidChar,_Path_ValidString,_String_ValidChar,_String_ValidString,_Widget_InputDown,_TextWidget_Render2,_ButtonWidget_Render2,_HotbarWidget_KeyDown,_TableWidget_KeyDown,_InputWidget_KeyDown,_TextInputWidget_Render2,_ChatInputWidget_KeyDown,_ThumbstickWidget_Render2,_Audio_DescribeError,_Platform_DescribeError,_DescribeSimple,_TabListOverlay_PlayerCompare,_TabListOverlay_GroupCompare,_Stream_DefaultReadU8,_Stream_DefaultSkip,_Stream_DefaultSeek,_Stream_DefaultGet ,_Stream_FileSkip,_Stream_FileSeek,_Stream_FilePosition,_Stream_FileLength,_Stream_PortionReadU8,_Stream_PortionSkip,_Stream_PortionPosition,_Stream_PortionLength,_Stream_MemoryReadU8,_Stream_MemorySkip,_Stream_MemorySeek,_Stream_MemoryPosition,_Stream_MemoryLength,_Stream_BufferedReadU8,_Stream_BufferedSeek,_Http_DescribeError,_TextInputWidget_AllowedChar,_InputWidget_AllowedChar,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5 ,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5 ,b5,b5,b5,b5,b5,b5,b5,b5,b5]; var FUNCTION_TABLE_iiii = [b6,_ProcessZipEntry,_OnMouseWheel_2313,_OnMouseButton,_OnMouseMove,_OnFullscreenChange,_OnFocus,_OnResize_2315,_OnBeforeUnload,_OnVisibilityChanged_2316,_OnKeyDown,_OnKeyUp,_OnKeyPress_2317,_OnTouchStart,_OnTouchMove,_OnTouchEnd,_OnCanvasResize,_GLContext_OnLost,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6 ,b6,b6,b6]; var FUNCTION_TABLE_iiiii = [b7,_Menu_PointerDown,_Menu_PointerMove,_GenLevelScreen_PointerDown,_OptionsGroupScreen_PointerMove,_MenuOptionsScreen_PointerMove,_MenuInputOverlay_PointerDown,_MenuInputOverlay_PointerMove,_HUDscreen_PointerDown,_HUDScreen_PointerMove,_TabListOverlay_PointerDown,_Screen_FPointer,_ChatScreen_PointerDown,_InventoryScreen_PointerDown,_InventoryScreen_PointerMove,_Screen_TPointer,_TouchScreen_PointerDown,_Widget_Pointer,_Widget_PointerMove,_ScrollbarWidget_PointerDown,_ScrollbarWidget_PointerMove,_HotbarWidget_PointerDown,_HotbarWidget_PointerMove,_TableWidget_PointerDown,_TableWidget_PointerMove,_TextInputWidget_PointerDown,_InputWidget_PointerDown,_SpecialInputWidget_PointerDown,_Inflate_StreamRead ,_Deflate_StreamWrite,_GZip_StreamWriteFirst,_GZip_StreamWrite,_Stream_DefaultRead,_Stream_DefaultWrite,_Stream_FileRead,_Stream_FileWrite,_Stream_PortionRead,_Stream_MemoryRead,_Stream_BufferedRead,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7 ,b7,b7,b7,b7,b7]; var FUNCTION_TABLE_iiiiiii = [b8,_Adv_StretchXLiquid,_NormalBuilder_StretchXLiquid,b8]; var FUNCTION_TABLE_iiiiiiii = [b9,_Adv_StretchX,_Adv_StretchZ,_NormalBuilder_StretchX,_NormalBuilder_StretchZ,b9,b9,b9]; var FUNCTION_TABLE_v = [b10,_OnInit,_Animations_Clear,_OnInit_1,_OnFree,_OnInit_43,_OnFree_44,_OnInit_79,_OnReset,_OnInit_140,_OnNewMapLoaded,_OnInit_145,_Window_EnableRawMouse,_Window_DisableRawMouse,_OnInit_152,_OnFree_153,_OnReset_154,_OnInit_257,_OnFree_258,_OnReset_259,_Tablist_Init,_TabList_Clear,_Entities_Init,_Entities_Free,_LocalPlayer_Reset,_LocalPlayer_OnNewMap,_OnInit_402,_OnFree_403,_OnReset_404 ,_OnNewMapLoaded_405,_OnInit_687,_OnInit_849,_OnFree_850,_OnReset_851,_OnInit_881,_Http_Init,_Http_ClearPending,_OnInit_1017,_OnFree_1018,_OnInit_1034,_OnReset_1035,_OnInit_1047,_OnReset_1048,_OnNewMapLoaded_1049,_OnInit_1122,_OnNewMap,_OnNewMapLoaded_1123,_OnInit_1408,_OnFree_1409,_OnReset_1410,_HumanModel_MakeParts,_Model_NoParts,_SkinnedCubeModel_MakeParts,_ChibiModel_MakeParts,_SpiderModel_MakeParts,_SkeletonModel_MakeParts,_SheepModel_MakeParts,_PigModel_MakeParts,_CreeperModel_MakeParts ,_ChickenModel_MakeParts,_OnInit_1498,_OnFree_1499,_OnReset_1500,_OnInit_1538,_OnFree_1539,_OnInit_1642,_OnReset_1643,_OnInit_1800,_OnFree_1801,_OnReset_1802,_OnInit_1812,_OnFree_1813,_OnReset_1814,_OnNewMap_1815,_OnInit_2024,_OnFree_2025,_OnReset_2026,_World_Reset,_Adv_PrePrepareChunk,_DefaultPrePrepateChunk,_GL_SetupVbTextured,_GL_SetupVbColoured,_NotchyGen_Generate,_FlatgrassGen_Generate,_SPConnection_BeginConnect,_MPConnection_BeginConnect,_Game_DoFrame,b10,b10 ,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10 ,b10,b10,b10,b10,b10,b10,b10,b10,b10]; var FUNCTION_TABLE_vd = [b11,_PerspectiveCamera_UpdateMouse]; var FUNCTION_TABLE_vdd = [b12,_Camera_OnRawMovement]; var FUNCTION_TABLE_vi = [b13,_PerspectiveCamera_GetProjection,_PerspectiveCamera_GetView,_FirstPersonCamera_GetOrientation,_PerspectiveCamera_GetPickedBlock,_ThirdPersonCamera_GetOrientation,_Player_Despawn,_LocalPlayer_RenderName,_NetPlayer_RenderName,_Logger_DialogWarn,_ListScreen_Init,_ListScreen_Free,_Screen_BuildMesh,_ListScreen_Layout,_ListScreen_ContextLost,_ListScreen_ContextRecreated,_PauseScreen_Init,_PauseScreen_Free,_PauseScreen_Layout,_Screen_ContextLost,_PauseScreen_ContextRecreated,_EditHotkeyScreen_Init,_Menu_CloseKeyboard,_EditHotkeyScreen_Layout,_EditHotkeyScreen_ContextLost,_EditHotkeyScreen_ContextRecreated,_TexturePackScreen_UploadCallback,_SaveLevelScreen_Init,_SaveLevelScreen_Layout ,_SaveLevelScreen_ContextLost,_SaveLevelScreen_ContextRecreated,_LoadLevelScreen_UploadCallback,_GenLevelScreen_Init,_GenLevelScreen_Layout,_GenLevelScreen_ContextLost,_GenLevelScreen_ContextRecreated,_OptionsGroupScreen_Init,_OptionsGroupScreen_Free,_OptionsGroupScreen_Layout,_OptionsGroupScreen_ContextLost,_OptionsGroupScreen_ContextRecreated,_MenuOptionsScreen_Init,_MenuOptionsScreen_Free,_MenuOptionsScreen_Layout,_MenuOptionsScreen_ContextLost,_MenuOptionsScreen_ContextRecreated,_NostalgiaScreen_GetHand,_NostalgiaScreen_SetHand,_NostalgiaScreen_GetAnim,_NostalgiaScreen_SetAnim,_NostalgiaScreen_GetGui,_NostalgiaScreen_SetGui,_NostalgiaScreen_GetList,_NostalgiaScreen_SetList,_NostalgiaScreen_GetOpts,_NostalgiaScreen_SetOpts,_NostalgiaScreen_GetCustom,_NostalgiaScreen_SetCustom,_NostalgiaScreen_GetCPE ,_NostalgiaScreen_SetCPE,_NostalgiaScreen_GetTexs,_NostalgiaScreen_SetTexs,_NostalgiaScreen_GetClassicChat,_NostalgiaScreen_SetClassicChat,_EnvSettingsScreen_GetCloudsColor,_EnvSettingsScreen_SetCloudsColor,_EnvSettingsScreen_GetSkyColor,_EnvSettingsScreen_SetSkyColor,_EnvSettingsScreen_GetFogColor,_EnvSettingsScreen_SetFogColor,_EnvSettingsScreen_GetCloudsSpeed,_EnvSettingsScreen_SetCloudsSpeed,_EnvSettingsScreen_GetCloudsHeight,_EnvSettingsScreen_SetCloudsHeight,_EnvSettingsScreen_GetSunColor,_EnvSettingsScreen_SetSunColor,_EnvSettingsScreen_GetShadowColor,_EnvSettingsScreen_SetShadowColor,_EnvSettingsScreen_GetWeather,_EnvSettingsScreen_SetWeather,_EnvSettingsScreen_GetWeatherSpeed,_EnvSettingsScreen_SetWeatherSpeed,_EnvSettingsScreen_GetEdgeHeight,_EnvSettingsScreen_SetEdgeHeight,_MenuInputOverlay_Init,_MenuInputOverlay_Free,_MenuInputOverlay_Layout,_MenuInputOverlay_ContextLost,_MenuInputOverlay_ContextRecreated ,_HacksSettingsScreen_GetHacks,_HacksSettingsScreen_SetHacks,_HacksSettingsScreen_GetSpeed,_HacksSettingsScreen_SetSpeed,_HacksSettingsScreen_GetClipping,_HacksSettingsScreen_SetClipping,_HacksSettingsScreen_GetJump,_HacksSettingsScreen_SetJump,_HacksSettingsScreen_GetWOMHacks,_HacksSettingsScreen_SetWOMHacks,_HacksSettingsScreen_GetFullStep,_HacksSettingsScreen_SetFullStep,_HacksSettingsScreen_GetLiquids,_HacksSettingsScreen_SetLiquids,_HacksSettingsScreen_GetPushback,_HacksSettingsScreen_SetPushback,_HacksSettingsScreen_GetSlide,_HacksSettingsScreen_SetSlide,_HacksSettingsScreen_GetFOV,_HacksSettingsScreen_SetFOV,_ChatOptionsScreen_GetChatScale,_ChatOptionsScreen_SetChatScale,_ChatOptionsScreen_GetChatlines,_ChatOptionsScreen_SetChatlines,_ChatOptionsScreen_GetLogging,_ChatOptionsScreen_SetLogging,_ChatOptionsScreen_GetClickable,_ChatOptionsScreen_SetClickable,_KeyBindsScreen_Init,_Screen_NullFunc ,_KeyBindsScreen_Layout,_KeyBindsScreen_ContextLost,_KeyBindsScreen_ContextRecreated,_ClassicOptionsScreen_GetMusic,_ClassicOptionsScreen_SetMusic,_ClassicOptionsScreen_GetInvert,_ClassicOptionsScreen_SetInvert,_ClassicOptionsScreen_GetViewDist,_ClassicOptionsScreen_SetViewDist,_ClassicOptionsScreen_GetPhysics,_ClassicOptionsScreen_SetPhysics,_ClassicOptionsScreen_GetSounds,_ClassicOptionsScreen_SetSounds,_ClassicOptionsScreen_GetShowFPS,_ClassicOptionsScreen_SetShowFPS,_ClassicOptionsScreen_GetViewBob,_ClassicOptionsScreen_SetViewBob,_MenuOptionsScreen_GetFPS,_MenuOptionsScreen_SetFPS,_ClassicOptionsScreen_GetHacks,_ClassicOptionsScreen_SetHacks,_GraphicsOptionsScreen_GetCameraMass,_GraphicsOptionsScreen_SetCameraMass,_GraphicsOptionsScreen_GetViewDist,_GraphicsOptionsScreen_SetViewDist,_GraphicsOptionsScreen_GetSmooth,_GraphicsOptionsScreen_SetSmooth,_GraphicsOptionsScreen_GetCamera,_GraphicsOptionsScreen_SetCamera,_GraphicsOptionsScreen_GetNames ,_GraphicsOptionsScreen_SetNames,_GraphicsOptionsScreen_GetShadows,_GraphicsOptionsScreen_SetShadows,_GraphicsOptionsScreen_GetMipmaps,_GraphicsOptionsScreen_SetMipmaps,_GuiOptionsScreen_GetShadows,_GuiOptionsScreen_SetShadows,_GuiOptionsScreen_GetShowFPS,_GuiOptionsScreen_SetShowFPS,_GuiOptionsScreen_GetHotbar,_GuiOptionsScreen_SetHotbar,_GuiOptionsScreen_GetInventory,_GuiOptionsScreen_SetInventory,_GuiOptionsScreen_GetTabAuto,_GuiOptionsScreen_SetTabAuto,_GuiOptionsScreen_GetUseFont,_GuiOptionsScreen_SetUseFont,_MiscOptionsScreen_GetReach,_MiscOptionsScreen_SetReach,_MiscOptionsScreen_GetMusic,_MiscOptionsScreen_SetMusic,_MiscOptionsScreen_GetSounds,_MiscOptionsScreen_SetSounds,_MiscOptionsScreen_GetViewBob,_MiscOptionsScreen_SetViewBob,_MiscOptionsScreen_GetPhysics,_MiscOptionsScreen_SetPhysics,_MiscOptionsScreen_GetInvert,_MiscOptionsScreen_SetInvert,_MiscOptionsScreen_GetSensitivity ,_MiscOptionsScreen_SetSensitivity,_ClassicPauseScreen_Init,_ClassicPauseScreen_Layout,_ClassicPauseScreen_ContextRecreated,_ClassicGenScreen_Init,_ClassicGenScreen_Layout,_ClassicGenScreen_ContextRecreated,_TexIdsOverlay_Init,_TexIdsOverlay_Free,_TexIdsOverlay_BuildMesh,_TexIdsOverlay_Layout,_TexIdsOverlay_ContextLost,_TexIdsOverlay_ContextRecreated,_UrlWarningOverlay_Init,_UrlWarningOverlay_Layout,_UrlWarningOverlay_ContextRecreated,_TexPackOverlay_Init,_TexPackOverlay_Layout,_TexPackOverlay_ContextLost,_TexPackOverlay_ContextRecreated,_TouchOnscreenScreen_Init,_TouchOnscreenScreen_Layout,_TouchOnscreenScreen_ContextLost,_TouchOnscreenScreen_ContextRecreated,_TouchCtrlsScreen_Init,_TouchCtrlsScreen_Layout,_TouchCtrlsScreen_ContextLost,_TouchCtrlsScreen_ContextRecreated,_TouchMoreScreen_Init,_TouchMoreScreen_Layout ,_TouchMoreScreen_ContextRecreated,_HumanModel_Draw,_HumanModel_GetSize,_HumanModel_GetBounds,_BlockModel_Draw,_BlockModel_GetSize,_BlockModel_GetBounds,_SkinnedCubeModel_Draw,_SkinnedCubeModel_GetSize,_SkinnedCubeModel_GetBounds,_SittingModel_Draw,_SittingModel_GetSize,_SittingModel_GetBounds,_HeadModel_Draw,_HeadModel_GetSize,_HeadModel_GetBounds,_ChibiModel_Draw,_ChibiModel_GetSize,_ChibiModel_GetBounds,_ZombieModel_Draw,_ZombieModel_GetBounds,_SpiderModel_Draw,_SpiderModel_GetSize,_SpiderModel_GetBounds,_SkeletonModel_Draw,_SkeletonModel_GetSize,_SkeletonModel_GetBounds,_FurlessModel_Draw,_SheepModel_GetSize,_SheepModel_GetBounds ,_SheepModel_Draw,_PigModel_Draw,_PigModel_GetSize,_PigModel_GetBounds,_CreeperModel_Draw,_CreeperModel_GetSize,_CreeperModel_GetBounds,_ChickenModel_Draw,_ChickenModel_GetSize,_ChickenModel_GetBounds,_HUDScreen_Init,_HUDScreen_Free,_HUDScreen_BuildMesh,_HUDScreen_Layout,_HUDScreen_ContextLost,_HUDScreen_ContextRecreated,_TabListOverlay_Init,_TabListOverlay_Free,_TabListOverlay_BuildMesh,_TabListOverlay_Layout,_TabListOverlay_ContextLost,_TabListOverlay_ContextRecreated,_ChatScreen_Init,_ChatScreen_Free,_ChatScreen_BuildMesh,_ChatScreen_Layout,_ChatScreen_ContextLost,_ChatScreen_ContextRecreated,_InventoryScreen_Init,_InventoryScreen_Free ,_InventoryScreen_BuildMesh,_InventoryScreen_Layout,_InventoryScreen_ContextLost,_InventoryScreen_ContextRecreated,_LoadingScreen_Init,_LoadingScreen_Free,_LoadingScreen_BuildMesh,_LoadingScreen_Layout,_LoadingScreen_ContextLost,_LoadingScreen_ContextRecreated,_GeneratingScreen_Init,_GeneratingScreen_Free,_DisconnectScreen_Init,_DisconnectScreen_Free,_DisconnectScreen_Layout,_DisconnectScreen_ContextLost,_DisconnectScreen_ContextRecreated,_TouchScreen_Init,_TouchScreen_Free,_TouchScreen_Layout,_TouchScreen_ContextLost,_TouchScreen_ContextRecreated,_TextWidget_Free,_TextWidget_Reposition,_ButtonWidget_Free,_ButtonWidget_Reposition,_Widget_NullFunc,_Widget_CalcPosition,_HotbarWidget_Free,_HotbarWidget_Reposition ,_TableWidget_Free,_TableWidget_Reposition,_InputWidget_Free,_InputWidget_Reposition,_TextGroupWidget_Free,_TextGroupWidget_Reposition,_SpecialInputWidget_Free,_SpecialInputWidget_Reposition,_ThumbstickWidget_Reposition,_Animations_Tick,_OnPackChanged,_OnContextLost,_OnAtlasChanged,_Physics_OnNewMapLoaded,_OnHacksChanged,_Entities_ContextLost,_Entities_ChatFontChanged,_LocalPlayer_CheckJumpVelocity,_OnTexturePackChanged,_OnTerrainAtlasChanged,_OnViewDistanceChanged,_OnContextLost_407,_OnContextRecreated,_Game_WarnFunc,_HandleOnNewMap,_HandleOnNewMapLoaded,_Game_OnResize,_Game_Free,_HandleInactiveChanged,_Entities_Tick ,_OnContextLost_688,_OnContextRecreated_689,_GL_SetupVbTextured_Range,_GL_SetupVbColoured_Range,_OnFontChanged,_OnContextLost_852,_OnContextRecreated_853,_OnResize,_OnProjectionChanged,_DoSwitchBlockAnim,_Http_CleanCacheTask,_OnFocusChanged,_InputHandler_CheckZoomFov,_OnTerrainAtlasChanged_1137,_OnBlockDefinitionChanged,_OnVisibilityChanged,_DeleteChunks_,_Refresh_,_PauseScreen_CheckHacksAllowed,_HotkeyListScreen_LoadEntries,_TexturePackScreen_LoadEntries,_SaveLevelScreen_UploadCallback,_LoadLevelScreen_LoadEntries,_OptionsGroupScreen_CheckHacksAllowed,_NostalgiaScreen_InitWidgets,_NostalgiaScreen_RecreateExtra,_MenuOptionsScreen_OnHacksChanged,_EnvSettingsScreen_InitWidgets,_HacksSettingsScreen_InitWidgets,_HacksSettingsScreen_CheckHacksAllowed ,_ChatOptionsScreen_InitWidgets,_ClassicOptionsScreen_InitWidgets,_ClassicOptionsScreen_RecreateExtra,_GraphicsOptionsScreen_InitWidgets,_GuiOptionsScreen_InitWidgets,_FontListScreen_LoadEntries,_MiscSettingsScreen_InitWidgets,_TexIdsOverlay_OnAtlasChanged,_OnContextLost_1411,_OnContextRecreated_1412,_HumanModel_DrawArm,_SkeletonModel_DrawArm,_ZombieModel_DrawArm,_ChibiModel_DrawArm,_CorpseModel_Draw,_HoldModel_Draw,_Model_NullFunc,_CustomModel_Draw,_CustomModel_GetCollisionSize,_CustomModel_GetPickingBounds,_CustomModel_DrawArm,_Particles_Tick,_OnContextLost_1501,_OnContextRecreated_1503,_OnContextLost_1540,_OnContextRecreated_1541,_Classic_Handshake,_Classic_Ping,_Classic_LevelInit,_Classic_LevelDataChunk ,_Classic_LevelFinalise,_Classic_SetBlock,_Classic_AddEntity,_Classic_EntityTeleport,_Classic_RelPosAndOrientationUpdate,_Classic_RelPositionUpdate,_Classic_OrientationUpdate,_Classic_RemoveEntity,_Classic_Message,_Classic_Kick,_Classic_SetPermission,_CPE_ExtInfo,_CPE_ExtEntry,_CPE_SetClickDistance,_CPE_CustomBlockLevel,_CPE_HoldThis,_CPE_SetTextHotkey,_CPE_ExtAddPlayerName,_CPE_ExtAddEntity,_CPE_ExtRemovePlayerName,_CPE_SetEnvCol,_CPE_MakeSelection,_CPE_RemoveSelection,_CPE_SetBlockPermission,_CPE_ChangeModel,_CPE_EnvSetMapAppearance,_CPE_EnvWeatherType,_CPE_HackControl,_CPE_ExtAddEntity2,_CPE_BulkBlockUpdate ,_CPE_SetTextColor,_CPE_SetMapEnvUrl,_CPE_SetMapEnvProperty,_CPE_SetEntityProperty,_CPE_TwoWayPing,_CPE_SetInventoryOrder,_CPE_SetHotbar,_CPE_SetSpawnPoint,_CPE_VelocityControl,_CPE_DefineEffect,_CPE_SpawnEffect,_CPE_DefineModel,_CPE_DefineModelPart,_CPE_UndefineModel,_CPE_PluginMessage,_CPE_ExtEntityTeleport,_BlockDefs_DefineBlock,_BlockDefs_UndefineBlock,_BlockDefs_DefineBlockExt,_HUDScreen_HacksChanged,_ChatScreen_OnInputTextChanged,_InventoryScreen_OnUpdateTitle,_InventoryScreen_OnBlockChanged,_LoadingScreen_MapLoaded,_GeneratingScreen_AtlasChanged,_TouchScreen_HacksChanged,_Selections_ContextLost,_Selections_ContextRecreated,_SPConnection_Tick,_SPConnection_SendChat ,_MPConnection_Tick,_MPConnection_SendChat,_OnContextLost_2041,_OnContextRecreated_2042,_TextInputWidget_RemakeTexture,_InputWidget_OnPressedEnter,_ChatInputWidget_RemakeTexture,_ChatInputWidget_OnPressedEnter,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13 ,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13,b13 ,b13,b13,b13]; var FUNCTION_TABLE_vid = [b14,_FirstPersonCamera_GetPosition,_ThirdPersonCamera_GetPosition,_LocalPlayer_Tick,_NetPlayer_Tick,_Screen_NullUpdate,_ListScreen_Render,_MenuScreen_Render2,_EditHotkeyScreen_Update,_EditHotkeyScreen_Render,_SaveLevelScreen_Update,_GenLevelScreen_Update,_MenuOptionsScreen_Render,_MenuInputOverlay_Update,_MenuInputOverlay_Render,_TexIdsOverlay_Render,_TexPackOverlay_Update,_HUDScreen_Update,_HUDScreen_Render,_TabListOverlay_Render,_ChatScreen_Render,_InventoryScreen_Render,_LoadingScreen_Render,_GeneratingScreen_Update,_GeneratingScreen_Render,_DisconnectScreen_Update,_DisconnectScreen_Render,_TouchScreen_Render,_TextWidget_Render ,_ButtonWidget_Render,_ScrollbarWidget_Render,_HotbarWidget_Render,_TableWidget_Render,_TextInputWidget_Render,_ChatInputWidget_Render,_TextGroupWidget_Render,_SpecialInputWidget_Render,_OnMouseWheel,_LoadingScreen_MapLoading,b14,b14,b14,b14,b14,b14,b14,b14,b14,b14,b14,b14,b14,b14,b14,b14,b14,b14,b14,b14 ,b14,b14,b14,b14,b14]; var FUNCTION_TABLE_vidd = [b15,_LocalPlayer_RenderModel,_NetPlayer_RenderModel,_OnRawMovement]; var FUNCTION_TABLE_vii = [b16,_AnimationsPngProcess,_Animations_ReadDescription,_UseWaterProcess,_UseLavaProcess,_GpuInfoCommand_Execute,_HelpCommand_Execute,_RenderTypeCommand_Execute,_ResolutionCommand_Execute,_ModelCommand_Execute,_CuboidCommand_Execute,_TeleportCommand_Execute,_ClearDeniedCommand_Execute,_DefaultPngProcess,_LocalPlayer_SetLocation,_NetPlayer_SetLocation,_CloudsPngProcess,_SkyboxPngProcess,_SnowPngProcess,_RainPngProcess,_GuiPngProcess,_GuiClassicPngProcess,_IconsPngProcess,_TouchPngProcess,_Screen_InputUp,_Menu_SwitchOptions,_Menu_SwitchGenLevel,_Menu_SwitchLoadLevel,_Menu_SwitchSaveLevel ,_Menu_SwitchTexPacks,_Menu_SwitchHotkeys,_Menu_SwitchMisc,_Menu_SwitchGui,_Menu_SwitchGfx,_Menu_SwitchKeysNormal,_Menu_SwitchChat,_Menu_SwitchHacks,_Menu_SwitchEnv,_Menu_SwitchNostalgia,_MenuOptionsScreen_Bool,_MenuOptionsScreen_Input,_MenuOptionsScreen_Enum,_Menu_SwitchFont,_Menu_SwitchClassicOptions,_Menu_SwitchClassicGenLevel,_TouchOnscreen_Any,_TouchCtrls_Tap,_TouchCtrls_Hold,_TouchCtrls_Sensitivity,_TouchCtrls_Scale,_TouchCtrls_Onscreen,_TouchMore_Take,_TouchMore_Screen,_TouchMore_Chat,_TouchMore_Fog,_TouchMore_Ctrls,_TouchMore_Menu,_ParticlesPngProcess,_HUDScreen_InputUp ,_TabListOverlay_KeyUp,_ChatScreen_KeyUp,_InventoryScreen_KeyUp,_TouchScreen_ChatClick,_TouchScreen_TabClick,_TouchScreen_RespawnClick,_TouchScreen_SetSpawnClick,_TouchScreen_FlyClick,_TouchScreen_NoclipClick,_TouchScreen_SpeedClick,_TouchScreen_HalfClick,_TouchScreen_CameraClick,_TouchScreen_DeleteClick,_TouchScreen_PickClick,_TouchScreen_PlaceClick,_TouchScreen_SwitchClick,_TouchScreen_BindClick,_TerrainPngProcess,_Hex_Range,_Hex_Default,_Int_Range,_Int_Default,_Seed_Range,_Seed_NoDefault,_Float_Range,_Float_Default,_Path_Range,_String_Range,_Widget_InputUp,_TextWidget_BuildMesh ,_ButtonWidget_BuildMesh,_HotbarWidget_InputUp,_TextInputWidget_BuildMesh,_ThumbstickWidget_BuildMesh,_Physics_DoFalling,_Physics_HandleSapling,_Physics_HandleDirt,_Physics_HandleGrass,_Physics_HandleFlower,_Physics_HandleMushroom,_Physics_PlaceLava,_Physics_PlaceWater,_Physics_PlaceSponge,_Physics_DeleteSponge,_Physics_ActivateWater,_Physics_ActivateLava,_Physics_HandleSlab,_Physics_HandleCobblestoneSlab,_Physics_HandleTnt,_LocalPlayer_InputUp,_LocalPlayer_GetMovement,_OnEnvVariableChanged,_OnKeyPress,_OnTextChanged,_OnPointerMove,_OnPointerDown,_OnPointerUp,_OnInputUp,_OnEnvVariableChanged_1138,_ListScreen_MoveBackwards ,_ListScreen_MoveForwards,_PauseScreenBase_Quit,_PauseScreenBase_Game,_HotkeyListScreen_EntryClick,_Menu_SwitchPause,_EditHotkeyScreen_BaseKey,_EditHotkeyScreen_Modifiers,_EditHotkeyScreen_LeaveOpen,_EditHotkeyScreen_SaveChanges,_EditHotkeyScreen_RemoveHotkey,_TexturePackScreen_UploadFunc,_TexturePackScreen_EntryClick,_TexturePackScreen_FilterFiles,_SaveLevelScreen_Save,_SaveLevelScreen_File,_LoadLevelScreen_UploadFunc,_LoadLevelScreen_EntryClick,_LoadLevelScreen_FilterFiles,_GenLevelScreen_Flatgrass,_GenLevelScreen_Notchy,_NostalgiaScreen_SwitchBack,_MenuOptionsScreen_GetDesc,_MenuOptionsScreen_OnDone,_MenuInputOverlay_Default,_MenuInputOverlay_OK,_Menu_SwitchKeysHacks,_KeyBindsScreen_OnBindingClick,_Menu_SwitchKeysClassic,_Menu_SwitchKeysClassicHacks,_Menu_SwitchKeysOther ,_Menu_SwitchKeysMouse,_FontListScreen_EntryClick,_ClassicGenScreen_Small,_ClassicGenScreen_Medium,_ClassicGenScreen_Huge,_UrlWarningOverlay_OpenUrl,_UrlWarningOverlay_AppendUrl,_TexPackOverlay_ConfirmNoClick,_TexPackOverlay_YesClick,_TexPackOverlay_GoBackClick,_TexPackOverlay_NoClick,_TouchOnscreen_More,_TouchOnscreen_Left,_TouchOnscreen_Right,_TouchCtrls_More,_TouchCtrls_SensitivityDone,_TouchCtrls_ScaleDone,_TouchMore_Game,_TabListOverlay_Add,_TabListOverlay_Update,_TabListOverlay_Remove,_ChatScreen_GetStatus,_ChatScreen_GetBottomRight,_ChatScreen_GetChat,_ChatScreen_GetClientStatus,_ChatScreen_ColCodeChanged,_DisconnectScreen_OnReconnect,_DisconnectScreen_OnQuit,_TouchScreen_MoreClick,_TouchScreen_GetMovement ,_SPConnection_SendData,_MPConnection_SendData,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16 ,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16 ,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16,b16]; var FUNCTION_TABLE_viii = [b17,_LocalPlayer_InputDown,_OnInputDown,_HotkeyListScreen_UpdateEntry,_ListScreen_UpdateEntry,_FontListScreen_UpdateEntry,_Models_TextureChanged,_HeadModel_GetTransform,_SittingModel_GetTransform,_Model_GetTransform,_ChatScreen_ChatReceived,_OnFileChanged,b17,b17,b17,b17]; var FUNCTION_TABLE_viiii = [b18,_Screen_PointerUp,_HUDScreen_PointerUp,_InventoryScreen_PointerUp,_TouchScreen_PointerUp,_Widget_PointerUp,_ScrollbarWidget_PointerUp,_HotbarWidget_PointerUp,_TableWidget_PointerUp,_Audio_PlayBlockSound,_Png_Expand_RGB_16,_Png_Expand_RGB_8,_Png_Expand_GRAYSCALE_A_16,_Png_Expand_GRAYSCALE_A_8,_Png_Expand_RGB_A_16,_Png_Expand_RGB_A_8,_Png_Expand_GRAYSCALE_1,_Png_Expand_GRAYSCALE_2,_Png_Expand_GRAYSCALE_4,_Png_Expand_GRAYSCALE_8,_Png_Expand_GRAYSCALE_16,_Png_Expand_INDEXED_1,_Png_Expand_INDEXED_2,_Png_Expand_INDEXED_4,_Png_Expand_INDEXED_8,_Adv_RenderBlock,_NormalBuilder_RenderBlock,_CuboidCommand_BlockChanged,_OnBlockChanged ,_OnBreakBlockEffect_Handler,b18,b18]; var FUNCTION_TABLE_viiiii = [b19,_SPConnection_SendBlock,_MPConnection_SendBlock,b19]; return { _Directory_IterCallback: _Directory_IterCallback, _Http_OnFinishedAsync: _Http_OnFinishedAsync, _Http_OnUpdateProgress: _Http_OnUpdateProgress, _Platform_LogError: _Platform_LogError, _Window_GotClipboardText: _Window_GotClipboardText, _Window_OnFileUploaded: _Window_OnFileUploaded, _Window_OnTextChanged: _Window_OnTextChanged, _Window_RequestClipboardText: _Window_RequestClipboardText, _Window_StoreClipboardText: _Window_StoreClipboardText, ___errno_location: ___errno_location, ___muldi3: ___muldi3, _bitshift64Lshr: _bitshift64Lshr, _emscripten_replace_memory: _emscripten_replace_memory, _free: _free, _i64Add: _i64Add, _i64Subtract: _i64Subtract, _llvm_bswap_i32: _llvm_bswap_i32, _main: _main, _main_phase1: _main_phase1, _main_phase2: _main_phase2, _malloc: _malloc, _memcpy: _memcpy, _memset: _memset, _sbrk: _sbrk, dynCall_di: dynCall_di, dynCall_i: dynCall_i, dynCall_id: dynCall_id, dynCall_ii: dynCall_ii, dynCall_iid: dynCall_iid, dynCall_iii: dynCall_iii, dynCall_iiii: dynCall_iiii, dynCall_iiiii: dynCall_iiiii, dynCall_iiiiiii: dynCall_iiiiiii, dynCall_iiiiiiii: dynCall_iiiiiiii, dynCall_v: dynCall_v, dynCall_vd: dynCall_vd, dynCall_vdd: dynCall_vdd, dynCall_vi: dynCall_vi, dynCall_vid: dynCall_vid, dynCall_vidd: dynCall_vidd, dynCall_vii: dynCall_vii, dynCall_viii: dynCall_viii, dynCall_viiii: dynCall_viiii, dynCall_viiiii: dynCall_viiiii, establishStackSpace: establishStackSpace, stackAlloc: stackAlloc, stackRestore: stackRestore, stackSave: stackSave }; }) // EMSCRIPTEN_END_ASM (asmGlobalArg, asmLibraryArg, buffer); var _Directory_IterCallback = CCModule["_Directory_IterCallback"] = asm["_Directory_IterCallback"]; var _Http_OnFinishedAsync = CCModule["_Http_OnFinishedAsync"] = asm["_Http_OnFinishedAsync"]; var _Http_OnUpdateProgress = CCModule["_Http_OnUpdateProgress"] = asm["_Http_OnUpdateProgress"]; var _Platform_LogError = CCModule["_Platform_LogError"] = asm["_Platform_LogError"]; var _Window_GotClipboardText = CCModule["_Window_GotClipboardText"] = asm["_Window_GotClipboardText"]; var _Window_OnFileUploaded = CCModule["_Window_OnFileUploaded"] = asm["_Window_OnFileUploaded"]; var _Window_OnTextChanged = CCModule["_Window_OnTextChanged"] = asm["_Window_OnTextChanged"]; var _Window_RequestClipboardText = CCModule["_Window_RequestClipboardText"] = asm["_Window_RequestClipboardText"]; var _Window_StoreClipboardText = CCModule["_Window_StoreClipboardText"] = asm["_Window_StoreClipboardText"]; var ___errno_location = CCModule["___errno_location"] = asm["___errno_location"]; var ___muldi3 = CCModule["___muldi3"] = asm["___muldi3"]; var _bitshift64Lshr = CCModule["_bitshift64Lshr"] = asm["_bitshift64Lshr"]; var _emscripten_replace_memory = CCModule["_emscripten_replace_memory"] = asm["_emscripten_replace_memory"]; var _free = CCModule["_free"] = asm["_free"]; var _i64Add = CCModule["_i64Add"] = asm["_i64Add"]; var _i64Subtract = CCModule["_i64Subtract"] = asm["_i64Subtract"]; var _llvm_bswap_i32 = CCModule["_llvm_bswap_i32"] = asm["_llvm_bswap_i32"]; var _main = CCModule["_main"] = asm["_main"]; var _main_phase1 = CCModule["_main_phase1"] = asm["_main_phase1"]; var _main_phase2 = CCModule["_main_phase2"] = asm["_main_phase2"]; var _malloc = CCModule["_malloc"] = asm["_malloc"]; var _memcpy = CCModule["_memcpy"] = asm["_memcpy"]; var _memset = CCModule["_memset"] = asm["_memset"]; var _sbrk = CCModule["_sbrk"] = asm["_sbrk"]; var establishStackSpace = CCModule["establishStackSpace"] = asm["establishStackSpace"]; var stackAlloc = CCModule["stackAlloc"] = asm["stackAlloc"]; var stackRestore = CCModule["stackRestore"] = asm["stackRestore"]; var stackSave = CCModule["stackSave"] = asm["stackSave"]; var dynCall_di = CCModule["dynCall_di"] = asm["dynCall_di"]; var dynCall_i = CCModule["dynCall_i"] = asm["dynCall_i"]; var dynCall_id = CCModule["dynCall_id"] = asm["dynCall_id"]; var dynCall_ii = CCModule["dynCall_ii"] = asm["dynCall_ii"]; var dynCall_iid = CCModule["dynCall_iid"] = asm["dynCall_iid"]; var dynCall_iii = CCModule["dynCall_iii"] = asm["dynCall_iii"]; var dynCall_iiii = CCModule["dynCall_iiii"] = asm["dynCall_iiii"]; var dynCall_iiiii = CCModule["dynCall_iiiii"] = asm["dynCall_iiiii"]; var dynCall_iiiiiii = CCModule["dynCall_iiiiiii"] = asm["dynCall_iiiiiii"]; var dynCall_iiiiiiii = CCModule["dynCall_iiiiiiii"] = asm["dynCall_iiiiiiii"]; var dynCall_v = CCModule["dynCall_v"] = asm["dynCall_v"]; var dynCall_vd = CCModule["dynCall_vd"] = asm["dynCall_vd"]; var dynCall_vdd = CCModule["dynCall_vdd"] = asm["dynCall_vdd"]; var dynCall_vi = CCModule["dynCall_vi"] = asm["dynCall_vi"]; var dynCall_vid = CCModule["dynCall_vid"] = asm["dynCall_vid"]; var dynCall_vidd = CCModule["dynCall_vidd"] = asm["dynCall_vidd"]; var dynCall_vii = CCModule["dynCall_vii"] = asm["dynCall_vii"]; var dynCall_viii = CCModule["dynCall_viii"] = asm["dynCall_viii"]; var dynCall_viiii = CCModule["dynCall_viiii"] = asm["dynCall_viiii"]; var dynCall_viiiii = CCModule["dynCall_viiiii"] = asm["dynCall_viiiii"]; ; // === Auto-generated postamble setup entry stuff === CCModule['asm'] = asm; CCModule["getMemory"] = getMemory; CCModule["addRunDependency"] = addRunDependency; CCModule["removeRunDependency"] = removeRunDependency; CCModule["FS_createFolder"] = FS.createFolder; CCModule["FS_createPath"] = FS.createPath; CCModule["FS_createDataFile"] = FS.createDataFile; CCModule["FS_createPreloadedFile"] = FS.createPreloadedFile; CCModule["FS_createLazyFile"] = FS.createLazyFile; CCModule["FS_createLink"] = FS.createLink; CCModule["FS_createDevice"] = FS.createDevice; CCModule["FS_unlink"] = FS.unlink; if (memoryInitializer) { if (!isDataURI(memoryInitializer)) { memoryInitializer = locateFile(memoryInitializer); } if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) { var data = CCModule['readBinary'](memoryInitializer); HEAPU8.set(data, GLOBAL_BASE); } else { addRunDependency('memory initializer'); var applyMemoryInitializer = function(data) { if (data.byteLength) data = new Uint8Array(data); HEAPU8.set(data, GLOBAL_BASE); // Delete the typed array that contains the large blob of the memory initializer request response so that // we won't keep unnecessary memory lying around. However, keep the XHR object itself alive so that e.g. // its .status field can still be accessed later. if (CCModule['memoryInitializerRequest']) delete CCModule['memoryInitializerRequest'].response; removeRunDependency('memory initializer'); } var doBrowserLoad = function() { CCModule['readAsync'](memoryInitializer, applyMemoryInitializer, function() { throw 'could not load memory initializer ' + memoryInitializer; }); } var memoryInitializerBytes = tryParseAsDataURI(memoryInitializer); if (memoryInitializerBytes) { applyMemoryInitializer(memoryInitializerBytes.buffer); } else if (CCModule['memoryInitializerRequest']) { // a network request has already been created, just use that var useRequest = function() { var request = CCModule['memoryInitializerRequest']; var response = request.response; if (request.status !== 200 && request.status !== 0) { var data = tryParseAsDataURI(CCModule['memoryInitializerRequestURL']); if (data) { response = data.buffer; } else { // If you see this warning, the issue may be that you are using locateFile and defining it in JS. That // means that the HTML file doesn't know about it, and when it tries to create the mem init request early, does it to the wrong place. // Look in your browser's devtools network console to see what's going on. console.warn('a problem seems to have happened with CCModule.memoryInitializerRequest, status: ' + request.status + ', retrying ' + memoryInitializer); doBrowserLoad(); return; } } applyMemoryInitializer(response); } if (CCModule['memoryInitializerRequest'].response) { setTimeout(useRequest, 0); // it's already here; but, apply it asynchronously } else { CCModule['memoryInitializerRequest'].addEventListener('load', useRequest); // wait for it } } else { // fetch it from the network ourselves doBrowserLoad(); } } } /** * @constructor * @extends {Error} * @this {ExitStatus} */ function ExitStatus(status) { this.name = "ExitStatus"; this.message = "Program terminated with exit(" + status + ")"; this.status = status; }; ExitStatus.prototype = new Error(); ExitStatus.prototype.constructor = ExitStatus; var calledMain = false; dependenciesFulfilled = function runCaller() { // If run has never been called, and we should call run (INVOKE_RUN is true, and CCModule.noInitialRun is not false) if (!CCModule['calledRun']) run(); if (!CCModule['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled } CCModule['callMain'] = function callMain(args) { args = args || []; ensureInitRuntime(); var argc = args.length+1; var argv = stackAlloc((argc + 1) * 4); HEAP32[argv >> 2] = allocateUTF8OnStack(CCModule['thisProgram']); for (var i = 1; i < argc; i++) { HEAP32[(argv >> 2) + i] = allocateUTF8OnStack(args[i - 1]); } HEAP32[(argv >> 2) + argc] = 0; try { var ret = CCModule['_main'](argc, argv, 0); // if we're not running an evented main loop, it's time to exit exit(ret, /* implicit = */ true); } catch(e) { if (e instanceof ExitStatus) { // exit() throws this once it's done to make sure execution // has been stopped completely return; } else if (e == 'SimulateInfiniteLoop') { // running an evented main loop, don't immediately exit CCModule['noExitRuntime'] = true; return; } else { var toLog = e; if (e && typeof e === 'object' && e.stack) { toLog = [e, e.stack]; } err('exception thrown: ' + toLog); CCModule['quit'](1, e); } } finally { calledMain = true; } } /** @type {function(Array=)} */ function run(args) { args = args || CCModule['arguments']; if (runDependencies > 0) { return; } preRun(); if (runDependencies > 0) return; // a preRun added a dependency, run will be called later if (CCModule['calledRun']) return; // run may have just been called through dependencies being fulfilled just in this very frame function doRun() { if (CCModule['calledRun']) return; // run may have just been called while the async setStatus time below was happening CCModule['calledRun'] = true; if (ABORT) return; ensureInitRuntime(); preMain(); if (CCModule['onRuntimeInitialized']) CCModule['onRuntimeInitialized'](); if (CCModule['_main'] && shouldRunNow) CCModule['callMain'](args); postRun(); } if (CCModule['setStatus']) { CCModule['setStatus']('Running...'); setTimeout(function() { doRun(); }, 1); } else { doRun(); } } CCModule['run'] = run; function exit(status, implicit) { // if this is just main exit-ing implicitly, and the status is 0, then we // don't need to do anything here and can just leave. if the status is // non-zero, though, then we need to report it. // (we may have warned about this earlier, if a situation justifies doing so) if (implicit && CCModule['noExitRuntime'] && status === 0) { return; } if (CCModule['noExitRuntime']) { } else { ABORT = true; EXITSTATUS = status; exitRuntime(); if (CCModule['onExit']) CCModule['onExit'](status); } CCModule['quit'](status, new ExitStatus(status)); } var abortDecorators = []; function abort(what) { if (CCModule['onAbort']) { CCModule['onAbort'](what); } if (what !== undefined) { out(what); err(what); what = JSON.stringify(what) } else { what = ''; } ABORT = true; EXITSTATUS = 1; throw 'abort(' + what + '). Build with -s ASSERTIONS=1 for more info.'; } CCModule['abort'] = abort; if (CCModule['preInit']) { if (typeof CCModule['preInit'] == 'function') CCModule['preInit'] = [CCModule['preInit']]; while (CCModule['preInit'].length > 0) { CCModule['preInit'].pop()(); } } // shouldRunNow refers to calling main(), not run(). var shouldRunNow = true; if (CCModule['noInitialRun']) { shouldRunNow = false; } CCModule["noExitRuntime"] = true; run(); // {{MODULE_ADDITIONS}}