works nicely from the floppy
[bootsplash] / lutgen / lutgen.c
1 #include <stdio.h>
2 #include <math.h>
3
4 int main(void)
5 {
6         int i;
7
8         printf("sintab:\n");
9         for(i=0; i<256; i++) {
10                 float x = sin((float)i / 128.0f * M_PI);
11                 printf("\tdb %d\n", (int)(x * 127.5f - 0.5f));
12         }
13         return 0;
14 }