danoniplus 37.0.0 → 37.0.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.
Files changed (2) hide show
  1. package/js/danoni_main.js +29 -22
  2. 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 : 2024/06/15
7
+ * Revised : 2024/06/20
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 37.0.0`;
12
- const g_revisedDate = `2024/06/15`;
11
+ const g_version = `Ver 37.0.1`;
12
+ const g_revisedDate = `2024/06/20`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -7992,16 +7992,15 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
7992
7992
  }
7993
7993
 
7994
7994
  /**
7995
- * 譜面データの優先順配列の取得
7996
- * @param {string} _header
7995
+ * 譜面データの優先順配列パターンの取得
7997
7996
  * @param {string} _type
7998
7997
  * @param {number} _scoreNo
7999
7998
  */
8000
- const getPriorityList = (_header, _type, _scoreNo) => [
8001
- getRefData(_header, `${_type}${g_localeObj.val}${_scoreNo}_data`),
8002
- getRefData(_header, `${_type}${g_localeObj.val}_data`),
8003
- getRefData(_header, `${_type}${_scoreNo}_data`),
8004
- getRefData(_header, `${_type}_data`)
7999
+ const getPriorityVal = (_type, _scoreNo) => [
8000
+ `${_type}${g_localeObj.val}${_scoreNo}_data`,
8001
+ `${_type}${g_localeObj.val}_data`,
8002
+ `${_type}${_scoreNo}_data`,
8003
+ `${_type}_data`
8005
8004
  ];
8006
8005
 
8007
8006
  /**
@@ -8039,16 +8038,25 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
8039
8038
  */
8040
8039
  const makeWordData = _scoreNo => {
8041
8040
  const wordDataList = [];
8041
+ const wordTargets = [];
8042
8042
  let wordReverseFlg = false;
8043
8043
  const divideCnt = getKeyInfo().divideCnt;
8044
- const addDataList = (_type = ``) => wordDataList.push(...getPriorityList(`word`, _type, _scoreNo));
8044
+ const addDataList = (_type = ``) => wordTargets.push(...getPriorityVal(_type, _scoreNo));
8045
8045
  getPriorityHeader().forEach(val => addDataList(val));
8046
+ makeDedupliArray(wordTargets).forEach(val => wordDataList.push(getRefData(`word`, val)));
8046
8047
 
8047
8048
  if (g_stateObj.reverse === C_FLG_ON) {
8049
+ let wordTarget = ``;
8050
+ for (let val of makeDedupliArray(wordTargets)) {
8051
+ if (getRefData(`word`, val) !== undefined) {
8052
+ wordTarget = val;
8053
+ break;
8054
+ }
8055
+ }
8048
8056
 
8049
8057
  // wordRev_dataが指定されている場合はそのままの位置を採用
8050
8058
  // word_dataのみ指定されている場合、下記ルールに従って設定
8051
- if (wordDataList.find((v) => v !== undefined) === undefined) {
8059
+ if (!wordTarget.includes(`Rev`) && g_stateObj.scroll === `---`) {
8052
8060
  // Reverse時の歌詞の自動反転制御設定
8053
8061
  if (g_headerObj.wordAutoReverse !== `auto`) {
8054
8062
  wordReverseFlg = g_headerObj.wordAutoReverse === C_FLG_ON;
@@ -8129,9 +8137,11 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
8129
8137
  */
8130
8138
  const makeBackgroundData = (_header, _scoreNo, { resultTypes = [] } = {}) => {
8131
8139
  const dataList = [];
8140
+ const animationTargets = [];
8132
8141
  const calcFrameFunc = resultTypes.length > 0 ? undefined : calcFrame;
8133
- const addDataList = (_type = ``) => dataList.push(...getPriorityList(_header, _type, _scoreNo));
8142
+ const addDataList = (_type = ``) => animationTargets.push(...getPriorityVal(_type, _scoreNo));
8134
8143
  getPriorityHeader(resultTypes).forEach(val => addDataList(val));
8144
+ makeDedupliArray(animationTargets).forEach(val => dataList.push(getRefData(_header, val)));
8135
8145
 
8136
8146
  const data = dataList.find((v) => v !== undefined);
8137
8147
  return (data !== undefined ? g_animationFunc.make[_header](data, calcFrameFunc) : [[], -1]);
@@ -9021,7 +9031,8 @@ const getArrowSettings = _ => {
9021
9031
 
9022
9032
  g_typeLists.frzColor.forEach((frzType, k) => {
9023
9033
  g_workObj[`frz${frzType}Colors${type}`][j] = g_headerObj.frzColor[colorj][k] || ``;
9024
- g_workObj[`dummyFrz${frzType}Colors${type}`][j] = g_headerObj.setDummyColor[colorj];
9034
+ g_workObj[`dummyFrz${frzType}Colors${type}`][j] =
9035
+ frzType.includes(`Shadow`) ? `` : g_headerObj.setDummyColor[colorj] || ``;
9025
9036
  });
9026
9037
  g_workObj[`frzNormalShadowColors${type}`][j] = g_headerObj.frzShadowColor[colorj][0] || ``;
9027
9038
  g_workObj[`frzHitShadowColors${type}`][j] = g_headerObj.frzShadowColor[colorj][1] || ``;
@@ -10281,7 +10292,7 @@ const mainInit = _ => {
10281
10292
  // ダミーフリーズアロー生成
10282
10293
  g_workObj.mkDummyFrzArrow[currentFrame]?.forEach(data =>
10283
10294
  makeFrzArrow(data, ++dummyFrzCnts[data], `dummyFrz`, g_workObj.dummyFrzNormalColors[data],
10284
- _workObj.dummyFrzNormalBarColors[data], g_workObj.dummyFrzNormalShadowColors[data]));
10295
+ g_workObj.dummyFrzNormalBarColors[data], g_workObj.dummyFrzNormalShadowColors[data]));
10285
10296
 
10286
10297
  // フリーズアロー生成
10287
10298
  g_workObj.mkFrzArrow[currentFrame]?.forEach(data =>
@@ -10589,6 +10600,7 @@ const changeHitFrz = (_j, _k, _name, _difFrame = 0) => {
10589
10600
 
10590
10601
  const styfrzBar = $id(`${_name}Bar${frzNo}`);
10591
10602
  const styfrzBtm = $id(`${_name}Btm${frzNo}`);
10603
+ const styfrzTop = $id(`${_name}Top${frzNo}`);
10592
10604
  const styfrzTopShadow = $id(`${_name}TopShadow${frzNo}`);
10593
10605
  const styfrzBtmShadow = $id(`${_name}BtmShadow${frzNo}`);
10594
10606
 
@@ -10625,7 +10637,8 @@ const changeHitFrz = (_j, _k, _name, _difFrame = 0) => {
10625
10637
  styfrzBar.background = getColor(`HitBar`);
10626
10638
  styfrzBtm.top = wUnit(currentFrz.btmY);
10627
10639
  styfrzBtm.background = tmpHitColor;
10628
- styfrzTopShadow.opacity = 0;
10640
+ styfrzTop.top = wUnit(- hitPos);
10641
+ styfrzTopShadow.top = styfrzTop.top;
10629
10642
  styfrzBtmShadow.top = styfrzBtm.top;
10630
10643
  if (_name === `frz`) {
10631
10644
  const tmpShadowColor = getColor(`HitShadow`);
@@ -10650,17 +10663,11 @@ const changeFailedFrz = (_j, _k) => {
10650
10663
  $id(`frzHit${_j}`).opacity = 0;
10651
10664
  $id(`frzTop${frzNo}`).display = C_DIS_INHERIT;
10652
10665
  $id(`frzTop${frzNo}`).background = `#cccccc`;
10653
- $id(`frzTopShadow${frzNo}`).opacity = 1;
10654
10666
  $id(`frzTopShadow${frzNo}`).background = `#333333`;
10655
10667
  $id(`frzBtmShadow${frzNo}`).background = `#333333`;
10656
10668
  $id(`frzBar${frzNo}`).background = `#999999`;
10657
10669
  $id(`frzBar${frzNo}`).opacity = 1;
10658
10670
  $id(`frzBtm${frzNo}`).background = `#cccccc`;
10659
-
10660
- // 判定位置調整分の補正
10661
- const hitPos = g_workObj.hitPosition * g_workObj.scrollDir[_j];
10662
- $id(`frzTop${frzNo}`).top = wUnit(- hitPos);
10663
- $id(`frzTopShadow${frzNo}`).top = wUnit(- hitPos);
10664
10671
  };
10665
10672
 
10666
10673
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "37.0.0",
3
+ "version": "37.0.1",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {