new version
authorTobias Girstmair <tobi@isticktoit.net>
Thu, 4 Mar 2021 00:01:13 +0000 (01:01 +0100)
committerTobias Girstmair <tobi@isticktoit.net>
Thu, 4 Mar 2021 00:01:13 +0000 (01:01 +0100)
bsv.c

diff --git a/bsv.c b/bsv.c
index fff89f3e5d5bd2ee32bfd39e7e4f9bc3f4923a1e..f42eff621a82271d2d097e7033870d613931ad66 100644 (file)
--- a/bsv.c
+++ b/bsv.c
@@ -24,18 +24,31 @@ void main(void){
                u8 sample;
                u8 n = i2<<2 | i1>>6;
                u8 s = i3<<7 | i2>>1;
+
                sample = g(1,n,12);
-               { u8 tmp = n^i>>13;
+
+               { u8 tmp;
+                 tmp = i2<<3 | i1>>5;
+                 tmp ^= n;
                sample += g(s,tmp,10);
                } //tmp
+
                { u8 tmp1 = s/3;
-                 u8 tmp2 = n+((i>>11)%3);
+                 u8 tmp2;
+                 tmp2 = (i>>11)%3;
+                 tmp2 += n;
                sample += g(tmp1,tmp2,10);
                } //tmp1, tmp2
+
                { u8 tmp1 = s/5;
-                 u8 tmp2 = 8+n-((i>>10)%3);
+                 u8 tmp2 = n;
+                 { u8 tmp3 = (i>>10)%3;
+                   tmp2 -= tmp3;
+                 } // tmp3
+                 tmp2 += 8;
                sample += g(tmp1,tmp2,9);
                } //tmp1, tmp2
+
                putchar(sample<<4);
 
                i++;
Imprint / Impressum