Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_snd_maker_Draw_0

(view raw script w/o annotations or w/e)
1
col_gray = 6972976;
2
col_inactivechosen = 14668032;
3
var cx = camerax();
4
var cy = cameray();
5
draw_set_blend_mode(bm_add);
6
draw_sprite_ext(spr_pxwhite, 0, cx - 20, cy - 20, 660, 500, 0, #192829, 1);
7
draw_set_blend_mode(bm_normal);
8
draw_sprite_ext(spr_pxwhite, 0, cx - 20, cy - 20, 660, 500, 0, #192829, 0.95);
9
draw_sprite_ext(spr_pxwhite, 0, cx + 252 + 2, cy + 0 + 2, 2, 480, 0, #0F1C1D, 1);
10
draw_sprite_ext(spr_pxwhite, 0, cx + 252 + 2, cy + 238 + 2, 640, 2, 0, #0F1C1D, 1);
11
draw_sprite_ext(spr_pxwhite, 0, cx + 252, cy + 0, 2, 480, 0, col_gray, 1);
12
draw_sprite_ext(spr_pxwhite, 0, cx + 252, cy + 238, 640, 2, 0, col_gray, 1);
13
draw_set_font(fnt_main);
14
draw_set_halign(fa_right);
15
var count = 1;
16
draw_set_halign(fa_left);
17
var xx = cx + 10;
18
var yy = cy + 80;
19
var mspace = 18;
20
var txscale = 1;
21
for (var i = 0; i < soundtotal; i++)
22
{
23
    var entry = soundName[i];
24
    if (pageind[0] == i)
25
        entry = ">>  " + soundName[i];
26
    draw_set_color(c_white);
27
    if (page != 0)
28
        draw_set_color(col_gray);
29
    if (i == pageind[0])
30
    {
31
        draw_set_color(c_yellow);
32
        if (page != 0)
33
            draw_set_color(col_inactivechosen);
34
    }
35
    draw_text_transformed(xx, (yy + (i * mspace)) - (pageind[0] * mspace), entry, txscale, 1, 0);
36
    draw_set_color(c_white);
37
}
38
menu[0] = "Volume < >   : " + string(curvolume);
39
menu[1] = "Pitch  < >   : " + string(curpitch);
40
menu[2] = "Delay  < >   : " + string(curdelay);
41
menu[3] = "Loop Rate: " + string(curlooprate);
42
menu[4] = "Kill Sound Upon Loop: " + string(curkillsnd);
43
menu[5] = "Add New Sound to Complex Sound";
44
menu[6] = "Overwrite Current Sound";
45
menu[7] = "Delete Current Sound";
46
menu[8] = "Test Complex Sound";
47
menu[9] = "Complex Sound Lifetime: " + string(curlifetime);
48
menu[10] = "Complex Sound Kill All: " + string(curkillall);
49
menu[11] = "Complex Sound Kill Individual: " + string(curkillind);
50
xx = cx + 260;
51
yy = cy + 40;
52
mspace = 16;
53
for (var i = 0; i < array_length(menu); i++)
54
{
55
    draw_set_color(c_white);
56
    if (page != 1)
57
        draw_set_color(col_gray);
58
    if (i == pageind[1])
59
    {
60
        draw_set_color(c_yellow);
61
        if (page != 1)
62
            draw_set_color(col_inactivechosen);
63
    }
64
    draw_text(xx, yy + (mspace * i), menu[i]);
65
}
66
draw_set_color(c_white);
67
yy = cy + 260;
68
mspace = 16;
69
count = 0;
70
var commandstring = "var snd=snd_play_complex(" + string(curkillall) + "," + string(curkillind) + "," + string(curlifetime) + ")";
71
draw_set_color(col_gray);
72
if (page == 2)
73
    draw_set_color(c_white);
74
draw_text(xx, yy + (mspace * -1), commandstring);
75
for (var i = 0; i < sndcount; i++)
76
{
77
    commandstring = "snd_add_complex(snd," + string(i) + "," + string(audio_get_name(snd[i])) + "," + string(pitch[i]) + "," + string(volume[i]) + "," + string(delay[i]) + "," + string(looprate[i]) + "," + string(killsnd[i]) + ")";
78
    var bonusstring = "";
79
    if (i == cursnd)
80
        bonusstring = ">> ";
81
    draw_set_color(col_gray);
82
    if (page == 2)
83
        draw_set_color(c_white);
84
    if (i == cursnd)
85
    {
86
        if (page == 2)
87
            draw_set_color(c_yellow);
88
        else
89
            draw_set_color(col_inactivechosen);
90
    }
91
    draw_text(xx, yy + (mspace * i), bonusstring + commandstring);
92
    draw_set_color(c_white);
93
}
94
draw_sprite_ext(spr_pxwhite, 0, cx, (cy + 480) - 24, 640, 24, 0, #0B1718, 0.9);
95
draw_set_halign(fa_center);
96
draw_set_color(#84DEE5);
97
draw_text_outline(cx + 320, ((cy + 480) - 24) + 4, "Hold [F1] or gp_Start for Help");
98
draw_set_halign(fa_left);
99
if (keyboard_check(vk_f1) || gamepad_button_check(0, gp_start) || gamepad_button_check(1, gp_start))
100
{
101
    siner++;
102
    draw_sprite_ext(spr_pxwhite, 0, cx - 20, cy - 20, 660, 500, 0, #111111, 1);
103
    draw_set_halign(fa_center);
104
    draw_set_color(c_black);
105
    draw_text_transformed(cx + 320 + 2, cy + 10 + 2, "HELP", 4, 4, sin(siner / 5) * 4);
106
    draw_set_color(c_white);
107
    draw_text_transformed_color(cx + 320, cy + 10, "HELP", 4, 4, sin(siner / 5) * 4, c_yellow, c_yellow, c_white, c_white, 1);
108
    draw_set_halign(fa_left);
109
    xx = cx + 200;
110
    yy = cy + 120;
111
    mspace = 24;
112
    count = 0;
113
    draw_text_outline(xx, yy + (mspace * count), "[Z] or gp_A = Play current Sound");
114
    count++;
115
    draw_text_outline(xx, yy + (mspace * count), "[X] or gp_B = Kill all playing sounds");
116
    count++;
117
    draw_text_outline(xx, yy + (mspace * count), "[C] or gp_Y = Add current sound to complex sound");
118
    count++;
119
    draw_text_outline(xx, yy + (mspace * count), "[V] or gp_X = Replace selected sound with current settings");
120
    count++;
121
    draw_text_outline(xx, yy + (mspace * count), "[Q] or gp_L1 = Switch to previous section");
122
    count++;
123
    draw_text_outline(xx, yy + (mspace * count), "[E] or [TAB] or gp_R1 = Switch to next section");
124
    count++;
125
    draw_text_outline(xx, yy + (mspace * count), "[SPACE] or gp_R2 = Play Complex Sound");
126
    count++;
127
    draw_text_outline(xx, yy + (mspace * count), "[ESC] or gp_Select = Exit");
128
    count++;
129
    draw_text_outline(xx, yy + (mspace * count), "[CTRL] + [C] to copy GML command to clipboard");
130
    count++;
131
    draw_set_halign(fa_left);
132
    draw_set_color(c_white);
133
}