image_index = 0; if (!surface_exists(glasssurf)) glasssurf = surface_create(sprite_width + 40, sprite_height + 40); var xx = x; var yy = y; var xs = image_xscale; var ys = image_yscale; var ia = image_angle; surface_set_target(glasssurf); draw_clear_alpha(c_black, 0); var surfw = surface_get_width(glasssurf); var surfh = surface_get_height(glasssurf); x = 0.5 * surfw; y = 0.5 * surfh; image_xscale = 1; image_yscale = 1; image_angle = 0; if (auraalph > 0) scr_draw_outline(1, 8421504, auraalph); event_inherited(); shader_replace_simple_set_hook(10); shader_set_uniform_f(__grayscalefade, clamp01(hp / __max_hp)); image_index = 1; image_alpha = left_lens_opacity * imagealpha; draw_self(); if (lefthp < (30 - (10 * simple))) draw_sprite_ext(spr_fsethglasses_cracks_l, 0, 0.5 * surfw, 0.5 * surfh, 1, 1, 0, c_white, imagealpha); image_index = 2; image_alpha = right_lens_opacity * imagealpha; draw_self(); if (righthp < (30 - (10 * simple))) draw_sprite_ext(spr_fsethglasses_cracks_r, 0, 0.5 * surfw, 0.5 * surfh, 1, 1, 0, c_white, imagealpha); shader_replace_simple_reset_hook(); image_alpha = imagealpha; image_index = 0; surface_reset_target(); x = xx; y = yy; image_xscale = xs; image_yscale = ys; image_angle = ia; xx = (x - lengthdir_x(surfw, image_angle)) + lengthdir_y(surfh, image_angle); yy = y - lengthdir_y(surfw, image_angle) - lengthdir_x(surfh, image_angle); draw_surface_ext(glasssurf, xx, yy, image_xscale, image_yscale, image_angle, image_blend, image_alpha); if (auraalph >= 0) { var t = current_time * 0.035; shader_replace_simple_set_hook(18); shader_set_uniform_f(u_alpha, auraalph); shader_set_uniform_f(u_patternangle, 50); shader_set_uniform_f(u_patterncount, 0.1); shader_set_uniform_f(u_time, 0.033 * t, 0.333 + (0.333 * t), 0.666 + (0.333 * t)); shader_set_uniform_f(u_holoangle, 0); gpu_set_blendmode(bm_add); var blend = image_blend; ia = image_alpha; image_blend = c_white; image_alpha = 0.7; draw_surface_ext(glasssurf, xx, yy, image_xscale, image_yscale, image_angle, image_blend, image_alpha); image_alpha = ia; image_blend = blend; gpu_set_blendmode(bm_normal); shader_replace_simple_reset_hook(); } if (remaining_combo > 0) scr_plat_draw_dizzy_effects(remaining_combo, remaining_combo_max);