diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2013-11-15 19:59:19 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2013-11-15 19:59:19 +0100 |
| commit | 5d4a70f81d1896ede119e0dfe42392c4506a2a34 (patch) | |
| tree | 3107dfb277c97421d91b5b94f397c93f1a2f359e /calc.c | |
| parent | 677385ffdd1e330cfba4dd712ca58595feeea41d (diff) | |
| download | fx-maze-5d4a70f81d1896ede119e0dfe42392c4506a2a34.tar.gz fx-maze-5d4a70f81d1896ede119e0dfe42392c4506a2a34.zip | |
added comments
Diffstat (limited to 'calc.c')
| -rw-r--r-- | calc.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2,8 +2,10 @@ #include "calc.h"
#include "syscalls.h"
+// table that holds precalculated values for the floor and ceiling
int TDist[64];
+// random number generator; could be improved
static uint lastrandom = 0x123456;
void seedrandom(void)
@@ -17,6 +19,7 @@ unsigned int random() return (lastrandom >> 16);
}
+// inits constants for floor etc
void table()
{
int x;
@@ -26,6 +29,7 @@ void table() }
}
+// fills an array
void fill(uint *ptr, uint element, uint arraysize)
{
for(;arraysize > 0; arraysize--, ptr++)
|
