danoniplus 38.2.0 → 38.3.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/README.md +0 -2
- package/js/danoni_main.js +73 -18
- package/js/lib/danoni_constants.js +20 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Dancing☆Onigiri (CW Edition)
|
|
2
2
|
|
|
3
|
-
[](https://www.codefactor.io/repository/github/cwtickle/danoniplus)
|
|
4
|
-
[](https://app.codacy.com/gh/cwtickle/danoniplus/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
5
3
|
[](https://github.com/cwtickle/danoniplus/actions?query=workflow%3ACodeQL)
|
|
6
4
|
[](https://discord.gg/YVWUdUGyMy)
|
|
7
5
|
[](https://github.com/cwtickle/danoniplus/security/policy)
|
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 :
|
|
7
|
+
* Revised : 2025/01/08
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 38.
|
|
12
|
-
const g_revisedDate = `
|
|
11
|
+
const g_version = `Ver 38.3.0`;
|
|
12
|
+
const g_revisedDate = `2025/01/08`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -1107,6 +1107,7 @@ const getFontSize = (_str, _maxWidth, _font = getBasicFont(), _maxFontsize = 64,
|
|
|
1107
1107
|
const createDescDiv = (_id, _str, { altId = _id, siz = g_limitObj.mainSiz } = {}) =>
|
|
1108
1108
|
createDivCss2Label(_id, _str, Object.assign(g_lblPosObj[altId], {
|
|
1109
1109
|
siz: getFontSize(_str, g_lblPosObj[altId]?.w || g_sWidth, getBasicFont(), siz),
|
|
1110
|
+
pointerEvents: C_DIS_NONE,
|
|
1110
1111
|
}));
|
|
1111
1112
|
|
|
1112
1113
|
/*-----------------------------------------------------------*/
|
|
@@ -2988,8 +2989,10 @@ const headerConvert = _dosObj => {
|
|
|
2988
2989
|
// プレイ中のショートカットキー
|
|
2989
2990
|
obj.keyRetry = setIntVal(getKeyCtrlVal(_dosObj.keyRetry), C_KEY_RETRY);
|
|
2990
2991
|
obj.keyRetryDef = obj.keyRetry;
|
|
2992
|
+
obj.keyRetryDef2 = obj.keyRetry;
|
|
2991
2993
|
obj.keyTitleBack = setIntVal(getKeyCtrlVal(_dosObj.keyTitleBack), C_KEY_TITLEBACK);
|
|
2992
2994
|
obj.keyTitleBackDef = obj.keyTitleBack;
|
|
2995
|
+
obj.keyTitleBackDef2 = obj.keyTitleBack;
|
|
2993
2996
|
|
|
2994
2997
|
// フリーズアローの許容フレーム数設定
|
|
2995
2998
|
obj.frzAttempt = setIntVal(_dosObj.frzAttempt, C_FRM_FRZATTEMPT);
|
|
@@ -6680,6 +6683,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6680
6683
|
const divRoot = document.getElementById(`divRoot`);
|
|
6681
6684
|
g_kcType = _kcType;
|
|
6682
6685
|
g_currentPage = `keyConfig`;
|
|
6686
|
+
let selectedKc = `Default`;
|
|
6683
6687
|
|
|
6684
6688
|
// 譜面初期情報ロード許可フラグ
|
|
6685
6689
|
g_canLoadDifInfoFlg = false;
|
|
@@ -6845,6 +6849,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6845
6849
|
g_currentj = j;
|
|
6846
6850
|
g_currentk = k;
|
|
6847
6851
|
g_prevKey = -1;
|
|
6852
|
+
selectedKc = `Default`;
|
|
6848
6853
|
g_keycons.cursorNum = g_keycons.cursorNumList.findIndex(val => val === g_currentj);
|
|
6849
6854
|
setKeyConfigCursor();
|
|
6850
6855
|
}, {
|
|
@@ -7000,12 +7005,32 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
7000
7005
|
viewGroup(_type);
|
|
7001
7006
|
};
|
|
7002
7007
|
|
|
7008
|
+
const kcSubX = parseFloat(keyconSprite.style.width) * ((1 - g_keyObj.scale) / 4);
|
|
7009
|
+
const kcSubY = parseFloat(keyconSprite.style.height) / ((1 + g_keyObj.scale) / 2) - parseFloat(keyconSprite.style.height);
|
|
7003
7010
|
multiAppend(divRoot,
|
|
7004
7011
|
|
|
7005
7012
|
// ショートカットキーメッセージ
|
|
7006
|
-
createDescDiv(`scMsg`, g_lblNameObj.kcShortcutDesc
|
|
7007
|
-
|
|
7008
|
-
|
|
7013
|
+
createDescDiv(`scMsg`, g_lblNameObj.kcShortcutDesc, { altId: `scKcMsg` }),
|
|
7014
|
+
|
|
7015
|
+
// タイトルバックのショートカットキー変更
|
|
7016
|
+
createCss2Button(`scTitleBack`, getScMsg.TitleBack(), () => {
|
|
7017
|
+
if (!g_isMac) {
|
|
7018
|
+
cursor.style.left = wUnit(g_btnX(1 / 4) - kcSubX);
|
|
7019
|
+
cursor.style.top = wUnit(g_sHeight - 160 + kcSubY);
|
|
7020
|
+
selectedKc = `TitleBack`;
|
|
7021
|
+
}
|
|
7022
|
+
}, g_lblPosObj.scTitleBack, g_cssObj.button_Default_NoColor,
|
|
7023
|
+
g_headerObj.keyTitleBack === g_headerObj.keyTitleBackDef2 ?
|
|
7024
|
+
g_cssObj.title_base : g_cssObj.keyconfig_Changekey),
|
|
7025
|
+
|
|
7026
|
+
// リトライのショートカットキー変更
|
|
7027
|
+
createCss2Button(`scRetry`, getScMsg.Retry(), () => {
|
|
7028
|
+
cursor.style.left = wUnit(g_btnX(5 / 8) + kcSubX);
|
|
7029
|
+
cursor.style.top = wUnit(g_sHeight - 160 + kcSubY);
|
|
7030
|
+
selectedKc = `Retry`;
|
|
7031
|
+
}, g_lblPosObj.scRetry, g_cssObj.button_Default_NoColor,
|
|
7032
|
+
g_headerObj.keyRetry === g_headerObj.keyRetryDef2 ?
|
|
7033
|
+
g_cssObj.title_base : g_cssObj.keyconfig_Changekey),
|
|
7009
7034
|
|
|
7010
7035
|
// 別キーモード警告メッセージ
|
|
7011
7036
|
createDivCss2Label(
|
|
@@ -7452,6 +7477,27 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
7452
7477
|
// 全角切替、BackSpace、Deleteキー、Escキーは割り当て禁止
|
|
7453
7478
|
// また、直前と同じキーを押した場合(BackSpaceを除く)はキー操作を無効にする
|
|
7454
7479
|
const disabledKeys = [240, 242, 243, 244, 91, 29, 28, 27, 259, g_prevKey];
|
|
7480
|
+
|
|
7481
|
+
if (selectedKc === `TitleBack` || selectedKc === `Retry`) {
|
|
7482
|
+
// プレイ中ショートカットキー変更
|
|
7483
|
+
if (disabledKeys.includes(setKey) || g_kCdN[setKey] === undefined) {
|
|
7484
|
+
makeInfoWindow(g_msgInfoObj.I_0002, `fadeOut0`);
|
|
7485
|
+
return;
|
|
7486
|
+
}
|
|
7487
|
+
g_headerObj[`key${selectedKc}`] = setKey;
|
|
7488
|
+
g_headerObj[`key${selectedKc}Def`] = setKey;
|
|
7489
|
+
document.getElementById(`sc${selectedKc}`).textContent = getScMsg[selectedKc]();
|
|
7490
|
+
document.getElementById(`sc${selectedKc}`).style.fontSize = `${getFontSize(getScMsg[selectedKc](), g_btnWidth(5 / 12) - 40, getBasicFont(), 13)}px`;
|
|
7491
|
+
if (g_isMac) {
|
|
7492
|
+
scTitleBack.textContent = getScMsg.TitleBack();
|
|
7493
|
+
scTitleBack.style.fontSize = `${getFontSize(getScMsg.TitleBack(), g_btnWidth(5 / 12) - 40, getBasicFont(), 13)}px`;
|
|
7494
|
+
}
|
|
7495
|
+
changeConfigColor(document.getElementById(`sc${selectedKc}`),
|
|
7496
|
+
g_headerObj[`key${selectedKc}`] === g_headerObj[`key${selectedKc}Def2`] ?
|
|
7497
|
+
g_cssObj.title_base : g_cssObj.keyconfig_Changekey);
|
|
7498
|
+
return;
|
|
7499
|
+
}
|
|
7500
|
+
|
|
7455
7501
|
if (g_localeObj.val === `Ja`) {
|
|
7456
7502
|
disabledKeys.unshift(229);
|
|
7457
7503
|
}
|
|
@@ -8274,22 +8320,14 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
8274
8320
|
// 矢印番号の組み立て
|
|
8275
8321
|
const colorVals = [];
|
|
8276
8322
|
replaceStr(patternStr[0], g_escapeStr.targetPatternName)?.split(`/`)?.forEach(val => {
|
|
8277
|
-
if (val.
|
|
8278
|
-
// g付きの場合は矢印グループから対象の矢印番号を検索
|
|
8279
|
-
const groupVal = setIntVal(val.slice(1));
|
|
8280
|
-
for (let j = 0; j < keyNum; j++) {
|
|
8281
|
-
if (g_keyObj[`color${_keyCtrlPtn}`][j] === groupVal) {
|
|
8282
|
-
colorVals.push(j);
|
|
8283
|
-
}
|
|
8284
|
-
}
|
|
8285
|
-
} else if (val.indexOf(`...`) > 0) {
|
|
8323
|
+
if (val.indexOf(`...`) > 0) {
|
|
8286
8324
|
// 範囲指定表記の補完 例. 0...3 -> 0/1/2/3
|
|
8287
8325
|
const [valMin, valMax] = [val.split(`...`)[0], val.split(`...`)[1]].map(val => setIntVal(val));
|
|
8288
8326
|
for (let k = valMin; k <= valMax; k++) {
|
|
8289
|
-
colorVals.push(
|
|
8327
|
+
colorVals.push(String(k));
|
|
8290
8328
|
}
|
|
8291
8329
|
} else {
|
|
8292
|
-
colorVals.push(
|
|
8330
|
+
colorVals.push(val);
|
|
8293
8331
|
}
|
|
8294
8332
|
});
|
|
8295
8333
|
|
|
@@ -9207,6 +9245,9 @@ const getFrzLength = (_speedOnFrame, _startFrame, _endFrame) => {
|
|
|
9207
9245
|
|
|
9208
9246
|
/**
|
|
9209
9247
|
* キーパターン(デフォルト)に対応する矢印番号を格納
|
|
9248
|
+
* - 色変化、矢印・フリーズアローモーション、スクロール変化で
|
|
9249
|
+
* 矢印レーンの番号を実際のキーパターンに対応する番号に置き換える際に使用
|
|
9250
|
+
* - 例: [0, 1, 2, 3, 4] -> [4, 0, 1, 2, 3]
|
|
9210
9251
|
*/
|
|
9211
9252
|
const convertReplaceNums = () => {
|
|
9212
9253
|
const tkObj = getKeyInfo();
|
|
@@ -9284,7 +9325,17 @@ const pushColors = (_header, _frame, _val, _colorCd, _allFlg, _pattern = ``) =>
|
|
|
9284
9325
|
allUseTypes.push(`Frz`);
|
|
9285
9326
|
}
|
|
9286
9327
|
// 色変化情報の格納
|
|
9287
|
-
|
|
9328
|
+
if (_val.startsWith('g')) {
|
|
9329
|
+
// g付きの場合は矢印グループから対象の矢印番号を検索
|
|
9330
|
+
const groupVal = setIntVal(_val.slice(1));
|
|
9331
|
+
for (let j = 0; j < tkObj.keyNum; j++) {
|
|
9332
|
+
if (g_keyObj[`color${tkObj.keyCtrlPtn}`][j] === groupVal) {
|
|
9333
|
+
baseHeaders.forEach(baseHeader => pushColor(baseHeader, j + addAll));
|
|
9334
|
+
}
|
|
9335
|
+
}
|
|
9336
|
+
} else {
|
|
9337
|
+
baseHeaders.forEach(baseHeader => pushColor(baseHeader, g_workObj.replaceNums[setIntVal(_val)] + addAll));
|
|
9338
|
+
}
|
|
9288
9339
|
};
|
|
9289
9340
|
|
|
9290
9341
|
/**
|
|
@@ -9526,6 +9577,10 @@ const getArrowSettings = () => {
|
|
|
9526
9577
|
g_gameOverFlg = false;
|
|
9527
9578
|
g_finishFlg = true;
|
|
9528
9579
|
g_workObj.nonDefaultSc = g_headerObj.keyRetry !== C_KEY_RETRY || g_headerObj.keyTitleBack !== C_KEY_TITLEBACK;
|
|
9580
|
+
if (g_headerObj.scAreaWidth === 0 && (g_headerObj.keyRetry !== g_headerObj.keyRetryDef2 || g_headerObj.keyTitleBack !== g_headerObj.keyTitleBackDef2)) {
|
|
9581
|
+
g_workObj.nonDefaultSc = false;
|
|
9582
|
+
}
|
|
9583
|
+
|
|
9529
9584
|
g_workObj.backX = (g_workObj.nonDefaultSc && g_headerObj.playingLayout ? g_headerObj.scAreaWidth : 0);
|
|
9530
9585
|
g_workObj.playingX = g_headerObj.playingX + g_workObj.backX;
|
|
9531
9586
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised :
|
|
8
|
+
* Revised : 2025/01/08 (v38.3.0)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -159,6 +159,10 @@ const g_windowObj = {
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
const g_lblPosObj = {};
|
|
162
|
+
const getScMsg = {
|
|
163
|
+
TitleBack: () => g_lblNameObj.kcShortcutDesc1.split(`{0}`).join(g_isMac ? `Shift+${g_kCd[g_headerObj.keyRetry]}` : g_kCd[g_headerObj.keyTitleBack]),
|
|
164
|
+
Retry: () => g_lblNameObj.kcShortcutDesc2.split(`{1}`).join(g_kCd[g_headerObj.keyRetry]),
|
|
165
|
+
};
|
|
162
166
|
|
|
163
167
|
/**
|
|
164
168
|
* 可変部分のウィンドウサイズを更新
|
|
@@ -321,7 +325,7 @@ const updateWindowSiz = () => {
|
|
|
321
325
|
|
|
322
326
|
/** キーコンフィグ画面 */
|
|
323
327
|
scKcMsg: {
|
|
324
|
-
x: g_btnX(), y: g_sHeight - 50, w: g_btnWidth(), h: 20,
|
|
328
|
+
x: g_btnX(), y: g_sHeight - 50, w: g_btnWidth(1 / 4), h: 20,
|
|
325
329
|
},
|
|
326
330
|
kcMsg: {
|
|
327
331
|
x: g_btnX(), y: g_sHeight - 33, w: g_btnWidth(), h: 20, siz: g_limitObj.mainSiz,
|
|
@@ -380,6 +384,14 @@ const updateWindowSiz = () => {
|
|
|
380
384
|
w: g_btnWidth(1 / 3), h: g_limitObj.btnHeight / 2, siz: g_limitObj.btnSiz * 2 / 3,
|
|
381
385
|
title: g_msgObj.kcReset,
|
|
382
386
|
},
|
|
387
|
+
scTitleBack: {
|
|
388
|
+
x: g_btnX(1 / 4) + 20, y: g_sHeight - 50, align: C_ALIGN_LEFT,
|
|
389
|
+
w: g_btnWidth(5 / 12) - 40, h: C_KYC_REPHEIGHT, siz: getFontSize(getScMsg.TitleBack(), g_btnWidth(5 / 12) - 40, getBasicFont(), 13),
|
|
390
|
+
},
|
|
391
|
+
scRetry: {
|
|
392
|
+
x: g_btnX(5 / 8) + 20, y: g_sHeight - 50, align: C_ALIGN_LEFT,
|
|
393
|
+
w: g_btnWidth(5 / 12) - 40, h: C_KYC_REPHEIGHT, siz: getFontSize(getScMsg.Retry(), g_btnWidth(5 / 12) - 40, getBasicFont(), 13),
|
|
394
|
+
},
|
|
383
395
|
|
|
384
396
|
/** メイン画面 */
|
|
385
397
|
stepHit: {
|
|
@@ -3158,7 +3170,9 @@ const g_lang_lblNameObj = {
|
|
|
3158
3170
|
kcShuffleDesc: `番号をクリックでシャッフルグループ、矢印をクリックでカラーグループを変更`,
|
|
3159
3171
|
kcNoShuffleDesc: `矢印をクリックでカラーグループを変更`,
|
|
3160
3172
|
sdDesc: `[クリックでON/OFFを切替、灰色でOFF]`,
|
|
3161
|
-
kcShortcutDesc:
|
|
3173
|
+
kcShortcutDesc: `プレイ中ショートカット:`,
|
|
3174
|
+
kcShortcutDesc1: `タイトルバック: {0}`,
|
|
3175
|
+
kcShortcutDesc2: `リトライ: {1}`,
|
|
3162
3176
|
transKeyDesc: `別キーモードではキーコンフィグ、ColorType等は保存されません`,
|
|
3163
3177
|
sdShortcutDesc: `Hid+/Sud+時ショートカット:「pageUp」カバーを上へ / 「pageDown」下へ`,
|
|
3164
3178
|
resultImageDesc: `画像を右クリックしてコピーできます`,
|
|
@@ -3197,7 +3211,9 @@ const g_lang_lblNameObj = {
|
|
|
3197
3211
|
kcShuffleDesc: `Click the number to change the shuffle group, and click the arrow to change the color.`,
|
|
3198
3212
|
kcNoShuffleDesc: `Click the arrow to change the color group.`,
|
|
3199
3213
|
sdDesc: `[Click to switch, gray to OFF]`,
|
|
3200
|
-
kcShortcutDesc: `Shortcut during play
|
|
3214
|
+
kcShortcutDesc: `Shortcut during play:`,
|
|
3215
|
+
kcShortcutDesc1: `Return to title: {0}`,
|
|
3216
|
+
kcShortcutDesc2: `Retry the game: {1}`,
|
|
3201
3217
|
transKeyDesc: `Key config, Color type, etc. are not saved in another key mode`,
|
|
3202
3218
|
sdShortcutDesc: `When "Hidden+" or "Sudden+" select, "pageUp" cover up / "pageDown" cover down`,
|
|
3203
3219
|
resultImageDesc: `You can copy the image by right-clicking on it.`,
|