[0491/sc-group] シャッフルグループ、カラーグループが初期化されない問題を修正 #1176
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔨 変更内容 / Details of Changes
🔖 関連Issue, 変更理由 / Related Issues, Reason for Changes
このときに保存済みのキー設定を読み出す処理があります(getKeyCtrl関数)。
この中にg_keyObjの「shuffle」や「color」の番号配列が含まれていたため、
一時的にこれらの番号を変更しても、元に戻る挙動になっていました。
⇒ 前にプレイした状態が「KeyPattern : Self」の場合は、g_keyObjの「shuffle」「color」「chara」「pos」「stepRtn」を変更しないようにしました。
このとき、「color」の番号配列の1番目(ColorGroup: 1)を適用するようになっていました。
これだと、ColorGroup: 2 などを指定してプレイし、元に戻った際にColorGroup: 1が呼び出されてしまう問題があります。
⇒ カラーグループが複数ある際は、現在のカラーグループに対するg_keyObjの「color」の番号配列を取得するように変更しました。
📷 スクリーンショット / Screenshot
📝 その他コメント / Other Comments
キーを変えると設定が元に戻る。
理由補足
グループ内で個別に設定を保持している(shuffleX_Y_Z:Zはグループ個別番号)のに対して、
グループが単一の場合、1つしか設定を持っていないためである(shuffleX_Y)。
現状カスタムキーではシャッフルグループやカラーグループに対応していないため、
現在の状況下ではこの仕様に留める。