diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2014-02-17 17:14:54 -0500 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2014-02-17 17:14:54 -0500 |
commit | 8d6546824d87e90d2e9bc95277e23f5a8b49dfe2 (patch) | |
tree | 455d86578bd3fde43a145387fa1cd197d5dc5e03 | |
parent | 6c26d2c37d9e2bf9c9f4bfb95078486d0c9d2c4c (diff) | |
download | html5ks-8d6546824d87e90d2e9bc95277e23f5a8b49dfe2.tar.xz html5ks-8d6546824d87e90d2e9bc95277e23f5a8b49dfe2.zip |
stuff
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | README | 57 | ||||
-rw-r--r-- | README.rst | 73 | ||||
-rw-r--r-- | www/js/api.js | 6 | ||||
-rw-r--r-- | www/js/html5ks.js | 6 |
5 files changed, 93 insertions, 67 deletions
@@ -2,11 +2,6 @@ null := SPACE := $(null) $(null) FFMPEG ?= ffmpeg -v warning -y -OPUSENC ?= opusenc -ZOPFLIPNG ?= zopflipng -DEFLOPT ?= wine DeflOpt -DEFLUFF ?= defluff -PNGQUANT ?= pngquant CWEBP ?= cwebp CWEBP += -short -alpha_cleanup WEBPMUX ?= webpmux @@ -14,8 +9,17 @@ CONVERT ?= convert APNGASM ?= apngasm UGLIFYJS ?= uglifyjs GRUNT ?= grunt -#JPEGTRAN ?= jpegtran -#JPEGRESCAN ?= jpegrescan +ifdef MINIMAL +ZOPFLIPNG ?= zopflipng +DEFLOPT ?= wine DeflOpt +DEFLUFF ?= defluff +PNGQUANT ?= pngquant +else +ZOPFLIPNG ?= : +DEFLOPT ?= : +DEFLUFF ?= : +PNGQUANT ?= : +endif DUMP ?= www/dump @@ -1,57 +0,0 @@ -This is a WIP HTML5 implementation of the game Katawa Shoujo. [0] - -== Requirements == -- Katawa Shoujo (obviously) -- Firefox/Chrome/a sensible browser (i.e. not IE) -- A shell (Bash, dash, zsh, etc) -- GNU Make -- FFmpeg with fdk-aac, libopus, libtheora, libvpx, libx264 (preferably git HEAD) -- cwebp and webpmux from libwebp -- convert from ImageMagick -- apngasm -- uglifyjs -- Node.js, npm, grunt - -=== Recommended === -- jpegmini -- jpegtran -- jpegrescan -- pngquant -- DeflOpt -- defluff -- nginx -- zopfli -- inotify-tools (for `make watch`) - -== How to use == -1. Navigate to http://html5ks.happinessforme.com/ - -== How to build == -0. Get Katawa Shoujo. -1. Copy *.rpyc from Katawa Shoujo/game into unrpyc/ directory. -2. Extract files from Katawa Shoujo/game/data.rpa with an rpa extractor, e.g. unrpa. Put files in www/dump. -3. Install prerequisites, download DeflOpt and defluff and place exes in this directory. -4. Run setup.sh. [2] - -4. Run nginx.sh to start nginx, then navigate to localhost:8080 in your browser. --- or -- -4. Open www/index.html in a browser. - -== Disabling conversions == -Some conversions can be safely disabled. - -== Reducing file size == -Run `make space`. Warning: This will remove source files from dump. - -== Contributing == - -Check Bugzilla for things that need to be done. [3] - -See docs/ for the obvious. - -Run `make watch` to automatically re-make when changes are made. - -[0] http://www.katawa-shoujo.com/ -[1] https://github.com/cujojs/when/ -[2] If you're on Windoze, sucks for you. Use a better OS. -[3] https://bugzilla.happinessforme.com/buglist.cgi?cmdtype=runnamed&namedcmd=Open+HTML5KS+bugs diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..1e119e5 --- /dev/null +++ b/README.rst @@ -0,0 +1,73 @@ +==================== +Katawa Shoujo README +==================== + +This is a WIP HTML5 implementation of the game `Katawa Shoujo`_. + +How to use +========== +1. Navigate to http://html5ks.happinessforme.com/ + +How to build +============ + +Requirements +------------ +- Katawa Shoujo (obviously) +- Firefox/Chrome/a sensible browser (i.e. not IE) +- a shell (Bash, dash, zsh, etc) +- GNU make +- ffmpeg with fdk-aac, libopus, libtheora, libvpx, libx264 (preferably git HEAD) +- cwebp and webpmux from libwebp +- convert from ImageMagick +- apngasm +- uglifyjs +- Node.js, npm, grunt + +Recommended +''''''''''' +- jpegmini +- jpegtran +- jpegrescan +- pngquant +- DeflOpt +- defluff +- nginx +- zopfli +- inotify-tools (for ``make watch``) + +Build steps +----------- + +0. Get Katawa Shoujo. +1. Copy \*.rpyc from Katawa Shoujo/game into unrpyc/ directory. +2. Extract files from Katawa Shoujo/game/data.rpa with an rpa extractor, e.g. unrpa. Put files in www/dump. +3. Install prerequisites, download DeflOpt and defluff and place exes in this directory. +4. Run setup.sh. If you're on Windoze, sucks for you. Use a better OS. Patches may or may not be accepted. +5. Run nginx.sh to start nginx, then navigate to localhost:8080 in your browser. +-- OR -- +5. Open www/index.html in a browser. + +Disabling unused conversions +---------------------------- + +To reduce programs and build time required, some conversions can be disabled. Defining MINIMAL as an environment variable will disable the safe ones. + +Alternatively, specific conversions can be disabled by setting the appropriate program variable to ":". See the Makefile for more information. + +Reducing disk usage +------------------- +Run ``make space``. Warning: This will remove source files from dump. + +``make`` will continue to work (i.e. make new files as appropriate) but will not re-make converted files. + +Contributing +------------ + +Check Bugzilla for things that need to be done. https://bugzilla.happinessforme.com/buglist.cgi?cmdtype=runnamed&namedcmd=Open+HTML5KS+bugs + +See docs/ for the obvious. + +Run ``make watch`` to automatically re-make when changes are made. + +.. _`Katawa Shoujo`: http://www.katawa-shoujo.com/ diff --git a/www/js/api.js b/www/js/api.js index 79b735e..12e8ecc 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -58,8 +58,10 @@ window.html5ks.api = { el.onerror = function (e) { if (e.code === e.MEDIA_ERR_SRC_NOT_SUPPORTED) { - if (!_nextType()) { - console.log("no audio formats supported"); + if (_nextType()) { + console.warn("browser claimed support for " + types[i-1] + " but failed"); + } else { + console.error("no media formats supported"); } } else { console.error("unknown audio error"); diff --git a/www/js/html5ks.js b/www/js/html5ks.js index f9572b0..07d2427 100644 --- a/www/js/html5ks.js +++ b/www/js/html5ks.js @@ -1,4 +1,8 @@ "use strict"; +window.assert = function (c, m) { + if (console.assert) console.assert.apply(console, arguments); + else if (!c) throw new Error(m); +}; window.html5ks = { data: {}, persistent: {}, @@ -105,7 +109,7 @@ window.html5ks = { } }, 1000); this._spinners += mod; - console.assert(this._spinners >= 0); + assert(this._spinners >= 0); }, scale: function () { var newScale = 1; |