summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README2
-rwxr-xr-xnginx.sh1
-rwxr-xr-xsetup.sh2
-rw-r--r--www/index.html1
-rw-r--r--www/js/api.js49
5 files changed, 29 insertions, 26 deletions
diff --git a/README b/README
index 665cd8b..0df7aca 100644
--- a/README
+++ b/README
@@ -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 --
diff --git a/nginx.sh b/nginx.sh
index b4cda8b..6c70f47 100755
--- a/nginx.sh
+++ b/nginx.sh
@@ -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
diff --git a/setup.sh b/setup.sh
index bc4ea87..d6ccf9b 100755
--- a/setup.sh
+++ b/setup.sh
@@ -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) {