From 779a8d8810845dc30e5bb9a78a581107ca6ef362 Mon Sep 17 00:00:00 2001 From: cam900 Date: Fri, 29 Aug 2025 16:55:53 +0900 Subject: [PATCH] Add loop end hints for NDS in ADPCM, 8bit PCM --- src/gui/sampleEdit.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/gui/sampleEdit.cpp b/src/gui/sampleEdit.cpp index 240d0c8bd..e71f7f6b1 100644 --- a/src/gui/sampleEdit.cpp +++ b/src/gui/sampleEdit.cpp @@ -2318,6 +2318,32 @@ void FurnaceGUI::drawSampleEdit() { } } } + if (displayLoopHintsNDSA) { + if (sampleZoom<0.5) { + for (int i=0; i<(int)(sampleZoom*avail.x); i++) { + if (((i+samplePos)&7)==0) { + ImVec2 p1=ImVec2(rectMin.x+((float)i/sampleZoom),rectMin.y); + ImVec2 p2=p1; + p2.y=rectMax.y; + + dl->AddLine(p1,p2,ImGui::GetColorU32(uiColors[GUI_COLOR_SAMPLE_LOOP_HINT])); + } + } + } + } + if (displayLoopHintsNDS8) { + if (sampleZoom<0.375) { + for (int i=0; i<(int)(sampleZoom*avail.x); i++) { + if (((i+samplePos)&3)==0) { + ImVec2 p1=ImVec2(rectMin.x+((float)i/sampleZoom),rectMin.y); + ImVec2 p2=p1; + p2.y=rectMax.y; + + dl->AddLine(p1,p2,ImGui::GetColorU32(uiColors[GUI_COLOR_SAMPLE_LOOP_HINT])); + } + } + } + } if (displayLoopHintsAmiga) { if (sampleZoom<0.25) { for (int i=0; i<(int)(sampleZoom*avail.x); i++) {