ft2-clone

Fasttracker 2 clone
Log | Files | Refs | README | LICENSE

commit 178bdf8be18b8056ba13e0b281246cfbaca666ca
parent c76bf4cb46d92930413d34ee8b47dc2d0c2b856c
Author: Olav Sørensen <olav.sorensen@live.no>
Date:   Sun, 29 Dec 2024 22:48:06 +0100

Scroll speed change for waveform in sample editor

Diffstat:
Msrc/ft2_sample_ed.c | 16++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/src/ft2_sample_ed.c b/src/ft2_sample_ed.c @@ -1539,7 +1539,7 @@ void sampPlayNoteDown(void) void scrollSampleDataLeft(void) { - int32_t scrollAmount, sampleLen; + int32_t sampleLen; if (instr[editor.curInstr] == NULL) sampleLen = 0; @@ -1549,11 +1549,7 @@ void scrollSampleDataLeft(void) if (smpEd_ViewSize == 0 || smpEd_ViewSize == sampleLen) return; - if (mouse.rightButtonPressed) - scrollAmount = smpEd_ViewSize / SCALE_VBLANK_DELTA(16); - else - scrollAmount = smpEd_ViewSize / SCALE_VBLANK_DELTA(32); - + int32_t scrollAmount = (uint32_t)smpEd_ViewSize / 32; if (scrollAmount < 1) scrollAmount = 1; @@ -1566,7 +1562,7 @@ void scrollSampleDataLeft(void) void scrollSampleDataRight(void) { - int32_t scrollAmount, sampleLen; + int32_t sampleLen; if (instr[editor.curInstr] == NULL) sampleLen = 0; @@ -1576,11 +1572,7 @@ void scrollSampleDataRight(void) if (smpEd_ViewSize == 0 || smpEd_ViewSize == sampleLen) return; - if (mouse.rightButtonPressed) - scrollAmount = smpEd_ViewSize / SCALE_VBLANK_DELTA(16); - else - scrollAmount = smpEd_ViewSize / SCALE_VBLANK_DELTA(32); - + int32_t scrollAmount = (uint32_t)smpEd_ViewSize / 32; if (scrollAmount < 1) scrollAmount = 1;