new adcap

This commit is contained in:
Sky 2023-06-04 09:55:16 -04:00
parent 0a4872cd40
commit 37bd2c37b3
34 changed files with 150 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
function UnityProgress(dom){this.progress=0.0;this.message="";this.dom=dom;var parent=dom.parentNode;this.SetProgress=function(progress){if(this.progress<progress)
this.progress=progress;if(progress==1){this.SetMessage("Preparing...");document.getElementById("bgBar").style.display="none";document.getElementById("progressBar").style.display="none";}
this.Update();}
this.SetMessage=function(message){this.message=message;this.Update();}
this.Clear=function(){document.getElementById("loadingBox").style.display="none";}
this.Update=function(){var length=200*Math.min(this.progress,1);bar=document.getElementById("progressBar")
bar.style.width=length+"px";document.getElementById("loadingInfo").innerHTML=this.message;}
this.Update();}

View File

@ -0,0 +1 @@
html,body{margin:0;padding:0}canvas{padding:0;margin:0 auto;display:block;width:1024px;height:640px}body{overflow:hidden}div#loadingBox{width:100%;height:20px;position:absolute;top:50%;margin-top:-10px;text-align:center}div#bgBar{position:absolute;width:200px;margin-left:-100px;left:50%;height:2px;display:block;background-color:#333}div#progressBar{left:50%;position:absolute;margin-left:-100px;width:0;height:2px;background-color:#fff;border-radius:2px}div#bgBar{border-radius:2px}p#loadingInfo{color:#666;letter-spacing:1px;position:absolute;width:100%;font-family:monaco,sans-serif;text-transform:uppercase;text-align:center;font-size:14px;margin-top:10px}

View File

@ -1 +1,116 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/adventure-capitalist/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/adventure-capitalist/logo192.png"/><link rel="manifest" href="/adventure-capitalist/manifest.json"/><title>Adventure Capitalist</title><link href="https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&display=swap" rel="stylesheet"><link href="/adventure-capitalist/static/css/main.39e638da.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,a,i=t[0],l=t[1],p=t[2],f=0,s=[];f<i.length;f++)a=i[f],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(c&&c(t);s.length;)s.shift()();return u.push.apply(u,p||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,i=1;i<r.length;i++){var l=r[i];0!==o[l]&&(n=!1)}n&&(u.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={1:0},u=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/adventure-capitalist/";var i=this["webpackJsonpadventure-capitalist"]=this["webpackJsonpadventure-capitalist"]||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var p=0;p<i.length;p++)t(i[p]);var c=l;r()}([])</script><script src="/adventure-capitalist/static/js/2.d0016a81.chunk.js"></script><script src="/adventure-capitalist/static/js/main.18e3ecab.chunk.js"></script></body></html> <!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity WebGL Player | AdVenture Capitalist!</title>
<link rel="stylesheet" href="TemplateData/style.css">
<script src="TemplateData/UnityProgress.js"></script>
</head>
<body class="template">
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" height="100%" width="100%"></canvas>
<div id="loadingBox">
<div id="bgBar"></div>
<div id="progressBar"></div>
<p id="loadingInfo">Loading...</p>
</div>
<script type='text/javascript'>
alert('Want to go to the old Adventure Capitalist? Just add "old" to the end of the url.');
// connect to canvas
var Module = {
TOTAL_MEMORY: 201326592,
filePackagePrefixURL: "https://raw.githubusercontent.com/EmulatorOS/gfile/main/adcap/Release/",
memoryInitializerPrefixURL: "https://raw.githack.com/EmulatorOS/gfile/main/adcap/Release/",
preRun: [],
postRun: [],
print: (function() {
return function(text) {
console.log(text);
};
})(),
printErr: function(text) {
console.error(text);
},
canvas: document.getElementById('canvas'),
progress: null,
setStatus: function(text) {
if (this.progress == null) {
if (typeof UnityProgress != 'function')
return;
this.progress = new UnityProgress(canvas);
}
if (!Module.setStatus.last) Module.setStatus.last = {
time: Date.now(),
text: ''
};
if (text === Module.setStatus.text) return;
this.progress.SetMessage(text);
var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
if (m)
this.progress.SetProgress(parseInt(m[2]) / parseInt(m[4]));
if (text === "")
this.progress.Clear()
},
totalDependencies: 0,
monitorRunDependencies: function(left) {
this.totalDependencies = Math.max(this.totalDependencies, left);
Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies - left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
}
};
Module.setStatus('Downloading (0.0/1)');
</script>
<script src="https://raw.githack.com/EmulatorOS/gfile/main/adcap/Release/UnityConfig.js"></script>
<script src="https://raw.githack.com/EmulatorOS/gfile/main/adcap/Release/fileloader.js"></script>
<script>
if (!(!Math.fround)) {
var script = document.createElement('script');
script.src = "https://raw.githack.com/EmulatorOS/gfile/main/adcap/Release/webgl.js";
document.body.appendChild(script);
} else {
var codeXHR = new XMLHttpRequest();
codeXHR.open('GET', 'https://raw.githack.com/EmulatorOS/gfile/main/adcap/Release/webgl.js', true);
codeXHR.onload = function() {
var code = codeXHR.responseText;
if (!Math.fround) {
try {
console.log('optimizing out Math.fround calls');
var m = /var ([^=]+)=global\.Math\.fround;/.exec(code);
var minified = m[1];
if (!minified) throw 'fail';
var startAsm = code.indexOf('// EMSCRIPTEN_START_FUNCS');
var endAsm = code.indexOf('// EMSCRIPTEN_END_FUNCS');
var asm = code.substring(startAsm, endAsm);
do {
var moar = false; // we need to re-do, as x(x( will not be fixed
asm = asm.replace(new RegExp('[^a-zA-Z0-9\\$\\_]' + minified + '\\(', 'g'), function(s) {
moar = true;
return s[0] + '('
});
} while (moar);
code = code.substring(0, startAsm) + asm + code.substring(endAsm);
code = code.replace("'use asm'", "'almost asm'");
} catch (e) {
console.log('failed to optimize out Math.fround calls ' + e)
}
}
var blob = new Blob([code], {
type: 'text/javascript'
});
codeXHR = null;
var src = URL.createObjectURL(blob);
var script = document.createElement('script');
script.src = URL.createObjectURL(blob);
script.onload = function() {
URL.revokeObjectURL(script.src);
};
document.body.appendChild(script);
};
codeXHR.send(null);
}
</script>
<script src="97c35fd0-ea33-4844-a283-b7a4c6942643" id="c4174e706ac02e24f4101391e93a5db9"></script>
</body>
</html>

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 162 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 839 B

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1010 B

After

Width:  |  Height:  |  Size: 1010 B

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/adventure-capitalist/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/adventure-capitalist/logo192.png"/><link rel="manifest" href="/adventure-capitalist/manifest.json"/><title>Adventure Capitalist</title><link href="https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&display=swap" rel="stylesheet"><link href="/adventure-capitalist/static/css/main.39e638da.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,a,i=t[0],l=t[1],p=t[2],f=0,s=[];f<i.length;f++)a=i[f],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(c&&c(t);s.length;)s.shift()();return u.push.apply(u,p||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,i=1;i<r.length;i++){var l=r[i];0!==o[l]&&(n=!1)}n&&(u.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={1:0},u=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/adventure-capitalist/";var i=this["webpackJsonpadventure-capitalist"]=this["webpackJsonpadventure-capitalist"]||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var p=0;p<i.length;p++)t(i[p]);var c=l;r()}([])</script><script src="/adventure-capitalist/static/js/2.d0016a81.chunk.js"></script><script src="/adventure-capitalist/static/js/main.18e3ecab.chunk.js"></script></body></html>

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB