From adafb49be71207128dc8fa62455a02504a22cbd8 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 12 Mar 2022 15:12:39 -0500 Subject: [PATCH] GUI: prepare for interpolate --- src/gui/gui.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 4da41cb35..59115f4a7 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -3120,6 +3120,27 @@ void FurnaceGUI::doInterpolate() { finishSelection(); prepareUndo(GUI_UNDO_PATTERN_INTERPOLATE); + std::vector> 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 && (iCoarsedata[j][iFine+1]!=-1) { + points.emplace(points.end(),j,pat->data[j][iFine+1]); + } + } + } + } + iFine=0; + } + makeUndo(GUI_UNDO_PATTERN_INTERPOLATE); }