| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta charset="UTF-8"/> |
| 5 | <title>pacman.c</title> |
| 6 | <link rel="icon" type="image/png" href="favicon.png"/> |
| 7 | <style type="text/css"> |
| 8 | body { |
| 9 | margin: 0; |
| 10 | background-color: black; |
| 11 | } |
| 12 | .game-title { |
| 13 | pointer-events: none; |
| 14 | position: absolute; |
| 15 | bottom: 10px; |
| 16 | margin-top: 0px; |
| 17 | padding-left: 10px; |
| 18 | color: white; |
| 19 | text-decoration: none; |
| 20 | z-index: 1; |
| 21 | text-align: left; |
| 22 | font-family: "Arial Black", Gadget, sans-serif; |
| 23 | font-size: 30px; |
| 24 | } |
| 25 | .game-menu-item { |
| 26 | pointer-events: auto; |
| 27 | font-size: 18px; |
| 28 | padding-left: 10px; |
| 29 | font-family: Arial, Helvetica, sans-serif; |
| 30 | } |
| 31 | .game-menu-link { |
| 32 | text-decoration: none; |
| 33 | color: white; |
| 34 | } |
| 35 | .game { |
| 36 | position: absolute; |
| 37 | top: 0px; |
| 38 | left: 0px; |
| 39 | margin: 0px; |
| 40 | border: 0; |
| 41 | width: 100%; |
| 42 | height: 100%; |
| 43 | overflow: hidden; |
| 44 | display: block; |
| 45 | image-rendering: optimizeSpeed; |
| 46 | image-rendering: -moz-crisp-edges; |
| 47 | image-rendering: -o-crisp-edges; |
| 48 | image-rendering: -webkit-optimize-contrast; |
| 49 | image-rendering: optimize-contrast; |
| 50 | image-rendering: crisp-edges; |
| 51 | image-rendering: pixelated; |
| 52 | -ms-interpolation-mode: nearest-neighbor; |
| 53 | } |
| 54 | </style> |
| 55 | </head> |
| 56 | <body style="background:black"> |
| 57 | <div class="game-title"> |
| 58 | <span class="game-menu-item"><a class="game-menu-link" href="https://github.com/floooh/pacman.c/blob/main/pacman.c" target="_blank">source code</a></span> |
| 59 | </div> |
| 60 | <canvas class="game" id="canvas" oncontextmenu="event.preventDefault()"></canvas> |
| 61 | <script type="text/javascript"> |
| 62 | var Module = { |
| 63 | preRun: [], |
| 64 | postRun: [], |
| 65 | print: (function() { |
| 66 | return function(text) { |
| 67 | text = Array.prototype.slice.call(arguments).join(' '); |
| 68 | console.log(text); |
| 69 | }; |
| 70 | })(), |
| 71 | printErr: function(text) { |
| 72 | text = Array.prototype.slice.call(arguments).join(' '); |
| 73 | console.error(text); |
| 74 | }, |
| 75 | canvas: (function() { |
| 76 | var canvas = document.getElementById('canvas'); |
| 77 | canvas.addEventListener("webglcontextlost", function(e) { alert('FIXME: WebGL context lost, please reload the page'); e.preventDefault(); }, false); |
| 78 | return canvas; |
| 79 | })(), |
| 80 | setStatus: function(text) { }, |
| 81 | monitorRunDependencies: function(left) { }, |
| 82 | }; |
| 83 | window.onerror = function(event) { |
| 84 | console.log("onerror: " + event.message); |
| 85 | }; |
| 86 | </script> |
| 87 | {{{ SCRIPT }}} |
| 88 | </body> |
| 89 | </html> |