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:
parent
582af0cb21
commit
4ba5cd580d
8 changed files with 131 additions and 107 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue