aboutsummaryrefslogtreecommitdiff
path: root/Plugins/noize.c
blob: 148fc3c06127e808661a41b817be957fe3f5b70a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include "plugin.h"

INFO("turn some random bits")

void perform_effect(struct frame f, struct args a)
{
	int i,o,x,y;
	byte bits = f.pixelformat/8;

	o=(f.width*f.height)/10;
	for(i=0; i<o; i++)
	{
		x=rand()%(f.width);
		y=rand()%(f.height);
		f.bits[y*f.lpitch+x*bits+1]=rand()%(256);
	}
}

void perform_copy(struct frame f1, struct frame f2, struct args a)
{
	printf("Using noize as copy operation does nothing!\n");
}