Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_reflection_shader_complex_hall_Draw_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
with (other)
4
{
5
    surface_set_target(reflection_surf)
6
    draw_clear_alpha(c_black, 0)
7
    shader_set(sh_reflection_hotel)
8
    var alpha_uniform = shader_get_uniform(sh_reflection_hotel, "Alpha")
9
    shader_set_uniform_f(alpha_uniform, 0.75)
10
    with (obj_npc_base)
11
    {
12
        if (object_index != obj_npc_handlord)
13
        {
14
            var sprite_uvs = sprite_get_uvs(sprite_index, image_index)
15
            shader_uvs = shader_get_uniform(sh_reflection_hotel, "spriteUVs")
16
            shader_set_uniform_f(shader_uvs, sprite_uvs[0], sprite_uvs[1], sprite_uvs[2], sprite_uvs[3])
17
            var y_offset = 0
18
            if (object_index == obj_npc_complex_lobby_lad)
19
                y_offset = 2
20
            draw_set_blend_mode_ext(2, 6)
21
            draw_sprite_ext(sprite_index, -1, (x - (__view_get((0 << 0), 0))), (y + sprite_height * 2 - sprite_yoffset * 2 - y_offset - (__view_get((1 << 0), 0))), 1, -1, 0, c_white, 1)
22
            draw_set_blend_mode(0)
23
        }
24
    }
25
    with (obj_complex_plant)
26
    {
27
        sprite_uvs = sprite_get_uvs(sprite_index, image_index)
28
        shader_uvs = shader_get_uniform(sh_reflection_hotel, "spriteUVs")
29
        shader_set_uniform_f(shader_uvs, sprite_uvs[0], sprite_uvs[1], sprite_uvs[2], sprite_uvs[3])
30
        y_offset = 5
31
        if (object_index == obj_npc_complex_lobby_lad)
32
            y_offset = 2
33
        draw_set_blend_mode_ext(2, 6)
34
        draw_sprite_ext(sprite_index, -1, (x - (__view_get((0 << 0), 0))), (y + sprite_height * 2 - sprite_yoffset * 2 - y_offset - (__view_get((1 << 0), 0))), 1, -1, 0, c_white, 1)
35
        draw_set_blend_mode(0)
36
    }
37
    shader_reset()
38
    draw_set_blend_mode(3)
39
    with (obj_pl)
40
        draw_sprite_ext(sprite_index, -1, (x - (__view_get((0 << 0), 0))), (y + sprite_height * 2 - sprite_yoffset * 2 - (__view_get((1 << 0), 0))), 1, -1, 0, c_black, 1)
41
    if (global.party_member != noone)
42
    {
43
        with (global.party_member)
44
            draw_sprite_ext(sprite_index, -1, (x - (__view_get((0 << 0), 0))), (y + sprite_height * 2 - sprite_yoffset * 2 - y_offset - (__view_get((1 << 0), 0))), 1, -1, 0, c_white, 1)
45
    }
46
    draw_set_blend_mode(0)
47
    shader_set(sh_reflection_hotel)
48
    with (obj_pl)
49
    {
50
        sprite_uvs = sprite_get_uvs(sprite_index, image_index)
51
        shader_uvs = shader_get_uniform(sh_reflection_hotel, "spriteUVs")
52
        shader_set_uniform_f(shader_uvs, sprite_uvs[0], sprite_uvs[1], sprite_uvs[2], sprite_uvs[3])
53
        draw_set_blend_mode_ext(2, 6)
54
        draw_sprite_ext(sprite_index, -1, (x - (__view_get((0 << 0), 0))), (y + sprite_height * 2 - sprite_yoffset * 2 - (__view_get((1 << 0), 0))), 1, -1, 0, c_white, 2)
55
        draw_set_blend_mode(0)
56
    }
57
    if (global.party_member != noone)
58
    {
59
        with (global.party_member)
60
        {
61
            sprite_uvs = sprite_get_uvs(sprite_index, image_index)
62
            shader_uvs = shader_get_uniform(sh_reflection_hotel, "spriteUVs")
63
            shader_set_uniform_f(shader_uvs, sprite_uvs[0], sprite_uvs[1], sprite_uvs[2], sprite_uvs[3])
64
            draw_set_blend_mode_ext(2, 6)
65
            draw_sprite_ext(sprite_index, -1, (x - (__view_get((0 << 0), 0))), (y + sprite_height * 2 - sprite_yoffset * 2 - y_offset - (__view_get((1 << 0), 0))), 1, -1, 0, c_white, 1)
66
            draw_set_blend_mode(0)
67
        }
68
    }
69
    shader_reset()
70
    draw_set_blend_mode(3)
71
    draw_sprite_ext(spr_complex_reflection_mask_2, 0, (-(__view_get((0 << 0), 0))), (-(__view_get((1 << 0), 0))), 4, 4, 0, c_white, 1)
72
    draw_set_blend_mode(0)
73
    surface_reset_target()
74
    draw_surface(reflection_surf, __view_get((0 << 0), 0), __view_get((1 << 0), 0))
75
}