1function blend(arg)
2	arguments = arg
3	local bgsurf = fill_surface(VRESW, VRESH, 32, 64, 96);
4	show_image(bgsurf);
5	local bnorm  = fill_surface(64, 64, 255, 0, 0);
6	local bforce = fill_surface(64, 64, 255, 0, 0);
7	local bmult  = fill_surface(64, 64, 255, 0, 0);
8	local badd   = fill_surface(64, 64, 255, 0, 0);
9	move_image(bforce, 64, 0);
10	move_image(bmult, 64, 64);
11	move_image(badd, 0, 64);
12	move_image(bnorm, 0, 0);
13	force_image_blend(bnorm, BLEND_NORMAL);
14	force_image_blend(badd, BLEND_ADD);
15	force_image_blend(bmult, BLEND_MULTIPLY);
16	force_image_blend(bforce, BLEND_FORCE);
17	blend_image({bnorm, badd, bmult, bforce}, 0.5);
18end
19
20clock = 0;
21function blend_clock_pulse()
22	clock = clock + 1;
23	if (clock == 25) then
24		save_screenshot(arguments[1]);
25		return shutdown();
26	end
27end
28