Skip to content

Commit d8e09b8

Browse files
committed
Fixed issue where toggling Use flat notes does not change note chart
1 parent 33f81f0 commit d8e09b8

30 files changed

Lines changed: 969 additions & 1790 deletions

Minecraft Note Block Studio.yyp

Lines changed: 725 additions & 1669 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"resourceType": "GMExtensionConfigSet",
3+
"configurables": null,
4+
"resourceVersion": "1.0"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"resourceType": "GMExtensionConfigSet",
3+
"configurables": null,
4+
"resourceVersion": "1.0"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"resourceType": "GMExtensionConfigSet",
3+
"configurables": null,
4+
"resourceVersion": "1.0"
5+
}

options/extensions/Taskbar.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"resourceType": "GMExtensionConfigSet",
3+
"configurables": null,
4+
"resourceVersion": "1.0"
5+
}

options/extensions/pygml.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"resourceType": "GMExtensionConfigSet",
3+
"configurables": null,
4+
"resourceVersion": "1.0"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"resourceType": "GMExtensionConfigSet",
3+
"configurables": null,
4+
"resourceVersion": "1.0"
5+
}

scripts/draw_notechart/draw_notechart.gml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
function draw_notechart(argument0, argument1, argument2, argument3) {
2-
// draw_notechart(x, y, key, sharp)
3-
var x1, xx, yy, key, sharp, a;
2+
// draw_notechart(x, y, key, accidental)
3+
var x1, xx, yy, key, accidental, a;
44
x1 = argument0
55
xx = median(0, x1 - 32, rw - 320)
66
yy = argument1
77
key = argument2
8-
sharp = argument3
8+
accidental = argument3
99
draw_sprite(spr_notechart, 0 + 3 * theme, xx, yy - 320 + 1)
1010
draw_sprite(spr_notechart, (1 + (x1 > rw - 250)) + 3 * theme, x1 - 16 * (x1 > rw - 250), yy)
1111

@@ -21,7 +21,8 @@ function draw_notechart(argument0, argument1, argument2, argument3) {
2121
draw_line(xx + 32, yy - 250 + 16 * 6, xx + 32, yy - 250 + 16 * 10)
2222
draw_sprite(spr_Gclef, 0, xx + 58, yy - 250 + 16 * 3)
2323
draw_sprite(spr_Fclef, 0, xx + 48, yy - 250 + 16 * 7)
24-
draw_sprite(spr_note, sharp + 2 * (key > 22), xx + 152, yy - 250 - 8 * (key - 33))
24+
if (keynames_flat) draw_sprite(spr_note_flat, accidental + 2 * (key > 22), xx + 152, yy - 250 - 8 * (key - 33))
25+
else draw_sprite(spr_note_sharp, accidental + 2 * (key > 22), xx + 152, yy - 250 - 8 * (key - 33))
2526
if (key > 22 && key < 25) {
2627
draw_set_alpha(0.25)
2728
draw_line(xx + 122, yy - 250 + 16 * 5, xx + 180, yy - 250 + 16 * 5)

scripts/draw_notechart/draw_notechart.yy

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

scripts/draw_piano/draw_piano.gml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function draw_piano(argument0, argument1, argument2, argument3) {
2424
k2 = show_keyboard && piano_key[c2] > 0
2525
if (window = 0 && mouse_rectangle(xx + 39 * a, yy, 39, 128)) {
2626
if (!mouse_rectangle(xx + 39 * a - 12, yy - 7, 25, 71) && (!mouse_rectangle(xx + 39 * a + 27, yy - 7, 25, 71) || (a = k - 1 || c = 1 || c = 4))) {
27-
if (show_notechart && c2 > 6 && c2 < 69 && playing = 0 && !isplayer) draw_notechart(xx + 39 * a + 18, yy - 32, startkey + a, 0)
27+
if (show_notechart && c2 > 6 && c2 < 69 && playing = 0 && !isplayer) draw_notechart(xx + 39 * a + 18, yy - 32, startkey + a, 0) //handle all white keys except C and F
2828
if (mouse_check_button_pressed(mb_right) && show_keyboard) key_edit = c2
2929
// Check mouse clicks
3030
t = key_click[c2]
@@ -42,8 +42,9 @@ function draw_piano(argument0, argument1, argument2, argument3) {
4242
key_click[c2] = 0
4343
}
4444
if (window = 0 && mouse_rectangle(xx + 39 * a - 12, yy - 7, 25, 71)) {
45-
if (show_notechart && c1 > 6 && c1 < 70 && playing = 0 && !isplayer) draw_notechart(xx + 39 * a - 12 + 12, yy - 32, startkey + a - 1, 1)
46-
if (mouse_check_button_pressed(mb_right) && show_keyboard) key_edit = c1
45+
if (show_notechart && !keynames_flat && c1 > 6 && c1 < 70 && playing = 0 && !isplayer) draw_notechart(xx + 39 * a - 12 + 12, yy - 32, startkey + a - 1, 1) //handles all sharps
46+
if (show_notechart && keynames_flat && c1 > 5 && c1 < 69 && playing = 0 && !isplayer) draw_notechart(xx + 39 * a - 12 + 12, yy - 32, startkey + a, 1) //handles all flats
47+
if (mouse_check_button_pressed(mb_right) && show_keyboard) key_edit = c1
4748
t = key_click[c1]
4849
key_click[c1] = mouse_check_button(mb_left)
4950
if (t = 0 && key_click[c1]) {
@@ -86,7 +87,7 @@ function draw_piano(argument0, argument1, argument2, argument3) {
8687
k1 = (show_keyboard && piano_key[c1] > 0)
8788
if (window = 0 && mouse_rectangle(xx + 39 * a, yy, 39, 128)) {
8889
if (!mouse_rectangle(xx + 39 * a + 27, yy - 7, 25, 71) || (a = k - 1 || c = 1 || c = 4)) {
89-
if (show_notechart && c1 > 6 && c1 < 69 && playing = 0) draw_notechart(xx + 39 * a + 18, yy - 32, startkey + a, 0)
90+
if (show_notechart && c1 > 6 && c1 < 69 && playing = 0) draw_notechart(xx + 39 * a + 18, yy - 32, startkey + a, 0) //handles C and F
9091
if (mouse_check_button_pressed(mb_right) && show_keyboard) key_edit = c1
9192
t = key_click[c1]
9293
key_click[c1] = mouse_check_button(mb_left)

0 commit comments

Comments
 (0)