Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_rhythmgame_spotlight_solo_Draw_0

(view raw script w/o annotations or w/e)
1
light_color = 15245445;
2
if (obj_rhythmgame.red_glow > 0)
3
    light_color = merge_color(#85A0E8, #FF8186, obj_rhythmgame.red_glow);
4
if (con > 0)
5
{
6
    draw_set_blend_mode(bm_add);
7
    var _pointX = x + lengthdir_x(20, direction - 180);
8
    var _pointY = y + lengthdir_y(20, direction - 180);
9
    floorY = obj_rhythmgame.y + 370 + (cos(siner / 20) * (range / 2));
10
    pointA = 
scr_intercept_x
scr_intercept_x

function
scr_intercept_x(arg0, arg1, arg2, arg3, arg4)
{ var __ylength = lengthdir_y(arg2, arg3); var __xlength = lengthdir_x(arg2, arg3); var __dist = arg4 - arg1; if (sign(__ylength) != sign(__dist) || abs(__ylength) < abs(__dist)) return arg0 + __xlength; else return arg0 + (__xlength * (__dist / __ylength)); }
(_pointX, _pointY, 900, direction - 17, floorY);
11
    pointB = 
scr_intercept_x
scr_intercept_x

function
scr_intercept_x(arg0, arg1, arg2, arg3, arg4)
{ var __ylength = lengthdir_y(arg2, arg3); var __xlength = lengthdir_x(arg2, arg3); var __dist = arg4 - arg1; if (sign(__ylength) != sign(__dist) || abs(__ylength) < abs(__dist)) return arg0 + __xlength; else return arg0 + (__xlength * (__dist / __ylength)); }
(_pointX, _pointY, 900, direction + 17, floorY);
12
    draw_set_blend_mode(bm_normal);
13
    scr_draw_set_mask(true);
14
    draw_sprite(spr_rhythmgame_bg_overlay, 1, obj_rhythmgame.x, obj_rhythmgame.y + 100);
15
    scr_draw_in_mask_begin();
16
    draw_set_color(light_color);
17
    d_ellipse(x, floorY - 20, x + 180, floorY + 10, false);
18
}
19
gpu_set_alphatestenable(false);
20
gpu_set_blendmode(bm_normal);