1 |
if (part[2] >= 0) |
2 |
wsiner += 0.8; |
3 |
if (animate == 0) |
4 |
{ |
5 |
siner = 0; |
6 |
wsiner = 0; |
7 |
} |
8 |
walkc = cos(wsiner / 3); |
9 |
for (loop = 0; loop < 2; loop += 1) |
10 |
{ |
11 |
if (loop == 0) |
12 |
{ |
13 |
draw_set_blend_mode(bm_normal); |
14 |
color[0] = basecolor; |
15 |
color[1] = basecolor; |
16 |
color[2] = basecolor; |
17 |
} |
18 |
if (loop == 1) |
19 |
{ |
20 |
draw_set_blend_mode(bm_add); |
21 |
color[0] = dcolor[0]; |
22 |
color[1] = dcolor[1]; |
23 |
color[2] = dcolor[2]; |
24 |
} |
25 |
walka = -sin(wsiner / 6); |
26 |
walkb = -cos(wsiner / 6); |
27 |
if (bad == 0) |
28 |
{ |
29 |
if (part[2] == 0) |
30 |
draw_sprite_ext(spr_thrashfoot, 0, (xx - (11 * s)) + (s * walka * 2), yy + (19 * s) + (s * walkb * 1), s, s, 0, color[2], a); |
31 |
if (part[2] == 1) |
32 |
draw_sprite_ext(spr_thrashfoot, 1, (xx - (6 * s)) + (s * walka * 2), yy + (17 * s) + (s * walkb * 1), s, s, 0, color[2], a); |
33 |
if (part[2] == 3) |
34 |
draw_sprite_ext(spr_thrashfoot, 4, (xx - (8 * s)) + (s * walka * 2), yy + (21 * s) + (s * walkb * 1), s, s, 0, color[2], a); |
35 |
} |
36 |
else |
37 |
{ |
38 |
if (part[2] == 0) |
39 |
draw_sprite_ext(scr_84_get_sprite("spr_thrashfoot_b"), 0, (xx - (11 * s)) + (s * walka * 2), yy + (19 * s) + (s * walkb * 1), s / 2, s / 2, 0, color[2], a); |
40 |
if (part[2] == 1) |
41 |
draw_sprite_ext(scr_84_get_sprite("spr_thrashfoot_b"), 1, (xx - (6 * s)) + (s * walka * 2), yy + (17 * s) + (s * walkb * 1), s / 2, s / 2, 0, color[2], a); |
42 |
if (part[2] == 3) |
43 |
draw_sprite_ext(scr_84_get_sprite("spr_thrashfoot_b"), 4, (xx - (8 * s)) + (s * walka * 2), yy + (21 * s) + (s * walkb * 1), s / 2, s / 2, 0, color[2], a); |
44 |
} |
45 |
} |
46 |
if (part[0] >= 0) |
47 |
{ |
48 |
for (loop = 0; loop < 2; loop += 1) |
49 |
{ |
50 |
if (loop == 0) |
51 |
{ |
52 |
draw_set_blend_mode(bm_normal); |
53 |
color[0] = basecolor; |
54 |
color[1] = basecolor; |
55 |
color[2] = basecolor; |
56 |
} |
57 |
if (loop == 1) |
58 |
{ |
59 |
draw_set_blend_mode(bm_add); |
60 |
color[0] = dcolor[0]; |
61 |
color[1] = dcolor[1]; |
62 |
color[2] = dcolor[2]; |
63 |
} |
64 |
if (bad == 0) |
65 |
draw_sprite_ext(spr_thrashbody, part[0], xx, yy + (s * walkc), s, s, 0, color[0], a); |
66 |
if (bad == 1) |
67 |
draw_sprite_ext(scr_84_get_sprite("spr_thrashbody_b"), part[0], xx, yy + (s * walkc), s / 2, s / 2, 0, color[0], a); |
68 |
} |
69 |
} |
70 |
for (loop = 0; loop < 2; loop += 1) |
71 |
{ |
72 |
if (loop == 0) |
73 |
{ |
74 |
draw_set_blend_mode(bm_normal); |
75 |
color[0] = basecolor; |
76 |
color[1] = basecolor; |
77 |
color[2] = basecolor; |
78 |
} |
79 |
if (loop == 1) |
80 |
{ |
81 |
draw_set_blend_mode(bm_add); |
82 |
color[0] = dcolor[0]; |
83 |
color[1] = dcolor[1]; |
84 |
color[2] = dcolor[2]; |
85 |
} |
86 |
if (bad == 0) |
87 |
{ |
88 |
if (part[1] == 0) |
89 |
draw_sprite_ext(spr_thrashweapon_laser, 0, xx - (8 * s), yy + (6 * s) + (s * walkc * 2), s, s, 0, color[1], a); |
90 |
if (part[1] == 1) |
91 |
draw_sprite_ext(spr_thrashweapon_sword, 0, xx - (10 * s), yy + (6 * s) + (s * walkc * 2), s, s, 0, color[1], a); |
92 |
if (part[1] == 2) |
93 |
draw_sprite_ext(spr_thrashweapon_flame, 0, xx - (s * 4), yy + (5 * s) + (s * walkc * 2), s, s, 0, color[1], a); |
94 |
if (part[1] == 3) |
95 |
draw_sprite_ext(spr_thrashweapon_duck, 0, xx - (8 * s), yy + (3 * s) + (s * walkc * 2), s, s, 0, color[1], a); |
96 |
} |
97 |
else |
98 |
{ |
99 |
if (part[1] == 0) |
100 |
draw_sprite_ext(spr_thrashweapon_laser_b, 0, xx - (8 * s), yy + (6 * s) + (s * walkc * 2), s / 2, s / 2, 0, color[1], a); |
101 |
if (part[1] == 1) |
102 |
draw_sprite_ext(spr_thrashweapon_sword_b, 0, xx - (10 * s), yy + (6 * s) + (s * walkc * 2), s / 2, s / 2, 0, color[1], a); |
103 |
if (part[1] == 2) |
104 |
draw_sprite_ext(spr_thrashweapon_flame_b, 0, xx - (s * 4), yy + (5 * s) + (s * walkc * 2), s / 2, s / 2, 0, color[1], a); |
105 |
if (part[1] == 3) |
106 |
draw_sprite_ext(spr_thrashweapon_duck, 0, xx - (8 * s), yy + (3 * s) + (s * walkc * 2), s, s, 0, color[1], a); |
107 |
} |
108 |
} |
109 |
for (loop = 0; loop < 2; loop += 1) |
110 |
{ |
111 |
if (loop == 0) |
112 |
{ |
113 |
draw_set_blend_mode(bm_normal); |
114 |
color[0] = basecolor; |
115 |
color[1] = basecolor; |
116 |
color[2] = basecolor; |
117 |
} |
118 |
if (loop == 1) |
119 |
{ |
120 |
draw_set_blend_mode(bm_add); |
121 |
color[0] = dcolor[0]; |
122 |
color[1] = dcolor[1]; |
123 |
color[2] = dcolor[2]; |
124 |
} |
125 |
walka = sin(wsiner / 6); |
126 |
walkb = cos(wsiner / 6); |
127 |
if (bad == 0) |
128 |
{ |
129 |
if (part[2] == 0) |
130 |
draw_sprite_ext(spr_thrashfoot, 0, (xx - (5 * s)) + (s * walka * 2), yy + (20 * s) + (s * walkb * 1), s, s, 0, color[2], a); |
131 |
if (part[2] == 1) |
132 |
draw_sprite_ext(spr_thrashfoot, 1, xx + (s * walka * 2), yy + (18 * s) + (s * walkb * 1), s, s, 0, color[2], a); |
133 |
if (part[2] == 2) |
134 |
draw_sprite_ext(spr_thrashfoot, 2, xx - (15 * s), yy + (18 * s), s, s, 0, color[2], a); |
135 |
if (part[2] == 3) |
136 |
{ |
137 |
walka = sin(wsiner / 6); |
138 |
walkb = cos(wsiner / 6); |
139 |
draw_sprite_ext(spr_thrashfoot, 3, xx + (s * walka * 2), yy + (22 * s) + (s * walkb * 1), s, s, 0, color[2], a); |
140 |
} |
141 |
} |
142 |
else |
143 |
{ |
144 |
if (part[2] == 0) |
145 |
draw_sprite_ext(scr_84_get_sprite("spr_thrashfoot_b"), 0, (xx - (5 * s)) + (s * walka * 2), yy + (20 * s) + (s * walkb * 1), s / 2, s / 2, 0, color[2], a); |
146 |
if (part[2] == 1) |
147 |
draw_sprite_ext(scr_84_get_sprite("spr_thrashfoot_b"), 1, xx + (s * walka * 2), yy + (18 * s) + (s * walkb * 1), s / 2, s / 2, 0, color[2], a); |
148 |
if (part[2] == 2) |
149 |
draw_sprite_ext(scr_84_get_sprite("spr_thrashfoot_b"), 2, xx - (15 * s), yy + (18 * s), s / 2, s / 2, 0, color[2], a); |
150 |
if (part[2] == 3) |
151 |
{ |
152 |
walka = sin(wsiner / 6); |
153 |
walkb = cos(wsiner / 6); |
154 |
draw_sprite_ext(spr_thrashfoot, 3, xx + (s * walka * 2), yy + (22 * s) + (s * walkb * 1), s, s, 0, color[2], a); |
155 |
} |
156 |
} |
157 |
} |
158 |
draw_set_blend_mode(bm_normal); |
159 |
if (dbselect == 1) |
160 |
{ |
161 |
if (keyboard_check_pressed(vk_right)) |
162 |
{ |
163 |
part[0] += 1; |
164 |
if (part[0] >= 4) |
165 |
part[0] = 0; |
166 |
} |
167 |
if (keyboard_check_pressed(vk_up)) |
168 |
{ |
169 |
part[1] += 1; |
170 |
if (part[1] >= 4) |
171 |
part[1] = 0; |
172 |
} |
173 |
if (keyboard_check_pressed(vk_shift)) |
174 |
{ |
175 |
part[2] += 1; |
176 |
if (part[2] >= 4) |
177 |
part[2] = 0; |
178 |
} |
179 |
if (keyboard_check(vk_space)) |
180 |
{ |
181 |
dcolor[0] = make_color_hsv(wsiner * 2, 255, 255); |
182 |
dcolor[1] = make_color_hsv(wsiner, 255, 255); |
183 |
dcolor[2] = make_color_hsv(wsiner / 2, 255, 255); |
184 |
} |
185 |
if (keyboard_check_pressed(vk_enter)) |
186 |
{ |
187 |
s += 1; |
188 |
if (s >= 5) |
189 |
s = 1; |
190 |
} |
191 |
} |