Czyli poprawny kod powinien wyglądać tak (chodzi o 10 linijkę?)?
if (create_new_sprite == true)
{
surface_set_target(global.surface);
draw_sprite(sprite_background, 0, 0, 0);
draw_point_color(0, 479, c_white);
surface_reset_target();
sprite_assign(global.sprite, sprite_create_from_surface(global.surface, 0, 0, 640, 480, true, true, true, true, 0, 0));
create_new_sprite = false;
sprite_delete(global.surface);
}
draw_sprite(global.sprite, 0, 0, 0);
if (mouse_check_button(mb_left))
{
surface_set_target(global.surface);
draw_set_color(c_white);
draw_ellipse(mouse_x - 32, mouse_y - 32, mouse_x + 32, mouse_y + 32, false);
surface_reset_target();
sprite_assign(global.sprite, sprite_create_from_surface(global.surface, 0, 0, 640, 480, true, true, true, true, 0, 0));
}