Skip to content

Commit ad2e49c

Browse files
committed
add block remove effect to selection_delete
1 parent 6b6e30f commit ad2e49c

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

scripts/selection_delete/selection_delete.gml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
function selection_delete(argument0) {
22
// selection_delete(undo)
33
// Deletes the selection and the blocks in it.
4-
var a, b;
4+
var a, b, ani, totalcols, totalrows;
5+
if (!fullscreen && show_layers) {
6+
totalcols = floor((rw - 8 - 270) / 32)
7+
} else {
8+
totalcols = floor(rw / 32) + 1
9+
}
10+
totalrows = floor((rh - rhval) / 32)
511
changed = 1
612
if (selected = 0) return 0
713
for (a = 0; a < selection_l; a += 1) {
@@ -15,6 +21,11 @@ function selection_delete(argument0) {
1521
selection_pan[a, b] = 0
1622
selection_pit[a, b] = 0
1723
selection_played[a, b] = 0
24+
if (theme = 3 && remove_effect && selection_x + a >= starta && selection_x + a < starta + totalcols && selection_y + b >= startb && selection_y + b < startb + totalrows) {
25+
ani = create(obj_removeeff)
26+
ani.xn = selection_x + a - starta
27+
ani.yn = selection_y + b - startb
28+
}
1829
}
1930
}
2031
selection_colfirst[a] = -1

0 commit comments

Comments
 (0)