diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-12-23 19:43:09 -0500 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-12-23 19:43:09 -0500 |
commit | 11ec06e9d0175116d13231a56b4461ab6bb709df (patch) | |
tree | 383ecfdf9fdda4d07ce8d715eb49ebd469bb74b7 | |
parent | f54491cd93e77c3c34fc12a7e56f76d19895922a (diff) | |
download | html5ks-11ec06e9d0175116d13231a56b4461ab6bb709df.tar.xz html5ks-11ec06e9d0175116d13231a56b4461ab6bb709df.zip |
Change... stuff.
-rw-r--r-- | README | 2 | ||||
-rwxr-xr-x | nginx.sh | 1 | ||||
-rwxr-xr-x | setup.sh | 2 | ||||
-rw-r--r-- | www/index.html | 1 | ||||
-rw-r--r-- | www/js/api.js | 49 |
5 files changed, 29 insertions, 26 deletions
@@ -16,7 +16,7 @@ How to use: 0. Get Katawa Shoujo. 1. Copy *.rpyc from Katawa Shoujo/game into unrpyc/ directory. 2. Extract files from data.rpa with an appropriate tool. Put files in www/dump. -3. Run make. +3. Run setup.sh. 4. Run nginx.sh [2] to start nginx with appropriate options for development, then connect to localhost:8080. -- or -- @@ -30,5 +30,6 @@ if ! echo ${V} | grep -q -- --without-http_uwsgi_module; then echo "uwsgi_temp_path /dev/null;" >> nginx.gen.conf fi +echo >&2 "Ignore the following message from nginx about the error log, if any." exec nginx -p "$PWD" -c nginx.conf @@ -1,5 +1,7 @@ #!/bin/bash +set -e + cd $(dirname $0) git submodule update --init diff --git a/www/index.html b/www/index.html index d38ae13..5e5208e 100644 --- a/www/index.html +++ b/www/index.html @@ -81,7 +81,6 @@ <label class="button"><input type="checkbox" class="option" id="hdisable"> <span class="hdisabled_label"></span></label> <label class="button"><input type="checkbox" class="option" id="skipUnread"> <span class="config_skip_unseen_label"></span></label> <label class="button"><input type="checkbox" class="option" id="skipAfterChoices"> <span class="config_skip_after_choice_label"></span></label> - <label class="button"><input type="checkbox" class="option" id="fullscreen"> <span class="config_fullscreen_label"></span></label> <label><input type="range" min="0.0" max="1.0" step="0.001" class="option" id="textSpeed"> <span class="tr config_textspeed_label"></span></label> <label><input type="range" min="0.0" max="1.0" step="0.001" class="option" id="autoModeDelay"> <span class="tr config_afmspeed_label"></span></label> diff --git a/www/js/api.js b/www/js/api.js index 21e55ab..b6fd474 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -75,9 +75,9 @@ window.html5ks.api = { stop: function (channel, ignore, fade) { if (channel === "all") { - this.stop("music", ignore, fade); - this.stop("sound", ignore, fade); - return this.stop("ambient", ignore, fade); + return ["music", "sound", "ambient"].forEach(function (channel) { + html5ks.api.stop(channel, ignore, fade); + }); } var audio = html5ks.elements.audio[channel]; if (this._fading[channel]) { @@ -206,6 +206,25 @@ window.html5ks.api = { }, + _positions: { + left: { xpos: 0.0, xanchor: 0.0, ypos: 1.0, yanchor: 1.0 }, + right: { xpos: 1.0, xanchor: 1.0, ypos: 1.0, yanchor: 1.0 }, + center: { xpos: 0.5, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, + truecenter: { xpos: 0.5, xanchor: 0.5, ypos: 0.5, yanchor: 0.5 }, + topleft: { xpos: 0.0, xanchor: 0.0, ypos: 0.0, yanchor: 0.0 }, + topright: { xpos: 1.0, xanchor: 1.0, ypos: 0.0, yanchor: 0.0 }, + top: { xpos: 0.5, xanchor: 0.5, ypos: 0.0, yanchor: 0.0 }, + twoleft: { xpos: 0.3, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, + tworight: { xpos: 0.7, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, + closeleft: { xpos: 0.25, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, + closeright: { xpos: 0.75, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, + twoleftoff: { xpos: 0.32, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, + tworightoff: { xpos: 0.68, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, + centeroff: { xpos: 0.52, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, + bgleft: { xpos: 0.4, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, + bgright: { xpos: 0.6, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 } + }, + show: function (name, type, location) { var deferred = when.defer(); var lookup = document.getElementById(name), @@ -215,25 +234,7 @@ window.html5ks.api = { if (location) { // calculate position // we don't actually know how big the image is till we fetch it - var positions = { - left: { xpos: 0.0, xanchor: 0.0, ypos: 1.0, yanchor: 1.0 }, - right: { xpos: 1.0, xanchor: 1.0, ypos: 1.0, yanchor: 1.0 }, - center: { xpos: 0.5, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, - truecenter: { xpos: 0.5, xanchor: 0.5, ypos: 0.5, yanchor: 0.5 }, - topleft: { xpos: 0.0, xanchor: 0.0, ypos: 0.0, yanchor: 0.0 }, - topright: { xpos: 1.0, xanchor: 1.0, ypos: 0.0, yanchor: 0.0 }, - top: { xpos: 0.5, xanchor: 0.5, ypos: 0.0, yanchor: 0.0 }, - twoleft: { xpos: 0.3, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, - tworight: { xpos: 0.7, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, - closeleft: { xpos: 0.25, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, - closeright: { xpos: 0.75, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, - twoleftoff: { xpos: 0.32, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, - tworightoff: { xpos: 0.68, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, - centeroff: { xpos: 0.52, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, - bgleft: { xpos: 0.4, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 }, - bgright: { xpos: 0.6, xanchor: 0.5, ypos: 1.0, yanchor: 1.0 } - }; - var pos = positions[location]; + var pos = html5ks.api._positions[location]; // TODO: implement transitions if (pos) { el.style.left = pos.xpos * 800 + "px"; @@ -346,7 +347,7 @@ window.html5ks.api = { chr.what_suffix = "”"; } - this._lastchr = chr; + this._lastchar = chr; if (!extend && chr.what_prefix) { text = chr.what_prefix + text; @@ -408,7 +409,7 @@ window.html5ks.api = { }, extend: function (str) { - return this.character(this._lastchar, str, true); + return this.say(this._lastchar, str, true); }, Pause: function (duration) { |