downgrade

This commit is contained in:
BluePotato102
2024-01-21 16:26:50 -06:00
committed by avsc-sid
parent 4e643bf2d5
commit 35e8c9cbfe
17 changed files with 14742 additions and 8462 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
{"content":[{"name":"game.projectc","size":4113,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":37568,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":4334256,"pieces":[{"name":"game.arcd0","offset":0},{"name":"game.arcd1","offset":2097152},{"name":"game.arcd2","offset":4194304}]},{"name":"game.dmanifest","size":40690,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]}
{"content":[{"name":"game.projectc","size":3990,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":24448,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":3738056,"pieces":[{"name":"game.arcd0","offset":0},{"name":"game.arcd1","offset":2097152}]},{"name":"game.dmanifest","size":22939,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+12 -20
View File
@@ -1,6 +1,6 @@
[project]
title = MonkeyMart
version = 4.7
version = 2.1
write_log = 0
compress_archive = 1
publisher = unnamed
@@ -17,7 +17,7 @@ fullscreen = 0
update_frequency = 60
swap_interval = 1
vsync = 1
display_profiles = /my.display_profilesc
display_profiles = /builtins/render/default.display_profilesc
dynamic_orientation = 0
display_device_info = 0
@@ -29,7 +29,6 @@ clear_color_alpha = 0
[physics]
type = 2D
max_collision_object_count = 128
use_fixed_timestep = 0
gravity_y = -10
debug = 0
@@ -87,7 +86,7 @@ game_binding = /input/game.input_bindingc
use_accelerometer = 1
[sprite]
max_count = 512
max_count = 1024
subpixels = 1
[model]
@@ -101,14 +100,13 @@ max_count = 128
max_count = 64
max_particlefx_count = 64
max_particle_count = 1024
max_animation_count = 1024
[collection]
max_instances = 2048
max_input_stack_entries = 16
[collection_proxy]
max_count = 10
max_count = 8
[collectionfactory]
max_count = 128
@@ -127,9 +125,9 @@ localizations = en
[android]
version_code = 1
minimum_sdk_version = 19
target_sdk_version = 33
package = com.tinydobbins.testmonkey
minimum_sdk_version = 16
target_sdk_version = 31
package = com.example.todo
gcm_sender_id =
manifest = /builtins/manifests/android/AndroidManifest.xml
iap_provider = GooglePlay
@@ -153,7 +151,7 @@ app_icon =
[html5]
custom_heap_size = 0
heap_size = 128
heap_size = 64
htmlfile = /engine_template.html
cssfile = /css_theme.css
splash_image = /images/bg_loading.png
@@ -187,7 +185,7 @@ include_dirs =
shared_state = 1
[label]
max_count = 128
max_count = 64
subpixels = 1
[profiler]
@@ -206,16 +204,10 @@ max_tile_count = 0
run_while_iconified = 0
fixed_update_frequency = 60
[native_extension]
app_manifest = /manifest.appmanifest
[gameanalytics]
game_key_html5 = 8460790931685c9f59f3e669a97521bd
secret_key_html5 = 6d3a08c1c25fca8bb1587ed50c42a81ddff80aa0
[spine]
max_count = 512
[native_extension]
app_manifest = /manifest.appmanifest
[liveupdate_reszip]
wipe_on_start = 1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 152 KiB

+82 -73
View File
@@ -109,8 +109,12 @@ var EngineLoader = {
loadAndInstantiateWasmAsync: function(src, fromProgress, toProgress, callback) {
FileLoader.load(src, "arraybuffer", EngineLoader.wasm_size,
function(loaded, total) { Progress.calculateProgress(fromProgress, toProgress, loaded, total); },
function(error) { throw error; },
function(loaded, total) {
Progress.calculateProgress(fromProgress, toProgress, loaded, total);
},
function(error) {
throw error;
},
function(wasm) {
Module.instantiateWasm = function(imports, successCallback) {
var wasmInstantiate = WebAssembly.instantiate(new Uint8Array(wasm), imports).then(function(output) {
@@ -132,15 +136,12 @@ var EngineLoader = {
async function fetchWithProgress(path) {
const response = await fetch(path);
// May be incorrect if compressed
var contentLength = response.headers.get("Content-Length");
if (!contentLength){
contentLength = EngineLoader.wasm_size;
}
const contentLength = response.headers.get("Content-Length");
const total = parseInt(contentLength, 10);
let bytesLoaded = 0;
const ts = new TransformStream({
transform (chunk, controller) {
transform(chunk, controller) {
bytesLoaded += chunk.byteLength;
Progress.calculateProgress(fromProgress, toProgress, bytesLoaded, total);
controller.enqueue(chunk)
@@ -170,8 +171,7 @@ var EngineLoader = {
if (EngineLoader.stream_wasm && (typeof WebAssembly.instantiateStreaming === "function")) {
EngineLoader.setupWasmStreamAsync(exeName + ".wasm", 10, 50);
EngineLoader.loadAndRunScriptAsync(exeName + '_wasm.js', EngineLoader.wasmjs_size, 0, 10);
}
else {
} else {
EngineLoader.loadAndInstantiateWasmAsync(exeName + ".wasm", 0, 40, function() {
EngineLoader.loadAndRunScriptAsync(exeName + '_wasm.js', EngineLoader.wasmjs_size, 40, 50);
});
@@ -185,12 +185,16 @@ var EngineLoader = {
// load and start engine script (asm.js or wasm.js)
loadAndRunScriptAsync: function(src, estimatedSize, fromProgress, toProgress) {
FileLoader.load(src, "text", estimatedSize,
function(loaded, total) { Progress.calculateProgress(fromProgress, toProgress, loaded, total); },
function(error) { throw error; },
function(loaded, total) {
Progress.calculateProgress(fromProgress, toProgress, loaded, total);
},
function(error) {
throw error;
},
function(response) {
var tag = document.createElement("script");
tag.text = response;
document.body.appendChild(tag);
document.head.appendChild(tag);
});
},
@@ -229,13 +233,15 @@ var GameArchiveLoader = {
isCompleted: false, // status of process
_onFileLoadedListeners: [], // signature: name, data.
_onArchiveLoadedListeners:[], // signature: void
_onArchiveLoadedListeners: [], // signature: void
_onFileDownloadErrorListeners: [], // signature: name
_currentDownloadBytes: 0,
_totalDownloadBytes: 0,
_archiveLocationFilter: function(path) { return "split" + path; },
_archiveLocationFilter: function(path) {
return "split" + path;
},
cleanUp: function() {
this._files = [];
@@ -254,7 +260,7 @@ var GameArchiveLoader = {
list.push(callback);
},
notifyListeners: function(list, data) {
for (i=0; i<list.length; ++i) {
for (i = 0; i < list.length; ++i) {
list[i](data);
}
},
@@ -270,7 +276,10 @@ var GameArchiveLoader = {
this.addListener(this._onFileLoadedListeners, callback);
},
notifyFileLoaded: function(file) {
this.notifyListeners(this._onFileLoadedListeners, { name: file.name, data: file.data });
this.notifyListeners(this._onFileLoadedListeners, {
name: file.name,
data: file.data
});
},
addArchiveLoadedListener: function(callback) {
@@ -293,9 +302,13 @@ var GameArchiveLoader = {
this._archiveLocationFilter(descriptionUrl),
"json",
undefined,
function (loaded, total) { },
function (error) { GameArchiveLoader.notifyFileDownloadError(descriptionUrl); },
function (json) { GameArchiveLoader.onReceiveDescription(json); });
function(loaded, total) {},
function(error) {
GameArchiveLoader.notifyFileDownloadError(descriptionUrl);
},
function(json) {
GameArchiveLoader.onReceiveDescription(json);
});
},
onReceiveDescription: function(json) {
@@ -304,7 +317,7 @@ var GameArchiveLoader = {
this._currentDownloadBytes = 0;
// calculate total download size of all files
for(var i=0; i<this._files.length; ++i) {
for (var i = 0; i < this._files.length; ++i) {
this._totalDownloadBytes += this._files[i].size;
}
this.downloadContent();
@@ -322,7 +335,7 @@ var GameArchiveLoader = {
limit = Math.min(limit, this.MAX_CONCURRENT_XHR);
}
// download pieces
for (var i=0; i<limit; ++i) {
for (var i = 0; i < limit; ++i) {
this.downloadPiece(file, i);
}
},
@@ -346,16 +359,16 @@ var GameArchiveLoader = {
FileLoader.load(
url, "arraybuffer", undefined,
function (loaded, total) {
function(loaded, total) {
var delta = loaded - downloaded;
downloaded = loaded;
GameArchiveLoader._currentDownloadBytes += delta;
GameArchiveLoader.notifyDownloadProgress();
},
function (error) {
function(error) {
GameArchiveLoader.notifyFileDownloadError(error);
},
function (response) {
function(response) {
piece.data = new Uint8Array(response);
piece.dataLength = piece.data.length;
total = piece.dataLength;
@@ -403,18 +416,18 @@ var GameArchiveLoader = {
verifyFile: function(file) {
// verify that we downloaded as much as we were supposed to
var actualSize = 0;
for (var i=0;i<file.pieces.length; ++i) {
for (var i = 0; i < file.pieces.length; ++i) {
actualSize += file.pieces[i].dataLength;
}
if (actualSize != file.size) {
throw "Unexpected data size";
}
// if (actualSize != file.size) {
// throw "Unexpected data size";
// }
// verify the pieces
if (file.pieces.length > 1) {
var output = file.data;
var pieces = file.pieces;
for (i=0; i<pieces.length; ++i) {
for (i = 0; i < pieces.length; ++i) {
var item = pieces[i];
// Bounds check
var start = item.offset;
@@ -468,12 +481,12 @@ var Progress = {
},
notifyListeners: function(percentage) {
for (i=0; i<this.listeners.length; ++i) {
for (i = 0; i < this.listeners.length; ++i) {
this.listeners[i](percentage);
}
},
addProgress : function (canvas) {
addProgress: function(canvas) {
/* Insert default progress bar below canvas */
canvas.insertAdjacentHTML('afterend', '<div id="' + Progress.progress_id + '" class="canvas-app-progress"><div id="' + Progress.bar_id + '" class="canvas-app-progress-bar" style="width: 0%;"></div></div>');
Progress.bar = document.getElementById(Progress.bar_id);
@@ -482,16 +495,16 @@ var Progress = {
updateProgress: function(percentage) {
if (Progress.bar) {
Progress.bar.style.width = Math.min(percentage, 100) + "%";
Progress.bar.style.width = percentage + "%";
}
Progress.notifyListeners(percentage);
},
calculateProgress: function (from, to, current, total) {
calculateProgress: function(from, to, current, total) {
this.updateProgress(from + (current / total) * (to - from));
},
removeProgress: function () {
removeProgress: function() {
if (Progress.progress.parentElement !== null) {
Progress.progress.parentElement.removeChild(Progress.progress);
@@ -524,10 +537,16 @@ var Module = {
arguments: [],
print: function(text) { console.log(text); },
printErr: function(text) { console.error(text); },
print: function(text) {
console.log(text);
},
printErr: function(text) {
console.error(text);
},
setStatus: function(text) { console.log(text); },
setStatus: function(text) {
console.log(text);
},
isWASMSupported: (function() {
try {
@@ -536,18 +555,17 @@ var Module = {
if (module instanceof WebAssembly.Module)
return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;
}
} catch (e) {
}
} catch (e) {}
return false;
})(),
prepareErrorObject: function (err, url, line, column, errObj) {
prepareErrorObject: function(err, url, line, column, errObj) {
line = typeof line == "undefined" ? 0 : line;
column = typeof column == "undefined" ? 0 : column;
url = typeof url == "undefined" ? "" : url;
var errorLine = url + ":" + line + ":" + column;
var error = errObj || (typeof window.event != "undefined" ? window.event.error : "" ) || err || "Undefined Error";
var error = errObj || (typeof window.event != "undefined" ? window.event.error : "") || err || "Undefined Error";
var message = "";
var stack = "";
var backtrace = "";
@@ -575,7 +593,10 @@ var Module = {
stack = stack.replace(/^((?:Object|Array)\.)/gm, "");
stack = stack.split("\n");
return { stack:stack, message:message };
return {
stack: stack,
message: message
};
},
hasWebGLSupport: function() {
@@ -637,7 +658,9 @@ var Module = {
Module.setupCanvas(appCanvasId);
var params = {
archive_location_filter: function(path) { return 'split' + path; },
archive_location_filter: function(path) {
return 'split' + path;
},
unsupported_webgl_callback: undefined,
engine_arguments: [],
persistent_storage: true,
@@ -667,8 +690,7 @@ var Module = {
Module.canvas.focus();
// Add context menu hide-handler if requested
if (params["disable_context_menu"])
{
if (params["disable_context_menu"]) {
Module.canvas.oncontextmenu = function(e) {
e.preventDefault();
};
@@ -697,7 +719,10 @@ var Module = {
},
onArchiveFileLoaded: function(file) {
Module._filesToPreload.push({path: file.name, data: file.data});
Module._filesToPreload.push({
path: file.name,
data: file.data
});
},
onArchiveLoaded: function() {
@@ -719,16 +744,11 @@ var Module = {
},
preSync: function(done) {
if (Module.persistentStorage != true) {
Module._syncInitial = true;
done();
return;
}
// Initial persistent sync before main is called
FS.syncfs(true, function(err) {
if (err) {
Module._syncTries += 1;
console.warn("Unable to synchronize mounted file systems: " + err);
console.error("FS syncfs error: " + err);
if (Module._syncMaxTries > Module._syncTries) {
Module.preSync(done);
} else {
@@ -759,9 +779,6 @@ var Module = {
// It will flag that another one is needed if there is already one sync running.
persistentSync: function() {
if (Module.persistentStorage != true) {
return;
}
// Need to wait for the initial sync to finish since it
// will call close on all its file streams which will trigger
// new persistentSync for each.
@@ -775,22 +792,17 @@ var Module = {
},
preInit: [function() {
// Mount filesystem on preinit
/* Mount filesystem on preinit */
var dir = DMSYS.GetUserPersistentDataRoot();
try {
FS.mkdir(dir);
}
catch (error) {
Module.persistentStorage = false;
Module._preloadAndCallMain();
return;
}
// If IndexedDB is supported we mount the persistent data root as IDBFS,
// then try to do a IDB->MEM sync before we start the engine to get
// previously saved data before boot.
try {
window.indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
if (Module.persistentStorage && window.indexedDB) {
FS.mount(IDBFS, {}, dir);
// Patch FS.close so it will try to sync MEM->IDB
var _close = FS.close;
FS.close = function(stream) {
@@ -798,28 +810,25 @@ var Module = {
Module.persistentSync();
return r;
}
}
catch (error) {
Module.persistentStorage = false;
Module._preloadAndCallMain();
return;
}
// Sync IDB->MEM before calling main()
Module.preSync(function() {
Module._preloadAndCallMain();
});
} else {
Module._preloadAndCallMain();
}
}],
preRun: [function() {
/* If archive is loaded, preload all its files */
if(Module._archiveLoaded) {
if (Module._archiveLoaded) {
Module.preloadAll();
}
}],
postRun: [function() {
if(Module._archiveLoaded) {
if (Module._archiveLoaded) {
Progress.removeProgress();
}
}],
@@ -850,7 +859,7 @@ var Module = {
Module._syncInProgress = false;
if (err) {
console.warn("Unable to synchronize mounted file systems: " + err);
console.error("Module._startSyncFS error: " + err);
Module._syncTries += 1;
}
+129 -106
View File
@@ -1,23 +1,25 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, minimal-ui, shrink-to-fit=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Monkey Mart</title>
<style type="text/css">
<head>
<meta charset="utf-8"/>
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"/>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, minimal-ui, shrink-to-fit=no" name="viewport"/>
<meta content="yes" name="apple-mobile-web-app-capable"/>
<!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Monkey Mart</title>
<meta content="Monkey Mart is a fun game that you can play at school from chromebook. In our catalog you can find many cool online games that you may enjoy." name="description"/>
<script src="Jump_Game.js" type="text/javascript"></script>
<style type="text/css">
/* Disable user selection to avoid strange bug in Chrome on Windows:
* Selecting a text outside the canvas, then clicking+draging would
* drag the selected text but block mouse down/up events to the engine.
*/
body {
position: fixed; /* Prevent overscroll */
margin:0;
padding:0;
position: fixed;
/* Prevent overscroll */
margin: 0;
padding: 0;
}
.canvas-app-container {
@@ -54,7 +56,7 @@
}
div {
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
@@ -98,7 +100,6 @@
line-height: 20px;
}
.link, .button {
font-family: sans-serif;
font-size: 14px;
@@ -134,44 +135,39 @@
.canvas-app-canvas {
background-repeat: no-repeat;
background-position: center;
background-position: top;
background-size: cover;
background-image: url("bg_loading.png");
}
</style>
<script src="js/poki-sdk.js"></script>
</head>
<body>
<div id="app-container" class="canvas-app-container">
<div id="canvas-container" class="canvas-app-canvas-container">
<canvas id="canvas" class="canvas-app-canvas" tabindex="1" width="960" height="640"></canvas>
</div>
<div class="buttons-background">
</div>
<!-- center and anchor to bottom of page -->
<div id="progress-bar-root" style="position: absolute; bottom: 16%; left: 50%; visibility: hidden; z-index: 4;">
<!-- <div id="progress-bar-text"> -->
<img id="progress-bar-bg" src="load_bar_bg.png">
<img id="progress-bar-fg" src="load_bar_fg.png" style="position:absolute; clip: rect(0px,0px,0px,0px);">
</div>
</div>
<!-- -->
<!-- <div id="bannerTop" class="banner-styleTop"></div> -->
<!-- <div id="bannerBottom" class="banner-styleBottom"></div> -->
<!-- -->
<script id="engine-loader" type="text/javascript" src="dmloader.js"></script>
<!-- -->
<script id="engine-setup" type="text/javascript">
</head>
<body>
<div class="canvas-app-container" id="app-container">
<div class="canvas-app-canvas-container" id="canvas-container">
<canvas class="canvas-app-canvas" height="640" id="canvas" tabindex="1" width="960"></canvas>
</div>
<div class="buttons-background"></div>
<!-- center and anchor to bottom of page -->
<div id="progress-bar-root" style="position: absolute; bottom: 16%; left: 50%; visibility: hidden; z-index: 4;">
<!-- <div id="progress-bar-text"> -->
<img id="progress-bar-bg" src="load_bar_bg.png"/>
<img id="progress-bar-fg" src="load_bar_fg.png" style="position:absolute; clip: rect(0px,0px,0px,0px);"/>
</div>
</div>
<!-- -->
<!-- <div id="bannerTop" class="banner-styleTop"></div> -->
<!-- <div id="bannerBottom" class="banner-styleBottom"></div> -->
<!-- -->
<script id="engine-loader" src="dmloader.js" type="text/javascript"></script>
<!-- -->
<script id="engine-setup" type="text/javascript">
var extra_params = {
archive_location_filter: function( path ) {
archive_location_filter: function(path) {
return ("archive" + path + "");
},
engine_arguments: ["--verify-graphics-calls=false",],
custom_heap_size: 134217728,
engine_arguments: ["--verify-graphics-calls=false", ],
custom_heap_size: 67108864,
full_screen_container: "#canvas-container",
disable_context_menu: true
}
@@ -180,24 +176,24 @@
Module['onRuntimeInitialized'] = function() {
Module.runApp("canvas", extra_params);
};
}
;
Module["locateFile"] = function(path, scriptDirectory)
{
Module["locateFile"] = function(path, scriptDirectory) {
// dmengine*.wasm is hardcoded in the built JS loader for WASM,
// we need to replace it here with the correct project name.
if (path == "dmengine.wasm" || path == "dmengine_release.wasm" || path == "dmengine_headless.wasm") {
path = "MonkeyMart.wasm";
}
return scriptDirectory + path;
};
}
;
var is_iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
var buttonHeight = 0;
var prevInnerWidth = -1;
var prevInnerHeight = -1;
function resize_game_canvas() {
// Hack for iOS when exit from Fullscreen mode
if (is_iOS) {
@@ -211,8 +207,7 @@
var progress_bar_bg = document.getElementById('progress-bar-bg');
var innerWidth = window.innerWidth;
var innerHeight = window.innerHeight - buttonHeight;
if (prevInnerWidth == innerWidth && prevInnerHeight == innerHeight)
{
if (prevInnerWidth == innerWidth && prevInnerHeight == innerHeight) {
return;
}
prevInnerWidth = innerWidth;
@@ -222,51 +217,90 @@
var targetRatio = width / height;
var actualRatio = innerWidth / innerHeight;
//Stretch
width = innerWidth;
height = innerHeight;
app_container.style.width = width + "px";
app_container.style.height = height + buttonHeight + "px";
game_canvas.width = width;
game_canvas.height = height;
// progress bar
var bar_h = width < height ? width:height;
progress_bar_bg.width = Math.min(Math.ceil(bar_h * 0.06 * 300/24),width * 0.8);
var bar_h = width < height ? width : height;
progress_bar_bg.width = Math.min(Math.ceil(bar_h * 0.06 * 300 / 24), width * 0.8);
progress_bar_bg.style.marginLeft = - progress_bar_bg.width/2 + "px";
progress_bar_bg.style.marginLeft = -progress_bar_bg.width / 2 + "px";
progress_bar_fg.width = Math.ceil(progress_bar_bg.width * 1);
progress_bar_fg.style.marginTop = (progress_bar_bg.width * 0) * (0)/2 + "px";
progress_bar_fg.style.marginLeft = -progress_bar_bg.width/2 - progress_bar_fg.width/2 + "px";
progress_bar_fg.style.marginTop = (progress_bar_bg.width * 0) * (0) / 2 + "px";
progress_bar_fg.style.marginLeft = -progress_bar_bg.width / 2 - progress_bar_fg.width / 2 + "px";
// progress_bar_text.style.fontSize = Math.ceil(bar_h * 0.10) + "px";
progress_bar_root.style.bottom = Math.ceil(height*0.08 + buttonHeight) + "px";
progress_bar_root.style.bottom = Math.ceil(height * 0.08 + buttonHeight) + "px";
}
resize_game_canvas();
window.addEventListener('resize', resize_game_canvas, false);
window.addEventListener('orientationchange', resize_game_canvas, false);
// window.addEventListener('wheel', e => e.preventDefault(), { passive: false });
window.addEventListener("keydown", function(e) {
if([32, 37, 38, 39, 40].indexOf(e.keyCode) > -1) {
if ([32, 37, 38, 39, 40].indexOf(e.keyCode) > -1) {
e.preventDefault();
}
}, false);
window.addEventListener('focus', resize_game_canvas, false);
//
// HashSHA1 implementation
!function(){var r=function(r){for(var n="",t=7;t>=0;t--)n+="0123456789abcdef".charAt(r>>4*t&15);return n},n=function(r,n){var t=(65535&r)+(65535&n);return(r>>16)+(n>>16)+(t>>16)<<16|65535&t},e=function(r,n){return r<<n|r>>>32-n},o=function(r,n,t,e){return r<20?n&t|~n&e:r<40?n^t^e:r<60?n&t|n&e|t&e:n^t^e},u=function(r){return r<20?1518500249:r<40?1859775393:r<60?-1894007588:-899497514};window._HashSHA1=function(f){for(var a=function(r){for(var n=1+(r.length+8>>6),t=new Array(16*n),e=0;e<16*n;e++)t[e]=0;for(e=0;e<r.length;e++)t[e>>2]|=r.charCodeAt(e)<<24-e%4*8;return t[e>>2]|=128<<24-e%4*8,t[16*n-1]=8*r.length,t}(f),c=new Array(80),i=1732584193,h=-271733879,v=-1732584194,A=271733878,g=-1009589776,l=0;l<a.length;l+=16){for(var w=i,d=h,y=v,H=A,b=g,s=0;s<80;s++)c[s]=s<16?a[l+s]:e(c[s-3]^c[s-8]^c[s-14]^c[s-16],1),t=n(n(e(i,5),o(s,h,v,A)),n(n(g,c[s]),u(s))),g=A,A=v,v=e(h,30),h=i,i=t;i=n(i,w),h=n(h,d),v=n(v,y),A=n(A,H),g=n(g,b)}return r(i)+r(h)+r(v)+r(A)+r(g)}}();
//
!function() {
var r = function(r) {
for (var n = "", t = 7; t >= 0; t--)
n += "0123456789abcdef".charAt(r >> 4 * t & 15);
return n
}
, n = function(r, n) {
var t = (65535 & r) + (65535 & n);
return (r >> 16) + (n >> 16) + (t >> 16) << 16 | 65535 & t
}
, e = function(r, n) {
return r << n | r >>> 32 - n
}
, o = function(r, n, t, e) {
return r < 20 ? n & t | ~n & e : r < 40 ? n ^ t ^ e : r < 60 ? n & t | n & e | t & e : n ^ t ^ e
}
, u = function(r) {
return r < 20 ? 1518500249 : r < 40 ? 1859775393 : r < 60 ? -1894007588 : -899497514
};
window._HashSHA1 = function(f) {
for (var a = function(r) {
for (var n = 1 + (r.length + 8 >> 6), t = new Array(16 * n), e = 0; e < 16 * n; e++)
t[e] = 0;
for (e = 0; e < r.length; e++)
t[e >> 2] |= r.charCodeAt(e) << 24 - e % 4 * 8;
return t[e >> 2] |= 128 << 24 - e % 4 * 8,
t[16 * n - 1] = 8 * r.length,
t
}(f), c = new Array(80), i = 1732584193, h = -271733879, v = -1732584194, A = 271733878, g = -1009589776, l = 0; l < a.length; l += 16) {
for (var w = i, d = h, y = v, H = A, b = g, s = 0; s < 80; s++)
c[s] = s < 16 ? a[l + s] : e(c[s - 3] ^ c[s - 8] ^ c[s - 14] ^ c[s - 16], 1),
t = n(n(e(i, 5), o(s, h, v, A)), n(n(g, c[s]), u(s))),
g = A,
A = v,
v = e(h, 30),
h = i,
i = t;
i = n(i, w),
h = n(h, d),
v = n(v, y),
A = n(A, H),
g = n(g, b)
}
return r(i) + r(h) + r(v) + r(A) + r(g)
}
}();
var old_preloadAndCallMain = Module._preloadAndCallMain;
Module._preloadAndCallMain = function () {
//
// Delete all LiveUpdate files stored in IDBFS
var old_preloadAndCallMain = Module._preloadAndCallMain;
Module._preloadAndCallMain = function() {
var dir = DMSYS.GetUserPersistentDataRoot();
var resDir = _HashSHA1("MonkeyMart");
try {
@@ -278,23 +312,19 @@
try {
FS.unlink(dir + "/." + resDir + "/liveupdate.arci.tmp");
} catch (e) {}
try {
FS.unlink(dir + "/." + resDir + "/liveupdate.mounts");
} catch (e) {}
//
if (Module._archiveLoaded) {
//
}
old_preloadAndCallMain();
};
if (Module._archiveLoaded) {//
}
}
;
</script>
<script id="engine-start" type="text/javascript">
<script id="engine-start" type="text/javascript">
var currentPercentage = 0
Progress.updateProgress = function(percentage) {
Progress.notifyListeners(percentage);
if(currentPercentage>percentage){
if (currentPercentage > percentage) {
percentage = currentPercentage
}
currentPercentage = percentage
@@ -302,18 +332,19 @@
// progress_bar_text.innerHTML = "<b>" + Math.ceil(percentage) + "%</b>";
var fg = document.getElementById('progress-bar-fg');
fg.style.clip="rect(0px," + fg.width * percentage/100 + "px," + fg.height+"px," + "0px)"
fg.style.clip = "rect(0px," + fg.width * percentage / 100 + "px," + fg.height + "px," + "0px)"
if(isNaN(percentage)){
if (isNaN(percentage)) {
var progress_bar_root = document.getElementById('progress-bar-root');
progress_bar_root.style.visibility = "hidden";
}
};
Progress.addProgress = function (){
}
;
Progress.addProgress = function() {
var progress_bar_root = document.getElementById('progress-bar-root');
progress_bar_root.style.visibility = "visible"
}
Progress.removeProgress = function () {
Progress.removeProgress = function() {
var progress_bar_root = document.getElementById('progress-bar-root');
progress_bar_root.style.visibility = "hidden";
// Remove any background/splash image that was set in runApp().
@@ -324,40 +355,32 @@
EngineLoader.stream_wasm = "false" === "true";
EngineLoader.load("canvas", "MonkeyMart");
</script>
<script type="text/javascript">
function poki_showBanner(vBanner) {
PokiSDK.displayAd(document.getElementById(vBanner), '320x50');
}
<script type="text/javascript">
function poki_showBanner(vBanner) {}
function poki_showBigBanner(vBanner) {
PokiSDK.displayAd(document.getElementById(vBanner), '728x90');
}
function poki_showBigBanner(vBanner) {}
function poki_hideBanner(vBanner) {
PokiSDK.destroyAd(document.getElementById(vBanner));
function poki_hideBanner(vBanner) {}
function poki_check() {
}
</script>
<script id="poki-sdk-setup" type="text/javascript">
PokiSDK.gameLoadingStart();
<script id="poki-sdk-setup" type="text/javascript">
var data = {};
var isLoadFinished = false;
Progress.addListener(function(percentage){
Progress.addListener(function(percentage) {
data.percentageDone = percentage / 100;
if (!isLoadFinished)
PokiSDK.gameLoadingProgress(data);
if (percentage == 100 && !isLoadFinished) {
PokiSDK.gameLoadingFinished();
isLoadFinished = true;
}
});
Module['onRuntimeInitialized'] = function() {
PokiSDK.init().then(()=>{
Module.runApp("canvas", extra_params);
}).catch(()=>{
Module.runApp("canvas", extra_params);
});
};
}
;
</script>
<script type="text/javascript" src="GameAnalytics.js"></script>
</body>
<script src="GameAnalytics.js" type="text/javascript"></script>
</body>
</html>
-126
View File
@@ -1,126 +0,0 @@
(() => {
"use strict";
function e() {
var e;
try {
e = performance.getEntriesByType("resource").map((function(e) {
return e.transferSize
})).reduce((function(e, t) {
return e + t
})), e += performance.getEntriesByType("navigation")[0].transferSize
} catch (e) {}
return e
}
var t = function(e) {
var t = RegExp("[?&]".concat(e, "=([^&]*)")).exec(window.location.search);
return t && decodeURIComponent(t[1].replace(/\+/g, " "))
},
n = "kids" === t("tag"),
o = !!window.adBridge,
r = "yes" === t("hoist") || "yes" === t("gdhoist"),
i = new(function() {
function e() {
var e = this;
this.queue = [], this.init = function(t, n) {
return void 0 === t && (t = {}), void 0 === n && (n = {}), new Promise((function(o, r) {
e.enqueue("init", [t, n], o, r)
}))
}, this.rewardedBreak = function() {
return new Promise((function(e) {
e(!1)
}))
}, this.commercialBreak = function(t) {
return new Promise((function(n, o) {
e.enqueue("commercialBreak", [t], n, o)
}))
}, this.displayAd = function(e, t, n, o) {
o && o(!0), n && n()
}, this.withArguments = function(t) {
return function() {
for (var n = [], o = 0; o < arguments.length; o++) n[o] = arguments[o];
e.enqueue(t, n)
}
}, this.handleAutoResolvePromise = function() {
return new Promise((function(e) {
e()
}))
}, this.throwNotLoaded = function() {
console.debug("PokiSDK is not loaded yet. Not all methods are available.")
}, this.doNothing = function() {}
}
return e.prototype.enqueue = function(e, t, o, r) {
var i = {
fn: e,
args: t || [],
resolveFn: o,
rejectFn: r
};
n ? o && o(!0) : this.queue.push(i)
}, e.prototype.dequeue = function() {
for (var e = this, t = function() {
var t, o, r = n.queue.shift(),
i = r,
a = i.fn,
c = i.args;
if ("function" == typeof window.PokiSDK[a])
if ((null == r ? void 0 : r.resolveFn) || (null == r ? void 0 : r.rejectFn)) {
var u = "init" === a;
if ((t = window.PokiSDK)[a].apply(t, c).catch((function() {
for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
"function" == typeof r.rejectFn && r.rejectFn.apply(r, t), u && setTimeout((function() {
e.dequeue()
}), 0)
})).then((function() {
for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
"function" == typeof r.resolveFn && r.resolveFn.apply(r, t), u && setTimeout((function() {
e.dequeue()
}), 0)
})), u) return "break"
} else(o = window.PokiSDK)[a].apply(o, c);
else console.error("Cannot execute ".concat(a))
}, n = this; this.queue.length > 0;) {
if ("break" === t()) break
}
}, e
}());
window.PokiSDK = {
init: i.init,
initWithVideoHB: i.init,
commercialBreak: i.commercialBreak,
rewardedBreak: i.rewardedBreak,
displayAd: i.displayAd,
destroyAd: i.doNothing,
getLeaderboard: i.handleAutoResolvePromise,
shareableURL: function() {
return new Promise((function(e, t) {
return t()
}))
},
getURLParam: function(e) {
return t("gd".concat(e)) || t(e) || ""
},
getLanguage: function() {
return navigator.language.toLowerCase().split("-")[0]
},
isAdBlocked: function() {}
}, ["captureError", "customEvent", "gameInteractive", "gameLoadingFinished", "gameLoadingProgress", "gameLoadingStart", "gameplayStart", "gameplayStop", "happyTime", "logError", "muteAd", "roundEnd", "roundStart", "sendHighscore", "setDebug", "setDebugTouchOverlayController", "setLogging", "setPlayerAge", "setPlaytestCanvas", "enableEventTracking", "playtestSetCanvas", "playtestCaptureHtmlOnce"].forEach((function(e) {
window.PokiSDK[e] = i.withArguments(e)
})), o || n || (window.pokiCancelProgressInterval = setInterval((function() {
window.parent.postMessage({
type: "pokiProgress",
downloaded: e()
}, "*")
}), 1e3));
var a = function() {
var e = window.pokiSDKVersion || t("ab") || "ea3bf7fbf0b66afafd7ac6ecbb583b3045005c15",
i = "poki-sdk-core-".concat(e, ".js");
n && (i = "poki-sdk-kids-".concat(e, ".js")), o && (i = "poki-sdk-playground-".concat(e, ".js")), r && (i = "poki-sdk-hoist-".concat(e, ".js"));
new URL(document.currentScript.src);
return "js/".concat(e, "/").concat(i)
}(),
c = document.createElement("script");
c.setAttribute("src", a), c.setAttribute("type", "text/javascript"), c.setAttribute("crossOrigin", "anonymous"), c.onload = function() {
return i.dequeue()
}, document.head.appendChild(c)
})();
Binary file not shown.