Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_thrashmachine_Draw_0

(view raw script w/o annotations or w/e)
1
dcolor[1] = make_color_hsv(global.flag[223 thrash_head_color] * 8, 255, 255 * value);
2
dcolor[0] = make_color_hsv(global.flag[224 thrash_body_color] * 8, 255, 255 * value);
3
dcolor[2] = make_color_hsv(global.flag[225 thrash_shot_color] * 8, 255, 255 * value);
4
basecolor = merge_color(c_black, c_white, value);
5
wsinerrate = 0.8;
6
if (part[2] >= 0)
7
    wsiner += wsinerrate;
8
if (animate == 0)
9
{
10
    siner = 0;
11
    wsiner = 0;
12
}
13
walkc = cos(wsiner / 3);
14
var _x2, _y2;
15
if (launch)
16
{
17
    image_angle -= 35;
18
    yy = y;
19
    if ((image_angle % 360) != 0)
20
    {
21
        var _xoff = -3 * s;
22
        var _yoff = 12 * s;
23
        _x2 = xx;
24
        _y2 = yy;
25
        xx = scr_orbitx
scr_orbitx

function scr_orbitx(arg0, arg1, arg2, arg3, arg4) { if (arg4 == 0) return arg2; var __theta = point_direction(arg0, arg1, arg2, arg3); var __radius = point_distance(arg0, arg1, arg2, arg3); __theta += arg4; return arg0 + lengthdir_x(__radius, __theta); }
(_x2, _y2, _x2 - _xoff, _y2 - _yoff, image_angle) + _xoff;
26
        yy = scr_orbity
scr_orbity

function scr_orbity(arg0, arg1, arg2, arg3, arg4) { if (arg4 == 0) return arg3; var __theta = point_direction(arg0, arg1, arg2, arg3); var __radius = point_distance(arg0, arg1, arg2, arg3); __theta += arg4; return arg1 + lengthdir_y(__radius, __theta); }
(_x2, _y2, _x2 - _xoff, _y2 - _yoff, image_angle) + _yoff;
27
    }
28
}
29
var _flash = false;
30
var _do_flash = rim_flash > 0 || body_flash > 0;
31
var _rim_color = merge_color(c_black, c_white, rim_flash);
32
var _flash_color = merge_color(c_black, c_white, body_flash);
33
for (loop = 0; loop < 2; loop += 1)
34
{
35
    if (loop == 0)
36
    {
37
        draw_set_blend_mode(bm_normal);
38
        color[0] = basecolor;
39
        color[1] = basecolor;
40
        color[2] = basecolor;
41
    }
42
    else if (loop == 1)
43
    {
44
        draw_set_blend_mode(bm_add);
45
        color[0] = dcolor[0];
46
        color[1] = dcolor[1];
47
        color[2] = dcolor[2];
48
    }
49
    _flash = loop == 1 && _do_flash;
50
    walka = -sin(wsiner / 6);
51
    walkb = -cos(wsiner / 6);
52
    if (moving == 1 && part[2] == 0 && walkb <= 0)
53
        walkb *= 3;
54
    var _pieceVector = Vector2(0, 0);
55
    if (drawfeet)
56
    {
57
        var _thrash_image = 0;
58
        if (bad == 0)
59
        {
60
            if (part[2] == 0)
61
            {
62
                _pieceVector = scr_rotatevector
scr_rotatevector

function scr_rotatevector(arg0, arg1, arg2) { var _tempVector = { x: arg0, y: arg1 }; if (arg2 == 0) return _tempVector; var _dir = point_direction(0, 0, arg0, arg1); var _len = point_distance(0, 0, arg0, arg1); _tempVector.x = lengthdir_x(_len, _dir + arg2); _tempVector.y = lengthdir_y(_len, _dir + arg2); return _tempVector; }
((-11 * s) + (s * walka * 2), (19 * s) + (s * walkb * 1), image_angle);
63
                _thrash_image = 0;
64
            }
65
            if (part[2] == 1)
66
            {
67
                _pieceVector = scr_rotatevector
scr_rotatevector

function scr_rotatevector(arg0, arg1, arg2) { var _tempVector = { x: arg0, y: arg1 }; if (arg2 == 0) return _tempVector; var _dir = point_direction(0, 0, arg0, arg1); var _len = point_distance(0, 0, arg0, arg1); _tempVector.x = lengthdir_x(_len, _dir + arg2); _tempVector.y = lengthdir_y(_len, _dir + arg2); return _tempVector; }
((-6 * s) + (s * walka * 2), (17 * s) + (s * walkb * 1), image_angle);
68
                _thrash_image = 1;
69
            }
70
            if (part[2] == 3)
71
            {
72
                _thrash_image = 4;
73
                _pieceVector = scr_rotatevector
scr_rotatevector

function scr_rotatevector(arg0, arg1, arg2) { var _tempVector = { x: arg0, y: arg1 }; if (arg2 == 0) return _tempVector; var _dir = point_direction(0, 0, arg0, arg1); var _len = point_distance(0, 0, arg0, arg1); _tempVector.x = lengthdir_x(_len, _dir + arg2); _tempVector.y = lengthdir_y(_len, _dir + arg2); return _tempVector; }
((-8 * s) + (s * walka * 2), (21 * s) + (s * walkb * 1), image_angle);
74
            }
75
            if (part[2] != 2)
76
                draw_sprite_ext_glow(spr_thrashfoot, _thrash_image, xx + _pieceVector.x, yy + _pieceVector.y, s, s, image_angle, color[2], a, override_color);
77
            if (_flash)
78
            {
79
                draw_sprite_ext_glow(spr_thrashfoot, _thrash_image, xx + _pieceVector.x, yy + _pieceVector.y, s, s, image_angle, c_white, a, _flash_color);
80
                draw_sprite_ext_glow(spr_thrashfoot_flash, _thrash_image, xx + _pieceVector.x, yy + _pieceVector.y, s, s, image_angle, _rim_color, a);
81
            }
82
        }
83
        else
84
        {
85
            if (part[2] == 0)
86
                draw_sprite_ext_glow(spr_thrashfoot_b, 0, (xx - (11 * s)) + (s * walka * 2), yy + (19 * s) + (s * walkb * 1), s / 2, s / 2, 0, color[2], a, override_color);
87
            if (part[2] == 1)
88
                draw_sprite_ext_glow(spr_thrashfoot_b, 1, (xx - (6 * s)) + (s * walka * 2), yy + (17 * s) + (s * walkb * 1), s / 2, s / 2, 0, color[2], a, override_color);
89
            if (part[2] == 3)
90
                draw_sprite_ext_glow(spr_thrashfoot_b, 4, (xx - (8 * s)) + (s * walka * 2), yy + (21 * s) + (s * walkb * 1), s / 2, s / 2, 0, color[2], a, override_color);
91
        }
92
    }
93
}
94
if (part[0] >= 0)
95
{
96
    for (loop = 0; loop < 2; loop += 1)
97
    {
98
        if (loop == 0)
99
        {
100
            draw_set_blend_mode(bm_normal);
101
            color[0] = basecolor;
102
            color[1] = basecolor;
103
            color[2] = basecolor;
104
        }
105
        if (loop == 1)
106
        {
107
            draw_set_blend_mode(bm_add);
108
            color[0] = dcolor[0];
109
            color[1] = dcolor[1];
110
            color[2] = dcolor[2];
111
        }
112
        _flash = _do_flash && loop == 1;
113
        var _pieceVector = scr_rotatevector
scr_rotatevector

function scr_rotatevector(arg0, arg1, arg2) { var _tempVector = { x: arg0, y: arg1 }; if (arg2 == 0) return _tempVector; var _dir = point_direction(0, 0, arg0, arg1); var _len = point_distance(0, 0, arg0, arg1); _tempVector.x = lengthdir_x(_len, _dir + arg2); _tempVector.y = lengthdir_y(_len, _dir + arg2); return _tempVector; }
(0, s * walkc, image_angle);
114
        if (!_flash && _do_flash)
115
            scr_draw_outline_ext
scr_draw_outline_ext

function scr_draw_outline_ext(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { gpu_set_fog(true, arg7, 0, 0); var __xdirA = arg9; var __xdirB = 0; var __ydirA = 0; var __ydirB = arg9; if ((arg6 % 90) != 0) { __xdirA = lengthdir_x(arg9, arg6); __xdirB = lengthdir_x(arg9, arg6 + 90); __ydirA = lengthdir_y(arg9, arg6 + 90); __ydirB = lengthdir_y(arg9, arg6); } draw_sprite_ext(arg0, arg1, arg2 + __xdirA, arg3 + __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirA, arg3 - __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 + __xdirB, arg3 + __ydirB, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirB, arg3 - __ydirB, arg4, arg5, arg6, c_white, arg8); gpu_set_fog(false, c_white, 0, 0); }
(spr_thrashbody, part[0], xx, yy + _pieceVector.y, s, s, image_angle, c_white, rim_flash, 2);
116
        if (bad == 0)
117
            draw_sprite_ext_glow(spr_thrashbody, part[0], xx, yy + _pieceVector.y, s, s, image_angle, color[0], a, override_color);
118
        else if (bad == 1)
119
            draw_sprite_ext_glow(spr_thrashbody_b, part[0], xx, yy + _pieceVector.y, s / 2, s / 2, image_angle, color[0], a, override_color);
120
        if (_flash)
121
        {
122
            draw_set_blend_mode(bm_add);
123
            draw_sprite_ext(spr_thrashbody_flash, part[0], xx, yy + _pieceVector.y, s, s, image_angle, merge_color(color[0], c_white, 0.5), rim_flash);
124
        }
125
    }
126
}
127
for (loop = 0; loop < 2; loop += 1)
128
{
129
    if (loop == 0)
130
    {
131
        draw_set_blend_mode(bm_normal);
132
        color[0] = basecolor;
133
        color[1] = basecolor;
134
        color[2] = basecolor;
135
    }
136
    if (loop == 1)
137
    {
138
        draw_set_blend_mode(bm_add);
139
        color[0] = dcolor[0];
140
        color[1] = dcolor[1];
141
        color[2] = dcolor[2];
142
    }
143
    _flash = _do_flash && loop == 1;
144
    if (bad == 0)
145
    {
146
        var _headsprite;
147
        if (part[1] == 0)
148
        {
149
            var _pieceVector = scr_rotatevector
scr_rotatevector

function scr_rotatevector(arg0, arg1, arg2) { var _tempVector = { x: arg0, y: arg1 }; if (arg2 == 0) return _tempVector; var _dir = point_direction(0, 0, arg0, arg1); var _len = point_distance(0, 0, arg0, arg1); _tempVector.x = lengthdir_x(_len, _dir + arg2); _tempVector.y = lengthdir_y(_len, _dir + arg2); return _tempVector; }
(-8 * s, (6 * s) + (s * walkc * 2), image_angle);
150
            headx = xx + _pieceVector.x;
151
            heady = yy + _pieceVector.y;
152
            _headsprite = spr_thrashweapon_laser_flash;
153
            if (!_flash && _do_flash)
154
                scr_draw_outline_ext
scr_draw_outline_ext

function scr_draw_outline_ext(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { gpu_set_fog(true, arg7, 0, 0); var __xdirA = arg9; var __xdirB = 0; var __ydirA = 0; var __ydirB = arg9; if ((arg6 % 90) != 0) { __xdirA = lengthdir_x(arg9, arg6); __xdirB = lengthdir_x(arg9, arg6 + 90); __ydirA = lengthdir_y(arg9, arg6 + 90); __ydirB = lengthdir_y(arg9, arg6); } draw_sprite_ext(arg0, arg1, arg2 + __xdirA, arg3 + __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirA, arg3 - __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 + __xdirB, arg3 + __ydirB, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirB, arg3 - __ydirB, arg4, arg5, arg6, c_white, arg8); gpu_set_fog(false, c_white, 0, 0); }
(spr_thrashweapon_laser, 0, headx, heady, s, s, image_angle, c_white, rim_flash, 2);
155
            draw_sprite_ext_glow(spr_thrashweapon_laser, 0, headx, heady, s, s, image_angle, color[1], a, override_color);
156
        }
157
        if (part[1] == 1)
158
        {
159
            var _pieceVector = scr_rotatevector
scr_rotatevector

function scr_rotatevector(arg0, arg1, arg2) { var _tempVector = { x: arg0, y: arg1 }; if (arg2 == 0) return _tempVector; var _dir = point_direction(0, 0, arg0, arg1); var _len = point_distance(0, 0, arg0, arg1); _tempVector.x = lengthdir_x(_len, _dir + arg2); _tempVector.y = lengthdir_y(_len, _dir + arg2); return _tempVector; }
(-10 * s, (6 * s) + (s * walkc * 2), image_angle);
160
            headx = xx + _pieceVector.x;
161
            heady = yy + _pieceVector.y;
162
            _headsprite = spr_thrashweapon_sword_flash;
163
            if (!_flash && _do_flash)
164
                scr_draw_outline_ext
scr_draw_outline_ext

function scr_draw_outline_ext(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { gpu_set_fog(true, arg7, 0, 0); var __xdirA = arg9; var __xdirB = 0; var __ydirA = 0; var __ydirB = arg9; if ((arg6 % 90) != 0) { __xdirA = lengthdir_x(arg9, arg6); __xdirB = lengthdir_x(arg9, arg6 + 90); __ydirA = lengthdir_y(arg9, arg6 + 90); __ydirB = lengthdir_y(arg9, arg6); } draw_sprite_ext(arg0, arg1, arg2 + __xdirA, arg3 + __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirA, arg3 - __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 + __xdirB, arg3 + __ydirB, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirB, arg3 - __ydirB, arg4, arg5, arg6, c_white, arg8); gpu_set_fog(false, c_white, 0, 0); }
(spr_thrashweapon_sword, 0, headx, heady, s, s, image_angle, c_white, rim_flash, 2);
165
            draw_sprite_ext_glow(spr_thrashweapon_sword, 0, headx, heady, s, s, headangle + image_angle, color[1], a, override_color);
166
        }
167
        if (part[1] == 2)
168
        {
169
            var _pieceVector = scr_rotatevector
scr_rotatevector

function scr_rotatevector(arg0, arg1, arg2) { var _tempVector = { x: arg0, y: arg1 }; if (arg2 == 0) return _tempVector; var _dir = point_direction(0, 0, arg0, arg1); var _len = point_distance(0, 0, arg0, arg1); _tempVector.x = lengthdir_x(_len, _dir + arg2); _tempVector.y = lengthdir_y(_len, _dir + arg2); return _tempVector; }
(-s * 4, (5 * s) + (s * walkc * 2), image_angle);
170
            headx = xx + _pieceVector.x;
171
            heady = yy + _pieceVector.y;
172
            _headsprite = spr_thrashweapon_flame_flash;
173
            if (!_flash && _do_flash)
174
                scr_draw_outline_ext
scr_draw_outline_ext

function scr_draw_outline_ext(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { gpu_set_fog(true, arg7, 0, 0); var __xdirA = arg9; var __xdirB = 0; var __ydirA = 0; var __ydirB = arg9; if ((arg6 % 90) != 0) { __xdirA = lengthdir_x(arg9, arg6); __xdirB = lengthdir_x(arg9, arg6 + 90); __ydirA = lengthdir_y(arg9, arg6 + 90); __ydirB = lengthdir_y(arg9, arg6); } draw_sprite_ext(arg0, arg1, arg2 + __xdirA, arg3 + __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirA, arg3 - __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 + __xdirB, arg3 + __ydirB, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirB, arg3 - __ydirB, arg4, arg5, arg6, c_white, arg8); gpu_set_fog(false, c_white, 0, 0); }
(spr_thrashweapon_flame, 0, headx, heady, s, s, image_angle, c_white, rim_flash, 2);
175
            draw_sprite_ext_glow(spr_thrashweapon_flame, 0, headx, heady, s, s, headangle + image_angle, color[1], a, override_color);
176
        }
177
        if (part[1] == 3)
178
        {
179
            var _pieceVector = scr_rotatevector
scr_rotatevector

function scr_rotatevector(arg0, arg1, arg2) { var _tempVector = { x: arg0, y: arg1 }; if (arg2 == 0) return _tempVector; var _dir = point_direction(0, 0, arg0, arg1); var _len = point_distance(0, 0, arg0, arg1); _tempVector.x = lengthdir_x(_len, _dir + arg2); _tempVector.y = lengthdir_y(_len, _dir + arg2); return _tempVector; }
(-8 * s, (3 * s) + (s * walkc * 2), image_angle);
180
            headx = xx + _pieceVector.x;
181
            heady = yy + _pieceVector.y;
182
            _headsprite = spr_thrashweapon_duck_flash;
183
            if (!_flash && _do_flash)
184
                scr_draw_outline_ext
scr_draw_outline_ext

function scr_draw_outline_ext(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { gpu_set_fog(true, arg7, 0, 0); var __xdirA = arg9; var __xdirB = 0; var __ydirA = 0; var __ydirB = arg9; if ((arg6 % 90) != 0) { __xdirA = lengthdir_x(arg9, arg6); __xdirB = lengthdir_x(arg9, arg6 + 90); __ydirA = lengthdir_y(arg9, arg6 + 90); __ydirB = lengthdir_y(arg9, arg6); } draw_sprite_ext(arg0, arg1, arg2 + __xdirA, arg3 + __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirA, arg3 - __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 + __xdirB, arg3 + __ydirB, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirB, arg3 - __ydirB, arg4, arg5, arg6, c_white, arg8); gpu_set_fog(false, c_white, 0, 0); }
(spr_thrashweapon_duck, 0, headx, heady, s, s, image_angle, c_white, rim_flash, 2);
185
            draw_sprite_ext_glow(spr_thrashweapon_duck, 0, headx, heady, s, s, headangle + image_angle, color[1], a, override_color);
186
        }
187
        if (_flash)
188
        {
189
            draw_set_blend_mode(bm_add);
190
            draw_sprite_ext_glow(_headsprite, 0, headx, heady, s, s, image_angle, merge_color(color[1], c_white, 0.5), rim_flash);
191
        }
192
    }
193
    else
194
    {
195
        if (part[1] == 0)
196
        {
197
            headx = xx - (8 * s);
198
            heady = yy + (6 * s) + (s * walkc * 2);
199
            draw_sprite_ext_glow(spr_thrashweapon_laser_b, 0, xx - (8 * s), yy + (6 * s) + (s * walkc * 2), s / 2, s / 2, headangle, color[1], a, override_color);
200
        }
201
        if (part[1] == 1)
202
        {
203
            headx = xx - (10 * s);
204
            heady = yy + (6 * s) + (s * walkc * 2);
205
            draw_sprite_ext_glow(spr_thrashweapon_sword_b, 0, xx - (10 * s), yy + (6 * s) + (s * walkc * 2), s / 2, s / 2, headangle, color[1], a, override_color);
206
        }
207
        if (part[1] == 2)
208
        {
209
            headx = xx - (s * 4);
210
            heady = yy + (5 * s) + (s * walkc * 2);
211
            draw_sprite_ext_glow(spr_thrashweapon_flame_b, 0, xx - (s * 4), yy + (5 * s) + (s * walkc * 2), s / 2, s / 2, headangle, color[1], a, override_color);
212
        }
213
        if (part[1] == 3)
214
        {
215
            headx = xx - (8 * s);
216
            heady = yy + (3 * s) + (s * walkc * 2);
217
            draw_sprite_ext_glow(spr_thrashweapon_duck, 0, xx - (8 * s), yy + (3 * s) + (s * walkc * 2), s, s, headangle, color[1], a, override_color);
218
        }
219
    }
220
}
221
for (loop = 0; loop < 2; loop += 1)
222
{
223
    if (loop == 0)
224
    {
225
        draw_set_blend_mode(bm_normal);
226
        color[0] = basecolor;
227
        color[1] = basecolor;
228
        color[2] = basecolor;
229
    }
230
    if (loop == 1)
231
    {
232
        draw_set_blend_mode(bm_add);
233
        color[0] = dcolor[0];
234
        color[1] = dcolor[1];
235
        color[2] = dcolor[2];
236
    }
237
    _flash = rim_flash > 0 && loop == 1;
238
    walka = sin(wsiner / 6);
239
    walkb = cos(wsiner / 6);
240
    if (walkb >= 0 && laststep < 0)
241
        stomp = 1;
242
    else if (walkb <= 0 && laststep > 0)
243
        stomp = -1;
244
    laststep = walkb;
245
    if (moving == 1 && part[2] == 0 && walkb <= 0)
246
        walkb *= 3;
247
    if (bad == 0)
248
    {
249
        var _bottom = 6;
250
        var _thrash_image, _pieceVector;
251
        if (part[2] == 0)
252
        {
253
            _pieceVector = scr_rotatevector
scr_rotatevector

function scr_rotatevector(arg0, arg1, arg2) { var _tempVector = { x: arg0, y: arg1 }; if (arg2 == 0) return _tempVector; var _dir = point_direction(0, 0, arg0, arg1); var _len = point_distance(0, 0, arg0, arg1); _tempVector.x = lengthdir_x(_len, _dir + arg2); _tempVector.y = lengthdir_y(_len, _dir + arg2); return _tempVector; }
((-5 * s) + (s * walka * 2), (20 * s) + (s * walkb * 1), image_angle);
254
            _thrash_image = 0;
255
            _bottom = 4;
256
            if (!drawfeet)
257
                draw_sprite_part_ext_glow(spr_thrashfoot, 0, 0, 0, 34, 4, (xx - (5 * s)) + (s * walka * 2), yy + (20 * s) + (s * walkb * 1), s, s, color[2], a, override_color);
258
            else
259
                draw_sprite_ext_glow(spr_thrashfoot, 0, xx + _pieceVector.x, yy + _pieceVector.y, s, s, image_angle, color[2], a, override_color);
260
        }
261
        if (part[2] == 1)
262
        {
263
            _pieceVector = scr_rotatevector
scr_rotatevector

function scr_rotatevector(arg0, arg1, arg2) { var _tempVector = { x: arg0, y: arg1 }; if (arg2 == 0) return _tempVector; var _dir = point_direction(0, 0, arg0, arg1); var _len = point_distance(0, 0, arg0, arg1); _tempVector.x = lengthdir_x(_len, _dir + arg2); _tempVector.y = lengthdir_y(_len, _dir + arg2); return _tempVector; }
(s * walka * 2, (18 * s) + (s * walkb * 1), image_angle);
264
            _thrash_image = 1;
265
            if (!drawfeet)
266
                draw_sprite_part_ext_glow(spr_thrashfoot, 1, 0, 0, 34, 6, xx + (s * walka * 2), yy + (18 * s) + (s * walkb * 1), s, s, color[2], a, override_color);
267
            else
268
                draw_sprite_ext_glow(spr_thrashfoot, 1, xx + _pieceVector.x, yy + _pieceVector.y, s, s, image_angle, color[2], a, override_color);
269
        }
270
        if (part[2] == 2)
271
        {
272
            _pieceVector = scr_rotatevector
scr_rotatevector

function scr_rotatevector(arg0, arg1, arg2) { var _tempVector = { x: arg0, y: arg1 }; if (arg2 == 0) return _tempVector; var _dir = point_direction(0, 0, arg0, arg1); var _len = point_distance(0, 0, arg0, arg1); _tempVector.x = lengthdir_x(_len, _dir + arg2); _tempVector.y = lengthdir_y(_len, _dir + arg2); return _tempVector; }
(-15 * s, 18 * s, image_angle);
273
            _thrash_image = 2;
274
            if (!drawfeet)
275
                draw_sprite_part_ext_glow(spr_thrashfoot, 2, 0, 0, 34, 6, xx - (15 * s), yy + (18 * s), s, s, color[2], a, override_color);
276
            else
277
                draw_sprite_ext_glow(spr_thrashfoot, 2, xx + _pieceVector.x, yy + _pieceVector.y, s, s, image_angle, color[2], a, override_color);
278
        }
279
        if (part[2] == 3)
280
        {
281
            walka = sin(wsiner / 6);
282
            walkb = cos(wsiner / 6);
283
            _pieceVector = scr_rotatevector
scr_rotatevector

function scr_rotatevector(arg0, arg1, arg2) { var _tempVector = { x: arg0, y: arg1 }; if (arg2 == 0) return _tempVector; var _dir = point_direction(0, 0, arg0, arg1); var _len = point_distance(0, 0, arg0, arg1); _tempVector.x = lengthdir_x(_len, _dir + arg2); _tempVector.y = lengthdir_y(_len, _dir + arg2); return _tempVector; }
(s * walka * 2, (22 * s) + (s * walkb * 1), image_angle);
284
            _thrash_image = 3;
285
            _bottom = 2;
286
            if (!drawfeet)
287
                draw_sprite_part_ext_glow(spr_thrashfoot, 3, 0, 0, 34, 2, xx + (s * walka * 2), yy + (22 * s) + (s * walkb * 1), s, s, color[2], a, override_color);
288
            else
289
                draw_sprite_ext_glow(spr_thrashfoot, 3, xx + _pieceVector.x, yy + _pieceVector.y, s, s, image_angle, color[2], a, override_color);
290
        }
291
        if (_flash)
292
        {
293
            draw_set_blend_mode(bm_add);
294
            if (!drawfeet)
295
                draw_sprite_part_ext(spr_thrashfoot_flash, _thrash_image, 0, 0, 34, _bottom, xx + _pieceVector.x, yy + _pieceVector.y, s, s, merge_color(color[2], c_white, 0.5), rim_flash);
296
            else
297
                draw_sprite_ext(spr_thrashfoot_flash, _thrash_image, xx + _pieceVector.x, yy + _pieceVector.y, s, s, image_angle, merge_color(color[2], c_white, 0.5), rim_flash);
298
        }
299
    }
300
    else
301
    {
302
        if (part[2] == 0)
303
            draw_sprite_ext_glow(spr_thrashfoot_b, 0, (xx - (5 * s)) + (s * walka * 2), yy + (20 * s) + (s * walkb * 1), s / 2, s / 2, 0, color[2], a, override_color);
304
        if (part[2] == 1)
305
            draw_sprite_ext_glow(spr_thrashfoot_b, 1, xx + (s * walka * 2), yy + (18 * s) + (s * walkb * 1), s / 2, s / 2, 0, color[2], a, override_color);
306
        if (part[2] == 2)
307
            draw_sprite_ext_glow(spr_thrashfoot_b, 2, xx - (15 * s), yy + (18 * s), s / 2, s / 2, 0, color[2], a, override_color);
308
        if (part[2] == 3)
309
        {
310
            walka = sin(wsiner / 6);
311
            walkb = cos(wsiner / 6);
312
            draw_sprite_ext_glow(spr_thrashfoot, 3, xx + (s * walka * 2), yy + (22 * s) + (s * walkb * 1), s, s, 0, color[2], a, override_color);
313
        }
314
    }
315
}
316
draw_set_blend_mode(bm_normal);
317
if ((image_angle % 360) != 0)
318
{
319
    xx = _x2;
320
    yy = _y2;
321
}
322
if (dbselect == 1)
323
{
324
    if (keyboard_check_pressed(vk_right))
325
    {
326
        part[0] += 1;
327
        if (part[0] >= 4)
328
            part[0] = 0;
329
    }
330
    if (keyboard_check_pressed(vk_up))
331
    {
332
        part[1] += 1;
333
        if (part[1] >= 4)
334
            part[1] = 0;
335
    }
336
    if (keyboard_check_pressed(vk_shift))
337
    {
338
        part[2] += 1;
339
        if (part[2] >= 4)
340
            part[2] = 0;
341
    }
342
    if (keyboard_check(vk_space))
343
    {
344
        dcolor[0] = make_color_hsv(wsiner * 2, 255, 255);
345
        dcolor[1] = make_color_hsv(wsiner, 255, 255);
346
        dcolor[2] = make_color_hsv(wsiner / 2, 255, 255);
347
    }
348
    if (keyboard_check_pressed(vk_enter))
349
    {
350
        s += 1;
351
        if (s >= 5)
352
            s = 1;
353
    }
354
}