1 |
flashsiner++; |
2 |
var blend_color = merge_color(#00A2E8, c_aqua, 0.25 + (sin(flashsiner / 3) * 0.25)); |
3 |
if (destroying == 0 && offset > 0) |
4 |
{ |
5 |
if (offset > offsetCap) |
6 |
offset -= 20; |
7 |
draw_sprite(spr_spamton_dollar, 0, x, y); |
8 |
if (crushtimer >= 10 && offset == offsetCap && offset > 0) |
9 |
offset++; |
10 |
else if (offset < offsetCap) |
11 |
offset = offsetCap; |
12 |
drawcolor = c_white; |
13 |
} |
14 |
if (offset <= offsetCap) |
15 |
{ |
16 |
if (offset == 0) |
17 |
drawcolor = blend_color; |
18 |
animtimer++; |
19 |
if (animtimer > 1) |
20 |
{ |
21 |
animtimer = 0; |
22 |
subindex = (subindex + 1) % 4; |
23 |
} |
24 |
} |
25 |
var s = image_xscale; |
26 |
draw_sprite_ext(spr_sneo_pillar_thick, 0, x, y - 32 - offset, s * -1, 16, 0, image_blend, 1); |
27 |
draw_sprite_ext(spr_sneo_pillar_thick, 0, x, 326, s, clamp((326 - (y + 32 + offset)) / 16, 0, 16), 0, image_blend, 1); |
28 |
draw_sprite_ext(spr_sneo_pillar_piston, 0, x, y - offset, s * -1, s, 0, image_blend, 1); |
29 |
if ((y + offset) < 310) |
30 |
draw_sprite_ext(spr_sneo_pillar_piston, 0, x, y + offset, s * -1, -s, 0, image_blend, 1); |
31 |
if (flash) |
32 |
d3d_set_fog(true, image_blend, 0, 1); |
33 |
draw_sprite_ext(spr_sneo_pillar_head_top, subindex, x, (y - offset) + 11, s * -1, s, 0, drawcolor, 1); |
34 |
if ((y + offset) < 326) |
35 |
draw_sprite_ext(spr_sneo_pillar_head_bottom, subindex, x, y + offset + 11, s * -1, s, 0, drawcolor, 1); |
36 |
if (flash) |
37 |
{ |
38 |
d3d_set_fog(false, c_black, 0, 0); |
39 |
flash = 0; |
40 |
} |