OpenTTD Source: src/core/random_func.cpp File Reference

OpenTTD Source 13.2.1

Functions | Variables
random_func.cpp File Reference
`#include "../stdafx.h"`
`#include "random_func.hpp"`
`#include "bitmath_func.hpp"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Functions
void | SetRandomSeed (uint32 seed)
| (Re)set the state of the random number generators. More...

## Variables
Randomizer | _random
| Random used in the game state calculations.
Randomizer | _interactive_random
| Random used everywhere else, where it does not (directly) influence the game state.

## Detailed Description

Implementation of the pseudo random generator.

Definition in file random_func.cpp.

## Function Documentation

## ◆ SetRandomSeed()

void SetRandomSeed | ( | uint32 | seed | ) |

(Re)set the state of the random number generators.

Parameters

  seed | the new state

Definition at line 65 of file random_func.cpp.

References _interactive_random, _random, and Randomizer::SetSeed().

Referenced by StartupOneEngine().