f520bdede7
implement hardware cursors in d3d9+d3d11 fix crash from closing the audio menu in the webgl port. make deluxemapping+softwarebanding require a vid_reload before anything happens. this solves missing textures until the user does it anyway. fix scores+spectating issue. again. oops. rename openal devices in the webgl port, so that it makes more sense. remove glsl/hlsl parameter limit. this also fixes the final ie webgl issue (still gets half the framerate though). fix some issues with bloom and waterwarp active at the same time. attempted to give properish error messages from emscripten, despite emscripten hating me. hack drag+drop into fteqccgui. I ought to make fteqw accept demos etc this way some time too. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4959 fc73d0e0-1445-4013-8a0c-d673dee63da5
88 lines
No EOL
3.2 KiB
HTML
88 lines
No EOL
3.2 KiB
HTML
<!doctype html>
|
|
<html lang="en-us">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name=viewport content="width=device-width, initial-scale=1">
|
|
<title>FTE QuakeWorld</title>
|
|
<style>
|
|
body { background-color:#000000; color:#808080; height:100%;width:100%;margin:0;padding:0;}
|
|
.emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
|
|
div.emscripten { text-align: center; padding:0; margin: 0;}
|
|
div.emscripten_border { padding:0; margin: 0; }
|
|
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
|
|
canvas.emscripten { border: 0px none; width:100%; height:100%; padding:0; margin: 0;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="emscripten" id="status">Is javascript enabled?</div>
|
|
<div class="emscripten">
|
|
<progress value="0" max="100" id="progress" hidden=1></progress>
|
|
</div>
|
|
<div class="emscripten_border">
|
|
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
|
|
</div>
|
|
<script type='text/javascript'>
|
|
// connect to canvas
|
|
var Module = {
|
|
// preRun: [],
|
|
postRun: [function()
|
|
{
|
|
if (Module["sched"] === undefined) //if this happens then our main function failed to set up the main loop. ie: main didn't get called.
|
|
alert("Unable to initialise. You may need to restart your browser. If you get this often and inconsistently, consider using a 64bit browser instead.");
|
|
}],
|
|
print: function(msg)
|
|
{
|
|
console.log(msg);
|
|
},
|
|
printErr: function(text)
|
|
{
|
|
//this is infuriating as hell.
|
|
//emscripten is a piece of shit for actual released work.
|
|
if (text.substr(0, 28) == "Cannot enlarge memory arrays")
|
|
alert("Memory full/fragmented. Please reload the page.");
|
|
else
|
|
console.log(text);
|
|
},
|
|
canvas: document.getElementById('canvas'),
|
|
setStatus: function(text)
|
|
{
|
|
if (Module.setStatus.interval)
|
|
clearInterval(Module.setStatus.interval);
|
|
var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
|
|
var statusElement = document.getElementById('status');
|
|
var progressElement = document.getElementById('progress');
|
|
if (m) {
|
|
text = m[1];
|
|
progressElement.value = parseInt(m[2])*100;
|
|
progressElement.max = parseInt(m[4])*100;
|
|
progressElement.hidden = false;
|
|
} else {
|
|
progressElement.value = null;
|
|
progressElement.max = null;
|
|
progressElement.hidden = true;
|
|
}
|
|
statusElement.innerHTML = 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...');
|
|
|
|
// make a script
|
|
var s = document.createElement('script');
|
|
// set it up
|
|
s.setAttribute('src',"ftewebgl.js");
|
|
s.setAttribute('type',"text/javascript");
|
|
s.setAttribute('charset',"utf-8");
|
|
s.addEventListener('error', function() {alert("Oh noes! we got an error!");}, false);
|
|
// add to DOM
|
|
document.head.appendChild(s);
|
|
|
|
</script>
|
|
</body>
|
|
</html> |