Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_dw_church_organ_Draw_0

related scripts: Create_0Draw_0 Other_10Step_0

(view raw script w/o annotations or w/e)
1
image_blend = c_white;
2
image_alpha = 1;
3
draw_self();
4
var lx = notesloc.x;
5
var ly = notesloc.y;
6
var darkcol = 6970203;
7
var midcol = 14583173;
8
draw_sprite_ext(spr_dw_castle_church_pianoui_arrow, 0, lx, ly, 2, 2, 0, c_white, 1);
9
var dist = 
scr_progress
scr_progress

function
scr_progress(arg0, arg1, arg2, arg3, arg4)
{ return clamp(arg3 + (((arg0 - arg1) / (arg2 - arg1)) * (arg4 - arg3)), arg3, arg4); } function scr_xprog(arg0, arg1, arg2, arg3 = false) { var _progress = 0; if ((arg2 - arg1) != 0) { if (arg3) _progress = clamp((arg0 - arg1) / (arg2 - arg1), 0, 1); else _progress = (arg0 - arg1) / (arg2 - arg1); return _progress; } }
(distance_to_object_bbox(prev, 1198), 40, 80, 0, 1);
10
var col = merge_color(c_white, darkcol, clamp(dist, 0, 1));
11
draw_sprite_ext(spr_arrow_5x7, 0, lx + 8 + 4, (ly + 24) - 2, 2, 2, 0, col, 1);
12
draw_sprite_ext(spr_dw_castle_church_pianoui_arrow, 0, lx + 306, ly, -2, 2, 0, c_white, 1);
13
dist = 
scr_progress
scr_progress

function
scr_progress(arg0, arg1, arg2, arg3, arg4)
{ return clamp(arg3 + (((arg0 - arg1) / (arg2 - arg1)) * (arg4 - arg3)), arg3, arg4); } function scr_xprog(arg0, arg1, arg2, arg3 = false) { var _progress = 0; if ((arg2 - arg1) != 0) { if (arg3) _progress = clamp((arg0 - arg1) / (arg2 - arg1), 0, 1); else _progress = (arg0 - arg1) / (arg2 - arg1); return _progress; } }
(distance_to_object_bbox(next, 1198), 40, 80, 0, 1);
14
col = merge_color(c_white, darkcol, clamp(dist, 0, 1));
15
draw_sprite_ext(spr_arrow_5x7, 0, (lx + 306) - 8 - 4, (ly + 24) - 2, -2, 2, 0, col, 1);
16
var xsp = 30;
17
for (var i = 0; i < 5; i++)
18
{
19
    draw_sprite_ext(spr_dw_castle_church_pianoui_box, 0, lx + xsp + (50 * i) + 2, ly + 2, 2, 2, 0, c_black, 0.25);
20
    draw_sprite_ext(spr_dw_castle_church_pianoui_box, 0, lx + xsp + (50 * i), ly, 2, 2, 0, c_white, 1);
21
    var thisloc = getInd(index + i);
22
    col = merge_color(darkcol, midcol, 
scr_progress
scr_progress

function
scr_progress(arg0, arg1, arg2, arg3, arg4)
{ return clamp(arg3 + (((arg0 - arg1) / (arg2 - arg1)) * (arg4 - arg3)), arg3, arg4); } function scr_xprog(arg0, arg1, arg2, arg3 = false) { var _progress = 0; if ((arg2 - arg1) != 0) { if (arg3) _progress = clamp((arg0 - arg1) / (arg2 - arg1), 0, 1); else _progress = (arg0 - arg1) / (arg2 - arg1); return _progress; } }
(distance_to_object_bbox(selint[i], 1198), 40, 20, 0, 1));
23
    if (mysnd == selectors[getInd(index + i)].snd)
24
        col = 16777215;
25
    draw_sprite_ext(selectors[thisloc].spr, 0, lx + xsp + (50 * i) + 8, ly + 8, 2, 2, 0, col, 1);
26
}