Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_ch3_GSD03_letterbox_Draw_0

(view raw script w/o annotations or w/e)
1
draw_set_color(c_black);
2
if (change_mode)
3
{
4
    if (top_y_limit != 20)
5
        top_y_limit = 
scr_movetowards
scr_movetowards

function
scr_movetowards(arg0, arg1, arg2)
{ if (arg0 == arg1) return arg0; else if (arg0 > arg1) return max(arg0 - arg2, arg1); else return min(arg0 + arg2, arg1); } function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0) { scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1); } function scr_obj_movetowards_point(arg0, arg1, arg2) { var _distance = point_distance(x, y, arg0, arg1); if (arg2 >= _distance) { x = arg0; y = arg1; } else { var _direction = point_direction(x, y, arg0, arg1); x += lengthdir_x(arg2, _direction); y += lengthdir_y(arg2, _direction); } }
(top_y_limit, 20, 2);
6
    if (bottom_y_limit != 416)
7
        bottom_y_limit = 
scr_movetowards
scr_movetowards

function
scr_movetowards(arg0, arg1, arg2)
{ if (arg0 == arg1) return arg0; else if (arg0 > arg1) return max(arg0 - arg2, arg1); else return min(arg0 + arg2, arg1); } function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0) { scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1); } function scr_obj_movetowards_point(arg0, arg1, arg2) { var _distance = point_distance(x, y, arg0, arg1); if (arg2 >= _distance) { x = arg0; y = arg1; } else { var _direction = point_direction(x, y, arg0, arg1); x += lengthdir_x(arg2, _direction); y += lengthdir_y(arg2, _direction); } }
(bottom_y_limit, 416, 4);
8
    else
9
        change_mode = false;
10
}
11
ossafe_fill_rectangle(camerax(), cameray(), camerax() + view_wport[0], cameray() + top_y_limit, false);
12
if (!hide_bottom)
13
    ossafe_fill_rectangle(camerax(), cameray() + bottom_y_limit, camerax() + view_wport[0], cameray() + view_hport[0], false);
14
draw_set_color(c_white);