projects
/
retrobench
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
dos: stop logger and write fps to the console before exiting
[retrobench]
/
tools
/
lutgen.c
1
#include <stdio.h>
2
#include <math.h>
3
4
int main(void)
5
{
6
int i;
7
8
puts("\t.data");
9
puts("\t.globl _sinlut");
10
puts("\t.globl sinlut");
11
puts("_sinlut:");
12
puts("sinlut:");
13
for(i=0; i<1024; i++) {
14
float x = sin((float)i / 512.0f * M_PI);
15
printf("\t.long %d\n", (int)(x * 65536.0f));
16
}
17
return 0;
18
}