#include <C4Config.h>
Public Types | |
enum | { ConfigResetSafetyVal = 42 } |
Public Member Functions | |
void | DefaultLanguage () |
bool | CreateSaveFolder (const char *directory, const char *language_title) |
void | DeterminePaths () |
void | CompileFunc (StdCompiler *compiler) |
Static Public Member Functions | |
static int | GetLanguageSequence (const char *source, char *target) |
Public Attributes | |
char | Name [CFG_MaxString+1] |
char | Language [CFG_MaxString+1] |
char | LanguageEx [CFG_MaxString+1] |
char | Participants [CFG_MaxString+1] |
int32_t | AlwaysDebug |
int32_t | OpenScenarioInGameMode |
char | RXFontName [CFG_MaxString+1] |
int32_t | RXFontSize |
char | ConfigUserPath [CFG_MaxString+1] |
StdStrBuf | ScreenshotFolder |
StdStrBuf | ModsFolder |
char | MissionAccess [CFG_MaxString+1] |
int32_t | FPS |
int32_t | DefRec |
int32_t | MMTimer |
int32_t | ScrollSmooth |
int32_t | ConfigResetSafety |
StdCopyStrBuf | ExePath |
StdCopyStrBuf | TempPath |
char | UserDataPath [CFG_MaxString+1] |
char | ModsDataPath [CFG_MaxString+1] |
char | SystemDataPath [CFG_MaxString+1] |
char | ScreenshotPath [CFG_MaxString+1] |
char | TempUpdatePath [CFG_MaxString+1] |
bool | GamepadEnabled |
bool | FirstStart |
int32_t | DebugRec |
int32_t | DebugRecWrite |
char | DebugRecExternalFile [_MAX_PATH_LEN] |
Definition at line 31 of file C4Config.h.
anonymous enum |
void C4ConfigGeneral::CompileFunc | ( | StdCompiler * | compiler | ) |
Definition at line 45 of file C4Config.cpp.
References AlwaysDebug, C4DEFAULT_FONT_NAME, ConfigResetSafety, ConfigResetSafetyVal, ConfigUserPath, DefRec, FirstStart, FPS, GamepadEnabled, Language, LanguageEx, MissionAccess, mkNamingAdapt(), MMTimer, ModsDataPath, ModsFolder, Name, OpenScenarioInGameMode, Participants, RXFontName, RXFontSize, s, ScreenshotFolder, ScrollSmooth, TempUpdatePath, and StdCompiler::Value().
bool C4ConfigGeneral::CreateSaveFolder | ( | const char * | directory, |
const char * | language_title | ||
) |
Definition at line 636 of file C4Config.cpp.
References C4CFN_WriteTitle, CStdFile::Close(), Config, CStdFile::Create(), CreatePath(), DirectorySeparator, FileExists(), StdStrBuf::Format(), C4Config::General, StdStrBuf::getData(), Language, SCopy(), and CStdFile::WriteString().
Referenced by C4Game::QuickSave(), and C4Record::Start().
void C4ConfigGeneral::DefaultLanguage | ( | ) |
Definition at line 774 of file C4Config.cpp.
References GetLanguageSequence(), IsGermanSystem(), Language, LanguageEx, and SCopy().
Referenced by C4Config::Load().
void C4ConfigGeneral::DeterminePaths | ( | ) |
Definition at line 469 of file C4Config.cpp.
References StdStrBuf::AppendBackslash(), AppendBackslash(), Application, CFG_MaxString, ConfigUserPath, CreatePath(), ExePath, C4Config::ExpandEnvironmentVariables(), FormatString(), StdStrBuf::getData(), StdStrBuf::getLength(), StdStrBuf::getMData(), GetParentPath(), GetWorkingDirectory(), ModsDataPath, ModsFolder, StdStrBuf::Ref(), SAppend(), SCopy(), ScreenshotFolder, ScreenshotPath, StdStrBuf::SetLength(), SLen(), SystemDataPath, TempPath, TruncatePath(), and UserDataPath.
Referenced by C4Config::Load().
|
static |
Definition at line 817 of file C4Config.cpp.
References SAppend(), SAppendChar(), and SCopySegment().
Referenced by DefaultLanguage().
int32_t C4ConfigGeneral::AlwaysDebug |
Definition at line 40 of file C4Config.h.
Referenced by CompileFunc(), and C4Game::Init().
int32_t C4ConfigGeneral::ConfigResetSafety |
Definition at line 52 of file C4Config.h.
Referenced by CompileFunc(), and C4Config::IsCorrupted().
char C4ConfigGeneral::ConfigUserPath[CFG_MaxString+1] |
Definition at line 44 of file C4Config.h.
Referenced by CompileFunc(), and DeterminePaths().
int32_t C4ConfigGeneral::DebugRec |
Definition at line 63 of file C4Config.h.
Referenced by C4Landscape::_SetPix2(), C4LSectors::Add(), C4Object::AssignRemoval(), C4MassMover::Cease(), C4MCOverlay::CheckMask(), C4Playback::Clear(), C4MassMoverSet::Create(), C4GameControl::DbgRec(), C4PXS::Deactivate(), C4AulExec::DirectExec(), C4Landscape::P::DoScan(), C4Game::ExecObjects(), C4Game::Execute(), C4PXS::Execute(), C4Object::Execute(), C4Playback::ExecuteControl(), C4PlayerControl::ExecuteControlPacket(), C4Landscape::P::ExecuteScan(), C4Game::NewObject(), C4Playback::Open(), C4Application::ParseCommandLine(), RecordRandom(), C4LSectors::Remove(), C4GameControl::RequestRuntimeRecord(), C4Shape::Rotate(), C4Object::SetOCF(), C4Record::Stop(), C4LSectors::Update(), and C4Object::UpdateOCF().
char C4ConfigGeneral::DebugRecExternalFile[_MAX_PATH_LEN] |
Definition at line 65 of file C4Config.h.
Referenced by C4Playback::Check(), C4Playback::Clear(), C4Playback::Open(), and C4Application::ParseCommandLine().
int32_t C4ConfigGeneral::DebugRecWrite |
Definition at line 64 of file C4Config.h.
Referenced by C4Playback::Check(), C4Playback::Open(), and C4Application::ParseCommandLine().
int32_t C4ConfigGeneral::DefRec |
Definition at line 49 of file C4Config.h.
Referenced by CompileFunc(), C4StartupNetDlg::OnBtnRecord(), C4GameOptionButtons::OnBtnRecord(), and C4Application::PreInit().
StdCopyStrBuf C4ConfigGeneral::ExePath |
Definition at line 54 of file C4Config.h.
Referenced by C4Config::AtExePath(), DeterminePaths(), C4Application::DoInit(), C4Reloc::Init(), RestartApplication(), and C4Network2Res::SetByCore().
bool C4ConfigGeneral::FirstStart |
Definition at line 62 of file C4Config.h.
Referenced by CompileFunc(), and C4StartupMainDlg::OnShown().
int32_t C4ConfigGeneral::FPS |
Definition at line 48 of file C4Config.h.
Referenced by C4MainMenu::ActivateDisplay(), CompileFunc(), C4UpperBoard::Draw(), and C4MainMenu::MenuCommand().
bool C4ConfigGeneral::GamepadEnabled |
Definition at line 61 of file C4Config.h.
Referenced by CompileFunc(), C4Application::DoInit(), and C4Player::InitControl().
char C4ConfigGeneral::Language[CFG_MaxString+1] |
Definition at line 37 of file C4Config.h.
Referenced by CompileFunc(), CreateSaveFolder(), DefaultLanguage(), C4GameSave::SaveDesc(), and C4ScenarioListLoader::Entry::SetTitleInGroup().
char C4ConfigGeneral::LanguageEx[CFG_MaxString+1] |
Definition at line 38 of file C4Config.h.
Referenced by CompileFunc(), DefaultLanguage(), C4Application::DoInit(), C4ScenarioListLoader::SubFolder::DoLoadContents(), C4Game::DropFile(), C4Game::GetTranslatedString(), C4Game::InitDefs(), C4Game::InitScriptEngine(), C4MapFolderData::Load(), C4DefList::Load(), C4ScenarioListLoader::Entry::Load(), C4Game::LoadAdditionalSystemGroup(), C4ScenarioListLoader::Scenario::LoadCustomPre(), C4Game::OpenScenario(), C4Application::ParseCommandLine(), C4HTTPClient::Query(), C4Game::ReloadDef(), C4Game::ReloadFile(), C4ScenarioSection::ScenarioLoad(), and C4Game::UpdateLanguage().
char C4ConfigGeneral::MissionAccess[CFG_MaxString+1] |
Definition at line 47 of file C4Config.h.
Referenced by CompileFunc(), C4MapFolderData::CreateGUIElements(), C4StartupScenSelDlg::KeyCheat2(), C4ScenarioListLoader::Scenario::LoadCustomPre(), and C4Game::OpenScenario().
int32_t C4ConfigGeneral::MMTimer |
Definition at line 50 of file C4Config.h.
Referenced by C4StartupOptionsDlg::C4StartupOptionsDlg(), and CompileFunc().
char C4ConfigGeneral::ModsDataPath[CFG_MaxString+1] |
Definition at line 57 of file C4Config.h.
Referenced by CompileFunc(), C4ScenarioListLoader::Entry::CreateEntryForFile(), DeterminePaths(), and C4Reloc::Init().
StdStrBuf C4ConfigGeneral::ModsFolder |
Definition at line 46 of file C4Config.h.
Referenced by CompileFunc(), and DeterminePaths().
char C4ConfigGeneral::Name[CFG_MaxString+1] |
Definition at line 36 of file C4Config.h.
Referenced by CompileFunc().
int32_t C4ConfigGeneral::OpenScenarioInGameMode |
Definition at line 41 of file C4Config.h.
Referenced by CompileFunc(), and C4Application::ParseCommandLine().
char C4ConfigGeneral::Participants[CFG_MaxString+1] |
Definition at line 39 of file C4Config.h.
Referenced by C4ScenarioListLoader::Scenario::CanOpen(), CompileFunc(), C4Game::Init(), C4StartupPlrPropertiesDlg::OnClosed(), C4StartupMainDlg::OnPlayerSelContextAdd(), C4StartupMainDlg::OnPlayerSelContextAddPlr(), C4StartupMainDlg::OnPlayerSelContextRemove(), C4StartupMainDlg::OnPlayerSelContextRemovePlr(), C4ClientCore::SetLocal(), and C4StartupMainDlg::UpdateParticipants().
char C4ConfigGeneral::RXFontName[CFG_MaxString+1] |
Definition at line 42 of file C4Config.h.
Referenced by CompileFunc(), C4GraphicsResource::InitFonts(), C4StartupGraphics::InitFonts(), and C4Application::SetGameFont().
int32_t C4ConfigGeneral::RXFontSize |
Definition at line 43 of file C4Config.h.
Referenced by CompileFunc(), C4GraphicsResource::InitFonts(), C4StartupGraphics::InitFonts(), and C4Application::SetGameFont().
StdStrBuf C4ConfigGeneral::ScreenshotFolder |
Definition at line 45 of file C4Config.h.
Referenced by CompileFunc(), and DeterminePaths().
char C4ConfigGeneral::ScreenshotPath[CFG_MaxString+1] |
Definition at line 59 of file C4Config.h.
Referenced by C4Config::AtScreenshotPath(), and DeterminePaths().
int32_t C4ConfigGeneral::ScrollSmooth |
Definition at line 51 of file C4Config.h.
Referenced by C4Viewport::AdjustPosition(), and CompileFunc().
char C4ConfigGeneral::SystemDataPath[CFG_MaxString+1] |
Definition at line 58 of file C4Config.h.
Referenced by C4Config::AtRelativePath(), C4Config::AtSystemDataPath(), C4Config::AtSystemDataRelativePath(), C4PortraitSelDlg::C4PortraitSelDlg(), DeterminePaths(), C4Application::DoInit(), C4Config::ForceRelativePath(), and C4Reloc::Init().
StdCopyStrBuf C4ConfigGeneral::TempPath |
Definition at line 55 of file C4Config.h.
Referenced by C4Config::AtTempPath(), DeterminePaths(), and C4Application::DoInit().
char C4ConfigGeneral::TempUpdatePath[CFG_MaxString+1] |
Definition at line 60 of file C4Config.h.
Referenced by C4Config::AtTempUpdatePath(), C4Config::CleanupTempUpdateFolder(), CompileFunc(), and C4Config::MakeTempUpdateFolder().
char C4ConfigGeneral::UserDataPath[CFG_MaxString+1] |
Definition at line 56 of file C4Config.h.
Referenced by C4MainMenu::ActivateNewPlayer(), C4Config::AtNetworkPath(), C4Config::AtRelativePath(), C4Config::AtUserDataPath(), C4Config::AtUserDataRelativePath(), C4PortraitSelDlg::C4PortraitSelDlg(), C4StartupPlrSelDlg::CheckPlayerName(), DeterminePaths(), C4Application::DoInit(), C4Reloc::Init(), C4StartupPlrSelDlg::PlayerListItem::MoveFilename(), C4StartupPlrSelDlg::OnDelBtnConfirm(), C4StartupMainDlg::OnPlayerSelContextAdd(), C4StartupMainDlg::OnShown(), C4MessageInput::ProcessCommand(), and C4StartupMainDlg::UpdateParticipants().