Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_o_charge_ring_Draw_0

(view raw script w/o annotations or w/e)
1
alphaprev = draw_get_alpha();
2
draw_set_alpha(alpha);
3
draw_set_color(c_white);
4
scr_draw_circle_width_qb
scr_draw_circle_width_qb

function scr_draw_circle_width_qb(arg0, arg1, arg2, arg3, arg4) { var xx = arg0; var yy = arg1; var radius = arg2; var width = arg3; var steps = arg4; var h = width / 2; draw_primitive_begin(pr_trianglelist); for (i = 0; i < steps; i += 1) { draw_vertex(xx + lengthdir_x(radius - h, (360 * i) / steps), yy + lengthdir_y(radius - h, (360 * i) / steps)); draw_vertex(xx + lengthdir_x(radius + h, (360 * i) / steps), yy + lengthdir_y(radius + h, (360 * i) / steps)); draw_vertex(xx + lengthdir_x(radius + h, (360 * (i + 1)) / steps), yy + lengthdir_y(radius + h, (360 * (i + 1)) / steps)); draw_vertex(xx + lengthdir_x(radius + h, (360 * (i + 1)) / steps), yy + lengthdir_y(radius + h, (360 * (i + 1)) / steps)); draw_vertex(xx + lengthdir_x(radius - h, (360 * (i + 1)) / steps), yy + lengthdir_y(radius - h, (360 * (i + 1)) / steps)); draw_vertex(xx + lengthdir_x(radius - h, (360 * i) / steps), yy + lengthdir_y(radius - h, (360 * i) / steps)); } draw_primitive_end(); }
(x, y, radCurrent, widthC, quality);
5
draw_set_alpha(alphaprev);