forked from TheGLander/tworld
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interpolation, Emscripten, and SDL2 changes
- Loading branch information
1 parent
0e67821
commit 6c4bd13
Showing
20 changed files
with
1,085 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
file=CCLP2.dat | ||
ruleset=lynx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
file=CCLP5.dat | ||
lastlevel=144 | ||
|
||
ruleset=lynx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
file=CCLP5.dat | ||
lastlevel=144 | ||
|
||
ruleset=ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
file=intro.dat | ||
ruleset=lynx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
file=intro.dat | ||
ruleset=ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<!doctype html> | ||
<html lang="en-us"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<title>Tile World</title> | ||
<link rel="canonical" href="https://enderandrew.com/chip/" /> | ||
<link rel="shortcut icon" href="favicon.ico"> | ||
<link rel="apple-touch-icon" href="./apple-touch-icon.png"> | ||
<meta name="apple-mobile-web-app-capable" content="yes"> | ||
<meta name="HandheldFriendly" content="True"> | ||
<meta name="MobileOptimized" content="320"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | ||
<link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png"> | ||
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png"> | ||
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png"> | ||
<link rel="manifest" href="./site.webmanifest"> | ||
<link rel="mask-icon" href="./safari-pinned-tab.svg" color="#5bbad5"> | ||
<meta name="apple-mobile-web-app-title" content="Tile World"> | ||
<meta name="application-name" content="Tile World"> | ||
<meta name="msapplication-TileColor" content="#da532c"> | ||
<meta name="theme-color" content="#ffffff"> | ||
<meta property="og:type" content="website" /> | ||
<meta property="og:title" content="Tile World" /> | ||
<meta property="og:description" content="Play Tile World, a remake of Chip's Challenge directly in the browser" /> | ||
<meta property="og:image" content="https://enderandrew.com/sm/logo.png" /> | ||
<!-- Google tag (gtag.js) --> | ||
<meta name="google-site-verification" content="Fw32VtOfNNMYuxwq-LDxGbzuY7QIxjvQmLuWnv6FTGY" /> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-C7FZLTKS4Q"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', 'G-C7FZLTKS4Q'); | ||
</script> | ||
<meta name="description" content="Play Tile World, a remake of Chip's Challenge directly in the browser"> | ||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=0.0, viewport-fit=cover"> | ||
<style> | ||
#spinner,.info-overlay{position:absolute;margin:auto;top:0;bottom:0;left:0;right:0}a{color:#867ae0;text-decoration:none}a:hover{text-decoration:underline}body{color:#ccc;font-family:Monospace;font-size:16px;background-color:#000;margin:0;display:flex;justify-content:center}canvas{overflow:auto;width:100vw}@media screen and (min-width:576px){canvas{height:100vh;width:auto}}@keyframes page-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.info-overlay{text-align:center;width:200px;height:200px;display:none}#spinner{content:"";border-radius:50%;width:48px;height:48px;border-top:2px solid #222;border-right:2px solid #222;border-bottom:2px solid #222;border-left:2px solid #867ae0;transform:translateZ(0);animation:1.1s linear infinite page-loader} | ||
.center { | ||
display: block; | ||
margin-left: auto; | ||
margin-right: auto; | ||
width: 50%; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="center-text" id="status">Downloading...</div> | ||
<div class="center-text"> | ||
<a href="https://github.com/TheGLander/tworld-wii/tree/emscripten" | ||
>Check out the source code!</a | ||
> | ||
</div> | ||
<canvas id="canvas" tabindex="-1"></canvas> | ||
|
||
<script type="text/javascript"> | ||
const statusElement = document.getElementById("status") | ||
const canvasElement = document.getElementById("canvas") | ||
canvasElement.style.display = "none" | ||
|
||
canvasElement.addEventListener("contextmenu", () => | ||
event.preventDefault() | ||
) | ||
|
||
const params = new URLSearchParams(location.search) | ||
const mapPath = params.get("map") | ||
const levelId = params.get("levelId") | ||
const solution = params.get("solution") | ||
const lynx = params.get("lynx") | ||
|
||
globalThis.Module = { | ||
arguments: ["-p", "-o"], | ||
preRun: [ | ||
() => { | ||
if (lynx !== null) Module.arguments.push("-x") | ||
if (!mapPath) return | ||
FS.createPreloadedFile("/", "custom.dat", mapPath, true, true) | ||
Module.arguments.push("/custom.dat") | ||
if (solution || levelId) Module.arguments.push(levelId || "1") | ||
if (solution) { | ||
FS.createPreloadedFile( | ||
"/", | ||
"/customSol.tws", | ||
solution, | ||
true, | ||
true | ||
) | ||
Module.arguments.push("/customSol.tws") | ||
} | ||
}, | ||
() => (canvasElement.style.display = "block"), | ||
], | ||
postRun: [], | ||
print: console.log, | ||
printErr: console.error, | ||
canvas: canvasElement, | ||
setStatus: text => (statusElement.innerText = text), | ||
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...") | ||
</script> | ||
{{{ SCRIPT }}} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.