GUI: add "set effect" option to randomize

This commit is contained in:
tildearrow 2025-02-06 17:25:50 -05:00
parent 096d9ebba8
commit 4019066a64
3 changed files with 19 additions and 6 deletions

View file

@ -1427,7 +1427,7 @@ void FurnaceGUI::doScale(float top) {
makeUndo(GUI_UNDO_PATTERN_SCALE);
}
void FurnaceGUI::doRandomize(int bottom, int top, bool mode) {
void FurnaceGUI::doRandomize(int bottom, int top, bool mode, bool eff, int effVal) {
finishSelection();
prepareUndo(GUI_UNDO_PATTERN_RANDOMIZE);
@ -1463,6 +1463,9 @@ void FurnaceGUI::doRandomize(int bottom, int top, bool mode) {
} else {
pat->data[j][iFine+1]=value;
}
if (eff && iFine>2 && (iFine&1)) {
pat->data[j][iFine+1]=effVal;
}
}
}
}