1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

drawing range updater update and myrand() (but not usage of it)

This commit is contained in:
Perttu Ahola 2010-12-26 13:33:20 +02:00
parent 582af0cb21
commit 4ba5cd580d
8 changed files with 131 additions and 107 deletions

View file

@ -88,4 +88,18 @@ const v3s16 g_26dirs[26] =
// 26
};
static unsigned long next = 1;
/* RAND_MAX assumed to be 32767 */
int myrand(void)
{
next = next * 1103515245 + 12345;
return((unsigned)(next/65536) % 32768);
}
void mysrand(unsigned seed)
{
next = seed;
}