#include <C4Scenario.h>
Public Member Functions | |
C4SVal (int32_t std=0, int32_t rnd=0, int32_t min=0, int32_t max=100) | |
void | Default () |
void | Set (int32_t std=0, int32_t rnd=0, int32_t min=0, int32_t max=100) |
void | SetConstant (int32_t val) |
int32_t | Evaluate () |
void | CompileFunc (StdCompiler *pComp) |
bool | operator== (const C4SVal &rhs) const |
Public Attributes | |
int32_t | Std |
int32_t | Rnd |
int32_t | Min |
int32_t | Max |
Definition at line 26 of file C4Scenario.h.
C4SVal::C4SVal | ( | int32_t | std = 0 , |
int32_t | rnd = 0 , |
||
int32_t | min = 0 , |
||
int32_t | max = 100 |
||
) |
Definition at line 31 of file C4Scenario.cpp.
void C4SVal::CompileFunc | ( | StdCompiler * | pComp | ) |
Definition at line 60 of file C4Scenario.cpp.
References Max, Min, mkDefaultAdapt(), Rnd, StdCompiler::Separator(), Std, and StdCompiler::Value().
void C4SVal::Default | ( | ) |
Definition at line 55 of file C4Scenario.cpp.
References Set().
Referenced by C4SLandscape::Default().
int32_t C4SVal::Evaluate | ( | ) |
Definition at line 50 of file C4Scenario.cpp.
References Max, Min, Random(), Rnd, and Std.
Referenced by C4MapCreator::Create(), C4Weather::Execute(), C4SLandscape::GetMapSize(), C4Weather::Init(), C4Game::InitInEarth(), C4Game::InitVegetation(), C4Landscape::ScenarioInit(), and C4Player::ScenarioInit().
|
inline |
void C4SVal::Set | ( | int32_t | std = 0 , |
int32_t | rnd = 0 , |
||
int32_t | min = 0 , |
||
int32_t | max = 100 |
||
) |
Definition at line 36 of file C4Scenario.cpp.
References Max, Min, Rnd, and Std.
Referenced by c4_mapgen_handle_new(), c4_mapgen_handle_new_script(), Default(), C4SPlrStart::Default(), C4SLandscape::Default(), C4SWeather::Default(), and C4Landscape::DrawMap().
void C4SVal::SetConstant | ( | int32_t | val | ) |
int32_t C4SVal::Max |
Definition at line 31 of file C4Scenario.h.
Referenced by CompileFunc(), Evaluate(), C4Weather::Execute(), C4SLandscape::GetMapSize(), C4Landscape::Init(), operator==(), Set(), and SetConstant().
int32_t C4SVal::Min |
Definition at line 31 of file C4Scenario.h.
Referenced by CompileFunc(), Evaluate(), C4Weather::Execute(), operator==(), Set(), and SetConstant().
int32_t C4SVal::Rnd |
Definition at line 31 of file C4Scenario.h.
Referenced by CompileFunc(), Evaluate(), operator==(), Set(), and SetConstant().
int32_t C4SVal::Std |
Definition at line 31 of file C4Scenario.h.
Referenced by CompileFunc(), Evaluate(), operator==(), Set(), and SetConstant().