projects
/
bootsplash
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
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
+++ b/
lutgen/lutgen.c
@@ -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;
+}