Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_background_el_bailador_test_2_yellow_Draw_0

(view raw script w/o annotations or w/e)
1
angle_current = angle_default
2
if (scroll_horizontal == true)
3
{
4
    scroll_ind_total_x += scroll_ind_inc_x
5
    if (scroll_ind_total_x >= scroll_ind_max_x)
6
    {
7
        while (scroll_ind_total_x >= scroll_ind_max_x)
8
        {
9
            scroll_current_x += pixel_dim
10
            if (scroll_current_x >= sprite_width)
11
                scroll_current_x -= sprite_width
12
            else if (scroll_current_x < 0)
13
                scroll_current_x += sprite_width
14
            scroll_ind_total_x -= scroll_ind_max_x
15
        }
16
    }
17
}
18
else
19
{
20
    scroll_current_x = 0
21
    scroll_ind_total_x = 0
22
}
23
if (scroll_vertical == true)
24
{
25
    scroll_ind_total_y += scroll_ind_inc_y
26
    if (scroll_ind_total_y >= scroll_ind_max_y)
27
    {
28
        while (scroll_ind_total_y >= scroll_ind_max_y)
29
        {
30
            scroll_current_y += pixel_dim
31
            if (scroll_current_y >= sprite_height)
32
                scroll_current_y -= sprite_height
33
            else if (scroll_current_y < 0)
34
                scroll_current_y += sprite_height
35
            scroll_ind_total_y -= scroll_ind_max_y
36
        }
37
    }
38
}
39
else
40
{
41
    scroll_current_y = 0
42
    scroll_ind_total_y = 0
43
}
44
for (i = 0; i < sprite_height; i += pixel_dim)
45
{
46
    scroll_temp_x = scroll_current_x
47
    if (scroll_temp_x >= sprite_width)
48
        scroll_temp_x -= sprite_width
49
    else if (scroll_temp_x < 0)
50
        scroll_temp_x += sprite_width
51
    scroll_temp_y = scroll_current_y + i
52
    if (scroll_temp_y >= sprite_height)
53
        scroll_temp_y -= sprite_height
54
    else if (scroll_temp_y < 0)
55
        scroll_temp_y += sprite_height
56
    var per_frac = sin(degtorad(angle_current))
57
    xscale_current = image_xscale * (1 - (1 - xscale_min) * per_frac)
58
    x_disjoint = (sprite_width - sprite_width * xscale_current) / 2
59
    event_user(0)
60
    draw_sprite_part_ext(sprite_index, image_index, 0, scroll_temp_y, sprite_width, pixel_dim, (draw_left + x_disjoint), (draw_top + i), xscale_current, image_yscale, c_black, 1)
61
    for (l = 0; l <= 1; l++)
62
        draw_sprite_part_ext(sprite_index, image_index, par_left[l], scroll_temp_y, par_width[l], pixel_dim, par_x[l], (draw_top + i), xscale_current, image_yscale, c_white, (image_alpha * alpha_base))
63
    draw_sprite_part_ext(sprite_index, image_index, 0, scroll_temp_y, sprite_width, pixel_dim, (draw_left + x_disjoint), (draw_top + i), xscale_current, image_yscale, c_black, (image_alpha * darkness_max * per_frac))
64
    angle_current += angle_increase
65
}