Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_kikky_screen_Draw_0

related scripts: CleanUp_0Create_0Draw_0 Step_0

(view raw script w/o annotations or w/e)
1
var _xx = x + 20;
2
var _yy = y + 28;
3
draw_set_colour(c_black);
4
ossafe_fill_rectangle(_xx, _yy, 560, _yy + 200, 0);
5
if (!surface_exists(surf) || surf == -1)
6
    surf = surface_create(500, 200);
7
surface_set_target(surf);
8
draw_clear_alpha(c_black, 0);
9
with (obj_kikky)
10
    draw_sprite_ext(sprite_index, image_index, (x - _xx) + xx, (y - _yy) + yy, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
11
with (obj_dentalchew)
12
    draw_sprite_ext(sprite_index, image_index, x - _xx, y - _yy, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
13
draw_set_colour(c_white);
14
draw_set_font(
scr_84_get_font
scr_84_get_font

function
scr_84_get_font(arg0)
{ if (!variable_global_exists("chemg_last_get_font")) global.chemg_last_get_font = ""; if (arg0 != global.chemg_last_get_font) global.chemg_last_get_font = arg0; return ds_map_find_value(global.font_map, arg0); }
("main"));
15
draw_set_halign(fa_center);
16
draw_text((room_width / 2) - _xx, 8, stringsetloc(
Nagasagy Kikky Park
"Nagasagy Kikky Park", "obj_kikky_screen_slash_Draw_0_gml_23_0"
));
17
draw_set_halign(fa_left);
18
var _n = obj_kikky.happiness;
19
draw_text(380, 170, stringsetloc(
Happiness:
"Happiness: ", "obj_kikky_screen_slash_Draw_0_gml_26_0"
) + string(_n));
20
draw_set_halign(fa_center);
21
draw_set_colour(cool_blue);
22
draw_text(40, 160, stringsetloc(
Dental\nToy
"Dental\nToy", "obj_kikky_screen_slash_Draw_0_gml_29_0"
));
23
draw_set_halign(fa_left);
24
surface_reset_target();
25
crttimer = (crttimer + 0.5) % 3;
26
var _vig = crt_glitch ? (0.2 + random(clamp(crt_glitch / 200, 0, 0.1))) : 0;
27
var _vigint = power(1.5, 1.5 - _vig) * 18;
28
var _chrom_scale = crt_glitch ? (irandom_range(-4, 4) * clamp(crt_glitch / 5, 1, 5)) : chromStrength;
29
if (_chrom_scale == 0)
30
    _chrom_scale = 1;
31
var _filteramount = 0.1 + min(crt_glitch / 100, 0.1);
32
shader_replace_simple_set_hook(5);
33
shader_set_uniform_f(shader_get_uniform(shd_crt, "texel"), 0.0005208333333333333, 0.000925925925925926);
34
shader_set_uniform_f(shader_get_uniform(shd_crt, "vignette_scale"), _vig);
35
shader_set_uniform_f(shader_get_uniform(shd_crt, "vignette_intensity"), _vigint);
36
shader_set_uniform_f(shader_get_uniform(shd_crt, "chromatic_scale"), _chrom_scale);
37
shader_set_uniform_f(shader_get_uniform(shd_crt, "filter_amount"), _filteramount);
38
shader_set_uniform_f(shader_get_uniform(shd_crt, "time"), crttimer);
39
draw_surface(surf, _xx, _yy);
40
shader_replace_simple_reset_hook();
41
draw_set_colour(c_white);
42
ossafe_fill_rectangle(_xx + 1, _yy + 1, 559, (_yy + 200) - 1, 1);
43
ossafe_fill_rectangle(_xx, _yy, 560, _yy + 200, 1);
44
draw_set_colour(c_gray);
45
ossafe_fill_rectangle(_xx + 80, _yy + 210, room_width - 41, _yy + 228, 0);
46
draw_set_colour(c_black);
47
ossafe_fill_rectangle(_xx + 80, _yy + 218, room_width - 41, _yy + 220, 0);
48
draw_set_colour(c_white);
49
ossafe_fill_rectangle(_xx + 18, _yy + 206, _xx + 62, _yy + 232, 0);
50
draw_set_colour(c_black);
51
ossafe_fill_rectangle(_xx + 20, _yy + 208, _xx + 60, _yy + 230, 0);
52
draw_sprite(spr_dentalchew, 0, _xx + 41, _yy + 219);