Skip to content

Commit 5beba9f

Browse files
committed
Loop feature added
Bröther, I need lööp. Implements #25
1 parent 6912969 commit 5beba9f

13 files changed

+84
-8
lines changed

Minecraft Note Block Studio.yyp

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/control_draw/control_draw.gml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ if (playing = 1 || forward<>0) {
495495
marker_pos += (tempo / room_speed) * (forward - (forward < 0 && playing = 1))
496496
}
497497
//loop song
498-
if (loop = 1 && marker_pos > enda) {
498+
if (loop = 1 && marker_pos > enda + 1) {
499499
starta = 0
500500
marker_pos = starta
501501
sb_val[scrollbarh] = starta
@@ -830,7 +830,9 @@ if (draw_icon(icons.STOP, xx, "Stop song", 0, 0)) {playing = 0 marker_pos = 0 ma
830830
forward = 0
831831
if (draw_icon(icons.BACK, xx, "Rewind song", 0, 0)) {forward = -1} xx += 25
832832
if (draw_icon(icons.FORWARD, xx, "Fast-forward song", 0, 0)) {forward = 1} xx += 25
833-
if (draw_icon(icons.RECORD, xx, "Record key presses", 0, playing > 0 && record)) {playing = 0.25 record=!record} xx += 25 + 4
833+
if (draw_icon(icons.RECORD, xx, "Record key presses", 0, playing > 0 && record)) {playing = 0.25 record=!record} xx += 25
834+
if (draw_icon(icons.LOOP_INACTIVE + loop, xx, "Toggle looping", 0, 0)) loop = !loop
835+
xx += 25 + 4
834836
if (playing = 0) record = 0
835837
draw_separator(xx, 26) xx += 4
836838
for (a = 0; a < ds_list_size(instrument_list); a += 1) {

scripts/icons_init/icons_init.gml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,8 @@ enum icons {
6565
HELP,
6666
INTERNET,
6767
CHECK,
68-
SUB_MENU
68+
SUB_MENU,
69+
CHECK_INACTIVE,
70+
LOOP_INACTIVE,
71+
LOOP
6972
}
271 Bytes
Loading
315 Bytes
Loading
65 Bytes
Loading
271 Bytes
Loading
315 Bytes
Loading
40 Bytes
Loading

sprites/spr_icons/spr_icons.yy

Lines changed: 45 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)