Compare commits

...

9 Commits

Author SHA1 Message Date
62e702b9fa Merge pull request 'feature/czechlang' (#9) from feature/czechlang into master 2021-02-16 10:14:42 -05:00
428ea1d660 changed czech font to PTSans 2021-02-15 20:00:30 +01:00
0def56d476 added czech 2021-02-15 19:48:57 +01:00
85f2815b6a added player support for new scene images 2020-10-21 23:54:33 +02:00
7b43a86b99
master tracks master
we're just going to rebuild beta off the most recently pushed branch
2020-09-12 16:39:42 -04:00
1dc54f8590
master branch tracks beta translations 2020-09-12 03:03:52 -04:00
d6ac86ed8c
load name variants
global stinx
2020-08-11 12:32:41 -04:00
afd850fbca
make sure translation is supplied when propagating enables 2020-08-11 11:55:19 -04:00
bdc076b664
fixed player supporting global 2020-08-11 11:55:17 -04:00
7 changed files with 43 additions and 13 deletions

2
.gitmodules vendored
View File

@ -1,7 +1,7 @@
[submodule "Js/Translations"] [submodule "Js/Translations"]
path = Js/Translations path = Js/Translations
url = https://git.poweris.moe/yttt-xdu/xdutranslations.git url = https://git.poweris.moe/yttt-xdu/xdutranslations.git
branch = . branch = master
[submodule "CustomData"] [submodule "CustomData"]
path = CustomData path = CustomData
url = https://git.poweris.moe/yttt-xdu/customdata.git url = https://git.poweris.moe/yttt-xdu/customdata.git

View File

@ -44,3 +44,7 @@ Fix MoveCamera macro
## V1.4.0 (2019-09-29) ## V1.4.0 (2019-09-29)
Updated Pixi.js to v5 Updated Pixi.js to v5
## V1.5.0 (2020-07-31)
XDU Global support

View File

@ -84,6 +84,8 @@ body { margin: 0; height: 100%; }
#text-container.rus { font-family: 'PTSans'; } #text-container.rus { font-family: 'PTSans'; }
#text-container.cze { font-family: 'PTSans'; }
#text-container #fullscreen-button { position: absolute; top: 0.5rem; left: 0.5rem; font-size: 30px; line-height: 30px; opacity: 0.35; z-index: 11; } #text-container #fullscreen-button { position: absolute; top: 0.5rem; left: 0.5rem; font-size: 30px; line-height: 30px; opacity: 0.35; z-index: 11; }
#text-container #title { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; font-size: 20px; transition: opacity 0.3s; cursor: default; user-select: none; } #text-container #title { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; font-size: 20px; transition: opacity 0.3s; cursor: default; user-select: none; }

View File

@ -10,8 +10,8 @@ const shaders = new Shaders();
const textFunc = new TextFunctions(); const textFunc = new TextFunctions();
let audio = undefined; //Cant create a audio context without user input. let audio = undefined; //Cant create a audio context without user input.
const player = new Player(pixiApp, utage, textFunc, audio, shaders); const player = new Player(pixiApp, utage, textFunc, audio, shaders);
const languages = ["eng", "jpn", "rus", "enm", "kor", "zho"]; const languages = ["eng", "jpn", "rus", "cze", "enm", "kor", "zho"];
const version = "YameteTomete XDUPlayer V1.4.0"; const version = "YameteTomete XDUPlayer V1.5.0";
let bodyLoaded = false; let bodyLoaded = false;
let utageLoaded = false; let utageLoaded = false;
let languagesLoaded = false; let languagesLoaded = false;
@ -142,7 +142,7 @@ function buildQuestSelectList() {
let tl_key = utage.questTranslations[cust][q.QuestMstId]; let tl_key = utage.questTranslations[cust][q.QuestMstId];
if (!tl_key) { if (!tl_key) {
console.log("Failed to build quest list: missing translations"); console.log("Failed to build quest list: missing translations");
return; continue;
} }
if (!tl_key.Enabled && !utage.quests[cust][q.QuestMstId].Scenes.some((s) => { return utage.sceneTranslations[cust][s].Enabled === true })) { if (!tl_key.Enabled && !utage.quests[cust][q.QuestMstId].Scenes.some((s) => { return utage.sceneTranslations[cust][s].Enabled === true })) {
continue; continue;
@ -191,7 +191,7 @@ function buildSceneSelectList() {
let tl_key = utage.sceneTranslations[cust][questSceneMstId]; let tl_key = utage.sceneTranslations[cust][questSceneMstId];
if (!tl_key) { if (!tl_key) {
console.log("Failed to build scene list: missing translations"); console.log("Failed to build scene list: missing translations");
return; continue;
} }
if (!tl_key.Enabled) { if (!tl_key.Enabled) {
continue; continue;
@ -285,6 +285,10 @@ function sceneDropDownChanged(event) {
let name = scene.Name; let name = scene.Name;
let summary = scene.SummaryText; let summary = scene.SummaryText;
let image = questSceneMstId;
if ("Image" in scene) {
image = scene.Image;
}
let credits = ""; let credits = "";
let tl_key = utage.sceneTranslations[cust][questSceneMstId]; let tl_key = utage.sceneTranslations[cust][questSceneMstId];
@ -307,8 +311,8 @@ function sceneDropDownChanged(event) {
chapterSelect += `<option value="${p}">${p}</option>` chapterSelect += `<option value="${p}">${p}</option>`
} }
let detailSrc = `${utage.rootDirectory}${(scene.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Detail/${questSceneMstId}.png`; let detailSrc = `${utage.rootDirectory}${(scene.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Detail/${image}.png`;
let iconSrc = `${utage.rootDirectory}${(scene.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Icon/${questSceneMstId}.png`; let iconSrc = `${utage.rootDirectory}${(scene.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Icon/${image}.png`;
chapterSelect += '</select></div>'; chapterSelect += '</select></div>';
cont.innerHTML = ` cont.innerHTML = `
<div id="mission-modal" class="modal"> <div id="mission-modal" class="modal">

View File

@ -960,7 +960,12 @@ class Player {
let text = cur.English ? (this.utage.translations ? (this.utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text; let text = cur.English ? (this.utage.translations ? (this.utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text;
text = commonFunctions.convertUtageTextTags(text); text = commonFunctions.convertUtageTextTags(text);
if(cur.Arg2 && cur.Arg2.toLowerCase() === "<off>") { if(cur.Arg2 && cur.Arg2.toLowerCase() === "<off>") {
this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1); let nameFullWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);});
let nameHalfWidth = cur.Arg1.replace(/[---]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)});
this.text.characterName(true, this.utage.charTranslations[cur.Arg1]
|| this.utage.charTranslations[nameFullWidth]
|| this.utage.charTranslations[nameHalfWidth]
|| cur.Arg1);
this.text.dialogText(true, commonFunctions.convertUtageTextTags(text)); this.text.dialogText(true, commonFunctions.convertUtageTextTags(text));
} else { } else {
let found = false; let found = false;
@ -975,7 +980,12 @@ class Player {
if(cur.Character) { if(cur.Character) {
nameToUse = cur.Arg1; nameToUse = cur.Arg1;
} }
this.text.characterName(true, this.utage.charTranslations[nameToUse] || nameToUse); let nameFullWidth = nameToUse.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);});
let nameHalfWidth = nameToUse.replace(/[---]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)});
this.text.characterName(true, this.utage.charTranslations[nameToUse]
|| this.utage.charTranslations[nameFullWidth]
|| this.utage.charTranslations[nameHalfWidth]
|| nameToUse);
this.text.dialogText(true, text); this.text.dialogText(true, text);
//restoreTint is set from a colorTo command. //restoreTint is set from a colorTo command.
//We want to maintain the tint change from colorTo during speaking still. //We want to maintain the tint change from colorTo during speaking still.
@ -1013,7 +1023,12 @@ class Player {
} }
//If we didnt find the character just dump the text anyways with Arg1 as the name //If we didnt find the character just dump the text anyways with Arg1 as the name
if(!found) { if(!found) {
this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1); let nameFullWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);});
let nameHalfWidth = cur.Arg1.replace(/[---]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)});
this.text.characterName(true, this.utage.charTranslations[cur.Arg1]
|| this.utage.charTranslations[nameFullWidth]
|| this.utage.charTranslations[nameHalfWidth]
|| cur.Arg1);
this.text.dialogText(true, text); this.text.dialogText(true, text);
} }
} }

@ -1 +1 @@
Subproject commit 178ec9be36f504418d6aae0bb099d5006bd4186a Subproject commit ac0bfbd699431e9befdd843379e7c91ad1014cec

View File

@ -141,11 +141,16 @@ class UtageInfo {
for (const k of Object.keys(this.questTranslationsInner[this.currentTranslation][c])) { for (const k of Object.keys(this.questTranslationsInner[this.currentTranslation][c])) {
if (this.questTranslationsInner[this.currentTranslation][c][k].Enabled) { if (this.questTranslationsInner[this.currentTranslation][c][k].Enabled) {
for (const s of this.quests[c][k].Scenes) { for (const s of this.quests[c][k].Scenes) {
// only propagate if exists in translation file (THANKS GLOBAL) and translated name is supplied
if (c in this.sceneTranslationsInner[this.currentTranslation]
&& s in this.sceneTranslationsInner[this.currentTranslation][c]
&& this.sceneTranslationsInner[this.currentTranslation][c][s].Name != "") {
this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true; this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true;
} }
} }
} }
} }
}
resolve(); resolve();
}, (failure) => { }, (failure) => {
console.log(failure); console.log(failure);