danoniplus 30.5.0 → 30.6.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 +30 -9
- 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 : 2023/03/
|
|
7
|
+
* Revised : 2023/03/18
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 30.
|
|
12
|
-
const g_revisedDate = `2023/03/
|
|
11
|
+
const g_version = `Ver 30.6.0`;
|
|
12
|
+
const g_revisedDate = `2023/03/18`;
|
|
13
13
|
const g_alphaVersion = ``;
|
|
14
14
|
|
|
15
15
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
@@ -115,7 +115,9 @@ let g_finishFlg = true;
|
|
|
115
115
|
/** 共通オブジェクト */
|
|
116
116
|
const g_loadObj = {};
|
|
117
117
|
const g_rootObj = {};
|
|
118
|
-
const g_presetObj = {
|
|
118
|
+
const g_presetObj = {
|
|
119
|
+
keysDataLib: [],
|
|
120
|
+
};
|
|
119
121
|
let g_headerObj = {};
|
|
120
122
|
let g_scoreObj = {};
|
|
121
123
|
let g_attrObj = {};
|
|
@@ -1873,9 +1875,13 @@ const initialControl = async () => {
|
|
|
1873
1875
|
|
|
1874
1876
|
// 譜面ヘッダー、特殊キー情報の読込
|
|
1875
1877
|
Object.assign(g_headerObj, headerConvert(g_rootObj));
|
|
1876
|
-
|
|
1877
|
-
keysConvert(dosConvert(
|
|
1878
|
+
const importKeysData = _data => {
|
|
1879
|
+
keysConvert(dosConvert(_data));
|
|
1878
1880
|
g_headerObj.undefinedKeyLists = g_headerObj.undefinedKeyLists.filter(key => g_keyObj[`chara${key}_0`] === undefined);
|
|
1881
|
+
};
|
|
1882
|
+
g_presetObj.keysDataLib.forEach(list => importKeysData(list));
|
|
1883
|
+
if (g_presetObj.keysData !== undefined) {
|
|
1884
|
+
importKeysData(g_presetObj.keysData);
|
|
1879
1885
|
}
|
|
1880
1886
|
g_headerObj.keyExtraList = keysConvert(g_rootObj, {
|
|
1881
1887
|
keyExtraList: (g_rootObj.keyExtraList !== undefined ?
|
|
@@ -5905,6 +5911,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
5905
5911
|
createCss2Button(`keycon${j}_${k}`, g_kCd[g_keyObj[`keyCtrl${keyCtrlPtn}`][j][k]], _ => {
|
|
5906
5912
|
g_currentj = j;
|
|
5907
5913
|
g_currentk = k;
|
|
5914
|
+
g_prevKey = -1;
|
|
5908
5915
|
g_keycons.cursorNum = g_keycons.cursorNumList.findIndex(val => val === g_currentj);
|
|
5909
5916
|
setKeyConfigCursor();
|
|
5910
5917
|
}, {
|
|
@@ -6094,8 +6101,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6094
6101
|
cursor.style.left = `${nextLeft}px`;
|
|
6095
6102
|
const baseY = C_KYC_HEIGHT * Number(posj > divideCnt) + 57;
|
|
6096
6103
|
cursor.style.top = `${baseY + C_KYC_REPHEIGHT * g_currentk}px`;
|
|
6097
|
-
if (
|
|
6098
|
-
g_kcType =
|
|
6104
|
+
if (g_kcType !== C_FLG_ALL) {
|
|
6105
|
+
g_kcType = (g_currentk === 0 ? `Main` : `Replaced`);
|
|
6099
6106
|
lnkKcType.textContent = getStgDetailName(g_kcType);
|
|
6100
6107
|
}
|
|
6101
6108
|
|
|
@@ -6112,9 +6119,23 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6112
6119
|
|
|
6113
6120
|
g_currentj = g_keycons.cursorNumList[_nextj];
|
|
6114
6121
|
g_currentk = 0;
|
|
6115
|
-
if (g_kcType === `Replaced`
|
|
6122
|
+
if (g_kcType === `Replaced`) {
|
|
6116
6123
|
g_currentk = 1;
|
|
6124
|
+
|
|
6125
|
+
// 代替キー設定の場合は次の代替キーが見つかるまで移動
|
|
6126
|
+
while (g_keyObj[`keyCtrl${keyCtrlPtn}`][g_currentj][1] === undefined) {
|
|
6127
|
+
g_keycons.cursorNum = (g_keycons.cursorNum + 1) % g_keycons.cursorNumList.length;
|
|
6128
|
+
g_currentj = g_keycons.cursorNumList[g_keycons.cursorNum];
|
|
6129
|
+
|
|
6130
|
+
// 一周して対象が無い場合は代替キーが無いため処理を抜ける(無限ループ対策)
|
|
6131
|
+
if (g_keycons.cursorNum === _nextj) {
|
|
6132
|
+
g_kcType = `Main`;
|
|
6133
|
+
g_currentk = 0;
|
|
6134
|
+
break;
|
|
6135
|
+
}
|
|
6136
|
+
}
|
|
6117
6137
|
}
|
|
6138
|
+
|
|
6118
6139
|
setKeyConfigCursor();
|
|
6119
6140
|
keyconSprite.scrollLeft = - maxLeftX;
|
|
6120
6141
|
};
|