OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4PlayerList.cpp File Reference
Include dependency graph for C4PlayerList.cpp:

Go to the source code of this file.

Functions

void SetClientPrefix (char *szFilename, const char *szClient)
 
int32_t ValidPlr (int32_t plr)
 
int32_t Hostile (int32_t plr1, int32_t plr2)
 

Variables

C4PlayerList Players
 

Function Documentation

int32_t Hostile ( int32_t  plr1,
int32_t  plr2 
)

Definition at line 670 of file C4PlayerList.cpp.

References C4PlayerList::Hostile(), and Players.

Referenced by C4Game::DrawCrewOverheadText(), InitGameFunctionMap(), C4Object::IsVisible(), and C4FoWLight::IsVisibleForPlayer().

671 {
672  return ::Players.Hostile(plr1,plr2);
673 }
bool Hostile(int iPlayer1, int iPlayer2) const
C4PlayerList Players

Here is the call graph for this function:

Here is the caller graph for this function:

void SetClientPrefix ( char *  szFilename,
const char *  szClient 
)

Definition at line 328 of file C4PlayerList.cpp.

References GetFilename(), SAppend(), SAppendChar(), SCopy(), SEqualNoCase(), and SLen().

Referenced by C4PlayerList::FileInUse().

329 {
330  char szTemp[1024+1];
331  // Compose prefix
332  char szPrefix[1024+1];
333  SCopy(szClient,szPrefix); SAppendChar('-',szPrefix);
334  // Prefix already set?
335  SCopy(GetFilename(szFilename),szTemp,SLen(szPrefix));
336  if (SEqualNoCase(szTemp,szPrefix)) return;
337  // Insert prefix
338  SCopy(GetFilename(szFilename),szTemp);
339  SCopy(szPrefix,GetFilename(szFilename));
340  SAppend(szTemp,szFilename);
341 }
char * GetFilename(char *szPath)
Definition: StdFile.cpp:45
void SCopy(const char *szSource, char *sTarget, size_t iMaxL)
Definition: Standard.cpp:130
void SAppendChar(char cChar, char *szStr)
Definition: Standard.cpp:243
void SAppend(const char *szSource, char *szTarget, int iMaxL)
Definition: Standard.cpp:235
bool SEqualNoCase(const char *szStr1, const char *szStr2, int iLen)
Definition: Standard.cpp:185
size_t SLen(const char *sptr)
Definition: Standard.h:74

Here is the call graph for this function:

Here is the caller graph for this function:

int32_t ValidPlr ( int32_t  plr)

Definition at line 665 of file C4PlayerList.cpp.

References Players, and C4PlayerList::Valid().

Referenced by C4Viewport::AdjustPosition(), C4Object::AssignInfo(), C4Object::ChangeDef(), C4Viewport::DrawPlayerInfo(), C4Object::GetDataString(), C4Viewport::Init(), C4Object::Init(), C4FindObjectOwner::IsImpossible(), C4FindObjectController::IsImpossible(), C4Object::IsPlayerObject(), C4MainMenu::MenuCommand(), C4Object::SetOwner(), and C4Object::ValidateOwner().

666 {
667  return ::Players.Valid(plr);
668 }
bool Valid(int iPlayer) const
C4PlayerList Players

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

C4PlayerList Players

Definition at line 675 of file C4PlayerList.cpp.

Referenced by C4Game::Abort(), C4MainMenu::ActivateMain(), C4Game::ActivateMenu(), C4MainMenu::ActivateNewPlayer(), C4Team::AddPlayer(), C4Viewport::AdjustPosition(), C4Object::AssignDeath(), C4Object::AssignInfo(), C4MouseControl::ButtonUpDragScript(), C4Network2Stats::C4Network2Stats(), C4Viewport::CalculateZoom(), C4Object::ChangeDef(), C4Game::Clear(), C4Game::ClearPointers(), C4Game::CompileFunc(), ConsoleDlgProc(), C4ViewportList::CreateViewport(), C4Game::Default(), C4Game::DoGameOver(), C4MouseControl::DoMoveInput(), C4MainMenu::DoRefillInternal(), C4Viewport::Draw(), C4Game::DrawCrewOverheadText(), C4Player::DrawHostility(), C4Viewport::DrawMenu(), C4Viewport::DrawPlayerStartup(), C4Player::Eliminate(), C4Viewport::EnableFoW(), C4Game::Evaluate(), C4Player::Evaluate(), C4Game::Execute(), C4Network2Stats::ExecuteControlFrame(), C4Player::FindNewOwner(), C4Game::FindVisObject(), C4Game::GameOverCheck(), C4ControlSyncCheck::GetAllCrewPosX(), C4Object::GetDataString(), C4MessageBoard::GetMessagePlayer(), C4Object::GrabInfo(), C4Menu::HasMouse(), Hostile(), C4ViewportWindow::Init(), C4Player::Init(), C4Object::Init(), C4Player::InitControl(), C4Game::InitGameFinal(), C4Viewport::InitZoom(), C4Object::IsPlayerObject(), C4ObjectMenu::IsReadOnly(), C4Object::IsUserPlayerObject(), C4Viewport::IsViewportMenu(), C4Game::JoinPlayer(), C4Game::LoadScenarioSection(), C4MainMenu::MenuCommand(), C4MouseControl::Move(), C4Viewport::NextPlayer(), C4ChatInputDialog::OnChatCancel(), C4ChatInputDialog::OnChatInput(), C4Game::OnPlayerJoinFinished(), C4GameSaveSavegame::OnSaving(), C4GameOverDlg::OnShown(), C4Console::PlayerJoin(), C4GameControl::PrepareInput(), C4MessageInput::ProcessCommand(), C4MessageInput::ProcessInput(), C4PlayerInfoList::RecreatePlayers(), C4Client::Remove(), C4PlayerInfoList::RemoveUnassociatedPlayers(), C4Player::ScenarioInit(), C4Player::SetHostility(), C4Viewport::SetOutputSize(), C4Object::SetOwner(), C4Player::SetTeamHostility(), C4ViewportList::SortViewportsByPlayerControl(), C4Game::Synchronize(), C4Player::ToggleMouseControl(), C4Network2ClientList::UpdateClientActivity(), C4MouseControl::UpdateCursorTarget(), C4Viewport::UpdateOutputSize(), C4Console::UpdatePlayerMenu(), C4MouseControl::UpdateSingleSelection(), C4Console::UpdateViewportMenu(), ValidPlr(), C4FullScreen::ViewportCheck(), and C4Network2Stats::~C4Network2Stats().