Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_progress

(view raw script w/o annotations or w/e)
1
function 
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; } }
(arg0, arg1, arg2, arg3, arg4)
2
{
3
    return clamp(arg3 + (((arg0 - arg1) / (arg2 - arg1)) * (arg4 - arg3)), arg3, arg4);
4
}
5
6
function scr_xprog(arg0, arg1, arg2, arg3 = false)
7
{
8
    var _progress = 0;
9
    if ((arg2 - arg1) != 0)
10
    {
11
        if (arg3)
12
            _progress = clamp((arg0 - arg1) / (arg2 - arg1), 0, 1);
13
        else
14
            _progress = (arg0 - arg1) / (arg2 - arg1);
15
        return _progress;
16
    }
17
}