particle_data = []; particle_system_lifetime = -1; auto_cleanup = false; blend_mode = 0; shader = 0; u1_forceColor = shader_get_uniform(shd_forcecolour, "forceColour"); u2_grayscalefade = shader_get_uniform(shd_grayscale_fade, "fade"); shader2_greyscale_fade = 0; skip_fusuma = false; frames_between_emissions = 0; particles_per_emission = 1; emission_timer = 0; default_particle_data = { sprite_index: spr_pxwhite, hspeed: 0, vspeed: 0, gravity: 0, friction: 0, image_xscale: 2, image_yscale: 2, lifetime: 30, image_index: 0, image_angle: 0, image_speed: 0, image_blend: c_white, image_alpha: 1, fadeout_speed: 0, animation_mode: false, custom_data: 0 }; struct_variables = variable_struct_get_names(default_particle_data); variable_array_length = array_length(struct_variables); particle_step_func = function(arg0) { }; struct_init_map = ds_map_create(); emit = function(arg0 = undefined, arg1 = false) { if (arg0 == undefined) { arg0 = default_particle_data; } else if (!ds_map_exists(struct_init_map, arg0)) { if (!arg1) ds_map_add(struct_init_map, arg0, true); var names = array_length(struct_variables); for (var i = 0; i < names; i++) { if (!variable_struct_exists(arg0, struct_variables[i])) variable_struct_set(arg0, struct_variables[i], variable_struct_get(default_particle_data, struct_variables[i])); } } var new_data = { timer: 0, x: x, y: y }; var svar = array_length(struct_variables); for (var i = 0; i < svar; i++) variable_struct_set(new_data, struct_variables[i], variable_struct_get(arg0, struct_variables[i])); if (variable_struct_exists(arg0, "x_offset")) new_data.x += arg0.x_offset; if (variable_struct_exists(arg0, "y_offset")) new_data.y += arg0.y_offset; array_push(particle_data, new_data); };