Deltarune (Chapter 2) script viewer

← back to main script listing

gml_GlobalScript_scr_outside_camera

(view raw script w/o annotations or w/e)
1
function 
scr_outside_camera
scr_outside_camera

function
scr_outside_camera(arg0)
{ _offcamera = 0; rightx = x + sprite_width; leftx = x; bottomy = y + sprite_height; topy = y; if (x > (__view_get(e__VW.XView, 0) + __view_get(e__VW.WView, 0) + arg0)) _offcamera = 1; if (rightx < (__view_get(e__VW.XView, 0) - arg0)) _offcamera = 1; if (y > (__view_get(e__VW.YView, 0) + __view_get(e__VW.HView, 0) + arg0)) _offcamera = 1; if (bottomy < (__view_get(e__VW.YView, 0) - arg0)) _offcamera = 1; return _offcamera; } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
(arg0)
2
{
3
    _offcamera = 0;
4
    rightx = x + sprite_width;
5
    leftx = x;
6
    bottomy = y + sprite_height;
7
    topy = y;
8
    if (x > (__view_get(e__VW.XView, 0) + __view_get(e__VW.WView, 0) + arg0))
9
        _offcamera = 1;
10
    if (rightx < (__view_get(e__VW.XView, 0) - arg0))
11
        _offcamera = 1;
12
    if (y > (__view_get(e__VW.YView, 0) + __view_get(e__VW.HView, 0) + arg0))
13
        _offcamera = 1;
14
    if (bottomy < (__view_get(e__VW.YView, 0) - arg0))
15
        _offcamera = 1;
16
    return _offcamera;
17
}
18
19
enum e__VW
20
{
21
    XView,
22
    YView,
23
    WView,
24
    HView,
25
    Angle,
26
    HBorder,
27
    VBorder,
28
    HSpeed,
29
    VSpeed,
30
    Object,
31
    Visible,
32
    XPort,
33
    YPort,
34
    WPort,
35
    HPort,
36
    Camera,
37
    SurfaceID
38
}