#include <stdbool.h>
#include "game_core.h"
#include "game_log.h"
Go to the source code of this file.
◆ check_seed()
| bool check_seed |
( |
char | buffer[PATH_SEED_BUFSIZE] | ) |
|
Checks the passed buffer as a seed.
Only chars >= 0, <= Z; not including the symbols between digits and letters. Notably, the passed buffer is checked by applying toupper() to each char.
- Parameters
-
| buffer | The buffer to check. |
- Returns
- True for a valid seed.
◆ gen_random_seed()
| void gen_random_seed |
( |
char | buffer[PATH_SEED_BUFSIZE+1] | ) |
|
Sets the passed buffer up to be a random seed.
Only chars >= 0, <= Z; not including the symbols between digits and letters.
- Parameters
-
◆ hlpd_hash()
| unsigned long hlpd_hash |
( |
unsigned char * | str | ) |
|
◆ hlpd_rand()
◆ hlpd_rand_docount()
| int hlpd_rand_docount |
( |
bool | count | ) |
|
Wraps over rand() to update G_RNG_ADVANCEMENTS if passed flag is true.
- See also
- G_RNG_ADVANCEMENTS
-
rand()
- Parameters
-
| count | When true, advance G_RNG_ADVANCEMENTS. |
- Returns
- A random integer from rand().