|
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
|
if (crushedObj > 0)
|
|
8
|
{
|
|
9
|
if (crushedObj == 1)
|
|
10
|
{
|
|
11
|
var emailColor = active ? blend_color : 16777215;
|
|
12
|
if (hp > 0)
|
|
13
|
draw_sprite_ext(spr_spamton_dollar, 0, x, y, 1, hp - 1, 0, emailColor, 1);
|
|
14
|
}
|
|
15
|
else
|
|
16
|
{
|
|
17
|
var bombflash = crushtimer > 10 && (crushtimer % 2) == 0;
|
|
18
|
if (bombflash)
|
|
19
|
d3d_set_fog(true, c_white, 0, 1);
|
|
20
|
var bomb_color = merge_color(c_red, c_orange, 0.25 + (sin(flashsiner / 3) * 0.25));
|
|
21
|
draw_sprite_ext(spr_sneo_bomb, 0, x, y, 1, 1, 0, bomb_color, 1);
|
|
22
|
if (bombflash)
|
|
23
|
d3d_set_fog(false, c_black, 0, 0);
|
|
24
|
}
|
|
25
|
}
|
|
26
|
else
|
|
27
|
{
|
|
28
|
draw_sprite(spr_spamton_dollar, 0, x, y);
|
|
29
|
}
|
|
30
|
if (crushtimer >= 10 && offset == offsetCap && offset > 0)
|
|
31
|
offset++;
|
|
32
|
else if (offset < offsetCap)
|
|
33
|
offset = offsetCap;
|
|
34
|
drawcolor = c_white;
|
|
35
|
}
|
|
36
|
if (offset <= offsetCap)
|
|
37
|
{
|
|
38
|
if (offset == 0)
|
|
39
|
drawcolor = blend_color;
|
|
40
|
animtimer++;
|
|
41
|
if (animtimer > 1)
|
|
42
|
{
|
|
43
|
animtimer = 0;
|
|
44
|
subindex = (subindex + 1) % 4;
|
|
45
|
}
|
|
46
|
}
|
|
47
|
var s = image_xscale;
|
|
48
|
var destroycrop = destroying - 60;
|
|
49
|
var bottomcrop = y - 326;
|
|
50
|
if ((destroycrop <= 0 && difficulty != 3 && difficulty != 5) || (destroycrop <= -45 && difficulty == 3) || (destroycrop <= -45 && difficulty == 5))
|
|
51
|
{
|
|
52
|
draw_sprite_ext(spr_sneo_pillar_thick, 0, x, y - 32 - offset, s, 16, 0, image_blend, 1);
|
|
53
|
draw_sprite_ext(spr_sneo_pillar_thick, 0, x, 326, s, clamp((326 - (y + 32 + offset)) / 16, 0, 16), 0, image_blend, 1);
|
|
54
|
draw_sprite_ext(spr_sneo_pillar_piston, 0, x, y - offset, s, s, 0, image_blend, 1);
|
|
55
|
if ((y + offset) < 310)
|
|
56
|
draw_sprite_ext(spr_sneo_pillar_piston, 0, x, y + offset, s, -s, 0, image_blend, 1);
|
|
57
|
if (flash)
|
|
58
|
d3d_set_fog(true, image_blend, 0, 1);
|
|
59
|
draw_sprite_ext(spr_sneo_pillar_head_top, subindex, x, y - offset, s, s, 0, drawcolor, 1);
|
|
60
|
if ((y + offset) < 326)
|
|
61
|
draw_sprite_ext(spr_sneo_pillar_head_bottom, subindex, x, y + offset, s, s, 0, drawcolor, 1);
|
|
62
|
if (flash)
|
|
63
|
{
|
|
64
|
d3d_set_fog(false, c_black, 0, 0);
|
|
65
|
flash = 0;
|
|
66
|
}
|
|
67
|
}
|
|
68
|
else
|
|
69
|
{
|
|
70
|
if (destroycrop < 36)
|
|
71
|
{
|
|
72
|
scr_draw_sprite_crop_extscr_draw_sprite_crop_ext
function scr_draw_sprite_crop_ext(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11)
{
var _sprite_xoffset = sprite_get_xoffset(arg0);
var _sprite_yoffset = sprite_get_yoffset(arg0);
var _sprite_width = sprite_get_width(arg0) * arg8;
var _sprite_height = sprite_get_height(arg0) * arg9;
var _true_xanchor = x - (abs(_sprite_xoffset) * arg8);
var _true_yanchor = y - (abs(_sprite_yoffset) * arg9);
if (_true_xanchor > arg2 && (_true_xanchor + _sprite_width) < arg4 && _true_yanchor > arg3 && (_true_yanchor + _sprite_height) < arg5)
{
draw_sprite_ext(arg0, arg1, arg6, arg7, arg8, arg9, 0, arg10, arg11);
exit;
}
var _leftcrop = clamp(arg2 - _true_xanchor, 0, abs(_sprite_width));
var _topcrop = clamp(arg3 - _true_yanchor, 0, abs(_sprite_height));
var _rightcrop = clamp(arg4 - _true_xanchor, 0, abs(_sprite_width));
var _bottomcrop = clamp(arg5 - _true_yanchor, 0, abs(_sprite_height));
draw_sprite_part_ext(arg0, arg1, _leftcrop, _topcrop, _rightcrop, _bottomcrop, (arg6 - _sprite_xoffset) + _leftcrop, (arg7 - _sprite_yoffset) + _topcrop, arg8, arg9, arg10, arg11);
} (spr_sneo_pillar_piston, 0, 0, 0, 32, 16 - (destroycrop / 2), x, y - offset, s, s, image_blend, 1);
|
|
73
|
scr_draw_sprite_crop_extscr_draw_sprite_crop_ext
function scr_draw_sprite_crop_ext(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11)
{
var _sprite_xoffset = sprite_get_xoffset(arg0);
var _sprite_yoffset = sprite_get_yoffset(arg0);
var _sprite_width = sprite_get_width(arg0) * arg8;
var _sprite_height = sprite_get_height(arg0) * arg9;
var _true_xanchor = x - (abs(_sprite_xoffset) * arg8);
var _true_yanchor = y - (abs(_sprite_yoffset) * arg9);
if (_true_xanchor > arg2 && (_true_xanchor + _sprite_width) < arg4 && _true_yanchor > arg3 && (_true_yanchor + _sprite_height) < arg5)
{
draw_sprite_ext(arg0, arg1, arg6, arg7, arg8, arg9, 0, arg10, arg11);
exit;
}
var _leftcrop = clamp(arg2 - _true_xanchor, 0, abs(_sprite_width));
var _topcrop = clamp(arg3 - _true_yanchor, 0, abs(_sprite_height));
var _rightcrop = clamp(arg4 - _true_xanchor, 0, abs(_sprite_width));
var _bottomcrop = clamp(arg5 - _true_yanchor, 0, abs(_sprite_height));
draw_sprite_part_ext(arg0, arg1, _leftcrop, _topcrop, _rightcrop, _bottomcrop, (arg6 - _sprite_xoffset) + _leftcrop, (arg7 - _sprite_yoffset) + _topcrop, arg8, arg9, arg10, arg11);
} (spr_sneo_pillar_piston, 0, 0, 0, 32, 16 - (destroycrop / 2), x, y + offset, s, -s, image_blend, 1);
|
|
74
|
scr_draw_sprite_crop_extscr_draw_sprite_crop_ext
function scr_draw_sprite_crop_ext(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11)
{
var _sprite_xoffset = sprite_get_xoffset(arg0);
var _sprite_yoffset = sprite_get_yoffset(arg0);
var _sprite_width = sprite_get_width(arg0) * arg8;
var _sprite_height = sprite_get_height(arg0) * arg9;
var _true_xanchor = x - (abs(_sprite_xoffset) * arg8);
var _true_yanchor = y - (abs(_sprite_yoffset) * arg9);
if (_true_xanchor > arg2 && (_true_xanchor + _sprite_width) < arg4 && _true_yanchor > arg3 && (_true_yanchor + _sprite_height) < arg5)
{
draw_sprite_ext(arg0, arg1, arg6, arg7, arg8, arg9, 0, arg10, arg11);
exit;
}
var _leftcrop = clamp(arg2 - _true_xanchor, 0, abs(_sprite_width));
var _topcrop = clamp(arg3 - _true_yanchor, 0, abs(_sprite_height));
var _rightcrop = clamp(arg4 - _true_xanchor, 0, abs(_sprite_width));
var _bottomcrop = clamp(arg5 - _true_yanchor, 0, abs(_sprite_height));
draw_sprite_part_ext(arg0, arg1, _leftcrop, _topcrop, _rightcrop, _bottomcrop, (arg6 - _sprite_xoffset) + _leftcrop, (arg7 - _sprite_yoffset) + _topcrop, arg8, arg9, arg10, arg11);
} (spr_sneo_pillar_head_top, 2, 0, 0, 1, 18 - (destroycrop / 2), x, y - offset, s, s, image_blend, 1);
|
|
75
|
scr_draw_sprite_crop_extscr_draw_sprite_crop_ext
function scr_draw_sprite_crop_ext(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11)
{
var _sprite_xoffset = sprite_get_xoffset(arg0);
var _sprite_yoffset = sprite_get_yoffset(arg0);
var _sprite_width = sprite_get_width(arg0) * arg8;
var _sprite_height = sprite_get_height(arg0) * arg9;
var _true_xanchor = x - (abs(_sprite_xoffset) * arg8);
var _true_yanchor = y - (abs(_sprite_yoffset) * arg9);
if (_true_xanchor > arg2 && (_true_xanchor + _sprite_width) < arg4 && _true_yanchor > arg3 && (_true_yanchor + _sprite_height) < arg5)
{
draw_sprite_ext(arg0, arg1, arg6, arg7, arg8, arg9, 0, arg10, arg11);
exit;
}
var _leftcrop = clamp(arg2 - _true_xanchor, 0, abs(_sprite_width));
var _topcrop = clamp(arg3 - _true_yanchor, 0, abs(_sprite_height));
var _rightcrop = clamp(arg4 - _true_xanchor, 0, abs(_sprite_width));
var _bottomcrop = clamp(arg5 - _true_yanchor, 0, abs(_sprite_height));
draw_sprite_part_ext(arg0, arg1, _leftcrop, _topcrop, _rightcrop, _bottomcrop, (arg6 - _sprite_xoffset) + _leftcrop, (arg7 - _sprite_yoffset) + _topcrop, arg8, arg9, arg10, arg11);
} (spr_sneo_pillar_head_bottom, 2, 0, destroycrop / 2, 1, 18, x, y - offset, s, s, image_blend, 1);
|
|
76
|
}
|
|
77
|
draw_sprite_ext(spr_sneo_pillar_thick, 0, x, 326, s, clamp((326 - (y + 32 + destroycrop)) / 16, 0, 16), 0, image_blend, 1);
|
|
78
|
draw_sprite_ext(spr_sneo_pillar_thick, 0, x, y - 32 - destroycrop, s, 16, 0, image_blend, 1);
|
|
79
|
}
|
|
80
|
if ((destroying > 0 && difficulty != 3 && difficulty != 5) || (destroying > 0 && destroying < 30 && difficulty == 3) || (destroying > 0 && destroying < 30 && difficulty == 5))
|
|
81
|
{
|
|
82
|
var d = instance_create(x + random_range(-10, 10), y + destroying, obj_animation_dx);
|
|
83
|
d.sprite_index = spr_thrash_missile_explosion;
|
|
84
|
d.depth = depth - 1;
|
|
85
|
if ((y + destroying) > (cameray() + 280))
|
|
86
|
d.depth = obj_heart.depth + 100;
|
|
87
|
d.image_angle = 180;
|
|
88
|
d = instance_create(x + random_range(-10, 10), y - destroying, obj_animation_dx);
|
|
89
|
d.sprite_index = spr_thrash_missile_explosion;
|
|
90
|
d.depth = depth - 1;
|
|
91
|
if ((y - destroying) > (cameray() + 280))
|
|
92
|
d.depth = obj_heart.depth + 100;
|
|
93
|
if (crushedObj == 2)
|
|
94
|
{
|
|
95
|
d = instance_create(x + (destroying * 2), y + random_range(-10, 10), obj_animation_dx);
|
|
96
|
d.sprite_index = spr_thrash_missile_explosion;
|
|
97
|
d.depth = depth - 1;
|
|
98
|
d.image_angle = -90;
|
|
99
|
d = instance_create(x - (destroying * 3), y + random_range(-10, 10), obj_animation_dx);
|
|
100
|
d.sprite_index = spr_thrash_missile_explosion;
|
|
101
|
d.depth = depth - 1;
|
|
102
|
d.image_angle = 90;
|
|
103
|
}
|
|
104
|
}
|