Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_mike_bigcat_Draw_0

(view raw script w/o annotations or w/e)
1
if (happiness >= 75)
2
{
3
    image_blend = c_white;
4
}
5
else if (happiness >= 50)
6
{
7
    image_blend = merge_colour(c_white, c_red, 0.25);
8
    if (random(6) < 1)
9
        xx = irandom_range(-2, 2);
10
    if (random(6) < 1)
11
        yy = irandom_range(-2, 2);
12
}
13
else if (happiness >= 25)
14
{
15
    image_blend = merge_colour(c_white, c_red, 0.5);
16
    if (random(2) < 1)
17
        xx = irandom_range(-2, 2);
18
    if (random(2) < 1)
19
        yy = irandom_range(-2, 2);
20
}
21
else if (happiness >= 10)
22
{
23
    image_blend = merge_colour(c_white, c_red, 0.75);
24
    xx = irandom_range(-2, 2);
25
    yy = irandom_range(-2, 2);
26
}
27
else if (happiness > 0)
28
{
29
    image_blend = merge_colour(c_white, c_red, 0.85);
30
    xx = irandom_range(-6, 6);
31
    yy = irandom_range(-6, 6);
32
}
33
else if (happiness <= 0)
34
{
35
    image_blend = c_red;
36
}
37
pet -= 1;
38
if (pet > 0)
39
{
40
    image_blend = merge_colour(c_white, c_lime, pet / pet_max);
41
}
42
else
43
{
44
}
45
scr_dso
scr_dso

function
scr_dso(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 = 1)
{ gpu_set_fog(true, arg7, 0, 0); draw_sprite_ext(arg0, arg1, arg2 - arg9, arg3, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2 + arg9, arg3, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2, arg3 - arg9, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2, arg3 + arg9, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2 - arg9, arg3 - arg9, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2 + arg9, arg3 - arg9, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2 - arg9, arg3 + arg9, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2 + arg9, arg3 + arg9, arg4, arg5, arg6, arg7, arg8); gpu_set_fog(false, arg7, 0, 0); }
(sprite_index, image_index, x + xx, y + yy, xscale * image_xscale, image_yscale, 0, 1, image_alpha);
46
if (image_index == 1)
47
    
scr_dso
scr_dso

function
scr_dso(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 = 1)
{ gpu_set_fog(true, arg7, 0, 0); draw_sprite_ext(arg0, arg1, arg2 - arg9, arg3, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2 + arg9, arg3, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2, arg3 - arg9, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2, arg3 + arg9, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2 - arg9, arg3 - arg9, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2 + arg9, arg3 - arg9, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2 - arg9, arg3 + arg9, arg4, arg5, arg6, arg7, arg8); draw_sprite_ext(arg0, arg1, arg2 + arg9, arg3 + arg9, arg4, arg5, arg6, arg7, arg8); gpu_set_fog(false, arg7, 0, 0); }
(sprite_index, 2, x + xx + (sin(x + (current_time / 200)) * 5), y + yy + (cos(y + (current_time / 240)) * 8), xscale * image_xscale, image_yscale, 0, 1, image_alpha, 1);
48
draw_sprite_ext(sprite_index, image_index, x + xx, y + yy, xscale * image_xscale, image_yscale, 0, image_blend, image_alpha);
49
if (image_index == 0)
50
{
51
    if (image_xscale == 1)
52
        draw_sprite_ext(sprite_index, 3, x + xx, y + yy, xscale * image_xscale, image_yscale, 0, c_white, image_alpha);
53
    else
54
        draw_sprite_ext(sprite_index, 4, x + xx, y + yy, xscale * image_xscale, image_yscale, 0, c_white, image_alpha);
55
}
56
if (image_index == 1)
57
    draw_sprite_ext(sprite_index, 2, x + xx + (sin(x + (current_time / 200)) * 5), y + yy + (cos(y + (current_time / 240)) * 8), xscale * image_xscale, image_yscale, 0, image_blend, image_alpha);