OptionsScorched Class Reference

#include <OptionsScorched.h>

List of all members.

Public Member Functions

 OptionsScorched ()
virtual ~OptionsScorched ()
 OPTIONINT_GETTER (PortNo)
 OPTIONINT_GETTER (ManagementPortNo)
 OPTIONSTRING_GETTER (Tutorial)
 OPTIONINT_GETTER (PhysicsFPS)
 OPTIONINT_GETTER (Teams)
 OPTIONINT_GETTER (StartArmsLevel)
 OPTIONINT_GETTER (EndArmsLevel)
 OPTIONINT_GETTER (MaxNumberWeapons)
 OPTIONINT_GETTER (NoMaxPlayers)
 OPTIONINT_GETTER (NoMinPlayers)
 OPTIONINT_GETTER (NoRounds)
 OPTIONINT_GETTER (RemoveBotsAtPlayers)
 OPTIONINT_GETTER (NoMaxRoundTurns)
 OPTIONINT_GETTER (MaxLandscapeSize)
 OPTIONINT_GETTER (AllowedMissedMoves)
 OPTIONINT_GETTER (IdleKickTime)
 OPTIONINT_GETTER (IdleShotKickTime)
 OPTIONINT_GETTER (MinFallingDistance)
 OPTIONINT_GETTER (MaxClimbingDistance)
 OPTIONINT_GETTER (PlayerLives)
 OPTIONINT_GETTER (Gravity)
 OPTIONINT_GETTER (StartTime)
 OPTIONINT_GETTER (ShotTime)
 OPTIONINT_GETTER (KeepAliveTime)
 OPTIONINT_GETTER (KeepAliveTimeoutTime)
 OPTIONINT_GETTER (BuyingTime)
 OPTIONINT_GETTER (RoundScoreTime)
 OPTIONINT_GETTER (ScoreTime)
 OPTIONENUM_GETTER (WindForce)
 OPTIONENUM_GETTER (WindType)
 OPTIONENUM_GETTER (WallType)
 OPTIONENUM_GETTER (WeapScale)
 OPTIONENUM_GETTER (TurnType)
 OPTIONENUM_GETTER (TeamBallance)
 OPTIONENUM_GETTER (MovementRestriction)
 OPTIONINT_GETTER (ScorePerMoney)
 OPTIONINT_GETTER (ScorePerAssist)
 OPTIONINT_GETTER (ScorePerKill)
 OPTIONINT_GETTER (ScoreWonForRound)
 OPTIONINT_GETTER (ScoreWonForLives)
 OPTIONINT_GETTER (StartMoney)
 OPTIONINT_GETTER (Interest)
 OPTIONINT_GETTER (FreeMarketAdjustment)
 OPTIONINT_GETTER (FreeMarketLimits)
 OPTIONINT_GETTER (BuyOnRound)
 OPTIONINT_GETTER (MoneyPerRound)
 OPTIONINT_GETTER (MoneyWonForRound)
 OPTIONINT_GETTER (MoneyWonForLives)
 OPTIONINT_GETTER (MoneyWonPerKillPoint)
 OPTIONINT_GETTER (MoneyWonPerMultiKillPoint)
 OPTIONINT_GETTER (MoneyWonPerAssistPoint)
 OPTIONINT_GETTER (MoneyWonPerHitPoint)
 OPTIONBOOL_GETTER (MoneyPerHealthPoint)
 OPTIONBOOL_GETTER (LimitPowerByHealth)
 OPTIONBOOL_GETTER (GiveAllWeapons)
 OPTIONBOOL_GETTER (DelayedDefenseActivation)
 OPTIONSTRINGENUM_GETTER (Economy)
 OPTIONINT_GETTER (ResignMode)
 OPTIONINT_GETTER (ComputersDeathTalk)
 OPTIONINT_GETTER (ComputersAttackTalk)
 OPTIONSTRING_GETTER (BotNamePrefix)
 OPTIONBOOL_GETTER (RandomizeBotNames)
 OPTIONBOOL_GETTER (CycleMaps)
 OPTIONSTRING_GETTER (Landscapes)
 OPTIONSTRING_GETTER (StatsLogger)
 OPTIONSTRING_GETTER (ServerFileLogger)
 OPTIONSTRING_GETTER (Mod)
 OPTIONSTRING_GETTER (MOTD)
 OPTIONINT_GETTER (ModDownloadSpeed)
 OPTIONINT_GETTER (MaxAvatarSize)
 OPTIONSTRING_GETTER (ServerName)
 OPTIONSTRING_GETTER (ServerPassword)
 OPTIONSTRING_GETTER (PublishAddress)
 OPTIONBOOL_GETTER (AllowMultiLingualChat)
 OPTIONBOOL_GETTER (AllowMultiLingualNames)
 OPTIONBOOL_GETTER (AllowSameIP)
 OPTIONBOOL_GETTER (AllowSameUniqueId)
 OPTIONBOOL_GETTER (PublishServer)
 OPTIONBOOL_GETTER (ResidualPlayers)
 OPTIONBOOL_GETTER (AutoSendSyncCheck)
 OPTIONBOOL_GETTER (ActionSyncCheck)
 OPTIONSTRING_GETTER (AuthHandler)
 OPTIONBOOL_GETTER (RegisteredUserNames)
 OPTIONBOOL_GETTER (DebugFeatures)
OptionEntryStringgetPlayerType (int no)
OptionsGamegetChangedOptions ()
OptionsGamegetMainOptions ()
OptionsGamegetLevelOptions ()
void updateLevelOptions (ScorchedContext &context, LandscapeDefinition &defn)
void updateChangeSet ()
bool commitChanges ()

Protected Member Functions

void updateLevelOptions (std::vector< LandscapeInclude * > &options, std::map< std::string, OptionEntry * > &values)

Protected Attributes

OptionsGame mainOptions_
OptionsGame changedOptions_
OptionsGame levelOptions_


Detailed Description

Definition at line 43 of file OptionsScorched.h.


Constructor & Destructor Documentation

OptionsScorched::OptionsScorched (  ) 

Definition at line 31 of file OptionsScorched.cpp.

OptionsScorched::~OptionsScorched (  )  [virtual]

Definition at line 35 of file OptionsScorched.cpp.


Member Function Documentation

OptionsScorched::OPTIONINT_GETTER ( PortNo   ) 

OptionsScorched::OPTIONINT_GETTER ( ManagementPortNo   ) 

OptionsScorched::OPTIONSTRING_GETTER ( Tutorial   ) 

OptionsScorched::OPTIONINT_GETTER ( PhysicsFPS   ) 

OptionsScorched::OPTIONINT_GETTER ( Teams   ) 

OptionsScorched::OPTIONINT_GETTER ( StartArmsLevel   ) 

OptionsScorched::OPTIONINT_GETTER ( EndArmsLevel   ) 

OptionsScorched::OPTIONINT_GETTER ( MaxNumberWeapons   ) 

OptionsScorched::OPTIONINT_GETTER ( NoMaxPlayers   ) 

OptionsScorched::OPTIONINT_GETTER ( NoMinPlayers   ) 

OptionsScorched::OPTIONINT_GETTER ( NoRounds   ) 

OptionsScorched::OPTIONINT_GETTER ( RemoveBotsAtPlayers   ) 

OptionsScorched::OPTIONINT_GETTER ( NoMaxRoundTurns   ) 

OptionsScorched::OPTIONINT_GETTER ( MaxLandscapeSize   ) 

OptionsScorched::OPTIONINT_GETTER ( AllowedMissedMoves   ) 

OptionsScorched::OPTIONINT_GETTER ( IdleKickTime   ) 

OptionsScorched::OPTIONINT_GETTER ( IdleShotKickTime   ) 

OptionsScorched::OPTIONINT_GETTER ( MinFallingDistance   ) 

OptionsScorched::OPTIONINT_GETTER ( MaxClimbingDistance   ) 

OptionsScorched::OPTIONINT_GETTER ( PlayerLives   ) 

OptionsScorched::OPTIONINT_GETTER ( Gravity   ) 

OptionsScorched::OPTIONINT_GETTER ( StartTime   ) 

OptionsScorched::OPTIONINT_GETTER ( ShotTime   ) 

OptionsScorched::OPTIONINT_GETTER ( KeepAliveTime   ) 

OptionsScorched::OPTIONINT_GETTER ( KeepAliveTimeoutTime   ) 

OptionsScorched::OPTIONINT_GETTER ( BuyingTime   ) 

OptionsScorched::OPTIONINT_GETTER ( RoundScoreTime   ) 

OptionsScorched::OPTIONINT_GETTER ( ScoreTime   ) 

OptionsScorched::OPTIONENUM_GETTER ( WindForce   ) 

OptionsScorched::OPTIONENUM_GETTER ( WindType   ) 

OptionsScorched::OPTIONENUM_GETTER ( WallType   ) 

OptionsScorched::OPTIONENUM_GETTER ( WeapScale   ) 

OptionsScorched::OPTIONENUM_GETTER ( TurnType   ) 

OptionsScorched::OPTIONENUM_GETTER ( TeamBallance   ) 

OptionsScorched::OPTIONENUM_GETTER ( MovementRestriction   ) 

OptionsScorched::OPTIONINT_GETTER ( ScorePerMoney   ) 

OptionsScorched::OPTIONINT_GETTER ( ScorePerAssist   ) 

OptionsScorched::OPTIONINT_GETTER ( ScorePerKill   ) 

OptionsScorched::OPTIONINT_GETTER ( ScoreWonForRound   ) 

OptionsScorched::OPTIONINT_GETTER ( ScoreWonForLives   ) 

OptionsScorched::OPTIONINT_GETTER ( StartMoney   ) 

OptionsScorched::OPTIONINT_GETTER ( Interest   ) 

OptionsScorched::OPTIONINT_GETTER ( FreeMarketAdjustment   ) 

OptionsScorched::OPTIONINT_GETTER ( FreeMarketLimits   ) 

OptionsScorched::OPTIONINT_GETTER ( BuyOnRound   ) 

OptionsScorched::OPTIONINT_GETTER ( MoneyPerRound   ) 

OptionsScorched::OPTIONINT_GETTER ( MoneyWonForRound   ) 

OptionsScorched::OPTIONINT_GETTER ( MoneyWonForLives   ) 

OptionsScorched::OPTIONINT_GETTER ( MoneyWonPerKillPoint   ) 

OptionsScorched::OPTIONINT_GETTER ( MoneyWonPerMultiKillPoint   ) 

OptionsScorched::OPTIONINT_GETTER ( MoneyWonPerAssistPoint   ) 

OptionsScorched::OPTIONINT_GETTER ( MoneyWonPerHitPoint   ) 

OptionsScorched::OPTIONBOOL_GETTER ( MoneyPerHealthPoint   ) 

OptionsScorched::OPTIONBOOL_GETTER ( LimitPowerByHealth   ) 

OptionsScorched::OPTIONBOOL_GETTER ( GiveAllWeapons   ) 

OptionsScorched::OPTIONBOOL_GETTER ( DelayedDefenseActivation   ) 

OptionsScorched::OPTIONSTRINGENUM_GETTER ( Economy   ) 

OptionsScorched::OPTIONINT_GETTER ( ResignMode   ) 

OptionsScorched::OPTIONINT_GETTER ( ComputersDeathTalk   ) 

OptionsScorched::OPTIONINT_GETTER ( ComputersAttackTalk   ) 

OptionsScorched::OPTIONSTRING_GETTER ( BotNamePrefix   ) 

OptionsScorched::OPTIONBOOL_GETTER ( RandomizeBotNames   ) 

OptionsScorched::OPTIONBOOL_GETTER ( CycleMaps   ) 

OptionsScorched::OPTIONSTRING_GETTER ( Landscapes   ) 

OptionsScorched::OPTIONSTRING_GETTER ( StatsLogger   ) 

OptionsScorched::OPTIONSTRING_GETTER ( ServerFileLogger   ) 

OptionsScorched::OPTIONSTRING_GETTER ( Mod   ) 

OptionsScorched::OPTIONSTRING_GETTER ( MOTD   ) 

OptionsScorched::OPTIONINT_GETTER ( ModDownloadSpeed   ) 

OptionsScorched::OPTIONINT_GETTER ( MaxAvatarSize   ) 

OptionsScorched::OPTIONSTRING_GETTER ( ServerName   ) 

OptionsScorched::OPTIONSTRING_GETTER ( ServerPassword   ) 

OptionsScorched::OPTIONSTRING_GETTER ( PublishAddress   ) 

OptionsScorched::OPTIONBOOL_GETTER ( AllowMultiLingualChat   ) 

OptionsScorched::OPTIONBOOL_GETTER ( AllowMultiLingualNames   ) 

OptionsScorched::OPTIONBOOL_GETTER ( AllowSameIP   ) 

OptionsScorched::OPTIONBOOL_GETTER ( AllowSameUniqueId   ) 

OptionsScorched::OPTIONBOOL_GETTER ( PublishServer   ) 

OptionsScorched::OPTIONBOOL_GETTER ( ResidualPlayers   ) 

OptionsScorched::OPTIONBOOL_GETTER ( AutoSendSyncCheck   ) 

OptionsScorched::OPTIONBOOL_GETTER ( ActionSyncCheck   ) 

OptionsScorched::OPTIONSTRING_GETTER ( AuthHandler   ) 

OptionsScorched::OPTIONBOOL_GETTER ( RegisteredUserNames   ) 

OptionsScorched::OPTIONBOOL_GETTER ( DebugFeatures   ) 

OptionEntryString& OptionsScorched::getPlayerType ( int  no  )  [inline]

Definition at line 145 of file OptionsScorched.h.

References DIALOG_ASSERT, OptionsGame::getPlayerType(), and mainOptions_.

Referenced by TankAIAdder::addTankAIs(), and ServerNewGameState::checkBots().

OptionsGame& OptionsScorched::getChangedOptions (  )  [inline]

Definition at line 147 of file OptionsScorched.h.

References changedOptions_.

Referenced by LandscapeDefinitions::checkEnabled(), ServerWebSettingsHandler::SettingsModHandler::processRequest(), ServerWebSettingsHandler::SettingsMainHandler::processRequest(), ServerWebSettingsHandler::SettingsAllHandler::processRequest(), ServerWebSettingsHandler::SettingsLandscapeHandler::processRequest(), and ServerWebSettingsHandler::SettingsPlayersHandler::processRequest().

OptionsGame& OptionsScorched::getMainOptions (  )  [inline]

Definition at line 148 of file OptionsScorched.h.

References mainOptions_.

Referenced by RulesDialog::addMOTD(), LandscapeDefinitions::checkEnabled(), LandscapeDefinitions::getRandomLandscapeDefn(), main(), ComsConnectAcceptMessage::readMessage(), s3d_get_option(), startClientInternal(), ClientSave::storeClient(), updateLevelOptions(), and ComsConnectAcceptMessage::writeMessage().

OptionsGame& OptionsScorched::getLevelOptions (  )  [inline]

Definition at line 149 of file OptionsScorched.h.

References levelOptions_.

Referenced by RulesDialog::addMOTD(), and updateLevelOptions().

void OptionsScorched::updateLevelOptions ( ScorchedContext context,
LandscapeDefinition defn 
)

Definition at line 39 of file OptionsScorched.cpp.

References S3D::formatStringBuffer(), LandscapeDefinition::getDefn(), LandscapeDefinitions::getDefn(), ScorchedContext::getLandscapes(), getLevelOptions(), getMainOptions(), OptionEntry::getName(), OptionsGame::getOptions(), LandscapeDefinition::getTex(), LandscapeDefinitions::getTex(), OptionEntry::getValueAsString(), LandscapeTexDefn::includes, OptionEntry::isChangedValue(), Logger::log(), OptionEntry::setNotChanged(), OptionEntry::setValueFromString(), LangStringUtil::strcmp(), LandscapeDefn::texDefn, and LandscapeTex::texDefn.

Referenced by ServerNewGameState::enterState(), and ComsNewGameMessage::readMessage().

void OptionsScorched::updateChangeSet (  ) 

Definition at line 128 of file OptionsScorched.cpp.

References NetBufferPool::addToPool(), changedOptions_, defaultBuffer, NetBufferPool::getFromPool(), NetBufferPool::instance(), mainOptions_, OptionsGame::readFromBuffer(), NetBuffer::reset(), and OptionsGame::writeToBuffer().

Referenced by startServer().

bool OptionsScorched::commitChanges (  ) 

Definition at line 140 of file OptionsScorched.cpp.

References changedOptions_, OptionEntry::DataProtected, DIALOG_ASSERT, S3D::formatStringBuffer(), OptionEntry::getData(), OptionEntry::getName(), OptionsGame::getOptions(), OptionEntry::getValueAsString(), Logger::log(), mainOptions_, OptionEntry::setValueFromString(), LangStringUtil::strcmp(), and LangStringUtil::strlen().

void OptionsScorched::updateLevelOptions ( std::vector< LandscapeInclude * > &  options,
std::map< std::string, OptionEntry * > &  values 
) [protected]

Definition at line 93 of file OptionsScorched.cpp.

References OptionEntry::getName(), OptionsGame::getOptions(), OptionEntry::isChangedValue(), LandscapeOptionsType::options, and LandscapeInclude::options.


Member Data Documentation

OptionsGame OptionsScorched::mainOptions_ [protected]

Definition at line 156 of file OptionsScorched.h.

Referenced by commitChanges(), getMainOptions(), getPlayerType(), and updateChangeSet().

OptionsGame OptionsScorched::changedOptions_ [protected]

Definition at line 157 of file OptionsScorched.h.

Referenced by commitChanges(), getChangedOptions(), and updateChangeSet().

OptionsGame OptionsScorched::levelOptions_ [protected]

Definition at line 158 of file OptionsScorched.h.

Referenced by getLevelOptions().


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