diff options
-rw-r--r-- | .jshintrc | 1 | ||||
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | README | 35 | ||||
-rw-r--r-- | www/js/api.js | 3 | ||||
-rw-r--r-- | www/js/html5ks.js | 4 | ||||
-rw-r--r-- | www/js/imachine.js | 1 |
6 files changed, 27 insertions, 26 deletions
@@ -3,6 +3,7 @@ "browser": true, "devel": true, "globals": { + "FastClick": false, "Modernizr": false, "html5ks": false, "when": false @@ -99,9 +99,11 @@ $(DUMP)/ui/ctc_anim.webp: $(CTC_ANIM_TMP_WEBP) # === JS === +JS := www/js/html5ks.js www/js/menu.js www/js/api.js www/js/play.js www/js/images.js www/js/characters.js www/js/imachine.js www/js/i18n.js + js: www/js/all.min.js -www/js/all.min.js: www/js/html5ks.js www/js/menu.js www/js/api.js www/js/play.js www/js/images.js www/js/characters.js www/js/imachine.js www/js/i18n.js +www/js/all.min.js: $(JS) $(UGLIFYJS) $^ -o $@ -p 2 -m -c # === MISC === @@ -109,10 +111,13 @@ www/js/all.min.js: www/js/html5ks.js www/js/menu.js www/js/api.js www/js/play.js clean: $(RM) $(CVIDEO) $(CAUDIO) $(WEBP) www/favicon.ico +jshint: $(JS) + jshint $^ + watch: while inotifywait -r -e modify,delete,move --exclude="^\./\.git" --exclude="\.swp$$" .; do \ ${MAKE}; \ done -.PHONY: video audio images js clean watch +.PHONY: video audio images js jshint clean watch .SUFFIXES: @@ -1,44 +1,43 @@ This is a WIP HTML5 implementation of the game Katawa Shoujo. [0] -jQuery is not used, but when.js [1] is used as a sensible Promises/A+ implementation. - == Requirements == - Katawa Shoujo (obviously) -- when.js +- Firefox/Chrome/a sensible browser (i.e. not IE) - Bash -- Firefox/Chrome/a sensible browser - ffmpeg with fdk-aac, libtheora, libvpx, libx264 - opusenc from opus-tools -- cwebp from libwebp -- zopfli +- cwebp and webpmux from libwebp + +=== Recommended === - nginx +- zopfli + +== How to use == +1. Navigate to http://html5ks.happinessforme.com/ -How to use: +== How to build == 0. Get Katawa Shoujo. 1. Copy *.rpyc from Katawa Shoujo/game into unrpyc/ directory. -2. Extract files from data.rpa with an rpa extractor, e.g. unrpa. Put files in www/dump. -3. Run setup.sh. +2. Extract files from Katawa Shoujo/game/data.rpa with an rpa extractor, e.g. unrpa. Put files in www/dump. +3. Run setup.sh. [2] -4. Run nginx.sh [2] to start nginx with appropriate options for development, then connect to localhost:8080. +4. Run nginx.sh to start nginx, then navigate to localhost:8080 in your browser. -- or -- -4. Open www/index.html in a browser. This is untested, and some things may not work. [3] - -lighttpd.conf is no longer maintained. Patches to fix it are welcome. +4. Open www/index.html in a browser. == Reducing setup time == -By editing the Makefile, you can turn on or off the various encodings. To reduce the setup time (many hours), try the following: +To reduce the setup time (many hours), try the following: -Turn off zopflipng recompression by commenting it out. It saves only a few MB but takes several hours to complete. Useful if you're serving many, MANY copies, but not useful if you're serving one locally. +Turn off zopflipng recompression by passing ZOPFLIPNG=: as an environment variable to setup.sh. It saves only a few MB but takes several hours to complete, depending on CPU. Useful if you're serving many, MANY copies, but not useful if you're serving one locally. == Reducing file size == [TODO] == Contributing == -Check Bugzilla for things that need to be done. [4] +Check Bugzilla for things that need to be done. [3] [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] Do not send patches for this, unless they also fix other issues. -[4] https://bugzilla.happinessforme.com/buglist.cgi?cmdtype=runnamed&namedcmd=Open+HTML5KS+bugs +[3] https://bugzilla.happinessforme.com/buglist.cgi?cmdtype=runnamed&namedcmd=Open+HTML5KS+bugs diff --git a/www/js/api.js b/www/js/api.js index 8afa4a6..833b120 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -24,7 +24,7 @@ window.html5ks.api = new (function () { switch (audio.volume) { case 0: audio.pause(); - // break; + /* falls through */ case 1: clearInterval(this._fading); } @@ -389,7 +389,6 @@ window.html5ks.api = new (function () { }, say: function (chrName, str, extend) { - if (extend) debugger; var deferred = when.defer(), chr = typeof chrName === "string" ? html5ks.data.characters[chrName] : chrName, w = /{w=?(\d*\.\d*)?}(.*)/.exec(str); diff --git a/www/js/html5ks.js b/www/js/html5ks.js index 8c2c679..e1c0bd7 100644 --- a/www/js/html5ks.js +++ b/www/js/html5ks.js @@ -1,8 +1,4 @@ "use strict"; -console = console || { - log: function () {}, - error: alert -}; window.html5ks = { data: {}, persistent: {}, diff --git a/www/js/imachine.js b/www/js/imachine.js index ba2894e..7a1f7de 100644 --- a/www/js/imachine.js +++ b/www/js/imachine.js @@ -36,6 +36,7 @@ html5ks.imachine = new (function () { break; case "iscene": this.scene_register(inst[1]); + /* falls through */ case "act_op": switch (inst[1]) { case "op_vid1": |