|
Colobot
|
Public Member Functions | |
| CPlayerProfile (std::string playerName) | |
| bool | Create () |
| bool | Delete () |
| std::string | GetName () |
| Returns player name. | |
| std::string | GetSaveDir () |
| Returns player's save directory path. | |
| std::string | GetSaveFile (std::string filename) |
| Returns path to file inside player's save directory. | |
| void | IncrementLevelTryCount (LevelCategory cat, int chap, int rank) |
| Increments level try count. | |
| int | GetLevelTryCount (LevelCategory cat, int chap, int rank) |
| Returns try count for given level. | |
| void | SetLevelPassed (LevelCategory cat, int chap, int rank, bool bPassed) |
| Changes level passed status (also updates chapter passed status). | |
| bool | GetLevelPassed (LevelCategory cat, int chap, int rank) |
| Chenks if the level (or chapter, if rank=0) is passed. | |
| int | GetChapPassed (LevelCategory cat) |
| Returns the highest chapter accessible in the given category. | |
| void | SetSelectedChap (LevelCategory category, int chap) |
| Sets selected chapter for save file. | |
| int | GetSelectedChap (LevelCategory category) |
| Returns selected chapter from save file. | |
| void | SetSelectedRank (LevelCategory category, int rank) |
| Sets selected level for save file. | |
| int | GetSelectedRank (LevelCategory category) |
| Returns selected level from save file. | |
| int | GetFreeGameBuildUnlock () |
| Returns unlocked EnableBuild for free game. | |
| void | SetFreeGameBuildUnlock (int freeBuild) |
| Saves unlocked EnableBuild for free game. | |
| int | GetFreeGameResearchUnlock () |
| Returns unlocked DoneResearch for free game. | |
| void | SetFreeGameResearchUnlock (int freeResearch) |
| Saves unlocked DoneResearch for free game. | |
| PlayerAppearance & | GetAppearance () |
| Returns a reference to PlayerAppearance structure. | |
| void | LoadAppearance () |
| Loads PlayerAppearance structure. | |
| void | SaveAppearance () |
| Saves PlayerAppearance structure. | |
| bool | HasAnySavedScene () |
| Returns true if player has at least one saved scene. | |
| std::vector< SavedScene > | GetSavedSceneList () |
| Returns list of all saved scenes. | |
| void | SaveScene (std::string dir, std::string info) |
| Saves current scene status. | |
| void | LoadScene (std::string dir) |
| Loads scene. | |
| bool | DeleteScene (std::string dir) |
| Delete saved scene. | |
Static Public Member Functions | |
| static std::string | GetLastName () |
| static std::vector< std::string > | GetPlayerList () |
Protected Member Functions | |
| void | LoadFinishedLevels (LevelCategory category) |
| Loads LevelInfo data for given category. | |
| void | SaveFinishedLevels (LevelCategory category) |
| Saves LevelInfo data for given category. | |
| void | LoadFreeGameUnlock () |
| Loads free game unlock state. | |
| void | SaveFreeGameUnlock () |
| Saves free game unlock state. | |
Protected Attributes | |
| std::string | m_playerName |
| Player name. | |
| std::map< LevelCategory, bool > | m_levelInfoLoaded |
| Is finished levels file loaded already? | |
| std::map< LevelCategory, std::map< int, std::map< int, LevelInfo > > > | m_levelInfo |
| Level completion info. | |
| std::map< LevelCategory, int > | m_selectChap |
| Selected level chapter. | |
| std::map< LevelCategory, int > | m_selectRank |
| Selected level rank. | |
| bool | m_freegameLoaded |
| Is freegame save file loaded already? | |
| int | m_freegameBuild |
| Buildings unlocked for free game. | |
| int | m_freegameResearch |
| Researches unlocked for free game. | |
| PlayerAppearance | m_appearance |
| Player appearance. | |
| std::string CPlayerProfile::GetName | ( | ) |
Returns player name.
| std::string CPlayerProfile::GetSaveDir | ( | ) |
Returns player's save directory path.
| std::string CPlayerProfile::GetSaveFile | ( | std::string | filename | ) |
Returns path to file inside player's save directory.
| void CPlayerProfile::IncrementLevelTryCount | ( | LevelCategory | cat, |
| int | chap, | ||
| int | rank ) |
Increments level try count.
| int CPlayerProfile::GetLevelTryCount | ( | LevelCategory | cat, |
| int | chap, | ||
| int | rank ) |
Returns try count for given level.
| void CPlayerProfile::SetLevelPassed | ( | LevelCategory | cat, |
| int | chap, | ||
| int | rank, | ||
| bool | bPassed ) |
Changes level passed status (also updates chapter passed status).
| bool CPlayerProfile::GetLevelPassed | ( | LevelCategory | cat, |
| int | chap, | ||
| int | rank ) |
Chenks if the level (or chapter, if rank=0) is passed.
| int CPlayerProfile::GetChapPassed | ( | LevelCategory | cat | ) |
Returns the highest chapter accessible in the given category.
| void CPlayerProfile::SetSelectedChap | ( | LevelCategory | category, |
| int | chap ) |
Sets selected chapter for save file.
| int CPlayerProfile::GetSelectedChap | ( | LevelCategory | category | ) |
Returns selected chapter from save file.
| void CPlayerProfile::SetSelectedRank | ( | LevelCategory | category, |
| int | rank ) |
Sets selected level for save file.
| int CPlayerProfile::GetSelectedRank | ( | LevelCategory | category | ) |
Returns selected level from save file.
| int CPlayerProfile::GetFreeGameBuildUnlock | ( | ) |
Returns unlocked EnableBuild for free game.
| void CPlayerProfile::SetFreeGameBuildUnlock | ( | int | freeBuild | ) |
Saves unlocked EnableBuild for free game.
| int CPlayerProfile::GetFreeGameResearchUnlock | ( | ) |
Returns unlocked DoneResearch for free game.
| void CPlayerProfile::SetFreeGameResearchUnlock | ( | int | freeResearch | ) |
Saves unlocked DoneResearch for free game.
| PlayerAppearance & CPlayerProfile::GetAppearance | ( | ) |
Returns a reference to PlayerAppearance structure.
| void CPlayerProfile::LoadAppearance | ( | ) |
Loads PlayerAppearance structure.
| void CPlayerProfile::SaveAppearance | ( | ) |
Saves PlayerAppearance structure.
| bool CPlayerProfile::HasAnySavedScene | ( | ) |
Returns true if player has at least one saved scene.
| std::vector< SavedScene > CPlayerProfile::GetSavedSceneList | ( | ) |
Returns list of all saved scenes.
| void CPlayerProfile::SaveScene | ( | std::string | dir, |
| std::string | info ) |
Saves current scene status.
| void CPlayerProfile::LoadScene | ( | std::string | dir | ) |
Loads scene.
| bool CPlayerProfile::DeleteScene | ( | std::string | dir | ) |
Delete saved scene.
|
protected |
Loads LevelInfo data for given category.
|
protected |
Saves LevelInfo data for given category.
|
protected |
Loads free game unlock state.
|
protected |
Saves free game unlock state.
|
protected |
Player name.
|
protected |
Is finished levels file loaded already?
|
protected |
Level completion info.
|
protected |
Selected level chapter.
|
protected |
Selected level rank.
|
protected |
Is freegame save file loaded already?
|
protected |
Buildings unlocked for free game.
|
protected |
Researches unlocked for free game.
|
protected |
Player appearance.