Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b2fashionshop2_Draw_0

(view raw script w/o annotations or w/e)
1
if (active && 
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
2
{
3
    if (obj_board_camera.con == 0)
4
        
scr_board_objname
scr_board_objname

function
scr_board_objname()
{ if (
scr_debug())
{ if (global.chemg_show_room) { var __cx = board_tilex(12) - 2; var __cy = board_tiley(0); if (argument_count >= 1) __cx = argument0; if (argument_count >= 2) __cy = argument1; draw_set_halign(fa_right); draw_set_font(fnt_main); draw_set_color(c_aqua); draw_text_outline(__cx, __cy, string_copy(object_get_name(object_index), 5, 99)); draw_set_font(fnt_small); draw_set_halign(fa_left); draw_set_color(c_white); } } }
();
5
    draw_set_halign(fa_left);
6
    var count = 0;
7
    showval(board_tilex(0) + 10, board_tiley(0) + 10 + (12 * count), "con");
8
    count++;
9
}
10
if (active && obj_board_camera.con == 0)
11
{
12
    timer++;
13
    if (timer == 30)
14
        drawprices = 1;
15
    if ((timer % 2) == 0 && timer > 0 && texttimer <= (string_length(shopstring) + 20))
16
    {
17
        texttimer++;
18
        if (texttimer < string_length(shopstring))
19
        {
20
            if (string_char_at(shopstring, texttimer) != " " && string_char_at(shopstring, texttimer) != "#")
21
                snd_play(snd_board_text_main);
22
        }
23
        if (texttimer == string_length(shopstring))
24
        {
25
            textcomplete = true;
26
            snd_play(snd_board_text_main_end);
27
        }
28
    }
29
    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); }
("8bit"));
30
    draw_set_color(c_white);
31
    var currentstring = string_hash_to_newline(string_copy(shopstring, 1, texttimer));
32
    var txtwidth = string_width(string_hash_to_newline(shopstring));
33
    if (drawtext)
34
        draw_text_ext((320 - (round(txtwidth) / 2)) + 4, board_tiley(2) + 12, currentstring, 24, 640);
35
    if (i_ex(bow) && bow.con == 2 && (drawprices || drawitanyways))
36
        draw_text((bow.x + 16) - (round(string_width(bowstring)) / 2), bow.y + 32 + 4, bowstring);
37
    if (i_ex(deodorant) && deodorant.con == 2 && (drawprices || drawitanyways))
38
    {
39
        draw_set_halign(fa_center);
40
        draw_text(deodorant.x + 16, deodorant.y + 32 + 4, string_hash_to_newline(deostring));
41
        draw_set_halign(fa_left);
42
    }
43
}