|
1
|
draw_set_color(c_white);
|
|
2
|
if (!surface_exists(surface))
|
|
3
|
surface = surface_create(max_width * 2 * surface_scale, height * surface_scale);
|
|
4
|
surface_set_target(surface);
|
|
5
|
draw_clear_alpha(c_black, 0);
|
|
6
|
var _part_height = (height * surface_scale) / parts;
|
|
7
|
gpu_set_tex_repeat(true);
|
|
8
|
draw_primitive_begin_texture(pr_trianglestrip, sprite_get_texture(spr_whirl_texture3, 0));
|
|
9
|
for (var _p = 0; _p <= parts; _p++)
|
|
10
|
{
|
|
11
|
var _percent = _p / (parts - 1);
|
|
12
|
var _pwidth = lerp(min_width, max_width, _percent) * surface_scale;
|
|
13
|
var _px = (max_width * surface_scale) + (sin((current_time / (1000 / wave_speed)) + (_percent * wave_length * pi * 2)) * (_pwidth * 0.1));
|
|
14
|
var _py = (height * surface_scale) - (_p * _part_height);
|
|
15
|
var _yy = (power(1.5 - _percent, 1.5) * 2) + whirl_yoffset;
|
|
16
|
draw_vertex_texture_color(_px - (_pwidth / 2), _py, whirl_xoffset - 0.25, _yy, c_white, 1);
|
|
17
|
draw_vertex_texture_color(_px + (_pwidth / 2), _py, whirl_xoffset + 0.25, _yy, c_white, 1);
|
|
18
|
}
|
|
19
|
draw_primitive_end();
|
|
20
|
surface_reset_target();
|
|
21
|
gpu_set_blendmode(bm_add);
|
|
22
|
draw_surface_ext(surface, x - max_width, y - height, 1 / surface_scale, 1 / surface_scale, 0, #9E7FFF, image_alpha * 0.6);
|
|
23
|
draw_surface_ext(surface, x - (max_width * 1), (y - height) + 4, 1 / surface_scale, 1 / surface_scale, 0, #7FC2FF, image_alpha * 0.6);
|
|
24
|
gpu_set_blendmode(bm_normal);
|