Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_swordroute_consolestarter_Draw_0

(view raw script w/o annotations or w/e)
1
if (draw_blue)
2
{
3
    draw_set_color(#3F48CC);
4
    ossafe_fill_rectangle(camerax(), cameray(), camerax() + room_width, cameray() + room_height);
5
    draw_set_color(c_white);
6
    with (obj_gameshow_swordroute)
7
        screencolor = #3F48CC;
8
}
9
if (draw_static)
10
{
11
    statictimer += 0.5;
12
    ossafe_fill_rectangle(camerax(), cameray(), camerax() + room_width, cameray() + room_height);
13
    var staticalpha = 0.25;
14
    draw_sprite_ext(spr_static_effect, statictimer, 64, 32, 2, 2, 0, c_white, staticalpha);
15
    draw_sprite_ext(spr_static_effect, statictimer, 64, 288, 2, 2, 0, c_white, staticalpha);
16
    draw_sprite_ext(spr_static_effect, statictimer, 320, 32, 2, 2, 0, c_white, staticalpha);
17
    draw_sprite_ext(spr_static_effect, statictimer, 320, 288, 2, 2, 0, c_white, staticalpha);
18
    draw_sprite_ext(spr_static_effect, statictimer - 0.25, 64, 32, 2, 2, 0, c_white, staticalpha);
19
    draw_sprite_ext(spr_static_effect, statictimer - 0.25, 64, 288, 2, 2, 0, c_white, staticalpha);
20
    draw_sprite_ext(spr_static_effect, statictimer - 0.25, 320, 32, 2, 2, 0, c_white, staticalpha);
21
    draw_sprite_ext(spr_static_effect, statictimer - 0.25, 320, 288, 2, 2, 0, c_white, staticalpha);
22
    with (obj_gameshow_swordroute)
23
        screencolor = #ADC7EB;
24
}
25
if (draw_green)
26
{
27
    draw_set_color(#B5E61D);
28
    ossafe_fill_rectangle(camerax(), cameray(), camerax() + room_width, cameray() + room_height);
29
    draw_set_color(c_white);
30
    with (obj_gameshow_swordroute)
31
        screencolor = #B5E61D;
32
}
33
if (controllerprompt)
34
{
35
    draw_set_color(c_white);
36
    draw_set_font(fnt_8bit);
37
    draw_set_halign(fa_center);
38
    draw_set_valign(fa_middle);
39
    draw_text_transformed(320, 178, string_hash_to_newline(controllertext), 1, 1, 0);
40
    draw_sprite_ext(spr_gameshow_nocontroller, 0, 196, 150, 2, 2, 0, c_white, 1);
41
    draw_set_valign(fa_top);
42
    draw_set_halign(fa_left);
43
}
44
if (drawboxcolor)
45
{
46
    draw_set_color(drawcolor);
47
    ossafe_fill_rectangle(camerax(), cameray(), camerax() + room_width, cameray() + room_height);
48
    draw_set_color(c_white);
49
    with (obj_gameshow_swordroute)
50
        screencolor = other.drawcolor;
51
}
52
if (draw_green_intro)
53
{
54
    if (screenlerp == false)
55
    {
56
        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("boxy", 0, 1, 20, 5, "in");
57
        screenlerp = true;
58
    }
59
    draw_set_color(c_black);
60
    ossafe_fill_rectangle(camerax(), cameray(), camerax() + room_width, cameray() + room_height);
61
    draw_set_color(c_white);
62
    var _amt = round((boxy * 146) / 2) * 2;
63
    draw_set_color(#B5E61D);
64
    ossafe_fill_rectangle(0, 176 - (boxy * 146), room_width, (176 + (boxy * 146)) - 1);
65
    draw_set_color(c_white);
66
    with (obj_gameshow_swordroute)
67
        screencolor = merge_color(c_black, #B5E61D, other.boxy);
68
}
69
if (draw_stars)
70
{
71
    startimer++;
72
    if ((startimer % 4) == 0)
73
        starindex = 1 - starindex;
74
    if (timer > 15)
75
    {
76
        var locx = 80;
77
        var locy = 80;
78
        var rot = 0;
79
        draw_sprite_ext(spr_board_star_twoframe, starindex, locx, locy, 2, 2, rot, c_white, 1);
80
    }
81
}
82
if (drawlogo)
83
    draw_sprite_ext(spr_board_game_title, 0, 172, 136, 2, 2, 0, logocolor, 1);
84
if (ver == 0 && global.flag[1176 oddcontroller_state] != 1)
85
{
86
    if (con == 0)
87
    {
88
        shinetimer++;
89
        if ((shinetimer % 8) == 0)
90
        {
91
            if (image_index == 2)
92
                image_index = 3;
93
            else
94
                image_index = 2;
95
        }
96
        draw_sprite_ext(sprite_index, image_index, 316, 330, 2, 2, 0, c_white, 1.5 + sin(shinetimer / 30));
97
    }
98
}
99
if (con == 12)
100
{
101
    timer++;
102
    var draw1 = 0;
103
    var draw2 = 0;
104
    var draw3 = 0;
105
    var draw4 = 0;
106
    var draw5 = 0;
107
    var draw6 = 0;
108
    var draw7 = 0;
109
    var draw8 = 0;
110
    if (timer == 15)
111
    {
112
        snd_play_x(snd_wing, 0.25, 1);
113
        kris.sprite_index = spr_krisu_kneel;
114
    }
115
    if (timer == 45)
116
    {
117
        snd_play(snd_tv_poweron);
118
        draw_blue = false;
119
        controllerprompt = false;
120
        with (obj_gameshow_swordroute)
121
            screencolor = c_black;
122
    }
123
    if (timer == 75)
124
        kris.sprite_index = spr_krisu_holdcontroller;
125
    if (timer >= 45 && timer < 52)
126
        draw1 = true;
127
    if (timer >= 52 && timer < 61)
128
        draw2 = true;
129
    if (timer >= 61 && timer < 68)
130
        draw3 = true;
131
    if (timer >= 68 && timer < 74)
132
        draw4 = true;
133
    if (timer >= 74 && timer < 85)
134
        draw5 = true;
135
    if (timer >= 85 && timer < 90)
136
        draw6 = true;
137
    if (timer >= 90 && timer < 96)
138
        draw7 = true;
139
    if (timer >= 96 && timer < 134)
140
        draw8 = true;
141
    if (timer == 134)
142
    {
143
        safe_delete(bar1);
144
        safe_delete(bar2);
145
        draw_heart = true;
146
    }
147
    if (timer == 208)
148
        room_goto(roomtogoto);
149
    draw_set_color(#B5E61D);
150
    if (draw1)
151
        ossafe_fill_rectangle(board_tilex(0), board_tiley(4), board_tilex(6) - 1, board_tiley(12) - 1);
152
    if (draw2)
153
        ossafe_fill_rectangle(board_tilex(6), board_tiley(-1), board_tilex(12) - 1, board_tiley(4) - 1);
154
    if (draw3)
155
        ossafe_fill_rectangle(board_tilex(0), board_tiley(-1), board_tilex(6) - 1, board_tiley(4) - 1);
156
    if (draw4)
157
        ossafe_fill_rectangle(board_tilex(6), board_tiley(4), board_tilex(12) - 1, board_tiley(12) - 1);
158
    if (draw5)
159
        ossafe_fill_rectangle(board_tilex(0), board_tiley(5), board_tilex(12) - 1, board_tiley(12) - 1);
160
    if (draw6)
161
        ossafe_fill_rectangle(board_tilex(0), board_tiley(-1), board_tilex(12) - 1, board_tiley(3) - 1);
162
    if (draw7)
163
        ossafe_fill_rectangle(board_tilex(0), board_tiley(2), board_tilex(12) - 1, board_tiley(6) - 1);
164
    if (draw8)
165
    {
166
        ossafe_fill_rectangle(0, 0, room_width, room_height);
167
        var maxspeed = -24;
168
        var speedtime = 30;
169
        var waittime = 8;
170
        if (i_ex(bar1))
171
        {
172
            if (bar1.y < 16)
173
                bar1.y += 336;
174
        }
175
        else
176
        {
177
            bar1 = instance_create(board_tilex(0), 120, obj_board_marker);
178
            bar1.sprite_index = spr_whitepx;
179
            bar1.image_blend = c_black;
180
            bar1.image_xscale = 384;
181
            bar1.image_yscale = 16;
182
            bar1.depth = depth - 1;
183
            bar1.gravity = -1;
184
        }
185
        if (i_ex(bar2))
186
        {
187
            if (bar2.y < 16)
188
                bar2.y += 336;
189
        }
190
        else
191
        {
192
            bar2 = instance_create(board_tilex(0), 312, obj_board_marker);
193
            bar2.sprite_index = spr_whitepx;
194
            bar2.image_blend = c_black;
195
            bar2.image_xscale = 384;
196
            bar2.image_yscale = 16;
197
            bar2.depth = depth - 1;
198
            bar2.gravity = -1;
199
        }
200
    }
201
    if (draw_heart)
202
    {
203
        var heartsize = 1;
204
        if (heartsize == 1)
205
        {
206
            draw_sprite_ext(obj_board_squaretransition_heart, 0, 312, 182, 1, 1, 0, c_white, 1);
207
            draw_sprite_ext(obj_board_squaretransition_heart, 1, 312, 192, 1, 1, 0, c_white, 1);
208
        }
209
        if (heartsize == 2)
210
        {
211
            draw_sprite_ext(obj_board_squaretransition_heart, 0, 302, 172, 2, 2, 0, c_white, 1);
212
            draw_sprite_ext(obj_board_squaretransition_heart, 1, 302, 192, 2, 2, 0, c_white, 1);
213
        }
214
    }
215
    draw_set_color(c_white);
216
}