Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_shoujo

(view raw script w/o annotations or w/e)
1
function scr_shoujo_setup()
2
{
3
    u_time = shader_get_uniform(shd_shoujo, "time");
4
    u_appsurfwidth = shader_get_uniform(shd_shoujo, "appSurfWidth");
5
    u_texgradient = shader_get_sampler_index(shd_shoujo, "texGradient");
6
    u_texbubble = shader_get_sampler_index(shd_shoujo, "texBubble");
7
    u_texstars = shader_get_sampler_index(shd_shoujo, "texStars");
8
    tex_bubl = sprite_get_texture(spr_bubl, 0);
9
    tex_grad = sprite_get_texture(spr_shoujogradient, 0);
10
    tex_star = sprite_get_texture(spr_stars_2, 0);
11
}
12
13
function scr_shoujo_draw_on(arg0)
14
{
15
    shader_replace_simple_set_hook(55);
16
    shader_set_uniform_f(u_time, arg0);
17
    shader_set_uniform_f(u_appsurfwidth, surface_get_width(application_surface));
18
    texture_set_stage(u_texgradient, tex_grad);
19
    texture_set_stage(u_texbubble, tex_bubl);
20
    texture_set_stage(u_texstars, tex_star);
21
}
22
23
function scr_shoujo_draw_off()
24
{
25
    shader_replace_simple_reset_hook();
26
}