diff options
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | Rakefile | 2 | ||||
| m--------- | game | 0 | ||||
| -rw-r--r-- | vendor/html/minshell.html | 81 | ||||
| -rw-r--r-- | vendor/lib/tux/mruby/libmruby.a | bin | 8581804 -> 8602108 bytes | |||
| -rw-r--r-- | vendor/lib/web/mruby/libmruby.a | bin | 1449104 -> 1452614 bytes |
6 files changed, 84 insertions, 2 deletions
@@ -1,2 +1,3 @@ build/* -game/* + game/* + game @@ -51,7 +51,7 @@ namespace :build do task :web => :bytecode do Dir.mkdir("build/web") unless File.exists?("build/web") Dir.chdir("build/web") do - system("emcc -Os -Wall -I#{@include_dir}/raylib -I#{@include_dir}/mruby -I#{@bytecode_header_path} #{@vendor_dir}/boilerplate.c #{@library_dir}/web/mruby/libmruby.a #{@library_dir}/web/raylib/libraylib.a -o index.html -s USE_GLFW=3 -DPLATFORM_WEB --preload-file ./assets") + system("emcc -Os -Wall -I#{@include_dir}/raylib -I#{@include_dir}/mruby -I#{@bytecode_header_path} #{@vendor_dir}/boilerplate.c #{@library_dir}/web/mruby/libmruby.a #{@library_dir}/web/raylib/libraylib.a -o index.html -s USE_GLFW=3 -DPLATFORM_WEB --preload-file ./assets --shell-file #{@vendor_dir}/html/minshell.html") end end desc 'Build the game for Linux' diff --git a/game b/game new file mode 160000 +Subproject 941e30c5f5c1bf2984a35f34f5a272d774b52c3 diff --git a/vendor/html/minshell.html b/vendor/html/minshell.html new file mode 100644 index 0000000..5705975 --- /dev/null +++ b/vendor/html/minshell.html @@ -0,0 +1,81 @@ +<!doctype html> +<html lang="en-us"> + <head> + <meta charset="utf-8"> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + + <title>raylib web game</title> + + <meta name="title" content="raylib web game"> + <meta name="description" content="New raylib web videogame, developed using raylib videogames library"> + <meta name="keywords" content="raylib, games, html5, programming, C, C++, library, learn, videogames"> + <meta name="viewport" content="width=device-width"> + + <!-- Open Graph metatags for sharing --> + <meta property="og:title" content="raylib web game"> + <meta property="og:image:type" content="image/png"> + <meta property="og:image" content="https://www.raylib.com/common/img/raylib_logo.png"> + <meta property="og:site_name" content="raylib.com"> + <meta property="og:url" content="https://www.raylib.com/games.html"> + <meta property="og:description" content="New raylib web videogame, developed using raylib videogames library"> + + <!-- Twitter metatags for sharing --> + <meta name="twitter:card" content="summary"> + <meta name="twitter:site" content="@raysan5"> + <meta name="twitter:title" content="raylib web game"> + <meta name="twitter:image" content="https://www.raylib.com/common/raylib_logo.png"> + <meta name="twitter:url" content="https://www.raylib.com/games.html"> + <meta name="twitter:description" content="New raylib web game, developed using raylib videogames library"> + + <!-- Favicon --> + <link rel="shortcut icon" href="https://www.raylib.com/favicon.ico"> + + <style> +canvas.emscripten { border: 0px none; background-color: black; } + </style> + <script type='text/javascript' src="https://cdn.jsdelivr.net/gh/eligrey/FileSaver.js/dist/FileSaver.min.js"> </script> + <script type='text/javascript'> + function saveFileFromMEMFSToDisk(memoryFSname, localFSname) // This can be called by C/C++ code + { + var isSafari = false; // Not supported, navigator.userAgent access is being restricted + //var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); + var data = FS.readFile(memoryFSname); + var blob; + + if (isSafari) blob = new Blob([data.buffer], { type: "application/octet-stream" }); + else blob = new Blob([data.buffer], { type: "application/octet-binary" }); + + // NOTE: SaveAsDialog is a browser setting. For example, in Google Chrome, + // in Settings/Advanced/Downloads section you have a setting: + // 'Ask where to save each file before downloading' - which you can set true/false. + // If you enable this setting it would always ask you and bring the SaveAsDialog + saveAs(blob, localFSname); + } + </script> + </head> + <body> + <canvas class=emscripten id=canvas oncontextmenu=event.preventDefault() tabindex=-1 style="border:0px; outline:0px;"></canvas> + <p id="output" /> + <script> + var Module = { + print: (function() { + var element = document.getElementById('output'); + if (element) element.value = ''; // clear browser cache + return function(text) { + if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' '); + console.log(text); + if (element) { + element.value += text + "\n"; + element.scrollTop = element.scrollHeight; // focus on bottom + } + }; + })(), + canvas: (function() { + var canvas = document.getElementById('canvas'); + return canvas; + })() + }; + </script> + {{{ SCRIPT }}} + </body> +</html> diff --git a/vendor/lib/tux/mruby/libmruby.a b/vendor/lib/tux/mruby/libmruby.a Binary files differindex 0b4653c..5cf9ab5 100644 --- a/vendor/lib/tux/mruby/libmruby.a +++ b/vendor/lib/tux/mruby/libmruby.a diff --git a/vendor/lib/web/mruby/libmruby.a b/vendor/lib/web/mruby/libmruby.a Binary files differindex 2680589..1c06ba9 100644 --- a/vendor/lib/web/mruby/libmruby.a +++ b/vendor/lib/web/mruby/libmruby.a |
