#include <gameoptions.h>
Public Types | |
| typedef map< ASCString, PanelData > | PanelDataContainer |
| typedef map< ASCString, int > | DialogAnswers |
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 CGameOptions * | Instance () |
| 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 | |
| int | replayMoveSpeedFactor |
| how much faster are unit going to move in replays (percent) | |
| 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 |
| bool | recordCampaignMaps |
| vector< ASCString > | visibleMapLayer |
| int | aircraftCrashWarningTime |
| the number of turns after which a unit will crash until the player is warned | |
| 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 ascframeratelimit | |
| int quality | |
| } | video |
| int | searchPathNum |
| ASCString | searchPath [30] |
| DialogAnswers | dialogAnswers |
| ASCString | languageOverride |
| bool | saveEventMessagesExternal |
| will save all Immediate Game Event messages into a seperate file for doing translations | |
| bool | logKillsToConsole |
Static Public Attributes | |
| static const int | maxSearchPathNum |
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 |
Definition at line 27 of file gameoptions.h.
| typedef map<ASCString, PanelData> CGameOptions::PanelDataContainer |
Definition at line 217 of file gameoptions.h.
| typedef map<ASCString,int> CGameOptions::DialogAnswers |
Definition at line 251 of file gameoptions.h.
| CGameOptions::CGameOptions | ( | ) |
| CGameOptions * CGameOptions::Instance | ( | ) | [static] |
returns the only Instance
Definition at line 38 of file gameoptions.cpp.
References pStaticGameOptions.
Referenced by AmmoTransferWindow::AmmoTransferWindow(), ASC_MainScreenWidget::ASC_MainScreenWidget(), ASC_PG_App::ASC_PG_App(), authenticateUser(), ReplayGuiFunctions::ReplayFaster::available(), SoundSettings::buttonEvent(), tbi3preferences::buttonpressed(), ChangePasswordDialog::ChangePasswordDialog(), checkbi3dir(), checkFileLoadability(), checkUnitsForCrash(), choiceDialog(), trunreplay::displayActionCursor(), EditGameOptions::EditGameOptions(), enterpassword(), trunreplay::error(), LayoutablePanel::eventHide(), MapDisplayPG::eventMouseButtonDown(), StoringPosition::eventMouseButtonDown(), MapDisplayPG::eventMouseMotion(), LayoutablePanel::eventMoveWidget(), SoundSettings::eventScrollTrack(), LayoutablePanel::eventShow(), trunreplay::execnextreplaymove(), ReplayGuiFunctions::ReplaySlower::execute(), ReplayGuiFunctions::ReplayFaster::execute(), GuiFunctions::EndTurn::execute(), GuiFunctions::MovementBase::execute(), CargoGuiFunctions::MoveUnitIntoInnerContainer::execute(), CargoGuiFunctions::UnitProduction::execute(), executeUserAction(), filterQueuedZoomEvents(), getbi3path(), getbipath(), Locale::getLang(), ReplayMapDisplay::getUnitMovementDuration(), PG_MapDisplay::getUnitMovementDuration(), ImportBI3MapDialog::ImportBI3MapDialog(), initFileIO(), MapItemSelectionWindow::itemSelected(), loadStartupMap(), log(), MailOptionsDialog::MailOptionsDialog(), main(), MapDisplayPG::MapDisplayPG(), NewGuiHost::mapIconProcessing(), Vehicle::paint(), ReplayRecorder::pause(), SoundSettings::radioButtonEvent(), readgameoptions(), ReplayRecorder::ReplayRecorder(), ReplayRecorderDialog::ReplayRecorderDialog(), trunreplay::run(), AI::run(), MoveUnit::runAction(), savemap(), ScreenResolutionSetup::ScreenResolutionSetup(), FileTransfer::send(), MapDisplayPG::setNewZoom(), ASCGUI_Window::setup(), showAttackAnimation(), showSelectionWindow(), NewGuiHost::showSmallIcons(), SoundSettings::SoundSettings(), ASC_MainScreenWidget::spawnPanel(), ReplayRecorder::start(), StartMultiplayerGame::start(), startnextcampaignmap(), TransferHandler::TransferHandler(), VehicleProduction_SelectionWindow::VehicleProduction_SelectionWindow(), viewOwnReplay(), trunreplay::wait(), waitWithUpdate(), ConfigurationFileLocatorCore::writeDefaultPathsToOptions(), writegameoptions(), and TransferHandler::~TransferHandler().
| void CGameOptions::setDefaults | ( | ) |
Definition at line 261 of file gameoptions.cpp.
References aircraftCrashWarningTime, attackspeed1, attackspeed2, attackspeed3, automaticTraining, autoproduceammunition, cacheASCGUI, CGameOptions::Mouse::centerbutton, debugReplay, CGameOptions::Mouse::dragndropbutton, endturnquestion, fastmove, CGameOptions::Mouse::fieldmarkbutton, forceWindowedMode, graphicsDriver, hardwareSurface, hideMouseOnScreenUpdates, logKillsToConsole, 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, recordCampaignMaps, replayMoveSpeedFactor, replayMovieMode, replayspeed, saveEventMessagesExternal, 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::setDefaultDirectories | ( | ) |
Definition at line 356 of file gameoptions.cpp.
References searchPath, and searchPathNum.
Referenced by setDefaults(), and ConfigurationFileLocatorCore::writeDefaultPathsToOptions().
| void CGameOptions::runTextIO | ( | PropertyContainer & | pc | ) |
Definition at line 92 of file gameoptions.cpp.
References PropertyContainer::addBool(), PropertyContainer::addInteger(), PropertyContainer::addNamedInteger(), PropertyContainer::addString(), PropertyContainer::addStringArray(), aircraftCrashWarningTime, attackspeed1, attackspeed2, attackspeed3, automaticTraining, autoproduceammunition, BI3directory, cacheASCGUI, CGameOptions::Mouse::centerbutton, PropertyContainer::closeBracket(), debugReplay, defaultPassword, defaultSuperVisorPassword, dialogAnswers, CGameOptions::Mouse::dragndropbutton, endturnquestion, fastmove, CGameOptions::Mouse::fieldmarkbutton, PropertyContainer::find(), forceWindowedMode, graphicsDriver, hardwareSurface, hideMouseOnScreenUpdates, PropertyContainer::isReading(), languageOverride, logKillsToConsole, 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, recordCampaignMaps, replayMoveSpeedFactor, replayspeed, saveEventMessagesExternal, searchPath, searchPathNum, CGameOptions::Mouse::singleClickAction, sound, CGameOptions::SoundSettings::soundVolume, startupMap, strrr(), unitProduction, units_gray_after_move, video, visibleMapLayer, xresolution, yresolution, CGameOptions::Mouse::zoominbutton, and CGameOptions::Mouse::zoomoutbutton.
| bool CGameOptions::isChanged | ( | ) | [inline] |
Definition at line 266 of file gameoptions.h.
| void CGameOptions::setChanged | ( | bool | flag = true |
) | [inline] |
Definition at line 272 of file gameoptions.h.
Referenced by checkbi3dir(), checkFileLoadability(), choiceDialog(), SoundSettings::eventScrollTrack(), ReplayGuiFunctions::ReplaySlower::execute(), ReplayGuiFunctions::ReplayFaster::execute(), CargoGuiFunctions::UnitProduction::execute(), executeUserAction(), getbipath(), readgameoptions(), setDefaults(), MapDisplayPG::setNewZoom(), updatePanelData(), and TransferHandler::~TransferHandler().
| void CGameOptions::load | ( | const ASCString & | filename | ) |
Definition at line 71 of file gameoptions.cpp.
References tnstream::reading, TextFormatParser::run(), and runTextIO().
Referenced by readgameoptions().
| void CGameOptions::save | ( | const ASCString & | filename | ) |
Definition at line 83 of file gameoptions.cpp.
References runTextIO(), and tnstream::writing.
Referenced by writegameoptions().
| int CGameOptions::getSearchPathNum | ( | ) |
Definition at line 386 of file gameoptions.cpp.
References searchPathNum.
Referenced by initFileIO().
| void CGameOptions::setSearchPath | ( | int | i, | |
| const ASCString & | path | |||
| ) |
Definition at line 391 of file gameoptions.cpp.
References searchPath.
Referenced by addSearchPath().
| void CGameOptions::addSearchPath | ( | const ASCString & | path | ) |
Definition at line 396 of file gameoptions.cpp.
References searchPathNum, and setSearchPath().
Referenced by ConfigurationFileLocatorCore::writeDefaultPathsToOptions().
| ASCString CGameOptions::getSearchPath | ( | int | i | ) |
Definition at line 427 of file gameoptions.cpp.
References panelData, and setChanged().
Referenced by LayoutablePanel::eventHide(), LayoutablePanel::eventMoveWidget(), and LayoutablePanel::eventShow().
| Password CGameOptions::getDefaultPassword | ( | ) |
Definition at line 408 of file gameoptions.cpp.
References defaultPassword, and Password::setEncoded().
Referenced by authenticateUser(), and enterpassword().
| Password CGameOptions::getDefaultSupervisorPassword | ( | ) |
Definition at line 418 of file gameoptions.cpp.
References defaultSuperVisorPassword, and Password::setEncoded().
Definition at line 57 of file gameoptions.h.
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().
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(), ReplayMapDisplay::getUnitMovementDuration(), PG_MapDisplay::getUnitMovementDuration(), runTextIO(), and setDefaults().
how much faster are unit going to move in replays (percent)
Definition at line 66 of file gameoptions.h.
Referenced by runTextIO(), and setDefaults().
question "do you want to end your turn"
Definition at line 69 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
are units that cannot move but shoot displayed in gray ?
Definition at line 72 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), executeUserAction(), Vehicle::paint(), runTextIO(), and setDefaults().
the zoom of the map display in ASC
Definition at line 75 of file gameoptions.h.
Referenced by runTextIO(), setDefaults(), and MapDisplayPG::setNewZoom().
the zoom of the map display in the map editor
Definition at line 78 of file gameoptions.h.
Referenced by runTextIO(), and setDefaults().
first delay of attack display
Definition at line 84 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), setDefaults(), and showAttackAnimation().
speed of moving bars in attack display
Definition at line 87 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), setDefaults(), and showAttackAnimation().
second delay in attack display
Definition at line 90 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), setDefaults(), and showAttackAnimation().
force ASC to run in windowed mode (and not fullscreen, which is default)
Definition at line 93 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
use screen buffer on the graphics card instead of main memory
Definition at line 96 of file gameoptions.h.
Referenced by runTextIO(), and setDefaults().
hides the mouse cursor when screen updates are performed
Definition at line 99 of file gameoptions.h.
Referenced by runTextIO(), and setDefaults().
enables the option to review your own replay to find replay bugs
Definition at line 102 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
force the mapeditor to run in fullscreen mode (and not windowed, which is default)
Definition at line 105 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), main(), runTextIO(), and setDefaults().
the horizontal resolution ASC uses
Definition at line 108 of file gameoptions.h.
Referenced by runTextIO(), ScreenResolutionSetup::ScreenResolutionSetup(), and setDefaults().
the vertical resolution ASC uses
Definition at line 111 of file gameoptions.h.
Referenced by runTextIO(), ScreenResolutionSetup::ScreenResolutionSetup(), and setDefaults().
the horizontal resolution the mapeditor uses
Definition at line 114 of file gameoptions.h.
Referenced by main(), runTextIO(), and setDefaults().
the vertical resolution the mapeditor uses
Definition at line 117 of file gameoptions.h.
Referenced by main(), runTextIO(), and setDefaults().
Definition at line 119 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
are units automatically trained in training centers
Definition at line 122 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
the mouse configuration. Mouse button are: bit 0 = left button ; bit 1 = right button ; bit 2 = center button
Referenced by EditGameOptions::EditGameOptions(), MapDisplayPG::eventMouseButtonDown(), StoringPosition::eventMouseButtonDown(), filterQueuedZoomEvents(), runTextIO(), and setDefaults().
Definition at line 186 of file gameoptions.h.
Referenced by CargoGuiFunctions::UnitProduction::execute().
Definition at line 187 of file gameoptions.h.
Referenced by CargoGuiFunctions::UnitProduction::execute(), and VehicleProduction_SelectionWindow::VehicleProduction_SelectionWindow().
| struct { ... } CGameOptions::unitProduction |
Referenced by CargoGuiFunctions::UnitProduction::execute(), runTextIO(), and setDefaults().
produce required ammo upon refuelling
Definition at line 191 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), setDefaults(), TransferHandler::TransferHandler(), and TransferHandler::~TransferHandler().
Definition at line 196 of file gameoptions.h.
Referenced by ReplayGuiFunctions::ReplaySlower::execute(), ReplayGuiFunctions::ReplayFaster::execute(), runTextIO(), and setDefaults().
Definition at line 199 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
Definition at line 201 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
Definition at line 203 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), ReplayRecorder::pause(), ReplayRecorder::ReplayRecorder(), setDefaults(), and ReplayRecorder::start().
Definition at line 204 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
Definition at line 206 of file gameoptions.h.
Referenced by ASC_MainScreenWidget::ASC_MainScreenWidget(), and runTextIO().
the number of turns after which a unit will crash until the player is warned
Definition at line 209 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
Definition at line 218 of file gameoptions.h.
Referenced by ASC_MainScreenWidget::ASC_MainScreenWidget(), getPanelData(), runTextIO(), and updatePanelData().
Definition at line 223 of file gameoptions.h.
Referenced by checkbi3dir(), EditGameOptions::EditGameOptions(), getbi3path(), getbipath(), and runTextIO().
| struct { ... } CGameOptions::pbemServer |
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
Definition at line 233 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
Definition at line 235 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), loadStartupMap(), runTextIO(), and setDefaults().
Definition at line 236 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), getDefaultPassword(), and runTextIO().
Definition at line 237 of file gameoptions.h.
Referenced by getDefaultSupervisorPassword(), and runTextIO().
Definition at line 242 of file gameoptions.h.
Referenced by ReplayRecorderDialog::ReplayRecorderDialog().
Definition at line 244 of file gameoptions.h.
| struct { ... } CGameOptions::video |
Referenced by runTextIO(), setDefaults(), and waitWithUpdate().
const int CGameOptions::maxSearchPathNum [static] |
Definition at line 247 of file gameoptions.h.
Definition at line 248 of file gameoptions.h.
Referenced by addSearchPath(), getSearchPathNum(), runTextIO(), setDefaultDirectories(), and ConfigurationFileLocatorCore::writeDefaultPathsToOptions().
Definition at line 249 of file gameoptions.h.
Referenced by getSearchPath(), runTextIO(), setDefaultDirectories(), and setSearchPath().
Definition at line 254 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), Locale::getLang(), and runTextIO().
will save all Immediate Game Event messages into a seperate file for doing translations
Definition at line 257 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
Definition at line 259 of file gameoptions.h.
Referenced by EditGameOptions::EditGameOptions(), runTextIO(), and setDefaults().
1.5.1