OptionsTransient Class Reference

#include <OptionsTransient.h>

List of all members.

Public Types

enum  WallType {
  wallConcrete = 0, wallBouncy = 1, wallWrapAround = 2,
  wallNone = 3
}
enum  WallSide {
  LeftSide = 0, RightSide, TopSide,
  BotSide
}

Public Member Functions

 OptionsTransient (OptionsScorched &optionsGame)
virtual ~OptionsTransient ()
const char * getGameType ()
unsigned int getLeastUsedTeam (TankContainer &container)
void reset ()
void newGame ()
void nextRound ()
void startNewGame ()
void startNewRound ()
WallType getWallType ()
VectorgetWallColor ()
int getCurrentRoundNo ()
int getCurrentGameNo ()
fixed getWindAngle ()
fixed getWindSpeed ()
FixedVectorgetWindDirection ()
bool getWindOn ()
int getArmsLevel ()
bool writeToBuffer (NetBuffer &buffer)
bool readFromBuffer (NetBufferReader &reader)

Protected Member Functions

void newGameWind ()
void newGameWall ()
void nextRoundWind ()

Protected Attributes

std::list
< OptionEntry * > 
options_
OptionsScorchedoptionsGame_
OptionEntryInt currentRoundNo_
OptionEntryInt currentGameNo_
OptionEntryFixed windAngle_
OptionEntryFixed windStartAngle_
OptionEntryFixed windSpeed_
OptionEntryFixedVector windDirection_
OptionEntryInt wallType_
bool newGame_


Detailed Description

Definition at line 29 of file OptionsTransient.h.


Member Enumeration Documentation

enum OptionsTransient::WallType

Enumerator:
wallConcrete 
wallBouncy 
wallWrapAround 
wallNone 

Definition at line 38 of file OptionsTransient.h.

enum OptionsTransient::WallSide

Enumerator:
LeftSide 
RightSide 
TopSide 
BotSide 

Definition at line 45 of file OptionsTransient.h.


Constructor & Destructor Documentation

OptionsTransient::OptionsTransient ( OptionsScorched optionsGame  ) 

Definition at line 29 of file OptionsTransient.cpp.

OptionsTransient::~OptionsTransient (  )  [virtual]

Definition at line 49 of file OptionsTransient.cpp.


Member Function Documentation

const char * OptionsTransient::getGameType (  ) 

Definition at line 53 of file OptionsTransient.cpp.

References optionsGame_, OptionsGame::TurnSequentialLooserFirst, OptionsGame::TurnSequentialRandom, and OptionsGame::TurnSimultaneous.

unsigned int OptionsTransient::getLeastUsedTeam ( TankContainer container  ) 

Definition at line 71 of file OptionsTransient.cpp.

References TankContainer::getPlayingTanks(), TankState::getSpectator(), Tank::getState(), Tank::getTeam(), and optionsGame_.

Referenced by TankAIAdder::addTankAI(), and PlayerDialog::draw().

void OptionsTransient::reset (  ) 

Definition at line 124 of file OptionsTransient.cpp.

References currentGameNo_, currentRoundNo_, and OptionEntryInt::setValue().

Referenced by ServerResetState::enterState(), and startServer().

void OptionsTransient::newGame (  ) 

Definition at line 140 of file OptionsTransient.cpp.

References currentGameNo_, currentRoundNo_, OptionEntryInt::getValue(), newGame_, newGameWall(), newGameWind(), optionsGame_, and OptionEntryInt::setValue().

Referenced by ServerNewGameState::enterState().

void OptionsTransient::nextRound (  ) 

Definition at line 158 of file OptionsTransient.cpp.

References currentGameNo_, OptionEntryInt::getValue(), newGame_, nextRoundWind(), and OptionEntryInt::setValue().

Referenced by ServerNextRoundState::enterState().

void OptionsTransient::startNewGame (  ) 

Definition at line 130 of file OptionsTransient.cpp.

References currentRoundNo_, optionsGame_, and OptionEntryInt::setValue().

Referenced by ServerAdminCommon::newGame(), and ServerCommon::startNewGame().

void OptionsTransient::startNewRound (  ) 

Definition at line 135 of file OptionsTransient.cpp.

References currentGameNo_, optionsGame_, and OptionEntryInt::setValue().

Referenced by ServerShotState::enterState().

WallType OptionsTransient::getWallType (  )  [inline]

Definition at line 61 of file OptionsTransient.h.

References OptionEntryInt::getValue(), and wallType_.

Referenced by PhysicsParticleObject::checkBounceCollision(), PhysicsParticleObject::checkShotCollision(), PhysicsParticleObject::getWallCollision(), getWallColor(), and WindDialogToolTip::populate().

Vector & OptionsTransient::getWallColor (  ) 

Definition at line 242 of file OptionsTransient.cpp.

References getWallType(), wallBouncy, wallConcrete, and wallWrapAround.

Referenced by GLWPlanView::drawBuoys(), Wall::drawWall(), WallActionRenderer::init(), ImageModifier::makeArenaBitmap(), and ImageModifier::makeArenaSurroundBitmap().

int OptionsTransient::getCurrentRoundNo (  )  [inline]

Definition at line 65 of file OptionsTransient.h.

References currentRoundNo_, and OptionEntryInt::getValue().

Referenced by TankAICurrent::buyAccessories(), and getArmsLevel().

int OptionsTransient::getCurrentGameNo (  )  [inline]

Definition at line 66 of file OptionsTransient.h.

References currentGameNo_, and OptionEntryInt::getValue().

Referenced by ServerNextTurnState::enterState(), and ServerNextRoundState::enterState().

fixed OptionsTransient::getWindAngle (  )  [inline]

Definition at line 69 of file OptionsTransient.h.

References OptionEntryFixed::getValue(), and windAngle_.

Referenced by SkyDome::simulate().

fixed OptionsTransient::getWindSpeed (  )  [inline]

Definition at line 70 of file OptionsTransient.h.

References OptionEntryFixed::getValue(), and windSpeed_.

Referenced by TankLib::getShotTowardsPosition(), ParticleEngine::normalizedSimulate(), PhysicsParticleObject::setPhysics(), and SkyDome::simulate().

FixedVector& OptionsTransient::getWindDirection (  )  [inline]

Definition at line 71 of file OptionsTransient.h.

References OptionEntryFixedVector::getValue(), and windDirection_.

Referenced by WaterWaves::draw(), TankLib::getShotTowardsPosition(), ParticleEngine::normalizedSimulate(), PhysicsParticleObject::setPhysics(), and SkyDome::simulate().

bool OptionsTransient::getWindOn (  )  [inline]

Definition at line 72 of file OptionsTransient.h.

References OptionEntryFixed::getValue(), and windSpeed_.

Referenced by TankLib::getShotTowardsPosition().

int OptionsTransient::getArmsLevel (  ) 

Definition at line 296 of file OptionsTransient.cpp.

References getCurrentRoundNo(), and optionsGame_.

Referenced by TankAccessories::accessoryAllowed(), TankAIWeaponSets::WeaponSet::getTankAccessoryByType(), ServerShotHolder::validateFiredMessage(), and TankAIWeaponSets::WeaponSetEntry::weaponValid().

bool OptionsTransient::writeToBuffer ( NetBuffer buffer  ) 

Definition at line 112 of file OptionsTransient.cpp.

References options_, and OptionEntryHelper::writeToBuffer().

bool OptionsTransient::readFromBuffer ( NetBufferReader reader  ) 

Definition at line 118 of file OptionsTransient.cpp.

References options_, and OptionEntryHelper::readFromBuffer().

void OptionsTransient::newGameWind (  )  [protected]

Definition at line 168 of file OptionsTransient.cpp.

References FixedVector::getNullVector(), RandomGenerator::getRandFixed(), OptionEntryFixed::getValue(), optionsGame_, RandomGenerator::seed(), OptionEntryFixedVector::setValue(), OptionEntryFixed::setValue(), OptionsGame::Wind1, OptionsGame::Wind2, OptionsGame::Wind3, OptionsGame::Wind4, OptionsGame::Wind5, windAngle_, OptionsGame::WindBreezy, windDirection_, OptionsGame::WindGale, OptionsGame::WindNone, OptionsGame::WindRandom, windSpeed_, windStartAngle_, and fixed::XPI.

Referenced by newGame().

void OptionsTransient::newGameWall (  )  [protected]

Definition at line 264 of file OptionsTransient.cpp.

References optionsGame_, RAND, OptionEntryInt::setValue(), OptionsGame::WallActive, wallBouncy, OptionsGame::WallBouncy, wallConcrete, OptionsGame::WallConcrete, OptionsGame::WallInactive, wallNone, OptionsGame::WallNone, wallType_, wallWrapAround, and OptionsGame::WallWrapAround.

Referenced by newGame().

void OptionsTransient::nextRoundWind (  )  [protected]

Definition at line 220 of file OptionsTransient.cpp.

References RandomGenerator::getRandFixed(), OptionEntryFixed::getValue(), optionsGame_, RandomGenerator::seed(), OptionEntryFixedVector::setValue(), OptionEntryFixed::setValue(), windAngle_, windDirection_, OptionsGame::WindOnMove, windSpeed_, windStartAngle_, and fixed::XPI.

Referenced by nextRound().


Member Data Documentation

std::list<OptionEntry *> OptionsTransient::options_ [protected]

Definition at line 82 of file OptionsTransient.h.

Referenced by readFromBuffer(), and writeToBuffer().

OptionsScorched& OptionsTransient::optionsGame_ [protected]

Definition at line 83 of file OptionsTransient.h.

Referenced by getArmsLevel(), getGameType(), getLeastUsedTeam(), newGame(), newGameWall(), newGameWind(), nextRoundWind(), startNewGame(), and startNewRound().

OptionEntryInt OptionsTransient::currentRoundNo_ [protected]

Definition at line 84 of file OptionsTransient.h.

Referenced by getCurrentRoundNo(), newGame(), reset(), and startNewGame().

OptionEntryInt OptionsTransient::currentGameNo_ [protected]

Definition at line 85 of file OptionsTransient.h.

Referenced by getCurrentGameNo(), newGame(), nextRound(), reset(), and startNewRound().

OptionEntryFixed OptionsTransient::windAngle_ [protected]

Definition at line 86 of file OptionsTransient.h.

Referenced by getWindAngle(), newGameWind(), and nextRoundWind().

OptionEntryFixed OptionsTransient::windStartAngle_ [protected]

Definition at line 87 of file OptionsTransient.h.

Referenced by newGameWind(), and nextRoundWind().

OptionEntryFixed OptionsTransient::windSpeed_ [protected]

Definition at line 88 of file OptionsTransient.h.

Referenced by getWindOn(), getWindSpeed(), newGameWind(), and nextRoundWind().

OptionEntryFixedVector OptionsTransient::windDirection_ [protected]

Definition at line 89 of file OptionsTransient.h.

Referenced by getWindDirection(), newGameWind(), and nextRoundWind().

OptionEntryInt OptionsTransient::wallType_ [protected]

Definition at line 90 of file OptionsTransient.h.

Referenced by getWallType(), and newGameWall().

bool OptionsTransient::newGame_ [protected]

Definition at line 92 of file OptionsTransient.h.

Referenced by newGame(), and nextRound().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:05 2009 for Scorched3D by  doxygen 1.5.3