From 85d5e43cd4856dd3d14fefd450a0606666b6dc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20Vehvil=C3=A4inen?= Date: Tue, 9 Jul 2002 12:16:46 +0000 Subject: added PixelPack002 svn path=/trunk/Framestein/; revision=29 --- Plugins/makefile | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- Plugins/plugin.h | 17 +++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/Plugins/makefile b/Plugins/makefile index e899fe2..198a611 100644 --- a/Plugins/makefile +++ b/Plugins/makefile @@ -1,4 +1,9 @@ -all: noize colortv subtract xbend bend gol shuffle green tile rgbcopy copyvert black rgb hist setbits xshred sonogram vf2fs fs2vf swap 2colors plot makesliders +all: noize colortv subtract xbend bend gol shuffle green \ + tile rgbcopy copyvert black rgb hist setbits xshred \ + sonogram vf2fs fs2vf swap 2colors plot makesliders \ + convolution compare darken deinterlace difference interlace lighten \ + multiply overlay screen shadowcaster softlight + dir *.dll # FLAGS: @@ -80,3 +85,47 @@ plot: makesliders: cl makesliders.c $(FLAGS) /link $(EFFECT) copy makesliders.dll ms.dll + +# +# PixelPack by Olaf Matthes +# + +convolution: + cl convolution.c $(FLAGS) /link $(EFFECT) + +compare: + cl compare.c $(FLAGS) /link $(COPY) + +darken: + cl darken.c $(FLAGS) /link $(COPY) + +deinterlace: + cl deinterlace.c $(FLAGS) /link $(EFFECT) + +difference: + cl difference.c $(FLAGS) /link $(COPY) + +interlace: + cl interlace.c $(FLAGS) /link $(COPY) + +lighten: + cl lighten.c $(FLAGS) /link $(COPY) + +multiply: + cl multiply.c $(FLAGS) /link $(COPY) + +overlay: + cl overlay.c $(FLAGS) /link $(COPY) + +screen: + cl screen.c $(FLAGS) /link $(COPY) + +shadowcaster: + cl shadowcaster.c $(FLAGS) /link $(BOTH) + +softlight: + cl softlight.c $(FLAGS) /link $(COPY) + +# +# +# diff --git a/Plugins/plugin.h b/Plugins/plugin.h index 00d3514..00281e5 100644 --- a/Plugins/plugin.h +++ b/Plugins/plugin.h @@ -116,4 +116,21 @@ __inline pixel32 rgbtocolor32(byte r, byte g, byte b) return (b << 16) | (g << 8) | r; } +// restrict input to be 0..255 +__inline byte klamp255(long in) +{ + byte out = in<0 ? 0 : in; + out = 255 +__inline byte klamp601(long in) +{ + byte out = in<16 ? 16 : in; + out = 235