Resizing.
Work on text stuff. Work on tweens. Beginning audio support.
This commit is contained in:
parent
00be56d0a8
commit
a192a0eb0e
10 changed files with 799 additions and 173 deletions
|
@ -13,11 +13,12 @@ class UtageInfo {
|
|||
this.paramInfo = {};
|
||||
this.soundInfo = {};
|
||||
this.textureInfo = {};
|
||||
this.currentTranslation = {};
|
||||
}
|
||||
|
||||
loadUtageSettings(resolve, reject) {
|
||||
return new Promise((resolve, reject) => {
|
||||
var promises = [
|
||||
let promises = [
|
||||
commonFunctions.getFileJson(`${this.rootDirectory}Js/XduMissions.json`),
|
||||
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Character.tsv`),
|
||||
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Layer.tsv`),
|
||||
|
@ -51,14 +52,14 @@ class UtageInfo {
|
|||
return new Promise((resolve, reject) => {
|
||||
commonFunctions.getFileText(file)
|
||||
.then((success) => {
|
||||
var lines = success.split("\n");
|
||||
var headers = [];
|
||||
let lines = success.split("\n");
|
||||
let headers = [];
|
||||
for(let i = 0; i < lines.length; ++i) {
|
||||
var line = lines[i];
|
||||
let line = lines[i];
|
||||
if(i === 0) {
|
||||
headers = line.split('\t');
|
||||
headers = line.trim().split('\t');
|
||||
} else {
|
||||
var read = commonFunctions.readLine(line, headers);
|
||||
let read = commonFunctions.readLine(line, headers);
|
||||
if(read) {
|
||||
this.currentPlayingFile.push(read);
|
||||
}
|
||||
|
@ -73,18 +74,31 @@ class UtageInfo {
|
|||
});
|
||||
}
|
||||
|
||||
loadMissionTranslation(file) {
|
||||
return new Promise((resolve, reject) => {
|
||||
commonFunctions.getFileJson(file)
|
||||
.then((success) => {
|
||||
this.currentTranslation = success;
|
||||
resolve();
|
||||
}, (failure) => {
|
||||
this.currentTranslation = {};
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//http://madnesslabo.net/utage/?page_id=4521&lang=en
|
||||
parseCharacterInfo(text) {
|
||||
var lines = text.split("\n");
|
||||
var headers = [];
|
||||
var lastCharName = '';
|
||||
var lastNameText = '';
|
||||
let lines = text.split("\n");
|
||||
let headers = [];
|
||||
let lastCharName = '';
|
||||
let lastNameText = '';
|
||||
for(let i = 0; i < lines.length; ++i) {
|
||||
var line = lines[i];
|
||||
let line = lines[i];
|
||||
if(i === 0) {
|
||||
headers = line.split('\t');
|
||||
} else {
|
||||
var read = commonFunctions.readLine(line, headers);
|
||||
let read = commonFunctions.readLine(line, headers);
|
||||
if(read && !read.comment) {
|
||||
//If character name is empty it means it belongs to the line before it
|
||||
// so I am grouping the patterns by character name.
|
||||
|
@ -111,14 +125,14 @@ class UtageInfo {
|
|||
|
||||
//http://madnesslabo.net/utage/?page_id=4518&lang=en
|
||||
parseLayerInfo(text) {
|
||||
var lines = text.split("\n");
|
||||
var headers = [];
|
||||
let lines = text.split("\n");
|
||||
let headers = [];
|
||||
for(let i = 0; i < lines.length; ++i) {
|
||||
var line = lines[i];
|
||||
let line = lines[i];
|
||||
if(i === 0) {
|
||||
headers = line.split('\t');
|
||||
} else {
|
||||
var read = commonFunctions.readLine(line, headers);
|
||||
let read = commonFunctions.readLine(line, headers);
|
||||
if(read && read.LayerName) {
|
||||
this.layerInfo[read.LayerName] = read;
|
||||
}
|
||||
|
@ -128,14 +142,14 @@ class UtageInfo {
|
|||
|
||||
//http://madnesslabo.net/utage/?page_id=4514&lang=en
|
||||
parseLocalizeInfo(text) {
|
||||
var lines = text.split("\n");
|
||||
var headers = [];
|
||||
let lines = text.split("\n");
|
||||
let headers = [];
|
||||
for(let i = 0; i < lines.length; ++i) {
|
||||
var line = lines[i];
|
||||
let line = lines[i];
|
||||
if(i === 0) {
|
||||
headers = line.split('\t');
|
||||
} else {
|
||||
var read = commonFunctions.readLine(line, headers);
|
||||
let read = commonFunctions.readLine(line, headers);
|
||||
if(read && read.Key) {
|
||||
this.localizeInfo[read.Key] = read;
|
||||
}
|
||||
|
@ -145,14 +159,14 @@ class UtageInfo {
|
|||
|
||||
//http://madnesslabo.net/utage/?page_id=4517&lang=en
|
||||
parseParamInfo(text) {
|
||||
var lines = text.split("\n");
|
||||
var headers = [];
|
||||
let lines = text.split("\n");
|
||||
let headers = [];
|
||||
for(let i = 0; i < lines.length; ++i) {
|
||||
var line = lines[i];
|
||||
let line = lines[i];
|
||||
if(i === 0) {
|
||||
headers = line.split('\t');
|
||||
} else {
|
||||
var read = commonFunctions.readLine(line, headers);
|
||||
let read = commonFunctions.readLine(line, headers);
|
||||
if(read && read.Label) {
|
||||
this.paramInfo[read.Label] = read;
|
||||
}
|
||||
|
@ -162,14 +176,14 @@ class UtageInfo {
|
|||
|
||||
//http://madnesslabo.net/utage/?page_id=4519&lang=en
|
||||
parseSoundInfo(text) {
|
||||
var lines = text.split("\n");
|
||||
var headers = [];
|
||||
let lines = text.split("\n");
|
||||
let headers = [];
|
||||
for(let i = 0; i < lines.length; ++i) {
|
||||
var line = lines[i];
|
||||
let line = lines[i];
|
||||
if(i === 0) {
|
||||
headers = line.split('\t');
|
||||
} else {
|
||||
var read = commonFunctions.readLine(line, headers);
|
||||
let read = commonFunctions.readLine(line, headers);
|
||||
if(read && read.Label) {
|
||||
if(read.FileName && read.Type) {
|
||||
if(!read.FileName.includes('.')) {
|
||||
|
@ -178,7 +192,7 @@ class UtageInfo {
|
|||
switch(read.Type.toLowerCase()) {
|
||||
case 'se':
|
||||
if(read.FileName.includes(',')) {
|
||||
var s = read.FileName.split(',');
|
||||
let s = read.FileName.split(',');
|
||||
read.FileName = `${s[0].split('_').join('/')}/${s[1]}`;
|
||||
}
|
||||
read.FileName = `${this.rootDirectory}XDUData/Se/${read.FileName}`;
|
||||
|
@ -196,14 +210,14 @@ class UtageInfo {
|
|||
|
||||
//http://madnesslabo.net/utage/?page_id=4520&lang=en
|
||||
parseTextureInfo(text) {
|
||||
var lines = text.split("\n");
|
||||
var headers = [];
|
||||
let lines = text.split("\n");
|
||||
let headers = [];
|
||||
for(let i = 0; i < lines.length; ++i) {
|
||||
var line = lines[i];
|
||||
let line = lines[i];
|
||||
if(i === 0) {
|
||||
headers = line.split('\t');
|
||||
} else {
|
||||
var read = commonFunctions.readLine(line, headers);
|
||||
let read = commonFunctions.readLine(line, headers);
|
||||
if(read && read.Label) {
|
||||
read.FileName = `${this.rootDirectory}XDUData/BG/${read.FileName}`;
|
||||
this.textureInfo[read.Label] = read;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue