Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_dazzle_effect_Draw_0

(view raw script w/o annotations or w/e)
1
if (!surface_exists(surface))
2
    surface = surface_create(320, 240);
3
if (image_alpha == 0)
4
    exit;
5
surface_set_target(surface);
6
draw_clear_alpha(c_black, 1);
7
draw_sprite(spr_dazzle_bg, 0, 0, 0);
8
gpu_set_blendmode_ext_sepalpha(bm_src_alpha, bm_inv_src_alpha, bm_one, bm_one);
9
for (var i = 0; i < particle_count; i++)
10
{
11
    with (particles[i])
12
        event_user(0);
13
}
14
surface_reset_target();
15
gpu_set_blendmode(bm_normal);
16
draw_set_blend_mode(bm_normal);
17
draw_surface_ext(surface, camerax(), cameray(), 2, 2, 0, image_blend, image_alpha);