Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_tenna_marker_Draw_0

(view raw script w/o annotations or w/e)
1
var _x1 = x + x1;
2
var _x2 = x + x2;
3
var _x3 = x + x3;
4
var _x4 = x + x4;
5
var _y1 = y + y1;
6
var _y2 = y + y2;
7
var _y3 = y + y3;
8
var _y4 = y + y4;
9
if (drawtype == 0)
10
{
11
    if (xscale != 2)
12
    {
13
        _x1 = x + ((_x1 - x) * (xscale / 2));
14
        _x2 = x + ((_x2 - x) * (xscale / 2));
15
        _x3 = x + ((_x3 - x) * (xscale / 2));
16
        _x4 = x + ((_x4 - x) * (xscale / 2));
17
    }
18
    if (yscale != 2)
19
    {
20
        _y1 = y + ((_y1 - y) * (yscale / 2));
21
        _y2 = y + ((_y2 - y) * (yscale / 2));
22
        _y3 = y + ((_y3 - y) * (yscale / 2));
23
        _y4 = y + ((_y4 - y) * (yscale / 2));
24
    }
25
    if (outline)
26
    {
27
        d3d_set_fog(true, c_black, 0, 1);
28
        draw_sprite_pos(sprite_index, image_index, _x1 - 2, _y1, _x2 - 2, _y2, _x3 - 2, _y3, _x4 - 2, _y4, image_alpha);
29
        draw_sprite_pos(sprite_index, image_index, _x1, _y1 - 2, _x2, _y2 - 2, _x3, _y3 - 2, _x4, _y4 - 2, image_alpha);
30
        draw_sprite_pos(sprite_index, image_index, _x1, _y1 + 2, _x2, _y2 + 2, _x3, _y3 + 2, _x4, _y4 + 2, image_alpha);
31
        draw_sprite_pos(sprite_index, image_index, _x1 + 2, _y1, _x2 + 2, _y2, _x3 + 2, _y3, _x4 + 2, _y4, image_alpha);
32
        d3d_set_fog(false, c_black, 0, 0);
33
    }
34
    if (dropshadow)
35
    {
36
        d3d_set_fog(true, c_black, 0, 1);
37
        draw_sprite_pos(sprite_index, image_index, _x1 + dropdist, _y1 + dropdist, _x2 + dropdist, _y2 + dropdist, _x3 + dropdist, _y3 + dropdist, _x4 + dropdist, _y4 + dropdist, image_alpha);
38
        d3d_set_fog(false, c_white, 0, 0);
39
    }
40
    draw_sprite_pos(sprite_index, image_index, _x1, _y1, _x2, _y2, _x3, _y3, _x4, _y4, image_alpha);
41
}
42
if (drawtype == 1)
43
{
44
    if (dropshadow)
45
        draw_sprite_ext(sprite_index, image_index, x + dropdist, y + dropdist, image_xscale, image_yscale, image_angle, c_black, image_alpha);
46
    draw_self();
47
}