if (global.water) { if (global.detail_level >= 1 && (view_yview+view_hview)>=global.water_height) { // Check if we lost the surface if (!surface_exists(screen_surface)) screen_surface = surface_create(256, 256); // Capture the screen surface_set_target(screen_surface); global.capture = true; draw_clear_alpha(c_black, 0); // Clear surface screen_redraw(); // Call all redraw events global.capture = false; surface_reset_target(); // End with screen capture current_angle_x += angle_increment_x; current_angle_y += angle_increment_y; } }