#include <weatherarea.h>
Public Member Functions | |
| WeatherSystem (GameMap *map) | |
| WeatherSystem (GameMap *map, int areaSpawns, float windspeed2FieldRatio, unsigned int timeInterval=6, WeatherSystemMode mode=EVENTMODE, FalloutType defaultFallout=DRY) | |
| ~WeatherSystem () | |
| void | setSeedValue () |
| void | setLikelihoodFallOut (const Percentages &fol) throw (IllegalValueException) |
| void | setLikelihoodWindDirection (const Percentages &wd) throw (IllegalValueException) |
| void | setLikelihoodWindSpeed (const Percentages &wd) throw (IllegalValueException) |
| void | setRandomSizeBorders (float lower, float upper) |
| void | setGlobalWind (unsigned int speed, Direction direction) throw (IllegalValueException) |
| void | setDefaultFallout (FalloutType newFalloutType) |
| void | addWeatherArea (WeatherArea *area, GameTime time) |
| void | removeWeatherArea (GameTime time, WeatherArea *area) |
| void | removeWindChange (int time, WindData) |
| void | addGlobalWindChange (int speed, Direction direction, int time) throw (IllegalValueException) |
| void | update () |
| void | write (tnstream &outputStream) const |
| void | read (tnstream &inputStream) |
| pair< GameTime, WeatherArea * > | getNthWeatherArea (int n) const |
| const WeatherArea * | getNthActiveWeatherArea (int n) const |
| pair< int, WindData > | getNthWindChange (int n) const |
| const int | getQueuedWeatherAreasSize () const |
| const int | getActiveWeatherAreasSize () const |
| const int | getQueuedWindChangesSize () const |
| void | setSeedValueGeneration (bool setNew) |
| unsigned int | createRandomValue (unsigned int limit=1000) |
| void | skipRandomValue () const |
| FalloutType | getDefaultFalloutType () const |
| int | getCurrentWindSpeed () const |
| Direction | getCurrentWindDirection () const |
| int | getMaxForecast () const |
| bool | isSeedValueSet () |
| int | getSpawnsAmount () |
| void | setEventMode (const WeatherSystemMode &mode) |
| int | getTimeInterval () |
| void | setTimeInterval (int i) |
| void | setWindSpeed2FieldRatio (float ratio) |
| void | setSpawnAmount (int a) |
| void | setLowerDurationLimit (int udl) |
| void | setUpperDurationLimit (int ldl) |
| const WeatherSystemMode | getEventMode () const |
| float | getWindspeed2FieldRatio () const |
| const int | getFalloutPercentage (int i) const |
| const int | getWindSpeedPercentage (int i) const |
| const int | getWindDirPercentage (int i) const |
| const float | getLowerSizeLimit () const |
| const float | getUpperSizeLimit () const |
| const int | getLowerDurationLimit () const |
| const int | getUpperDurationLimit () const |
| WindData | getWindDataOfTurn (int turn) const |
Static Public Attributes | |
| static const int | FallOutNum = 6 |
| static const int | WindDirNum = 6 |
| static const int | WINDSPEEDDETAILLEVEL = 8 |
| static int | legacyWindSpeed |
| static int | legacyWindDirection |
Definition at line 239 of file weatherarea.h.
| WeatherSystem::WeatherSystem | ( | GameMap * | map | ) |
| WeatherSystem::WeatherSystem | ( | GameMap * | map, | |
| int | areaSpawns, | |||
| float | windspeed2FieldRatio, | |||
| unsigned int | timeInterval = 6, |
|||
| WeatherSystemMode | mode = EVENTMODE, |
|||
| FalloutType | defaultFallout = DRY | |||
| ) |
Definition at line 450 of file weatherarea.cpp.
References FallOutNum, GameMap::newRound, setLikelihoodFallOut(), setLikelihoodWindDirection(), setLikelihoodWindSpeed(), update(), WindDirNum, and WINDSPEEDDETAILLEVEL.
| WeatherSystem::~WeatherSystem | ( | ) |
Definition at line 494 of file weatherarea.cpp.
| void WeatherSystem::setSeedValue | ( | ) | [inline] |
| void WeatherSystem::setLikelihoodFallOut | ( | const Percentages & | fol | ) | throw (IllegalValueException) |
| void WeatherSystem::setLikelihoodWindDirection | ( | const Percentages & | wd | ) | throw (IllegalValueException) |
| void WeatherSystem::setLikelihoodWindSpeed | ( | const Percentages & | wd | ) | throw (IllegalValueException) |
| void WeatherSystem::setRandomSizeBorders | ( | float | lower, | |
| float | upper | |||
| ) |
Definition at line 578 of file weatherarea.cpp.
| void WeatherSystem::setGlobalWind | ( | unsigned int | speed, | |
| Direction | direction | |||
| ) | throw (IllegalValueException) |
| void WeatherSystem::setDefaultFallout | ( | FalloutType | newFalloutType | ) |
Definition at line 589 of file weatherarea.cpp.
| void WeatherSystem::addWeatherArea | ( | WeatherArea * | area, | |
| GameTime | time | |||
| ) |
Definition at line 593 of file weatherarea.cpp.
| void WeatherSystem::removeWeatherArea | ( | GameTime | time, | |
| WeatherArea * | area | |||
| ) |
Definition at line 598 of file weatherarea.cpp.
| void WeatherSystem::removeWindChange | ( | int | time, | |
| WindData | ||||
| ) |
Definition at line 816 of file weatherarea.cpp.
| void WeatherSystem::addGlobalWindChange | ( | int | speed, | |
| Direction | direction, | |||
| int | time | |||
| ) | throw (IllegalValueException) |
Definition at line 810 of file weatherarea.cpp.
| void WeatherSystem::update | ( | ) |
Definition at line 728 of file weatherarea.cpp.
References GameTime::abstime, getWindspeed2FieldRatio(), isSeedValueSet(), RANDOMMODE, GameTime::set(), setGlobalWind(), setSeedValue(), GameMap::time, and GameTime::turn().
Referenced by WeatherSystem().
| void WeatherSystem::write | ( | tnstream & | outputStream | ) | const |
Definition at line 855 of file weatherarea.cpp.
References tnstream::writeFloat(), and tnstream::writeInt().
| void WeatherSystem::read | ( | tnstream & | inputStream | ) |
Definition at line 911 of file weatherarea.cpp.
References WindData::direction, move(), WeatherArea::read(), tnstream::readFloat(), tnstream::readInt(), GameTime::set(), skipRandomValue(), and WindData::speed.
| pair< GameTime, WeatherArea * > WeatherSystem::getNthWeatherArea | ( | int | n | ) | const |
Definition at line 502 of file weatherarea.cpp.
| const WeatherArea * WeatherSystem::getNthActiveWeatherArea | ( | int | n | ) | const |
Definition at line 514 of file weatherarea.cpp.
| pair< int, WindData > WeatherSystem::getNthWindChange | ( | int | n | ) | const |
Definition at line 826 of file weatherarea.cpp.
| const int WeatherSystem::getQueuedWeatherAreasSize | ( | ) | const |
Definition at line 527 of file weatherarea.cpp.
| const int WeatherSystem::getActiveWeatherAreasSize | ( | ) | const |
Definition at line 850 of file weatherarea.cpp.
| const int WeatherSystem::getQueuedWindChangesSize | ( | ) | const |
Definition at line 821 of file weatherarea.cpp.
| void WeatherSystem::setSeedValueGeneration | ( | bool | setNew | ) |
Definition at line 531 of file weatherarea.cpp.
| unsigned int WeatherSystem::createRandomValue | ( | unsigned int | limit = 1000 |
) |
Definition at line 794 of file weatherarea.cpp.
| void WeatherSystem::skipRandomValue | ( | ) | const |
| FalloutType WeatherSystem::getDefaultFalloutType | ( | ) | const [inline] |
Definition at line 325 of file weatherarea.h.
| int WeatherSystem::getCurrentWindSpeed | ( | ) | const [inline] |
| Direction WeatherSystem::getCurrentWindDirection | ( | ) | const [inline] |
| int WeatherSystem::getMaxForecast | ( | ) | const |
Definition at line 549 of file weatherarea.cpp.
| bool WeatherSystem::isSeedValueSet | ( | ) | [inline] |
| int WeatherSystem::getSpawnsAmount | ( | ) | [inline] |
Definition at line 342 of file weatherarea.h.
| void WeatherSystem::setEventMode | ( | const WeatherSystemMode & | mode | ) | [inline] |
Definition at line 346 of file weatherarea.h.
| int WeatherSystem::getTimeInterval | ( | ) | [inline] |
Definition at line 350 of file weatherarea.h.
| void WeatherSystem::setTimeInterval | ( | int | i | ) | [inline] |
Definition at line 354 of file weatherarea.h.
| void WeatherSystem::setWindSpeed2FieldRatio | ( | float | ratio | ) | [inline] |
Definition at line 358 of file weatherarea.h.
| void WeatherSystem::setSpawnAmount | ( | int | a | ) | [inline] |
Definition at line 362 of file weatherarea.h.
| void WeatherSystem::setLowerDurationLimit | ( | int | udl | ) | [inline] |
Definition at line 366 of file weatherarea.h.
| void WeatherSystem::setUpperDurationLimit | ( | int | ldl | ) | [inline] |
Definition at line 370 of file weatherarea.h.
| const WeatherSystemMode WeatherSystem::getEventMode | ( | ) | const [inline] |
Definition at line 374 of file weatherarea.h.
| float WeatherSystem::getWindspeed2FieldRatio | ( | ) | const [inline] |
| const int WeatherSystem::getFalloutPercentage | ( | int | i | ) | const [inline] |
Definition at line 380 of file weatherarea.h.
| const int WeatherSystem::getWindSpeedPercentage | ( | int | i | ) | const [inline] |
Definition at line 384 of file weatherarea.h.
| const int WeatherSystem::getWindDirPercentage | ( | int | i | ) | const [inline] |
Definition at line 388 of file weatherarea.h.
| const float WeatherSystem::getLowerSizeLimit | ( | ) | const [inline] |
Definition at line 392 of file weatherarea.h.
| const float WeatherSystem::getUpperSizeLimit | ( | ) | const [inline] |
Definition at line 396 of file weatherarea.h.
| const int WeatherSystem::getLowerDurationLimit | ( | ) | const [inline] |
Definition at line 400 of file weatherarea.h.
| const int WeatherSystem::getUpperDurationLimit | ( | ) | const [inline] |
Definition at line 404 of file weatherarea.h.
| WindData WeatherSystem::getWindDataOfTurn | ( | int | turn | ) | const |
Definition at line 712 of file weatherarea.cpp.
References WindData::direction, WindData::speed, GameMap::time, and GameTime::turn().
const int WeatherSystem::FallOutNum = 6 [static] |
const int WeatherSystem::WindDirNum = 6 [static] |
Definition at line 285 of file weatherarea.h.
Referenced by AddWindChangeDialog::AddWindChangeDialog(), and WeatherSystem().
const int WeatherSystem::WINDSPEEDDETAILLEVEL = 8 [static] |
Definition at line 286 of file weatherarea.h.
Referenced by WeatherSystem(), and WindSpeedSettingsDialog::WindSpeedSettingsDialog().
int WeatherSystem::legacyWindSpeed [static] |
Definition at line 292 of file weatherarea.h.
int WeatherSystem::legacyWindDirection [static] |
Definition at line 293 of file weatherarea.h.
1.5.1