mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 01:35:07 +00:00
GUI: prepare for interpolate
This commit is contained in:
parent
ab8bace7f4
commit
adafb49be7
1 changed files with 21 additions and 0 deletions
|
@ -3120,6 +3120,27 @@ void FurnaceGUI::doInterpolate() {
|
||||||
finishSelection();
|
finishSelection();
|
||||||
prepareUndo(GUI_UNDO_PATTERN_INTERPOLATE);
|
prepareUndo(GUI_UNDO_PATTERN_INTERPOLATE);
|
||||||
|
|
||||||
|
std::vector<std::pair<int,int>> points;
|
||||||
|
int iCoarse=selStart.xCoarse;
|
||||||
|
int iFine=selStart.xFine;
|
||||||
|
int ord=e->getOrder();
|
||||||
|
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
|
||||||
|
if (!e->song.chanShow[iCoarse]) continue;
|
||||||
|
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][ord],true);
|
||||||
|
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
|
||||||
|
maskOut(iFine);
|
||||||
|
points.clear();
|
||||||
|
if (iFine!=0) {
|
||||||
|
for (int j=selStart.y; j<=selEnd.y; j++) {
|
||||||
|
if (pat->data[j][iFine+1]!=-1) {
|
||||||
|
points.emplace(points.end(),j,pat->data[j][iFine+1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
iFine=0;
|
||||||
|
}
|
||||||
|
|
||||||
makeUndo(GUI_UNDO_PATTERN_INTERPOLATE);
|
makeUndo(GUI_UNDO_PATTERN_INTERPOLATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue