works nicely from the floppy
[bootsplash] / lutgen / lutgen.c
diff --git a/lutgen/lutgen.c b/lutgen/lutgen.c
new file mode 100644 (file)
index 0000000..2e5bf27
--- /dev/null
@@ -0,0 +1,14 @@
+#include <stdio.h>
+#include <math.h>
+
+int main(void)
+{
+       int i;
+
+       printf("sintab:\n");
+       for(i=0; i<256; i++) {
+               float x = sin((float)i / 128.0f * M_PI);
+               printf("\tdb %d\n", (int)(x * 127.5f - 0.5f));
+       }
+       return 0;
+}