diff --git a/scripts/change_block_manual/change_block_manual.gml b/scripts/change_block_manual/change_block_manual.gml index 69397df5b..c04582cd4 100644 --- a/scripts/change_block_manual/change_block_manual.gml +++ b/scripts/change_block_manual/change_block_manual.gml @@ -22,6 +22,9 @@ if (ins.loaded) play_sound(ins, key, vel, pan, pit) history_set(h_changeblock, xx, yy, ins, key, vel, pan, pit, pins, pkey, pvel, ppan, ppit) changed = 1 + +if (!pins.user && ins.user) block_custom += 1 +if (pins.user && !ins.user) block_custom -= 1 if (pkey >= 33 && pkey <= 57 && (key < 33 || key > 57)) block_outside += 1 if (key >= 33 && key <= 57 && (pkey < 33 || pkey > 57)) block_outside -= 1 if (ppit = 0 && pit != 0) block_pitched += 1 diff --git a/scripts/control_create/control_create.gml b/scripts/control_create/control_create.gml index 06c9abeee..1613d11b0 100644 --- a/scripts/control_create/control_create.gml +++ b/scripts/control_create/control_create.gml @@ -78,7 +78,7 @@ section_exists = 0 section_start = 0 section_end = 0 timeline_pressa = -1 -for (a = 0; a < 200; a += 1) text_exists[a] = 0 +for (a = 0; a < 10000; a += 1) text_exists[a] = 0 // Note blocks starta = 0 diff --git a/scripts/control_draw/control_draw.gml b/scripts/control_draw/control_draw.gml index cddb29f7c..bfdda5846 100644 --- a/scripts/control_draw/control_draw.gml +++ b/scripts/control_draw/control_draw.gml @@ -52,13 +52,13 @@ if (key_edit > -1) { // Autosave if (autosave && filename_ext(filename) = ".nbs") { tonextsave -= 1 / room_speed / 60 - if (tonextsave <= 0) save_song(filename) + if (tonextsave <= 0 && playing == 0) save_song(filename) } // Auto-recovery if (totalblocks > 0) { tonextbackup -= 1 / room_speed / 60 - if (tonextbackup <= 0) { + if (tonextbackup <= 0 && playing == 0) { save_song(backup_file, true) tonextbackup = backupmins } @@ -74,9 +74,9 @@ if (theme = 2) iconcolor = c_white // Calculate area if (show_layers) { - totalcols = floor((rw - 270) / 32) + totalcols = floor((rw - 8 - 270) / 32) } else { - totalcols = floor(rw / 32) + totalcols = floor((rw - 8) / 32) } rhval = 270 if (!show_piano) { diff --git a/scripts/draw_piano/draw_piano.gml b/scripts/draw_piano/draw_piano.gml index b9d569a03..04dcd390e 100644 --- a/scripts/draw_piano/draw_piano.gml +++ b/scripts/draw_piano/draw_piano.gml @@ -171,7 +171,7 @@ if (d = 1 && !mouse_check_button(mb_left)) { } // Check key presses if (window = 0 && text_focus = -1 && key_edit = -1 && !keyboard_check(vk_control)) { -for (a = 0 ;a < 87; a += 1) { +for (a = 0; a <= 87; a += 1) { if (piano_key[a] > 0) { if (key_press[a] = 0 && keyboard_check(piano_key[a])) { if (select_lastpressed) selected_key = a diff --git a/scripts/draw_window_schematic_export/draw_window_schematic_export.gml b/scripts/draw_window_schematic_export/draw_window_schematic_export.gml index 59cfc1787..59d5ca277 100644 --- a/scripts/draw_window_schematic_export/draw_window_schematic_export.gml +++ b/scripts/draw_window_schematic_export/draw_window_schematic_export.gml @@ -72,7 +72,7 @@ if (selected_tab_sch = 0) { if (draw_radiobox(x1 + 32, y1 + 240, sch_exp_layout = 1, "Simple walkway", "Generate a simple walkway that stretches\nas far as the length of the song.")) sch_exp_layout = 1 if (draw_radiobox(x1 + 32, y1 + 260, sch_exp_layout = 0, "Circular walkway", "Generate a walkway where the\nplayer travels back and forth.")) sch_exp_layout = 0 draw_text(x1 + 16, y1 + 290, "For Minecraft version:") - if (draw_radiobox(x1 + 32, y1 + 310, !sch_exp_minecraft_old, "1.11+", "Create a Schematic that is compatible with\nnew Minecraft versions only, starting at 1.11.")) sch_exp_minecraft_old = false + if (draw_radiobox(x1 + 32, y1 + 310, !sch_exp_minecraft_old, "1.11-1.12", "Create a Schematic that is compatible with 1.11 or 1.12.\nNOTE: Support for versions 1.13+ is coming soon.")) sch_exp_minecraft_old = false if (draw_radiobox(x1 + 32, y1 + 330, sch_exp_minecraft_old, "pre 1.11", "Create a Schematic that is compatible with\nold Minecraft versions only, before 1.11.")) sch_exp_minecraft_old = true draw_text(x1 + 170, y1 + 220, "Repeaters per row:") sch_exp_notesperrow = median(5, draw_dragvalue(5, x1 + 300, y1 + 220, sch_exp_notesperrow, 1), 100) diff --git a/scripts/draw_window_update/draw_window_update.gml b/scripts/draw_window_update/draw_window_update.gml index 253f62863..b92ac1524 100644 --- a/scripts/draw_window_update/draw_window_update.gml +++ b/scripts/draw_window_update/draw_window_update.gml @@ -8,7 +8,9 @@ if (window = w_update) draw_text(x1 + 8, y1 + 8, "Update") else draw_text(x1 + 8, y1 + 8, "Changelist") draw_set_font(fnt_main) if (window = w_update) draw_text(x1 + 32, y1 + 32, "Thank you for upgrading to version " + version + "!") +draw_area(x1 + 16, y1 + 58, x1 + 487, y1 + 310) fullstr = "" +fullstr += "Changes in v3.7.2 (2020.02.27):\n* Auto-saving will now wait until you pause the song to prevent stuttering.\n* Fixed notes in the first tick of a song not playing when selected.\n* Fixed C8 key on piano not being playable through keyboard shortcuts.\n* Fixed a crash when scrolling down to layer 200.\n* Fixed scrollbar in the note block area getting outside the screen in some\nwindow sizes.\n* Fixed compatibility indicator being incorrect in some circumstances.\n\n" fullstr += "Changes in v3.7.1 (2020.01.20):\n* Added an auto-updater. When a new version is available, Note Block Studio\nwill now be able to download and install it automatically. You don't even need\nto open your browser!\n* Pressing Shift while clicking 'Select all note blocks in this layer' will add those\nnotes to the selection rather than clearing it.\n* Holding Shift while dragging layer volumes/stereo will change them in\nincrements of 1, allowing a finer control.\n* Note panning is now prioritized over layer panning. Layers that haven't had\ntheir panning changed will not have any effect on note panning.\n* Re-added the option to import instruments from another song.\n* Bugfixes and improvements:\n * Fixed layer volume and stereo controls being too sensitive.\n * Fixed selection being automatically cleared once every minute.\n * Fixed contents of macro windows not being shown in some circumstances,\nforcing you to quit the program.\n * Fixed MIDI import setting pitch of all notes to +1.\n * Fixed lower notes not playing all the way through/stopping too early.\n * Fixed note count on 'Song stats' not being reset when creating a new song\n(and showing wrong percentages).\n * Fixed a crash when redoing a manual block placement.\n * Fixed a crash when opening the program with the greeting window disabled.\n * Fixed long recent file names overflowing the greeting window.\n * Fixed song area height being calculated incorrectly when the piano is\ndisabled.\n * Improved contrast of various pieces of text in the dark theme.\n * Removed the ability to drag the layer stereo controls with a window open.\n\n" fullstr += "Changes in v3.7.0 (2019.12.31):\n* Added a cool demo song to showcase the new features in 3.7.0!\n* It's now possible to set velocity, panning and detune on each individual note.\n* Added a metronome.\n* Added an option to display tempo as BPM rather than t/s.\n* Auto-save is now a global preference rather than being saved per song.\n* Added an auto-recovery feature so work is not lost if the program crashes.\n* Added Patterns. You can export note block data as a pattern, and import it\ninto whatever song you wish.\n* Note block songs now save song looping.\n* Added a bars/beats/sixteenths display.\n* Added lines that mark each bar in a song.\n* Added an option to choose if looping should wait for the end of the bar.\n* Added an option to show or hide layer boxes.\n* Added four edit modes, which allow you to change different properties of\nnotes (key/velocity/panning/pitch).\n* Holding Shift while scrolling over a note will change a whole octave, or\nfine-tune its velocity/panning/pitch.\n* Added Macros:\n(Accessible by right-clicking a selection, or from the new macro bar)\n * Tremolo\n * Stereo\n * Arpeggio\n * Portamento\n * Vibrato\n * Stagger\n * Chorus\n * Volume LFO\n * Fade in\n * Fade out\n * Replace key\n * Set velocity\n * Set panning\n * Set pitch\n* Added branch export, a new layout for exporting as schematics.\n* Added a metronome function.\n* Added layer management buttons (shift layers up and down, insert, delete).\n* Added a secret clipboard editor for power users.\n* (Slightly) Improved MIDI import, and made it support note velocity.\n* Improved data pack performance; impact on tick rate should be negligible.\n* Data packs can now export notes outside the octave range by providing\na resource pack.\n* Data packs can now be exported as ZIP.\n* Data packs now allow any tempo to be imported into Minecraft.\n* It's now possible to set a custom namespace and path for data pack functions.\n* Added six types of visualizers to data packs.\n* Double-clicking a NBS file will now open the song.\n* Added the ability to export songs in previous NBS format versions\nvia the Save Options window.\n* Note Block Studio will now refuse to load NBS versions made in the future.\n* NBS format updated to version 4.\n* Improved contrast of layer icons in dark theme.\n* Prevented dragging layer stereo from changing the song tempo.\n* Fixed 'Keys to show' resetting to 20 when enabling the piano.\n* Fixed crash in MP3 and data pack export.\n* Fixed crash on opening after updating.\n* Fixed memory leak from audio emitters piling up.\n\n" fullstr += "Changes in v3.6.0 (2019.08.08):\n* Added MP3 export option to select whether you want to include\n locked layers.\n* Added loop button to loop the current song.\n* Readded colored note blocks, added option for the shaped ones.\n* Added option to toggle piano visibility.\n* Updated icon.\n* NBS format updated to version 3. Now stores song length again.\n* Fixed an issue where there was an unintended gradient over sprites.\n* Fixed typo in preferences.\n* Fixed instrument icons being blank.\n* Fixed preferences not saving.\n\n" @@ -37,14 +39,14 @@ for (a = 0; a < n; a += 1) { if (string_char_at(str[a], 1) = "C") strb[a] = 1 fullstr = string_delete(fullstr, 1, string_pos("\n", fullstr)) } -for (a = sb_val[update_scrollbar]; a < sb_val[update_scrollbar] + 14; a += 1) { +for (a = sb_val[update_scrollbar]; a < sb_val[update_scrollbar] + 15; a += 1) { if (a >= n) break if (strb[a]) draw_set_font(fnt_mainbold) else draw_set_font(fnt_main) draw_text(x1 + 32, y1 + 64 + 16 * (a - sb_val[update_scrollbar]), str[a]) } draw_set_font(fnt_main) -draw_scrollbar(update_scrollbar, x1 + 474, y1 + 64, 12, 14, n, 0, 1) +draw_scrollbar(update_scrollbar, x1 + 470, y1 + 60, 12, 18, n, 0, 1) if (draw_button2(x1 + 220, y1 + 340, 72, "OK")) { if (window = w_update) { window = w_greeting diff --git a/scripts/macros/macros.gml b/scripts/macros/macros.gml index 3882a3fad..47c8f94cf 100644 --- a/scripts/macros/macros.gml +++ b/scripts/macros/macros.gml @@ -1,6 +1,6 @@ #macro gm_runtime_version "2.2.3.344" -#macro version_date "2020.01.20" -#macro version "3.7.1" +#macro version_date "2020.02.27" +#macro version "3.7.2" #macro nbs_version 4 #macro pat_version 1 diff --git a/scripts/selection_draw/selection_draw.gml b/scripts/selection_draw/selection_draw.gml index 8d0854593..d1e86c561 100644 --- a/scripts/selection_draw/selection_draw.gml +++ b/scripts/selection_draw/selection_draw.gml @@ -11,7 +11,7 @@ w = argument2 h = argument3 draw_set_halign(fa_center) // Play -if (floor(marker_pos) != floor(marker_prevpos) && marker_pos >= selection_x && marker_pos < selection_x + selection_l) { +if ((floor(marker_pos) != floor(marker_prevpos) || (marker_prevpos == 0 && marker_pos != marker_prevpos)) && marker_pos >= selection_x && marker_pos < selection_x + selection_l) { xx = floor(marker_pos) - selection_x if (selection_colfirst[xx] > -1) { for (b = selection_colfirst[xx]; b <= selection_collast[xx]; b += 1) {