Deltarune script viewer

← back to main script listing

gml_GlobalScript_scr_draw_circle_width_qb

(view raw script w/o annotations or w/e)
1
function 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(); }
(arg0, arg1, arg2, arg3, arg4)
2
{
3
    var xx = arg0;
4
    var yy = arg1;
5
    var radius = arg2;
6
    var width = arg3;
7
    var steps = arg4;
8
    var h = width / 2;
9
    draw_primitive_begin(pr_trianglelist);
10
    for (i = 0; i < steps; i += 1)
11
    {
12
        draw_vertex(xx + lengthdir_x(radius - h, (360 * i) / steps), yy + lengthdir_y(radius - h, (360 * i) / steps));
13
        draw_vertex(xx + lengthdir_x(radius + h, (360 * i) / steps), yy + lengthdir_y(radius + h, (360 * i) / steps));
14
        draw_vertex(xx + lengthdir_x(radius + h, (360 * (i + 1)) / steps), yy + lengthdir_y(radius + h, (360 * (i + 1)) / steps));
15
        draw_vertex(xx + lengthdir_x(radius + h, (360 * (i + 1)) / steps), yy + lengthdir_y(radius + h, (360 * (i + 1)) / steps));
16
        draw_vertex(xx + lengthdir_x(radius - h, (360 * (i + 1)) / steps), yy + lengthdir_y(radius - h, (360 * (i + 1)) / steps));
17
        draw_vertex(xx + lengthdir_x(radius - h, (360 * i) / steps), yy + lengthdir_y(radius - h, (360 * i) / steps));
18
    }
19
    draw_primitive_end();
20
}