|
ORTS
|
#include <Random.H>
Public Member Functions | |
| Random () | |
| Random (uint4 seed) | |
| void | srand (uint4) |
| void | lsrand (uint4[], sint4) |
| uint4 | rand_uint4 () |
| real8 | rand_real8 () |
| uint4 | ranged_uint4 (uint4 minimum, uint4 maximum) |
| uint4 | ranged_sint4 (sint4 minimum, sint4 maximum) |
| uint4 | operator() (uint4 n) |
Private Attributes | |
| uint4 | mt [N] |
| sint4 | mti |
Static Private Attributes | |
| static const sint4 | N = 624 |
| static const sint4 | M = 397 |
| static const uint4 | MATRIX_A = 0x9908b0dfUL |
| static const uint4 | UPPER_MASK = 0x80000000UL |
| static const uint4 | LOWER_MASK = 0x7fffffffUL |
Definition at line 23 of file Random.H.
References assert(), and rand_uint4().
| uint4 Random::rand_uint4 | ( | ) |
Definition at line 117 of file Random.C.
References ERR, LOWER_MASK, M, MATRIX_A, mt, mti, N, and UPPER_MASK.
Referenced by Commander::Commander(), QueueAction::eval(), RandomNode::eval(), ScoutCommander::exec(), Mapgen::generate_basecamp_map(), MapTool::generate_debug_map(), MapTool::generate_frano_map(), MapTool::generate_game3_map(), MapTool::generate_game4_map(), MapTool::generate_game_tiles(), MapTool::generate_island_map(), MapTool::generate_marine_map(), MapTool::generate_maze_map(), Mapgen::generate_obstacle_map(), MapTool::generate_random_cliff_map(), MapTool::generate_random_map(), MapTool::generate_simple_map(), MapTool::generate_skirmish_map(), MapTool::generate_std_map(), GfxTerrainTile::init(), main(), StdRandSrc::operator()(), operator()(), MapTool::place_object(), MapTool::place_players(), populate_resource_loc(), populate_resource_loc_gas(), MapTool::raise_island(), rand_loc(), MapTool::read_height_map(), Game::script_close_to(), Game::script_eval(), Decomp::test(), and Commander::update().
Definition at line 175 of file Random.C.
References ERR, and max_uint4.
Referenced by GatherCommander::moveRandomly().
| void Random::srand | ( | uint4 | s | ) |
Definition at line 61 of file Random.C.
References max_uint4, mt, mti, and N.
Referenced by BSimul::BuildTasksState::BuildTasksState(), Commander::Commander(), Game::Game(), Mapgen::generate_basecamp_map(), MapTool::generate_debug_map(), MapTool::generate_frano_map(), MapTool::generate_island_map(), MapTool::generate_marine_map(), MapTool::generate_maze_map(), Mapgen::generate_obstacle_map(), MapTool::generate_random_cliff_map(), MapTool::generate_random_map(), MapTool::generate_simple_map(), MapTool::init_map_data(), init_rand(), GfxModule::load(), main(), MapTool::place_players(), MapTool::raise_island(), Random(), MapTool::read_height_map(), SampleEventHandler::SampleEventHandler(), StdRandSrc::StdRandSrc(), and UniRandSrc::UniRandSrc().
const uint4 Random::LOWER_MASK = 0x7fffffffUL [static, private] |
const uint4 Random::MATRIX_A = 0x9908b0dfUL [static, private] |
uint4 Random::mt[N] [private] |
sint4 Random::mti [private] |
const uint4 Random::UPPER_MASK = 0x80000000UL [static, private] |