danoniplus 37.5.0 → 37.6.1
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 +539 -299
- package/js/lib/danoni_constants.js +107 -209
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2024/09/
|
|
8
|
+
* Revised : 2024/09/25 (v37.6.1)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -160,8 +160,20 @@ const g_windowObj = {
|
|
|
160
160
|
|
|
161
161
|
const g_lblPosObj = {};
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
/**
|
|
164
|
+
* 可変部分のウィンドウサイズを更新
|
|
165
|
+
* - 指定しているプロパティ名は基本的にCSSのスタイル名が使用できる
|
|
166
|
+
* - 特殊な関数及びプロパティについては下記の通り。
|
|
167
|
+
* - g_btnX() :画面横幅を意識せず自動でX座標を設定。引数を入れるとボタン幅×引数だけ位置がずれる。(Default: 0)
|
|
168
|
+
* - g_btnWidth(): 画面横幅を意識せず自動でボタン横幅を設定。引数には倍率を指定する。(Default: 1)
|
|
169
|
+
* @property {number} x
|
|
170
|
+
* @property {number} y
|
|
171
|
+
* @property {number} w
|
|
172
|
+
* @property {number} h
|
|
173
|
+
* @property {number} siz フォントサイズ
|
|
174
|
+
* @property {number} title オンマウス時のメッセージ文
|
|
175
|
+
*/
|
|
176
|
+
const updateWindowSiz = () => {
|
|
165
177
|
Object.assign(g_windowObj, {
|
|
166
178
|
optionSprite: { x: (g_sWidth - 450) / 2, y: 65, w: 450, h: 325 },
|
|
167
179
|
difList: { x: 165, y: 60, w: 280, h: 270 + g_sHeight - 500, overflow: `auto` },
|
|
@@ -455,14 +467,14 @@ const updateWindowSiz = _ => {
|
|
|
455
467
|
|
|
456
468
|
// ウィンドウ位置
|
|
457
469
|
const g_windowAlign = {
|
|
458
|
-
left:
|
|
470
|
+
left: () => {
|
|
459
471
|
$id(`canvas-frame`).marginLeft = `0px`;
|
|
460
472
|
$id(`canvas-frame`).marginRight = `auto`;
|
|
461
473
|
},
|
|
462
|
-
center:
|
|
474
|
+
center: () => {
|
|
463
475
|
$id(`canvas-frame`).margin = `auto`;
|
|
464
476
|
},
|
|
465
|
-
right:
|
|
477
|
+
right: () => {
|
|
466
478
|
$id(`canvas-frame`).marginLeft = `auto`;
|
|
467
479
|
$id(`canvas-frame`).marginRight = `0px`;
|
|
468
480
|
},
|
|
@@ -550,7 +562,7 @@ const resetImgs = (_baseDir = ``, _exp = `svg`) => {
|
|
|
550
562
|
}
|
|
551
563
|
};
|
|
552
564
|
|
|
553
|
-
const reloadImgObj =
|
|
565
|
+
const reloadImgObj = () => {
|
|
554
566
|
g_imgObj.arrow = C_IMG_ARROW;
|
|
555
567
|
g_imgObj.arrowShadow = C_IMG_ARROWSD;
|
|
556
568
|
g_imgObj.onigiri = C_IMG_ONIGIRI;
|
|
@@ -640,6 +652,18 @@ const C_BLOCK_KEYS = [
|
|
|
640
652
|
/**
|
|
641
653
|
* 特殊文字列の置き換えリスト
|
|
642
654
|
* (置き換え元、置き換え先の組で二次元配列として定義。主にreplaceStr関数で使用)
|
|
655
|
+
* - 先に合致したものを置換するため、複雑なパターンは先に配置する必要がある
|
|
656
|
+
*
|
|
657
|
+
* @property {array} escape 特殊文字 -> エスケープ文字列
|
|
658
|
+
* @property {array} escapeTag CW Edition定義の特殊文字列 -> エスケープ文字列
|
|
659
|
+
* @property {array} unEscapeTag エスケープ文字列 -> 特殊文字
|
|
660
|
+
* @property {array} escapeCode 使用禁止文字の無効化
|
|
661
|
+
* @property {array} musicNameSimple 曲名中の改行タグ -> 空白化
|
|
662
|
+
* @property {array} musicNameMultiLine 曲名中の特殊改行タグ -> 通常タグ化
|
|
663
|
+
* @property {array} frzName 矢印データ名 -> フリーズアローデータ名
|
|
664
|
+
* @property {array} keyCtrlName キー割当正式名 -> 略名
|
|
665
|
+
* @property {array} colorPatternName 色変化指定先略名 -> 正式名
|
|
666
|
+
* @property {array} targetPatternName 色変化指定先略名(all) -> 正式適用先(g0~g49)
|
|
643
667
|
*/
|
|
644
668
|
const g_escapeStr = {
|
|
645
669
|
escape: [[`&`, `&`], [`<`, `<`], [`>`, `>`], [`"`, `"`]],
|
|
@@ -998,16 +1022,18 @@ g_settings.opacityNum = g_settings.opacitys.length - 1;
|
|
|
998
1022
|
* 設定画面間移動
|
|
999
1023
|
*/
|
|
1000
1024
|
const g_jumpSettingWindow = {
|
|
1001
|
-
option:
|
|
1002
|
-
difSelector:
|
|
1003
|
-
settingsDisplay:
|
|
1025
|
+
option: () => settingsDisplayInit(),
|
|
1026
|
+
difSelector: () => settingsDisplayInit(),
|
|
1027
|
+
settingsDisplay: () => optionInit(),
|
|
1004
1028
|
};
|
|
1005
1029
|
|
|
1006
1030
|
/**
|
|
1007
1031
|
* シャッフル適用関数
|
|
1032
|
+
* @param {number} keyNum
|
|
1033
|
+
* @param {array} shuffleGroup
|
|
1008
1034
|
*/
|
|
1009
1035
|
const g_shuffleFunc = {
|
|
1010
|
-
'OFF':
|
|
1036
|
+
'OFF': () => true,
|
|
1011
1037
|
'Mirror': (keyNum, shuffleGroup) => applyMirror(keyNum, shuffleGroup),
|
|
1012
1038
|
'X-Mirror': (keyNum, shuffleGroup) => applyMirror(keyNum, shuffleGroup, true),
|
|
1013
1039
|
'Turning': (keyNum, shuffleGroup) => applyTurning(keyNum, shuffleGroup),
|
|
@@ -1033,8 +1059,7 @@ const g_shuffleFunc = {
|
|
|
1033
1059
|
|
|
1034
1060
|
/**
|
|
1035
1061
|
* モーション適用関数
|
|
1036
|
-
*
|
|
1037
|
-
* - 配列の15がステップゾーン上、0~14は矢印の枠外管理用
|
|
1062
|
+
* @param {array} frms フレーム別の速度設定用配列。配列の15がステップゾーン上、0~14は矢印の枠外管理用
|
|
1038
1063
|
*/
|
|
1039
1064
|
const g_motionFunc = {
|
|
1040
1065
|
'OFF': _frms => _frms,
|
|
@@ -1088,7 +1113,7 @@ let g_canDisabledSettings = [`motion`, `scroll`, `reverse`, `shuffle`, `autoPlay
|
|
|
1088
1113
|
|
|
1089
1114
|
const g_hidSudFunc = {
|
|
1090
1115
|
filterPos: _filterPos => `${_filterPos}${g_lblNameObj.percent}`,
|
|
1091
|
-
range:
|
|
1116
|
+
range: () => `${Math.round(g_posObj.arrowHeight - g_posObj.stepY)}px`,
|
|
1092
1117
|
hidden: _filterPos => `${Math.min(Math.round(g_posObj.arrowHeight * (100 - _filterPos) / 100), g_posObj.arrowHeight - g_posObj.stepY)}`,
|
|
1093
1118
|
sudden: _filterPos => `${Math.max(Math.round(g_posObj.arrowHeight * (100 - _filterPos) / 100) - g_posObj.stepY, 0)}`,
|
|
1094
1119
|
};
|
|
@@ -1124,10 +1149,10 @@ const g_hidSudObj = {
|
|
|
1124
1149
|
'Hid&Sud+': { OFF: 1, ON: 0, },
|
|
1125
1150
|
},
|
|
1126
1151
|
distH: {
|
|
1127
|
-
'Visible':
|
|
1128
|
-
'Hidden':
|
|
1152
|
+
'Visible': () => ``,
|
|
1153
|
+
'Hidden': () => `${g_hidSudFunc.filterPos(50)} (${g_hidSudFunc.hidden(50)} / ${g_hidSudFunc.range()})`,
|
|
1129
1154
|
'Hidden+': (_filterPos) => `${g_hidSudFunc.filterPos(_filterPos)} (${g_hidSudFunc.hidden(_filterPos)} / ${g_hidSudFunc.range()})`,
|
|
1130
|
-
'Sudden':
|
|
1155
|
+
'Sudden': () => `${g_hidSudFunc.filterPos(40)} (${g_hidSudFunc.sudden(40)} / ${g_hidSudFunc.range()})`,
|
|
1131
1156
|
'Sudden+': (_filterPos) => `${g_hidSudFunc.filterPos(_filterPos)} (${g_hidSudFunc.sudden(_filterPos)} / ${g_hidSudFunc.range()})`,
|
|
1132
1157
|
'Hid&Sud+': (_filterPos) => `${g_hidSudFunc.filterPos(_filterPos)} (${Math.max(g_hidSudFunc.sudden(_filterPos)
|
|
1133
1158
|
- (g_posObj.arrowHeight - g_posObj.stepY - g_hidSudFunc.hidden(_filterPos)), 0)} / ${g_hidSudFunc.range()})`,
|
|
@@ -1165,6 +1190,7 @@ for (let j = 0; j < 260; j++) {
|
|
|
1165
1190
|
g_kCdN[j] = ``;
|
|
1166
1191
|
}
|
|
1167
1192
|
|
|
1193
|
+
// キーボード配列の言語設定
|
|
1168
1194
|
const g_lang_kCd = {
|
|
1169
1195
|
Ja: {
|
|
1170
1196
|
48: `0`,
|
|
@@ -1447,7 +1473,16 @@ const g_kCdObj = {
|
|
|
1447
1473
|
shiftRAltKey: 260,
|
|
1448
1474
|
};
|
|
1449
1475
|
|
|
1450
|
-
|
|
1476
|
+
/**
|
|
1477
|
+
* 画面別ショートカット
|
|
1478
|
+
* - 画面別にオブジェクトを定義し、KeyboardEvent.code別(略記可)にプロパティを定義し処理をidにて割り当てる
|
|
1479
|
+
* - 複数キーの同時押しで反応させる場合は間を"_"で挟む。3つ押しの場合も同様
|
|
1480
|
+
* - 上から順に適用されるため、複数キーのショートカットは先に定義するようにする
|
|
1481
|
+
* @property {string} id 実行対象のボタンのId
|
|
1482
|
+
* @property {boolean} reset リンク先にジャンプする場合でonKeyUpが利かないとき、"true"を指定することで回避
|
|
1483
|
+
* @property {string} dfId 実行対象のボタンのId(デフォルト)
|
|
1484
|
+
* @property {string} exId 実行対象のボタンのId(別パターン)
|
|
1485
|
+
*/
|
|
1451
1486
|
const g_shortcutObj = {
|
|
1452
1487
|
title: {
|
|
1453
1488
|
Enter: { id: `btnStart` },
|
|
@@ -3408,212 +3443,75 @@ const g_skinJsObj = {
|
|
|
3408
3443
|
};
|
|
3409
3444
|
|
|
3410
3445
|
/** 過去関数の互換 */
|
|
3411
|
-
const convertreplaceNums =
|
|
3412
|
-
|
|
3446
|
+
const convertreplaceNums = () => {
|
|
3447
|
+
console.warn('convertreplaceNums is deprecated. Use convertReplaceNums instead.');
|
|
3448
|
+
convertReplaceNums();
|
|
3449
|
+
};
|
|
3450
|
+
const MainInit = () => {
|
|
3451
|
+
console.warn('MainInit is deprecated. Use mainInit instead.');
|
|
3452
|
+
mainInit();
|
|
3453
|
+
};
|
|
3413
3454
|
|
|
3414
3455
|
/**
|
|
3415
3456
|
* 従来のカスタム関数をg_customJsObj, g_skinJsObjへ追加
|
|
3416
3457
|
* - customjsファイルを読み込んだ直後にこの関数を呼び出している
|
|
3417
3458
|
*/
|
|
3418
|
-
const loadLegacyCustomFunc =
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
}
|
|
3444
|
-
if (typeof customOptionInit2 === C_TYP_FUNCTION) {
|
|
3445
|
-
g_customJsObj.option.push(customOptionInit2);
|
|
3446
|
-
}
|
|
3447
|
-
if (typeof skinOptionInit === C_TYP_FUNCTION) {
|
|
3448
|
-
g_skinJsObj.option.push(skinOptionInit);
|
|
3449
|
-
}
|
|
3450
|
-
if (typeof skinOptionInit2 === C_TYP_FUNCTION) {
|
|
3451
|
-
g_skinJsObj.option.push(skinOptionInit2);
|
|
3452
|
-
}
|
|
3453
|
-
|
|
3454
|
-
if (typeof customSetDifficulty === C_TYP_FUNCTION) {
|
|
3455
|
-
g_customJsObj.difficulty.push(customSetDifficulty);
|
|
3456
|
-
}
|
|
3457
|
-
if (typeof customSetDifficulty2 === C_TYP_FUNCTION) {
|
|
3458
|
-
g_customJsObj.difficulty.push(customSetDifficulty2);
|
|
3459
|
-
}
|
|
3460
|
-
|
|
3461
|
-
// ディスプレイ設定
|
|
3462
|
-
if (typeof customSettingsDisplayInit === C_TYP_FUNCTION) {
|
|
3463
|
-
g_customJsObj.settingsDisplay.push(customSettingsDisplayInit);
|
|
3464
|
-
}
|
|
3465
|
-
if (typeof customSettingsDisplayInit2 === C_TYP_FUNCTION) {
|
|
3466
|
-
g_customJsObj.settingsDisplay.push(customSettingsDisplayInit2);
|
|
3467
|
-
}
|
|
3468
|
-
if (typeof skinSettingsDisplayInit === C_TYP_FUNCTION) {
|
|
3469
|
-
g_skinJsObj.settingsDisplay.push(skinSettingsDisplayInit);
|
|
3470
|
-
}
|
|
3471
|
-
if (typeof skinSettingsDisplayInit2 === C_TYP_FUNCTION) {
|
|
3472
|
-
g_skinJsObj.settingsDisplay.push(skinSettingsDisplayInit2);
|
|
3473
|
-
}
|
|
3474
|
-
|
|
3475
|
-
// キーコンフィグ
|
|
3476
|
-
if (typeof customKeyConfigInit === C_TYP_FUNCTION) {
|
|
3477
|
-
g_customJsObj.keyconfig.push(customKeyConfigInit);
|
|
3478
|
-
}
|
|
3479
|
-
if (typeof customKeyConfigInit2 === C_TYP_FUNCTION) {
|
|
3480
|
-
g_customJsObj.keyconfig.push(customKeyConfigInit2);
|
|
3481
|
-
}
|
|
3482
|
-
if (typeof skinKeyConfigInit === C_TYP_FUNCTION) {
|
|
3483
|
-
g_skinJsObj.keyconfig.push(skinKeyConfigInit);
|
|
3484
|
-
}
|
|
3485
|
-
if (typeof skinKeyConfigInit2 === C_TYP_FUNCTION) {
|
|
3486
|
-
g_skinJsObj.keyconfig.push(skinKeyConfigInit2);
|
|
3487
|
-
}
|
|
3488
|
-
|
|
3489
|
-
// ローディング
|
|
3490
|
-
if (typeof customPreloadingInit === C_TYP_FUNCTION) {
|
|
3491
|
-
g_customJsObj.preloading.push(customPreloadingInit);
|
|
3492
|
-
}
|
|
3493
|
-
if (typeof customPreloadingInit2 === C_TYP_FUNCTION) {
|
|
3494
|
-
g_customJsObj.preloading.push(customPreloadingInit2);
|
|
3495
|
-
}
|
|
3496
|
-
if (typeof skinPreloadingInit === C_TYP_FUNCTION) {
|
|
3497
|
-
g_skinJsObj.preloading.push(skinPreloadingInit);
|
|
3498
|
-
}
|
|
3499
|
-
if (typeof skinPreloadingInit2 === C_TYP_FUNCTION) {
|
|
3500
|
-
g_skinJsObj.preloading.push(skinPreloadingInit2);
|
|
3501
|
-
}
|
|
3502
|
-
if (typeof customLoadingInit === C_TYP_FUNCTION) {
|
|
3503
|
-
g_customJsObj.loading.push(customLoadingInit);
|
|
3504
|
-
}
|
|
3505
|
-
if (typeof customLoadingInit2 === C_TYP_FUNCTION) {
|
|
3506
|
-
g_customJsObj.loading.push(customLoadingInit2);
|
|
3507
|
-
}
|
|
3508
|
-
if (typeof customLoadingProgress === C_TYP_FUNCTION) {
|
|
3509
|
-
g_customJsObj.progress.push(customLoadingProgress);
|
|
3510
|
-
}
|
|
3511
|
-
if (typeof customLoadingProgress2 === C_TYP_FUNCTION) {
|
|
3512
|
-
g_customJsObj.progress.push(customLoadingProgress2);
|
|
3513
|
-
}
|
|
3459
|
+
const loadLegacyCustomFunc = () => {
|
|
3460
|
+
|
|
3461
|
+
const customFuncMap = {
|
|
3462
|
+
title: [`customTitleInit`, `customTitleInit2`],
|
|
3463
|
+
titleEnterFrame: [`customTitleEnterFrame`, `customTitleEnterFrame2`],
|
|
3464
|
+
option: [`customOptionInit`, `customOptionInit2`],
|
|
3465
|
+
difficulty: [`customSetDifficulty`, `customSetDifficulty2`],
|
|
3466
|
+
settingsDisplay: [`customSettingsDisplayInit`, `customSettingsDisplayInit2`],
|
|
3467
|
+
keyconfig: [`customKeyConfigInit`, `customKeyConfigInit2`],
|
|
3468
|
+
preloading: [`customPreloadingInit`, `customPreloadingInit2`],
|
|
3469
|
+
loading: [`customLoadingInit`, `customLoadingInit2`],
|
|
3470
|
+
progress: [`customLoadingProgress`, `customLoadingProgress2`],
|
|
3471
|
+
main: [`customMainInit`, `customMainInit2`],
|
|
3472
|
+
dummyArrow: [`customJudgeDummyArrow`, `customJudgeDummyArrow2`],
|
|
3473
|
+
dummyFrz: [`customJudgeDummyFrz`, `customJudgeDummyFrz2`],
|
|
3474
|
+
mainEnterFrame: [`customMainEnterFrame`, `customMainEnterFrame2`],
|
|
3475
|
+
judg_ii: [`customJudgeIi`, `customJudgeIi2`],
|
|
3476
|
+
judg_shakin: [`customJudgeShakin`, `customJudgeShakin2`],
|
|
3477
|
+
judg_matari: [`customJudgeMatari`, `customJudgeMatari2`],
|
|
3478
|
+
judg_shobon: [`customJudgeShobon`, `customJudgeShobon2`],
|
|
3479
|
+
judg_uwan: [`customJudgeUwan`, `customJudgeUwan2`],
|
|
3480
|
+
judg_kita: [`customJudgeKita`, `customJudgeKita2`],
|
|
3481
|
+
judg_iknai: [`customJudgeIknai`, `customJudgeIknai2`],
|
|
3482
|
+
result: [`customResultInit`, `customResultInit2`],
|
|
3483
|
+
resultEnterFrame: [`customResultEnterFrame`, `customResultEnterFrame2`],
|
|
3484
|
+
};
|
|
3514
3485
|
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
}
|
|
3525
|
-
if (typeof customJudgeDummyArrow2 === C_TYP_FUNCTION) {
|
|
3526
|
-
g_customJsObj.dummyArrow.push(customJudgeDummyArrow2);
|
|
3527
|
-
}
|
|
3528
|
-
if (typeof customJudgeDummyFrz === C_TYP_FUNCTION) {
|
|
3529
|
-
g_customJsObj.dummyFrz.push(customJudgeDummyFrz);
|
|
3530
|
-
}
|
|
3531
|
-
if (typeof customJudgeDummyFrz2 === C_TYP_FUNCTION) {
|
|
3532
|
-
g_customJsObj.dummyFrz.push(customJudgeDummyFrz2);
|
|
3533
|
-
}
|
|
3534
|
-
if (typeof customMainEnterFrame === C_TYP_FUNCTION) {
|
|
3535
|
-
g_customJsObj.mainEnterFrame.push(customMainEnterFrame);
|
|
3536
|
-
}
|
|
3537
|
-
if (typeof customMainEnterFrame2 === C_TYP_FUNCTION) {
|
|
3538
|
-
g_customJsObj.mainEnterFrame.push(customMainEnterFrame2);
|
|
3539
|
-
}
|
|
3540
|
-
if (typeof skinMainInit === C_TYP_FUNCTION) {
|
|
3541
|
-
g_skinJsObj.main.push(skinMainInit);
|
|
3542
|
-
}
|
|
3543
|
-
if (typeof skinMainInit2 === C_TYP_FUNCTION) {
|
|
3544
|
-
g_skinJsObj.main.push(skinMainInit2);
|
|
3545
|
-
}
|
|
3486
|
+
const skinFuncMap = {
|
|
3487
|
+
title: [`skinTitleInit`, `skinTitleInit2`],
|
|
3488
|
+
option: [`skinOptionInit`, `skinOptionInit2`],
|
|
3489
|
+
settingsDisplay: [`skinSettingsDisplayInit`, `skinSettingsDisplayInit2`],
|
|
3490
|
+
keyconfig: [`skinKeyConfigInit`, `skinKeyConfigInit2`],
|
|
3491
|
+
preloading: [`skinPreloadingInit`, `skinPreloadingInit2`],
|
|
3492
|
+
main: [`skinMainInit`, `skinMainInit2`],
|
|
3493
|
+
result: [`skinResultInit`, `skinResultInit2`],
|
|
3494
|
+
};
|
|
3546
3495
|
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
g_customJsObj.judg_shakin.push(customJudgeShakin);
|
|
3556
|
-
}
|
|
3557
|
-
if (typeof customJudgeShakin2 === C_TYP_FUNCTION) {
|
|
3558
|
-
g_customJsObj.judg_shakin.push(customJudgeShakin2);
|
|
3559
|
-
}
|
|
3560
|
-
if (typeof customJudgeMatari === C_TYP_FUNCTION) {
|
|
3561
|
-
g_customJsObj.judg_matari.push(customJudgeMatari);
|
|
3562
|
-
}
|
|
3563
|
-
if (typeof customJudgeMatari2 === C_TYP_FUNCTION) {
|
|
3564
|
-
g_customJsObj.judg_matari.push(customJudgeMatari2);
|
|
3565
|
-
}
|
|
3566
|
-
if (typeof customJudgeShobon === C_TYP_FUNCTION) {
|
|
3567
|
-
g_customJsObj.judg_shobon.push(customJudgeShobon);
|
|
3568
|
-
}
|
|
3569
|
-
if (typeof customJudgeShobon2 === C_TYP_FUNCTION) {
|
|
3570
|
-
g_customJsObj.judg_shobon.push(customJudgeShobon2);
|
|
3571
|
-
}
|
|
3572
|
-
if (typeof customJudgeUwan === C_TYP_FUNCTION) {
|
|
3573
|
-
g_customJsObj.judg_uwan.push(customJudgeUwan);
|
|
3574
|
-
}
|
|
3575
|
-
if (typeof customJudgeUwan2 === C_TYP_FUNCTION) {
|
|
3576
|
-
g_customJsObj.judg_uwan.push(customJudgeUwan2);
|
|
3577
|
-
}
|
|
3578
|
-
if (typeof customJudgeKita === C_TYP_FUNCTION) {
|
|
3579
|
-
g_customJsObj.judg_kita.push(customJudgeKita);
|
|
3580
|
-
}
|
|
3581
|
-
if (typeof customJudgeKita2 === C_TYP_FUNCTION) {
|
|
3582
|
-
g_customJsObj.judg_kita.push(customJudgeKita2);
|
|
3583
|
-
}
|
|
3584
|
-
if (typeof customJudgeIknai === C_TYP_FUNCTION) {
|
|
3585
|
-
g_customJsObj.judg_iknai.push(customJudgeIknai);
|
|
3586
|
-
}
|
|
3587
|
-
if (typeof customJudgeIknai2 === C_TYP_FUNCTION) {
|
|
3588
|
-
g_customJsObj.judg_iknai.push(customJudgeIknai2);
|
|
3496
|
+
const loadFunctions = (_funcMap, _targetObj) => {
|
|
3497
|
+
Object.entries(_funcMap).forEach(([category, funcNames]) => {
|
|
3498
|
+
funcNames.forEach(funcName => {
|
|
3499
|
+
if (typeof window[funcName] === C_TYP_FUNCTION) {
|
|
3500
|
+
_targetObj[category].push(window[funcName]);
|
|
3501
|
+
}
|
|
3502
|
+
});
|
|
3503
|
+
});
|
|
3589
3504
|
}
|
|
3590
3505
|
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
g_customJsObj.result.push(customResultInit);
|
|
3594
|
-
}
|
|
3595
|
-
if (typeof customResultInit2 === C_TYP_FUNCTION) {
|
|
3596
|
-
g_customJsObj.result.push(customResultInit2);
|
|
3597
|
-
}
|
|
3598
|
-
if (typeof customResultEnterFrame === C_TYP_FUNCTION) {
|
|
3599
|
-
g_customJsObj.resultEnterFrame.push(customResultEnterFrame);
|
|
3600
|
-
}
|
|
3601
|
-
if (typeof customResultEnterFrame2 === C_TYP_FUNCTION) {
|
|
3602
|
-
g_customJsObj.resultEnterFrame.push(customResultEnterFrame2);
|
|
3603
|
-
}
|
|
3604
|
-
if (typeof skinResultInit === C_TYP_FUNCTION) {
|
|
3605
|
-
g_skinJsObj.result.push(skinResultInit);
|
|
3606
|
-
}
|
|
3607
|
-
if (typeof skinResultInit2 === C_TYP_FUNCTION) {
|
|
3608
|
-
g_skinJsObj.result.push(skinResultInit2);
|
|
3609
|
-
}
|
|
3506
|
+
loadFunctions(customFuncMap, g_customJsObj);
|
|
3507
|
+
loadFunctions(skinFuncMap, g_skinJsObj);
|
|
3610
3508
|
};
|
|
3611
3509
|
|
|
3612
3510
|
/**
|
|
3613
3511
|
* 従来の共通設定変数をg_presetObjへ移動
|
|
3614
3512
|
* - settingjsファイルを読み込んだ直後にこの関数を呼び出している
|
|
3615
3513
|
*/
|
|
3616
|
-
const loadLegacySettingFunc =
|
|
3514
|
+
const loadLegacySettingFunc = () => {
|
|
3617
3515
|
|
|
3618
3516
|
if (typeof g_presetTuning === C_TYP_STRING) {
|
|
3619
3517
|
g_presetObj.tuning = g_presetTuning;
|