-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
34 lines (34 loc) · 41.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
<meta name="generator" content="WASM-4 1.0.7" />
<title>WASM-4 Game</title>
<style type="text/css" id="wasm4-css">*{box-sizing:border-box}body,html{height:100%;margin:0}body{background:#202020;font-family:system-ui;touch-action:none}.container{align-items:center;display:flex;height:100%;justify-content:center;width:100%}#content{height:100vmin;overflow:hidden;width:100vmin}#content canvas,#screenshot img{height:100%;image-rendering:pixelated;image-rendering:crisp-edges;width:100%}@media (pointer:fine){.gamepad{display:none}}body.focus #screenshot,body.focus .infobox,body:not(.focus) .gamepad{display:none}.gamepad{pointer-events:none}#gamepad-dpad{background:#444;border-radius:9px;bottom:30px;height:120px;left:69px;position:absolute;width:39px}#gamepad-dpad:before{background:#444;border-radius:9px;left:-39px;width:120px}#gamepad-dpad:after,#gamepad-dpad:before{content:"";height:39px;position:absolute;top:39px}#gamepad-dpad:after{background:#333;border-radius:100%;width:39px}#gamepad-dpad.pressed-left:before{border-left:4px solid #a93671;width:116px}#gamepad-dpad.pressed-right:before{border-right:4px solid #a93671;width:116px}#gamepad-dpad.pressed-up{border-top:4px solid #a93671}#gamepad-dpad.pressed-down{border-bottom:4px solid #a93671;height:116px}#gamepad-action1{bottom:30px;right:80px}#gamepad-action2{bottom:90px;right:30px}#gamepad-action1,#gamepad-action2{border:4px solid #a93671;border-radius:50px;height:60px;position:absolute;width:60px}#gamepad-action1.pressed,#gamepad-action2.pressed{background:#a93671}.play-button{border:2px solid;border-radius:20px;height:22px;left:calc(50vmin - 11px);top:calc(50vmin - 11px);transform:scale(4);width:22px}.play-button,.play-button:before{box-sizing:border-box;display:block;position:absolute}.play-button:before{border-bottom:5px solid transparent;border-left:6px solid;border-top:5px solid transparent;content:"";height:10px;left:7px;top:4px;width:0}.infobox{background:rgba(0,0,0,.8);color:#fff;cursor:pointer;height:100%;padding:20px;position:absolute;width:100vmin}body{overflow:hidden}</style>
</head>
<body>
<div class="container">
<div id="content">
<div class="infobox">
<h2 id="title"></h2>
<h4 id="author"></h4>
<span class="play-button"></span>
</div>
<div id="screenshot"></div>
</div>
</div>
<div class="gamepad">
<div id="gamepad-dpad"></div>
<div id="gamepad-action1"></div>
<div id="gamepad-action2"></div>
</div>
<script
id="wasm4-cart-json"
type="application/json"
>{"WASM4_CART":"0ax}=0rr910yWu627IbLE$8}Fu<7$eE$4Da1aL/I0ak^bu&+-Su<ImiE$8@$E$4Da2Z}bJE%(-{E/U4b0!kX2E{-tcE/J<SE/U32m*o6bzGVk3wO(vaC(!0E0rV[JB{8n<x(<sP17=v[1AF6-Bn#szwO#U]By/Ys00imlzGVe0x(mFZ0rV[JB{8]9zE&!G0$=7D0%wYf0%O(k1oO-i2mgRr1P-My0rAxg0E>boZ$eL]2oT9RuUKy(Bzkf1x)Ks<1{G6&vrcC&4*Ee}wmoN>01YHGp.iWd3Ku.zG[aY701j./0Tj5OD{E-Q0rUN*kMTg[0ysi$mHYtu0yuX6FpESmeDt+W0u.zeXw-#G0brRRiSGcYkP*4)@@E9-06{-T4fdHKld0P3Fb<sIKo^]G03zqd[X{3e0bs!viSGc/0ZD/LaojXhmHYtu0yt8KFpESmeDt+]0T]8qaos^P-EJEsyc^T!i@]s70yum{FpESmk%dgd06{(l0T*aKlgS0BFb<sI06g8Waos^$-EJEsyc.?X001bxlh!=MFb<sI0xHhXaos^H-EJEsyc.?L0I)hPFb)5s0@%CAlhnAHFb<sI0yl=M051w.=WZJCa{gapAuUJ8huA>30yus@FpESmk(-FpS<^Ie071)hy:5<BW6$No0bs7=03ROc001bxlg&cDFb<sb070&#FpESme=+}@06g8Waos^z-EJEsy9iH013$olao->/y9iNz@@E9-0CVy*yc.(nWA00000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ex401f[Hk{f[/FpJf201j2L0E(i(c&<q<051uSk[FbX051uQk]sY:aoj4}2Y.3/f98zC2Y$8f051uYaoi$[4)Znsaoi$[4SSblFpJdI0ZG3Ke=?SNFpERz0ZM&T4feV]aoB&Uyc8D?WT-(d3J-No0sY2{03zm{0sg:/PTGx301fe$0rEVKkMTg[0yqic4fdHJk}La$03znc0CS+V3&{-403zqTaPSX=aP-2]0W4HPLZ[pm06{PC001bw3NU@QE)B5T0rLH*kP*4)3p>Qbaos+ey9rQ206{%faPI]J3KX6T3OqtWkP*7[C1JhzaoiI+k)?DuLZ[pm03IsIaojXYaos+nz!?xl03znc0CR#ISVh6ul7*1w=&SX8)/is/0000000000006]?1a!qD[+-v5.*}&s5Kjx*GtOdS^F%mD&RRKk}%<Z7%ncg7}%:T^00000008>x}wWiI0000000000008$E[4X?UZ3+}3000000000HyB-]{fk&HZblflfd}wPjz.D2N0r4AoZY066))NjC07PsHmiCxbmn:b8A+frkaxP+dzY<7iB97&hBo3o2wPI]nsrIZ7aAITkA=.rWFa7eJ?[wEU00000008=/{V68uFrWIp<h6pC%nR&/{VGDg.o}@I>FLZC%nSb[}%ReN{Rl:%{X>c(%nLs+00000000Yk001bw0%mP+000o83igti2MM4G0@@D8000c41][/b1ooRC0@@/i*YdPW1on]i1ooUD002g+tMUli000ua001qB0rR3Recc1R5c9gu001zE0rAf^[hgP%82%Tp0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","WASM4_CART_SIZE":14152}</script>
<script id="wasm4-js">(()=>{"use strict";const t=160,e=160,n=[14743759,8831084,3172432,464929],r="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#".split(""),i=[0,68,0,84,83,82,72,0,75,76,70,65,0,63,62,69,0,1,2,3,4,5,6,7,8,9,64,0,73,66,74,71,81,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,0,78,67,0,0,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,79,0,80,0,0];function a(t,e){let n=0,r=0,a=t.length,s=e.length,o=0;if(t.length%5==0)for(;r<a;){let a=t.charCodeAt(r++)-32;if(a<0||a>=i.length)return n;if(o=85*o+i[a],r%5==0){let t=16777216;for(;t>=1;){if(n>=s)return n;e[n++]=o/t%256,t/=256}o=0}}return n}const s=2048;class o{constructor(){const t=new(window.AudioContext||window.webkitAudioContext);function e(e){const n=new Float32Array(s);for(let t=1;t<s;t++)n[t]=4/(t*Math.PI)*Math.sin(Math.PI*t*e);return t.createPeriodicWave(n,new Float32Array(s))}this.ctx=t,this.nodes=new Array(4);const n=e(.25);this.pulseDutyCycles=[e(.125),n,e(.5),n];const r=t.createBuffer(1,32768,t.sampleRate),i=r.getChannelData(0);let a=1;for(let t=0;t<32768;++t){const e=1&a;a>>=1;const n=e^1&a;a|=n<<14,i[t]=n}this.noiseBuffer=r}tone(t,e,n,r){const i=65535&t,a=t>>16&65535,s=(255&e)/60,o=(e>>8&255)/60,c=(e>>16&255)/60,d=(e>>24&255)/60,l=3&r,f=r>>2&3,u=this.ctx,h=u.currentTime+d,m=h+c,w=m+s,p=w+o;let b=1,y=n/100;0!=l&&1!=l||(b*=.5,y*=.5);const g=u.createGain(),U=g.gain;let v;if(U.setValueAtTime(0,0),U.linearRampToValueAtTime(b,h),U.linearRampToValueAtTime(y,m),U.linearRampToValueAtTime(y,w),U.linearRampToValueAtTime(0,p),3==l){v=u.createBufferSource(),v.buffer=this.noiseBuffer,v.loop=!0;const t=v.playbackRate;t.setValueAtTime(i*i/1e6,0),a&&t.linearRampToValueAtTime(a*a/1e6,p)}else{if(v=u.createOscillator(),2==l)v.type="triangle";else{const t=this.pulseDutyCycles[f];v.setPeriodicWave(t)}const t=v.frequency;t.setValueAtTime(i,0),a&&t.linearRampToValueAtTime(a,p)}const x=this.nodes[l];null!=x&&x.stop(0),this.nodes[l]=v,v.start(0),v.stop(p),v.connect(g),g.connect(u.destination)}}const c=new Uint8Array([255,255,255,255,255,255,255,255,199,199,199,207,207,255,207,255,147,147,147,255,255,255,255,255,147,1,147,147,147,1,147,255,239,131,47,131,233,3,239,255,157,91,55,239,217,181,115,255,143,39,39,143,37,51,129,255,207,207,207,255,255,255,255,255,243,231,207,207,207,231,243,255,159,207,231,231,231,207,159,255,255,147,199,1,199,147,255,255,255,231,231,129,231,231,255,255,255,255,255,255,255,207,207,159,255,255,255,129,255,255,255,255,255,255,255,255,255,207,207,255,253,251,247,239,223,191,127,255,199,179,57,57,57,155,199,255,231,199,231,231,231,231,129,255,131,57,241,195,135,31,1,255,129,243,231,195,249,57,131,255,227,195,147,51,1,243,243,255,3,63,3,249,249,57,131,255,195,159,63,3,57,57,131,255,1,57,243,231,207,207,207,255,135,59,27,135,97,121,131,255,131,57,57,129,249,243,135,255,255,207,207,255,207,207,255,255,255,207,207,255,207,207,159,255,243,231,207,159,207,231,243,255,255,255,1,255,1,255,255,255,159,207,231,243,231,207,159,255,131,1,57,243,199,255,199,255,131,125,69,85,65,127,131,255,199,147,57,57,1,57,57,255,3,57,57,3,57,57,3,255,195,153,63,63,63,153,195,255,7,51,57,57,57,51,7,255,1,63,63,3,63,63,1,255,1,63,63,3,63,63,63,255,193,159,63,49,57,153,193,255,57,57,57,1,57,57,57,255,129,231,231,231,231,231,129,255,249,249,249,249,249,57,131,255,57,51,39,15,7,35,49,255,159,159,159,159,159,159,129,255,57,17,1,1,41,57,57,255,57,25,9,1,33,49,57,255,131,57,57,57,57,57,131,255,3,57,57,57,3,63,63,255,131,57,57,57,33,51,133,255,3,57,57,49,7,35,49,255,135,51,63,131,249,57,131,255,129,231,231,231,231,231,231,255,57,57,57,57,57,57,131,255,57,57,57,17,131,199,239,255,57,57,41,1,1,17,57,255,57,17,131,199,131,17,57,255,153,153,153,195,231,231,231,255,1,241,227,199,143,31,1,255,195,207,207,207,207,207,195,255,127,191,223,239,247,251,253,255,135,231,231,231,231,231,135,255,199,147,255,255,255,255,255,255,255,255,255,255,255,255,255,1,239,247,255,255,255,255,255,255,255,255,131,249,129,57,129,255,63,63,3,57,57,57,131,255,255,255,129,63,63,63,129,255,249,249,129,57,57,57,129,255,255,255,131,57,1,63,131,255,241,231,129,231,231,231,231,255,255,255,129,57,57,129,249,131,63,63,3,57,57,57,57,255,231,255,199,231,231,231,129,255,243,255,227,243,243,243,243,135,63,63,49,3,7,35,49,255,199,231,231,231,231,231,129,255,255,255,3,73,73,73,73,255,255,255,3,57,57,57,57,255,255,255,131,57,57,57,131,255,255,255,3,57,57,3,63,63,255,255,129,57,57,129,249,249,255,255,145,143,159,159,159,255,255,255,131,63,131,249,3,255,231,231,129,231,231,231,231,255,255,255,57,57,57,57,129,255,255,255,153,153,153,195,231,255,255,255,73,73,73,73,129,255,255,255,57,1,199,1,57,255,255,255,57,57,57,129,249,131,255,255,1,227,199,143,1,255,243,231,231,207,231,231,243,255,231,231,231,231,231,231,231,255,159,207,207,231,207,207,159,255,255,255,143,69,227,255,255,255,255,255,255,255,255,147,147,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,231,255,231,231,199,199,199,255,239,131,41,47,41,131,239,255,195,153,159,3,159,159,1,255,255,165,219,219,219,165,255,255,153,153,195,129,231,129,231,255,231,231,231,255,231,231,231,255,195,153,135,219,225,153,195,255,147,255,255,255,255,255,255,255,195,189,102,94,94,102,189,195,135,195,147,195,255,255,255,255,255,201,147,39,147,201,255,255,255,255,129,249,249,255,255,255,255,255,255,255,255,255,255,255,195,189,70,90,70,90,189,195,131,255,255,255,255,255,255,255,239,215,239,255,255,255,255,255,231,231,129,231,231,255,129,255,199,243,231,195,255,255,255,255,195,231,243,199,255,255,255,255,247,239,255,255,255,255,255,255,255,255,51,51,51,51,9,63,193,149,181,149,193,245,245,255,255,255,255,207,207,255,255,255,255,255,255,255,255,255,247,207,231,199,231,195,255,255,255,255,199,147,147,199,255,255,255,255,255,39,147,201,147,39,255,255,189,59,183,173,217,177,125,255,189,59,183,169,221,187,113,255,29,187,215,45,217,177,125,255,199,255,199,159,57,1,131,255,223,239,199,147,57,1,57,255,247,239,199,147,57,1,57,255,199,147,199,147,57,1,57,255,203,167,199,147,57,1,57,255,147,255,199,147,57,1,57,255,239,215,199,147,57,1,57,255,193,135,39,33,7,39,33,255,195,153,63,63,153,195,247,207,223,239,1,63,3,63,1,255,247,239,1,63,3,63,1,255,199,147,1,63,3,63,1,255,147,255,1,63,3,63,1,255,239,247,129,231,231,231,129,255,247,239,129,231,231,231,129,255,231,195,129,231,231,231,129,255,153,255,129,231,231,231,129,255,135,147,153,9,153,147,135,255,203,167,25,9,1,33,49,255,223,239,131,57,57,57,131,255,247,239,131,57,57,57,131,255,199,147,131,57,57,57,131,255,203,167,131,57,57,57,131,255,147,255,131,57,57,57,131,255,255,187,215,239,215,187,255,255,131,57,49,41,25,57,131,255,223,239,57,57,57,57,131,255,247,239,57,57,57,57,131,255,199,147,255,57,57,57,131,255,147,255,57,57,57,57,131,255,247,239,153,153,195,231,231,255,63,3,57,57,57,3,63,255,195,153,153,147,153,137,147,255,223,239,131,249,129,57,129,255,247,239,131,249,129,57,129,255,199,147,131,249,129,57,129,255,203,167,131,249,129,57,129,255,147,255,131,249,129,57,129,255,239,215,131,249,129,57,129,255,255,255,131,233,129,47,131,255,255,255,129,63,63,129,247,207,223,239,131,57,1,63,131,255,247,239,131,57,1,63,131,255,199,147,131,57,1,63,131,255,147,255,131,57,1,63,131,255,223,239,255,199,231,231,129,255,247,239,255,199,231,231,129,255,199,147,255,199,231,231,129,255,147,255,199,231,231,231,129,255,155,135,103,131,57,57,131,255,203,167,3,57,57,57,57,255,223,239,131,57,57,57,131,255,247,239,131,57,57,57,131,255,199,147,131,57,57,57,131,255,203,167,131,57,57,57,131,255,147,255,131,57,57,57,131,255,255,231,255,129,255,231,255,255,255,255,131,49,41,25,131,255,223,239,57,57,57,57,129,255,247,239,57,57,57,57,129,255,199,147,255,57,57,57,129,255,147,255,57,57,57,57,129,255,247,239,57,57,57,129,249,131,63,63,3,57,57,3,63,63,147,255,57,57,57,129,249,131]);class d{constructor(t){this.bytes=new Uint8Array(t,160,6400),this.drawColors=new Uint16Array(t,20,1)}clear(){this.bytes.fill(0)}drawPoint(e,n,r){const i=t*r+n>>2,a=(3&n)<<1,s=3<<a;this.bytes[i]=e<<a|this.bytes[i]&~s}drawPointUnclipped(n,r,i){r>=0&&r<t&&i>=0&&i<e&&this.drawPoint(n,r,i)}drawRect(n,r,i,a){const s=Math.max(0,n),o=Math.max(0,r),c=Math.min(n+i,t),d=Math.min(r+a,e),l=this.drawColors[0],f=15&l,u=l>>4&15;if(0!=f){const t=f-1&3;for(let e=o;e<d;++e)for(let n=s;n<c;++n)this.drawPoint(t,n,e)}if(0!=u){const i=u-1&3;if(n>=0&&n<t)for(let t=o;t<d;++t)this.drawPoint(i,n,t);if(c>0&&c<161)for(let t=o;t<d;++t)this.drawPoint(i,c-1,t);if(r>=0&&r<e)for(let t=s;t<c;++t)this.drawPoint(i,t,r);if(d>0&&d<161)for(let t=s;t<c;++t)this.drawPoint(i,t,d-1)}}drawOval(t,e,n,r){const i=this.drawColors[0]>>4&15;if(15==i)return;const a=i-1&3,s=n/2,o=r/2;if(s<=0)return;if(o<=0)return;const c=t+s,d=e+o,l=s*s*2,f=o*o*2;{let t=s,e=0,n=(1-2*s)*o*o,r=s*s,i=f*s,u=0,h=0;for(;i>=u;)this.drawPointUnclipped(a,c+t,d+e),this.drawPointUnclipped(a,c+t,d-e),this.drawPointUnclipped(a,c-t,d+e),this.drawPointUnclipped(a,c-t,d-e),e++,u+=l,h+=r,r+=l,2*h+n>0&&(t--,i-=f,h+=n,n+=f)}{let t=0,e=o,n=o*o,r=(1-2*o)*s*s,i=0,u=l*o,h=0;for(;u>=i;)this.drawPointUnclipped(a,c+t,d+e),this.drawPointUnclipped(a,c+t,d-e),this.drawPointUnclipped(a,c-t,d+e),this.drawPointUnclipped(a,c-t,d-e),t++,i+=f,h+=n,n+=f,2*h+r>0&&(e--,u-=l,h+=r,r+=l)}}drawLine(t,e,n,r){const i=15&this.drawColors[0];if(0==i)return;const a=i-1&3;if(e>r){let i=t;t=n,n=i,i=e,e=r,r=i}const s=Math.abs(n-t),o=t<n?1:-1,c=r-e;let d,l=(s>c?s:-c)/2;for(;this.drawPointUnclipped(a,t,e),t!=n||e!=r;)d=l,d>-s&&(l-=c,t+=o),d<c&&(l+=s,e++)}drawText(t,e,n){let r=e;for(let i=0,a=t.length;i<a;++i){const a=t[i];switch(a){case 0:return;case 10:n+=8,r=e;break;default:this.blit(c,r,n,8,8,0,8*(a-32),8,!1,!1,!1),r+=8}}}blit(n,r,i,a,s,o,c,d,l,f,u,h){const m=Math.max(0,r)-r,w=Math.max(0,i)-i,p=Math.min(a,t-r),b=Math.min(s,e-i),y=this.drawColors[0];h&&(f=!f);for(let t=w;t<b;++t)for(let e=m;e<p;++e){let a,s,m;h?(a=t,s=e):(a=e,s=t),f&&(a=p-a-1),u&&(s=b-s-1);const w=o+a,g=c+s;m=l?n[g*d+w>>2]>>6-((3&w)<<1)&3:n[g*d+w>>3]>>7-(7&w)&1;const U=y>>(m<<2)&15;0!=U&&this.drawPoint(U-1&3,r+e,i+t)}}}const l=6409,f=3553;class u{constructor(n){this.gl=n,this.colorBuffer=new Uint32Array(6400),this.paletteBuffer=new Float32Array(12),this.lastPalette=Array(4);const r=new Uint32Array(256);for(let t=0;t<256;++t){const e=t>>6&3,n=t>>4&3,i=t>>2&3,a=3&t;r[t]=e<<30|n<<22|i<<14|a<<6}function i(t,e){const r=n.createShader(t);return n.shaderSource(r,e),n.compileShader(r),r}this.table=r;const a=i(35633,"\n attribute vec2 pos;\n varying vec2 framebufferCoord;\n\n void main () {\n framebufferCoord = pos*vec2(0.5, -0.5) + 0.5;\n gl_Position = vec4(pos, 0, 1);\n }\n "),s=i(35632,`\n precision mediump float;\n uniform vec3 palette[4];\n uniform sampler2D framebuffer;\n varying vec2 framebufferCoord;\n\n vec3 lookup(float index) {\n vec3 p = palette[0];\n ${Array.from({length:3},((t,e)=>`p = mix(p, palette[${e+1}], step(${((e+1)/4).toFixed(2)}, index));`)).join("\n")}\n return p;\n }\n\n void main () {\n gl_FragColor = vec4(lookup(texture2D(framebuffer, framebufferCoord).r), 1.);\n }\n `),o=n.createProgram();n.attachShader(o,a),n.attachShader(o,s),n.linkProgram(o),n.useProgram(o),this.paletteLocation=n.getUniformLocation(o,"palette"),n.uniform1i(n.getUniformLocation(o,"framebuffer"),0),n.detachShader(o,a),n.deleteShader(a),n.detachShader(o,s),n.deleteShader(s),function(t){const e=n.createTexture();n.activeTexture(33984),n.bindTexture(f,e),n.texParameteri(f,10242,33071),n.texParameteri(f,10243,33071),n.texParameteri(f,10240,9728),n.texParameteri(f,10241,9728)}(),n.texImage2D(f,0,l,t,e,0,l,5121,null);const c=n.getAttribLocation(o,"pos"),d=n.createBuffer(),u=new Float32Array([-1,-1,-1,1,1,1,1,1,1,-1,-1,-1]);n.bindBuffer(34962,d),n.bufferData(34962,u,35044),n.enableVertexAttribArray(c),n.vertexAttribPointer(c,2,5126,!1,0,0)}composite(n,r){const i=this.gl,a=r.bytes,s=this.colorBuffer,o=this.table,c=this.lastPalette,d=this.paletteBuffer;let u=!1;for(let t=0,e=0;t<4;++t){const r=n[t];u=u||c[t]!==r,d[e++]=(r>>16&255)/255,d[e++]=(r>>8&255)/255,d[e++]=(255&r)/255,c[t]=r}u&&i.uniform3fv(this.paletteLocation,this.paletteBuffer);for(let t=0;t<6400;++t)s[t]=o[a[t]];i.texImage2D(f,0,l,t,e,0,l,5121,new Uint8Array(s.buffer)),i.drawArrays(4,0,6)}}const h="4444"==location.port?new WebSocket("ws://"+location.host):null;class m{constructor(){const n=document.createElement("canvas");n.width=t,n.height=e,this.canvas=n;const r=n.getContext("webgl",{alpha:!1,depth:!1,antialias:!1});this.compositor=new u(r),this.apu=new o,this.memory=new WebAssembly.Memory({initial:1,maximum:1}),this.data=new DataView(this.memory.buffer),this.framebuffer=new d(this.memory.buffer),this.reset(),this.paused=!1}setMouse(t,e,n){this.data.setInt16(26,t,!0),this.data.setInt16(28,e,!0),this.data.setUint8(30,n)}setGamepad(t,e){this.data.setUint8(22+t,e)}getGamepad(t){return this.data.getUint8(22+t)}maskGamepad(t,e,n){const r=22+t;let i=this.data.getUint8(r);n?i|=e:i&=~e,this.data.setUint8(r,i)}unlockAudio(){const t=this.apu.ctx;"suspended"==t.state&&t.resume()}reset(t){const e=new Uint32Array(this.memory.buffer);t&&e.fill(0),e.set(n,1),this.data.setUint16(20,4611,!0),this.data.setInt16(26,32767,!0),this.data.setInt16(28,32767,!0)}async load(t){const e={memory:this.memory,rect:this.framebuffer.drawRect.bind(this.framebuffer),oval:this.framebuffer.drawOval.bind(this.framebuffer),line:this.framebuffer.drawLine.bind(this.framebuffer),text:this.text.bind(this),textUtf8:this.textUtf8.bind(this),textUtf16:this.textUtf16.bind(this),blit:this.blit.bind(this),blitSub:this.blitSub.bind(this),tone:this.apu.tone.bind(this.apu),diskr:this.diskr.bind(this),diskw:this.diskw.bind(this),trace:this.trace.bind(this),traceUtf8:this.traceUtf8.bind(this),traceUtf16:this.traceUtf16.bind(this),tracef:this.tracef.bind(this),seed:Date.now,abort:function(){}},n=await WebAssembly.instantiate(t,{env:e});this.wasm=n.instance,null!=this.wasm.exports._start&&this.wasm.exports._start()}text(t,e,n){const r=new Uint8Array(this.memory.buffer,t);this.framebuffer.drawText(r,e,n)}textUtf8(t,e,n,r){const i=new Uint8Array(this.memory.buffer,t,e);this.framebuffer.drawText(i,n,r)}textUtf16(t,e,n,r){const i=new Uint16Array(this.memory.buffer,t,e>>1);this.framebuffer.drawText(i,n,r)}blit(t,e,n,r,i,a){this.blitSub(t,e,n,r,i,0,0,r,a)}blitSub(t,e,n,r,i,a,s,o,c){const d=new Uint8Array(this.memory.buffer,t),l=1&c,f=2&c,u=4&c,h=8&c;this.framebuffer.blit(d,e,n,r,i,a,s,o,l,f,u,h)}diskr(t,e){let n;try{n=localStorage.getItem("disk")}catch(t){}return null==n?0:a(n,new Uint8Array(this.memory.buffer,t,Math.min(e,1024)))}diskw(t,e){const n=Math.min(e,1024),i=function(t){const e=t.length,n=e%4,i=n?e+4-n:e;let a="",s=0,o=0;for(;s<i;){const n=s<e?t[s]:0;if(++s,o=256*o+n,s%4==0){let t=52200625;for(;t>=1;){const e=Math.floor(o/t)%85;a+=r[e],t/=85}o=0}}return a}(new Uint8Array(this.memory.buffer,t,n));try{localStorage.setItem("disk",i)}catch(t){return 0}return n}print(t){console.log(t),null!=h&&1==h.readyState&&h.send(t)}trace(t){let e="";for(;;){const n=this.data.getUint8(t++);if(0==n)break;e+=String.fromCharCode(n)}this.print(e)}traceUtf8(t,e){const n=new Uint8Array(this.memory.buffer,t,e),r=(new TextDecoder).decode(n);this.print(r)}traceUtf16(t,e){const n=new Uint8Array(this.memory.buffer,t,e),r=new TextDecoder("utf-16").decode(n);this.print(r)}tracef(t,e){var n="";let r;for(;r=this.data.getUint8(t++);)if(37==r)switch(r=this.data.getUint8(t++)){case 37:n+="%";break;case 99:n+=String.fromCharCode(this.data.getInt32(e,!0)),e+=4;break;case 100:case 120:n+=this.data.getInt32(e,!0).toString(100==r?10:16),e+=4;break;case 115:throw new Error("TODO(2021-07-16): Implement printf %s");case 102:throw new Error("TODO(2021-07-16): Implement printf %f")}else n+=String.fromCharCode(r);this.print(n)}start(){null!=this.wasm.exports.start&&this.wasm.exports.start()}update(){this.paused||(this.framebuffer.clear(),null!=this.wasm.exports.update&&this.wasm.exports.update(),this.composite())}composite(){const t=new Uint32Array(this.memory.buffer,4,16);this.compositor.composite(t,this.framebuffer)}}const w=new URL(document.location).searchParams,p=w.get("screenshot");if(null!=p){const t=document.createElement("img");t.src=p,document.getElementById("screenshot").appendChild(t)}const b=w.get("title");null!=b&&(document.getElementById("title").textContent=b);const y=w.get("author");function g(t,e,n){n?t.classList.add(e):t.classList.remove(e)}async function U(){const t=document.getElementById("wasm4-cart-json");if(t){const{WASM4_CART:e,WASM4_CART_SIZE:n}=JSON.parse(t.textContent),r=new Uint8Array(n);return a(e,r),r}{const t=w.has("url")?w.get("url"):"cart.wasm",e=await fetch(t);return await e.arrayBuffer()}}null!=y&&(document.getElementById("author").textContent="by "+y),async function(){const n=new m,r=n.canvas;document.getElementById("content").appendChild(r);const i=await U();await n.load(i),null!=p&&(await new Promise((t=>{window.onpointerdown=function(){window.onpointerdown=null,n.unlockAudio(),t()}})),window.onblur=function(){document.body.classList.remove("focus")},window.onfocus=function(){document.body.classList.add("focus")}),document.body.classList.add("focus"),n.start(),null!=h&&h.addEventListener("message",(async t=>{switch(t.data){case"reload":case"hotswap":const e=await U();"reload"==t.data&&n.reset(!0),await n.load(e),n.start()}}));let a=null,s=null;function o(){null==document.fullscreenElement&&document.body.requestFullscreen({navigationUI:"hide"})}const c=i=>{if(document.body.style.cursor="",i.isPrimary){const a=r.getBoundingClientRect(),s=Math.fround(t*(i.clientX-a.left)/a.width),o=Math.fround(e*(i.clientY-a.top)/a.height),c=7&i.buttons;n.setMouse(s,o,c)}};window.addEventListener("pointerdown",c),window.addEventListener("pointerup",c),window.addEventListener("pointermove",c),r.addEventListener("contextmenu",(t=>{t.preventDefault()}));const d={50:function(){s=new Uint32Array(n.memory.buffer.slice())},52:function(){null!=s&&new Uint32Array(n.memory.buffer).set(s)},82:async function(){n.reset(!0),await n.load(i),n.start()},120:function(){n.composite(),r.toBlob((t=>{const e=URL.createObjectURL(t),n=document.createElement("a");n.href=e,n.download="wasm4-screenshot.png",n.click(),URL.revokeObjectURL(e)}))},121:function(){if(null!=a)return;const t="video/webm",e=r.captureStream();a=new MediaRecorder(e,{mimeType:t,videoBitsPerSecond:25e6});const n=[];a.ondataavailable=t=>{n.push(t.data)},a.onstop=()=>{const e=new Blob(n,{type:t}),r=URL.createObjectURL(e),i=document.createElement("a");i.href=r,i.download="wasm4-animation.webm",i.click(),URL.revokeObjectURL(r)},a.start(),setTimeout((()=>{a.requestData(),a.stop(),a=null}),4e3)},122:o},l=t=>{const e="keydown"==t.type;if(n.unlockAudio(),document.body.style.cursor="none",e){const e=d[t.keyCode];if(e)return e(),void t.preventDefault()}let r=0;switch(t.keyCode){case 88:case 32:case 81:r=1;break;case 90:case 18:case 186:case 67:case 74:case 89:r=2;break;case 38:r=64;break;case 40:r=128;break;case 37:r=16;break;case 39:r=32}0!=r&&(t.preventDefault(),n.maskGamepad(0,r,e))};window.addEventListener("keydown",l),window.addEventListener("keyup",l);const f=document.getElementById("gamepad-dpad"),u=document.getElementById("gamepad-action1"),w=document.getElementById("gamepad-action2"),b=new Map;function y(t){if("pointerup"==t.type&&("touch"==t.pointerType&&o(),n.unlockAudio()),"touch"!=t.pointerType)return;switch(t.preventDefault(),t.type){case"pointerdown":case"pointermove":b.set(t.pointerId,t);break;default:b.delete(t.pointerId)}let e=0;if(b.size){const t=100,n=10,r=50,i=.6,a=f.getBoundingClientRect(),s=a.x+a.width/2,o=a.y+a.height/2,c=u.getBoundingClientRect(),d=c.x+c.width/2,l=c.y+c.height/2,h=w.getBoundingClientRect(),m=h.x+h.width/2,p=h.y+h.height/2;let y,g,U,v,x;for(let a of b.values())y=a.clientX-s,g=a.clientY-o,U=Math.sqrt(y*y+g*g),U<t&&U>n&&(v=y/U,x=g/U,-v>i?e|=16:v>i&&(e|=32),-x>i?e|=64:x>i&&(e|=128)),y=a.clientX-d,g=a.clientY-l,y*y+g*g<r*r&&(e|=1),y=a.clientX-m,g=a.clientY-p,y*y+g*g<r*r&&(e|=2)}const r=3&e,i=3&n.getGamepad(0);r&&!i&&navigator.vibrate(1),g(u,"pressed",1&e),g(w,"pressed",2&e),g(f,"pressed-left",16&e),g(f,"pressed-right",32&e),g(f,"pressed-up",64&e),g(f,"pressed-down",128&e),n.setGamepad(0,e)}window.addEventListener("pointercancel",y),window.addEventListener("pointerdown",y),window.addEventListener("pointermove",y),window.addEventListener("pointerup",y);const v=1e3/60;let x=performance.now();!function t(){requestAnimationFrame(t);const e=performance.now(),r=e-x;r>=v&&(x=e-r%v,n.update())}()}()})();</script>
</body>
</html>