Advanced Strategic Command
Public Member Functions | List of all members
WeatherArea Class Reference

#include <weatherarea.h>

Public Member Functions

 WeatherArea (GameMap *map, int xCenter, int yCenter, int width, int height, int duration, FalloutType fType, unsigned int seedValue, bool clustered=true)
 
 WeatherArea (GameMap *map, int xCenter, int yCenter, int radius)
 
 WeatherArea (GameMap *map)
 
 ~WeatherArea ()
 
GameMapgetMap () const
 
Vector2D getWindVector () const
 
void updateMovementVector (unsigned int speed, Direction windDirection, double ratio)
 
void setFalloutType (FalloutType fallout)
 
FalloutType getFalloutType () const
 
FalloutType getFalloutType (int value) const
 
int getWidth () const
 
int getHeight () const
 
float getHorizontalWindAccu () const
 
float getVerticalWindAccu () const
 
MapCoordinate getCenterPos () const
 
const WeatherFieldgetCenterField () const
 
int getDuration () const
 
void setDuration (int duration)
 
void update (WeatherSystem *wSystem, FieldSet &processedFields)
 
void placeArea ()
 
void removeArea (FieldSet &processedFields)
 
unsigned int createRandomValue (int limit)
 
void write (tnstream &outputStream) const
 
void read (tnstream &inputStream)
 

Detailed Description

Author
Kevin Hirschmann

Definition at line 132 of file weatherarea.h.

Constructor & Destructor Documentation

WeatherArea::WeatherArea ( GameMap map,
int  xCenter,
int  yCenter,
int  width,
int  height,
int  duration,
FalloutType  fType,
unsigned int  seedValue,
bool  clustered = true 
)

Definition at line 55 of file weatherarea.cpp.

References MapCoordinate::x, and MapCoordinate::y.

WeatherArea::WeatherArea ( GameMap map,
int  xCenter,
int  yCenter,
int  radius 
)

Definition at line 69 of file weatherarea.cpp.

WeatherArea::WeatherArea ( GameMap map)

Definition at line 66 of file weatherarea.cpp.

WeatherArea::~WeatherArea ( )

Definition at line 71 of file weatherarea.cpp.

Member Function Documentation

unsigned int WeatherArea::createRandomValue ( int  limit)

Definition at line 275 of file weatherarea.cpp.

const WeatherField* WeatherArea::getCenterField ( ) const
inline

Definition at line 187 of file weatherarea.h.

MapCoordinate WeatherArea::getCenterPos ( ) const
inline
int WeatherArea::getDuration ( ) const

Definition at line 258 of file weatherarea.cpp.

FalloutType WeatherArea::getFalloutType ( ) const
FalloutType WeatherArea::getFalloutType ( int  value) const

Definition at line 108 of file weatherarea.cpp.

References DRY, and LSNOW.

int WeatherArea::getHeight ( ) const

Definition at line 122 of file weatherarea.cpp.

float WeatherArea::getHorizontalWindAccu ( ) const

Definition at line 266 of file weatherarea.cpp.

GameMap * WeatherArea::getMap ( void  ) const
inline

Definition at line 99 of file weatherarea.cpp.

Referenced by WeatherField::update(), and WeatherField::WeatherField().

float WeatherArea::getVerticalWindAccu ( ) const

Definition at line 270 of file weatherarea.cpp.

int WeatherArea::getWidth ( ) const

Definition at line 126 of file weatherarea.cpp.

Vector2D WeatherArea::getWindVector ( ) const

Definition at line 231 of file weatherarea.cpp.

void WeatherArea::placeArea ( )

Definition at line 239 of file weatherarea.cpp.

References WeatherField::isOnMap(), and WeatherField::update().

void WeatherArea::read ( tnstream inputStream)
void WeatherArea::removeArea ( FieldSet processedFields)

Definition at line 249 of file weatherarea.cpp.

References WeatherField::isOnMap(), and WeatherField::reset().

Referenced by WeatherSystem::update().

void WeatherArea::setDuration ( int  duration)

Definition at line 262 of file weatherarea.cpp.

void WeatherArea::setFalloutType ( FalloutType  fallout)

Definition at line 104 of file weatherarea.cpp.

void WeatherArea::update ( WeatherSystem wSystem,
FieldSet processedFields 
)
void WeatherArea::updateMovementVector ( unsigned int  speed,
Direction  windDirection,
double  ratio 
)

Definition at line 131 of file weatherarea.cpp.

References N, NE, NW, S, SE, and SW.

Referenced by WeatherSystem::update().

void WeatherArea::write ( tnstream outputStream) const

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