aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornathansmith117 <nathansmith117@sdf.org>2025-02-04 11:29:07 +0000
committernathansmith117 <nathansmith117@sdf.org>2025-02-04 11:29:07 +0000
commitfe9b718f8978cfd792f7303214b2dd45172b8d4b (patch)
tree8efd867eae12ad5d55d29e964272974ee3d71b18 /test
parentfb7ccc0c046ed80fdac2e829b8c367841600e211 (diff)
downloadsldj-fe9b718f8978cfd792f7303214b2dd45172b8d4b.tar.gz
sldj-fe9b718f8978cfd792f7303214b2dd45172b8d4b.tar.bz2
sldj-fe9b718f8978cfd792f7303214b2dd45172b8d4b.zip
Working on script context
Diffstat (limited to 'test')
-rw-r--r--test/scanTest1.c9
-rw-r--r--test/scanTest2.c12
2 files changed, 14 insertions, 7 deletions
diff --git a/test/scanTest1.c b/test/scanTest1.c
index ac67115..19d78b5 100644
--- a/test/scanTest1.c
+++ b/test/scanTest1.c
@@ -3,19 +3,14 @@
#include <stdlib.h>
#include <math.h>
-typedef struct Color {
- unsigned char r;
- unsigned char g;
- unsigned char b;
- unsigned char a;
-} Color;
+#include "libsldj/util.h"
Color lineScanner(uint16_t x, uint16_t y, uint32_t frameNumber)
{
uint8_t c = 0;
uint8_t scale = random() % 2 + 7;
- if (frameNumber % 1024 >= 512)
+ if (frameNumber % 1024 >= 600)
{
uint8_t section = frameNumber % 300;
diff --git a/test/scanTest2.c b/test/scanTest2.c
new file mode 100644
index 0000000..40c82fe
--- /dev/null
+++ b/test/scanTest2.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <math.h>
+
+#include "libsldj/util.h"
+
+Color lineScanner(uint16_t x, uint16_t y, uint32_t frameNumber)
+{
+ return (Color){.r = x % 100 == 1 ? 255 : 0, .g = 0, .b = 0, .a = 255};
+}
+