Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_spotlight_backlighting_Draw_0

(view raw script w/o annotations or w/e)
1
if (!init)
2
{
3
    surf = surface_create(640, 480);
4
    init = true;
5
}
6
surface_set_target(surf);
7
draw_clear_alpha(c_black, 0);
8
with (obj_actor)
9
{
10
    if (visible)
11
        draw_self_screenspace();
12
}
13
with (obj_marker2)
14
{
15
    if (visible)
16
        draw_self_screenspace();
17
}
18
with (obj_rhythmgame_performer)
19
{
20
    if (visible)
21
        draw_self_screenspace();
22
}
23
draw_set_blend_mode(bm_subtract);
24
draw_surface(surf, 0, 4);
25
gpu_set_blendmode_ext(bm_dest_alpha, bm_one);
26
d3d_set_fog(false, c_black, 0, 0);
27
draw_set_color(c_white);
28
with (obj_rhythmgame_spotlights)
29
{
30
    var _size = abs(pointA - pointB);
31
    var _ceny = screeny(floorY - (((floorY - other.y) * _size) / 10));
32
    d_ellipse(screenx(pointA), _ceny - (_size / 2), screenx(pointB), _ceny + (_size / 2), false);
33
}
34
surface_reset_target();
35
gpu_set_blendmode(bm_add);
36
draw_surface_ext(surf, camerax(), cameray(), 1, 1, 0, c_black, image_alpha);
37
gpu_set_blendmode(bm_normal);