Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [0645] フェードインでスクロール反転の初期位置が正しく反映されない問題を修正 #1408

Merged
merged 1 commit into from Feb 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions js/danoni_main.js
Expand Up @@ -7152,7 +7152,7 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
const arrowNum = parseFloat(tmpScrollchData[1]);
const scrollDir = parseFloat(tmpScrollchData[2] ?? `1`);

scrollchData.push([frame, frame, arrowNum, scrollDir]);
scrollchData.push([frame, arrowNum, frame, scrollDir]);
});
return scrollchData.sort((_a, _b) => _a[0] - _b[0]).flat();
}
Expand Down Expand Up @@ -7738,7 +7738,8 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
g_workObj.boostData = getTimingData(_dataObj.boostData);

/**
* 色変化・モーションデータのタイミング更新
* 色変化・モーションデータ・スクロール反転データのタイミング更新
* - この関数を使用する場合、配列グループの先頭2つが「フレーム数、矢印番号」となっていないと動作しない
* @param {string} _type
* @param {string} _header
* @param {function} _setFunc
Expand All @@ -7759,6 +7760,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
const calcFrameFlg = (_colorFlg && !isFrzHitColor(baseData[k + 1]) && !baseData[k + 3]) || _calcFrameFlg;

if (baseData[k] < g_scoreObj.frameNum) {
// フェードイン直前にある色変化・モーションデータ・スクロール反転データを取得して格納
if (!hasValInArray(baseData[k + 1], frontData)) {
frontData.unshift(baseData.slice(k + 1, k + _term));
}
Expand Down Expand Up @@ -7844,7 +7846,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
return _data;
};

// 個別・全体色変化、モーションデータのタイミング更新
// 個別・全体色変化、モーションデータ・スクロール反転データのタイミング更新
[``, `dummy`].forEach(type =>
calcDataTiming(`color`, type, pushColors, { _colorFlg: true }));

Expand Down Expand Up @@ -8094,7 +8096,7 @@ const pushCssMotions = (_header, _frame, _val, _styleName, _styleNameRev) => {
* @param {number} _val
* @param {number} _scrollDir
*/
const pushScrollchs = (_header, _frameArrow, _frameStep, _val, _scrollDir) => {
const pushScrollchs = (_header, _frameArrow, _val, _frameStep, _scrollDir) => {
const tkObj = getKeyInfo();

const frameArrow = Math.max(_frameArrow, g_scoreObj.frameNum);
Expand Down