danoniplus 33.7.0 → 34.0.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 +62 -82
- 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/24
|
|
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.0.0`;
|
|
12
|
+
const g_revisedDate = `2023/09/24`;
|
|
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
|
|
@@ -2299,11 +2305,9 @@ const copySetColor = (_baseObj, _scoreId) => {
|
|
|
2299
2305
|
* MusicUrlの基本情報を取得
|
|
2300
2306
|
* @param {number} _scoreId
|
|
2301
2307
|
*/
|
|
2302
|
-
const getMusicUrl = _scoreId =>
|
|
2303
|
-
|
|
2304
|
-
g_headerObj.musicUrls[g_headerObj.musicNos[_scoreId]] ??
|
|
2305
|
-
g_headerObj.musicUrls[0] : `nosound.mp3`;
|
|
2306
|
-
};
|
|
2308
|
+
const getMusicUrl = _scoreId =>
|
|
2309
|
+
g_headerObj.musicUrls !== undefined ?
|
|
2310
|
+
g_headerObj.musicUrls[g_headerObj.musicNos[_scoreId]] ?? g_headerObj.musicUrls[0] : `nosound.mp3`;
|
|
2307
2311
|
|
|
2308
2312
|
/**
|
|
2309
2313
|
* 譜面ファイル読込後処理(譜面詳細情報取得用)
|
|
@@ -2935,7 +2939,7 @@ const headerConvert = _dosObj => {
|
|
|
2935
2939
|
if (g_presetObj.gaugeList !== undefined) {
|
|
2936
2940
|
Object.keys(g_presetObj.gaugeList).forEach(key => {
|
|
2937
2941
|
g_gaugeOptionObj.customDefault.push(key);
|
|
2938
|
-
g_gaugeOptionObj.varCustomDefault.push((g_presetObj.gaugeList[key]
|
|
2942
|
+
g_gaugeOptionObj.varCustomDefault.push(boolToSwitch(g_presetObj.gaugeList[key] === `V`));
|
|
2939
2943
|
});
|
|
2940
2944
|
g_gaugeOptionObj.custom = g_gaugeOptionObj.customDefault.concat();
|
|
2941
2945
|
g_gaugeOptionObj.varCustom = g_gaugeOptionObj.varCustomDefault.concat();
|
|
@@ -3115,8 +3119,8 @@ const headerConvert = _dosObj => {
|
|
|
3115
3119
|
|
|
3116
3120
|
// 空押し判定を行うか
|
|
3117
3121
|
obj.excessiveJdgUse = setBoolVal(_dosObj.excessiveJdgUse ?? g_presetObj.excessiveJdgUse);
|
|
3118
|
-
g_stateObj.excessive = obj.excessiveJdgUse
|
|
3119
|
-
g_settings.excessiveNum = obj.excessiveJdgUse
|
|
3122
|
+
g_stateObj.excessive = boolToSwitch(obj.excessiveJdgUse);
|
|
3123
|
+
g_settings.excessiveNum = Number(obj.excessiveJdgUse);
|
|
3120
3124
|
|
|
3121
3125
|
// 譜面名に制作者名を付加するかどうかのフラグ
|
|
3122
3126
|
obj.makerView = setBoolVal(_dosObj.makerView);
|
|
@@ -3141,7 +3145,7 @@ const headerConvert = _dosObj => {
|
|
|
3141
3145
|
// displayUse -> ボタンの有効/無効, displaySet -> ボタンの初期値(ON/OFF)
|
|
3142
3146
|
obj[`${option}Use`] = setBoolVal(displayUse[0], true);
|
|
3143
3147
|
obj[`${option}Set`] = setVal(displayUse.length > 1 ? displayUse[1] :
|
|
3144
|
-
(obj[`${option}Use`]
|
|
3148
|
+
boolToSwitch(obj[`${option}Use`]), ``, C_TYP_SWITCH);
|
|
3145
3149
|
g_stateObj[`d_${option.toLowerCase()}`] = setVal(obj[`${option}Set`], C_FLG_ON, C_TYP_SWITCH);
|
|
3146
3150
|
obj[`${option}ChainOFF`] = (_dosObj[`${option}ChainOFF`] !== undefined ? _dosObj[`${option}ChainOFF`].split(`,`) : []);
|
|
3147
3151
|
|
|
@@ -3170,7 +3174,7 @@ const headerConvert = _dosObj => {
|
|
|
3170
3174
|
if (g_localStorage.colorType !== undefined) {
|
|
3171
3175
|
g_colorType = g_localStorage.colorType;
|
|
3172
3176
|
if (obj.colorUse) {
|
|
3173
|
-
g_stateObj.d_color = g_keycons.colorDefTypes.findIndex(val => val === g_colorType) !== -1
|
|
3177
|
+
g_stateObj.d_color = boolToSwitch(g_keycons.colorDefTypes.findIndex(val => val === g_colorType) !== -1);
|
|
3174
3178
|
}
|
|
3175
3179
|
}
|
|
3176
3180
|
|
|
@@ -3515,7 +3519,7 @@ const resetCustomGauge = (_dosObj, { scoreId = 0 } = {}) => {
|
|
|
3515
3519
|
for (let j = 0; j < customGauges.length; j++) {
|
|
3516
3520
|
const customGaugeSets = customGauges[j].split(`::`);
|
|
3517
3521
|
obj[`custom${scoreId}`][j] = customGaugeSets[0];
|
|
3518
|
-
obj[`varCustom${scoreId}`][j] = (customGaugeSets[1]
|
|
3522
|
+
obj[`varCustom${scoreId}`][j] = boolToSwitch(customGaugeSets[1] === `V`);
|
|
3519
3523
|
}
|
|
3520
3524
|
if (scoreId === 0) {
|
|
3521
3525
|
obj.custom = obj.custom0.concat();
|
|
@@ -3822,7 +3826,7 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
|
|
|
3822
3826
|
if (!hasVal(tmpParam)) {
|
|
3823
3827
|
return;
|
|
3824
3828
|
}
|
|
3825
|
-
g_keyObj[pairName] = {}
|
|
3829
|
+
g_keyObj[pairName] = {};
|
|
3826
3830
|
|
|
3827
3831
|
// デフォルト項目がある場合は先に定義
|
|
3828
3832
|
if (_defaultName !== ``) {
|
|
@@ -4344,8 +4348,10 @@ const setWindowStyle = (_text, _bkColor, _textColor, _align = C_ALIGN_LEFT, { _x
|
|
|
4344
4348
|
const commonSettingBtn = _labelName => {
|
|
4345
4349
|
|
|
4346
4350
|
const switchSave = evt => {
|
|
4351
|
+
const from = boolToSwitch(g_stateObj.dataSaveFlg);
|
|
4347
4352
|
g_stateObj.dataSaveFlg = !g_stateObj.dataSaveFlg;
|
|
4348
|
-
|
|
4353
|
+
|
|
4354
|
+
const to = boolToSwitch(g_stateObj.dataSaveFlg);
|
|
4349
4355
|
evt.target.classList.replace(g_cssObj[`button_${from}`], g_cssObj[`button_${to}`]);
|
|
4350
4356
|
};
|
|
4351
4357
|
|
|
@@ -4386,8 +4392,7 @@ const commonSettingBtn = _labelName => {
|
|
|
4386
4392
|
*/
|
|
4387
4393
|
const makePlayButton = _func => createCss2Button(`btnPlay`, g_lblNameObj.b_play, _ => true,
|
|
4388
4394
|
Object.assign(g_lblPosObj.btnPlay, {
|
|
4389
|
-
animationName: (g_initialFlg ? `` : `smallToNormalY`),
|
|
4390
|
-
resetFunc: _func,
|
|
4395
|
+
animationName: (g_initialFlg ? `` : `smallToNormalY`), resetFunc: _func,
|
|
4391
4396
|
}), g_cssObj.button_Next);
|
|
4392
4397
|
|
|
4393
4398
|
/**
|
|
@@ -4436,12 +4441,6 @@ const setSpriteList = _settingList => {
|
|
|
4436
4441
|
return spriteList;
|
|
4437
4442
|
};
|
|
4438
4443
|
|
|
4439
|
-
/**
|
|
4440
|
-
* 設定ウィンドウの作成
|
|
4441
|
-
* @param {string} _sprite
|
|
4442
|
-
*/
|
|
4443
|
-
const createOptionSprite = _sprite => createEmptySprite(_sprite, `optionsprite`, g_windowObj.optionSprite);
|
|
4444
|
-
|
|
4445
4444
|
/**
|
|
4446
4445
|
* スライダー共通処理
|
|
4447
4446
|
* @param {object} _slider
|
|
@@ -4459,7 +4458,7 @@ const inputSlider = (_slider, _link) => {
|
|
|
4459
4458
|
const resetDifWindow = _ => {
|
|
4460
4459
|
if (document.querySelector(`#difList`) !== null) {
|
|
4461
4460
|
deleteChildspriteAll(`difList`);
|
|
4462
|
-
[`difList`, `difCover`, `btnDifU`, `btnDifD`].forEach(obj =>
|
|
4461
|
+
[`difList`, `difCover`, `btnDifU`, `btnDifD`].forEach(obj => document.getElementById(obj).remove());
|
|
4463
4462
|
g_currentPage = `option`;
|
|
4464
4463
|
setShortcutEvent(g_currentPage, _ => true, { displayFlg: false, dfEvtFlg: true });
|
|
4465
4464
|
}
|
|
@@ -5068,7 +5067,7 @@ const setDifficulty = (_initFlg) => {
|
|
|
5068
5067
|
const createOptionWindow = _sprite => {
|
|
5069
5068
|
|
|
5070
5069
|
// 各ボタン用のスプライトを作成
|
|
5071
|
-
const optionsprite =
|
|
5070
|
+
const optionsprite = createEmptySprite(_sprite, `optionsprite`, g_windowObj.optionSprite);
|
|
5072
5071
|
|
|
5073
5072
|
// 設定毎に個別のスプライトを作成し、その中にラベル・ボタン類を配置
|
|
5074
5073
|
const spriteList = setSpriteList(g_settingPos.option);
|
|
@@ -5722,8 +5721,8 @@ const setExcessive = _btn => {
|
|
|
5722
5721
|
* @param {string} _extraKeyName 特殊キー名(通常キーは省略)
|
|
5723
5722
|
*/
|
|
5724
5723
|
const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
|
|
5725
|
-
|
|
5726
|
-
const basePtn = `${g_keyObj.currentKey}_${
|
|
5724
|
+
g_keyObj.storagePtn = _localStorage[`keyCtrlPtn${_extraKeyName}`];
|
|
5725
|
+
const basePtn = `${g_keyObj.currentKey}_${g_keyObj.storagePtn}`;
|
|
5727
5726
|
const baseKeyNum = g_keyObj[`${g_keyObj.defaultProp}${basePtn}`].length;
|
|
5728
5727
|
|
|
5729
5728
|
if (_localStorage[`keyCtrl${_extraKeyName}`] !== undefined && _localStorage[`keyCtrl${_extraKeyName}`][0].length > 0) {
|
|
@@ -5923,7 +5922,7 @@ const createSettingsDisplayWindow = _sprite => {
|
|
|
5923
5922
|
};
|
|
5924
5923
|
|
|
5925
5924
|
// 各ボタン用のスプライトを作成
|
|
5926
|
-
|
|
5925
|
+
const optionsprite = createEmptySprite(_sprite, `optionsprite`, g_windowObj.optionSprite);
|
|
5927
5926
|
|
|
5928
5927
|
// 設定毎に個別のスプライトを作成し、その中にラベル・ボタン類を配置
|
|
5929
5928
|
const displaySprite = createEmptySprite(optionsprite, `displaySprite`, g_windowObj.displaySprite);
|
|
@@ -5972,13 +5971,11 @@ const createSettingsDisplayWindow = _sprite => {
|
|
|
5972
5971
|
// ---------------------------------------------------
|
|
5973
5972
|
// 判定表示系の不透明度 (Opacity)
|
|
5974
5973
|
// 縦位置: 9
|
|
5975
|
-
|
|
5974
|
+
g_headerObj.opacityUse = false;
|
|
5976
5975
|
[`judgment`, `fastSlow`, `filterLine`].forEach(display =>
|
|
5977
|
-
opacityUse ||= g_headerObj[`${display}Use`] || g_headerObj[`${display}Set`] === C_FLG_ON);
|
|
5976
|
+
g_headerObj.opacityUse ||= g_headerObj[`${display}Use`] || g_headerObj[`${display}Set`] === C_FLG_ON);
|
|
5978
5977
|
|
|
5979
|
-
|
|
5980
|
-
createGeneralSetting(spriteList.opacity, `opacity`, { unitName: g_lblNameObj.percent });
|
|
5981
|
-
}
|
|
5978
|
+
createGeneralSetting(spriteList.opacity, `opacity`, { unitName: g_lblNameObj.percent });
|
|
5982
5979
|
|
|
5983
5980
|
// ---------------------------------------------------
|
|
5984
5981
|
// タイミング調整 (HitPosition)
|
|
@@ -6284,9 +6281,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6284
6281
|
*/
|
|
6285
6282
|
const makeKCButtonHeader = (_id, _name, {
|
|
6286
6283
|
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
|
-
};
|
|
6284
|
+
} = {}, ..._classes) => createDivCss2Label(_id, g_lblNameObj[_name], { x, y, w, h, siz, align, ...rest }, ..._classes);
|
|
6290
6285
|
|
|
6291
6286
|
/**
|
|
6292
6287
|
* キーコンフィグ用設定ボタン
|
|
@@ -6299,9 +6294,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6299
6294
|
* @returns ボタン
|
|
6300
6295
|
*/
|
|
6301
6296
|
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
|
-
};
|
|
6297
|
+
siz = g_limitObj.jdgCntsSiz, borderStyle = `solid`, cxtFunc, ...rest } = {}, _mainClass = g_cssObj.button_RevOFF, ..._classes) =>
|
|
6298
|
+
makeSettingLblCssButton(_id, getStgDetailName(_text), 0, _func, { x, y, w, h, siz, cxtFunc, borderStyle, ...rest }, _mainClass, ..._classes);
|
|
6305
6299
|
|
|
6306
6300
|
/**
|
|
6307
6301
|
* キーコンフィグ用ミニボタン
|
|
@@ -6310,10 +6304,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6310
6304
|
* @param {function} _func
|
|
6311
6305
|
* @param {*} object (x, y, w, h, siz)
|
|
6312
6306
|
*/
|
|
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
|
-
};
|
|
6307
|
+
const makeMiniKCButton = (_id, _directionFlg, _func, { x = g_sWidth * 5 / 6 - 30, y = 15, w = 15, h = 20, siz = g_limitObj.mainSiz } = {}) =>
|
|
6308
|
+
createCss2Button(`${_id}${_directionFlg}`, g_settingBtnObj.chara[_directionFlg], _func, { x, y, w, h, siz }, g_cssObj.button_Mini);
|
|
6317
6309
|
|
|
6318
6310
|
/**
|
|
6319
6311
|
* キーコンフィグ用グループ設定ラベル・ボタンの作成
|
|
@@ -6340,7 +6332,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6340
6332
|
multiAppend(divRoot,
|
|
6341
6333
|
|
|
6342
6334
|
// ショートカットキーメッセージ
|
|
6343
|
-
createDescDiv(`scMsg`, g_lblNameObj.kcShortcutDesc.split(`{0}`)
|
|
6335
|
+
createDescDiv(`scMsg`, g_lblNameObj.kcShortcutDesc.split(`{0}`)
|
|
6336
|
+
.join(g_isMac ? `Shift+${g_kCd[g_headerObj.keyRetry]}` : g_kCd[g_headerObj.keyTitleBack])
|
|
6344
6337
|
.split(`{1}`).join(g_kCd[g_headerObj.keyRetry]), `scKcMsg`),
|
|
6345
6338
|
|
|
6346
6339
|
// 別キーモード警告メッセージ
|
|
@@ -6386,8 +6379,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6386
6379
|
|
|
6387
6380
|
const nextLeft = (kWidth - C_ARW_WIDTH) / 2 + g_keyObj.blank * stdPos - maxLeftX - 10;
|
|
6388
6381
|
cursor.style.left = `${nextLeft}px`;
|
|
6389
|
-
|
|
6390
|
-
cursor.style.top = `${baseY + C_KYC_REPHEIGHT * g_currentk}px`;
|
|
6382
|
+
cursor.style.top = `${C_KYC_HEIGHT * Number(posj > divideCnt) + 57 + C_KYC_REPHEIGHT * g_currentk}px`;
|
|
6391
6383
|
g_kcType = (g_currentk === 0 ? `Main` : `Replaced`);
|
|
6392
6384
|
|
|
6393
6385
|
// 次の位置が見えなくなったらkeyconSpriteの位置を調整する
|
|
@@ -6424,10 +6416,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6424
6416
|
keyconSprite.scrollLeft = - maxLeftX;
|
|
6425
6417
|
};
|
|
6426
6418
|
|
|
6427
|
-
const getNextNum = (_scrollNum, _groupName, _target) =>
|
|
6428
|
-
|
|
6429
|
-
return nextPos(typeNum, _scrollNum, g_keycons[_groupName].length);
|
|
6430
|
-
};
|
|
6419
|
+
const getNextNum = (_scrollNum, _groupName, _target) =>
|
|
6420
|
+
nextPos(g_keycons[_groupName].findIndex(value => value === _target), _scrollNum, g_keycons[_groupName].length);
|
|
6431
6421
|
|
|
6432
6422
|
/**
|
|
6433
6423
|
* ConfigTypeの制御
|
|
@@ -6502,7 +6492,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6502
6492
|
const nextNum = getNextNum(_scrollNum, `colorTypes`, g_colorType);
|
|
6503
6493
|
g_colorType = g_keycons.colorTypes[nextNum];
|
|
6504
6494
|
if (g_headerObj.colorUse) {
|
|
6505
|
-
g_stateObj.d_color = g_keycons.colorDefTypes.findIndex(val => val === g_colorType) !== -1
|
|
6495
|
+
g_stateObj.d_color = boolToSwitch(g_keycons.colorDefTypes.findIndex(val => val === g_colorType) !== -1);
|
|
6506
6496
|
}
|
|
6507
6497
|
changeSetColor();
|
|
6508
6498
|
viewGroupObj.color(`_${g_keycons.colorGroupNum}`);
|
|
@@ -6578,8 +6568,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6578
6568
|
keyconSprite.scrollLeft = - maxLeftX;
|
|
6579
6569
|
|
|
6580
6570
|
// キーパターン表示
|
|
6581
|
-
const lblTransKey = hasVal(g_keyObj[`transKey${keyCtrlPtn}`]) ?
|
|
6582
|
-
`(${g_keyObj[`transKey${keyCtrlPtn}`] ?? ''})` : ``;
|
|
6571
|
+
const lblTransKey = hasVal(g_keyObj[`transKey${keyCtrlPtn}`]) ? `(${g_keyObj[`transKey${keyCtrlPtn}`] ?? ''})` : ``;
|
|
6583
6572
|
|
|
6584
6573
|
/**
|
|
6585
6574
|
* キーパターン検索
|
|
@@ -6792,8 +6781,7 @@ const getKeyInfo = _ => {
|
|
|
6792
6781
|
const keyGroupList = makeDedupliArray(keyGroupMaps.flat()).sort((a, b) => parseInt(a) - parseInt(b));
|
|
6793
6782
|
|
|
6794
6783
|
return {
|
|
6795
|
-
keyCtrlPtn
|
|
6796
|
-
keyGroupMaps: keyGroupMaps, keyGroupList: keyGroupList,
|
|
6784
|
+
keyCtrlPtn, keyNum, posMax, divideCnt, keyGroupMaps, keyGroupList,
|
|
6797
6785
|
};
|
|
6798
6786
|
};
|
|
6799
6787
|
|
|
@@ -6840,18 +6828,7 @@ const changeSetColor = _ => {
|
|
|
6840
6828
|
* @param {string} _cssName
|
|
6841
6829
|
*/
|
|
6842
6830
|
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クラスを適用
|
|
6831
|
+
_obj.classList.remove(g_cssObj.keyconfig_Changekey, g_cssObj.keyconfig_Defaultkey, g_cssObj.title_base);
|
|
6855
6832
|
_obj.classList.add(_cssName);
|
|
6856
6833
|
};
|
|
6857
6834
|
|
|
@@ -7537,7 +7514,10 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7537
7514
|
*/
|
|
7538
7515
|
const getRefData = (_header, _dataName) => {
|
|
7539
7516
|
const data = _dosObj[`${_header}${_dataName}`];
|
|
7540
|
-
|
|
7517
|
+
let dataStr = data;
|
|
7518
|
+
splitLF(data)?.filter(val => val?.startsWith(_header) && _dosObj[val] !== undefined)
|
|
7519
|
+
.forEach(val => dataStr = dataStr.replace(val, _dosObj[val]));
|
|
7520
|
+
return dataStr;
|
|
7541
7521
|
}
|
|
7542
7522
|
|
|
7543
7523
|
/**
|
|
@@ -7562,7 +7542,8 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7562
7542
|
}
|
|
7563
7543
|
|
|
7564
7544
|
const list = [];
|
|
7565
|
-
const
|
|
7545
|
+
const ptnName = `${(g_keyObj.currentPtn === -1 ? g_keyObj.storagePtn : g_keyObj.currentPtn) + 1}`;
|
|
7546
|
+
const keyName = setVal(g_keyObj[`transKey${_keyCtrlPtn}`], g_keyObj.currentKey);
|
|
7566
7547
|
let type = ``;
|
|
7567
7548
|
if (g_stateObj.scroll !== `---`) {
|
|
7568
7549
|
type = `Alt`;
|
|
@@ -7570,14 +7551,13 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7570
7551
|
type = `Rev`;
|
|
7571
7552
|
}
|
|
7572
7553
|
|
|
7573
|
-
|
|
7574
|
-
list.push(`${
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
list.push(type);
|
|
7580
|
-
list.push(``);
|
|
7554
|
+
[g_stateObj.scroll, type, ``].forEach(header => {
|
|
7555
|
+
list.push(`${header}[${ptnName}]`, `${header}<${keyName}>`);
|
|
7556
|
+
if (hasVal(g_keyObj[`transKey${_keyCtrlPtn}`])) {
|
|
7557
|
+
list.push(`${header}A`);
|
|
7558
|
+
}
|
|
7559
|
+
});
|
|
7560
|
+
list.push(g_stateObj.scroll, type, ``);
|
|
7581
7561
|
|
|
7582
7562
|
return makeDedupliArray(list);
|
|
7583
7563
|
};
|
|
@@ -8066,7 +8046,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
8066
8046
|
}
|
|
8067
8047
|
|
|
8068
8048
|
// 個別加速のタイミング更新
|
|
8069
|
-
const
|
|
8049
|
+
const calcBoostData = _data => {
|
|
8070
8050
|
if (hasArrayList(_data, 2)) {
|
|
8071
8051
|
let delIdx = 0;
|
|
8072
8052
|
for (let k = _data.length - 2; k >= 0; k -= 2) {
|
|
@@ -8086,7 +8066,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
8086
8066
|
}
|
|
8087
8067
|
return [];
|
|
8088
8068
|
};
|
|
8089
|
-
g_workObj.boostData =
|
|
8069
|
+
g_workObj.boostData = calcBoostData(_dataObj.boostData);
|
|
8090
8070
|
|
|
8091
8071
|
/**
|
|
8092
8072
|
* 色変化・モーションデータ・スクロール反転データのタイミング更新
|
|
@@ -8534,7 +8514,7 @@ const getArrowSettings = _ => {
|
|
|
8534
8514
|
const scrollDirOptions = (g_keyObj[`scrollDir${keyCtrlPtn}`] !== undefined ?
|
|
8535
8515
|
g_keyObj[`scrollDir${keyCtrlPtn}`][g_stateObj.scroll] : [...Array(keyNum)].fill(1));
|
|
8536
8516
|
|
|
8537
|
-
g_stateObj.autoAll = (g_stateObj.autoPlay === C_FLG_ALL
|
|
8517
|
+
g_stateObj.autoAll = boolToSwitch(g_stateObj.autoPlay === C_FLG_ALL);
|
|
8538
8518
|
g_workObj.hitPosition = (g_stateObj.autoAll ? 0 : g_stateObj.hitPosition);
|
|
8539
8519
|
changeSetColor();
|
|
8540
8520
|
|
|
@@ -9267,7 +9247,7 @@ const mainInit = _ => {
|
|
|
9267
9247
|
g_typeLists.arrow.forEach(type =>
|
|
9268
9248
|
judgeObjDelete[type] = (_j, _deleteName) => {
|
|
9269
9249
|
g_workObj[`judg${toCapitalize(type)}Cnt`][_j]++;
|
|
9270
|
-
|
|
9250
|
+
document.getElementById(_deleteName).remove();
|
|
9271
9251
|
delete g_attrObj[_deleteName];
|
|
9272
9252
|
});
|
|
9273
9253
|
|
|
@@ -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`,
|