Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_ch5_LW20W_rotate_Draw_0

(view raw script w/o annotations or w/e)
1
if (room == room_town_noellehouse)
2
{
3
    if (_noellehouse_sprite == -4)
4
        _noellehouse_sprite = sprite_create_from_surface(application_surface, 0, 0, 640, 480, false, true, 0, 0);
5
    draw_sprite_ext(spr_pixel_white, 0, -10, -10, 999, 999, 0, c_black, 1);
6
}
7
else if (room == room_town_school)
8
{
9
    if (_school_sprite == -4)
10
        _school_sprite = sprite_create_from_surface(application_surface, 0, 0, 640, 480, false, true, 0, 0);
11
    draw_sprite_ext(spr_pixel_white, 0, -10, -10, 999, 999, 0, c_black, 1);
12
}
13
else if (room == room_lw_noellehouse_dess)
14
{
15
    if (_dess_sprite == -4)
16
        _dess_sprite = sprite_create_from_surface(application_surface, 0, 0, 640, 480, false, true, 0, 0);
17
    draw_sprite_ext(spr_pixel_white, 0, -10, -10, 999, 999, 0, c_black, 1);
18
}
19
else if (room == room_beach)
20
{
21
    if (_state == 1)
22
    {
23
        draw_sprite_ext(spr_pixel_white, 0, -10, -10, 999, 999, 0, c_black, 1);
24
        var _sw = surface_get_width(application_surface);
25
        var _sh = surface_get_height(application_surface);
26
        if (!surface_exists(surf))
27
            surf = surface_create(320, 240);
28
        surface_set_target(surf);
29
        shader_replace_simple_set_hook(shader);
30
        shader_set_uniform_f(u_time, time);
31
        draw_clear_alpha(c_black, 0);
32
        shader_set_uniform_f(u_angle, angle);
33
        shader_set_uniform_f(u_wave, max(w1, 0));
34
        if (sprite_exists(_dess_sprite))
35
            draw_sprite_ext(_dess_sprite, 0, (camerax() - (view_wport[0] / 4)) + 4, cameray(), 0.5, 0.5, 0, c_white, alpha_1);
36
        shader_set_uniform_f(u_angle, angle + 120);
37
        shader_set_uniform_f(u_wave, max(w1, 0));
38
        if (sprite_exists(_noellehouse_sprite))
39
            draw_sprite_ext(_noellehouse_sprite, 0, (camerax() - (view_wport[0] / 4)) + 4, cameray(), 0.5, 0.5, 0, c_white, alpha_2);
40
        shader_set_uniform_f(u_angle, angle + 240);
41
        shader_set_uniform_f(u_wave, max(w1, 0));
42
        if (sprite_exists(_school_sprite))
43
            draw_sprite_ext(_school_sprite, 0, (camerax() - (view_wport[0] / 4)) + 4, cameray(), 0.5, 0.5, 0, c_white, alpha_3);
44
        shader_replace_simple_reset_hook();
45
        surface_reset_target();
46
        var _multiplier = (global.darkzone == 0) ? 0.5 : 1;
47
        draw_surface_ext(surf, camerax(), cameray(), (_multiplier * _sw) / 320, (_multiplier * _sh) / 240, 0, c_white, 1);
48
        draw_sprite_ext(spr_noelle_silo_kneel, _noelle_sprite_index, camerax() + (view_wport[0] / 4), (cameray() + (view_hport[0] / 2)) - 40, 1, 1, 0, c_white, _noelle_alpha);
49
    }
50
}