-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathQuake1.html
56 lines (54 loc) · 2.41 KB
/
Quake1.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Quake 1</title>
<style type="text/css">
.dosbox-container { width: 640px; height: 400px; }
.dosbox-container > .dosbox-overlay { background: url(../img/QUAKE1.jpg);background-size:cover;}
</style>
</head>
<body bgcolor="000000">
<div>
<canvas id="dosbox"></canvas>
</div>
<br/>
<button onclick="ci.fullscreen();" style="background: none; border: none;"><img src="../img/large.gif"/></button>
Hit c then hit enter and then type y and wait... hit tab then enter then wait some more... then type quake, hit tab and then hit enter.
<div style="border: 2px solid white;width:20%">
   <button width="100px" onclick="ci.simulateKeyPress(38);"> up </button>      <button onclick="ci.simulateKeyPress(17);">fire(ctrl)</button><br>
<button onclick="ci.simulateKeyPress(37);">left</button><button onclick="ci.simulateKeyPress(18);">alt(strafe)</button><button onclick="ci.simulateKeyPress(39);">right</button>    <button onclick="ci.simulateKeyPress(191);">switch weapon(/)</button><br>
   <button onclick="ci.simulateKeyPress(40);">down</button>      <button onclick="ci.simulateKeyPress(32);">use(space)</button><br>
</div>
<script src="https://js-dos.com/6.22/current/js-dos.js"></script>
<script>
Dos(document.getElementById("dosbox"), {
wdosboxUrl: "https://js-dos.com/6.22/current/wdosbox.js",
core:'dynamic',
cputype:'auto',
cycles:'auto',
cycleup:1000,
cycledown:1000
}).ready(function (fs, main) {
fs.extract("quake1.zip").then(function () {
main(["deice.exe"]).then(function (ci) {
window.ci = ci;
ci.simulateKeyPress(67);
ci.simulateKeyPress(13);
ci.simulateKeyPress(89);
setTimeout(function(){
ci.simulateKeyPress(9);
ci.simulateKeyPress(13);
setTimeout(function(){
ci.simulateKeyPress(81);
ci.simulateKeyPress(85);
ci.simulateKeyPress(9);
ci.simulateKeyPress(13);
}, 300000);
}, 5000);
});
});
});
</script>
</body>
</html>