Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_shadow_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)
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_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, c_black, (other.draw_alpha * image_alpha))
11
}