Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_climb_leafling_Draw_0

(view raw script w/o annotations or w/e)
1
if (drawoffscreen == 0)
2
{
3
    dodraw = 1;
4
    tolerance = sprite_height + sprite_width;
5
    if (!
scr_onscreen_tolerance
scr_onscreen_tolerance

function
scr_onscreen_tolerance(arg0, arg1)
{ obj = arg0; spacer = arg1; var __cx = camera_get_view_x(view_camera[0]); var __cy = camera_get_view_y(view_camera[0]); if ((obj.x + obj.sprite_width + spacer) < __cx || (obj.x - spacer) > (__cx + 640) || (obj.y + obj.sprite_height + spacer) < __cy || (obj.y - spacer) > (__cy + 480)) return false; else return true; }
(id, tolerance))
6
        dodraw = 0;
7
}
8
else
9
{
10
    dodraw = true;
11
}
12
if (dodraw)
13
{
14
    drawx = 0;
15
    drawsiner += 0.25;
16
    tempx = x;
17
    x += drawx;
18
    superscalex = 0;
19
    superdrawx = 0;
20
    superscalexb = 1;
21
    gpu_set_blendmode(bm_add);
22
    for (i = 0; i < 5; i++)
23
    {
24
        var aura = (i * 9) + ((drawsiner * 3) % 9);
25
        var aurax = (aura * 0.75) + (sin(aura / 4) * 4);
26
        var auray = 45 * 
scr_ease_in
scr_ease_in

function
scr_ease_in(arg0, arg1)
{ if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_in_bounce(arg0, 0, 1, 1); case -2: return ease_in_elastic(arg0, 0, 1, 1); case -1: var _s = 1.70158; return arg0 * arg0 * (((_s + 1) * arg0) - _s); case 0: return arg0; case 1: return -cos(arg0 * 1.5707963267948966) + 1; case 6: return power(2, 10 * (arg0 - 1)); case 7: return -(sqrt(1 - sqr(arg0)) - 1); default: return power(arg0, arg1); } }
(aura / 45, 1);
27
        var aurayscale = min(80 / sprite_height, 1);
28
        draw_sprite_ext(sprite_index, image_index, x - ((aurax / 180) * sprite_width), y - ((auray / 82) * sprite_height * aurayscale), image_xscale + (aurax / 36), image_yscale + ((auray / 36) * aurayscale), image_angle, c_red, image_alpha * (1 - (auray / 45)) * 0.5);
29
    }
30
    gpu_set_blendmode(bm_normal);
31
    var xmult = min((70 / sprite_width) * 4, 4);
32
    var ymult = min((80 / sprite_height) * 5, 5);
33
    var ysmult = min((80 / sprite_height) * 0.2, 0.2);
34
    draw_sprite_ext_centerscale(sprite_index, image_index, x + superdrawx + (sin(drawsiner / 5) * xmult), y + (cos(drawsiner / 5) * ymult), image_xscale + superscalex, image_yscale + (sin(drawsiner / 5) * ysmult), image_angle, 255, image_alpha * 0.2);
35
    draw_sprite_ext_centerscale(sprite_index, image_index, (x + superdrawx) - (sin(drawsiner / 5) * xmult), y - (cos(drawsiner / 5) * ymult), image_xscale + superscalex, image_yscale - (sin(drawsiner / 5) * ysmult), image_angle, 255, image_alpha * 0.2);
36
    
scr_draw_outline_ext
scr_draw_outline_ext

function
scr_draw_outline_ext(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
{ gpu_set_fog(true, arg7, 0, 0); var __xdirA = arg9; var __xdirB = 0; var __ydirA = 0; var __ydirB = arg9; if ((arg6 % 90) != 0) { __xdirA = lengthdir_x(arg9, arg6); __xdirB = lengthdir_x(arg9, arg6 + 90); __ydirA = lengthdir_y(arg9, arg6 + 90); __ydirB = lengthdir_y(arg9, arg6); } draw_sprite_ext(arg0, arg1, arg2 + __xdirA, arg3 + __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirA, arg3 - __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 + __xdirB, arg3 + __ydirB, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirB, arg3 - __ydirB, arg4, arg5, arg6, c_white, arg8); gpu_set_fog(false, c_white, 0, 0); }
(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, c_red, image_alpha * 0.3, 2);
37
    draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
38
    x = tempx;
39
}