danoniplus 33.7.0 → 34.1.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 +79 -84
- package/js/lib/danoni_constants.js +2 -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 : 2023/09/
|
|
7
|
+
* Revised : 2023/09/27
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver
|
|
12
|
-
const g_revisedDate = `2023/09/
|
|
11
|
+
const g_version = `Ver 34.1.0`;
|
|
12
|
+
const g_revisedDate = `2023/09/27`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -294,6 +294,12 @@ const g_convFunc = {
|
|
|
294
294
|
const setVal = (_checkStr, _default, _type = C_TYP_STRING) =>
|
|
295
295
|
hasValN(_checkStr) ? g_convFunc[_type](_checkStr, _default) : _default;
|
|
296
296
|
|
|
297
|
+
/**
|
|
298
|
+
* ブール値からON/OFFへ変換
|
|
299
|
+
* @param {boolean} _condition
|
|
300
|
+
*/
|
|
301
|
+
const boolToSwitch = _condition => _condition ? C_FLG_ON : C_FLG_OFF;
|
|
302
|
+
|
|
297
303
|
/**
|
|
298
304
|
* ブール値への変換
|
|
299
305
|
* @param {string} _val
|
|
@@ -362,6 +368,13 @@ const splitLF = _str => _str?.split(`\r`).join(`\n`).split(`\n`);
|
|
|
362
368
|
*/
|
|
363
369
|
const splitLF2 = (_str, _delim = `$`) => splitLF(_str)?.filter(val => val !== ``).join(_delim).split(_delim);
|
|
364
370
|
|
|
371
|
+
/**
|
|
372
|
+
* カンマ区切り処理
|
|
373
|
+
* (ただし、カンマ+半角スペースの組の場合は区切り文字と見做さない)
|
|
374
|
+
* @param {string} _str
|
|
375
|
+
*/
|
|
376
|
+
const splitComma = _str => _str?.split(`, `).join(`*comma* `).split(`,`);
|
|
377
|
+
|
|
365
378
|
/**
|
|
366
379
|
* 重複を排除した配列の生成
|
|
367
380
|
* @param {array} _array1
|
|
@@ -2299,11 +2312,9 @@ const copySetColor = (_baseObj, _scoreId) => {
|
|
|
2299
2312
|
* MusicUrlの基本情報を取得
|
|
2300
2313
|
* @param {number} _scoreId
|
|
2301
2314
|
*/
|
|
2302
|
-
const getMusicUrl = _scoreId =>
|
|
2303
|
-
|
|
2304
|
-
g_headerObj.musicUrls[g_headerObj.musicNos[_scoreId]] ??
|
|
2305
|
-
g_headerObj.musicUrls[0] : `nosound.mp3`;
|
|
2306
|
-
};
|
|
2315
|
+
const getMusicUrl = _scoreId =>
|
|
2316
|
+
g_headerObj.musicUrls !== undefined ?
|
|
2317
|
+
g_headerObj.musicUrls[g_headerObj.musicNos[_scoreId]] ?? g_headerObj.musicUrls[0] : `nosound.mp3`;
|
|
2307
2318
|
|
|
2308
2319
|
/**
|
|
2309
2320
|
* 譜面ファイル読込後処理(譜面詳細情報取得用)
|
|
@@ -2739,7 +2750,7 @@ const headerConvert = _dosObj => {
|
|
|
2739
2750
|
}
|
|
2740
2751
|
|
|
2741
2752
|
for (let j = 0; j < musicData.length; j++) {
|
|
2742
|
-
const musics = musicData[j]
|
|
2753
|
+
const musics = splitComma(musicData[j]);
|
|
2743
2754
|
|
|
2744
2755
|
if (obj.musicNos.length >= j) {
|
|
2745
2756
|
obj.musicTitles[j] = escapeHtml(getMusicNameSimple(musics[0]));
|
|
@@ -2747,7 +2758,7 @@ const headerConvert = _dosObj => {
|
|
|
2747
2758
|
obj.artistNames[j] = escapeHtml(musics[1] ?? ``);
|
|
2748
2759
|
}
|
|
2749
2760
|
}
|
|
2750
|
-
const musics = musicData[0]
|
|
2761
|
+
const musics = splitComma(musicData[0]);
|
|
2751
2762
|
obj.musicTitle = obj.musicTitles[0];
|
|
2752
2763
|
obj.musicTitleForView = obj.musicTitlesForView[0];
|
|
2753
2764
|
obj.artistName = obj.artistNames[0] ?? ``;
|
|
@@ -2935,7 +2946,7 @@ const headerConvert = _dosObj => {
|
|
|
2935
2946
|
if (g_presetObj.gaugeList !== undefined) {
|
|
2936
2947
|
Object.keys(g_presetObj.gaugeList).forEach(key => {
|
|
2937
2948
|
g_gaugeOptionObj.customDefault.push(key);
|
|
2938
|
-
g_gaugeOptionObj.varCustomDefault.push((g_presetObj.gaugeList[key]
|
|
2949
|
+
g_gaugeOptionObj.varCustomDefault.push(boolToSwitch(g_presetObj.gaugeList[key] === `V`));
|
|
2939
2950
|
});
|
|
2940
2951
|
g_gaugeOptionObj.custom = g_gaugeOptionObj.customDefault.concat();
|
|
2941
2952
|
g_gaugeOptionObj.varCustom = g_gaugeOptionObj.varCustomDefault.concat();
|
|
@@ -3115,8 +3126,8 @@ const headerConvert = _dosObj => {
|
|
|
3115
3126
|
|
|
3116
3127
|
// 空押し判定を行うか
|
|
3117
3128
|
obj.excessiveJdgUse = setBoolVal(_dosObj.excessiveJdgUse ?? g_presetObj.excessiveJdgUse);
|
|
3118
|
-
g_stateObj.excessive = obj.excessiveJdgUse
|
|
3119
|
-
g_settings.excessiveNum = obj.excessiveJdgUse
|
|
3129
|
+
g_stateObj.excessive = boolToSwitch(obj.excessiveJdgUse);
|
|
3130
|
+
g_settings.excessiveNum = Number(obj.excessiveJdgUse);
|
|
3120
3131
|
|
|
3121
3132
|
// 譜面名に制作者名を付加するかどうかのフラグ
|
|
3122
3133
|
obj.makerView = setBoolVal(_dosObj.makerView);
|
|
@@ -3141,7 +3152,7 @@ const headerConvert = _dosObj => {
|
|
|
3141
3152
|
// displayUse -> ボタンの有効/無効, displaySet -> ボタンの初期値(ON/OFF)
|
|
3142
3153
|
obj[`${option}Use`] = setBoolVal(displayUse[0], true);
|
|
3143
3154
|
obj[`${option}Set`] = setVal(displayUse.length > 1 ? displayUse[1] :
|
|
3144
|
-
(obj[`${option}Use`]
|
|
3155
|
+
boolToSwitch(obj[`${option}Use`]), ``, C_TYP_SWITCH);
|
|
3145
3156
|
g_stateObj[`d_${option.toLowerCase()}`] = setVal(obj[`${option}Set`], C_FLG_ON, C_TYP_SWITCH);
|
|
3146
3157
|
obj[`${option}ChainOFF`] = (_dosObj[`${option}ChainOFF`] !== undefined ? _dosObj[`${option}ChainOFF`].split(`,`) : []);
|
|
3147
3158
|
|
|
@@ -3170,7 +3181,7 @@ const headerConvert = _dosObj => {
|
|
|
3170
3181
|
if (g_localStorage.colorType !== undefined) {
|
|
3171
3182
|
g_colorType = g_localStorage.colorType;
|
|
3172
3183
|
if (obj.colorUse) {
|
|
3173
|
-
g_stateObj.d_color = g_keycons.colorDefTypes.findIndex(val => val === g_colorType) !== -1
|
|
3184
|
+
g_stateObj.d_color = boolToSwitch(g_keycons.colorDefTypes.findIndex(val => val === g_colorType) !== -1);
|
|
3174
3185
|
}
|
|
3175
3186
|
}
|
|
3176
3187
|
|
|
@@ -3515,7 +3526,7 @@ const resetCustomGauge = (_dosObj, { scoreId = 0 } = {}) => {
|
|
|
3515
3526
|
for (let j = 0; j < customGauges.length; j++) {
|
|
3516
3527
|
const customGaugeSets = customGauges[j].split(`::`);
|
|
3517
3528
|
obj[`custom${scoreId}`][j] = customGaugeSets[0];
|
|
3518
|
-
obj[`varCustom${scoreId}`][j] = (customGaugeSets[1]
|
|
3529
|
+
obj[`varCustom${scoreId}`][j] = boolToSwitch(customGaugeSets[1] === `V`);
|
|
3519
3530
|
}
|
|
3520
3531
|
if (scoreId === 0) {
|
|
3521
3532
|
obj.custom = obj.custom0.concat();
|
|
@@ -3822,7 +3833,7 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
|
|
|
3822
3833
|
if (!hasVal(tmpParam)) {
|
|
3823
3834
|
return;
|
|
3824
3835
|
}
|
|
3825
|
-
g_keyObj[pairName] = {}
|
|
3836
|
+
g_keyObj[pairName] = {};
|
|
3826
3837
|
|
|
3827
3838
|
// デフォルト項目がある場合は先に定義
|
|
3828
3839
|
if (_defaultName !== ``) {
|
|
@@ -4344,8 +4355,10 @@ const setWindowStyle = (_text, _bkColor, _textColor, _align = C_ALIGN_LEFT, { _x
|
|
|
4344
4355
|
const commonSettingBtn = _labelName => {
|
|
4345
4356
|
|
|
4346
4357
|
const switchSave = evt => {
|
|
4358
|
+
const from = boolToSwitch(g_stateObj.dataSaveFlg);
|
|
4347
4359
|
g_stateObj.dataSaveFlg = !g_stateObj.dataSaveFlg;
|
|
4348
|
-
|
|
4360
|
+
|
|
4361
|
+
const to = boolToSwitch(g_stateObj.dataSaveFlg);
|
|
4349
4362
|
evt.target.classList.replace(g_cssObj[`button_${from}`], g_cssObj[`button_${to}`]);
|
|
4350
4363
|
};
|
|
4351
4364
|
|
|
@@ -4386,8 +4399,7 @@ const commonSettingBtn = _labelName => {
|
|
|
4386
4399
|
*/
|
|
4387
4400
|
const makePlayButton = _func => createCss2Button(`btnPlay`, g_lblNameObj.b_play, _ => true,
|
|
4388
4401
|
Object.assign(g_lblPosObj.btnPlay, {
|
|
4389
|
-
animationName: (g_initialFlg ? `` : `smallToNormalY`),
|
|
4390
|
-
resetFunc: _func,
|
|
4402
|
+
animationName: (g_initialFlg ? `` : `smallToNormalY`), resetFunc: _func,
|
|
4391
4403
|
}), g_cssObj.button_Next);
|
|
4392
4404
|
|
|
4393
4405
|
/**
|
|
@@ -4436,12 +4448,6 @@ const setSpriteList = _settingList => {
|
|
|
4436
4448
|
return spriteList;
|
|
4437
4449
|
};
|
|
4438
4450
|
|
|
4439
|
-
/**
|
|
4440
|
-
* 設定ウィンドウの作成
|
|
4441
|
-
* @param {string} _sprite
|
|
4442
|
-
*/
|
|
4443
|
-
const createOptionSprite = _sprite => createEmptySprite(_sprite, `optionsprite`, g_windowObj.optionSprite);
|
|
4444
|
-
|
|
4445
4451
|
/**
|
|
4446
4452
|
* スライダー共通処理
|
|
4447
4453
|
* @param {object} _slider
|
|
@@ -4459,7 +4465,7 @@ const inputSlider = (_slider, _link) => {
|
|
|
4459
4465
|
const resetDifWindow = _ => {
|
|
4460
4466
|
if (document.querySelector(`#difList`) !== null) {
|
|
4461
4467
|
deleteChildspriteAll(`difList`);
|
|
4462
|
-
[`difList`, `difCover`, `btnDifU`, `btnDifD`].forEach(obj =>
|
|
4468
|
+
[`difList`, `difCover`, `btnDifU`, `btnDifD`].forEach(obj => document.getElementById(obj).remove());
|
|
4463
4469
|
g_currentPage = `option`;
|
|
4464
4470
|
setShortcutEvent(g_currentPage, _ => true, { displayFlg: false, dfEvtFlg: true });
|
|
4465
4471
|
}
|
|
@@ -5068,7 +5074,7 @@ const setDifficulty = (_initFlg) => {
|
|
|
5068
5074
|
const createOptionWindow = _sprite => {
|
|
5069
5075
|
|
|
5070
5076
|
// 各ボタン用のスプライトを作成
|
|
5071
|
-
const optionsprite =
|
|
5077
|
+
const optionsprite = createEmptySprite(_sprite, `optionsprite`, g_windowObj.optionSprite);
|
|
5072
5078
|
|
|
5073
5079
|
// 設定毎に個別のスプライトを作成し、その中にラベル・ボタン類を配置
|
|
5074
5080
|
const spriteList = setSpriteList(g_settingPos.option);
|
|
@@ -5722,8 +5728,8 @@ const setExcessive = _btn => {
|
|
|
5722
5728
|
* @param {string} _extraKeyName 特殊キー名(通常キーは省略)
|
|
5723
5729
|
*/
|
|
5724
5730
|
const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
|
|
5725
|
-
|
|
5726
|
-
const basePtn = `${g_keyObj.currentKey}_${
|
|
5731
|
+
g_keyObj.storagePtn = _localStorage[`keyCtrlPtn${_extraKeyName}`];
|
|
5732
|
+
const basePtn = `${g_keyObj.currentKey}_${g_keyObj.storagePtn}`;
|
|
5727
5733
|
const baseKeyNum = g_keyObj[`${g_keyObj.defaultProp}${basePtn}`].length;
|
|
5728
5734
|
|
|
5729
5735
|
if (_localStorage[`keyCtrl${_extraKeyName}`] !== undefined && _localStorage[`keyCtrl${_extraKeyName}`][0].length > 0) {
|
|
@@ -5923,7 +5929,7 @@ const createSettingsDisplayWindow = _sprite => {
|
|
|
5923
5929
|
};
|
|
5924
5930
|
|
|
5925
5931
|
// 各ボタン用のスプライトを作成
|
|
5926
|
-
|
|
5932
|
+
const optionsprite = createEmptySprite(_sprite, `optionsprite`, g_windowObj.optionSprite);
|
|
5927
5933
|
|
|
5928
5934
|
// 設定毎に個別のスプライトを作成し、その中にラベル・ボタン類を配置
|
|
5929
5935
|
const displaySprite = createEmptySprite(optionsprite, `displaySprite`, g_windowObj.displaySprite);
|
|
@@ -5972,13 +5978,11 @@ const createSettingsDisplayWindow = _sprite => {
|
|
|
5972
5978
|
// ---------------------------------------------------
|
|
5973
5979
|
// 判定表示系の不透明度 (Opacity)
|
|
5974
5980
|
// 縦位置: 9
|
|
5975
|
-
|
|
5981
|
+
g_headerObj.opacityUse = false;
|
|
5976
5982
|
[`judgment`, `fastSlow`, `filterLine`].forEach(display =>
|
|
5977
|
-
opacityUse ||= g_headerObj[`${display}Use`] || g_headerObj[`${display}Set`] === C_FLG_ON);
|
|
5983
|
+
g_headerObj.opacityUse ||= g_headerObj[`${display}Use`] || g_headerObj[`${display}Set`] === C_FLG_ON);
|
|
5978
5984
|
|
|
5979
|
-
|
|
5980
|
-
createGeneralSetting(spriteList.opacity, `opacity`, { unitName: g_lblNameObj.percent });
|
|
5981
|
-
}
|
|
5985
|
+
createGeneralSetting(spriteList.opacity, `opacity`, { unitName: g_lblNameObj.percent });
|
|
5982
5986
|
|
|
5983
5987
|
// ---------------------------------------------------
|
|
5984
5988
|
// タイミング調整 (HitPosition)
|
|
@@ -6284,9 +6288,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6284
6288
|
*/
|
|
6285
6289
|
const makeKCButtonHeader = (_id, _name, {
|
|
6286
6290
|
x = g_sWidth * 5 / 6 - 30, y = 0, w = g_sWidth / 6, h = 20, siz = 12, align = C_ALIGN_LEFT, ...rest
|
|
6287
|
-
} = {}, ..._classes) => {
|
|
6288
|
-
return createDivCss2Label(_id, g_lblNameObj[_name], { x, y, w, h, siz, align, ...rest }, ..._classes);
|
|
6289
|
-
};
|
|
6291
|
+
} = {}, ..._classes) => createDivCss2Label(_id, g_lblNameObj[_name], { x, y, w, h, siz, align, ...rest }, ..._classes);
|
|
6290
6292
|
|
|
6291
6293
|
/**
|
|
6292
6294
|
* キーコンフィグ用設定ボタン
|
|
@@ -6299,9 +6301,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6299
6301
|
* @returns ボタン
|
|
6300
6302
|
*/
|
|
6301
6303
|
const makeKCButton = (_id, _text, _func, { x = g_sWidth * 5 / 6 - 20, y = 15, w = g_sWidth / 6, h = 18,
|
|
6302
|
-
siz = g_limitObj.jdgCntsSiz, borderStyle = `solid`, cxtFunc, ...rest } = {}, _mainClass = g_cssObj.button_RevOFF, ..._classes) =>
|
|
6303
|
-
|
|
6304
|
-
};
|
|
6304
|
+
siz = g_limitObj.jdgCntsSiz, borderStyle = `solid`, cxtFunc, ...rest } = {}, _mainClass = g_cssObj.button_RevOFF, ..._classes) =>
|
|
6305
|
+
makeSettingLblCssButton(_id, getStgDetailName(_text), 0, _func, { x, y, w, h, siz, cxtFunc, borderStyle, ...rest }, _mainClass, ..._classes);
|
|
6305
6306
|
|
|
6306
6307
|
/**
|
|
6307
6308
|
* キーコンフィグ用ミニボタン
|
|
@@ -6310,10 +6311,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6310
6311
|
* @param {function} _func
|
|
6311
6312
|
* @param {*} object (x, y, w, h, siz)
|
|
6312
6313
|
*/
|
|
6313
|
-
const makeMiniKCButton = (_id, _directionFlg, _func, { x = g_sWidth * 5 / 6 - 30, y = 15, w = 15, h = 20, siz = g_limitObj.mainSiz } = {}) =>
|
|
6314
|
-
|
|
6315
|
-
{ x, y, w, h, siz }, g_cssObj.button_Mini);
|
|
6316
|
-
};
|
|
6314
|
+
const makeMiniKCButton = (_id, _directionFlg, _func, { x = g_sWidth * 5 / 6 - 30, y = 15, w = 15, h = 20, siz = g_limitObj.mainSiz } = {}) =>
|
|
6315
|
+
createCss2Button(`${_id}${_directionFlg}`, g_settingBtnObj.chara[_directionFlg], _func, { x, y, w, h, siz }, g_cssObj.button_Mini);
|
|
6317
6316
|
|
|
6318
6317
|
/**
|
|
6319
6318
|
* キーコンフィグ用グループ設定ラベル・ボタンの作成
|
|
@@ -6340,7 +6339,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6340
6339
|
multiAppend(divRoot,
|
|
6341
6340
|
|
|
6342
6341
|
// ショートカットキーメッセージ
|
|
6343
|
-
createDescDiv(`scMsg`, g_lblNameObj.kcShortcutDesc.split(`{0}`)
|
|
6342
|
+
createDescDiv(`scMsg`, g_lblNameObj.kcShortcutDesc.split(`{0}`)
|
|
6343
|
+
.join(g_isMac ? `Shift+${g_kCd[g_headerObj.keyRetry]}` : g_kCd[g_headerObj.keyTitleBack])
|
|
6344
6344
|
.split(`{1}`).join(g_kCd[g_headerObj.keyRetry]), `scKcMsg`),
|
|
6345
6345
|
|
|
6346
6346
|
// 別キーモード警告メッセージ
|
|
@@ -6386,8 +6386,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6386
6386
|
|
|
6387
6387
|
const nextLeft = (kWidth - C_ARW_WIDTH) / 2 + g_keyObj.blank * stdPos - maxLeftX - 10;
|
|
6388
6388
|
cursor.style.left = `${nextLeft}px`;
|
|
6389
|
-
|
|
6390
|
-
cursor.style.top = `${baseY + C_KYC_REPHEIGHT * g_currentk}px`;
|
|
6389
|
+
cursor.style.top = `${C_KYC_HEIGHT * Number(posj > divideCnt) + 57 + C_KYC_REPHEIGHT * g_currentk}px`;
|
|
6391
6390
|
g_kcType = (g_currentk === 0 ? `Main` : `Replaced`);
|
|
6392
6391
|
|
|
6393
6392
|
// 次の位置が見えなくなったらkeyconSpriteの位置を調整する
|
|
@@ -6424,10 +6423,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6424
6423
|
keyconSprite.scrollLeft = - maxLeftX;
|
|
6425
6424
|
};
|
|
6426
6425
|
|
|
6427
|
-
const getNextNum = (_scrollNum, _groupName, _target) =>
|
|
6428
|
-
|
|
6429
|
-
return nextPos(typeNum, _scrollNum, g_keycons[_groupName].length);
|
|
6430
|
-
};
|
|
6426
|
+
const getNextNum = (_scrollNum, _groupName, _target) =>
|
|
6427
|
+
nextPos(g_keycons[_groupName].findIndex(value => value === _target), _scrollNum, g_keycons[_groupName].length);
|
|
6431
6428
|
|
|
6432
6429
|
/**
|
|
6433
6430
|
* ConfigTypeの制御
|
|
@@ -6502,7 +6499,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6502
6499
|
const nextNum = getNextNum(_scrollNum, `colorTypes`, g_colorType);
|
|
6503
6500
|
g_colorType = g_keycons.colorTypes[nextNum];
|
|
6504
6501
|
if (g_headerObj.colorUse) {
|
|
6505
|
-
g_stateObj.d_color = g_keycons.colorDefTypes.findIndex(val => val === g_colorType) !== -1
|
|
6502
|
+
g_stateObj.d_color = boolToSwitch(g_keycons.colorDefTypes.findIndex(val => val === g_colorType) !== -1);
|
|
6506
6503
|
}
|
|
6507
6504
|
changeSetColor();
|
|
6508
6505
|
viewGroupObj.color(`_${g_keycons.colorGroupNum}`);
|
|
@@ -6578,8 +6575,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6578
6575
|
keyconSprite.scrollLeft = - maxLeftX;
|
|
6579
6576
|
|
|
6580
6577
|
// キーパターン表示
|
|
6581
|
-
const lblTransKey = hasVal(g_keyObj[`transKey${keyCtrlPtn}`]) ?
|
|
6582
|
-
`(${g_keyObj[`transKey${keyCtrlPtn}`] ?? ''})` : ``;
|
|
6578
|
+
const lblTransKey = hasVal(g_keyObj[`transKey${keyCtrlPtn}`]) ? `(${g_keyObj[`transKey${keyCtrlPtn}`] ?? ''})` : ``;
|
|
6583
6579
|
|
|
6584
6580
|
/**
|
|
6585
6581
|
* キーパターン検索
|
|
@@ -6792,8 +6788,7 @@ const getKeyInfo = _ => {
|
|
|
6792
6788
|
const keyGroupList = makeDedupliArray(keyGroupMaps.flat()).sort((a, b) => parseInt(a) - parseInt(b));
|
|
6793
6789
|
|
|
6794
6790
|
return {
|
|
6795
|
-
keyCtrlPtn
|
|
6796
|
-
keyGroupMaps: keyGroupMaps, keyGroupList: keyGroupList,
|
|
6791
|
+
keyCtrlPtn, keyNum, posMax, divideCnt, keyGroupMaps, keyGroupList,
|
|
6797
6792
|
};
|
|
6798
6793
|
};
|
|
6799
6794
|
|
|
@@ -6840,18 +6835,7 @@ const changeSetColor = _ => {
|
|
|
6840
6835
|
* @param {string} _cssName
|
|
6841
6836
|
*/
|
|
6842
6837
|
const changeConfigColor = (_obj, _cssName) => {
|
|
6843
|
-
|
|
6844
|
-
if (_obj.classList.contains(_className)) {
|
|
6845
|
-
_obj.classList.remove(_className);
|
|
6846
|
-
}
|
|
6847
|
-
};
|
|
6848
|
-
|
|
6849
|
-
// CSSクラスの除去
|
|
6850
|
-
resetClass(g_cssObj.keyconfig_Changekey);
|
|
6851
|
-
resetClass(g_cssObj.keyconfig_Defaultkey);
|
|
6852
|
-
resetClass(g_cssObj.title_base);
|
|
6853
|
-
|
|
6854
|
-
// 指定されたCSSクラスを適用
|
|
6838
|
+
_obj.classList.remove(g_cssObj.keyconfig_Changekey, g_cssObj.keyconfig_Defaultkey, g_cssObj.title_base);
|
|
6855
6839
|
_obj.classList.add(_cssName);
|
|
6856
6840
|
};
|
|
6857
6841
|
|
|
@@ -7537,7 +7521,10 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7537
7521
|
*/
|
|
7538
7522
|
const getRefData = (_header, _dataName) => {
|
|
7539
7523
|
const data = _dosObj[`${_header}${_dataName}`];
|
|
7540
|
-
|
|
7524
|
+
let dataStr = data;
|
|
7525
|
+
splitLF(data)?.filter(val => val?.startsWith(_header) && _dosObj[val] !== undefined)
|
|
7526
|
+
.forEach(val => dataStr = dataStr.replace(val, _dosObj[val]));
|
|
7527
|
+
return dataStr;
|
|
7541
7528
|
}
|
|
7542
7529
|
|
|
7543
7530
|
/**
|
|
@@ -7562,7 +7549,8 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7562
7549
|
}
|
|
7563
7550
|
|
|
7564
7551
|
const list = [];
|
|
7565
|
-
const
|
|
7552
|
+
const ptnName = `${(g_keyObj.currentPtn === -1 ? g_keyObj.storagePtn : g_keyObj.currentPtn) + 1}`;
|
|
7553
|
+
const keyName = setVal(g_keyObj[`transKey${_keyCtrlPtn}`], g_keyObj.currentKey);
|
|
7566
7554
|
let type = ``;
|
|
7567
7555
|
if (g_stateObj.scroll !== `---`) {
|
|
7568
7556
|
type = `Alt`;
|
|
@@ -7570,14 +7558,13 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7570
7558
|
type = `Rev`;
|
|
7571
7559
|
}
|
|
7572
7560
|
|
|
7573
|
-
|
|
7574
|
-
list.push(`${
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
list.push(type);
|
|
7580
|
-
list.push(``);
|
|
7561
|
+
[g_stateObj.scroll, type, ``].forEach(header => {
|
|
7562
|
+
list.push(`${header}[${ptnName}]`, `${header}<${keyName}>`);
|
|
7563
|
+
if (hasVal(g_keyObj[`transKey${_keyCtrlPtn}`])) {
|
|
7564
|
+
list.push(`${header}A`);
|
|
7565
|
+
}
|
|
7566
|
+
});
|
|
7567
|
+
list.push(g_stateObj.scroll, type, ``);
|
|
7581
7568
|
|
|
7582
7569
|
return makeDedupliArray(list);
|
|
7583
7570
|
};
|
|
@@ -7643,6 +7630,14 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7643
7630
|
wordMaxDepth = tmpWordData[k + 1];
|
|
7644
7631
|
}
|
|
7645
7632
|
|
|
7633
|
+
// 同一行数で数字が取得できるまでは歌詞表示と見做して結合
|
|
7634
|
+
let m = 3;
|
|
7635
|
+
while (hasVal(tmpWordData[m]) && isNaN(parseInt(tmpWordData[m])) && m < tmpWordData.length) {
|
|
7636
|
+
tmpWordData[k + 2] += `,${tmpWordData[k + m]}`;
|
|
7637
|
+
tmpWordData.splice(k + m, 1);
|
|
7638
|
+
}
|
|
7639
|
+
|
|
7640
|
+
// 歌詞表示データの格納
|
|
7646
7641
|
let dataCnts = 0;
|
|
7647
7642
|
[wordData[tmpWordData[k]], dataCnts] =
|
|
7648
7643
|
checkDuplicatedObjects(wordData[tmpWordData[k]]);
|
|
@@ -8066,7 +8061,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
8066
8061
|
}
|
|
8067
8062
|
|
|
8068
8063
|
// 個別加速のタイミング更新
|
|
8069
|
-
const
|
|
8064
|
+
const calcBoostData = _data => {
|
|
8070
8065
|
if (hasArrayList(_data, 2)) {
|
|
8071
8066
|
let delIdx = 0;
|
|
8072
8067
|
for (let k = _data.length - 2; k >= 0; k -= 2) {
|
|
@@ -8086,7 +8081,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
8086
8081
|
}
|
|
8087
8082
|
return [];
|
|
8088
8083
|
};
|
|
8089
|
-
g_workObj.boostData =
|
|
8084
|
+
g_workObj.boostData = calcBoostData(_dataObj.boostData);
|
|
8090
8085
|
|
|
8091
8086
|
/**
|
|
8092
8087
|
* 色変化・モーションデータ・スクロール反転データのタイミング更新
|
|
@@ -8534,7 +8529,7 @@ const getArrowSettings = _ => {
|
|
|
8534
8529
|
const scrollDirOptions = (g_keyObj[`scrollDir${keyCtrlPtn}`] !== undefined ?
|
|
8535
8530
|
g_keyObj[`scrollDir${keyCtrlPtn}`][g_stateObj.scroll] : [...Array(keyNum)].fill(1));
|
|
8536
8531
|
|
|
8537
|
-
g_stateObj.autoAll = (g_stateObj.autoPlay === C_FLG_ALL
|
|
8532
|
+
g_stateObj.autoAll = boolToSwitch(g_stateObj.autoPlay === C_FLG_ALL);
|
|
8538
8533
|
g_workObj.hitPosition = (g_stateObj.autoAll ? 0 : g_stateObj.hitPosition);
|
|
8539
8534
|
changeSetColor();
|
|
8540
8535
|
|
|
@@ -9267,7 +9262,7 @@ const mainInit = _ => {
|
|
|
9267
9262
|
g_typeLists.arrow.forEach(type =>
|
|
9268
9263
|
judgeObjDelete[type] = (_j, _deleteName) => {
|
|
9269
9264
|
g_workObj[`judg${toCapitalize(type)}Cnt`][_j]++;
|
|
9270
|
-
|
|
9265
|
+
document.getElementById(_deleteName).remove();
|
|
9271
9266
|
delete g_attrObj[_deleteName];
|
|
9272
9267
|
});
|
|
9273
9268
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2023/09/
|
|
8
|
+
* Revised : 2023/09/24 (v34.0.0)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -1677,6 +1677,7 @@ const g_keyObj = {
|
|
|
1677
1677
|
// - 原則、キー×パターンの数だけ設定が必要
|
|
1678
1678
|
currentKey: 7,
|
|
1679
1679
|
currentPtn: 0,
|
|
1680
|
+
storagePtn: 0,
|
|
1680
1681
|
defaultProp: `keyCtrl`,
|
|
1681
1682
|
|
|
1682
1683
|
prevKey: `Dummy`,
|