aboutsummaryrefslogtreecommitdiff
path: root/Plugins/lightspeed.c
diff options
context:
space:
mode:
authorJuha Vehviläinen <jusu@users.sourceforge.net>2002-09-22 20:53:10 +0000
committerJuha Vehviläinen <jusu@users.sourceforge.net>2002-09-22 20:53:10 +0000
commit163a66302667158daef63e4a88a32002a5c1831a (patch)
tree3500e381fcdbada5db0cdcc7c8ad7b8967d4bcaa /Plugins/lightspeed.c
parent3bd43c9d18e565e193e555f9de0ce916f8faf807 (diff)
cleaned up compiler files (*.exp *.lib *.obj) from project / lightspeed-plugin
svn path=/trunk/Framestein/; revision=136
Diffstat (limited to 'Plugins/lightspeed.c')
-rw-r--r--Plugins/lightspeed.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/Plugins/lightspeed.c b/Plugins/lightspeed.c
new file mode 100644
index 0000000..ec342dd
--- /dev/null
+++ b/Plugins/lightspeed.c
@@ -0,0 +1,17 @@
+#include <stdlib.h>
+#include "plugin.h"
+
+void perform_effect(_frame f, _args a)
+{
+ int pos, y, pixelsize=f.pixelformat/8;
+
+ if(!a.s) pos = f.height / 2;
+ else pos = atoi(a.s);
+
+ if(pos<=0 || pos>=f.height) pos = f.height / 2;
+
+ for(y=pos; y>=0; y--)
+ {
+ memcpy(scanline(f, y), scanline(f, y+1), pixelsize*f.width);
+ }
+}