summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-03-02 13:48:43 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2014-03-02 13:49:29 -0500
commit930ab7e6476149d19ba523de77b8871d78cabdec (patch)
treeb7f74d4d9dfaa4393be1ad4be2b08af2cded098a
parent143571f43a0b1f505638d5225838551b556f222e (diff)
downloadhtml5ks-930ab7e6476149d19ba523de77b8871d78cabdec.tar.xz
html5ks-930ab7e6476149d19ba523de77b8871d78cabdec.zip
meh
-rw-r--r--.gitignore2
-rw-r--r--.travis.yml15
-rw-r--r--Makefile21
-rw-r--r--Procfile1
-rw-r--r--package.json16
-rw-r--r--www/index.html7
-rw-r--r--www/js/html5ks.js2
-rw-r--r--www/js/images.js55
l---------www/js/lib/Modernizr2
l---------www/js/lib/when2
10 files changed, 55 insertions, 68 deletions
diff --git a/.gitignore b/.gitignore
index 4ba7ed6..654ffd4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,4 +11,4 @@
# generated files
/www/js/all.min.js*
-/.modules
+/node_modules
diff --git a/.travis.yml b/.travis.yml
index d584f2a..0f6e276 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,8 @@
language: c
-python: "3.3"
-node_js: "0.11"
-env: MINIMAL=1 CFLAGS="-O2 -march=native -pipe" CXXFLAGS="-O2 -march=native -pipe" MAKEOPTS="-j8" FFMPEG="ffmpeg -t 00:00:30"
+python: '3.3'
+node_js: '0.11'
+env: MINIMAL=1 CFLAGS="-O2 -march=native -pipe" CXXFLAGS="-O2 -march=native -pipe"
+ MAKEOPTS="-j8" FFMPEG="ffmpeg -t 00:00:30"
before_install: ./.travis.sh before_install
install: ./.travis.sh install
script: ./.travis.sh script
-notifications:
- email:
-# - alex_y_xu@yahoo.ca
- irc:
-# channels:
-# - "chat.freenode.net#html5ks"
-# on_success: change
-# on_failure: always
diff --git a/Makefile b/Makefile
index c6d52d1..03510b5 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ CWEBP += -quiet -alpha_cleanup
WEBPMUX ?= webpmux
CONVERT ?= convert
APNGASM ?= apngasm
-UGLIFYJS ?= uglifyjs
+UGLIFYJS ?= node_modules/.bin/uglifyjs
ifndef MINIMAL
ZOPFLIPNG ?= zopflipng
DEFLOPT ?= wine DeflOpt
@@ -133,7 +133,7 @@ $(DUMP)/ui/ctc_strip-0.png: $(CTC_ANIM_SRC)
$(CONVERT) "$<" -crop 16x16 $(DUMP)/ui/ctc_strip-%d.png
$(DUMP)/ui/ctc_strip-%.png: $(CTC_ANIM_SRC) $(DUMP)/ui/ctc_strip-0.png
- @touch -r "$(DUMP)/ui/ctc_strip-0.png" "$@"
+ @
$(DUMP)/ui/ctc_anim.png: $(CTC_ANIM_TMP)
$(APNGASM) "$@" $^ 3 100
@@ -144,8 +144,7 @@ $(DUMP)/ui/ctc_anim.webp: $(CTC_ANIM_TMP_WEBP)
# === JS ===
MYJS := www/js/html5ks.js www/js/menu.js www/js/api.js www/js/characters.js www/js/imachine.js www/js/i18n.js
-JSLIBS := www/js/lib/when/when.js www/js/lib/fastclick/lib/fastclick.js \
- Modernizr/dist/modernizr-build.js www/js/lib/spin.js/spin.js
+JSLIBS := fastclick/lib/fastclick.js Modernizr/dist/modernizr-build.js when/build/when.js spin.js/spin.js
JSDATA := www/js/play.js www/js/images.js
JS := $(JSLIBS) $(MYJS) $(JSDATA)
JSOUT := www/js/all.min.js
@@ -154,10 +153,22 @@ Modernizr/dist/modernizr-build.js: config-all.json
ln -fs ../../config-all.json Modernizr/lib/config-all.json
cd Modernizr && npm update && node_modules/.bin/grunt build
+when/build/when.js:
+ cd when && npm update && npm run browserify-debug
+
js: $(JSOUT)
$(JSOUT): $(JS)
- $(UGLIFYJS) $(JS) -o "$@" --source-map "$@".map --source-map-url ./all.min.js.map -p 2 -m -c drop_debugger=false
+# note that packr doesn't actually work
+ifdef PACKR
+ $(PACKR) $^ -o "$@"
+else
+ ifdef CLOSURE_COMPILER
+ $(CLOSURE_COMPILER) --compilation_level SIMPLE_OPTIMIZATIONS --create_source_map "$@".map --js $(subst $(SPACE), --js ,$^) --js_output_file "$@"
+ else
+ $(UGLIFYJS) $^ -o "$@" --source-map "$@".map --source-map-url ./all.min.js.map --screw-ie8 -p 2 -m -c unsafe=true,drop_debugger=false
+ endif
+endif
# === MISC ===
diff --git a/Procfile b/Procfile
new file mode 100644
index 0000000..c050cc5
--- /dev/null
+++ b/Procfile
@@ -0,0 +1 @@
+web: ./nginx.sh
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..a3e2e9c
--- /dev/null
+++ b/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "html5ks",
+ "version": "0.2.0",
+ "author": "Alex Xu (Hello71) <alex_y_xu@yahoo.ca>",
+ "scripts": {
+ "start": "./nginx.sh"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://git.happinessforme.com/html5ks.git"
+ },
+ "dependencies": {
+ "uglify-js": "*"
+ },
+ "license": "GPLv3"
+}
diff --git a/www/index.html b/www/index.html
index 600b52f..93fc506 100644
--- a/www/index.html
+++ b/www/index.html
@@ -5,13 +5,6 @@
<meta name="description" content="HTML5 implementation of Katawa Shoujo, a bishōjo-style visual novel by Four Leaf Studios that tells a story of a young man and five young women living with varying disabilities.">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<title class="window_name">Katawa Shoujo</title>
- <script>
- window.define = function(factory) {
- try{ delete window.define; } catch(e){ window.define = void 0; } // IE
- window.when = factory();
- };
- window.define.amd = {};
- </script>
<link rel="shortcut icon" type="image/png" href="dump/ui/icon.png">
<link rel="apple-touch-icon" href="dump/ui/icon.png">
<link rel="stylesheet" type="text/css" href="css/index.css">
diff --git a/www/js/html5ks.js b/www/js/html5ks.js
index 07d2427..73cb249 100644
--- a/www/js/html5ks.js
+++ b/www/js/html5ks.js
@@ -81,7 +81,7 @@ window.html5ks = {
nvlsay: document.getElementById("nvlsay"),
nvlctc: document.getElementById("nvlctc"),
choices: document.getElementById("choices"),
- show: document.getElementById("show"),
+ show: document.getElementById("show")
};
this.elements.spinner = new Spinner({
color: '#CC7C2A',
diff --git a/www/js/images.js b/www/js/images.js
index 31e1434..f1d14ce 100644
--- a/www/js/images.js
+++ b/www/js/images.js
@@ -10,11 +10,10 @@ window.html5ks.data.images = {
yalign: 0.9,
zoom: 1.2,
transform: {
- type: "warp",
seconds: 20,
zoom: 1,
- yalign: 0.5,
- },
+ yalign: 0.5
+ }
},
"ev_other_iwanako": "event/other_iwanako_nosnow.jpg",
@@ -24,12 +23,7 @@ window.html5ks.data.images = {
"ev_hisao_class_move": {
image: "event/hisao_class.jpg",
- xalign: 0.0,
- transform: {
- type: "warp",
- seconds: 40.0,
- xalign: 1.0,
- },
+ xalign: 0.0
},
"ev_hisao_class_end": {image:"event/hisao_class.jpg", crop: (800, 0, 800, 600)},
@@ -39,12 +33,7 @@ window.html5ks.data.images = {
"ev_emi_knockeddown_facepullout": {
image: "event/emi_knockeddown_large.jpg",
- crop: (840, 50, 800, 600),
- transform:{
- type:"easeout",
- seconds:10.0,
- crop: (840, 50, 880, 660),
- }
+ crop: (840, 50, 800, 600)
},
"ev_emi_knockeddown_largepullout": {
@@ -55,23 +44,20 @@ window.html5ks.data.images = {
"ev_emi_knockeddown_face": {image:"event/emi_knockeddown_large.jpg", crop:(840, 50, 800, 600)},
"ev_emi_knockeddown_legs": {
- crop: null,
image: "event/emi_knockeddown_large.jpg",
xpos: -50,
- ypos: -790,
+ ypos: -790
},
"ev_emi_run_face_zoomin": {
- image: "event/emi_run_face.jpg",
- crop: (0, 0, 800, 600),
+ image: "event/emi_run_face.jpg"
},
"ev_emi_run_face": "event/emi_run_face.jpg",
"ev_emi_run_face_zoomout_ss": {
filter: "sunset",
- image: "event/emi_run_face.jpg",
- crop: (40, 30, 720, 540),
+ image: "event/emi_run_face.jpg"
},
"ev_emi_firstkiss": "event/emi_firstkiss.jpg",
@@ -81,7 +67,7 @@ window.html5ks.data.images = {
"ev_emitrack_running": "event/emitrack_running.jpg",
"ev_emitrack_blocks": {
image: "event/emitrack_blocks.jpg",
- xalign: 0.0,
+ xalign: 0.0
},
"ev_emitrack_blocks_close": "event/emitrack_blocks_close.jpg",
"ev_emitrack_blocks_close_grin": "event/emitrack_blocks_close_grin.jpg",
@@ -116,18 +102,18 @@ window.html5ks.data.images = {
"ev_picnic_normal": {
image: "event/picnic_normal.jpg",
xalign: 0.5,
- yalign: 0.0,
+ yalign: 0.0
},
"ev_picnic_rain": {
image: "event/picnic_rain.jpg",
xalign: 0.5,
- yalign: 0.0,
+ yalign: 0.0
},
"ev_emi_cry_down": "event/emi_cry_down.jpg",
"evul_emi_cry_down": {
image: "event/emi_cry_down.jpg",
- zoom: 0.8,
+ zoom: 0.8
},
"ev_emi_grave": "event/emi_grave.jpg",
@@ -606,11 +592,7 @@ window.html5ks.data.images = {
train_scenery: {
image: "event/lilly_train/train_scenery.jpg",
- xalign: 0.0,
- transition: {
- type: "linear",
- xalign: 1.0
- },
+ xalign: 0.0
},
train_scenery_fg: "event/lilly_train/train_scenery_fg.png",
@@ -940,12 +922,7 @@ window.html5ks.data.images = {
"ev_shizune_car": {
image: "event/shizune_car.jpg",
yalign: 0.5,
- xalign: 0.0,
- transition: {
- type: "easein",
- seconds: 12.0,
- xalign: 1.0
- },
+ xalign: 0.0
},
"ev_shizu_fishing_sl": "event/shizu_fishing_sl.jpg",
@@ -1046,11 +1023,7 @@ window.html5ks.data.images = {
"ev_shizu_goodend_pan": {
image: "event/shizu_goodend.jpg",
xalign: 0.5,
- yalign: 1.0,
- transition: {
- seconds: 15.0,
- yalign: 0.0
- },
+ yalign: 1.0
},
"ev_shizu_badend": "event/shizu_badend.jpg",
diff --git a/www/js/lib/Modernizr b/www/js/lib/Modernizr
index 06b5670..98543c7 120000
--- a/www/js/lib/Modernizr
+++ b/www/js/lib/Modernizr
@@ -1 +1 @@
-../../../Modernizr \ No newline at end of file
+../../../Modernizr/lib \ No newline at end of file
diff --git a/www/js/lib/when b/www/js/lib/when
index a9f8fe8..13d75d5 120000
--- a/www/js/lib/when
+++ b/www/js/lib/when
@@ -1 +1 @@
-../../../when \ No newline at end of file
+../../../when/build \ No newline at end of file