Advanced Strategic Command
Public Member Functions | Static Public Attributes | List of all members
WeatherSystem Class Reference

#include <weatherarea.h>

Inheritance diagram for WeatherSystem:
Inheritance graph
[legend]

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 WeatherAreagetNthActiveWeatherArea (int n) const
 
pair< int, WindDatagetNthWindChange (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 = 0
 
static int legacyWindDirection = 0
 

Detailed Description

Definition at line 239 of file weatherarea.h.

Constructor & Destructor Documentation

WeatherSystem::WeatherSystem ( GameMap map)

Definition at line 488 of file weatherarea.cpp.

References GameMap::newRound, and update().

WeatherSystem::WeatherSystem ( GameMap map,
int  areaSpawns,
float  windspeed2FieldRatio,
unsigned int  timeInterval = 6,
WeatherSystemMode  mode = EVENTMODE,
FalloutType  defaultFallout = DRY 
)
WeatherSystem::~WeatherSystem ( )

Definition at line 494 of file weatherarea.cpp.

Member Function Documentation

void WeatherSystem::addGlobalWindChange ( int  speed,
Direction  direction,
int  time 
)
throw (IllegalValueException
)

Definition at line 810 of file weatherarea.cpp.

void WeatherSystem::addWeatherArea ( WeatherArea area,
GameTime  time 
)

Definition at line 593 of file weatherarea.cpp.

unsigned int WeatherSystem::createRandomValue ( unsigned int  limit = 1000)

Definition at line 794 of file weatherarea.cpp.

const int WeatherSystem::getActiveWeatherAreasSize ( ) const

Definition at line 850 of file weatherarea.cpp.

Direction WeatherSystem::getCurrentWindDirection ( ) const
inline

Definition at line 333 of file weatherarea.h.

Referenced by WeatherPanel::WeatherPanel().

int WeatherSystem::getCurrentWindSpeed ( ) const
inline

Definition at line 329 of file weatherarea.h.

Referenced by WeatherPanel::WeatherPanel().

FalloutType WeatherSystem::getDefaultFalloutType ( ) const
inline

Definition at line 325 of file weatherarea.h.

const WeatherSystemMode WeatherSystem::getEventMode ( ) const
inline

Definition at line 374 of file weatherarea.h.

const int WeatherSystem::getFalloutPercentage ( int  i) const
inline

Definition at line 380 of file weatherarea.h.

const int WeatherSystem::getLowerDurationLimit ( ) const
inline

Definition at line 400 of file weatherarea.h.

const float WeatherSystem::getLowerSizeLimit ( ) const
inline

Definition at line 392 of file weatherarea.h.

int WeatherSystem::getMaxForecast ( ) const

Definition at line 549 of file weatherarea.cpp.

const WeatherArea * WeatherSystem::getNthActiveWeatherArea ( int  n) const

Definition at line 514 of file weatherarea.cpp.

pair< GameTime, WeatherArea * > WeatherSystem::getNthWeatherArea ( int  n) const

Definition at line 502 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::getQueuedWindChangesSize ( ) const

Definition at line 821 of file weatherarea.cpp.

int WeatherSystem::getSpawnsAmount ( )
inline

Definition at line 342 of file weatherarea.h.

int WeatherSystem::getTimeInterval ( )
inline

Definition at line 350 of file weatherarea.h.

const int WeatherSystem::getUpperDurationLimit ( ) const
inline

Definition at line 404 of file weatherarea.h.

const float WeatherSystem::getUpperSizeLimit ( ) const
inline

Definition at line 396 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::getWindDirPercentage ( int  i) const
inline

Definition at line 388 of file weatherarea.h.

float WeatherSystem::getWindspeed2FieldRatio ( ) const
inline

Definition at line 377 of file weatherarea.h.

Referenced by update().

const int WeatherSystem::getWindSpeedPercentage ( int  i) const
inline

Definition at line 384 of file weatherarea.h.

bool WeatherSystem::isSeedValueSet ( )
inline

Definition at line 339 of file weatherarea.h.

Referenced by update().

void WeatherSystem::read ( tnstream inputStream)
void WeatherSystem::removeWeatherArea ( GameTime  time,
WeatherArea area 
)

Definition at line 598 of file weatherarea.cpp.

void WeatherSystem::removeWindChange ( int  time,
WindData  data 
)

Definition at line 816 of file weatherarea.cpp.

void WeatherSystem::setDefaultFallout ( FalloutType  newFalloutType)

Definition at line 589 of file weatherarea.cpp.

void WeatherSystem::setEventMode ( const WeatherSystemMode mode)
inline

Definition at line 346 of file weatherarea.h.

void WeatherSystem::setGlobalWind ( unsigned int  speed,
Direction  direction 
)
throw (IllegalValueException
)

Definition at line 585 of file weatherarea.cpp.

Referenced by update().

void WeatherSystem::setLikelihoodFallOut ( const Percentages fol)
throw (IllegalValueException
)

Definition at line 534 of file weatherarea.cpp.

Referenced by WeatherSystem().

void WeatherSystem::setLikelihoodWindDirection ( const Percentages wd)
throw (IllegalValueException
)

Definition at line 553 of file weatherarea.cpp.

Referenced by WeatherSystem().

void WeatherSystem::setLikelihoodWindSpeed ( const Percentages wd)
throw (IllegalValueException
)

Definition at line 565 of file weatherarea.cpp.

Referenced by WeatherSystem().

void WeatherSystem::setLowerDurationLimit ( int  udl)
inline

Definition at line 366 of file weatherarea.h.

void WeatherSystem::setRandomSizeBorders ( float  lower,
float  upper 
)

Definition at line 578 of file weatherarea.cpp.

void WeatherSystem::setSeedValue ( )
inline

Definition at line 784 of file weatherarea.cpp.

Referenced by update().

void WeatherSystem::setSeedValueGeneration ( bool  setNew)

Definition at line 531 of file weatherarea.cpp.

void WeatherSystem::setSpawnAmount ( int  a)
inline

Definition at line 362 of file weatherarea.h.

void WeatherSystem::setTimeInterval ( int  i)
inline

Definition at line 354 of file weatherarea.h.

void WeatherSystem::setUpperDurationLimit ( int  ldl)
inline

Definition at line 370 of file weatherarea.h.

void WeatherSystem::setWindSpeed2FieldRatio ( float  ratio)
inline

Definition at line 358 of file weatherarea.h.

void WeatherSystem::skipRandomValue ( ) const

Definition at line 789 of file weatherarea.cpp.

Referenced by read().

void WeatherSystem::update ( )
void WeatherSystem::write ( tnstream outputStream) const

Definition at line 855 of file weatherarea.cpp.

References tnstream::writeFloat(), and tnstream::writeInt().

Member Data Documentation

const int WeatherSystem::FallOutNum = 6
static

Definition at line 284 of file weatherarea.h.

Referenced by WeatherSystem().

int WeatherSystem::legacyWindDirection = 0
static

Definition at line 293 of file weatherarea.h.

int WeatherSystem::legacyWindSpeed = 0
static

Definition at line 292 of file weatherarea.h.

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

The documentation for this class was generated from the following files: