diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-12-25 04:59:14 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-12-25 04:59:14 +0000 |
commit | 7232ac8416bc30a093500a3bdf5d908be3273d76 (patch) | |
tree | b54669a95f05fd80ac5886d1560c7e2fd2b3f590 /src/post/goom/goom_tools.h | |
parent | 024d463a3cfed56ab3db964488a8dd9dbf7bf1d4 (diff) | |
download | xine-lib-7232ac8416bc30a093500a3bdf5d908be3273d76.tar.gz xine-lib-7232ac8416bc30a093500a3bdf5d908be3273d76.tar.bz2 |
What a GOOM!
Michael, please review the xine_goom.c code. i'm not sure about some
post plugin concepts like "rewiring"...
note: that code is quite cpu intensive, so i hardcoded it to 10fps.
CVS patchset: 3673
CVS date: 2002/12/25 04:59:14
Diffstat (limited to 'src/post/goom/goom_tools.h')
-rw-r--r-- | src/post/goom/goom_tools.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/post/goom/goom_tools.h b/src/post/goom/goom_tools.h new file mode 100644 index 000000000..d077c0cba --- /dev/null +++ b/src/post/goom/goom_tools.h @@ -0,0 +1,29 @@ +#ifndef _GOOMTOOLS_H +#define _GOOMTOOLS_H + +#define NB_RAND 0x10000 + +/* in graphic.c */ +extern int * rand_tab ; +extern unsigned short rand_pos ; + +#define RAND_INIT(i) \ + srand (i) ;\ + if (!rand_tab)\ + rand_tab = (int *) malloc (NB_RAND * sizeof(int)) ;\ + rand_pos = 1 ;\ + while (rand_pos != 0)\ + rand_tab [rand_pos++] = rand () ; + +#define RAND()\ + (rand_tab[rand_pos = rand_pos + 1]) + +#define RAND_CLOSE()\ + free (rand_tab);\ + rand_tab = 0; + + +//#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) +#define iRAND(i) (RAND()%i) + +#endif |