danoniplus 26.5.0 → 26.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js/danoni_main.js +658 -721
- package/js/lib/danoni_constants.js +16 -1
- package/package.json +1 -1
package/js/danoni_main.js
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Source by tickle
|
|
6
6
|
* Created : 2018/10/08
|
|
7
|
-
* Revised : 2022/
|
|
7
|
+
* Revised : 2022/03/12
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 26.
|
|
12
|
-
const g_revisedDate = `2022/
|
|
11
|
+
const g_version = `Ver 26.7.0`;
|
|
12
|
+
const g_revisedDate = `2022/03/12`;
|
|
13
13
|
const g_alphaVersion = ``;
|
|
14
14
|
|
|
15
15
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
@@ -25,12 +25,13 @@ let g_localVersion2 = ``;
|
|
|
25
25
|
* https://github.com/cwtickle/danoniplus/blob/develop/.github/CONTRIBUTING.md
|
|
26
26
|
*
|
|
27
27
|
* - 定数・変数名
|
|
28
|
-
* --
|
|
29
|
-
* -- グローバル変数: 変数の頭に`g_`をつける。
|
|
28
|
+
* -- グローバル変数: 変数の頭に`g_`をつける。基本はオブジェクトプロパティとして定義。
|
|
30
29
|
* -- 関数の引数 : アンダースコア始まりのキャメル表記。
|
|
30
|
+
* -- 定数 : `C_(カテゴリ)_(名前)`の形式。全て英大文字、数字、アンダースコアのみを使用。
|
|
31
|
+
* ※この定義方法は今後使用しない方針。
|
|
31
32
|
*
|
|
32
33
|
* ▽ 画面の構成
|
|
33
|
-
* [タイトル]-[
|
|
34
|
+
* [タイトル]-[設定]-[ディスプレイ]-[キーコンフィグ]-[譜面読込]-[メイン]-[リザルト]
|
|
34
35
|
* ⇒ 各画面に Init がついたものが画面の基本構成(ルート)を表す。
|
|
35
36
|
*
|
|
36
37
|
* ▽ スプライトの親子関係
|
|
@@ -195,27 +196,22 @@ let g_canLoadDifInfoFlg = false;
|
|
|
195
196
|
* div要素のstyleを取得
|
|
196
197
|
* @param {string} _id
|
|
197
198
|
*/
|
|
198
|
-
|
|
199
|
-
return document.getElementById(`${_id}`).style;
|
|
200
|
-
}
|
|
199
|
+
const $id = _id => document.getElementById(`${_id}`).style;
|
|
201
200
|
|
|
202
201
|
/**
|
|
203
202
|
* 複数のdiv子要素を親要素へ接続
|
|
204
203
|
* @param {object} _baseObj
|
|
205
204
|
* @param {...any} rest
|
|
206
205
|
*/
|
|
207
|
-
const multiAppend = (_baseObj, ...rest) =>
|
|
208
|
-
_baseObj.append(...rest);
|
|
209
|
-
};
|
|
206
|
+
const multiAppend = (_baseObj, ...rest) => _baseObj.append(...rest);
|
|
210
207
|
|
|
211
208
|
/**
|
|
212
209
|
* 複数の属性をまとめて設定
|
|
213
210
|
* @param {object} _baseObj
|
|
214
211
|
* @param {object} rest
|
|
215
212
|
*/
|
|
216
|
-
const setAttrs = (_baseObj, { ...rest } = {}) =>
|
|
213
|
+
const setAttrs = (_baseObj, { ...rest } = {}) =>
|
|
217
214
|
Object.keys(rest).forEach(property => _baseObj.setAttribute(property, rest[property]));
|
|
218
|
-
};
|
|
219
215
|
|
|
220
216
|
/**
|
|
221
217
|
* 属性値を数値に変換して取得
|
|
@@ -244,7 +240,7 @@ const hasVal = _data => _data !== undefined && _data !== ``;
|
|
|
244
240
|
* @param {string} _default
|
|
245
241
|
* @param {string} _type
|
|
246
242
|
*/
|
|
247
|
-
|
|
243
|
+
const setVal = (_checkStr, _default, _type) => {
|
|
248
244
|
|
|
249
245
|
let convertStr = _checkStr;
|
|
250
246
|
|
|
@@ -283,25 +279,23 @@ function setVal(_checkStr, _default, _type) {
|
|
|
283
279
|
|
|
284
280
|
// 文字列型の場合 (最初でチェック済みのためそのまま値を返却)
|
|
285
281
|
return convertStr;
|
|
286
|
-
}
|
|
282
|
+
};
|
|
287
283
|
|
|
288
284
|
/**
|
|
289
285
|
* 先頭のみ大文字に変換(それ以降はそのまま)
|
|
290
286
|
* @param {string} _str
|
|
291
287
|
*/
|
|
292
|
-
|
|
288
|
+
const toCapitalize = _str => {
|
|
293
289
|
if (!_str || typeof _str !== `string`) return _str;
|
|
294
290
|
return `${_str.charAt(0).toUpperCase()}${_str.slice(1)}`;
|
|
295
|
-
}
|
|
291
|
+
};
|
|
296
292
|
|
|
297
293
|
/**
|
|
298
294
|
* 0以上の数字に変換
|
|
299
295
|
* @param {number} _num
|
|
300
296
|
* @param {number} _init 0未満の場合に設定する値
|
|
301
297
|
*/
|
|
302
|
-
|
|
303
|
-
return _num < 0 ? _init : _num;
|
|
304
|
-
}
|
|
298
|
+
const roundZero = (_num, _init = 0) => _num < 0 ? _init : _num;
|
|
305
299
|
|
|
306
300
|
/**
|
|
307
301
|
* 配列内に存在するかどうかをチェック
|
|
@@ -369,46 +363,38 @@ const fuzzyListMatching = (_str, _headerList, _footerList) =>
|
|
|
369
363
|
* @param {string} _str
|
|
370
364
|
* @param {array} _pairs
|
|
371
365
|
*/
|
|
372
|
-
|
|
366
|
+
const replaceStr = (_str, _pairs) => {
|
|
373
367
|
let tmpStr = _str;
|
|
374
368
|
_pairs.forEach(pair => {
|
|
375
369
|
tmpStr = tmpStr.split(pair[0]).join(pair[1]);
|
|
376
370
|
});
|
|
377
371
|
return tmpStr;
|
|
378
|
-
}
|
|
372
|
+
};
|
|
379
373
|
|
|
380
374
|
/**
|
|
381
375
|
* 文字列のエスケープ処理
|
|
382
376
|
* @param {string} _str
|
|
383
377
|
* @param {array} _escapeList
|
|
384
378
|
*/
|
|
385
|
-
|
|
386
|
-
return escapeHtmlForEnabledTag(replaceStr(_str, _escapeList));
|
|
387
|
-
}
|
|
379
|
+
const escapeHtml = (_str, _escapeList = g_escapeStr.escape) => escapeHtmlForEnabledTag(replaceStr(_str, _escapeList));
|
|
388
380
|
|
|
389
381
|
/**
|
|
390
382
|
* 文字列のエスケープ処理(htmlタグ許容版)
|
|
391
383
|
* @param {string} _str
|
|
392
384
|
*/
|
|
393
|
-
|
|
394
|
-
return replaceStr(_str, g_escapeStr.escapeTag);
|
|
395
|
-
}
|
|
385
|
+
const escapeHtmlForEnabledTag = _str => replaceStr(_str, g_escapeStr.escapeTag);
|
|
396
386
|
|
|
397
387
|
/**
|
|
398
388
|
* エスケープ文字を元の文字に戻す
|
|
399
389
|
* @param {string} _str
|
|
400
390
|
*/
|
|
401
|
-
|
|
402
|
-
return replaceStr(_str, g_escapeStr.unEscapeTag);
|
|
403
|
-
}
|
|
391
|
+
const unEscapeHtml = _str => replaceStr(_str, g_escapeStr.unEscapeTag);
|
|
404
392
|
|
|
405
393
|
/**
|
|
406
394
|
* 配列の中身を全てエスケープ処理
|
|
407
395
|
* @param {array} _array
|
|
408
396
|
*/
|
|
409
|
-
|
|
410
|
-
return _array.map(str => escapeHtml(str));
|
|
411
|
-
}
|
|
397
|
+
const escapeHtmlForArray = _array => _array.map(str => escapeHtml(str));
|
|
412
398
|
|
|
413
399
|
/**
|
|
414
400
|
* 次のカーソルへ移動
|
|
@@ -432,7 +418,7 @@ const transCode = _setCode => {
|
|
|
432
418
|
return _setCode.replace(`Right`, `Left`);
|
|
433
419
|
}
|
|
434
420
|
return _setCode;
|
|
435
|
-
}
|
|
421
|
+
};
|
|
436
422
|
|
|
437
423
|
/**
|
|
438
424
|
* 特定キーをブロックする処理
|
|
@@ -506,7 +492,7 @@ const createScText = (_obj, _settingLabel, { displayName = `option`, dfLabel = `
|
|
|
506
492
|
})
|
|
507
493
|
);
|
|
508
494
|
}
|
|
509
|
-
}
|
|
495
|
+
};
|
|
510
496
|
|
|
511
497
|
/**
|
|
512
498
|
* 各画面の汎用ショートカットキー表示
|
|
@@ -520,7 +506,7 @@ const createScTextCommon = _displayName => {
|
|
|
520
506
|
dfLabel: g_lblNameObj[`sc_${_displayName}${target}`] ?? ``,
|
|
521
507
|
x: g_btnPatterns[_displayName][target],
|
|
522
508
|
}));
|
|
523
|
-
}
|
|
509
|
+
};
|
|
524
510
|
|
|
525
511
|
/**
|
|
526
512
|
* ショートカットキー有効化
|
|
@@ -534,7 +520,7 @@ const setShortcutEvent = (_displayName, _func = _ => true, _displayFlg = true) =
|
|
|
534
520
|
const evList = _ => {
|
|
535
521
|
document.onkeydown = evt => commonKeyDown(evt, _displayName, _func);
|
|
536
522
|
document.onkeyup = evt => commonKeyUp(evt);
|
|
537
|
-
}
|
|
523
|
+
};
|
|
538
524
|
if (g_initialFlg && g_btnWaitFrame[_displayName].initial) {
|
|
539
525
|
evList();
|
|
540
526
|
} else {
|
|
@@ -544,7 +530,7 @@ const setShortcutEvent = (_displayName, _func = _ => true, _displayFlg = true) =
|
|
|
544
530
|
}
|
|
545
531
|
}, g_btnWaitFrame[_displayName].s_frame * 1000 / g_fps);
|
|
546
532
|
}
|
|
547
|
-
}
|
|
533
|
+
};
|
|
548
534
|
|
|
549
535
|
|
|
550
536
|
/*-----------------------------------------------------------*/
|
|
@@ -559,7 +545,7 @@ const openLink = _url => {
|
|
|
559
545
|
if (_url.match(`^(http|https):/`)) {
|
|
560
546
|
window.open(_url, `_blank`, `noopener`);
|
|
561
547
|
}
|
|
562
|
-
}
|
|
548
|
+
};
|
|
563
549
|
|
|
564
550
|
/**
|
|
565
551
|
* プリロードするファイルの設定
|
|
@@ -568,7 +554,7 @@ const openLink = _url => {
|
|
|
568
554
|
* @param {string} _type
|
|
569
555
|
* @param {string} _crossOrigin
|
|
570
556
|
*/
|
|
571
|
-
|
|
557
|
+
const preloadFile = (_as, _href, _type = ``, _crossOrigin = `anonymous`) => {
|
|
572
558
|
|
|
573
559
|
const preloadFlg = g_preloadFiles.all.find(v => v === _href);
|
|
574
560
|
|
|
@@ -602,7 +588,7 @@ function preloadFile(_as, _href, _type = ``, _crossOrigin = `anonymous`) {
|
|
|
602
588
|
document.head.appendChild(link);
|
|
603
589
|
}
|
|
604
590
|
}
|
|
605
|
-
}
|
|
591
|
+
};
|
|
606
592
|
|
|
607
593
|
/**
|
|
608
594
|
* 外部jsファイルの読込 (callback)
|
|
@@ -641,7 +627,7 @@ function loadScript(_url, _callback, _requiredFlg = true, _charset = `UTF-8`) {
|
|
|
641
627
|
* @param {boolean} _requiredFlg (default : true / 読込必須)
|
|
642
628
|
* @param {string} _charset (default : UTF-8)
|
|
643
629
|
*/
|
|
644
|
-
|
|
630
|
+
const loadScript2 = (_url, _requiredFlg = true, _charset = `UTF-8`) => {
|
|
645
631
|
const baseUrl = _url.split(`?`)[0];
|
|
646
632
|
g_loadObj[baseUrl] = false;
|
|
647
633
|
|
|
@@ -664,7 +650,7 @@ function loadScript2(_url, _requiredFlg = true, _charset = `UTF-8`) {
|
|
|
664
650
|
};
|
|
665
651
|
document.querySelector(`head`).appendChild(script);
|
|
666
652
|
});
|
|
667
|
-
}
|
|
653
|
+
};
|
|
668
654
|
|
|
669
655
|
/**
|
|
670
656
|
* CSSファイルの読み込み (callback)
|
|
@@ -695,7 +681,7 @@ function importCssFile(_href, _func) {
|
|
|
695
681
|
* デフォルトは danoni_skin_default.css を読み込む
|
|
696
682
|
* @param {url} _href
|
|
697
683
|
*/
|
|
698
|
-
|
|
684
|
+
const importCssFile2 = _href => {
|
|
699
685
|
const baseUrl = _href.split(`?`)[0];
|
|
700
686
|
g_loadObj[baseUrl] = false;
|
|
701
687
|
|
|
@@ -713,7 +699,7 @@ function importCssFile2(_href) {
|
|
|
713
699
|
};
|
|
714
700
|
document.head.appendChild(link);
|
|
715
701
|
});
|
|
716
|
-
}
|
|
702
|
+
};
|
|
717
703
|
|
|
718
704
|
/**
|
|
719
705
|
* js, cssファイルの連続読込 (callback)
|
|
@@ -749,7 +735,7 @@ function loadMultipleFiles(_j, _fileData, _loadType, _afterFunc = _ => true) {
|
|
|
749
735
|
* @param {array} _fileData
|
|
750
736
|
* @param {string} _loadType
|
|
751
737
|
*/
|
|
752
|
-
async
|
|
738
|
+
const loadMultipleFiles2 = async (_fileData, _loadType) => {
|
|
753
739
|
await Promise.all(_fileData.map(async filePart => {
|
|
754
740
|
const filePath = `${filePart[1]}${filePart[0]}?${g_randTime}`;
|
|
755
741
|
if (filePart[0].endsWith(`.css`)) {
|
|
@@ -764,7 +750,7 @@ async function loadMultipleFiles2(_fileData, _loadType) {
|
|
|
764
750
|
await importCssFile2(cssPath);
|
|
765
751
|
}
|
|
766
752
|
}));
|
|
767
|
-
}
|
|
753
|
+
};
|
|
768
754
|
|
|
769
755
|
/**
|
|
770
756
|
* 入力されたパスを、ディレクトリとそれ以外に分割
|
|
@@ -818,7 +804,7 @@ const colorNameToCode = _color => {
|
|
|
818
804
|
const cxt = document.createElement(`canvas`).getContext(`2d`);
|
|
819
805
|
cxt.fillStyle = _color;
|
|
820
806
|
return cxt.fillStyle;
|
|
821
|
-
}
|
|
807
|
+
};
|
|
822
808
|
|
|
823
809
|
/**
|
|
824
810
|
* 10進 -> 16進数変換 (カラーコード形式になるよう0埋め)
|
|
@@ -858,7 +844,7 @@ const colorToHex = (_color) => {
|
|
|
858
844
|
return colorNameToCode(colorSet[0]) +
|
|
859
845
|
(tmpColor.length > 1 ? byteToHex(setVal(tmpColor[1], 255, C_TYP_NUMBER)) : '') +
|
|
860
846
|
(colorSet[1] !== undefined ? ` ${colorSet.slice(1).join(' ')}` : '');
|
|
861
|
-
}
|
|
847
|
+
};
|
|
862
848
|
|
|
863
849
|
/**
|
|
864
850
|
* カラーコードの前パディング (旧Option Editor対応)
|
|
@@ -876,8 +862,8 @@ const colorCdPadding = (_useFlg, _colorStr) => _useFlg ? `#${_colorStr.slice(1).
|
|
|
876
862
|
* objType (normal: 汎用, titleMusic: タイトル曲名, titleArrow: タイトル矢印)
|
|
877
863
|
* shadowFlg
|
|
878
864
|
*/
|
|
879
|
-
|
|
880
|
-
_colorCdPaddingUse = false, _objType = `normal`, _shadowFlg = false } = {}) {
|
|
865
|
+
const makeColorGradation = (_colorStr, { _defaultColorgrd = g_headerObj.defaultColorgrd,
|
|
866
|
+
_colorCdPaddingUse = false, _objType = `normal`, _shadowFlg = false } = {}) => {
|
|
881
867
|
|
|
882
868
|
// |color_data=300,20,45deg:#ffff99:#ffffff:#9999ff@linear-gradient|
|
|
883
869
|
// |color_data=300,20,#ffff99:#ffffff:#9999ff@radial-gradient|
|
|
@@ -920,7 +906,7 @@ function makeColorGradation(_colorStr, { _defaultColorgrd = g_headerObj.defaultC
|
|
|
920
906
|
}
|
|
921
907
|
|
|
922
908
|
return `${gradationType}(${convertColorStr})`;
|
|
923
|
-
}
|
|
909
|
+
};
|
|
924
910
|
|
|
925
911
|
/*-----------------------------------------------------------*/
|
|
926
912
|
/* フォント設定 */
|
|
@@ -930,9 +916,8 @@ function makeColorGradation(_colorStr, { _defaultColorgrd = g_headerObj.defaultC
|
|
|
930
916
|
* 画面共通のフォント設定
|
|
931
917
|
* @param {string} _priorityFont
|
|
932
918
|
*/
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
}
|
|
919
|
+
const getBasicFont = (_priorityFont = ``) =>
|
|
920
|
+
[_priorityFont, g_headerObj.customFont, C_LBL_BASICFONT].filter(value => value !== ``).join(`,`);
|
|
936
921
|
|
|
937
922
|
/**
|
|
938
923
|
* フォントサイズに応じた横幅を取得
|
|
@@ -940,11 +925,11 @@ function getBasicFont(_priorityFont = ``) {
|
|
|
940
925
|
* @param {number} _fontsize
|
|
941
926
|
* @param {string} _font
|
|
942
927
|
*/
|
|
943
|
-
|
|
928
|
+
const getStrWidth = (_str, _fontsize, _font) => {
|
|
944
929
|
const ctx = document.createElement(`canvas`).getContext(`2d`);
|
|
945
930
|
ctx.font = `${_fontsize}px ${_font}`;
|
|
946
931
|
return ctx.measureText(unEscapeHtml(_str)).width;
|
|
947
|
-
}
|
|
932
|
+
};
|
|
948
933
|
|
|
949
934
|
/**
|
|
950
935
|
* 指定した横幅に合ったフォントサイズを取得
|
|
@@ -954,14 +939,14 @@ function getStrWidth(_str, _fontsize, _font) {
|
|
|
954
939
|
* @param {number} _maxFontsize
|
|
955
940
|
* @param {number} _minFontsize
|
|
956
941
|
*/
|
|
957
|
-
|
|
942
|
+
const getFontSize = (_str, _maxWidth, _font = getBasicFont(), _maxFontsize = 64, _minFontsize = 5) => {
|
|
958
943
|
for (let siz = _maxFontsize; siz >= _minFontsize; siz--) {
|
|
959
944
|
if (_maxWidth >= getStrWidth(_str, siz, _font)) {
|
|
960
945
|
return siz;
|
|
961
946
|
}
|
|
962
947
|
}
|
|
963
948
|
return _minFontsize;
|
|
964
|
-
}
|
|
949
|
+
};
|
|
965
950
|
|
|
966
951
|
/*-----------------------------------------------------------*/
|
|
967
952
|
/* ラベル・ボタン・オブジェクトの作成 */
|
|
@@ -977,7 +962,7 @@ function getFontSize(_str, _maxWidth, _font = getBasicFont(), _maxFontsize = 64,
|
|
|
977
962
|
* @param {number} _width
|
|
978
963
|
* @param {number} _height
|
|
979
964
|
*/
|
|
980
|
-
|
|
965
|
+
const createDiv = (_id, _x, _y, _width, _height) => {
|
|
981
966
|
const div = document.createElement(`div`);
|
|
982
967
|
|
|
983
968
|
div.id = _id;
|
|
@@ -990,20 +975,20 @@ function createDiv(_id, _x, _y, _width, _height) {
|
|
|
990
975
|
setUserSelect(style);
|
|
991
976
|
|
|
992
977
|
return div;
|
|
993
|
-
}
|
|
978
|
+
};
|
|
994
979
|
|
|
995
980
|
/**
|
|
996
981
|
* user-select属性の値変更
|
|
997
982
|
* @param {object} _style
|
|
998
983
|
* @param {string} _value
|
|
999
984
|
*/
|
|
1000
|
-
|
|
985
|
+
const setUserSelect = (_style, _value = C_DIS_NONE) => {
|
|
1001
986
|
_style.userSelect = _value;
|
|
1002
987
|
_style.webkitUserSelect = _value;
|
|
1003
988
|
_style.msUserSelect = _value;
|
|
1004
989
|
_style.mozUserSelect = _value;
|
|
1005
990
|
_style.webkitTouchCallout = _value;
|
|
1006
|
-
}
|
|
991
|
+
};
|
|
1007
992
|
|
|
1008
993
|
/**
|
|
1009
994
|
* 子div要素のラベル文字作成 (CSS版・拡張属性対応)
|
|
@@ -1012,8 +997,8 @@ function setUserSelect(_style, _value = C_DIS_NONE) {
|
|
|
1012
997
|
* @param {object} _obj (x, y, w, h, siz, align, ...rest)
|
|
1013
998
|
* @param {...any} _classes
|
|
1014
999
|
*/
|
|
1015
|
-
|
|
1016
|
-
siz = C_SIZ_SETLBL, align = C_ALIGN_CENTER, ...rest } = {}, ..._classes) {
|
|
1000
|
+
const createDivCss2Label = (_id, _text, { x = 0, y = 0, w = C_LEN_SETLBL_WIDTH, h = C_LEN_SETLBL_HEIGHT,
|
|
1001
|
+
siz = C_SIZ_SETLBL, align = C_ALIGN_CENTER, ...rest } = {}, ..._classes) => {
|
|
1017
1002
|
const div = createDiv(_id, x, y, w, h);
|
|
1018
1003
|
div.classList.add(g_cssObj.title_base, ..._classes);
|
|
1019
1004
|
|
|
@@ -1025,7 +1010,7 @@ function createDivCss2Label(_id, _text, { x = 0, y = 0, w = C_LEN_SETLBL_WIDTH,
|
|
|
1025
1010
|
Object.keys(rest).forEach(property => style[property] = rest[property]);
|
|
1026
1011
|
|
|
1027
1012
|
return div;
|
|
1028
|
-
}
|
|
1013
|
+
};
|
|
1029
1014
|
|
|
1030
1015
|
/**
|
|
1031
1016
|
* 画像表示
|
|
@@ -1036,12 +1021,12 @@ function createDivCss2Label(_id, _text, { x = 0, y = 0, w = C_LEN_SETLBL_WIDTH,
|
|
|
1036
1021
|
* @param {number} _width
|
|
1037
1022
|
* @param {number} _height
|
|
1038
1023
|
*/
|
|
1039
|
-
|
|
1024
|
+
const createImg = (_id, _imgPath, _x, _y, _width, _height) => {
|
|
1040
1025
|
const div = createDiv(_id, _x, _y, _width, _height);
|
|
1041
1026
|
div.innerHTML = `<img id="${_id}img" src="${_imgPath}" style="width:${_width}px;height:${_height}px"${g_isFile ? `` : ` crossOrigin="anonimous"`}>`;
|
|
1042
1027
|
|
|
1043
1028
|
return div;
|
|
1044
|
-
}
|
|
1029
|
+
};
|
|
1045
1030
|
|
|
1046
1031
|
/**
|
|
1047
1032
|
* 色付きオブジェクトの作成 (拡張属性対応)
|
|
@@ -1049,8 +1034,8 @@ function createImg(_id, _imgPath, _x, _y, _width, _height) {
|
|
|
1049
1034
|
* @param {object} _obj (x, y, w, h, color, rotate, styleName, ...rest)
|
|
1050
1035
|
* @param {...any} _classes
|
|
1051
1036
|
*/
|
|
1052
|
-
|
|
1053
|
-
{ x = 0, y = 0, w = C_ARW_WIDTH, h = C_ARW_WIDTH, rotate = ``, styleName = ``, ...rest } = {}, ..._classes) {
|
|
1037
|
+
const createColorObject2 = (_id,
|
|
1038
|
+
{ x = 0, y = 0, w = C_ARW_WIDTH, h = C_ARW_WIDTH, rotate = ``, styleName = ``, ...rest } = {}, ..._classes) => {
|
|
1054
1039
|
|
|
1055
1040
|
const div = createDiv(_id, x, y, w, h);
|
|
1056
1041
|
div.classList.add(..._classes);
|
|
@@ -1075,7 +1060,7 @@ function createColorObject2(_id,
|
|
|
1075
1060
|
setAttrs(div, { color: rest.background ?? ``, type: charaStyle, cnt: 0, });
|
|
1076
1061
|
|
|
1077
1062
|
return div;
|
|
1078
|
-
}
|
|
1063
|
+
};
|
|
1079
1064
|
|
|
1080
1065
|
/**
|
|
1081
1066
|
* 空スプライト(ムービークリップ相当)の作成
|
|
@@ -1086,7 +1071,7 @@ function createColorObject2(_id,
|
|
|
1086
1071
|
* @param {...any} _classes
|
|
1087
1072
|
* @returns
|
|
1088
1073
|
*/
|
|
1089
|
-
|
|
1074
|
+
const createEmptySprite = (_parentObj, _newObjId, { x = 0, y = 0, w = g_sWidth, h = g_sHeight, title = ``, ...rest } = {}, ..._classes) => {
|
|
1090
1075
|
if (document.getElementById(_newObjId) !== null) {
|
|
1091
1076
|
changeStyle(_newObjId, { x, y, w, h, title, ...rest });
|
|
1092
1077
|
return document.getElementById(_newObjId);
|
|
@@ -1100,20 +1085,20 @@ function createEmptySprite(_parentObj, _newObjId, { x = 0, y = 0, w = g_sWidth,
|
|
|
1100
1085
|
_parentObj.appendChild(div);
|
|
1101
1086
|
|
|
1102
1087
|
return div;
|
|
1103
|
-
}
|
|
1088
|
+
};
|
|
1104
1089
|
|
|
1105
1090
|
/**
|
|
1106
1091
|
* 階層スプライト(全体)の作成
|
|
1107
1092
|
* @param {string} _baseName
|
|
1108
1093
|
* @param {number} _num
|
|
1109
1094
|
*/
|
|
1110
|
-
|
|
1095
|
+
const createMultipleSprite = (_baseName, _num) => {
|
|
1111
1096
|
const sprite = createEmptySprite(divRoot, `${_baseName}`);
|
|
1112
1097
|
for (let j = 0; j <= _num; j++) {
|
|
1113
1098
|
createEmptySprite(sprite, `${_baseName}${j}`);
|
|
1114
1099
|
}
|
|
1115
1100
|
return sprite;
|
|
1116
|
-
}
|
|
1101
|
+
};
|
|
1117
1102
|
|
|
1118
1103
|
/**
|
|
1119
1104
|
* イベントハンドラ用オブジェクト
|
|
@@ -1143,14 +1128,14 @@ const g_handler = (_ => {
|
|
|
1143
1128
|
e.target.removeEventListener(e.type, e.listener, e.capture);
|
|
1144
1129
|
}
|
|
1145
1130
|
}
|
|
1146
|
-
}
|
|
1131
|
+
};
|
|
1147
1132
|
})();
|
|
1148
1133
|
|
|
1149
1134
|
/**
|
|
1150
1135
|
* 親スプライト配下の子スプライトを全削除
|
|
1151
1136
|
* @param {object} _parentObjName 親スプライト名
|
|
1152
1137
|
*/
|
|
1153
|
-
|
|
1138
|
+
const deleteChildspriteAll = _parentObjName => {
|
|
1154
1139
|
|
|
1155
1140
|
const parentsprite = document.querySelector(`#${_parentObjName}`);
|
|
1156
1141
|
while (parentsprite.hasChildNodes()) {
|
|
@@ -1159,7 +1144,7 @@ function deleteChildspriteAll(_parentObjName) {
|
|
|
1159
1144
|
g_handler.removeListener(parentsprite.firstChild.getAttribute(`lsnrkeyTE`));
|
|
1160
1145
|
parentsprite.removeChild(parentsprite.firstChild);
|
|
1161
1146
|
}
|
|
1162
|
-
}
|
|
1147
|
+
};
|
|
1163
1148
|
|
|
1164
1149
|
/**
|
|
1165
1150
|
* ボタンの作成 (CSS版・拡張属性対応)
|
|
@@ -1169,9 +1154,9 @@ function deleteChildspriteAll(_parentObjName) {
|
|
|
1169
1154
|
* @param {object} _obj (x, y, w, h, siz, align, title, groupName, initDisabledFlg, ...rest)
|
|
1170
1155
|
* @param {...any} _classes
|
|
1171
1156
|
*/
|
|
1172
|
-
|
|
1157
|
+
const createCss2Button = (_id, _text, _func = _ => true, { x = 0, y = g_sHeight - 100, w = g_sWidth / 3, h = C_BTN_HEIGHT,
|
|
1173
1158
|
siz = C_LBL_BTNSIZE, align = C_ALIGN_CENTER, title = ``, groupName = g_currentPage, initDisabledFlg = true,
|
|
1174
|
-
resetFunc = _ => true, cxtFunc = _ => true, ...rest } = {}, ..._classes) {
|
|
1159
|
+
resetFunc = _ => true, cxtFunc = _ => true, ...rest } = {}, ..._classes) => {
|
|
1175
1160
|
|
|
1176
1161
|
const div = createDiv(_id, x, y, w, h);
|
|
1177
1162
|
div.classList.add(`button_common`, ..._classes);
|
|
@@ -1224,20 +1209,20 @@ function createCss2Button(_id, _text, _func = _ => true, { x = 0, y = g_sHeight
|
|
|
1224
1209
|
g_cxtAddFunc[_id](evt);
|
|
1225
1210
|
}
|
|
1226
1211
|
return false;
|
|
1227
|
-
}
|
|
1212
|
+
};
|
|
1228
1213
|
|
|
1229
1214
|
// イベントリスナー用のキーをセット
|
|
1230
1215
|
div.setAttribute(`lsnrkey`, lsnrkey);
|
|
1231
1216
|
|
|
1232
1217
|
return div;
|
|
1233
|
-
}
|
|
1218
|
+
};
|
|
1234
1219
|
|
|
1235
1220
|
/**
|
|
1236
1221
|
* オブジェクトのスタイル一括変更
|
|
1237
1222
|
* @param {string} _id
|
|
1238
1223
|
* @param {object} _obj (x, y, w, h, siz, align, title, ...rest)
|
|
1239
1224
|
*/
|
|
1240
|
-
|
|
1225
|
+
const changeStyle = (_id, { x, y, w, h, siz, align, title, ...rest } = {}) => {
|
|
1241
1226
|
const div = document.querySelector(`#${_id}`);
|
|
1242
1227
|
const style = div.style;
|
|
1243
1228
|
|
|
@@ -1258,7 +1243,7 @@ function changeStyle(_id, { x, y, w, h, siz, align, title, ...rest } = {}) {
|
|
|
1258
1243
|
div.title = title;
|
|
1259
1244
|
}
|
|
1260
1245
|
Object.keys(rest).forEach(property => style[property] = rest[property]);
|
|
1261
|
-
}
|
|
1246
|
+
};
|
|
1262
1247
|
|
|
1263
1248
|
/**
|
|
1264
1249
|
* タイトル文字描画
|
|
@@ -1267,18 +1252,17 @@ function changeStyle(_id, { x, y, w, h, siz, align, title, ...rest } = {}) {
|
|
|
1267
1252
|
* @param {number} _x
|
|
1268
1253
|
* @param {number} _y
|
|
1269
1254
|
*/
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
}
|
|
1255
|
+
const getTitleDivLabel = (_id, _titlename, _x, _y, ..._classes) =>
|
|
1256
|
+
createDivCss2Label(_id, _titlename, { x: _x, y: _y, w: g_sWidth, h: 50, siz: C_LBL_BTNSIZE }, ..._classes);
|
|
1273
1257
|
|
|
1274
1258
|
/**
|
|
1275
1259
|
* キーコントロールの初期化
|
|
1276
1260
|
*/
|
|
1277
|
-
|
|
1261
|
+
const resetKeyControl = _ => {
|
|
1278
1262
|
document.onkeyup = _ => { };
|
|
1279
1263
|
document.onkeydown = evt => blockCode(transCode(evt.code));
|
|
1280
1264
|
g_inputKeyBuffer = {};
|
|
1281
|
-
}
|
|
1265
|
+
};
|
|
1282
1266
|
|
|
1283
1267
|
/**
|
|
1284
1268
|
* 画面上の描画・オブジェクトを全てクリアし、背景を再描画
|
|
@@ -1286,7 +1270,7 @@ function resetKeyControl() {
|
|
|
1286
1270
|
* - dicRoot自体を削除しないよう注意すること。
|
|
1287
1271
|
* - 再描画時に共通で表示する箇所はここで指定している。
|
|
1288
1272
|
*/
|
|
1289
|
-
|
|
1273
|
+
const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
|
|
1290
1274
|
resetKeyControl();
|
|
1291
1275
|
|
|
1292
1276
|
if (document.querySelector(`#layer0`) !== null) {
|
|
@@ -1332,13 +1316,13 @@ function clearWindow(_redrawFlg = false, _customDisplayName = ``) {
|
|
|
1332
1316
|
if (_redrawFlg) {
|
|
1333
1317
|
drawDefaultBackImage(_customDisplayName);
|
|
1334
1318
|
}
|
|
1335
|
-
}
|
|
1319
|
+
};
|
|
1336
1320
|
|
|
1337
1321
|
/**
|
|
1338
1322
|
* デフォルト背景画像の描画処理
|
|
1339
1323
|
* @param {string} _key メイン画面かどうか。Main:メイン画面、(空白):それ以外
|
|
1340
1324
|
*/
|
|
1341
|
-
|
|
1325
|
+
const drawDefaultBackImage = _key => {
|
|
1342
1326
|
|
|
1343
1327
|
g_btnAddFunc = {};
|
|
1344
1328
|
g_btnDeleteFlg = {};
|
|
@@ -1365,13 +1349,13 @@ function drawDefaultBackImage(_key) {
|
|
|
1365
1349
|
} else {
|
|
1366
1350
|
createEmptySprite(divRoot, `divBack`);
|
|
1367
1351
|
}
|
|
1368
|
-
}
|
|
1352
|
+
};
|
|
1369
1353
|
|
|
1370
1354
|
/**
|
|
1371
1355
|
* 背景・マスク用画像の描画
|
|
1372
1356
|
* @param {object} _obj
|
|
1373
1357
|
*/
|
|
1374
|
-
|
|
1358
|
+
const makeSpriteImage = _obj => {
|
|
1375
1359
|
let tmpInnerHTML = `<img src=${_obj.path} class="${_obj.class}"
|
|
1376
1360
|
style="position:absolute;left:${_obj.left}px;top:${_obj.top}px`;
|
|
1377
1361
|
if (_obj.width !== 0 && _obj.width > 0) {
|
|
@@ -1384,13 +1368,13 @@ function makeSpriteImage(_obj) {
|
|
|
1384
1368
|
;animation-duration:${_obj.animationDuration}s
|
|
1385
1369
|
;opacity:${_obj.opacity}">`;
|
|
1386
1370
|
return tmpInnerHTML;
|
|
1387
|
-
}
|
|
1371
|
+
};
|
|
1388
1372
|
|
|
1389
1373
|
/**
|
|
1390
1374
|
* 背景・マスク用テキストの描画
|
|
1391
1375
|
* @param {object} _obj
|
|
1392
1376
|
*/
|
|
1393
|
-
|
|
1377
|
+
const makeSpriteText = _obj => {
|
|
1394
1378
|
let tmpInnerHTML = `<span class="${_obj.class}"
|
|
1395
1379
|
style="display:inline-block;position:absolute;left:${_obj.left}px;top:${_obj.top}px`;
|
|
1396
1380
|
|
|
@@ -1407,14 +1391,14 @@ function makeSpriteText(_obj) {
|
|
|
1407
1391
|
;animation-duration:${_obj.animationDuration}s
|
|
1408
1392
|
;opacity:${_obj.opacity}">${_obj.path}</span>`;
|
|
1409
1393
|
return tmpInnerHTML;
|
|
1410
|
-
}
|
|
1394
|
+
};
|
|
1411
1395
|
|
|
1412
1396
|
/**
|
|
1413
1397
|
* 多重配列の存在をチェックし、
|
|
1414
1398
|
* 存在しない場合は作成、存在する場合は重複を避けて配列を新規作成
|
|
1415
1399
|
* @param {object, array} _obj
|
|
1416
1400
|
*/
|
|
1417
|
-
|
|
1401
|
+
const checkDuplicatedObjects = _obj => {
|
|
1418
1402
|
let addFrame = 0;
|
|
1419
1403
|
if (_obj === undefined) {
|
|
1420
1404
|
_obj = [];
|
|
@@ -1429,14 +1413,14 @@ function checkDuplicatedObjects(_obj) {
|
|
|
1429
1413
|
}
|
|
1430
1414
|
}
|
|
1431
1415
|
return [_obj, addFrame];
|
|
1432
|
-
}
|
|
1416
|
+
};
|
|
1433
1417
|
|
|
1434
1418
|
/**
|
|
1435
1419
|
* 多層スプライトデータの作成処理
|
|
1436
1420
|
* @param {array} _data
|
|
1437
1421
|
* @param {function} _calcFrame
|
|
1438
1422
|
*/
|
|
1439
|
-
|
|
1423
|
+
const makeSpriteData = (_data, _calcFrame = _frame => _frame) => {
|
|
1440
1424
|
|
|
1441
1425
|
const spriteData = [];
|
|
1442
1426
|
let maxDepth = -1;
|
|
@@ -1498,25 +1482,23 @@ function makeSpriteData(_data, _calcFrame = _frame => _frame) {
|
|
|
1498
1482
|
});
|
|
1499
1483
|
|
|
1500
1484
|
return [spriteData, maxDepth];
|
|
1501
|
-
}
|
|
1485
|
+
};
|
|
1502
1486
|
|
|
1503
1487
|
/**
|
|
1504
1488
|
* 画像ファイルかどうかをチェック
|
|
1505
1489
|
* @param {string} _str
|
|
1506
1490
|
*/
|
|
1507
|
-
|
|
1508
|
-
return listMatching(_str, g_imgExtensions, { prefix: `[.]`, suffix: `$` });
|
|
1509
|
-
}
|
|
1491
|
+
const checkImage = _str => listMatching(_str, g_imgExtensions, { prefix: `[.]`, suffix: `$` });
|
|
1510
1492
|
|
|
1511
1493
|
/**
|
|
1512
1494
|
* back/masktitle(result)において、ジャンプ先のフレーム数を取得
|
|
1513
1495
|
* @param {string} _frames
|
|
1514
1496
|
*/
|
|
1515
|
-
|
|
1497
|
+
const getSpriteJumpFrame = _frames => {
|
|
1516
1498
|
const jumpFrames = _frames.split(`:`);
|
|
1517
1499
|
const jumpCnt = Math.floor(Math.random() * jumpFrames.length);
|
|
1518
1500
|
return setVal(Number(jumpFrames[jumpCnt]) - 1, 0, C_TYP_NUMBER);
|
|
1519
|
-
}
|
|
1501
|
+
};
|
|
1520
1502
|
|
|
1521
1503
|
/**
|
|
1522
1504
|
* 背景・マスクモーションの表示(タイトル・リザルト用)
|
|
@@ -1524,7 +1506,7 @@ function getSpriteJumpFrame(_frames) {
|
|
|
1524
1506
|
* @param {string} _displayName title / result
|
|
1525
1507
|
* @param {string} _depthName back / mask
|
|
1526
1508
|
*/
|
|
1527
|
-
|
|
1509
|
+
const drawSpriteData = (_frame, _displayName, _depthName) => {
|
|
1528
1510
|
|
|
1529
1511
|
const spriteName = `${_depthName}${toCapitalize(_displayName)}`;
|
|
1530
1512
|
const tmpObjs = g_headerObj[`${spriteName}Data`][_frame];
|
|
@@ -1560,14 +1542,14 @@ function drawSpriteData(_frame, _displayName, _depthName) {
|
|
|
1560
1542
|
}
|
|
1561
1543
|
}
|
|
1562
1544
|
return _frame;
|
|
1563
|
-
}
|
|
1545
|
+
};
|
|
1564
1546
|
|
|
1565
1547
|
/**
|
|
1566
1548
|
* 背景・マスクモーションの表示
|
|
1567
1549
|
* @param {number} _frame
|
|
1568
1550
|
* @param {string} _depthName
|
|
1569
1551
|
*/
|
|
1570
|
-
|
|
1552
|
+
const drawMainSpriteData = (_frame, _depthName) => {
|
|
1571
1553
|
|
|
1572
1554
|
const tmpObjs = g_scoreObj[`${_depthName}Data`][_frame];
|
|
1573
1555
|
|
|
@@ -1585,20 +1567,20 @@ function drawMainSpriteData(_frame, _depthName) {
|
|
|
1585
1567
|
}
|
|
1586
1568
|
}
|
|
1587
1569
|
});
|
|
1588
|
-
}
|
|
1570
|
+
};
|
|
1589
1571
|
|
|
1590
1572
|
/**
|
|
1591
1573
|
* タイトル・リザルトモーションの描画
|
|
1592
1574
|
* @param {string} _displayName
|
|
1593
1575
|
*/
|
|
1594
|
-
|
|
1576
|
+
const drawTitleResultMotion = _displayName => {
|
|
1595
1577
|
g_animationData.forEach(sprite => {
|
|
1596
1578
|
const spriteName = `${sprite}${toCapitalize(_displayName)}`;
|
|
1597
1579
|
if (g_headerObj[`${spriteName}Data`][g_scoreObj[`${spriteName}FrameNum`]] !== undefined) {
|
|
1598
1580
|
g_scoreObj[`${spriteName}FrameNum`] = drawSpriteData(g_scoreObj[`${spriteName}FrameNum`], _displayName, sprite);
|
|
1599
1581
|
}
|
|
1600
1582
|
});
|
|
1601
|
-
}
|
|
1583
|
+
};
|
|
1602
1584
|
|
|
1603
1585
|
/*-----------------------------------------------------------*/
|
|
1604
1586
|
/* その他の共通設定 */
|
|
@@ -1692,7 +1674,7 @@ class AudioPlayer {
|
|
|
1692
1674
|
* @param {string} _textVal 入力値
|
|
1693
1675
|
* @param {string} _msg
|
|
1694
1676
|
*/
|
|
1695
|
-
async
|
|
1677
|
+
const copyTextToClipboard = async (_textVal, _msg) => {
|
|
1696
1678
|
try {
|
|
1697
1679
|
await navigator.clipboard.writeText(_textVal);
|
|
1698
1680
|
|
|
@@ -1716,26 +1698,24 @@ async function copyTextToClipboard(_textVal, _msg) {
|
|
|
1716
1698
|
} finally {
|
|
1717
1699
|
makeInfoWindow(_msg, `leftToRightFade`);
|
|
1718
1700
|
}
|
|
1719
|
-
}
|
|
1701
|
+
};
|
|
1720
1702
|
|
|
1721
1703
|
/**
|
|
1722
1704
|
* 現在URLのクエリパラメータから指定した値を取得
|
|
1723
1705
|
* @param {string} _name
|
|
1724
1706
|
*/
|
|
1725
|
-
|
|
1707
|
+
const getQueryParamVal = _name => {
|
|
1726
1708
|
const param = new URL(location.href).searchParams.get(_name);
|
|
1727
1709
|
return param !== null ? decodeURIComponent(param.replace(/\+/g, ` `)) : null;
|
|
1728
|
-
}
|
|
1710
|
+
};
|
|
1729
1711
|
|
|
1730
1712
|
/**
|
|
1731
1713
|
* ローディング文字用ラベルの作成
|
|
1732
1714
|
*/
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
});
|
|
1738
|
-
}
|
|
1715
|
+
const getLoadingLabel = _ => createDivCss2Label(`lblLoading`, g_lblNameObj.nowLoading, {
|
|
1716
|
+
x: 0, y: g_sHeight - 40, w: g_sWidth, h: C_LEN_SETLBL_HEIGHT,
|
|
1717
|
+
siz: C_SIZ_SETLBL, align: C_ALIGN_RIGHT,
|
|
1718
|
+
});
|
|
1739
1719
|
|
|
1740
1720
|
/**
|
|
1741
1721
|
* フレーム数を時間表示へ変換
|
|
@@ -1745,7 +1725,7 @@ const transFrameToTimer = _frame => {
|
|
|
1745
1725
|
const minutes = Math.floor(_frame / g_fps / 60);
|
|
1746
1726
|
const seconds = `${Math.floor((_frame / g_fps) % 60)}`.padStart(2, `0`);
|
|
1747
1727
|
return `${minutes}:${seconds}`;
|
|
1748
|
-
}
|
|
1728
|
+
};
|
|
1749
1729
|
|
|
1750
1730
|
/**
|
|
1751
1731
|
* 疑似タイマー表記をフレーム数へ変換
|
|
@@ -1769,7 +1749,7 @@ const transTimerToFrame = _str => {
|
|
|
1769
1749
|
/* Scene : INITIALIZE [peach] */
|
|
1770
1750
|
/*-----------------------------------------------------------*/
|
|
1771
1751
|
|
|
1772
|
-
async
|
|
1752
|
+
const initialControl = async () => {
|
|
1773
1753
|
|
|
1774
1754
|
[g_sWidth, g_sHeight] = [
|
|
1775
1755
|
setVal($id(`canvas-frame`).width, 600, C_TYP_FLOAT), setVal($id(`canvas-frame`).height, 500, C_TYP_FLOAT)
|
|
@@ -1931,12 +1911,12 @@ async function initialControl() {
|
|
|
1931
1911
|
}
|
|
1932
1912
|
}
|
|
1933
1913
|
titleInit();
|
|
1934
|
-
}
|
|
1914
|
+
};
|
|
1935
1915
|
|
|
1936
1916
|
/**
|
|
1937
1917
|
* 作品別ローカルストレージの読み込み・初期設定
|
|
1938
1918
|
*/
|
|
1939
|
-
|
|
1919
|
+
const loadLocalStorage = _ => {
|
|
1940
1920
|
// URLからscoreIdを削除
|
|
1941
1921
|
const url = new URL(location.href);
|
|
1942
1922
|
url.searchParams.delete('scoreId');
|
|
@@ -1990,13 +1970,13 @@ function loadLocalStorage() {
|
|
|
1990
1970
|
highscores: {},
|
|
1991
1971
|
};
|
|
1992
1972
|
}
|
|
1993
|
-
}
|
|
1973
|
+
};
|
|
1994
1974
|
|
|
1995
1975
|
/**
|
|
1996
1976
|
* 譜面データを分割して値を取得
|
|
1997
1977
|
* @param {string} _dos 譜面データ
|
|
1998
1978
|
*/
|
|
1999
|
-
|
|
1979
|
+
const dosConvert = _dos => {
|
|
2000
1980
|
|
|
2001
1981
|
const obj = {};
|
|
2002
1982
|
const paramsTmp = g_enableAmpersandSplit ? _dos.split(`&`).join(`|`) : _dos;
|
|
@@ -2013,13 +1993,13 @@ function dosConvert(_dos) {
|
|
|
2013
1993
|
}
|
|
2014
1994
|
}
|
|
2015
1995
|
return obj;
|
|
2016
|
-
}
|
|
1996
|
+
};
|
|
2017
1997
|
|
|
2018
1998
|
/**
|
|
2019
1999
|
* 譜面読込
|
|
2020
2000
|
* @param {number} _scoreId 譜面番号
|
|
2021
2001
|
*/
|
|
2022
|
-
async
|
|
2002
|
+
const loadChartFile = async (_scoreId = g_stateObj.scoreId) => {
|
|
2023
2003
|
|
|
2024
2004
|
const dosInput = document.querySelector(`#dos`);
|
|
2025
2005
|
const divRoot = document.querySelector(`#divRoot`);
|
|
@@ -2068,13 +2048,13 @@ async function loadChartFile(_scoreId = g_stateObj.scoreId) {
|
|
|
2068
2048
|
makeWarningWindow(g_msgInfoObj.E_0022);
|
|
2069
2049
|
}
|
|
2070
2050
|
}
|
|
2071
|
-
}
|
|
2051
|
+
};
|
|
2072
2052
|
|
|
2073
2053
|
/**
|
|
2074
2054
|
* 譜面をファイルで分割している場合に初期色やゲージ情報を追加取得
|
|
2075
2055
|
* @param {string} _scoreId
|
|
2076
2056
|
*/
|
|
2077
|
-
|
|
2057
|
+
const resetColorAndGauge = _scoreId => {
|
|
2078
2058
|
// 初期矢印・フリーズアロー色の再定義
|
|
2079
2059
|
if (g_stateObj.scoreLockFlg) {
|
|
2080
2060
|
Object.assign(g_rootObj, copySetColor(g_rootObj, _scoreId));
|
|
@@ -2084,7 +2064,7 @@ function resetColorAndGauge(_scoreId) {
|
|
|
2084
2064
|
// ライフ設定のカスタム部分再取得(譜面ヘッダー加味)
|
|
2085
2065
|
Object.assign(g_gaugeOptionObj, resetCustomGauge(g_rootObj, { scoreId: _scoreId }));
|
|
2086
2066
|
Object.keys(g_gaugeOptionObj.customFulls).forEach(gaugePtn => getGaugeSetting(g_rootObj, gaugePtn, g_headerObj.difLabels.length, { scoreId: _scoreId }));
|
|
2087
|
-
}
|
|
2067
|
+
};
|
|
2088
2068
|
|
|
2089
2069
|
/**
|
|
2090
2070
|
* 譜面番号固定かつ譜面ファイル分割時に初期色情報を他譜面へコピー
|
|
@@ -2092,7 +2072,7 @@ function resetColorAndGauge(_scoreId) {
|
|
|
2092
2072
|
* @param {number} _scoreId
|
|
2093
2073
|
* @returns
|
|
2094
2074
|
*/
|
|
2095
|
-
|
|
2075
|
+
const copySetColor = (_baseObj, _scoreId) => {
|
|
2096
2076
|
const obj = {};
|
|
2097
2077
|
const scoreIdHeader = setScoreIdHeader(_scoreId);
|
|
2098
2078
|
[``, `Shadow`].forEach(pattern => {
|
|
@@ -2103,27 +2083,27 @@ function copySetColor(_baseObj, _scoreId) {
|
|
|
2103
2083
|
});
|
|
2104
2084
|
});
|
|
2105
2085
|
return obj;
|
|
2106
|
-
}
|
|
2086
|
+
};
|
|
2107
2087
|
|
|
2108
2088
|
/**
|
|
2109
2089
|
* MusicUrlの基本情報を取得
|
|
2110
2090
|
* @param {number} _scoreId
|
|
2111
2091
|
* @returns
|
|
2112
2092
|
*/
|
|
2113
|
-
|
|
2093
|
+
const getMusicUrl = _scoreId => {
|
|
2114
2094
|
return g_headerObj.musicUrls !== undefined ?
|
|
2115
2095
|
g_headerObj.musicUrls[g_headerObj.musicNos[_scoreId]] ??
|
|
2116
2096
|
g_headerObj.musicUrls[0] : `nosound.mp3`;
|
|
2117
|
-
}
|
|
2097
|
+
};
|
|
2118
2098
|
|
|
2119
2099
|
/**
|
|
2120
2100
|
* 譜面ファイル読込後処理(譜面詳細情報取得用)
|
|
2121
2101
|
* @param {number} _scoreId
|
|
2122
2102
|
*/
|
|
2123
|
-
|
|
2103
|
+
const getScoreDetailData = _scoreId => {
|
|
2124
2104
|
const keyCtrlPtn = `${g_headerObj.keyLabels[_scoreId]}_0`;
|
|
2125
2105
|
storeBaseData(_scoreId, scoreConvert(g_rootObj, _scoreId, 0, ``, keyCtrlPtn, true), keyCtrlPtn);
|
|
2126
|
-
}
|
|
2106
|
+
};
|
|
2127
2107
|
|
|
2128
2108
|
/**
|
|
2129
2109
|
* 譜面詳細データの格納
|
|
@@ -2131,7 +2111,7 @@ function getScoreDetailData(_scoreId) {
|
|
|
2131
2111
|
* @param {object} _scoreObj
|
|
2132
2112
|
* @param {number} _keyCtrlPtn
|
|
2133
2113
|
*/
|
|
2134
|
-
|
|
2114
|
+
const storeBaseData = (_scoreId, _scoreObj, _keyCtrlPtn) => {
|
|
2135
2115
|
const lastFrame = getLastFrame(_scoreObj, _keyCtrlPtn) + 1;
|
|
2136
2116
|
const startFrame = getStartFrame(lastFrame, 0, _scoreId);
|
|
2137
2117
|
const firstArrowFrame = getFirstArrowFrame(_scoreObj, _keyCtrlPtn);
|
|
@@ -2161,7 +2141,7 @@ function storeBaseData(_scoreId, _scoreObj, _keyCtrlPtn) {
|
|
|
2161
2141
|
noteCnt[types[m]][j]++;
|
|
2162
2142
|
allData++;
|
|
2163
2143
|
}
|
|
2164
|
-
})
|
|
2144
|
+
});
|
|
2165
2145
|
});
|
|
2166
2146
|
fullData = fullData.concat(..._scoreObj.arrowData[j], ...tmpFrzData);
|
|
2167
2147
|
}
|
|
@@ -2197,7 +2177,7 @@ function storeBaseData(_scoreId, _scoreObj, _keyCtrlPtn) {
|
|
|
2197
2177
|
dataList.push(allData === 0 ? 0 : Math.round(_densityData[j] / allData * C_LEN_DENSITY_DIVISION * 10000) / 100);
|
|
2198
2178
|
}
|
|
2199
2179
|
return dataList;
|
|
2200
|
-
}
|
|
2180
|
+
};
|
|
2201
2181
|
const diffArray = (_array1, _array2) => {
|
|
2202
2182
|
const list = [];
|
|
2203
2183
|
_array1.forEach((val, j) => list.push(_array1[j] - _array2[j]));
|
|
@@ -2218,13 +2198,13 @@ function storeBaseData(_scoreId, _scoreObj, _keyCtrlPtn) {
|
|
|
2218
2198
|
g_detailObj.startFrame[_scoreId] = startFrame;
|
|
2219
2199
|
g_detailObj.playingFrame[_scoreId] = playingFrame;
|
|
2220
2200
|
g_detailObj.playingFrameWithBlank[_scoreId] = lastFrame - startFrame;
|
|
2221
|
-
}
|
|
2201
|
+
};
|
|
2222
2202
|
|
|
2223
2203
|
/**
|
|
2224
2204
|
* ツール計算
|
|
2225
2205
|
* @param {object} _scoreObj
|
|
2226
2206
|
*/
|
|
2227
|
-
|
|
2207
|
+
const calcLevel = _scoreObj => {
|
|
2228
2208
|
//--------------------------------------------------------------
|
|
2229
2209
|
//<フリーズデータ分解>
|
|
2230
2210
|
// フリーズデータを分解し、矢印データに組み込む
|
|
@@ -2383,14 +2363,14 @@ function calcLevel(_scoreObj) {
|
|
|
2383
2363
|
// 3つ押しリスト
|
|
2384
2364
|
push3: push3List,
|
|
2385
2365
|
};
|
|
2386
|
-
}
|
|
2366
|
+
};
|
|
2387
2367
|
|
|
2388
2368
|
/**
|
|
2389
2369
|
* 譜面ヘッダーの分解(スキン、jsファイルなどの設定)
|
|
2390
2370
|
* @param {object} _dosObj
|
|
2391
2371
|
* @returns
|
|
2392
2372
|
*/
|
|
2393
|
-
|
|
2373
|
+
const preheaderConvert = _dosObj => {
|
|
2394
2374
|
|
|
2395
2375
|
// ヘッダー群の格納先
|
|
2396
2376
|
const obj = {};
|
|
@@ -2431,13 +2411,13 @@ function preheaderConvert(_dosObj) {
|
|
|
2431
2411
|
obj.syncBackPath = setVal(_dosObj.syncBackPath ?? g_presetObj.syncBackPath, false, C_TYP_BOOLEAN);
|
|
2432
2412
|
|
|
2433
2413
|
return obj;
|
|
2434
|
-
}
|
|
2414
|
+
};
|
|
2435
2415
|
|
|
2436
2416
|
/**
|
|
2437
2417
|
* 譜面ヘッダーの分解(その他の設定)
|
|
2438
2418
|
* @param {object} _dosObj 譜面データオブジェクト
|
|
2439
2419
|
*/
|
|
2440
|
-
|
|
2420
|
+
const headerConvert = _dosObj => {
|
|
2441
2421
|
|
|
2442
2422
|
// ヘッダー群の格納先
|
|
2443
2423
|
const obj = {};
|
|
@@ -3031,30 +3011,28 @@ function headerConvert(_dosObj) {
|
|
|
3031
3011
|
});
|
|
3032
3012
|
|
|
3033
3013
|
return obj;
|
|
3034
|
-
}
|
|
3014
|
+
};
|
|
3035
3015
|
|
|
3036
3016
|
/**
|
|
3037
3017
|
* 曲名(1行)の取得
|
|
3038
3018
|
* @param {string} _musicName
|
|
3039
3019
|
*/
|
|
3040
|
-
|
|
3041
|
-
return _musicName.split(`<br>`).join(` `).split(`<nbr>`).join(``).split(`<dbr>`).join(` `);
|
|
3042
|
-
}
|
|
3020
|
+
const getMusicNameSimple = _musicName => replaceStr(_musicName, g_escapeStr.musicNameSimple);
|
|
3043
3021
|
|
|
3044
3022
|
/**
|
|
3045
3023
|
* 曲名(複数行)の取得
|
|
3046
3024
|
* @param {string} _musicName
|
|
3047
3025
|
*/
|
|
3048
|
-
|
|
3049
|
-
const tmpName = _musicName.
|
|
3026
|
+
const getMusicNameMultiLine = _musicName => {
|
|
3027
|
+
const tmpName = replaceStr(_musicName, g_escapeStr.musicNameMultiLine).split(`<br>`);
|
|
3050
3028
|
return tmpName.length === 1 ? [tmpName[0], ``] : tmpName;
|
|
3051
|
-
}
|
|
3029
|
+
};
|
|
3052
3030
|
|
|
3053
3031
|
/**
|
|
3054
3032
|
* 画像セットの入れ替え処理
|
|
3055
3033
|
* @param {array} _imgType
|
|
3056
3034
|
*/
|
|
3057
|
-
|
|
3035
|
+
const updateImgType = _imgType => {
|
|
3058
3036
|
resetImgs(_imgType.name, _imgType.extension);
|
|
3059
3037
|
reloadImgObj();
|
|
3060
3038
|
Object.keys(g_imgObj).forEach(key => g_imgObj[key] = `${g_rootPath}${g_imgObj[key]}`);
|
|
@@ -3064,15 +3042,15 @@ function updateImgType(_imgType) {
|
|
|
3064
3042
|
if (!g_isFile) {
|
|
3065
3043
|
g_imgInitList.forEach(img => preloadFile(`image`, g_imgObj[img]));
|
|
3066
3044
|
}
|
|
3067
|
-
}
|
|
3045
|
+
};
|
|
3068
3046
|
|
|
3069
3047
|
/**
|
|
3070
3048
|
* ゲージ設定リストへの追加
|
|
3071
3049
|
* @param {object} _obj
|
|
3072
3050
|
*/
|
|
3073
|
-
|
|
3051
|
+
const addGaugeFulls = _obj => {
|
|
3074
3052
|
_obj.map(key => g_gaugeOptionObj.customFulls[key] = false);
|
|
3075
|
-
}
|
|
3053
|
+
};
|
|
3076
3054
|
|
|
3077
3055
|
/**
|
|
3078
3056
|
* 矢印・フリーズアロー色のデータ変換
|
|
@@ -3081,7 +3059,7 @@ function addGaugeFulls(_obj) {
|
|
|
3081
3059
|
* @param {object} objectList
|
|
3082
3060
|
* @returns オブジェクト ※Object.assign(obj, resetBaseColorList(...))の形で呼び出しが必要
|
|
3083
3061
|
*/
|
|
3084
|
-
|
|
3062
|
+
const resetBaseColorList = (_baseObj, _dosObj, { scoreId = `` } = {}) => {
|
|
3085
3063
|
|
|
3086
3064
|
const obj = {};
|
|
3087
3065
|
const scoreIdHeader = setScoreIdHeader(scoreId);
|
|
@@ -3141,7 +3119,7 @@ function resetBaseColorList(_baseObj, _dosObj, { scoreId = `` } = {}) {
|
|
|
3141
3119
|
});
|
|
3142
3120
|
|
|
3143
3121
|
return obj;
|
|
3144
|
-
}
|
|
3122
|
+
};
|
|
3145
3123
|
|
|
3146
3124
|
/**
|
|
3147
3125
|
* 矢印・フリーズアロー色のデータ展開
|
|
@@ -3150,9 +3128,9 @@ function resetBaseColorList(_baseObj, _dosObj, { scoreId = `` } = {}) {
|
|
|
3150
3128
|
* @param {number} _colorInitLength
|
|
3151
3129
|
* @param {object} objectList
|
|
3152
3130
|
*/
|
|
3153
|
-
|
|
3131
|
+
const setColorList = (_data, _colorInit, _colorInitLength,
|
|
3154
3132
|
{ _defaultColorgrd = g_headerObj.defaultColorgrd, _colorCdPaddingUse = false,
|
|
3155
|
-
_defaultFrzColorUse = true, _objType = `normal`, _shadowFlg = false } = {}) {
|
|
3133
|
+
_defaultFrzColorUse = true, _objType = `normal`, _shadowFlg = false } = {}) => {
|
|
3156
3134
|
|
|
3157
3135
|
// グラデーション文字列 #ffff99:#9999ff@linear-gradient
|
|
3158
3136
|
let colorStr = [];
|
|
@@ -3212,7 +3190,7 @@ function setColorList(_data, _colorInit, _colorInitLength,
|
|
|
3212
3190
|
}
|
|
3213
3191
|
|
|
3214
3192
|
return [colorList, colorStr, colorOrg];
|
|
3215
|
-
}
|
|
3193
|
+
};
|
|
3216
3194
|
|
|
3217
3195
|
/**
|
|
3218
3196
|
* 複合カスタムゲージの定義設定
|
|
@@ -3221,7 +3199,7 @@ function setColorList(_data, _colorInit, _colorInitLength,
|
|
|
3221
3199
|
* @param {object} objectList
|
|
3222
3200
|
* @returns オブジェクト ※Object.assign(obj, resetCustomGauge(...))の形で呼び出しが必要
|
|
3223
3201
|
*/
|
|
3224
|
-
|
|
3202
|
+
const resetCustomGauge = (_dosObj, { scoreId = 0 } = {}) => {
|
|
3225
3203
|
|
|
3226
3204
|
const obj = {};
|
|
3227
3205
|
const scoreIdHeader = setScoreIdHeader(scoreId, g_stateObj.scoreLockFlg);
|
|
@@ -3253,7 +3231,7 @@ function resetCustomGauge(_dosObj, { scoreId = 0 } = {}) {
|
|
|
3253
3231
|
}
|
|
3254
3232
|
}
|
|
3255
3233
|
return obj;
|
|
3256
|
-
}
|
|
3234
|
+
};
|
|
3257
3235
|
|
|
3258
3236
|
/**
|
|
3259
3237
|
* ゲージ別個別設定の取得
|
|
@@ -3262,7 +3240,7 @@ function resetCustomGauge(_dosObj, { scoreId = 0 } = {}) {
|
|
|
3262
3240
|
* @param {number} _difLength
|
|
3263
3241
|
* @param {object} objectList
|
|
3264
3242
|
*/
|
|
3265
|
-
|
|
3243
|
+
const getGaugeSetting = (_dosObj, _name, _difLength, { scoreId = 0 } = {}) => {
|
|
3266
3244
|
|
|
3267
3245
|
const obj = {
|
|
3268
3246
|
lifeBorders: [],
|
|
@@ -3349,7 +3327,7 @@ function getGaugeSetting(_dosObj, _name, _difLength, { scoreId = 0 } = {}) {
|
|
|
3349
3327
|
if (gaugeCreateFlg) {
|
|
3350
3328
|
g_gaugeOptionObj[`gauge${_name}s`] = obj;
|
|
3351
3329
|
}
|
|
3352
|
-
}
|
|
3330
|
+
};
|
|
3353
3331
|
|
|
3354
3332
|
/**
|
|
3355
3333
|
* キー名の取得
|
|
@@ -3362,7 +3340,7 @@ const getKeyName = _key => hasVal(g_keyObj[`keyName${_key}`]) ? g_keyObj[`keyNam
|
|
|
3362
3340
|
* 一時的な追加キーの設定
|
|
3363
3341
|
* @param {object} _dosObj
|
|
3364
3342
|
*/
|
|
3365
|
-
|
|
3343
|
+
const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) } = {}) => {
|
|
3366
3344
|
|
|
3367
3345
|
if (keyExtraList === undefined) {
|
|
3368
3346
|
return [];
|
|
@@ -3441,7 +3419,7 @@ function keysConvert(_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3441
3419
|
if (!hasVal(tmpParams[k])) {
|
|
3442
3420
|
continue;
|
|
3443
3421
|
}
|
|
3444
|
-
g_keyObj[pairName] = {}
|
|
3422
|
+
g_keyObj[pairName] = {}
|
|
3445
3423
|
if (g_keyObj[`${_pairName}${tmpParams[k]}`] !== undefined) {
|
|
3446
3424
|
Object.assign(g_keyObj[pairName], g_keyObj[`${_pairName}${tmpParams[k]}`]);
|
|
3447
3425
|
} else {
|
|
@@ -3562,7 +3540,7 @@ function keysConvert(_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3562
3540
|
});
|
|
3563
3541
|
|
|
3564
3542
|
return keyExtraList;
|
|
3565
|
-
}
|
|
3543
|
+
};
|
|
3566
3544
|
|
|
3567
3545
|
/*-----------------------------------------------------------*/
|
|
3568
3546
|
/* Scene : TITLE [melon] */
|
|
@@ -3571,7 +3549,7 @@ function keysConvert(_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3571
3549
|
/**
|
|
3572
3550
|
* タイトル画面初期化
|
|
3573
3551
|
*/
|
|
3574
|
-
|
|
3552
|
+
const titleInit = _ => {
|
|
3575
3553
|
|
|
3576
3554
|
clearWindow(true);
|
|
3577
3555
|
g_currentPage = `title`;
|
|
@@ -3843,7 +3821,7 @@ function titleInit() {
|
|
|
3843
3821
|
/**
|
|
3844
3822
|
* タイトルのモーション設定
|
|
3845
3823
|
*/
|
|
3846
|
-
|
|
3824
|
+
const flowTitleTimeline = _ => {
|
|
3847
3825
|
|
|
3848
3826
|
// ユーザカスタムイベント(フレーム毎)
|
|
3849
3827
|
g_customJsObj.titleEnterFrame.forEach(func => func());
|
|
@@ -3858,7 +3836,7 @@ function titleInit() {
|
|
|
3858
3836
|
g_scoreObj.backTitleFrameNum++;
|
|
3859
3837
|
g_scoreObj.maskTitleFrameNum++;
|
|
3860
3838
|
g_timeoutEvtTitleId = setTimeout(_ => flowTitleTimeline(), 1000 / g_fps - buffTime);
|
|
3861
|
-
}
|
|
3839
|
+
};
|
|
3862
3840
|
|
|
3863
3841
|
g_timeoutEvtTitleId = setTimeout(_ => flowTitleTimeline(), 1000 / g_fps);
|
|
3864
3842
|
|
|
@@ -3869,14 +3847,14 @@ function titleInit() {
|
|
|
3869
3847
|
divRoot.oncontextmenu = _ => false;
|
|
3870
3848
|
|
|
3871
3849
|
g_skinJsObj.title.forEach(func => func());
|
|
3872
|
-
}
|
|
3850
|
+
};
|
|
3873
3851
|
|
|
3874
3852
|
/**
|
|
3875
3853
|
* 警告用ウィンドウ(汎用)を表示
|
|
3876
3854
|
* @param {string} _text
|
|
3877
3855
|
* @param {object} _options resetFlg: 警告リストをクリアして再作成, backBtnUse: Backボタンを付与
|
|
3878
3856
|
*/
|
|
3879
|
-
|
|
3857
|
+
const makeWarningWindow = (_text = ``, { resetFlg = false, backBtnUse = false } = {}) => {
|
|
3880
3858
|
const displayName = (g_currentPage === `initial` ? `title` : g_currentPage);
|
|
3881
3859
|
if (_text !== ``) {
|
|
3882
3860
|
if (resetFlg) {
|
|
@@ -3895,13 +3873,13 @@ function makeWarningWindow(_text = ``, { resetFlg = false, backBtnUse = false }
|
|
|
3895
3873
|
resetFunc: _ => titleInit(),
|
|
3896
3874
|
}, g_cssObj.button_Back));
|
|
3897
3875
|
}
|
|
3898
|
-
}
|
|
3876
|
+
};
|
|
3899
3877
|
|
|
3900
3878
|
/**
|
|
3901
3879
|
* お知らせウィンドウ(汎用)を表示
|
|
3902
3880
|
* @param {string} _text
|
|
3903
3881
|
*/
|
|
3904
|
-
|
|
3882
|
+
const makeInfoWindow = (_text, _animationName = ``, _backColor = `#ccccff`) => {
|
|
3905
3883
|
const lblWarning = setWindowStyle(`<p>${_text}</p>`, _backColor, `#000066`, C_ALIGN_CENTER);
|
|
3906
3884
|
lblWarning.style.pointerEvents = C_DIS_NONE;
|
|
3907
3885
|
|
|
@@ -3912,7 +3890,7 @@ function makeInfoWindow(_text, _animationName = ``, _backColor = `#ccccff`) {
|
|
|
3912
3890
|
lblWarning.style.animationTimingFunction = `cubic-bezier(1.000, 0.000, 0.000, 1.000)`;
|
|
3913
3891
|
}
|
|
3914
3892
|
divRoot.appendChild(lblWarning);
|
|
3915
|
-
}
|
|
3893
|
+
};
|
|
3916
3894
|
|
|
3917
3895
|
/**
|
|
3918
3896
|
* 警告ウィンドウのスタイル設定
|
|
@@ -3921,7 +3899,7 @@ function makeInfoWindow(_text, _animationName = ``, _backColor = `#ccccff`) {
|
|
|
3921
3899
|
* @param {string} _textColor
|
|
3922
3900
|
* @param {string} _align
|
|
3923
3901
|
*/
|
|
3924
|
-
|
|
3902
|
+
const setWindowStyle = (_text, _bkColor, _textColor, _align = C_ALIGN_LEFT) => {
|
|
3925
3903
|
|
|
3926
3904
|
if (document.querySelector(`#lblWarning`) !== null) {
|
|
3927
3905
|
divRoot.removeChild(lblWarning);
|
|
@@ -3950,7 +3928,7 @@ function setWindowStyle(_text, _bkColor, _textColor, _align = C_ALIGN_LEFT) {
|
|
|
3950
3928
|
divRoot.removeChild(tmplbl);
|
|
3951
3929
|
|
|
3952
3930
|
return lbl;
|
|
3953
|
-
}
|
|
3931
|
+
};
|
|
3954
3932
|
|
|
3955
3933
|
|
|
3956
3934
|
/*-----------------------------------------------------------*/
|
|
@@ -4011,7 +3989,7 @@ const makePlayButton = _func => {
|
|
|
4011
3989
|
/**
|
|
4012
3990
|
* 設定・オプション画面初期化
|
|
4013
3991
|
*/
|
|
4014
|
-
|
|
3992
|
+
const optionInit = _ => {
|
|
4015
3993
|
|
|
4016
3994
|
clearWindow(true);
|
|
4017
3995
|
const divRoot = document.querySelector(`#divRoot`);
|
|
@@ -4037,13 +4015,13 @@ function optionInit() {
|
|
|
4037
4015
|
g_initialFlg = true;
|
|
4038
4016
|
|
|
4039
4017
|
g_skinJsObj.option.forEach(func => func());
|
|
4040
|
-
}
|
|
4018
|
+
};
|
|
4041
4019
|
|
|
4042
4020
|
/**
|
|
4043
4021
|
* 設定画面用スプライトリストの作成
|
|
4044
4022
|
* @param {array} _settingList (設定名、縦位置、縦位置差分、幅差分、高さ差分)を設定別にリスト化
|
|
4045
4023
|
*/
|
|
4046
|
-
|
|
4024
|
+
const setSpriteList = _settingList => {
|
|
4047
4025
|
const optionWidth = (g_sWidth - 450) / 2;
|
|
4048
4026
|
const spriteList = [];
|
|
4049
4027
|
_settingList.forEach(setting => {
|
|
@@ -4053,7 +4031,7 @@ function setSpriteList(_settingList) {
|
|
|
4053
4031
|
});
|
|
4054
4032
|
});
|
|
4055
4033
|
return spriteList;
|
|
4056
|
-
}
|
|
4034
|
+
};
|
|
4057
4035
|
|
|
4058
4036
|
/**
|
|
4059
4037
|
* 設定ウィンドウの作成
|
|
@@ -4074,13 +4052,13 @@ const inputSlider = (_slider, _link) => {
|
|
|
4074
4052
|
const value = parseInt(_slider.value);
|
|
4075
4053
|
_link.textContent = `${value}${g_lblNameObj.percent}`;
|
|
4076
4054
|
return value;
|
|
4077
|
-
}
|
|
4055
|
+
};
|
|
4078
4056
|
|
|
4079
4057
|
/**
|
|
4080
4058
|
* 設定・オプション画面のラベル・ボタン処理の描画
|
|
4081
4059
|
* @param {Object} _sprite 基準とするスプライト(ここで指定する座標は、そのスプライトからの相対位置)
|
|
4082
4060
|
*/
|
|
4083
|
-
|
|
4061
|
+
const createOptionWindow = _sprite => {
|
|
4084
4062
|
|
|
4085
4063
|
// 各ボタン用のスプライトを作成
|
|
4086
4064
|
const optionsprite = createOptionSprite(_sprite);
|
|
@@ -4267,6 +4245,34 @@ function createOptionWindow(_sprite) {
|
|
|
4267
4245
|
unitName: ` ${g_lblNameObj.multi}`,
|
|
4268
4246
|
});
|
|
4269
4247
|
|
|
4248
|
+
/**
|
|
4249
|
+
* 譜面明細子画面・グラフの作成
|
|
4250
|
+
* @param {string} _name
|
|
4251
|
+
* @param {boolean} _graphUseFlg
|
|
4252
|
+
*/
|
|
4253
|
+
const createScoreDetail = (_name, _graphUseFlg = true) => {
|
|
4254
|
+
const detailObj = createEmptySprite(scoreDetail, `detail${_name}`, { w: 420, h: 230, visibility: `hidden` });
|
|
4255
|
+
|
|
4256
|
+
if (_graphUseFlg) {
|
|
4257
|
+
const graphObj = document.createElement(`canvas`);
|
|
4258
|
+
const textBaseObj = document.querySelector(`#lnkDifficulty`);
|
|
4259
|
+
const bkColor = window.getComputedStyle(textBaseObj, ``).backgroundColor;
|
|
4260
|
+
|
|
4261
|
+
graphObj.id = `graph${_name}`;
|
|
4262
|
+
graphObj.width = C_LEN_GRAPH_WIDTH;
|
|
4263
|
+
graphObj.height = C_LEN_GRAPH_HEIGHT;
|
|
4264
|
+
graphObj.style.left = `125px`;
|
|
4265
|
+
graphObj.style.top = `0px`;
|
|
4266
|
+
graphObj.style.position = `absolute`;
|
|
4267
|
+
graphObj.style.background = bkColor;
|
|
4268
|
+
graphObj.style.border = `dotted 2px`;
|
|
4269
|
+
|
|
4270
|
+
detailObj.appendChild(graphObj);
|
|
4271
|
+
}
|
|
4272
|
+
|
|
4273
|
+
return detailObj;
|
|
4274
|
+
};
|
|
4275
|
+
|
|
4270
4276
|
if (g_headerObj.scoreDetailUse) {
|
|
4271
4277
|
spriteList.speed.appendChild(
|
|
4272
4278
|
createCss2Button(`btnGraph`, `i`, _ => true, {
|
|
@@ -4292,7 +4298,7 @@ function createOptionWindow(_sprite) {
|
|
|
4292
4298
|
setSetting(_val, `scoreDetail`);
|
|
4293
4299
|
viewScText();
|
|
4294
4300
|
$id(`detail${g_stateObj.scoreDetail}`).visibility = `visible`;
|
|
4295
|
-
}
|
|
4301
|
+
}
|
|
4296
4302
|
|
|
4297
4303
|
multiAppend(scoreDetail,
|
|
4298
4304
|
createScoreDetail(`Speed`),
|
|
@@ -4309,38 +4315,10 @@ function createOptionWindow(_sprite) {
|
|
|
4309
4315
|
viewScText();
|
|
4310
4316
|
}
|
|
4311
4317
|
|
|
4312
|
-
/**
|
|
4313
|
-
* 譜面明細子画面・グラフの作成
|
|
4314
|
-
* @param {string} _name
|
|
4315
|
-
* @param {boolean} _graphUseFlg
|
|
4316
|
-
*/
|
|
4317
|
-
function createScoreDetail(_name, _graphUseFlg = true) {
|
|
4318
|
-
const detailObj = createEmptySprite(scoreDetail, `detail${_name}`, { w: 420, h: 230, visibility: `hidden` });
|
|
4319
|
-
|
|
4320
|
-
if (_graphUseFlg) {
|
|
4321
|
-
const graphObj = document.createElement(`canvas`);
|
|
4322
|
-
const textBaseObj = document.querySelector(`#lnkDifficulty`);
|
|
4323
|
-
const bkColor = window.getComputedStyle(textBaseObj, ``).backgroundColor;
|
|
4324
|
-
|
|
4325
|
-
graphObj.id = `graph${_name}`;
|
|
4326
|
-
graphObj.width = C_LEN_GRAPH_WIDTH;
|
|
4327
|
-
graphObj.height = C_LEN_GRAPH_HEIGHT;
|
|
4328
|
-
graphObj.style.left = `125px`;
|
|
4329
|
-
graphObj.style.top = `0px`;
|
|
4330
|
-
graphObj.style.position = `absolute`;
|
|
4331
|
-
graphObj.style.background = bkColor;
|
|
4332
|
-
graphObj.style.border = `dotted 2px`;
|
|
4333
|
-
|
|
4334
|
-
detailObj.appendChild(graphObj);
|
|
4335
|
-
}
|
|
4336
|
-
|
|
4337
|
-
return detailObj;
|
|
4338
|
-
}
|
|
4339
|
-
|
|
4340
4318
|
/**
|
|
4341
4319
|
* 譜面明細表示/非表示ボタンの処理
|
|
4342
4320
|
*/
|
|
4343
|
-
|
|
4321
|
+
const setScoreDetail = _ => {
|
|
4344
4322
|
const scoreDetail = document.querySelector(`#scoreDetail`);
|
|
4345
4323
|
const detailObj = document.querySelector(`#detail${g_stateObj.scoreDetail}`);
|
|
4346
4324
|
const visibles = [`hidden`, `visible`];
|
|
@@ -4348,13 +4326,13 @@ function createOptionWindow(_sprite) {
|
|
|
4348
4326
|
g_stateObj.scoreDetailViewFlg = !g_stateObj.scoreDetailViewFlg;
|
|
4349
4327
|
scoreDetail.style.visibility = visibles[Number(g_stateObj.scoreDetailViewFlg)];
|
|
4350
4328
|
detailObj.style.visibility = visibles[Number(g_stateObj.scoreDetailViewFlg)];
|
|
4351
|
-
}
|
|
4329
|
+
};
|
|
4352
4330
|
|
|
4353
4331
|
/**
|
|
4354
4332
|
* 譜面基礎データの取得
|
|
4355
4333
|
* @param {number} _scoreId
|
|
4356
4334
|
*/
|
|
4357
|
-
|
|
4335
|
+
const getScoreBaseData = _scoreId => {
|
|
4358
4336
|
const arrowCnts = sumData(g_detailObj.arrowCnt[_scoreId]);
|
|
4359
4337
|
const frzCnts = sumData(g_detailObj.frzCnt[_scoreId]);
|
|
4360
4338
|
return {
|
|
@@ -4363,13 +4341,13 @@ function createOptionWindow(_sprite) {
|
|
|
4363
4341
|
apm: Math.round((arrowCnts + frzCnts) / (g_detailObj.playingFrame[_scoreId] / g_fps / 60)),
|
|
4364
4342
|
playingTime: transFrameToTimer(g_detailObj.playingFrame[_scoreId]),
|
|
4365
4343
|
};
|
|
4366
|
-
}
|
|
4344
|
+
};
|
|
4367
4345
|
|
|
4368
4346
|
/**
|
|
4369
4347
|
* 速度変化グラフの描画
|
|
4370
4348
|
* @param {number} _scoreId
|
|
4371
4349
|
*/
|
|
4372
|
-
|
|
4350
|
+
const drawSpeedGraph = _scoreId => {
|
|
4373
4351
|
const startFrame = g_detailObj.startFrame[_scoreId];
|
|
4374
4352
|
const playingFrame = g_detailObj.playingFrameWithBlank[_scoreId];
|
|
4375
4353
|
const speedObj = {
|
|
@@ -4426,13 +4404,13 @@ function createOptionWindow(_sprite) {
|
|
|
4426
4404
|
|
|
4427
4405
|
updateScoreDetailLabel(`Speed`, g_lblNameObj[`s_${speedType}`], speedObj[speedType].cnt, j);
|
|
4428
4406
|
});
|
|
4429
|
-
}
|
|
4407
|
+
};
|
|
4430
4408
|
|
|
4431
4409
|
/**
|
|
4432
4410
|
* 譜面密度グラフの描画
|
|
4433
4411
|
* @param {number} _scoreId
|
|
4434
4412
|
*/
|
|
4435
|
-
|
|
4413
|
+
const drawDensityGraph = _scoreId => {
|
|
4436
4414
|
|
|
4437
4415
|
const canvas = document.querySelector(`#graphDensity`);
|
|
4438
4416
|
const context = canvas.getContext(`2d`);
|
|
@@ -4468,7 +4446,7 @@ function createOptionWindow(_sprite) {
|
|
|
4468
4446
|
updateScoreDetailLabel(`Density`, g_lblNameObj.s_time, obj.playingTime, 1);
|
|
4469
4447
|
updateScoreDetailLabel(`Density`, g_lblNameObj.s_arrow, obj.arrowCnts, 3);
|
|
4470
4448
|
updateScoreDetailLabel(`Density`, g_lblNameObj.s_frz, obj.frzCnts, 4);
|
|
4471
|
-
}
|
|
4449
|
+
};
|
|
4472
4450
|
|
|
4473
4451
|
/**
|
|
4474
4452
|
* 譜面明細内の補足情報の登録・更新
|
|
@@ -4478,28 +4456,27 @@ function createOptionWindow(_sprite) {
|
|
|
4478
4456
|
* @param {number} _pos 表示位置
|
|
4479
4457
|
* @param {string} _labelname
|
|
4480
4458
|
*/
|
|
4481
|
-
|
|
4482
|
-
const baseLabel = (_bLabel, _bLabelname, _bAlign) =>
|
|
4459
|
+
const updateScoreDetailLabel = (_name, _label, _value, _pos = 0, _labelname = _label) => {
|
|
4460
|
+
const baseLabel = (_bLabel, _bLabelname, _bAlign) =>
|
|
4483
4461
|
document.querySelector(`#detail${_name}`).appendChild(
|
|
4484
4462
|
createDivCss2Label(`${_bLabel}`, `${_bLabelname}`, {
|
|
4485
4463
|
x: 10, y: 65 + _pos * 20, w: 100, h: 20, siz: C_SIZ_DIFSELECTOR, align: _bAlign,
|
|
4486
4464
|
})
|
|
4487
4465
|
);
|
|
4488
|
-
};
|
|
4489
4466
|
if (document.querySelector(`#data${_label}`) === null) {
|
|
4490
4467
|
baseLabel(`lbl${_label}`, `${_labelname}`, C_ALIGN_LEFT);
|
|
4491
4468
|
baseLabel(`data${_label}`, `${_value}`, C_ALIGN_RIGHT);
|
|
4492
4469
|
} else {
|
|
4493
4470
|
document.querySelector(`#data${_label}`).textContent = `${_value}`;
|
|
4494
4471
|
}
|
|
4495
|
-
}
|
|
4472
|
+
};
|
|
4496
4473
|
|
|
4497
4474
|
/**
|
|
4498
4475
|
* グラフの縦軸を描画
|
|
4499
4476
|
* @param {object} _context
|
|
4500
4477
|
* @param {number} _resolution
|
|
4501
4478
|
*/
|
|
4502
|
-
|
|
4479
|
+
const drawBaseLine = (_context, _resolution = 10) => {
|
|
4503
4480
|
_context.clearRect(0, 0, C_LEN_GRAPH_WIDTH, C_LEN_GRAPH_HEIGHT);
|
|
4504
4481
|
|
|
4505
4482
|
for (let j = 0; j <= 2 * _resolution; j += 5) {
|
|
@@ -4508,7 +4485,7 @@ function createOptionWindow(_sprite) {
|
|
|
4508
4485
|
drawLine(_context, (j + k) / _resolution, `sub`, 2);
|
|
4509
4486
|
}
|
|
4510
4487
|
}
|
|
4511
|
-
}
|
|
4488
|
+
};
|
|
4512
4489
|
|
|
4513
4490
|
/**
|
|
4514
4491
|
* グラフ上に目盛を表示
|
|
@@ -4517,7 +4494,7 @@ function createOptionWindow(_sprite) {
|
|
|
4517
4494
|
* @param {string} _lineType
|
|
4518
4495
|
* @param {number} _fixed
|
|
4519
4496
|
*/
|
|
4520
|
-
|
|
4497
|
+
const drawLine = (_context, _y, _lineType, _fixed = 0) => {
|
|
4521
4498
|
const lineY = (_y - 1) * -90 + 105;
|
|
4522
4499
|
_context.beginPath();
|
|
4523
4500
|
_context.moveTo(30, lineY);
|
|
@@ -4535,13 +4512,13 @@ function createOptionWindow(_sprite) {
|
|
|
4535
4512
|
_context.strokeStyle = `#646464`;
|
|
4536
4513
|
}
|
|
4537
4514
|
_context.stroke();
|
|
4538
|
-
}
|
|
4515
|
+
};
|
|
4539
4516
|
|
|
4540
4517
|
/**
|
|
4541
4518
|
* 譜面の難易度情報用ラベル作成
|
|
4542
4519
|
* @param {number} _scoreId
|
|
4543
4520
|
*/
|
|
4544
|
-
|
|
4521
|
+
const makeDifInfoLabels = _scoreId => {
|
|
4545
4522
|
|
|
4546
4523
|
// ツール難易度
|
|
4547
4524
|
const detailToolDif = document.querySelector(`#detailToolDif`);
|
|
@@ -4599,13 +4576,13 @@ function createOptionWindow(_sprite) {
|
|
|
4599
4576
|
}, g_cssObj.button_RevON),
|
|
4600
4577
|
);
|
|
4601
4578
|
createScText(lnkDifInfo, `DifInfo`, { targetLabel: `lnkDifInfo`, x: -10 });
|
|
4602
|
-
}
|
|
4579
|
+
};
|
|
4603
4580
|
|
|
4604
4581
|
/**
|
|
4605
4582
|
* 譜面の難易度情報更新
|
|
4606
4583
|
* @param {number} _scoreId
|
|
4607
4584
|
*/
|
|
4608
|
-
|
|
4585
|
+
const makeDifInfo = _scoreId => {
|
|
4609
4586
|
|
|
4610
4587
|
const arrowCnts = sumData(g_detailObj.arrowCnt[_scoreId]);
|
|
4611
4588
|
const frzCnts = sumData(g_detailObj.frzCnt[_scoreId]);
|
|
@@ -4622,7 +4599,7 @@ function createOptionWindow(_sprite) {
|
|
|
4622
4599
|
dataArrowInfo2.innerHTML = `<br>(${g_detailObj.arrowCnt[_scoreId]})<br><br>
|
|
4623
4600
|
(${g_detailObj.frzCnt[_scoreId]})<br><br>
|
|
4624
4601
|
${push3CntStr}`.split(`,`).join(`/`);
|
|
4625
|
-
}
|
|
4602
|
+
};
|
|
4626
4603
|
|
|
4627
4604
|
// ---------------------------------------------------
|
|
4628
4605
|
// 速度モーション (Motion)
|
|
@@ -4658,17 +4635,17 @@ function createOptionWindow(_sprite) {
|
|
|
4658
4635
|
spriteList.scroll.style.pointerEvents = C_DIS_NONE;
|
|
4659
4636
|
}
|
|
4660
4637
|
|
|
4661
|
-
|
|
4638
|
+
const setReverse = _btn => {
|
|
4662
4639
|
g_settings.reverseNum = (g_settings.reverseNum + 1) % 2;
|
|
4663
4640
|
g_stateObj.reverse = g_settings.reverses[g_settings.reverseNum];
|
|
4664
4641
|
setReverseView(_btn);
|
|
4665
|
-
}
|
|
4642
|
+
};
|
|
4666
4643
|
|
|
4667
|
-
|
|
4644
|
+
const setReverseView = _btn => {
|
|
4668
4645
|
_btn.classList.replace(g_cssObj[`button_Rev${g_settings.reverses[(g_settings.reverseNum + 1) % 2]}`],
|
|
4669
4646
|
g_cssObj[`button_Rev${g_settings.reverses[g_settings.reverseNum]}`]);
|
|
4670
4647
|
_btn.textContent = `${g_lblNameObj.Reverse}:${getStgDetailName(g_stateObj.reverse)}`;
|
|
4671
|
-
}
|
|
4648
|
+
};
|
|
4672
4649
|
|
|
4673
4650
|
// ---------------------------------------------------
|
|
4674
4651
|
// ミラー・ランダム (Shuffle)
|
|
@@ -4693,23 +4670,11 @@ function createOptionWindow(_sprite) {
|
|
|
4693
4670
|
})
|
|
4694
4671
|
);
|
|
4695
4672
|
|
|
4696
|
-
if (g_headerObj.gaugeUse) {
|
|
4697
|
-
multiAppend(spriteList.gauge,
|
|
4698
|
-
makeSettingLblCssButton(`lnkGauge`, ``, 0, _ => setGauge(1), { cxtFunc: _ => setGauge(-1) }),
|
|
4699
|
-
makeMiniCssButton(`lnkGauge`, `R`, 0, _ => setGauge(1)),
|
|
4700
|
-
makeMiniCssButton(`lnkGauge`, `L`, 0, _ => setGauge(-1)),
|
|
4701
|
-
);
|
|
4702
|
-
createScText(spriteList.gauge, `Gauge`);
|
|
4703
|
-
} else {
|
|
4704
|
-
lblGauge.classList.add(g_cssObj.settings_Disabled);
|
|
4705
|
-
spriteList.gauge.appendChild(makeDisabledLabel(`lnkGauge`, 0, getStgDetailName(g_stateObj.gauge)));
|
|
4706
|
-
}
|
|
4707
|
-
|
|
4708
4673
|
/**
|
|
4709
4674
|
* ゲージ設定メイン
|
|
4710
4675
|
* @param {number} _scrollNum
|
|
4711
4676
|
*/
|
|
4712
|
-
|
|
4677
|
+
const setGauge = _scrollNum => {
|
|
4713
4678
|
|
|
4714
4679
|
// カーソルを動かさない場合は先にゲージ設定をリロード
|
|
4715
4680
|
if (_scrollNum === 0) {
|
|
@@ -4723,13 +4688,13 @@ function createOptionWindow(_sprite) {
|
|
|
4723
4688
|
}
|
|
4724
4689
|
lblGauge2.innerHTML = gaugeFormat(g_stateObj.lifeMode,
|
|
4725
4690
|
g_stateObj.lifeBorder, g_stateObj.lifeRcv, g_stateObj.lifeDmg, g_stateObj.lifeInit, g_stateObj.lifeVariable);
|
|
4726
|
-
}
|
|
4691
|
+
};
|
|
4727
4692
|
|
|
4728
4693
|
/**
|
|
4729
4694
|
* ゲージ設定の切替処理
|
|
4730
4695
|
* @param {number} _gaugeNum
|
|
4731
4696
|
*/
|
|
4732
|
-
|
|
4697
|
+
const gaugeChange = _gaugeNum => {
|
|
4733
4698
|
const tmpScoreId = g_stateObj.scoreId;
|
|
4734
4699
|
|
|
4735
4700
|
/**
|
|
@@ -4810,12 +4775,12 @@ function createOptionWindow(_sprite) {
|
|
|
4810
4775
|
}
|
|
4811
4776
|
setLifeCategory(tmpGaugeObj);
|
|
4812
4777
|
}
|
|
4813
|
-
}
|
|
4778
|
+
};
|
|
4814
4779
|
|
|
4815
4780
|
/**
|
|
4816
4781
|
* ゲージ設定の詳細表示を整形
|
|
4817
4782
|
*/
|
|
4818
|
-
|
|
4783
|
+
const gaugeFormat = (_mode, _border, _rcv, _dmg, _init, _lifeValFlg) => {
|
|
4819
4784
|
const initVal = g_headerObj.maxLifeVal * _init / 100;
|
|
4820
4785
|
const borderVal = (_mode === C_LFE_BORDER && _border !== 0 ?
|
|
4821
4786
|
Math.round(g_headerObj.maxLifeVal * _border / 100) : `-`);
|
|
@@ -4862,6 +4827,18 @@ function createOptionWindow(_sprite) {
|
|
|
4862
4827
|
</div>
|
|
4863
4828
|
</div>
|
|
4864
4829
|
`;
|
|
4830
|
+
};
|
|
4831
|
+
|
|
4832
|
+
if (g_headerObj.gaugeUse) {
|
|
4833
|
+
multiAppend(spriteList.gauge,
|
|
4834
|
+
makeSettingLblCssButton(`lnkGauge`, ``, 0, _ => setGauge(1), { cxtFunc: _ => setGauge(-1) }),
|
|
4835
|
+
makeMiniCssButton(`lnkGauge`, `R`, 0, _ => setGauge(1)),
|
|
4836
|
+
makeMiniCssButton(`lnkGauge`, `L`, 0, _ => setGauge(-1)),
|
|
4837
|
+
);
|
|
4838
|
+
createScText(spriteList.gauge, `Gauge`);
|
|
4839
|
+
} else {
|
|
4840
|
+
lblGauge.classList.add(g_cssObj.settings_Disabled);
|
|
4841
|
+
spriteList.gauge.appendChild(makeDisabledLabel(`lnkGauge`, 0, getStgDetailName(g_stateObj.gauge)));
|
|
4865
4842
|
}
|
|
4866
4843
|
|
|
4867
4844
|
// ---------------------------------------------------
|
|
@@ -4919,7 +4896,7 @@ function createOptionWindow(_sprite) {
|
|
|
4919
4896
|
* - [キーコン]->[初期化]->[名称設定]の順に配置する。
|
|
4920
4897
|
* 初期化処理にてキー数関連の設定を行っているため、この順序で無いとデータが正しく格納されない
|
|
4921
4898
|
*/
|
|
4922
|
-
|
|
4899
|
+
const setDifficulty = (_initFlg) => {
|
|
4923
4900
|
|
|
4924
4901
|
const getCurrentNo = (_list, _target) => roundZero(_list.findIndex(item => item === _target));
|
|
4925
4902
|
|
|
@@ -5073,12 +5050,12 @@ function createOptionWindow(_sprite) {
|
|
|
5073
5050
|
// ---------------------------------------------------
|
|
5074
5051
|
// 4. 譜面初期情報ロード許可フラグの設定
|
|
5075
5052
|
g_canLoadDifInfoFlg = true;
|
|
5076
|
-
}
|
|
5053
|
+
};
|
|
5077
5054
|
|
|
5078
5055
|
// 設定画面の一通りのオブジェクトを作成後に譜面・速度・ゲージ設定をまとめて行う
|
|
5079
5056
|
setDifficulty(false);
|
|
5080
5057
|
optionsprite.oncontextmenu = _ => false;
|
|
5081
|
-
}
|
|
5058
|
+
};
|
|
5082
5059
|
|
|
5083
5060
|
/**
|
|
5084
5061
|
* 汎用設定
|
|
@@ -5086,9 +5063,9 @@ function createOptionWindow(_sprite) {
|
|
|
5086
5063
|
* @param {string} _settingName
|
|
5087
5064
|
* @param {object} _options
|
|
5088
5065
|
*/
|
|
5089
|
-
|
|
5066
|
+
const createGeneralSetting = (_obj, _settingName, { unitName = ``,
|
|
5090
5067
|
skipTerms = [...Array(3)].fill(1), hiddenBtn = false, addRFunc = _ => { }, addLFunc = _ => { },
|
|
5091
|
-
settingLabel = _settingName, displayName = `option`, scLabel = ``, roundNum = 0 } = {}) {
|
|
5068
|
+
settingLabel = _settingName, displayName = `option`, scLabel = ``, roundNum = 0 } = {}) => {
|
|
5092
5069
|
|
|
5093
5070
|
const settingUpper = toCapitalize(_settingName);
|
|
5094
5071
|
const linkId = `lnk${settingUpper}`;
|
|
@@ -5151,7 +5128,7 @@ function createGeneralSetting(_obj, _settingName, { unitName = ``,
|
|
|
5151
5128
|
document.querySelector(`#lbl${settingUpper}`).classList.add(g_cssObj.settings_Disabled);
|
|
5152
5129
|
_obj.appendChild(makeDisabledLabel(linkId, 0, initName));
|
|
5153
5130
|
}
|
|
5154
|
-
}
|
|
5131
|
+
};
|
|
5155
5132
|
|
|
5156
5133
|
/**
|
|
5157
5134
|
* 設定画面用ラベルの作成
|
|
@@ -5159,22 +5136,22 @@ function createGeneralSetting(_obj, _settingName, { unitName = ``,
|
|
|
5159
5136
|
* @param {number} _adjY
|
|
5160
5137
|
* @param {string} _settingLabel
|
|
5161
5138
|
*/
|
|
5162
|
-
|
|
5139
|
+
const createLblSetting = (_settingName, _adjY = 0, _settingLabel = _settingName) => {
|
|
5163
5140
|
const lbl = createDivCss2Label(`lbl${_settingName}`, g_lblNameObj[_settingLabel], {
|
|
5164
5141
|
x: 0, y: _adjY, w: 100,
|
|
5165
5142
|
}, `settings_${_settingName}`);
|
|
5166
5143
|
lbl.title = g_msgObj[`${_settingName.charAt(0).toLowerCase()}${_settingName.slice(1)}`];
|
|
5167
5144
|
return lbl;
|
|
5168
|
-
}
|
|
5145
|
+
};
|
|
5169
5146
|
|
|
5170
5147
|
/**
|
|
5171
5148
|
* 設定名の置き換え処理
|
|
5172
5149
|
* @param {string} _name
|
|
5173
5150
|
*/
|
|
5174
|
-
|
|
5151
|
+
const getStgDetailName = _name => {
|
|
5175
5152
|
return g_lblNameObj[`u_${_name}`] !== undefined &&
|
|
5176
5153
|
(g_presetObj.lblRenames === undefined || g_presetObj.lblRenames[g_currentPage]) ? g_lblNameObj[`u_${_name}`] : _name;
|
|
5177
|
-
}
|
|
5154
|
+
};
|
|
5178
5155
|
|
|
5179
5156
|
/**
|
|
5180
5157
|
* 設定メイン・汎用
|
|
@@ -5183,7 +5160,7 @@ function getStgDetailName(_name) {
|
|
|
5183
5160
|
* @param {string} _unitName
|
|
5184
5161
|
* @param {number} _roundNum
|
|
5185
5162
|
*/
|
|
5186
|
-
|
|
5163
|
+
const setSetting = (_scrollNum, _settingName, _unitName = ``, _roundNum = 0) => {
|
|
5187
5164
|
let settingNum = g_settings[`${_settingName}Num`];
|
|
5188
5165
|
const settingList = g_settings[`${_settingName}s`];
|
|
5189
5166
|
const settingMax = settingList.length - 1;
|
|
@@ -5206,7 +5183,7 @@ function setSetting(_scrollNum, _settingName, _unitName = ``, _roundNum = 0) {
|
|
|
5206
5183
|
g_settings[`${_settingName}Num`] = settingNum;
|
|
5207
5184
|
document.querySelector(`#lnk${toCapitalize(_settingName)}`).textContent =
|
|
5208
5185
|
`${getStgDetailName(g_stateObj[_settingName])}${_unitName}${g_localStorage[_settingName] === g_stateObj[_settingName] ? ' *' : ''}`;
|
|
5209
|
-
}
|
|
5186
|
+
};
|
|
5210
5187
|
|
|
5211
5188
|
/**
|
|
5212
5189
|
* 無効化用ラベル作成
|
|
@@ -5214,18 +5191,18 @@ function setSetting(_scrollNum, _settingName, _unitName = ``, _roundNum = 0) {
|
|
|
5214
5191
|
* @param {number} _heightPos
|
|
5215
5192
|
* @param {string} _defaultStr
|
|
5216
5193
|
*/
|
|
5217
|
-
|
|
5194
|
+
const makeDisabledLabel = (_id, _heightPos, _defaultStr) => {
|
|
5218
5195
|
return createDivCss2Label(_id, _defaultStr, {
|
|
5219
5196
|
x: C_LEN_SETLBL_LEFT, y: C_LEN_SETLBL_HEIGHT * _heightPos,
|
|
5220
5197
|
}, g_cssObj.settings_Disabled);
|
|
5221
|
-
}
|
|
5198
|
+
};
|
|
5222
5199
|
|
|
5223
5200
|
/**
|
|
5224
5201
|
* 保存済みリバース取得処理
|
|
5225
5202
|
* @param {object} _localStorage 保存先のローカルストレージ名
|
|
5226
5203
|
* @param {string} _extraKeyName 特殊キー名(通常キーは省略)
|
|
5227
5204
|
*/
|
|
5228
|
-
|
|
5205
|
+
const getKeyReverse = (_localStorage, _extraKeyName = ``) => {
|
|
5229
5206
|
if (_localStorage[`reverse${_extraKeyName}`] !== undefined) {
|
|
5230
5207
|
g_stateObj.reverse = _localStorage[`reverse${_extraKeyName}`] ?? C_FLG_OFF;
|
|
5231
5208
|
g_settings.reverseNum = roundZero(g_settings.reverses.findIndex(reverse => reverse === g_stateObj.reverse));
|
|
@@ -5233,14 +5210,14 @@ function getKeyReverse(_localStorage, _extraKeyName = ``) {
|
|
|
5233
5210
|
g_stateObj.reverse = C_FLG_OFF;
|
|
5234
5211
|
g_settings.reverseNum = 0;
|
|
5235
5212
|
}
|
|
5236
|
-
}
|
|
5213
|
+
};
|
|
5237
5214
|
|
|
5238
5215
|
/**
|
|
5239
5216
|
* 保存済みキーコンフィグ取得処理
|
|
5240
5217
|
* @param {object} _localStorage 保存先のローカルストレージ名
|
|
5241
5218
|
* @param {string} _extraKeyName 特殊キー名(通常キーは省略)
|
|
5242
5219
|
*/
|
|
5243
|
-
|
|
5220
|
+
const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
|
|
5244
5221
|
const baseKeyCtrlPtn = _localStorage[`keyCtrlPtn${_extraKeyName}`];
|
|
5245
5222
|
const basePtn = `${g_keyObj.currentKey}_${baseKeyCtrlPtn}`;
|
|
5246
5223
|
const baseKeyNum = g_keyObj[`chara${basePtn}`].length;
|
|
@@ -5280,7 +5257,7 @@ function getKeyCtrl(_localStorage, _extraKeyName = ``) {
|
|
|
5280
5257
|
}
|
|
5281
5258
|
});
|
|
5282
5259
|
}
|
|
5283
|
-
}
|
|
5260
|
+
};
|
|
5284
5261
|
|
|
5285
5262
|
/**
|
|
5286
5263
|
* 設定・オプション表示用ボタン
|
|
@@ -5291,7 +5268,7 @@ function getKeyCtrl(_localStorage, _extraKeyName = ``) {
|
|
|
5291
5268
|
* @param {object} objectList 座標設定(既定を上書き)
|
|
5292
5269
|
* @param {...any} _classes 追加するクラス
|
|
5293
5270
|
*/
|
|
5294
|
-
|
|
5271
|
+
const makeSettingLblCssButton = (_id, _name, _heightPos, _func, { x, y, w, h, siz, cxtFunc = _ => true, ...rest } = {}, ..._classes) => {
|
|
5295
5272
|
const tmpObj = {
|
|
5296
5273
|
x: x !== undefined ? x : C_LEN_SETLBL_LEFT,
|
|
5297
5274
|
y: y !== undefined ? y : C_LEN_SETLBL_HEIGHT * _heightPos,
|
|
@@ -5301,7 +5278,7 @@ function makeSettingLblCssButton(_id, _name, _heightPos, _func, { x, y, w, h, si
|
|
|
5301
5278
|
cxtFunc: cxtFunc !== undefined ? cxtFunc : _ => true,
|
|
5302
5279
|
};
|
|
5303
5280
|
return createCss2Button(_id, _name, _func, { ...tmpObj, ...rest }, g_cssObj.button_Default, ..._classes);
|
|
5304
|
-
}
|
|
5281
|
+
};
|
|
5305
5282
|
|
|
5306
5283
|
/**
|
|
5307
5284
|
* 譜面変更セレクター用ボタン
|
|
@@ -5310,14 +5287,14 @@ function makeSettingLblCssButton(_id, _name, _heightPos, _func, { x, y, w, h, si
|
|
|
5310
5287
|
* @param {number} _heightPos 上からの配置順
|
|
5311
5288
|
* @param {function} _func
|
|
5312
5289
|
*/
|
|
5313
|
-
|
|
5290
|
+
const makeDifLblCssButton = (_id, _name, _heightPos, _func, { x = 0, w = C_LEN_DIFSELECTOR_WIDTH, btnStyle = `Default` } = {}) => {
|
|
5314
5291
|
return createCss2Button(_id, _name, _func, {
|
|
5315
5292
|
x: x, y: C_LEN_SETLBL_HEIGHT * _heightPos,
|
|
5316
5293
|
w: w, h: C_LEN_SETLBL_HEIGHT,
|
|
5317
5294
|
siz: C_SIZ_DIFSELECTOR,
|
|
5318
5295
|
borderStyle: `solid`,
|
|
5319
5296
|
}, g_cssObj[`button_${btnStyle}`], g_cssObj.button_ON);
|
|
5320
|
-
}
|
|
5297
|
+
};
|
|
5321
5298
|
|
|
5322
5299
|
/**
|
|
5323
5300
|
* 設定・オプション用の設定変更ミニボタン
|
|
@@ -5326,20 +5303,20 @@ function makeDifLblCssButton(_id, _name, _heightPos, _func, { x = 0, w = C_LEN_D
|
|
|
5326
5303
|
* @param {number} _heightPos 上からの配置順
|
|
5327
5304
|
* @param {function} _func
|
|
5328
5305
|
*/
|
|
5329
|
-
|
|
5306
|
+
const makeMiniCssButton = (_id, _directionFlg, _heightPos, _func, { dx = 0, dy = 0, dw = 0, dh = 0, dsiz = 0, visibility = `visible` } = {}) => {
|
|
5330
5307
|
return createCss2Button(`${_id}${_directionFlg}`, g_settingBtnObj.chara[_directionFlg], _func, {
|
|
5331
5308
|
x: g_settingBtnObj.pos[_directionFlg] + dx,
|
|
5332
5309
|
y: C_LEN_SETLBL_HEIGHT * _heightPos + dy,
|
|
5333
5310
|
w: C_LEN_SETMINI_WIDTH + dw, h: C_LEN_SETLBL_HEIGHT + dh, siz: C_SIZ_SETLBL + dsiz,
|
|
5334
5311
|
visibility: visibility
|
|
5335
5312
|
}, g_cssObj.button_Mini);
|
|
5336
|
-
}
|
|
5313
|
+
};
|
|
5337
5314
|
|
|
5338
5315
|
/*-----------------------------------------------------------*/
|
|
5339
5316
|
/* Scene : SETTINGS-DISPLAY [lemon] */
|
|
5340
5317
|
/*-----------------------------------------------------------*/
|
|
5341
5318
|
|
|
5342
|
-
|
|
5319
|
+
const settingsDisplayInit = _ => {
|
|
5343
5320
|
|
|
5344
5321
|
clearWindow(true);
|
|
5345
5322
|
const divRoot = document.querySelector(`#divRoot`);
|
|
@@ -5374,13 +5351,65 @@ function settingsDisplayInit() {
|
|
|
5374
5351
|
document.oncontextmenu = _ => true;
|
|
5375
5352
|
|
|
5376
5353
|
g_skinJsObj.settingsDisplay.forEach(func => func());
|
|
5377
|
-
}
|
|
5354
|
+
};
|
|
5378
5355
|
|
|
5379
5356
|
/**
|
|
5380
5357
|
* 設定・オプション画面のラベル・ボタン処理の描画
|
|
5381
5358
|
* @param {Object} _sprite 基準とするスプライト(ここで指定する座標は、そのスプライトからの相対位置)
|
|
5382
5359
|
*/
|
|
5383
|
-
|
|
5360
|
+
const createSettingsDisplayWindow = _sprite => {
|
|
5361
|
+
|
|
5362
|
+
/**
|
|
5363
|
+
* Display表示/非表示ボタン
|
|
5364
|
+
* @param {*} _name
|
|
5365
|
+
* @param {*} _heightPos 縦位置
|
|
5366
|
+
* @param {*} _widthPos 横位置
|
|
5367
|
+
*/
|
|
5368
|
+
const makeDisplayButton = (_name, _heightPos, _widthPos) => {
|
|
5369
|
+
|
|
5370
|
+
const flg = g_stateObj[`d_${_name.toLowerCase()}`];
|
|
5371
|
+
const list = [C_FLG_OFF, C_FLG_ON];
|
|
5372
|
+
const linkId = `lnk${_name}`;
|
|
5373
|
+
|
|
5374
|
+
/**
|
|
5375
|
+
* 無効化用ラベル作成
|
|
5376
|
+
* @param {string} _id
|
|
5377
|
+
* @param {number} _heightPos
|
|
5378
|
+
* @param {number} _widthPos
|
|
5379
|
+
* @param {string} _defaultStr
|
|
5380
|
+
* @param {string} _flg
|
|
5381
|
+
*/
|
|
5382
|
+
const makeDisabledDisplayLabel = (_id, _heightPos, _widthPos, _defaultStr, _flg) => {
|
|
5383
|
+
return createDivCss2Label(_id, _defaultStr, {
|
|
5384
|
+
x: 30 + 180 * _widthPos, y: 3 + C_LEN_SETLBL_HEIGHT * _heightPos,
|
|
5385
|
+
w: 170, siz: C_SIZ_DIFSELECTOR,
|
|
5386
|
+
}, g_cssObj[`button_Disabled${flg}`]);
|
|
5387
|
+
};
|
|
5388
|
+
|
|
5389
|
+
if (g_headerObj[`${_name}Use`]) {
|
|
5390
|
+
const switchDisplay = evt => {
|
|
5391
|
+
const displayFlg = g_stateObj[`d_${_name.toLowerCase()}`];
|
|
5392
|
+
const displayNum = list.findIndex(flg => flg === displayFlg);
|
|
5393
|
+
const nextDisplayFlg = list[(displayNum + 1) % list.length];
|
|
5394
|
+
g_stateObj[`d_${_name.toLowerCase()}`] = nextDisplayFlg;
|
|
5395
|
+
evt.target.classList.replace(g_cssObj[`button_${displayFlg}`], g_cssObj[`button_${nextDisplayFlg}`]);
|
|
5396
|
+
|
|
5397
|
+
interlockingButton(g_headerObj, _name, nextDisplayFlg, displayFlg, true);
|
|
5398
|
+
}
|
|
5399
|
+
displaySprite.appendChild(
|
|
5400
|
+
makeSettingLblCssButton(linkId, g_lblNameObj[`d_${toCapitalize(_name)}`], _heightPos, evt => switchDisplay(evt), {
|
|
5401
|
+
x: 30 + 180 * _widthPos, w: 170,
|
|
5402
|
+
title: g_msgObj[`d_${_name.toLowerCase()}`], borderStyle: `solid`,
|
|
5403
|
+
cxtFunc: evt => switchDisplay(evt),
|
|
5404
|
+
}, `button_${flg}`)
|
|
5405
|
+
);
|
|
5406
|
+
createScText(document.getElementById(linkId), `${toCapitalize(_name)}`,
|
|
5407
|
+
{ displayName: g_currentPage, targetLabel: linkId, x: -5 });
|
|
5408
|
+
} else {
|
|
5409
|
+
displaySprite.appendChild(makeDisabledDisplayLabel(linkId, _heightPos, _widthPos,
|
|
5410
|
+
g_lblNameObj[`d_${toCapitalize(_name)}`] + `:${g_headerObj[`${_name}Set`]}`, g_headerObj[`${_name}Set`]));
|
|
5411
|
+
}
|
|
5412
|
+
};
|
|
5384
5413
|
|
|
5385
5414
|
// 各ボタン用のスプライトを作成
|
|
5386
5415
|
createOptionSprite(_sprite);
|
|
@@ -5434,7 +5463,7 @@ function createSettingsDisplayWindow(_sprite) {
|
|
|
5434
5463
|
|
|
5435
5464
|
_btn.classList.replace(g_cssObj[`button_Rev${prevLock}`],
|
|
5436
5465
|
g_cssObj[`button_Rev${g_stateObj.filterLock}`]);
|
|
5437
|
-
}
|
|
5466
|
+
};
|
|
5438
5467
|
|
|
5439
5468
|
const appearanceSlider = document.querySelector(`#appearanceSlider`);
|
|
5440
5469
|
appearanceSlider.addEventListener(`input`, _ =>
|
|
@@ -5452,59 +5481,7 @@ function createSettingsDisplayWindow(_sprite) {
|
|
|
5452
5481
|
// 判定表示系の不透明度 (Opacity)
|
|
5453
5482
|
// 縦位置: 9
|
|
5454
5483
|
createGeneralSetting(spriteList.opacity, `opacity`, { unitName: g_lblNameObj.percent, displayName: g_currentPage });
|
|
5455
|
-
|
|
5456
|
-
/**
|
|
5457
|
-
* Display表示/非表示ボタン
|
|
5458
|
-
* @param {*} _name
|
|
5459
|
-
* @param {*} _heightPos 縦位置
|
|
5460
|
-
* @param {*} _widthPos 横位置
|
|
5461
|
-
*/
|
|
5462
|
-
function makeDisplayButton(_name, _heightPos, _widthPos) {
|
|
5463
|
-
|
|
5464
|
-
const flg = g_stateObj[`d_${_name.toLowerCase()}`];
|
|
5465
|
-
const list = [C_FLG_OFF, C_FLG_ON];
|
|
5466
|
-
const linkId = `lnk${_name}`;
|
|
5467
|
-
|
|
5468
|
-
if (g_headerObj[`${_name}Use`]) {
|
|
5469
|
-
const switchDisplay = evt => {
|
|
5470
|
-
const displayFlg = g_stateObj[`d_${_name.toLowerCase()}`];
|
|
5471
|
-
const displayNum = list.findIndex(flg => flg === displayFlg);
|
|
5472
|
-
const nextDisplayFlg = list[(displayNum + 1) % list.length];
|
|
5473
|
-
g_stateObj[`d_${_name.toLowerCase()}`] = nextDisplayFlg;
|
|
5474
|
-
evt.target.classList.replace(g_cssObj[`button_${displayFlg}`], g_cssObj[`button_${nextDisplayFlg}`]);
|
|
5475
|
-
|
|
5476
|
-
interlockingButton(g_headerObj, _name, nextDisplayFlg, displayFlg, true);
|
|
5477
|
-
};
|
|
5478
|
-
displaySprite.appendChild(
|
|
5479
|
-
makeSettingLblCssButton(linkId, g_lblNameObj[`d_${toCapitalize(_name)}`], _heightPos, evt => switchDisplay(evt), {
|
|
5480
|
-
x: 30 + 180 * _widthPos, w: 170,
|
|
5481
|
-
title: g_msgObj[`d_${_name.toLowerCase()}`], borderStyle: `solid`,
|
|
5482
|
-
cxtFunc: evt => switchDisplay(evt),
|
|
5483
|
-
}, `button_${flg}`)
|
|
5484
|
-
);
|
|
5485
|
-
createScText(document.getElementById(linkId), `${toCapitalize(_name)}`,
|
|
5486
|
-
{ displayName: g_currentPage, targetLabel: linkId, x: -5 });
|
|
5487
|
-
} else {
|
|
5488
|
-
displaySprite.appendChild(makeDisabledDisplayLabel(linkId, _heightPos, _widthPos,
|
|
5489
|
-
g_lblNameObj[`d_${toCapitalize(_name)}`] + `:${g_headerObj[`${_name}Set`]}`, g_headerObj[`${_name}Set`]));
|
|
5490
|
-
}
|
|
5491
|
-
|
|
5492
|
-
/**
|
|
5493
|
-
* 無効化用ラベル作成
|
|
5494
|
-
* @param {string} _id
|
|
5495
|
-
* @param {number} _heightPos
|
|
5496
|
-
* @param {number} _widthPos
|
|
5497
|
-
* @param {string} _defaultStr
|
|
5498
|
-
* @param {string} _flg
|
|
5499
|
-
*/
|
|
5500
|
-
function makeDisabledDisplayLabel(_id, _heightPos, _widthPos, _defaultStr, _flg) {
|
|
5501
|
-
return createDivCss2Label(_id, _defaultStr, {
|
|
5502
|
-
x: 30 + 180 * _widthPos, y: 3 + C_LEN_SETLBL_HEIGHT * _heightPos,
|
|
5503
|
-
w: 170, siz: C_SIZ_DIFSELECTOR,
|
|
5504
|
-
}, g_cssObj[`button_Disabled${flg}`]);
|
|
5505
|
-
}
|
|
5506
|
-
}
|
|
5507
|
-
}
|
|
5484
|
+
};
|
|
5508
5485
|
|
|
5509
5486
|
/**
|
|
5510
5487
|
* Displayボタンを切り替えたときに連動して切り替えるボタンの設定
|
|
@@ -5514,7 +5491,7 @@ function createSettingsDisplayWindow(_sprite) {
|
|
|
5514
5491
|
* @param {string} _next 変更先
|
|
5515
5492
|
* @param {boolean} _buttonFlg ボタンフラグ (false: 初期, true: ボタン)
|
|
5516
5493
|
*/
|
|
5517
|
-
|
|
5494
|
+
const interlockingButton = (_headerObj, _name, _current, _next, _buttonFlg = false) => {
|
|
5518
5495
|
let includeDefaults = [];
|
|
5519
5496
|
if (g_stateObj[`d_${_name.toLowerCase()}`] === C_FLG_OFF) {
|
|
5520
5497
|
g_displays.forEach(option => {
|
|
@@ -5546,7 +5523,7 @@ function interlockingButton(_headerObj, _name, _current, _next, _buttonFlg = fal
|
|
|
5546
5523
|
}
|
|
5547
5524
|
});
|
|
5548
5525
|
}
|
|
5549
|
-
}
|
|
5526
|
+
};
|
|
5550
5527
|
|
|
5551
5528
|
/*-----------------------------------------------------------*/
|
|
5552
5529
|
/* Scene : KEYCONFIG [orange] */
|
|
@@ -5555,7 +5532,7 @@ function interlockingButton(_headerObj, _name, _current, _next, _buttonFlg = fal
|
|
|
5555
5532
|
/**
|
|
5556
5533
|
* キーコンフィグ画面初期化
|
|
5557
5534
|
*/
|
|
5558
|
-
|
|
5535
|
+
const keyConfigInit = (_kcType = g_kcType) => {
|
|
5559
5536
|
|
|
5560
5537
|
clearWindow(true);
|
|
5561
5538
|
const divRoot = document.querySelector(`#divRoot`);
|
|
@@ -5619,10 +5596,10 @@ function keyConfigInit(_kcType = g_kcType) {
|
|
|
5619
5596
|
!g_autoPlaysBase.includes(g_stateObj.autoPlay)) {
|
|
5620
5597
|
if (g_keyObj[`assistPos${keyCtrlPtn}`][g_stateObj.autoPlay][_j] === 1) {
|
|
5621
5598
|
arrowColor = g_headerObj.setDummyColor[_colorPos];
|
|
5622
|
-
}
|
|
5599
|
+
}
|
|
5623
5600
|
}
|
|
5624
5601
|
return arrowColor;
|
|
5625
|
-
}
|
|
5602
|
+
};
|
|
5626
5603
|
|
|
5627
5604
|
/**
|
|
5628
5605
|
* 対象割り当てキーの色変更
|
|
@@ -5779,7 +5756,7 @@ function keyConfigInit(_kcType = g_kcType) {
|
|
|
5779
5756
|
}
|
|
5780
5757
|
}
|
|
5781
5758
|
},
|
|
5782
|
-
}
|
|
5759
|
+
};
|
|
5783
5760
|
|
|
5784
5761
|
/**
|
|
5785
5762
|
* カラー・シャッフルグループ設定の表示
|
|
@@ -5793,7 +5770,7 @@ function keyConfigInit(_kcType = g_kcType) {
|
|
|
5793
5770
|
}
|
|
5794
5771
|
viewGroupObj[_type](`_${g_keycons[`${_type}GroupNum`]}`);
|
|
5795
5772
|
}
|
|
5796
|
-
}
|
|
5773
|
+
};
|
|
5797
5774
|
const setGroup = (_type, _scrollNum = 1) => {
|
|
5798
5775
|
const tmpNum = g_keycons[`${_type}GroupNum`] + _scrollNum;
|
|
5799
5776
|
if (g_keyObj[`${_type}${keyCtrlPtn}_${tmpNum}`] !== undefined) {
|
|
@@ -5849,7 +5826,7 @@ function keyConfigInit(_kcType = g_kcType) {
|
|
|
5849
5826
|
const makeMiniKCButton = (_id, _directionFlg, _func, { x = g_sWidth * 5 / 6 - 30, y = 15, w = 15, h = 20, siz = C_SIZ_MAIN } = {}) => {
|
|
5850
5827
|
return createCss2Button(`${_id}${_directionFlg}`, g_settingBtnObj.chara[_directionFlg], _func,
|
|
5851
5828
|
{ x, y, w, h, siz }, g_cssObj.button_Mini);
|
|
5852
|
-
}
|
|
5829
|
+
};
|
|
5853
5830
|
|
|
5854
5831
|
/**
|
|
5855
5832
|
* キーコンフィグ用グループ設定ラベル・ボタンの作成
|
|
@@ -6022,7 +5999,7 @@ function keyConfigInit(_kcType = g_kcType) {
|
|
|
6022
5999
|
|
|
6023
6000
|
updateImgType(g_headerObj.imgType[nextNum]);
|
|
6024
6001
|
keyConfigInit(g_kcType);
|
|
6025
|
-
}
|
|
6002
|
+
};
|
|
6026
6003
|
|
|
6027
6004
|
// ConfigType, ColorTypeの初期設定
|
|
6028
6005
|
setConfigType(0);
|
|
@@ -6174,7 +6151,7 @@ function keyConfigInit(_kcType = g_kcType) {
|
|
|
6174
6151
|
g_skinJsObj.keyconfig.forEach(func => func());
|
|
6175
6152
|
document.onkeyup = evt => commonKeyUp(evt);
|
|
6176
6153
|
document.oncontextmenu = _ => false;
|
|
6177
|
-
}
|
|
6154
|
+
};
|
|
6178
6155
|
|
|
6179
6156
|
/**
|
|
6180
6157
|
* 影矢印色の取得
|
|
@@ -6212,7 +6189,7 @@ const updateKeyInfo = (_header, _keyCtrlPtn) => {
|
|
|
6212
6189
|
/**
|
|
6213
6190
|
* 初期矢印色・フリーズアロー色の変更
|
|
6214
6191
|
*/
|
|
6215
|
-
|
|
6192
|
+
const changeSetColor = _ => {
|
|
6216
6193
|
const isDefault = [`Default`, `Type0`].includes(g_colorType);
|
|
6217
6194
|
const scoreIdHeader = setScoreIdHeader(g_stateObj.scoreId);
|
|
6218
6195
|
const defaultType = scoreIdHeader + g_colorType;
|
|
@@ -6234,13 +6211,13 @@ function changeSetColor() {
|
|
|
6234
6211
|
if (!hasVal(g_headerObj[`setShadowColor${scoreIdHeader}Default`][0]) && [`Type1`, `Type2`].includes(g_colorType)) {
|
|
6235
6212
|
g_headerObj.setShadowColor = [...Array(g_headerObj.setColorInit.length)].fill(``);
|
|
6236
6213
|
}
|
|
6237
|
-
}
|
|
6214
|
+
};
|
|
6238
6215
|
|
|
6239
6216
|
/*-----------------------------------------------------------*/
|
|
6240
6217
|
/* Scene : LOADING [strawberry] */
|
|
6241
6218
|
/*-----------------------------------------------------------*/
|
|
6242
6219
|
|
|
6243
|
-
|
|
6220
|
+
const loadMusic = _ => {
|
|
6244
6221
|
|
|
6245
6222
|
clearWindow(true);
|
|
6246
6223
|
g_currentPage = `loading`;
|
|
@@ -6303,14 +6280,14 @@ function loadMusic() {
|
|
|
6303
6280
|
request.addEventListener(`error`, _ => makeWarningWindow(`${g_msgInfoObj.E_0034}`, { backBtnUse: true }));
|
|
6304
6281
|
|
|
6305
6282
|
request.send();
|
|
6306
|
-
}
|
|
6283
|
+
};
|
|
6307
6284
|
|
|
6308
6285
|
/**
|
|
6309
6286
|
* 音楽データの設定
|
|
6310
6287
|
* iOSの場合はAudioタグによる再生
|
|
6311
6288
|
* @param {string} _url
|
|
6312
6289
|
*/
|
|
6313
|
-
async
|
|
6290
|
+
const setAudio = async (_url) => {
|
|
6314
6291
|
|
|
6315
6292
|
const loadMp3 = _ => {
|
|
6316
6293
|
if (g_isFile) {
|
|
@@ -6349,26 +6326,26 @@ async function setAudio(_url) {
|
|
|
6349
6326
|
} else {
|
|
6350
6327
|
readyToStart(_ => loadMp3());
|
|
6351
6328
|
}
|
|
6352
|
-
}
|
|
6329
|
+
};
|
|
6353
6330
|
|
|
6354
6331
|
// Base64から音声データに変換してWebAudioAPIで再生する準備
|
|
6355
|
-
async
|
|
6332
|
+
const initWebAudioAPIfromBase64 = async (_base64) => {
|
|
6356
6333
|
g_audio = new AudioPlayer();
|
|
6357
6334
|
musicAfterLoaded();
|
|
6358
6335
|
const array = Uint8Array.from(atob(_base64), v => v.charCodeAt(0))
|
|
6359
6336
|
await g_audio.init(array.buffer);
|
|
6360
|
-
}
|
|
6337
|
+
};
|
|
6361
6338
|
|
|
6362
6339
|
// 音声ファイルを読み込んでWebAudioAPIで再生する準備
|
|
6363
|
-
async
|
|
6340
|
+
const initWebAudioAPIfromURL = async (_url) => {
|
|
6364
6341
|
g_audio = new AudioPlayer();
|
|
6365
6342
|
musicAfterLoaded();
|
|
6366
6343
|
const promise = await fetch(_url);
|
|
6367
6344
|
const arrayBuffer = await promise.arrayBuffer();
|
|
6368
6345
|
await g_audio.init(arrayBuffer);
|
|
6369
|
-
}
|
|
6346
|
+
};
|
|
6370
6347
|
|
|
6371
|
-
|
|
6348
|
+
const musicAfterLoaded = _ => {
|
|
6372
6349
|
g_audio.load();
|
|
6373
6350
|
|
|
6374
6351
|
if (g_audio.readyState === 4) {
|
|
@@ -6387,12 +6364,12 @@ function musicAfterLoaded() {
|
|
|
6387
6364
|
makeWarningWindow(g_msgInfoObj.E_0041.split(`{0}`).join(g_audio.src), { backBtnUse: true });
|
|
6388
6365
|
})(), false);
|
|
6389
6366
|
}
|
|
6390
|
-
}
|
|
6367
|
+
};
|
|
6391
6368
|
|
|
6392
6369
|
/**
|
|
6393
6370
|
* 読込画面初期化
|
|
6394
6371
|
*/
|
|
6395
|
-
async
|
|
6372
|
+
const loadingScoreInit = async () => {
|
|
6396
6373
|
|
|
6397
6374
|
// 譜面データの読み込み
|
|
6398
6375
|
await loadChartFile();
|
|
@@ -6440,7 +6417,7 @@ async function loadingScoreInit() {
|
|
|
6440
6417
|
|
|
6441
6418
|
const setData = (_data, _minLength = 1) => {
|
|
6442
6419
|
return (hasArrayList(_data, _minLength) ? _data.concat() : []);
|
|
6443
|
-
}
|
|
6420
|
+
};
|
|
6444
6421
|
|
|
6445
6422
|
// フレーム・曲開始位置調整
|
|
6446
6423
|
let preblankFrame = 0;
|
|
@@ -6487,7 +6464,7 @@ async function loadingScoreInit() {
|
|
|
6487
6464
|
g_keyObj[`shuffle${keyCtrlPtn}`].forEach((_val, _i) => {
|
|
6488
6465
|
if (shuffleGroupMap[_val] === undefined) {
|
|
6489
6466
|
shuffleGroupMap[_val] = [];
|
|
6490
|
-
}
|
|
6467
|
+
}
|
|
6491
6468
|
shuffleGroupMap[_val].push(_i);
|
|
6492
6469
|
});
|
|
6493
6470
|
|
|
@@ -6550,14 +6527,14 @@ async function loadingScoreInit() {
|
|
|
6550
6527
|
}
|
|
6551
6528
|
}
|
|
6552
6529
|
}, 100);
|
|
6553
|
-
}
|
|
6530
|
+
};
|
|
6554
6531
|
|
|
6555
|
-
|
|
6532
|
+
const setScoreIdHeader = (_scoreId = 0, _scoreLockFlg = false) => {
|
|
6556
6533
|
if (_scoreId > 0 && _scoreLockFlg === false) {
|
|
6557
6534
|
return Number(_scoreId) + 1;
|
|
6558
6535
|
}
|
|
6559
6536
|
return ``;
|
|
6560
|
-
}
|
|
6537
|
+
};
|
|
6561
6538
|
|
|
6562
6539
|
/**
|
|
6563
6540
|
* Mirror,Randomの適用
|
|
@@ -6565,7 +6542,7 @@ function setScoreIdHeader(_scoreId = 0, _scoreLockFlg = false) {
|
|
|
6565
6542
|
* @param {array} _shuffleGroup
|
|
6566
6543
|
* @param {array} _style
|
|
6567
6544
|
*/
|
|
6568
|
-
|
|
6545
|
+
const applyShuffle = (_keyNum, _shuffleGroup, _style) => {
|
|
6569
6546
|
// 並べ替え用の配列を作成
|
|
6570
6547
|
// index[i]番目のキーの譜面がi番目のキーに流れるようになります
|
|
6571
6548
|
const index = [...Array(_keyNum).keys()];
|
|
@@ -6582,14 +6559,14 @@ function applyShuffle(_keyNum, _shuffleGroup, _style) {
|
|
|
6582
6559
|
g_scoreObj[`${type}Data`][i] = tmpData[index[i]] || [];
|
|
6583
6560
|
}
|
|
6584
6561
|
});
|
|
6585
|
-
}
|
|
6562
|
+
};
|
|
6586
6563
|
|
|
6587
6564
|
/**
|
|
6588
6565
|
* Mirrorの適用
|
|
6589
6566
|
* @param {number} _keyNum
|
|
6590
6567
|
* @param {array} _shuffleGroup
|
|
6591
6568
|
*/
|
|
6592
|
-
|
|
6569
|
+
const applyMirror = (_keyNum, _shuffleGroup, _asymFlg = false) => {
|
|
6593
6570
|
// シャッフルグループごとにミラー
|
|
6594
6571
|
const style = copyArray2d(_shuffleGroup).map(_group => _group.reverse());
|
|
6595
6572
|
if (_asymFlg) {
|
|
@@ -6603,14 +6580,14 @@ function applyMirror(_keyNum, _shuffleGroup, _asymFlg = false) {
|
|
|
6603
6580
|
});
|
|
6604
6581
|
}
|
|
6605
6582
|
applyShuffle(_keyNum, _shuffleGroup, style);
|
|
6606
|
-
}
|
|
6583
|
+
};
|
|
6607
6584
|
|
|
6608
6585
|
/**
|
|
6609
6586
|
* Randomの適用
|
|
6610
6587
|
* @param {number} _keyNum
|
|
6611
6588
|
* @param {array} _shuffleGroup
|
|
6612
6589
|
*/
|
|
6613
|
-
|
|
6590
|
+
const applyRandom = (_keyNum, _shuffleGroup) => {
|
|
6614
6591
|
// シャッフルグループごとにシャッフル(Fisher-Yates)
|
|
6615
6592
|
const style = copyArray2d(_shuffleGroup).map(_group => {
|
|
6616
6593
|
for (let i = _group.length - 1; i > 0; i--) {
|
|
@@ -6622,14 +6599,14 @@ function applyRandom(_keyNum, _shuffleGroup) {
|
|
|
6622
6599
|
return _group;
|
|
6623
6600
|
});
|
|
6624
6601
|
applyShuffle(_keyNum, _shuffleGroup, style);
|
|
6625
|
-
}
|
|
6602
|
+
};
|
|
6626
6603
|
|
|
6627
6604
|
/**
|
|
6628
6605
|
* S-Randomの適用
|
|
6629
6606
|
* @param {number} _keyNum
|
|
6630
6607
|
* @param {array} _shuffleGroup
|
|
6631
6608
|
*/
|
|
6632
|
-
|
|
6609
|
+
const applySRandom = (_keyNum, _shuffleGroup, _arrowHeader, _frzHeader) => {
|
|
6633
6610
|
|
|
6634
6611
|
const tmpArrowData = [...Array(_keyNum)].map(_ => []);
|
|
6635
6612
|
const tmpFrzData = [...Array(_keyNum)].map(_ => []);
|
|
@@ -6678,7 +6655,7 @@ function applySRandom(_keyNum, _shuffleGroup, _arrowHeader, _frzHeader) {
|
|
|
6678
6655
|
g_scoreObj[`${_frzHeader}Data`] = tmpFrzData.map(_freezes =>
|
|
6679
6656
|
_freezes.map(_freeze => [_freeze.begin, _freeze.end]).flat()
|
|
6680
6657
|
);
|
|
6681
|
-
}
|
|
6658
|
+
};
|
|
6682
6659
|
|
|
6683
6660
|
/**
|
|
6684
6661
|
* 譜面データの分解
|
|
@@ -6689,8 +6666,8 @@ function applySRandom(_keyNum, _shuffleGroup, _arrowHeader, _frzHeader) {
|
|
|
6689
6666
|
* @param {string} _keyCtrlPtn 選択キー及びパターン
|
|
6690
6667
|
* @param {boolean} _scoreAnalyzeFlg (default : false)
|
|
6691
6668
|
*/
|
|
6692
|
-
|
|
6693
|
-
_keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`, _scoreAnalyzeFlg = false) {
|
|
6669
|
+
const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
6670
|
+
_keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`, _scoreAnalyzeFlg = false) => {
|
|
6694
6671
|
|
|
6695
6672
|
// 矢印群の格納先
|
|
6696
6673
|
const obj = {};
|
|
@@ -6711,50 +6688,11 @@ function scoreConvert(_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
6711
6688
|
const blankFrame = g_headerObj.blankFrame;
|
|
6712
6689
|
const calcFrame = _frame => Math.round((parseFloat(_frame) - blankFrame) / g_headerObj.playbackRate + blankFrame + g_stateObj.intAdjustment);
|
|
6713
6690
|
|
|
6714
|
-
for (let j = 0; j < keyNum; j++) {
|
|
6715
|
-
|
|
6716
|
-
// 矢印データの分解
|
|
6717
|
-
const arrowName = g_keyObj[`chara${_keyCtrlPtn}`][j];
|
|
6718
|
-
obj.arrowData[j] = storeArrowData(_dosObj[`${arrowName}${scoreIdHeader}_data`]);
|
|
6719
|
-
|
|
6720
|
-
if (g_stateObj.dummyId !== ``) {
|
|
6721
|
-
obj.dummyArrowData[j] = storeArrowData(_dosObj[`${arrowName}${_dummyNo}_data`]);
|
|
6722
|
-
}
|
|
6723
|
-
|
|
6724
|
-
// 矢印名からフリーズアロー名への変換
|
|
6725
|
-
let frzName = g_keyObj[`chara${_keyCtrlPtn}`][j].replace(`leftdia`, `frzLdia`);
|
|
6726
|
-
frzName = frzName.replace(`rightdia`, `frzRdia`);
|
|
6727
|
-
frzName = frzName.replace(`left`, `frzLeft`);
|
|
6728
|
-
frzName = frzName.replace(`down`, `frzDown`);
|
|
6729
|
-
frzName = frzName.replace(`up`, `frzUp`);
|
|
6730
|
-
frzName = frzName.replace(`right`, `frzRight`);
|
|
6731
|
-
frzName = frzName.replace(`space`, `frzSpace`);
|
|
6732
|
-
frzName = frzName.replace(`iyo`, `frzIyo`);
|
|
6733
|
-
frzName = frzName.replace(`gor`, `frzGor`);
|
|
6734
|
-
frzName = frzName.replace(`oni`, `foni`);
|
|
6735
|
-
|
|
6736
|
-
if (frzName.indexOf(`frz`) === -1 && frzName.indexOf(`foni`) === -1) {
|
|
6737
|
-
if ((frzName.startsWith(`s`)) || frzName.startsWith(`t`) ||
|
|
6738
|
-
(frzName.startsWith(`a`) && !frzName.startsWith(`arrow`))) {
|
|
6739
|
-
frzName = frzName.replace(frzName.slice(1), `frz${toCapitalize(frzName.slice(1))}`);
|
|
6740
|
-
} else {
|
|
6741
|
-
frzName = frzName.replace(frzName, `frz${toCapitalize(frzName)}`);
|
|
6742
|
-
}
|
|
6743
|
-
}
|
|
6744
|
-
|
|
6745
|
-
// フリーズアローデータの分解 (2つで1セット)
|
|
6746
|
-
obj.frzData[j] = storeArrowData(_dosObj[`${frzName}${scoreIdHeader}_data`]);
|
|
6747
|
-
|
|
6748
|
-
if (g_stateObj.dummyId !== ``) {
|
|
6749
|
-
obj.dummyFrzData[j] = storeArrowData(_dosObj[`${frzName}${_dummyNo}_data`]);
|
|
6750
|
-
}
|
|
6751
|
-
}
|
|
6752
|
-
|
|
6753
6691
|
/**
|
|
6754
6692
|
* 矢印データの格納
|
|
6755
6693
|
* @param {string} _data
|
|
6756
6694
|
*/
|
|
6757
|
-
|
|
6695
|
+
const storeArrowData = _data => {
|
|
6758
6696
|
let arrowData = [];
|
|
6759
6697
|
|
|
6760
6698
|
if (hasVal(_data)) {
|
|
@@ -6769,80 +6707,35 @@ function scoreConvert(_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
6769
6707
|
}
|
|
6770
6708
|
}
|
|
6771
6709
|
return arrowData;
|
|
6772
|
-
}
|
|
6710
|
+
};
|
|
6773
6711
|
|
|
6774
|
-
|
|
6775
|
-
let speedFooter = ``;
|
|
6776
|
-
if (hasVal(_dosObj[`speed${scoreIdHeader}_data`])) {
|
|
6777
|
-
speedFooter = `_data`;
|
|
6778
|
-
}
|
|
6779
|
-
if (hasVal(_dosObj[`speed${scoreIdHeader}_change`])) {
|
|
6780
|
-
speedFooter = `_change`;
|
|
6781
|
-
}
|
|
6712
|
+
for (let j = 0; j < keyNum; j++) {
|
|
6782
6713
|
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6714
|
+
// 矢印データの分解
|
|
6715
|
+
const arrowName = g_keyObj[`chara${_keyCtrlPtn}`][j];
|
|
6716
|
+
obj.arrowData[j] = storeArrowData(_dosObj[`${arrowName}${scoreIdHeader}_data`]);
|
|
6786
6717
|
|
|
6787
|
-
// 色変化(個別・全体)の分解 (3つで1セット, セット毎の改行区切り可)
|
|
6788
|
-
g_typeLists.color.forEach(sprite => {
|
|
6789
|
-
obj[`${sprite}Data`] = setColorData(sprite, scoreIdHeader);
|
|
6790
6718
|
if (g_stateObj.dummyId !== ``) {
|
|
6791
|
-
obj[
|
|
6719
|
+
obj.dummyArrowData[j] = storeArrowData(_dosObj[`${arrowName}${_dummyNo}_data`]);
|
|
6792
6720
|
}
|
|
6793
|
-
});
|
|
6794
|
-
|
|
6795
|
-
if (_scoreAnalyzeFlg) {
|
|
6796
|
-
return obj;
|
|
6797
|
-
}
|
|
6798
|
-
|
|
6799
|
-
obj.colorData = mergeColorData();
|
|
6800
|
-
obj.dummyColorData = mergeColorData(`Dummy`);
|
|
6801
|
-
|
|
6802
|
-
// 矢印モーション(個別)データの分解(3~4つで1セット, セット毎の改行区切り)
|
|
6803
|
-
obj.arrowCssMotionData = setCssMotionData(`arrow`, scoreIdHeader);
|
|
6804
|
-
obj.frzCssMotionData = setCssMotionData(`frz`, scoreIdHeader);
|
|
6805
|
-
if (g_stateObj.dummyId !== ``) {
|
|
6806
|
-
obj.dummyArrowCssMotionData = setCssMotionData(`arrow`, _dummyNo);
|
|
6807
|
-
obj.dummyFrzCssMotionData = setCssMotionData(`frz`, _dummyNo);
|
|
6808
|
-
}
|
|
6809
6721
|
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6722
|
+
// 矢印名からフリーズアロー名への変換
|
|
6723
|
+
let frzName = replaceStr(g_keyObj[`chara${_keyCtrlPtn}`][j], g_escapeStr.frzName);
|
|
6724
|
+
if (frzName.indexOf(`frz`) === -1 && frzName.indexOf(`foni`) === -1) {
|
|
6725
|
+
if ((frzName.startsWith(`s`)) || frzName.startsWith(`t`) ||
|
|
6726
|
+
(frzName.startsWith(`a`) && !frzName.startsWith(`arrow`))) {
|
|
6727
|
+
frzName = frzName.replace(frzName.slice(1), `frz${toCapitalize(frzName.slice(1))}`);
|
|
6728
|
+
} else {
|
|
6729
|
+
frzName = frzName.replace(frzName, `frz${toCapitalize(frzName)}`);
|
|
6730
|
+
}
|
|
6731
|
+
}
|
|
6817
6732
|
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
obj.maskData = [];
|
|
6821
|
-
obj.maskMaxDepth = -1;
|
|
6822
|
-
obj.backData = [];
|
|
6823
|
-
obj.backMaxDepth = -1;
|
|
6824
|
-
if (g_stateObj.d_background === C_FLG_OFF) {
|
|
6825
|
-
} else {
|
|
6826
|
-
g_animationData.forEach(sprite => {
|
|
6827
|
-
[obj[`${sprite}Data`], obj[`${sprite}MaxDepth`]] = makeBackgroundData(sprite, scoreIdHeader);
|
|
6828
|
-
});
|
|
6829
|
-
}
|
|
6733
|
+
// フリーズアローデータの分解 (2つで1セット)
|
|
6734
|
+
obj.frzData[j] = storeArrowData(_dosObj[`${frzName}${scoreIdHeader}_data`]);
|
|
6830
6735
|
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
const backgroundResults = [`backResult`, `maskResult`, `backFailed`, `maskFailed`];
|
|
6835
|
-
backgroundResults.forEach(backName => {
|
|
6836
|
-
g_headerObj[`${backName}Data`] = [];
|
|
6837
|
-
g_headerObj[`${backName}MaxDepth`] = -1;
|
|
6838
|
-
});
|
|
6839
|
-
} else {
|
|
6840
|
-
g_animationData.forEach(sprite => {
|
|
6841
|
-
[g_headerObj[`${sprite}ResultData`], g_headerObj[`${sprite}ResultMaxDepth`]] =
|
|
6842
|
-
makeBackgroundResultData(`${sprite}result`, scoreIdHeader);
|
|
6843
|
-
[g_headerObj[`${sprite}FailedData`], g_headerObj[`${sprite}FailedMaxDepth`]] =
|
|
6844
|
-
makeBackgroundResultData(`${sprite}failed${g_stateObj.lifeMode.slice(0, 1)}`, scoreIdHeader, `${sprite}result`);
|
|
6845
|
-
});
|
|
6736
|
+
if (g_stateObj.dummyId !== ``) {
|
|
6737
|
+
obj.dummyFrzData[j] = storeArrowData(_dosObj[`${frzName}${_dummyNo}_data`]);
|
|
6738
|
+
}
|
|
6846
6739
|
}
|
|
6847
6740
|
|
|
6848
6741
|
/**
|
|
@@ -6851,7 +6744,7 @@ function scoreConvert(_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
6851
6744
|
* @param {number} _scoreNo
|
|
6852
6745
|
* @param {string} _footer
|
|
6853
6746
|
*/
|
|
6854
|
-
|
|
6747
|
+
const setSpeedData = (_header, _scoreNo, _footer = `_data`) => {
|
|
6855
6748
|
const speedData = [];
|
|
6856
6749
|
|
|
6857
6750
|
if (hasVal(_dosObj[`${_header}${_scoreNo}${_footer}`]) && g_stateObj.d_speed === C_FLG_ON) {
|
|
@@ -6874,18 +6767,18 @@ function scoreConvert(_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
6874
6767
|
return speedData.sort((_a, _b) => _a[0] - _b[0]).flat();
|
|
6875
6768
|
}
|
|
6876
6769
|
return [];
|
|
6877
|
-
}
|
|
6770
|
+
};
|
|
6878
6771
|
|
|
6879
6772
|
/**
|
|
6880
6773
|
* 個別・全体色変化データをマージして整列し、単純配列として返却
|
|
6881
6774
|
* @param {string} _header
|
|
6882
6775
|
* @returns
|
|
6883
6776
|
*/
|
|
6884
|
-
|
|
6777
|
+
const mergeColorData = (_header = ``) => {
|
|
6885
6778
|
if (obj[`color${_header}Data`] === undefined) return [];
|
|
6886
6779
|
const tmpArr = obj[`color${_header}Data`].concat(obj[`acolor${_header}Data`]);
|
|
6887
6780
|
return tmpArr.sort((_a, _b) => _a[0] - _b[0]).flat();
|
|
6888
|
-
}
|
|
6781
|
+
};
|
|
6889
6782
|
|
|
6890
6783
|
/**
|
|
6891
6784
|
* 色変化データの分解・格納(フレーム数, 矢印番号)
|
|
@@ -6893,7 +6786,7 @@ function scoreConvert(_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
6893
6786
|
* @param {string} _header
|
|
6894
6787
|
* @param {number} _scoreNo
|
|
6895
6788
|
*/
|
|
6896
|
-
|
|
6789
|
+
const setColorData = (_header, _scoreNo) => {
|
|
6897
6790
|
const colorData = [];
|
|
6898
6791
|
const allFlg = (_header.charAt(0) === `a`);
|
|
6899
6792
|
|
|
@@ -6919,14 +6812,14 @@ function scoreConvert(_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
6919
6812
|
return colorData.sort((_a, _b) => _a[0] - _b[0]);
|
|
6920
6813
|
}
|
|
6921
6814
|
return [];
|
|
6922
|
-
}
|
|
6815
|
+
};
|
|
6923
6816
|
|
|
6924
6817
|
/**
|
|
6925
6818
|
* 矢印モーションデータの分解・格納(フレーム数, 矢印番号)
|
|
6926
6819
|
* @param {string} _header
|
|
6927
6820
|
* @param {number} _scoreNo
|
|
6928
6821
|
*/
|
|
6929
|
-
|
|
6822
|
+
const setCssMotionData = (_header, _scoreNo) => {
|
|
6930
6823
|
const dosCssMotionData = _dosObj[`${_header}Motion${_scoreNo}_data`] || _dosObj[`${_header}Motion_data`];
|
|
6931
6824
|
const cssMotionData = [];
|
|
6932
6825
|
|
|
@@ -6946,13 +6839,13 @@ function scoreConvert(_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
6946
6839
|
return cssMotionData.sort((_a, _b) => _a[0] - _b[0]).flat();
|
|
6947
6840
|
}
|
|
6948
6841
|
return [];
|
|
6949
|
-
}
|
|
6842
|
+
};
|
|
6950
6843
|
|
|
6951
6844
|
/**
|
|
6952
6845
|
* 歌詞データの分解
|
|
6953
6846
|
* @param {string} _scoreNo
|
|
6954
6847
|
*/
|
|
6955
|
-
|
|
6848
|
+
const makeWordData = _scoreNo => {
|
|
6956
6849
|
const wordDataList = [];
|
|
6957
6850
|
let wordReverseFlg = false;
|
|
6958
6851
|
const divideCnt = getKeyInfo().divideCnt;
|
|
@@ -6985,14 +6878,14 @@ function scoreConvert(_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
6985
6878
|
|
|
6986
6879
|
const inputWordData = wordDataList.find((v) => v !== undefined);
|
|
6987
6880
|
return (inputWordData !== undefined ? makeSpriteWordData(inputWordData, wordReverseFlg) : [[], -1]);
|
|
6988
|
-
}
|
|
6881
|
+
};
|
|
6989
6882
|
|
|
6990
6883
|
/**
|
|
6991
6884
|
* 多層歌詞データの格納処理
|
|
6992
6885
|
* @param {object} _data
|
|
6993
6886
|
* @param {boolean} _reverseFlg
|
|
6994
6887
|
*/
|
|
6995
|
-
|
|
6888
|
+
const makeSpriteWordData = (_data, _reverseFlg = false) => {
|
|
6996
6889
|
const wordData = [];
|
|
6997
6890
|
let wordMaxDepth = -1;
|
|
6998
6891
|
let wordReverseFlg = _reverseFlg;
|
|
@@ -7040,14 +6933,14 @@ function scoreConvert(_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7040
6933
|
});
|
|
7041
6934
|
|
|
7042
6935
|
return [wordData, wordMaxDepth];
|
|
7043
|
-
}
|
|
6936
|
+
};
|
|
7044
6937
|
|
|
7045
6938
|
/**
|
|
7046
6939
|
* 背景・マスクデータの分解
|
|
7047
6940
|
* @param {string} _header
|
|
7048
6941
|
* @param {string} _scoreNo
|
|
7049
6942
|
*/
|
|
7050
|
-
|
|
6943
|
+
const makeBackgroundData = (_header, _scoreNo) => {
|
|
7051
6944
|
const dataList = [];
|
|
7052
6945
|
const addDataList = (_type = ``) =>
|
|
7053
6946
|
dataList.push(
|
|
@@ -7064,42 +6957,116 @@ function scoreConvert(_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7064
6957
|
}
|
|
7065
6958
|
addDataList();
|
|
7066
6959
|
|
|
7067
|
-
const data = dataList.find((v) => v !== undefined);
|
|
7068
|
-
return (data !== undefined ? makeSpriteData(data, calcFrame) : [[], -1]);
|
|
6960
|
+
const data = dataList.find((v) => v !== undefined);
|
|
6961
|
+
return (data !== undefined ? makeSpriteData(data, calcFrame) : [[], -1]);
|
|
6962
|
+
};
|
|
6963
|
+
|
|
6964
|
+
/**
|
|
6965
|
+
* リザルトモーションデータ(結果画面用背景・マスクデータ)の分解
|
|
6966
|
+
* @param {string} _header
|
|
6967
|
+
* @param {string} _scoreNo
|
|
6968
|
+
* @param {string} _defaultHeader
|
|
6969
|
+
*/
|
|
6970
|
+
const makeBackgroundResultData = (_header, _scoreNo, _defaultHeader = ``) => {
|
|
6971
|
+
const dataList = [];
|
|
6972
|
+
const addResultDataList = _headerType =>
|
|
6973
|
+
dataList.push(
|
|
6974
|
+
_dosObj[`${_headerType}${g_localeObj.val}${_scoreNo}_data`],
|
|
6975
|
+
_dosObj[`${_headerType}${g_localeObj.val}_data`],
|
|
6976
|
+
_dosObj[`${_headerType}${_scoreNo}_data`],
|
|
6977
|
+
_dosObj[`${_headerType}_data`],
|
|
6978
|
+
);
|
|
6979
|
+
addResultDataList(_header);
|
|
6980
|
+
if (_defaultHeader !== ``) {
|
|
6981
|
+
addResultDataList(_defaultHeader);
|
|
6982
|
+
}
|
|
6983
|
+
|
|
6984
|
+
const data = dataList.find((v) => v !== undefined);
|
|
6985
|
+
return (data !== undefined ? makeSpriteData(data) : [[], -1]);
|
|
6986
|
+
};
|
|
6987
|
+
|
|
6988
|
+
// 速度変化データの分解 (2つで1セット)
|
|
6989
|
+
let speedFooter = ``;
|
|
6990
|
+
if (hasVal(_dosObj[`speed${scoreIdHeader}_data`])) {
|
|
6991
|
+
speedFooter = `_data`;
|
|
6992
|
+
}
|
|
6993
|
+
if (hasVal(_dosObj[`speed${scoreIdHeader}_change`])) {
|
|
6994
|
+
speedFooter = `_change`;
|
|
6995
|
+
}
|
|
6996
|
+
|
|
6997
|
+
// 速度変化(個別・全体)の分解 (2つで1セット, セット毎の改行区切り可)
|
|
6998
|
+
obj.boostData = setSpeedData(`boost`, scoreIdHeader);
|
|
6999
|
+
obj.speedData = setSpeedData(`speed`, scoreIdHeader, speedFooter);
|
|
7000
|
+
|
|
7001
|
+
// 色変化(個別・全体)の分解 (3つで1セット, セット毎の改行区切り可)
|
|
7002
|
+
g_typeLists.color.forEach(sprite => {
|
|
7003
|
+
obj[`${sprite}Data`] = setColorData(sprite, scoreIdHeader);
|
|
7004
|
+
if (g_stateObj.dummyId !== ``) {
|
|
7005
|
+
obj[`${sprite}DummyData`] = setColorData(sprite, _dummyNo);
|
|
7006
|
+
}
|
|
7007
|
+
});
|
|
7008
|
+
|
|
7009
|
+
if (_scoreAnalyzeFlg) {
|
|
7010
|
+
return obj;
|
|
7011
|
+
}
|
|
7012
|
+
|
|
7013
|
+
obj.colorData = mergeColorData();
|
|
7014
|
+
obj.dummyColorData = mergeColorData(`Dummy`);
|
|
7015
|
+
|
|
7016
|
+
// 矢印モーション(個別)データの分解(3~4つで1セット, セット毎の改行区切り)
|
|
7017
|
+
obj.arrowCssMotionData = setCssMotionData(`arrow`, scoreIdHeader);
|
|
7018
|
+
obj.frzCssMotionData = setCssMotionData(`frz`, scoreIdHeader);
|
|
7019
|
+
if (g_stateObj.dummyId !== ``) {
|
|
7020
|
+
obj.dummyArrowCssMotionData = setCssMotionData(`arrow`, _dummyNo);
|
|
7021
|
+
obj.dummyFrzCssMotionData = setCssMotionData(`frz`, _dummyNo);
|
|
7069
7022
|
}
|
|
7070
7023
|
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
const dataList = [];
|
|
7079
|
-
const addResultDataList = _headerType =>
|
|
7080
|
-
dataList.push(
|
|
7081
|
-
_dosObj[`${_headerType}${g_localeObj.val}${_scoreNo}_data`],
|
|
7082
|
-
_dosObj[`${_headerType}${g_localeObj.val}_data`],
|
|
7083
|
-
_dosObj[`${_headerType}${_scoreNo}_data`],
|
|
7084
|
-
_dosObj[`${_headerType}_data`],
|
|
7085
|
-
);
|
|
7086
|
-
addResultDataList(_header);
|
|
7087
|
-
if (_defaultHeader !== ``) {
|
|
7088
|
-
addResultDataList(_defaultHeader);
|
|
7089
|
-
}
|
|
7024
|
+
// 歌詞データの分解 (3つで1セット, セット毎の改行区切り可)
|
|
7025
|
+
obj.wordData = [];
|
|
7026
|
+
obj.wordMaxDepth = -1;
|
|
7027
|
+
if (g_stateObj.d_lyrics === C_FLG_OFF) {
|
|
7028
|
+
} else {
|
|
7029
|
+
[obj.wordData, obj.wordMaxDepth] = makeWordData(scoreIdHeader);
|
|
7030
|
+
}
|
|
7090
7031
|
|
|
7091
|
-
|
|
7092
|
-
|
|
7032
|
+
// 背景・マスクデータの分解 (下記すべてで1セット、改行区切り)
|
|
7033
|
+
// [フレーム数, 階層, 背景パス, class(CSSで別定義), X, Y, width, height, opacity, animationName, animationDuration]
|
|
7034
|
+
obj.maskData = [];
|
|
7035
|
+
obj.maskMaxDepth = -1;
|
|
7036
|
+
obj.backData = [];
|
|
7037
|
+
obj.backMaxDepth = -1;
|
|
7038
|
+
if (g_stateObj.d_background === C_FLG_OFF) {
|
|
7039
|
+
} else {
|
|
7040
|
+
g_animationData.forEach(sprite => {
|
|
7041
|
+
[obj[`${sprite}Data`], obj[`${sprite}MaxDepth`]] = makeBackgroundData(sprite, scoreIdHeader);
|
|
7042
|
+
});
|
|
7043
|
+
}
|
|
7044
|
+
|
|
7045
|
+
// 結果画面用・背景/マスクデータの分解 (下記すべてで1セット、改行区切り)
|
|
7046
|
+
// [フレーム数,階層,背景パス,class(CSSで別定義),X,Y,width,height,opacity,animationName,animationDuration]
|
|
7047
|
+
if (g_stateObj.d_background === C_FLG_OFF && g_headerObj.resultMotionSet) {
|
|
7048
|
+
const backgroundResults = [`backResult`, `maskResult`, `backFailed`, `maskFailed`];
|
|
7049
|
+
backgroundResults.forEach(backName => {
|
|
7050
|
+
g_headerObj[`${backName}Data`] = [];
|
|
7051
|
+
g_headerObj[`${backName}MaxDepth`] = -1;
|
|
7052
|
+
});
|
|
7053
|
+
} else {
|
|
7054
|
+
g_animationData.forEach(sprite => {
|
|
7055
|
+
[g_headerObj[`${sprite}ResultData`], g_headerObj[`${sprite}ResultMaxDepth`]] =
|
|
7056
|
+
makeBackgroundResultData(`${sprite}result`, scoreIdHeader);
|
|
7057
|
+
[g_headerObj[`${sprite}FailedData`], g_headerObj[`${sprite}FailedMaxDepth`]] =
|
|
7058
|
+
makeBackgroundResultData(`${sprite}failed${g_stateObj.lifeMode.slice(0, 1)}`, scoreIdHeader, `${sprite}result`);
|
|
7059
|
+
});
|
|
7093
7060
|
}
|
|
7094
7061
|
|
|
7095
7062
|
return obj;
|
|
7096
|
-
}
|
|
7063
|
+
};
|
|
7097
7064
|
|
|
7098
7065
|
/**
|
|
7099
7066
|
* ライフ回復量・ダメージ量の算出
|
|
7100
7067
|
* @param {number} _allArrows
|
|
7101
7068
|
*/
|
|
7102
|
-
|
|
7069
|
+
const calcLifeVals = _allArrows => {
|
|
7103
7070
|
|
|
7104
7071
|
if (g_stateObj.lifeVariable === C_FLG_ON) {
|
|
7105
7072
|
g_workObj.lifeRcv = calcLifeVal(g_stateObj.lifeRcv, _allArrows);
|
|
@@ -7110,23 +7077,21 @@ function calcLifeVals(_allArrows) {
|
|
|
7110
7077
|
}
|
|
7111
7078
|
g_workObj.lifeBorder = g_headerObj.maxLifeVal * g_stateObj.lifeBorder / 100;
|
|
7112
7079
|
g_workObj.lifeInit = g_headerObj.maxLifeVal * g_stateObj.lifeInit / 100;
|
|
7113
|
-
}
|
|
7080
|
+
};
|
|
7114
7081
|
|
|
7115
7082
|
/**
|
|
7116
7083
|
* ライフ回復量・ダメージ量の算出
|
|
7117
7084
|
* @param {number} _val
|
|
7118
7085
|
* @param {number} _allArrows
|
|
7119
7086
|
*/
|
|
7120
|
-
|
|
7121
|
-
return Math.round(_val * g_headerObj.maxLifeVal * 100 / _allArrows) / 100;
|
|
7122
|
-
}
|
|
7087
|
+
const calcLifeVal = (_val, _allArrows) => Math.round(_val * g_headerObj.maxLifeVal * 100 / _allArrows) / 100;
|
|
7123
7088
|
|
|
7124
7089
|
/**
|
|
7125
7090
|
* 最終フレーム数の取得
|
|
7126
7091
|
* @param {object} _dataObj
|
|
7127
7092
|
* @param {string} _keyCtrlPtn
|
|
7128
7093
|
*/
|
|
7129
|
-
|
|
7094
|
+
const getLastFrame = (_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`) => {
|
|
7130
7095
|
|
|
7131
7096
|
let tmpLastNum = 0;
|
|
7132
7097
|
const keyNum = g_keyObj[`chara${_keyCtrlPtn}`].length;
|
|
@@ -7146,14 +7111,14 @@ function getLastFrame(_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj
|
|
|
7146
7111
|
});
|
|
7147
7112
|
}
|
|
7148
7113
|
return tmpLastNum;
|
|
7149
|
-
}
|
|
7114
|
+
};
|
|
7150
7115
|
|
|
7151
7116
|
/**
|
|
7152
7117
|
* 最初の矢印フレームの取得
|
|
7153
7118
|
* @param {object} _dataObj
|
|
7154
7119
|
* @param {string} _keyCtrlPtn
|
|
7155
7120
|
*/
|
|
7156
|
-
|
|
7121
|
+
const getFirstArrowFrame = (_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`) => {
|
|
7157
7122
|
|
|
7158
7123
|
let tmpFirstNum = Infinity;
|
|
7159
7124
|
const keyNum = g_keyObj[`chara${_keyCtrlPtn}`].length;
|
|
@@ -7175,7 +7140,7 @@ function getFirstArrowFrame(_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_
|
|
|
7175
7140
|
});
|
|
7176
7141
|
}
|
|
7177
7142
|
return (tmpFirstNum === Infinity ? 0 : tmpFirstNum);
|
|
7178
|
-
}
|
|
7143
|
+
};
|
|
7179
7144
|
|
|
7180
7145
|
/**
|
|
7181
7146
|
* 開始フレームの取得
|
|
@@ -7183,7 +7148,7 @@ function getFirstArrowFrame(_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_
|
|
|
7183
7148
|
* @param {number} _fadein
|
|
7184
7149
|
* @param {number} _scoreId
|
|
7185
7150
|
*/
|
|
7186
|
-
|
|
7151
|
+
const getStartFrame = (_lastFrame, _fadein = 0, _scoreId = g_stateObj.scoreId) => {
|
|
7187
7152
|
let frameNum = 0;
|
|
7188
7153
|
if (g_headerObj.startFrame !== undefined) {
|
|
7189
7154
|
frameNum = parseInt(g_headerObj.startFrame[_scoreId] || g_headerObj.startFrame[0] || 0);
|
|
@@ -7192,14 +7157,14 @@ function getStartFrame(_lastFrame, _fadein = 0, _scoreId = g_stateObj.scoreId) {
|
|
|
7192
7157
|
frameNum = Math.round(_fadein / 100 * (_lastFrame - frameNum)) + frameNum;
|
|
7193
7158
|
}
|
|
7194
7159
|
return frameNum;
|
|
7195
|
-
}
|
|
7160
|
+
};
|
|
7196
7161
|
|
|
7197
7162
|
/**
|
|
7198
7163
|
* 各フレームごとの速度を格納
|
|
7199
7164
|
* @param {object} _speedData
|
|
7200
7165
|
* @param {number} _lastFrame
|
|
7201
7166
|
*/
|
|
7202
|
-
|
|
7167
|
+
const setSpeedOnFrame = (_speedData, _lastFrame) => {
|
|
7203
7168
|
|
|
7204
7169
|
const speedOnFrame = [];
|
|
7205
7170
|
let currentSpeed = g_stateObj.speed * 2;
|
|
@@ -7212,14 +7177,14 @@ function setSpeedOnFrame(_speedData, _lastFrame) {
|
|
|
7212
7177
|
speedOnFrame[frm] = currentSpeed;
|
|
7213
7178
|
}
|
|
7214
7179
|
return speedOnFrame;
|
|
7215
|
-
}
|
|
7180
|
+
};
|
|
7216
7181
|
|
|
7217
7182
|
/**
|
|
7218
7183
|
* Motionオプション適用時の矢印別の速度設定
|
|
7219
7184
|
* - 配列の数字は小さいほどステップゾーンに近いことを示す。
|
|
7220
7185
|
* - 15がステップゾーン上、0~14は矢印の枠外管理用
|
|
7221
7186
|
*/
|
|
7222
|
-
|
|
7187
|
+
const setMotionOnFrame = _ => {
|
|
7223
7188
|
|
|
7224
7189
|
// 矢印が表示される最大フレーム数
|
|
7225
7190
|
const motionLastFrame = g_sHeight * 20;
|
|
@@ -7244,7 +7209,7 @@ function setMotionOnFrame() {
|
|
|
7244
7209
|
}
|
|
7245
7210
|
|
|
7246
7211
|
return motionOnFrame;
|
|
7247
|
-
}
|
|
7212
|
+
};
|
|
7248
7213
|
|
|
7249
7214
|
/**
|
|
7250
7215
|
* 最初のフレームで出現する矢印が、ステップゾーンに到達するまでのフレーム数を取得
|
|
@@ -7252,7 +7217,7 @@ function setMotionOnFrame() {
|
|
|
7252
7217
|
* @param {object} _speedOnFrame
|
|
7253
7218
|
* @param {object} _motionOnFrame
|
|
7254
7219
|
*/
|
|
7255
|
-
|
|
7220
|
+
const getFirstArrivalFrame = (_startFrame, _speedOnFrame, _motionOnFrame) => {
|
|
7256
7221
|
let startY = 0;
|
|
7257
7222
|
let frm = _startFrame;
|
|
7258
7223
|
let motionFrm = C_MOTION_STD_POS;
|
|
@@ -7267,7 +7232,7 @@ function getFirstArrivalFrame(_startFrame, _speedOnFrame, _motionOnFrame) {
|
|
|
7267
7232
|
frm++;
|
|
7268
7233
|
}
|
|
7269
7234
|
return frm;
|
|
7270
|
-
}
|
|
7235
|
+
};
|
|
7271
7236
|
|
|
7272
7237
|
/**
|
|
7273
7238
|
* 矢印・フリーズアロー・速度/色変化格納処理
|
|
@@ -7276,7 +7241,7 @@ function getFirstArrivalFrame(_startFrame, _speedOnFrame, _motionOnFrame) {
|
|
|
7276
7241
|
* @param {object} _motionOnFrame
|
|
7277
7242
|
* @param {number} _firstArrivalFrame
|
|
7278
7243
|
*/
|
|
7279
|
-
|
|
7244
|
+
const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame) => {
|
|
7280
7245
|
|
|
7281
7246
|
// 矢印・フリーズアロー・速度/色変化用 フレーム別処理配列
|
|
7282
7247
|
[``, `Dummy`].forEach(header => {
|
|
@@ -7301,9 +7266,9 @@ function pushArrows(_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7301
7266
|
spdPrev = 0;
|
|
7302
7267
|
}
|
|
7303
7268
|
return [spdk, spdPrev];
|
|
7304
|
-
}
|
|
7269
|
+
};
|
|
7305
7270
|
|
|
7306
|
-
|
|
7271
|
+
const setNotes = (_j, _k, _data, _startPoint, _header, _frzFlg = false) => {
|
|
7307
7272
|
if (_startPoint >= 0) {
|
|
7308
7273
|
if (g_workObj[`mk${_header}Arrow`][_startPoint] === undefined) {
|
|
7309
7274
|
g_workObj[`mk${_header}Arrow`][_startPoint] = [];
|
|
@@ -7316,9 +7281,9 @@ function pushArrows(_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7316
7281
|
} else if (_frzFlg && g_workObj[`mk${_header}Length`][_j] !== undefined) {
|
|
7317
7282
|
g_workObj[`mk${_header}Length`][_j] = copyArray2d(g_workObj[`mk${_header}Length`][_j].slice(_k + 2));
|
|
7318
7283
|
}
|
|
7319
|
-
}
|
|
7284
|
+
};
|
|
7320
7285
|
|
|
7321
|
-
|
|
7286
|
+
const calcNotes = (_j, _data, _header = ``, _frzFlg = false) => {
|
|
7322
7287
|
if (_data === undefined) {
|
|
7323
7288
|
return;
|
|
7324
7289
|
}
|
|
@@ -7388,7 +7353,7 @@ function pushArrows(_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7388
7353
|
// 出現タイミングを保存
|
|
7389
7354
|
setNotes(_j, k, _data, startPoint[k], camelHeader, _frzFlg);
|
|
7390
7355
|
}
|
|
7391
|
-
}
|
|
7356
|
+
};
|
|
7392
7357
|
|
|
7393
7358
|
for (let j = 0; j < getKeyInfo().keyNum; j++) {
|
|
7394
7359
|
|
|
@@ -7428,13 +7393,6 @@ function pushArrows(_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7428
7393
|
g_workObj.boostData = copyArray2d(_dataObj.boostData);
|
|
7429
7394
|
}
|
|
7430
7395
|
|
|
7431
|
-
// 個別・全体色変化、モーションデータのタイミング更新
|
|
7432
|
-
[``, `dummy`].forEach(type =>
|
|
7433
|
-
calcDataTiming(`color`, type, pushColors, { _colorFlg: true }));
|
|
7434
|
-
|
|
7435
|
-
g_typeLists.arrow.forEach(header =>
|
|
7436
|
-
calcDataTiming(`cssMotion`, header, pushCssMotions, { _calcFrameFlg: true }));
|
|
7437
|
-
|
|
7438
7396
|
/**
|
|
7439
7397
|
* 色変化・モーションデータのタイミング更新
|
|
7440
7398
|
* @param {string} _type
|
|
@@ -7443,8 +7401,8 @@ function pushArrows(_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7443
7401
|
* @param {object} obj _colorFlg: 個別色変化フラグ, _calcFrameFlg: 逆算を無条件で行うかどうかの可否
|
|
7444
7402
|
* @returns
|
|
7445
7403
|
*/
|
|
7446
|
-
|
|
7447
|
-
{ _term = 4, _colorFlg = false, _calcFrameFlg = false } = {}) {
|
|
7404
|
+
const calcDataTiming = (_type, _header, _setFunc = _ => true,
|
|
7405
|
+
{ _term = 4, _colorFlg = false, _calcFrameFlg = false } = {}) => {
|
|
7448
7406
|
|
|
7449
7407
|
const camelHeader = _header === `` ? _type : `${_header}${toCapitalize(_type)}`;
|
|
7450
7408
|
const baseData = _dataObj[`${camelHeader}Data`];
|
|
@@ -7475,10 +7433,7 @@ function pushArrows(_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7475
7433
|
}
|
|
7476
7434
|
}
|
|
7477
7435
|
frontData.forEach(data => _setFunc(toCapitalize(_header), g_scoreObj.frameNum, ...data));
|
|
7478
|
-
}
|
|
7479
|
-
|
|
7480
|
-
g_fadeinStockList.forEach(type =>
|
|
7481
|
-
_dataObj[`${type}Data`] = calcAnimationData(type, _dataObj[`${type}Data`]));
|
|
7436
|
+
};
|
|
7482
7437
|
|
|
7483
7438
|
/**
|
|
7484
7439
|
* 歌詞表示、背景・マスク表示のフェードイン時調整処理
|
|
@@ -7486,7 +7441,7 @@ function pushArrows(_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7486
7441
|
* @param {object} _data
|
|
7487
7442
|
* @returns
|
|
7488
7443
|
*/
|
|
7489
|
-
|
|
7444
|
+
const calcAnimationData = (_type, _data) => {
|
|
7490
7445
|
|
|
7491
7446
|
const startNum = g_scoreObj.frameNum;
|
|
7492
7447
|
const cgArrays = [`word`];
|
|
@@ -7543,7 +7498,18 @@ function pushArrows(_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7543
7498
|
}
|
|
7544
7499
|
|
|
7545
7500
|
return _data;
|
|
7546
|
-
}
|
|
7501
|
+
};
|
|
7502
|
+
|
|
7503
|
+
// 個別・全体色変化、モーションデータのタイミング更新
|
|
7504
|
+
[``, `dummy`].forEach(type =>
|
|
7505
|
+
calcDataTiming(`color`, type, pushColors, { _colorFlg: true }));
|
|
7506
|
+
|
|
7507
|
+
g_typeLists.arrow.forEach(header =>
|
|
7508
|
+
calcDataTiming(`cssMotion`, header, pushCssMotions, { _calcFrameFlg: true }));
|
|
7509
|
+
|
|
7510
|
+
g_fadeinStockList.forEach(type =>
|
|
7511
|
+
_dataObj[`${type}Data`] = calcAnimationData(type, _dataObj[`${type}Data`]));
|
|
7512
|
+
|
|
7547
7513
|
|
|
7548
7514
|
// 実際に処理させる途中変速配列を作成
|
|
7549
7515
|
g_workObj.speedData = [];
|
|
@@ -7559,7 +7525,7 @@ function pushArrows(_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7559
7525
|
}
|
|
7560
7526
|
}
|
|
7561
7527
|
}
|
|
7562
|
-
}
|
|
7528
|
+
};
|
|
7563
7529
|
|
|
7564
7530
|
/**
|
|
7565
7531
|
* ステップゾーン到達地点から逆算して開始フレームを取得
|
|
@@ -7567,7 +7533,7 @@ function pushArrows(_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7567
7533
|
* @param {object} _speedOnFrame
|
|
7568
7534
|
* @param {object} _motionOnFrame
|
|
7569
7535
|
*/
|
|
7570
|
-
|
|
7536
|
+
const getArrowStartFrame = (_frame, _speedOnFrame, _motionOnFrame) => {
|
|
7571
7537
|
|
|
7572
7538
|
const obj = {
|
|
7573
7539
|
frm: _frame,
|
|
@@ -7588,15 +7554,13 @@ function getArrowStartFrame(_frame, _speedOnFrame, _motionOnFrame) {
|
|
|
7588
7554
|
}
|
|
7589
7555
|
|
|
7590
7556
|
return obj;
|
|
7591
|
-
}
|
|
7557
|
+
};
|
|
7592
7558
|
|
|
7593
7559
|
/**
|
|
7594
7560
|
* 個別色変化におけるフリーズアロー(ヒット時)判定
|
|
7595
7561
|
* @param {number} _val
|
|
7596
7562
|
*/
|
|
7597
|
-
|
|
7598
|
-
return (g_headerObj.colorDataType === `` && ((_val >= 40 && _val < 50) || (_val >= 55 && _val < 60) || _val === 61));
|
|
7599
|
-
}
|
|
7563
|
+
const isFrzHitColor = _val => (g_headerObj.colorDataType === `` && ((_val >= 40 && _val < 50) || (_val >= 55 && _val < 60) || _val === 61));
|
|
7600
7564
|
|
|
7601
7565
|
/**
|
|
7602
7566
|
* 速度を加味したフリーズアローの長さを取得
|
|
@@ -7604,19 +7568,19 @@ function isFrzHitColor(_val) {
|
|
|
7604
7568
|
* @param {number} _startFrame
|
|
7605
7569
|
* @param {number} _endFrame
|
|
7606
7570
|
*/
|
|
7607
|
-
|
|
7571
|
+
const getFrzLength = (_speedOnFrame, _startFrame, _endFrame) => {
|
|
7608
7572
|
let frzLength = 0;
|
|
7609
7573
|
|
|
7610
7574
|
for (let frm = _startFrame; frm < _endFrame; frm++) {
|
|
7611
7575
|
frzLength += _speedOnFrame[frm];
|
|
7612
7576
|
}
|
|
7613
7577
|
return frzLength;
|
|
7614
|
-
}
|
|
7578
|
+
};
|
|
7615
7579
|
|
|
7616
7580
|
/**
|
|
7617
7581
|
* キーパターン(デフォルト)に対応する矢印番号を格納
|
|
7618
7582
|
*/
|
|
7619
|
-
|
|
7583
|
+
const convertreplaceNums = _ => {
|
|
7620
7584
|
const tkObj = getKeyInfo();
|
|
7621
7585
|
const baseCharas = g_keyObj[`chara${g_keyObj.currentKey}_0`];
|
|
7622
7586
|
const convCharas = g_keyObj[`chara${tkObj.keyCtrlPtn}`];
|
|
@@ -7631,7 +7595,7 @@ function convertreplaceNums() {
|
|
|
7631
7595
|
}
|
|
7632
7596
|
}
|
|
7633
7597
|
}
|
|
7634
|
-
}
|
|
7598
|
+
};
|
|
7635
7599
|
|
|
7636
7600
|
/**
|
|
7637
7601
|
* 色情報の格納
|
|
@@ -7641,7 +7605,7 @@ function convertreplaceNums() {
|
|
|
7641
7605
|
* @param {string} _colorCd
|
|
7642
7606
|
* @param {string} _allFlg
|
|
7643
7607
|
*/
|
|
7644
|
-
|
|
7608
|
+
const pushColors = (_header, _frame, _val, _colorCd, _allFlg) => {
|
|
7645
7609
|
|
|
7646
7610
|
const tkObj = getKeyInfo();
|
|
7647
7611
|
const grdFlg = (g_colorType === `Type0` ? !g_headerObj.defaultColorgrd[0] : g_headerObj.defaultColorgrd[0])
|
|
@@ -7741,7 +7705,7 @@ function pushColors(_header, _frame, _val, _colorCd, _allFlg) {
|
|
|
7741
7705
|
}
|
|
7742
7706
|
|
|
7743
7707
|
enabledAll(...allUseTypes);
|
|
7744
|
-
}
|
|
7708
|
+
};
|
|
7745
7709
|
|
|
7746
7710
|
/**
|
|
7747
7711
|
* CSSモーション情報の格納
|
|
@@ -7751,7 +7715,7 @@ function pushColors(_header, _frame, _val, _colorCd, _allFlg) {
|
|
|
7751
7715
|
* @param {string} _styleName
|
|
7752
7716
|
* @param {string} _styleNameRev
|
|
7753
7717
|
*/
|
|
7754
|
-
|
|
7718
|
+
const pushCssMotions = (_header, _frame, _val, _styleName, _styleNameRev) => {
|
|
7755
7719
|
|
|
7756
7720
|
const camelHeader = toCapitalize(_header);
|
|
7757
7721
|
const tkObj = getKeyInfo();
|
|
@@ -7775,12 +7739,12 @@ function pushCssMotions(_header, _frame, _val, _styleName, _styleNameRev) {
|
|
|
7775
7739
|
}
|
|
7776
7740
|
}
|
|
7777
7741
|
}
|
|
7778
|
-
}
|
|
7742
|
+
};
|
|
7779
7743
|
|
|
7780
7744
|
/**
|
|
7781
7745
|
* メイン画面前の初期化処理
|
|
7782
7746
|
*/
|
|
7783
|
-
|
|
7747
|
+
const getArrowSettings = _ => {
|
|
7784
7748
|
|
|
7785
7749
|
g_attrObj = {};
|
|
7786
7750
|
const tkObj = getKeyInfo();
|
|
@@ -7910,7 +7874,7 @@ function getArrowSettings() {
|
|
|
7910
7874
|
g_keyObj.prevKey = g_keyObj.currentKey;
|
|
7911
7875
|
g_canLoadDifInfoFlg = false;
|
|
7912
7876
|
}
|
|
7913
|
-
}
|
|
7877
|
+
};
|
|
7914
7878
|
|
|
7915
7879
|
/**
|
|
7916
7880
|
* キーコンフィグ保存処理
|
|
@@ -7918,7 +7882,7 @@ function getArrowSettings() {
|
|
|
7918
7882
|
* @param {number} _keyNum
|
|
7919
7883
|
* @param {string} _keyCtrlPtn
|
|
7920
7884
|
*/
|
|
7921
|
-
|
|
7885
|
+
const setKeyCtrl = (_localStorage, _keyNum, _keyCtrlPtn) => {
|
|
7922
7886
|
const localPtn = `${g_keyObj.currentKey}_-1`;
|
|
7923
7887
|
const keyCtrl = [...Array(_keyNum)].map(_ => []);
|
|
7924
7888
|
for (let j = 0; j < _keyNum; j++) {
|
|
@@ -7934,7 +7898,7 @@ function setKeyCtrl(_localStorage, _keyNum, _keyCtrlPtn) {
|
|
|
7934
7898
|
}
|
|
7935
7899
|
}
|
|
7936
7900
|
return keyCtrl;
|
|
7937
|
-
}
|
|
7901
|
+
};
|
|
7938
7902
|
|
|
7939
7903
|
/*-----------------------------------------------------------*/
|
|
7940
7904
|
/* Scene : MAIN [banana] */
|
|
@@ -7943,7 +7907,7 @@ function setKeyCtrl(_localStorage, _keyNum, _keyCtrlPtn) {
|
|
|
7943
7907
|
/**
|
|
7944
7908
|
* メイン画面初期化
|
|
7945
7909
|
*/
|
|
7946
|
-
|
|
7910
|
+
const MainInit = _ => {
|
|
7947
7911
|
clearWindow(true, `Main`);
|
|
7948
7912
|
const divRoot = document.querySelector(`#divRoot`);
|
|
7949
7913
|
document.oncontextmenu = _ => false;
|
|
@@ -8394,7 +8358,7 @@ function MainInit() {
|
|
|
8394
8358
|
},
|
|
8395
8359
|
|
|
8396
8360
|
ON: (_keyCode) => { },
|
|
8397
|
-
}
|
|
8361
|
+
};
|
|
8398
8362
|
|
|
8399
8363
|
// キー操作イベント
|
|
8400
8364
|
document.onkeydown = evt => {
|
|
@@ -8446,7 +8410,7 @@ function MainInit() {
|
|
|
8446
8410
|
}
|
|
8447
8411
|
}
|
|
8448
8412
|
return blockCode(setCode);
|
|
8449
|
-
}
|
|
8413
|
+
};
|
|
8450
8414
|
|
|
8451
8415
|
/**
|
|
8452
8416
|
* キーを離したときの処理
|
|
@@ -8468,7 +8432,7 @@ function MainInit() {
|
|
|
8468
8432
|
const setCode = transCode(evt.code);
|
|
8469
8433
|
g_inputKeyBuffer[setCode] = false;
|
|
8470
8434
|
mainKeyUpActFunc[g_stateObj.autoAll]();
|
|
8471
|
-
}
|
|
8435
|
+
};
|
|
8472
8436
|
|
|
8473
8437
|
/**
|
|
8474
8438
|
* 全体色変化(矢印)
|
|
@@ -8708,22 +8672,10 @@ function MainInit() {
|
|
|
8708
8672
|
* @param _j 矢印の位置
|
|
8709
8673
|
*/
|
|
8710
8674
|
const checkKeyUpFunc = {
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
|
|
8714
|
-
|
|
8715
|
-
|
|
8716
|
-
frzON: (_j) => {
|
|
8717
|
-
return true;
|
|
8718
|
-
},
|
|
8719
|
-
|
|
8720
|
-
dummyFrzOFF: (_j) => {
|
|
8721
|
-
return true;
|
|
8722
|
-
},
|
|
8723
|
-
|
|
8724
|
-
dummyFrzON: (_j) => {
|
|
8725
|
-
return true;
|
|
8726
|
-
},
|
|
8675
|
+
frzOFF: (_j) => g_workObj.keyHitFlg[_j].find(flg => flg),
|
|
8676
|
+
frzON: (_j) => true,
|
|
8677
|
+
dummyFrzOFF: (_j) => true,
|
|
8678
|
+
dummyFrzON: (_j) => true,
|
|
8727
8679
|
};
|
|
8728
8680
|
|
|
8729
8681
|
/**
|
|
@@ -8733,7 +8685,7 @@ function MainInit() {
|
|
|
8733
8685
|
* @param {string} _name 矢印名
|
|
8734
8686
|
* @param {string} _color 矢印色
|
|
8735
8687
|
*/
|
|
8736
|
-
|
|
8688
|
+
const makeArrow = (_j, _arrowCnt, _name, _color) => {
|
|
8737
8689
|
const boostSpdDir = g_workObj.boostSpd * g_workObj.scrollDir[_j];
|
|
8738
8690
|
const dividePos = g_workObj.dividePos[_j];
|
|
8739
8691
|
const colorPos = g_keyObj[`color${keyCtrlPtn}`][_j];
|
|
@@ -8776,7 +8728,7 @@ function MainInit() {
|
|
|
8776
8728
|
stepRoot.appendChild(createColorObject2(`${_name}Top${_j}_${_arrowCnt}`, {
|
|
8777
8729
|
background: _color, rotate: g_workObj.arrowRtn[_j],
|
|
8778
8730
|
}));
|
|
8779
|
-
}
|
|
8731
|
+
};
|
|
8780
8732
|
|
|
8781
8733
|
/**
|
|
8782
8734
|
* 矢印移動メイン
|
|
@@ -8784,7 +8736,7 @@ function MainInit() {
|
|
|
8784
8736
|
* @param {number} _k
|
|
8785
8737
|
* @param {string} _name
|
|
8786
8738
|
*/
|
|
8787
|
-
|
|
8739
|
+
const movArrow = (_j, _k, _name) => {
|
|
8788
8740
|
const arrowName = `${_name}${_j}_${_k}`;
|
|
8789
8741
|
|
|
8790
8742
|
// 全体色変化 (移動時)
|
|
@@ -8799,7 +8751,7 @@ function MainInit() {
|
|
|
8799
8751
|
g_attrObj[arrowName].boostCnt--;
|
|
8800
8752
|
}
|
|
8801
8753
|
judgeMotionFunc[`${_name}${g_stateObj.autoAll}`](_j, arrowName, --g_attrObj[arrowName].cnt);
|
|
8802
|
-
}
|
|
8754
|
+
};
|
|
8803
8755
|
|
|
8804
8756
|
/**
|
|
8805
8757
|
* フリーズアロー生成
|
|
@@ -8809,7 +8761,7 @@ function MainInit() {
|
|
|
8809
8761
|
* @param {string} _normalColor
|
|
8810
8762
|
* @param {string} _barColor
|
|
8811
8763
|
*/
|
|
8812
|
-
|
|
8764
|
+
const makeFrzArrow = (_j, _arrowCnt, _name, _normalColor, _barColor) => {
|
|
8813
8765
|
const boostSpdDir = g_workObj.boostSpd * g_workObj.scrollDir[_j];
|
|
8814
8766
|
const dividePos = g_workObj.dividePos[_j];
|
|
8815
8767
|
const frzNo = `${_j}_${_arrowCnt}`;
|
|
@@ -8876,7 +8828,7 @@ function MainInit() {
|
|
|
8876
8828
|
}),
|
|
8877
8829
|
|
|
8878
8830
|
);
|
|
8879
|
-
}
|
|
8831
|
+
};
|
|
8880
8832
|
|
|
8881
8833
|
/**
|
|
8882
8834
|
* フリーズアロー処理メイン
|
|
@@ -8884,7 +8836,7 @@ function MainInit() {
|
|
|
8884
8836
|
* @param {number} _k
|
|
8885
8837
|
* @param {string} _name
|
|
8886
8838
|
*/
|
|
8887
|
-
|
|
8839
|
+
const movFrzArrow = (_j, _k, _name) => {
|
|
8888
8840
|
const frzNo = `${_j}_${_k}`;
|
|
8889
8841
|
const frzName = `${_name}${frzNo}`;
|
|
8890
8842
|
const movY = g_workObj.currentSpeed * g_attrObj[frzName].boostSpd;
|
|
@@ -8943,12 +8895,12 @@ function MainInit() {
|
|
|
8943
8895
|
judgeObjDelete[_name](_j, frzName);
|
|
8944
8896
|
}
|
|
8945
8897
|
}
|
|
8946
|
-
}
|
|
8898
|
+
};
|
|
8947
8899
|
|
|
8948
8900
|
/**
|
|
8949
8901
|
* フレーム処理(譜面台)
|
|
8950
8902
|
*/
|
|
8951
|
-
|
|
8903
|
+
const flowTimeline = _ => {
|
|
8952
8904
|
|
|
8953
8905
|
const currentFrame = g_scoreObj.frameNum;
|
|
8954
8906
|
lblframe.textContent = currentFrame;
|
|
@@ -9187,7 +9139,7 @@ function MainInit() {
|
|
|
9187
9139
|
g_scoreObj.nominalFrameNum++;
|
|
9188
9140
|
g_timeoutEvtId = setTimeout(_ => flowTimeline(), 1000 / g_fps - buffTime);
|
|
9189
9141
|
}
|
|
9190
|
-
}
|
|
9142
|
+
};
|
|
9191
9143
|
g_skinJsObj.main.forEach(func => func());
|
|
9192
9144
|
|
|
9193
9145
|
g_audio.currentTime = firstFrame / g_fps * g_headerObj.playbackRate;
|
|
@@ -9201,14 +9153,14 @@ function MainInit() {
|
|
|
9201
9153
|
}
|
|
9202
9154
|
|
|
9203
9155
|
g_timeoutEvtId = setTimeout(_ => flowTimeline(), 1000 / g_fps);
|
|
9204
|
-
}
|
|
9156
|
+
};
|
|
9205
9157
|
|
|
9206
9158
|
/**
|
|
9207
9159
|
* アルファマスクの再描画 (Appearance: Hidden+, Sudden+ 用)
|
|
9208
9160
|
* @param {string} _appearance
|
|
9209
9161
|
* @param {number} _num
|
|
9210
9162
|
*/
|
|
9211
|
-
|
|
9163
|
+
const changeAppearanceFilter = (_appearance, _num = 10) => {
|
|
9212
9164
|
const topNum = g_hidSudObj[g_stateObj.appearance];
|
|
9213
9165
|
const bottomNum = (g_hidSudObj[g_stateObj.appearance] + 1) % 2;
|
|
9214
9166
|
if (_appearance === `Hid&Sud+` && _num > 50) {
|
|
@@ -9237,7 +9189,7 @@ function changeAppearanceFilter(_appearance, _num = 10) {
|
|
|
9237
9189
|
}
|
|
9238
9190
|
g_hidSudObj.filterPos = _num;
|
|
9239
9191
|
}
|
|
9240
|
-
}
|
|
9192
|
+
};
|
|
9241
9193
|
|
|
9242
9194
|
/**
|
|
9243
9195
|
* 判定カウンタ表示作成
|
|
@@ -9247,13 +9199,13 @@ function changeAppearanceFilter(_appearance, _num = 10) {
|
|
|
9247
9199
|
* @param {number} _heightPos
|
|
9248
9200
|
* @param {string, number} _text
|
|
9249
9201
|
*/
|
|
9250
|
-
|
|
9202
|
+
const makeCounterSymbol = (_id, _x, _class, _heightPos, _text, _display = C_DIS_INHERIT) => {
|
|
9251
9203
|
return createDivCss2Label(_id, _text, {
|
|
9252
9204
|
x: _x, y: C_LEN_JDGCNTS_HEIGHT * _heightPos,
|
|
9253
9205
|
w: C_LEN_JDGCNTS_WIDTH, h: C_LEN_JDGCNTS_HEIGHT, siz: C_SIZ_JDGCNTS, align: C_ALIGN_RIGHT,
|
|
9254
9206
|
display: _display,
|
|
9255
9207
|
}, _class);
|
|
9256
|
-
}
|
|
9208
|
+
};
|
|
9257
9209
|
|
|
9258
9210
|
// TODO: この部分を矢印塗りつぶし部分についても適用できるように関数を見直し
|
|
9259
9211
|
|
|
@@ -9264,7 +9216,7 @@ function makeCounterSymbol(_id, _x, _class, _heightPos, _text, _display = C_DIS_
|
|
|
9264
9216
|
* @param {string} _header
|
|
9265
9217
|
* @param {string} _name
|
|
9266
9218
|
*/
|
|
9267
|
-
|
|
9219
|
+
const changeColors = (_mkColor, _mkColorCd, _header, _name) => {
|
|
9268
9220
|
|
|
9269
9221
|
if (_mkColor === undefined) {
|
|
9270
9222
|
return;
|
|
@@ -9280,7 +9232,7 @@ function changeColors(_mkColor, _mkColorCd, _header, _name) {
|
|
|
9280
9232
|
}
|
|
9281
9233
|
}
|
|
9282
9234
|
});
|
|
9283
|
-
}
|
|
9235
|
+
};
|
|
9284
9236
|
|
|
9285
9237
|
/**
|
|
9286
9238
|
* 個別モーション
|
|
@@ -9288,7 +9240,7 @@ function changeColors(_mkColor, _mkColorCd, _header, _name) {
|
|
|
9288
9240
|
* @param {string} _name
|
|
9289
9241
|
* @param {number} _frameNum
|
|
9290
9242
|
*/
|
|
9291
|
-
|
|
9243
|
+
const changeCssMotions = (_header, _name, _frameNum) => {
|
|
9292
9244
|
|
|
9293
9245
|
const camelHeader = _header === `` ? _name : `${_header}${toCapitalize(_name)}`;
|
|
9294
9246
|
const frameData = g_workObj[`mk${toCapitalize(camelHeader)}CssMotion`][_frameNum];
|
|
@@ -9300,14 +9252,14 @@ function changeCssMotions(_header, _name, _frameNum) {
|
|
|
9300
9252
|
g_workObj[`mk${toCapitalize(camelHeader)}CssMotionName`][_frameNum][2 * j + g_workObj.dividePos[targetj]];
|
|
9301
9253
|
}
|
|
9302
9254
|
}
|
|
9303
|
-
}
|
|
9255
|
+
};
|
|
9304
9256
|
|
|
9305
9257
|
/**
|
|
9306
9258
|
* フリーズアローヒット時の描画変更
|
|
9307
9259
|
* @param {number} _j
|
|
9308
9260
|
* @param {number} _k
|
|
9309
9261
|
*/
|
|
9310
|
-
|
|
9262
|
+
const changeHitFrz = (_j, _k, _name) => {
|
|
9311
9263
|
const frzNo = `${_j}_${_k}`;
|
|
9312
9264
|
const frzName = `${_name}${frzNo}`;
|
|
9313
9265
|
|
|
@@ -9353,14 +9305,14 @@ function changeHitFrz(_j, _k, _name) {
|
|
|
9353
9305
|
$id(`frzHitTop${_j}`).background = g_workObj.frzHitColors[_j];
|
|
9354
9306
|
}
|
|
9355
9307
|
}
|
|
9356
|
-
}
|
|
9308
|
+
};
|
|
9357
9309
|
|
|
9358
9310
|
/**
|
|
9359
9311
|
* フリーズアロー失敗時の描画変更
|
|
9360
9312
|
* @param {number} _j
|
|
9361
9313
|
* @param {number} _k
|
|
9362
9314
|
*/
|
|
9363
|
-
|
|
9315
|
+
const changeFailedFrz = (_j, _k) => {
|
|
9364
9316
|
const frzNo = `${_j}_${_k}`;
|
|
9365
9317
|
$id(`frzHit${_j}`).opacity = 0;
|
|
9366
9318
|
$id(`frzTop${frzNo}`).display = C_DIS_INHERIT;
|
|
@@ -9374,28 +9326,19 @@ function changeFailedFrz(_j, _k) {
|
|
|
9374
9326
|
$id(`frzTopShadow${frzNo}`).background = `#333333`;
|
|
9375
9327
|
$id(`frzBtmShadow${frzNo}`).background = `#333333`;
|
|
9376
9328
|
}
|
|
9377
|
-
}
|
|
9329
|
+
};
|
|
9378
9330
|
|
|
9379
9331
|
/**
|
|
9380
9332
|
* キーを押したかどうかを判定
|
|
9381
9333
|
* @param {number} _keyCode
|
|
9382
9334
|
*/
|
|
9383
|
-
|
|
9384
|
-
return g_inputKeyBuffer[_keyCode];
|
|
9385
|
-
}
|
|
9386
|
-
|
|
9387
|
-
const jdgList = [`ii`, `shakin`, `matari`, `shobon`].map(jdg => toCapitalize(jdg));
|
|
9388
|
-
const jdgFuncList = [judgeIi, judgeShakin, judgeMatari, judgeShobon];
|
|
9389
|
-
const checkJudgment = (_difCnt) => {
|
|
9390
|
-
const idx = g_judgObj.arrowJ.findIndex(jdgCnt => _difCnt <= jdgCnt);
|
|
9391
|
-
return [jdgFuncList[idx], jdgList[idx]];
|
|
9392
|
-
};
|
|
9335
|
+
const keyIsDown = _keyCode => g_inputKeyBuffer[_keyCode];
|
|
9393
9336
|
|
|
9394
9337
|
/**
|
|
9395
9338
|
* 矢印・フリーズアロー判定
|
|
9396
9339
|
* @param {number} _j 対象矢印・フリーズアロー
|
|
9397
9340
|
*/
|
|
9398
|
-
|
|
9341
|
+
const judgeArrow = _j => {
|
|
9399
9342
|
|
|
9400
9343
|
const currentNo = g_workObj.judgArrowCnt[_j];
|
|
9401
9344
|
const arrowName = `arrow${_j}_${currentNo}`;
|
|
@@ -9440,7 +9383,7 @@ function judgeArrow(_j) {
|
|
|
9440
9383
|
return true;
|
|
9441
9384
|
}
|
|
9442
9385
|
return false;
|
|
9443
|
-
}
|
|
9386
|
+
};
|
|
9444
9387
|
|
|
9445
9388
|
let judgeFlg = false;
|
|
9446
9389
|
const difFrame = (existJudgArrow ? g_attrObj[arrowName].cnt : Infinity);
|
|
@@ -9453,14 +9396,14 @@ function judgeArrow(_j) {
|
|
|
9453
9396
|
if (!judgeFlg) {
|
|
9454
9397
|
$id(`stepDiv${_j}`).display = C_DIS_INHERIT;
|
|
9455
9398
|
}
|
|
9456
|
-
}
|
|
9399
|
+
};
|
|
9457
9400
|
|
|
9458
9401
|
/**
|
|
9459
9402
|
* タイミングズレを表示
|
|
9460
9403
|
* @param {number} _difFrame
|
|
9461
9404
|
* @param {number} _justFrames
|
|
9462
9405
|
*/
|
|
9463
|
-
|
|
9406
|
+
const displayDiff = (_difFrame, _justFrames = 0) => {
|
|
9464
9407
|
let diffJDisp = ``;
|
|
9465
9408
|
g_workObj.diffList.push(_difFrame);
|
|
9466
9409
|
const difCnt = Math.abs(_difFrame);
|
|
@@ -9470,26 +9413,26 @@ function displayDiff(_difFrame, _justFrames = 0) {
|
|
|
9470
9413
|
diffJDisp = `<span class="common_shobon">Slow ${difCnt} Frames</span>`;
|
|
9471
9414
|
}
|
|
9472
9415
|
diffJ.innerHTML = diffJDisp;
|
|
9473
|
-
}
|
|
9416
|
+
};
|
|
9474
9417
|
|
|
9475
9418
|
/**
|
|
9476
9419
|
* Fast/Slowカウンタ
|
|
9477
9420
|
* @param {number} _difFrame
|
|
9478
9421
|
* @param {number} _justFrames
|
|
9479
9422
|
*/
|
|
9480
|
-
|
|
9423
|
+
const countFastSlow = (_difFrame, _justFrames = 0) => {
|
|
9481
9424
|
if (_difFrame > _justFrames) {
|
|
9482
9425
|
g_resultObj.fast++;
|
|
9483
9426
|
} else if (_difFrame < _justFrames * (-1)) {
|
|
9484
9427
|
g_resultObj.slow++;
|
|
9485
9428
|
}
|
|
9486
|
-
}
|
|
9429
|
+
};
|
|
9487
9430
|
|
|
9488
9431
|
/**
|
|
9489
9432
|
* ライフゲージバーの色、数値を変更
|
|
9490
9433
|
* @param {string} _state
|
|
9491
9434
|
*/
|
|
9492
|
-
|
|
9435
|
+
const changeLifeColor = (_state = ``) => {
|
|
9493
9436
|
const lblLife = document.querySelector(`#lblLife`);
|
|
9494
9437
|
const lifeBar = document.querySelector(`#lifeBar`);
|
|
9495
9438
|
if (_state !== ``) {
|
|
@@ -9504,9 +9447,9 @@ function changeLifeColor(_state = ``) {
|
|
|
9504
9447
|
lblLife.textContent = intLifeVal;
|
|
9505
9448
|
lifeBar.style.top = `${50 + (g_sHeight - 100) * (g_headerObj.maxLifeVal - intLifeVal) / g_headerObj.maxLifeVal}px`;
|
|
9506
9449
|
lifeBar.style.height = `${(g_sHeight - 100) * intLifeVal / g_headerObj.maxLifeVal}px`;
|
|
9507
|
-
}
|
|
9450
|
+
};
|
|
9508
9451
|
|
|
9509
|
-
|
|
9452
|
+
const lifeRecovery = _ => {
|
|
9510
9453
|
g_workObj.lifeVal += g_workObj.lifeRcv;
|
|
9511
9454
|
|
|
9512
9455
|
if (g_workObj.lifeVal >= g_headerObj.maxLifeVal) {
|
|
@@ -9515,9 +9458,9 @@ function lifeRecovery() {
|
|
|
9515
9458
|
} else {
|
|
9516
9459
|
changeLifeColor(g_workObj.lifeVal >= g_workObj.lifeBorder ? `Cleared` : ``);
|
|
9517
9460
|
}
|
|
9518
|
-
}
|
|
9461
|
+
};
|
|
9519
9462
|
|
|
9520
|
-
|
|
9463
|
+
const lifeDamage = _ => {
|
|
9521
9464
|
g_workObj.lifeVal -= g_workObj.lifeDmg;
|
|
9522
9465
|
|
|
9523
9466
|
if (g_workObj.lifeVal <= 0) {
|
|
@@ -9526,7 +9469,7 @@ function lifeDamage() {
|
|
|
9526
9469
|
} else {
|
|
9527
9470
|
changeLifeColor(g_workObj.lifeVal < g_workObj.lifeBorder ? `Failed` : `Cleared`);
|
|
9528
9471
|
}
|
|
9529
|
-
}
|
|
9472
|
+
};
|
|
9530
9473
|
|
|
9531
9474
|
/**
|
|
9532
9475
|
* 判定キャラクタの表示、判定済矢印数・判定数のカウンタ
|
|
@@ -9534,31 +9477,31 @@ function lifeDamage() {
|
|
|
9534
9477
|
* @param {string} _character
|
|
9535
9478
|
* @param {string} _freezeFlg
|
|
9536
9479
|
*/
|
|
9537
|
-
|
|
9480
|
+
const changeJudgeCharacter = (_name, _character, _freezeFlg = ``) => {
|
|
9538
9481
|
g_resultObj[_name]++;
|
|
9539
9482
|
g_currentArrows++;
|
|
9540
9483
|
document.querySelector(`#chara${_freezeFlg}J`).innerHTML = `<span class="common_${_name}">${_character}</span>`;
|
|
9541
9484
|
document.querySelector(`#chara${_freezeFlg}J`).setAttribute(`cnt`, C_FRM_JDGMOTION);
|
|
9542
9485
|
document.querySelector(`#lbl${toCapitalize(_name)}`).textContent = g_resultObj[_name];
|
|
9543
|
-
}
|
|
9486
|
+
};
|
|
9544
9487
|
|
|
9545
9488
|
/**
|
|
9546
9489
|
* コンボの更新
|
|
9547
9490
|
*/
|
|
9548
|
-
|
|
9491
|
+
const updateCombo = _ => {
|
|
9549
9492
|
if (++g_resultObj.combo > g_resultObj.maxCombo) {
|
|
9550
9493
|
g_resultObj.maxCombo = g_resultObj.combo;
|
|
9551
9494
|
lblMCombo.textContent = g_resultObj.maxCombo;
|
|
9552
9495
|
}
|
|
9553
9496
|
comboJ.textContent = `${g_resultObj.combo} Combo!!`;
|
|
9554
|
-
}
|
|
9497
|
+
};
|
|
9555
9498
|
|
|
9556
9499
|
/**
|
|
9557
9500
|
* 回復判定の共通処理
|
|
9558
9501
|
* @param {string} _name
|
|
9559
9502
|
* @param {number} _difFrame
|
|
9560
9503
|
*/
|
|
9561
|
-
|
|
9504
|
+
const judgeRecovery = (_name, _difFrame) => {
|
|
9562
9505
|
changeJudgeCharacter(_name, g_lblNameObj[`j_${_name}`]);
|
|
9563
9506
|
|
|
9564
9507
|
updateCombo();
|
|
@@ -9568,73 +9511,65 @@ function judgeRecovery(_name, _difFrame) {
|
|
|
9568
9511
|
finishViewing();
|
|
9569
9512
|
|
|
9570
9513
|
g_customJsObj[`judg_${_name}`].forEach(func => func(_difFrame));
|
|
9571
|
-
}
|
|
9514
|
+
};
|
|
9572
9515
|
|
|
9573
9516
|
/**
|
|
9574
9517
|
* ダメージ系共通処理
|
|
9575
9518
|
* @param {string} _name
|
|
9576
9519
|
* @param {number} _difFrame
|
|
9577
9520
|
*/
|
|
9578
|
-
|
|
9521
|
+
const judgeDamage = (_name, _difFrame) => {
|
|
9579
9522
|
changeJudgeCharacter(_name, g_lblNameObj[`j_${_name}`]);
|
|
9580
9523
|
g_resultObj.combo = 0;
|
|
9581
9524
|
comboJ.textContent = ``;
|
|
9582
9525
|
diffJ.textContent = ``;
|
|
9583
9526
|
lifeDamage();
|
|
9584
9527
|
g_customJsObj[`judg_${_name}`].forEach(func => func(_difFrame));
|
|
9585
|
-
}
|
|
9528
|
+
};
|
|
9586
9529
|
|
|
9587
9530
|
/**
|
|
9588
9531
|
* 判定処理:イイ
|
|
9589
|
-
* @param {number}
|
|
9532
|
+
* @param {number} _difFrame
|
|
9590
9533
|
*/
|
|
9591
|
-
|
|
9592
|
-
judgeRecovery(`ii`, difFrame);
|
|
9593
|
-
}
|
|
9534
|
+
const judgeIi = _difFrame => judgeRecovery(`ii`, _difFrame);
|
|
9594
9535
|
|
|
9595
9536
|
/**
|
|
9596
9537
|
* 判定処理:シャキン
|
|
9597
|
-
* @param {number}
|
|
9538
|
+
* @param {number} _difFrame
|
|
9598
9539
|
*/
|
|
9599
|
-
|
|
9600
|
-
judgeRecovery(`shakin`, difFrame);
|
|
9601
|
-
}
|
|
9540
|
+
const judgeShakin = _difFrame => judgeRecovery(`shakin`, _difFrame);
|
|
9602
9541
|
|
|
9603
9542
|
/**
|
|
9604
9543
|
* 判定処理:マターリ
|
|
9605
|
-
* @param {number}
|
|
9544
|
+
* @param {number} _difFrame
|
|
9606
9545
|
*/
|
|
9607
|
-
|
|
9546
|
+
const judgeMatari = _difFrame => {
|
|
9608
9547
|
changeJudgeCharacter(`matari`, g_lblNameObj.j_matari);
|
|
9609
9548
|
comboJ.textContent = ``;
|
|
9610
9549
|
|
|
9611
|
-
displayDiff(
|
|
9550
|
+
displayDiff(_difFrame, g_headerObj.justFrames);
|
|
9612
9551
|
finishViewing();
|
|
9613
9552
|
|
|
9614
|
-
g_customJsObj.judg_matari.forEach(func => func(
|
|
9615
|
-
}
|
|
9553
|
+
g_customJsObj.judg_matari.forEach(func => func(_difFrame));
|
|
9554
|
+
};
|
|
9616
9555
|
|
|
9617
9556
|
/**
|
|
9618
9557
|
* 判定処理:ショボーン
|
|
9619
|
-
* @param {number}
|
|
9558
|
+
* @param {number} _difFrame
|
|
9620
9559
|
*/
|
|
9621
|
-
|
|
9622
|
-
judgeDamage(`shobon`, difFrame);
|
|
9623
|
-
}
|
|
9560
|
+
const judgeShobon = _difFrame => judgeDamage(`shobon`, _difFrame);
|
|
9624
9561
|
|
|
9625
9562
|
/**
|
|
9626
9563
|
* 判定処理:ウワァン
|
|
9627
|
-
* @param {number}
|
|
9564
|
+
* @param {number} _difFrame
|
|
9628
9565
|
*/
|
|
9629
|
-
|
|
9630
|
-
judgeDamage(`uwan`, difFrame);
|
|
9631
|
-
}
|
|
9566
|
+
const judgeUwan = _difFrame => judgeDamage(`uwan`, _difFrame);
|
|
9632
9567
|
|
|
9633
9568
|
/**
|
|
9634
9569
|
* 判定処理:キター
|
|
9635
|
-
* @param {number}
|
|
9570
|
+
* @param {number} _difFrame
|
|
9636
9571
|
*/
|
|
9637
|
-
|
|
9572
|
+
const judgeKita = _difFrame => {
|
|
9638
9573
|
changeJudgeCharacter(`kita`, g_lblNameObj.j_kita, `F`);
|
|
9639
9574
|
|
|
9640
9575
|
if (++g_resultObj.fCombo > g_resultObj.fmaxCombo) {
|
|
@@ -9646,22 +9581,29 @@ function judgeKita(difFrame) {
|
|
|
9646
9581
|
lifeRecovery();
|
|
9647
9582
|
finishViewing();
|
|
9648
9583
|
|
|
9649
|
-
g_customJsObj.judg_kita.forEach(func => func(
|
|
9650
|
-
}
|
|
9584
|
+
g_customJsObj.judg_kita.forEach(func => func(_difFrame));
|
|
9585
|
+
};
|
|
9651
9586
|
|
|
9652
9587
|
/**
|
|
9653
9588
|
* 判定処理:イクナイ
|
|
9654
|
-
* @param {number}
|
|
9589
|
+
* @param {number} _difFrame
|
|
9655
9590
|
*/
|
|
9656
|
-
|
|
9591
|
+
const judgeIknai = _difFrame => {
|
|
9657
9592
|
changeJudgeCharacter(`iknai`, g_lblNameObj.j_iknai, `F`);
|
|
9658
9593
|
comboFJ.textContent = ``;
|
|
9659
9594
|
g_resultObj.fCombo = 0;
|
|
9660
9595
|
|
|
9661
9596
|
lifeDamage();
|
|
9662
9597
|
|
|
9663
|
-
g_customJsObj.judg_iknai.forEach(func => func(
|
|
9664
|
-
}
|
|
9598
|
+
g_customJsObj.judg_iknai.forEach(func => func(_difFrame));
|
|
9599
|
+
};
|
|
9600
|
+
|
|
9601
|
+
const jdgList = [`ii`, `shakin`, `matari`, `shobon`].map(jdg => toCapitalize(jdg));
|
|
9602
|
+
const jdgFuncList = [judgeIi, judgeShakin, judgeMatari, judgeShobon];
|
|
9603
|
+
const checkJudgment = (_difCnt) => {
|
|
9604
|
+
const idx = g_judgObj.arrowJ.findIndex(jdgCnt => _difCnt <= jdgCnt);
|
|
9605
|
+
return [jdgFuncList[idx], jdgList[idx]];
|
|
9606
|
+
};
|
|
9665
9607
|
|
|
9666
9608
|
// クリア表示
|
|
9667
9609
|
const resultViewText = _state => _state === `` ? `` :
|
|
@@ -9671,14 +9613,14 @@ const resultViewText = _state => _state === `` ? `` :
|
|
|
9671
9613
|
* フルコンボ・パーフェクト演出の作成
|
|
9672
9614
|
* @param {string} _text
|
|
9673
9615
|
*/
|
|
9674
|
-
|
|
9616
|
+
const makeFinishView = _text => {
|
|
9675
9617
|
finishView.innerHTML = _text;
|
|
9676
9618
|
finishView.style.opacity = 1;
|
|
9677
9619
|
[`charaJ`, `comboJ`, `diffJ`, `charaFJ`, `comboFJ`, `diffFJ`].forEach(label =>
|
|
9678
9620
|
document.querySelector(`#${label}`).textContent = ``);
|
|
9679
|
-
}
|
|
9621
|
+
};
|
|
9680
9622
|
|
|
9681
|
-
|
|
9623
|
+
const finishViewing = _ => {
|
|
9682
9624
|
if (g_currentArrows === g_fullArrows) {
|
|
9683
9625
|
if (g_resultObj.ii + g_resultObj.kita === g_fullArrows) {
|
|
9684
9626
|
g_resultObj.spState = `allPerfect`;
|
|
@@ -9691,7 +9633,7 @@ function finishViewing() {
|
|
|
9691
9633
|
makeFinishView(resultViewText(g_resultObj.spState));
|
|
9692
9634
|
}
|
|
9693
9635
|
}
|
|
9694
|
-
}
|
|
9636
|
+
};
|
|
9695
9637
|
|
|
9696
9638
|
/*-----------------------------------------------------------*/
|
|
9697
9639
|
/* Scene : RESULT [grape] */
|
|
@@ -9700,7 +9642,7 @@ function finishViewing() {
|
|
|
9700
9642
|
/**
|
|
9701
9643
|
* リザルト画面初期化
|
|
9702
9644
|
*/
|
|
9703
|
-
|
|
9645
|
+
const resultInit = _ => {
|
|
9704
9646
|
|
|
9705
9647
|
clearWindow(true);
|
|
9706
9648
|
g_currentPage = `result`;
|
|
@@ -9814,10 +9756,16 @@ function resultInit() {
|
|
|
9814
9756
|
}
|
|
9815
9757
|
|
|
9816
9758
|
const keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`;
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9759
|
+
const transKeyData = hasVal(g_keyObj[`transKey${keyCtrlPtn}`]) ? `(` + g_keyObj[`transKey${keyCtrlPtn}`] + `)` : ``;
|
|
9760
|
+
|
|
9761
|
+
/**
|
|
9762
|
+
* プレイスタイルのカスタム有無
|
|
9763
|
+
* @param {string} _flg
|
|
9764
|
+
* @param {string, boolean} _defaultSet デフォルト値
|
|
9765
|
+
* @param {string} _displayText
|
|
9766
|
+
*/
|
|
9767
|
+
const withOptions = (_flg, _defaultSet, _displayText = _flg) =>
|
|
9768
|
+
(_flg !== _defaultSet ? getStgDetailName(_displayText) : ``);
|
|
9821
9769
|
|
|
9822
9770
|
let difData = [
|
|
9823
9771
|
`${getKeyName(g_headerObj.keyLabels[g_stateObj.scoreId])}${transKeyData} ${getStgDetailName('key')} / ${g_headerObj.difLabels[g_stateObj.scoreId]}`,
|
|
@@ -9875,16 +9823,6 @@ function resultInit() {
|
|
|
9875
9823
|
makeCssResultPlayData(`lblDisplay2Data`, 60, g_cssObj.result_style, 5, display2Data),
|
|
9876
9824
|
);
|
|
9877
9825
|
|
|
9878
|
-
/**
|
|
9879
|
-
* プレイスタイルのカスタム有無
|
|
9880
|
-
* @param {string} _flg
|
|
9881
|
-
* @param {string, boolean} _defaultSet デフォルト値
|
|
9882
|
-
* @param {string} _displayText
|
|
9883
|
-
*/
|
|
9884
|
-
function withOptions(_flg, _defaultSet, _displayText = _flg) {
|
|
9885
|
-
return (_flg !== _defaultSet ? getStgDetailName(_displayText) : ``);
|
|
9886
|
-
}
|
|
9887
|
-
|
|
9888
9826
|
// キャラクタ、スコア描画のID共通部、色CSS名、スコア変数名
|
|
9889
9827
|
const jdgScoreObj = {
|
|
9890
9828
|
ii: { pos: 0, id: `Ii`, color: `ii`, label: g_lblNameObj.j_ii, },
|
|
@@ -10062,18 +10000,19 @@ function resultInit() {
|
|
|
10062
10000
|
tweetMaxCombo += `-${g_resultObj.fmaxCombo}`;
|
|
10063
10001
|
}
|
|
10064
10002
|
|
|
10065
|
-
let tweetResultTmp = g_headerObj.resultFormat
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
-
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
|
|
10003
|
+
let tweetResultTmp = replaceStr(g_headerObj.resultFormat, [
|
|
10004
|
+
[`[hashTag]`, hashTag],
|
|
10005
|
+
[`[musicTitle]`, musicTitle],
|
|
10006
|
+
[`[keyLabel]`, tweetDifData],
|
|
10007
|
+
[`[maker]`, g_headerObj.tuning],
|
|
10008
|
+
[`[rank]`, rankMark],
|
|
10009
|
+
[`[score]`, g_resultObj.score],
|
|
10010
|
+
[`[playStyle]`, playStyleData],
|
|
10011
|
+
[`[arrowJdg]`, `${g_resultObj.ii}-${g_resultObj.shakin}-${g_resultObj.matari}-${g_resultObj.shobon}-${g_resultObj.uwan}`],
|
|
10012
|
+
[`[frzJdg]`, tweetFrzJdg],
|
|
10013
|
+
[`[maxCombo]`, tweetMaxCombo],
|
|
10014
|
+
[`[url]`, g_isLocal ? `` : `${twiturl.toString()}`.replace(/[\t\n]/g, ``)]
|
|
10015
|
+
]);
|
|
10077
10016
|
if (g_presetObj.resultVals !== undefined) {
|
|
10078
10017
|
Object.keys(g_presetObj.resultVals).forEach(key => {
|
|
10079
10018
|
tweetResultTmp = tweetResultTmp.split(`[${key}]`).join(g_resultObj[g_presetObj.resultVals[key]]);
|
|
@@ -10154,7 +10093,7 @@ function resultInit() {
|
|
|
10154
10093
|
/**
|
|
10155
10094
|
* タイトルのモーション設定
|
|
10156
10095
|
*/
|
|
10157
|
-
|
|
10096
|
+
const flowResultTimeline = _ => {
|
|
10158
10097
|
|
|
10159
10098
|
// ユーザカスタムイベント(フレーム毎)
|
|
10160
10099
|
g_customJsObj.resultEnterFrame.forEach(func => func());
|
|
@@ -10185,7 +10124,7 @@ function resultInit() {
|
|
|
10185
10124
|
g_scoreObj.backResultFrameNum++;
|
|
10186
10125
|
g_scoreObj.maskResultFrameNum++;
|
|
10187
10126
|
g_timeoutEvtResultId = setTimeout(_ => flowResultTimeline(), 1000 / g_fps - buffTime);
|
|
10188
|
-
}
|
|
10127
|
+
};
|
|
10189
10128
|
|
|
10190
10129
|
g_timeoutEvtResultId = setTimeout(_ => flowResultTimeline(), 1000 / g_fps);
|
|
10191
10130
|
|
|
@@ -10194,7 +10133,7 @@ function resultInit() {
|
|
|
10194
10133
|
document.oncontextmenu = _ => true;
|
|
10195
10134
|
|
|
10196
10135
|
g_skinJsObj.result.forEach(func => func());
|
|
10197
|
-
}
|
|
10136
|
+
};
|
|
10198
10137
|
|
|
10199
10138
|
/**
|
|
10200
10139
|
* シャッフル名称の取得
|
|
@@ -10206,7 +10145,7 @@ const getShuffleName = _ => {
|
|
|
10206
10145
|
shuffleName += setScoreIdHeader(g_keycons.shuffleGroupNum);
|
|
10207
10146
|
}
|
|
10208
10147
|
return shuffleName;
|
|
10209
|
-
}
|
|
10148
|
+
};
|
|
10210
10149
|
|
|
10211
10150
|
/**
|
|
10212
10151
|
* 結果表示作成(曲名、オプション)
|
|
@@ -10217,11 +10156,10 @@ const getShuffleName = _ => {
|
|
|
10217
10156
|
* @param {string} _text
|
|
10218
10157
|
* @param {string} _align
|
|
10219
10158
|
*/
|
|
10220
|
-
|
|
10221
|
-
|
|
10159
|
+
const makeCssResultPlayData = (_id, _x, _class, _heightPos, _text, _align = C_ALIGN_CENTER, { w = 400, siz = C_SIZ_MAIN } = {}) =>
|
|
10160
|
+
createDivCss2Label(_id, _text, {
|
|
10222
10161
|
x: _x, y: C_SIZ_SETMINI * _heightPos, w, h: C_SIZ_SETMINI, siz, align: _align,
|
|
10223
10162
|
}, _class);
|
|
10224
|
-
}
|
|
10225
10163
|
|
|
10226
10164
|
/**
|
|
10227
10165
|
* 結果表示作成(キャラクタ)
|
|
@@ -10232,9 +10170,8 @@ function makeCssResultPlayData(_id, _x, _class, _heightPos, _text, _align = C_AL
|
|
|
10232
10170
|
* @param {string} _text
|
|
10233
10171
|
* @param {string} _align
|
|
10234
10172
|
*/
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
}
|
|
10173
|
+
const makeCssResultSymbol = (_id, _x, _class, _heightPos, _text, _align = C_ALIGN_LEFT) =>
|
|
10174
|
+
makeCssResultPlayData(_id, _x, _class, _heightPos, _text, _align, { w: 150, siz: C_SIZ_JDGCNTS });
|
|
10238
10175
|
|
|
10239
10176
|
// ライセンス原文、以下は削除しないでください
|
|
10240
10177
|
/*-----------------------------------------------------------*/
|