Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_light_drawer_Draw_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
with (shadow_actor)
4
{
5
    if (sprite_index == -1 || sprite_index == spr_doorway)
6
        return;
7
    draw_self()
8
    if variable_instance_exists(id, "palette_index")
9
        scr_draw_palette_shader
scr_draw_palette_shader

function scr_draw_palette_shader() //gml_Script_scr_draw_palette_shader { if shader_on { shader_set(sh_palette_swap) shader_set_uniform_f(u_palette_index, argument[0]) shader_set_uniform_f(u_palette_texel_height, uniform_info[0]) shader_set_uniform_f(u_palette_texel_width, uniform_info[1]) shader_set_uniform_f(u_palette_x_offset, uniform_info[2]) shader_set_uniform_f(u_palette_y_offset, uniform_info[3]) shader_set_uniform_i(u_color_vect, uniform_info[4]) texture_set_stage(u_palette_tex, palette_sampler) draw_self() shader_reset() } }
(palette_index)
10
    draw_set_blend_mode(1)
11
    draw_set_alpha(other.draw_alpha)
12
    draw_sprite(sprite_index, image_index, x, y)
13
    draw_set_alpha(1)
14
    draw_set_blend_mode(0)
15
}