Compare commits

..

No commits in common. "eb25bfc95825d48cc4e011a7151ff1e8476fdf8a" and "046e614587ec622dedfe90a2edd3b87e5a41ec60" have entirely different histories.

7 changed files with 3158 additions and 1694 deletions

View File

@ -44,7 +44,3 @@ 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

1497
Js/BgmLoop.json Normal file

File diff suppressed because it is too large Load Diff

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"];
const version = "YameteTomete XDUPlayer V1.5.0"; const version = "YameteTomete XDUPlayer V1.4.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");
continue; return;
} }
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");
continue; return;
} }
if (!tl_key.Enabled) { if (!tl_key.Enabled) {
continue; continue;

View File

@ -960,12 +960,7 @@ 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>") {
let nameFullWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);}); this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1);
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;
@ -980,12 +975,7 @@ class Player {
if(cur.Character) { if(cur.Character) {
nameToUse = cur.Arg1; nameToUse = cur.Arg1;
} }
let nameFullWidth = nameToUse.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);}); this.text.characterName(true, this.utage.charTranslations[nameToUse] || nameToUse);
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.
@ -1023,12 +1013,7 @@ 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) {
let nameFullWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);}); this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1);
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);
} }
} }

View File

@ -36,7 +36,7 @@ class UtageInfo {
//commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Scenario.tsv`), //commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Scenario.tsv`),
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Sound.tsv`), //5 commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Sound.tsv`), //5
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Texture.tsv`), //6 commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Texture.tsv`), //6
commonFunctions.getFileJson(`${this.rootDirectory}XDUData/Bgm/BgmLoop.json`), //7 commonFunctions.getFileJson(`${this.rootDirectory}Js/BgmLoop.json`), //7
commonFunctions.getFileJson(`${this.rootDirectory}Js/Translations/XduQuestCustom.json`), //8 commonFunctions.getFileJson(`${this.rootDirectory}Js/Translations/XduQuestCustom.json`), //8
commonFunctions.getFileJson(`${this.rootDirectory}Js/Translations/XduSceneCustom.json`), //9 commonFunctions.getFileJson(`${this.rootDirectory}Js/Translations/XduSceneCustom.json`), //9
commonFunctions.getFileText(`${this.rootDirectory}CustomData/Utage/Diva/Settings/CustomCharacter.tsv`), //10 commonFunctions.getFileText(`${this.rootDirectory}CustomData/Utage/Diva/Settings/CustomCharacter.tsv`), //10
@ -141,12 +141,7 @@ 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 this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true;
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;
}
} }
} }
} }

View File

@ -26,6 +26,9 @@ const cssToCopy = [
"Css/main.min.css", "Css/main.min.css",
"Css/generic.min.css" "Css/generic.min.css"
]; ];
const jsonFiles = [
"Js/BgmLoop.json",
];
const translations = [ const translations = [
"Js/Translations/**" "Js/Translations/**"
]; ];
@ -47,6 +50,7 @@ gulp.task('dist', gulp.series(
buildCss, buildCss,
copyCss copyCss
), ),
buildJson,
buildJsonTranslations, buildJsonTranslations,
copyHtml, copyHtml,
copyImages, copyImages,
@ -113,6 +117,12 @@ function copyCustomData() {
.pipe(gulp.dest('Dist/CustomData')); .pipe(gulp.dest('Dist/CustomData'));
} }
function buildJson() {
return gulp.src(jsonFiles)
.pipe(jsonmin())
.pipe(gulp.dest('Dist/Js'));
}
function buildJsonTranslations() { function buildJsonTranslations() {
return gulp.src(translations) return gulp.src(translations)
.pipe(jsonmin()) .pipe(jsonmin())

3301
package-lock.json generated

File diff suppressed because it is too large Load Diff