From dbf530a333a440975e230a1af37167f1e3c9a643 Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 29 Dec 2018 12:45:27 -0500 Subject: [PATCH 1/7] urlparams: rewrite --- Js/Main.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Js/Main.js b/Js/Main.js index 55c82f7..05372c4 100644 --- a/Js/Main.js +++ b/Js/Main.js @@ -77,9 +77,7 @@ function onAllLoaded(success) { document.getElementById('parent-container').style.cssText = "opacity: 1;"; onWindowResize(); window.addEventListener("resize", onWindowResize); - if(urlParams['mstid'] && urlParams['id'] && utage.groupedMissions[urlParams['mstid']] && utage.groupedMissions[urlParams['mstid']].Missions[urlParams['id']]) { - document.getElementById('play-from-query').style.cssText = "position: fixed; z-index: 15; text-align: center; top: 50%; left: 50%; display: block;"; - } + checkQueryParameters(); }, 0); } @@ -156,6 +154,13 @@ function buildLanguageList() { selectBox.value = selectedLang; } +function checkQueryParameters() { + urlParams = commonFunctions.readQueryParameters(); + if(urlParams['mstid'] && urlParams['id'] && utage.groupedMissions[urlParams['mstid']] && utage.groupedMissions[urlParams['mstid']].Missions[urlParams['id']]) { + document.getElementById('play-from-query').style.cssText = "position: fixed; z-index: 15; text-align: center; top: 50%; left: 50%; display: block;"; + } +} + function playFromQuery(event) { missionChanged(urlParams['mstid'], urlParams['id']); document.getElementById('play-from-query').style.cssText = "display: none;"; From e098d279642fc8242e81ebdf867b83c04fd0a9a4 Mon Sep 17 00:00:00 2001 From: firebingo Date: Sat, 29 Dec 2018 11:44:34 -0700 Subject: [PATCH 2/7] Fix player not falling back to utage text if translation file didnt exist at all. --- Js/Player.js | 10 +++++----- Js/Translations | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Js/Player.js b/Js/Player.js index 5f24332..57236a3 100644 --- a/Js/Player.js +++ b/Js/Player.js @@ -585,13 +585,13 @@ class Player { this.lerpTargets.push({type: 'alpha', object: sprite, curTime: 0, time: 300, finalV: 1, initV: 0}); this.lerpTargets.push({type: 'alpha', object: sprite, curTime: -(this.waitTime+500), time: 300, finalV: 0, initV: 1, post: "destroy"}); } catch (error) { } - let text = cur.English ? (utage.translations[cur.English] || cur.Text) : cur.Text; + let text = cur.English ? (utage.translations ? (utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text; this.text.titleText(true, text); break; } case "divaeffect": { this.waitTime = Number(cur.Arg5) * 1000; - let text = cur.English ? (utage.translations[cur.English] || cur.Text) : cur.Text; + let text = cur.English ? (utage.translations ? (utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text; this.text.divaText(true, text); break; } @@ -1197,8 +1197,8 @@ class Player { this.audio.stopSound(this.playingVoice); } if(!cur.Command && cur.Arg1 && cur.Text) { - //If its chracter off screen text - let text = cur.English ? (utage.translations[cur.English] || cur.Text) : cur.Text; + //If its character off screen text + let text = cur.English ? (utage.translations ? (utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text; text = commonFunctions.convertUtageTextTags(text); if(cur.Arg2 && cur.Arg2.toLowerCase() === "") { this.text.characterName(true, utage.charTranslations[cur.Arg1] || cur.Arg1); @@ -1236,7 +1236,7 @@ class Player { this.manualNext = true; //Sometimes they don't give a Arg1 for the text. } else if(!cur.Command && cur.Arg2.toLowerCase() === "" && cur.Text) { - let text = cur.English ? (utage.translations[cur.English] || cur.Text) : cur.Text; + let text = cur.English ? (utage.translations ? (utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text; this.text.characterName(true, ""); this.text.dialogText(true, commonFunctions.convertUtageTextTags(text)); this.manualNext = true; diff --git a/Js/Translations b/Js/Translations index 533c483..dc15df9 160000 --- a/Js/Translations +++ b/Js/Translations @@ -1 +1 @@ -Subproject commit 533c48371ed01ed7265b6b5f052d1b2c3fce940f +Subproject commit dc15df970a33c34dd53654fb77ce775ee9e3f051 From f3ddb3e58fda5b18a5ab2f5d3431c49c1e5ac6ee Mon Sep 17 00:00:00 2001 From: firebingo Date: Sat, 19 Jan 2019 14:02:31 -0700 Subject: [PATCH 3/7] noise_disappearance commands should work. --- Js/Player.js | 43 ++++++++++++++----------------------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/Js/Player.js b/Js/Player.js index 57236a3..6c78744 100644 --- a/Js/Player.js +++ b/Js/Player.js @@ -920,39 +920,21 @@ class Player { break; } case "noise_disappearance01": //103500331 - this.waitTime = Number(cur.Arg1) * 1000; + if(cur.Arg2) { + this.processTryRemoveChar(cur.Arg2, (Number(cur.Arg1) * 1000); + } break; case "noise_disappearance02": { //103500341 - this.waitTime = Number(cur.Arg1) * 1000; - //let c1 = this.currentCharacters['キャラ右']; - //if(c1) { - // this.lerpTargets.push({type: 'alpha', object: c1.sprite, curTime: 0, time: 200, finalV: 0, initV: 1, post: "destroy" }); - // this.currentCharacters['キャラ右'] = undefined; - //} - //let c2 = this.currentCharacters['キャラ左']; - //if(c2) { - // this.lerpTargets.push({type: 'alpha', object: c2.sprite, curTime: 0, time: 200, finalV: 0, initV: 1, post: "destroy" }); - // this.currentCharacters['キャラ左'] = undefined; - //} + if(cur.Arg2) { + this.processTryRemoveChar(cur.Arg2, (Number(cur.Arg1) * 1000); + } + if(cur.Arg3) { + this.processTryRemoveChar(cur.Arg2, (Number(cur.Arg1) * 1000); + } break; } case "noise_disappearance03": { //103500552 this.waitTime = Number(cur.Arg1) * 1000; - let c1 = this.currentCharacters['キャラ右'] || this.currentCharacters['キャラ右02']; - if(c1) { - this.lerpTargets.push({type: 'alpha', object: c1.sprite, curTime: (0 - (this.waitTime/2)), time: 200, finalV: 0, initV: 1, post: "destroy" }); - this.currentCharacters['キャラ右'] = undefined; - } - let c2 = this.currentCharacters['キャラ左'] || this.currentCharacters['キャラ左02']; - if(c2) { - this.lerpTargets.push({type: 'alpha', object: c2.sprite, curTime: (0 - (this.waitTime/2)), time: 200, finalV: 0, initV: 1, post: "destroy" }); - this.currentCharacters['キャラ左'] = undefined; - } - let c3 = this.currentCharacters['キャラ中央']; - if(c3) { - this.lerpTargets.push({type: 'alpha', object: c3.sprite, curTime: (0 - (this.waitTime/2)), time: 200, finalV: 0, initV: 1, post: "destroy" }); - this.currentCharacters['キャラ中央'] = undefined; - } } case "noise_disappearance11": //103500341 this.waitTime = Number(cur.Arg1) * 1000; @@ -1176,7 +1158,7 @@ class Player { } } - processTryRemoveChar(character) { + processTryRemoveChar(character, fadeTime) { let curChar = undefined; for(let c of Object.keys(this.currentCharacters)) { if(!this.currentCharacters[c]) { continue; } @@ -1187,7 +1169,10 @@ class Player { if(!curChar) { return; } - this.lerpTargets.push({type: 'alpha', object: curChar.sprite, curTime: 0, time: 500, finalV: 0, initV: 1, post: "destroy" }); + if(fadeTime == undefined) { + fadeTime = 500; + } + this.lerpTargets.push({type: 'alpha', object: curChar.sprite, curTime: 0, time: fadeTime, finalV: 0, initV: 1, post: "destroy" }); this.currentCharacters[curChar.layer.info.LayerName] = undefined; } From fb9cab573e73ebb20008ce365d3106f209cad3dc Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 19 Jan 2019 16:47:00 -0500 Subject: [PATCH 4/7] fix unbalanced parenthesis --- Js/Player.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Js/Player.js b/Js/Player.js index 6c78744..50e98f5 100644 --- a/Js/Player.js +++ b/Js/Player.js @@ -921,15 +921,15 @@ class Player { } case "noise_disappearance01": //103500331 if(cur.Arg2) { - this.processTryRemoveChar(cur.Arg2, (Number(cur.Arg1) * 1000); + this.processTryRemoveChar(cur.Arg2, (Number(cur.Arg1) * 1000)); } break; case "noise_disappearance02": { //103500341 if(cur.Arg2) { - this.processTryRemoveChar(cur.Arg2, (Number(cur.Arg1) * 1000); + this.processTryRemoveChar(cur.Arg2, (Number(cur.Arg1) * 1000)); } if(cur.Arg3) { - this.processTryRemoveChar(cur.Arg2, (Number(cur.Arg1) * 1000); + this.processTryRemoveChar(cur.Arg2, (Number(cur.Arg1) * 1000)); } break; } @@ -1533,4 +1533,4 @@ class Player { } }); } -} \ No newline at end of file +} From 0b3fb016709a471324dde2c1117b2d7327d6d3e9 Mon Sep 17 00:00:00 2001 From: firebingo Date: Sat, 19 Jan 2019 14:58:09 -0700 Subject: [PATCH 5/7] I didnt hit save --- Js/Player.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Js/Player.js b/Js/Player.js index 50e98f5..49d3a48 100644 --- a/Js/Player.js +++ b/Js/Player.js @@ -920,22 +920,19 @@ class Player { break; } case "noise_disappearance01": //103500331 - if(cur.Arg2) { - this.processTryRemoveChar(cur.Arg2, (Number(cur.Arg1) * 1000)); - } - break; - case "noise_disappearance02": { //103500341 + case "noise_disappearance02": //103500341 + case "noise_disappearance03": { //103500552 if(cur.Arg2) { this.processTryRemoveChar(cur.Arg2, (Number(cur.Arg1) * 1000)); } if(cur.Arg3) { - this.processTryRemoveChar(cur.Arg2, (Number(cur.Arg1) * 1000)); + this.processTryRemoveChar(cur.Arg3, (Number(cur.Arg1) * 1000)); + } + if(cur.Arg4) { + this.processTryRemoveChar(cur.Arg4, (Number(cur.Arg1) * 1000)); } break; } - case "noise_disappearance03": { //103500552 - this.waitTime = Number(cur.Arg1) * 1000; - } case "noise_disappearance11": //103500341 this.waitTime = Number(cur.Arg1) * 1000; break; From eec0bb137be60cae6625f5609e809072ac788b1f Mon Sep 17 00:00:00 2001 From: louis Date: Sun, 20 Jan 2019 00:55:32 -0500 Subject: [PATCH 6/7] json: update bgmloop --- Js/BgmLoop.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Js/BgmLoop.json b/Js/BgmLoop.json index 1e0aaa2..72cc64c 100644 --- a/Js/BgmLoop.json +++ b/Js/BgmLoop.json @@ -363,6 +363,19 @@ "seconds": 20.034 } }, + "music_axia_no_kaze": { + "duration": 227.14678125, + "loop_end": { + "samples_48k": 10902963, + "samples_native": 7268642, + "seconds": 227.1450625 + }, + "loop_start": { + "samples_48k": 7334256, + "samples_native": 4889504, + "seconds": 152.797 + } + }, "music_beyond_the_blade": { "duration": 107.07978125, "loop_end": { From b9e91f49774156b19a41f8cd3b870fa3be2cb3e7 Mon Sep 17 00:00:00 2001 From: louis Date: Sun, 20 Jan 2019 00:55:51 -0500 Subject: [PATCH 7/7] version bump --- CHANGELOG.md | 13 ++++++++++++- Js/Main.js | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c525c..f83aa26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,4 +14,15 @@ Added null check for pixi sprite calculateverticies because it sometimes makes a DPI is now taken into account when resizing. Added credits to mission modal. Added ability to go fullscreen. -Missions JSON moved to translations submodule so missions can be added/enabled without disturbing main project. \ No newline at end of file +Missions JSON moved to translations submodule so missions can be added/enabled without disturbing main project. + +## V1.2.1 (2018-12-29) + +Custom asset support +Russian language support +Fix translation fallback + +## V1.2.2 (2019-01-20) + +Add language url parameter +Fix noise\_disappearance commands diff --git a/Js/Main.js b/Js/Main.js index 05372c4..7f5627e 100644 --- a/Js/Main.js +++ b/Js/Main.js @@ -11,7 +11,7 @@ const textFunc = new TextFunctions(); let audio = undefined; //Cant create a audio context without user input. const player = new Player(pixiApp, utage, textFunc, audio, shaders); const languages = ["eng", "jpn", "rus"]; -const version = "YameteTomete XDUPlayer V1.2.1"; +const version = "YameteTomete XDUPlayer V1.2.2"; let bodyLoaded = false; let utageLoaded = false; let languagesLoaded = false;