Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

CGameOptions Class Reference

#include <gameoptions.h>

List of all members.

Public Types

typedef map< ASCString, PanelDataPanelDataContainer

Public Member Functions

 CGameOptions ()
void setDefaults ()
void setDefaultDirectories ()
void runTextIO (PropertyContainer &pc)
bool isChanged ()
void setChanged (bool flag=true)
void load (const ASCString &filename)
void save (const ASCString &filename)
int getSearchPathNum ()
void setSearchPath (int i, const ASCString &path)
void addSearchPath (const ASCString &path)
ASCString getSearchPath (int i)
bool getPanelData (const ASCString &name, PanelData &data)
void updatePanelData (const ASCString &name, PanelData data)
Password getDefaultPassword ()
Password getDefaultSupervisorPassword ()

Static Public Member Functions

static CGameOptionsInstance ()
 returns the only Instance

Public Attributes

int version
bool fastmove
 the number of steps to perform a move: 0 -> 3 step; != 0 -> 2 steps
int movespeed
 1/100 sec for a unit to move from one field to the next
bool endturnquestion
 question "do you want to end your turn"
bool units_gray_after_move
 are units that cannot move but shoot displayed in gray ?
int mapzoom
 the zoom of the map display in ASC
int mapzoomeditor
 the zoom of the map display in the map editor
int attackspeed1
 first delay of attack display
int attackspeed2
 speed of moving bars in attack display
int attackspeed3
 second delay in attack display
bool forceWindowedMode
 force ASC to run in windowed mode (and not fullscreen, which is default)
bool hardwareSurface
 use screen buffer on the graphics card instead of main memory
bool hideMouseOnScreenUpdates
 hides the mouse cursor when screen updates are performed
bool debugReplay
 enables the option to review your own replay to find replay bugs
bool mapeditWindowedMode
 force the mapeditor to run in fullscreen mode (and not windowed, which is default)
int xresolution
 the horizontal resolution ASC uses
int yresolution
 the vertical resolution ASC uses
int mapeditor_xresolution
 the horizontal resolution the mapeditor uses
int mapeditor_yresolution
 the vertical resolution the mapeditor uses
bool maped_modalSelectionWindow
bool automaticTraining
 are units automatically trained in training centers
CGameOptions::Mouse mouse
 the mouse configuration. Mouse button are: bit 0 = left button ; bit 1 = right button ; bit 2 = center button
CGameOptions::SoundSettings sound
struct {
   bool   fillResources
   bool   fillAmmo
unitProduction
bool autoproduceammunition
 produce required ammo upon refuelling
int replayspeed
int panelColumns
bool cacheASCGUI
bool replayMovieMode
vector< ASCStringvisibleMapLayer
PanelDataContainer panelData
ASCString BI3directory
struct {
   ASCString   hostname
   int   port
   ASCString   username
pbemServer
ASCString mailProgram
ASCString graphicsDriver
ASCString startupMap
ASCString defaultPassword
ASCString defaultSuperVisorPassword
struct {
   int   framerate
   int   quality
video
int searchPathNum
ASCString searchPath [30]

Static Public Attributes

static const int maxSearchPathNum = 30

Classes

struct  Mouse
 the mouse configuration. Mouse button are: bit 0 = left button ; bit 1 = right button ; bit 2 = center button More...
struct  PanelData
struct  SoundSettings


Member Typedef Documentation

typedef map<ASCString, PanelData> CGameOptions::PanelDataContainer
 

Definition at line 211 of file gameoptions.h.


Constructor & Destructor Documentation

CGameOptions::CGameOptions  ) 
 

Definition at line 227 of file gameoptions.cpp.

References setDefaults().


Member Function Documentation

void CGameOptions::addSearchPath const ASCString path  ) 
 

Definition at line 418 of file gameoptions.cpp.

References searchPathNum, and setSearchPath().

Password CGameOptions::getDefaultPassword  ) 
 

Definition at line 430 of file gameoptions.cpp.

References defaultPassword, and Password::setEncoded().

Password CGameOptions::getDefaultSupervisorPassword  ) 
 

Definition at line 440 of file gameoptions.cpp.

References defaultSuperVisorPassword, and Password::setEncoded().

bool CGameOptions::getPanelData const ASCString name,
PanelData data
 

Definition at line 455 of file gameoptions.cpp.

References panelData.

ASCString CGameOptions::getSearchPath int  i  ) 
 

Definition at line 423 of file gameoptions.cpp.

References searchPath.

int CGameOptions::getSearchPathNum  ) 
 

Definition at line 408 of file gameoptions.cpp.

References searchPathNum.

CGameOptions * CGameOptions::Instance  )  [static]
 

returns the only Instance

Definition at line 38 of file gameoptions.cpp.

Referenced by AI::AI(), AmmoTransferWindow::AmmoTransferWindow(), ASC_MainScreenWidget::ASC_MainScreenWidget(), ASC_PG_App::ASC_PG_App(), authenticateUser(), ReplayGuiFunctions::ReplayFaster::available(), SoundSettings::buttonEvent(), tbi3preferences::buttonpressed(), ChangePasswordDialog::ChangePasswordDialog(), checkbi3dir(), checkFileLoadability(), trunreplay::displayActionCursor(), MapDisplayPG::displayUnitMovement(), EditGameOptions::EditGameOptions(), enterpassword(), trunreplay::error(), LayoutablePanel::eventHide(), MapDisplayPG::eventMouseButtonDown(), StoringPosition::eventMouseButtonDown(), MapDisplayPG::eventMouseMotion(), LayoutablePanel::eventMoveWidget(), SoundSettings::eventScrollTrack(), LayoutablePanel::eventShow(), trunreplay::execnextreplaymove(), execuseraction(), ReplayGuiFunctions::ReplaySlower::execute(), ReplayGuiFunctions::ReplayFaster::execute(), GuiFunctions::EndTurn::execute(), GuiFunctions::Descend::execute(), GuiFunctions::Ascend::execute(), GuiFunctions::Movement::execute(), CargoGuiFunctions::MoveUnitIntoInnerContainer::execute(), CargoGuiFunctions::UnitProduction::execute(), filterQueuedZoomEvents(), getbi3path(), getbipath(), ImportBI3MapDialog::ImportBI3MapDialog(), initFileIO(), MapItemSelectionWindow::itemSelected(), loadStartupMap(), MailOptionsDialog::MailOptionsDialog(), main(), MapDisplayPG::MapDisplayPG(), NewGuiHost::mapIconProcessing(), BaseVehicleMovement::moveunitxy(), Vehicle::paint(), ReplayRecorder::pause(), SoundSettings::radioButtonEvent(), readgameoptions(), ReplayRecorder::ReplayRecorder(), ReplayRecorderDialog::ReplayRecorderDialog(), trunreplay::run(), FileTransfer::send(), MapDisplayPG::setNewZoom(), ASCGUI_Window::setup(), showAttackAnimation(), showSelectionWindow(), NewGuiHost::showSmallIcons(), SoundSettings::SoundSettings(), ASC_MainScreenWidget::spawnPanel(), ReplayRecorder::start(), TransferHandler::TransferHandler(), VehicleProduction_SelectionWindow::VehicleProduction_SelectionWindow(), viewOwnReplay(), ConfigurationFileLocatorCore::writeDefaultPathsToOptions(), writegameoptions(), and TransferHandler::~TransferHandler().

bool CGameOptions::isChanged  )  [inline]
 

Definition at line 249 of file gameoptions.h.

void CGameOptions::load const ASCString filename  ) 
 

Definition at line 71 of file gameoptions.cpp.

References tnstream::reading, TextFormatParser::run(), and runTextIO().

void CGameOptions::runTextIO PropertyContainer pc  ) 
 

Definition at line 92 of file gameoptions.cpp.

References PropertyContainer::addBool(), PropertyContainer::addInteger(), PropertyContainer::addNamedInteger(), PropertyContainer::addString(), PropertyContainer::addStringArray(), attackspeed1, attackspeed2, attackspeed3, automaticTraining, autoproduceammunition, BI3directory, cacheASCGUI, CGameOptions::Mouse::centerbutton, PropertyContainer::closeBracket(), debugReplay, defaultPassword, defaultSuperVisorPassword, CGameOptions::Mouse::dragndropbutton, endturnquestion, fastmove, CGameOptions::Mouse::fieldmarkbutton, PropertyContainer::find(), forceWindowedMode, graphicsDriver, hardwareSurface, hideMouseOnScreenUpdates, PropertyContainer::isReading(), mailProgram, maped_modalSelectionWindow, mapeditor_xresolution, mapeditor_yresolution, mapeditWindowedMode, mapzoom, mapzoomeditor, min(), mouse, mouseButtonNum, mouseButtons, movespeed, CGameOptions::SoundSettings::musicVolume, CGameOptions::SoundSettings::muteEffects, CGameOptions::SoundSettings::muteMusic, CGameOptions::SoundSettings::off, PropertyContainer::openBracket(), panelColumns, panelData, pbemServer, replayspeed, searchPath, searchPathNum, CGameOptions::Mouse::singleClickAction, sound, CGameOptions::SoundSettings::soundVolume, startupMap, strrr(), unitProduction, units_gray_after_move, video, CGameOptions::PanelData::visible, visibleMapLayer, CGameOptions::PanelData::x, xresolution, CGameOptions::PanelData::y, yresolution, CGameOptions::Mouse::zoominbutton, and CGameOptions::Mouse::zoomoutbutton.

Referenced by load(), and save().

void CGameOptions::save const ASCString filename  ) 
 

Definition at line 83 of file gameoptions.cpp.

References runTextIO(), and tnstream::writing.

void CGameOptions::setChanged bool  flag = true  )  [inline]
 

Definition at line 255 of file gameoptions.h.

Referenced by setDefaults(), and updatePanelData().

void CGameOptions::setDefaultDirectories  ) 
 

Definition at line 318 of file gameoptions.cpp.

References searchPath, and searchPathNum.

Referenced by setDefaults().

void CGameOptions::setDefaults  ) 
 

Definition at line 233 of file gameoptions.cpp.

References attackspeed1, attackspeed2, attackspeed3, automaticTraining, autoproduceammunition, cacheASCGUI, CGameOptions::Mouse::centerbutton, debugReplay, CGameOptions::Mouse::dragndropbutton, endturnquestion, fastmove, CGameOptions::Mouse::fieldmarkbutton, forceWindowedMode, graphicsDriver, hardwareSurface, hideMouseOnScreenUpdates, maped_modalSelectionWindow, mapeditor_xresolution, mapeditor_yresolution, mapeditWindowedMode, mapzoom, mapzoomeditor, mouse, movespeed, CGameOptions::SoundSettings::musicVolume, CGameOptions::SoundSettings::muteEffects, CGameOptions::SoundSettings::muteMusic, CGameOptions::SoundSettings::off, panelColumns, pbemServer, replayMovieMode, replayspeed, setChanged(), setDefaultDirectories(), CGameOptions::Mouse::singleClickAction, sound, CGameOptions::SoundSettings::soundVolume, startupMap, unitProduction, units_gray_after_move, video, xresolution, yresolution, CGameOptions::Mouse::zoominbutton, and CGameOptions::Mouse::zoomoutbutton.

Referenced by CGameOptions().

void CGameOptions::setSearchPath int  i,
const ASCString path
 

Definition at line 413 of file gameoptions.cpp.

References searchPath.

Referenced by addSearchPath().

void CGameOptions::updatePanelData const ASCString name,
PanelData  data
 

Definition at line 449 of file gameoptions.cpp.

References panelData, and setChanged().


Member Data Documentation

int CGameOptions::attackspeed1
 

first delay of attack display

Definition at line 81 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

int CGameOptions::attackspeed2
 

speed of moving bars in attack display

Definition at line 84 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

int CGameOptions::attackspeed3
 

second delay in attack display

Definition at line 87 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

bool CGameOptions::automaticTraining
 

are units automatically trained in training centers

Definition at line 119 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

bool CGameOptions::autoproduceammunition
 

produce required ammo upon refuelling

Definition at line 188 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

ASCString CGameOptions::BI3directory
 

Definition at line 217 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), and runTextIO().

bool CGameOptions::cacheASCGUI
 

Definition at line 198 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

bool CGameOptions::debugReplay
 

enables the option to review your own replay to find replay bugs

Definition at line 99 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

ASCString CGameOptions::defaultPassword
 

Definition at line 230 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), getDefaultPassword(), and runTextIO().

ASCString CGameOptions::defaultSuperVisorPassword
 

Definition at line 231 of file gameoptions.h.

Referenced by getDefaultSupervisorPassword(), and runTextIO().

bool CGameOptions::endturnquestion
 

question "do you want to end your turn"

Definition at line 66 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

bool CGameOptions::fastmove
 

the number of steps to perform a move: 0 -> 3 step; != 0 -> 2 steps

Definition at line 60 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

bool CGameOptions::fillAmmo
 

Definition at line 184 of file gameoptions.h.

bool CGameOptions::fillResources
 

Definition at line 183 of file gameoptions.h.

bool CGameOptions::forceWindowedMode
 

force ASC to run in windowed mode (and not fullscreen, which is default)

Definition at line 90 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

int CGameOptions::framerate
 

Definition at line 236 of file gameoptions.h.

ASCString CGameOptions::graphicsDriver
 

Definition at line 227 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

bool CGameOptions::hardwareSurface
 

use screen buffer on the graphics card instead of main memory

Definition at line 93 of file gameoptions.h.

Referenced by runTextIO(), and setDefaults().

bool CGameOptions::hideMouseOnScreenUpdates
 

hides the mouse cursor when screen updates are performed

Definition at line 96 of file gameoptions.h.

Referenced by runTextIO(), and setDefaults().

ASCString CGameOptions::hostname
 

Definition at line 220 of file gameoptions.h.

ASCString CGameOptions::mailProgram
 

Definition at line 225 of file gameoptions.h.

Referenced by runTextIO().

bool CGameOptions::maped_modalSelectionWindow
 

Definition at line 116 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

int CGameOptions::mapeditor_xresolution
 

the horizontal resolution the mapeditor uses

Definition at line 111 of file gameoptions.h.

Referenced by runTextIO(), and setDefaults().

int CGameOptions::mapeditor_yresolution
 

the vertical resolution the mapeditor uses

Definition at line 114 of file gameoptions.h.

Referenced by runTextIO(), and setDefaults().

bool CGameOptions::mapeditWindowedMode
 

force the mapeditor to run in fullscreen mode (and not windowed, which is default)

Definition at line 102 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

int CGameOptions::mapzoom
 

the zoom of the map display in ASC

Definition at line 72 of file gameoptions.h.

Referenced by runTextIO(), and setDefaults().

int CGameOptions::mapzoomeditor
 

the zoom of the map display in the map editor

Definition at line 75 of file gameoptions.h.

Referenced by runTextIO(), and setDefaults().

const int CGameOptions::maxSearchPathNum = 30 [static]
 

Definition at line 45 of file gameoptions.cpp.

struct CGameOptions::Mouse CGameOptions::mouse
 

the mouse configuration. Mouse button are: bit 0 = left button ; bit 1 = right button ; bit 2 = center button

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

int CGameOptions::movespeed
 

1/100 sec for a unit to move from one field to the next

Definition at line 63 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

int CGameOptions::panelColumns
 

Definition at line 196 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

PanelDataContainer CGameOptions::panelData
 

Definition at line 212 of file gameoptions.h.

Referenced by getPanelData(), runTextIO(), and updatePanelData().

struct { ... } CGameOptions::pbemServer
 

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

int CGameOptions::port
 

Definition at line 221 of file gameoptions.h.

int CGameOptions::quality
 

Definition at line 237 of file gameoptions.h.

bool CGameOptions::replayMovieMode
 

Definition at line 200 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), and setDefaults().

int CGameOptions::replayspeed
 

Definition at line 193 of file gameoptions.h.

Referenced by runTextIO(), and setDefaults().

ASCString CGameOptions::searchPath[30]
 

Definition at line 242 of file gameoptions.h.

Referenced by getSearchPath(), runTextIO(), setDefaultDirectories(), and setSearchPath().

int CGameOptions::searchPathNum
 

Definition at line 241 of file gameoptions.h.

Referenced by addSearchPath(), getSearchPathNum(), runTextIO(), and setDefaultDirectories().

struct CGameOptions::SoundSettings CGameOptions::sound
 

Referenced by runTextIO(), and setDefaults().

ASCString CGameOptions::startupMap
 

Definition at line 229 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

struct { ... } CGameOptions::unitProduction
 

Referenced by runTextIO(), and setDefaults().

bool CGameOptions::units_gray_after_move
 

are units that cannot move but shoot displayed in gray ?

Definition at line 69 of file gameoptions.h.

Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().

ASCString CGameOptions::username
 

Definition at line 222 of file gameoptions.h.

int CGameOptions::version
 

Definition at line 57 of file gameoptions.h.

struct { ... } CGameOptions::video
 

Referenced by runTextIO(), and setDefaults().

vector<ASCString> CGameOptions::visibleMapLayer
 

Definition at line 202 of file gameoptions.h.

Referenced by runTextIO().

int CGameOptions::xresolution
 

the horizontal resolution ASC uses

Definition at line 105 of file gameoptions.h.

Referenced by runTextIO(), and setDefaults().

int CGameOptions::yresolution
 

the vertical resolution ASC uses

Definition at line 108 of file gameoptions.h.

Referenced by runTextIO(), and setDefaults().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:16:36 2008 for Advanced Strategic Command by  doxygen 1.4.2