aboutsummaryrefslogtreecommitdiff
path: root/Plugins/plot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins/plot.cpp')
-rw-r--r--Plugins/plot.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/Plugins/plot.cpp b/Plugins/plot.cpp
new file mode 100644
index 0000000..67c264c
--- /dev/null
+++ b/Plugins/plot.cpp
@@ -0,0 +1,25 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "plugin.h"
+#include "pixels.h"
+
+// plot exists to provide plotting to vframe - much faster than
+// plot with fs.draw which goes thru network.
+
+void perform_effect(_frame f, _args a)
+{
+ if(!a.s) return;
+
+ char *t=strstr(a.s, " ");
+ if(!t) return;
+
+ t[0]=0;
+
+ int x=atoi(a.s);
+ int y=atoi(t+1);
+
+ pixels p(f);
+ p.moveto(x, y);
+ p.putrgb(255, 255, 255);
+}