Deltarune (Chapter 4) script viewer

← back to main script listing

gml_GlobalScript_scr_draw_hard_outline

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

function
scr_draw_hard_outline(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
{ var __surf = -1; if (!surface_exists(__surf)) __surf = surface_create(arg2 * 2, arg2 * 2); surface_set_target(__surf); draw_clear_alpha(c_black, 0); var __xdirA = arg9; var __xdirB = 0; var __ydirA = 0; var __ydirB = arg9; draw_sprite_ext(arg0, arg1, arg2 + __xdirA, arg3 + __ydirA, arg4, arg5, 0, c_white, 1); draw_sprite_ext(arg0, arg1, arg2 - __xdirA, arg3 - __ydirA, arg4, arg5, 0, c_white, 1); draw_sprite_ext(arg0, arg1, arg2 + __xdirB, arg3 + __ydirB, arg4, arg5, 0, c_white, 1); draw_sprite_ext(arg0, arg1, arg2 - __xdirB, arg3 - __ydirB, arg4, arg5, 0, c_white, 1); surface_reset_target(); gpu_set_fog(true, arg7, 0, 0); draw_surface_ext(__surf, arg2, arg3, 1, 1, arg6, c_white, arg8); gpu_set_fog(false, c_white, 0, 0); if (surface_exists(__surf)) surface_free(__surf); } function scr_draw_battle_outline(arg0 = 255, arg1 = 1, arg2 = 2, arg3 = false) { if (arg1 <= 0) exit; draw_set_blend_mode(bm_normal); var _xx = x; var _yy = y; var __surf; if (arg1 < 1 || arg3) { _xx = arg2; _yy = arg2; __surf = -1; if (!surface_exists(__surf)) __surf = surface_create(sprite_width + (arg2 * 2), sprite_height + (arg2 * 2)); surface_set_target(__surf); draw_clear_alpha(c_black, 0); } d3d_set_fog(true, arg0, 0, 1); draw_sprite_ext(sprite_index, image_index, _xx, _yy - arg2, image_xscale, image_yscale, 0, c_white, 1); draw_sprite_ext(sprite_index, image_index, _xx - arg2, _yy, image_xscale, image_yscale, 0, c_white, 1); draw_sprite_ext(sprite_index, image_index, _xx, _yy + arg2, image_xscale, image_yscale, 0, c_white, 1); draw_sprite_ext(sprite_index, image_index, _xx + arg2, _yy, image_xscale, image_yscale, 0, c_white, 1); if (arg3) { draw_set_blend_mode(bm_subtract); draw_sprite_ext(sprite_index, image_index, _xx, _yy, image_xscale, image_yscale, 0, c_white, 1); draw_set_blend_mode(bm_normal); } else { d3d_set_fog(true, #202020, 0, 1); draw_sprite_ext(sprite_index, image_index, _xx, _yy, image_xscale, image_yscale, 0, c_white, 1); } d3d_set_fog(false, c_white, 0, 0); if (arg1 < 1 || arg3) { surface_reset_target(); draw_surface_ext(__surf, x - arg2, y - arg2, 1, 1, image_angle, c_white, arg1); if (surface_exists(__surf)) surface_free(__surf); } }
(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
2
{
3
    var __surf = -1;
4
    if (!surface_exists(__surf))
5
        __surf = surface_create(arg2 * 2, arg2 * 2);
6
    surface_set_target(__surf);
7
    draw_clear_alpha(c_black, 0);
8
    var __xdirA = arg9;
9
    var __xdirB = 0;
10
    var __ydirA = 0;
11
    var __ydirB = arg9;
12
    draw_sprite_ext(arg0, arg1, arg2 + __xdirA, arg3 + __ydirA, arg4, arg5, 0, c_white, 1);
13
    draw_sprite_ext(arg0, arg1, arg2 - __xdirA, arg3 - __ydirA, arg4, arg5, 0, c_white, 1);
14
    draw_sprite_ext(arg0, arg1, arg2 + __xdirB, arg3 + __ydirB, arg4, arg5, 0, c_white, 1);
15
    draw_sprite_ext(arg0, arg1, arg2 - __xdirB, arg3 - __ydirB, arg4, arg5, 0, c_white, 1);
16
    surface_reset_target();
17
    gpu_set_fog(true, arg7, 0, 0);
18
    draw_surface_ext(__surf, arg2, arg3, 1, 1, arg6, c_white, arg8);
19
    gpu_set_fog(false, c_white, 0, 0);
20
    if (surface_exists(__surf))
21
        surface_free(__surf);
22
}
23
24
function scr_draw_battle_outline(arg0 = 255, arg1 = 1, arg2 = 2, arg3 = false)
25
{
26
    if (arg1 <= 0)
27
        exit;
28
    draw_set_blend_mode(bm_normal);
29
    var _xx = x;
30
    var _yy = y;
31
    var __surf;
32
    if (arg1 < 1 || arg3)
33
    {
34
        _xx = arg2;
35
        _yy = arg2;
36
        __surf = -1;
37
        if (!surface_exists(__surf))
38
            __surf = surface_create(sprite_width + (arg2 * 2), sprite_height + (arg2 * 2));
39
        surface_set_target(__surf);
40
        draw_clear_alpha(c_black, 0);
41
    }
42
    d3d_set_fog(true, arg0, 0, 1);
43
    draw_sprite_ext(sprite_index, image_index, _xx, _yy - arg2, image_xscale, image_yscale, 0, c_white, 1);
44
    draw_sprite_ext(sprite_index, image_index, _xx - arg2, _yy, image_xscale, image_yscale, 0, c_white, 1);
45
    draw_sprite_ext(sprite_index, image_index, _xx, _yy + arg2, image_xscale, image_yscale, 0, c_white, 1);
46
    draw_sprite_ext(sprite_index, image_index, _xx + arg2, _yy, image_xscale, image_yscale, 0, c_white, 1);
47
    if (arg3)
48
    {
49
        draw_set_blend_mode(bm_subtract);
50
        draw_sprite_ext(sprite_index, image_index, _xx, _yy, image_xscale, image_yscale, 0, c_white, 1);
51
        draw_set_blend_mode(bm_normal);
52
    }
53
    else
54
    {
55
        d3d_set_fog(true, #202020, 0, 1);
56
        draw_sprite_ext(sprite_index, image_index, _xx, _yy, image_xscale, image_yscale, 0, c_white, 1);
57
    }
58
    d3d_set_fog(false, c_white, 0, 0);
59
    if (arg1 < 1 || arg3)
60
    {
61
        surface_reset_target();
62
        draw_surface_ext(__surf, x - arg2, y - arg2, 1, 1, image_angle, c_white, arg1);
63
        if (surface_exists(__surf))
64
            surface_free(__surf);
65
    }
66
}