#include <C4Teams.h>
Public Member Functions | |
| C4Team (const C4Team &rCopy) | |
| C4Team & | operator= (const C4Team &rCopy) |
| C4Team () | |
| ~C4Team () | |
| void | Clear () |
| void | AddPlayer (class C4PlayerInfo &rInfo, bool fAdjustPlayer) |
| void | RemoveIndexedPlayer (int32_t iIndex) |
| void | RemovePlayerByID (int32_t iID) |
| int32_t | GetPlayerCount () const |
| const char * | GetName () const |
| int32_t | GetID () const |
| bool | IsPlayerIDInTeam (int32_t iID) |
| int32_t | GetFirstUnjoinedPlayerID () const |
| int32_t | GetPlrStartIndex () const |
| uint32_t | GetColor () const |
| const char * | GetIconSpec () const |
| bool | IsFull () const |
| StdStrBuf | GetNameWithParticipants () const |
| bool | HasWon () const |
| int32_t | GetIndexedPlayer (int32_t iIndex) const |
| void | CompileFunc (StdCompiler *pComp) |
| void | RecheckPlayers () |
| void | RecheckColor (C4TeamList &rForList) |
Protected Attributes | |
| int32_t | iID {0} |
| char | Name [C4MaxName+1] |
| int32_t | iPlrStartIndex {0} |
| uint32_t | dwClr {0} |
| StdCopyStrBuf | sIconSpec |
| int32_t | iMaxPlayer {0} |
Friends | |
| class | C4TeamList |
| C4Team::C4Team | ( | const C4Team & | rCopy | ) |
Definition at line 30 of file C4Teams.cpp.
References C4MaxName, GetIndexedPlayer(), GetName(), Name, and SCopy().
|
inline |
| void C4Team::AddPlayer | ( | class C4PlayerInfo & | rInfo, |
| bool | fAdjustPlayer | ||
| ) |
Definition at line 52 of file C4Teams.cpp.
References C4PT_Script, Game, C4PlayerList::GetByInfoID(), GetColor(), C4PlayerInfo::GetID(), GetID(), C4PlayerInfo::GetType(), C4PlayerInfo::IsJoined(), C4TeamList::IsTeamColors(), Players, C4PlayerInfo::SetColor(), C4Player::SetPlayerColor(), C4PlayerInfo::SetTeam(), C4Player::Team, and C4Game::Teams.
Referenced by C4TeamList::RecheckPlayerInfoTeams(), RecheckPlayers(), C4TeamList::RecheckTeams(), and C4Player::ScenarioAndTeamInit().
| void C4Team::Clear | ( | ) |
Definition at line 44 of file C4Teams.cpp.
References StdStrBuf::Clear(), iID, iMaxPlayer, Name, and sIconSpec.
Referenced by CompileFunc(), and ~C4Team().
| void C4Team::CompileFunc | ( | StdCompiler * | pComp | ) |
Definition at line 125 of file C4Teams.cpp.
References Clear(), dwClr, iID, iMaxPlayer, iPlrStartIndex, StdCompiler::isDeserializer(), mkArrayAdapt(), mkNamingAdapt(), mkParAdapt(), mkStringAdaptMA(), Name, StdCompiler::RCT_All, sIconSpec, StdCompiler::Value(), and ZeroMem().
|
inline |
Definition at line 70 of file C4Teams.h.
References dwClr.
Referenced by AddPlayer(), C4MainMenu::DoRefillInternal(), RecheckColor(), and C4PlayerInfoList::UpdatePlayerAttributes().
| int32_t C4Team::GetFirstUnjoinedPlayerID | ( | ) | const |
Definition at line 112 of file C4Teams.cpp.
References Game, C4PlayerInfoList::GetPlayerInfoByID(), C4PlayerInfo::HasJoinIssued(), and C4Game::PlayerInfos.
Referenced by C4TeamList::RecheckTeams().
|
inline |
Definition at line 71 of file C4Teams.h.
References StdStrBuf::getData(), and sIconSpec.
Referenced by C4MainMenu::DoRefillInternal().
|
inline |
Definition at line 66 of file C4Teams.h.
References iID.
Referenced by AddPlayer(), C4GameOverDlg::C4GameOverDlg(), C4MainMenu::DoRefillInternal(), C4TeamList::GetForcedTeamSelection(), C4TeamList::RecheckPlayerInfoTeams(), RecheckPlayers(), C4Player::ScenarioAndTeamInit(), and C4GameSave::WriteDescPlayers().
|
inline |
Definition at line 76 of file C4Teams.h.
Referenced by C4Team(), C4Player::FindNewOwner(), and GetNameWithParticipants().
|
inline |
Definition at line 65 of file C4Teams.h.
References Name.
Referenced by C4Team(), GetNameWithParticipants(), and C4GameSave::WriteDescPlayers().
| StdStrBuf C4Team::GetNameWithParticipants | ( | ) | const |
Definition at line 209 of file C4Teams.cpp.
References StdStrBuf::Append(), StdStrBuf::AppendChar(), StdStrBuf::Copy(), Game, GetIndexedPlayer(), C4PlayerInfo::GetName(), GetName(), GetPlayerCount(), C4PlayerInfoList::GetPlayerInfoByID(), and C4Game::PlayerInfos.
Referenced by C4MainMenu::DoRefillInternal().
|
inline |
Definition at line 64 of file C4Teams.h.
Referenced by C4MainMenu::DoRefillInternal(), C4Player::FindNewOwner(), GetNameWithParticipants(), C4TeamList::GetRandomSmallestTeam(), C4TeamList::GetStartupTeamCount(), C4TeamList::RecheckPlayerInfoTeams(), and C4TeamList::RecheckTeams().
|
inline |
Definition at line 69 of file C4Teams.h.
References iPlrStartIndex.
Referenced by C4Player::Execute(), and C4Player::ScenarioInit().
| bool C4Team::HasWon | ( | ) | const |
Definition at line 234 of file C4Teams.cpp.
References Game, C4PlayerInfoList::GetPlayerInfoByID(), C4PlayerInfo::HasWon(), and C4Game::PlayerInfos.
Referenced by C4PlayerInfo::HasTeamWon().
|
inline |
Definition at line 72 of file C4Teams.h.
References iMaxPlayer.
Referenced by C4TeamList::IsJoin2TeamAllowed().
| bool C4Team::IsPlayerIDInTeam | ( | int32_t | iID | ) |
Definition at line 105 of file C4Teams.cpp.
References iID.
Referenced by RecheckPlayers().
| void C4Team::RecheckColor | ( | C4TeamList & | rForList | ) |
Definition at line 169 of file C4Teams.cpp.
References dwClr, GenerateRandomPlayerColor(), GetColor(), C4TeamList::GetTeamByIndex(), iID, and IsColorConflict().
Referenced by C4TeamList::CreateTeam(), and C4TeamList::Load().
| void C4Team::RecheckPlayers | ( | ) |
Definition at line 140 of file C4Teams.cpp.
References AddPlayer(), Game, C4PlayerInfo::GetID(), GetID(), C4PlayerInfoList::GetNextPlayerInfoByID(), C4PlayerInfoList::GetPlayerInfoByID(), C4PlayerInfo::GetTeam(), IsPlayerIDInTeam(), C4PlayerInfo::IsUsingTeam(), C4Game::PlayerInfos, and RemoveIndexedPlayer().
| void C4Team::RemoveIndexedPlayer | ( | int32_t | iIndex | ) |
Definition at line 83 of file C4Teams.cpp.
Referenced by RecheckPlayers(), and RemovePlayerByID().
| void C4Team::RemovePlayerByID | ( | int32_t | iID | ) |
Definition at line 94 of file C4Teams.cpp.
References iID, and RemoveIndexedPlayer().
Referenced by C4TeamList::RecheckTeams(), and C4Player::ScenarioAndTeamInit().
|
friend |
|
protected |
Definition at line 49 of file C4Teams.h.
Referenced by CompileFunc(), GetColor(), and RecheckColor().
|
protected |
Definition at line 46 of file C4Teams.h.
Referenced by Clear(), CompileFunc(), C4TeamList::CreateTeam(), GetID(), IsPlayerIDInTeam(), RecheckColor(), and RemovePlayerByID().
|
protected |
Definition at line 51 of file C4Teams.h.
Referenced by Clear(), CompileFunc(), and IsFull().
|
protected |
Definition at line 48 of file C4Teams.h.
Referenced by CompileFunc(), and GetPlrStartIndex().
|
protected |
Definition at line 47 of file C4Teams.h.
Referenced by C4Team(), Clear(), CompileFunc(), C4TeamList::CreateTeam(), and GetName().
|
protected |
Definition at line 50 of file C4Teams.h.
Referenced by Clear(), CompileFunc(), and GetIconSpec().