Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_mike_minigame_tv_Draw_0

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

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
(undefined, 100);
2
draw_set_colour(c_black);
3
ossafe_fill_rectangle(60, 80, 580, 180, 0);
4
var smallfont = 
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");
5
var bigfont = 
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); }
("mainbig");
6
draw_set_colour(c_white);
7
draw_set_font(smallfont);
8
draw_set_halign(fa_left);
9
if (i_ex(obj_mike_hand))
10
{
11
    if (minigame == 0)
12
    {
13
        draw_set_font(bigfont);
14
        if (obj_room_castle_tv_zone_minigame.console_version)
15
        {
16
            var yy = 80;
17
            if (global.lang == "ja")
18
            {
19
                yy = 110;
20
                draw_set_font(smallfont);
21
            }
22
            draw_text(70, yy, console_desc);
23
        }
24
        else
25
        {
26
            draw_text(70, 80, desc[minigame]);
27
        }
28
    }
29
    else
30
    {
31
        draw_set_font(bigfont);
32
        draw_set_colour(c_aqua);
33
        draw_text(70, 80, name[minigame]);
34
        draw_set_colour(c_white);
35
        draw_set_font(smallfont);
36
        draw_text(70, 110, desc[minigame]);
37
    }
38
}
39
draw_set_font(fnt_mainbig);
40
if (minigame > 0)
41
{
42
    draw_set_halign(fa_right);
43
    var scale = (hiscore[minigame] >= 100000000) ? 0.5 : 1;
44
    draw_text_ext_transformed(550, 80, string(hiscore[minigame]), 0, 999, scale, 1, 0);
45
    var _trophy = 0;
46
    if (hiscore[minigame] >= silver_score[minigame])
47
        _trophy = 1;
48
    if (hiscore[minigame] >= gold_score[minigame])
49
        _trophy = 2;
50
    if (hiscore[minigame] >= platinum_score[minigame])
51
        _trophy = 3;
52
    if (hiscore[minigame] >= bronze_score[minigame])
53
        draw_sprite(spr_trophy, _trophy, 556, 86);
54
    scale = (latestscore[minigame] >= 1000000) ? 0.5 : 1;
55
    if (latestscore[minigame] > 0)
56
        draw_text_ext_transformed(550, 110, string(latestscore[minigame]), 0, 999, scale, 1, 0);
57
    draw_set_halign(fa_left);
58
    draw_text(330, 80, "HISCORE");
59
    if (latestscore[minigame] > 0)
60
        draw_text(330, 110, "LAST SCORE");
61
}